On Mon Jun 16 09:07:07 2025 +0000, Alexandre Julliard wrote:
Ah I see. Yes, you'd need to pass `-target aarch64-windows` or equivalent to `winegcc`, the same way it's done when building Wine itself. We should probably make winegcc refuse to build ELF libraries on ARM64.
Ok, thanks for helping me understand.
I've actually already tried using `-target aarch64-windows`, but if I do that, then I can't get access to `dlfcn.h` and `libdl`.
I'm trying to create a DLL on the ARM64 Linux device that can be loaded by Wine/Windows, but, in its implementation, call functions on the host system using `dlopen`, `dlsym`, and friends. My research pointed me to using `winegcc` and friends. I accomplished this task on an x64 Linux device using `winegcc` and friends, but when I follow the same procedure on an ARM64 device it tries to generate Intel instructions.
With this MR applied, I can get the DLL to build using `winegcc` on the ARM64 Linux device, but the Windows application can't load it. Regardless, I thought I was on the right track with the MR.
So now, trying to comprehend what everyone has said in the comments of this MR, `winegcc` builds PE executables on x64, but builds ELF executables on ARM64? What changes need to be made to Wine so building a DLL using `winegcc` on ARM64 works the same way as it does x64?