Add -mlong-calls also to LLVM's STATIC_CFLAGS on ARM

-mlong-calls was set only in STATIC_CXXFLAGS, but there are some .c
source files in LLVM which also need -mlong-calls.

Unfortunately this is not sufficient to fix linking lldb on ARM,
because LLVM-generated calls to __aeabi_read_tp do not honour the
-mlong-calls flag.  See LLVM PR31769 for details.

Reviewed by:	dim
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D9348
This commit is contained in:
Ed Maste 2017-01-27 21:26:23 +00:00
parent ca4fe588bb
commit f2d1e1a7ba
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/clang400-import/; revision=312898

View File

@ -46,5 +46,6 @@ CXXFLAGS+= -fno-rtti
CXXFLAGS.clang+= -stdlib=libc++
.if ${MACHINE_CPUARCH} == "arm"
STATIC_CFLAGS+= -mlong-calls
STATIC_CXXFLAGS+= -mlong-calls
.endif