summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2007-01-02 19:36:39 +0000
committerNicolas Thill <nico@openwrt.org>2007-01-02 19:36:39 +0000
commit6a3be09b045732ec4b51634e4ecced20c5b8df34 (patch)
tree247cc960c77c2714d022e99e15e828974cf5752d /target/linux
parent6f21268047957e6cdb304a77920f0fba1cdb22b6 (diff)
downloadmtk-20170518-6a3be09b045732ec4b51634e4ecced20c5b8df34.zip
mtk-20170518-6a3be09b045732ec4b51634e4ecced20c5b8df34.tar.gz
mtk-20170518-6a3be09b045732ec4b51634e4ecced20c5b8df34.tar.bz2
fix grub segfaults on hosts where gcc is built with stack smashing protection
SVN-Revision: 5969
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/x86-2.6/image/grub/Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/target/linux/x86-2.6/image/grub/Makefile b/target/linux/x86-2.6/image/grub/Makefile
index e30443e..365b327 100644
--- a/target/linux/x86-2.6/image/grub/Makefile
+++ b/target/linux/x86-2.6/image/grub/Makefile
@@ -43,6 +43,7 @@ ifeq ($(HOST_ARCH),x86_64)
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
+ --disable-auto-linux-mem-opt \
)
endef
else
@@ -62,12 +63,20 @@ else
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
+ $(DISABLE_NLS) \
+ --disable-auto-linux-mem-opt \
)
endef
endif
+#
+# ./configure detects whether the host compiler supports
+# -fno-stack-protector but only sets STAGE2_CFLAGS accordingly
+#
define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR)
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ GRUB_CFLAGS="\$$$$(STAGE2_CFLAGS)" \
+ STAGE1_CFLAGS="\$$$$(STAGE2_CFLAGS)"
endef
define Build/InstallDev