]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
PPC: fix "Warning: FOO uses hard float, BAR uses soft float".
authorWolfgang Denk <wd@denx.de>
Thu, 22 Dec 2011 04:29:41 +0000 (04:29 +0000)
committerWolfgang Denk <wd@denx.de>
Fri, 23 Dec 2011 19:03:55 +0000 (20:03 +0100)
commit139e1875d3b3dc31a6ea964f6ff3912fed32c4a2
tree330cc86cb28edde0580c8c17578555400222c9cb
parentaf44f4b2a56ea3b8f57fb117d4768a57e000ac24
PPC: fix "Warning: FOO uses hard float, BAR uses soft float".

It appears that with recent versions of GCC the explicit
"-mhard-float" command line option takes precedence over the
``asm(".gnu_attribute 4, 2");'' in the source file, so this no longer
helps to avoid the warnings we get when linking code that uses FP
instructions with other code that was built using soft-float.

We can remove the ".gnu_attribute" (which appears to carry no other
information, at least so far) from the object files, but we also have
to make sure we don't pull in the __gcc_qsub() and __gcc_qmul()
functions from the standard libgcc, as these would again "infect" our
linking.  We copy this code from:
gcc-4.2.2/gcc/config/rs6000/darwin-ldouble.c
This old version was chosen because it was still available under a
compatible license (GCC v2+).   The file was stripped down to the
needed parts, and reformatted so it passes checkpatch with only one
warning (do not add new typedefs).

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Stefan Roese <sr@denx.de>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Kim Phillips <kim.phillips@freescale.com>
Tested-by: Stefan Roese <sr@denx.de>
Tested-by: Anatolij Gustschin <agust@denx.de>
post/lib_powerpc/fpu/Makefile
post/lib_powerpc/fpu/darwin-ldouble.c [new file with mode: 0644]