View | Details | Raw Unified | Return to bug 251263
Collapse All | Expand All

(-)Makefile (-3 / +3 lines)
Lines 12-18 Link Here
12
12
13
LICENSE=	GPLv2
13
LICENSE=	GPLv2
14
14
15
ONLY_FOR_ARCHS=	amd64 i386 powerpc64
15
ONLY_FOR_ARCHS=	amd64 i386 powerpc64 powerpc64le
16
16
17
BUILD_DEPENDS=	zip:archivers/zip \
17
BUILD_DEPENDS=	zip:archivers/zip \
18
		autoconf>0:devel/autoconf \
18
		autoconf>0:devel/autoconf \
Lines 147-157 Link Here
147
MAKE_ENV+=	USE_CLANG=true
147
MAKE_ENV+=	USE_CLANG=true
148
.endif
148
.endif
149
149
150
.if ${ARCH} == aarch64 || ${ARCH} == powerpc64
150
.if ${ARCH} == aarch64 || ${ARCH:Mpowerpc64*}
151
CONFIGURE_ARGS+=	--disable-warnings-as-errors \
151
CONFIGURE_ARGS+=	--disable-warnings-as-errors \
152
			--disable-dtrace
152
			--disable-dtrace
153
.endif
153
.endif
154
.if defined(PPC_ABI) && ${PPC_ABI} == ELFv2
154
.if (defined(PPC_ABI) && ${PPC_ABI} == ELFv2) || ${ARCH} == powerpc64le
155
CONFIGURE_ARGS+=	--disable-precompiled-headers
155
CONFIGURE_ARGS+=	--disable-precompiled-headers
156
.endif
156
.endif
157
.if ${ARCH} != amd64
157
.if ${ARCH} != amd64
(-)files/patch-make_autoconf_flags-cflags.m4 (-1 / +5 lines)
Lines 1-6 Link Here
1
--- make/autoconf/flags-cflags.m4.orig	2020-01-08 09:12:31 UTC
1
--- make/autoconf/flags-cflags.m4.orig	2020-01-08 09:12:31 UTC
2
+++ make/autoconf/flags-cflags.m4
2
+++ make/autoconf/flags-cflags.m4
3
@@ -770,6 +770,10 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
3
@@ -770,6 +770,14 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
4
         # for all archs except arm and ppc, prevent gcc to omit frame pointer
4
         # for all archs except arm and ppc, prevent gcc to omit frame pointer
5
         $1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
5
         $1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
6
       fi
6
       fi
Lines 7-12 Link Here
7
+    elif test "x$OPENJDK_TARGET_OS_ENV" = xbsd.freebsd; then
7
+    elif test "x$OPENJDK_TARGET_OS_ENV" = xbsd.freebsd; then
8
+        if test "x$FLAGS_CPU" = xppc64; then
8
+        if test "x$FLAGS_CPU" = xppc64; then
9
+            $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=powerpc64 -mtune=power5"
9
+            $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=powerpc64 -mtune=power5"
10
+        elif test "x$FLAGS_CPU" = xppc64le; then
11
+            # Little endian machine uses ELFv2 ABI.
12
+            # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
13
+            $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power8"
10
+        fi
14
+        fi
11
     fi
15
     fi
12
 
16
 
(-)files/patch-src_hotspot_os__cpu_bsd__ppc_bytes__bsd__ppc.inline.hpp (+20 lines)
Line 0 Link Here
1
--- src/hotspot/os_cpu/bsd_ppc/bytes_bsd_ppc.inline.hpp.orig	2020-11-19 20:56:24 UTC
2
+++ src/hotspot/os_cpu/bsd_ppc/bytes_bsd_ppc.inline.hpp
3
@@ -27,13 +27,13 @@
4
 #define OS_CPU_BSD_PPC_VM_BYTES_BSD_PPC_INLINE_HPP
5
 
6
 #if defined(VM_LITTLE_ENDIAN)
7
-#include <byteswap.h>
8
+#include <sys/endian.h>
9
 
10
 // Efficient swapping of data bytes from Java byte
11
 // ordering to native byte ordering and vice versa.
12
-inline u2 Bytes::swap_u2(u2 x) { return bswap_16(x); }
13
-inline u4 Bytes::swap_u4(u4 x) { return bswap_32(x); }
14
-inline u8 Bytes::swap_u8(u8 x) { return bswap_64(x); }
15
+inline u2 Bytes::swap_u2(u2 x) { return bswap16(x); }
16
+inline u4 Bytes::swap_u4(u4 x) { return bswap32(x); }
17
+inline u8 Bytes::swap_u8(u8 x) { return bswap64(x); }
18
 #endif // VM_LITTLE_ENDIAN
19
 
20
 #endif // OS_CPU_BSD_PPC_VM_BYTES_BSD_PPC_INLINE_HPP
(-)files/patch-src_jdk.hotspot.agent_bsd_native_libsaproc_BsdDebuggerLocal.c (+20 lines)
Line 0 Link Here
1
--- src/jdk.hotspot.agent/bsd/native/libsaproc/BsdDebuggerLocal.c.orig	2020-11-19 21:24:03 UTC
2
+++ src/jdk.hotspot.agent/bsd/native/libsaproc/BsdDebuggerLocal.c
3
@@ -42,7 +42,7 @@
4
 #include "sun_jvm_hotspot_debugger_sparc_SPARCThreadContext.h"
5
 #endif
6
 
7
-#ifdef ppc64
8
+#if defined(ppc64) || defined(ppc64le)
9
 #include "sun_jvm_hotspot_debugger_ppc64_PPC64ThreadContext.h"
10
 #endif
11
 
12
@@ -373,7 +373,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debu
13
 #if defined(sparc) || defined(sparcv9)
14
 #define NPRGREG sun_jvm_hotspot_debugger_sparc_SPARCThreadContext_NPRGREG
15
 #endif
16
-#ifdef ppc64
17
+#if defined(ppc64) || defined(ppc64le)
18
 #define NPRGREG sun_jvm_hotspot_debugger_ppc64_PPC64ThreadContext_NPRGREG
19
 #endif
20
 #ifdef aarch64
(-)files/patch-src_utils_hsdis_Makefile (+10 lines)
Line 0 Link Here
1
--- src/utils/hsdis/Makefile.orig	2020-11-19 21:27:40 UTC
2
+++ src/utils/hsdis/Makefile
3
@@ -143,6 +143,7 @@ ifdef LP64
4
 CFLAGS/sparcv9  += -m64
5
 CFLAGS/amd64    += -m64
6
 CFLAGS/ppc64    += -m64
7
+CFLAGS/ppc64le  += -m64 -DABI_ELFv2
8
 else # LP64
9
 ARCH=$(ARCH2:amd64=i386)
10
 ifneq ($(findstring arm,$(ARCH)),)

Return to bug 251263