1a3e10283d
FreeBSD 13 does not have any objdump in the default installation, which causes issues with libffi on i386 with the recent update to llvm 11. Add a patch originally from upstream, to use readelf instead of objdump. The patch is for configure.ac originally. I've applied it and rerun autoreconf and committed the result, instead of adding a dependency on autoreconf. Fix devel/libffi321 in the same way. While here, fix the fuzz on a few other patches, which made it much easier to sort out the configure patch. Thanks to dim@ for helping me figure out the issue. MFH: 2020Q3
28 lines
721 B
C
28 lines
721 B
C
--- src/mips/ffi.c.orig 2014-11-08 12:47:24 UTC
|
|
+++ src/mips/ffi.c
|
|
@@ -38,7 +38,9 @@
|
|
#endif
|
|
|
|
#ifndef USE__BUILTIN___CLEAR_CACHE
|
|
-# if defined(__OpenBSD__)
|
|
+# if defined(__FreeBSD__)
|
|
+# include <machine/sysarch.h>
|
|
+# elif defined(__OpenBSD__)
|
|
# include <mips64/sysarch.h>
|
|
# else
|
|
# include <sys/cachectl.h>
|
|
@@ -736,11 +738,13 @@ ffi_prep_closure_loc (ffi_closure *closure,
|
|
closure->fun = fun;
|
|
closure->user_data = user_data;
|
|
|
|
+#if !defined(__FreeBSD__)
|
|
#ifdef USE__BUILTIN___CLEAR_CACHE
|
|
__builtin___clear_cache(clear_location, clear_location + FFI_TRAMPOLINE_SIZE);
|
|
#else
|
|
cacheflush (clear_location, FFI_TRAMPOLINE_SIZE, ICACHE);
|
|
#endif
|
|
+#endif /* ! __FreeBSD__ */
|
|
return FFI_OK;
|
|
}
|
|
|