1.1 --- a/common/autoconf/toolchain.m4 Wed May 16 15:52:51 2018 -0700 1.2 +++ b/common/autoconf/toolchain.m4 Mon May 21 06:54:25 2018 -0700 1.3 @@ -217,11 +217,15 @@ 1.4 ORG_CXXFLAGS="$CXXFLAGS" 1.5 ORG_OBJCFLAGS="$OBJCFLAGS" 1.6 1.7 + # autoconf magic only relies on PATH, so update it if tools dir is specified 1.8 + OLD_PATH="$PATH" 1.9 + 1.10 # On Windows, we need to detect the visual studio installation first. 1.11 # This will change the PATH, but we need to keep that new PATH even 1.12 # after toolchain detection is done, since the compiler (on x86) uses 1.13 # it for DLL resolution in runtime. 1.14 - if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then 1.15 + if test "x$OPENJDK_BUILD_OS" = "xwindows" \ 1.16 + && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then 1.17 TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV 1.18 # Reset path to VS_PATH. It will include everything that was on PATH at the time we 1.19 # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV. 1.20 @@ -231,9 +235,6 @@ 1.21 export LIB="$VS_LIB" 1.22 fi 1.23 1.24 - # autoconf magic only relies on PATH, so update it if tools dir is specified 1.25 - OLD_PATH="$PATH" 1.26 - 1.27 # Before we locate the compilers, we need to sanitize the Xcode build environment 1.28 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 1.29 # determine path to Xcode developer directory