Mon Jan 29 14:23:26 2018 UTC ()
memtestplus: revert previous, disable optimization.

Hack to fix PR pkg/52962. Now memtestplus functions correctly for sure.
Inspired by opensuse package.


(maya)
diff -r1.24 -r1.25 pkgsrc/sysutils/memtestplus/Makefile
diff -r1.14 -r1.15 pkgsrc/sysutils/memtestplus/distinfo
diff -r1.6 -r1.7 pkgsrc/sysutils/memtestplus/patches/patch-aa
diff -r1.2 -r1.3 pkgsrc/sysutils/memtestplus/patches/patch-main.c

cvs diff -r1.24 -r1.25 pkgsrc/sysutils/memtestplus/Makefile (expand / switch to unified diff)

--- pkgsrc/sysutils/memtestplus/Makefile 2018/01/29 13:55:30 1.24
+++ pkgsrc/sysutils/memtestplus/Makefile 2018/01/29 14:23:26 1.25
@@ -1,23 +1,23 @@ @@ -1,23 +1,23 @@
1# $NetBSD: Makefile,v 1.24 2018/01/29 13:55:30 maya Exp $ 1# $NetBSD: Makefile,v 1.25 2018/01/29 14:23:26 maya Exp $
2# 2#
3 3
4# Note -- version number also in the do-install rule 4# Note -- version number also in the do-install rule
5MAJVER=5 5MAJVER=5
6MINVER=01 6MINVER=01
7 7
8DISTNAME= memtest86+-${MAJVER}.${MINVER} 8DISTNAME= memtest86+-${MAJVER}.${MINVER}
9PKGNAME= memtestplus-${MAJVER}.${MINVER} 9PKGNAME= memtestplus-${MAJVER}.${MINVER}
10PKGREVISION= 3 10PKGREVISION= 4
11CATEGORIES= sysutils 11CATEGORIES= sysutils
12MASTER_SITES= http://www.memtest.org/download/${MAJVER}.${MINVER}/ 12MASTER_SITES= http://www.memtest.org/download/${MAJVER}.${MINVER}/
13 13
14MAINTAINER= pkgsrc-users@NetBSD.org 14MAINTAINER= pkgsrc-users@NetBSD.org
15HOMEPAGE= http://www.memtest.org/ 15HOMEPAGE= http://www.memtest.org/
16COMMENT= Thorough, stand alone memory test for x86 arch 16COMMENT= Thorough, stand alone memory test for x86 arch
17LICENSE= gnu-gpl-v2 17LICENSE= gnu-gpl-v2
18 18
19ONLY_FOR_PLATFORM= NetBSD-*-i386 Linux-*-i386 NetBSD-*-x86_64 Linux-*-x86_64 19ONLY_FOR_PLATFORM= NetBSD-*-i386 Linux-*-i386 NetBSD-*-x86_64 Linux-*-x86_64
20 20
21FORTIFY_SUPPORTED= no 21FORTIFY_SUPPORTED= no
22SSP_SUPPORTED= no 22SSP_SUPPORTED= no
23 23

cvs diff -r1.14 -r1.15 pkgsrc/sysutils/memtestplus/distinfo (expand / switch to unified diff)

