[U-Boot] Cannot compile arm u-boot with hardfloat toolchain

Michal Suchanek hramrach at gmail.com
Sun Jan 4 23:23:29 CET 2015


Hello,

when using a hardfloat toolchain linking u-boot fails.

LD      u-boot
ld.bfd: error: /usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(bpabi.o)
uses VFP register arguments, u-boot does not
ld.bfd: failed to merge target specific data of file
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(bpabi.o)
ld.bfd: error: /usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(_divdi3.o)
uses VFP register arguments, u-boot does not
ld.bfd: failed to merge target specific data of file
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(_divdi3.o)
ld.bfd: error: /usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(_udivdi3.o)
uses VFP register arguments, u-boot does not
ld.bfd: failed to merge target specific data of file
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(_udivdi3.o)
Makefile:1065: recipe for target 'u-boot' failed
make: *** [u-boot] Error 1

Removing the softfloat option fixes the issue:

--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -16,7 +16,7 @@ endif
 LDFLAGS_FINAL += --gc-sections
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections \
                     -fno-common -ffixed-r9
-PLATFORM_RELFLAGS += $(call cc-option, -msoft-float) \
+PLATFORM_RELFLAGS += \
       $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))

 # Support generic board on ARM

Did u-boot start using floating point calculations?
Or are these objects superfluous?
Or neither of that but addition of the softfloat option sometime last
year just needlessly breaks builds?

Thanks

Michal


More information about the U-Boot mailing list