commit:     4a1ef46c041d7851ff0bb27ddb3bd321afebed8f
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  7 08:00:56 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Dec  7 08:00:56 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a1ef46c

sys-apps/memtest86+: fix missing ssp flags on test/random objects #590974

 .../files/memtest86+-5.01-test-random-cflags.patch  | 21 +++++++++++++++++++++
 sys-apps/memtest86+/memtest86+-5.01-r2.ebuild       |  1 +
 2 files changed, 22 insertions(+)

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-test-random-cflags.patch 
b/sys-apps/memtest86+/files/memtest86+-5.01-test-random-cflags.patch
new file mode 100644
index 00000000..8a76d04
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-test-random-cflags.patch
@@ -0,0 +1,21 @@
+make sure we re-use the existing CFLAGS settings so that we get all the right
+flags (like -fno-stack-protector).  just append the few changes we want (the
+optimization levels).
+
+https://bugs.gentoo.org/590974
+
+--- a/Makefile
++++ b/Makefile
+@@ -52,10 +52,10 @@ reloc.o: reloc.c
+       $(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c
+ 
+ test.o: test.c
+-      $(CC) -c -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin 
-ffreestanding test.c
++test.o: CFLAGS += -O0
+ 
+ random.o: random.c
+-      $(CC) -c -Wall -march=i486 -m32 -O3 -fomit-frame-pointer -fno-builtin 
-ffreestanding random.c
++random.o: CFLAGS += -O3
+       
+ # rule for build number generation  
+ build_number:

diff --git a/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild 
b/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild
index 831cf32..7470da9 100644
--- a/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild
+++ b/sys-apps/memtest86+/memtest86+-5.01-r2.ebuild
@@ -31,6 +31,7 @@ src_prepare() {
        epatch "${FILESDIR}"/${P}-reboot-def.patch #548312
        epatch "${FILESDIR}"/${P}-no-clean.patch #557890
        epatch "${FILESDIR}"/${P}-no-C-headers.patch #592638
+       epatch "${FILESDIR}"/${P}-test-random-cflags.patch #590974
 
        if use serial ; then
                sed -i \

Reply via email to