--- pkgsrc/sysutils/memtestplus/distinfo 2018/01/29 13:55:30 1.14
+++ pkgsrc/sysutils/memtestplus/distinfo 2018/01/29 14:23:26 1.15
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1$NetBSD: distinfo,v 1.14 2018/01/29 13:55:30 maya Exp $ 1$NetBSD: distinfo,v 1.15 2018/01/29 14:23:26 maya Exp $
2 2
3SHA1 (memtest86+-5.01.tar.gz) = eb4b6d70114db3c9ed320785da44c0ba8349c10c 3SHA1 (memtest86+-5.01.tar.gz) = eb4b6d70114db3c9ed320785da44c0ba8349c10c
4RMD160 (memtest86+-5.01.tar.gz) = 756b57d8f8a3b7408aba0b2fc0cadcdc1df966df 4RMD160 (memtest86+-5.01.tar.gz) = 756b57d8f8a3b7408aba0b2fc0cadcdc1df966df
5SHA512 (memtest86+-5.01.tar.gz) = d872db35ef733ec8f49094251f2bf6b98cc80eb06d04044be3aecf28d534f24ba293a08b9979b112dbd07cf27368148939a33a32c7010fc9581a3a5b150c94d7 5SHA512 (memtest86+-5.01.tar.gz) = d872db35ef733ec8f49094251f2bf6b98cc80eb06d04044be3aecf28d534f24ba293a08b9979b112dbd07cf27368148939a33a32c7010fc9581a3a5b150c94d7
6Size (memtest86+-5.01.tar.gz) = 214877 bytes 6Size (memtest86+-5.01.tar.gz) = 214877 bytes
7SHA1 (patch-aa) = df9482d024449c6fc853f01a90b045e139d07430 7SHA1 (patch-aa) = df0b88c93ddf6c07066ef993db80cc1b2874337c
8SHA1 (patch-ab) = 04ca819d23656c5a73625b457ad730c0cf33e751 8SHA1 (patch-ab) = 04ca819d23656c5a73625b457ad730c0cf33e751
9SHA1 (patch-ac) = 9186952e34139b4d4aab6c266a224921a4d39659 9SHA1 (patch-ac) = 9186952e34139b4d4aab6c266a224921a4d39659
10SHA1 (patch-ad) = ab31fec30052fdd3c473ee885ba00d7e3676384f 10SHA1 (patch-ad) = ab31fec30052fdd3c473ee885ba00d7e3676384f
11SHA1 (patch-controller.c) = 8509599b72f1f11115dc58605b0f438ddfca9b4a 11SHA1 (patch-controller.c) = 8509599b72f1f11115dc58605b0f438ddfca9b4a
12SHA1 (patch-main.c) = 1d620fd9e1cc04a9fb739eb3c1e6515f8f8d5179 12SHA1 (patch-main.c) = 7f199aa47f429c21ceee127e19120b51a300feac
13SHA1 (patch-makeiso.sh) = 939056a96a1384e4d27772bf5612a755deca8145 13SHA1 (patch-makeiso.sh) = 939056a96a1384e4d27772bf5612a755deca8145
14SHA1 (patch-nbstart.S) = d97a6e9c25a57d0f5510c3acf4dccf0f0c0c31b0 14SHA1 (patch-nbstart.S) = d97a6e9c25a57d0f5510c3acf4dccf0f0c0c31b0
15SHA1 (patch-reboot.c) = 8103cb52d1a6e2cdb9099ad3535115617746ed26 15SHA1 (patch-reboot.c) = 8103cb52d1a6e2cdb9099ad3535115617746ed26

cvs diff -r1.6 -r1.7 pkgsrc/sysutils/memtestplus/patches/patch-aa (expand / switch to unified diff)

--- pkgsrc/sysutils/memtestplus/patches/patch-aa 2015/03/21 02:18:39 1.6
+++ pkgsrc/sysutils/memtestplus/patches/patch-aa 2018/01/29 14:23:26 1.7
@@ -1,26 +1,32 @@ @@ -1,26 +1,32 @@
1$NetBSD: patch-aa,v 1.6 2015/03/21 02:18:39 tnn Exp $ 1$NetBSD: patch-aa,v 1.7 2018/01/29 14:23:26 maya Exp $
2 2
3--- Makefile.orig 2013-08-10 02:01:58.000000000 +0000 3--- Makefile.orig 2013-08-10 02:01:58.000000000 +0000
4+++ Makefile 4+++ Makefile
5@@ -7,7 +7,7 @@ 5@@ -7,12 +7,12 @@
6 # 6 #
7 # Path for the floppy disk device 7 # Path for the floppy disk device
8 # 8 #
9-FDISK=/dev/fd0 9-FDISK=/dev/fd0
10+FDISK=/dev/fd0a 10+FDISK=/dev/fd0a
11  11
12 AS=as -32 12 AS=as -32
13 CC=gcc 13 CC=gcc
 14
 15-CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \
 16+CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
 17 -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
 18
 19 OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
