Skip to content

Commit

Permalink
Update to OpenBSD 7.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartatz committed Feb 16, 2025
1 parent 7d2b70f commit 43d09c3
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
38 changes: 38 additions & 0 deletions patches/0001-x.patch
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 43d09c3

Please sign in to comment.