public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/, sys-apps/memtest86+/files/
@ 2015-12-12 23:24 Mike Frysinger
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2015-12-12 23:24 UTC (permalink / raw
  To: gentoo-commits

commit:     e5b24d52ab056fffa21763d8a8ed09c04f4ce539
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 12 23:24:22 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Dec 12 23:24:37 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5b24d52

sys-apps/memtest+: fix building w/gcc-5 #548312

 .../memtest86+/files/memtest86+-5.01-gcc-473.patch | 21 ----------------
 .../files/memtest86+-5.01-io-extern-inline.patch   | 29 ++++++++++++++++++++++
 .../files/memtest86+-5.01-reboot-def.patch         | 13 ++++++++++
 sys-apps/memtest86+/memtest86+-5.01-r1.ebuild      |  2 ++
 4 files changed, 44 insertions(+), 21 deletions(-)

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch b/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch
index ff9b15a..b793c32 100644
--- a/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch
@@ -19,27 +19,6 @@ diff -Narup memtest86+-5.01-orig/controller.c memtest86+-5.01/controller.c
  		pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid);
  		pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did);
  		vid &= 0xFFFF;
-diff -Narup memtest86+-5.01-orig/io.h memtest86+-5.01/io.h
---- memtest86+-5.01-orig/io.h	2013-08-09 22:01:58.000000000 -0400
-+++ memtest86+-5.01/io.h	2014-06-22 11:00:19.279251873 -0400
-@@ -31,7 +31,7 @@
-  */
- 
- #define __OUT1(s,x) \
--extern inline void __out##s(unsigned x value, unsigned short port) {
-+static inline void __out##s(unsigned x value, unsigned short port) {
- 
- #define __OUT2(s,s1,s2) \
- __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1"
-@@ -43,7 +43,7 @@ __OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a"
- __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; }
- 
- #define __IN1(s) \
--extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
-+static inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
- 
- #define __IN2(s,s1,s2) \
- __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0"
 diff -Narup memtest86+-5.01-orig/Makefile memtest86+-5.01/Makefile
 --- memtest86+-5.01-orig/Makefile	2013-08-09 22:01:58.000000000 -0400
 +++ memtest86+-5.01/Makefile	2014-06-22 10:59:27.463573842 -0400

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch b/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch
new file mode 100644
index 0000000..8dc13b1
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch
@@ -0,0 +1,29 @@
+the meaning of extern inline changed between standards.  use static inline
+for these tiny I/O functions everywhere to keep things simple.
+
+--- a/io.h
++++ b/io.h
+@@ -31,6 +31,6 @@
+  */
+ 
+ #define __OUT1(s,x) \
+-extern inline void __out##s(unsigned x value, unsigned short port) {
++static inline void __out##s(unsigned x value, unsigned short port) {
+ 
+ #define __OUT2(s,s1,s2) \
+@@ -43,6 +43,6 @@
+ __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; }
+ 
+ #define __IN1(s) \
+-extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
++static inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
+ 
+ #define __IN2(s,s1,s2) \
+@@ -55,6 +55,6 @@
+ __IN1(s##c_p) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; return _v; }
+ 
+ #define __OUTS(s) \
+-extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \
++static inline void outs##s(unsigned short port, const void * addr, unsigned long count) \
+ { __asm__ __volatile__ ("cld ; rep ; outs" #s \
+ : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); }

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch b/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch
new file mode 100644
index 0000000..a121fde
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch
@@ -0,0 +1,13 @@
+the reboot func is used elsewhere, so don't mark it inline
+
+--- a/lib.c
++++ b/lib.c
+@@ -33,7 +33,7 @@ struct ascii_map_str {
+         int keycode;
+ };
+ 
+-inline void reboot(void)
++void reboot(void)
+ {
+ 	
+ 	/* tell the BIOS to do a cold start */

diff --git a/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild b/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
index 1232c12..aa4a848 100644
--- a/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
+++ b/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
@@ -27,6 +27,8 @@ src_prepare() {
 	sed -e "s/scp memtest.bin root@192.168.0.12:\/srv\/tftp\/mt86plus//g" -i Makefile
 	epatch "${FILESDIR}/${P}-gcc-473.patch" \
 		   "${FILESDIR}/${P}-hardcoded_cc.patch"
+	epatch "${FILESDIR}"/${P}-io-extern-inline.patch #548312
+	epatch "${FILESDIR}"/${P}-reboot-def.patch #548312
 
 	if use serial ; then
 		sed -i \


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/, sys-apps/memtest86+/files/
@ 2015-12-12 23:32 Mike Frysinger
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2015-12-12 23:32 UTC (permalink / raw
  To: gentoo-commits

commit:     f048dceea57aa5850370d8c95b3a49bd6696d901
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 12 23:29:24 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Dec 12 23:29:45 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f048dcee

sys-apps/memtest+: switch scp disable to a patch

This uses the Fedora one so it's a bit more clear we're on the same page.

 sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch | 12 ++++++++++++
 sys-apps/memtest86+/memtest86+-5.01-r1.ebuild          |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch b/sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch
new file mode 100644
index 0000000..8303ccf
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-no-scp.patch
@@ -0,0 +1,12 @@
+this makes no sense in a sane build world
+
+--- a/Makefile
++++ b/Makefile
+@@ -21,7 +21,6 @@
+       
+ 
+ all: clean memtest.bin memtest 
+-		 scp memtest.bin root@192.168.0.12:/srv/tftp/mt86plus
+ 
+ # Link it statically once so I know I don't have undefined
+ # symbols and then link it dynamically so I have full

diff --git a/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild b/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
index aa4a848..f18f5b0 100644
--- a/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
+++ b/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
@@ -24,9 +24,9 @@ DEPEND=""
 
 src_prepare() {
 	sed -i -e 's,0x10000,0x100000,' memtest.lds || die
-	sed -e "s/scp memtest.bin root@192.168.0.12:\/srv\/tftp\/mt86plus//g" -i Makefile
 	epatch "${FILESDIR}/${P}-gcc-473.patch" \
 		   "${FILESDIR}/${P}-hardcoded_cc.patch"
+	epatch "${FILESDIR}"/${P}-no-scp.patch
 	epatch "${FILESDIR}"/${P}-io-extern-inline.patch #548312
 	epatch "${FILESDIR}"/${P}-reboot-def.patch #548312
 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/, sys-apps/memtest86+/files/
@ 2016-12-07  8:01 Mike Frysinger
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2016-12-07  8:01 UTC (permalink / raw
  To: gentoo-commits

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 \


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/, sys-apps/memtest86+/files/
@ 2020-06-05 16:38 Sergei Trofimovich
  0 siblings, 0 replies; 6+ messages in thread
From: Sergei Trofimovich @ 2020-06-05 16:38 UTC (permalink / raw
  To: gentoo-commits

commit:     62d74d702f50713a24b72ee97afb9739213020ca
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  5 16:37:58 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Jun  5 16:37:58 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62d74d70

sys-apps/memtest86+: allow user to override OBJCOPY

Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 .../memtest86+/files/memtest86+-5.01-objcopy.patch |  20 ++++
 sys-apps/memtest86+/memtest86+-5.01-r5.ebuild      | 115 +++++++++++++++++++++
 2 files changed, 135 insertions(+)

diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-objcopy.patch b/sys-apps/memtest86+/files/memtest86+-5.01-objcopy.patch
new file mode 100644
index 00000000000..5effe20027a
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-objcopy.patch
@@ -0,0 +1,20 @@
+Allow 'objcopy' override with user's OBJCOPY.
+--- a/Makefile
++++ b/Makefile
+@@ -8,6 +8,7 @@
+ # Path for the floppy disk device
+ #
+ FDISK=/dev/fd0
++OBJCOPY=objcopy
+ 
+ CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
+ 	-ffreestanding -fPIC $(SMP_FL) -fno-stack-protector 
+@@ -30,7 +31,7 @@ memtest_shared: $(OBJS) memtest_shared.lds Makefile
+ 	$(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS)
+ 
+ memtest_shared.bin: memtest_shared
+-	objcopy -O binary $< memtest_shared.bin
++	$(OBJCOPY) -O binary $< memtest_shared.bin
+ 
+ memtest: memtest_shared.bin memtest.lds
+ 	$(LD) -s -T memtest.lds -b binary memtest_shared.bin -o $@

diff --git a/sys-apps/memtest86+/memtest86+-5.01-r5.ebuild b/sys-apps/memtest86+/memtest86+-5.01-r5.ebuild
new file mode 100644
index 00000000000..35c3e1085fa
--- /dev/null
+++ b/sys-apps/memtest86+/memtest86+-5.01-r5.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit mount-boot eutils toolchain-funcs
+
+DESCRIPTION="Memory tester based on memtest86"
+HOMEPAGE="http://www.memtest.org/"
+SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="+boot floppy iso serial"
+
+BOOTDIR="/boot/memtest86plus"
+QA_PRESTRIPPED="${BOOTDIR}/memtest /usr/share/${PN}/memtest"
+QA_FLAGS_IGNORED="${BOOTDIR}/memtest /usr/share/${PN}/memtest"
+
+RDEPEND="floppy? ( sys-fs/mtools )"
+DEPEND="iso? ( app-cdr/cdrtools )"
+
+pkg_pretend() {
+	use boot && mount-boot_pkg_pretend
+}
+
+src_prepare() {
+	sed -i -e 's,0x10000,0x100000,' memtest.lds || die
+	epatch "${FILESDIR}/${P}-gcc-473.patch" \
+		   "${FILESDIR}/${P}-hardcoded_cc.patch"
+	epatch "${FILESDIR}"/${P}-no-scp.patch
+	epatch "${FILESDIR}"/${P}-io-extern-inline.patch #548312
+	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
+	epatch "${FILESDIR}"/${P}-objcopy.patch
+
+	sed -i 's:genisoimage:mkisofs:' makeiso.sh || die
+	if use serial ; then
+		sed -i \
+			-e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
+			config.h \
+			|| die "sed failed"
+	fi
+	default
+}
+
+src_configure() {
+	tc-ld-disable-gold #580212
+	tc-export AS CC LD
+}
+
+src_compile() {
+	emake OBJCOPY="$(tc-getOBJCOPY)"
+	if use iso ; then
+		./makeiso.sh || die
+	fi
+}
+
+src_test() { :; }
+
+src_install() {
+	if use boot; then
+		insinto "${BOOTDIR}"
+		doins memtest memtest.bin
+	fi
+
+	insinto /usr/share/${PN}
+	use iso && newins mt*.iso memtest.iso
+	doins memtest memtest.bin
+
+	exeinto /etc/grub.d
+	newexe "${FILESDIR}"/39_${PN}-r1 39_${PN}
+
+	dodoc README README.build-process FAQ changelog
+
+	if use floppy ; then
+		dobin "${FILESDIR}"/make-memtest86+-boot-floppy
+		doman "${FILESDIR}"/make-memtest86+-boot-floppy.1
+	fi
+}
+
+pkg_preinst() {
+	use boot && mount-boot_pkg_preinst
+}
+
+pkg_postinst() {
+	if use boot; then
+		mount-boot_pkg_postinst
+
+		elog "memtest86+ has been installed in ${BOOTDIR}/"
+		elog "You may wish to update your bootloader configs by adding these lines:"
+		elog " - For grub2 just run grub-mkconfig, a configuration file is installed"
+		elog "   as /etc/grub.d/39_${PN}"
+		elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)"
+		elog "    > title=${PN}"
+		elog "    > root (hd?,?)"
+		elog "    > kernel ${BOOTDIR}/memtest.bin"
+		elog " - For lilo:"
+		elog "    > image  = ${BOOTDIR}/memtest.bin"
+		elog "    > label  = ${PN}"
+		elog ""
+		elog "Note: For older configs, you might have to change from 'memtest' to 'memtest.bin'."
+	fi
+}
+
+pkg_prerm() {
+	use boot && mount-boot_pkg_prerm
+}
+
+pkg_postrm() {
+	use boot && mount-boot_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/, sys-apps/memtest86+/files/
@ 2021-09-16 14:56 Ben Kohler
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Kohler @ 2021-09-16 14:56 UTC (permalink / raw
  To: gentoo-commits

commit:     40197d77e025829d1bbfc3bb97cc3a327b81e7f3
Author:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 16 14:33:55 2021 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Thu Sep 16 14:56:08 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40197d77

sys-apps/memtest86+: runtime fix for >=gcc-8

Bug: https://bugs.gentoo.org/675270

Package-Manager: Portage-3.0.23, Repoman-3.0.3
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 .../memtest86+-5.31b-fix-gcc8-freeze-crash.patch   |  12 +++
 sys-apps/memtest86+/memtest86+-5.31b-r1.ebuild     | 114 +++++++++++++++++++++
 2 files changed, 126 insertions(+)

diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-fix-gcc8-freeze-crash.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-fix-gcc8-freeze-crash.patch
new file mode 100644
index 00000000000..44d11b76b34
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.31b-fix-gcc8-freeze-crash.patch
@@ -0,0 +1,12 @@
+diff -ur memtest86+-5.31b/Makefile memtest86+-5.31b.new/Makefile
+--- memtest86+-5.31b/Makefile	2021-09-16 09:27:24.401570971 -0500
++++ memtest86+-5.31b.new/Makefile	2021-09-16 09:30:24.332704245 -0500
+@@ -64,6 +64,9 @@
+ memsize.o: memsize.c
+ 	$(CC) -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector   -c -o memsize.o memsize.c
+ 
++test.o: test.c
++test.o: CFLAGS += -fno-strict-overflow
++
+ random.o: random.c
+ random.o: CFLAGS += -O3 -fno-PIC
\ No newline at end of file

diff --git a/sys-apps/memtest86+/memtest86+-5.31b-r1.ebuild b/sys-apps/memtest86+/memtest86+-5.31b-r1.ebuild
new file mode 100644
index 00000000000..b56de8634e5
--- /dev/null
+++ b/sys-apps/memtest86+/memtest86+-5.31b-r1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit mount-boot toolchain-funcs
+
+DESCRIPTION="Memory tester based on memtest86"
+HOMEPAGE="http://www.memtest.org/"
+SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="+boot floppy iso serial"
+
+BOOTDIR="/boot/memtest86plus"
+QA_PRESTRIPPED="${BOOTDIR#/}/memtest usr/share/${PN}/memtest"
+QA_FLAGS_IGNORED="${BOOTDIR#/}/memtest usr/share/${PN}/memtest"
+
+RDEPEND="floppy? ( sys-fs/mtools )"
+DEPEND="${RDEPEND}"
+BDEPEND="iso? ( app-cdr/cdrtools )"
+
+PATCHES=(
+	"${FILESDIR}/${P}-gcc-473.patch"
+	"${FILESDIR}/${P}-hardcoded_cc.patch"
+	"${FILESDIR}/${P}-no-clean.patch" #557890
+	"${FILESDIR}/${P}-objcopy.patch"
+	"${FILESDIR}/${P}-test-random-cflags.patch" #590974
+	"${FILESDIR}/${P}-fix-gcc8-freeze-crash.patch"
+)
+
+pkg_pretend() {
+	use boot && mount-boot_pkg_pretend
+}
+
+src_prepare() {
+	sed -i -e 's,0x10000,0x100000,' memtest.lds || die
+	sed -i 's:genisoimage:mkisofs:' makeiso.sh || die
+
+	if use serial ; then
+		sed -i -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
+			config.h || die "sed failed"
+	fi
+	default
+}
+
+src_configure() {
+	tc-ld-disable-gold #580212
+	tc-export AS CC LD
+}
+
+src_compile() {
+	emake OBJCOPY="$(tc-getOBJCOPY)"
+	if use iso ; then
+		./makeiso.sh || die
+	fi
+}
+
+src_test() { :; }
+
+src_install() {
+	if use boot ; then
+		insinto "${BOOTDIR}"
+		doins memtest memtest.bin
+	fi
+
+	insinto /usr/share/${PN}
+	use iso && newins mt*.iso memtest.iso
+	doins memtest memtest.bin
+
+	exeinto /etc/grub.d
+	newexe "${FILESDIR}"/39_${PN}-r1 39_${PN}
+
+	dodoc README README.build-process FAQ changelog
+
+	if use floppy ; then
+		dobin "${FILESDIR}"/make-memtest86+-boot-floppy
+		doman "${FILESDIR}"/make-memtest86+-boot-floppy.1
+	fi
+}
+
+pkg_preinst() {
+	use boot && mount-boot_pkg_preinst
+}
+
+pkg_postinst() {
+	if use boot; then
+		mount-boot_pkg_postinst
+
+		elog "memtest86+ has been installed in ${BOOTDIR}/"
+		elog "You may wish to update your bootloader configs by adding these lines:"
+		elog " - For grub2 just run grub-mkconfig, a configuration file is installed"
+		elog "   as /etc/grub.d/39_${PN}"
+		elog " - For grub legacy: (replace '?' with correct numbers for your boot partition)"
+		elog "    > title=${PN}"
+		elog "    > root (hd?,?)"
+		elog "    > kernel ${BOOTDIR}/memtest.bin"
+		elog " - For lilo:"
+		elog "    > image  = ${BOOTDIR}/memtest.bin"
+		elog "    > label  = ${PN}"
+		elog ""
+		elog "Note: For older configs, you might have to change from 'memtest' to 'memtest.bin'."
+	fi
+}
+
+pkg_prerm() {
+	use boot && mount-boot_pkg_prerm
+}
+
+pkg_postrm() {
+	use boot && mount-boot_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/, sys-apps/memtest86+/files/
@ 2021-12-15 19:00 Ben Kohler
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Kohler @ 2021-12-15 19:00 UTC (permalink / raw
  To: gentoo-commits

commit:     c14a13e3a42edffe77d3472c81ab803f0f203d30
Author:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 15 18:58:55 2021 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Wed Dec 15 18:59:53 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c14a13e3

sys-apps/memtest86+: add fix from suse

Closes: https://bugs.gentoo.org/339691
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 ...emtest86+-5.31b-discard-note_gnu_property.patch |  23 ++++
 sys-apps/memtest86+/memtest86+-5.31b-r3.ebuild     | 117 +++++++++++++++++++++
 2 files changed, 140 insertions(+)

diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-discard-note_gnu_property.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-discard-note_gnu_property.patch
new file mode 100644
index 000000000000..e24ad4318f37
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.31b-discard-note_gnu_property.patch
@@ -0,0 +1,23 @@
+--- a/Makefile	2021-12-04 15:15:45.845429722 +0100
++++ b/Makefile	2021-12-04 15:22:51.924755794 +0100
+@@ -11,9 +11,9 @@
+ OBJCOPY=objcopy
+ 
+ CFLAGS= -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
+- -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
++ -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector -Wa,-mx86-used-note=no
+ CPPFLAGS= -m32
+-ASFLAGS= -32
++ASFLAGS= -32 -mx86-used-note=no
+ 
+ SELF_TEST_CFLAGS = -Wall -Werror -march=i486 -m32 -O1 -g
+ 
+--- a/memtest.bin.lds	2020-04-12 17:14:51.000000000 +0200
++++ b/memtest.bin.lds	2021-12-04 14:54:33.178625382 +0100
+@@ -11,5 +11,6 @@
+ 		*(.data) 
+ 		_end = . ;
+ 	}
++	/DISCARD/ : { *(.note.gnu.property) }
+ 	_syssize = (_end - _start + 15) >> 4;
+ }

diff --git a/sys-apps/memtest86+/memtest86+-5.31b-r3.ebuild b/sys-apps/memtest86+/memtest86+-5.31b-r3.ebuild
new file mode 100644
index 000000000000..2b8bb4cbb296
--- /dev/null
+++ b/sys-apps/memtest86+/memtest86+-5.31b-r3.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit mount-boot toolchain-funcs
+
+DESCRIPTION="Memory tester based on memtest86"
+HOMEPAGE="http://www.memtest.org/"
+SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="+boot floppy iso serial"
+
+BOOTDIR="/boot/memtest86plus"
+QA_PRESTRIPPED="${BOOTDIR#/}/memtest usr/share/${PN}/memtest"
+QA_FLAGS_IGNORED="${BOOTDIR#/}/memtest usr/share/${PN}/memtest"
+
+RDEPEND="floppy? ( sys-fs/mtools )"
+DEPEND="${RDEPEND}"
+BDEPEND="iso? ( app-cdr/cdrtools )"
+
+PATCHES=(
+	"${FILESDIR}/${P}-gcc-473.patch"
+	"${FILESDIR}/${P}-hardcoded_cc.patch"
+	"${FILESDIR}/${P}-no-clean.patch" #557890
+	"${FILESDIR}/${P}-objcopy.patch"
+	"${FILESDIR}/${P}-test-random-cflags.patch" #590974
+	"${FILESDIR}/${P}-fix-gcc8-freeze-crash.patch"
+	"${FILESDIR}/${P}-discard-note_gnu_property.patch"
+)
+
+pkg_pretend() {
+	use boot && mount-boot_pkg_pretend
+}
+
+src_prepare() {
+	sed -i -e 's,0x10000,0x100000,' memtest.lds || die
+	sed -i 's:genisoimage:mkisofs:' makeiso.sh || die
+
+	if use serial ; then
+		sed -i -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \
+			config.h || die "sed failed"
+	fi
+	#613196
+	use amd64 && sed -i -e's,$(LD) -s -T memtest.lds,$(LD) -s -T memtest.lds -z max-page-size=0x1000,' Makefile
+	default
+}
+
+src_configure() {
+	tc-ld-disable-gold #580212
+	tc-export AS CC LD
+}
+
+src_compile() {
+	emake OBJCOPY="$(tc-getOBJCOPY)"
+	if use iso ; then
+		./makeiso.sh || die
+	fi
+}
+
+src_test() { :; }
+
+src_install() {
+	if use boot ; then
+		insinto "${BOOTDIR}"
+		doins memtest memtest.bin
+	fi
+
+	insinto /usr/share/${PN}
+	use iso && newins mt*.iso memtest.iso
+	doins memtest memtest.bin
+
+	exeinto /etc/grub.d
+	newexe "${FILESDIR}"/39_${PN}-r1 39_${PN}
+
+	dodoc README README.build-process FAQ changelog
+
+	if use floppy ; then
+		dobin "${FILESDIR}"/make-memtest86+-boot-floppy
+		doman "${FILESDIR}"/make-memtest86+-boot-floppy.1
+	fi
+}
+
+pkg_preinst() {
+	use boot && mount-boot_pkg_preinst
+}
+
+pkg_postinst() {
+	if use boot; then
+		mount-boot_pkg_postinst
+
+		elog "memtest86+ has been installed in ${BOOTDIR}/"
+		elog "You may wish to update your bootloader configs:"
+		elog " - For grub2 just re-run grub-mkconfig -o /boot/grub/grub.cfg, since a"
+		elog "   config generator has been installed at /etc/grub.d/39_${PN}"
+		elog " - For lilo, add the following to /etc/lilo.conf and re-run lilo:"
+		elog "    > image  = ${BOOTDIR}/memtest.bin"
+		elog "    > label  = ${PN}"
+		elog ""
+		elog "Note: For older configs, you might have to change from 'memtest' to 'memtest.bin'."
+	fi
+
+	if use boot && [ -e /sys/firmware/efi ]; then
+		ewarn "WARNING: You appear to be booted in EFI mode but ${PN} is a BIOS-only tool."
+	fi
+}
+
+pkg_prerm() {
+	use boot && mount-boot_pkg_prerm
+}
+
+pkg_postrm() {
+	use boot && mount-boot_pkg_postrm
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-15 19:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-05 16:38 [gentoo-commits] repo/gentoo:master commit in: sys-apps/memtest86+/, sys-apps/memtest86+/files/ Sergei Trofimovich
  -- strict thread matches above, loose matches on Subject: below --
2021-12-15 19:00 Ben Kohler
2021-09-16 14:56 Ben Kohler
2016-12-07  8:01 Mike Frysinger
2015-12-12 23:32 Mike Frysinger
2015-12-12 23:24 Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox