Removed
Link Here
|
1 |
# Description: Fix abort() on ARM related to __clear_cache(). This is an issue |
2 |
# for anything !apple that is using the libcompiler_rt provided by clang on ARM |
3 |
# PR: ports/149167 ports/184517 |
4 |
# Patch by: cognet@ (to be upstreamed @ LLVM) |
5 |
|
6 |
--- src/arm/ffi.c.orig 2019-10-31 14:49:54 UTC |
7 |
+++ src/arm/ffi.c |
8 |
@@ -55,6 +55,11 @@ extern unsigned int ffi_arm_trampoline[3] FFI_HIDDEN; |
9 |
#endif |
10 |
#endif |
11 |
|
12 |
+#if defined(__FreeBSD__) && defined(__arm__) |
13 |
+#include <sys/types.h> |
14 |
+#include <machine/sysarch.h> |
15 |
+#endif |
16 |
+ |
17 |
/* Forward declares. */ |
18 |
static int vfp_type_p (const ffi_type *); |
19 |
static void layout_vfp_args (ffi_cif *); |
20 |
@@ -568,6 +573,16 @@ void ffi_go_closure_SYSV (void) FFI_HIDDEN; |
21 |
void ffi_go_closure_VFP (void) FFI_HIDDEN; |
22 |
|
23 |
/* the cif must already be prep'ed */ |
24 |
+ |
25 |
+#if defined(__FreeBSD__) && defined(__arm__) |
26 |
+#define __clear_cache(start, end) do { \ |
27 |
+ struct arm_sync_icache_args ua; \ |
28 |
+ \ |
29 |
+ ua.addr = (uintptr_t)(start); \ |
30 |
+ ua.len = (char *)(end) - (char *)start; \ |
31 |
+ sysarch(ARM_SYNC_ICACHE, &ua); \ |
32 |
+ } while (0); |
33 |
+#endif |
34 |
|
35 |
ffi_status |
36 |
ffi_prep_closure_loc (ffi_closure * closure, |