Cross compiler for Windows On ARM64?
Cross-compiling from x64 Windows to ARM64 Windows. What do you think about it?
I have been thinking about it for a long time. And not just thinking.
I have actually bought a Windows Dev Kit 2023 to actually have a Windows on ARM system (see #130), and I have tried to get GCC to build on it.
LLVM already works (the version from https://github.com/mstorsjo/llvm-mingw), and I was able to build a lot of packages for native Windows on ARM64 already.
For GCC more work is needed. I asked about this here https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108678 and recently got an answer that GCC 15 stage 1 will have changes specifically for this platform. And the good news is that this stage was just started a few days ago (see: https://gcc.gnu.org/develop.html).
Just a heads up, I am following this issue in hopes of adding support for it in my Python compiler Nuitka as well, where I use the other arches with great success so far. No pressure, just desiring to not miss out once it happens.
As I understood it GCC 15 should be the first one to support the x86_64-w64-aarch64 platform. Unfortunately I have tried the recent weekly snapshots of GCC with MinGW-w64 and it still won't build for this platform.
I also asked the GCC team what the status is here.
Hello. We have an experimental native compiler in form of MSYS2 packages available at https://github.com/Windows-on-ARM-Experiments/msys2-woarm64-build. It should be stable for most of the C code; C++ support is in progress but improving rapidly. Please, let us know any feedback, e.g. which form of native toolchain would you prefer if MSYS2 packages are not suitable for some reason.
GCC 15.1.0 has been released and it should be able to be compiled targeting aarch64-w64-mingw32
However when I tried to do so, it always drags me into the undefined reference to Unwind_SJLJ_Exception trap.
Is it now really possible to build gcc running on ARM64 Windows devices?