| Summary: | Windows on ARM64 platform target aarch64-w64-mingw32 | ||
|---|---|---|---|
| Product: | gcc | Reporter: | Brecht Sanders <brechtsanders> |
| Component: | target | Assignee: | Not yet assigned to anyone <unassigned> |
| Status: | NEW --- | ||
| Severity: | enhancement | CC: | clyon, Evgeny.Karpov, gnu.ojxq8, peter0x44, pinskia, radek.barton, ssbssa, unlvsur, zac.walker |
| Priority: | P3 | ||
| Version: | 13.0 | ||
| Target Milestone: | --- | ||
| See Also: | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87334 | ||
| Host: | Target: | aarch64-w64-mingw32 | |
| Build: | Known to work: | ||
| Known to fail: | Last reconfirmed: | 2023-11-09 00:00:00 | |
| Bug Depends on: | |||
| Bug Blocks: | 115083 | ||
|
Description
Brecht Sanders
2023-02-05 14:43:03 UTC
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: https://github.com/ZacWalk/mingw-woarm64-build 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: https://github.com/ZacWalk/gcc-woarm64/compare/06a0f07..0248264 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. . What is the status of GCC support for aarch64-w64-mingw32 ? I just tried GCC 14 snapshot 20240414 and it looks like it's still not supported. Build fails with: *** Configuration aarch64-w64-mingw32 not supported (In reply to Brecht Sanders from comment #10) > What is the status of GCC support for aarch64-w64-mingw32 ? > > I just tried GCC 14 snapshot 20240414 and it looks like it's still not > supported. > > Build fails with: > *** Configuration aarch64-w64-mingw32 not supported Patches have started to be posted but won't be fully reviewed/committed until after GCC 14 is released due to them coming in late (during stage 4) in the release cycle (See https://gcc.gnu.org/develop.html for the full gcc release/development cycle). Indeed the plan is to commit the first series (https://gcc.gnu.org/pipermail/gcc-patches/2024-April/649261.html) once stage-1 re-opens (as approved in https://gcc.gnu.org/pipermail/gcc-patches/2024-April/649299.html /home/cqwrteur/toolchains_build/gcc/gcc/c-family/c-format.cc:5159:(.text+0x7c1): undefined reference to `msformat_init()' /usr/local/lib/gcc/x86_64-pc-linux-gnu/15.0.0/../../../../x86_64-pc-linux-gnu/bin/ld: c-family/c-format.o: in function `cmp_attribs(char const*, char const*)': Can you explain to me what is going on? Thank you! libgcc:
/home/cqwrteur/toolchains_build/gcc/libgcc/libgcov.h:49:10: fatal error: sys/mman.h: No such file or directory
49 | #include <sys/mman.h>
| ^~~~~~~~~~~~
compilation terminated.
make[4]: *** [Makefile:933: _gcov_interval_profiler.o] Error 1
make[4]: *** Waiting for unfinished jobs....
It looks like the same issue which was described here https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115083 Please specify only C language in the configuration for now. What is the current status of GCC for aarch64-w64-mingw32 ? When can I expect a snapshot version of GCC 15 to build for this platform? > What is the current status of GCC for aarch64-w64-mingw32 ? > When can I expect a snapshot version of GCC 15 to build for this platform? The current upstreamed aarch64-w64-mingw32 uses 605k tests and shows a success pass rate of 89%, including C/C++. It will be released with GCC 15. Here is detailed information about the recent upstreamed patch series in November 2024: https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662017.html SEH and full Boost library support should be upstreamed in Q2 2025. However, the current implementation can be found at https://github.com/Windows-on-ARM-Experiments/mingw-woarm64-build, including the initial implementation for aarch64-pc-cygwin. Please report any issues to https://github.com/Windows-on-ARM-Experiments/mingw-woarm64-build/issues. Thanks for you work on this. My goal is to eventually have native binutils+GCC on Windows ARM64. I tried using sources from: https://github.com/Windows-on-ARM-Experiments/binutils-woarm64 https://github.com/Windows-on-ARM-Experiments/mingw-woarm64 https://github.com/Windows-on-ARM-Experiments/gcc-woarm64 And I am able to build a cross compiler. However, using that compiler to build the same thing for running Windows ARM64 itself is not working yet. Is that samething on your radar, or is the main focus for now just the cross-compiler? Thank you for your interest in aarch64-w64-mingw32. Cross-compilation from the x86_64-pc-msys host to the aarch64-w64-mingw32 target is already available. Work on a native toolchain is in progress. More information here: https://github.com/Windows-on-ARM-Experiments/msys2-woarm64-build If you'd like to try experimental native compiler, we can refer you to https://github.com/Windows-on-ARM-Experiments/msys2-woarm64-build for the instructions how to add it to a MSYS2 shell. We would be happy for any feedback if you do. Is there any other form of native compiler you'd prefer instead of MSYS2 packages? |