From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Moore, Jason" To: "'JAY LULLA'" , crossgcc@sourceware.cygnus.com, gcc-help@gcc.gnu.org Subject: RE: Installing cross-compiler for PowerPC 603, pSOS Date: Sat, 01 Apr 2000 00:00:00 -0000 Message-ID: <200001142049.PAA24692@hoover.gilbarco.com> X-SW-Source: 2000-q1/msg00132.html Message-ID: <20000401000000.UcbokBQkR8qTXXczTVfN8qVblFQcqLXi0Q8LoSuOWXo@z> >Hi. I would like to get some advice about cross-compiling GCC for a Sun >Solaris host, and PowerPC target. I am trying to install gcc as a linux to sco cross compiler. I have asked several of these same questions over the last few days. >We have already installed gcc-2.95.2, with its complete source. >Here are some issues I need to address: >- should the cross-compiler be installed in the same dir as the native >compiler, and then be called with a special flag, or should it be >installed in a whole new directory altogether? I believe that it has to me installed in a separate directory, but I am not sure. Everything I have read suggest that you must have 2 separate compilers. One native, and one cross. One solution is to create a script that can determine which version to use. >- should we use flags such as 'with-as' 'with-ld' and 'with-headers' to >specify directories for the assembler, linker, and headers, or is it >best to leave these out, and then specify which assemblers, linkers etc >to use as flags when we actually use the cross-gcc? - If we use the >flags when we actually run gcc, we would have more flexibility in trying >different assemblers and linkers, or have the option of not linking at >all, right? - Or would you have the same flexibility by installing it >with default directories, and then overriding the defaults if you choose >to do so when running gcc? I was instructed to use with-as and with-ld. You must use with-headers and with-lib to specify the directory which contains the headers and libraries for the target platform. configure copies the headers and libraries over when it runs. >- does it matter what version of 'make' one uses? ie whether we use >'make' from cc or from GNU? >From the CrossGCC FAQ page. "4.4 Can I use a non-GNU make? Yes. However, there are a few things to be wary of: you must build in the source tree testing generally isn't done with non-GNU makes, so one is more likely to run into build problems. These problems can be fixed of course, but it may require effort on your part." http://www.objsw.com/CrossGCC/ might be helpful >- I've never used binutils before. What is it all about? Does it have >any useful tools for profiling the code (analyzing it to produce a >function call graph, for example)? >----------------------------- Binutils contains your linker, assembler and other tools needed to get the compiler running. All I know for sure is that you must configure and install binutils for your target platform for the compiler to fully install. I have a problem where "make all" for gcc can't find my ld. I don't know about code profiling. You can install binutils in the same place as your other binutils, where "ld" currently sits, but you must be sure to configure it for both your target and host emulation modes, or else you'll have a linker that only does one or the other. Running the binutils "configure" with the "--enable-targets='target','host'" will accomplish this. >On a related note, I notice that GCC has tools to make it compatible >with certain embedded operating systems. Are there any tools for pSOS? I >couldn't find any... > >Thanks, >Jay Lulla >jay.lulla@ebay.sun.com Don't know, but if you find out, could you let me know? One other thing that might save you some time. You need a file called "libgcc1.a" for your target os. The best way to get this is to: 1. Get a copy from someone who has installed gcc on your target. 2. Install gcc on your target yourself and then copy the file. Best of luck to you! I know it can be frustrating. I have spent all week getting to this point. -Jason Moore ja_moore@bigfoot.com