aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2020-08-06 18:16:30 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-08-06 18:16:30 +0000
commit5ec2ddda05d7c98d9ddfaea6b52bc02a90daad9c (patch)
treefe43ae22af82eb310d3e5a5c84bf772e30304deb
parent46a176655af7da09d1662d85e58bbe8c1e83a236 (diff)
parent27201c88d0657c2fa338e520eb0e0b5b83139f26 (diff)
downloadlibffi-5ec2ddda05d7c98d9ddfaea6b52bc02a90daad9c.tar.gz
Merge "Fix libffi issues with dynamic linking (now with mac support)" am: 27201c88d0
Original change: https://android-review.googlesource.com/c/platform/external/libffi/+/1392758 Change-Id: Iff79715df86251b53de57455125e31198a74ce25
-rw-r--r--Android.bp2
-rw-r--r--linux-arm/fficonfig.h6
-rw-r--r--linux-arm64/fficonfig.h6
-rw-r--r--linux-x86/fficonfig.h6
4 files changed, 16 insertions, 4 deletions
diff --git a/Android.bp b/Android.bp
index 75bf65cc..2c5402c4 100644
--- a/Android.bp
+++ b/Android.bp
@@ -20,7 +20,7 @@ genrule {
tool_files: ["gen_ffi_header.sh"],
}
-cc_library_static {
+cc_library {
name: "libffi",
host_supported: true,
vendor_available: true,
diff --git a/linux-arm/fficonfig.h b/linux-arm/fficonfig.h
index 1055e03f..4bc40c82 100644
--- a/linux-arm/fficonfig.h
+++ b/linux-arm/fficonfig.h
@@ -41,7 +41,7 @@
#define HAVE_DLFCN_H 1
/* Define if __attribute__((visibility("hidden"))) is supported. */
-#undef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
+#define HAVE_HIDDEN_VISIBILITY_ATTRIBUTE 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
@@ -146,7 +146,11 @@
#ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
#ifdef LIBFFI_ASM
+#ifdef __APPLE__
+#define FFI_HIDDEN(name) .private_extern name
+#else
#define FFI_HIDDEN(name) .hidden name
+#endif
#else
#define FFI_HIDDEN __attribute__ ((visibility ("hidden")))
#endif
diff --git a/linux-arm64/fficonfig.h b/linux-arm64/fficonfig.h
index 1055e03f..4bc40c82 100644
--- a/linux-arm64/fficonfig.h
+++ b/linux-arm64/fficonfig.h
@@ -41,7 +41,7 @@
#define HAVE_DLFCN_H 1
/* Define if __attribute__((visibility("hidden"))) is supported. */
-#undef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
+#define HAVE_HIDDEN_VISIBILITY_ATTRIBUTE 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
@@ -146,7 +146,11 @@
#ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
#ifdef LIBFFI_ASM
+#ifdef __APPLE__
+#define FFI_HIDDEN(name) .private_extern name
+#else
#define FFI_HIDDEN(name) .hidden name
+#endif
#else
#define FFI_HIDDEN __attribute__ ((visibility ("hidden")))
#endif
diff --git a/linux-x86/fficonfig.h b/linux-x86/fficonfig.h
index 939ef310..b9391744 100644
--- a/linux-x86/fficonfig.h
+++ b/linux-x86/fficonfig.h
@@ -41,7 +41,7 @@
#define HAVE_DLFCN_H 1
/* Define if __attribute__((visibility("hidden"))) is supported. */
-#undef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
+#define HAVE_HIDDEN_VISIBILITY_ATTRIBUTE 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
@@ -146,7 +146,11 @@
#ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
#ifdef LIBFFI_ASM
+#ifdef __APPLE__
+#define FFI_HIDDEN(name) .private_extern name
+#else
#define FFI_HIDDEN(name) .hidden name
+#endif
#else
#define FFI_HIDDEN __attribute__ ((visibility ("hidden")))
#endif