[2/3] selftests/nolibc: allow disabling of stackprotector support
Commit Message
This allows users to override the autodetected and enabled-by default
compiler support for stackprotectors.
It can be used with "make CFLAGS_STACKPROTECTOR= nolibc-test".
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
tools/testing/selftests/nolibc/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -77,10 +77,10 @@ Q=@
endif
CFLAGS_s390 = -m64
+CFLAGS_STACKPROTECTOR ?= $(call cc-option,-mstack-protector-guard=global $(call cc-option,-fstack-protector-all))
CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 \
$(call cc-option,-fno-stack-protector) \
- $(call cc-option,-mstack-protector-guard=global $(call cc-option,-fstack-protector-all)) \
- $(CFLAGS_$(ARCH))
+ $(CFLAGS_$(ARCH)) $(CFLAGS_STACKPROTECTOR)
LDFLAGS := -s
help: