diff options
author | Kevin Bowling <kevin.bowling@kev009.com> | 2022-05-23 18:05:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-23 21:05:01 -0400 |
commit | 9af445fd70e4d7f2b3bdfc511cc3cc76a6b84c9a (patch) | |
tree | 04805d65f6039358a83d589f5c3d4423286fdcbb /src/riscv | |
parent | de95947ae5db07e4589bb16bab30b6c8ba2b3106 (diff) | |
download | libffi-9af445fd70e4d7f2b3bdfc511cc3cc76a6b84c9a.tar.gz |
Upstream FreeBSD riscv patch (#708)
Like 8276f812a99b10d1f2c387dbd6ef2ca4f597c733 commit message:
> devel/libffi: Fix abort() on ARM related to __clear_cache()
>
> The current FreeBSD __clear_cache() implementation does nothing #if
> __i386__ || __x86_64__ #else abort();
>
> cognet@ advises this is an issue for anything !Apple that is using the
> libcompiler_rt provided by Clang on ARM, and requires upstreaming.
Co-authored-by: Kristof Provost <kp@FreeBSD.org>
Diffstat (limited to 'src/riscv')
-rw-r--r-- | src/riscv/ffi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/riscv/ffi.c b/src/riscv/ffi.c index ebd05ba..f08191d 100644 --- a/src/riscv/ffi.c +++ b/src/riscv/ffi.c @@ -442,7 +442,9 @@ ffi_status ffi_prep_closure_loc(ffi_closure *closure, ffi_cif *cif, void (*fun)( closure->fun = fun; closure->user_data = user_data; +#if !defined(__FreeBSD__) __builtin___clear_cache(codeloc, codeloc + FFI_TRAMPOLINE_SIZE); +#endif return FFI_OK; } |