1.1 --- a/common/autoconf/generated-configure.sh Thu May 31 13:57:22 2018 +0100 1.2 +++ b/common/autoconf/generated-configure.sh Fri Jun 08 14:06:17 2018 -0700 1.3 @@ -868,6 +868,7 @@ 1.4 OUTPUT_ROOT 1.5 CONF_NAME 1.6 SPEC 1.7 +DEVKIT_LIB_DIR 1.8 BUILD_VARIANT_RELEASE 1.9 DEBUG_CLASSFILES 1.10 FASTDEBUG 1.11 @@ -4230,8 +4231,8 @@ 1.12 # 1.13 1.14 ################################################################################ 1.15 - 1.16 -VALID_VS_VERSIONS="2010 2012 2013" 1.17 +# The order of these defines the priority by which we try to find them. 1.18 +VALID_VS_VERSIONS="2010 2012 2013 2015 2017" 1.19 1.20 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010" 1.21 VS_VERSION_INTERNAL_2010=100 1.22 @@ -4264,6 +4265,30 @@ 1.23 VS_VS_PLATFORM_NAME_2013="v120" 1.24 VS_SDK_PLATFORM_NAME_2013= 1.25 1.26 +VS_DESCRIPTION_2015="Microsoft Visual Studio 2015 - CURRENTLY NOT WORKING" 1.27 +VS_VERSION_INTERNAL_2015=140 1.28 +VS_MSVCR_2015=vcruntime140.dll 1.29 +VS_MSVCP_2015=msvcp140.dll 1.30 +VS_ENVVAR_2015="VS140COMNTOOLS" 1.31 +VS_VS_INSTALLDIR_2015="Microsoft Visual Studio 14.0" 1.32 +VS_SDK_INSTALLDIR_2015= 1.33 +VS_VS_PLATFORM_NAME_2015="v140" 1.34 +VS_SDK_PLATFORM_NAME_2015= 1.35 +# The vcvars of 2015 breaks if 2017 is also installed. Work around this by 1.36 +# explicitly specifying Windows Kit 8.1 to be used. 1.37 +VS_ENV_ARGS_2015="8.1" 1.38 + 1.39 +VS_DESCRIPTION_2017="Microsoft Visual Studio 2017 - CURRENTLY NOT WORKING" 1.40 +VS_VERSION_INTERNAL_2017=141 1.41 +VS_MSVCR_2017=vcruntime140.dll 1.42 +VS_MSVCP_2017=msvcp140.dll 1.43 +VS_ENVVAR_2017="VS150COMNTOOLS" 1.44 +VS_VS_INSTALLDIR_2017="Microsoft Visual Studio/2017" 1.45 +VS_EDITIONS_2017="Community Professional Enterprise" 1.46 +VS_SDK_INSTALLDIR_2017= 1.47 +VS_VS_PLATFORM_NAME_2017="v141" 1.48 +VS_SDK_PLATFORM_NAME_2017= 1.49 + 1.50 ################################################################################ 1.51 1.52 1.53 @@ -4305,7 +4330,7 @@ 1.54 #CUSTOM_AUTOCONF_INCLUDE 1.55 1.56 # Do not change or remove the following line, it is needed for consistency checks: 1.57 -DATE_WHEN_GENERATED=1527770995 1.58 +DATE_WHEN_GENERATED=1528448223 1.59 1.60 ############################################################################### 1.61 # 1.62 @@ -14691,6 +14716,12 @@ 1.63 # Check whether --with-devkit was given. 1.64 if test "${with_devkit+set}" = set; then : 1.65 withval=$with_devkit; 1.66 +fi 1.67 + 1.68 + 1.69 + if test "x$with_devkit" = xyes; then 1.70 + as_fn_error $? "--with-devkit must have a value" "$LINENO" 5 1.71 + elif test "x$with_devkit" != x && test "x$with_devkit" != xno; then 1.72 1.73 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 1.74 1.75 @@ -14813,77 +14844,77 @@ 1.76 with_devkit="`cd "$path"; $THEPWDCMD -L`" 1.77 fi 1.78 1.79 - DEVKIT_ROOT="$with_devkit" 1.80 - # Check for a meta data info file in the root of the devkit 1.81 - if test -f "$DEVKIT_ROOT/devkit.info"; then 1.82 - . $DEVKIT_ROOT/devkit.info 1.83 - # This potentially sets the following: 1.84 - # A descriptive name of the devkit 1.85 + DEVKIT_ROOT="$with_devkit" 1.86 + # Check for a meta data info file in the root of the devkit 1.87 + if test -f "$DEVKIT_ROOT/devkit.info"; then 1.88 + . $DEVKIT_ROOT/devkit.info 1.89 + # This potentially sets the following: 1.90 + # A descriptive name of the devkit 1.91 1.92 if test "x$DEVKIT_NAME" = x; then 1.93 eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}" 1.94 fi 1.95 1.96 - # Corresponds to --with-extra-path 1.97 + # Corresponds to --with-extra-path 1.98 1.99 if test "x$DEVKIT_EXTRA_PATH" = x; then 1.100 eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}" 1.101 fi 1.102 1.103 - # Corresponds to --with-toolchain-path 1.104 + # Corresponds to --with-toolchain-path 1.105 1.106 if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then 1.107 eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}" 1.108 fi 1.109 1.110 - # Corresponds to --with-sysroot 1.111 + # Corresponds to --with-sysroot 1.112 1.113 if test "x$DEVKIT_SYSROOT" = x; then 1.114 eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}" 1.115 fi 1.116 1.117 1.118 - # Identifies the Visual Studio version in the devkit 1.119 + # Identifies the Visual Studio version in the devkit 1.120 1.121 if test "x$DEVKIT_VS_VERSION" = x; then 1.122 eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}" 1.123 fi 1.124 1.125 - # The Visual Studio include environment variable 1.126 + # The Visual Studio include environment variable 1.127 1.128 if test "x$DEVKIT_VS_INCLUDE" = x; then 1.129 eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}" 1.130 fi 1.131 1.132 - # The Visual Studio lib environment variable 1.133 + # The Visual Studio lib environment variable 1.134 1.135 if test "x$DEVKIT_VS_LIB" = x; then 1.136 eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}" 1.137 fi 1.138 1.139 - # Corresponds to --with-msvcr-dll 1.140 + # Corresponds to --with-msvcr-dll 1.141 1.142 if test "x$DEVKIT_MSVCR_DLL" = x; then 1.143 eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}" 1.144 fi 1.145 1.146 - # Corresponds to --with-msvcp-dll 1.147 + # Corresponds to --with-msvcp-dll 1.148 1.149 if test "x$DEVKIT_MSVCP_DLL" = x; then 1.150 eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}" 1.151 fi 1.152 1.153 - fi 1.154 - 1.155 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5 1.156 + fi 1.157 + 1.158 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5 1.159 $as_echo_n "checking for devkit... " >&6; } 1.160 - if test "x$DEVKIT_NAME" != x; then 1.161 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5 1.162 + if test "x$DEVKIT_NAME" != x; then 1.163 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5 1.164 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; } 1.165 - else 1.166 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5 1.167 + else 1.168 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5 1.169 $as_echo "$DEVKIT_ROOT" >&6; } 1.170 - fi 1.171 + fi 1.172 1.173 1.174 if test "x$DEVKIT_EXTRA_PATH" != x; then 1.175 @@ -14895,10 +14926,10 @@ 1.176 fi 1.177 1.178 1.179 - # Fallback default of just /bin if DEVKIT_PATH is not defined 1.180 - if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then 1.181 - DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin" 1.182 - fi 1.183 + # Fallback default of just /bin if DEVKIT_PATH is not defined 1.184 + if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then 1.185 + DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin" 1.186 + fi 1.187 1.188 if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then 1.189 if test "x$TOOLCHAIN_PATH" = x; then 1.190 @@ -14909,19 +14940,24 @@ 1.191 fi 1.192 1.193 1.194 - # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known 1.195 - # places for backwards compatiblity. 1.196 - if test "x$DEVKIT_SYSROOT" != x; then 1.197 - SYSROOT="$DEVKIT_SYSROOT" 1.198 - elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then 1.199 - SYSROOT="$DEVKIT_ROOT/$host_alias/libc" 1.200 - elif test -d "$DEVKIT_ROOT/$host/sys-root"; then 1.201 - SYSROOT="$DEVKIT_ROOT/$host/sys-root" 1.202 - fi 1.203 - 1.204 - 1.205 -fi 1.206 - 1.207 + # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known 1.208 + # places for backwards compatiblity. 1.209 + if test "x$DEVKIT_SYSROOT" != x; then 1.210 + SYSROOT="$DEVKIT_SYSROOT" 1.211 + elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then 1.212 + SYSROOT="$DEVKIT_ROOT/$host_alias/libc" 1.213 + elif test -d "$DEVKIT_ROOT/$host/sys-root"; then 1.214 + SYSROOT="$DEVKIT_ROOT/$host/sys-root" 1.215 + fi 1.216 + 1.217 + if test "x$DEVKIT_ROOT" != x; then 1.218 + DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib" 1.219 + if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 1.220 + DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64" 1.221 + fi 1.222 + 1.223 + fi 1.224 + fi 1.225 1.226 # You can force the sysroot if the sysroot encoded into the compiler tools 1.227 # is not correct. 1.228 @@ -25357,7 +25393,11 @@ 1.229 elif test "x$DEVKIT_VS_VERSION" != x; then 1.230 VS_VERSION=$DEVKIT_VS_VERSION 1.231 TOOLCHAIN_VERSION=$VS_VERSION 1.232 - eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}" 1.233 + # If the devkit has a name, use that as description 1.234 + VS_DESCRIPTION="$DEVKIT_NAME" 1.235 + if test "x$VS_DESCRIPTION" = x; then 1.236 + eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}" 1.237 + fi 1.238 eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}" 1.239 eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}" 1.240 eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}" 1.241 @@ -25425,7 +25465,9 @@ 1.242 eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}" 1.243 eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}" 1.244 eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}" 1.245 + eval VS_EDITIONS="\${VS_EDITIONS_${VS_VERSION}}" 1.246 eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}" 1.247 + eval VS_ENV_ARGS="\${VS_ENV_ARGS_${VS_VERSION}}" 1.248 1.249 # When using --with-tools-dir, assume it points to the correct and default 1.250 # version of Visual Studio or that --with-toolchain-version was also set. 1.251 @@ -25436,12 +25478,6 @@ 1.252 VS_BASE="$with_tools_dir/../.." 1.253 METHOD="--with-tools-dir" 1.254 1.255 - if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 1.256 - VCVARSFILE="vc/bin/vcvars32.bat" 1.257 - else 1.258 - VCVARSFILE="vc/bin/amd64/vcvars64.bat" 1.259 - fi 1.260 - 1.261 1.262 windows_path="$VS_BASE" 1.263 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 1.264 @@ -25452,19 +25488,43 @@ 1.265 VS_BASE="$unix_path" 1.266 fi 1.267 1.268 + # In VS 2017, the default installation is in a subdir named after the edition. 1.269 + # Find the first one present and use that. 1.270 + if test "x$VS_EDITIONS" != x; then 1.271 + for edition in $VS_EDITIONS; do 1.272 + if test -d "$VS_BASE/$edition"; then 1.273 + VS_BASE="$VS_BASE/$edition" 1.274 + break 1.275 + fi 1.276 + done 1.277 + fi 1.278 + 1.279 if test -d "$VS_BASE"; then 1.280 - if test -f "$VS_BASE/$VCVARSFILE"; then 1.281 - { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.282 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.283 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;} 1.284 - VS_ENV_CMD="$VS_BASE/$VCVARSFILE" 1.285 - # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see 1.286 - # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013 1.287 + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 1.288 + VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat" 1.289 + else 1.290 + VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \ 1.291 + vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat" 1.292 + fi 1.293 + 1.294 + for VCVARSFILE in $VCVARSFILES; do 1.295 + if test -f "$VS_BASE/$VCVARSFILE"; then 1.296 + VS_ENV_CMD="$VS_BASE/$VCVARSFILE" 1.297 + break 1.298 + fi 1.299 + done 1.300 + 1.301 + if test "x$VS_ENV_CMD" = x; then 1.302 + { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5 1.303 +$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;} 1.304 + else 1.305 + # PLATFORM_TOOLSET is used during the compilation of the freetype sources 1.306 + # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 1.307 + # 'v110' or 'v120' for VS 2010, 2012 or VS2013 1.308 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}" 1.309 - else 1.310 - { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.311 -$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;} 1.312 - { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 1.313 -$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 1.314 + 1.315 fi 1.316 fi 1.317 fi 1.318 @@ -25475,12 +25535,6 @@ 1.319 VS_BASE="$with_tools_dir/../../.." 1.320 METHOD="--with-tools-dir" 1.321 1.322 - if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 1.323 - VCVARSFILE="vc/bin/vcvars32.bat" 1.324 - else 1.325 - VCVARSFILE="vc/bin/amd64/vcvars64.bat" 1.326 - fi 1.327 - 1.328 1.329 windows_path="$VS_BASE" 1.330 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 1.331 @@ -25491,19 +25545,43 @@ 1.332 VS_BASE="$unix_path" 1.333 fi 1.334 1.335 + # In VS 2017, the default installation is in a subdir named after the edition. 1.336 + # Find the first one present and use that. 1.337 + if test "x$VS_EDITIONS" != x; then 1.338 + for edition in $VS_EDITIONS; do 1.339 + if test -d "$VS_BASE/$edition"; then 1.340 + VS_BASE="$VS_BASE/$edition" 1.341 + break 1.342 + fi 1.343 + done 1.344 + fi 1.345 + 1.346 if test -d "$VS_BASE"; then 1.347 - if test -f "$VS_BASE/$VCVARSFILE"; then 1.348 - { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.349 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.350 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;} 1.351 - VS_ENV_CMD="$VS_BASE/$VCVARSFILE" 1.352 - # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see 1.353 - # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013 1.354 + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 1.355 + VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat" 1.356 + else 1.357 + VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \ 1.358 + vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat" 1.359 + fi 1.360 + 1.361 + for VCVARSFILE in $VCVARSFILES; do 1.362 + if test -f "$VS_BASE/$VCVARSFILE"; then 1.363 + VS_ENV_CMD="$VS_BASE/$VCVARSFILE" 1.364 + break 1.365 + fi 1.366 + done 1.367 + 1.368 + if test "x$VS_ENV_CMD" = x; then 1.369 + { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5 1.370 +$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;} 1.371 + else 1.372 + # PLATFORM_TOOLSET is used during the compilation of the freetype sources 1.373 + # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 1.374 + # 'v110' or 'v120' for VS 2010, 2012 or VS2013 1.375 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}" 1.376 - else 1.377 - { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.378 -$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;} 1.379 - { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 1.380 -$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 1.381 + 1.382 fi 1.383 fi 1.384 fi 1.385 @@ -25522,7 +25600,6 @@ 1.386 fi 1.387 1.388 VS_ENV_CMD="" 1.389 - VS_ENV_ARGS="" 1.390 1.391 if test "x$VS_COMNTOOLS" != x; then 1.392 1.393 @@ -25531,12 +25608,6 @@ 1.394 VS_BASE="$VS_COMNTOOLS/../.." 1.395 METHOD="$VS_COMNTOOLS_VAR variable" 1.396 1.397 - if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 1.398 - VCVARSFILE="vc/bin/vcvars32.bat" 1.399 - else 1.400 - VCVARSFILE="vc/bin/amd64/vcvars64.bat" 1.401 - fi 1.402 - 1.403 1.404 windows_path="$VS_BASE" 1.405 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 1.406 @@ -25547,19 +25618,43 @@ 1.407 VS_BASE="$unix_path" 1.408 fi 1.409 1.410 + # In VS 2017, the default installation is in a subdir named after the edition. 1.411 + # Find the first one present and use that. 1.412 + if test "x$VS_EDITIONS" != x; then 1.413 + for edition in $VS_EDITIONS; do 1.414 + if test -d "$VS_BASE/$edition"; then 1.415 + VS_BASE="$VS_BASE/$edition" 1.416 + break 1.417 + fi 1.418 + done 1.419 + fi 1.420 + 1.421 if test -d "$VS_BASE"; then 1.422 - if test -f "$VS_BASE/$VCVARSFILE"; then 1.423 - { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.424 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.425 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;} 1.426 - VS_ENV_CMD="$VS_BASE/$VCVARSFILE" 1.427 - # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see 1.428 - # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013 1.429 + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 1.430 + VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat" 1.431 + else 1.432 + VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \ 1.433 + vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat" 1.434 + fi 1.435 + 1.436 + for VCVARSFILE in $VCVARSFILES; do 1.437 + if test -f "$VS_BASE/$VCVARSFILE"; then 1.438 + VS_ENV_CMD="$VS_BASE/$VCVARSFILE" 1.439 + break 1.440 + fi 1.441 + done 1.442 + 1.443 + if test "x$VS_ENV_CMD" = x; then 1.444 + { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5 1.445 +$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;} 1.446 + else 1.447 + # PLATFORM_TOOLSET is used during the compilation of the freetype sources 1.448 + # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 1.449 + # 'v110' or 'v120' for VS 2010, 2012 or VS2013 1.450 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}" 1.451 - else 1.452 - { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.453 -$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;} 1.454 - { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 1.455 -$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 1.456 + 1.457 fi 1.458 fi 1.459 fi 1.460 @@ -25572,12 +25667,6 @@ 1.461 VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR" 1.462 METHOD="well-known name" 1.463 1.464 - if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 1.465 - VCVARSFILE="vc/bin/vcvars32.bat" 1.466 - else 1.467 - VCVARSFILE="vc/bin/amd64/vcvars64.bat" 1.468 - fi 1.469 - 1.470 1.471 windows_path="$VS_BASE" 1.472 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 1.473 @@ -25588,19 +25677,43 @@ 1.474 VS_BASE="$unix_path" 1.475 fi 1.476 1.477 + # In VS 2017, the default installation is in a subdir named after the edition. 1.478 + # Find the first one present and use that. 1.479 + if test "x$VS_EDITIONS" != x; then 1.480 + for edition in $VS_EDITIONS; do 1.481 + if test -d "$VS_BASE/$edition"; then 1.482 + VS_BASE="$VS_BASE/$edition" 1.483 + break 1.484 + fi 1.485 + done 1.486 + fi 1.487 + 1.488 if test -d "$VS_BASE"; then 1.489 - if test -f "$VS_BASE/$VCVARSFILE"; then 1.490 - { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.491 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.492 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;} 1.493 - VS_ENV_CMD="$VS_BASE/$VCVARSFILE" 1.494 - # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see 1.495 - # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013 1.496 + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 1.497 + VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat" 1.498 + else 1.499 + VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \ 1.500 + vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat" 1.501 + fi 1.502 + 1.503 + for VCVARSFILE in $VCVARSFILES; do 1.504 + if test -f "$VS_BASE/$VCVARSFILE"; then 1.505 + VS_ENV_CMD="$VS_BASE/$VCVARSFILE" 1.506 + break 1.507 + fi 1.508 + done 1.509 + 1.510 + if test "x$VS_ENV_CMD" = x; then 1.511 + { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5 1.512 +$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;} 1.513 + else 1.514 + # PLATFORM_TOOLSET is used during the compilation of the freetype sources 1.515 + # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 1.516 + # 'v110' or 'v120' for VS 2010, 2012 or VS2013 1.517 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}" 1.518 - else 1.519 - { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.520 -$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;} 1.521 - { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 1.522 -$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 1.523 + 1.524 fi 1.525 fi 1.526 fi 1.527 @@ -25615,12 +25728,6 @@ 1.528 VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR" 1.529 METHOD="well-known name" 1.530 1.531 - if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 1.532 - VCVARSFILE="vc/bin/vcvars32.bat" 1.533 - else 1.534 - VCVARSFILE="vc/bin/amd64/vcvars64.bat" 1.535 - fi 1.536 - 1.537 1.538 windows_path="$VS_BASE" 1.539 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 1.540 @@ -25631,19 +25738,43 @@ 1.541 VS_BASE="$unix_path" 1.542 fi 1.543 1.544 + # In VS 2017, the default installation is in a subdir named after the edition. 1.545 + # Find the first one present and use that. 1.546 + if test "x$VS_EDITIONS" != x; then 1.547 + for edition in $VS_EDITIONS; do 1.548 + if test -d "$VS_BASE/$edition"; then 1.549 + VS_BASE="$VS_BASE/$edition" 1.550 + break 1.551 + fi 1.552 + done 1.553 + fi 1.554 + 1.555 if test -d "$VS_BASE"; then 1.556 - if test -f "$VS_BASE/$VCVARSFILE"; then 1.557 - { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.558 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.559 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;} 1.560 - VS_ENV_CMD="$VS_BASE/$VCVARSFILE" 1.561 - # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see 1.562 - # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013 1.563 + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 1.564 + VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat" 1.565 + else 1.566 + VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \ 1.567 + vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat" 1.568 + fi 1.569 + 1.570 + for VCVARSFILE in $VCVARSFILES; do 1.571 + if test -f "$VS_BASE/$VCVARSFILE"; then 1.572 + VS_ENV_CMD="$VS_BASE/$VCVARSFILE" 1.573 + break 1.574 + fi 1.575 + done 1.576 + 1.577 + if test "x$VS_ENV_CMD" = x; then 1.578 + { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5 1.579 +$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;} 1.580 + else 1.581 + # PLATFORM_TOOLSET is used during the compilation of the freetype sources 1.582 + # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 1.583 + # 'v110' or 'v120' for VS 2010, 2012 or VS2013 1.584 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}" 1.585 - else 1.586 - { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.587 -$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;} 1.588 - { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 1.589 -$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 1.590 + 1.591 fi 1.592 fi 1.593 fi 1.594 @@ -25655,12 +25786,6 @@ 1.595 VS_BASE="C:/Program Files/$VS_INSTALL_DIR" 1.596 METHOD="well-known name" 1.597 1.598 - if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 1.599 - VCVARSFILE="vc/bin/vcvars32.bat" 1.600 - else 1.601 - VCVARSFILE="vc/bin/amd64/vcvars64.bat" 1.602 - fi 1.603 - 1.604 1.605 windows_path="$VS_BASE" 1.606 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 1.607 @@ -25671,19 +25796,43 @@ 1.608 VS_BASE="$unix_path" 1.609 fi 1.610 1.611 + # In VS 2017, the default installation is in a subdir named after the edition. 1.612 + # Find the first one present and use that. 1.613 + if test "x$VS_EDITIONS" != x; then 1.614 + for edition in $VS_EDITIONS; do 1.615 + if test -d "$VS_BASE/$edition"; then 1.616 + VS_BASE="$VS_BASE/$edition" 1.617 + break 1.618 + fi 1.619 + done 1.620 + fi 1.621 + 1.622 if test -d "$VS_BASE"; then 1.623 - if test -f "$VS_BASE/$VCVARSFILE"; then 1.624 - { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.625 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.626 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;} 1.627 - VS_ENV_CMD="$VS_BASE/$VCVARSFILE" 1.628 - # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see 1.629 - # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013 1.630 + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 1.631 + VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat" 1.632 + else 1.633 + VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \ 1.634 + vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat" 1.635 + fi 1.636 + 1.637 + for VCVARSFILE in $VCVARSFILES; do 1.638 + if test -f "$VS_BASE/$VCVARSFILE"; then 1.639 + VS_ENV_CMD="$VS_BASE/$VCVARSFILE" 1.640 + break 1.641 + fi 1.642 + done 1.643 + 1.644 + if test "x$VS_ENV_CMD" = x; then 1.645 + { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5 1.646 +$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;} 1.647 + else 1.648 + # PLATFORM_TOOLSET is used during the compilation of the freetype sources 1.649 + # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 1.650 + # 'v110' or 'v120' for VS 2010, 2012 or VS2013 1.651 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}" 1.652 - else 1.653 - { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.654 -$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;} 1.655 - { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 1.656 -$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 1.657 + 1.658 fi 1.659 fi 1.660 fi 1.661 @@ -25694,12 +25843,6 @@ 1.662 VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR" 1.663 METHOD="well-known name" 1.664 1.665 - if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 1.666 - VCVARSFILE="vc/bin/vcvars32.bat" 1.667 - else 1.668 - VCVARSFILE="vc/bin/amd64/vcvars64.bat" 1.669 - fi 1.670 - 1.671 1.672 windows_path="$VS_BASE" 1.673 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 1.674 @@ -25710,19 +25853,43 @@ 1.675 VS_BASE="$unix_path" 1.676 fi 1.677 1.678 + # In VS 2017, the default installation is in a subdir named after the edition. 1.679 + # Find the first one present and use that. 1.680 + if test "x$VS_EDITIONS" != x; then 1.681 + for edition in $VS_EDITIONS; do 1.682 + if test -d "$VS_BASE/$edition"; then 1.683 + VS_BASE="$VS_BASE/$edition" 1.684 + break 1.685 + fi 1.686 + done 1.687 + fi 1.688 + 1.689 if test -d "$VS_BASE"; then 1.690 - if test -f "$VS_BASE/$VCVARSFILE"; then 1.691 - { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.692 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.693 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;} 1.694 - VS_ENV_CMD="$VS_BASE/$VCVARSFILE" 1.695 - # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see 1.696 - # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013 1.697 + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 1.698 + VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat" 1.699 + else 1.700 + VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \ 1.701 + vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat" 1.702 + fi 1.703 + 1.704 + for VCVARSFILE in $VCVARSFILES; do 1.705 + if test -f "$VS_BASE/$VCVARSFILE"; then 1.706 + VS_ENV_CMD="$VS_BASE/$VCVARSFILE" 1.707 + break 1.708 + fi 1.709 + done 1.710 + 1.711 + if test "x$VS_ENV_CMD" = x; then 1.712 + { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5 1.713 +$as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;} 1.714 + else 1.715 + # PLATFORM_TOOLSET is used during the compilation of the freetype sources 1.716 + # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 1.717 + # 'v110' or 'v120' for VS 2010, 2012 or VS2013 1.718 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}" 1.719 - else 1.720 - { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5 1.721 -$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;} 1.722 - { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 1.723 -$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} 1.724 + 1.725 fi 1.726 fi 1.727 fi 1.728 @@ -25975,6 +26142,11 @@ 1.729 fi 1.730 done 1.731 1.732 + TOOLCHAIN_DESCRIPTION="$VS_DESCRIPTION" 1.733 + if test "$TOOLCHAIN_VERSION" -gt 2013; then 1.734 + UNSUPPORTED_TOOLCHAIN_VERSION=yes 1.735 + fi 1.736 + 1.737 1.738 # If we have a devkit, skip all of the below. 1.739 if test "x$DEVKIT_VS_VERSION" = x; then 1.740 @@ -26303,6 +26475,9 @@ 1.741 # This will end up something like: 1.742 # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat 1.743 $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE 1.744 + # In some cases, the VS_ENV_CMD will change directory, change back so 1.745 + # the set-vs-env.sh ends up in the right place. 1.746 + $ECHO 'cd %~dp0' >> $EXTRACT_VC_ENV_BAT_FILE 1.747 # These will end up something like: 1.748 # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh 1.749 # The trailing space for everyone except PATH is no typo, but is needed due 1.750 @@ -48482,7 +48657,6 @@ 1.751 MSVC_DLL= 1.752 1.753 if test "x$MSVC_DLL" = x; then 1.754 - # Probe: Using well-known location from Visual Studio 10.0 1.755 if test "x$VCINSTALLDIR" != x; then 1.756 CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR" 1.757 1.758 @@ -48495,15 +48669,27 @@ 1.759 CYGWIN_VC_INSTALL_DIR="$unix_path" 1.760 fi 1.761 1.762 - if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 1.763 - POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME" 1.764 - else 1.765 - POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME" 1.766 - fi 1.767 - $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL" 1.768 + if test "$VS_VERSION" -lt 2017; then 1.769 + # Probe: Using well-known location from Visual Studio 12.0 and older 1.770 + if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 1.771 + POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME" 1.772 + else 1.773 + POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME" 1.774 + fi 1.775 + else 1.776 + # Probe: Using well-known location from VS 2017 1.777 + if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 1.778 + POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`" 1.779 + else 1.780 + POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`" 1.781 + fi 1.782 + fi 1.783 + # In case any of the above finds more than one file, loop over them. 1.784 + for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do 1.785 + $ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll" 1.786 1.787 DLL_NAME="$DLL_NAME" 1.788 - POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL" 1.789 + POSSIBLE_MSVC_DLL="$possible_msvc_dll" 1.790 METHOD="well-known location in VCINSTALLDIR" 1.791 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then 1.792 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5 1.793 @@ -48666,6 +48852,7 @@ 1.794 fi 1.795 fi 1.796 1.797 + done 1.798 fi 1.799 fi 1.800 1.801 @@ -49761,7 +49948,6 @@ 1.802 MSVC_DLL= 1.803 1.804 if test "x$MSVC_DLL" = x; then 1.805 - # Probe: Using well-known location from Visual Studio 10.0 1.806 if test "x$VCINSTALLDIR" != x; then 1.807 CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR" 1.808 1.809 @@ -49774,15 +49960,27 @@ 1.810 CYGWIN_VC_INSTALL_DIR="$unix_path" 1.811 fi 1.812 1.813 - if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 1.814 - POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME" 1.815 - else 1.816 - POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME" 1.817 - fi 1.818 - $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL" 1.819 + if test "$VS_VERSION" -lt 2017; then 1.820 + # Probe: Using well-known location from Visual Studio 12.0 and older 1.821 + if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 1.822 + POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME" 1.823 + else 1.824 + POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME" 1.825 + fi 1.826 + else 1.827 + # Probe: Using well-known location from VS 2017 1.828 + if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 1.829 + POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`" 1.830 + else 1.831 + POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`" 1.832 + fi 1.833 + fi 1.834 + # In case any of the above finds more than one file, loop over them. 1.835 + for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do 1.836 + $ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll" 1.837 1.838 DLL_NAME="$DLL_NAME" 1.839 - POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL" 1.840 + POSSIBLE_MSVC_DLL="$possible_msvc_dll" 1.841 METHOD="well-known location in VCINSTALLDIR" 1.842 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then 1.843 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5 1.844 @@ -49945,6 +50143,7 @@ 1.845 fi 1.846 fi 1.847 1.848 + done 1.849 fi 1.850 fi 1.851 1.852 @@ -52863,10 +53062,7 @@ 1.853 printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n" 1.854 fi 1.855 printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n" 1.856 - if test "x$TOOLCHAIN_VERSION" != "x"; then 1.857 - print_version=" $TOOLCHAIN_VERSION" 1.858 - fi 1.859 - printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n" 1.860 + printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n" 1.861 printf "* C Compiler: Version $CC_VERSION_NUMBER (at $CC)\n" 1.862 printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at $CXX)\n" 1.863 1.864 @@ -52908,3 +53104,9 @@ 1.865 printf "\n" 1.866 fi 1.867 1.868 + if test "x$UNSUPPORTED_TOOLCHAIN_VERSION" = "xyes"; then 1.869 + printf "WARNING: The toolchain version used is known to have issues. Please\n" 1.870 + printf "consider using a supported version unless you know what you are doing.\n" 1.871 + printf "\n" 1.872 + fi 1.873 +