]> git.ipfire.org Git - people/ms/gcc.git/commitdiff
gcc: Build with PIE
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 21 Mar 2023 16:58:02 +0000 (16:58 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 21 Mar 2023 16:58:02 +0000 (16:58 +0000)
This patch removes that GCC will be compiled with -fno-PIE/-no-pie.

This will break PCH.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
gcc/Makefile.in
gcc/configure.ac

index 31ff95500c96de724f53be8bd07a2b9df1c0acb5..530928a3cde9ddf7755413d3b19eb1983f2a3689 100644 (file)
@@ -267,15 +267,6 @@ endif
 CET_HOST_FLAGS = @CET_HOST_FLAGS@
 COMPILER += $(CET_HOST_FLAGS)
 
-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 -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)
 LLINKER = $(SHELL) $(srcdir)/lock-and-run.sh linkfe.lck $(LINKER)
index 992a50e7b20f7c147a333f9598407ea5920ad777..62cd94bffb85d6d5fbbce018bc8a02e7fc9b1e96 100644 (file)
@@ -7641,34 +7641,6 @@ if test x$enable_default_pie = xyes ; then
 fi
 AC_SUBST([enable_default_pie])
 
-# Check if -fno-PIE works.
-AC_CACHE_CHECK([for -fno-PIE option],
-  [gcc_cv_c_no_fpie],
-  [saved_CXXFLAGS="$CXXFLAGS"
-   CXXFLAGS="$CXXFLAGS -fno-PIE"
-   AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main(void) {return 0;}])],
-     [gcc_cv_c_no_fpie=yes],
-     [gcc_cv_c_no_fpie=no])
-   CXXFLAGS="$saved_CXXFLAGS"])
-if test "$gcc_cv_c_no_fpie" = "yes"; then
-  NO_PIE_CFLAGS="-fno-PIE"
-fi
-AC_SUBST([NO_PIE_CFLAGS])
-
-# Check if -no-pie works.
-AC_CACHE_CHECK([for -no-pie option],
-  [gcc_cv_no_pie],
-  [saved_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS -no-pie"
-   AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) {return 0;}])],
-     [gcc_cv_no_pie=yes],
-     [gcc_cv_no_pie=no])
-   LDFLAGS="$saved_LDFLAGS"])
-if test "$gcc_cv_no_pie" = "yes"; then
-  NO_PIE_FLAG="-no-pie"
-fi
-AC_SUBST([NO_PIE_FLAG])
-
 # Enable Intel CET on Intel CET enabled host if jit is enabled.
 GCC_CET_HOST_FLAGS(CET_HOST_FLAGS)
 case x$enable_languages in