aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2017-11-02 04:23:35 +0800
committerKoop Mast <kwm@rainbow-runner.nl>2018-02-04 05:51:38 +0800
commit797c70179ed37aeb3b72448f3b9d29cccc71e2f5 (patch)
tree5e7e647bdfc3936d509ab5ee625f461bbcf378a9 /java
parentb7f16191e6f8296231a46a0490199839eead6944 (diff)
downloadfreebsd-ports-gnome-797c70179ed37aeb3b72448f3b9d29cccc71e2f5.tar.gz
freebsd-ports-gnome-797c70179ed37aeb3b72448f3b9d29cccc71e2f5.tar.zst
freebsd-ports-gnome-797c70179ed37aeb3b72448f3b9d29cccc71e2f5.zip
Add preliminary support for aarch64 with Zero.
PR: 223231
Diffstat (limited to 'java')
-rw-r--r--java/openjdk8/Makefile2
-rw-r--r--java/openjdk8/files/patch-hotspot_src_os_bsd_vm_os__bsd.cpp41
2 files changed, 42 insertions, 1 deletions
diff --git a/java/openjdk8/Makefile b/java/openjdk8/Makefile
index 7a6b397a5d58..3edf86d41bfa 100644
--- a/java/openjdk8/Makefile
+++ b/java/openjdk8/Makefile
@@ -51,7 +51,7 @@ USE_AUTOTOOLS= autoconf
BUILD_DEPENDS+= ${UNZIP_CMD}:archivers/unzip
.endif
-ONLY_FOR_ARCHS= amd64 armv6 armv7 i386 powerpc powerpc64
+ONLY_FOR_ARCHS= aarch64 amd64 armv6 armv7 i386 powerpc powerpc64
WRKSRC= ${WRKDIR}/${PORTNAME}
DOS2UNIX_FILES= jdk/src/bsd/doc/man/appletviewer.1 \
diff --git a/java/openjdk8/files/patch-hotspot_src_os_bsd_vm_os__bsd.cpp b/java/openjdk8/files/patch-hotspot_src_os_bsd_vm_os__bsd.cpp
new file mode 100644
index 000000000000..54602f2b4dca
--- /dev/null
+++ b/java/openjdk8/files/patch-hotspot_src_os_bsd_vm_os__bsd.cpp
@@ -0,0 +1,41 @@
+--- hotspot/src/os/bsd/vm/os_bsd.cpp.orig 2014-03-04 02:52:13 UTC
++++ hotspot/src/os/bsd/vm/os_bsd.cpp
+@@ -1452,6 +1452,10 @@ void * os::dll_load(const char *filename, char *ebuf,
+ #define EM_X86_64 62 /* AMD x86-64 */
+ #endif
+
++ #ifndef EM_AARCH64
++ #define EM_AARCH64 183 /* ARM AARCH64 */
++ #endif
++
+ static const arch_t arch_array[]={
+ {EM_386, EM_386, ELFCLASS32, ELFDATA2LSB, (char*)"IA 32"},
+ {EM_486, EM_386, ELFCLASS32, ELFDATA2LSB, (char*)"IA 32"},
+@@ -1468,7 +1472,8 @@ void * os::dll_load(const char *filename, char *ebuf,
+ {EM_MIPS_RS3_LE, EM_MIPS_RS3_LE, ELFCLASS32, ELFDATA2LSB, (char*)"MIPSel"},
+ {EM_MIPS, EM_MIPS, ELFCLASS32, ELFDATA2MSB, (char*)"MIPS"},
+ {EM_PARISC, EM_PARISC, ELFCLASS32, ELFDATA2MSB, (char*)"PARISC"},
+- {EM_68K, EM_68K, ELFCLASS32, ELFDATA2MSB, (char*)"M68k"}
++ {EM_68K, EM_68K, ELFCLASS32, ELFDATA2MSB, (char*)"M68k"},
++ {EM_AARCH64, EM_AARCH64, ELFCLASS64, ELFDATA2LSB, (char*)"AARCH64"},
+ };
+
+ #if (defined IA32)
+@@ -1485,6 +1490,8 @@ void * os::dll_load(const char *filename, char *ebuf,
+ static Elf32_Half running_arch_code=EM_PPC64;
+ #elif (defined __powerpc__)
+ static Elf32_Half running_arch_code=EM_PPC;
++ #elif (defined AARCH64)
++ static Elf32_Half running_arch_code=EM_AARCH64;
+ #elif (defined ARM)
+ static Elf32_Half running_arch_code=EM_ARM;
+ #elif (defined S390)
+@@ -1501,7 +1508,7 @@ void * os::dll_load(const char *filename, char *ebuf,
+ static Elf32_Half running_arch_code=EM_68K;
+ #else
+ #error Method os::dll_load requires that one of following is defined:\
+- IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K
++ AARCH64, IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K
+ #endif
+
+ // Identify compatability class for VM's architecture and library's architecture