Update Android.bp with arch-specific version scripts

Change-Id: I59b34f21b54e8a2084bb318a08c4092064f48083
This commit is contained in:
Dan Willemsen 2015-11-03 14:30:57 -08:00
parent af909869d8
commit 9e6f98fe9d
3 changed files with 42 additions and 6 deletions

View file

@ -1952,9 +1952,6 @@ cc_library {
stl: "none", stl: "none",
system_shared_libs: [], system_shared_libs: [],
// Don't re-export new/delete and friends, even if the compiler really wants to.
version_script: "libc.map",
// We'd really like to do this for all architectures, but since this wasn't done // We'd really like to do this for all architectures, but since this wasn't done
// before, these symbols must continue to be exported on LP32 for binary // before, these symbols must continue to be exported on LP32 for binary
// compatibility. // compatibility.
@ -1972,6 +1969,9 @@ cc_library {
//TODO: This is to work around b/24465209. Remove after root cause is fixed //TODO: This is to work around b/24465209. Remove after root cause is fixed
ldflags: ["-Wl,--hash-style=both"], ldflags: ["-Wl,--hash-style=both"],
// Don't re-export new/delete and friends, even if the compiler really wants to.
version_script: "libc.arm.map",
shared: { shared: {
srcs: ["arch-arm/bionic/exidx_dynamic.c"], srcs: ["arch-arm/bionic/exidx_dynamic.c"],
}, },
@ -1983,12 +1983,30 @@ cc_library {
"arch-arm/bionic/atexit_legacy.c", "arch-arm/bionic/atexit_legacy.c",
], ],
}, },
arm64: {
// Don't re-export new/delete and friends, even if the compiler really wants to.
version_script: "libc.arm64.map",
},
mips: {
// Don't re-export new/delete and friends, even if the compiler really wants to.
version_script: "libc.mips.map",
},
mips64: {
// Don't re-export new/delete and friends, even if the compiler really wants to.
version_script: "libc.mips64.map",
},
x86: { x86: {
//TODO: This is to work around b/24465209. Remove after root cause is fixed //TODO: This is to work around b/24465209. Remove after root cause is fixed
ldflags: ["-Wl,--hash-style=both"], ldflags: ["-Wl,--hash-style=both"],
// Don't re-export new/delete and friends, even if the compiler really wants to.
version_script: "libc.x86.map",
}, },
x86_64: { x86_64: {
clang: use_clang_x86_64, clang: use_clang_x86_64,
// Don't re-export new/delete and friends, even if the compiler really wants to.
version_script: "libc.x86_64.map",
}, },
}, },
sanitize: ["never"], sanitize: ["never"],

View file

@ -13,15 +13,28 @@ cc_library {
// DO NOT REMOVE --exclude-libs! // DO NOT REMOVE --exclude-libs!
ldflags: ["-Wl,--exclude-libs=libgcc.a"], ldflags: ["-Wl,--exclude-libs=libgcc.a"],
version_script: "libdl.map",
// for x86, exclude libgcc_eh.a for the same reasons as above // for x86, exclude libgcc_eh.a for the same reasons as above
arch: { arch: {
arm: {
version_script: "libdl.arm.map",
},
arm64: {
version_script: "libdl.arm64.map",
},
mips: {
version_script: "libdl.mips.map",
},
mips64: {
version_script: "libdl.mips64.map",
},
x86: { x86: {
ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"], ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"],
version_script: "libdl.x86.map",
}, },
x86_64: { x86_64: {
ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"], ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"],
version_script: "libdl.x86_64.map",
}, },
}, },
srcs: ["libdl.c"], srcs: ["libdl.c"],

View file

@ -254,6 +254,7 @@ libm_common_cflags = [
"-D__BIONIC_NO_MATH_INLINES", "-D__BIONIC_NO_MATH_INLINES",
"-DFLT_EVAL_METHOD=0", "-DFLT_EVAL_METHOD=0",
"-include freebsd-compat.h", "-include freebsd-compat.h",
"-Werror",
"-Wno-missing-braces", "-Wno-missing-braces",
"-Wno-parentheses", "-Wno-parentheses",
"-Wno-sign-compare", "-Wno-sign-compare",
@ -290,8 +291,6 @@ cc_library {
native_coverage: bionic_coverage, native_coverage: bionic_coverage,
sanitize: ["never"], sanitize: ["never"],
version_script: "libm.map",
multilib: { multilib: {
lib64: { lib64: {
srcs: libm_ld128_src_files, srcs: libm_ld128_src_files,
@ -319,6 +318,7 @@ cc_library {
], ],
instruction_set: "arm", instruction_set: "arm",
ldflags: ["-Wl,--hash-style=both"], ldflags: ["-Wl,--hash-style=both"],
version_script: "libm.arm.map",
}, },
arm64: { arm64: {
@ -350,14 +350,17 @@ cc_library {
"upstream-freebsd/lib/msun/src/s_trunc.c", "upstream-freebsd/lib/msun/src/s_trunc.c",
"upstream-freebsd/lib/msun/src/s_truncf.c", "upstream-freebsd/lib/msun/src/s_truncf.c",
], ],
version_script: "libm.arm64.map",
}, },
mips: { mips: {
srcs: ["mips/fenv.c"], srcs: ["mips/fenv.c"],
version_script: "libm.mips.map",
}, },
mips64: { mips64: {
srcs: ["mips/fenv.c"], srcs: ["mips/fenv.c"],
version_script: "libm.mips64.map",
}, },
x86: { x86: {
@ -366,12 +369,14 @@ cc_library {
// Clang has wrong long double sizes for x86. // Clang has wrong long double sizes for x86.
clang: false, clang: false,
ldflags: ["-Wl,--hash-style=both"], ldflags: ["-Wl,--hash-style=both"],
version_script: "libm.x86.map",
}, },
x86_64: { x86_64: {
srcs: ["amd64/fenv.c"], srcs: ["amd64/fenv.c"],
// Clang has wrong long double sizes for x86. // Clang has wrong long double sizes for x86.
clang: false, clang: false,
version_script: "libm.x86_64.map",
}, },
}, },