This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Installing cross-compiler for PowerPC 603, pSOS


>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

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]