Skip to content

Commit f38560a

Browse files
John Doedezgeg
John Doe
authored andcommittedDec 5, 2017
oraclejdk8: support aarch64
[dezgeg amended the change to all-packages.nix]
1 parent 5e19122 commit f38560a

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed
 

‎pkgs/development/compilers/oraclejdk/jdk-linux-base.nix

+14-4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
, sha256_i686
55
, sha256_x86_64
66
, sha256_armv7l
7+
, sha256_aarch64
78
, jceName
89
, jceDownloadUrl
910
, sha256JCE
@@ -38,11 +39,12 @@
3839

3940
assert stdenv.system == "i686-linux"
4041
|| stdenv.system == "x86_64-linux"
41-
|| stdenv.system == "armv7l-linux";
42+
|| stdenv.system == "armv7l-linux"
43+
|| stdenv.system == "aarch64-linux";
4244
assert swingSupport -> xorg != null;
4345

4446
let
45-
abortArch = abort "jdk requires i686-linux, x86_64-linux, or armv7l-linux";
47+
abortArch = abort "jdk requires i686-linux, x86_64-linux, aarch64-linux or armv7l-linux";
4648

4749
/**
4850
* The JRE libraries are in directories that depend on the CPU.
@@ -54,6 +56,8 @@ let
5456
"amd64"
5557
else if stdenv.system == "armv7l-linux" then
5658
"arm"
59+
else if stdenv.system == "aarch64-linux" then
60+
"aarch64"
5761
else
5862
abortArch;
5963

@@ -99,6 +103,12 @@ let result = stdenv.mkDerivation rec {
99103
url = downloadUrl;
100104
sha256 = sha256_armv7l;
101105
}
106+
else if stdenv.system == "aarch64-linux" then
107+
requireFile {
108+
name = "jdk-${productVersion}u${patchVersion}-linux-arm64-vfp-hflt.tar.gz";
109+
url = downloadUrl;
110+
sha256 = sha256_aarch64;
111+
}
102112
else
103113
abortArch;
104114

@@ -116,7 +126,7 @@ let result = stdenv.mkDerivation rec {
116126
# Set PaX markings
117127
exes=$(file $sourceRoot/bin/* $sourceRoot/jre/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
118128
for file in $exes; do
119-
paxmark m "$file"
129+
paxmark m "$file" || true
120130
# On x86 for heap sizes over 700MB disable SEGMEXEC and PAGEEXEC as well.
121131
${stdenv.lib.optionalString stdenv.isi686 ''paxmark msp "$file"''}
122132
done
@@ -212,7 +222,7 @@ let result = stdenv.mkDerivation rec {
212222

213223
meta = with stdenv.lib; {
214224
license = licenses.unfree;
215-
platforms = [ "i686-linux" "x86_64-linux" "armv7l-linux" ]; # some inherit jre.meta.platforms
225+
platforms = [ "i686-linux" "x86_64-linux" "armv7l-linux" "aarch64-linux" ]; # some inherit jre.meta.platforms
216226
};
217227

218228
}; in result

‎pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import ./jdk-linux-base.nix {
55
sha256_i686 = "0w1snn9hxwvdnk77frhdzbsm6v30v99dy5zmpy8ij7yxd57z6ql0";
66
sha256_x86_64 = "0zq2dxbxmshz080yskhc8y2wbqi0y0kl9girxjbb4rwk837010n7";
77
sha256_armv7l = "10r3nyssx8piyjaspravwgj2bnq4537041pn0lz4fk5b3473kgfb";
8+
sha256_aarch64 = "1xva22cjjpwa95h7x3xzyymn1bgxp1q67j5j304kn6cqah4k31j1";
89
jceName = "jce_policy-8.zip";
910
jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html;
1011
sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";

‎pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import ./jdk-linux-base.nix {
55
sha256_i686 = "0gjc7kcfx40f43z1w1qsn1fqxdz8d46wml2g11qgm55ishhv2q7w";
66
sha256_x86_64 = "1gv1348hrgna9l3sssv3g9jzs37y1lkx05xq83chav9z1hs3p2r1";
77
sha256_armv7l = "10r3nyssx8piyjaspravwgj2bnq4537041pn0lz4fk5b3473kgfb";
8+
sha256_aarch64 = "13qpxa8nxsnikmm7h6ysnsdqg5vl8j7hzfa8kgh20z8a17fhj9kk";
89
jceName = "jce_policy-8.zip";
910
jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html;
1011
sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";

‎pkgs/top-level/all-packages.nix

+2-1
Original file line numberDiff line numberDiff line change
@@ -6058,7 +6058,8 @@ with pkgs;
60586058
supportsJDK =
60596059
system == "i686-linux" ||
60606060
system == "x86_64-linux" ||
6061-
system == "armv7l-linux";
6061+
system == "armv7l-linux" ||
6062+
system == "aarch64-linux";
60626063

60636064
jdkdistro = oraclejdk8distro;
60646065

0 commit comments

Comments
 (0)
Please sign in to comment.