diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am index 9ec021030e2..49a9543ea7d 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 395f01a9821..f8f590d71e9 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))