svn commit: r556937 - in head/java/openjdk8: . files
Piotr Kubaj
pkubaj at FreeBSD.org
Thu Dec 3 23:39:48 UTC 2020
Author: pkubaj
Date: Thu Dec 3 23:39:47 2020
New Revision: 556937
URL: https://svnweb.freebsd.org/changeset/ports/556937
Log:
java/openjdk8: add support for powerpc64le
powerpc64le needs --disable-jfr and USE_PRECOMPILED_HEADER=0 - same as powerpc64 elfv2.
Clang refuses to build little-endian binaries for power7, this needs to be bumped to power8 (this is a bug in openjdk, POWER7 is not LE-compatible).
-minsert-sched-nops=regroup_exact -mno-multiple -mno-string are not supported by clang and need to be removed.
FreeBSD uses sys/endian.h instead of byteswap.h and bswap{16,32,64} instead of bswap_{16,32,64}.
PR: 251247
Approved by: java (maintainer timeout)
Added:
head/java/openjdk8/files/patch-hotspot_make_bsd_makefiles_ppc64.make (contents, props changed)
head/java/openjdk8/files/patch-hotspot_src_os__cpu_bsd__ppc_vm_bytes__bsd__ppc.inline.hpp (contents, props changed)
Modified:
head/java/openjdk8/Makefile
Modified: head/java/openjdk8/Makefile
==============================================================================
--- head/java/openjdk8/Makefile Thu Dec 3 22:24:00 2020 (r556936)
+++ head/java/openjdk8/Makefile Thu Dec 3 23:39:47 2020 (r556937)
@@ -11,7 +11,7 @@ COMMENT?= Java Development Kit ${JDK_MAJOR_VERSION}
LICENSE= GPLv2
-ONLY_FOR_ARCHS= aarch64 amd64 armv6 armv7 i386 powerpc powerpc64
+ONLY_FOR_ARCHS= aarch64 amd64 armv6 armv7 i386 powerpc powerpc64 powerpc64le
BUILD_DEPENDS= zip:archivers/zip \
autoconf>0:devel/autoconf \
@@ -193,7 +193,7 @@ CONFIGURE_ARGS+= --disable-jfr
MAKE_ENV+= LFLAGS="-Wl,-z,notext"
.endif
-.if ${ARCH} == amd64 || ${ARCH} == i386 || ${ARCH} == powerpc64
+.if ${ARCH} == amd64 || ${ARCH} == i386 || ${ARCH:Mpowerpc64*}
JDK_BUILD_JVM= server
.else
JDK_BUILD_JVM= zero
@@ -222,6 +222,11 @@ MAKE_ARGS+= USE_PRECOMPILED_HEADER=0
.if ${ARCH} == powerpc64
CONFIGURE_ARGS+= --disable-jfr
+.endif
+
+.if ${ARCH} == powerpc64le
+CONFIGURE_ARGS+= --disable-jfr
+MAKE_ARGS+= USE_PRECOMPILED_HEADER=0
.endif
.if empty(ICONV_LIB)
Added: head/java/openjdk8/files/patch-hotspot_make_bsd_makefiles_ppc64.make
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/java/openjdk8/files/patch-hotspot_make_bsd_makefiles_ppc64.make Thu Dec 3 23:39:47 2020 (r556937)
@@ -0,0 +1,9 @@
+--- hotspot/make/bsd/makefiles/ppc64.make.orig 2020-11-18 23:45:09 UTC
++++ hotspot/make/bsd/makefiles/ppc64.make
+@@ -47,5 +47,5 @@ else
+ CFLAGS += -DVM_LITTLE_ENDIAN -DABI_ELFv2
+
+ # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
+- CFLAGS += -mcpu=power7 -mtune=power8 -minsert-sched-nops=regroup_exact -mno-multiple -mno-string
++ CFLAGS += -mcpu=power8 -mtune=power8
+ endif
Added: head/java/openjdk8/files/patch-hotspot_src_os__cpu_bsd__ppc_vm_bytes__bsd__ppc.inline.hpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/java/openjdk8/files/patch-hotspot_src_os__cpu_bsd__ppc_vm_bytes__bsd__ppc.inline.hpp Thu Dec 3 23:39:47 2020 (r556937)
@@ -0,0 +1,20 @@
+--- hotspot/src/os_cpu/bsd_ppc/vm/bytes_bsd_ppc.inline.hpp.orig 2020-11-18 23:50:31 UTC
++++ hotspot/src/os_cpu/bsd_ppc/vm/bytes_bsd_ppc.inline.hpp
+@@ -27,13 +27,13 @@
+ #define OS_CPU_BSD_PPC_VM_BYTES_BSD_PPC_INLINE_HPP
+
+ #if defined(VM_LITTLE_ENDIAN)
+-#include <byteswap.h>
++#include <sys/endian.h>
+
+ // Efficient swapping of data bytes from Java byte
+ // ordering to native byte ordering and vice versa.
+-inline u2 Bytes::swap_u2(u2 x) { return bswap_16(x); }
+-inline u4 Bytes::swap_u4(u4 x) { return bswap_32(x); }
+-inline u8 Bytes::swap_u8(u8 x) { return bswap_64(x); }
++inline u2 Bytes::swap_u2(u2 x) { return bswap16(x); }
++inline u4 Bytes::swap_u4(u4 x) { return bswap32(x); }
++inline u8 Bytes::swap_u8(u8 x) { return bswap64(x); }
+ #endif // VM_LITTLE_ENDIAN
+
+ #endif // OS_CPU_BSD_PPC_VM_BYTES_BSD_PPC_INLINE_HPP
More information about the svn-ports-all
mailing list