Are there plans to support Windows (using MinGW-w64) on ARM64?
The triplet for this platform should be: aarch64-w64-mingw32
I'm trying to build natively on a Windows on ARM device (bootstrapping from LLVM/CLang).
Since binutils 2.40 there some support for aarch64 COFF/PE format, and I already built a working binutils with the following supported targets:
ld --help|sed -n "s/^.*supported targets: //p"
pe-x86-64 pei-x86-64 pe-bigobj-x86-64 elf64-x86-64 pe-i386 pei-i386 elf32-i386
elf32-iamcu pdb elf64-little elf64-big elf32-little elf32-big pe-bigobj-i386 pe-aarch64-little pei-aarch64-little srec symbolsrec verilog tekhex binary ihex plugin
So it looks like pe-aarch64-little and pei-aarch64-little are listed.
I'm don't know if a pe-bigobj-aarch64-little is needed or if it will be supported in the future.
My first attempt to get gcc (I tried with source tarball 12.2.0) to configure was changing the following line in gcc/config.gcc:
i86-*-mingw* | x86_64-*-mingw*)
i86-*-mingw* | x86_64-*-mingw* | aarch64-*-mingw*)
but then I get the following error:
Unknown tune used in --with-tune=generic
What needs to be changed to get past that?
I have not seen anyone step up to patch GCC for aarch64-mingw yet.
Most aarch64 developers don't use Windows at all. There is some support being worked on for aarch64 darwin (Mac OS) though.
I would love to give it a go if only I knew where to add the support.
I actually got a Windows on ARM device hoping I could figure it out, bit it looks I will need tome help.
The "Unknown tune used in --with-tune=generic" error is where I'm currently stuck, and I couldn't figure out in which file(s) I need to address this.
Any pointers on which files to edit in order to support aarch64-mingw ?
I think it won't require reinventing the wheel as it will probably be a mix of existing *-mingw and aarch64-* stuff...
I have been working on an experimental aarch64-w64-mingw32 toolchain. It can build several C libraries and small executables successfully. Currently parked here on github:
It is based on previous work by Mark Harmstone and Jedidiah Thompson. I am currently working on structured exception handling support. This seems to be the main missing part - without it C++ exceptions do not work.
Thanks Zac, how can I see what you actually changed?
Is there a particular GCC version I can diff https://github.com/ZacWalk/gcc-woarm64 against?
I have been rebasing regularly to keep all my changes on top of the commit log. You can use github's compare url to combine my changes into a single diff (based on commit hash). For example:
The change to libstdc++-v3/src/c++17/fast_float/fast_float.h should be done upstream: https://github.com/fastfloat/fast_float
Thanks Jonathan. I am still in test and cleanup up mode but hope to start upstreaming in a few weeks.