Makefile: Don't create extraneous -.s file

In order to probe availability of certain features the Makefile test
compiles a handful of tiny snippets, feeding those in from stdin.  However
in one case - the one for -fstack-protector - it forgets to redirect the
output to stdout, meaning it creates a stray '-.s' file when make is
invoked (even make clean).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
David Gibson 2022-06-14 15:12:25 +10:00 committed by Stefano Brivio
parent 4f95db7945
commit 2c13f6bead

View file

@ -78,7 +78,7 @@ ifeq ($(shell printf "$(C)" | $(CC) -S -xc - -o - >/dev/null 2>&1; echo $$?),0)
CFLAGS += -DHAS_GETRANDOM
endif
ifeq ($(shell :|$(CC) -fstack-protector-strong -S -xc - >/dev/null 2>&1; echo $$?),0)
ifeq ($(shell :|$(CC) -fstack-protector-strong -S -xc - -o - >/dev/null 2>&1; echo $$?),0)
CFLAGS += -fstack-protector-strong
endif