Update Android.bp to match Android.mk

Change-Id: Idaaf5019599739c50f387382ca6749af968d7095
This commit is contained in:
Colin Cross 2016-05-03 17:09:38 -07:00
parent 9f0aab88a8
commit 7941678b39
1 changed files with 300 additions and 311 deletions

View File

@ -1,9 +1,15 @@
// ANDROIDMK TRANSLATION ERROR: unsupported directive // ANDROIDMK TRANSLATION ERROR: unsupported conditional
// ifneq ($(TARGET_USE_PRIVATE_LIBM),true) // ifneq ($(TARGET_USE_PRIVATE_LIBM),true)
bionic_coverage = false bionic_coverage = false
libm_common_src_files = [ //
// libm.so and libm.a for target.
//
cc_library {
name: "libm",
srcs: [
"upstream-freebsd/lib/msun/bsdsrc/b_exp.c", "upstream-freebsd/lib/msun/bsdsrc/b_exp.c",
"upstream-freebsd/lib/msun/bsdsrc/b_log.c", "upstream-freebsd/lib/msun/bsdsrc/b_log.c",
"upstream-freebsd/lib/msun/bsdsrc/b_tgamma.c", "upstream-freebsd/lib/msun/bsdsrc/b_tgamma.c",
@ -196,9 +202,7 @@ libm_common_src_files = [
"upstream-netbsd/lib/libm/complex/csinl.c", "upstream-netbsd/lib/libm/complex/csinl.c",
"upstream-netbsd/lib/libm/complex/ctanhl.c", "upstream-netbsd/lib/libm/complex/ctanhl.c",
"upstream-netbsd/lib/libm/complex/ctanl.c", "upstream-netbsd/lib/libm/complex/ctanl.c",
]
libm_common_src_files += [
// TODO: this comes from from upstream's libc, not libm, but it's an // TODO: this comes from from upstream's libc, not libm, but it's an
// implementation detail that should have hidden visibility, so it needs // implementation detail that should have hidden visibility, so it needs
// to be in whatever library the math code is in. // to be in whatever library the math code is in.
@ -213,9 +217,15 @@ libm_common_src_files += [
// Home-grown stuff. // Home-grown stuff.
"fabs.cpp", "fabs.cpp",
] ],
libm_ld128_src_files = [ multilib: {
lib32: {
srcs: ["fake_long_double.c"],
},
lib64: {
srcs: [
"upstream-freebsd/lib/msun/src/e_acosl.c", "upstream-freebsd/lib/msun/src/e_acosl.c",
"upstream-freebsd/lib/msun/src/e_acoshl.c", "upstream-freebsd/lib/msun/src/e_acoshl.c",
"upstream-freebsd/lib/msun/src/e_asinl.c", "upstream-freebsd/lib/msun/src/e_asinl.c",
@ -257,9 +267,7 @@ libm_ld128_src_files = [
"upstream-freebsd/lib/msun/src/s_tanhl.c", "upstream-freebsd/lib/msun/src/s_tanhl.c",
"upstream-freebsd/lib/msun/src/s_tanl.c", "upstream-freebsd/lib/msun/src/s_tanl.c",
"upstream-freebsd/lib/msun/src/s_truncl.c", "upstream-freebsd/lib/msun/src/s_truncl.c",
]
libm_ld128_src_files += [
"upstream-freebsd/lib/msun/ld128/invtrig.c", "upstream-freebsd/lib/msun/ld128/invtrig.c",
"upstream-freebsd/lib/msun/ld128/e_lgammal_r.c", "upstream-freebsd/lib/msun/ld128/e_lgammal_r.c",
"upstream-freebsd/lib/msun/ld128/k_cosl.c", "upstream-freebsd/lib/msun/ld128/k_cosl.c",
@ -270,61 +278,8 @@ libm_ld128_src_files += [
"upstream-freebsd/lib/msun/ld128/s_expl.c", "upstream-freebsd/lib/msun/ld128/s_expl.c",
"upstream-freebsd/lib/msun/ld128/s_logl.c", "upstream-freebsd/lib/msun/ld128/s_logl.c",
"upstream-freebsd/lib/msun/ld128/s_nanl.c", "upstream-freebsd/lib/msun/ld128/s_nanl.c",
] ],
local_include_dirs: ["upstream-freebsd/lib/msun/ld128/"],
// TODO: re-enable i387/e_sqrtf.S for x86, and maybe others.
libm_common_cflags = [
"-D__BIONIC_NO_MATH_INLINES",
"-DFLT_EVAL_METHOD=0",
"-include freebsd-compat.h",
"-Werror",
"-Wno-missing-braces",
"-Wno-parentheses",
"-Wno-sign-compare",
"-Wno-uninitialized",
"-Wno-unknown-pragmas",
"-fvisibility=hidden",
]
// Workaround the GCC "(long)fn -> lfn" optimization bug which will result in
// self recursions for lrint, lrintf, and lrintl.
// BUG: 14225968
libm_common_cflags += [
"-fno-builtin-rint",
"-fno-builtin-rintf",
"-fno-builtin-rintl",
]
libm_common_local_includes = ["upstream-freebsd/lib/msun/src/"]
libm_ld_local_includes = ["upstream-freebsd/lib/msun/ld128/"]
//
// libm.so and libm.a for target.
//
cc_library {
name: "libm",
cflags: libm_common_cflags,
conlyflags: ["-std=gnu11"],
include_dirs: ["bionic/libc"],
local_include_dirs: libm_common_local_includes,
srcs: libm_common_src_files,
system_shared_libs: ["libc"],
native_coverage: bionic_coverage,
sanitize: {
never: true,
},
multilib: {
lib32: {
srcs: ["fake_long_double.c"],
},
lib64: {
srcs: libm_ld128_src_files,
local_include_dirs: libm_ld_local_includes,
// 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.
@ -343,6 +298,7 @@ cc_library {
"arm/sqrt.S", "arm/sqrt.S",
"arm/floor.S", "arm/floor.S",
], ],
exclude_srcs: [ exclude_srcs: [
"upstream-freebsd/lib/msun/src/e_sqrt.c", "upstream-freebsd/lib/msun/src/e_sqrt.c",
"upstream-freebsd/lib/msun/src/e_sqrtf.c", "upstream-freebsd/lib/msun/src/e_sqrtf.c",
@ -554,8 +510,41 @@ cc_library {
}, },
}, },
local_include_dirs: [
"upstream-freebsd/android/include/",
"upstream-freebsd/lib/msun/src/",
],
cflags: [
"-D__BIONIC_NO_MATH_INLINES",
"-DFLT_EVAL_METHOD=0",
"-include freebsd-compat.h",
"-Werror",
"-Wno-missing-braces",
"-Wno-parentheses",
"-Wno-sign-compare",
"-Wno-uninitialized",
"-Wno-unknown-pragmas",
"-fvisibility=hidden",
// Workaround the GCC "(long)fn -> lfn" optimization bug which will result in
// self recursions for lrint, lrintf, and lrintl.
// BUG: 14225968
"-fno-builtin-rint",
"-fno-builtin-rintf",
"-fno-builtin-rintl",
],
conlyflags: ["-std=gnu11"],
include_dirs: ["bionic/libc"],
system_shared_libs: ["libc"],
native_coverage: bionic_coverage,
sanitize: {
never: true,
},
stl: "none", stl: "none",
} }
// ANDROIDMK TRANSLATION ERROR: unsupported directive // ANDROIDMK TRANSLATION ERROR: endif from unsupported contitional
// endif // endif