configure script distinguish WSL version if it is run on WSL. It is assumed WSL 
2 if `/run/WSL` exists.
However it exists in spite of WSL 1 on Windows 11 at least. We need to check it 
with other method.

The method to distinguish WSL version has been discussed on 
https://github.com/microsoft/WSL/issues/4555 , however they do not seem to get 
consensus about it. `/run/WSL` was introduced in it, but I think `Hyper-V` in 
`/proc/interrupt` is more robustness because WSL 2 is run on Hyper-V. 
https://docs.microsoft.com/en-us/windows/wsl/faq#does-wsl-2-use-hyper-v--will-it-be-available-on-windows-10-home-

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

Commit messages:
 - 8277370: configure script cannot distinguish WSL version

Changes: https://git.openjdk.java.net/jdk/pull/6446/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6446&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8277370
  Stats: 5 lines in 1 file changed: 1 ins; 0 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6446.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6446/head:pull/6446

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

Reply via email to