summaryrefslogtreecommitdiffstats
path: root/lib/clang
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-04-16 21:36:55 +0000
committerdim <dim@FreeBSD.org>2012-04-16 21:36:55 +0000
commit0b9f8d0983917f537b2e7566d4e7756a889d7407 (patch)
tree09f419ce639b114c9f5bad0aeb2e8cead0f25e8e /lib/clang
parent97ce6d5fb11b4c08790e829a51412306947c53c0 (diff)
downloadFreeBSD-src-0b9f8d0983917f537b2e7566d4e7756a889d7407.zip
FreeBSD-src-0b9f8d0983917f537b2e7566d4e7756a889d7407.tar.gz
Work around an issue on 32-bit PowerPC, where clang executable can get
too big, causing 'relocation truncated to fit' errors at link time. Reviewed by: nwhitehorn
Diffstat (limited to 'lib/clang')
-rw-r--r--lib/clang/clang.build.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk
index a14918d..7437a1d 100644
--- a/lib/clang/clang.build.mk
+++ b/lib/clang/clang.build.mk
@@ -11,6 +11,12 @@ CFLAGS+=-I${LLVM_SRCS}/include -I${CLANG_SRCS}/include \
# LLVM is not strict aliasing safe as of 12/31/2011
CFLAGS+= -fno-strict-aliasing
+# Work around an issue on 32-bit PowerPC, where the clang executable can get
+# too big, causing 'relocation truncated to fit' errors at link time.
+.if ${MACHINE_ARCH} == "powerpc"
+CFLAGS+=-mlongcall
+.endif
+
TARGET_ARCH?= ${MACHINE_ARCH}
CFLAGS+=-DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0\"
OpenPOWER on IntegriCloud