]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Don't enable -fPIE on Win32 platforms
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 15 Apr 2013 15:56:38 +0000 (16:56 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 15 Apr 2013 16:35:30 +0000 (17:35 +0100)
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@redhat.com>
m4/virt-compile-pie.m4

index 1b6204167e6f66c6d41e82675f0df9103b627628..cceb495dfdac6f984428dd626f0d48d1244466dc 100644 (file)
@@ -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])
 ])