-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for linux mips64el #827
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -193,6 +193,7 @@ | |
<os arch="ppc64le"/> | ||
<os arch="ia64"/> | ||
<os arch="aarch64"/> | ||
<os arch="mips64el"/> | ||
</or> | ||
</and> | ||
</condition> | ||
|
@@ -252,6 +253,15 @@ | |
<matches pattern="true" string="${build.isArmSoftFloat}"/> | ||
</and> | ||
</condition> | ||
<condition property="jre.arch" value="mips64el"> | ||
<or> | ||
<matches pattern="mips64el" string="${os.arch}"/> | ||
<and> | ||
<matches pattern="mips64" string="${os.arch}"/> | ||
<matches pattern="little" string="${sun.cpu.endian}"/> | ||
</and> | ||
</or> | ||
</condition> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be removed, in the following line the property |
||
|
||
<property name="jre.arch" value="${os.arch}"/> | ||
|
||
|
@@ -456,6 +466,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 +527,9 @@ osname=macosx;processor=x86;processor=x86-64;processor=ppc | |
<zipfileset src="${lib.native}/linux-sparcv9.jar" | ||
includes="*jnidispatch*" | ||
prefix="com/sun/jna/linux-sparcv9"/> | ||
<zipfileset src="${lib.native}/linux-mips64el.jar" | ||
includes="*jnidispatch*" | ||
prefix="com/sun/jna/linux-mips64el"/> | ||
<zipfileset src="${lib.native}/sunos-x86.jar" | ||
includes="*jnidispatch*" | ||
prefix="com/sun/jna/sunos-x86"/> | ||
|
@@ -704,6 +719,7 @@ osname=macosx;processor=x86;processor=x86-64;processor=ppc | |
<copy file="${lib.native}/out-of-date.jar" tofile="${lib.native}/linux-ppc64.jar" overwrite="true"/> | ||
<copy file="${lib.native}/out-of-date.jar" tofile="${lib.native}/linux-ppc64le.jar" overwrite="true"/> | ||
<copy file="${lib.native}/out-of-date.jar" tofile="${lib.native}/linux-sparcv9.jar" overwrite="true"/> | ||
<copy file="${lib.native}/out-of-date.jar" tofile="${lib.native}/linux-mips64el.jar" overwrite="true"/> | ||
<copy file="${lib.native}/out-of-date.jar" tofile="${lib.native}/freebsd-x86.jar" overwrite="true"/> | ||
<copy file="${lib.native}/out-of-date.jar" tofile="${lib.native}/freebsd-x86-64.jar" overwrite="true"/> | ||
<copy file="${lib.native}/out-of-date.jar" tofile="${lib.native}/openbsd-x86.jar" overwrite="true"/> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -947,6 +947,9 @@ else if (Platform.isARM()) { | |
cpu = "arm"; | ||
libc = "-gnueabi"; | ||
} | ||
else if (Platform.isMIPS()) { | ||
cpu = (Platform.is64Bit() ? "mips64el" : "mipsel"); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I checked debian mips64el and there is also a different libc suffix: else if (Platform.ARCH.equals("mips64el")) {
libc = "-gnueabi64";
} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I checked the path of libc.so for example, So on debian, I think you suggestion is correct. However, I think it should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with your assessment. I inserted a typo. |
||
|
||
return cpu + kernel + libc; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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)) { | ||
|
@@ -248,6 +259,9 @@ else if ("x86_64".equals(arch) || "amd64".equals(arch)) { | |
if("arm".equals(arch) && softfloat) { | ||
arch = "armel"; | ||
} | ||
if ("mips64el".equals(arch)) { | ||
arch = "mips64el"; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a NOOP, the arch is unmodified, so this change could be removed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, this change should be removed. |
||
|
||
|
||
return arch; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there evidence, that a JVM reports a mips64 running in little endian mode as only
mips64
. If so there other uses ofos.arch
would also need more attention. I only had a look at openjdk on debian and there mips64el was correctly reported asos.arch
. If there is none, I would suggest to remove the second match (lines 259-262).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested Zero and OpenJDK 8 which is ported by Loongson, they both report mips64el. Therefore, I agree that the second match (lines 259-262) should be removed.