This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

__nldbl_fprintf and __gtdf2 on PowerPC no-fpu


Hi,

I'm using gcc-4.1.1, glibc-2.5, binutils-2.17.50.0.6 to cross compile
for PowerPC architecture, without fp.

Below is sample problem I met:

$ cat ldbl.c 
#include <stdio.h>
int main(void){
  long double ld1, ld2;
  if (ld1>ld2)
    fprintf(stderr, "hello, %Lf\n", ld1);
  return 0;
}

$ powerpc-unknown-linux-gcc -static ldbl.c
/usr/local/powerpc-unknown-linux-newtool/devel/bin/../target/usr/lib/libc.a(gedf2.o): In function `__gtdf2':
gedf2.c:(.text+0x0): multiple definition of `__gtdf2'
/usr/local/powerpc-unknown-linux-newtool/devel/bin/../lib/gcc/powerpc-unknown-linux/4.1.1/libgcc.a(_gt_df.o):/var/rpm/BUILD/gcc-4.1.1/objdir/gcc/dp-bit.c:1223: first defined here
/usr/local/powerpc-unknown-linux-newtool/devel/bin/../lib/gcc/powerpc-unknown-linux/4.1.1/../../../../powerpc-unknown-linux/bin/ld: Warning: size of symbol `__gtdf2' changed from 152 in /usr/local/powerpc-unknown-linux-newtool/devel/bin/../lib/gcc/powerpc-unknown-linux/4.1.1/libgcc.a(_gt_df.o) to 440 in /usr/local/powerpc-unknown-linux-newtool/devel/bin/../target/usr/lib/libc.a(gedf2.o)
collect2: ld returned 1 exit status

Without specifying -static, or removing `if' statement, or change `long
double' to `float' from sample program would not reproduce the problem.

Any hint to solve this?


(Hiroki Kaminaga)
t
--


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