This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
[PATCH] Fix compile failure on AArch64 Linux builds
- From: Alan Lawrence <alan dot lawrence at arm dot com>
- To: libffi-discuss at sourceware dot org
- Date: Tue, 23 Sep 2014 13:36:31 +0100
- Subject: [PATCH] Fix compile failure on AArch64 Linux builds
- Authentication-results: sourceware.org; auth=none
Hi,
commit 5df384077f3633ec8cf2e08f9199e5a44994dbad (Merge pull request #129 from
frida/fix/darwin-aarch64-cif-prep // Fix non-variadic CIF initialization for
Apple/ARM64) breaks building libffi on aarch64 linux (e.g.
aarch64-none-linux-gnu), with error:
../src/aarch64/ffi.c: In function 'ffi_prep_cif_machdep':
../src/aarch64/ffi.c:785:6: error: 'ffi_cif' has no member named
'aarch64_nfixedargs'
cif->aarch64_nfixedargs = 0;
^
make[3]: *** [src/aarch64/ffi.lo] Error 1
Attached patch is a simple fix, tested on aarch64-none-linux-gnu. Is this OK for
trunk (and if so, can someone with write access please commit)?
Thanks, Alan
diff --git a/src/aarch64/ffi.c b/src/aarch64/ffi.c
index 5369ea4..cdb7816 100644
--- a/src/aarch64/ffi.c
+++ b/src/aarch64/ffi.c
@@ -782,7 +782,9 @@ ffi_prep_cif_machdep (ffi_cif *cif)
}
}
+#if defined (__APPLE__)
cif->aarch64_nfixedargs = 0;
+#endif
return FFI_OK;
}