[PATCH 1/4] pie: add Position-Independent-Executable flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add possibility to choose whether the code is compiled with PIE
or without. New configuration flags:
--enable-pie (default)
--disable-pie
---
 configure.ac | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 62b74c5..96a7038 100644
--- a/configure.ac
+++ b/configure.ac
@@ -215,7 +215,6 @@ fi
 # Check for compiler and library settings.
 
 LIBVIRT_COMPILE_WARNINGS
-LIBVIRT_COMPILE_PIE
 LIBVIRT_LINKER_RELRO
 LIBVIRT_LINKER_NO_INDIRECT
 
@@ -581,7 +580,20 @@ if test x"$enable_debug" = x"yes"; then
    AC_DEFINE([ENABLE_DEBUG], [], [whether debugging is enabled])
 fi
 
+dnl --enable-pie=(yes|no)
+AC_ARG_ENABLE([pie],
+              [AS_HELP_STRING([--enable-pie=@<:@no|yes@:>@],
+                             [enable Position-Independent-Executables @<:@default=yes@:>@])],
+  [],[enable_pie=yes])
+AM_CONDITIONAL([ENABLE_PIE], test x"$enable_pie" = x"yes")
+if test x"$enable_debug" = x"yes"; then
+   AC_DEFINE([ENABLE_PIE], [], [whether Position-Independent-Executables are enabled])
+fi
 
+# Check if Position-Independent-Executables should be supported
+if test "$enable_pie" = "yes" ; then
+LIBVIRT_COMPILE_PIE
+fi
 
 dnl
 dnl init script flavor
-- 
1.9.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]