aboutsummaryrefslogtreecommitdiff
path: root/libcc1
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2021-07-04 17:56:05 +0100
committerIain Sandoe <iain@sandoe.co.uk>2021-08-17 20:03:56 +0100
commitb240450b630da511fadda98bba4862033ff56950 (patch)
treecb934d6597cc059163f81d49b00907eb43be21b0 /libcc1
parent0edf2e81bb02cba43b649b3f6e7258b68a779ac0 (diff)
downloadgcc-b240450b630da511fadda98bba4862033ff56950.zip
gcc-b240450b630da511fadda98bba4862033ff56950.tar.gz
gcc-b240450b630da511fadda98bba4862033ff56950.tar.bz2
Darwin, libcc1: Handle hosts with mdynamic-no-pic support.
The default for building host-side binaries for mdynamic-no-pic hosts is to enable this. However, it is not compatible with dynamic libraries, so must be switched off for libcc1. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> libcc1/ChangeLog: * Makefile.am: Switch mdynamic-no-pic to fPIC. * Makefile.in: Regenerated.
Diffstat (limited to 'libcc1')
-rw-r--r--libcc1/Makefile.am1
-rw-r--r--libcc1/Makefile.in1
2 files changed, 2 insertions, 0 deletions
diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
index 9ec0210..49a9543 100644
--- a/libcc1/Makefile.am
+++ b/libcc1/Makefile.am
@@ -27,6 +27,7 @@ AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility) $(CET_HOST_FLAGS)
if DARWIN_DYNAMIC_LOOKUP
AM_CXXFLAGS += -Wl,-undefined,dynamic_lookup
endif
+override CXXFLAGS := $(subst -mdynamic-no-pic,-fPIC,$(CXXFLAGS))
override CXXFLAGS := $(filter-out -fsanitize=address,$(CXXFLAGS))
override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS))
# Can be simplified when libiberty becomes a normal convenience library.
diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
index 395f01a..f8f590d 100644
--- a/libcc1/Makefile.in
+++ b/libcc1/Makefile.in
@@ -810,6 +810,7 @@ uninstall-am: uninstall-cc1libLTLIBRARIES uninstall-pluginLTLIBRARIES
.PRECIOUS: Makefile
+override CXXFLAGS := $(subst -mdynamic-no-pic,-fPIC,$(CXXFLAGS))
override CXXFLAGS := $(filter-out -fsanitize=address,$(CXXFLAGS))
override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS))