From a29ed0bbce86726bce5b27a903653e150e2a7bc7 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Wed, 2 Dec 2015 22:16:48 -0800 Subject: [PATCH] libm: Use LOCAL_SRC_FILES_EXCLUDE_{arch} Instead of adding the used common files to each arch that doesn't override a file, make the architectures list the files they override. Also updates the Android.bp file to match the Android.mk file. Change-Id: I7d6a9c2e1c6b6cc9430aa818a89a2ccf52f62c98 --- libm/Android.bp | 185 +++++++++++++++++++++++++++++++++++------ libm/Android.mk | 214 +++++++++++++++++++++++------------------------- 2 files changed, 263 insertions(+), 136 deletions(-) diff --git a/libm/Android.bp b/libm/Android.bp index 0fc860a18..081a13967 100644 --- a/libm/Android.bp +++ b/libm/Android.bp @@ -3,18 +3,7 @@ bionic_coverage = false -// TODO: this comes from from upstream's libc, not libm, but it's an -// implementation detail that should have hidden visibility, so it needs -// to be in whatever library the math code is in. -libm_common_src_files = ["digittoint.c"] - -// TODO: this is not in the BSDs. -libm_common_src_files += [ - "significandl.c", - "sincos.c", -] - -libm_common_src_files += [ +libm_common_src_files = [ "upstream-freebsd/lib/msun/bsdsrc/b_exp.c", "upstream-freebsd/lib/msun/bsdsrc/b_log.c", "upstream-freebsd/lib/msun/bsdsrc/b_tgamma.c", @@ -186,8 +175,19 @@ libm_common_src_files += [ ] libm_common_src_files += [ - "fake_long_double.c", + // TODO: this comes from from upstream's libc, not libm, but it's an + // implementation detail that should have hidden visibility, so it needs + // to be in whatever library the math code is in. + "digittoint.c", + + // Functionality not in the BSDs. + "significandl.c", + "sincos.c", + + // Modified versions of BSD code. "signbit.c", + + // Home-grown stuff. "fabs.cpp", ] @@ -292,6 +292,9 @@ cc_library { sanitize: ["never"], multilib: { + lib32: { + srcs: ["fake_long_double.c"], + }, lib64: { srcs: libm_ld128_src_files, local_include_dirs: libm_ld_local_includes, @@ -307,15 +310,18 @@ cc_library { arm: { srcs: [ "arm/fenv.c", - "arm/sqrt.S", - "arm/floor.S", - ], - exclude_srcs: [ - // TODO: these require neon not available in arm - "upstream-freebsd/lib/msun/src/e_sqrt.c", - "upstream-freebsd/lib/msun/src/e_sqrtf.c", - "upstream-freebsd/lib/msun/src/s_floor.c", ], + armv7_a_neon: { + srcs: [ + "arm/sqrt.S", + "arm/floor.S", + ], + exclude_srcs: [ + "upstream-freebsd/lib/msun/src/e_sqrt.c", + "upstream-freebsd/lib/msun/src/e_sqrtf.c", + "upstream-freebsd/lib/msun/src/s_floor.c", + ], + }, instruction_set: "arm", ldflags: ["-Wl,--hash-style=both"], version_script: "libm.arm.map", @@ -323,8 +329,8 @@ cc_library { arm64: { srcs: [ - "arm64/fenv.c", "arm64/ceil.S", + "arm64/fenv.c", "arm64/fma.S", "arm64/floor.S", "arm64/lrint.S", @@ -333,6 +339,8 @@ cc_library { "arm64/trunc.S", ], exclude_srcs: [ + "upstream-freebsd/lib/msun/src/e_sqrt.c", + "upstream-freebsd/lib/msun/src/e_sqrtf.c", "upstream-freebsd/lib/msun/src/s_ceil.c", "upstream-freebsd/lib/msun/src/s_ceilf.c", "upstream-freebsd/lib/msun/src/s_fma.c", @@ -345,8 +353,6 @@ cc_library { "upstream-freebsd/lib/msun/src/s_lrintf.c", "upstream-freebsd/lib/msun/src/s_rint.c", "upstream-freebsd/lib/msun/src/s_rintf.c", - "upstream-freebsd/lib/msun/src/e_sqrt.c", - "upstream-freebsd/lib/msun/src/e_sqrtf.c", "upstream-freebsd/lib/msun/src/s_trunc.c", "upstream-freebsd/lib/msun/src/s_truncf.c", ], @@ -364,8 +370,73 @@ cc_library { }, x86: { + srcs: [ + "i387/fenv.c", + "x86/sqrt.S", + "x86/sqrtf.S", + "x86/e_acos.S", + "x86/e_asin.S", + "x86/e_atan2.S", + "x86/e_cosh.S", + "x86/e_exp.S", + "x86/e_hypot.S", + "x86/e_log10.S", + "x86/e_log.S", + "x86/e_pow.S", + "x86/e_sinh.S", + "x86/libm_reduce_pi04l.S", + "x86/libm_sincos_huge.S", + "x86/libm_tancot_huge.S", + "x86/s_atan.S", + "x86/s_cbrt.S", + "x86/s_cos.S", + "x86/s_expm1.S", + "x86/s_log1p.S", + "x86/s_sin.S", + "x86/s_tanh.S", + "x86/s_tan.S", + ], + exclude_srcs: [ + "upstream-freebsd/lib/msun/src/e_acos.c", + "upstream-freebsd/lib/msun/src/e_asin.c", + "upstream-freebsd/lib/msun/src/e_atan2.c", + "upstream-freebsd/lib/msun/src/e_cosh.c", + "upstream-freebsd/lib/msun/src/e_exp.c", + "upstream-freebsd/lib/msun/src/e_hypot.c", + "upstream-freebsd/lib/msun/src/e_log.c", + "upstream-freebsd/lib/msun/src/e_log10.c", + "upstream-freebsd/lib/msun/src/e_pow.c", + "upstream-freebsd/lib/msun/src/e_sinh.c", + "upstream-freebsd/lib/msun/src/e_sqrt.c", + "upstream-freebsd/lib/msun/src/e_sqrtf.c", + "upstream-freebsd/lib/msun/src/s_atan.c", + "upstream-freebsd/lib/msun/src/s_cbrt.c", + "upstream-freebsd/lib/msun/src/s_cos.c", + "upstream-freebsd/lib/msun/src/s_expm1.c", + "upstream-freebsd/lib/msun/src/s_log1p.c", + "upstream-freebsd/lib/msun/src/s_sin.c", + "upstream-freebsd/lib/msun/src/s_tan.c", + "upstream-freebsd/lib/msun/src/s_tanh.c", + ], + sse4_1: { + srcs: [ + "x86/ceil.S", + "x86/ceilf.S", + "x86/floor.S", + "x86/floorf.S", + "x86/trunc.S", + "x86/truncf.S", + ], + exclude_srcs: [ + "upstream-freebsd/lib/msun/src/s_ceil.c", + "upstream-freebsd/lib/msun/src/s_ceilf.c", + "upstream-freebsd/lib/msun/src/s_floor.c", + "upstream-freebsd/lib/msun/src/s_floorf.c", + "upstream-freebsd/lib/msun/src/s_trunc.c", + "upstream-freebsd/lib/msun/src/s_truncf.c", + ], + }, local_include_dirs: ["i387"], - srcs: ["i387/fenv.c"], // Clang has wrong long double sizes for x86. clang: false, ldflags: ["-Wl,--hash-style=both"], @@ -373,7 +444,69 @@ cc_library { }, x86_64: { - srcs: ["amd64/fenv.c"], + srcs: [ + "amd64/fenv.c", + "x86_64/sqrt.S", + "x86_64/sqrtf.S", + "x86_64/e_acos.S", + "x86_64/e_asin.S", + "x86_64/e_atan2.S", + "x86_64/e_cosh.S", + "x86_64/e_exp.S", + "x86_64/e_hypot.S", + "x86_64/e_log10.S", + "x86_64/e_log.S", + "x86_64/e_pow.S", + "x86_64/e_sinh.S", + "x86_64/s_atan.S", + "x86_64/s_cbrt.S", + "x86_64/s_cos.S", + "x86_64/s_expm1.S", + "x86_64/s_log1p.S", + "x86_64/s_sin.S", + "x86_64/s_tanh.S", + "x86_64/s_tan.S", + ], + exclude_srcs: [ + "upstream-freebsd/lib/msun/src/e_acos.c", + "upstream-freebsd/lib/msun/src/e_asin.c", + "upstream-freebsd/lib/msun/src/e_atan2.c", + "upstream-freebsd/lib/msun/src/e_cosh.c", + "upstream-freebsd/lib/msun/src/e_exp.c", + "upstream-freebsd/lib/msun/src/e_hypot.c", + "upstream-freebsd/lib/msun/src/e_log.c", + "upstream-freebsd/lib/msun/src/e_log10.c", + "upstream-freebsd/lib/msun/src/e_pow.c", + "upstream-freebsd/lib/msun/src/e_sinh.c", + "upstream-freebsd/lib/msun/src/e_sqrt.c", + "upstream-freebsd/lib/msun/src/e_sqrtf.c", + "upstream-freebsd/lib/msun/src/s_atan.c", + "upstream-freebsd/lib/msun/src/s_cbrt.c", + "upstream-freebsd/lib/msun/src/s_cos.c", + "upstream-freebsd/lib/msun/src/s_expm1.c", + "upstream-freebsd/lib/msun/src/s_log1p.c", + "upstream-freebsd/lib/msun/src/s_sin.c", + "upstream-freebsd/lib/msun/src/s_tan.c", + "upstream-freebsd/lib/msun/src/s_tanh.c", + ], + sse4_1: { + srcs: [ + "x86_64/ceil.S", + "x86_64/ceilf.S", + "x86_64/floor.S", + "x86_64/floorf.S", + "x86_64/trunc.S", + "x86_64/truncf.S", + ], + exclude_srcs: [ + "upstream-freebsd/lib/msun/src/s_ceil.c", + "upstream-freebsd/lib/msun/src/s_ceilf.c", + "upstream-freebsd/lib/msun/src/s_floor.c", + "upstream-freebsd/lib/msun/src/s_floorf.c", + "upstream-freebsd/lib/msun/src/s_trunc.c", + "upstream-freebsd/lib/msun/src/s_truncf.c", + ], + }, // Clang has wrong long double sizes for x86. clang: false, version_script: "libm.x86_64.map", diff --git a/libm/Android.mk b/libm/Android.mk index bd51e7cbf..faf3c5075 100644 --- a/libm/Android.mk +++ b/libm/Android.mk @@ -22,14 +22,19 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/bsdsrc/b_tgamma.c \ upstream-freebsd/lib/msun/src/catrig.c \ upstream-freebsd/lib/msun/src/catrigf.c \ + upstream-freebsd/lib/msun/src/e_acos.c \ upstream-freebsd/lib/msun/src/e_acosf.c \ upstream-freebsd/lib/msun/src/e_acosh.c \ upstream-freebsd/lib/msun/src/e_acoshf.c \ + upstream-freebsd/lib/msun/src/e_asin.c \ upstream-freebsd/lib/msun/src/e_asinf.c \ + upstream-freebsd/lib/msun/src/e_atan2.c \ upstream-freebsd/lib/msun/src/e_atan2f.c \ upstream-freebsd/lib/msun/src/e_atanh.c \ upstream-freebsd/lib/msun/src/e_atanhf.c \ + upstream-freebsd/lib/msun/src/e_cosh.c \ upstream-freebsd/lib/msun/src/e_coshf.c \ + upstream-freebsd/lib/msun/src/e_exp.c \ upstream-freebsd/lib/msun/src/e_expf.c \ upstream-freebsd/lib/msun/src/e_fmod.c \ upstream-freebsd/lib/msun/src/e_fmodf.c \ @@ -37,6 +42,7 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/src/e_gammaf.c \ upstream-freebsd/lib/msun/src/e_gammaf_r.c \ upstream-freebsd/lib/msun/src/e_gamma_r.c \ + upstream-freebsd/lib/msun/src/e_hypot.c \ upstream-freebsd/lib/msun/src/e_hypotf.c \ upstream-freebsd/lib/msun/src/e_j0.c \ upstream-freebsd/lib/msun/src/e_j0f.c \ @@ -48,10 +54,13 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/src/e_lgammaf.c \ upstream-freebsd/lib/msun/src/e_lgammaf_r.c \ upstream-freebsd/lib/msun/src/e_lgamma_r.c \ + upstream-freebsd/lib/msun/src/e_log10.c \ upstream-freebsd/lib/msun/src/e_log10f.c \ upstream-freebsd/lib/msun/src/e_log2.c \ upstream-freebsd/lib/msun/src/e_log2f.c \ + upstream-freebsd/lib/msun/src/e_log.c \ upstream-freebsd/lib/msun/src/e_logf.c \ + upstream-freebsd/lib/msun/src/e_pow.c \ upstream-freebsd/lib/msun/src/e_powf.c \ upstream-freebsd/lib/msun/src/e_remainder.c \ upstream-freebsd/lib/msun/src/e_remainderf.c \ @@ -59,7 +68,10 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/src/e_rem_pio2f.c \ upstream-freebsd/lib/msun/src/e_scalb.c \ upstream-freebsd/lib/msun/src/e_scalbf.c \ + upstream-freebsd/lib/msun/src/e_sinh.c \ upstream-freebsd/lib/msun/src/e_sinhf.c \ + upstream-freebsd/lib/msun/src/e_sqrt.c \ + upstream-freebsd/lib/msun/src/e_sqrtf.c \ upstream-freebsd/lib/msun/src/imprecise.c \ upstream-freebsd/lib/msun/src/k_cos.c \ upstream-freebsd/lib/msun/src/k_cosf.c \ @@ -72,13 +84,17 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/src/k_tanf.c \ upstream-freebsd/lib/msun/src/s_asinh.c \ upstream-freebsd/lib/msun/src/s_asinhf.c \ + upstream-freebsd/lib/msun/src/s_atan.c \ upstream-freebsd/lib/msun/src/s_atanf.c \ upstream-freebsd/lib/msun/src/s_carg.c \ upstream-freebsd/lib/msun/src/s_cargf.c \ upstream-freebsd/lib/msun/src/s_cargl.c \ + upstream-freebsd/lib/msun/src/s_cbrt.c \ upstream-freebsd/lib/msun/src/s_cbrtf.c \ upstream-freebsd/lib/msun/src/s_ccosh.c \ upstream-freebsd/lib/msun/src/s_ccoshf.c \ + upstream-freebsd/lib/msun/src/s_ceil.c \ + upstream-freebsd/lib/msun/src/s_ceilf.c \ upstream-freebsd/lib/msun/src/s_cexp.c \ upstream-freebsd/lib/msun/src/s_cexpf.c \ upstream-freebsd/lib/msun/src/s_cimag.c \ @@ -89,6 +105,7 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/src/s_conjl.c \ upstream-freebsd/lib/msun/src/s_copysign.c \ upstream-freebsd/lib/msun/src/s_copysignf.c \ + upstream-freebsd/lib/msun/src/s_cos.c \ upstream-freebsd/lib/msun/src/s_cosf.c \ upstream-freebsd/lib/msun/src/s_cproj.c \ upstream-freebsd/lib/msun/src/s_cprojf.c \ @@ -107,10 +124,15 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/src/s_erff.c \ upstream-freebsd/lib/msun/src/s_exp2.c \ upstream-freebsd/lib/msun/src/s_exp2f.c \ + upstream-freebsd/lib/msun/src/s_expm1.c \ upstream-freebsd/lib/msun/src/s_expm1f.c \ upstream-freebsd/lib/msun/src/s_fdim.c \ upstream-freebsd/lib/msun/src/s_finite.c \ upstream-freebsd/lib/msun/src/s_finitef.c \ + upstream-freebsd/lib/msun/src/s_floor.c \ + upstream-freebsd/lib/msun/src/s_floorf.c \ + upstream-freebsd/lib/msun/src/s_fma.c \ + upstream-freebsd/lib/msun/src/s_fmaf.c \ upstream-freebsd/lib/msun/src/s_fmax.c \ upstream-freebsd/lib/msun/src/s_fmaxf.c \ upstream-freebsd/lib/msun/src/s_fmin.c \ @@ -119,11 +141,16 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/src/s_frexpf.c \ upstream-freebsd/lib/msun/src/s_ilogb.c \ upstream-freebsd/lib/msun/src/s_ilogbf.c \ + upstream-freebsd/lib/msun/src/s_llrint.c \ + upstream-freebsd/lib/msun/src/s_llrintf.c \ upstream-freebsd/lib/msun/src/s_llround.c \ upstream-freebsd/lib/msun/src/s_llroundf.c \ + upstream-freebsd/lib/msun/src/s_log1p.c \ upstream-freebsd/lib/msun/src/s_log1pf.c \ upstream-freebsd/lib/msun/src/s_logb.c \ upstream-freebsd/lib/msun/src/s_logbf.c \ + upstream-freebsd/lib/msun/src/s_lrint.c \ + upstream-freebsd/lib/msun/src/s_lrintf.c \ upstream-freebsd/lib/msun/src/s_lround.c \ upstream-freebsd/lib/msun/src/s_lroundf.c \ upstream-freebsd/lib/msun/src/s_modf.c \ @@ -134,6 +161,8 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/src/s_nextafterf.c \ upstream-freebsd/lib/msun/src/s_remquo.c \ upstream-freebsd/lib/msun/src/s_remquof.c \ + upstream-freebsd/lib/msun/src/s_rint.c \ + upstream-freebsd/lib/msun/src/s_rintf.c \ upstream-freebsd/lib/msun/src/s_round.c \ upstream-freebsd/lib/msun/src/s_roundf.c \ upstream-freebsd/lib/msun/src/s_scalbln.c \ @@ -142,10 +171,15 @@ LOCAL_SRC_FILES := \ upstream-freebsd/lib/msun/src/s_signgam.c \ upstream-freebsd/lib/msun/src/s_significand.c \ upstream-freebsd/lib/msun/src/s_significandf.c \ + upstream-freebsd/lib/msun/src/s_sin.c \ upstream-freebsd/lib/msun/src/s_sinf.c \ + upstream-freebsd/lib/msun/src/s_tan.c \ upstream-freebsd/lib/msun/src/s_tanf.c \ + upstream-freebsd/lib/msun/src/s_tanh.c \ upstream-freebsd/lib/msun/src/s_tanhf.c \ upstream-freebsd/lib/msun/src/s_tgammaf.c \ + upstream-freebsd/lib/msun/src/s_trunc.c \ + upstream-freebsd/lib/msun/src/s_truncf.c \ upstream-freebsd/lib/msun/src/w_cabs.c \ upstream-freebsd/lib/msun/src/w_cabsf.c \ upstream-freebsd/lib/msun/src/w_cabsl.c \ @@ -236,37 +270,6 @@ LOCAL_SRC_FILES += \ # ----------------------------------------------------------------------------- LOCAL_SRC_FILES_arm += \ arm/fenv.c \ - upstream-freebsd/lib/msun/src/e_acos.c \ - upstream-freebsd/lib/msun/src/e_asin.c \ - upstream-freebsd/lib/msun/src/e_atan2.c \ - upstream-freebsd/lib/msun/src/e_cosh.c \ - upstream-freebsd/lib/msun/src/e_exp.c \ - upstream-freebsd/lib/msun/src/e_hypot.c \ - upstream-freebsd/lib/msun/src/e_log.c \ - upstream-freebsd/lib/msun/src/e_log10.c \ - upstream-freebsd/lib/msun/src/e_pow.c \ - upstream-freebsd/lib/msun/src/e_sinh.c \ - upstream-freebsd/lib/msun/src/s_atan.c \ - upstream-freebsd/lib/msun/src/s_cbrt.c \ - upstream-freebsd/lib/msun/src/s_ceil.c \ - upstream-freebsd/lib/msun/src/s_ceilf.c \ - upstream-freebsd/lib/msun/src/s_cos.c \ - upstream-freebsd/lib/msun/src/s_fma.c \ - upstream-freebsd/lib/msun/src/s_fmaf.c \ - upstream-freebsd/lib/msun/src/s_floorf.c \ - upstream-freebsd/lib/msun/src/s_expm1.c \ - upstream-freebsd/lib/msun/src/s_llrint.c \ - upstream-freebsd/lib/msun/src/s_llrintf.c \ - upstream-freebsd/lib/msun/src/s_log1p.c \ - upstream-freebsd/lib/msun/src/s_lrint.c \ - upstream-freebsd/lib/msun/src/s_lrintf.c \ - upstream-freebsd/lib/msun/src/s_rint.c \ - upstream-freebsd/lib/msun/src/s_rintf.c \ - upstream-freebsd/lib/msun/src/s_sin.c \ - upstream-freebsd/lib/msun/src/s_tan.c \ - upstream-freebsd/lib/msun/src/s_tanh.c \ - upstream-freebsd/lib/msun/src/s_trunc.c \ - upstream-freebsd/lib/msun/src/s_truncf.c \ # s_floor.S requires neon instructions. ifdef TARGET_2ND_ARCH @@ -276,17 +279,16 @@ arch_variant := $(TARGET_ARCH_VARIANT) endif # Use the C version on armv7-a since it doesn't support neon instructions. -ifeq ($(arch_variant),armv7-a) -LOCAL_SRC_FILES_arm += \ - upstream-freebsd/lib/msun/src/e_sqrt.c \ - upstream-freebsd/lib/msun/src/e_sqrtf.c \ - upstream-freebsd/lib/msun/src/s_floor.c \ - -else +ifneq ($(arch_variant),armv7-a) LOCAL_SRC_FILES_arm += \ arm/sqrt.S \ arm/floor.S \ +LOCAL_SRC_FILES_EXCLUDE_arm += \ + upstream-freebsd/lib/msun/src/e_sqrt.c \ + upstream-freebsd/lib/msun/src/e_sqrtf.c \ + upstream-freebsd/lib/msun/src/s_floor.c \ + endif # ----------------------------------------------------------------------------- @@ -301,64 +303,30 @@ LOCAL_SRC_FILES_arm64 += \ arm64/rint.S \ arm64/sqrt.S \ arm64/trunc.S \ - upstream-freebsd/lib/msun/src/e_acos.c \ - upstream-freebsd/lib/msun/src/e_asin.c \ - upstream-freebsd/lib/msun/src/e_atan2.c \ - upstream-freebsd/lib/msun/src/e_cosh.c \ - upstream-freebsd/lib/msun/src/e_exp.c \ - upstream-freebsd/lib/msun/src/e_hypot.c \ - upstream-freebsd/lib/msun/src/e_log.c \ - upstream-freebsd/lib/msun/src/e_log10.c \ - upstream-freebsd/lib/msun/src/e_pow.c \ - upstream-freebsd/lib/msun/src/e_sinh.c \ - upstream-freebsd/lib/msun/src/s_atan.c \ - upstream-freebsd/lib/msun/src/s_cbrt.c \ - upstream-freebsd/lib/msun/src/s_cos.c \ - upstream-freebsd/lib/msun/src/s_expm1.c \ - upstream-freebsd/lib/msun/src/s_log1p.c \ - upstream-freebsd/lib/msun/src/s_sin.c \ - upstream-freebsd/lib/msun/src/s_tan.c \ - upstream-freebsd/lib/msun/src/s_tanh.c \ + +LOCAL_SRC_FILES_EXCLUDE_arm64 += \ + upstream-freebsd/lib/msun/src/e_sqrt.c \ + upstream-freebsd/lib/msun/src/e_sqrtf.c \ + upstream-freebsd/lib/msun/src/s_ceil.c \ + upstream-freebsd/lib/msun/src/s_ceilf.c \ + upstream-freebsd/lib/msun/src/s_fma.c \ + upstream-freebsd/lib/msun/src/s_fmaf.c \ + upstream-freebsd/lib/msun/src/s_floor.c \ + upstream-freebsd/lib/msun/src/s_floorf.c \ + upstream-freebsd/lib/msun/src/s_llrint.c \ + upstream-freebsd/lib/msun/src/s_llrintf.c \ + upstream-freebsd/lib/msun/src/s_lrint.c \ + upstream-freebsd/lib/msun/src/s_lrintf.c \ + upstream-freebsd/lib/msun/src/s_rint.c \ + upstream-freebsd/lib/msun/src/s_rintf.c \ + upstream-freebsd/lib/msun/src/s_trunc.c \ + upstream-freebsd/lib/msun/src/s_truncf.c \ # ----------------------------------------------------------------------------- # mips # ----------------------------------------------------------------------------- libm_mips_arch_files := \ mips/fenv.c \ - upstream-freebsd/lib/msun/src/e_acos.c \ - upstream-freebsd/lib/msun/src/e_asin.c \ - upstream-freebsd/lib/msun/src/e_atan2.c \ - upstream-freebsd/lib/msun/src/e_cosh.c \ - upstream-freebsd/lib/msun/src/e_exp.c \ - upstream-freebsd/lib/msun/src/e_hypot.c \ - upstream-freebsd/lib/msun/src/e_log.c \ - upstream-freebsd/lib/msun/src/e_log10.c \ - upstream-freebsd/lib/msun/src/e_pow.c \ - upstream-freebsd/lib/msun/src/e_sinh.c \ - upstream-freebsd/lib/msun/src/e_sqrt.c \ - upstream-freebsd/lib/msun/src/e_sqrtf.c \ - upstream-freebsd/lib/msun/src/s_atan.c \ - upstream-freebsd/lib/msun/src/s_cbrt.c \ - upstream-freebsd/lib/msun/src/s_ceil.c \ - upstream-freebsd/lib/msun/src/s_ceilf.c \ - upstream-freebsd/lib/msun/src/s_cos.c \ - upstream-freebsd/lib/msun/src/s_fma.c \ - upstream-freebsd/lib/msun/src/s_fmaf.c \ - upstream-freebsd/lib/msun/src/s_floor.c \ - upstream-freebsd/lib/msun/src/s_floorf.c \ - upstream-freebsd/lib/msun/src/s_expm1.c \ - upstream-freebsd/lib/msun/src/s_llrint.c \ - upstream-freebsd/lib/msun/src/s_llrintf.c \ - upstream-freebsd/lib/msun/src/s_log1p.c \ - upstream-freebsd/lib/msun/src/s_lrint.c \ - upstream-freebsd/lib/msun/src/s_lrintf.c \ - upstream-freebsd/lib/msun/src/s_rint.c \ - upstream-freebsd/lib/msun/src/s_rintf.c \ - upstream-freebsd/lib/msun/src/s_sin.c \ - upstream-freebsd/lib/msun/src/s_tan.c \ - upstream-freebsd/lib/msun/src/s_tanh.c \ - upstream-freebsd/lib/msun/src/s_trunc.c \ - upstream-freebsd/lib/msun/src/s_truncf.c \ LOCAL_SRC_FILES_mips += $(libm_mips_arch_files) LOCAL_SRC_FILES_mips64 += $(libm_mips_arch_files) @@ -368,14 +336,6 @@ LOCAL_SRC_FILES_mips64 += $(libm_mips_arch_files) # ----------------------------------------------------------------------------- LOCAL_SRC_FILES_x86 += \ i387/fenv.c \ - upstream-freebsd/lib/msun/src/s_fma.c \ - upstream-freebsd/lib/msun/src/s_fmaf.c \ - upstream-freebsd/lib/msun/src/s_llrint.c \ - upstream-freebsd/lib/msun/src/s_llrintf.c \ - upstream-freebsd/lib/msun/src/s_lrint.c \ - upstream-freebsd/lib/msun/src/s_lrintf.c \ - upstream-freebsd/lib/msun/src/s_rint.c \ - upstream-freebsd/lib/msun/src/s_rintf.c \ x86/sqrt.S \ x86/sqrtf.S \ x86/e_acos.S \ @@ -400,6 +360,28 @@ LOCAL_SRC_FILES_x86 += \ x86/s_tanh.S \ x86/s_tan.S \ +LOCAL_SRC_FILES_EXCLUDE_x86 += \ + upstream-freebsd/lib/msun/src/e_acos.c \ + upstream-freebsd/lib/msun/src/e_asin.c \ + upstream-freebsd/lib/msun/src/e_atan2.c \ + upstream-freebsd/lib/msun/src/e_cosh.c \ + upstream-freebsd/lib/msun/src/e_exp.c \ + upstream-freebsd/lib/msun/src/e_hypot.c \ + upstream-freebsd/lib/msun/src/e_log.c \ + upstream-freebsd/lib/msun/src/e_log10.c \ + upstream-freebsd/lib/msun/src/e_pow.c \ + upstream-freebsd/lib/msun/src/e_sinh.c \ + upstream-freebsd/lib/msun/src/e_sqrt.c \ + upstream-freebsd/lib/msun/src/e_sqrtf.c \ + upstream-freebsd/lib/msun/src/s_atan.c \ + upstream-freebsd/lib/msun/src/s_cbrt.c \ + upstream-freebsd/lib/msun/src/s_cos.c \ + upstream-freebsd/lib/msun/src/s_expm1.c \ + upstream-freebsd/lib/msun/src/s_log1p.c \ + upstream-freebsd/lib/msun/src/s_sin.c \ + upstream-freebsd/lib/msun/src/s_tan.c \ + upstream-freebsd/lib/msun/src/s_tanh.c \ + ifeq ($(ARCH_X86_HAVE_SSE4_1),true) LOCAL_SRC_FILES_x86 += \ x86/ceil.S \ @@ -409,8 +391,7 @@ LOCAL_SRC_FILES_x86 += \ x86/trunc.S \ x86/truncf.S \ -else -LOCAL_SRC_FILES_x86 += \ +LOCAL_SRC_FILES_EXCLUDE_x86 += \ upstream-freebsd/lib/msun/src/s_ceil.c \ upstream-freebsd/lib/msun/src/s_ceilf.c \ upstream-freebsd/lib/msun/src/s_floor.c \ @@ -425,14 +406,6 @@ endif # ----------------------------------------------------------------------------- LOCAL_SRC_FILES_x86_64 += \ amd64/fenv.c \ - upstream-freebsd/lib/msun/src/s_fma.c \ - upstream-freebsd/lib/msun/src/s_fmaf.c \ - upstream-freebsd/lib/msun/src/s_llrint.c \ - upstream-freebsd/lib/msun/src/s_llrintf.c \ - upstream-freebsd/lib/msun/src/s_lrint.c \ - upstream-freebsd/lib/msun/src/s_lrintf.c \ - upstream-freebsd/lib/msun/src/s_rint.c \ - upstream-freebsd/lib/msun/src/s_rintf.c \ x86_64/sqrt.S \ x86_64/sqrtf.S \ x86_64/e_acos.S \ @@ -454,6 +427,28 @@ LOCAL_SRC_FILES_x86_64 += \ x86_64/s_tanh.S \ x86_64/s_tan.S \ +LOCAL_SRC_FILES_EXCLUDE_x86_64 += \ + upstream-freebsd/lib/msun/src/e_acos.c \ + upstream-freebsd/lib/msun/src/e_asin.c \ + upstream-freebsd/lib/msun/src/e_atan2.c \ + upstream-freebsd/lib/msun/src/e_cosh.c \ + upstream-freebsd/lib/msun/src/e_exp.c \ + upstream-freebsd/lib/msun/src/e_hypot.c \ + upstream-freebsd/lib/msun/src/e_log.c \ + upstream-freebsd/lib/msun/src/e_log10.c \ + upstream-freebsd/lib/msun/src/e_pow.c \ + upstream-freebsd/lib/msun/src/e_sinh.c \ + upstream-freebsd/lib/msun/src/e_sqrt.c \ + upstream-freebsd/lib/msun/src/e_sqrtf.c \ + upstream-freebsd/lib/msun/src/s_atan.c \ + upstream-freebsd/lib/msun/src/s_cbrt.c \ + upstream-freebsd/lib/msun/src/s_cos.c \ + upstream-freebsd/lib/msun/src/s_expm1.c \ + upstream-freebsd/lib/msun/src/s_log1p.c \ + upstream-freebsd/lib/msun/src/s_sin.c \ + upstream-freebsd/lib/msun/src/s_tan.c \ + upstream-freebsd/lib/msun/src/s_tanh.c \ + ifeq ($(ARCH_X86_HAVE_SSE4_1),true) LOCAL_SRC_FILES_x86_64 += \ x86_64/ceil.S \ @@ -463,8 +458,7 @@ LOCAL_SRC_FILES_x86_64 += \ x86_64/trunc.S \ x86_64/truncf.S \ -else -LOCAL_SRC_FILES_x86_64 += \ +LOCAL_SRC_FILES_EXCLUDE_x86_64 += \ upstream-freebsd/lib/msun/src/s_ceil.c \ upstream-freebsd/lib/msun/src/s_ceilf.c \ upstream-freebsd/lib/msun/src/s_floor.c \