!27 add sw_64 support
From: @maqi77 Reviewed-by: @wk333 Signed-off-by: @wk333
This commit is contained in:
commit
cac8015add
56
0001-add-sw_64-support.patch
Normal file
56
0001-add-sw_64-support.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From 5bf41b194b61563e8cd21b2099795ffd327e9aea Mon Sep 17 00:00:00 2001
|
||||
From: mahailiang <mahailiang@uniontech.com>
|
||||
Date: Mon, 25 Nov 2024 22:04:21 +0800
|
||||
Subject: [PATCH] add sw_64 support
|
||||
|
||||
---
|
||||
src/main/java/com/kenai/jffi/Platform.java | 4 ++++
|
||||
src/main/java/com/kenai/jffi/internal/StubLoader.java | 4 ++++
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/com/kenai/jffi/Platform.java b/src/main/java/com/kenai/jffi/Platform.java
|
||||
index 8850426..87f49bd 100644
|
||||
--- a/src/main/java/com/kenai/jffi/Platform.java
|
||||
+++ b/src/main/java/com/kenai/jffi/Platform.java
|
||||
@@ -102,6 +102,7 @@ public abstract class Platform {
|
||||
ARM(32),
|
||||
/** AARCH64 */
|
||||
AARCH64(64),
|
||||
+ SW64(64),
|
||||
/** MIPS64EL */
|
||||
MIPS64EL(64),
|
||||
/** Unknown CPU */
|
||||
@@ -238,6 +239,9 @@ public abstract class Platform {
|
||||
} else if (Util.equalsIgnoreCase("aarch64", archString, LOCALE)) {
|
||||
return CPU.AARCH64;
|
||||
|
||||
+ } else if (Util.equalsIgnoreCase("sw64", archString, LOCALE) || Util.equalsIgnoreCase("sw_64", archString, LOCALE)) {
|
||||
+ return CPU.SW64;
|
||||
+
|
||||
} 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 77da24d..c0ed42b 100644
|
||||
--- a/src/main/java/com/kenai/jffi/internal/StubLoader.java
|
||||
+++ b/src/main/java/com/kenai/jffi/internal/StubLoader.java
|
||||
@@ -142,6 +142,8 @@ public class StubLoader {
|
||||
ARM,
|
||||
/** AArch64 */
|
||||
AARCH64,
|
||||
+ /** sw_64 */
|
||||
+ SW64,
|
||||
/** MIPS 64-bit little endian */
|
||||
MIPS64EL,
|
||||
/** Unknown CPU */
|
||||
@@ -208,6 +210,8 @@ public class StubLoader {
|
||||
return CPU.ARM;
|
||||
} else if (Util.equalsIgnoreCase("aarch64", archString, LOCALE)) {
|
||||
return CPU.AARCH64;
|
||||
+ } else if (Util.equalsIgnoreCase("sw64", archString, LOCALE) || Util.equalsIgnoreCase("sw_64", archString, LOCALE)) {
|
||||
+ return CPU.SW64;
|
||||
} else if (Util.equalsIgnoreCase("mips64", archString, LOCALE) || Util.equalsIgnoreCase("mips64el", archString, LOCALE)) {
|
||||
return CPU.MIPS64EL;
|
||||
|
||||
--
|
||||
2.20.1
|
||||
@ -2,7 +2,7 @@
|
||||
%global sover 1.2
|
||||
Name: jffi
|
||||
Version: 1.3.0
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: Java Foreign Function Interface
|
||||
License: LGPL-3.0-or-later OR Apache-2.0
|
||||
URL: http://github.com/jnr/jffi
|
||||
@ -15,6 +15,7 @@ Patch3: jffi-1.2.12-no_javah.patch
|
||||
Patch4: jffi-fix-system-ffi.patch
|
||||
Patch5: add-loongarch64-support-for-jffi.patch
|
||||
Patch6: Add-support-for-riscv64.patch
|
||||
Patch7: 0001-add-sw_64-support.patch
|
||||
BuildRequires: ant ant-junit fdupes gcc libffi-devel make maven-local unzip mvn(junit:junit)
|
||||
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
|
||||
@ -50,6 +51,9 @@ This package contains the API documentation for %{name}.
|
||||
%ifarch riscv64
|
||||
%patch6 -p1
|
||||
%endif
|
||||
%ifarch sw_64
|
||||
%patch7 -p1
|
||||
%endif
|
||||
sed -i.cpu -e '/m\$(MODEL)/d' jni/GNUmakefile libtest/GNUmakefile
|
||||
rm -rf archive/* jni/libffi/ jni/win32/ lib/CopyLibs/ lib/junit*
|
||||
find ./ -name '*.jar' -exec rm -f '{}' \;
|
||||
@ -93,6 +97,9 @@ ant -Duse.system.libffi=1 test
|
||||
%doc COPYING.GPL COPYING.LESSER LICENSE
|
||||
|
||||
%changelog
|
||||
* Tue Mar 04 2025 maqi <maqi@uniontech.com> - 1.3.0-3
|
||||
- add sw_64 support
|
||||
|
||||
* Sun Oct 08 2023 laokz <zhangkai@iscas.ac.cn> - 1.3.0-2
|
||||
- Backport v1.3.11 patch to support riscv64
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user