On 10/08/2010 01:26 AM, Amker.Cheng wrote:
Hi all, When I cross building gcc for mips32r2 archs using configuration option "--with-float=hard", gcc compiles crtbegin/crtend/libgcc by default "-msingle-float". But when building shared object with options "-mips32r2 -mfp64",the cross-ld complains "warning xxxx.so uses -msingle-float, yyyy.o uses -mips32r2 -mfp64", Since the difference between crtbeginS.o and yyy.o.
As a practical matter, I think you could ignore this warning. I don't think there is any floating point critical code in crtbeginS.o.
I don't think there is any way to override the default to -mfp64 from the configure command. You may be able to change it from the make command line with appropriate CFLAGS_FOR_???, but I don't know the exact incantation you would use.
David Daney
So How should I configure gcc to overcome this? BTW, my configuration command line is, ../../src/configure --build=i686-pc-linux --host=i686-pc-linux --target=mipsel-linux-gnu --prefix=... --with-sysroot=... --with-arch=mips32r2 --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-libgomp --enable-threads --enable-mips-nonpic --enable-shared --enable-poison-system-directories --enable-languages=c,c++ --with-float=hard --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-cloog=... --with-ppl=... --with-gmp=... --with-mpfr=... Thanks very much