compile check of -D_FORTIFY_SOURCE=2 not failing with CFLAGS=-O0
need to include some typical headers to get it to issue a failure diagnostic Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com> Change-Id: I37d6e0f342698507952a8006b88d56e55060270e
This commit is contained in:
parent
0cd7498e64
commit
f02be4aa25
1 changed files with 1 additions and 1 deletions
|
@ -958,7 +958,7 @@ if test "$enable_hardening_flags" = no -o "$host_os" = "emscripten" -o "x$with_s
|
|||
save_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS -Werror -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=2"
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(, [[return 0;]])],
|
||||
[AC_LANG_PROGRAM(, [[#include <string.h> return 0;]])],
|
||||
[AC_MSG_RESULT([yes]); HARDENING_CFLAGS="$HARDENING_CFLAGS -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=2"],
|
||||
[AC_MSG_RESULT([no])])
|
||||
CFLAGS=$save_CFLAGS
|
||||
|
|
Loading…
Reference in a new issue