$as_echo "$ax_cv_check_cflags___fstack_protector" >&6; }
if test x"$ax_cv_check_cflags___fstack_protector" = xyes; then :
- CFLAGS="${CFLAGS} -fstack-protector"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -fstack-protector" >&5
$as_echo_n "checking whether the linker accepts -fstack-protector... " >&6; }
if ${ax_cv_check_ldflags___fstack_protector+:} false; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___fstack_protector" >&5
$as_echo "$ax_cv_check_ldflags___fstack_protector" >&6; }
if test x"$ax_cv_check_ldflags___fstack_protector" = xyes; then :
- LDFLAGS="${LDFLAGS} -fstack-protector"
+
+ CFLAGS="${CFLAGS} -fstack-protector"
+ LDFLAGS="${LDFLAGS} -fstack-protector"
+
else
:
fi
if test "$enable_hardening" != "no"; then
AC_LANG_WERROR
AX_CHECK_COMPILE_FLAG([-fstack-protector], [
- CFLAGS="${CFLAGS} -fstack-protector"
- AX_CHECK_LINK_FLAG([-fstack-protector], [LDFLAGS="${LDFLAGS} -fstack-protector"])
+ AX_CHECK_LINK_FLAG([-fstack-protector], [
+ CFLAGS="${CFLAGS} -fstack-protector"
+ LDFLAGS="${LDFLAGS} -fstack-protector"
+ ])
])
AX_CHECK_LINK_FLAG([-Wl,-z,relro], [LDFLAGS="${LDFLAGS} -Wl,-z,relro"])
fi