--- a/make/autoconf/toolchain.m4 Wed Dec 19 00:50:05 2018 -0800
+++ b/make/autoconf/toolchain.m4 Wed Dec 19 03:35:40 2018 -0800
@@ -331,15 +331,15 @@
&& test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
- # Append VS_PATH
+ # Append VS_PATH. In WSL, VS_PATH will not contain the WSL env path needed
+ # for using basic Unix tools, so need to keep the original PATH.
BASIC_APPEND_TO_PATH(PATH, $VS_PATH)
BASIC_APPEND_TO_PATH(WSLENV, "PATH/l:LIB:INCLUDE")
export WSLENV
else
# Reset path to VS_PATH. It will include everything that was on PATH at the time we
# ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
- BASIC_APPEND_TO_PATH(PATH, $VS_PATH)
- AC_MSG_NOTICE(PATH $PATH)
+ PATH="$VS_PATH"
fi
# The microsoft toolchain also requires INCLUDE and LIB to be set.
export INCLUDE="$VS_INCLUDE"
--- a/make/autoconf/toolchain_windows.m4 Wed Dec 19 00:50:05 2018 -0800
+++ b/make/autoconf/toolchain_windows.m4 Wed Dec 19 03:35:40 2018 -0800
@@ -483,26 +483,28 @@
AC_SUBST(VS_INCLUDE)
AC_SUBST(VS_LIB)
- # Convert VS_PATH to unix style
OLDIFS="$IFS"
IFS=";"
- VS_PATH_WINDOWS="$VS_PATH"
- VS_PATH=""
- for i in $VS_PATH_WINDOWS; do
- path=$i
- # Only process non-empty elements
- if test "x$path" != x; then
- IFS="$OLDIFS"
- # Check that directory exists before calling fixup_path
- testpath=$path
- BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([testpath])
- if test -d "$testpath"; then
- BASIC_FIXUP_PATH([path])
- BASIC_APPEND_TO_PATH(VS_PATH, $path)
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
+ # Convert VS_PATH to unix style
+ VS_PATH_WINDOWS="$VS_PATH"
+ VS_PATH=""
+ for i in $VS_PATH_WINDOWS; do
+ path=$i
+ # Only process non-empty elements
+ if test "x$path" != x; then
+ IFS="$OLDIFS"
+ # Check that directory exists before calling fixup_path
+ testpath=$path
+ BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([testpath])
+ if test -d "$testpath"; then
+ BASIC_FIXUP_PATH([path])
+ BASIC_APPEND_TO_PATH(VS_PATH, $path)
+ fi
+ IFS=";"
fi
- IFS=";"
- fi
- done
+ done
+ fi
# Convert VS_INCLUDE into SYSROOT_CFLAGS
for i in $VS_INCLUDE; do
ipath=$i