powerpc targets, long double implementation, and c++ programs

Edmar Wienskoski edmar@freescale.com
Fri Sep 8 18:51:00 GMT 2006


I am confused with gcc configuration, and I cannot determine if I have a bug
or if I am misconfiguring the compiler. Here is the situation:

gcc sources: 4.2 snapshot of 20060905

If compiler is configured with:
--target=powerpc-*-linux-gnualtivec

then I have the following libraries and everything works fine:
<prefix>/powerpc-unknown-linux-gnualtivec/lib/libgcc_s.so
    Defined __gcc_qadd (from darwin-ldouble.c) but no undefined references
    No references to __lttf2
<prefix>/lib/gcc/powerpc-unknown-linux-gnualtivec/4.2.0/libgcc.a
    Defined __gcc_qadd (from darwin-ldouble.c) AND undefined references
    No references to __lttf2

If compiler is configured with:
--target=powerpc-*-linux-gnuspe --enable-e500_double --disable-shared

then I have the following libraries and everything still (!!) works fine:
No libgcc_s.so
<prefix>/lib/gcc/powerpc-unknown-linux-gnuspe/4.2.0/libgcc.a
    Only undefined references to __gcc_qadd (because this target defines 
__NO_FPRS__)
    Only undefined references to __lttf2 (why ?)

If compiler is configured with:
--target=powerpc-*-linux-gnuspe --enable-e500_double

then I have the following libraries, and most c++ and fortran code fails
to link with undefined symbols (among then, __gcc_qadd and __lttf2)
<prefix>/lib/libgcc_s.so
    Only undefined references to __gcc_qadd
    Only undefined references to __lttf2

So the key questions are:
1 - What should I expect in regards to __lttf2 (and similar symbols).
(like, when they should be defined, referenced, and when not)
2 - Why darwin-ldouble.c only generates code for __gcc_qadd if fp 
registers are present ?
NOTE: The 8548 does have hardware instructions for implementing f.p. 
(s.p. and d.p.) but
it uses the gp registers. So the definition of __NO_FPRS__ is correct 
for this target.
3 - Is the use of configuration option --disable-shared required for 
this target (because hardware differences
like the lack of fp registers)  or am I just avoiding a problem that 
should be fixed ?

Any comments are welcome.
Thanks
Edmar



More information about the Gcc mailing list