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.
To avoid this, we need to overwrite the value of `$MSYSTEM_CHOST` before
`config.site` is loaded. This is because the MSYS `config.site` references
`$MSYSTEM_CHOST` as shown below:
# Set default 'host' to speedup configure
if test -z "$build_alias"; then
build_alias="${MSYSTEM_CHOST}" && \
${as_echo-echo} "$config_site_me:${as_lineno-$LINENO}: default build_alias
set to $build_alias" >&5
fi
In other words, we need to add special handling for MSYS within the configure
script.
I have included this logic in the latest commit, and both configure and the
build now complete successfully.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29810#issuecomment-3928541488