• Bug#1104097: dxvk: builds x86 PE DLLs for Wine on arm64 and armhf, is t

    From Simon McVittie@21:1/5 to All on Fri Apr 25 17:40:01 2025
    XPost: linux.debian.ports.arm

    Source: dxvk
    Version: 2.6+ds-1
    Severity: normal
    X-Debbugs-Cc: debian-arm@lists.debian.org, debian-wine@lists.debian.org
    User: debian-arm@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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)