summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2017-06-08 17:10:58 +0000
committerdim <dim@FreeBSD.org>2017-06-08 17:10:58 +0000
commit23f455ae3ae9ca16909a7ab16123ccfbd4a6c6ac (patch)
treeaca78ade5bdc3d5c7bf81a81cac8407fb8b027a8
parent803005508df6ae02d5710b8aed038704b9d11bb0 (diff)
downloadFreeBSD-src-23f455ae3ae9ca16909a7ab16123ccfbd4a6c6ac.zip
FreeBSD-src-23f455ae3ae9ca16909a7ab16123ccfbd4a6c6ac.tar.gz
MFC r319473:
For arm targets, place ABI at the end of the target triple For some reason, we have been inserting the ABI specification into the middle of the target triple, when building LLVM, like so: armv6-gnueabi-freebsd12.0 This is the wrong way around. LLVM even auto-canonicalizes it to: armv6--freebsd12.0-gnueabi Let's do this the right way in llvm.build.mk instead. While here, define a proper VENDOR macro which can be overridden easily. Approved by: re (gjb) Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D10846
-rw-r--r--lib/clang/llvm.build.mk11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/clang/llvm.build.mk b/lib/clang/llvm.build.mk
index 4b4a839c..04a2451 100644
--- a/lib/clang/llvm.build.mk
+++ b/lib/clang/llvm.build.mk
@@ -25,16 +25,17 @@ BUILD_ARCH?= ${MACHINE_ARCH}
# arm (for armv4 and armv5 CPUs) always uses the soft float ABI.
# For all other targets, we stick with 'unknown'.
.if ${TARGET_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
-TARGET_ABI= gnueabihf
+TARGET_ABI= -gnueabihf
.elif ${TARGET_ARCH:Marm*}
-TARGET_ABI= gnueabi
+TARGET_ABI= -gnueabi
.else
-TARGET_ABI= unknown
+TARGET_ABI=
.endif
+VENDOR= unknown
OS_VERSION= freebsd11.1
-TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${TARGET_ABI}-${OS_VERSION}
-BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-unknown-${OS_VERSION}
+TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI}
+BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${VENDOR}-${OS_VERSION}
CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\"
CFLAGS+= -DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\"
OpenPOWER on IntegriCloud