diff options
author | dim <dim@FreeBSD.org> | 2012-04-16 21:36:55 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-04-16 21:36:55 +0000 |
commit | 0b9f8d0983917f537b2e7566d4e7756a889d7407 (patch) | |
tree | 09f419ce639b114c9f5bad0aeb2e8cead0f25e8e /lib | |
parent | 97ce6d5fb11b4c08790e829a51412306947c53c0 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | lib/clang/clang.build.mk | 6 | ||||
-rw-r--r-- | lib/csu/powerpc/Makefile | 3 |
2 files changed, 8 insertions, 1 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\" diff --git a/lib/csu/powerpc/Makefile b/lib/csu/powerpc/Makefile index 1e1d1fa..a3e0cab 100644 --- a/lib/csu/powerpc/Makefile +++ b/lib/csu/powerpc/Makefile @@ -6,7 +6,8 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include + -I${.CURDIR}/../../libc/include \ + -mlongcall all: ${OBJS} |