diff options
author | Joel Peshkin | 2021-04-11 11:21:58 +0200 |
---|---|---|
committer | Tom Rini | 2021-04-20 07:31:12 -0400 |
commit | 4e9bce12432492aa7a7c2121d9fae1640606ace5 (patch) | |
tree | ca4ff1ffa3d447d51e945ce4cd9f75f6e80babe9 /scripts/Makefile.spl | |
parent | 1598c83ecec64619379834ec21de8efe2536ac3d (diff) |
Add support for stack-protector
Add support for stack protector for UBOOT, SPL, and TPL
as well as new pytest for stackprotector
Signed-off-by: Joel Peshkin <joel.peshkin@broadcom.com>
Adjust UEFI build flags.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'scripts/Makefile.spl')
-rw-r--r-- | scripts/Makefile.spl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index ca988224dad..c69525fa748 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -67,6 +67,12 @@ include $(srctree)/scripts/Makefile.lib KBUILD_CFLAGS += -ffunction-sections -fdata-sections LDFLAGS_FINAL += --gc-sections +ifeq ($(CONFIG_$(SPL_TPL_)STACKPROTECTOR),y) +KBUILD_CFLAGS += -fstack-protector-strong +else +KBUILD_CFLAGS += -fno-stack-protector +endif + # FIX ME cpp_flags := $(KBUILD_CPPFLAGS) $(PLATFORM_CPPFLAGS) $(UBOOTINCLUDE) \ $(NOSTDINC_FLAGS) |