From: Aki Tuomi Date: Mon, 15 Dec 2014 13:52:12 +0000 (+0200) Subject: Check relro directly X-Git-Tag: rec-3.7.0-rc1~109^2~13^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=365647e4f2b5cfd3d4b81d98bc87fef9c4b4219d;p=thirdparty%2Fpdns.git Check relro directly --- diff --git a/pdns/configure-recursor b/pdns/configure-recursor index 4adf6a51a1..2882ba0c84 100755 --- a/pdns/configure-recursor +++ b/pdns/configure-recursor @@ -17,12 +17,9 @@ CF_STACK="" test_flags() { # test for relocation - relro=`$CXX -Wl,-help | grep -om1 -- '-z relro'` - now=`$CXX -Wl,-help | grep -om1 -- '-z now'` - - if [ "$relro" = "-z relro" ]; then + if $CXX -Wl,-help | grep -q 'z relro'; then export LD_RELRO="-Wl,-z -Wl,relro" - if [ "$now" = "-z now" ]; then + if $CXX -Wl,-help | grep -q 'z now'; then export LD_RELRO="$LD_RELRO -Wl,-z -Wl,now" fi fi @@ -38,8 +35,8 @@ EOF # test for PIE - if $CXX $src -c -o a.out -fPIE -fPIC -DPIE; then - if $CXX -pie -o a2.out a.out; then + if $CXX $src -c -o a.out -fPIE -fPIC -DPIE; then + if $CXX -pie -o a2.out a.out; then export CF_PIE="-fPIE -fPIC -DPIE" export LD_PIE="-pie" fi