diff --git a/add-loongarch64-support-for-jffi.patch b/add-loongarch64-support-for-jffi.patch index 1852400..cd5ecd4 100644 --- a/add-loongarch64-support-for-jffi.patch +++ b/add-loongarch64-support-for-jffi.patch @@ -1,71 +1,69 @@ -From 958aeee20de0c41aa90e54592550445d8f3af850 Mon Sep 17 00:00:00 2001 -From: Your Name -Date: Tue, 16 May 2023 12:29:01 +0000 -Subject: [PATCH] add loongarch64 support for jffi - --- jni/GNUmakefile | 2 +- - src/main/java/com/kenai/jffi/Platform.java | 4 ++++ + src/main/java/com/kenai/jffi/Platform.java | 7 ++++++- src/main/java/com/kenai/jffi/internal/StubLoader.java | 4 ++++ - 3 files changed, 9 insertions(+), 1 deletion(-) + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/jni/GNUmakefile b/jni/GNUmakefile -index 65b7655..b3a1f4d 100755 +index 40f5275..3be8d08 100755 --- a/jni/GNUmakefile +++ b/jni/GNUmakefile -@@ -245,7 +245,7 @@ ifeq ($(CPU), sparcv9) +@@ -238,7 +238,7 @@ ifeq ($(CPU), sparcv9) MODEL=64 endif --ifneq ($(findstring $(CPU), x86_64 amd64 ppc64 ppc64le powerpc64 s390x aarch64),) -+ifneq ($(findstring $(CPU), x86_64 amd64 ppc64 ppc64le powerpc64 s390x aarch64 loongarch64),) +-ifneq ($(findstring $(CPU), x86_64 amd64 ppc64 ppc64le powerpc64 s390x aarch64 mips64 mips64el),) ++ifneq ($(findstring $(CPU), x86_64 amd64 ppc64 ppc64le powerpc64 s390x aarch64 mips64 mips64el loongarch64),) MODEL = 64 endif diff --git a/src/main/java/com/kenai/jffi/Platform.java b/src/main/java/com/kenai/jffi/Platform.java -index 8447369..7a7de25 100644 +index 8850426..4900194 100644 --- a/src/main/java/com/kenai/jffi/Platform.java +++ b/src/main/java/com/kenai/jffi/Platform.java -@@ -100,6 +100,8 @@ public abstract class Platform { +@@ -102,7 +102,9 @@ public abstract class Platform { ARM(32), /** AARCH64 */ AARCH64(64), -+ /** LOONGARCH64*/ +- /** MIPS64EL */ ++ /** LOONGARCH64*/ + LOONGARCH64(64), ++ /** MIPS64EL */ + MIPS64EL(64), /** Unknown CPU */ UNKNOWN(64); - -@@ -230,6 +232,8 @@ public abstract class Platform { - +@@ -238,6 +240,9 @@ public abstract class Platform { } else if (Util.equalsIgnoreCase("aarch64", archString, LOCALE)) { return CPU.AARCH64; + + } else if (Util.equalsIgnoreCase("loongarch64", archString, LOCALE)) { + return CPU.LOONGARCH64; ++ + } else if (Util.equalsIgnoreCase("mips64", archString, LOCALE) || Util.equalsIgnoreCase("mips64el", archString, LOCALE)) { + return CPU.MIPS64EL; } - - diff --git a/src/main/java/com/kenai/jffi/internal/StubLoader.java b/src/main/java/com/kenai/jffi/internal/StubLoader.java -index 9b81e83..8d0eaaf 100644 +index 77da24d..d8af032 100644 --- a/src/main/java/com/kenai/jffi/internal/StubLoader.java +++ b/src/main/java/com/kenai/jffi/internal/StubLoader.java -@@ -122,6 +122,8 @@ public class StubLoader { +@@ -142,6 +142,8 @@ public class StubLoader { ARM, /** AArch64 */ AARCH64, -+ /** LoongArch64 */ -+ LOONGARCH64, ++ /** LoongArch64 */ ++ LOONGARCH64, + /** MIPS 64-bit little endian */ + MIPS64EL, /** Unknown CPU */ - UNKNOWN; - -@@ -184,6 +186,8 @@ public class StubLoader { +@@ -208,6 +210,8 @@ public class StubLoader { return CPU.ARM; } else if (Util.equalsIgnoreCase("aarch64", archString, LOCALE)) { return CPU.AARCH64; + } else if (Util.equalsIgnoreCase("loongarch64", archString, LOCALE)) { + return CPU.LOONGARCH64; - } + } else if (Util.equalsIgnoreCase("mips64", archString, LOCALE) || Util.equalsIgnoreCase("mips64el", archString, LOCALE)) { + return CPU.MIPS64EL; - // Try to find by lookup up in the CPU list -- 2.33.0 diff --git a/jffi-1.2.12-no_javah.patch b/jffi-1.2.12-no_javah.patch index bd896a9..4eb9aed 100644 --- a/jffi-1.2.12-no_javah.patch +++ b/jffi-1.2.12-no_javah.patch @@ -1,10 +1,13 @@ ---- jffi-jffi-1.2.12/build.xml 2016-04-29 23:23:51.000000000 +0200 -+++ jffi-jffi-1.2.12/build.xml 2019-04-03 20:08:43.577425168 +0200 -@@ -151,9 +151,10 @@ - - +--- + build.xml | 24 +++--------------------- + 1 file changed, 3 insertions(+), 21 deletions(-) + +diff --git a/build.xml b/build.xml +index 3fe9f5a..89ced77 100644 +--- a/build.xml ++++ b/build.xml +@@ -147,7 +147,7 @@ -+ - @@ -12,22 +15,24 @@ -@@ -282,26 +283,10 @@ +@@ -275,28 +275,10 @@ -- -+ +- ++ - - - -- -- -- -- -- +- +- +- +- +- +- +- -