aboutsummaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorGravatar Tarek El-Sherbiny <tarek_el-sherbiny@waters.com>2018-04-19 09:36:59 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-04-19 23:26:06 +0200
commit523b27afa941bc0a78f7b2eae8e97329c112782d (patch)
treef99fff09fa73087ec960117d0cd3f60ed5b5f6b2 /boot
parent41a7c72c2181f01275fe97da222824f021cf5e5f (diff)
downloadbuildroot-523b27afa941bc0a78f7b2eae8e97329c112782d.tar.gz
buildroot-523b27afa941bc0a78f7b2eae8e97329c112782d.tar.bz2
grub2: force -fno-stack-protector in CPPFLAGS
In commit 2a27294e9ade6130a12ced9a1f152c51431a870e ("grub2: force -fno-stack-protector in CFLAGS"), a fix was made to the grub2 package to make it build properly even when SSP support is enabled. However, commit 20a4583ebf7fe97ea22a1ea11621dd44a8114ca5 ("security hardening: add RELFO, FORTIFY options") reworked how SSP options are passed, and they are now passed in CPPFLAGS instead of CFLAGS, making the fix introduced by 2a27294e9ade6130a12ced9a1f152c51431a870e no longer operating. This commit will force no-stack-protector in CPPFLAGS instead of CFLAGS. Fixes bug #10961. Signed-off-by: Tarek El-Sherbiny <tarek_el-sherbiny@waters.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'boot')
-rw-r--r--boot/grub2/grub2.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/boot/grub2/grub2.mk b/boot/grub2/grub2.mk
index 492cddf1a5..35aea41287 100644
--- a/boot/grub2/grub2.mk
+++ b/boot/grub2/grub2.mk
@@ -53,8 +53,8 @@ GRUB2_CONF_ENV = \
$(HOST_CONFIGURE_OPTS) \
CPP="$(HOSTCC) -E" \
TARGET_CC="$(TARGET_CC)" \
- TARGET_CFLAGS="$(TARGET_CFLAGS) -fno-stack-protector" \
- TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" \
+ TARGET_CFLAGS="$(TARGET_CFLAGS)" \
+ TARGET_CPPFLAGS="$(TARGET_CPPFLAGS) -fno-stack-protector" \
TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
NM="$(TARGET_NM)" \
OBJCOPY="$(TARGET_OBJCOPY)" \