summaryrefslogtreecommitdiff
path: root/sys-apps/memtest86+/files
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/memtest86+/files')
-rw-r--r--sys-apps/memtest86+/files/memtest86+-5.31b-gcc-473.patch13
-rw-r--r--sys-apps/memtest86+/files/memtest86+-5.31b-hardcoded_cc.patch16
-rw-r--r--sys-apps/memtest86+/files/memtest86+-5.31b-no-clean.patch19
-rw-r--r--sys-apps/memtest86+/files/memtest86+-5.31b-objcopy.patch21
-rw-r--r--sys-apps/memtest86+/files/memtest86+-5.31b-test-random-cflags.patch17
5 files changed, 86 insertions, 0 deletions
diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-gcc-473.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-gcc-473.patch
new file mode 100644
index 000000000000..76c0761512b4
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.31b-gcc-473.patch
@@ -0,0 +1,13 @@
+http://forum.canardpc.com/threads/110950-fix-controller-loop-error
+
+--- a/Makefile
++++ b/Makefile
+@@ -12,7 +12,7 @@ FDISK=/dev/fd0
+ AS=as -32
+ CC=gcc
+
+-CFLAGS= -Wall -Werror -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \
++CFLAGS= -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
+ -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
+
+ SELF_TEST_CFLAGS = -Wall -Werror -march=i486 -m32 -O1 -g
diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-hardcoded_cc.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-hardcoded_cc.patch
new file mode 100644
index 000000000000..4ee174478b7b
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.31b-hardcoded_cc.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -9,11 +9,10 @@
+ #
+ FDISK=/dev/fd0
+
+-AS=as -32
+-CC=gcc
+-
+ CFLAGS= -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
+ -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
++CPPFLAGS= -m32
++ASFLAGS= -32
+
+ SELF_TEST_CFLAGS = -Wall -Werror -march=i486 -m32 -O1 -g
+
diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-no-clean.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-no-clean.patch
new file mode 100644
index 000000000000..dbb560e506b9
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.31b-no-clean.patch
@@ -0,0 +1,19 @@
+http://forum.canardpc.com/threads/110954-PATCH-fix-parallel-build-issues
+
+
+don't run the clean target when building all as we run into parallel races:
+ - memtest kicks off building of a bunch of .o files
+ - clean runs in parallel which runs `rm` and deletes some of the new .o
+ - memtest goes to link and fails because objects are missing
+
+--- a/Makefile
++++ b/Makefile
+@@ -22,7 +22,7 @@
+
+ SELF_TEST_OBJS = test.o self_test.o cpuid.o random.o
+
+-all: clean memtest.bin memtest
++all: memtest.bin memtest
+
+ run_self_test : self_test
+ ./self_test && touch run_self_test
diff --git a/sys-apps/memtest86+/files/memtest86+-5.31b-objcopy.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-objcopy.patch
new file mode 100644
index 000000000000..9398c4163a4d
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.31b-objcopy.patch
@@ -0,0 +1,21 @@
+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 -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
+ -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
+@@ -36,7 +37,7 @@
+ $(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+/files/memtest86+-5.31b-test-random-cflags.patch b/sys-apps/memtest86+/files/memtest86+-5.31b-test-random-cflags.patch
new file mode 100644
index 000000000000..f3faf1392b3a
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.31b-test-random-cflags.patch
@@ -0,0 +1,17 @@
+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
+@@ -65,7 +65,7 @@
+ $(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
+
+ random.o: random.c
+- $(CC) -c -Wall -march=i486 -m32 -O3 -fomit-frame-pointer -fno-builtin -ffreestanding random.c
++random.o: CFLAGS += -O3 -fno-PIC
+
+ clean:
+ rm -f *.o *.s *.iso memtest.bin memtest memtest_shared \