winlibs_mingw icon indicating copy to clipboard operation
winlibs_mingw copied to clipboard

Cross compiler for Windows On ARM64?

Open ghost opened this issue 1 year ago • 5 comments

Cross-compiling from x64 Windows to ARM64 Windows. What do you think about it?

ghost avatar May 08 '24 19:05 ghost

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).

brechtsanders avatar May 09 '24 08:05 brechtsanders

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.

kayhayen avatar Feb 17 '25 07:02 kayhayen

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.

brechtsanders avatar Feb 17 '25 07:02 brechtsanders

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.

Blackhex avatar May 12 '25 06:05 Blackhex

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?

asdetycv1zzc avatar Jul 16 '25 14:07 asdetycv1zzc