Merge "Revert "Fix libffi issues with dynamic linking""
diff --git a/Android.bp b/Android.bp
index 2c5402c..75bf65c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -20,7 +20,7 @@
     tool_files: ["gen_ffi_header.sh"],
 }
 
-cc_library {
+cc_library_static {
     name: "libffi",
     host_supported: true,
     vendor_available: true,
diff --git a/linux-arm/fficonfig.h b/linux-arm/fficonfig.h
index e6461fe..1055e03 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. */
-#define HAVE_HIDDEN_VISIBILITY_ATTRIBUTE 1
+#undef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
 
 /* Define to 1 if you have the <inttypes.h> header file. */
 #define HAVE_INTTYPES_H 1
diff --git a/linux-arm64/fficonfig.h b/linux-arm64/fficonfig.h
index e6461fe..1055e03 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. */
-#define HAVE_HIDDEN_VISIBILITY_ATTRIBUTE 1
+#undef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
 
 /* Define to 1 if you have the <inttypes.h> header file. */
 #define HAVE_INTTYPES_H 1
diff --git a/linux-x86/fficonfig.h b/linux-x86/fficonfig.h
index b4cd905..939ef31 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. */
-#define HAVE_HIDDEN_VISIBILITY_ATTRIBUTE 1
+#undef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
 
 /* Define to 1 if you have the <inttypes.h> header file. */
 #define HAVE_INTTYPES_H 1