TCC_ARM_EABI should be defined when compiling with hardfloat calling convention. This commit rework the Makefile to distinguish between calling convention and multiarch and define TCC_ARM_EABI when hardfloat calling convention is used. The result is to first guess the calling convention and then add the multiarch triplet if necessary.
Unified · Split
| @@ -69,11 +69,14 @@ endif · 68 unmodified lines | ||
| 69 | 69 | ifeq ($(ARCH),arm) |
| 70 | 70 | NATIVE_DEFINES=-DTCC_TARGET_ARM |
| 71 | 71 | NATIVE_DEFINES+=-DWITHOUT_LIBTCC |
| 72 | −NATIVE_DEFINES+=$(if $(wildcard /lib/ld-linux.so.3),-DTCC_ARM_EABI) | |
| 73 | −ifneq (,$(wildcard /lib/arm-linux-gnueabi)) | |
| 74 | −NATIVE_DEFINES+=-DCONFIG_MULTIARCHDIR=\"arm-linux-gnueabi\" | |
| 72 | +ifneq (,$(wildcard /lib/ld-linux.so.3)) | |
| 73 | +NATIVE_DEFINES+=-DTCC_ARM_EABI | |
| 74 | +NATIVE_DEFINES+=$(if $(wildcard /lib/arm-linux-gnueabi), -DCONFIG_MULTIARCHDIR=\"arm-linux-gnueabi\") | |
| 75 | 75 | else |
| 76 | −NATIVE_DEFINES+=$(if $(wildcard /lib/arm-linux-gnueabihf),-DCONFIG_MULTIARCHDIR=\"arm-linux-gnueabihf\" -DTCC_ARM_HARDFLOAT) | |
| 76 | +ifneq (,$(wildcard /lib/ld-linux-armhf.so.3 /lib/arm-linux-gnueabihf/ld-linux.so.3)) | |
| 77 | +NATIVE_DEFINES+=-DTCC_ARM_EABI -DTCC_ARM_HARDFLOAT | |
| 78 | +NATIVE_DEFINES+=$(if $(wildcard /lib/arm-linux-gnueabihf),-DCONFIG_MULTIARCHDIR=\"arm-linux-gnueabihf\") | |
| 79 | +endif | |
| 77 | 80 | endif |
| 78 | 81 | NATIVE_DEFINES+=$(if $(shell grep -l "^Features.* \(vfp\|iwmmxt\) " /proc/cpuinfo),-DTCC_ARM_VFP) |
| 79 | 82 | endif |