]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libcody/configure
configure: Implement --enable-host-pie
[thirdparty/gcc.git] / libcody / configure
index da52a5cfca5e9b069a7c8a022239aa2df8fa8793..0e536c0ccb0626051d79954056932db644ef875e 100755 (executable)
@@ -591,7 +591,10 @@ configure_args
 AR
 RANLIB
 EXCEPTIONS
+LD_PICFLAG
 PICFLAG
+enable_host_pie
+enable_host_shared
 OBJEXT
 EXEEXT
 ac_ct_CXX
@@ -653,6 +656,7 @@ enable_maintainer_mode
 with_compiler
 enable_checking
 enable_host_shared
+enable_host_pie
 enable_exceptions
 '
       ac_precious_vars='build_alias
@@ -1286,6 +1290,7 @@ Optional Features:
                           yes,no,all,none,release. Flags are: misc,valgrind or
                           other strings
   --enable-host-shared    build host code as shared libraries
+  --enable-host-pie       build host code as PIE
   --enable-exceptions     enable exceptions & rtti
 
 Optional Packages:
@@ -2635,11 +2640,34 @@ fi
 # Enable --enable-host-shared.
 # Check whether --enable-host-shared was given.
 if test "${enable_host_shared+set}" = set; then :
-  enableval=$enable_host_shared; PICFLAG=-fPIC
+  enableval=$enable_host_shared;
+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
 
+if test x$enable_host_pie = xyes; then
+  LD_PICFLAG=-pie
+else
+  LD_PICFLAG=
+fi
+
+
 
 
 # Check whether --enable-exceptions was given.