14@@ -20,22 +20,24 @@ OBJS= head.o reloc.o main.o test.o init. 20@@ -20,22 +20,24 @@ OBJS= head.o reloc.o main.o test.o init.
15 smp.o vmem.o random.o 21 smp.o vmem.o random.o
16  22
17  23
18-all: clean memtest.bin memtest  24-all: clean memtest.bin memtest
19- scp memtest.bin root@192.168.0.12:/srv/tftp/mt86plus 25- scp memtest.bin root@192.168.0.12:/srv/tftp/mt86plus
20+all: memtest.bin memtest  26+all: memtest.bin memtest
21  27
22 # Link it statically once so I know I don't have undefined 28 # Link it statically once so I know I don't have undefined
23 # symbols and then link it dynamically so I have full 29 # symbols and then link it dynamically so I have full
24 # relocation information 30 # relocation information
25 memtest_shared: $(OBJS) memtest_shared.lds Makefile 31 memtest_shared: $(OBJS) memtest_shared.lds Makefile
26- $(LD) --warn-constructors --warn-common -static -T memtest_shared.lds \ 32- $(LD) --warn-constructors --warn-common -static -T memtest_shared.lds \

cvs diff -r1.2 -r1.3 pkgsrc/sysutils/memtestplus/patches/patch-main.c (expand / switch to unified diff)

--- pkgsrc/sysutils/memtestplus/patches/patch-main.c 2018/01/29 13:55:30 1.2
+++ pkgsrc/sysutils/memtestplus/patches/patch-main.c 2018/01/29 14:23:26 1.3
@@ -1,29 +1,18 @@ @@ -1,29 +1,18 @@
1$NetBSD: patch-main.c,v 1.2 2018/01/29 13:55:30 maya Exp $ 1$NetBSD: patch-main.c,v 1.3 2018/01/29 14:23:26 maya Exp $
2 2
3Disable one of the tests that causes reboots/hangs at setup 3Clang fix.
4(XXX figure out why - use btflag and btrace to debug this) 
5Clang fix 
6 4
7--- main.c.orig 2013-08-10 02:01:58.000000000 +0000 5--- main.c.orig 2013-08-10 02:01:58.000000000 +0000
8+++ main.c 6+++ main.c
9@@ -54,7 +54,7 @@ struct tseq tseq[] = { 
10 {1, 32, 3, 6, 0, "[Moving inversions, 1s & 0s Parallel] "}, 
11 {1, 32, 5, 3, 0, "[Moving inversions, 8 bit pattern] "}, 
12 {1, 32, 6, 30, 0, "[Moving inversions, random pattern] "}, 
13- {1, 32, 7, 81, 0, "[Block move] "},  
14+ //{1, 32, 7, 81, 0, "[Block move] "}, 
15 {1, 1, 8, 3, 0, "[Moving inversions, 32 bit pattern] "},  
16 {1, 32, 9, 48, 0, "[Random number sequence] "}, 
17 {1, 32, 10, 6, 0, "[Modulo 20, Random pattern] "}, 
18@@ -217,7 +217,11 @@ static void run_at(unsigned long addr, i 7@@ -217,7 +217,11 @@ static void run_at(unsigned long addr, i
19 spin_lock(&barr->mutex);  8 spin_lock(&barr->mutex);
20  9
21 /* Jump to the start address */ 10 /* Jump to the start address */
22+#ifdef __clang__ 11+#ifdef __clang__
23+ asm volatile ("jmp *%0" : : "a" (ja)); 12+ asm volatile ("jmp *%0" : : "a" (ja));
24+#else 13+#else
25 goto *ja; 14 goto *ja;
26+#endif 15+#endif
27 } 16 }
28  17
29 /* Switch from the boot stack to the main stack. First the main stack 18 /* Switch from the boot stack to the main stack. First the main stack