On Thu, 19 Feb 2026 14:25:15 GMT, Erik Joelsson <[email protected]> wrote:

>> I think this looks ok.
>> 
>> What would be the reason for having MSYSTEM_HOST set to `x86_64-pc-cygwin` 
>> under msys? If this is a common/reasonable configuration, I wouldn't mind 
>> adding some special handling in platform.m4 to deal with it.
>
>> I think this looks ok.
>> 
>> What would be the reason for having MSYSTEM_HOST set to `x86_64-pc-cygwin` 
>> under msys? If this is a common/reasonable configuration, I wouldn't mind 
>> adding some special handling in platform.m4 to deal with it.
> 
> I read the bug description now and this is actually the new default for MSYS. 
> What a weird decision. With that in mind I think I would prefer an automated 
> solution for setting `OPENJDK_BUILD_OS_ENV=windows.msys2`.

> Hi, @erikj79. Thanks for your review.
> 
> By setting `OPENJDK_BUILD_OS_ENV=windows.msys2` within 
> `PLATFORM_EXTRACT_TARGET_AND_BUILD` in `platform.m4`, I was able to 
> successfully run configure and complete the build. However, the configure log 
> shows the following:
> 
> ```
> checking build system type... x86_64-pc-cygwin
> checking host system type... x86_64-pc-cygwin
> checking target system type... x86_64-pc-cygwin
> ```
> 
> I do not believe this is the correct state.

I disagree. The MSYS project have clearly made the choice to have MSYS start 
pretending to be Cygwin by setting their env variable to the Cygwin triplet. 
That is what the system claims to be and we should respect that. By that I mean 
that the above is correct on such a system.

The OpenJDK build needs to know if it's actually an MSYS build system because 
we use this information to handle file paths within the build. Hence, we can no 
longer trust the build platform triplet to set our internal variable 
`OPENJDK_BUILD_OS_ENV` when running under MSYS. As long as 
`OPENJDK_BUILD_OS_ENV` is set correctly, the OpenJDK build should function 
correctly. I cannot think of any other part of the build that would be 
depending on the cygwin/msys value of the triplet for the build platform.

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

PR Comment: https://git.openjdk.org/jdk/pull/29810#issuecomment-3928766462

Reply via email to