Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-libffi: Commit

external/libffi


Commit MetaInfo

Revisionc97ebeb03894ddee983aeaa016465749bd522335 (tree)
Time2019-11-23 10:46:58
AuthorMichael Goffioul <michael.goffioul@linc...>
CommiterChih-Wei Huang

Log Message

Compile in support for closures

This is intended to support nb-qemu (QEMU-based native bridge for
Android-x86).

Change Summary

Incremental Difference

--- a/Android.bp
+++ b/Android.bp
@@ -30,11 +30,13 @@ cc_library_static {
3030 "-Wno-pointer-arith",
3131 "-Wno-sign-compare",
3232 "-Wno-unused-parameter",
33+ "-Wno-null-pointer-arithmetic",
3334 ],
3435 local_include_dirs: ["include"],
3536 generated_headers: ["ffi_header"],
3637 export_generated_headers: ["ffi_header"],
3738 srcs: [
39+ "src/closures.c",
3840 "src/debug.c",
3941 "src/java_raw_api.c",
4042 "src/prep_cif.c",
--- a/linux-x86/fficonfig.h
+++ b/linux-x86/fficonfig.h
@@ -14,6 +14,9 @@
1414 /* Define this if you want extra debugging. */
1515 #undef FFI_DEBUG
1616
17+/* Cannot use malloc on this target, so, we revert to alternative means */
18+#define FFI_MMAP_EXEC_WRIT 1
19+
1720 /* Define this is you do not want support for the raw API. */
1821 #undef FFI_NO_RAW_API
1922
--- a/src/closures.c
+++ b/src/closures.c
@@ -54,7 +54,7 @@
5454 #endif
5555
5656 #if FFI_MMAP_EXEC_WRIT && !defined FFI_MMAP_EXEC_SELINUX
57-# ifdef __linux__
57+# if defined(__linux__) && !defined(__ANDROID__)
5858 /* When defined to 1 check for SELinux and if SELinux is active,
5959 don't attempt PROT_EXEC|PROT_WRITE mapping at all, as that
6060 might cause audit messages. */
Show on old repository browser