make/autoconf/hotspot.m4
branchepsilon-gc-branch
changeset 56533 28a4f284ad83
parent 49982 9042ffe5b7fe
child 56578 e8414c8ead61
equal deleted inserted replaced
56516:ad37b6a5cd76 56533:28a4f284ad83
    23 # questions.
    23 # questions.
    24 #
    24 #
    25 
    25 
    26 # All valid JVM features, regardless of platform
    26 # All valid JVM features, regardless of platform
    27 VALID_JVM_FEATURES="compiler1 compiler2 zero minimal dtrace jvmti jvmci \
    27 VALID_JVM_FEATURES="compiler1 compiler2 zero minimal dtrace jvmti jvmci \
    28     graal vm-structs jni-check services management all-gcs nmt cds \
    28     graal vm-structs jni-check services management cmsgc g1gc parallelgc serialgc epsilongc nmt cds \
    29     static-build link-time-opt aot"
    29     static-build link-time-opt aot"
    30 
    30 
    31 # All valid JVM variants
    31 # All valid JVM variants
    32 VALID_JVM_VARIANTS="server client minimal core zero custom"
    32 VALID_JVM_VARIANTS="server client minimal core zero custom"
    33 
    33 
   303 
   303 
   304   if HOTSPOT_CHECK_JVM_FEATURE(jvmci) && ! (HOTSPOT_CHECK_JVM_FEATURE(compiler1) || HOTSPOT_CHECK_JVM_FEATURE(compiler2)); then
   304   if HOTSPOT_CHECK_JVM_FEATURE(jvmci) && ! (HOTSPOT_CHECK_JVM_FEATURE(compiler1) || HOTSPOT_CHECK_JVM_FEATURE(compiler2)); then
   305     AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'])
   305     AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'])
   306   fi
   306   fi
   307 
   307 
   308   if HOTSPOT_CHECK_JVM_FEATURE(compiler2) && ! HOTSPOT_CHECK_JVM_FEATURE(all-gcs); then
   308   if HOTSPOT_CHECK_JVM_FEATURE(cmsgc) && ! HOTSPOT_CHECK_JVM_FEATURE(serialgc); then
   309     AC_MSG_ERROR([Specified JVM feature 'compiler2' requires feature 'all-gcs'])
   309     AC_MSG_ERROR([Specified JVM feature 'cmsgc' requires feature 'serialgc'])
   310   fi
       
   311 
       
   312   if HOTSPOT_CHECK_JVM_FEATURE(vm-structs) && ! HOTSPOT_CHECK_JVM_FEATURE(all-gcs); then
       
   313     AC_MSG_ERROR([Specified JVM feature 'vm-structs' requires feature 'all-gcs'])
       
   314   fi
   310   fi
   315 
   311 
   316   # Turn on additional features based on other parts of configure
   312   # Turn on additional features based on other parts of configure
   317   if test "x$INCLUDE_DTRACE" = "xtrue"; then
   313   if test "x$INCLUDE_DTRACE" = "xtrue"; then
   318     JVM_FEATURES="$JVM_FEATURES dtrace"
   314     JVM_FEATURES="$JVM_FEATURES dtrace"
   393   else
   389   else
   394     JVM_FEATURES_link_time_opt=""
   390     JVM_FEATURES_link_time_opt=""
   395   fi
   391   fi
   396 
   392 
   397   # All variants but minimal (and custom) get these features
   393   # All variants but minimal (and custom) get these features
   398   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti vm-structs jni-check services management all-gcs nmt"
   394   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cmsgc g1gc parallelgc serialgc epsilongc jni-check jvmti management nmt services vm-structs"
   399   if test "x$ENABLE_CDS" = "xtrue"; then
   395   if test "x$ENABLE_CDS" = "xtrue"; then
   400     NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
   396     NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
   401   fi
   397   fi
   402 
   398 
   403   # Enable default features depending on variant.
   399   # Enable default features depending on variant.
   404   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
   400   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
   405   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
   401   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
   406   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
   402   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
   407   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
   403   JVM_FEATURES_minimal="compiler1 minimal serialgc $JVM_FEATURES $JVM_FEATURES_link_time_opt"
   408   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
   404   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
   409   JVM_FEATURES_custom="$JVM_FEATURES"
   405   JVM_FEATURES_custom="$JVM_FEATURES"
   410 
   406 
   411   AC_SUBST(JVM_FEATURES_server)
   407   AC_SUBST(JVM_FEATURES_server)
   412   AC_SUBST(JVM_FEATURES_client)
   408   AC_SUBST(JVM_FEATURES_client)
   439     BASIC_SORT_LIST(JVM_FEATURES_FOR_VARIANT, $JVM_FEATURES_FOR_VARIANT)
   435     BASIC_SORT_LIST(JVM_FEATURES_FOR_VARIANT, $JVM_FEATURES_FOR_VARIANT)
   440 
   436 
   441     # Update real feature set variable
   437     # Update real feature set variable
   442     eval $features_var_name='"'$JVM_FEATURES_FOR_VARIANT'"'
   438     eval $features_var_name='"'$JVM_FEATURES_FOR_VARIANT'"'
   443     AC_MSG_RESULT(["$JVM_FEATURES_FOR_VARIANT"])
   439     AC_MSG_RESULT(["$JVM_FEATURES_FOR_VARIANT"])
       
   440 
       
   441     # Verify that we have at least one gc selected
       
   442     GC_FEATURES=`$ECHO $JVM_FEATURES_FOR_VARIANT | $GREP gc`
       
   443     if test "x$GC_FEATURES" = x; then
       
   444       AC_MSG_WARN([Invalid JVM features: No gc selected for variant $variant.])
       
   445     fi
   444 
   446 
   445     # Validate features (for configure script errors, not user errors)
   447     # Validate features (for configure script errors, not user errors)
   446     BASIC_GET_NON_MATCHING_VALUES(INVALID_FEATURES, $JVM_FEATURES_FOR_VARIANT, $VALID_JVM_FEATURES)
   448     BASIC_GET_NON_MATCHING_VALUES(INVALID_FEATURES, $JVM_FEATURES_FOR_VARIANT, $VALID_JVM_FEATURES)
   447     if test "x$INVALID_FEATURES" != x; then
   449     if test "x$INVALID_FEATURES" != x; then
   448       AC_MSG_ERROR([Internal configure script error. Invalid JVM feature(s): $INVALID_FEATURES])
   450       AC_MSG_ERROR([Internal configure script error. Invalid JVM feature(s): $INVALID_FEATURES])