Source: dxvk
Version: 2.6+ds-1
Severity: normal
X-Debbugs-Cc: debian-...@lists.debian.org, debian-w...@lists.debian.org
User: debian-...@lists.debian.org
Usertags: arm64 armhf

While looking at DXVK Native I noticed that the setup of the older 
Wine-based DXVK builds on ARM architectures seems odd.

If I understand correctly, Wine exists on armhf and arm64, on which it 
implements the interface of the rarely-seen 32- and 64-bit ARM versions 
of Windows, therefore it will be running ARM PE executables and DLLs. 
Debian's Wine packaging seems to use `clang -target aarch64-windows` as 
a cross-compiler that will output 64-bit ARM PE DLLs, and similarly 
`clang -target armv7-windows` for 32-bit.

But when we build src:dxvk on armhf and arm64, it seems to be using 
i686-w64-mingw32-g++ and x86_64-w64-mingw32-g++ respectively, which are 
cross-compilers that output 32- and 64-bit **x86** PE DLLs. Is that 
how it's meant to work?

It would seem to me that Wine will be unable to load an x86 PE DLL into 
an ARM process, therefore if there are x86 DLLs in dxvk-wine32:armhf and 
dxvk-wine64:arm64, they won't be practically useful? But perhaps I'm 
misunderstanding something?

If I'm getting this right, then instead of `build-win32.txt` and 
`build-win64.txt`, on armhf and arm64 dxvk should be using a Meson 
cross-file that selects clang-based tools, something like this:

[binaries]
c = ['clang', '-target', 'aarch64-windows', '-fuse-ld=...', ...]
cpp = ['clang++', '-target', 'aarch64-windows', '-fuse-ld=...', ...]
ar = (??? I don't know what goes here)
strip = ...
windres = ...

[properties]
needs_exe_wrapper = true

[host_machine]
system = 'windows'
cpu_family = 'aarch64'
cpu = 'aarch64'
endian = 'little'

... and something analogous for armhf?

(But, again, it's entirely possible that I'm misunderstanding.)

    smcv

Reply via email to