From 31e36491183d4144751ff4fe666c5994eed143e8 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 14 Sep 2024 18:59:20 +1000 Subject: bootstrap/jamvm-1.5.1: rectify spinlock condition on ppc64, add sanitisation patch Signed-off-by: Horst Burkhardt --- bootstrap/jamvm-1.5.1/jamvm-1.5.1-ppc64-lock.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 bootstrap/jamvm-1.5.1/jamvm-1.5.1-ppc64-lock.patch 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 \ -- cgit v1.2.3-70-g09d2