< prev index next >

make/autoconf/hotspot.m4

Print this page

        

@@ -23,11 +23,11 @@
 # questions.
 #
 
 # All valid JVM features, regardless of platform
 VALID_JVM_FEATURES="compiler1 compiler2 zero minimal dtrace jvmti jvmci \
-    graal vm-structs jni-check services management cmsgc epsilongc g1gc parallelgc serialgc shenandoahgc zgc nmt cds \
+    graal vm-structs jni-check services management cmsgc epsilongc g1gc parallelgc serialgc zgc nmt cds \
     static-build link-time-opt aot jfr"
 
 # Deprecated JVM features (these are ignored, but with a warning)
 DEPRECATED_JVM_FEATURES="trace"
 

@@ -45,36 +45,22 @@
 # Additional [] needed to keep m4 from mangling shell constructs.
 AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
 [ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])
 
 ###############################################################################
-# Check if the specified JVM feature is enabled. To be used in shell if
-# constructs, like this:
+# Check if the specified JVM features are explicitly enabled. To be used in
+# shell if constructs, like this:
 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
 #
 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
 
 # Definition kept in one line to allow inlining in if statements.
 # Additional [] needed to keep m4 from mangling shell constructs.
 AC_DEFUN([HOTSPOT_CHECK_JVM_FEATURE],
 [ [ [[ " $JVM_FEATURES " =~ " $1 " ]] ] ])
 
 ###############################################################################
-# Check if the specified JVM feature is explicitly disabled. To be used in
-# shell if constructs, like this:
-# if HOTSPOT_IS_JVM_FEATURE_DISABLED(jvmci); then
-#
-# This function is internal to hotspot.m4, and is only used when constructing
-# the valid set of enabled JVM features. Users outside of hotspot.m4 should just
-# use HOTSPOT_CHECK_JVM_FEATURE to check if a feature is enabled or not.
-
-# Definition kept in one line to allow inlining in if statements.
-# Additional [] needed to keep m4 from mangling shell constructs.
-AC_DEFUN([HOTSPOT_IS_JVM_FEATURE_DISABLED],
-[ [ [[ " $DISABLED_JVM_FEATURES " =~ " $1 " ]] ] ])
-
-###############################################################################
 # Check which variants of the JVM that we want to build. Available variants are:
 #   server: normal interpreter, and a tiered C1/C2 compiler
 #   client: normal interpreter, and C1 (no C2 compiler)
 #   minimal: reduced form of client with optional features stripped out
 #   core: normal interpreter only, no compiler

@@ -337,32 +323,26 @@
         NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jfr"
       fi
     fi
   fi
 
-  # Only enable Shenandoah on supported arches
-  AC_MSG_CHECKING([if shenandoah can be built])
-  if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86" || test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
-    AC_MSG_RESULT([yes])
-  else
-    DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES shenandoahgc"
-    AC_MSG_RESULT([no, platform not supported])
-  fi
-
-  # Only enable ZGC on supported platforms
-  AC_MSG_CHECKING([if zgc can be built])
-  if (test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xx86_64") || \
-     (test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xaarch64"); then
-    AC_MSG_RESULT([yes])
+  # Only enable ZGC on Linux x86_64
+  AC_MSG_CHECKING([if zgc should be built])
+  if HOTSPOT_CHECK_JVM_FEATURE(zgc); then
+    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
+      AC_MSG_RESULT([yes])
+    else
+      DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES zgc"
+      AC_MSG_RESULT([no, platform not supported])
+    fi
   else
-    DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES zgc"
-    AC_MSG_RESULT([no, platform not supported])
+    AC_MSG_RESULT([no])
   fi
 
   # Disable unsupported GCs for Zero
   if HOTSPOT_CHECK_JVM_VARIANT(zero); then
-    DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES epsilongc g1gc zgc shenandoahgc"
+    DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES epsilongc g1gc zgc"
   fi
 
   # Turn on additional features based on other parts of configure
   if test "x$INCLUDE_DTRACE" = "xtrue"; then
     JVM_FEATURES="$JVM_FEATURES dtrace"

