]> granicus.if.org Git - pdns/commitdiff
Check compiler for relro support instead of linker
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Fri, 20 Feb 2015 16:51:38 +0000 (16:51 +0000)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Mon, 23 Feb 2015 15:02:19 +0000 (16:02 +0100)
We use the compiler for linking in most cases
instead of calling ld directly.

Do this the same way as we do for the recursor.
Fixes #2172

(cherry picked from commit cc8ac2e97d16c01a6e4c10914d848d228f7494b5)

m4/pdns_relro.m4

index 3493d72a1274695cb390d5f6ac5525e44a3e0f46..4f93629a8e98f8ffbc5394cdb629504794b81d52 100644 (file)
@@ -22,7 +22,7 @@ AC_DEFUN([AC_LD_RELRO],[
     AC_MSG_CHECKING([for how to force completely read-only GOT table])
 
     RELRO_LDFLAGS=
-    ld_help=`$LD --help 2>&1`
+    ld_help=`$CXX -Wl,-help 2>&1`
     case $ld_help in
         *"-z relro"*) RELRO_LDFLAGS="-Wl,-z -Wl,relro" ;;
     esac