On Mon, 24 Apr 2023 20:11:50 GMT, Christoph Langer <clan...@openjdk.org> wrote:
> This is an attempt to fix the issue on Windows when no cygwin Git is > installed or the Git for Windows installation has precedence in PATH lookup. > The path to the Windows GIT installation usually resides in `C:\Program > Files` which contains a space and thus needs some special handling. > > There exists code in `UTIL_LOOKUP_PROGS`/`UTIL_FIXUP_EXECUTABLE` that would > handle this. However, it relies on initializations made in > `PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET` and `BASIC_SETUP_PATHS`. Currently, > `UTIL_LOOKUP_PROGS(GIT, git)` is called too early in configure and hence the > problematic Windows path is not handled correctly. My fix makes sure that > only the barely necessary tool lookups required for > `PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET` and `BASIC_SETUP_PATHS` are made in > `BASIC_SETUP_FUNDAMENTAL_TOOLS` and everything else is moved into another > macro called `BASIC_SETUP_TOOLS` that is invoked after path handling is set > up correctly, which includes the lookup of git. I think this change makes sense. Given how small this set of tools is now, I think we should add a comment on `PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET` in platform.m4 saying something about needing to be careful to only use tools setup in `BASIC_SETUP_FUNDAMENTAL_TOOLS`. ------------- PR Comment: https://git.openjdk.org/jdk/pull/13629#issuecomment-1520824749