Re: FW: wrong code generation in newlib 1.1.14 PPC ?!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kai Ruottu wrote:

Frank Juergen-r58616 wrote:


I generate my own version of gcc and newlib for the PowerPC.

Then you should know what you are doing... And not ask anything here :-)

Neither I always  know what I'm doing... Or don't always know everything.
Being provocative is a good way to trigger some own thinking  anyhow...

Here the goal was to start thinking what on earth could be the default CPU type
etc. for your chosen target.

Is there a specific non-default multilib version triggered with the '-mcpu=603e' option? Or should the default code ('-mcpu=common') be fully compatible with your 603e ? The GCC 3.4 manual tells about this default code :

This was bullshit, I cannot say why I thought the '-mcpu=common' always being the default... The same chapter where the clipped text was taken, clearly told that the target name and the possibly used '-mcpu=something' option defines the default code.... So a 'rs6000-aix5.1' target GCC generates totally different code from a GCC made for the 'powerpc-linux-gnu' which is then totally different from code produced for the 'powerpc-eabi', 'powerpc-eabispe',
'powerpc-eabialtivec' etc. targets.

For the 'powerpc-eabi' the default maybe will be defined with (in 'gcc/config/rs6000/eabi.h') the :

------------- clip -----------------------------
/* Add -meabi to target flags.  */
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_EABI)

/* Invoke an initializer function to set up the GOT.  */
#define NAME__MAIN "__eabi"
#define INVOKE__main

#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (PowerPC Embedded)");

#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS()          \
 do                                      \
   {                                     \
     builtin_define_std ("PPC");         \
     builtin_define ("__embedded__");    \
     builtin_assert ("system=embedded"); \
     builtin_assert ("cpu=powerpc");     \
     builtin_assert ("machine=powerpc"); \
     TARGET_OS_SYSV_CPP_BUILTINS ();     \
   }                                     \
------------- clip -----------------------------

So the '-mcpu=powerpc' would be (one of the) default(s) with the 'powerpc-eabi' target name...

I would guess this target name being used and the '-mcpu=powerpc' code not being suitable
if  needing the '-mcpu=603e'....


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux