Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
Diffstat (limited to 'extra')
-rw-r--r--extra/memtest86+/PKGBUILD40
-rw-r--r--extra/memtest86+/i486.patch12
2 files changed, 52 insertions, 0 deletions
diff --git a/extra/memtest86+/PKGBUILD b/extra/memtest86+/PKGBUILD
new file mode 100644
index 00000000..8cab3c51
--- /dev/null
+++ b/extra/memtest86+/PKGBUILD
@@ -0,0 +1,40 @@
+# build the 32-bit version
+eval "$(
+ declare -f build | \
+ sed '
+ s/build64/build32/g
+ '
+)"
+eval "$(
+ declare -f package_memtest86+ | \
+ sed '
+ s/build64/build32/g
+ '
+)"
+eval "$(
+ declare -f package_memtest86+-efi | \
+ sed '
+ s/build64/build32/g
+ '
+)"
+eval "$(
+ declare -f package_memtest86+-iso | \
+ sed '
+ s/build64/build32/g
+ '
+)"
+
+# force i486 architecture (minimal is now hard-coded -march=586
+if [ "${CARCH}" = "i486" ]; then
+ source+=('i486.patch')
+ sha512sums+=('0383e8092b7e6da23735eb8b34365017e61f3557393f8ec9d2e3c8f06bf6688ae02e47c22d3d0c954351c20943305df8d987dcce688fb58a03b803ae45e6890b')
+ eval "$(
+ {
+ declare -f prepare || \
+ printf 'prepare() { cd "memtest86plus" \n}\n'
+ } \
+ | sed '
+ $i patch -Np1 -i ../i486.patch
+ '
+ )"
+fi
diff --git a/extra/memtest86+/i486.patch b/extra/memtest86+/i486.patch
new file mode 100644
index 00000000..ef9a3544
--- /dev/null
+++ b/extra/memtest86+/i486.patch
@@ -0,0 +1,12 @@
+diff -rauN a/build32/Makefile b/build32/Makefile
+--- a/build32/Makefile 2023-03-31 09:39:01.701959825 +0200
++++ b/build32/Makefile 2023-03-31 09:39:16.785357009 +0200
+@@ -9,7 +9,7 @@
+ GIT_AVAILABLE = true
+ endif
+
+-CFLAGS = -std=c11 -Wall -Wextra -Wshadow -m32 -march=i586 -fpic -fno-builtin \
++CFLAGS = -std=c11 -Wall -Wextra -Wshadow -m32 -march=i486 -fpic -fno-builtin \
+ -ffreestanding -fomit-frame-pointer -fno-stack-protector
+
+ INC_DIRS = -I../boot -I../system -I../lib -I../tests -I../app -Iapp