From 4b50c451720d8b427757a6da1dd2bb4c52cd9e35 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Tue, 14 Jan 2020 17:50:13 +0000 Subject: [PATCH] Revert r353140: Re-add ALLOW_MIPS_SHARED_TEXTREL, sprinkle it around arichardson has an actual fix for the same issue that this was working around; given that we don't build with llvm today, go ahead and revert the workaround in advance. --- lib/csu/tests/dso/Makefile | 2 -- lib/libc++/Makefile | 2 -- lib/libcxxrt/Makefile | 1 - lib/libgcc_eh/Makefile.inc | 2 -- lib/libpmc/Makefile | 2 -- share/mk/bsd.lib.mk | 13 ------------- 6 files changed, 22 deletions(-) diff --git a/lib/csu/tests/dso/Makefile b/lib/csu/tests/dso/Makefile index 3363132c71bb..cdfea2031c99 100644 --- a/lib/csu/tests/dso/Makefile +++ b/lib/csu/tests/dso/Makefile @@ -5,8 +5,6 @@ SHLIB= h_csu SHLIB_NAME= libh_csu.so SHLIB_MAJOR= 1 -ALLOW_MIPS_SHARED_TEXTREL= - WITHOUT_STATIC= WITHOUT_PROFILE= WITHOUT_PIC= diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile index 8db7a451c14f..915accfe6730 100644 --- a/lib/libc++/Makefile +++ b/lib/libc++/Makefile @@ -11,8 +11,6 @@ CXXINCLUDEDIR= ${INCLUDEDIR}/c++/v${SHLIB_MAJOR} STATIC_CXXFLAGS+= -mlong-calls .endif -ALLOW_MIPS_SHARED_TEXTREL= - .PATH: ${SRCDIR} LIB= c++ diff --git a/lib/libcxxrt/Makefile b/lib/libcxxrt/Makefile index 902d01b42404..8480cad42674 100644 --- a/lib/libcxxrt/Makefile +++ b/lib/libcxxrt/Makefile @@ -5,7 +5,6 @@ SRCDIR= ${SRCTOP}/contrib/libcxxrt SHLIB_MAJOR= 1 SHLIBDIR?= /lib -ALLOW_MIPS_SHARED_TEXTREL= .PATH: ${SRCDIR} diff --git a/lib/libgcc_eh/Makefile.inc b/lib/libgcc_eh/Makefile.inc index 404c3ac00689..9925d156fb04 100644 --- a/lib/libgcc_eh/Makefile.inc +++ b/lib/libgcc_eh/Makefile.inc @@ -6,8 +6,6 @@ UNWINDSRCDIR= ${SRCTOP}/contrib/llvm-project/libunwind/src STATIC_CFLAGS+=${PICFLAG} -fvisibility=hidden -DVISIBILITY_HIDDEN -ALLOW_MIPS_SHARED_TEXTREL= - .PATH: ${COMPILERRTDIR}/lib/builtins .PATH: ${UNWINDSRCDIR} SRCS_EXC+= gcc_personality_v0.c diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile index 26f5a3706387..b02097158f28 100644 --- a/lib/libpmc/Makefile +++ b/lib/libpmc/Makefile @@ -5,8 +5,6 @@ LIB= pmc SRCS= libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json.cc INCS= pmc.h pmclog.h pmcformat.h -ALLOW_MIPS_SHARED_TEXTREL= - .if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "amd64" || \ ${MACHINE_ARCH} == "i386" diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 4464f44a1c10..62f762667f0c 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -291,10 +291,6 @@ CLEANFILES+= ${SOBJS} .if defined(SHLIB_NAME) _LIBS+= ${SHLIB_NAME} -.if ${CFLAGS:M-fexceptions} || defined(SHLIB_CXX) || defined(LIB_CXX) -ALLOW_MIPS_SHARED_TEXTREL= -.endif - SOLINKOPTS+= -shared -Wl,-x .if defined(LD_FATAL_WARNINGS) && ${LD_FATAL_WARNINGS} == "no" SOLINKOPTS+= -Wl,--no-fatal-warnings @@ -303,15 +299,6 @@ SOLINKOPTS+= -Wl,--fatal-warnings .endif SOLINKOPTS+= -Wl,--warn-shared-textrel -.if defined(ALLOW_MIPS_SHARED_TEXTREL) && ${MACHINE_CPUARCH:Mmips} -# Check if we should be defining ALLOW_SHARED_TEXTREL... basically, C++ -# or -fexceptions in CFLAGS on MIPS. This works around clang/lld attempting -# to generate text relocations in read-only .eh_frame. A future version of -# clang/lld should instead transform them into relative references at link -# time, and then we can stop doing this. -SOLINKOPTS+= -Wl,-z,notext -.endif - .if target(beforelinking) beforelinking: ${SOBJS} ${SHLIB_NAME_FULL}: beforelinking