From effd6cd91133ef936ffa513656c6dfd0ca49ae71 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 1 Jul 2012 13:47:25 -0400 Subject: [PATCH] Add -Wc,-fstack-protector to LT_LDFLAGS instead of adding -fstack-protector to LDFLAGS so it doesn't get stripped out. Libtool will strip -fstack-protector from the linker flags and we always link with libtool. --- configure | 2 +- configure.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 728b29719..2b6733f82 100755 --- a/configure +++ b/configure @@ -20413,7 +20413,7 @@ $as_echo "$ax_cv_check_ldflags___fstack_protector" >&6; } if test x"$ax_cv_check_ldflags___fstack_protector" = xyes; then : CFLAGS="${CFLAGS} -fstack-protector" - LDFLAGS="${LDFLAGS} -fstack-protector" + LT_LDFLAGS="${LT_LDFLAGS} -Wc,-fstack-protector" else : diff --git a/configure.in b/configure.in index 09425e64e..1930c9d83 100644 --- a/configure.in +++ b/configure.in @@ -3280,7 +3280,7 @@ if test "$enable_hardening" != "no"; then AX_CHECK_COMPILE_FLAG([-fstack-protector], [ AX_CHECK_LINK_FLAG([-fstack-protector], [ CFLAGS="${CFLAGS} -fstack-protector" - LDFLAGS="${LDFLAGS} -fstack-protector" + LT_LDFLAGS="${LT_LDFLAGS} -Wc,-fstack-protector" ]) ]) AX_CHECK_LINK_FLAG([-Wl,-z,relro], [LDFLAGS="${LDFLAGS} -Wl,-z,relro"])