]> granicus.if.org Git - sudo/commitdiff
Add -Wc,-fstack-protector to LT_LDFLAGS instead of adding
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 1 Jul 2012 17:47:25 +0000 (13:47 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 1 Jul 2012 17:47:25 +0000 (13:47 -0400)
-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
configure.in

index 728b29719ba476816411aa50757fa0252815b66f..2b6733f82981fc19915e44e1aed4db2e0d6350e8 100755 (executable)
--- 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
   :
index 09425e64ebfdd9fab7b76860eb91accac9b23f03..1930c9d83953ea610101c37b938d5f33c507f88a 100644 (file)
@@ -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"])