I turned on my MSYS2 VM and was about to attempt to reproduce your issue.
But I can't do that if you provide insufficient "How to reproduce"
information. I don't want to spend my time _guessing_ what the commands
on your side had been. You need to tell us these commands up-front.
Additionally, your configure command from
<https://lists.gnu.org/archive/html/emacs-devel/2025-05/msg00154.html>
./configure --prefix="/${PREFIXNAME}" \
--build=x86_64-pc-cygwin \
--without-dbus \
--without-pop \
--with-modules \
--without-native-compilation \
${CHECK_OPT} \
CFLAGS="-O2" || error_msg "Failure running configure"
is wrong: It lacks the option
--host=x86_64-w64-mingw32