On Mon, 31 Mar 2025 12:31:10 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:

> Wait a minute. I re-read the discussion a bit more carefully, and let my 
> brain re-process what I said above...
> 
> Is the goal here to document how you properly do cross-compilation for 
> windows/aarch64 on windows/x64? If so, I think this is a correct solution, 
> but the documentation should be more clear that this applies for 
> cross-compiling to windows/aarch64 from x64 on cygwin.
> 
> If the problem is that native builds on windows/aarch64 does not work, then 
> it is a different issue that needs to be fixed.

The problem applies to both native and cross compilation, though cross 
compilation is no different than other platforms. The reason native compilation 
doesn't work on Cygwin is that there is no aarch64 distro of Cygwin, so even a 
native windows aarch64 build will use an x64 version of Cygwin running in 
emulated mode (I don't know the name on Windows, but pretty much the same as 
rosetta on mac). This trips up configure into thinking we are running on a 
native windows x64 machine, and it's the reason why telling configure that the 
**build** platform is `aarch64-pc-cygwin` helps. Caveat, this is all based on 
what I've heard, I've never had access to a windows-aarch64 machine.

I completely agree that fixing this detection issue is better than documenting, 
but I also think that documenting how to perform a native build is better than 
how to perform a cross build on a native machine. Cross compiling works, but 
adds increased complexity and build time unnecessarily in this case.

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

PR Comment: https://git.openjdk.org/jdk/pull/24267#issuecomment-2766199206

Reply via email to