-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Please upgrade libffi to ≥ 3.4.3 #1488
Copy link
Copy link
Closed
Description
Hi,
Libffi v3.4.3 adds support for static trampoline for LoongArch. Earlier versions, for example, v3.4.2 is lack of loongarch*-*-linux-* for enable_exec_static_tramp:
diff --git a/native/libffi/configure.ac b/native/libffi/configure.ac
index 70f6d2c2e..c70b23bf6 100644
--- a/native/libffi/configure.ac
+++ b/native/libffi/configure.ac
@@ -373,7 +373,7 @@ if test "$enable_exec_static_tramp" != no; then
case "$target" in
*-cygwin*)
;;
- *arm*-*-linux-* | aarch64*-*-linux-* | i*86-*-linux-* | x86_64-*-linux-*)
+ *arm*-*-linux-* | aarch64*-*-linux-* | i*86-*-linux-* | x86_64-*-linux-* | loongarch*-*-linux-*)
AC_DEFINE(FFI_EXEC_STATIC_TRAMP, 1,
[Define this if you want statically defined trampolines])
;;
ffi_tramp_arch for LoongArch64 is NULL when FFI_EXEC_STATIC_TRAMP is not defined, so ffi_tramp_init in the native/libffi/src/tramp.c will early return goto dynamic trampoline instead:
/*
* Initialize the static trampoline feature.
*/
static int
ffi_tramp_init (void)
{
if (tramp_globals.status == TRAMP_GLOBALS_PASSED)
return 1;
if (tramp_globals.status == TRAMP_GLOBALS_FAILED)
return 0;
=> if (ffi_tramp_arch == NULL)
{
tramp_globals.status = TRAMP_GLOBALS_FAILED;
=> return 0;
}
...
Just merged static trampoline for LoongArch into jna in my local enviroment, passed all Testsuites, no regression.
Thanks,
Leslie Zhai
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels