mirror of
https://github.com/stefanberger/libtpms
synced 2026-08-14 07:01:38 +00:00
build: disable -Wstack-protector
Some version of gcc fail with -Wstack-protector due to some functions not being protectable. Disable this option. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
parent
39c9604a92
commit
a1cde166f9
@ -138,11 +138,12 @@ AC_C_INLINE
|
||||
|
||||
AC_TYPE_SIZE_T
|
||||
|
||||
# Some version of gcc fail with -Wstack-protector enabled
|
||||
TMP="$($CC -fstack-protector-strong 2>&1)"
|
||||
if echo $TMP | $GREP 'unrecognized command line option' >/dev/null; then
|
||||
HARDENING_CFLAGS="-fstack-protector -Wstack-protector "
|
||||
HARDENING_CFLAGS="-fstack-protector "
|
||||
else
|
||||
HARDENING_CFLAGS="-fstack-protector-strong -Wstack-protector "
|
||||
HARDENING_CFLAGS="-fstack-protector-strong "
|
||||
fi
|
||||
|
||||
dnl Must not have -O0 but must have a -O for -D_FORTIFY_SOURCE=2
|
||||
|
||||
Loading…
Reference in New Issue
Block a user