From nobody Wed Dec 22 10:06:00 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9A4CB1905F1E; Wed, 22 Dec 2021 10:06:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JJpqt1fsHz4YcC; Wed, 22 Dec 2021 10:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 568141B1D5; Wed, 22 Dec 2021 10:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BMA60Z2092108; Wed, 22 Dec 2021 10:06:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BMA606b092107; Wed, 22 Dec 2021 10:06:00 GMT (envelope-from git) Date: Wed, 22 Dec 2021 10:06:00 GMT Message-Id: <202112221006.1BMA606b092107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 5f649fc7cbe2 - stable/12 - Remove -mlong-calls vhen building arm libraries and llvm. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 5f649fc7cbe2ab94d002c93224fef1b357513a18 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=5f649fc7cbe2ab94d002c93224fef1b357513a18 commit 5f649fc7cbe2ab94d002c93224fef1b357513a18 Author: Dimitry Andric AuthorDate: 2020-03-10 06:49:43 +0000 Commit: Dimitry Andric 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++ \