Set -mlong-calls where needed to get a static clang and lldb 3.8.0

linking. These are too large for a branch instruction to branch from an
earlier point in the code to somewhere later.

This will also allow these to be build with Thumb-2 when we get this
infrastructure.

Reviewed by:	dim
Differential Revision:	https://reviews.freebsd.org/D4855
This commit is contained in:
Andrew Turner 2016-01-14 19:00:13 +00:00
parent 445a2b570e
commit c455b92483
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=294031
4 changed files with 14 additions and 0 deletions

View file

@ -6,4 +6,8 @@ LLVM_SRCS= ${.CURDIR}/../../../contrib/llvm
INTERNALLIB=
.if ${MACHINE_CPUARCH} == "arm"
STATIC_CXXFLAGS+= -mlong-calls
.endif
.include <bsd.lib.mk>

View file

@ -6,6 +6,9 @@ _LIBCXXRTDIR= ${.CURDIR}/../../contrib/libcxxrt
HDRDIR= ${.CURDIR}/../../contrib/libc++/include
SRCDIR= ${.CURDIR}/../../contrib/libc++/src
CXXINCLUDEDIR= ${INCLUDEDIR}/c++/v${SHLIB_MAJOR}
.if ${MACHINE_CPUARCH} == "arm"
STATIC_CXXFLAGS+= -mlong-calls
.endif
.PATH: ${SRCDIR}

View file

@ -11,6 +11,10 @@ SRCS= cc1_main.cpp \
.if ${MK_SHARED_TOOLCHAIN} == "no"
NO_SHARED?= yes
.if ${MACHINE_CPUARCH} == "arm"
CFLAGS+= -mlong-calls
.endif
.endif
LINKS= ${BINDIR}/clang ${BINDIR}/clang++ \

View file

@ -8,6 +8,9 @@ LLDB_SRCS=${.CURDIR}/../../../contrib/llvm/tools/lldb
CFLAGS+= -I${LLDB_SRCS}/include
CXXFLAGS+= -std=c++11
.if ${MACHINE_CPUARCH} == "arm"
CFLAGS+= -mlong-calls
.endif
SRCDIR= tools/lldb/tools/driver
SRCS= Driver.cpp \