[U-Boot] powerpc: FOO uses hard float, BAR uses soft float
Wolfgang Denk
wd at denx.de
Thu Dec 8 23:09:05 CET 2011
Hi,
I'm looking for help to get rid of linker warnigns like these:
-> ./MAKEALL sequoia
Configuring for sequoia - Board: sequoia, Options: SEQUOIA
powerpc-linux-ld: Warning: 20010226-1.o uses hard float, libpostpowerpcfpu.o uses soft float
powerpc-linux-ld: Warning: acc1.o uses hard float, libpostpowerpcfpu.o uses soft float
powerpc-linux-ld: Warning: /opt/eldk-5.1/powerpc/sysroots/powerpc-linux/usr/lib/powerpc-linux/4.6.1/libgcc.a(darwin-ldouble.o) uses hard float, u-boot uses soft float
These warnings are cause by the fact that we always build U-Boot with
"-msoft-float", but boards that have POST enabled may pull in the FPU
test code, which naturally will have to be compiled with
"-mhard-float" instead.
Is there any way to silence these warnings (ideally only for these
specific set of files, where we know they are to be expected) ?
I tried playing tricks to get rid of them - the information about
using the FPU is envoded in the ".gnu.attributes" section of the ELF
file:
-> readelf -A /work/wd/tmp-ppc/post/lib_powerpc/fpu/acc1.o
Attribute Section: gnu
File Attributes
Tag_GNU_Power_ABI_FP: Hard float
-> readelf -e /work/wd/tmp-ppc/post/lib_powerpc/fpu/acc1.o | grep gnu.attributes
[129] .gnu.attributes LOOS+ffffff5 00000000 004e5c 000010 00 0 0 1
We can remove this information using brute force, like
${CROSS_COMPILE}objcopy -R .gnu.attributes
which indeed gets rid of most of the warnings - but it will still
result in the
powerpc-linux-ld: Warning: /opt/eldk-5.1/powerpc/sysroots/powerpc-linux/usr/lib/powerpc-linux/4.6.1/libgcc.a(darwin-ldouble.o) uses hard float, u-boot uses soft float
warning.
Anybody any ideas?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Two wrongs don't make a right, but three rights make a left.
More information about the U-Boot
mailing list