From: Ruben Kerkhof Date: Tue, 27 Jan 2015 20:01:57 +0000 (+0000) Subject: Use -fPIE CXXFLAGS when linking X-Git-Tag: rec-3.7.0-rc2~19^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2a879458c1942dc62bbef4a84378e632e3d7b2a;p=thirdparty%2Fpdns.git Use -fPIE CXXFLAGS when linking --- diff --git a/m4/pdns_pie.m4 b/m4/pdns_pie.m4 index ce3e692c59..036a968c48 100644 --- a/m4/pdns_pie.m4 +++ b/m4/pdns_pie.m4 @@ -22,12 +22,14 @@ AC_DEFUN([AC_CC_PIE],[ AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS]) PIE_CFLAGS= PIE_LDFLAGS= + OLD_CXXFLAGS=$CXXFLAGS 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" + CXXFLAGS="$PIE_CFLAGS" gl_COMPILER_OPTION_IF([-pie], [ PIE_LDFLAGS="-pie" ], [ @@ -39,6 +41,7 @@ AC_DEFUN([AC_CC_PIE],[ )] ) esac + CXXFLAGS=$OLD_CXXFLAGS AC_SUBST([PIE_CFLAGS]) AC_SUBST([PIE_LDFLAGS]) ])