< prev index next >

make/autoconf/hotspot.m4

Print this page




   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 # All valid JVM features, regardless of platform
  27 VALID_JVM_FEATURES="compiler1 compiler2 zero minimal dtrace jvmti jvmci \
  28     graal vm-structs jni-check services management cmsgc epsilongc g1gc parallelgc serialgc shenandoahgc zgc nmt cds \
  29     static-build link-time-opt aot jfr"
  30 
  31 # Deprecated JVM features (these are ignored, but with a warning)
  32 DEPRECATED_JVM_FEATURES="trace"
  33 
  34 # All valid JVM variants
  35 VALID_JVM_VARIANTS="server client minimal core zero custom"
  36 
  37 ###############################################################################
  38 # Check if the specified JVM variant should be built. To be used in shell if
  39 # constructs, like this:
  40 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
  41 #
  42 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
  43 
  44 # Definition kept in one line to allow inlining in if statements.
  45 # Additional [] needed to keep m4 from mangling shell constructs.
  46 AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
  47 [ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])
  48 
  49 ###############################################################################
  50 # Check if the specified JVM feature is enabled. To be used in shell if
  51 # constructs, like this:
  52 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
  53 #
  54 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
  55 
  56 # Definition kept in one line to allow inlining in if statements.
  57 # Additional [] needed to keep m4 from mangling shell constructs.
  58 AC_DEFUN([HOTSPOT_CHECK_JVM_FEATURE],
  59 [ [ [[ " $JVM_FEATURES " =~ " $1 " ]] ] ])
  60 
  61 ###############################################################################
  62 # Check if the specified JVM feature is explicitly disabled. To be used in
  63 # shell if constructs, like this:
  64 # if HOTSPOT_IS_JVM_FEATURE_DISABLED(jvmci); then
  65 #
  66 # This function is internal to hotspot.m4, and is only used when constructing
  67 # the valid set of enabled JVM features. Users outside of hotspot.m4 should just
  68 # use HOTSPOT_CHECK_JVM_FEATURE to check if a feature is enabled or not.
  69 
  70 # Definition kept in one line to allow inlining in if statements.
  71 # Additional [] needed to keep m4 from mangling shell constructs.
  72 AC_DEFUN([HOTSPOT_IS_JVM_FEATURE_DISABLED],
  73 [ [ [[ " $DISABLED_JVM_FEATURES " =~ " $1 " ]] ] ])
  74 
  75 ###############################################################################
  76 # Check which variants of the JVM that we want to build. Available variants are:
  77 #   server: normal interpreter, and a tiered C1/C2 compiler
  78 #   client: normal interpreter, and C1 (no C2 compiler)
  79 #   minimal: reduced form of client with optional features stripped out
  80 #   core: normal interpreter only, no compiler
  81 #   zero: C++ based interpreter only, no compiler
  82 #   custom: baseline JVM with no default features
  83 #
  84 AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
  85 [
  86   AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
  87       [JVM variants (separated by commas) to build (server,client,minimal,core,zero,custom) @<:@server@:>@])])
  88 
  89   if test "x$with_jvm_variants" = x; then
  90     with_jvm_variants="server"
  91   fi
  92   JVM_VARIANTS_OPT="$with_jvm_variants"
  93 
  94   # Has the user listed more than one variant?
  95   # Additional [] needed to keep m4 from mangling shell constructs.


 322     AC_MSG_ERROR([Specified JVM feature 'management' requires feature 'nmt'])
 323   fi
 324 
 325   if HOTSPOT_CHECK_JVM_FEATURE(jvmci) && ! (HOTSPOT_CHECK_JVM_FEATURE(compiler1) || HOTSPOT_CHECK_JVM_FEATURE(compiler2)); then
 326     AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'])
 327   fi
 328 
 329   if HOTSPOT_CHECK_JVM_FEATURE(cmsgc) && ! HOTSPOT_CHECK_JVM_FEATURE(serialgc); then
 330     AC_MSG_ERROR([Specified JVM feature 'cmsgc' requires feature 'serialgc'])
 331   fi
 332 
 333   # Enable JFR by default, except for Zero, linux-sparcv9 and on minimal.
 334   if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
 335     if test "x$OPENJDK_TARGET_OS" != xaix; then
 336       if test "x$OPENJDK_TARGET_OS" != xlinux || test "x$OPENJDK_TARGET_CPU" != xsparcv9; then
 337         NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jfr"
 338       fi
 339     fi
 340   fi
 341 
 342   # Only enable Shenandoah on supported arches
 343   AC_MSG_CHECKING([if shenandoah can be built])
 344   if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86" || test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
 345     AC_MSG_RESULT([yes])
 346   else
 347     DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES shenandoahgc"
 348     AC_MSG_RESULT([no, platform not supported])
 349   fi
 350 
 351   # Only enable ZGC on supported platforms
 352   AC_MSG_CHECKING([if zgc can be built])
 353   if (test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xx86_64") || \
 354      (test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xaarch64"); then
 355     AC_MSG_RESULT([yes])
 356   else
 357     DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES zgc"
 358     AC_MSG_RESULT([no, platform not supported])
 359   fi
 360 
 361   # Disable unsupported GCs for Zero
 362   if HOTSPOT_CHECK_JVM_VARIANT(zero); then
 363     DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES epsilongc g1gc zgc shenandoahgc"
 364   fi
 365 
 366   # Turn on additional features based on other parts of configure
 367   if test "x$INCLUDE_DTRACE" = "xtrue"; then
 368     JVM_FEATURES="$JVM_FEATURES dtrace"
 369   else
 370     if HOTSPOT_CHECK_JVM_FEATURE(dtrace); then
 371       AC_MSG_ERROR([To enable dtrace, you must use --enable-dtrace])
 372     fi
 373   fi
 374 
 375   if test "x$STATIC_BUILD" = "xtrue"; then
 376     JVM_FEATURES="$JVM_FEATURES static-build"
 377   else
 378     if HOTSPOT_CHECK_JVM_FEATURE(static-build); then
 379       AC_MSG_ERROR([To enable static-build, you must use --enable-static-build])
 380     fi
 381   fi
 382 
 383   if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
 384     if HOTSPOT_CHECK_JVM_FEATURE(zero); then
 385       AC_MSG_ERROR([To enable zero, you must use --with-jvm-variants=zero])
 386     fi
 387   fi
 388 
 389   AC_MSG_CHECKING([if jvmci module jdk.internal.vm.ci should be built])
 390   # Check if jvmci is diabled
 391   if HOTSPOT_IS_JVM_FEATURE_DISABLED(jvmci); then

 392     AC_MSG_RESULT([no, forced])
 393     JVM_FEATURES_jvmci=""
 394     INCLUDE_JVMCI="false"
 395   else
 396     # Only enable jvmci on x86_64 and aarch64
 397     if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \

 398        test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
 399       AC_MSG_RESULT([yes])
 400       JVM_FEATURES_jvmci="jvmci"
 401       INCLUDE_JVMCI="true"
 402     else
 403       AC_MSG_RESULT([no])
 404       JVM_FEATURES_jvmci=""
 405       INCLUDE_JVMCI="false"
 406       if HOTSPOT_CHECK_JVM_FEATURE(jvmci); then
 407         AC_MSG_ERROR([JVMCI is currently not supported on this platform.])
 408       fi
 409     fi
 410   fi
 411 
 412   AC_SUBST(INCLUDE_JVMCI)
 413 
 414   AC_MSG_CHECKING([if graal module jdk.internal.vm.compiler should be built])
 415   # Check if graal is diabled
 416   if HOTSPOT_IS_JVM_FEATURE_DISABLED(graal); then

 417     AC_MSG_RESULT([no, forced])
 418     JVM_FEATURES_graal=""
 419     INCLUDE_GRAAL="false"
 420   else
 421     if HOTSPOT_CHECK_JVM_FEATURE(graal); then
 422       AC_MSG_RESULT([yes, forced])
 423       if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
 424         AC_MSG_ERROR([Specified JVM feature 'graal' requires feature 'jvmci'])
 425       fi
 426       JVM_FEATURES_graal="graal"
 427       INCLUDE_GRAAL="true"
 428     else
 429       # By default enable graal build on x64 or where AOT is available.
 430       # graal build requires jvmci.
 431       if test "x$JVM_FEATURES_jvmci" = "xjvmci" && \
 432           (test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
 433            test "x$ENABLE_AOT" = "xtrue") ; then
 434         AC_MSG_RESULT([yes])
 435         JVM_FEATURES_graal="graal"
 436         INCLUDE_GRAAL="true"
 437       else
 438         AC_MSG_RESULT([no])
 439         JVM_FEATURES_graal=""
 440         INCLUDE_GRAAL="false"
 441       fi
 442     fi
 443   fi
 444 
 445   AC_SUBST(INCLUDE_GRAAL)
 446 
 447   # Disable aot with '--with-jvm-features=-aot'
 448   if HOTSPOT_IS_JVM_FEATURE_DISABLED(aot); then

 449     ENABLE_AOT="false"
 450   fi
 451 
 452   AC_MSG_CHECKING([if aot should be enabled])
 453   if test "x$ENABLE_AOT" = "xtrue"; then
 454     if test "x$JVM_FEATURES_graal" != "xgraal"; then
 455       if test "x$enable_aot" = "xyes" || HOTSPOT_CHECK_JVM_FEATURE(aot); then
 456         AC_MSG_RESULT([yes, forced])
 457         AC_MSG_ERROR([Specified JVM feature 'aot' requires feature 'graal'])
 458       else
 459         AC_MSG_RESULT([no])
 460       fi
 461       JVM_FEATURES_aot=""
 462       ENABLE_AOT="false"
 463     else
 464       if test "x$enable_aot" = "xyes" || HOTSPOT_CHECK_JVM_FEATURE(aot); then
 465         AC_MSG_RESULT([yes, forced])
 466       else
 467         AC_MSG_RESULT([yes])
 468       fi
 469       JVM_FEATURES_aot="aot"
 470     fi
 471   else
 472     if test "x$enable_aot" = "xno" || HOTSPOT_IS_JVM_FEATURE_DISABLED(aot); then
 473       AC_MSG_RESULT([no, forced])
 474     else
 475       AC_MSG_RESULT([no])
 476     fi
 477     JVM_FEATURES_aot=""
 478     if HOTSPOT_CHECK_JVM_FEATURE(aot); then
 479       AC_MSG_ERROR([To enable aot, you must use --enable-aot])
 480     fi
 481   fi
 482 
 483   AC_SUBST(ENABLE_AOT)
 484 
 485   if test "x$OPENJDK_TARGET_CPU" = xarm ; then
 486     # Default to use link time optimizations on minimal on arm
 487     JVM_FEATURES_link_time_opt="link-time-opt"
 488   else
 489     JVM_FEATURES_link_time_opt=""
 490   fi
 491 
 492   # All variants but minimal (and custom) get these features
 493   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cmsgc g1gc parallelgc serialgc epsilongc shenandoahgc jni-check jvmti management nmt services vm-structs zgc"
 494 
 495   # Disable CDS on AIX.
 496   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
 497     ENABLE_CDS="false"
 498     if test "x$enable_cds" = "xyes"; then
 499       AC_MSG_ERROR([CDS is currently not supported on AIX. Remove --enable-cds.])
 500     fi
 501   fi
 502 
 503   # Disable CDS if user requested it with --with-jvm-features=-cds.
 504   if HOTSPOT_IS_JVM_FEATURE_DISABLED(cds); then

 505     ENABLE_CDS="false"
 506     if test "x$enable_cds" = "xyes"; then
 507       AC_MSG_ERROR([CDS was disabled by --with-jvm-features=-cds. Remove --enable-cds.])
 508     fi
 509   fi
 510 
 511   # Disable CDS for zero, minimal, core..
 512   if HOTSPOT_CHECK_JVM_VARIANT(zero) || HOTSPOT_CHECK_JVM_VARIANT(minimal) || HOTSPOT_CHECK_JVM_VARIANT(core); then
 513     # ..except when the user explicitely requested it with --enable-jvm-features
 514     if ! HOTSPOT_CHECK_JVM_FEATURE(cds); then
 515       ENABLE_CDS="false"
 516       if test "x$enable_cds" = "xyes"; then
 517         AC_MSG_ERROR([CDS not implemented for variants zero, minimal, core. Remove --enable-cds.])
 518       fi
 519     fi
 520   fi
 521 
 522   AC_MSG_CHECKING([if cds should be enabled])
 523   if test "x$ENABLE_CDS" = "xtrue"; then
 524     if test "x$enable_cds" = "xyes"; then




   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 # All valid JVM features, regardless of platform
  27 VALID_JVM_FEATURES="compiler1 compiler2 zero minimal dtrace jvmti jvmci \
  28     graal vm-structs jni-check services management cmsgc epsilongc g1gc parallelgc serialgc zgc nmt cds \
  29     static-build link-time-opt aot jfr"
  30 
  31 # Deprecated JVM features (these are ignored, but with a warning)
  32 DEPRECATED_JVM_FEATURES="trace"
  33 
  34 # All valid JVM variants
  35 VALID_JVM_VARIANTS="server client minimal core zero custom"
  36 
  37 ###############################################################################
  38 # Check if the specified JVM variant should be built. To be used in shell if
  39 # constructs, like this:
  40 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
  41 #
  42 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
  43 
  44 # Definition kept in one line to allow inlining in if statements.
  45 # Additional [] needed to keep m4 from mangling shell constructs.
  46 AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
  47 [ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])
  48 
  49 ###############################################################################
  50 # Check if the specified JVM features are explicitly enabled. To be used in
  51 # shell if constructs, like this:
  52 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
  53 #
  54 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
  55 
  56 # Definition kept in one line to allow inlining in if statements.
  57 # Additional [] needed to keep m4 from mangling shell constructs.
  58 AC_DEFUN([HOTSPOT_CHECK_JVM_FEATURE],
  59 [ [ [[ " $JVM_FEATURES " =~ " $1 " ]] ] ])
  60 
  61 ###############################################################################














  62 # Check which variants of the JVM that we want to build. Available variants are:
  63 #   server: normal interpreter, and a tiered C1/C2 compiler
  64 #   client: normal interpreter, and C1 (no C2 compiler)
  65 #   minimal: reduced form of client with optional features stripped out
  66 #   core: normal interpreter only, no compiler
  67 #   zero: C++ based interpreter only, no compiler
  68 #   custom: baseline JVM with no default features
  69 #
  70 AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
  71 [
  72   AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
  73       [JVM variants (separated by commas) to build (server,client,minimal,core,zero,custom) @<:@server@:>@])])
  74 
  75   if test "x$with_jvm_variants" = x; then
  76     with_jvm_variants="server"
  77   fi
  78   JVM_VARIANTS_OPT="$with_jvm_variants"
  79 
  80   # Has the user listed more than one variant?
  81   # Additional [] needed to keep m4 from mangling shell constructs.


 308     AC_MSG_ERROR([Specified JVM feature 'management' requires feature 'nmt'])
 309   fi
 310 
 311   if HOTSPOT_CHECK_JVM_FEATURE(jvmci) && ! (HOTSPOT_CHECK_JVM_FEATURE(compiler1) || HOTSPOT_CHECK_JVM_FEATURE(compiler2)); then
 312     AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'])
 313   fi
 314 
 315   if HOTSPOT_CHECK_JVM_FEATURE(cmsgc) && ! HOTSPOT_CHECK_JVM_FEATURE(serialgc); then
 316     AC_MSG_ERROR([Specified JVM feature 'cmsgc' requires feature 'serialgc'])
 317   fi
 318 
 319   # Enable JFR by default, except for Zero, linux-sparcv9 and on minimal.
 320   if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
 321     if test "x$OPENJDK_TARGET_OS" != xaix; then
 322       if test "x$OPENJDK_TARGET_OS" != xlinux || test "x$OPENJDK_TARGET_CPU" != xsparcv9; then
 323         NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jfr"
 324       fi
 325     fi
 326   fi
 327 
 328   # Only enable ZGC on Linux x86_64
 329   AC_MSG_CHECKING([if zgc should be built])
 330   if HOTSPOT_CHECK_JVM_FEATURE(zgc); then
 331     if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
 332       AC_MSG_RESULT([yes])
 333     else
 334       DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES zgc"
 335       AC_MSG_RESULT([no, platform not supported])
 336     fi





 337   else
 338     AC_MSG_RESULT([no])

 339   fi
 340 
 341   # Disable unsupported GCs for Zero
 342   if HOTSPOT_CHECK_JVM_VARIANT(zero); then
 343     DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES epsilongc g1gc zgc"
 344   fi
 345 
 346   # Turn on additional features based on other parts of configure
 347   if test "x$INCLUDE_DTRACE" = "xtrue"; then
 348     JVM_FEATURES="$JVM_FEATURES dtrace"
 349   else
 350     if HOTSPOT_CHECK_JVM_FEATURE(dtrace); then
 351       AC_MSG_ERROR([To enable dtrace, you must use --enable-dtrace])
 352     fi
 353   fi
 354 
 355   if test "x$STATIC_BUILD" = "xtrue"; then
 356     JVM_FEATURES="$JVM_FEATURES static-build"
 357   else
 358     if HOTSPOT_CHECK_JVM_FEATURE(static-build); then
 359       AC_MSG_ERROR([To enable static-build, you must use --enable-static-build])
 360     fi
 361   fi
 362 
 363   if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
 364     if HOTSPOT_CHECK_JVM_FEATURE(zero); then
 365       AC_MSG_ERROR([To enable zero, you must use --with-jvm-variants=zero])
 366     fi
 367   fi
 368 
 369   AC_MSG_CHECKING([if jvmci module jdk.internal.vm.ci should be built])
 370   # Check if jvmci is diabled
 371   DISABLE_JVMCI=`$ECHO $DISABLED_JVM_FEATURES | $GREP jvmci`
 372   if test "x$DISABLE_JVMCI" = "xjvmci"; then
 373     AC_MSG_RESULT([no, forced])
 374     JVM_FEATURES_jvmci=""
 375     INCLUDE_JVMCI="false"
 376   else
 377     # Only enable jvmci on x86_64, sparcv9 and aarch64
 378     if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
 379        test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
 380        test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
 381       AC_MSG_RESULT([yes])
 382       JVM_FEATURES_jvmci="jvmci"
 383       INCLUDE_JVMCI="true"
 384     else
 385       AC_MSG_RESULT([no])
 386       JVM_FEATURES_jvmci=""
 387       INCLUDE_JVMCI="false"
 388       if HOTSPOT_CHECK_JVM_FEATURE(jvmci); then
 389         AC_MSG_ERROR([JVMCI is currently not supported on this platform.])
 390       fi
 391     fi
 392   fi
 393 
 394   AC_SUBST(INCLUDE_JVMCI)
 395 
 396   AC_MSG_CHECKING([if graal module jdk.internal.vm.compiler should be built])
 397   # Check if graal is diabled
 398   DISABLE_GRAAL=`$ECHO $DISABLED_JVM_FEATURES | $GREP graal`
 399   if test "x$DISABLE_GRAAL" = "xgraal"; then
 400     AC_MSG_RESULT([no, forced])
 401     JVM_FEATURES_graal=""
 402     INCLUDE_GRAAL="false"
 403   else
 404     if HOTSPOT_CHECK_JVM_FEATURE(graal); then
 405       AC_MSG_RESULT([yes, forced])
 406       if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
 407         AC_MSG_ERROR([Specified JVM feature 'graal' requires feature 'jvmci'])
 408       fi
 409       JVM_FEATURES_graal="graal"
 410       INCLUDE_GRAAL="true"
 411     else
 412       # By default enable graal build on x64 or where AOT is available.
 413       # graal build requires jvmci.
 414       if test "x$JVM_FEATURES_jvmci" = "xjvmci" && \
 415           (test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
 416            test "x$ENABLE_AOT" = "xtrue") ; then
 417         AC_MSG_RESULT([yes])
 418         JVM_FEATURES_graal="graal"
 419         INCLUDE_GRAAL="true"
 420       else
 421         AC_MSG_RESULT([no])
 422         JVM_FEATURES_graal=""
 423         INCLUDE_GRAAL="false"
 424       fi
 425     fi
 426   fi
 427 
 428   AC_SUBST(INCLUDE_GRAAL)
 429 
 430   # Disable aot with '--with-jvm-features=-aot'
 431   DISABLE_AOT=`$ECHO $DISABLED_JVM_FEATURES | $GREP aot`
 432   if test "x$DISABLE_AOT" = "xaot"; then
 433     ENABLE_AOT="false"
 434   fi
 435 
 436   AC_MSG_CHECKING([if aot should be enabled])
 437   if test "x$ENABLE_AOT" = "xtrue"; then
 438     if test "x$JVM_FEATURES_graal" != "xgraal"; then
 439       if test "x$enable_aot" = "xyes" || HOTSPOT_CHECK_JVM_FEATURE(aot); then
 440         AC_MSG_RESULT([yes, forced])
 441         AC_MSG_ERROR([Specified JVM feature 'aot' requires feature 'graal'])
 442       else
 443         AC_MSG_RESULT([no])
 444       fi
 445       JVM_FEATURES_aot=""
 446       ENABLE_AOT="false"
 447     else
 448       if test "x$enable_aot" = "xyes" || HOTSPOT_CHECK_JVM_FEATURE(aot); then
 449         AC_MSG_RESULT([yes, forced])
 450       else
 451         AC_MSG_RESULT([yes])
 452       fi
 453       JVM_FEATURES_aot="aot"
 454     fi
 455   else
 456     if test "x$enable_aot" = "xno" || test "x$DISABLE_AOT" = "xaot"; then
 457       AC_MSG_RESULT([no, forced])
 458     else
 459       AC_MSG_RESULT([no])
 460     fi
 461     JVM_FEATURES_aot=""
 462     if HOTSPOT_CHECK_JVM_FEATURE(aot); then
 463       AC_MSG_ERROR([To enable aot, you must use --enable-aot])
 464     fi
 465   fi
 466 
 467   AC_SUBST(ENABLE_AOT)
 468 
 469   if test "x$OPENJDK_TARGET_CPU" = xarm ; then
 470     # Default to use link time optimizations on minimal on arm
 471     JVM_FEATURES_link_time_opt="link-time-opt"
 472   else
 473     JVM_FEATURES_link_time_opt=""
 474   fi
 475 
 476   # All variants but minimal (and custom) get these features
 477   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cmsgc g1gc parallelgc serialgc epsilongc jni-check jvmti management nmt services vm-structs"
 478 
 479   # Disable CDS on AIX.
 480   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
 481     ENABLE_CDS="false"
 482     if test "x$enable_cds" = "xyes"; then
 483       AC_MSG_ERROR([CDS is currently not supported on AIX. Remove --enable-cds.])
 484     fi
 485   fi
 486 
 487   # Disable CDS if user requested it with --with-jvm-features=-cds.
 488   DISABLE_CDS=`$ECHO $DISABLED_JVM_FEATURES | $GREP cds`
 489   if test "x$DISABLE_CDS" = "xcds"; then
 490     ENABLE_CDS="false"
 491     if test "x$enable_cds" = "xyes"; then
 492       AC_MSG_ERROR([CDS was disabled by --with-jvm-features=-cds. Remove --enable-cds.])
 493     fi
 494   fi
 495 
 496   # Disable CDS for zero, minimal, core..
 497   if HOTSPOT_CHECK_JVM_VARIANT(zero) || HOTSPOT_CHECK_JVM_VARIANT(minimal) || HOTSPOT_CHECK_JVM_VARIANT(core); then
 498     # ..except when the user explicitely requested it with --enable-jvm-features
 499     if ! HOTSPOT_CHECK_JVM_FEATURE(cds); then
 500       ENABLE_CDS="false"
 501       if test "x$enable_cds" = "xyes"; then
 502         AC_MSG_ERROR([CDS not implemented for variants zero, minimal, core. Remove --enable-cds.])
 503       fi
 504     fi
 505   fi
 506 
 507   AC_MSG_CHECKING([if cds should be enabled])
 508   if test "x$ENABLE_CDS" = "xtrue"; then
 509     if test "x$enable_cds" = "xyes"; then


< prev index next >