Hello Jorn and fellow porters,
I am following up with this message from Jorn from a few months ago [1]. I am
generally supportive of their proposal, but I am not certain how to implement
it. I have successfully built and bundled libffi on AIX, but I didn't use the
createLibffiBundle.sh script provided by the PR.
What I'm feeling confused about is how libffi will be incorporated into the
jvm. Does this createLibffiBundle.sh get called programmatically during the
build process (I can't seem to find where that would happen currently), or does
each platform check in a bundle with a compiled version of the library to
source control (and the build phase assumes it's present for those platforms
that support it)? At present I'm getting an error at build time after enabling
the fallback linker on aix.
src/java.base/share/native/libfallbackLinker/fallbackLinker.c:66:10: warning:
implicit declaration of function 'ffi_get_struct_offsets' is invalid in C99
[-Wimplicit-function-declaration]
return ffi_get_struct_offsets((ffi_abi) abi, jlong_to_ptr(type),
jlong_to_ptr(offsets));
^
Which is not totally surprising given that I haven't figured out how to link it
yet.
Thanks in advance,
Tyler
[1] https://mail.openjdk.org/pipermail/porters-dev/2023-March/000753.html