From 505867acaec4d8b2bcebd571eb5cba4ae4f7e402 Mon Sep 17 00:00:00 2001 From: Midnight Magic Date: Wed, 5 Feb 2014 11:24:42 -0800 Subject: [PATCH] -Wl,-z,relro and -z,now were wiping out environmental LDFLAGS passed in by the user. I moved them to HARDENING_* where they belong. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index a182a3e79..3ed4549a8 100644 --- a/configure.ac +++ b/configure.ac @@ -303,8 +303,8 @@ if test x$use_hardening != xno; then AX_CHECK_LINK_FLAG([[-Wl,--dynamicbase]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"]) AX_CHECK_LINK_FLAG([[-Wl,--nxcompat]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--nxcompat"]) - AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [LDFLAGS="-Wl,-z,relro"]) - AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [LDFLAGS="-Wl,-z,now"]) + AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"]) + AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"]) if test x$TARGET_OS != xwindows; then # -pie will link successfully with MinGW, but it's unsupported and leads to undeterministic binaries