]> granicus.if.org Git - pdns/commitdiff
Only export CXXFLAGS when the LDFLAGS work
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 27 Jan 2015 20:48:08 +0000 (20:48 +0000)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 27 Jan 2015 20:48:08 +0000 (20:48 +0000)
m4/pdns_pie.m4

index 036a968c4803fccdf18518f943303d5707a7760c..8fe9c4637d965145d0709a7e5b8e3289e1aae78f 100644 (file)
@@ -28,13 +28,14 @@ AC_DEFUN([AC_CC_PIE],[
          ;; dnl All code is position independent on Win32 target
       *)
       gl_COMPILER_OPTION_IF([-fPIE -DPIE], [
-        PIE_CFLAGS="-fPIE -DPIE"
-        CXXFLAGS="$PIE_CFLAGS"
+        CXXFLAGS="-fPIE -DPIE"
         gl_COMPILER_OPTION_IF([-pie], [
+          PIE_CFLAGS="-fPIE -DPIE"
           PIE_LDFLAGS="-pie"
           ], [
             dnl some versions of clang require -Wl,-pie instead of -pie
             gl_COMPILER_OPTION_IF([[-Wl,-pie]], [
+              PIE_CFLAGS="-fPIE -DPIE"
               PIE_LDFLAGS="-Wl,-pie"
             ])
           ]