configure: Fix typo TPM2 -> TMP2

This will result in -D_FORTIFY_SOURCE=2 actually being added to
HARDENING_CFLAGS where applicable.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Andrea Bolognani 2021-07-06 14:23:57 +02:00 committed by Stefan Berger
parent 7be5d76679
commit 502cb1129a

View File

@ -392,7 +392,7 @@ if test "x$enable_hardening" != "xno"; then
dnl Must not have -O0 but must have a -O for -D_FORTIFY_SOURCE=2
TMP1="$(echo $CFLAGS | sed -n 's/.*\(-O0\).*/\1/p')"
TMP2="$(echo $CFLAGS | sed -n 's/.*\(-O\).*/\1/p')"
if test -z "$TMP1" && test -n "$TPM2"; then
if test -z "$TMP1" && test -n "$TMP2"; then
HARDENING_CFLAGS="$HARDENING_CFLAGS -D_FORTIFY_SOURCE=2 "
fi
dnl Check linker for 'relro' and 'now'