summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-09-14 14:39:46 -0400
committerMike Frysinger <vapier@gentoo.org>2015-09-14 14:40:13 -0400
commit2f1af814053468b3191c8cf21d12b8a8de20b7de (patch)
tree999a3d3c19d8d8c5e196f0246b0b4f30ad64f55b /sys-firmware
parentwww-apache/passenger: version bump (diff)
downloadgentoo-2f1af814053468b3191c8cf21d12b8a8de20b7de.tar.gz
gentoo-2f1af814053468b3191c8cf21d12b8a8de20b7de.tar.bz2
gentoo-2f1af814053468b3191c8cf21d12b8a8de20b7de.zip
sys-firmware/seabios: add upstream fix for building on hardened systems #559980
Diffstat (limited to 'sys-firmware')
-rw-r--r--sys-firmware/seabios/files/seabios-1.8.2-fstack-check.patch37
-rw-r--r--sys-firmware/seabios/seabios-1.8.2.ebuild5
2 files changed, 41 insertions, 1 deletions
diff --git a/sys-firmware/seabios/files/seabios-1.8.2-fstack-check.patch b/sys-firmware/seabios/files/seabios-1.8.2-fstack-check.patch
new file mode 100644
index 00000000000..d9431f994e0
--- /dev/null
+++ b/sys-firmware/seabios/files/seabios-1.8.2-fstack-check.patch
@@ -0,0 +1,37 @@
+https://bugs.gentoo.org/559980
+
+From e4d2b8ce5db86bd56efdaf64b974925bd7a7b249 Mon Sep 17 00:00:00 2001
+From: Magnus Granberg <zorry@gentoo.org>
+Date: Fri, 11 Sep 2015 17:38:40 -0400
+Subject: [PATCH] build: use -fstack-check=no when available
+
+Some compilers (such as the one in hardened/Gentoo) default this
+option to on which leads to build failures:
+src/stacks.c: In function 'call16_back':
+src/stacks.c:139:5: error: 'asm' operand has impossible constraints
+ asm volatile(
+ ^
+
+URL: https://bugs.gentoo.org/559980
+Reported-by: Alon Bar-Lev <alonbl@gentoo.org>
+Signed-off-by: Magnus Granberg <zorry@gentoo.org>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile b/Makefile
+index e287530..3a0d2e8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -63,6 +63,7 @@ COMMONCFLAGS := -I$(OUT) -Isrc -Os -MD -g \
+ COMMONCFLAGS += $(call cc-option,$(CC),-nopie,)
+ COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
+ COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
++COMMONCFLAGS += $(call cc-option,$(CC),-fstack-check=no,)
+ COMMA := ,
+
+ CFLAGS32FLAT := $(COMMONCFLAGS) -DMODE16=0 -DMODESEGMENT=0
+--
+2.5.1
+
diff --git a/sys-firmware/seabios/seabios-1.8.2.ebuild b/sys-firmware/seabios/seabios-1.8.2.ebuild
index b2ad1f29911..2c8d4883369 100644
--- a/sys-firmware/seabios/seabios-1.8.2.ebuild
+++ b/sys-firmware/seabios/seabios-1.8.2.ebuild
@@ -70,7 +70,10 @@ src_unpack() {
}
src_prepare() {
- use binary || epatch_user
+ use binary && return
+
+ epatch "${FILESDIR}"/${P}-fstack-check.patch #559980
+ epatch_user
}
src_configure() {