https://bugs.winehq.org/show_bug.cgi?id=38886
--- Comment #12 from Martin Storsjö martin@martin.st --- (In reply to Patrick from comment #11)
How is the ARM64 port currently supposed to be built? Using Clang (from llvm-mingw) using a ARM64 Linux target fails currently at two major points.
- Configure will fail for the 64-bit compare-and-swap detection.
(I've forced that to "none needed", although I don't know if that's the proper approach, as the GCC configuration determined that, I figured, that's probably the correct setting).
- All functions that use va_start require __cdecl to be specified, as these
have been redefined as long as clang is being used. clang complains about "error: '__builtin_ms_va_start' used in System V ABI function" throughout MANY occurences.
Furthermore, linking ntdll fails when building, referencing a missing built-in function. One that apparently comes from GCC (either InterlockedCompareExchange64 or InterlockedCompareExchange128 specified in rtl.o that's using the built-in GCC functions). Apparently the object was built using GCC, but winegcc invokes clang and lld, failing to link the built-in function.
So, I'm unsure if this bug has regressed or if that's just me failing to properly configure the project.
You need to provide more details about how you configure your build - I test building for ARM64 nightly, and it runs just fine, supporting vararg functions just fine. The two issues you mentioned sound entirely unfamiliar to me.
On Ubuntu 20.04, with llvm-mingw based on LLVM 15.0.0 (https://github.com/mstorsjo/llvm-mingw/releases/tag/20220906 - it's possible to use Ubuntu provided Clang too, but at least on 20.04, the bundled version is too old/has some bugs that are fixed in newer versions) added to $PATH, with wine-8.0-rc5:
CC="clang" ../wine/configure --prefix=$HOME/wine-test --disable-tests --without-freetype --without-x make make install export PATH=$HOME/wine-test:$PATH export WINEPREFIX=$HOME/.wine-test wine <test.exe>
It's also possible to build with GCC for the host bits, by leaving out CC="clang". The --disable-tests and --without-* bits are of course also optional, that's just how I just tested it. (wine-7.21 should also work just as well as 8.0-rc5 in general. There were some temporary regressions in my build tests around that date, but they shouldn't have affected the aarch64 builds.)
It's quite possible to cross compile it too, but that requires a couple more twists. (When cross compiling, it's essential that you first build the host side tools natively, for an exactly matching version of wine. For such builds, I first configure a native build with essentially just "../wine/configure" and do "make __tooldeps__ nls/all", then configure a regular autotools cross build of wine with "./configure --host=aarch64-linux-gnu --with-wine-tools=/home/martin/code/wine-build" (where the directory is the build directory for the native build where I built __tooldeps__).
(I'm not familiar with OpenEmbedded unfortunately so I can't give hints specific for that setup though.)