Skip to content

Commit 7d55d5c

Browse files
committed
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
1 parent e797aab commit 7d55d5c

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

libdl/Android.bp

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ cc_library {
6060
native_bridge_supported: true,
6161
static_ndk_lib: true,
6262

63-
defaults: ["linux_bionic_supported"],
63+
defaults: [
64+
"linux_bionic_supported",
65+
"bug_24465209_workaround",
66+
],
6467

6568
// NOTE: --exclude-libs=libgcc.a makes sure that any symbols libdl.so pulls from
6669
// libgcc.a are made static to libdl.so. This in turn ensures that libraries that
@@ -70,7 +73,6 @@ cc_library {
7073
// libgcc.a it uses.
7174
//
7275
// DO NOT REMOVE --exclude-libs!
73-
7476
ldflags: [
7577
"-Wl,--exclude-libs=libgcc.a",
7678
"-Wl,--exclude-libs=libgcc_stripped.a",
@@ -81,12 +83,9 @@ cc_library {
8183
"-Wl,--exclude-libs=libclang_rt.builtins-x86_64-android.a",
8284
],
8385

84-
// for x86, exclude libgcc_eh.a for the same reasons as above
8586
arch: {
8687
arm: {
8788
version_script: ":libdl.arm.map",
88-
pack_relocations: false,
89-
ldflags: ["-Wl,--hash-style=both"],
9089
},
9190
arm64: {
9291
version_script: ":libdl.arm64.map",
@@ -95,14 +94,12 @@ cc_library {
9594
version_script: ":libdl.riscv64.map",
9695
},
9796
x86: {
98-
pack_relocations: false,
99-
ldflags: [
100-
"-Wl,--exclude-libs=libgcc_eh.a",
101-
"-Wl,--hash-style=both",
102-
],
97+
// Exclude libgcc_eh.a for the same reasons as above
98+
ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"],
10399
version_script: ":libdl.x86.map",
104100
},
105101
x86_64: {
102+
// Exclude libgcc_eh.a for the same reasons as above
106103
ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"],
107104
version_script: ":libdl.x86_64.map",
108105
},

0 commit comments

Comments
 (0)