# HG changeset patch # User duke # Date 1499279465 -7200 # Node ID 989253a902c34dcb7564695161c9200a5fbb7412 # Parent 52cdb844232b1e1c481d2d92e98235637d57d979# Parent 70e383dfc35eb0128b22594276adfd3c4b7f897e Merge diff -r 70e383dfc35e -r 989253a902c3 .hgtags-top-repo --- a/.hgtags-top-repo Wed Jul 05 20:30:12 2017 +0200 +++ b/.hgtags-top-repo Wed Jul 05 20:31:05 2017 +0200 @@ -304,3 +304,4 @@ 39e8a131289e8386aa4c3e4b184faa812a7c0421 jdk9-b59 9fa2185bee17462d1014538bff60af6e6f0b01e7 jdk9-b60 ea38728b4f4bdd8fd0d7a89b18069f521cf05013 jdk9-b61 +105d045a69174d870b69bfe471b3f2d05a9f8ecc jdk9-b62 diff -r 70e383dfc35e -r 989253a902c3 common/autoconf/basics.m4 --- a/common/autoconf/basics.m4 Wed Jul 05 20:30:12 2017 +0200 +++ b/common/autoconf/basics.m4 Wed Jul 05 20:31:05 2017 +0200 @@ -478,6 +478,15 @@ AUTOCONF_DIR=$TOPDIR/common/autoconf ]) +# Evaluates platform specific overrides for devkit variables. +# $1: Name of variable +AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE], +[ + if test "x[$]$1" = x; then + eval $1="\${$1_${OPENJDK_TARGET_CPU}}" + fi +]) + AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT], [ AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit], @@ -487,12 +496,27 @@ DEVKIT_ROOT="$with_devkit" # Check for a meta data info file in the root of the devkit if test -f "$DEVKIT_ROOT/devkit.info"; then + . $DEVKIT_ROOT/devkit.info # This potentially sets the following: - # DEVKIT_NAME: A descriptive name of the devkit - # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path - # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path - # DEVKIT_SYSROOT: Corresponds to --with-sysroot - . $DEVKIT_ROOT/devkit.info + # A descriptive name of the devkit + BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_NAME]) + # Corresponds to --with-extra-path + BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_EXTRA_PATH]) + # Corresponds to --with-toolchain-path + BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_TOOLCHAIN_PATH]) + # Corresponds to --with-sysroot + BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_SYSROOT]) + + # Identifies the Visual Studio version in the devkit + BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_VERSION]) + # The Visual Studio include environment variable + BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_INCLUDE]) + # The Visual Studio lib environment variable + BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB]) + # Corresponds to --with-msvcr-dll + BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL]) + # Corresponds to --with-msvcp-dll + BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL]) fi AC_MSG_CHECKING([for devkit]) @@ -502,9 +526,7 @@ AC_MSG_RESULT([$DEVKIT_ROOT]) fi - if test "x$DEVKIT_EXTRA_PATH" != x; then - BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH) - fi + BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH) # Fallback default of just /bin if DEVKIT_PATH is not defined if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then @@ -681,8 +703,12 @@ files_present=`$LS $OUTPUT_ROOT` # Configure has already touched config.log and confdefs.h in the current dir when this check # is performed. - filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \ - | $TR -d '\n'` + filtered_files=`$ECHO "$files_present" \ + | $SED -e 's/config.log//g' \ + -e 's/confdefs.h//g' \ + -e 's/fixpath.exe//g' \ + -e 's/ //g' \ + | $TR -d '\n'` if test "x$filtered_files" != x; then AC_MSG_NOTICE([Current directory is $CURDIR.]) AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here]) diff -r 70e383dfc35e -r 989253a902c3 common/autoconf/basics_windows.m4 --- a/common/autoconf/basics_windows.m4 Wed Jul 05 20:30:12 2017 +0200 +++ b/common/autoconf/basics_windows.m4 Wed Jul 05 20:31:05 2017 +0200 @@ -66,7 +66,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi diff -r 70e383dfc35e -r 989253a902c3 common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh Wed Jul 05 20:30:12 2017 +0200 +++ b/common/autoconf/generated-configure.sh Wed Jul 05 20:31:05 2017 +0200 @@ -3464,6 +3464,10 @@ # Setup basic configuration paths, and platform-specific stuff related to PATHs. +# Evaluates platform specific overrides for devkit variables. +# $1: Name of variable + + @@ -4363,7 +4367,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1429271657 +DATE_WHEN_GENERATED=1430331133 ############################################################################### # @@ -14182,7 +14186,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -14308,7 +14312,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -14878,7 +14882,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -14965,12 +14969,63 @@ DEVKIT_ROOT="$with_devkit" # Check for a meta data info file in the root of the devkit if test -f "$DEVKIT_ROOT/devkit.info"; then + . $DEVKIT_ROOT/devkit.info # This potentially sets the following: - # DEVKIT_NAME: A descriptive name of the devkit - # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path - # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path - # DEVKIT_SYSROOT: Corresponds to --with-sysroot - . $DEVKIT_ROOT/devkit.info + # A descriptive name of the devkit + + if test "x$DEVKIT_NAME" = x; then + eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}" + fi + + # Corresponds to --with-extra-path + + if test "x$DEVKIT_EXTRA_PATH" = x; then + eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}" + fi + + # Corresponds to --with-toolchain-path + + if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then + eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}" + fi + + # Corresponds to --with-sysroot + + if test "x$DEVKIT_SYSROOT" = x; then + eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}" + fi + + + # Identifies the Visual Studio version in the devkit + + if test "x$DEVKIT_VS_VERSION" = x; then + eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}" + fi + + # The Visual Studio include environment variable + + if test "x$DEVKIT_VS_INCLUDE" = x; then + eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}" + fi + + # The Visual Studio lib environment variable + + if test "x$DEVKIT_VS_LIB" = x; then + eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}" + fi + + # Corresponds to --with-msvcr-dll + + if test "x$DEVKIT_MSVCR_DLL" = x; then + eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}" + fi + + # Corresponds to --with-msvcp-dll + + if test "x$DEVKIT_MSVCP_DLL" = x; then + eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}" + fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5 @@ -14983,7 +15038,6 @@ $as_echo "$DEVKIT_ROOT" >&6; } fi - if test "x$DEVKIT_EXTRA_PATH" != x; then if test "x$DEVKIT_EXTRA_PATH" != x; then if test "x$EXTRA_PATH" = x; then @@ -14993,7 +15047,6 @@ fi fi - fi # Fallback default of just /bin if DEVKIT_PATH is not defined if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then @@ -15288,8 +15341,12 @@ files_present=`$LS $OUTPUT_ROOT` # Configure has already touched config.log and confdefs.h in the current dir when this check # is performed. - filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \ - | $TR -d '\n'` + filtered_files=`$ECHO "$files_present" \ + | $SED -e 's/config.log//g' \ + -e 's/confdefs.h//g' \ + -e 's/fixpath.exe//g' \ + -e 's/ //g' \ + | $TR -d '\n'` if test "x$filtered_files" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5 $as_echo "$as_me: Current directory is $CURDIR." >&6;} @@ -15356,7 +15413,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -15671,7 +15728,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -16058,7 +16115,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -16442,7 +16499,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -16831,7 +16888,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -17214,7 +17271,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -20279,7 +20336,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -20608,7 +20665,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -20799,7 +20856,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -20983,7 +21040,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -21166,7 +21223,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -21349,7 +21406,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -21523,7 +21580,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -21672,7 +21729,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -21842,7 +21899,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -22167,7 +22224,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -22379,7 +22436,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -22556,7 +22613,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -22761,7 +22818,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -22938,7 +22995,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -23143,7 +23200,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -23320,7 +23377,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -23525,7 +23582,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -23702,7 +23759,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -23894,7 +23951,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -24069,7 +24126,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -24262,7 +24319,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -24437,7 +24494,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -24629,7 +24686,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -24804,7 +24861,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -24997,7 +25054,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -25172,7 +25229,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -25346,7 +25403,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -26726,11 +26783,15 @@ ORG_CFLAGS="$CFLAGS" ORG_CXXFLAGS="$CXXFLAGS" + # autoconf magic only relies on PATH, so update it if tools dir is specified + OLD_PATH="$PATH" + # On Windows, we need to detect the visual studio installation first. # This will change the PATH, but we need to keep that new PATH even # after toolchain detection is done, since the compiler (on x86) uses # it for DLL resolution in runtime. - if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then + if test "x$OPENJDK_BUILD_OS" = "xwindows" \ + && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then # Store path to cygwin link.exe to help excluding it when searching for # VS linker. This must be done before changing the PATH when looking for VS. @@ -26808,6 +26869,56 @@ done exit 0 + elif test "x$DEVKIT_VS_VERSION" != x; then + VS_VERSION=$DEVKIT_VS_VERSION + TOOLCHAIN_VERSION=$VS_VERSION + eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}" + eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}" + eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}" + eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}" + eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}" + VS_PATH="$TOOLCHAIN_PATH:$PATH" + + # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it + # can still be exported as INCLUDE for compiler invocations without + # SYSROOT_CFLAGS + OLDIFS="$IFS" + IFS=";" + for i in $DEVKIT_VS_INCLUDE; do + ipath=$i + + unix_path="$ipath" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + windows_path=`$CYGPATH -m "$unix_path"` + ipath="$windows_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + windows_path=`cmd //c echo $unix_path` + ipath="$windows_path" + fi + + VS_INCLUDE="$VS_INCLUDE;$ipath" + done + # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported + # as LIB for compiler invocations without SYSROOT_LDFLAGS + for i in $DEVKIT_VS_LIB; do + libpath=$i + + unix_path="$libpath" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + windows_path=`$CYGPATH -m "$unix_path"` + libpath="$windows_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + windows_path=`cmd //c echo $unix_path` + libpath="$windows_path" + fi + + VS_LIB="$VS_LIB;$libpath" + done + IFS="$OLDIFS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5 +$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;} + elif test "x$with_toolchain_version" != x; then # User override; check that it is valid if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then @@ -27380,8 +27491,10 @@ done - if test "x$VS_ENV_CMD" != x; then - # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file. + # If we have a devkit, skip all of the below. + if test "x$DEVKIT_VS_VERSION" = x; then + if test "x$VS_ENV_CMD" != x; then + # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file. # Only process if variable expands to non-empty @@ -27481,7 +27594,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -27669,17 +27782,17 @@ fi - # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat - { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5 + # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat + { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;} - # We need to create a couple of temporary files. - VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env" - $MKDIR -p $VS_ENV_TMP_DIR - - # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment). - # Instead create a shell script which will set the relevant variables when run. - WINPATH_VS_ENV_CMD="$VS_ENV_CMD" + # We need to create a couple of temporary files. + VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env" + $MKDIR -p $VS_ENV_TMP_DIR + + # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment). + # Instead create a shell script which will set the relevant variables when run. + WINPATH_VS_ENV_CMD="$VS_ENV_CMD" unix_path="$WINPATH_VS_ENV_CMD" if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then @@ -27690,7 +27803,7 @@ WINPATH_VS_ENV_CMD="$windows_path" fi - WINPATH_BASH="$BASH" + WINPATH_BASH="$BASH" unix_path="$WINPATH_BASH" if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then @@ -27702,59 +27815,67 @@ fi - # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell - # script (executable by bash) that will setup the important variables. - EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat" - $ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE - # This will end up something like: - # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat - $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE - # These will end up something like: - # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh - # The trailing space for everyone except PATH is no typo, but is needed due - # to trailing \ in the Windows paths. These will be stripped later. - $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - - # Now execute the newly created bat file. - # The | cat is to stop SetEnv.Cmd to mess with system colors on msys. - # Change directory so we don't need to mess with Windows paths in redirects. - cd $VS_ENV_TMP_DIR - cmd /c extract-vs-env.bat | $CAT - cd $CURDIR - - if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5 + # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell + # script (executable by bash) that will setup the important variables. + EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat" + $ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE + # This will end up something like: + # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat + $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE + # These will end up something like: + # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh + # The trailing space for everyone except PATH is no typo, but is needed due + # to trailing \ in the Windows paths. These will be stripped later. + $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \ + >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \ + >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \ + >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \ + >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \ + >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \ + >> $EXTRACT_VC_ENV_BAT_FILE + + # Now execute the newly created bat file. + # The | cat is to stop SetEnv.Cmd to mess with system colors on msys. + # Change directory so we don't need to mess with Windows paths in redirects. + cd $VS_ENV_TMP_DIR + cmd /c extract-vs-env.bat | $CAT + cd $CURDIR + + if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;} - as_fn_error $? "Cannot continue" "$LINENO" 5 - fi - - # Now set all paths and other env variables. This will allow the rest of - # the configure script to find and run the compiler in the proper way. - { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5 + as_fn_error $? "Cannot continue" "$LINENO" 5 + fi + + # Now set all paths and other env variables. This will allow the rest of + # the configure script to find and run the compiler in the proper way. + { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5 $as_echo "$as_me: Setting extracted environment variables" >&6;} - . $VS_ENV_TMP_DIR/set-vs-env.sh - # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we - # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR. - else - # We did not find a vsvars bat file, let's hope we are run from a VS command prompt. - { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5 + . $VS_ENV_TMP_DIR/set-vs-env.sh + # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we + # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR. + else + # We did not find a vsvars bat file, let's hope we are run from a VS command prompt. + { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;} + fi fi # At this point, we should have correct variables in the environment, or we can't continue. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5 $as_echo_n "checking for Visual Studio variables... " >&6; } - if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then + if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \ + || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5 $as_echo "present but broken" >&6; } @@ -27839,7 +27960,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -27989,7 +28110,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -28108,9 +28229,6 @@ export LIB="$VS_LIB" fi - # autoconf magic only relies on PATH, so update it if tools dir is specified - OLD_PATH="$PATH" - # For solaris we really need solaris tools, and not the GNU equivalent. # The build tools on Solaris reside in /usr/ccs (C Compilation System), # so add that to path before starting to probe. @@ -28449,7 +28567,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -28910,7 +29028,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -30197,7 +30315,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -30658,7 +30776,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -31524,7 +31642,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -31943,7 +32061,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -32291,7 +32409,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -32790,7 +32908,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -33422,7 +33540,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -33897,7 +34015,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -34240,7 +34358,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -34581,7 +34699,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -34904,7 +35022,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -35423,7 +35541,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -35895,7 +36013,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -36367,7 +36485,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -36840,7 +36958,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -37424,7 +37542,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -38006,7 +38124,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -38597,7 +38715,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -39185,7 +39303,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -39681,7 +39799,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -40153,7 +40271,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -40625,7 +40743,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -41176,7 +41294,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -44730,7 +44848,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -44856,7 +44974,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -45091,7 +45209,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -45217,7 +45335,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -45713,7 +45831,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -45839,7 +45957,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -46049,7 +46167,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -46175,7 +46293,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -46376,7 +46494,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -46502,7 +46620,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -46703,7 +46821,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -46829,7 +46947,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -47031,7 +47149,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -47157,7 +47275,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -47360,7 +47478,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -47486,7 +47604,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -47685,7 +47803,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -47811,7 +47929,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -48010,7 +48128,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -48136,7 +48254,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -48318,7 +48436,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -48452,7 +48570,7 @@ # 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-stile (cygpath) + # Now convert it back to Unix-style (cygpath) input_path=`$CYGPATH -u "$shortmode_path"` new_path="$input_path" fi @@ -49967,7 +50085,7 @@ if test "x$with_msvcr_dll" != x; then # If given explicitely by user, do not probe. If not present, fail directly. - DLL_NAME="$DLL_NAME" + DLL_NAME="$MSVCR_NAME" POSSIBLE_MSVC_DLL="$with_msvcr_dll" METHOD="--with-msvcr-dll" if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then @@ -49997,6 +50115,132 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } MSVC_DLL="$POSSIBLE_MSVC_DLL" + + # Only process if variable expands to non-empty + + if test "x$MSVC_DLL" != 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="$MSVC_DLL" + 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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$MSVC_DLL" + 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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL 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="$MSVC_DLL" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, 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 MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + MSVC_DLL="`cd "$path"; $THEPWDCMD -L`" + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5 $as_echo_n "checking for $DLL_NAME... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5 @@ -50012,9 +50256,183 @@ if test "x$MSVC_DLL" = x; then as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5 fi - else - - VAR_NAME="MSVCR_DLL" + MSVCR_DLL="$MSVC_DLL" + elif test "x$DEVKIT_MSVCR_DLL" != x; then + + DLL_NAME="$MSVCR_NAME" + POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL" + METHOD="devkit" + if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5 +$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;} + + # Need to check if the found msvcr is correct architecture + { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5 +$as_echo_n "checking found $DLL_NAME architecture... " >&6; } + MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"` + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit" + # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems. + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then + CORRECT_MSVCR_ARCH="PE32 executable" + else + CORRECT_MSVCR_ARCH="PE32+ executable" + fi + else + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then + CORRECT_MSVCR_ARCH=386 + else + CORRECT_MSVCR_ARCH=x86-64 + fi + fi + if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + MSVC_DLL="$POSSIBLE_MSVC_DLL" + + # Only process if variable expands to non-empty + + if test "x$MSVC_DLL" != 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="$MSVC_DLL" + 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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$MSVC_DLL" + 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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL 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="$MSVC_DLL" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, 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 MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + MSVC_DLL="`cd "$path"; $THEPWDCMD -L`" + fi + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5 +$as_echo_n "checking for $DLL_NAME... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5 +$as_echo "$MSVC_DLL" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5 +$as_echo "incorrect, ignoring" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5 +$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;} + fi + fi + + if test "x$MSVC_DLL" = x; then + as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5 + fi + MSVCR_DLL="$MSVC_DLL" + else + DLL_NAME="${MSVCR_NAME}" MSVC_DLL= @@ -50069,6 +50487,132 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } MSVC_DLL="$POSSIBLE_MSVC_DLL" + + # Only process if variable expands to non-empty + + if test "x$MSVC_DLL" != 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="$MSVC_DLL" + 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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$MSVC_DLL" + 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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL 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="$MSVC_DLL" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, 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 MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + MSVC_DLL="`cd "$path"; $THEPWDCMD -L`" + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5 $as_echo_n "checking for $DLL_NAME... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5 @@ -50118,6 +50662,132 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } MSVC_DLL="$POSSIBLE_MSVC_DLL" + + # Only process if variable expands to non-empty + + if test "x$MSVC_DLL" != 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="$MSVC_DLL" + 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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$MSVC_DLL" + 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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL 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="$MSVC_DLL" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, 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 MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + MSVC_DLL="`cd "$path"; $THEPWDCMD -L`" + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5 $as_echo_n "checking for $DLL_NAME... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5 @@ -50177,6 +50847,132 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } MSVC_DLL="$POSSIBLE_MSVC_DLL" + + # Only process if variable expands to non-empty + + if test "x$MSVC_DLL" != 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="$MSVC_DLL" + 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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$MSVC_DLL" + 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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL 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="$MSVC_DLL" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, 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 MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + MSVC_DLL="`cd "$path"; $THEPWDCMD -L`" + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5 $as_echo_n "checking for $DLL_NAME... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5 @@ -50243,6 +51039,132 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } MSVC_DLL="$POSSIBLE_MSVC_DLL" + + # Only process if variable expands to non-empty + + if test "x$MSVC_DLL" != 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="$MSVC_DLL" + 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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$MSVC_DLL" + 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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL 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="$MSVC_DLL" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, 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 MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + MSVC_DLL="`cd "$path"; $THEPWDCMD -L`" + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5 $as_echo_n "checking for $DLL_NAME... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5 @@ -50306,6 +51228,132 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } MSVC_DLL="$POSSIBLE_MSVC_DLL" + + # Only process if variable expands to non-empty + + if test "x$MSVC_DLL" != 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="$MSVC_DLL" + 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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$MSVC_DLL" + 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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL 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="$MSVC_DLL" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, 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 MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + MSVC_DLL="`cd "$path"; $THEPWDCMD -L`" + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5 $as_echo_n "checking for $DLL_NAME... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5 @@ -50329,137 +51377,9 @@ as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5 fi - MSVCR_DLL=$MSVC_DLL - - # Only process if variable expands to non-empty - - if test "x$MSVCR_DLL" != 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="$MSVCR_DLL" - 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 MSVCR_DLL, which resolves as \"$path\", is invalid." >&5 -$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;} - as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$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-stile (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 - MSVCR_DLL="$new_path" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5 -$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;} - fi - - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - - path="$MSVCR_DLL" - 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 - MSVCR_DLL="$new_path" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5 -$as_echo "$as_me: Rewriting MSVCR_DLL 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="$MSVCR_DLL" - has_space=`$ECHO "$path" | $GREP " "` - if test "x$has_space" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5 -$as_echo "$as_me: The path of MSVCR_DLL, 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 MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 - fi - - MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`" - fi - fi - - MSVCR_DLL=$MSVCR_DLL - - - fi + MSVCR_DLL="$MSVC_DLL" + fi + # Check whether --with-msvcp-dll was given. @@ -50472,7 +51392,7 @@ if test "x$with_msvcp_dll" != x; then # If given explicitely by user, do not probe. If not present, fail directly. - DLL_NAME="$DLL_NAME" + DLL_NAME="$MSVCP_NAME" POSSIBLE_MSVC_DLL="$with_msvcp_dll" METHOD="--with-msvcp-dll" if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then @@ -50502,6 +51422,132 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } MSVC_DLL="$POSSIBLE_MSVC_DLL" + + # Only process if variable expands to non-empty + + if test "x$MSVC_DLL" != 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="$MSVC_DLL" + 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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$MSVC_DLL" + 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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL 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="$MSVC_DLL" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, 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 MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + MSVC_DLL="`cd "$path"; $THEPWDCMD -L`" + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5 $as_echo_n "checking for $DLL_NAME... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5 @@ -50517,9 +51563,183 @@ if test "x$MSVC_DLL" = x; then as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5 fi - else - - VAR_NAME="MSVCP_DLL" + MSVCP_DLL="$MSVC_DLL" + elif test "x$DEVKIT_MSVCP_DLL" != x; then + + DLL_NAME="$MSVCP_NAME" + POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL" + METHOD="devkit" + if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5 +$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;} + + # Need to check if the found msvcr is correct architecture + { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5 +$as_echo_n "checking found $DLL_NAME architecture... " >&6; } + MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"` + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit" + # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems. + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then + CORRECT_MSVCR_ARCH="PE32 executable" + else + CORRECT_MSVCR_ARCH="PE32+ executable" + fi + else + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then + CORRECT_MSVCR_ARCH=386 + else + CORRECT_MSVCR_ARCH=x86-64 + fi + fi + if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + MSVC_DLL="$POSSIBLE_MSVC_DLL" + + # Only process if variable expands to non-empty + + if test "x$MSVC_DLL" != 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="$MSVC_DLL" + 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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$MSVC_DLL" + 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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL 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="$MSVC_DLL" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, 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 MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + MSVC_DLL="`cd "$path"; $THEPWDCMD -L`" + fi + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5 +$as_echo_n "checking for $DLL_NAME... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5 +$as_echo "$MSVC_DLL" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5 +$as_echo "incorrect, ignoring" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5 +$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;} + fi + fi + + if test "x$MSVC_DLL" = x; then + as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5 + fi + MSVCP_DLL="$MSVC_DLL" + else + DLL_NAME="${MSVCP_NAME}" MSVC_DLL= @@ -50574,6 +51794,132 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } MSVC_DLL="$POSSIBLE_MSVC_DLL" + + # Only process if variable expands to non-empty + + if test "x$MSVC_DLL" != 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="$MSVC_DLL" + 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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$MSVC_DLL" + 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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL 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="$MSVC_DLL" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, 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 MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + MSVC_DLL="`cd "$path"; $THEPWDCMD -L`" + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5 $as_echo_n "checking for $DLL_NAME... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5 @@ -50623,6 +51969,132 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } MSVC_DLL="$POSSIBLE_MSVC_DLL" + + # Only process if variable expands to non-empty + + if test "x$MSVC_DLL" != 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="$MSVC_DLL" + 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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$MSVC_DLL" + 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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL 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="$MSVC_DLL" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, 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 MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + MSVC_DLL="`cd "$path"; $THEPWDCMD -L`" + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5 $as_echo_n "checking for $DLL_NAME... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5 @@ -50682,6 +52154,132 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } MSVC_DLL="$POSSIBLE_MSVC_DLL" + + # Only process if variable expands to non-empty + + if test "x$MSVC_DLL" != 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="$MSVC_DLL" + 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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$MSVC_DLL" + 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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL 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="$MSVC_DLL" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, 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 MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + MSVC_DLL="`cd "$path"; $THEPWDCMD -L`" + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5 $as_echo_n "checking for $DLL_NAME... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5 @@ -50748,6 +52346,132 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } MSVC_DLL="$POSSIBLE_MSVC_DLL" + + # Only process if variable expands to non-empty + + if test "x$MSVC_DLL" != 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="$MSVC_DLL" + 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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$MSVC_DLL" + 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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL 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="$MSVC_DLL" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, 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 MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + MSVC_DLL="`cd "$path"; $THEPWDCMD -L`" + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5 $as_echo_n "checking for $DLL_NAME... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5 @@ -50811,6 +52535,132 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } MSVC_DLL="$POSSIBLE_MSVC_DLL" + + # Only process if variable expands to non-empty + + if test "x$MSVC_DLL" != 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="$MSVC_DLL" + 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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$MSVC_DLL" + 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 + MSVC_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVC_DLL 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="$MSVC_DLL" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVC_DLL, 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 MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + MSVC_DLL="`cd "$path"; $THEPWDCMD -L`" + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5 $as_echo_n "checking for $DLL_NAME... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5 @@ -50834,137 +52684,9 @@ as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5 fi - MSVCP_DLL=$MSVC_DLL - - # Only process if variable expands to non-empty - - if test "x$MSVCP_DLL" != 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="$MSVCP_DLL" - 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 MSVCP_DLL, which resolves as \"$path\", is invalid." >&5 -$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;} - as_fn_error $? "Cannot locate the the path of MSVCP_DLL" "$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-stile (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 - MSVCP_DLL="$new_path" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5 -$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;} - fi - - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - - path="$MSVCP_DLL" - 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 - MSVCP_DLL="$new_path" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5 -$as_echo "$as_me: Rewriting MSVCP_DLL 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="$MSVCP_DLL" - has_space=`$ECHO "$path" | $GREP " "` - if test "x$has_space" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5 -$as_echo "$as_me: The path of MSVCP_DLL, 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 MSVCP_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 - fi - - MSVCP_DLL="`cd "$path"; $THEPWDCMD -L`" - fi - fi - - MSVCP_DLL=$MSVCP_DLL - - - fi + MSVCP_DLL="$MSVC_DLL" + fi + fi diff -r 70e383dfc35e -r 989253a902c3 common/autoconf/toolchain.m4 --- a/common/autoconf/toolchain.m4 Wed Jul 05 20:30:12 2017 +0200 +++ b/common/autoconf/toolchain.m4 Wed Jul 05 20:31:05 2017 +0200 @@ -189,11 +189,15 @@ ORG_CFLAGS="$CFLAGS" ORG_CXXFLAGS="$CXXFLAGS" + # autoconf magic only relies on PATH, so update it if tools dir is specified + OLD_PATH="$PATH" + # On Windows, we need to detect the visual studio installation first. # This will change the PATH, but we need to keep that new PATH even # after toolchain detection is done, since the compiler (on x86) uses # it for DLL resolution in runtime. - if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then + if test "x$OPENJDK_BUILD_OS" = "xwindows" \ + && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV # Reset path to VS_PATH. It will include everything that was on PATH at the time we # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV. @@ -203,9 +207,6 @@ export LIB="$VS_LIB" fi - # autoconf magic only relies on PATH, so update it if tools dir is specified - OLD_PATH="$PATH" - # For solaris we really need solaris tools, and not the GNU equivalent. # The build tools on Solaris reside in /usr/ccs (C Compilation System), # so add that to path before starting to probe. diff -r 70e383dfc35e -r 989253a902c3 common/autoconf/toolchain_windows.m4 --- a/common/autoconf/toolchain_windows.m4 Wed Jul 05 20:30:12 2017 +0200 +++ b/common/autoconf/toolchain_windows.m4 Wed Jul 05 20:31:05 2017 +0200 @@ -210,6 +210,37 @@ done exit 0 + elif test "x$DEVKIT_VS_VERSION" != x; then + VS_VERSION=$DEVKIT_VS_VERSION + TOOLCHAIN_VERSION=$VS_VERSION + eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}" + eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}" + eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}" + eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}" + eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}" + VS_PATH="$TOOLCHAIN_PATH:$PATH" + + # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it + # can still be exported as INCLUDE for compiler invocations without + # SYSROOT_CFLAGS + OLDIFS="$IFS" + IFS=";" + for i in $DEVKIT_VS_INCLUDE; do + ipath=$i + BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([ipath]) + VS_INCLUDE="$VS_INCLUDE;$ipath" + done + # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported + # as LIB for compiler invocations without SYSROOT_LDFLAGS + for i in $DEVKIT_VS_LIB; do + libpath=$i + BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([libpath]) + VS_LIB="$VS_LIB;$libpath" + done + IFS="$OLDIFS" + + AC_MSG_NOTICE([Found devkit $VS_DESCRIPTION]) + elif test "x$with_toolchain_version" != x; then # User override; check that it is valid if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then @@ -262,71 +293,81 @@ # First-hand choice is to locate and run the vsvars bat file. TOOLCHAIN_FIND_VISUAL_STUDIO - if test "x$VS_ENV_CMD" != x; then - # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file. - BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD) + # If we have a devkit, skip all of the below. + if test "x$DEVKIT_VS_VERSION" = x; then + if test "x$VS_ENV_CMD" != x; then + # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file. + BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD) - # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat - AC_MSG_NOTICE([Trying to extract Visual Studio environment variables]) + # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat + AC_MSG_NOTICE([Trying to extract Visual Studio environment variables]) - # We need to create a couple of temporary files. - VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env" - $MKDIR -p $VS_ENV_TMP_DIR + # We need to create a couple of temporary files. + VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env" + $MKDIR -p $VS_ENV_TMP_DIR - # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment). - # Instead create a shell script which will set the relevant variables when run. - WINPATH_VS_ENV_CMD="$VS_ENV_CMD" - BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_VS_ENV_CMD]) - WINPATH_BASH="$BASH" - BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH]) + # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment). + # Instead create a shell script which will set the relevant variables when run. + WINPATH_VS_ENV_CMD="$VS_ENV_CMD" + BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_VS_ENV_CMD]) + WINPATH_BASH="$BASH" + BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH]) - # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell - # script (executable by bash) that will setup the important variables. - EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat" - $ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE - # This will end up something like: - # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat - $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE - # These will end up something like: - # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh - # The trailing space for everyone except PATH is no typo, but is needed due - # to trailing \ in the Windows paths. These will be stripped later. - $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE + # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell + # script (executable by bash) that will setup the important variables. + EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat" + $ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE + # This will end up something like: + # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat + $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE + # These will end up something like: + # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh + # The trailing space for everyone except PATH is no typo, but is needed due + # to trailing \ in the Windows paths. These will be stripped later. + $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \ + >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \ + >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \ + >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \ + >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \ + >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \ + >> $EXTRACT_VC_ENV_BAT_FILE - # Now execute the newly created bat file. - # The | cat is to stop SetEnv.Cmd to mess with system colors on msys. - # Change directory so we don't need to mess with Windows paths in redirects. - cd $VS_ENV_TMP_DIR - cmd /c extract-vs-env.bat | $CAT - cd $CURDIR + # Now execute the newly created bat file. + # The | cat is to stop SetEnv.Cmd to mess with system colors on msys. + # Change directory so we don't need to mess with Windows paths in redirects. + cd $VS_ENV_TMP_DIR + cmd /c extract-vs-env.bat | $CAT + cd $CURDIR - if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then - AC_MSG_NOTICE([Could not succesfully extract the envionment variables needed for the VS setup.]) - AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation]) - AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.]) - AC_MSG_ERROR([Cannot continue]) - fi + if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then + AC_MSG_NOTICE([Could not succesfully extract the envionment variables needed for the VS setup.]) + AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation]) + AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.]) + AC_MSG_ERROR([Cannot continue]) + fi - # Now set all paths and other env variables. This will allow the rest of - # the configure script to find and run the compiler in the proper way. - AC_MSG_NOTICE([Setting extracted environment variables]) - . $VS_ENV_TMP_DIR/set-vs-env.sh - # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we - # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR. - else - # We did not find a vsvars bat file, let's hope we are run from a VS command prompt. - AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment]) + # Now set all paths and other env variables. This will allow the rest of + # the configure script to find and run the compiler in the proper way. + AC_MSG_NOTICE([Setting extracted environment variables]) + . $VS_ENV_TMP_DIR/set-vs-env.sh + # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we + # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR. + else + # We did not find a vsvars bat file, let's hope we are run from a VS command prompt. + AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment]) + fi fi # At this point, we should have correct variables in the environment, or we can't continue. AC_MSG_CHECKING([for Visual Studio variables]) - if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then + if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \ + || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then AC_MSG_RESULT([present but broken]) AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.]) @@ -403,10 +444,10 @@ POSSIBLE_MSVC_DLL="$2" METHOD="$3" if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then - AC_MSG_NOTICE([Found $1 at $POSSIBLE_MSVC_DLL using $METHOD]) + AC_MSG_NOTICE([Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD]) # Need to check if the found msvcr is correct architecture - AC_MSG_CHECKING([found $1 architecture]) + AC_MSG_CHECKING([found $DLL_NAME architecture]) MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"` if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit" @@ -426,19 +467,19 @@ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then AC_MSG_RESULT([ok]) MSVC_DLL="$POSSIBLE_MSVC_DLL" - AC_MSG_CHECKING([for $1]) + BASIC_FIXUP_PATH(MSVC_DLL) + AC_MSG_CHECKING([for $DLL_NAME]) AC_MSG_RESULT([$MSVC_DLL]) else AC_MSG_RESULT([incorrect, ignoring]) - AC_MSG_NOTICE([The file type of the located $1 is $MSVC_DLL_FILETYPE]) + AC_MSG_NOTICE([The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE]) fi fi ]) AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL], [ - VAR_NAME="$1" - DLL_NAME="$2" + DLL_NAME="$1" MSVC_DLL= if test "x$MSVC_DLL" = x; then @@ -517,10 +558,6 @@ AC_MSG_RESULT([no]) AC_MSG_ERROR([Could not find $DLL_NAME. Please specify using --with-msvcr-dll.]) fi - - $1=$MSVC_DLL - BASIC_FIXUP_PATH($1) - AC_SUBST($1, [$]$1) ]) AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS], @@ -530,14 +567,22 @@ if test "x$with_msvcr_dll" != x; then # If given explicitely by user, do not probe. If not present, fail directly. - TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$with_msvcr_dll], - [--with-msvcr-dll]) + TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCR_NAME, [$with_msvcr_dll], [--with-msvcr-dll]) if test "x$MSVC_DLL" = x; then AC_MSG_ERROR([Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll]) fi + MSVCR_DLL="$MSVC_DLL" + elif test "x$DEVKIT_MSVCR_DLL" != x; then + TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCR_NAME, [$DEVKIT_MSVCR_DLL], [devkit]) + if test "x$MSVC_DLL" = x; then + AC_MSG_ERROR([Could not find a proper $MSVCR_NAME as specified by devkit]) + fi + MSVCR_DLL="$MSVC_DLL" else - TOOLCHAIN_SETUP_MSVC_DLL([MSVCR_DLL], [${MSVCR_NAME}]) + TOOLCHAIN_SETUP_MSVC_DLL([${MSVCR_NAME}]) + MSVCR_DLL="$MSVC_DLL" fi + AC_SUBST(MSVCR_DLL) AC_ARG_WITH(msvcp-dll, [AS_HELP_STRING([--with-msvcp-dll], [path to microsoft C++ runtime dll (msvcp*.dll) (Windows only) @<:@probed@:>@])]) @@ -545,13 +590,21 @@ if test "x$MSVCP_NAME" != "x"; then if test "x$with_msvcp_dll" != x; then # If given explicitely by user, do not probe. If not present, fail directly. - TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$with_msvcp_dll], - [--with-msvcp-dll]) + TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCP_NAME, [$with_msvcp_dll], [--with-msvcp-dll]) if test "x$MSVC_DLL" = x; then AC_MSG_ERROR([Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll]) fi + MSVCP_DLL="$MSVC_DLL" + elif test "x$DEVKIT_MSVCP_DLL" != x; then + TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCP_NAME, [$DEVKIT_MSVCP_DLL], [devkit]) + if test "x$MSVC_DLL" = x; then + AC_MSG_ERROR([Could not find a proper $MSVCP_NAME as specified by devkit]) + fi + MSVCP_DLL="$MSVC_DLL" else - TOOLCHAIN_SETUP_MSVC_DLL([MSVCP_DLL], [${MSVCP_NAME}]) + TOOLCHAIN_SETUP_MSVC_DLL([${MSVCP_NAME}]) + MSVCP_DLL="$MSVC_DLL" fi + AC_SUBST(MSVCP_DLL) fi ]) diff -r 70e383dfc35e -r 989253a902c3 corba/.hgtags --- a/corba/.hgtags Wed Jul 05 20:30:12 2017 +0200 +++ b/corba/.hgtags Wed Jul 05 20:31:05 2017 +0200 @@ -304,3 +304,4 @@ cda6ae062f85fac5555f4e1318885b0ecd998bd1 jdk9-b59 caa330b275f39282793466529f6864766b31d9fd jdk9-b60 d690f489ca0bb95a6157d996da2fa72bcbcf02ea jdk9-b61 +d27f7e0a7aca129969de23e9934408a31b4abf4c jdk9-b62 diff -r 70e383dfc35e -r 989253a902c3 hotspot/.hgtags --- a/hotspot/.hgtags Wed Jul 05 20:30:12 2017 +0200 +++ b/hotspot/.hgtags Wed Jul 05 20:31:05 2017 +0200 @@ -464,3 +464,4 @@ 96bcaec07cb165782bae1b9a1f28450b37a10e3a jdk9-b59 9c916db4bf3bc164a47b5a9cefe5ffd71e111f6a jdk9-b60 715d2da5801c410746e92f08066d53bde1496286 jdk9-b61 +1eab877142cce6ca06e556e2ad0af688f993f00b jdk9-b62 diff -r 70e383dfc35e -r 989253a902c3 hotspot/make/windows/makefiles/compile.make --- a/hotspot/make/windows/makefiles/compile.make Wed Jul 05 20:30:12 2017 +0200 +++ b/hotspot/make/windows/makefiles/compile.make Wed Jul 05 20:31:05 2017 +0200 @@ -74,7 +74,8 @@ !if "$(BUILDARCH)" == "i486" MACHINE=I386 -CXX_FLAGS=$(CXX_FLAGS) /D "IA32" +# VS2013 generates bad l2f without /arch:IA32 +CXX_FLAGS=$(CXX_FLAGS) /D "IA32" /arch:IA32 !endif CXX_FLAGS=$(CXX_FLAGS) /D "WIN32" /D "_WINDOWS" diff -r 70e383dfc35e -r 989253a902c3 hotspot/src/cpu/aarch64/vm/aarch64.ad --- a/hotspot/src/cpu/aarch64/vm/aarch64.ad Wed Jul 05 20:30:12 2017 +0200 +++ b/hotspot/src/cpu/aarch64/vm/aarch64.ad Wed Jul 05 20:31:05 2017 +0200 @@ -449,7 +449,7 @@ R26 /* R27, */ // heapbase /* R28, */ // thread - /* R29, */ // fp + R29, // fp /* R30, */ // lr /* R31 */ // sp ); @@ -483,7 +483,7 @@ R26, R26_H, /* R27, R27_H, */ // heapbase /* R28, R28_H, */ // thread - /* R29, R29_H, */ // fp + R29, R29_H, // fp /* R30, R30_H, */ // lr /* R31, R31_H */ // sp ); @@ -758,6 +758,8 @@ source_hpp %{ +#include "memory/cardTableModRefBS.hpp" + class CallStubImpl { //-------------------------------------------------------------- @@ -2538,7 +2540,7 @@ } const RegMask Matcher::method_handle_invoke_SP_save_mask() { - return RegMask(); + return FP_REG_mask(); } // helper for encoding java_to_runtime calls on sim diff -r 70e383dfc35e -r 989253a902c3 hotspot/src/cpu/aarch64/vm/frame_aarch64.inline.hpp --- a/hotspot/src/cpu/aarch64/vm/frame_aarch64.inline.hpp Wed Jul 05 20:30:12 2017 +0200 +++ b/hotspot/src/cpu/aarch64/vm/frame_aarch64.inline.hpp Wed Jul 05 20:31:05 2017 +0200 @@ -77,12 +77,6 @@ inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc) { intptr_t a = intptr_t(sp); intptr_t b = intptr_t(fp); -#ifndef PRODUCT - if (fp) - if (sp > fp || (fp - sp > 0x100000)) - for(;;) - asm("nop"); -#endif _sp = sp; _unextended_sp = unextended_sp; _fp = fp; @@ -104,12 +98,6 @@ inline frame::frame(intptr_t* sp, intptr_t* fp) { intptr_t a = intptr_t(sp); intptr_t b = intptr_t(fp); -#ifndef PRODUCT - if (fp) - if (sp > fp || (fp - sp > 0x100000)) - for(;;) - asm("nop"); -#endif _sp = sp; _unextended_sp = sp; _fp = fp; diff -r 70e383dfc35e -r 989253a902c3 hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp --- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp Wed Jul 05 20:30:12 2017 +0200 +++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp Wed Jul 05 20:31:05 2017 +0200 @@ -32,22 +32,14 @@ #include "compiler/disassembler.hpp" #include "memory/resourceArea.hpp" +#include "nativeInst_aarch64.hpp" +#include "opto/compile.hpp" +#include "opto/node.hpp" #include "runtime/biasedLocking.hpp" #include "runtime/icache.hpp" #include "runtime/interfaceSupport.hpp" #include "runtime/sharedRuntime.hpp" -// #include "gc_interface/collectedHeap.inline.hpp" -// #include "interpreter/interpreter.hpp" -// #include "memory/cardTableModRefBS.hpp" -// #include "prims/methodHandles.hpp" -// #include "runtime/biasedLocking.hpp" -// #include "runtime/interfaceSupport.hpp" -// #include "runtime/objectMonitor.hpp" -// #include "runtime/os.hpp" -// #include "runtime/sharedRuntime.hpp" -// #include "runtime/stubRoutines.hpp" - #if INCLUDE_ALL_GCS #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" diff -r 70e383dfc35e -r 989253a902c3 hotspot/test/compiler/floatingpoint/ModNaN.java --- a/hotspot/test/compiler/floatingpoint/ModNaN.java Wed Jul 05 20:30:12 2017 +0200 +++ b/hotspot/test/compiler/floatingpoint/ModNaN.java Wed Jul 05 20:31:05 2017 +0200 @@ -25,7 +25,7 @@ * @test * @bug 8015396 * @summary double a%b returns NaN for some (a,b) (|a| < inf, |b|>0) (on Core i7 980X) - * + * @ignore 8015396 * @run main ModNaN */ public class ModNaN { diff -r 70e383dfc35e -r 989253a902c3 jaxp/.hgtags --- a/jaxp/.hgtags Wed Jul 05 20:30:12 2017 +0200 +++ b/jaxp/.hgtags Wed Jul 05 20:31:05 2017 +0200 @@ -304,3 +304,4 @@ a1a9d943446911a4a0f74f0d082c32094af944ae jdk9-b59 c12db18748dacfccd6581ead29228c2cb6e51b34 jdk9-b60 f4a4a54620370f077c2e830a5561c8cfa811712b jdk9-b61 +3bcf83c1bbc1b7663e930d72c133a9bd86c7618d jdk9-b62 diff -r 70e383dfc35e -r 989253a902c3 jaxws/.hgtags --- a/jaxws/.hgtags Wed Jul 05 20:30:12 2017 +0200 +++ b/jaxws/.hgtags Wed Jul 05 20:31:05 2017 +0200 @@ -307,3 +307,4 @@ 8a9ebae410bc388668fc203e559b5407bde757eb jdk9-b59 f31835b59035377a220efc5a248b90f090ee1689 jdk9-b60 77f44848c44c003205490bf5ab88035233b65418 jdk9-b61 +cd0cf72b2cbf4adb778a02505fb065bb2292688c jdk9-b62 diff -r 70e383dfc35e -r 989253a902c3 jdk/.hgtags --- a/jdk/.hgtags Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/.hgtags Wed Jul 05 20:31:05 2017 +0200 @@ -304,3 +304,4 @@ 48ee960f29df93a9b2a895621321358a86909086 jdk9-b59 84c5527f742bc64562e47d3149c16197fe1c4c1a jdk9-b60 da84dcac1b0b12c5b836b05ac75ecbfadee0cd32 jdk9-b61 +49118e68fbd4cc0044e718c47db681946d5efd69 jdk9-b62 diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/com/sun/crypto/provider/JceKeyStore.java --- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/JceKeyStore.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/JceKeyStore.java Wed Jul 05 20:31:05 2017 +0200 @@ -711,7 +711,7 @@ cf = CertificateFactory.getInstance("X509"); } else { // version 2 - cfs = new Hashtable(3); + cfs = new Hashtable<>(3); } entries.clear(); diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEKeyFactory.java --- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEKeyFactory.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEKeyFactory.java Wed Jul 05 20:31:05 2017 +0200 @@ -56,7 +56,7 @@ } static { - validTypes = new HashSet(17); + validTypes = new HashSet<>(17); validTypes.add("PBEWithMD5AndDES".toUpperCase(Locale.ENGLISH)); validTypes.add("PBEWithSHA1AndDESede".toUpperCase(Locale.ENGLISH)); validTypes.add("PBEWithSHA1AndRC2_40".toUpperCase(Locale.ENGLISH)); diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java --- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java Wed Jul 05 20:31:05 2017 +0200 @@ -115,7 +115,7 @@ final String BLOCK_PADS = "NOPADDING|PKCS5PADDING|ISO10126PADDING"; AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public Object run() { /* diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/com/sun/net/ssl/KeyManagerFactory.java --- a/jdk/src/java.base/share/classes/com/sun/net/ssl/KeyManagerFactory.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/com/sun/net/ssl/KeyManagerFactory.java Wed Jul 05 20:31:05 2017 +0200 @@ -63,7 +63,7 @@ */ public final static String getDefaultAlgorithm() { String type; - type = AccessController.doPrivileged(new PrivilegedAction() { + type = AccessController.doPrivileged(new PrivilegedAction<>() { public String run() { return Security.getProperty("sun.ssl.keymanager.type"); } diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/com/sun/net/ssl/TrustManagerFactory.java --- a/jdk/src/java.base/share/classes/com/sun/net/ssl/TrustManagerFactory.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/com/sun/net/ssl/TrustManagerFactory.java Wed Jul 05 20:31:05 2017 +0200 @@ -63,7 +63,7 @@ */ public final static String getDefaultAlgorithm() { String type; - type = AccessController.doPrivileged(new PrivilegedAction() { + type = AccessController.doPrivileged(new PrivilegedAction<>() { public String run() { return Security.getProperty("sun.ssl.trustmanager.type"); } diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/lang/Runtime.java --- a/jdk/src/java.base/share/classes/java/lang/Runtime.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/lang/Runtime.java Wed Jul 05 20:31:05 2017 +0200 @@ -32,9 +32,9 @@ /** * Every Java application has a single instance of class - * Runtime that allows the application to interface with + * {@code Runtime} that allows the application to interface with * the environment in which the application is running. The current - * runtime can be obtained from the getRuntime method. + * runtime can be obtained from the {@code getRuntime} method. *

