public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] powerpc: FOO uses hard float, BAR uses soft float
@ 2011-12-08 22:09 Wolfgang Denk
  2011-12-08 22:51 ` Stephen Warren
  2011-12-09 14:46 ` Kumar Gala
  0 siblings, 2 replies; 8+ messages in thread
From: Wolfgang Denk @ 2011-12-08 22:09 UTC (permalink / raw)
  To: u-boot

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-12-23 19:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-08 22:09 [U-Boot] powerpc: FOO uses hard float, BAR uses soft float Wolfgang Denk
2011-12-08 22:51 ` Stephen Warren
2011-12-09 14:46 ` Kumar Gala
2011-12-09 23:12   ` Wolfgang Denk
2011-12-22 14:29     ` [U-Boot] [PATCH] PPC: fix "Warning: FOO uses hard float, BAR uses soft float" Wolfgang Denk
2011-12-22 15:55       ` Stefan Roese
2011-12-23 16:17       ` Anatolij Gustschin
2011-12-23 19:04       ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox