< prev index next >

common/autoconf/hotspot.m4

Print this page




 289   JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
 290   JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
 291   JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
 292   JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
 293   JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
 294 
 295   # Validate features
 296   for variant in $JVM_VARIANTS; do
 297     AC_MSG_CHECKING([JVM features for JVM variant '$variant'])
 298     features_var_name=JVM_FEATURES_$variant
 299     JVM_FEATURES_TO_TEST=${!features_var_name}
 300     AC_MSG_RESULT([$JVM_FEATURES_TO_TEST])
 301     NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
 302     STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
 303     INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
 304     if test "x$INVALID_FEATURES" != x; then
 305       AC_MSG_ERROR([Invalid JVM feature(s): $INVALID_FEATURES])
 306     fi
 307   done
 308 ])
 309 
 310 ###############################################################################
 311 # Support for old hotspot build. Remove once new hotspot build has proven
 312 # to work satisfactory.
 313 #
 314 AC_DEFUN_ONCE([HOTSPOT_SETUP_LEGACY_BUILD],
 315 [
 316   AC_ARG_ENABLE(new-hotspot-build, [AS_HELP_STRING([--disable-new-hotspot-build],
 317       [disable the new hotspot build system (use the old) @<:@enabled@:>@])])
 318 
 319    if test "x$enable_new_hotspot_build" = "x" || test "x$enable_new_hotspot_build" = "xyes"; then
 320      USE_NEW_HOTSPOT_BUILD=true
 321    else
 322      USE_NEW_HOTSPOT_BUILD=false
 323    fi
 324   AC_SUBST(USE_NEW_HOTSPOT_BUILD)
 325 
 326   case $HOTSPOT_DEBUG_LEVEL in
 327     product )
 328       VARIANT="OPT"
 329       FASTDEBUG="false"
 330       DEBUG_CLASSFILES="false"
 331       ;;
 332     fastdebug )
 333       VARIANT="DBG"
 334       FASTDEBUG="true"
 335       DEBUG_CLASSFILES="true"
 336       ;;
 337     debug )
 338       VARIANT="DBG"
 339       FASTDEBUG="false"
 340       DEBUG_CLASSFILES="true"
 341       ;;
 342     optimized )
 343       VARIANT="OPT"
 344       FASTDEBUG="false"
 345       DEBUG_CLASSFILES="false"
 346       ;;
 347   esac
 348   AC_SUBST(VARIANT)
 349   AC_SUBST(FASTDEBUG)
 350   AC_SUBST(DEBUG_CLASSFILES)
 351 
 352   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
 353     MACOSX_UNIVERSAL="true"
 354   fi
 355 
 356   AC_SUBST(MACOSX_UNIVERSAL)
 357 
 358   # Make sure JVM_VARIANTS_COMMA use minimal1 for backwards compatibility
 359   JVM_VARIANTS_COMMA=`$ECHO ,$JVM_VARIANTS_OPT, | $SED -e 's/,minimal,/,minimal1,/'`
 360 
 361   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
 362   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
 363   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,minimal1\?,/!s/.*/false/g' -e '/,minimal1\?,/s/.*/true/g'`
 364   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
 365   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
 366   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
 367   JVM_VARIANT_CUSTOM=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,custom,/!s/.*/false/g' -e '/,custom,/s/.*/true/g'`
 368 
 369   #####
 370   # Generate the legacy makefile targets for hotspot.
 371   HOTSPOT_TARGET=""
 372 
 373   if test "x$JVM_VARIANT_SERVER" = xtrue; then
 374     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
 375   fi
 376 
 377   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
 378     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
 379   fi
 380 
 381   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
 382     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
 383   fi
 384 
 385   if test "x$JVM_VARIANT_ZERO" = xtrue; then
 386     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
 387   fi
 388 
 389   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
 390     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
 391   fi
 392 
 393   if test "x$JVM_VARIANT_CORE" = xtrue; then
 394     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
 395   fi
 396 
 397   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_DEBUG_LEVEL"
 398 
 399   # On Macosx universal binaries are produced, but they only contain
 400   # 64 bit intel. This invalidates control of which jvms are built
 401   # from configure, but only server is valid anyway. Fix this
 402   # when hotspot makefiles are rewritten.
 403   if test "x$MACOSX_UNIVERSAL" = xtrue; then
 404     HOTSPOT_TARGET=universal_${HOTSPOT_DEBUG_LEVEL}
 405   fi
 406 
 407   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
 408   AC_SUBST(HOTSPOT_MAKE_ARGS)
 409 
 410   # Control wether Hotspot runs Queens test after build.
 411   AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
 412       [run the Queens test after Hotspot build @<:@disabled@:>@])],,
 413       [enable_hotspot_test_in_build=no])
 414   if test "x$enable_hotspot_test_in_build" = "xyes"; then
 415     TEST_IN_BUILD=true
 416   else
 417     TEST_IN_BUILD=false
 418   fi
 419   AC_SUBST(TEST_IN_BUILD)
 420 
 421   if test "x$USE_NEW_HOTSPOT_BUILD" = xfalse; then
 422     if test "x$JVM_VARIANT_CLIENT" = xtrue; then
 423       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
 424         AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.])
 425       fi
 426     fi
 427     if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
 428       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
 429         AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.])
 430       fi
 431     fi
 432     if test "x$JVM_VARIANT_CUSTOM" = xtrue; then
 433         AC_MSG_ERROR([You cannot build a custom JVM using the old hotspot build system.])
 434     fi
 435   fi
 436 
 437   AC_SUBST(JVM_VARIANTS_COMMA)
 438   AC_SUBST(JVM_VARIANT_SERVER)
 439   AC_SUBST(JVM_VARIANT_CLIENT)
 440   AC_SUBST(JVM_VARIANT_MINIMAL1)
 441   AC_SUBST(JVM_VARIANT_HOTSPOT)
 442   AC_SUBST(JVM_VARIANT_ZERO)
 443   AC_SUBST(JVM_VARIANT_ZEROSHARK)
 444   AC_SUBST(JVM_VARIANT_CORE)
 445 ])


 289   JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
 290   JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
 291   JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
 292   JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
 293   JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
 294 
 295   # Validate features
 296   for variant in $JVM_VARIANTS; do
 297     AC_MSG_CHECKING([JVM features for JVM variant '$variant'])
 298     features_var_name=JVM_FEATURES_$variant
 299     JVM_FEATURES_TO_TEST=${!features_var_name}
 300     AC_MSG_RESULT([$JVM_FEATURES_TO_TEST])
 301     NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
 302     STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
 303     INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
 304     if test "x$INVALID_FEATURES" != x; then
 305       AC_MSG_ERROR([Invalid JVM feature(s): $INVALID_FEATURES])
 306     fi
 307   done
 308 ])









































































































































< prev index next >