From 5e73e324bd1c0543fbf4b90ea613cd71805eea5b Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Tue, 6 Jul 2021 14:27:11 +0200 Subject: [PATCH] configure: Fix spacing for HARDENING_*FLAGS Currently multiple spaces are used when a single one would do, which will still achieve the same result but is not quite as aesthetically pleasing :) Signed-off-by: Andrea Bolognani --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 186d309..dbca451 100644 --- a/configure.ac +++ b/configure.ac @@ -384,16 +384,16 @@ AC_ARG_ENABLE([hardening], if test "x$enable_hardening" != "xno"; then TMP="$($CC -fstack-protector-strong $srcdir/include/swtpm/tpm_ioctl.h 2>&1)" if echo $TMP | $GREP 'unrecognized command line option' >/dev/null; then - HARDENING_CFLAGS="-fstack-protector -Wstack-protector " + HARDENING_CFLAGS="-fstack-protector -Wstack-protector" else - HARDENING_CFLAGS="-fstack-protector-strong -Wstack-protector " + HARDENING_CFLAGS="-fstack-protector-strong -Wstack-protector" fi 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 "$TMP2"; then - HARDENING_CFLAGS="$HARDENING_CFLAGS -D_FORTIFY_SOURCE=2 " + HARDENING_CFLAGS="$HARDENING_CFLAGS -D_FORTIFY_SOURCE=2" fi dnl Check linker for 'relro' and 'now' save_CFLAGS="$CFLAGS"