-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aarch64: Allow FFI_WIN64 for winelib #593
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this. Please fix indentation (2, not 4). Also, is there any way to test this with our CI infrastructure?
Thx for the reply! |
Thanks. I've merged this. libffi/.travis/install.sh is where we download special build tools for CI testing. Where can we get a mingw toolchain for aarch64? |
Thx! |
wget -qO- https://github.com/mstorsjo/llvm-mingw/releases/download/20201020/llvm-mingw-20201020-msvcrt-ubuntu-18.04.tar.xz | tar xJvf - --strip 1 -C ./llvm-mingw
export PATH="$(pwd)/llvm-mingw/bin:$PATH"
I assume you mean testing the compile portion. AFAIK the actual aarch64 unit tests require QEMU or native hardware. |
@AndreRH, hi, I'm working with a downstream project to get Windows aarch64 support which works without this patch, but severely breaks with this patch. Do you (or any other contributors) have any insight as to why this patch would cause Windows ARM64 binaries to stop working properly? For now we've backed this change out downstream. |
Could you check that the ABI in use is FFI_WIN64? it should be the same as FFI_DEFAULT_ABI on win32 |
Hi, I'm not certain how to do this. I work with the library through a 3rd-party product which leverages the I'd be happy to fire some of the upstream unit tests -- assuming they're written and working for Windows aarch64 -- but I'd have to get aquatinted with the build system. I'm also not afraid to use a cross-compiler to build, but I ultimately need to use the Windows aarch64 machine for testing. |
@tresf you can output the ABI that is choosen at runtime by modifying printf("Using ABI: %d\n", abi); at line 645 (that is after the calling convention is determined). To give some context for others: The problem is observed when testing JNA on aarch64. |
Without this patch (and passing unit tests) it shows |
And with the patch it's supposed to be 2, could you check? |
Correct, with the patch (and failing unit tests) it shows |
The idea was to run the same code with FFI_WIN64 as the ifdef _WIN32 did before. That way people can select FFI_WIN64 on non-windows platforms. |
I looks as if the direct dispatch path in JNA is affected. It seems, that |
@tsref tested and indeed Lines 786 to 796 in e70bf98
I assume, that the |
@tresf could you please test this patch? If it works I'll make a new Pull Request: |
For some reason I had to apply it by hand, but yes it works, at least with JNA's 617 unit tests. The unit tests are back to what they were before this patch. |
Thanks for testing! |
No description provided.