File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,43 @@ tar -xf libffi-${LIBFFI_VERSION}.tar.gz
13
13
14
14
pushd libffi-${LIBFFI_VERSION}
15
15
16
+ # Needed to fix compilation on macOS aarch64. Will presumably be in libffi
17
+ # 3.4.7 or 3.5. Backport of libffi commit 8308bed5b2423878aa20d7884a99cf2e30b8daf7.
18
+ patch -p1 << EOF
19
+ diff --git a/src/aarch64/sysv.S b/src/aarch64/sysv.S
20
+ index fdd0e8b..1ae768b 100644
21
+ --- a/src/aarch64/sysv.S
22
+ +++ b/src/aarch64/sysv.S
23
+ @@ -89,7 +89,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
24
+ x5 closure
25
+ */
26
+
27
+ - cfi_startproc
28
+ CNAME(ffi_call_SYSV):
29
+ BTI_C
30
+ /* Sign the lr with x1 since that is where it will be stored */
31
+ @@ -347,8 +346,8 @@ CNAME(ffi_closure_SYSV_V):
32
+ #endif
33
+
34
+ .align 4
35
+ - cfi_startproc
36
+ CNAME(ffi_closure_SYSV):
37
+ + cfi_startproc
38
+ BTI_C
39
+ SIGN_LR
40
+ stp x29, x30, [sp, #-ffi_closure_SYSV_FS]!
41
+ @@ -643,8 +642,8 @@ CNAME(ffi_go_closure_SYSV_V):
42
+ #endif
43
+
44
+ .align 4
45
+ - cfi_startproc
46
+ CNAME(ffi_go_closure_SYSV):
47
+ + cfi_startproc
48
+ BTI_C
49
+ stp x29, x30, [sp, #-ffi_closure_SYSV_FS]!
50
+ cfi_adjust_cfa_offset (ffi_closure_SYSV_FS)
51
+ EOF
52
+
16
53
EXTRA_CONFIGURE=
17
54
18
55
# mkostemp() was introduced in macOS 10.10 and libffi doesn't have
You can’t perform that action at this time.
0 commit comments