summaryrefslogtreecommitdiff
path: root/bootstrap/jamvm-1.5.1/jamvm-1.5.1-ppc64-lock.patch
diff options
context:
space:
mode:
authorA. Wilcox <awilfox@adelielinux.org>2024-09-14 18:59:20 +1000
committerHorst Burkhardt <horst@adelielinux.org>2024-09-14 18:59:20 +1000
commit31e36491183d4144751ff4fe666c5994eed143e8 (patch)
treed8a7d95b86f12ed720193bed3f82ca635d15b4b7 /bootstrap/jamvm-1.5.1/jamvm-1.5.1-ppc64-lock.patch
parentf25d134a9656b32c38a819b58e00b704d8eaeefc (diff)
downloadpackages-31e36491183d4144751ff4fe666c5994eed143e8.tar.gz
packages-31e36491183d4144751ff4fe666c5994eed143e8.tar.bz2
packages-31e36491183d4144751ff4fe666c5994eed143e8.tar.xz
packages-31e36491183d4144751ff4fe666c5994eed143e8.zip
bootstrap/jamvm-1.5.1: rectify spinlock condition on ppc64, add sanitisation patch
Signed-off-by: Horst Burkhardt <horst@adelielinux.org>
Diffstat (limited to 'bootstrap/jamvm-1.5.1/jamvm-1.5.1-ppc64-lock.patch')
-rw-r--r--bootstrap/jamvm-1.5.1/jamvm-1.5.1-ppc64-lock.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/bootstrap/jamvm-1.5.1/jamvm-1.5.1-ppc64-lock.patch b/bootstrap/jamvm-1.5.1/jamvm-1.5.1-ppc64-lock.patch
new file mode 100644
index 000000000..40de319ba
--- /dev/null
+++ b/bootstrap/jamvm-1.5.1/jamvm-1.5.1-ppc64-lock.patch
@@ -0,0 +1,20 @@
+Fix locking on PPC64
+
+The compiler definition is capitalised on Linux. Also, use a type with
+the proper width and signedness.
+
+--- jamvm-1.5.1/src/arch/powerpc.h.old 2007-09-16 21:32:27.000000000 -0500
++++ jamvm-1.5.1/src/arch/powerpc.h 2024-09-13 11:26:29.805601005 -0500
+@@ -31,10 +31,10 @@
+ /* Needed for i386 -- empty here */
+ #define FPU_HACK
+
+-#ifdef __ppc64__
++#ifdef __PPC64__
+ #define COMPARE_AND_SWAP(addr, old_val, new_val) \
+ ({ \
+- int result, read_val; \
++ uintptr_t result, read_val; \
+ __asm__ __volatile__ (" \
+ li %0,0\n \
+ 1: ldarx %1,0,%2\n \