aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-09-23 20:05:49 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-09-24 20:31:15 +0000
commit0cff34eb46ae4c1bfc4a041c730524500a628986 (patch)
treeed3a44143913be9b70de009d85793303f15f9e19
parentb26a85b20d012cc0645933ae8a21178c484458cf (diff)
downloadports-0cff34eb46ae4c1bfc4a041c730524500a628986.tar.gz
ports-0cff34eb46ae4c1bfc4a041c730524500a628986.zip
devel/libffi: fix build with lld 17
As reported in bug 273753#c12, devel/libffi fails to link with lld 17, at least on i386: libtool: link: cc -shared -fPIC -DPIC src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/.libs/tramp.o src/x86/.libs/ffi.o src/x86/.libs/sysv.o -O2 -fstack-protector-strong -Wl,--version-script -Wl,libffi.map -fstack-protector-strong -Wl,-soname -Wl,libffi.so.8 -o .libs/libffi.so.8.1.2 ld: error: version script assignment of 'LIBFFI_BASE_8.0' to symbol 'ffi_java_raw_call' failed: symbol not defined ld: error: version script assignment of 'LIBFFI_CLOSURE_8.0' to symbol 'ffi_prep_java_raw_closure' failed: symbol not defined ld: error: version script assignment of 'LIBFFI_CLOSURE_8.0' to symbol 'ffi_prep_java_raw_closure_loc' failed: symbol not defined cc: error: linker command failed with exit code 1 (use -v to see invocation) This is because the symbols it complains about are not implemented on i386, due to the FFI_NATIVE_RAW_API define being nonzero. Fix it by adding more #if statements to libffi.map.in. PR: 274056 Approved by: kbowling (maintainer) MFH: 2023Q3
-rw-r--r--devel/libffi/files/patch-libffi.map.in23
1 files changed, 23 insertions, 0 deletions
diff --git a/devel/libffi/files/patch-libffi.map.in b/devel/libffi/files/patch-libffi.map.in
new file mode 100644
index 000000000000..25c8b32c7ece
--- /dev/null
+++ b/devel/libffi/files/patch-libffi.map.in
@@ -0,0 +1,23 @@
+--- libffi.map.in.orig 2022-10-23 15:23:27 UTC
++++ libffi.map.in
+@@ -33,7 +33,9 @@ LIBFFI_BASE_8.0 {
+ ffi_raw_to_ptrarray;
+ ffi_raw_size;
+
++#if !FFI_NATIVE_RAW_API
+ ffi_java_raw_call;
++#endif
+ ffi_java_ptrarray_to_raw;
+ ffi_java_raw_to_ptrarray;
+ ffi_java_raw_size;
+@@ -62,8 +64,10 @@ LIBFFI_CLOSURE_8.0 {
+ ffi_prep_closure_loc;
+ ffi_prep_raw_closure;
+ ffi_prep_raw_closure_loc;
++#if !FFI_NATIVE_RAW_API
+ ffi_prep_java_raw_closure;
+ ffi_prep_java_raw_closure_loc;
++#endif
+ } LIBFFI_BASE_8.0;
+ #endif
+