On Mon Jan 27 11:36:18 2025 +0000, Jinoh Kang wrote:
I stand corrected. Last time I checked, aarch64-w64-mingw-gcc wasn't a thing. I guess things have changed since then. Edit: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108678 is still NEW. I guess MinGW went its own way using Clang, without GCC counterpart.
Now you are totally mixing things up.
Clang can operate in either mingw mode or MSVC mode. This has been the case since essentially forever. If you invoke Clang as e.g. `clang -target aarch64-w64-mingw32` or `clang -target aarch64-windows-gnu`, this is what you get. With specific mingw toolchains such as llvm-mingw, there are also frontend wrappers like `aarch64-w64-mingw32-clang` which implicitly sets the target triple. The same thing goes for any other architecture as well.
llvm-mingw also provide convenience frontends named `aarch64-w64-mingw32-gcc`, that despite the name also just invoke Clang (in order to ease use with e.g. autotools build systems, so it's enough to specify just `--host=` to use it).
All of these cases work just fine with Wine, and have done this also for as long as Wine has supported building DLLs as native PE modules.
Then separately: For a long time, GCC did not support targeting aarch64 on Windows - but there's a recent effort by a number of people to implement this, so there's an ongoing effort to implement this and upstream it. With current GCC from git, you can build a somewhat working C compiler for aarch64 mingw targets. It's not quite yet ABI compatible with the defacto aarch64 mingw environments (e.g. it uses the incorrect ABI for variable argument functions, and for long doubles) - these are being worked on by the GCC/aarch64-mingw developers though.