diff --git a/.hgtags-top-repo b/.hgtags-top-repo index 08fd371176c..75fcb5f4de4 100644 --- a/.hgtags-top-repo +++ b/.hgtags-top-repo @@ -361,3 +361,4 @@ f900d5afd9c83a0df8f36161c27c5e4c86a66f4c jdk-9+111 6743a8e0cab7b5f6f4a0575f6664892f0ab740af jdk-9+116 e882bcdbdac436523f3d5681611d3118a3804ea7 jdk-9+117 047f95de8f918d8ff5e8cd2636a2abb5c3c8adb8 jdk-9+118 +3463a3f14f0f0e8a68f29ac6405454f2fa2f598a jdk-9+119 diff --git a/common/autoconf/basics.m4 b/common/autoconf/basics.m4 index f295a46d3c4..6a64c47b964 100644 --- a/common/autoconf/basics.m4 +++ b/common/autoconf/basics.m4 @@ -484,6 +484,8 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS], BASIC_REQUIRE_PROGS(FILE, file) BASIC_REQUIRE_PROGS(FIND, find) BASIC_REQUIRE_PROGS(HEAD, head) + BASIC_REQUIRE_PROGS(GUNZIP, gunzip) + BASIC_REQUIRE_PROGS(GZIP, pigz gzip) BASIC_REQUIRE_PROGS(LN, ln) BASIC_REQUIRE_PROGS(LS, ls) BASIC_REQUIRE_PROGS(MKDIR, mkdir) @@ -496,7 +498,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS], BASIC_REQUIRE_PROGS(SH, sh) BASIC_REQUIRE_PROGS(SORT, sort) BASIC_REQUIRE_PROGS(TAIL, tail) - BASIC_REQUIRE_PROGS(TAR, tar) + BASIC_REQUIRE_PROGS(TAR, gtar tar) BASIC_REQUIRE_PROGS(TEE, tee) BASIC_REQUIRE_PROGS(TOUCH, touch) BASIC_REQUIRE_PROGS(TR, tr) @@ -839,8 +841,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR], # The spec.gmk file contains all variables for the make system. AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in]) - # The hotspot-spec.gmk file contains legacy variables for the hotspot make system. - AC_CONFIG_FILES([$OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in]) # The bootcycle-spec.gmk file contains support for boot cycle builds. AC_CONFIG_FILES([$OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in]) # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling. @@ -1009,11 +1009,36 @@ AC_DEFUN([BASIC_CHECK_FIND_DELETE], AC_SUBST(FIND_DELETE) ]) +AC_DEFUN([BASIC_CHECK_TAR], +[ + # Test which kind of tar was found + if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then + TAR_TYPE="gnu" + elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then + TAR_TYPE="bsd" + elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then + TAR_TYPE="solaris" + fi + AC_MSG_CHECKING([what type of tar was found]) + AC_MSG_RESULT([$TAR_TYPE]) + + if test "x$TAR_TYPE" = "xgnu"; then + TAR_INCLUDE_PARAM="T" + TAR_SUPPORTS_TRANSFORM="true" + else + TAR_INCLUDE_PARAM="I" + TAR_SUPPORTS_TRANSFORM="false" + fi + AC_SUBST(TAR_INCLUDE_PARAM) + AC_SUBST(TAR_SUPPORTS_TRANSFORM) +]) + AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS], [ BASIC_CHECK_GNU_MAKE BASIC_CHECK_FIND_DELETE + BASIC_CHECK_TAR # These tools might not be installed by default, # need hint on how to install them. diff --git a/common/autoconf/buildjdk-spec.gmk.in b/common/autoconf/buildjdk-spec.gmk.in index 818f21eed95..c4b7d9051cc 100644 --- a/common/autoconf/buildjdk-spec.gmk.in +++ b/common/autoconf/buildjdk-spec.gmk.in @@ -134,8 +134,9 @@ ifeq ($(JVM_INTERPRETER), cpp) endif HOTSPOT_MAKE_ARGS := product docs export_product -# Control wether Hotspot runs Queens test after building -TEST_IN_BUILD := false + +# Control wether Hotspot builds gtest tests +BUILD_GTEST := false USE_PRECOMPILED_HEADER := @USE_PRECOMPILED_HEADER@ diff --git a/common/autoconf/compare.sh.in b/common/autoconf/compare.sh.in index 67a69ff73bd..f7e2003ca32 100644 --- a/common/autoconf/compare.sh.in +++ b/common/autoconf/compare.sh.in @@ -48,6 +48,7 @@ export EXPR="@EXPR@" export FILE="@FILE@" export FIND="@FIND@" export GREP="@GREP@" +export GUNZIP="@GUNZIP@" export LDD="@LDD@" export LN="@LN@" export MKDIR="@MKDIR@" @@ -63,10 +64,11 @@ export SED="@SED@" export SORT="@SORT@" export STAT="@STAT@" export STRIP="@STRIP@ @STRIPFLAGS@" +export TAR="@TAR@" export TEE="@TEE@" export UNIQ="@UNIQ@" export UNPACK200="@FIXPATH@ @BOOT_JDK@/bin/unpack200" -export UNARCHIVE="@UNZIP@ -q" +export UNARCHIVE="@UNZIP@ -q -o" export SRC_ROOT="@TOPDIR@" export OUTPUT_ROOT="@OUTPUT_ROOT@" diff --git a/common/autoconf/configure.ac b/common/autoconf/configure.ac index 291851f8d10..0079a944dac 100644 --- a/common/autoconf/configure.ac +++ b/common/autoconf/configure.ac @@ -207,6 +207,7 @@ JDKOPT_SETUP_CODE_COVERAGE # Need toolchain to setup dtrace HOTSPOT_SETUP_DTRACE HOTSPOT_SETUP_JVM_FEATURES +HOTSPOT_ENABLE_DISABLE_GTEST ############################################################################### # @@ -226,7 +227,6 @@ LIB_SETUP_LIBRARIES # ############################################################################### -HOTSPOT_SETUP_LEGACY_BUILD JDKOPT_DETECT_INTREE_EC JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index f40198f8da3..ef4a2674e9f 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -652,21 +652,7 @@ MEMORY_SIZE NUM_CORES BUILD_FAILURE_HANDLER ENABLE_INTREE_EC -JVM_VARIANT_CORE -JVM_VARIANT_ZEROSHARK -JVM_VARIANT_ZERO -JVM_VARIANT_HOTSPOT -JVM_VARIANT_MINIMAL1 -JVM_VARIANT_CLIENT -JVM_VARIANT_SERVER -JVM_VARIANTS_COMMA -TEST_IN_BUILD -HOTSPOT_MAKE_ARGS -MACOSX_UNIVERSAL -DEBUG_CLASSFILES -FASTDEBUG -VARIANT -USE_NEW_HOTSPOT_BUILD +STLPORT_LIB LIBZIP_CAN_USE_MMAP LIBDL LIBM @@ -702,6 +688,7 @@ LIBCXX STATIC_CXX_SETTING FIXPATH_DETACH_FLAG FIXPATH +BUILD_GTEST VALID_JVM_FEATURES JVM_FEATURES_custom JVM_FEATURES_zeroshark @@ -963,6 +950,8 @@ OTOOL LDD ZIP UNZIP +TAR_SUPPORTS_TRANSFORM +TAR_INCLUDE_PARAM FIND_DELETE OUTPUT_SYNC OUTPUT_SYNC_SUPPORTED @@ -995,6 +984,9 @@ HOTSPOT_BUILD_CPU_ARCH HOTSPOT_BUILD_CPU HOTSPOT_BUILD_OS_TYPE HOTSPOT_BUILD_OS +OPENJDK_BUILD_BUNDLE_PLATFORM +OPENJDK_BUILD_CPU_BUNDLE +OPENJDK_BUILD_OS_BUNDLE OPENJDK_BUILD_OS_EXPORT_DIR OPENJDK_BUILD_CPU_JLI_CFLAGS OPENJDK_BUILD_CPU_OSARCH @@ -1009,6 +1001,9 @@ HOTSPOT_TARGET_OS_TYPE HOTSPOT_TARGET_OS DEFINE_CROSS_COMPILE_ARCH LP64 +OPENJDK_TARGET_BUNDLE_PLATFORM +OPENJDK_TARGET_CPU_BUNDLE +OPENJDK_TARGET_OS_BUNDLE OPENJDK_TARGET_OS_EXPORT_DIR OPENJDK_TARGET_CPU_JLI_CFLAGS OPENJDK_TARGET_CPU_OSARCH @@ -1078,6 +1073,8 @@ MKTEMP MKDIR LS LN +GZIP +GUNZIP HEAD FIND FILE @@ -1202,6 +1199,7 @@ enable_native_coverage enable_dtrace with_jvm_features with_jvm_interpreter +enable_hotspot_gtest with_stdc__lib with_msvcr_dll with_msvcp_dll @@ -1227,8 +1225,6 @@ with_lcms with_dxsdk with_dxsdk_lib with_dxsdk_include -enable_new_hotspot_build -enable_hotspot_test_in_build enable_jtreg_failure_handler with_num_cores with_memory_size @@ -1262,6 +1258,8 @@ EXPR FILE FIND HEAD +GUNZIP +GZIP LN LS MKDIR @@ -1996,15 +1994,11 @@ Optional Features: --enable-dtrace[=yes/no/auto] enable dtrace. Default is auto, where dtrace is enabled if all dependencies are present. + --disable-hotspot-gtest Disables building of the Hotspot unit tests --disable-freetype-bundling disable bundling of the freetype library with the build result [enabled on Windows or when using --with-freetype, disabled otherwise] - --disable-new-hotspot-build - disable the new hotspot build system (use the old) - [enabled] - --enable-hotspot-test-in-build - run the Queens test after Hotspot build [disabled] --enable-jtreg-failure-handler forces build of the jtreg failure handler to be enabled, missing dependencies become fatal errors. @@ -2205,6 +2199,8 @@ Some influential environment variables: FILE Override default value for FILE FIND Override default value for FIND HEAD Override default value for HEAD + GUNZIP Override default value for GUNZIP + GZIP Override default value for GZIP LN Override default value for LN LS Override default value for LS MKDIR Override default value for MKDIR @@ -3707,6 +3703,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + # Check if build directory is on local disk. If not possible to determine, # we prefer to claim it's local. # Argument 1: directory to test @@ -4303,9 +4301,8 @@ VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom" # -############################################################################### -# Support for old hotspot build. Remove once new hotspot build has proven -# to work satisfactory. +################################################################################ +# Check if gtest should be built # @@ -4732,6 +4729,13 @@ VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom" ################################################################################ +################################################################################ +# libstlport.so.1 is needed for running gtest on Solaris. Find it to +# redistribute it in the test image. +################################################################################ + + + # # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -5076,7 +5080,7 @@ VS_SDK_PLATFORM_NAME_2013= #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1462970869 +DATE_WHEN_GENERATED=1463732692 ############################################################################### # @@ -8401,6 +8405,414 @@ $as_echo "$tool_specified" >&6; } + # Publish this variable in the help. + + + if [ -z "${GUNZIP+x}" ]; then + # The variable is not set by user, try to locate tool using the code snippet + for ac_prog in gunzip +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GUNZIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GUNZIP in + [\\/]* | ?:[\\/]*) + ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GUNZIP=$ac_cv_path_GUNZIP +if test -n "$GUNZIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5 +$as_echo "$GUNZIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$GUNZIP" && break +done + + else + # The variable is set, but is it from the command line or the environment? + + # Try to remove the string !GUNZIP! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/} + if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then + # If it failed, the variable was not from the command line. Ignore it, + # but warn the user (except for BASH, which is always set by the calling BASH). + if test "xGUNZIP" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;} + fi + # Try to locate tool using the code snippet + for ac_prog in gunzip +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GUNZIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GUNZIP in + [\\/]* | ?:[\\/]*) + ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GUNZIP=$ac_cv_path_GUNZIP +if test -n "$GUNZIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5 +$as_echo "$GUNZIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$GUNZIP" && break +done + + else + # If it succeeded, then it was overridden by the user. We will use it + # for the tool. + + # First remove it from the list of overridden variables, so we can test + # for unknown variables in the end. + CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" + + # Check if we try to supply an empty value + if test "x$GUNZIP" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5 +$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5 +$as_echo_n "checking for GUNZIP... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } + else + # Check if the provided tool contains a complete path. + tool_specified="$GUNZIP" + tool_basename="${tool_specified##*/}" + if test "x$tool_basename" = "x$tool_specified"; then + # A command without a complete path is provided, search $PATH. + { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;} + # Extract the first word of "$tool_basename", so it can be a program name with args. +set dummy $tool_basename; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GUNZIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GUNZIP in + [\\/]* | ?:[\\/]*) + ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GUNZIP=$ac_cv_path_GUNZIP +if test -n "$GUNZIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5 +$as_echo "$GUNZIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$GUNZIP" = x; then + as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 + fi + else + # Otherwise we believe it is a complete path. Use it as it is. + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5 +$as_echo_n "checking for GUNZIP... " >&6; } + if test ! -x "$tool_specified"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 +$as_echo "$tool_specified" >&6; } + fi + fi + fi + + fi + + + + if test "x$GUNZIP" = x; then + as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5 + fi + + + + + + # Publish this variable in the help. + + + if [ -z "${GZIP+x}" ]; then + # The variable is not set by user, try to locate tool using the code snippet + for ac_prog in pigz gzip +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GZIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GZIP in + [\\/]* | ?:[\\/]*) + ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GZIP=$ac_cv_path_GZIP +if test -n "$GZIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5 +$as_echo "$GZIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$GZIP" && break +done + + else + # The variable is set, but is it from the command line or the environment? + + # Try to remove the string !GZIP! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/} + if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then + # If it failed, the variable was not from the command line. Ignore it, + # but warn the user (except for BASH, which is always set by the calling BASH). + if test "xGZIP" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;} + fi + # Try to locate tool using the code snippet + for ac_prog in pigz gzip +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GZIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GZIP in + [\\/]* | ?:[\\/]*) + ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GZIP=$ac_cv_path_GZIP +if test -n "$GZIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5 +$as_echo "$GZIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$GZIP" && break +done + + else + # If it succeeded, then it was overridden by the user. We will use it + # for the tool. + + # First remove it from the list of overridden variables, so we can test + # for unknown variables in the end. + CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" + + # Check if we try to supply an empty value + if test "x$GZIP" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5 +$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5 +$as_echo_n "checking for GZIP... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } + else + # Check if the provided tool contains a complete path. + tool_specified="$GZIP" + tool_basename="${tool_specified##*/}" + if test "x$tool_basename" = "x$tool_specified"; then + # A command without a complete path is provided, search $PATH. + { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;} + # Extract the first word of "$tool_basename", so it can be a program name with args. +set dummy $tool_basename; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GZIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GZIP in + [\\/]* | ?:[\\/]*) + ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GZIP=$ac_cv_path_GZIP +if test -n "$GZIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5 +$as_echo "$GZIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$GZIP" = x; then + as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 + fi + else + # Otherwise we believe it is a complete path. Use it as it is. + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5 +$as_echo_n "checking for GZIP... " >&6; } + if test ! -x "$tool_specified"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 +$as_echo "$tool_specified" >&6; } + fi + fi + fi + + fi + + + + if test "x$GZIP" = x; then + as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5 + fi + + + + + # Publish this variable in the help. @@ -10854,7 +11266,7 @@ $as_echo "$tool_specified" >&6; } if [ -z "${TAR+x}" ]; then # The variable is not set by user, try to locate tool using the code snippet - for ac_prog in tar + for ac_prog in gtar tar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -10912,7 +11324,7 @@ done $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;} fi # Try to locate tool using the code snippet - for ac_prog in tar + for ac_prog in gtar tar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -15428,6 +15840,23 @@ $as_echo "$COMPILE_TYPE" >&6; } fi + # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles + # Macosx is osx and x86_64 is x64 + if test "x$OPENJDK_TARGET_OS" = xmacosx; then + OPENJDK_TARGET_OS_BUNDLE="osx" + else + OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS" + fi + if test "x$OPENJDK_TARGET_CPU" = xx86_64; then + OPENJDK_TARGET_CPU_BUNDLE="x64" + else + OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU" + fi + OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}" + + + + if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then A_LP64="LP64:=" # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in @@ -15584,6 +16013,23 @@ $as_echo "$COMPILE_TYPE" >&6; } fi + # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles + # Macosx is osx and x86_64 is x64 + if test "x$OPENJDK_BUILD_OS" = xmacosx; then + OPENJDK_BUILD_OS_BUNDLE="osx" + else + OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS" + fi + if test "x$OPENJDK_BUILD_CPU" = xx86_64; then + OPENJDK_BUILD_CPU_BUNDLE="x64" + else + OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU" + fi + OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}" + + + + if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then A_LP64="LP64:=" # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in @@ -16297,7 +16743,10 @@ $as_echo "$JVM_VARIANTS" >&6; } # Check that the selected variants are valid # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326 - INVALID_VARIANTS=`$GREP -Fvx "${VALID_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"` + # Notice that the original variant failes on SLES 10 and 11 + NEEDLE=${VALID_JVM_VARIANTS// /$'\n'} + STACK=${JVM_VARIANTS// /$'\n'} + INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"` if test "x$INVALID_VARIANTS" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;} @@ -16306,7 +16755,9 @@ $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;} # All "special" variants share the same output directory ("server") VALID_MULTIPLE_JVM_VARIANTS="server client minimal" - INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"` + NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'} + STACK=${JVM_VARIANTS// /$'\n'} + INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"` if test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5 fi @@ -17016,9 +17467,6 @@ $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is inval # The spec.gmk file contains all variables for the make system. ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" - # The hotspot-spec.gmk file contains legacy variables for the hotspot make system. - ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" - # The bootcycle-spec.gmk file contains support for boot cycle builds. ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" @@ -20699,6 +21147,30 @@ $as_echo "yes" >&6; } + # Test which kind of tar was found + if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then + TAR_TYPE="gnu" + elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then + TAR_TYPE="bsd" + elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then + TAR_TYPE="solaris" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5 +$as_echo_n "checking what type of tar was found... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5 +$as_echo "$TAR_TYPE" >&6; } + + if test "x$TAR_TYPE" = "xgnu"; then + TAR_INCLUDE_PARAM="T" + TAR_SUPPORTS_TRANSFORM="true" + else + TAR_INCLUDE_PARAM="I" + TAR_SUPPORTS_TRANSFORM="false" + fi + + + + # These tools might not be installed by default, # need hint on how to install them. @@ -23790,9 +24262,6 @@ fi if test "x$OPENJDK_TARGET_OS" = xaix ; then INCLUDE_SA=false fi - if test "x$OPENJDK_TARGET_CPU" = xaarch64; then - INCLUDE_SA=false - fi # Compress jars @@ -52948,6 +53417,49 @@ fi + # Check whether --enable-hotspot-gtest was given. +if test "${enable_hotspot_gtest+set}" = set; then : + enableval=$enable_hotspot_gtest; +fi + + + if test -e "$HOTSPOT_TOPDIR/test/native"; then + GTEST_DIR_EXISTS="true" + else + GTEST_DIR_EXISTS="false" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5 +$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; } + if test "x$enable_hotspot_gtest" = "xyes"; then + if test "x$GTEST_DIR_EXISTS" = "xtrue"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5 +$as_echo "yes, forced" >&6; } + BUILD_GTEST="true" + else + as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5 + fi + elif test "x$enable_hotspot_gtest" = "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5 +$as_echo "no, forced" >&6; } + BUILD_GTEST="false" + elif test "x$enable_hotspot_gtest" = "x"; then + if test "x$GTEST_DIR_EXISTS" = "xtrue"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + BUILD_GTEST="true" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + BUILD_GTEST="false" + fi + else + as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5 + fi + + + + ############################################################################### # # Check dependencies for external and internal libraries. @@ -64076,6 +64588,157 @@ fi + if test "$OPENJDK_TARGET_OS" = "solaris"; then + # Find the root of the Solaris Studio installation from the compiler path + SOLARIS_STUDIO_DIR="$(dirname $CC)/.." + STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5 +$as_echo_n "checking for libstlport.so.1... " >&6; } + if test -f "$STLPORT_LIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5 +$as_echo "yes, $STLPORT_LIB" >&6; } + + # Only process if variable expands to non-empty + + if test "x$STLPORT_LIB" != x; then + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + + # Input might be given as Windows format, start by converting to + # unix format. + path="$STLPORT_LIB" + new_path=`$CYGPATH -u "$path"` + + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then + # "foo.exe" is OK but "foo" is an error. + # + # This test is therefore slightly more accurate than "test -f" to check for file precense. + # It is also a way to make sure we got the proper file name for the real test later on. + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` + if test "x$test_shortpath" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5 + fi + + # Call helper function which possibly converts this using DOS-style short mode. + # If so, the updated path is stored in $new_path. + + input_path="$new_path" + # Check if we need to convert this using DOS-style short mode. If the path + # contains just simple characters, use it. Otherwise (spaces, weird characters), + # take no chances and rewrite it. + # Note: m4 eats our [], so we need to use [ and ] instead. + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` + if test "x$has_forbidden_chars" != x; then + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) + shortmode_path=`$CYGPATH -s -m -a "$input_path"` + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then + # Going to short mode and back again did indeed matter. Since short mode is + # case insensitive, let's make it lowercase to improve readability. + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Now convert it back to Unix-style (cygpath) + input_path=`$CYGPATH -u "$shortmode_path"` + new_path="$input_path" + fi + fi + + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` + if test "x$test_cygdrive_prefix" = x; then + # As a simple fix, exclude /usr/bin since it's not a real path. + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then + # The path is in a Cygwin special directory (e.g. /home). We need this converted to + # a path prefixed by /cygdrive for fixpath to work. + new_path="$CYGWIN_ROOT_PATH$input_path" + fi + fi + + + if test "x$path" != "x$new_path"; then + STLPORT_LIB="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$STLPORT_LIB" + has_colon=`$ECHO $path | $GREP ^.:` + new_path="$path" + if test "x$has_colon" = x; then + # Not in mixed or Windows style, start by that. + new_path=`cmd //c echo $path` + fi + + + input_path="$new_path" + # Check if we need to convert this using DOS-style short mode. If the path + # contains just simple characters, use it. Otherwise (spaces, weird characters), + # take no chances and rewrite it. + # Note: m4 eats our [], so we need to use [ and ] instead. + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` + if test "x$has_forbidden_chars" != x; then + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + fi + + + windows_path="$new_path" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + new_path="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + new_path="$unix_path" + fi + + if test "x$path" != "x$new_path"; then + STLPORT_LIB="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;} + fi + + # Save the first 10 bytes of this path to the storage, so fixpath can work. + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") + + else + # We're on a unix platform. Hooray! :) + path="$STLPORT_LIB" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 + fi + + # Use eval to expand a potential ~ + eval path="$path" + if test ! -f "$path" && test ! -d "$path"; then + as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + if test -d "$path"; then + STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`" + else + dir="`$DIRNAME "$path"`" + base="`$BASENAME "$path"`" + STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base" + fi + fi + fi + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5 +$as_echo "no, not found at $STLPORT_LIB" >&6; } + as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5 + fi + + fi + + + @@ -64094,144 +64757,6 @@ fi ############################################################################### - # Check whether --enable-new-hotspot-build was given. -if test "${enable_new_hotspot_build+set}" = set; then : - enableval=$enable_new_hotspot_build; -fi - - - if test "x$enable_new_hotspot_build" = "x" || test "x$enable_new_hotspot_build" = "xyes"; then - USE_NEW_HOTSPOT_BUILD=true - else - USE_NEW_HOTSPOT_BUILD=false - fi - - - case $HOTSPOT_DEBUG_LEVEL in - product ) - VARIANT="OPT" - FASTDEBUG="false" - DEBUG_CLASSFILES="false" - ;; - fastdebug ) - VARIANT="DBG" - FASTDEBUG="true" - DEBUG_CLASSFILES="true" - ;; - debug ) - VARIANT="DBG" - FASTDEBUG="false" - DEBUG_CLASSFILES="true" - ;; - optimized ) - VARIANT="OPT" - FASTDEBUG="false" - DEBUG_CLASSFILES="false" - ;; - esac - - - - - if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then - MACOSX_UNIVERSAL="true" - fi - - - - # Make sure JVM_VARIANTS_COMMA use minimal1 for backwards compatibility - JVM_VARIANTS_COMMA=`$ECHO ,$JVM_VARIANTS_OPT, | $SED -e 's/,minimal,/,minimal1,/'` - - JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'` - JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` - JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,minimal1\?,/!s/.*/false/g' -e '/,minimal1\?,/s/.*/true/g'` - JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'` - JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'` - JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` - JVM_VARIANT_CUSTOM=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,custom,/!s/.*/false/g' -e '/,custom,/s/.*/true/g'` - - ##### - # Generate the legacy makefile targets for hotspot. - HOTSPOT_TARGET="" - - if test "x$JVM_VARIANT_SERVER" = xtrue; then - HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} " - fi - - if test "x$JVM_VARIANT_CLIENT" = xtrue; then - HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 " - fi - - if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then - HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 " - fi - - if test "x$JVM_VARIANT_ZERO" = xtrue; then - HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero " - fi - - if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then - HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark " - fi - - if test "x$JVM_VARIANT_CORE" = xtrue; then - HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core " - fi - - HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_DEBUG_LEVEL" - - # On Macosx universal binaries are produced, but they only contain - # 64 bit intel. This invalidates control of which jvms are built - # from configure, but only server is valid anyway. Fix this - # when hotspot makefiles are rewritten. - if test "x$MACOSX_UNIVERSAL" = xtrue; then - HOTSPOT_TARGET=universal_${HOTSPOT_DEBUG_LEVEL} - fi - - HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET" - - - # Control wether Hotspot runs Queens test after build. - # Check whether --enable-hotspot-test-in-build was given. -if test "${enable_hotspot_test_in_build+set}" = set; then : - enableval=$enable_hotspot_test_in_build; -else - enable_hotspot_test_in_build=no -fi - - if test "x$enable_hotspot_test_in_build" = "xyes"; then - TEST_IN_BUILD=true - else - TEST_IN_BUILD=false - fi - - - if test "x$USE_NEW_HOTSPOT_BUILD" = xfalse; then - if test "x$JVM_VARIANT_CLIENT" = xtrue; then - if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then - as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5 - fi - fi - if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then - if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then - as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5 - fi - fi - if test "x$JVM_VARIANT_CUSTOM" = xtrue; then - as_fn_error $? "You cannot build a custom JVM using the old hotspot build system." "$LINENO" 5 - fi - fi - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; } @@ -65977,7 +66502,9 @@ $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; } JVM_FEATURES_TO_TEST=${!features_var_name} { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5 $as_echo "$JVM_FEATURES_TO_TEST" >&6; } - INVALID_FEATURES=`$GREP -Fvx "${VALID_JVM_FEATURES// /$'\n'}" <<< "${JVM_FEATURES_TO_TEST// /$'\n'}"` + NEEDLE=${VALID_JVM_FEATURES// /$'\n'} + STACK=${JVM_FEATURES_TO_TEST// /$'\n'} + INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"` if test "x$INVALID_FEATURES" != x; then as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5 fi @@ -66697,7 +67224,6 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;; - "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;; "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;; "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;; "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;; diff --git a/common/autoconf/hotspot-spec.gmk.in b/common/autoconf/hotspot-spec.gmk.in deleted file mode 100644 index 50d790876a6..00000000000 --- a/common/autoconf/hotspot-spec.gmk.in +++ /dev/null @@ -1,158 +0,0 @@ -# -# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - - -# Chaining of spec files -HOTSPOT_SPEC:=$(dir $(SPEC))hotspot-spec.gmk -override SPEC=$(HOTSPOT_SPEC) -# Now include the base spec.gmk file -include $(BASE_SPEC) - -# Additional legacy variables defined for Hotspot - -@SET_OPENJDK@ -@HOTSPOT_SET_WARNINGS_AS_ERRORS@ - -# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options. -@BUILD_HEADLESS@ - -JVM_VARIANTS:=@JVM_VARIANTS_COMMA@ - -JVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@ -JVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@ -JVM_VARIANT_MINIMAL1:=@JVM_VARIANT_MINIMAL1@ -JVM_VARIANT_CORE:=@JVM_VARIANT_CORE@ -JVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@ -JVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@ -JVM_VARIANT_CUSTOM:=@JVM_VARIANT_HOTSPOT@ - -# Legacy setting: OPT or DBG -VARIANT:=@VARIANT@ -# Legacy setting: true or false -FASTDEBUG:=@FASTDEBUG@ -# Legacy setting: debugging the class files? -DEBUG_CLASSFILES:=@DEBUG_CLASSFILES@ - -ALT_CUPS_HEADERS_PATH:=$(patsubst -I%,%,$(filter -I%,@CUPS_CFLAGS@)) - -# The HOSTCC/HOSTCXX is Hotspot terminology for the BUILD_CC/BUILD_CXX, i.e. the -# compiler that produces code that can be run on the build platform. -HOSTCC:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CC@ $(BUILD_SYSROOT_CFLAGS) -HOSTCXX:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CXX@ $(BUILD_SYSROOT_CFLAGS) - -#################################################### -# -# Legacy Hotspot support - -# If cross compiling, then define CROSS_COMPILE_ARCH:=cpu_name here. -@DEFINE_CROSS_COMPILE_ARCH@ - -# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc) -PLATFORM=$(OPENJDK_TARGET_OS) -# 32 or 64 bit -ARCH_DATA_MODEL=$(OPENJDK_TARGET_CPU_BITS) - -ALT_BOOTDIR=$(BOOT_JDK) -# Can be /sparcv9 or /amd64 on Solaris -ISA_DIR=$(OPENJDK_TARGET_CPU_ISADIR) -# Yet another name for arch used for an extra subdir below the jvm lib. -# Uses i386 and amd64, instead of x86 and x86_64. -LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB) -# Set the cpu architecture -ARCH=$(OPENJDK_TARGET_CPU_ARCH) -# Legacy setting for building for a 64 bit machine. -# If yes then this expands to _LP64:=1 -@LP64@ - -# Legacy settings for zero -ZERO_ENDIANNESS=$(OPENJDK_TARGET_CPU_ENDIAN) -ZERO_LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB) -ZERO_ARCHDEF=@ZERO_ARCHDEF@ -ZERO_ARCHFLAG=@ZERO_ARCHFLAG@ -LIBFFI_CFLAGS=@LIBFFI_CFLAGS@ -LIBFFI_LIBS=@LIBFFI_LIBS@ - -# Legacy settings for zeroshark -LLVM_CFLAGS=@LLVM_CFLAGS@ -LLVM_LIBS=@LLVM_LIBS@ -LLVM_LDFLAGS=@LLVM_LDFLAGS@ - -ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR) -ALT_EXPORT_PATH=$(HOTSPOT_DIST) - -ifeq ($(HOTSPOT_TARGET_CPU), zero) - CC_INTERP=true -endif - -HOTSPOT_MAKE_ARGS:=@HOTSPOT_MAKE_ARGS@ @STATIC_CXX_SETTING@ -# Control wether Hotspot runs Queens test after building -TEST_IN_BUILD=@TEST_IN_BUILD@ - -USE_CLANG := @USE_CLANG@ - -# For hotspot, override compiler/tools definition to not include FIXPATH prefix. -# Hotspot has its own handling on the Windows path situation. -CXX:=@CCACHE@ @ICECC@ @HOTSPOT_CXX@ -LD:=@HOTSPOT_LD@ -MT:=@HOTSPOT_MT@ -RC:=@HOTSPOT_RC@ - -EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@ $(CFLAGS_CCACHE) $(NO_NULL_POINTER_CHECK_FLAG) \ - $(NO_LIFETIME_DSE_CFLAG) $(CXXSTD_CXXFLAG) -EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@ $(CFLAGS_CCACHE) -EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@ - -USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@ - -# Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols -# creation. -ifeq ($(COPY_DEBUG_SYMBOLS), true) - FULL_DEBUG_SYMBOLS=1 - # Ensure hotspot uses the objcopy that configure located - ALT_OBJCOPY:=$(OBJCOPY) -else - FULL_DEBUG_SYMBOLS=0 -endif - -# Hotspot expects the variable ZIP_DEBUGINFO_FILES=1/0 and not true/false. -ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true) - ZIP_DEBUGINFO_FILES:=1 -else - ZIP_DEBUGINFO_FILES:=0 -endif - -DEBUG_BINARIES := @DEBUG_BINARIES@ -STRIP_POLICY := @STRIP_POLICY@ - -ifeq ($(OPENJDK_TARGET_OS), windows) - # On Windows, the Visual Studio toolchain needs the LIB and INCLUDE - # environment variables (in Windows path style). - export INCLUDE:=@VS_INCLUDE@ - export LIB:=@VS_LIB@ -endif - -# Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files. -# This is needed to get the LOG setting to work properly. -include $(SRC_ROOT)/make/common/MakeBase.gmk diff --git a/common/autoconf/hotspot.m4 b/common/autoconf/hotspot.m4 index 4fffa86983d..18b6ec0aa21 100644 --- a/common/autoconf/hotspot.m4 +++ b/common/autoconf/hotspot.m4 @@ -93,7 +93,10 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS], # Check that the selected variants are valid # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326 - INVALID_VARIANTS=`$GREP -Fvx "${VALID_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"` + # Notice that the original variant failes on SLES 10 and 11 + NEEDLE=${VALID_JVM_VARIANTS// /$'\n'} + STACK=${JVM_VARIANTS// /$'\n'} + INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"` if test "x$INVALID_VARIANTS" != x; then AC_MSG_NOTICE([Unknown variant(s) specified: $INVALID_VARIANTS]) AC_MSG_ERROR([The available JVM variants are: $VALID_JVM_VARIANTS]) @@ -101,7 +104,9 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS], # All "special" variants share the same output directory ("server") VALID_MULTIPLE_JVM_VARIANTS="server client minimal" - INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"` + NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'} + STACK=${JVM_VARIANTS// /$'\n'} + INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"` if test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then AC_MSG_ERROR([You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS.]) fi @@ -293,146 +298,51 @@ AC_DEFUN_ONCE([HOTSPOT_VALIDATE_JVM_FEATURES], features_var_name=JVM_FEATURES_$variant JVM_FEATURES_TO_TEST=${!features_var_name} AC_MSG_RESULT([$JVM_FEATURES_TO_TEST]) - INVALID_FEATURES=`$GREP -Fvx "${VALID_JVM_FEATURES// /$'\n'}" <<< "${JVM_FEATURES_TO_TEST// /$'\n'}"` + NEEDLE=${VALID_JVM_FEATURES// /$'\n'} + STACK=${JVM_FEATURES_TO_TEST// /$'\n'} + INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"` if test "x$INVALID_FEATURES" != x; then AC_MSG_ERROR([Invalid JVM feature(s): $INVALID_FEATURES]) fi done ]) -############################################################################### -# Support for old hotspot build. Remove once new hotspot build has proven -# to work satisfactory. +################################################################################ +# Check if gtest should be built # -AC_DEFUN_ONCE([HOTSPOT_SETUP_LEGACY_BUILD], +AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_GTEST], [ - AC_ARG_ENABLE(new-hotspot-build, [AS_HELP_STRING([--disable-new-hotspot-build], - [disable the new hotspot build system (use the old) @<:@enabled@:>@])]) + AC_ARG_ENABLE([hotspot-gtest], [AS_HELP_STRING([--disable-hotspot-gtest], + [Disables building of the Hotspot unit tests])]) - if test "x$enable_new_hotspot_build" = "x" || test "x$enable_new_hotspot_build" = "xyes"; then - USE_NEW_HOTSPOT_BUILD=true - else - USE_NEW_HOTSPOT_BUILD=false - fi - AC_SUBST(USE_NEW_HOTSPOT_BUILD) - - case $HOTSPOT_DEBUG_LEVEL in - product ) - VARIANT="OPT" - FASTDEBUG="false" - DEBUG_CLASSFILES="false" - ;; - fastdebug ) - VARIANT="DBG" - FASTDEBUG="true" - DEBUG_CLASSFILES="true" - ;; - debug ) - VARIANT="DBG" - FASTDEBUG="false" - DEBUG_CLASSFILES="true" - ;; - optimized ) - VARIANT="OPT" - FASTDEBUG="false" - DEBUG_CLASSFILES="false" - ;; - esac - AC_SUBST(VARIANT) - AC_SUBST(FASTDEBUG) - AC_SUBST(DEBUG_CLASSFILES) - - if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then - MACOSX_UNIVERSAL="true" - fi - - AC_SUBST(MACOSX_UNIVERSAL) - - # Make sure JVM_VARIANTS_COMMA use minimal1 for backwards compatibility - JVM_VARIANTS_COMMA=`$ECHO ,$JVM_VARIANTS_OPT, | $SED -e 's/,minimal,/,minimal1,/'` - - JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'` - JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` - JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,minimal1\?,/!s/.*/false/g' -e '/,minimal1\?,/s/.*/true/g'` - JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'` - JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'` - JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` - JVM_VARIANT_CUSTOM=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,custom,/!s/.*/false/g' -e '/,custom,/s/.*/true/g'` - - ##### - # Generate the legacy makefile targets for hotspot. - HOTSPOT_TARGET="" - - if test "x$JVM_VARIANT_SERVER" = xtrue; then - HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} " - fi - - if test "x$JVM_VARIANT_CLIENT" = xtrue; then - HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 " - fi - - if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then - HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 " - fi - - if test "x$JVM_VARIANT_ZERO" = xtrue; then - HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero " - fi - - if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then - HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark " - fi - - if test "x$JVM_VARIANT_CORE" = xtrue; then - HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core " - fi - - HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_DEBUG_LEVEL" - - # On Macosx universal binaries are produced, but they only contain - # 64 bit intel. This invalidates control of which jvms are built - # from configure, but only server is valid anyway. Fix this - # when hotspot makefiles are rewritten. - if test "x$MACOSX_UNIVERSAL" = xtrue; then - HOTSPOT_TARGET=universal_${HOTSPOT_DEBUG_LEVEL} - fi - - HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET" - AC_SUBST(HOTSPOT_MAKE_ARGS) - - # Control wether Hotspot runs Queens test after build. - AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build], - [run the Queens test after Hotspot build @<:@disabled@:>@])],, - [enable_hotspot_test_in_build=no]) - if test "x$enable_hotspot_test_in_build" = "xyes"; then - TEST_IN_BUILD=true + if test -e "$HOTSPOT_TOPDIR/test/native"; then + GTEST_DIR_EXISTS="true" else - TEST_IN_BUILD=false - fi - AC_SUBST(TEST_IN_BUILD) - - if test "x$USE_NEW_HOTSPOT_BUILD" = xfalse; then - if test "x$JVM_VARIANT_CLIENT" = xtrue; then - if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then - AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.]) - fi - fi - if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then - if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then - AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.]) - fi - fi - if test "x$JVM_VARIANT_CUSTOM" = xtrue; then - AC_MSG_ERROR([You cannot build a custom JVM using the old hotspot build system.]) - fi + GTEST_DIR_EXISTS="false" fi - AC_SUBST(JVM_VARIANTS_COMMA) - AC_SUBST(JVM_VARIANT_SERVER) - AC_SUBST(JVM_VARIANT_CLIENT) - AC_SUBST(JVM_VARIANT_MINIMAL1) - AC_SUBST(JVM_VARIANT_HOTSPOT) - AC_SUBST(JVM_VARIANT_ZERO) - AC_SUBST(JVM_VARIANT_ZEROSHARK) - AC_SUBST(JVM_VARIANT_CORE) + AC_MSG_CHECKING([if Hotspot gtest unit tests should be built]) + if test "x$enable_hotspot_gtest" = "xyes"; then + if test "x$GTEST_DIR_EXISTS" = "xtrue"; then + AC_MSG_RESULT([yes, forced]) + BUILD_GTEST="true" + else + AC_MSG_ERROR([Cannot build gtest without the test source]) + fi + elif test "x$enable_hotspot_gtest" = "xno"; then + AC_MSG_RESULT([no, forced]) + BUILD_GTEST="false" + elif test "x$enable_hotspot_gtest" = "x"; then + if test "x$GTEST_DIR_EXISTS" = "xtrue"; then + AC_MSG_RESULT([yes]) + BUILD_GTEST="true" + else + AC_MSG_RESULT([no]) + BUILD_GTEST="false" + fi + else + AC_MSG_ERROR([--enable-gtest must be either yes or no]) + fi + + AC_SUBST(BUILD_GTEST) ]) diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4 index e34e4d927dd..076b6cfaa09 100644 --- a/common/autoconf/jdk-options.m4 +++ b/common/autoconf/jdk-options.m4 @@ -209,9 +209,6 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS], if test "x$OPENJDK_TARGET_OS" = xaix ; then INCLUDE_SA=false fi - if test "x$OPENJDK_TARGET_CPU" = xaarch64; then - INCLUDE_SA=false - fi AC_SUBST(INCLUDE_SA) # Compress jars diff --git a/common/autoconf/libraries.m4 b/common/autoconf/libraries.m4 index e1e91d678d6..4238a17fe82 100644 --- a/common/autoconf/libraries.m4 +++ b/common/autoconf/libraries.m4 @@ -95,6 +95,7 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES], LIB_SETUP_LLVM LIB_SETUP_BUNDLED_LIBS LIB_SETUP_MISC_LIBS + LIB_SETUP_SOLARIS_STLPORT ]) ################################################################################ @@ -189,3 +190,26 @@ AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS], LIBZIP_CAN_USE_MMAP=true AC_SUBST(LIBZIP_CAN_USE_MMAP) ]) + +################################################################################ +# libstlport.so.1 is needed for running gtest on Solaris. Find it to +# redistribute it in the test image. +################################################################################ +AC_DEFUN_ONCE([LIB_SETUP_SOLARIS_STLPORT], +[ + if test "$OPENJDK_TARGET_OS" = "solaris"; then + # Find the root of the Solaris Studio installation from the compiler path + SOLARIS_STUDIO_DIR="$(dirname $CC)/.." + STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1" + AC_MSG_CHECKING([for libstlport.so.1]) + if test -f "$STLPORT_LIB"; then + AC_MSG_RESULT([yes, $STLPORT_LIB]) + BASIC_FIXUP_PATH([STLPORT_LIB]) + else + AC_MSG_RESULT([no, not found at $STLPORT_LIB]) + AC_MSG_ERROR([Failed to find libstlport.so.1, cannot build Hotspot gtests]) + fi + AC_SUBST(STLPORT_LIB) + fi +]) + diff --git a/common/autoconf/platform.m4 b/common/autoconf/platform.m4 index 2e99c452694..2fbac1d0dd3 100644 --- a/common/autoconf/platform.m4 +++ b/common/autoconf/platform.m4 @@ -366,6 +366,23 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER], fi AC_SUBST(OPENJDK_$1_OS_EXPORT_DIR) + # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles + # Macosx is osx and x86_64 is x64 + if test "x$OPENJDK_$1_OS" = xmacosx; then + OPENJDK_$1_OS_BUNDLE="osx" + else + OPENJDK_$1_OS_BUNDLE="$OPENJDK_TARGET_OS" + fi + if test "x$OPENJDK_$1_CPU" = xx86_64; then + OPENJDK_$1_CPU_BUNDLE="x64" + else + OPENJDK_$1_CPU_BUNDLE="$OPENJDK_$1_CPU" + fi + OPENJDK_$1_BUNDLE_PLATFORM="${OPENJDK_$1_OS_BUNDLE}-${OPENJDK_$1_CPU_BUNDLE}" + AC_SUBST(OPENJDK_$1_OS_BUNDLE) + AC_SUBST(OPENJDK_$1_CPU_BUNDLE) + AC_SUBST(OPENJDK_$1_BUNDLE_PLATFORM) + if test "x$OPENJDK_$1_CPU_BITS" = x64; then A_LP64="LP64:=" # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in index 467cc304b20..cace1439818 100644 --- a/common/autoconf/spec.gmk.in +++ b/common/autoconf/spec.gmk.in @@ -89,6 +89,10 @@ HOTSPOT_TARGET_CPU := @HOTSPOT_TARGET_CPU@ HOTSPOT_TARGET_CPU_ARCH := @HOTSPOT_TARGET_CPU_ARCH@ HOTSPOT_TARGET_CPU_DEFINE := @HOTSPOT_TARGET_CPU_DEFINE@ +OPENJDK_TARGET_CPU_BUNDLE:=@OPENJDK_TARGET_CPU_BUNDLE@ +OPENJDK_TARGET_OS_BUNDLE:=@OPENJDK_TARGET_OS_BUNDLE@ +OPENJDK_TARGET_BUNDLE_PLATFORM:=@OPENJDK_TARGET_BUNDLE_PLATFORM@ + # We are building on this build system. # When not cross-compiling, it is the same as the target. OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@ @@ -232,6 +236,9 @@ JVM_FEATURES_custom := @JVM_FEATURES_custom@ VALID_JVM_FEATURES := @VALID_JVM_FEATURES@ VALID_JVM_VARIANTS := @VALID_JVM_VARIANTS@ +# Control wether Hotspot builds gtest tests +BUILD_GTEST := @BUILD_GTEST@ + # Control use of precompiled header in hotspot libjvm build USE_PRECOMPILED_HEADER := @USE_PRECOMPILED_HEADER@ @@ -265,6 +272,7 @@ BUILDTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/buildtools HOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot JDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images +BUNDLES_OUTPUTDIR=$(BUILD_OUTPUT)/bundles TESTMAKE_OUTPUTDIR=$(BUILD_OUTPUT)/test-make MAKESUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/make-support # This does not get overridden in a bootcycle build @@ -629,6 +637,7 @@ ECHO:=@ECHO@ EGREP:=@EGREP@ FGREP:=@FGREP@ GREP:=@GREP@ +GZIP:=@GZIP@ HEAD:=@HEAD@ LS:=@LS@ LN:=@LN@ @@ -676,6 +685,9 @@ XCODEBUILD=@XCODEBUILD@ DTRACE := @DTRACE@ FIXPATH:=@FIXPATH@ +TAR_INCLUDE_PARAM:=@TAR_INCLUDE_PARAM@ +TAR_SUPPORTS_TRANSFORM:=@TAR_SUPPORTS_TRANSFORM@ + # Build setup ENABLE_JFR=@ENABLE_JFR@ ENABLE_INTREE_EC=@ENABLE_INTREE_EC@ @@ -685,6 +697,7 @@ USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@ LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@ MSVCR_DLL:=@MSVCR_DLL@ MSVCP_DLL:=@MSVCP_DLL@ +STLPORT_LIB:=@STLPORT_LIB@ #################################################### # @@ -781,11 +794,46 @@ SYMBOLS_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(SYMBOLS_IMAGE_SUBDIR) # Interim image INTERIM_IMAGE_DIR := $(SUPPORT_OUTPUTDIR)/interim-image +# Docs image +DOCS_IMAGE_SUBDIR := docs +DOCS_IMAGE_DIR := $(IMAGES_OUTPUTDIR)/$(DOCS_IMAGE_SUBDIR) + # Macosx bundles directory definitions -JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle/jdk-$(VERSION_NUMBER).jdk/Contents -JRE_MACOSX_BUNDLE_SUBDIR=jre-bundle/jre-$(VERSION_NUMBER).jre/Contents +JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle +JRE_MACOSX_BUNDLE_SUBDIR=jre-bundle JDK_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR) JRE_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR) +JDK_MACOSX_CONTENTS_SUBDIR=jdk-$(VERSION_NUMBER).jdk/Contents +JRE_MACOSX_CONTENTS_SUBDIR=jre-$(VERSION_NUMBER).jre/Contents +JDK_MACOSX_CONTENTS_DIR=$(JDK_MACOSX_BUNDLE_DIR)/$(JDK_MACOSX_CONTENTS_SUBDIR) +JRE_MACOSX_CONTENTS_DIR=$(JRE_MACOSX_BUNDLE_DIR)/$(JRE_MACOSX_CONTENTS_SUBDIR) + +# Bundle names +BASE_NAME := $(VERSION_SHORT)+$(VERSION_BUILD)_$(OPENJDK_TARGET_BUNDLE_PLATFORM) +ifeq ($(DEBUG_LEVEL), fastdebug) + DEBUG_PART := -debug +else ifneq ($(DEBUG_LEVEL), release) + DEBUG_PART := -$(DEBUG_LEVEL) +endif +JDK_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART).tar.gz +JRE_BUNDLE_NAME := jre-$(BASE_NAME)_bin$(DEBUG_PART).tar.gz +JDK_SYMBOLS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz +JRE_SYMBOLS_BUNDLE_NAME := jre-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz +ifeq ($(OPENJDK_TARGET_OS), windows) + DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_demo$(DEBUG_PART).zip +else + DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_demo$(DEBUG_PART).tar.gz +endif +TEST_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz +DOCS_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz + +JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_BUNDLE_NAME) +JRE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JRE_BUNDLE_NAME) +JDK_SYMBOLS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_SYMBOLS_BUNDLE_NAME) +JRE_SYMBOLS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JRE_SYMBOLS_BUNDLE_NAME) +DEMOS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DEMOS_BUNDLE_NAME) +TEST_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_BUNDLE_NAME) +DOCS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_BUNDLE_NAME) # This macro is called to allow inclusion of closed source counterparts. # Unless overridden in closed sources, it expands to nothing. diff --git a/common/bin/compare.sh b/common/bin/compare.sh index db73426481d..0126b9c23ce 100644 --- a/common/bin/compare.sh +++ b/common/bin/compare.sh @@ -274,14 +274,19 @@ compare_file_types() { $MKDIR -p $WORK_DIR + FILE_TYPES_FILTER="$SED \ + -e 's/BuildID[^,]*//' \ + -e 's/last modified: .*//' \ + " + echo -n File types... found="" for f in `cd $OTHER_DIR && $FIND . ! -type d` do if [ ! -f ${OTHER_DIR}/$f ]; then continue; fi if [ ! -f ${THIS_DIR}/$f ]; then continue; fi - OF=`cd ${OTHER_DIR} && $FILE -h $f | $SED 's/BuildID[^,]*//g'` - TF=`cd ${THIS_DIR} && $FILE -h $f | $SED 's/BuildID[^,]*//g'` + OF=$(cd ${OTHER_DIR} && $FILE -h $f | eval $FILE_TYPES_FILTER) + TF=$(cd ${THIS_DIR} && $FILE -h $f | eval $FILE_TYPES_FILTER) if [ "$OF" != "$TF" ] then if [ "`echo $OF | $GREP -c 'Zip archive data'`" -gt 0 ] \ @@ -320,7 +325,7 @@ compare_general_files() { ! -name "*.obj" ! -name "*.o" ! -name "JavaControlPanelHelper" \ ! -name "JavaUpdater" ! -name "JavaWSApplicationStub" \ ! -name "jspawnhelper" ! -name "JavawsLauncher" ! -name "*.a" \ - ! -name "finish_installation" ! -name "Sparkle" \ + ! -name "finish_installation" ! -name "Sparkle" ! -name "*.tar.gz" \ | $GREP -v "./bin/" | $SORT | $FILTER) echo Other files with binary differences... @@ -423,6 +428,10 @@ compare_zip_file() { then (cd $THIS_UNZIPDIR && $UNARCHIVE $THIS_ZIP) (cd $OTHER_UNZIPDIR && $UNARCHIVE $OTHER_ZIP) + elif [ "$TYPE" = "gz" ] + then + (cd $THIS_UNZIPDIR && $GUNZIP -c $THIS_ZIP | $TAR xf -) + (cd $OTHER_UNZIPDIR && $GUNZIP -c $OTHER_ZIP | $TAR xf -) else (cd $THIS_UNZIPDIR && $JIMAGE extract $THIS_ZIP) (cd $OTHER_UNZIPDIR && $JIMAGE extract $OTHER_ZIP) @@ -526,10 +535,11 @@ compare_all_zip_files() { OTHER_DIR=$2 WORK_DIR=$3 - ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.zip" | $SORT | $FILTER ) + ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.zip" -o -name "*.tar.gz" \ + | $SORT | $FILTER ) if [ -n "$ZIPS" ]; then - echo Zip files... + echo Zip/tar.gz files... return_value=0 for f in $ZIPS; do @@ -913,7 +923,7 @@ compare_bin_file() { FULLDUMP_MSG=" " DIFF_FULLDUMP= if [[ "$KNOWN_FULLDUMP_DIFF $ACCEPTED_FULLDUMP_DIFF" = *"$BIN_FILE"* ]]; then - FULLDUMP_MSG=" ! " + FULLDUMP_MSG=" ! " fi fi fi diff --git a/common/bin/idea.sh b/common/bin/idea.sh index 911d309c070..2cd6f92bbb9 100644 --- a/common/bin/idea.sh +++ b/common/bin/idea.sh @@ -155,6 +155,14 @@ addBuildDir() { printf "%s\n" "$mn" >> $IDEA_ANT } +JTREG_HOME=" " + +addJtregHome() { + DIR=`dirname $SPEC` + mn="`echo "$JTREG_HOME" | sed -e s@"\(.*\)####\(.*\)"@"\1$JT_HOME\2"@`" + printf "%s\n" "$mn" >> $IDEA_ANT +} + ### Generate ant.xml rm -f $IDEA_ANT @@ -162,6 +170,8 @@ while IFS= read -r line do if echo "$line" | egrep "^ .* /dev/null ; then addModuleName + elif echo "$line" | egrep "^ .* /dev/null ; then + addJtregHome elif echo "$line" | egrep "^ .* /dev/null ; then addBuildDir else diff --git a/common/conf/jib-profiles.js b/common/conf/jib-profiles.js index 2b7164741b1..2d752fd1074 100644 --- a/common/conf/jib-profiles.js +++ b/common/conf/jib-profiles.js @@ -215,11 +215,11 @@ var getJibProfilesCommon = function (input) { var common = {}; common.dependencies = ["boot_jdk", "gnumake", "jtreg"], - common.default_make_targets = ["product-images", "test-image"], + common.default_make_targets = ["product-bundles", "test-bundles"], common.default_make_targets_debug = common.default_make_targets; common.default_make_targets_slowdebug = common.default_make_targets; common.configure_args = ["--enable-jtreg-failure-handler"], - common.configure_args_32bit = ["--with-target-bits=32", "--with-jvm-variants=client,server"], + common.configure_args_32bit = ["--with-target-bits=32"], common.configure_args_debug = ["--enable-debug"], common.configure_args_slowdebug = ["--with-debug-level=slowdebug"], common.organization = "jpg.infra.builddeps" @@ -245,7 +245,7 @@ var getJibProfilesProfiles = function (input, common) { target_cpu: "x64", dependencies: concat(common.dependencies, "devkit"), configure_args: concat(common.configure_args, "--with-zlib=system"), - default_make_targets: concat(common.default_make_targets, "docs-image") + default_make_targets: concat(common.default_make_targets, "docs-bundles") }, "linux-x86": { @@ -254,7 +254,7 @@ var getJibProfilesProfiles = function (input, common) { build_cpu: "x64", dependencies: concat(common.dependencies, "devkit"), configure_args: concat(common.configure_args, common.configure_args_32bit, - "--with-zlib=system"), + "--with-jvm-variants=minimal,client,server", "--with-zlib=system"), default_make_targets: common.default_make_targets }, @@ -295,7 +295,8 @@ var getJibProfilesProfiles = function (input, common) { target_cpu: "x86", build_cpu: "x64", dependencies: concat(common.dependencies, "devkit", "freetype"), - configure_args: concat(common.configure_args, common.configure_args_32bit), + configure_args: concat(common.configure_args, + "--with-jvm-variants=client,server", common.configure_args_32bit), default_make_targets: common.default_make_targets } }; diff --git a/make/Bundles.gmk b/make/Bundles.gmk new file mode 100644 index 00000000000..140f31afcf2 --- /dev/null +++ b/make/Bundles.gmk @@ -0,0 +1,300 @@ +# +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +default: all + +include $(SPEC) +include MakeBase.gmk + +PRODUCT_TARGETS := +TEST_TARGETS := +DOCS_TARGETS := + +# On Windows tar frequently complains that "file changed as we read it" for +# some random source files. This seems to be cause by anti virus scanners and +# is most likely safe to ignore. When it happens, tar returns '1'. +ifeq ($(OPENJDK_BUILD_OS), windows) + TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1" +endif + +# Hook to include the corresponding custom file, if present. +$(eval $(call IncludeCustomExtension, , Bundles-pre.gmk)) +################################################################################ +# BUNDLE : Name of bundle to create +# FILES : Files in BASE_DIR to add to bundle +# SPECIAL_INCLUDES : List of directories inside BASE_DIR to look for additional +# files in. These files will not get proper dependency handling. Use when +# files or directories may contain spaces. +# BASE_DIR : Base directory for the root dir in the bundle. +# SUBDIR : Optional name of root dir in bundle. +SetupBundleFile = $(NamedParamsMacroTemplate) +define SetupBundleFileBody + + $1_RELATIVE_FILES := $$(patsubst $$($1_BASE_DIR)/%, ./%, $$($1_FILES)) + + ifneq ($$(filter %.tar.gz, $$($1_BUNDLE_NAME)), ) + $1_TYPE := tar.gz + else ifneq ($$(filter %.zip, $$($1_BUNDLE_NAME)), ) + $1_TYPE := zip + else + $$(error Unknown bundle type $$($1_BUNDLE_NAME)) + endif + + $$(call SetIfEmpty, $1_UNZIP_DEBUGINFO, false) + + $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME): $$($1_FILES) + $$(eval $$(call ListPathsSafely, \ + $1_RELATIVE_FILES, \ + $(SUPPORT_OUTPUTDIR)/bundles/_$1_files)) + $$(call MakeDir, $$(@D)) + ifneq ($$($1_SPECIAL_INCLUDES), ) + $$(foreach i, $$($1_SPECIAL_INCLUDES), \ + ($(CD) $$($1_BASE_DIR) && $(FIND) ./$$i \ + >> $(SUPPORT_OUTPUTDIR)/bundles/_$1_files ) ; ) + endif + ifneq ($$($1_SUBDIR), ) + ifeq ($$($1_TYPE)-$(TAR_SUPPORTS_TRANSFORM)-$$($1_UNZIP_DEBUGINFO), tar.gz-true-false) + $(CD) $$($1_BASE_DIR) \ + && ( $(TAR) cf - -$(TAR_INCLUDE_PARAM) $(SUPPORT_OUTPUTDIR)/bundles/_$1_files \ + --transform 's|^|$$($1_SUBDIR)/|' $(TAR_IGNORE_EXIT_VALUE) ) \ + | $(GZIP) > $$@ + else + # If a subdir has been specified, copy all files into a temporary + # location with this subdir before creating the tar file + $(RM) -r $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) + $(MKDIR) -p $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) + ( $(CD) $$($1_BASE_DIR) \ + && $(TAR) cf - -$(TAR_INCLUDE_PARAM) $(SUPPORT_OUTPUTDIR)/bundles/_$1_files \ + $(TAR_IGNORE_EXIT_VALUE) ) \ + | ( $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) && $(TAR) xf - ) + # Unzip any zipped debuginfo files + ifeq ($$($1_UNZIP_DEBUGINFO), true) + for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \ + $(CD) $$$${f%/*} && $(UNZIP) -q $$$${f} && $(RM) $$$${f}; \ + done + endif + ifeq ($$($1_TYPE), tar.gz) + $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && \ + ( $(TAR) cf - $$($1_SUBDIR) $(TAR_IGNORE_EXIT_VALUE) ) | $(GZIP) > $$@ + else ifeq ($$($1_TYPE), zip) + $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && $(ZIP) -qr $$@ . + endif + endif + else + ifeq ($$($1_TYPE), tar.gz) + $(CD) $$($1_BASE_DIR) \ + && ( $(TAR) cf - -$(TAR_INCLUDE_PARAM) $(SUPPORT_OUTPUTDIR)/bundles/_$1_files \ + $(TAR_IGNORE_EXIT_VALUE) ) \ + | $(GZIP) > $$@ + else ifeq ($$($1_TYPE), zip) + $(CD) $$($1_BASE_DIR) \ + && $(ZIP) -qr $$@ . -i@$(SUPPORT_OUTPUTDIR)/bundles/_$1_files + endif + endif + + $1 += $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME) + +endef + +################################################################################ + +# On Macosx, we bundle up the macosx specific images which already have the +# correct base directories. +ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release) + JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR) + JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR) + JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home + JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home + JDK_BUNDLE_SUBDIR := + JRE_BUNDLE_SUBDIR := +else + JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR) + JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR) + JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER) + JRE_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER) + ifneq ($(DEBUG_LEVEL), release) + JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL) + JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL) + endif +endif + +################################################################################ + +ifneq ($(filter product-bundles, $(MAKECMDGOALS)), ) + $(eval $(call FillCacheFind, $(IMAGES_OUTPUTDIR))) + + SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.pdb %.map + + ALL_JDK_FILES := $(call CacheFind, $(JDK_IMAGE_DIR)) + + # Create special filter rules when dealing with unzipped .dSYM directories on + # macosx + ifeq ($(OPENJDK_TARGET_OS), macosx) + ifeq ($(ZIP_DEBUGINFO_FILES), false) + JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \ + $(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, $(ALL_JDK_FILES)))) + endif + endif + + JDK_BUNDLE_FILES := \ + $(filter-out \ + $(JDK_SYMBOLS_EXCLUDE_PATTERN) \ + $(JDK_EXTRA_EXCLUDES) \ + $(SYMBOLS_EXCLUDE_PATTERN) \ + $(JDK_IMAGE_HOMEDIR)/demo/% $(JDK_IMAGE_HOMEDIR)/sample/% \ + , \ + $(ALL_JDK_FILES) \ + ) + DEMOS_BUNDLE_FILES := \ + $(filter-out \ + $(JDK_SYMBOLS_EXCLUDE_PATTERN) \ + $(SYMBOLS_EXCLUDE_PATTERN) \ + , \ + $(filter \ + $(JDK_IMAGE_HOMEDIR)/demo/% $(JDK_IMAGE_HOMEDIR)/sample/% \ + $(JDK_IMAGE_HOMEDIR)/release \ + , \ + $(ALL_JDK_FILES) \ + ) \ + ) + JDK_SYMBOLS_BUNDLE_FILES := \ + $(filter \ + $(JDK_SYMBOLS_EXCLUDE_PATTERN) \ + $(SYMBOLS_EXCLUDE_PATTERN) \ + , \ + $(ALL_JDK_FILES) \ + ) \ + $(call CacheFind, $(SYMBOLS_IMAGE_DIR)) + + ALL_JRE_FILES := $(call CacheFind, $(JRE_IMAGE_DIR)) + + # Create special filter rules when dealing with unzipped .dSYM directories on + # macosx + ifeq ($(OPENJDK_TARGET_OS), macosx) + ifeq ($(ZIP_DEBUGINFO_FILES), false) + JRE_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \ + $(call containing, .dSYM/, $(patsubst $(JRE_IMAGE_DIR)/%, %, $(ALL_JRE_FILES)))) + endif + endif + + JRE_BUNDLE_FILES := $(filter-out \ + $(JRE_SYMBOLS_EXCLUDE_PATTERN) \ + $(SYMBOLS_EXCLUDE_PATTERN), \ + $(ALL_JRE_FILES)) + JRE_SYMBOLS_BUNDLE_FILES := $(filter \ + $(JRE_SYMBOLS_EXCLUDE_PATTERN) \ + $(SYMBOLS_EXCLUDE_PATTERN), \ + $(ALL_JRE_FILES)) + + $(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \ + BUNDLE_NAME := $(JDK_BUNDLE_NAME), \ + FILES := $(JDK_BUNDLE_FILES), \ + SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \ + BASE_DIR := $(JDK_IMAGE_DIR), \ + SUBDIR := $(JDK_BUNDLE_SUBDIR), \ + )) + + PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE) + + $(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \ + BUNDLE_NAME := $(JRE_BUNDLE_NAME), \ + FILES := $(JRE_BUNDLE_FILES), \ + BASE_DIR := $(JRE_IMAGE_DIR), \ + SUBDIR := $(JRE_BUNDLE_SUBDIR), \ + )) + + PRODUCT_TARGETS += $(BUILD_JRE_BUNDLE) + + $(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \ + BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \ + FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \ + BASE_DIR := $(JDK_IMAGE_DIR), \ + SUBDIR := $(JDK_BUNDLE_SUBDIR), \ + UNZIP_DEBUGINFO := true, \ + )) + + PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE) + + $(eval $(call SetupBundleFile, BUILD_JRE_SYMBOLS_BUNDLE, \ + BUNDLE_NAME := $(JRE_SYMBOLS_BUNDLE_NAME), \ + FILES := $(JRE_SYMBOLS_BUNDLE_FILES), \ + BASE_DIR := $(JRE_IMAGE_DIR), \ + SUBDIR := $(JRE_BUNDLE_SUBDIR), \ + UNZIP_DEBUGINFO := true, \ + )) + + PRODUCT_TARGETS += $(BUILD_JRE_SYMBOLS_BUNDLE) + + $(eval $(call SetupBundleFile, BUILD_DEMOS_BUNDLE, \ + BUNDLE_NAME := $(DEMOS_BUNDLE_NAME), \ + FILES := $(call DoubleDollar, $(DEMOS_BUNDLE_FILES)), \ + BASE_DIR := $(JDK_IMAGE_DIR), \ + SUBDIR := $(JDK_BUNDLE_SUBDIR), \ + )) + + PRODUCT_TARGETS += $(BUILD_DEMOS_BUNDLE) +endif + +################################################################################ + +ifneq ($(filter test-bundles, $(MAKECMDGOALS)), ) + TEST_BUNDLE_FILES := $(call CacheFind, $(TEST_IMAGE_DIR)) + + $(eval $(call SetupBundleFile, BUILD_TEST_BUNDLE, \ + BUNDLE_NAME := $(TEST_BUNDLE_NAME), \ + FILES := $(call DoubleDollar, $(TEST_BUNDLE_FILES)), \ + BASE_DIR := $(TEST_IMAGE_DIR), \ + )) + + TEST_TARGETS += $(BUILD_TEST_BUNDLE) +endif + +################################################################################ + +ifneq ($(filter docs-bundles, $(MAKECMDGOALS)), ) + DOCS_BUNDLE_FILES := $(call CacheFind, $(DOCS_IMAGE_DIR)) + + $(eval $(call SetupBundleFile, BUILD_DOCS_BUNDLE, \ + BUNDLE_NAME := $(DOCS_BUNDLE_NAME), \ + FILES := $(DOCS_BUNDLE_FILES), \ + BASE_DIR := $(DOCS_IMAGE_DIR), \ + SUBDIR := docs, \ + )) + + DOCS_TARGETS += $(BUILD_DOCS_BUNDLE) +endif + +################################################################################ + +# Hook to include the corresponding custom file, if present. +$(eval $(call IncludeCustomExtension, , Bundles.gmk)) + +################################################################################ + +product-bundles: $(PRODUCT_TARGETS) +test-bundles: $(TEST_TARGETS) +docs-bundles: $(DOCS_TARGETS) + +.PHONY: all default product-bundles test-bundles docs-bundles diff --git a/make/CreateJmods.gmk b/make/CreateJmods.gmk index 394888c4970..40900ff91a9 100644 --- a/make/CreateJmods.gmk +++ b/make/CreateJmods.gmk @@ -69,21 +69,13 @@ endif # Add dependencies on other jmod files. Only java.base needs access to other # jmods. ifeq ($(MODULE), java.base) + ALL_UPGRADEABLE_MODULES = $(call FindAllUpgradeableModules) # When creating a BUILDJDK, we don't need to add hashes to java.base ifneq ($(CREATING_BUILDJDK), true) DEPS += $(patsubst %, $(JMODS_DIR)/%.jmod, \ - $(filter-out java.base, $(call FindAllModules))) + $(filter-out java.base $(ALL_UPGRADEABLE_MODULES), $(call FindAllModules))) - # TODO: find modules that directly and indirectly depend on upgradeable - # modules - EXCLUDE_HASH_MODULES := $(UPGRADEABLE_MODULES) \ - java.se.ee \ - jdk.rmic \ - jdk.xml.bind \ - jdk.xml.ws \ - # - - EXCLUDE_PATTERN := $(strip $(subst $(SPACE),|,$(strip $(EXCLUDE_HASH_MODULES)))) + EXCLUDE_PATTERN := $(strip $(subst $(SPACE),|,$(strip $(ALL_UPGRADEABLE_MODULES)))) JMOD_FLAGS += --modulepath $(JMODS_DIR) \ --hash-modules '^(?!$(EXCLUDE_PATTERN))' diff --git a/make/GensrcModuleInfo.gmk b/make/GensrcModuleInfo.gmk index 2fbcdc6ab24..f3487b4339d 100644 --- a/make/GensrcModuleInfo.gmk +++ b/make/GensrcModuleInfo.gmk @@ -85,21 +85,41 @@ ifneq ($(MOD_FILES), ) MODS_REST := $(filter-out $(MODS_QUALIFIED_EXPORTS), $(MOD_FILE_CONTENTS)) # Filter the contents for modules that are actually being built - MODULES_FILTER := $(addprefix %/, $(addsuffix ;, $(ALL_MODULES))) - MODIFICATIONS := $(filter $(MODULES_FILTER), $(MODS_QUALIFIED_EXPORTS)) \ + ALL_MODULES_FILTER := $(addprefix %/, $(addsuffix ;, $(ALL_MODULES))) + MODIFICATIONS := $(filter $(ALL_MODULES_FILTER), $(MODS_QUALIFIED_EXPORTS)) \ $(MODS_REST) + # Returns non empty if the package exists in the current module + # Param 1 - Name of package with dots + PackageExists = \ + $(strip $(wildcard $(addsuffix $(subst .,/,/$(strip $1)), \ + $(MODULE_CLASSES_DIRS) \ + $(addsuffix /$(MODULE), $(IMPORT_MODULES_CLASSES)) \ + ))) + # Convert the modification lines into arguments for the modification tool. # Filter out modifications for non existing to-modules. $(foreach line, $(MODIFICATIONS), \ $(eval split_line := $(subst /,$(SPACE),$(line))) \ $(eval command := $(word 1, $(split_line))) \ - $(eval package := $(patsubst %;,%,$(word 2, $(split_line)))) \ - $(eval to_module := $(patsubst %;,%,$(word 4, $(split_line)))) \ - $(if $(to_module), \ - $(eval ARGS += -$(command) $(package)/$(to_module)) \ + $(if $(filter $(command), exports), \ + $(eval package := $(patsubst %;,%,$(word 2, $(split_line)))) \ + $(if $(call PackageExists, $(package)), \ + $(eval to_module := $(patsubst %;,%,$(word 4, $(split_line)))) \ + $(if $(to_module), \ + $(eval ARGS += -$(command) $(package)/$(to_module)) \ + , \ + $(eval ARGS += -$(command) $(package)) \ + ) \ + ) \ , \ - $(eval ARGS += -$(command) $(package)) \ + $(if $(filter $(command), provides), \ + $(eval provider := $(patsubst %;,%,$(word 2, $(split_line)))) \ + $(eval class := $(patsubst %;,%,$(word 4, $(split_line)))) \ + $(eval ARGS += -$(command) $(provider)/$(class)) \ + , \ + $(error A module-info.extra in $(MODULE) contains invalid command $(command)) \ + ) \ ) \ ) diff --git a/make/HotspotWrapper.gmk b/make/HotspotWrapper.gmk deleted file mode 100644 index 663215525a3..00000000000 --- a/make/HotspotWrapper.gmk +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# Include the legacy hotspot-spec.gmk (which in turns includes spec.gmk) -BASE_SPEC:=$(SPEC) -# Assign to HOTSPOT_SPEC so that the variable HOTSPOT_SPEC can be -# overridden when building the buildjdk. -HOTSPOT_SPEC := $(dir $(SPEC))hotspot-spec.gmk -include $(HOTSPOT_SPEC) -include MakeBase.gmk - -# Inclusion of this pseudo-target will cause make to execute this file -# serially, regardless of -j. Recursively called makefiles will not be -# affected, however. This is required for correct dependency management. -.NOTPARALLEL: - -default: all - -# Get all files in src, make or agent subdirs in hotspot directory and -# filter out .hg. This skips the test directory. -HOTSPOT_FILES := $(shell $(FIND) -L \ - $(HOTSPOT_TOPDIR)/src $(HOTSPOT_TOPDIR)/make \ - -name ".hg" -prune -o -print) - -# The old build creates hotspot output dir before calling hotspot and -# not doing it breaks builds on msys. -$(HOTSPOT_OUTPUTDIR)/_hotspot.timestamp: $(HOTSPOT_FILES) - @$(MKDIR) -p $(HOTSPOT_OUTPUTDIR) - ($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(HOTSPOT_MAKE_ARGS) \ - LOG_LEVEL=$(LOG_LEVEL) SPEC=$(HOTSPOT_SPEC) BASE_SPEC=$(BASE_SPEC)) - $(TOUCH) $@ - -hotspot: $(HOTSPOT_OUTPUTDIR)/_hotspot.timestamp - -all: hotspot - -.PHONY: default all hotspot diff --git a/make/Images.gmk b/make/Images.gmk index 564f2b27ddb..92adf3013db 100644 --- a/make/Images.gmk +++ b/make/Images.gmk @@ -43,8 +43,9 @@ ALL_MODULES := $(call FindAllModules) $(eval $(call ReadImportMetaData)) -JRE_MODULES += $(filter-out $(MODULES_FILTER), $(BOOT_MODULES) $(PLATFORM_MODULES) $(JRE_TOOL_MODULES)) -JDK_MODULES += $(filter-out $(MODULES_FILTER), $(ALL_MODULES)) +JRE_MODULES += $(filter $(ALL_MODULES), $(BOOT_MODULES) \ + $(PLATFORM_MODULES) $(JRE_TOOL_MODULES)) +JDK_MODULES += $(ALL_MODULES) # Compact builds have additional modules COMPACT1_EXTRA_MODULES := jdk.localedata jdk.crypto.pkcs11 jdk.crypto.ec diff --git a/make/Javadoc.gmk b/make/Javadoc.gmk index d1e85b4b746..d27caaf85f1 100644 --- a/make/Javadoc.gmk +++ b/make/Javadoc.gmk @@ -44,7 +44,7 @@ include NON_CORE_PKGS.gmk # Definitions for directories # -DOCSDIR := $(IMAGES_OUTPUTDIR)/docs +DOCSDIR := $(DOCS_IMAGE_DIR) DOCSTMPDIR = $(SUPPORT_OUTPUTDIR)/docs HOTSPOT_DOCS_IMPORT_PATH=$(HOTSPOT_OUTPUTDIR)/docs @@ -1437,7 +1437,6 @@ $(DYNALINKAPI_OPTIONS_FILE): $(call OptionPair,-windowtitle,$(DYNALINKAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \ $(call OptionPair,-header,$(DYNALINKAPI_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-bottom,$(DYNALINKAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \ - $(call OptionTrip,-group,$(DYNALINKAPI_GROUPNAME),$(DYNALINKAPI_REGEXP)); \ $(call OptionTrip,-linkoffline,$(DYNALINKAPI2COREAPI),$(COREAPI_DOCSDIR)/); \ ) >> $@ @@ -1634,9 +1633,7 @@ JLINK_PLUGIN_DOCTITLE := JLink Plugin API - EXPERIMENTAL JLINK_PLUGIN_WINDOWTITLE := JLink Plugin API - EXPERIMENTAL JLINK_PLUGIN_HEADER := JLink Plugin API - EXPERIMENTAL JLINK_PLUGIN_BOTTOM := $(call CommonBottom,$(JLINK_PLUGIN_FIRST_COPYRIGHT_YEAR)) -JLINK_PLUGIN_PKGS = jdk.tools.jlink \ - jdk.tools.jlink.builder \ - jdk.tools.jlink.plugin +JLINK_PLUGIN_PKGS = jdk.tools.jlink.plugin JLINK_PLUGIN_INDEX_HTML = $(JLINK_PLUGIN_DOCDIR)/index.html JLINK_PLUGIN_OPTIONS_FILE = $(DOCSTMPDIR)/jlinkplugins.options diff --git a/make/Jprt.gmk b/make/Jprt.gmk index e82b84d5e11..09d6dc7ef7b 100644 --- a/make/Jprt.gmk +++ b/make/Jprt.gmk @@ -32,14 +32,6 @@ ifneq ($(CYGPATH), ) ifdef JPRT_ARCHIVE_BUNDLE override JPRT_ARCHIVE_BUNDLE := $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_BUNDLE)) endif - ifdef JPRT_ARCHIVE_INSTALL_BUNDLE - override JPRT_ARCHIVE_INSTALL_BUNDLE := \ - $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_INSTALL_BUNDLE)) - endif - ifdef JPRT_ARCHIVE_MODULES_BUNDLE - override JPRT_ARCHIVE_MODULES_BUNDLE := \ - $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_MODULES_BUNDLE)) - endif ifdef JPRT_ARCHIVE_TEST_BUNDLE override JPRT_ARCHIVE_TEST_BUNDLE := \ $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_TEST_BUNDLE)) @@ -55,12 +47,6 @@ endif ifndef JPRT_ARCHIVE_BUNDLE JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/jdk-image.zip endif -ifndef JPRT_ARCHIVE_INSTALL_BUNDLE - JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip -endif -ifndef JPRT_ARCHIVE_MODULES_BUNDLE - JPRT_ARCHIVE_MODULES_BUNDLE=/tmp/jprt_bundles/modules.zip -endif ifndef JPRT_ARCHIVE_TEST_BUNDLE JPRT_ARCHIVE_TEST_BUNDLE=/tmp/jprt_bundles/test-image.zip endif @@ -72,94 +58,51 @@ ifeq ($(SKIP_BOOT_CYCLE), false) jprt_bundle: bootcycle-images endif -# This target must be called in the context of a SPEC file -jprt_bundle: $(JPRT_ARCHIVE_BUNDLE) $(JPRT_ARCHIVE_TEST_BUNDLE) \ - $(JPRT_ARCHIVE_MODULES_BUNDLE) +################################################################################ +# JPRT specific bundling targets +JPRT_TARGET ?= $(DEFAULT_MAKE_TARGET) +ifeq ($(JPRT_TARGET), $(DEFAULT_MAKE_TARGET)) + jprt_bundle: $(DEFAULT_MAKE_TARGET) $(JPRT_ARCHIVE_BUNDLE) \ + $(JPRT_ARCHIVE_TEST_BUNDLE) -ifeq ($(GCOV_ENABLED), true) - jprt_bundle: $(JPRT_ARCHIVE_SYMBOLS_BUNDLE) -endif + SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR) + SRC_TEST_IMAGE_DIR := $(TEST_IMAGE_DIR) -# This target must be called in the context of a SPEC file -$(JPRT_ARCHIVE_BUNDLE): bundles - $(MKDIR) -p $(@D) - $(RM) $@ - $(CP) $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip $@ + # This target must be called in the context of a SPEC file + $(JPRT_ARCHIVE_BUNDLE): product-images + $(call MakeDir, $(@D)) + $(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -y -q -r $@ . -$(JPRT_ARCHIVE_MODULES_BUNDLE): bundles - $(MKDIR) -p $(@D) - $(RM) $@ - $(CP) $(BUILD_OUTPUT)/bundles/modules.zip $@ + $(JPRT_ARCHIVE_TEST_BUNDLE): test-image + $(call MakeDir, $(@D)) + $(CD) $(SRC_TEST_IMAGE_DIR) && $(ZIP) -y -q -r $@ . -$(JPRT_ARCHIVE_TEST_BUNDLE): bundles - $(MKDIR) -p $(@D) - $(RM) $@ - $(CP) $(BUILD_OUTPUT)/bundles/$(TEST_IMAGE_SUBDIR).zip $@ + ############################################################################## + # Optional symbols bundle + ifeq ($(GCOV_ENABLED), true) + jprt_bundle: $(JPRT_ARCHIVE_SYMBOLS_BUNDLE) + zip-bundles: $(SYMBOLS_ZIP_BUNDLE) -$(JPRT_ARCHIVE_SYMBOLS_BUNDLE): bundles - $(MKDIR) -p $(@D) - $(RM) $@ - $(CP) $(BUILD_OUTPUT)/bundles/$(SYMBOLS_IMAGE_SUBDIR).zip $@ + $(JPRT_ARCHIVE_SYMBOLS_BUNDLE): product-images + $(call MakeDir, $(@D)) + $(CD) $(SYMBOLS_IMAGE_DIR) && $(ZIP) -y -q -r $@ . -SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR) -SRC_JRE_IMAGE_DIR := $(JRE_IMAGE_DIR) -SRC_TEST_IMAGE_DIR := $(TEST_IMAGE_DIR) -SRC_JDK_MACOSX_BUNDLE_DIR := $(JDK_MACOSX_BUNDLE_DIR) -SRC_JRE_MACOSX_BUNDLE_DIR := $(JRE_MACOSX_BUNDLE_DIR) + endif + + ############################################################################## -# Bundle up the images -JPRT_TARGET ?= default -ifeq ($(JPRT_TARGET), default) - bundles: $(JPRT_TARGET) - @$(call TargetEnter) - $(MKDIR) -p $(BUILD_OUTPUT)/bundles - $(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -y -q -r \ - $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip . - $(CD) $(SRC_JRE_IMAGE_DIR) && $(ZIP) -y -q -r \ - $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip . - $(CD) $(SRC_TEST_IMAGE_DIR) && $(ZIP) -y -q -r \ - $(BUILD_OUTPUT)/bundles/$(TEST_IMAGE_SUBDIR).zip . - $(CD) $(IMAGES_OUTPUTDIR)/jmods && $(ZIP) -y -q -r \ - $(BUILD_OUTPUT)/bundles/modules.zip . - if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \ - $(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r \ - $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \ - fi - if [ -d $(SYMBOLS_IMAGE_DIR) ] ; then \ - $(CD) $(SYMBOLS_IMAGE_DIR) && $(ZIP) -y -q -r \ - $(BUILD_OUTPUT)/bundles/$(SYMBOLS_IMAGE_SUBDIR).zip . ; \ - fi - @$(call TargetExit) else - # Just fake the bundles - bundles: $(JPRT_TARGET) + # Just fake the main bundle to satisfy JPRT + jprt_bundle: $(JPRT_TARGET) @$(call TargetEnter) $(MKDIR) -p $(BUILD_OUTPUT)/bundles - $(CD) $(TOPDIR) && $(ZIP) -y -q -r \ - $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip README - $(CD) $(TOPDIR) && $(ZIP) -y -q -r \ - $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip README - $(CD) $(TOPDIR) && $(ZIP) -y -q -r \ - $(BUILD_OUTPUT)/bundles/$(TEST_IMAGE_SUBDIR).zip README - $(CD) $(TOPDIR) && $(ZIP) -y -q -r \ - $(BUILD_OUTPUT)/bundles/modules.zip README + $(CD) $(TOPDIR) && $(TAR) cf - README | $(GZIP) > \ + $(JPRT_ARCHIVE_BUNDLE) @$(call TargetExit) endif -# Copy images to one unified location regardless of platform etc. -final-images: $(JPRT_TARGET) - @$(call TargetEnter) - $(RM) -r $(BUILD_OUTPUT)/final-images - $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR) - $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR) - $(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/ - $(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/ - ifeq ($(OPENJDK_TARGET_OS),macosx) - $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_MACOSX_BUNDLE_SUBDIR) - $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_MACOSX_BUNDLE_SUBDIR) - $(CP) -R -P $(SRC_JDK_MACOSX_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_MACOSX_BUNDLE_SUBDIR)/ - $(CP) -R -P $(SRC_JRE_MACOSX_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_MACOSX_BUNDLE_SUBDIR)/ - endif - @$(call TargetExit) +ALL_TARGETS += jprt_bundle -ALL_TARGETS += jprt_bundle bundles final-images +################################################################################ + +$(eval $(call IncludeCustomExtension, , Jprt.gmk)) diff --git a/make/MacBundles.gmk b/make/MacBundles.gmk index ea8913eded5..f860e5e074a 100644 --- a/make/MacBundles.gmk +++ b/make/MacBundles.gmk @@ -34,7 +34,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) bundles: jre-bundle jdk-bundle - # JDK_MACOSX_BUNDLE_DIR and JRE_MACOSX_BUNDLE_DIR are defined in SPEC. + # JDK_MACOSX_CONTENTS_DIR and JRE_MACOSX_CONTENTS_DIR are defined in SPEC. MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/data/bundle @@ -52,27 +52,27 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR)) JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR)) - JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR)/,$(JDK_MACOSX_BUNDLE_DIR)/Home/,$(JDK_FILE_LIST)) - JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR)/,$(JRE_MACOSX_BUNDLE_DIR)/Home/,$(JRE_FILE_LIST)) + JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR)/,$(JDK_MACOSX_CONTENTS_DIR)/Home/,$(JDK_FILE_LIST)) + JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR)/,$(JRE_MACOSX_CONTENTS_DIR)/Home/,$(JRE_FILE_LIST)) # Copy empty directories (jre/lib/applet). - $(JDK_MACOSX_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/% + $(JDK_MACOSX_CONTENTS_DIR)/Home/%: $(JDK_IMAGE_DIR)/% $(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)) $(MKDIR) -p $(@D) if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi - $(JRE_MACOSX_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/% + $(JRE_MACOSX_CONTENTS_DIR)/Home/%: $(JRE_IMAGE_DIR)/% $(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)) $(MKDIR) -p $(@D) if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi - $(JDK_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib: + $(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib: $(call LogInfo, Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)) $(MKDIR) -p $(@D) $(RM) $@ $(LN) -s ../Home/lib/jli/libjli.dylib $@ - $(JRE_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib: + $(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib: $(call LogInfo, Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@)) $(MKDIR) -p $(@D) $(RM) $@ @@ -80,7 +80,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) $(eval $(call SetupTextFileProcessing, BUILD_JDK_PLIST, \ SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \ - OUTPUT_FILE := $(JDK_MACOSX_BUNDLE_DIR)/Info.plist, \ + OUTPUT_FILE := $(JDK_MACOSX_CONTENTS_DIR)/Info.plist, \ REPLACEMENTS := \ @@ID@@ => $(BUNDLE_ID).jdk ; \ @@NAME@@ => $(BUNDLE_NAME) ; \ @@ -92,7 +92,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) $(eval $(call SetupTextFileProcessing, BUILD_JRE_PLIST, \ SOURCE_FILES := $(MACOSX_PLIST_SRC)/JRE-Info.plist, \ - OUTPUT_FILE := $(JRE_MACOSX_BUNDLE_DIR)/Info.plist, \ + OUTPUT_FILE := $(JRE_MACOSX_CONTENTS_DIR)/Info.plist, \ REPLACEMENTS := \ @@ID@@ => $(BUNDLE_ID).jre ; \ @@NAME@@ => $(BUNDLE_NAME) ; \ @@ -102,13 +102,13 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) @@VENDOR@@ => $(BUNDLE_VENDOR) , \ )) - jdk-bundle: $(JDK_TARGET_LIST) $(JDK_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib \ + jdk-bundle: $(JDK_TARGET_LIST) $(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \ $(BUILD_JDK_PLIST) - $(SETFILE) -a B $(dir $(JDK_MACOSX_BUNDLE_DIR)) + $(SETFILE) -a B $(dir $(JDK_MACOSX_CONTENTS_DIR)) - jre-bundle: $(JRE_TARGET_LIST) $(JRE_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib \ + jre-bundle: $(JRE_TARGET_LIST) $(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \ $(BUILD_JRE_PLIST) - $(SETFILE) -a B $(dir $(JRE_MACOSX_BUNDLE_DIR)) + $(SETFILE) -a B $(dir $(JRE_MACOSX_CONTENTS_DIR)) else # Not macosx diff --git a/make/Main.gmk b/make/Main.gmk index b1700f367ea..cbde81f552c 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -228,16 +228,12 @@ ALL_TARGETS += $(LAUNCHER_TARGETS) # Build hotspot target ifeq ($(BUILD_HOTSPOT),true) - hotspot: - ifeq ($(USE_NEW_HOTSPOT_BUILD), true) - +($(CD) $(HOTSPOT_TOPDIR)/makefiles && $(MAKE) $(MAKE_ARGS) -f BuildHotspot.gmk) - else - +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk) - endif +hotspot: + +($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f BuildHotspot.gmk) endif hotspot-ide-project: - +($(CD) $(HOTSPOT_TOPDIR)/makefiles && $(MAKE) $(MAKE_ARGS) -f ide/CreateVSProject.gmk) + +($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ide/CreateVSProject.gmk) ALL_TARGETS += hotspot hotspot-ide-project @@ -306,9 +302,13 @@ $(SUPPORT_OUTPUTDIR)/source_tips: FRC BOOTCYCLE_TARGET := product-images bootcycle-images: - @$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image - +$(MAKE) -f $(SRC_ROOT)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \ - JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main + ifneq ($(COMPILE_TYPE), cross) + $(call LogWarn, Boot cycle build step 2: Building a new JDK image using previously built image) + +$(MAKE) -f $(SRC_ROOT)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \ + JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main + else + $(call LogWarn, Boot cycle build disabled when cross compiling) + endif zip-security: +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ZipSecurity.gmk) @@ -402,6 +402,11 @@ test-image-jdk-jtreg-native: +($(CD) $(JDK_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \ test-image-jdk-jtreg-native) +ifeq ($(BUILD_GTEST), true) + test-image-hotspot-gtest: + +($(CD) $(HOTSPOT_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f GtestImage.gmk) +endif + build-test-lib: +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f BuildTestLib.gmk) @@ -425,32 +430,49 @@ endif ALL_TARGETS += prepare-test-image build-test-hotspot-jtreg-native \ test-image-hotspot-jtreg-native build-test-jdk-jtreg-native \ test-image-jdk-jtreg-native build-test-lib build-test-failure-handler \ - test-failure-handler test-image-failure-handler + test-failure-handler test-image-failure-handler test-image-hotspot-gtest ################################################################################ # Run tests # Run tests specified by $(TEST), or the default test set. test: - $(call RunTests, $(TEST)) + $(call RunTests, $(TEST), $(JDK_IMAGE_DIR)) test-hotspot-jtreg: - $(call RunTests, "hotspot_all") + $(call RunTests, "hotspot_all", $(JDK_IMAGE_DIR)) test-hotspot-jtreg-native: - $(call RunTests, "hotspot_native_sanity") + $(call RunTests, "hotspot_native_sanity", $(JDK_IMAGE_DIR)) test-hotspot-internal: - $(call RunTests, "hotspot_internal") + $(call RunTests, "hotspot_internal", $(JDK_OUTPUTDIR)) + +test-hotspot-gtest: + $(call RunTests, "hotspot_gtest", $(JDK_OUTPUTDIR)) test-jdk-jtreg-native: - $(call RunTests, "jdk_native_sanity") + $(call RunTests, "jdk_native_sanity", $(JDK_IMAGE_DIR)) test-make: ($(CD) $(SRC_ROOT)/test/make && $(MAKE) $(MAKE_ARGS) -f TestMake.gmk $(TEST_TARGET)) ALL_TARGETS += test test-hotspot-jtreg test-hotspot-jtreg-native \ - test-hotspot-internal test-jdk-jtreg-native test-make + test-hotspot-internal test-hotspot-gtest test-jdk-jtreg-native test-make + +################################################################################ +# Bundles + +product-bundles: + +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk product-bundles) + +test-bundles: + +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk test-bundles) + +docs-bundles: + +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk docs-bundles) + +ALL_TARGETS += product-bundles test-bundles docs-bundles ################################################################################ # Install targets @@ -578,7 +600,8 @@ else # When creating a BUILDJDK, we don't need to add hashes to java.base, thus # we don't need to depend on all other jmods ifneq ($(CREATING_BUILDJDK), true) - java.base-jmod: $(filter-out java.base-jmod, $(JMOD_TARGETS)) + java.base-jmod: $(filter-out java.base-jmod \ + $(addsuffix -jmod, $(call FindAllUpgradeableModules)), $(JMOD_TARGETS)) endif # Declare dependencies from -jmod to all other module targets @@ -669,12 +692,22 @@ else test-image-jdk-jtreg-native: build-test-jdk-jtreg-native + test-image-hotspot-gtest: hotspot + test-hotspot-internal: exploded-image test-hotspot-jtreg: jimages test-image + test-hotspot-gtest: exploded-image test-image-hotspot-gtest + install: product-images + product-bundles: product-images + + test-bundles: test-image + + docs-bundles: docs-image + generate-summary: jmods endif @@ -753,14 +786,18 @@ docs-image: docs-javadoc docs-jvmtidoc # This target builds the test image test-image: prepare-test-image test-image-hotspot-jtreg-native \ - test-image-jdk-jtreg-native test-image-failure-handler + test-image-jdk-jtreg-native test-image-failure-handler test-image-hotspot-gtest -# all-images is the top-most target, it builds all our deliverables ("images"). +# all-images builds all our deliverables as images. all-images: product-images test-image docs-image +# all-bundles packages all our deliverables as tar.gz bundles. +all-bundles: product-bundles test-bundles docs-bundles + ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers jmods \ jdk.jdwp.agent-gensrc $(ALL_MODULES) demos samples exploded-image \ - create-buildjdk mac-bundles product-images docs-image test-image all-images + create-buildjdk mac-bundles product-images docs-image test-image all-images \ + all-bundles ################################################################################ @@ -771,9 +808,10 @@ default: $(DEFAULT_MAKE_TARGET) jdk: exploded-image images: product-images docs: docs-image +bundles: all-bundles all: all-images -ALL_TARGETS += default jdk images docs all +ALL_TARGETS += default jdk images docs bundles all ################################################################################ ################################################################################ diff --git a/make/MainSupport.gmk b/make/MainSupport.gmk index d09331a0962..7683cfeb2af 100644 --- a/make/MainSupport.gmk +++ b/make/MainSupport.gmk @@ -30,10 +30,10 @@ ifndef _MAINSUPPORT_GMK _MAINSUPPORT_GMK := 1 -# Run the tests specified by $1. +# Run the tests specified by $1, with PRODUCT_HOME specified by $2 define RunTests ($(CD) $(SRC_ROOT)/test && $(MAKE) $(MAKE_ARGS) -j1 -k MAKEFLAGS= \ - JT_HOME=$(JT_HOME) PRODUCT_HOME=$(JDK_IMAGE_DIR) \ + JT_HOME=$(JT_HOME) PRODUCT_HOME=$(strip $2) \ TEST_IMAGE_DIR=$(TEST_IMAGE_DIR) \ ALT_OUTPUTDIR=$(OUTPUT_ROOT) TEST_JOBS=$(TEST_JOBS) \ JOBS=$(JOBS) $1) || true diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk index 1a33d69f3bb..3665297d036 100644 --- a/make/common/MakeBase.gmk +++ b/make/common/MakeBase.gmk @@ -145,7 +145,7 @@ ifeq ($(HAS_FILE_FUNCTION), true) $$(strip $2),$$(subst $$(SPACE),$$(NEWLINE),$$(strip $$($$(strip $1))))) endef -else # HAS_FILE_FUNCTION +else # HAS_FILE_FUNCTION = false $(eval compress_paths = \ $(strip $(shell $(CAT) $(SRC_ROOT)/make/common/support/ListPathsSafely-pre-compress.incl))) @@ -172,8 +172,8 @@ else # HAS_FILE_FUNCTION # Param 2 - File to print to # Param 3 - Set to true to append to file instead of overwriting define ListPathsSafely - ifneq (,$$(word 10001,$$($1))) - $$(error Cannot list safely more than 10000 paths. $1 has $$(words $$($1)) paths!) + ifneq (,$$(word 30001,$$($$(strip $1)))) + $$(error Cannot list safely more than 30000 paths. $1 has $$(words $$($$(strip $1))) paths!) endif $$(call MakeDir, $$(dir $2)) ifneq ($$(strip $3), true) @@ -229,6 +229,106 @@ else # HAS_FILE_FUNCTION $$(call ListPathsSafely_IfPrintf,$1,$2,9251,9500) $$(call ListPathsSafely_IfPrintf,$1,$2,9501,9750) $$(call ListPathsSafely_IfPrintf,$1,$2,9751,10000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,10001,10250) + $$(call ListPathsSafely_IfPrintf,$1,$2,10251,10500) + $$(call ListPathsSafely_IfPrintf,$1,$2,10501,10750) + $$(call ListPathsSafely_IfPrintf,$1,$2,10751,11000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,11001,11250) + $$(call ListPathsSafely_IfPrintf,$1,$2,11251,11500) + $$(call ListPathsSafely_IfPrintf,$1,$2,11501,11750) + $$(call ListPathsSafely_IfPrintf,$1,$2,11751,12000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,12001,12250) + $$(call ListPathsSafely_IfPrintf,$1,$2,12251,12500) + $$(call ListPathsSafely_IfPrintf,$1,$2,12501,12750) + $$(call ListPathsSafely_IfPrintf,$1,$2,12751,13000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,13001,13250) + $$(call ListPathsSafely_IfPrintf,$1,$2,13251,13500) + $$(call ListPathsSafely_IfPrintf,$1,$2,13501,13750) + $$(call ListPathsSafely_IfPrintf,$1,$2,13751,14000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,14001,14250) + $$(call ListPathsSafely_IfPrintf,$1,$2,14251,14500) + $$(call ListPathsSafely_IfPrintf,$1,$2,14501,14750) + $$(call ListPathsSafely_IfPrintf,$1,$2,14751,15000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,15001,15250) + $$(call ListPathsSafely_IfPrintf,$1,$2,15251,15500) + $$(call ListPathsSafely_IfPrintf,$1,$2,15501,15750) + $$(call ListPathsSafely_IfPrintf,$1,$2,15751,16000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,16001,16250) + $$(call ListPathsSafely_IfPrintf,$1,$2,16251,16500) + $$(call ListPathsSafely_IfPrintf,$1,$2,16501,16750) + $$(call ListPathsSafely_IfPrintf,$1,$2,16751,17000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,17001,17250) + $$(call ListPathsSafely_IfPrintf,$1,$2,17251,17500) + $$(call ListPathsSafely_IfPrintf,$1,$2,17501,17750) + $$(call ListPathsSafely_IfPrintf,$1,$2,17751,18000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,18001,18250) + $$(call ListPathsSafely_IfPrintf,$1,$2,18251,18500) + $$(call ListPathsSafely_IfPrintf,$1,$2,18501,18750) + $$(call ListPathsSafely_IfPrintf,$1,$2,18751,19000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,19001,19250) + $$(call ListPathsSafely_IfPrintf,$1,$2,19251,19500) + $$(call ListPathsSafely_IfPrintf,$1,$2,19501,19750) + $$(call ListPathsSafely_IfPrintf,$1,$2,19751,20000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,20001,20250) + $$(call ListPathsSafely_IfPrintf,$1,$2,20251,20500) + $$(call ListPathsSafely_IfPrintf,$1,$2,20501,20750) + $$(call ListPathsSafely_IfPrintf,$1,$2,20751,21000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,21001,21250) + $$(call ListPathsSafely_IfPrintf,$1,$2,21251,21500) + $$(call ListPathsSafely_IfPrintf,$1,$2,21501,21750) + $$(call ListPathsSafely_IfPrintf,$1,$2,21751,22000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,22001,22250) + $$(call ListPathsSafely_IfPrintf,$1,$2,22251,22500) + $$(call ListPathsSafely_IfPrintf,$1,$2,22501,22750) + $$(call ListPathsSafely_IfPrintf,$1,$2,22751,23000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,23001,23250) + $$(call ListPathsSafely_IfPrintf,$1,$2,23251,23500) + $$(call ListPathsSafely_IfPrintf,$1,$2,23501,23750) + $$(call ListPathsSafely_IfPrintf,$1,$2,23751,24000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,24001,24250) + $$(call ListPathsSafely_IfPrintf,$1,$2,24251,24500) + $$(call ListPathsSafely_IfPrintf,$1,$2,24501,24750) + $$(call ListPathsSafely_IfPrintf,$1,$2,24751,25000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,25001,25250) + $$(call ListPathsSafely_IfPrintf,$1,$2,25251,25500) + $$(call ListPathsSafely_IfPrintf,$1,$2,25501,25750) + $$(call ListPathsSafely_IfPrintf,$1,$2,25751,26000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,26001,26250) + $$(call ListPathsSafely_IfPrintf,$1,$2,26251,26500) + $$(call ListPathsSafely_IfPrintf,$1,$2,26501,26750) + $$(call ListPathsSafely_IfPrintf,$1,$2,26751,27000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,27001,27250) + $$(call ListPathsSafely_IfPrintf,$1,$2,27251,27500) + $$(call ListPathsSafely_IfPrintf,$1,$2,27501,27750) + $$(call ListPathsSafely_IfPrintf,$1,$2,27751,28000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,28001,28250) + $$(call ListPathsSafely_IfPrintf,$1,$2,28251,28500) + $$(call ListPathsSafely_IfPrintf,$1,$2,28501,28750) + $$(call ListPathsSafely_IfPrintf,$1,$2,28751,29000) + + $$(call ListPathsSafely_IfPrintf,$1,$2,29001,29250) + $$(call ListPathsSafely_IfPrintf,$1,$2,29251,29500) + $$(call ListPathsSafely_IfPrintf,$1,$2,29501,29750) + $$(call ListPathsSafely_IfPrintf,$1,$2,29751,30000) endef endif # HAS_FILE_FUNCTION @@ -420,8 +520,12 @@ else ifeq ($(OPENJDK_TARGET_OS),macosx) # set. Some files get their write permissions removed after being copied to the # output dir. When these are copied again to images, xattr would fail. By only clearing # attributes when they are present, failing on this is avoided. + # + # If copying a soft link to a directory, need to delete the target first to avoid + # weird errors. define install-file $(MKDIR) -p '$(@D)' + $(RM) '$@' $(CP) -fRP '$<' '$@' if [ -n "`$(XATTR) -l '$@'`" ]; then $(XATTR) -c '$@'; fi endef diff --git a/make/common/Modules.gmk b/make/common/Modules.gmk index ba1f82e5d5b..90469d073fd 100644 --- a/make/common/Modules.gmk +++ b/make/common/Modules.gmk @@ -72,7 +72,6 @@ BOOT_MODULES += \ # to be deprivileged BOOT_MODULES += \ - java.scripting \ java.sql.rowset \ java.smartcardio \ jdk.naming.rmi \ @@ -87,6 +86,10 @@ UPGRADEABLE_MODULES += \ java.xml.ws \ # +# Modules explicitly declared as not being upgradeable even though they require +# an upgradeable module. +NON_UPGRADEABLE_MODULES += + AGGREGATOR_MODULES += \ java.compact1 \ java.compact2 \ @@ -102,6 +105,7 @@ PLATFORM_MODULES += \ PLATFORM_MODULES += \ java.compiler \ + java.scripting \ jdk.accessibility \ jdk.charsets \ jdk.crypto.ec \ @@ -245,6 +249,19 @@ FindTransitiveDepsForModule = \ $(foreach n, $(call FindDepsForModule, $m), \ $(call FindDepsForModule, $n)))) +# Upgradeable modules are those that are either defined as upgradeable or that +# require an upradeable module. +FindAllUpgradeableModules = \ + $(filter-out $(MODULES_FILTER) $(NON_UPGRADEABLE_MODULES), \ + $(sort $(UPGRADEABLE_MODULES) $(foreach m, \ + $(filter-out $(UPGRADEABLE_MODULES), $(call FindAllModules)), \ + $(if $(filter $(UPGRADEABLE_MODULES), \ + $(call FindTransitiveDepsForModule, $m)), \ + $m \ + ) \ + )) \ + ) + ################################################################################ # Param 1 - Name of module diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk index db09eb5bbf3..cb2f96e0ddf 100644 --- a/make/common/NativeCompilation.gmk +++ b/make/common/NativeCompilation.gmk @@ -372,6 +372,9 @@ endef # toolchain when compiling C++ code # STRIP_SYMBOLS Set to true to strip the final binary if the toolchain allows for it # DEBUG_SYMBOLS Set to false to disable generation of debug symbols +# COPY_DEBUG_SYMBOLS Set to false to override global setting of debug symbol copying +# ZIP_EXTERNAL_DEBUG_SYMBOLS Set to false to override global setting of debug symbol +# zipping # CFLAGS_DEBUG_SYMBOLS Overrides the default cflags for enabling debug symbols # CXXFLAGS_DEBUG_SYMBOLS Overrides the default cxxflags for enabling debug symbols # STRIPFLAGS Optionally change the flags given to the strip command @@ -814,7 +817,15 @@ define SetupNativeCompilationBody # Need to make sure TARGET is first on list $1 := $$($1_TARGET) - ifeq ($(COPY_DEBUG_SYMBOLS), true) + ifneq ($$($1_COPY_DEBUG_SYMBOLS), false) + $1_COPY_DEBUG_SYMBOLS := $(COPY_DEBUG_SYMBOLS) + endif + + ifneq ($$($1_ZIP_EXTERNAL_DEBUG_SYMBOLS), false) + $1_ZIP_EXTERNAL_DEBUG_SYMBOLS := $(ZIP_EXTERNAL_DEBUG_SYMBOLS) + endif + + ifeq ($$($1_COPY_DEBUG_SYMBOLS), true) ifneq ($$($1_DEBUG_SYMBOLS), false) # Only copy debug symbols for dynamic libraries and programs. ifeq ($$($1_STATIC_LIBRARY), ) @@ -861,7 +872,7 @@ define SetupNativeCompilationBody $$($1_TARGET): $$($1_DEBUGINFO_FILES) $$($1_DEBUGINFO_FILES): $$($1_ALL_OBJS) - ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true) + ifeq ($$($1_ZIP_EXTERNAL_DEBUG_SYMBOLS), true) $1_DEBUGINFO_ZIP := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).diz $1 += $$(subst $$($1_OBJECT_DIR),$$($1_OUTPUT_DIR),$$($1_DEBUGINFO_ZIP)) diff --git a/make/idea/idea.gmk b/make/idea/idea.gmk index 329c01cd5ea..299ffe805bc 100644 --- a/make/idea/idea.gmk +++ b/make/idea/idea.gmk @@ -35,5 +35,6 @@ else #with SPEC $(ECHO) "BOOT_JDK=\"$(BOOT_JDK)\"" >> $(OUT) $(ECHO) "CYGPATH=\"$(CYGPATH)\"" >> $(OUT) $(ECHO) "SPEC=\"$(SPEC)\"" >> $(OUT) + $(ECHO) "JT_HOME=\"$(JT_HOME)\"" >> $(OUT) endif diff --git a/make/idea/template/ant.xml b/make/idea/template/ant.xml index 6e72e478cbc..f5274deb5bb 100644 --- a/make/idea/template/ant.xml +++ b/make/idea/template/ant.xml @@ -5,9 +5,8 @@ - + - diff --git a/make/idea/template/build.xml b/make/idea/template/build.xml index ed62f296726..b10490f77f1 100644 --- a/make/idea/template/build.xml +++ b/make/idea/template/build.xml @@ -16,6 +16,10 @@ + + + + @@ -29,26 +33,6 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/make/idea/template/src/idea/JdkIdeaAntLogger.java b/make/idea/template/src/idea/JdkIdeaAntLogger.java index 9913499e7a0..22d42a93805 100644 --- a/make/idea/template/src/idea/JdkIdeaAntLogger.java +++ b/make/idea/template/src/idea/JdkIdeaAntLogger.java @@ -99,7 +99,9 @@ public final class JdkIdeaAntLogger extends DefaultLogger { /** jtreg test failure */ JTREG_TEST_FAILED(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "FAILED: "), /** jtreg test error */ - JTREG_TEST_ERROR(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "Error: "); + JTREG_TEST_ERROR(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "Error: "), + /** jtreg report */ + JTREG_TEST_REPORT(StringBinaryPredicate.STARTS_WITH, MSG_INFO, "Report written"); StringBinaryPredicate sbp; int priority; @@ -132,7 +134,7 @@ public final class JdkIdeaAntLogger extends DefaultLogger { MAKE("exec", MessageKind.MAKE_ERROR, MessageKind.MAKE_WARNING, MessageKind.MAKE_NOTE, MessageKind.MAKE_OTHER, MessageKind.JAVAC_CRASH), /** jtreg task - invoked during test execution */ - JTREG("jtreg", MessageKind.JTREG_TEST_PASSED, MessageKind.JTREG_TEST_FAILED, MessageKind.JTREG_TEST_ERROR), + JTREG("jtreg", MessageKind.JTREG_TEST_PASSED, MessageKind.JTREG_TEST_FAILED, MessageKind.JTREG_TEST_ERROR, MessageKind.JTREG_TEST_REPORT), /** initial synthetic task when the logger is created */ ROOT("") { @Override diff --git a/make/idea/template/workspace.xml b/make/idea/template/workspace.xml index 2423c3d41fb..e6377dd53a2 100644 --- a/make/idea/template/workspace.xml +++ b/make/idea/template/workspace.xml @@ -8,6 +8,14 @@ + + + + + + +