git: 5f649fc7cbe2 - stable/12 - Remove -mlong-calls vhen building arm libraries and llvm.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 22 Dec 2021 10:06:00 UTC
The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=5f649fc7cbe2ab94d002c93224fef1b357513a18 commit 5f649fc7cbe2ab94d002c93224fef1b357513a18 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2020-03-10 06:49:43 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2021-12-22 09:58:31 +0000 Remove -mlong-calls vhen building arm libraries and llvm. Clang from 9.0.0 onwards already has the necessary relocation range extenders, so this workaround is no longer needed (it produces longer and slower code). Tested on real hardware, and in cross-compile environment. Submitted by: mmel (cherry picked from commit da759cfa320d5076b075d15ff3f00ab3ba5634fd) --- lib/clang/llvm.build.mk | 5 ----- lib/csu/arm/Makefile | 1 - lib/libc++/Makefile | 3 --- usr.bin/clang/clang/Makefile | 3 --- 4 files changed, 12 deletions(-) diff --git a/lib/clang/llvm.build.mk b/lib/clang/llvm.build.mk index d83a85dd38e0..d080bc57f1f3 100644 --- a/lib/clang/llvm.build.mk +++ b/lib/clang/llvm.build.mk @@ -112,8 +112,3 @@ CXXSTD?= c++14 CXXFLAGS+= -fno-exceptions CXXFLAGS+= -fno-rtti CXXFLAGS.clang+= -stdlib=libc++ - -.if ${MACHINE_CPUARCH} == "arm" -STATIC_CFLAGS+= -mlong-calls -STATIC_CXXFLAGS+= -mlong-calls -.endif diff --git a/lib/csu/arm/Makefile b/lib/csu/arm/Makefile index 8a251f8ca09e..0ed077e635ad 100644 --- a/lib/csu/arm/Makefile +++ b/lib/csu/arm/Makefile @@ -8,7 +8,6 @@ OBJS+= Scrt1.o gcrt1.o CFLAGS+= -I${.CURDIR:H}/common \ -I${SRCTOP}/lib/libc/include CFLAGS+= -DCRT_IRELOC_SUPPRESS -STATIC_CFLAGS+= -mlong-calls FILES= ${OBJS} FILESMODE= ${LIBMODE} diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile index c24211026d56..880ca5dec056 100644 --- a/lib/libc++/Makefile +++ b/lib/libc++/Makefile @@ -7,9 +7,6 @@ _LIBCXXRTDIR= ${SRCTOP}/contrib/libcxxrt HDRDIR= ${SRCTOP}/contrib/llvm-project/libcxx/include SRCDIR= ${SRCTOP}/contrib/llvm-project/libcxx/src CXXINCLUDEDIR= ${INCLUDEDIR}/c++/v${SHLIB_MAJOR} -.if ${MACHINE_CPUARCH} == "arm" -STATIC_CXXFLAGS+= -mlong-calls -.endif .PATH: ${SRCDIR} diff --git a/usr.bin/clang/clang/Makefile b/usr.bin/clang/clang/Makefile index 8dab2301cbc4..ec42fe78cf90 100644 --- a/usr.bin/clang/clang/Makefile +++ b/usr.bin/clang/clang/Makefile @@ -13,9 +13,6 @@ SRCS+= driver.cpp .if ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?= yes -.if ${MACHINE_CPUARCH} == "arm" -CFLAGS+= -mlong-calls -.endif .endif LINKS= ${BINDIR}/clang ${BINDIR}/clang++ \