Date: Tue, 16 Mar 2021 17:13:49 +0000 (UTC) From: Piotr Kubaj <pkubaj@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r568588 - in head/java/openjdk14: . files Message-ID: <202103161713.12GHDnHC017767@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pkubaj Date: Tue Mar 16 17:13:49 2021 New Revision: 568588 URL: https://svnweb.freebsd.org/changeset/ports/568588 Log: java/openjdk14: fix build on powerpc64le Approved by: tier 2 blanket Added: head/java/openjdk14/files/patch-src_hotspot_os__cpu_bsd__ppc_bytes__bsd__ppc.inline.hpp - copied unchanged from r568464, head/java/openjdk12/files/patch-src_hotspot_os__cpu_bsd__ppc_bytes__bsd__ppc.inline.hpp head/java/openjdk14/files/patch-src_jdk.hotspot.agent_bsd_native_libsaproc_BsdDebuggerLocal.cpp - copied, changed from r568464, head/java/openjdk12/files/patch-src_jdk.hotspot.agent_bsd_native_libsaproc_BsdDebuggerLocal.c Modified: head/java/openjdk14/Makefile head/java/openjdk14/files/patch-make_autoconf_flags-cflags.m4 Modified: head/java/openjdk14/Makefile ============================================================================== --- head/java/openjdk14/Makefile Tue Mar 16 17:13:07 2021 (r568587) +++ head/java/openjdk14/Makefile Tue Mar 16 17:13:49 2021 (r568588) @@ -12,7 +12,7 @@ COMMENT= Java Development Kit ${JDK_MAJOR_VERSION} LICENSE= GPLv2 -ONLY_FOR_ARCHS= amd64 i386 powerpc64 +ONLY_FOR_ARCHS= amd64 i386 powerpc64 powerpc64le BUILD_DEPENDS= zip:archivers/zip \ autoconf>0:devel/autoconf \ @@ -138,11 +138,13 @@ CONFIGURE_ARGS+= --with-extra-ldflags="-Wl,-rpath=${LO MAKE_ENV+= USE_CLANG=true .endif +.if ${ARCH} == aarch64 || ${ARCH:Mpowerpc64*} +CONFIGURE_ARGS+= --disable-warnings-as-errors +.endif .if ${ARCH} == aarch64 || ${ARCH} == powerpc64 -CONFIGURE_ARGS+= --disable-warnings-as-errors \ - --disable-dtrace +CONFIGURE_ARGS+= --disable-dtrace .endif -.if defined(PPC_ABI) && ${PPC_ABI} == ELFv2 +.if defined(PPC_ABI) && ${PPC_ABI} == ELFv2 || ${ARCH} == powerpc64le CONFIGURE_ARGS+= --disable-precompiled-headers .endif .if ${ARCH} != amd64 Modified: head/java/openjdk14/files/patch-make_autoconf_flags-cflags.m4 ============================================================================== --- head/java/openjdk14/files/patch-make_autoconf_flags-cflags.m4 Tue Mar 16 17:13:07 2021 (r568587) +++ head/java/openjdk14/files/patch-make_autoconf_flags-cflags.m4 Tue Mar 16 17:13:49 2021 (r568588) @@ -1,12 +1,16 @@ --- make/autoconf/flags-cflags.m4.orig 2020-01-08 09:12:31 UTC +++ make/autoconf/flags-cflags.m4 -@@ -770,6 +770,10 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP], +@@ -770,6 +770,14 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP], # for all archs except arm and ppc, prevent gcc to omit frame pointer $1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer" fi + elif test "x$OPENJDK_TARGET_OS_ENV" = xbsd.freebsd; then + if test "x$FLAGS_CPU" = xppc64; then + $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=powerpc64 -mtune=power5" ++ elif test "x$FLAGS_CPU" = xppc64le; then ++ # Little endian machine uses ELFv2 ABI. ++ # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI. ++ $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power8" + fi fi Copied: head/java/openjdk14/files/patch-src_hotspot_os__cpu_bsd__ppc_bytes__bsd__ppc.inline.hpp (from r568464, head/java/openjdk12/files/patch-src_hotspot_os__cpu_bsd__ppc_bytes__bsd__ppc.inline.hpp) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/java/openjdk14/files/patch-src_hotspot_os__cpu_bsd__ppc_bytes__bsd__ppc.inline.hpp Tue Mar 16 17:13:49 2021 (r568588, copy of r568464, head/java/openjdk12/files/patch-src_hotspot_os__cpu_bsd__ppc_bytes__bsd__ppc.inline.hpp) @@ -0,0 +1,20 @@ +--- src/hotspot/os_cpu/bsd_ppc/bytes_bsd_ppc.inline.hpp.orig 2021-03-15 12:55:40 UTC ++++ src/hotspot/os_cpu/bsd_ppc/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 Copied and modified: head/java/openjdk14/files/patch-src_jdk.hotspot.agent_bsd_native_libsaproc_BsdDebuggerLocal.cpp (from r568464, head/java/openjdk12/files/patch-src_jdk.hotspot.agent_bsd_native_libsaproc_BsdDebuggerLocal.c) ============================================================================== --- head/java/openjdk12/files/patch-src_jdk.hotspot.agent_bsd_native_libsaproc_BsdDebuggerLocal.c Mon Mar 15 14:58:01 2021 (r568464, copy source) +++ head/java/openjdk14/files/patch-src_jdk.hotspot.agent_bsd_native_libsaproc_BsdDebuggerLocal.cpp Tue Mar 16 17:13:49 2021 (r568588) @@ -1,5 +1,5 @@ ---- src/jdk.hotspot.agent/bsd/native/libsaproc/BsdDebuggerLocal.c.orig 2021-03-15 13:24:28 UTC -+++ src/jdk.hotspot.agent/bsd/native/libsaproc/BsdDebuggerLocal.c +--- src/jdk.hotspot.agent/bsd/native/libsaproc/BsdDebuggerLocal.cpp.orig 2021-03-15 13:24:28 UTC ++++ src/jdk.hotspot.agent/bsd/native/libsaproc/BsdDebuggerLocal.cpp @@ -42,7 +42,7 @@ #include "sun_jvm_hotspot_debugger_sparc_SPARCThreadContext.h" #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103161713.12GHDnHC017767>