diff --git a/config/Config-build.in b/config/Config-build.in index ebfce8add4..24c2bcf130 100644 --- a/config/Config-build.in +++ b/config/Config-build.in @@ -293,6 +293,8 @@ menu "Global build settings" bool "Regular" config PKG_CC_STACKPROTECTOR_STRONG bool "Strong" + config PKG_CC_STACKPROTECTOR_ALL + bool "All" endchoice choice diff --git a/include/hardening.mk b/include/hardening.mk index 6acd862f5c..4a8874261b 100644 --- a/include/hardening.mk +++ b/include/hardening.mk @@ -36,6 +36,11 @@ ifdef CONFIG_PKG_CC_STACKPROTECTOR_STRONG TARGET_CFLAGS += -fstack-protector-strong endif endif +ifdef CONFIG_PKG_CC_STACKPROTECTOR_ALL + ifeq ($(strip $(PKG_SSP)),1) + TARGET_CFLAGS += -fstack-protector-all + endif +endif ifdef CONFIG_PKG_FORTIFY_SOURCE_1 ifeq ($(strip $(PKG_FORTIFY_SOURCE)),1) TARGET_CFLAGS += -D_FORTIFY_SOURCE=1