@@ -386,17 +366,19 @@
     fi
   fi
 
   AC_MSG_CHECKING([if jvmci module jdk.internal.vm.ci should be built])
   # Check if jvmci is diabled
-  if HOTSPOT_IS_JVM_FEATURE_DISABLED(jvmci); then
+  DISABLE_JVMCI=`$ECHO $DISABLED_JVM_FEATURES | $GREP jvmci`
+  if test "x$DISABLE_JVMCI" = "xjvmci"; then
     AC_MSG_RESULT([no, forced])
     JVM_FEATURES_jvmci=""
     INCLUDE_JVMCI="false"
   else
-    # Only enable jvmci on x86_64 and aarch64
+    # Only enable jvmci on x86_64, sparcv9 and aarch64
     if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
+       test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
        test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
       AC_MSG_RESULT([yes])
       JVM_FEATURES_jvmci="jvmci"
       INCLUDE_JVMCI="true"
     else

@@ -411,11 +393,12 @@
 
   AC_SUBST(INCLUDE_JVMCI)
 
   AC_MSG_CHECKING([if graal module jdk.internal.vm.compiler should be built])
   # Check if graal is diabled
-  if HOTSPOT_IS_JVM_FEATURE_DISABLED(graal); then
+  DISABLE_GRAAL=`$ECHO $DISABLED_JVM_FEATURES | $GREP graal`
+  if test "x$DISABLE_GRAAL" = "xgraal"; then
     AC_MSG_RESULT([no, forced])
     JVM_FEATURES_graal=""
     INCLUDE_GRAAL="false"
   else
     if HOTSPOT_CHECK_JVM_FEATURE(graal); then

@@ -443,11 +426,12 @@
   fi
 
   AC_SUBST(INCLUDE_GRAAL)
 
   # Disable aot with '--with-jvm-features=-aot'
-  if HOTSPOT_IS_JVM_FEATURE_DISABLED(aot); then
+  DISABLE_AOT=`$ECHO $DISABLED_JVM_FEATURES | $GREP aot`
+  if test "x$DISABLE_AOT" = "xaot"; then
     ENABLE_AOT="false"
   fi
 
   AC_MSG_CHECKING([if aot should be enabled])
   if test "x$ENABLE_AOT" = "xtrue"; then

@@ -467,11 +451,11 @@
         AC_MSG_RESULT([yes])
       fi
       JVM_FEATURES_aot="aot"
     fi
   else
-    if test "x$enable_aot" = "xno" || HOTSPOT_IS_JVM_FEATURE_DISABLED(aot); then
+    if test "x$enable_aot" = "xno" || test "x$DISABLE_AOT" = "xaot"; then
       AC_MSG_RESULT([no, forced])
     else
       AC_MSG_RESULT([no])
     fi
     JVM_FEATURES_aot=""

@@ -488,22 +472,23 @@
   else
     JVM_FEATURES_link_time_opt=""
   fi
 
   # All variants but minimal (and custom) get these features
-  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cmsgc g1gc parallelgc serialgc epsilongc shenandoahgc jni-check jvmti management nmt services vm-structs zgc"
+  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cmsgc g1gc parallelgc serialgc epsilongc jni-check jvmti management nmt services vm-structs"
 
   # Disable CDS on AIX.
   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
     ENABLE_CDS="false"
     if test "x$enable_cds" = "xyes"; then
       AC_MSG_ERROR([CDS is currently not supported on AIX. Remove --enable-cds.])
     fi
   fi
 
   # Disable CDS if user requested it with --with-jvm-features=-cds.
-  if HOTSPOT_IS_JVM_FEATURE_DISABLED(cds); then
+  DISABLE_CDS=`$ECHO $DISABLED_JVM_FEATURES | $GREP cds`
+  if test "x$DISABLE_CDS" = "xcds"; then
     ENABLE_CDS="false"
     if test "x$enable_cds" = "xyes"; then
       AC_MSG_ERROR([CDS was disabled by --with-jvm-features=-cds. Remove --enable-cds.])
     fi
   fi
< prev index next >