RFR: 8287724: Fix various issues with msys2

Erik Joelsson erikj at openjdk.java.net
Thu Jun 2 12:34:23 UTC 2022


On Thu, 2 Jun 2022 09:17:59 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

> I encountered a bunch of issues when running with msys2 on Windows (but one of them could have happened on cygwin as well).
> 
> * fixpath must set MSYS2_ARG_CONV_EXCL="*" before running cmd.exe to figure out the temp directory, or msys might interfere with the command line to cmd.
> 
> * Paths like "/c/s/source/jdk", meaning to point to "c:\s\source\jdk", would be interpreted by fixpath as "/cs:\source\jdk", since the leading "/c" would be considered a prefix. This is not a problem on cygwin, where the /cygpath prefix makes paths unambiguous. I countered this by checking if the file exists (as written, or just the basepath, or the first 3 parts of the path). If so, I treat it as a filename, rather than a prefix.
> 
> * Configure is supposed to handle windows-style input paths, but `--with-bootjdk=c:\java\jdk-17` or similar would break, since we started to look for files in that directory without having to normalized the path first.
> 
> * Finally, configure.guess sometimes reports msys as `mingw` and sometimes as `msys`, depending on the value of MSYSTEM. (And for some values, the old autoconf-configure.guess breaks -- I did not bother fixing this.)

Marked as reviewed by erikj (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/8989



More information about the build-dev mailing list