< 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 g1gc parallelgc serialgc 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 


 309     AC_MSG_ERROR([Specified JVM feature 'jvmti' requires feature 'services'])
 310   fi
 311 
 312   if HOTSPOT_CHECK_JVM_FEATURE(management) && ! HOTSPOT_CHECK_JVM_FEATURE(nmt); then
 313     AC_MSG_ERROR([Specified JVM feature 'management' requires feature 'nmt'])
 314   fi
 315 
 316   if HOTSPOT_CHECK_JVM_FEATURE(jvmci) && ! (HOTSPOT_CHECK_JVM_FEATURE(compiler1) || HOTSPOT_CHECK_JVM_FEATURE(compiler2)); then
 317     AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'])
 318   fi
 319 
 320   if HOTSPOT_CHECK_JVM_FEATURE(cmsgc) && ! HOTSPOT_CHECK_JVM_FEATURE(serialgc); then
 321     AC_MSG_ERROR([Specified JVM feature 'cmsgc' requires feature 'serialgc'])
 322   fi
 323 
 324   # Enable JFR by default, except for Zero, linux-sparcv9 and on minimal.
 325   if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
 326     if test "x$OPENJDK_TARGET_OS" != xlinux || test "x$OPENJDK_TARGET_CPU" != xsparcv9; then
 327       NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jfr"
 328     fi













 329   fi
 330 
 331   # Turn on additional features based on other parts of configure
 332   if test "x$INCLUDE_DTRACE" = "xtrue"; then
 333     JVM_FEATURES="$JVM_FEATURES dtrace"
 334   else
 335     if HOTSPOT_CHECK_JVM_FEATURE(dtrace); then
 336       AC_MSG_ERROR([To enable dtrace, you must use --enable-dtrace])
 337     fi
 338   fi
 339 
 340   if test "x$STATIC_BUILD" = "xtrue"; then
 341     JVM_FEATURES="$JVM_FEATURES static-build"
 342   else
 343     if HOTSPOT_CHECK_JVM_FEATURE(static-build); then
 344       AC_MSG_ERROR([To enable static-build, you must use --enable-static-build])
 345     fi
 346   fi
 347 
 348   if ! HOTSPOT_CHECK_JVM_VARIANT(zero); 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 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 


 309     AC_MSG_ERROR([Specified JVM feature 'jvmti' requires feature 'services'])
 310   fi
 311 
 312   if HOTSPOT_CHECK_JVM_FEATURE(management) && ! HOTSPOT_CHECK_JVM_FEATURE(nmt); then
 313     AC_MSG_ERROR([Specified JVM feature 'management' requires feature 'nmt'])
 314   fi
 315 
 316   if HOTSPOT_CHECK_JVM_FEATURE(jvmci) && ! (HOTSPOT_CHECK_JVM_FEATURE(compiler1) || HOTSPOT_CHECK_JVM_FEATURE(compiler2)); then
 317     AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'])
 318   fi
 319 
 320   if HOTSPOT_CHECK_JVM_FEATURE(cmsgc) && ! HOTSPOT_CHECK_JVM_FEATURE(serialgc); then
 321     AC_MSG_ERROR([Specified JVM feature 'cmsgc' requires feature 'serialgc'])
 322   fi
 323 
 324   # Enable JFR by default, except for Zero, linux-sparcv9 and on minimal.
 325   if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
 326     if test "x$OPENJDK_TARGET_OS" != xlinux || test "x$OPENJDK_TARGET_CPU" != xsparcv9; then
 327       NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jfr"
 328     fi
 329   fi
 330 
 331   # Only enable ZGC on Linux x86_64
 332   AC_MSG_CHECKING([if zgc should be built])
 333   if HOTSPOT_CHECK_JVM_FEATURE(zgc); then
 334     if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
 335       AC_MSG_RESULT([yes])
 336     else
 337       DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES zgc"
 338       AC_MSG_RESULT([no, platform not supported])
 339     fi
 340   else
 341     AC_MSG_RESULT([no])
 342   fi
 343 
 344   # Turn on additional features based on other parts of configure
 345   if test "x$INCLUDE_DTRACE" = "xtrue"; then
 346     JVM_FEATURES="$JVM_FEATURES dtrace"
 347   else
 348     if HOTSPOT_CHECK_JVM_FEATURE(dtrace); then
 349       AC_MSG_ERROR([To enable dtrace, you must use --enable-dtrace])
 350     fi
 351   fi
 352 
 353   if test "x$STATIC_BUILD" = "xtrue"; then
 354     JVM_FEATURES="$JVM_FEATURES static-build"
 355   else
 356     if HOTSPOT_CHECK_JVM_FEATURE(static-build); then
 357       AC_MSG_ERROR([To enable static-build, you must use --enable-static-build])
 358     fi
 359   fi
 360 
 361   if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then


< prev index next >