RFR: 8287724: Fix various issues with msys2

Magnus Ihse Bursie ihse at openjdk.java.net
Thu Jun 2 09:24:51 UTC 2022


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.)

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

Commit messages:
 - 8287724: Fix various issues with msys2

Changes: https://git.openjdk.java.net/jdk/pull/8989/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8989&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8287724
  Stats: 38 lines in 3 files changed: 23 ins; 7 del; 8 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8989.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8989/head:pull/8989

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



More information about the build-dev mailing list