Skip to content

Commit

Permalink
Merge pull request #340 from pshipton/hsfeatures
Browse files Browse the repository at this point in the history
Remove the unneeded Hotspot features for building OpenJ9
  • Loading branch information
keithc-ca committed Apr 18, 2024
2 parents 1a277dd + 239064f commit bfbf1a2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
3 changes: 0 additions & 3 deletions closed/autoconf/custom-hook.m4
Original file line number Diff line number Diff line change
Expand Up @@ -663,9 +663,6 @@ AC_DEFUN_ONCE([CUSTOM_LATE_HOOK],
# Create the custom-spec.gmk
AC_CONFIG_FILES([$OUTPUTDIR/custom-spec.gmk:$CLOSED_AUTOCONF_DIR/custom-spec.gmk.in])
# explicitly disable CDS archive generation (OpenJ9 does not support '-Xshare:dump')
BUILD_CDS_ARCHIVE=false
# explicitly disable classlist generation
ENABLE_GENERATE_CLASSLIST=false
Expand Down
3 changes: 0 additions & 3 deletions closed/autoconf/custom-spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,6 @@ $(foreach var, \
J9JCL_SOURCES_DIR := $(SUPPORT_OUTPUTDIR)/j9jcl
J9JCL_SOURCES_DONEFILE := $(MAKESUPPORT_OUTPUTDIR)/j9jcl.done

# Disable all hotspot features.
JVM_FEATURES_server :=

# Required by OpenJCEPlus.
BUILD_OPENJCEPLUS := @BUILD_OPENJCEPLUS@
OPENJCEPLUS_TOPDIR := $(TOPDIR)/OpenJCEPlus
39 changes: 21 additions & 18 deletions make/autoconf/jvm-features.m4
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# ===========================================================================
# (c) Copyright IBM Corp. 2024, 2024 All Rights Reserved
# ===========================================================================

###############################################################################
# Terminology used in this file:
Expand All @@ -44,9 +47,8 @@
m4_define(jvm_features_valid, m4_normalize( \
ifdef([custom_jvm_features_valid], custom_jvm_features_valid) \
\
cds compiler1 compiler2 dtrace epsilongc g1gc jfr jni-check \
jvmci jvmti link-time-opt management minimal nmt opt-size parallelgc \
serialgc services shenandoahgc static-build vm-structs zero zgc \
dtrace jfr \
link-time-opt management opt-size \
))

# Deprecated JVM features (these are ignored, but with a warning)
Expand Down Expand Up @@ -233,7 +235,10 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_CDS],
[
JVM_FEATURES_CHECK_AVAILABILITY(cds, [
AC_MSG_CHECKING([if platform is supported by CDS])
if test "x$OPENJDK_TARGET_OS" = xaix; then
if true; then
AC_MSG_RESULT([no, OpenJ9])
AVAILABLE=false
elif test "x$OPENJDK_TARGET_OS" = xaix; then
AC_MSG_RESULT([no, $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
AVAILABLE=false
else
Expand Down Expand Up @@ -291,7 +296,10 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_JVMCI],
[
JVM_FEATURES_CHECK_AVAILABILITY(jvmci, [
AC_MSG_CHECKING([if platform is supported by JVMCI])
if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
if true; then
AC_MSG_RESULT([no, OpenJ9])
AVAILABLE=false
elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
AC_MSG_RESULT([yes])
elif test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
AC_MSG_RESULT([yes])
Expand All @@ -309,7 +317,10 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_SHENANDOAHGC],
[
JVM_FEATURES_CHECK_AVAILABILITY(shenandoahgc, [
AC_MSG_CHECKING([if platform is supported by Shenandoah])
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86" || \
if true; then
AC_MSG_RESULT([no, OpenJ9])
AVAILABLE=false
elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86" || \
test "x$OPENJDK_TARGET_CPU" = "xaarch64" || \
test "x$OPENJDK_TARGET_CPU" = "xppc64le" || \
test "x$OPENJDK_TARGET_CPU" = "xriscv64"; then
Expand Down Expand Up @@ -344,7 +355,10 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_ZGC],
[
JVM_FEATURES_CHECK_AVAILABILITY(zgc, [
AC_MSG_CHECKING([if platform is supported by ZGC])
if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
if true; then
AC_MSG_RESULT([no, OpenJ9])
AVAILABLE=false
elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
if test "x$OPENJDK_TARGET_OS" = "xlinux" || \
test "x$OPENJDK_TARGET_OS" = "xwindows" || \
test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
Expand Down Expand Up @@ -543,10 +557,6 @@ AC_DEFUN([JVM_FEATURES_VERIFY],
AC_MSG_ERROR([Specified JVM feature 'jvmti' requires feature 'services' for variant '$variant'])
fi
if JVM_FEATURES_IS_ACTIVE(management) && ! JVM_FEATURES_IS_ACTIVE(nmt); then
AC_MSG_ERROR([Specified JVM feature 'management' requires feature 'nmt' for variant '$variant'])
fi
# For backwards compatibility, disable a feature "globally" if one variant
# is missing the feature.
if ! JVM_FEATURES_IS_ACTIVE(cds); then
Expand All @@ -558,13 +568,6 @@ AC_DEFUN([JVM_FEATURES_VERIFY],
if JVM_FEATURES_IS_ACTIVE(compiler2); then
INCLUDE_COMPILER2="true"
fi
# Verify that we have at least one gc selected (i.e., feature named "*gc").
if ! JVM_FEATURES_IS_ACTIVE(.*gc); then
AC_MSG_NOTICE([At least one gc needed for variant '$variant'.])
AC_MSG_NOTICE([Specified features: '$JVM_FEATURES_ACTIVE'])
AC_MSG_ERROR([Cannot continue])
fi
])

###############################################################################
Expand Down

0 comments on commit bfbf1a2

Please sign in to comment.