Factor out the bug 24465209 workaround for libdl too.
I think this makes it clearer that we have some obsolete cruft here (for libgcc_eh in particular), but I'll come back for that later.
Change-Id: I44e620d21275fb904a3084bffd607ec8d813b9b8
diff --git a/libdl/Android.bp b/libdl/Android.bp
index 95b412b..f53d2d1 100644
--- a/libdl/Android.bp
+++ b/libdl/Android.bp
@@ -60,7 +60,10 @@
native_bridge_supported: true,
static_ndk_lib: true,
- defaults: ["linux_bionic_supported"],
+ defaults: [
+ "linux_bionic_supported",
+ "bug_24465209_workaround",
+ ],
// NOTE: --exclude-libs=libgcc.a makes sure that any symbols libdl.so pulls from
// libgcc.a are made static to libdl.so. This in turn ensures that libraries that
@@ -70,7 +73,6 @@
// libgcc.a it uses.
//
// DO NOT REMOVE --exclude-libs!
-
ldflags: [
"-Wl,--exclude-libs=libgcc.a",
"-Wl,--exclude-libs=libgcc_stripped.a",
@@ -81,12 +83,9 @@
"-Wl,--exclude-libs=libclang_rt.builtins-x86_64-android.a",
],
- // for x86, exclude libgcc_eh.a for the same reasons as above
arch: {
arm: {
version_script: ":libdl.arm.map",
- pack_relocations: false,
- ldflags: ["-Wl,--hash-style=both"],
},
arm64: {
version_script: ":libdl.arm64.map",
@@ -95,14 +94,12 @@
version_script: ":libdl.riscv64.map",
},
x86: {
- pack_relocations: false,
- ldflags: [
- "-Wl,--exclude-libs=libgcc_eh.a",
- "-Wl,--hash-style=both",
- ],
+ // Exclude libgcc_eh.a for the same reasons as above
+ ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"],
version_script: ":libdl.x86.map",
},
x86_64: {
+ // Exclude libgcc_eh.a for the same reasons as above
ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"],
version_script: ":libdl.x86_64.map",
},