By far the easiest way to do it is on a Debian chroot, but that ain’t as fun as building your own toolchains and do it on Gentoo.
According to the official documentation:
- wine 3.10 or newer
- Meson build system (at least version 0.43)
- MinGW64 compiler and headers (requires threading support)
- glslang front end and validator
MinGW with POSIX threads is needed, problem is by default crossdev will compile GCC with Win32 threads.
Start by creating your toolchains, tuple for x86 is
x86_64-w64-mingw32 for x64.
Fix GCC by enabling POSIX threads and adding the
libraries USE to
gcc. Order matters,
pthreads.h and other stuff that is needed to compile GCC with POSIX thread model.
Depending on the runtime version, libraries may end up in the wrong place (see bug #653246), if that is the case sysmlink those and then rebuild GCC. eg
Final result should be:
These are the toolchains I used.