diff options
author | Sam James <sam@gentoo.org> | 2023-08-28 20:14:35 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-08-28 20:32:20 +0100 |
commit | abce894dde2ad1b4babeaa1f4fc86e76e22e0c45 (patch) | |
tree | 81e695ba2775e210f98601e849e3c99b1bcaedb7 /sys-apps/memtest86 | |
parent | sys-firmware/edk2-ovmf: disable py3.9 (diff) | |
download | gentoo-abce894dde2ad1b4babeaa1f4fc86e76e22e0c45.tar.gz gentoo-abce894dde2ad1b4babeaa1f4fc86e76e22e0c45.tar.bz2 gentoo-abce894dde2ad1b4babeaa1f4fc86e76e22e0c45.zip |
sys-apps/memtest86: fix build w/ binutils-2.41[hardened]
Closes: https://bugs.gentoo.org/912343
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-apps/memtest86')
-rw-r--r-- | sys-apps/memtest86/files/memtest86-4.3.7-binutils-2.41-textrels.patch | 31 | ||||
-rw-r--r-- | sys-apps/memtest86/memtest86-4.3.7-r3.ebuild | 3 |
2 files changed, 33 insertions, 1 deletions
diff --git a/sys-apps/memtest86/files/memtest86-4.3.7-binutils-2.41-textrels.patch b/sys-apps/memtest86/files/memtest86-4.3.7-binutils-2.41-textrels.patch new file mode 100644 index 000000000000..d95b96402be7 --- /dev/null +++ b/sys-apps/memtest86/files/memtest86-4.3.7-binutils-2.41-textrels.patch @@ -0,0 +1,31 @@ +https://bugs.gentoo.org/912343 +--- a/Makefile ++++ b/Makefile +@@ -21,15 +21,15 @@ all: memtest.bin memtest + # symbols and then link it dynamically so I have full
+ # relocation information
+ memtest_shared: $(OBJS) memtest_shared.lds Makefile
+- $(LD) --warn-constructors --warn-common -static -T memtest_shared.lds -m elf_i386 \
++ $(LD) --warn-constructors --warn-common -static -z notext --no-warn-rwx-segments -T memtest_shared.lds -m elf_i386 \
+ -o $@ $(OBJS) && \
+- $(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS)
++ $(LD) -shared -Bsymbolic -z notext --no-warn-rwx-segments -T memtest_shared.lds -o $@ $(OBJS)
+
+ memtest_shared.bin: memtest_shared
+ objcopy -O binary $< memtest_shared.bin
+
+ memtest: memtest_shared.bin memtest.lds
+- $(LD) -s -T memtest.lds -b binary memtest_shared.bin -o $@
++ $(LD) -s -z notext --no-warn-rwx-segments -T memtest.lds -b binary memtest_shared.bin -o $@
+
+ head.s: head.S config.h defs.h test.h
+ $(CC) -E -traditional $< -o $@
+@@ -41,7 +41,7 @@ setup.s: setup.S config.h defs.h + $(CC) -E -traditional $< -o $@
+
+ memtest.bin: memtest_shared.bin bootsect.o setup.o memtest.bin.lds
+- $(LD) -T memtest.bin.lds bootsect.o setup.o -b binary \
++ $(LD) -z notext --no-warn-rwx-segments -T memtest.bin.lds bootsect.o setup.o -b binary \
+ memtest_shared.bin -o memtest.bin
+
+ reloc.o: reloc.c
diff --git a/sys-apps/memtest86/memtest86-4.3.7-r3.ebuild b/sys-apps/memtest86/memtest86-4.3.7-r3.ebuild index 70ce741c82d1..58740a968ccc 100644 --- a/sys-apps/memtest86/memtest86-4.3.7-r3.ebuild +++ b/sys-apps/memtest86/memtest86-4.3.7-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" @@ -19,6 +19,7 @@ PATCHES=( "${FILESDIR}"/${PN}-4.3.7-io-extern-inline.patch #548312 #568292 "${FILESDIR}"/${PN}-4.3.7-reboot-def.patch #548312 #568292 "${FILESDIR}"/${PN}-4.3.7-no-clean.patch #557890 + "${FILESDIR}"/${PN}-4.3.7-binutils-2.41-textrels.patch #912343 ) S="${WORKDIR}/src" |