diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 index b13b210165f..db31cb35816 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -844,8 +844,12 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP], ] ) if test "x$FILE_MACRO_CFLAGS" != x; then - # Add -pathmap for all VS system include paths using Windows - # full Long path name that is generated by the compiler + # Add -pathmap for all VS system include paths using Windows + # full Long path name that is generated by the compiler + # Not enabled under WSL as there is no easy way to obtain the + # Windows full long paths, thus reproducible WSL builds will + # depend on building with the same VS toolchain install location. + if test "x$OPENJDK_BUILD_OS_ENV" != "xwindows.wsl1" && test "x$OPENJDK_BUILD_OS_ENV" != "xwindows.wsl2"; then for ipath in ${$3SYSROOT_CFLAGS}; do if test "x${ipath:0:2}" == "x-I"; then ipath_path=${ipath#"-I"} @@ -853,6 +857,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP], FILE_MACRO_CFLAGS="$FILE_MACRO_CFLAGS -pathmap:\"$ipath_path\"=vsi" fi done + fi fi fi diff --git a/make/autoconf/util_paths.m4 b/make/autoconf/util_paths.m4 index 902eb6707e1..8b2c776397b 100644 --- a/make/autoconf/util_paths.m4 +++ b/make/autoconf/util_paths.m4 @@ -120,6 +120,7 @@ AC_DEFUN([UTIL_FIXUP_PATH], ############################################################################## # Fixup path to be a Windows full long path +# Note: Only supported with cygwin/msys2 (cygpath tool) AC_DEFUN([UTIL_FIXUP_WIN_LONG_PATH], [ # Only process if variable expands to non-empty