]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - configure
configure: Implement --enable-host-pie
[thirdparty/gcc.git] / configure
index 8899a67040b35fce0abf81153d6fd0dd14001b1b..c72d1abe0276f29263e819768026d042f3f10b14 100755 (executable)
--- a/configure
+++ b/configure
@@ -685,6 +685,8 @@ get_gcc_base_ver
 extra_host_zlib_configure_flags
 extra_host_libiberty_configure_flags
 stage1_languages
+PICFLAG
+enable_host_pie
 host_shared
 extra_linker_plugin_flags
 extra_linker_plugin_configure_flags
@@ -828,6 +830,7 @@ enable_lto
 enable_linker_plugin_configure_flags
 enable_linker_plugin_flags
 enable_host_shared
+enable_host_pie
 enable_stage1_languages
 enable_objc_gc
 with_target_bdw_gc
@@ -1554,6 +1557,7 @@ Optional Features:
                           additional flags for configuring and building linker
                           plugins [none]
   --enable-host-shared    build host code as shared libraries
+  --enable-host-pie       build host code as PIE
   --enable-stage1-languages[=all]
                           choose additional languages to build during stage1.
                           Mostly useful for compiler development
@@ -8596,6 +8600,24 @@ fi
 
 
 
+# Enable --enable-host-pie.
+# Check whether --enable-host-pie was given.
+if test "${enable_host_pie+set}" = set; then :
+  enableval=$enable_host_pie;
+fi
+
+
+
+if test x$enable_host_shared = xyes; then
+  PICFLAG=-fPIC
+elif test x$enable_host_pie = xyes; then
+  PICFLAG=-fPIE
+else
+  PICFLAG=
+fi
+
+
+
 # By default, C and C++ are the only stage 1 languages.
 stage1_languages=,c,