mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-05 09:14:03 +00:00
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
This commit is contained in:
parent
6c63ec073e
commit
4f78aa4725
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=234356
@ -34,6 +34,7 @@ CFLAGS+= -include osreldate.h
|
||||
.if ${MACHINE_CPUARCH} == "powerpc"
|
||||
TGTOBJS= crtsavres.o
|
||||
SRCS+= crtsavres.asm
|
||||
CFLAGS+= -mlongcall
|
||||
.endif
|
||||
.if ${MACHINE_CPUARCH} == "sparc64"
|
||||
TGTOBJS= crtfastmath.o
|
||||
|
@ -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\"
|
||||
|
||||
|
@ -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}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user