Yep, I know this works but I think this work only in case your selected core and the default core are similar.
I use a 3.4 version of gcc and a this version compiled the libraries for the following version
mycross-gcc --print-multi-libs
.;
mpc7400;@mcpu=7400
nof;@msoft-float
le;@mlittle
no-spe/no-abi-spe/no-isel;@mspe=no@mabi=no-spe@misel=no
no-spe/no-abi-spe/no-isel/le;@mspe=no@mabi=no-spe@misel=no@mlittle
nof/le;@msoft-float@mlittle
mpc7400/nof;@mcpu=7400@msoft-float
mpc7400/le;@mcpu=7400@mlittle
mpc7400/nof/le;@mcpu=7400@msoft-float@mlittle
mpc7400/altivec/abi-altivec;@mcpu=7400@maltivec@mabi=altivec
mpc7400/altivec/abi-altivec/le;@mcpu=7400@maltivec@mabi=altivec@mlittle
So if you use this with setup with the 603 it works, but if you try to use a core with a subset of instruction set from the normal PPC, you can't use this setup.
I dig in the internet and in the gcc directories and I think the key is the multilib functionality.
Juergen
-----Original Message-----
From: Amir Bukhari [mailto:ufz6@rz.uni-karlsruhe.de]
Sent: Dienstag, 3. Januar 2006 13:03
To: Frank Juergen-r58616
Subject: RE: Some basic questions from a novice !
I want to use GCC ( powerpc-eabi ) with newlib.
How it is possible to use diff. powerpc cores which has diff.
instructions sets (or subset) for example I want to compile a program
for the 603e, PPC405 and for the 8540. With and without
hardware-floating point. What is the best way to do this ? I try the
CFLAGS_FOR_TARGET = "-mhard-float -mcpu=603e", but if I set this
environment variable I can't compile newlib anymore !
Finally, I want my own newlib versions for every core ... any hints
and ideas ?
You don't need to specify which powerpc cpu you should use with newlib. You just need to compile newlib with default options and use "-mcpu=603e" when you compile your program and link it with newlib. I use this way and it work.
-Amir