[Git][java-team/jffi][master] 3 commits: d/patches: fix ftbfs with mipsel patch

Jérôme Charaoui (@lavamind) gitlab at salsa.debian.org
Sun Dec 4 17:51:43 GMT 2022



Jérôme Charaoui pushed to branch master at Debian Java Maintainers / jffi


Commits:
8f722926 by Jérôme Charaoui at 2022-12-04T12:34:25-05:00
d/patches: fix ftbfs with mipsel patch

- - - - -
a49a3fc3 by Jérôme Charaoui at 2022-12-04T12:35:27-05:00
d/patches: add support for riscv64 architecture

- - - - -
f0a48959 by Jérôme Charaoui at 2022-12-04T12:48:56-05:00
Update changelog for 1.3.9+ds-5 release

- - - - -


4 changed files:

- debian/changelog
- debian/patches/0012-Add-support-for-mips.patch → debian/patches/0012-Add-support-for-mipsel.patch
- + debian/patches/0013-Add-support-for-riscv64.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+jffi (1.3.9+ds-5) unstable; urgency=medium
+
+  * Team upload.
+  * d/patches: fix mipsel patch
+  * d/patches: add support for riscv64 architecture (Closes: #1025418)
+
+ -- Jérôme Charaoui <jerome at riseup.net>  Sun, 04 Dec 2022 12:48:47 -0500
+
 jffi (1.3.9+ds-4) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/0012-Add-support-for-mips.patch → debian/patches/0012-Add-support-for-mipsel.patch
=====================================
@@ -1,23 +1,74 @@
 From: =?utf-8?b?SsOpcsO0bWUgQ2hhcmFvdWk=?= <jerome at riseup.net>
 Date: Sat, 3 Dec 2022 22:43:24 -0500
-Subject: Add support for mips/mipsel architecture
+Subject: Add support for mipsel architecture
 
 ---
- src/main/java/com/kenai/jffi/Platform.java            | 5 +++++
- src/main/java/com/kenai/jffi/internal/StubLoader.java | 4 ++++
- src/test/java/com/kenai/jffi/NumberTest.java          | 5 +++--
- 3 files changed, 12 insertions(+), 2 deletions(-)
+ build.xml                                             | 11 +++++++++++
+ jni/jffi/Foreign.c                                    |  9 ++++++---
+ src/main/java/com/kenai/jffi/Platform.java            |  5 +++++
+ src/main/java/com/kenai/jffi/internal/StubLoader.java |  4 ++++
+ src/test/java/com/kenai/jffi/NumberTest.java          |  5 +++--
+ 5 files changed, 29 insertions(+), 5 deletions(-)
 
+diff --git a/build.xml b/build.xml
+index 6605b72..480d22f 100644
+--- a/build.xml
++++ b/build.xml
+@@ -78,6 +78,17 @@
+       </or>
+     </condition>
+ 
++    <condition property="platform.cpu" value="mips">
++      <or>
++        <os arch="mips"/>
++      </or>
++    </condition>
++    <condition property="platform.cpu" value="mipsel">
++      <or>
++        <os arch="mipsel"/>
++      </or>
++    </condition>
++
+     <condition property="platform.cpu" value="mips64">
+       <or>
+         <os arch="mips64"/>
+diff --git a/jni/jffi/Foreign.c b/jni/jffi/Foreign.c
+index dc8bc30..88bca0d 100644
+--- a/jni/jffi/Foreign.c
++++ b/jni/jffi/Foreign.c
+@@ -274,13 +274,16 @@ Java_com_kenai_jffi_Foreign_unregisterNatives(JNIEnv *env, jobject self, jclass
+ #elif defined(__ia64__) || defined(__ia64)
+ # define CPU "ia64"
+ 
+-#elif defined(__mips__) || defined(__mips) || defined(__mips64)
+-# if defined (__mips64)
+-#  define CPU "mips64el"
++#elif defined(__mips64)
++# if BYTE_ORDER == LITTLE_ENDIAN
++#  define CPU "mips64el"
++# endif
+-# else
+-#  define CPU "mips"
+-# endif
+ 
++#elif defined (__mips__) || defined (__mips)
++# if BYTE_ORDER == LITTLE_ENDIAN
++#  define CPU "mipsel"
++# endif
++
+ #elif defined(__s390__)
+ # define CPU "s390"
+ 
 diff --git a/src/main/java/com/kenai/jffi/Platform.java b/src/main/java/com/kenai/jffi/Platform.java
-index b2f6978..dbd924f 100644
+index b2f6978..331c24b 100644
 --- a/src/main/java/com/kenai/jffi/Platform.java
 +++ b/src/main/java/com/kenai/jffi/Platform.java
 @@ -104,6 +104,8 @@ public abstract class Platform {
          ARM(32),
          /** AARCH64 */
          AARCH64(64),
-+       /** MIPS */
-+        MIPS(32),
++       /** MIPSEL */
++        MIPSEL(32),
         /** MIPS64EL */
          MIPS64EL(64),
          /** Unknown CPU */
@@ -25,22 +76,22 @@ index b2f6978..dbd924f 100644
              } else if (Util.equalsIgnoreCase("aarch64", archString, LOCALE)) {
                  return CPU.AARCH64;
  
-+            } else if (Util.equalsIgnoreCase("mips", archString, LOCALE) || Util.equalsIgnoreCase("mipsel", archString, LOCALE)) {
-+                return CPU.MIPS;
++            } else if (Util.equalsIgnoreCase("mipsel", archString, LOCALE)) {
++                return CPU.MIPSEL;
 +
              } 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 15f9c44..05d325b 100644
+index 15f9c44..fdf674a 100644
 --- a/src/main/java/com/kenai/jffi/internal/StubLoader.java
 +++ b/src/main/java/com/kenai/jffi/internal/StubLoader.java
 @@ -159,6 +159,8 @@ public class StubLoader {
          ARM,
          /** AArch64 */
          AARCH64,
-+        /** MIPS 32-bit */
-+        MIPS,
++        /** MIPS 32-bit little endian */
++        MIPSEL,
          /** MIPS 64-bit little endian */
          MIPS64EL,
          /** Unknown CPU */
@@ -48,13 +99,13 @@ index 15f9c44..05d325b 100644
              return CPU.ARM;
          } else if (Util.equalsIgnoreCase("aarch64", archString, LOCALE)) {
              return CPU.AARCH64;
-+        } else if (Util.equalsIgnoreCase("mips", archString, LOCALE) || Util.equalsIgnoreCase("mipsel", archString, LOCALE)) {
-+            return CPU.MIPS;
++        } else if (Util.equalsIgnoreCase("mipsel", archString, LOCALE)) {
++            return CPU.MIPSEL;
          } else if (Util.equalsIgnoreCase("mips64", archString, LOCALE) || Util.equalsIgnoreCase("mips64el", archString, LOCALE)) {
              return CPU.MIPS64EL;
  
 diff --git a/src/test/java/com/kenai/jffi/NumberTest.java b/src/test/java/com/kenai/jffi/NumberTest.java
-index d713bc0..f5ccc57 100644
+index d713bc0..dfa78ec 100644
 --- a/src/test/java/com/kenai/jffi/NumberTest.java
 +++ b/src/test/java/com/kenai/jffi/NumberTest.java
 @@ -264,8 +264,9 @@ public class NumberTest {
@@ -63,9 +114,9 @@ index d713bc0..f5ccc57 100644
                  Platform.getPlatform().getCPU() == Platform.CPU.AARCH64);
 -        Assume.assumeFalse("32-bit ARM does not support 80-bit long double",
 -                Platform.getPlatform().getCPU() == Platform.CPU.ARM);
-+        Assume.assumeFalse("32-bit ARM and MIPS do not support 80-bit long double",
++        Assume.assumeFalse("32-bit ARM and MIPSel do not support 80-bit long double",
 +                Platform.getPlatform().getCPU() == Platform.CPU.ARM ||
-+                Platform.getPlatform().getCPU() == Platform.CPU.MIPS);
++                Platform.getPlatform().getCPU() == Platform.CPU.MIPSEL);
          LibNumberTest lib = UnitHelper.loadTestLibrary(LibNumberTest.class, type);
          BigDecimal param = new BigDecimal("1.234567890123456789");
          BigDecimal result = lib.ret_f128(param);


=====================================
debian/patches/0013-Add-support-for-riscv64.patch
=====================================
@@ -0,0 +1,53 @@
+From: "Manuel A. Fernandez Montecelo" <mafm at debian.org>
+Date: Sun, 4 Dec 2022 10:06:17 -0500
+Subject: Add support for riscv64
+
+---
+ 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 331c24b..04386eb 100644
+--- a/src/main/java/com/kenai/jffi/Platform.java
++++ b/src/main/java/com/kenai/jffi/Platform.java
+@@ -108,6 +108,8 @@ public abstract class Platform {
+         MIPSEL(32),
+        /** MIPS64EL */
+         MIPS64EL(64),
++       /** RISCV64 */
++        RISCV64(64),
+         /** Unknown CPU */
+         UNKNOWN(64);
+ 
+@@ -250,6 +252,8 @@ public abstract class Platform {
+ 
+             } else if (Util.equalsIgnoreCase("mips64", archString, LOCALE) || Util.equalsIgnoreCase("mips64el", archString, LOCALE)) {
+                 return CPU.MIPS64EL;
++            } else if (Util.equalsIgnoreCase("riscv64", archString, LOCALE)) {
++                return CPU.RISCV64;
+             }
+             
+ 
+diff --git a/src/main/java/com/kenai/jffi/internal/StubLoader.java b/src/main/java/com/kenai/jffi/internal/StubLoader.java
+index fdf674a..3b81514 100644
+--- a/src/main/java/com/kenai/jffi/internal/StubLoader.java
++++ b/src/main/java/com/kenai/jffi/internal/StubLoader.java
+@@ -163,6 +163,8 @@ public class StubLoader {
+         MIPSEL,
+         /** MIPS 64-bit little endian */
+         MIPS64EL,
++        /** RISC-V 64-bit little endian */
++        RISCV64,
+         /** Unknown CPU */
+         UNKNOWN;
+ 
+@@ -233,6 +235,8 @@ public class StubLoader {
+             return CPU.MIPSEL;
+         } else if (Util.equalsIgnoreCase("mips64", archString, LOCALE) || Util.equalsIgnoreCase("mips64el", archString, LOCALE)) {
+             return CPU.MIPS64EL;
++        } else if (Util.equalsIgnoreCase("riscv64", archString, LOCALE)) {
++            return CPU.RISCV64;
+ 
+         }
+ 


=====================================
debian/patches/series
=====================================
@@ -9,4 +9,5 @@ nonlinux-platforms.patch
 0009-optimize-build-targets.patch
 0010-output-test-results-to-console-instead-of-file.patch
 0011-Fix-tests-for-32-bit-ARM-armel-and-armhf.patch
-0012-Add-support-for-mips.patch
+0012-Add-support-for-mipsel.patch
+0013-Add-support-for-riscv64.patch



View it on GitLab: https://salsa.debian.org/java-team/jffi/-/compare/c78675d85a8d22feb8275b0fa15ad3e5993ac1e1...f0a489592b108e02b9c6dd2b98835f505d389f49

-- 
View it on GitLab: https://salsa.debian.org/java-team/jffi/-/compare/c78675d85a8d22feb8275b0fa15ad3e5993ac1e1...f0a489592b108e02b9c6dd2b98835f505d389f49
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20221204/237eea4a/attachment.htm>


More information about the pkg-java-commits mailing list