From d09931d8074bc67656aa28c8e5cd8631de0e3a36 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 20 Feb 2015 16:51:38 +0000 Subject: [PATCH] Check compiler for relro support instead of linker 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/pdns_relro.m4 b/m4/pdns_relro.m4 index 3493d72a1..4f93629a8 100644 --- a/m4/pdns_relro.m4 +++ b/m4/pdns_relro.m4 @@ -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 -- 2.50.0