Favor arm hardfloat over arm softfloat.
authorThomas Preud'homme <robotux@celest.fr>
Tue, 29 Jan 2013 17:13:08 +0000 (29 18:13 +0100)
committerThomas Preud'homme <robotux@celest.fr>
Tue, 29 Jan 2013 17:15:23 +0000 (29 18:15 +0100)
Favor ARM hardfloat over ARM softfloat calling convention. In
particular, this solve the problem of the raspbian distribution where
the softfloat ld.so pathname (lib/ld-linux.so.3) is actually a symlink
to the hardfloat ld.so pathname (/lib/arm-linux-gnueabihf/ld-2.13.so).

Makefile

index d155f45..d257464 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -57,12 +57,12 @@ endif
 ifeq ($(ARCH),arm)
 NATIVE_DEFINES=-DTCC_TARGET_ARM
 NATIVE_DEFINES+=-DWITHOUT_LIBTCC
-ifneq (,$(wildcard /lib/ld-linux.so.3))
-NATIVE_DEFINES+=-DTCC_ARM_EABI
-NATIVE_DEFINES+=$(if $(wildcard /lib/arm-linux-gnueabi), -DCONFIG_MULTIARCHDIR=\"arm-linux-gnueabi\")
-else ifneq (,$(wildcard /lib/ld-linux-armhf.so.3 /lib/arm-linux-gnueabihf/ld-linux.so.3))
+ifneq (,$(wildcard /lib/ld-linux-armhf.so.3 /lib/arm-linux-gnueabihf/ld-linux.so.3))
 NATIVE_DEFINES+=-DTCC_ARM_EABI -DTCC_ARM_HARDFLOAT
 NATIVE_DEFINES+=$(if $(wildcard /lib/arm-linux-gnueabihf),-DCONFIG_MULTIARCHDIR=\"arm-linux-gnueabihf\")
+else ifneq (,$(wildcard /lib/ld-linux.so.3))
+NATIVE_DEFINES+=-DTCC_ARM_EABI
+NATIVE_DEFINES+=$(if $(wildcard /lib/arm-linux-gnueabi), -DCONFIG_MULTIARCHDIR=\"arm-linux-gnueabi\")
 endif
 NATIVE_DEFINES+=$(if $(shell grep -l "^Features.* \(vfp\|iwmmxt\) " /proc/cpuinfo),-DTCC_ARM_VFP)
 endif