void-packages/srcpkgs/memtest86+/patches/01.memtest86+-5.01-no-optimization.patch
Đoàn Trần Công Danh 765e304c4b srcpkgs/m*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

19 lines
736 B
Diff

Patch to get memtest86+ working with gcc 4.7.2 or later and PCI scan fix
these patches were taken from Mageia
upstream report containing link to the patches:
http://forum.canardpc.com/threads/83443-Memtest86-V5.01-crashes-with-gcc-4.7.2-or-later
Patch source: http://pkgs.fedoraproject.org/cgit/rpms/memtest86+.git/
--- a/Makefile~ 2014-01-08 01:30:11.355900076 +0000
+++ b/Makefile 2014-01-08 01:31:19.387555469 +0000
@@ -12,7 +12,7 @@
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 \