From 43d09c372abdff8510881463026fd8e8ce0c4183 Mon Sep 17 00:00:00 2001 From: Kartatz <105828205+Kartatz@users.noreply.github.com> Date: Sun, 16 Feb 2025 13:25:02 -0300 Subject: [PATCH] Update to OpenBSD 7.6 --- build.sh | 1 + patches/0001-x.patch | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 patches/0001-x.patch diff --git a/build.sh b/build.sh index 2b8ba97..0ed6ab5 100644 --- a/build.sh +++ b/build.sh @@ -67,6 +67,7 @@ function setup_gcc_source() { elif (( gcc_version >= 15 )); then patch --directory="${gcc_directory}" --strip='1' --input="${workdir}/patches/0001-Fix-libatomic-build-with-newer-GCC-versions.patch" # patch --directory="${gcc_directory}" --strip='1' --input="${workdir}/patches/0001-Disable-libfunc-support-for-hppa-unknown-openbsd.patch" + patch --directory="${gcc_directory}" --strip='1' --input="${workdir}/patches/0001-x.patch" patch --directory="${gcc_directory}" --strip='1' --input="${workdir}/submodules/obggcc/patches/0001-Fix-libgcc-build-on-arm.patch" patch --directory="${gcc_directory}" --strip='1' --input="${workdir}/submodules/obggcc/patches/0001-Change-the-default-language-version-for-C-compilatio.patch" patch --directory="${gcc_directory}" --strip='1' --input="${workdir}/submodules/obggcc/patches/0001-Turn-Wimplicit-int-back-into-an-warning.patch" diff --git a/patches/0001-x.patch b/patches/0001-x.patch new file mode 100644 index 0000000..47f1b92 --- /dev/null +++ b/patches/0001-x.patch @@ -0,0 +1,38 @@ +From 24c7dba5c34a3c2bcf2a29b79279809dd3e2aa0f Mon Sep 17 00:00:00 2001 +From: Kartatz <105828205+Kartatz@users.noreply.github.com> +Date: Sun, 16 Feb 2025 17:20:54 +0100 +Subject: [PATCH] x + +--- + libgcc/config/pa/sync-libfuncs.c | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +diff --git a/libgcc/config/pa/sync-libfuncs.c b/libgcc/config/pa/sync-libfuncs.c +index 774c16055..2557a7196 100644 +--- a/libgcc/config/pa/sync-libfuncs.c ++++ b/libgcc/config/pa/sync-libfuncs.c +@@ -132,12 +132,15 @@ static inline void + atomic_store_8 (volatile void *ptr, u64 value) + { + double tmp; +- +- asm volatile ("stws|stw} %2,-16(%%sp)\n\t" +- "{stws|stw} %R2,-12(%%sp)\n\t" +- "{fldds|fldd} -16(%%sp),%1\n\t" +- "{fstds|fstd} %1,0(%0)" +- : "=m" (ptr), "=&f" (tmp) : "r" (value): "memory"); ++ asm volatile ( ++ "stws %2,-16(%%sp)\n\t" // Store lower 32 bits ++ "stw %R2,-12(%%sp)\n\t" // Store upper 32 bits ++ "fldds -16(%%sp),%1\n\t" // Load double from stack to tmp ++ "fstds %1,0(%0)" // Store double into ptr ++ : "=m" (ptr), "=&f" (tmp) // Outputs ++ : "r" (value) // Input: 64-bit value ++ : "memory" // Clobbered memory ++ ); + } + #endif + +-- +2.36.6 +