Skip to content

Commit

Permalink
java/openjdk8: allow using DSCR on powerpc64
Browse files Browse the repository at this point in the history
DSCR was disabled because of a bug in stable/12.
Additionally, remove ELFv1 support.
  • Loading branch information
pkubaj committed Jan 2, 2024
1 parent 0e93438 commit 632efb3
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 198 deletions.
8 changes: 2 additions & 6 deletions java/openjdk8/Makefile
@@ -1,5 +1,6 @@
PORTNAME= openjdk
PORTVERSION= ${JDK_MAJOR_VERSION}.${JDK_UPDATE_VERSION}.${JDK_BUILD_NUMBER}.${BSD_JDK_VERSION}
PORTREVISION= 1
CATEGORIES= java devel
MASTER_SITES= LOCAL/jkim:jtreg
PKGNAMESUFFIX?= ${JDK_MAJOR_VERSION}
Expand Down Expand Up @@ -233,12 +234,7 @@ MAKE_ARGS+= USE_PRECOMPILED_HEADER=0
.endif
.endif

.if defined(PPC_ABI) && ${PPC_ABI} == ELFv2
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-ppc64-elfv2
MAKE_ARGS+= USE_PRECOMPILED_HEADER=0
.endif

.if ${ARCH} == powerpc64le
.if ${ARCH:Mpowerpc64*}
MAKE_ARGS+= USE_PRECOMPILED_HEADER=0
.endif

Expand Down
37 changes: 0 additions & 37 deletions java/openjdk8/files/extra-patch-ppc64-elfv2

This file was deleted.

11 changes: 11 additions & 0 deletions java/openjdk8/files/patch-common_autoconf_flags.m4
@@ -0,0 +1,11 @@
--- common/autoconf/flags.m4.orig 2024-01-02 12:56:28 UTC
+++ common/autoconf/flags.m4
@@ -642,7 +642,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DVM_BIG_ENDIAN"
fi
fi
- if test "x$OPENJDK_TARGET_CPU" = xppc64le; then
+ if test "x$OPENJDK_TARGET_CPU" = xppc64le -o "x$OPENJDK_TARGET_CPU" = xppc64; then
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DABI_ELFv2"
fi

11 changes: 11 additions & 0 deletions java/openjdk8/files/patch-common_autoconf_generated-configure.sh
@@ -0,0 +1,11 @@
--- common/autoconf/generated-configure.sh.orig 2024-01-02 12:56:13 UTC
+++ common/autoconf/generated-configure.sh
@@ -43317,7 +43317,7 @@ $as_echo "$supports" >&6; }
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DVM_BIG_ENDIAN"
fi
fi
- if test "x$OPENJDK_TARGET_CPU" = xppc64le; then
+ if test "x$OPENJDK_TARGET_CPU" = xppc64le -o "x$OPENJDK_TARGET_CPU" = xppc64; then
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DABI_ELFv2"
fi

15 changes: 15 additions & 0 deletions java/openjdk8/files/patch-hotspot_make_bsd_makefiles_ppc64.make
@@ -0,0 +1,15 @@
--- hotspot/make/bsd/makefiles/ppc64.make.orig 2024-01-02 13:01:01 UTC
+++ hotspot/make/bsd/makefiles/ppc64.make
@@ -37,11 +37,7 @@ ifeq ($(OPENJDK_TARGET_CPU_ENDIAN),big)
endif

ifeq ($(OPENJDK_TARGET_CPU_ENDIAN),big)
- # fixes `relocation truncated to fit' error for gcc 4.1.
- CFLAGS += -mminimal-toc
-
- # finds use ppc64 instructions, but schedule for power5
- CFLAGS += -mcpu=powerpc64 -mtune=power5 -minsert-sched-nops=regroup_exact -mno-multiple -mno-string
+ CFLAGS += -mcpu=powerpc64 -mtune=power5 -DABI_ELFv2
else
# Little endian machine uses ELFv2 ABI.
CFLAGS += -DVM_LITTLE_ENDIAN -DABI_ELFv2

This file was deleted.

0 comments on commit 632efb3

Please sign in to comment.