* An application cannot create its own instance of this class. * @@ -48,10 +48,10 @@ /** * Returns the runtime object associated with the current Java application. - * Most of the methods of class Runtime are instance + * Most of the methods of class {@code Runtime} are instance * methods and must be invoked with respect to the current runtime object. * - * @return the Runtime object associated with the current + * @return the {@code Runtime} object associated with the current * Java application. */ public static Runtime getRuntime() { @@ -72,8 +72,7 @@ * if any, are started in some unspecified order and allowed to run * concurrently until they finish. In the second phase all uninvoked * finalizers are run if {@link #runFinalizersOnExit finalization-on-exit} - * has been enabled. Once this is done the virtual machine {@link #halt - * halts}. + * has been enabled. Once this is done the virtual machine {@link #halt halts}. * *

If this method is invoked after the virtual machine has begun its * shutdown sequence then if shutdown hooks are being run this method will @@ -82,7 +81,7 @@ * with the given status code if the status is nonzero; otherwise, it * blocks indefinitely. * - *

The {@link System#exit(int) System.exit} method is the + *

The {@link System#exit(int) System.exit} method is the * conventional and convenient means of invoking this method. * * @param status @@ -90,8 +89,8 @@ * indicates abnormal termination. * * @throws SecurityException - * If a security manager is present and its {@link - * SecurityManager#checkExit checkExit} method does not permit + * If a security manager is present and its + * {@link SecurityManager#checkExit checkExit} method does not permit * exiting with the specified status * * @see java.lang.SecurityException @@ -118,11 +117,11 @@ *

    * *
  • The program exits normally, when the last non-daemon - * thread exits or when the {@link #exit exit} (equivalently, + * thread exits or when the {@link #exit exit} (equivalently, * {@link System#exit(int) System.exit}) method is invoked, or * *
  • The virtual machine is terminated in response to a - * user interrupt, such as typing ^C, or a system-wide event, + * user interrupt, such as typing {@code ^C}, or a system-wide event, * such as user logoff or system shutdown. * *
@@ -134,17 +133,16 @@ * run all uninvoked finalizers if finalization-on-exit has been enabled. * Finally, the virtual machine will halt. Note that daemon threads will * continue to run during the shutdown sequence, as will non-daemon threads - * if shutdown was initiated by invoking the {@link #exit exit} - * method. + * if shutdown was initiated by invoking the {@link #exit exit} method. * *

Once the shutdown sequence has begun it can be stopped only by - * invoking the {@link #halt halt} method, which forcibly + * invoking the {@link #halt halt} method, which forcibly * terminates the virtual machine. * *

Once the shutdown sequence has begun it is impossible to register a * new shutdown hook or de-register a previously-registered hook. * Attempting either of these operations will cause an - * {@link IllegalStateException} to be thrown. + * {@link IllegalStateException} to be thrown. * *

Shutdown hooks run at a delicate time in the life cycle of a virtual * machine and should therefore be coded defensively. They should, in @@ -156,7 +154,7 @@ * deadlocks. * *

Shutdown hooks should also finish their work quickly. When a - * program invokes {@link #exit exit} the expectation is + * program invokes {@link #exit exit} the expectation is * that the virtual machine will promptly shut down and exit. When the * virtual machine is terminated due to user logoff or system shutdown the * underlying operating system may only allow a fixed amount of time in @@ -165,17 +163,17 @@ * hook. * *

Uncaught exceptions are handled in shutdown hooks just as in any - * other thread, by invoking the {@link ThreadGroup#uncaughtException - * uncaughtException} method of the thread's {@link - * ThreadGroup} object. The default implementation of this method - * prints the exception's stack trace to {@link System#err} and + * other thread, by invoking the + * {@link ThreadGroup#uncaughtException uncaughtException} method of the + * thread's {@link ThreadGroup} object. The default implementation of this + * method prints the exception's stack trace to {@link System#err} and * terminates the thread; it does not cause the virtual machine to exit or * halt. * *

In rare circumstances the virtual machine may abort, that is, * stop running without shutting down cleanly. This occurs when the * virtual machine is terminated externally, for example with the - * SIGKILL signal on Unix or the TerminateProcess call on + * {@code SIGKILL} signal on Unix or the {@code TerminateProcess} call on * Microsoft Windows. The virtual machine may also abort if a native * method goes awry by, for example, corrupting internal data structures or * attempting to access nonexistent memory. If the virtual machine aborts @@ -183,7 +181,7 @@ * will be run. * * @param hook - * An initialized but unstarted {@link Thread} object + * An initialized but unstarted {@link Thread} object * * @throws IllegalArgumentException * If the specified hook has already been registered, @@ -196,7 +194,7 @@ * * @throws SecurityException * If a security manager is present and it denies - * {@link RuntimePermission}("shutdownHooks") + * {@link RuntimePermission}("shutdownHooks") * * @see #removeShutdownHook * @see #halt(int) @@ -212,11 +210,11 @@ } /** - * De-registers a previously-registered virtual-machine shutdown hook.

+ * De-registers a previously-registered virtual-machine shutdown hook. * * @param hook the hook to remove - * @return true if the specified hook had previously been - * registered and was successfully de-registered, false + * @return {@code true} if the specified hook had previously been + * registered and was successfully de-registered, {@code false} * otherwise. * * @throws IllegalStateException @@ -225,7 +223,7 @@ * * @throws SecurityException * If a security manager is present and it denies - * {@link RuntimePermission}("shutdownHooks") + * {@link RuntimePermission}("shutdownHooks") * * @see #addShutdownHook * @see #exit(int) @@ -244,23 +242,23 @@ * method never returns normally. * *

This method should be used with extreme caution. Unlike the - * {@link #exit exit} method, this method does not cause shutdown + * {@link #exit exit} method, this method does not cause shutdown * hooks to be started and does not run uninvoked finalizers if * finalization-on-exit has been enabled. If the shutdown sequence has * already been initiated then this method does not wait for any running * shutdown hooks or finalizers to finish their work. * * @param status - * Termination status. By convention, a nonzero status code - * indicates abnormal termination. If the {@link Runtime#exit - * exit} (equivalently, {@link System#exit(int) - * System.exit}) method has already been invoked then this - * status code will override the status code passed to that method. + * Termination status. By convention, a nonzero status code + * indicates abnormal termination. If the {@link Runtime#exit exit} + * (equivalently, {@link System#exit(int) System.exit}) method + * has already been invoked then this status code + * will override the status code passed to that method. * * @throws SecurityException - * If a security manager is present and its {@link - * SecurityManager#checkExit checkExit} method does not permit - * an exit with the specified status + * If a security manager is present and its + * {@link SecurityManager#checkExit checkExit} method + * does not permit an exit with the specified status * * @see #exit * @see #addShutdownHook @@ -282,7 +280,7 @@ * By default, finalization on exit is disabled. * *

If there is a security manager, - * its checkExit method is first called + * its {@code checkExit} method is first called * with 0 as its argument to ensure the exit is allowed. * This could result in a SecurityException. * @@ -293,7 +291,7 @@ * behavior or deadlock. * * @throws SecurityException - * if a security manager exists and its checkExit + * if a security manager exists and its {@code checkExit} * method doesn't allow the exit. * * @see java.lang.Runtime#exit(int) @@ -318,9 +316,9 @@ * Executes the specified string command in a separate process. * *

This is a convenience method. An invocation of the form - * exec(command) + * {@code exec(command)} * behaves in exactly the same way as the invocation - * {@link #exec(String, String[], File) exec}(command, null, null). + * {@link #exec(String, String[], File) exec}{@code (command, null, null)}. * * @param command a specified system command. * @@ -335,10 +333,10 @@ * If an I/O error occurs * * @throws NullPointerException - * If command is null + * If {@code command} is {@code null} * * @throws IllegalArgumentException - * If command is empty + * If {@code command} is empty * * @see #exec(String[], String[], File) * @see ProcessBuilder @@ -352,16 +350,16 @@ * specified environment. * *

This is a convenience method. An invocation of the form - * exec(command, envp) + * {@code exec(command, envp)} * behaves in exactly the same way as the invocation - * {@link #exec(String, String[], File) exec}(command, envp, null). + * {@link #exec(String, String[], File) exec}{@code (command, envp, null)}. * * @param command a specified system command. * * @param envp array of strings, each element of which * has environment variable settings in the format * name=value, or - * null if the subprocess should inherit + * {@code null} if the subprocess should inherit * the environment of the current process. * * @return A new {@link Process} object for managing the subprocess @@ -375,11 +373,11 @@ * If an I/O error occurs * * @throws NullPointerException - * If command is null, - * or one of the elements of envp is null + * If {@code command} is {@code null}, + * or one of the elements of {@code envp} is {@code null} * * @throws IllegalArgumentException - * If command is empty + * If {@code command} is empty * * @see #exec(String[], String[], File) * @see ProcessBuilder @@ -393,29 +391,29 @@ * specified environment and working directory. * *

This is a convenience method. An invocation of the form - * exec(command, envp, dir) + * {@code exec(command, envp, dir)} * behaves in exactly the same way as the invocation - * {@link #exec(String[], String[], File) exec}(cmdarray, envp, dir), - * where cmdarray is an array of all the tokens in - * command. + * {@link #exec(String[], String[], File) exec}{@code (cmdarray, envp, dir)}, + * where {@code cmdarray} is an array of all the tokens in + * {@code command}. * - *

More precisely, the command string is broken + *

More precisely, the {@code command} string is broken * into tokens using a {@link StringTokenizer} created by the call - * new {@link StringTokenizer}(command) with no + * {@code new {@link StringTokenizer}(command)} with no * further modification of the character categories. The tokens * produced by the tokenizer are then placed in the new string - * array cmdarray, in the same order. + * array {@code cmdarray}, in the same order. * * @param command a specified system command. * * @param envp array of strings, each element of which * has environment variable settings in the format * name=value, or - * null if the subprocess should inherit + * {@code null} if the subprocess should inherit * the environment of the current process. * * @param dir the working directory of the subprocess, or - * null if the subprocess should inherit + * {@code null} if the subprocess should inherit * the working directory of the current process. * * @return A new {@link Process} object for managing the subprocess @@ -429,11 +427,11 @@ * If an I/O error occurs * * @throws NullPointerException - * If command is null, - * or one of the elements of envp is null + * If {@code command} is {@code null}, + * or one of the elements of {@code envp} is {@code null} * * @throws IllegalArgumentException - * If command is empty + * If {@code command} is empty * * @see ProcessBuilder * @since 1.3 @@ -454,9 +452,9 @@ * Executes the specified command and arguments in a separate process. * *

This is a convenience method. An invocation of the form - * exec(cmdarray) + * {@code exec(cmdarray)} * behaves in exactly the same way as the invocation - * {@link #exec(String[], String[], File) exec}(cmdarray, null, null). + * {@link #exec(String[], String[], File) exec}{@code (cmdarray, null, null)}. * * @param cmdarray array containing the command to call and * its arguments. @@ -472,12 +470,12 @@ * If an I/O error occurs * * @throws NullPointerException - * If cmdarray is null, - * or one of the elements of cmdarray is null + * If {@code cmdarray} is {@code null}, + * or one of the elements of {@code cmdarray} is {@code null} * * @throws IndexOutOfBoundsException - * If cmdarray is an empty array - * (has length 0) + * If {@code cmdarray} is an empty array + * (has length {@code 0}) * * @see ProcessBuilder */ @@ -490,9 +488,9 @@ * with the specified environment. * *

This is a convenience method. An invocation of the form - * exec(cmdarray, envp) + * {@code exec(cmdarray, envp)} * behaves in exactly the same way as the invocation - * {@link #exec(String[], String[], File) exec}(cmdarray, envp, null). + * {@link #exec(String[], String[], File) exec}{@code (cmdarray, envp, null)}. * * @param cmdarray array containing the command to call and * its arguments. @@ -500,7 +498,7 @@ * @param envp array of strings, each element of which * has environment variable settings in the format * name=value, or - * null if the subprocess should inherit + * {@code null} if the subprocess should inherit * the environment of the current process. * * @return A new {@link Process} object for managing the subprocess @@ -514,13 +512,13 @@ * If an I/O error occurs * * @throws NullPointerException - * If cmdarray is null, - * or one of the elements of cmdarray is null, - * or one of the elements of envp is null + * If {@code cmdarray} is {@code null}, + * or one of the elements of {@code cmdarray} is {@code null}, + * or one of the elements of {@code envp} is {@code null} * * @throws IndexOutOfBoundsException - * If cmdarray is an empty array - * (has length 0) + * If {@code cmdarray} is an empty array + * (has length {@code 0}) * * @see ProcessBuilder */ @@ -533,17 +531,17 @@ * Executes the specified command and arguments in a separate process with * the specified environment and working directory. * - *

Given an array of strings cmdarray, representing the - * tokens of a command line, and an array of strings envp, + *

Given an array of strings {@code cmdarray}, representing the + * tokens of a command line, and an array of strings {@code envp}, * representing "environment" variable settings, this method creates * a new process in which to execute the specified command. * - *

This method checks that cmdarray is a valid operating + *

This method checks that {@code cmdarray} is a valid operating * system command. Which commands are valid is system-dependent, * but at the very least the command must be a non-empty list of * non-null strings. * - *

If envp is null, the subprocess inherits the + *

If {@code envp} is {@code null}, the subprocess inherits the * environment settings of the current process. * *

A minimal set of system dependent environment variables may @@ -554,14 +552,14 @@ *

{@link ProcessBuilder#start()} is now the preferred way to * start a process with a modified environment. * - *

The working directory of the new subprocess is specified by dir. - * If dir is null, the subprocess inherits the + *

The working directory of the new subprocess is specified by {@code dir}. + * If {@code dir} is {@code null}, the subprocess inherits the * current working directory of the current process. * *

If a security manager exists, its * {@link SecurityManager#checkExec checkExec} * method is invoked with the first component of the array - * cmdarray as its argument. This may result in a + * {@code cmdarray} as its argument. This may result in a * {@link SecurityException} being thrown. * *

Starting an operating system process is highly system-dependent. @@ -586,11 +584,11 @@ * @param envp array of strings, each element of which * has environment variable settings in the format * name=value, or - * null if the subprocess should inherit + * {@code null} if the subprocess should inherit * the environment of the current process. * * @param dir the working directory of the subprocess, or - * null if the subprocess should inherit + * {@code null} if the subprocess should inherit * the working directory of the current process. * * @return A new {@link Process} object for managing the subprocess @@ -607,13 +605,13 @@ * If an I/O error occurs * * @throws NullPointerException - * If cmdarray is null, - * or one of the elements of cmdarray is null, - * or one of the elements of envp is null + * If {@code cmdarray} is {@code null}, + * or one of the elements of {@code cmdarray} is {@code null}, + * or one of the elements of {@code envp} is {@code null} * * @throws IndexOutOfBoundsException - * If cmdarray is an empty array - * (has length 0) + * If {@code cmdarray} is an empty array + * (has length {@code 0}) * * @see ProcessBuilder * @since 1.3 @@ -643,8 +641,8 @@ /** * Returns the amount of free memory in the Java Virtual Machine. * Calling the - * gc method may result in increasing the value returned - * by freeMemory. + * {@code gc} method may result in increasing the value returned + * by {@code freeMemory.} * * @return an approximation to the total amount of memory currently * available for future allocated objects, measured in bytes. @@ -665,9 +663,9 @@ public native long totalMemory(); /** - * Returns the maximum amount of memory that the Java virtual machine will - * attempt to use. If there is no inherent limit then the value {@link - * java.lang.Long#MAX_VALUE} will be returned. + * Returns the maximum amount of memory that the Java virtual machine + * will attempt to use. If there is no inherent limit then the value + * {@link java.lang.Long#MAX_VALUE} will be returned. * * @return the maximum amount of memory that the virtual machine will * attempt to use, measured in bytes @@ -683,10 +681,10 @@ * returns from the method call, the virtual machine has made * its best effort to recycle all discarded objects. *

- * The name gc stands for "garbage + * The name {@code gc} stands for "garbage * collector". The virtual machine performs this recycling * process automatically as needed, in a separate thread, even if the - * gc method is not invoked explicitly. + * {@code gc} method is not invoked explicitly. *

* The method {@link System#gc()} is the conventional and convenient * means of invoking this method. @@ -699,15 +697,15 @@ /** * Runs the finalization methods of any objects pending finalization. * Calling this method suggests that the Java virtual machine expend - * effort toward running the finalize methods of objects - * that have been found to be discarded but whose finalize + * effort toward running the {@code finalize} methods of objects + * that have been found to be discarded but whose {@code finalize} * methods have not yet been run. When control returns from the * method call, the virtual machine has made a best effort to * complete all outstanding finalizations. *

* The virtual machine performs the finalization process * automatically as needed, in a separate thread, if the - * runFinalization method is not invoked explicitly. + * {@code runFinalization} method is not invoked explicitly. *

* The method {@link System#runFinalization()} is the conventional * and convenient means of invoking this method. @@ -720,7 +718,7 @@ /** * Enables/Disables tracing of instructions. - * If the boolean argument is true, this + * If the {@code boolean} argument is {@code true}, this * method suggests that the Java virtual machine emit debugging * information for each instruction in the virtual machine as it * is executed. The format of this information, and the file or other @@ -729,18 +727,18 @@ * this feature. The destination of the trace output is system * dependent. *

- * If the boolean argument is false, this + * If the {@code boolean} argument is {@code false}, this * method causes the virtual machine to stop performing the * detailed instruction trace it is performing. * - * @param on true to enable instruction tracing; - * false to disable this feature. + * @param on {@code true} to enable instruction tracing; + * {@code false} to disable this feature. */ public void traceInstructions(boolean on) { } /** * Enables/Disables tracing of method calls. - * If the boolean argument is true, this + * If the {@code boolean} argument is {@code true}, this * method suggests that the Java virtual machine emit debugging * information for each method in the virtual machine as it is * called. The format of this information, and the file or other output @@ -751,8 +749,8 @@ * Calling this method with argument false suggests that the * virtual machine cease emitting per-call debugging information. * - * @param on true to enable instruction tracing; - * false to disable this feature. + * @param on {@code true} to enable instruction tracing; + * {@code false} to disable this feature. */ public void traceMethodCalls(boolean on) { } @@ -760,7 +758,7 @@ * Loads the native library specified by the filename argument. The filename * argument must be an absolute path name. * (for example - * Runtime.getRuntime().load("/home/avh/lib/libX11.so");). + * {@code Runtime.getRuntime().load("/home/avh/lib/libX11.so");}). * * If the filename argument, when stripped of any platform-specific library * prefix, path, and file extension, indicates a library whose name is, @@ -773,8 +771,8 @@ * Otherwise, the filename argument is mapped to a native library image in * an implementation-dependent manner. *

- * First, if there is a security manager, its checkLink - * method is called with the filename as its argument. + * First, if there is a security manager, its {@code checkLink} + * method is called with the {@code filename} as its argument. * This may result in a security exception. *

* This is similar to the method {@link #loadLibrary(String)}, but it @@ -786,14 +784,14 @@ * * @param filename the file to load. * @exception SecurityException if a security manager exists and its - * checkLink method doesn't allow + * {@code checkLink} method doesn't allow * loading of the specified dynamic library * @exception UnsatisfiedLinkError if either the filename is not an * absolute path name, the native library is not statically * linked with the VM, or the library cannot be mapped to * a native library image by the host system. - * @exception NullPointerException if filename is - * null + * @exception NullPointerException if {@code filename} is + * {@code null} * @see java.lang.Runtime#getRuntime() * @see java.lang.SecurityException * @see java.lang.SecurityManager#checkLink(java.lang.String) @@ -816,26 +814,26 @@ } /** - * Loads the native library specified by the libname - * argument. The libname argument must not contain any platform + * Loads the native library specified by the {@code libname} + * argument. The {@code libname} argument must not contain any platform * specific prefix, file extension or path. If a native library - * called libname is statically linked with the VM, then the - * JNI_OnLoad_libname function exported by the library is invoked. + * called {@code libname} is statically linked with the VM, then the + * JNI_OnLoad_{@code libname} function exported by the library is invoked. * See the JNI Specification for more details. * * Otherwise, the libname argument is loaded from a system library * location and mapped to a native library image in an implementation- * dependent manner. *

- * First, if there is a security manager, its checkLink - * method is called with the libname as its argument. + * First, if there is a security manager, its {@code checkLink} + * method is called with the {@code libname} as its argument. * This may result in a security exception. *

* The method {@link System#loadLibrary(String)} is the conventional * and convenient means of invoking this method. If native * methods are to be used in the implementation of a class, a standard * strategy is to put the native code in a library file (call it - * LibFile) and then to put a static initializer: + * {@code LibFile}) and then to put a static initializer: *

      * static { System.loadLibrary("LibFile"); }
      * 
@@ -848,14 +846,14 @@ * * @param libname the name of the library. * @exception SecurityException if a security manager exists and its - * checkLink method doesn't allow + * {@code checkLink} method doesn't allow * loading of the specified dynamic library * @exception UnsatisfiedLinkError if either the libname argument * contains a file path, the native library is not statically * linked with the VM, or the library cannot be mapped to a * native library image by the host system. - * @exception NullPointerException if libname is - * null + * @exception NullPointerException if {@code libname} is + * {@code null} * @see java.lang.SecurityException * @see java.lang.SecurityManager#checkLink(java.lang.String) */ @@ -878,7 +876,7 @@ /** * Creates a localized version of an input stream. This method takes - * an InputStream and returns an InputStream + * an {@code InputStream} and returns an {@code InputStream} * equivalent to the argument in all respects except that it is * localized: as characters in the local character set are read from * the stream, they are automatically converted from the local @@ -894,7 +892,7 @@ * @see java.io.InputStreamReader#InputStreamReader(java.io.InputStream) * @deprecated As of JDK 1.1, the preferred way to translate a byte * stream in the local encoding into a character stream in Unicode is via - * the InputStreamReader and BufferedReader + * the {@code InputStreamReader} and {@code BufferedReader} * classes. */ @Deprecated @@ -904,8 +902,8 @@ /** * Creates a localized version of an output stream. This method - * takes an OutputStream and returns an - * OutputStream equivalent to the argument in all respects + * takes an {@code OutputStream} and returns an + * {@code OutputStream} equivalent to the argument in all respects * except that it is localized: as Unicode characters are written to * the stream, they are automatically converted to the local * character set. @@ -915,8 +913,8 @@ * * @deprecated As of JDK 1.1, the preferred way to translate a * Unicode character stream into a byte stream in the local encoding is via - * the OutputStreamWriter, BufferedWriter, and - * PrintWriter classes. + * the {@code OutputStreamWriter}, {@code BufferedWriter}, and + * {@code PrintWriter} classes. * * @param out OutputStream to localize * @return a localized output stream diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/lang/invoke/LambdaForm.java --- a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaForm.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaForm.java Wed Jul 05 20:31:05 2017 +0200 @@ -631,7 +631,7 @@ * as a sort of pre-invocation linkage step.) */ public void prepare() { - if (COMPILE_THRESHOLD == 0) { + if (COMPILE_THRESHOLD == 0 && !isCompiled) { compileToBytecode(); } if (this.vmentry != null) { @@ -645,11 +645,11 @@ /** Generate optimizable bytecode for this form. */ MemberName compileToBytecode() { - MethodType invokerType = methodType(); - assert(vmentry == null || vmentry.getMethodType().basicType().equals(invokerType)); if (vmentry != null && isCompiled) { return vmentry; // already compiled somehow } + MethodType invokerType = methodType(); + assert(vmentry == null || vmentry.getMethodType().basicType().equals(invokerType)); try { vmentry = InvokerBytecodeGenerator.generateCustomizedCode(this, invokerType); if (TRACE_INTERPRETER) diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/nio/file/AtomicMoveNotSupportedException.java --- a/jdk/src/java.base/share/classes/java/nio/file/AtomicMoveNotSupportedException.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/nio/file/AtomicMoveNotSupportedException.java Wed Jul 05 20:31:05 2017 +0200 @@ -45,7 +45,7 @@ * @param target * a string identifying the target file or {@code null} if not known * @param reason - * a reason message with additional information + * a reason message with additional information or {@code null} */ public AtomicMoveNotSupportedException(String source, String target, diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/AccessControlContext.java --- a/jdk/src/java.base/share/classes/java/security/AccessControlContext.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/AccessControlContext.java Wed Jul 05 20:31:05 2017 +0200 @@ -458,7 +458,7 @@ Thread.dumpStack(); final ProtectionDomain pd = context[i]; final Debug db = debug; - AccessController.doPrivileged (new PrivilegedAction() { + AccessController.doPrivileged (new PrivilegedAction<>() { public Void run() { db.println("domain that failed "+pd); return null; diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/AccessController.java --- a/jdk/src/java.base/share/classes/java/security/AccessController.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/AccessController.java Wed Jul 05 20:31:05 2017 +0200 @@ -612,7 +612,7 @@ private static ProtectionDomain getCallerPD(final Class caller) { ProtectionDomain callerPd = doPrivileged - (new PrivilegedAction() { + (new PrivilegedAction<>() { public ProtectionDomain run() { return caller.getProtectionDomain(); } diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/AllPermission.java --- a/jdk/src/java.base/share/classes/java/security/AllPermission.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/AllPermission.java Wed Jul 05 20:31:05 2017 +0200 @@ -212,7 +212,7 @@ * @return an enumeration of all the AllPermission objects. */ public Enumeration elements() { - return new Enumeration() { + return new Enumeration<>() { private boolean hasMore = all_allowed; public boolean hasMoreElements() { diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/BasicPermission.java --- a/jdk/src/java.base/share/classes/java/security/BasicPermission.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/BasicPermission.java Wed Jul 05 20:31:05 2017 +0200 @@ -332,7 +332,7 @@ */ public BasicPermissionCollection(Class clazz) { - perms = new HashMap(11); + perms = new HashMap<>(11); all_allowed = false; permClass = clazz; } @@ -533,7 +533,7 @@ @SuppressWarnings("unchecked") Hashtable permissions = (Hashtable)gfields.get("permissions", null); - perms = new HashMap(permissions.size()*2); + perms = new HashMap<>(permissions.size()*2); perms.putAll(permissions); // Get all_allowed diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/CodeSource.java --- a/jdk/src/java.base/share/classes/java/security/CodeSource.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/CodeSource.java Wed Jul 05 20:31:05 2017 +0200 @@ -543,7 +543,7 @@ if (size > 0) { // we know of 3 different cert types: X.509, PGP, SDSI, which // could all be present in the stream at the same time - cfs = new Hashtable(3); + cfs = new Hashtable<>(3); this.certs = new java.security.cert.Certificate[size]; } diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/Identity.java --- a/jdk/src/java.base/share/classes/java/security/Identity.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/Identity.java Wed Jul 05 20:31:05 2017 +0200 @@ -185,7 +185,7 @@ check("setIdentityPublicKey"); this.publicKey = key; - certificates = new Vector(); + certificates = new Vector<>(); } /** @@ -248,7 +248,7 @@ check("addIdentityCertificate"); if (certificates == null) { - certificates = new Vector(); + certificates = new Vector<>(); } if (publicKey != null) { if (!keyEquals(publicKey, certificate.getPublicKey())) { diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/IdentityScope.java --- a/jdk/src/java.base/share/classes/java/security/IdentityScope.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/IdentityScope.java Wed Jul 05 20:31:05 2017 +0200 @@ -74,7 +74,7 @@ private static void initializeSystemScope() { String classname = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public String run() { return Security.getProperty("system.scope"); } diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/KeyStore.java --- a/jdk/src/java.base/share/classes/java/security/KeyStore.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/KeyStore.java Wed Jul 05 20:31:05 2017 +0200 @@ -976,7 +976,7 @@ */ public final static String getDefaultType() { String kstype; - kstype = AccessController.doPrivileged(new PrivilegedAction() { + kstype = AccessController.doPrivileged(new PrivilegedAction<>() { public String run() { return Security.getProperty(KEYSTORE_TYPE); } diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/Permissions.java --- a/jdk/src/java.base/share/classes/java/security/Permissions.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/Permissions.java Wed Jul 05 20:31:05 2017 +0200 @@ -99,7 +99,7 @@ * Creates a new Permissions object containing no PermissionCollections. */ public Permissions() { - permsMap = new HashMap, PermissionCollection>(11); + permsMap = new HashMap<>(11); allPermission = null; } @@ -394,7 +394,7 @@ @SuppressWarnings("unchecked") Hashtable, PermissionCollection> perms = (Hashtable, PermissionCollection>)gfields.get("perms", null); - permsMap = new HashMap, PermissionCollection>(perms.size()*2); + permsMap = new HashMap<>(perms.size()*2); permsMap.putAll(perms); // Set hasUnresolved @@ -488,7 +488,7 @@ */ PermissionsHash() { - permsMap = new HashMap(11); + permsMap = new HashMap<>(11); } /** @@ -597,7 +597,7 @@ @SuppressWarnings("unchecked") Hashtable perms = (Hashtable)gfields.get("perms", null); - permsMap = new HashMap(perms.size()*2); + permsMap = new HashMap<>(perms.size()*2); permsMap.putAll(perms); } } diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/Policy.java --- a/jdk/src/java.base/share/classes/java/security/Policy.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/Policy.java Wed Jul 05 20:31:05 2017 +0200 @@ -170,7 +170,7 @@ PolicyInfo pinfo = policy.get(); if (pinfo.policy == null) { String policy_class = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public String run() { return Security.getProperty("policy.provider"); } @@ -199,7 +199,7 @@ final String pc = policy_class; Policy pol = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public Policy run() { try { ClassLoader cl = @@ -303,7 +303,7 @@ */ ProtectionDomain policyDomain = - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public ProtectionDomain run() { return p.getClass().getProtectionDomain(); } diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/ProtectionDomain.java --- a/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java Wed Jul 05 20:31:05 2017 +0200 @@ -367,7 +367,7 @@ PermissionCollection perms = java.security.AccessController.doPrivileged - (new java.security.PrivilegedAction() { + (new java.security.PrivilegedAction<>() { public PermissionCollection run() { Policy p = Policy.getPolicyNoCheck(); return p.getPermissions(ProtectionDomain.this); diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/Provider.java --- a/jdk/src/java.base/share/classes/java/security/Provider.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/Provider.java Wed Jul 05 20:31:05 2017 +0200 @@ -711,7 +711,7 @@ legacyChanged = true; if (legacyStrings == null) { - legacyStrings = new LinkedHashMap(); + legacyStrings = new LinkedHashMap<>(); } return true; } @@ -773,7 +773,7 @@ private void implReplaceAll(BiFunction function) { legacyChanged = true; if (legacyStrings == null) { - legacyStrings = new LinkedHashMap(); + legacyStrings = new LinkedHashMap<>(); } else { legacyStrings.replaceAll((BiFunction) function); } @@ -905,7 +905,7 @@ } serviceSet = null; if (legacyMap == null) { - legacyMap = new LinkedHashMap(); + legacyMap = new LinkedHashMap<>(); } else { legacyMap.clear(); } @@ -1133,7 +1133,7 @@ ("service.getProvider() must match this Provider object"); } if (serviceMap == null) { - serviceMap = new LinkedHashMap(); + serviceMap = new LinkedHashMap<>(); } servicesChanged = true; String type = s.getType(); @@ -1305,7 +1305,7 @@ } static { - knownEngines = new HashMap(); + knownEngines = new HashMap<>(); // JCA addEngine("AlgorithmParameterGenerator", false, null); addEngine("AlgorithmParameters", false, null); @@ -1431,14 +1431,14 @@ private void addAlias(String alias) { if (aliases.isEmpty()) { - aliases = new ArrayList(2); + aliases = new ArrayList<>(2); } aliases.add(alias); } void addAttribute(String type, String value) { if (attributes.isEmpty()) { - attributes = new HashMap(8); + attributes = new HashMap<>(8); } attributes.put(new UString(type), value); } @@ -1471,12 +1471,12 @@ if (aliases == null) { this.aliases = Collections.emptyList(); } else { - this.aliases = new ArrayList(aliases); + this.aliases = new ArrayList<>(aliases); } if (attributes == null) { this.attributes = Collections.emptyMap(); } else { - this.attributes = new HashMap(); + this.attributes = new HashMap<>(); for (Map.Entry entry : attributes.entrySet()) { this.attributes.put(new UString(entry.getKey()), entry.getValue()); } @@ -1644,7 +1644,7 @@ ("class configured for " + type + " (provider: " + provider.getName() + ") is not public."); } - classRef = new WeakReference>(clazz); + classRef = new WeakReference<>(clazz); } return clazz; } catch (ClassNotFoundException e) { diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/SecureRandom.java --- a/jdk/src/java.base/share/classes/java/security/SecureRandom.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/SecureRandom.java Wed Jul 05 20:31:05 2017 +0200 @@ -616,7 +616,7 @@ throws NoSuchAlgorithmException { String property = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { @Override public String run() { return Security.getProperty( diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/Security.java --- a/jdk/src/java.base/share/classes/java/security/Security.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/Security.java Wed Jul 05 20:31:05 2017 +0200 @@ -66,7 +66,7 @@ // things in initialize that might require privs. // (the FileInputStream call and the File.exists call, // the securityPropFile call, etc) - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { initialize(); return null; @@ -810,7 +810,7 @@ final boolean pd = key.equals("package.definition"); if (pa || pd) { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { try { /* Get the class via the bootstrap class loader. */ diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/Signature.java --- a/jdk/src/java.base/share/classes/java/security/Signature.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/Signature.java Wed Jul 05 20:31:05 2017 +0200 @@ -265,7 +265,7 @@ private final static Map signatureInfo; static { - signatureInfo = new ConcurrentHashMap(); + signatureInfo = new ConcurrentHashMap<>(); Boolean TRUE = Boolean.TRUE; // pre-initialize with values for our SignatureSpi implementations signatureInfo.put("sun.security.provider.DSA$RawDSA", TRUE); diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/Signer.java --- a/jdk/src/java.base/share/classes/java/security/Signer.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/Signer.java Wed Jul 05 20:31:05 2017 +0200 @@ -140,7 +140,7 @@ } try { AccessController.doPrivileged( - new PrivilegedExceptionAction() { + new PrivilegedExceptionAction<>() { public Void run() throws KeyManagementException { setPublicKey(pub); return null; diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java --- a/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java Wed Jul 05 20:31:05 2017 +0200 @@ -560,7 +560,7 @@ if (size > 0) { // we know of 3 different cert types: X.509, PGP, SDSI, which // could all be present in the stream at the same time - cfs = new Hashtable(3); + cfs = new Hashtable<>(3); this.certs = new java.security.cert.Certificate[size]; } diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java --- a/jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java Wed Jul 05 20:31:05 2017 +0200 @@ -61,7 +61,7 @@ * */ public UnresolvedPermissionCollection() { - perms = new HashMap>(11); + perms = new HashMap<>(11); } /** @@ -82,7 +82,7 @@ synchronized (this) { v = perms.get(up.getName()); if (v == null) { - v = new ArrayList(); + v = new ArrayList<>(); perms.put(up.getName(), v); } } @@ -203,7 +203,7 @@ Hashtable> permissions = (Hashtable>) gfields.get("permissions", null); - perms = new HashMap>(permissions.size()*2); + perms = new HashMap<>(permissions.size()*2); // Convert each entry (Vector) into a List Set>> set = permissions.entrySet(); diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java --- a/jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java Wed Jul 05 20:31:05 2017 +0200 @@ -301,7 +301,7 @@ */ public final static String getDefaultType() { String cpbtype = - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public String run() { return Security.getProperty(CPB_TYPE); } diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java --- a/jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java Wed Jul 05 20:31:05 2017 +0200 @@ -313,7 +313,7 @@ */ public final static String getDefaultType() { String cpvtype = - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public String run() { return Security.getProperty(CPV_TYPE); } diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/cert/CertStore.java --- a/jdk/src/java.base/share/classes/java/security/cert/CertStore.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/cert/CertStore.java Wed Jul 05 20:31:05 2017 +0200 @@ -409,7 +409,7 @@ */ public final static String getDefaultType() { String cstype; - cstype = AccessController.doPrivileged(new PrivilegedAction() { + cstype = AccessController.doPrivileged(new PrivilegedAction<>() { public String run() { return Security.getProperty(CERTSTORE_TYPE); } diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/cert/CertificateRevokedException.java --- a/jdk/src/java.base/share/classes/java/security/cert/CertificateRevokedException.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateRevokedException.java Wed Jul 05 20:31:05 2017 +0200 @@ -231,7 +231,7 @@ if (size == 0) { extensions = Collections.emptyMap(); } else { - extensions = new HashMap(size); + extensions = new HashMap<>(size); } // Read in the extensions and put the mappings in the extensions map diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/cert/PKIXParameters.java --- a/jdk/src/java.base/share/classes/java/security/cert/PKIXParameters.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/cert/PKIXParameters.java Wed Jul 05 20:31:05 2017 +0200 @@ -120,8 +120,8 @@ setTrustAnchors(trustAnchors); this.unmodInitialPolicies = Collections.emptySet(); - this.certPathCheckers = new ArrayList(); - this.certStores = new ArrayList(); + this.certPathCheckers = new ArrayList<>(); + this.certStores = new ArrayList<>(); } /** @@ -144,7 +144,7 @@ if (keystore == null) throw new NullPointerException("the keystore parameter must be " + "non-null"); - Set hashSet = new HashSet(); + Set hashSet = new HashSet<>(); Enumeration aliases = keystore.aliases(); while (aliases.hasMoreElements()) { String alias = aliases.nextElement(); @@ -156,8 +156,8 @@ } setTrustAnchors(hashSet); this.unmodInitialPolicies = Collections.emptySet(); - this.certPathCheckers = new ArrayList(); - this.certStores = new ArrayList(); + this.certPathCheckers = new ArrayList<>(); + this.certStores = new ArrayList<>(); } /** @@ -207,7 +207,7 @@ } } this.unmodTrustAnchors = Collections.unmodifiableSet - (new HashSet(trustAnchors)); + (new HashSet<>(trustAnchors)); } /** @@ -256,7 +256,7 @@ + "of type java.lang.String"); } this.unmodInitialPolicies = - Collections.unmodifiableSet(new HashSet(initialPolicies)); + Collections.unmodifiableSet(new HashSet<>(initialPolicies)); } else this.unmodInitialPolicies = Collections.emptySet(); } @@ -280,7 +280,7 @@ */ public void setCertStores(List stores) { if (stores == null) { - this.certStores = new ArrayList(); + this.certStores = new ArrayList<>(); } else { for (Iterator i = stores.iterator(); i.hasNext();) { if (!(i.next() instanceof CertStore)) { @@ -288,7 +288,7 @@ + "of type java.security.cert.CertStore"); } } - this.certStores = new ArrayList(stores); + this.certStores = new ArrayList<>(stores); } } @@ -316,7 +316,7 @@ */ public List getCertStores() { return Collections.unmodifiableList - (new ArrayList(this.certStores)); + (new ArrayList<>(this.certStores)); } /** @@ -544,14 +544,13 @@ */ public void setCertPathCheckers(List checkers) { if (checkers != null) { - List tmpList = - new ArrayList(); + List tmpList = new ArrayList<>(); for (PKIXCertPathChecker checker : checkers) { tmpList.add((PKIXCertPathChecker)checker.clone()); } this.certPathCheckers = tmpList; } else { - this.certPathCheckers = new ArrayList(); + this.certPathCheckers = new ArrayList<>(); } } @@ -567,7 +566,7 @@ * @see #setCertPathCheckers */ public List getCertPathCheckers() { - List tmpList = new ArrayList(); + List tmpList = new ArrayList<>(); for (PKIXCertPathChecker ck : certPathCheckers) { tmpList.add((PKIXCertPathChecker)ck.clone()); } @@ -667,11 +666,11 @@ // must clone these because addCertStore, et al. modify them if (certStores != null) { - copy.certStores = new ArrayList(certStores); + copy.certStores = new ArrayList<>(certStores); } if (certPathCheckers != null) { copy.certPathCheckers = - new ArrayList(certPathCheckers.size()); + new ArrayList<>(certPathCheckers.size()); for (PKIXCertPathChecker checker : certPathCheckers) { copy.certPathCheckers.add( (PKIXCertPathChecker)checker.clone()); diff -r 70e383dfc35e -r 989253a902c3 jdk/src/java.base/share/classes/java/security/cert/PKIXRevocationChecker.java --- a/jdk/src/java.base/share/classes/java/security/cert/PKIXRevocationChecker.java Wed Jul 05 20:30:12 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/security/cert/PKIXRevocationChecker.java Wed Jul 05 20:31:05 2017 +0200 @@ -170,7 +170,7 @@ { this.ocspExtensions = (extensions == null) ? Collections.emptyList() - : new ArrayList(extensions); + : new ArrayList<>(extensions); } /** @@ -232,7 +232,7 @@ public void setOptions(Set