summaryrefslogtreecommitdiffstats
path: root/system/memtest86+/patches/memtest86+-5.01-gcc-473.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/memtest86+/patches/memtest86+-5.01-gcc-473.patch')
-rw-r--r--system/memtest86+/patches/memtest86+-5.01-gcc-473.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/system/memtest86+/patches/memtest86+-5.01-gcc-473.patch b/system/memtest86+/patches/memtest86+-5.01-gcc-473.patch
new file mode 100644
index 0000000000..af011d67c7
--- /dev/null
+++ b/system/memtest86+/patches/memtest86+-5.01-gcc-473.patch
@@ -0,0 +1,33 @@
+http://forum.canardpc.com/threads/110950-fix-controller-loop-error
+
+--- memtest86+-5.01/controller.c
++++ memtest86+-5.01/controller.c
+@@ -292,7 +292,7 @@ static void setup_nhm(void)
+
+ /* First, locate the PCI bus where the MCH is located */
+
+- for(i = 0; i < sizeof(possible_nhm_bus); i++) {
++ for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
+ 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;
+@@ -327,7 +327,7 @@ static void setup_nhm32(void)
+ ctrl.mode = ECC_NONE;
+
+ /* First, locate the PCI bus where the MCH is located */
+- for(i = 0; i < sizeof(possible_nhm_bus); i++) {
++ for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
+ 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;
+--- memtest86+-5.01/Makefile
++++ memtest86+-5.01/Makefile
+@@ -12,7 +12,7 @@ FDISK=/dev/fd0
+ AS=as -32
+ CC=gcc
+
+-CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \
++CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
+ -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
+
+ OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \