summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2013-02-12 05:56:00 +0000
committerandrew <andrew@FreeBSD.org>2013-02-12 05:56:00 +0000
commit180d9ee4c70608454a9b8c6831ce1949c3e27bc7 (patch)
tree5ac157e25a03f0aa98f3452f75baddb57bad914a /lib
parent443ddac37e794c5ddc716ddd051a24cae804919d (diff)
downloadFreeBSD-src-180d9ee4c70608454a9b8c6831ce1949c3e27bc7.zip
FreeBSD-src-180d9ee4c70608454a9b8c6831ce1949c3e27bc7.tar.gz
Allow us to build clang for ARM EABI. Clang and llvm use the
arm-gnueabi-freebsd10.0 triple for EABI. Use this when we are on arm or armv6 and are building for EABI. Reviewed by: dim
Diffstat (limited to 'lib')
-rw-r--r--lib/clang/clang.build.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk
index 0015e3d..6de044a 100644
--- a/lib/clang/clang.build.mk
+++ b/lib/clang/clang.build.mk
@@ -19,7 +19,15 @@ CFLAGS+= -fno-strict-aliasing
TARGET_ARCH?= ${MACHINE_ARCH}
BUILD_ARCH?= ${MACHINE_ARCH}
-TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0
+
+.if (${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "armv6") && \
+ ${MK_ARM_EABI} != "no"
+TARGET_ABI= gnueabi
+.else
+TARGET_ABI= unknown
+.endif
+
+TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd10.0
BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0
CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \
-DLLVM_HOSTTRIPLE=\"${BUILD_TRIPLE}\" \
OpenPOWER on IntegriCloud