Using same gcc for cross and native

Joel Coltoff joel@wmi.com
Wed Aug 13 06:56:00 GMT 1997


We've been happily using gcc for native and cross-compiling for
a MIPS for a long time now. I'm trying to get everything up to date
and eliminate stuff we don't need. I'd like to use same gcc driver
program for both native compiles and cross compiles. The problem
seems to be that for the MIPS we use the GNU assembler and linker
and for native compiles we use the Sun assembler and linker. Is
there anyway to keep this arrangement and still use a single driver
program?

Other questions kicking around in the back of my mind.

1) With a single driver how do you generate the specs file
   (gcc -dumpspecs) if you need to do that? I guess you
   need to keep all the drivers but only install one of them.

2) For our MIPS system we have several setups. We use the
   R3081 or R4700. We can compile code to run as a stand-alone
   diag or under control of a kernel. In stand-alone mode there
   is a crt0.o for each processor and for the kernel a single
   crt0.o. Is there a clever way to set up the specs file for
   this? For now if I compile for stand-alone and use "gcc -mips1"
   I get the R3081 crt0.o otherwise I get the R4700 startup.
   For the kernel I'll use the -nostdlib option and name the
   startup file on the command line. Is there a better way to
   do this?

Thanks,
 - Joel



More information about the crossgcc mailing list