build: add option for building with stack-protector-all
[openwrt/openwrt.git] / include / hardening.mk
index 6acd862f5c4b4531b5c26521d183d823d9d8de4a..4a8874261b92c38d769813b511fd325580290528 100644 (file)
@@ -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