[OpenWrt-Devel] [PATCH] grub2: disable stack-protector

Dirk Neukirchen dirkneukirchen at web.de
Tue Jun 9 06:14:31 EDT 2015


- enabling "-fstack-protector" results in build errors
- Upstream explicitly tests & disables it

reference: upstream commit baa2a121e004a95a12e2bb7f2419de6625a30c2d

Signed-off-by: Dirk Neukirchen <dirkneukirchen at web.de>
---
 package/boot/grub2/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile
index 64a3058..ca59a87 100644
--- a/package/boot/grub2/Makefile
+++ b/package/boot/grub2/Makefile
@@ -43,6 +43,10 @@ define Package/grub2-editenv/description
 	Edit grub2 environment files.
 endef
 
+ifeq ($(strip $(PKG_CC_STACKPROTECTOR_REGULAR)),1)
+  TARGET_CFLAGS := $(filter-out -fstack-protector,$(TARGET_CFLAGS))
+endif
+
 CONFIGURE_ARGS += \
 	--target=$(REAL_GNU_TARGET_NAME) \
 	--disable-werror \
-- 
2.4.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list