[PATCH] Don't enable -fPIE on Win32 platforms

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

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

On win32, all code is position independent and adding -fPIE
to the compiler flags results in warnings being printed

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>

Pushed as a Win32 build breaker fix

---
 m4/virt-compile-pie.m4 | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/m4/virt-compile-pie.m4 b/m4/virt-compile-pie.m4
index 1b62041..cceb495 100644
--- a/m4/virt-compile-pie.m4
+++ b/m4/virt-compile-pie.m4
@@ -21,10 +21,15 @@ dnl
 AC_DEFUN([LIBVIRT_COMPILE_PIE],[
     PIE_CFLAGS=
     PIE_LDFLAGS=
-    gl_COMPILER_OPTION_IF([-fPIE -DPIE], [
+    case "$host" in
+      *-*-mingw* | *-*-msvc* | *-*-cygwin* )
+         ;; dnl All code is position independent on Win32 target
+      *)
+      gl_COMPILER_OPTION_IF([-fPIE -DPIE], [
         PIE_CFLAGS="-fPIE -DPIE"
         PIE_LDFLAGS="-pie"
-    ])
+      ])
+    esac
     AC_SUBST([PIE_CFLAGS])
     AC_SUBST([PIE_LDFLAGS])
 ])
-- 
1.8.1.4

--
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]