update to version 2.2.0
This commit is contained in:
parent
bebd1bc5de
commit
8123c1197a
@ -4,18 +4,18 @@ Date: Wed, 17 May 2023 03:09:55 +0000
|
||||
Subject: [PATCH] Support for LoongArch64
|
||||
|
||||
---
|
||||
src/main/java/jnr/ffi/Platform.java | 6 ++
|
||||
src/main/java/jnr/ffi/Platform.java | 6 ++++++
|
||||
.../loongarch64/linux/TypeAliases.java | 72 +++++++++++++++++++
|
||||
2 files changed, 78 insertions(+)
|
||||
create mode 100644 src/main/java/jnr/ffi/provider/jffi/platform/loongarch64/linux/TypeAliases.java
|
||||
|
||||
diff --git a/src/main/java/jnr/ffi/Platform.java b/src/main/java/jnr/ffi/Platform.java
|
||||
index dbe84dc..0f06ef4 100644
|
||||
index 11caeab..f0712fc 100644
|
||||
--- a/src/main/java/jnr/ffi/Platform.java
|
||||
+++ b/src/main/java/jnr/ffi/Platform.java
|
||||
@@ -116,6 +116,9 @@ public abstract class Platform {
|
||||
/** 64 bit ARM */
|
||||
AARCH64,
|
||||
@@ -121,6 +121,9 @@ public abstract class Platform {
|
||||
/** 64 bit MIPS */
|
||||
MIPS64EL,
|
||||
|
||||
+ /** 64 bit LOONGARCH */
|
||||
+ LOONGARCH64,
|
||||
@ -23,24 +23,25 @@ index dbe84dc..0f06ef4 100644
|
||||
/**
|
||||
* Unknown CPU architecture. A best effort will be made to infer architecture
|
||||
* specific values such as address and long size.
|
||||
@@ -216,6 +219,8 @@ public abstract class Platform {
|
||||
return CPU.S390X;
|
||||
} else if (equalsIgnoreCase("aarch64", archString)) {
|
||||
return CPU.AARCH64;
|
||||
@@ -227,6 +230,8 @@ public abstract class Platform {
|
||||
return CPU.ARM;
|
||||
} else if (equalsIgnoreCase("mips64", archString) || equalsIgnoreCase("mips64el", archString)) {
|
||||
return CPU.MIPS64EL;
|
||||
+ } else if (equalsIgnoreCase("loongarch64", archString)) {
|
||||
+ return CPU.LOONGARCH64;
|
||||
+ return CPU.LOONGARCH64;
|
||||
}
|
||||
|
||||
// Try to find by lookup up in the CPU list
|
||||
@@ -273,6 +278,7 @@ public abstract class Platform {
|
||||
case SPARCV9:
|
||||
@@ -285,6 +290,7 @@ public abstract class Platform {
|
||||
case S390X:
|
||||
case AARCH64:
|
||||
case MIPS64EL:
|
||||
+ case LOONGARCH64:
|
||||
dataModel = 64;
|
||||
break;
|
||||
default:
|
||||
diff --git a/src/main/java/jnr/ffi/provider/jffi/platform/loongarch64/linux/TypeAliases.java b/src/main/java/jnr/ffi/provider/jffi/platform/loongarch64/linux/TypeAliases.java
|
||||
diff --git
|
||||
a/src/main/java/jnr/ffi/provider/jffi/platform/loongarch64/linux/TypeAliases.java b/src/main/java/jnr/ffi/provider/jffi/platform/loongarch64/linux/TypeAliases.java
|
||||
new file mode 100644
|
||||
index 0000000..de700f3
|
||||
--- /dev/null
|
||||
|
||||
Binary file not shown.
BIN
jnr-ffi-2.2.0.tar.gz
Normal file
BIN
jnr-ffi-2.2.0.tar.gz
Normal file
Binary file not shown.
20
jnr-ffi.spec
20
jnr-ffi.spec
@ -1,10 +1,10 @@
|
||||
Name: jnr-ffi
|
||||
Version: 2.1.8
|
||||
Release: 3
|
||||
Version: 2.2.0
|
||||
Release: 1
|
||||
Summary: Java Abstracted Foreign Function Layer
|
||||
License: Apache-2.0
|
||||
URL: http://github.com/jnr/%{name}/
|
||||
Source0: https://github.com/jnr/%{name}/archive/%{name}-%{version}.tar.gz
|
||||
Source0: https://github.com/jnr/jnr-ffi/archive/refs/tags/%{name}-%{version}.tar.gz
|
||||
Patch0: 0001-Support-for-LoongArch64.patch
|
||||
BuildRequires: fdupes gcc make maven-local mvn(com.github.jnr:jffi)
|
||||
BuildRequires: mvn(com.github.jnr:jffi::native:) mvn(com.github.jnr:jnr-x86asm)
|
||||
@ -14,6 +14,10 @@ BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin) mvn(org.o
|
||||
BuildRequires: mvn(org.ow2.asm:asm-analysis) mvn(org.ow2.asm:asm-commons)
|
||||
BuildRequires: mvn(org.ow2.asm:asm-tree) mvn(org.ow2.asm:asm-util)
|
||||
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
|
||||
BuildRequires: mvn(org.eclipse.aether:aether-connector-basic)
|
||||
BuildRequires: mvn(org.eclipse.aether:aether-transport-wagon)
|
||||
BuildRequires: mvn(org.apache.maven.wagon:wagon-http)
|
||||
BuildRequires: mvn(org.apache.maven.wagon:wagon-provider-api)
|
||||
BuildArch: noarch
|
||||
%description
|
||||
An abstracted interface to invoking native functions from java
|
||||
@ -28,10 +32,13 @@ This package contains the API documentation for %{name}.
|
||||
%patch0 -p1
|
||||
find -name '*.jar' -o -name '*.class' -exec rm -f '{}' \;
|
||||
%pom_remove_plugin ":maven-javadoc-plugin"
|
||||
sed -i 's|-Werror||' libtest/GNUmakefile
|
||||
sed -i 's|-Werror||' libtest/GNUmakefile
|
||||
|
||||
%build
|
||||
%{mvn_build} -f -- -Dasm.version=7.0
|
||||
%{mvn_build} -b -f -- -Dasm.version=7.0
|
||||
sed -i '/jnr-a64asm/,+2d;:go;1,2!{P;N;D};N;bgo' .xmvn-reactor
|
||||
sed -i '160,161d' .xmvn-reactor
|
||||
sed -i '104,105d' .xmvn-reactor
|
||||
|
||||
%install
|
||||
%mvn_install
|
||||
@ -44,6 +51,9 @@ sed -i 's|-Werror||' libtest/GNUmakefile
|
||||
%license LICENSE
|
||||
|
||||
%changelog
|
||||
* Wed Sep 27 2023 Ge Wang <wang__ge@126.com> - 2.2.0-1
|
||||
- Update to version 2.2.0
|
||||
|
||||
* Thu May 18 2023 huajingyun <huajingyun@loongson.cn> - 2.1.8-3
|
||||
- Add loongarch64 support
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user