aboutsummaryrefslogtreecommitdiff
path: root/gcc/Makefile.in
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2022-11-22 21:10:31 -0500
committerMarek Polacek <polacek@redhat.com>2022-11-22 21:10:31 -0500
commit04711f5189a72c2fcaeed520d65582704adca042 (patch)
treef0eb61aee9cb51bf6ff14bfef4429b1f77e99d26 /gcc/Makefile.in
parent30f399ee9318bcb44e3e2debde086303157a347d (diff)
downloadgcc-04711f5189a72c2fcaeed520d65582704adca042.zip
gcc-04711f5189a72c2fcaeed520d65582704adca042.tar.gz
gcc-04711f5189a72c2fcaeed520d65582704adca042.tar.bz2
Revert "configure: Implement --enable-host-pie"
This reverts commit 251c72a68af3a8b0638705b73ef120ffdf0053eb.
Diffstat (limited to 'gcc/Makefile.in')
-rw-r--r--gcc/Makefile.in29
1 files changed, 12 insertions, 17 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 5a78c74..5ad638f 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -158,9 +158,6 @@ LDFLAGS = @LDFLAGS@
# Should we build position-independent host code?
PICFLAG = @PICFLAG@
-# The linker flag for the above.
-LD_PICFLAG = @LD_PICFLAG@
-
# Flags to determine code coverage. When coverage is disabled, this will
# contain the optimization flags, as you normally want code coverage
# without optimization.
@@ -269,17 +266,18 @@ LINKER = $(CC)
LINKER_FLAGS = $(CFLAGS)
endif
-enable_host_pie = @enable_host_pie@
-
# Enable Intel CET on Intel CET enabled host if needed.
CET_HOST_FLAGS = @CET_HOST_FLAGS@
COMPILER += $(CET_HOST_FLAGS)
-# Maybe compile the compilers with -fPIE or -fPIC.
-COMPILER += $(PICFLAG)
+NO_PIE_CFLAGS = @NO_PIE_CFLAGS@
+NO_PIE_FLAG = @NO_PIE_FLAG@
+
+# We don't want to compile the compilers with -fPIE, it make PCH fail.
+COMPILER += $(NO_PIE_CFLAGS)
-# Link with -pie, or -no-pie, depending on the above.
-LINKER += $(LD_PICFLAG)
+# Link with -no-pie since we compile the compiler with -fno-PIE.
+LINKER += $(NO_PIE_FLAG)
# Like LINKER, but use a mutex for serializing front end links.
ifeq (@DO_LINK_MUTEX@,true)
@@ -1062,21 +1060,18 @@ ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS)
ALL_COMPILERFLAGS = $(ALL_CXXFLAGS)
# This is the variable to use when using $(LINKER).
-ALL_LINKERFLAGS = $(ALL_CXXFLAGS) $(LD_PICFLAG)
+ALL_LINKERFLAGS = $(ALL_CXXFLAGS)
# Build and host support libraries.
-# Use the "pic" build of libiberty if --enable-host-shared or --enable-host-pie,
-# unless we are building for mingw.
+# Use the "pic" build of libiberty if --enable-host-shared, unless we are
+# building for mingw.
LIBIBERTY_PICDIR=$(if $(findstring mingw,$(target)),,pic)
-ifneq ($(enable_host_shared)$(enable_host_pie),)
-LIBIBERTY = ../libiberty/$(LIBIBERTY_PICDIR)/libiberty.a
-else
-LIBIBERTY = ../libiberty/libiberty.a
-endif
ifeq ($(enable_host_shared),yes)
+LIBIBERTY = ../libiberty/$(LIBIBERTY_PICDIR)/libiberty.a
BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/$(LIBIBERTY_PICDIR)/libiberty.a
else
+LIBIBERTY = ../libiberty/libiberty.a
BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/libiberty.a
endif