RFR: 8277370: configure script cannot distinguish WSL version [v2]

Erik Joelsson erikj at openjdk.java.net
Fri Nov 19 13:13:42 UTC 2021


On Fri, 19 Nov 2021 00:00:15 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:

>> 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-
>
> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Use $GREP to check /proc/interrupts

Marked as reviewed by erikj (Reviewer).

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

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



More information about the build-dev mailing list