
On Dec 8, 2011, at 4:09 PM, Wolfgang Denk wrote:
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?
Look at commit, we dealt with this in the past
commit ce82ff05388b5ddafdf6082ef0776cce72c40b1c Author: Yuri Tikhonov yur@emcraft.com Date: Sat Dec 20 14:54:21 2008 +0300
FPU POST: fix warnings when building with 2.18 binutils
Also:
commit e009cdeb63308f291c54b173484401aab4a3fe54 Author: Kumar Gala galak@kernel.crashing.org Date: Tue Jan 25 03:00:08 2011 -0600
powerpc: Fix FPU post related link warnings
- k