Skip to content

Commit

Permalink
configure.ac: link test for -fstack-protector-all
Browse files Browse the repository at this point in the history
There are (broken) compilers out there that accept -fstack-protector-*
parameters, but do not provide the needed ssp library. As a result,
build does not fail, but link does. Use the local check_link_flag
autoconf function to correctly test for SSP availability.

Required for the Imagination Technologies Codescape IMG MIPS
toolchain, version 2015.10 (and who knows what else).

Fixes #744.
  • Loading branch information
baruchsiach authored and cgull committed Apr 8, 2016
1 parent 2ba5d2b commit 7196dfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ AS_IF([test x"$hardening" != x"no"], [
# This one will likely succeed, even on platforms where it does nothing.
check_cc_cxx_flag([-D_FORTIFY_SOURCE=2], [HARDEN_CFLAGS="$HARDEN_CFLAGS -D_FORTIFY_SOURCE=2"])
check_cc_cxx_flag([-fstack-protector-all],
check_link_flag([-fstack-protector-all],
[HARDEN_CFLAGS="$HARDEN_CFLAGS -fstack-protector-all"
check_cc_cxx_flag([-Wstack-protector], [HARDEN_CFLAGS="$HARDEN_CFLAGS -Wstack-protector"],
[], [-fstack-protector-all])
Expand Down

0 comments on commit 7196dfd

Please sign in to comment.