diff --git a/build.xml b/build.xml
index 92b0514844..00fe2b0e89 100644
--- a/build.xml
+++ b/build.xml
@@ -193,6 +193,7 @@
+
@@ -456,6 +457,8 @@ com/sun/jna/linux-ia64/libjnidispatch.so;
processor=ia64;osname=linux,
com/sun/jna/linux-sparcv9/libjnidispatch.so;
processor=sparcv9;osname=linux,
+com/sun/jna/linux-mips64el/libjnidispatch.so;
+processor=mips64el;osname=linux,
com/sun/jna/freebsd-x86/libjnidispatch.so;
processor=x86;osname=freebsd,
@@ -515,6 +518,9 @@ osname=macosx;processor=x86;processor=x86-64;processor=ppc
+
@@ -704,6 +710,7 @@ osname=macosx;processor=x86;processor=x86-64;processor=ppc
+
diff --git a/lib/native/linux-mips64el.jar b/lib/native/linux-mips64el.jar
new file mode 100644
index 0000000000..9202631078
Binary files /dev/null and b/lib/native/linux-mips64el.jar differ
diff --git a/src/com/sun/jna/Native.java b/src/com/sun/jna/Native.java
index 7b7a7d4e29..91b195f53b 100644
--- a/src/com/sun/jna/Native.java
+++ b/src/com/sun/jna/Native.java
@@ -218,7 +218,7 @@ static boolean isCompatibleVersion(String expectedVersion, String nativeVersion)
setProtected(true);
}
MAX_ALIGNMENT = Platform.isSPARC() || Platform.isWindows()
- || (Platform.isLinux() && (Platform.isARM() || Platform.isPPC()))
+ || (Platform.isLinux() && (Platform.isARM() || Platform.isPPC() || Platform.isMIPS()))
|| Platform.isAIX()
|| Platform.isAndroid()
? 8 : LONG_SIZE;
diff --git a/src/com/sun/jna/NativeLibrary.java b/src/com/sun/jna/NativeLibrary.java
index a1465d578c..1c06bd4e7b 100644
--- a/src/com/sun/jna/NativeLibrary.java
+++ b/src/com/sun/jna/NativeLibrary.java
@@ -947,6 +947,9 @@ else if (Platform.isARM()) {
cpu = "arm";
libc = "-gnueabi";
}
+ else if (Platform.ARCH.equals("mips64el")) {
+ libc = "-gnuabi64";
+ }
return cpu + kernel + libc;
}
diff --git a/src/com/sun/jna/Platform.java b/src/com/sun/jna/Platform.java
index 8cc702247a..bf534f00fb 100644
--- a/src/com/sun/jna/Platform.java
+++ b/src/com/sun/jna/Platform.java
@@ -197,6 +197,7 @@ public static final boolean is64Bit() {
|| "ia64".equals(ARCH)
|| "ppc64".equals(ARCH) || "ppc64le".equals(ARCH)
|| "sparcv9".equals(ARCH)
+ || "mips64".equals(ARCH) || "mips64el".equals(ARCH)
|| "amd64".equals(ARCH)) {
return true;
}
@@ -225,6 +226,16 @@ public static final boolean isSPARC() {
return ARCH.startsWith("sparc");
}
+ public static final boolean isMIPS() {
+ if (ARCH.equals("mips")
+ || ARCH.equals("mips64")
+ || ARCH.equals("mipsel")
+ || ARCH.equals("mips64el")) {
+ return true;
+ }
+ return false;
+ }
+
static String getCanonicalArchitecture(String arch, boolean softfloat) {
arch = arch.toLowerCase().trim();
if ("powerpc".equals(arch)) {