1bionic_coverage = false 2 3// 4// libm.so and libm.a for target. 5// 6cc_library { 7 name: "libm", 8 defaults: ["linux_bionic_supported"], 9 recovery_available: true, 10 static_ndk_lib: true, 11 12 whole_static_libs: ["libarm-optimized-routines"], 13 14 srcs: [ 15 "upstream-freebsd/lib/msun/bsdsrc/b_exp.c", 16 "upstream-freebsd/lib/msun/bsdsrc/b_log.c", 17 "upstream-freebsd/lib/msun/bsdsrc/b_tgamma.c", 18 "upstream-freebsd/lib/msun/src/catrig.c", 19 "upstream-freebsd/lib/msun/src/catrigf.c", 20 "upstream-freebsd/lib/msun/src/e_acos.c", 21 "upstream-freebsd/lib/msun/src/e_acosf.c", 22 "upstream-freebsd/lib/msun/src/e_acosh.c", 23 "upstream-freebsd/lib/msun/src/e_acoshf.c", 24 "upstream-freebsd/lib/msun/src/e_asin.c", 25 "upstream-freebsd/lib/msun/src/e_asinf.c", 26 "upstream-freebsd/lib/msun/src/e_atan2.c", 27 "upstream-freebsd/lib/msun/src/e_atan2f.c", 28 "upstream-freebsd/lib/msun/src/e_atanh.c", 29 "upstream-freebsd/lib/msun/src/e_atanhf.c", 30 "upstream-freebsd/lib/msun/src/e_cosh.c", 31 "upstream-freebsd/lib/msun/src/e_coshf.c", 32 "upstream-freebsd/lib/msun/src/e_fmod.c", 33 "upstream-freebsd/lib/msun/src/e_fmodf.c", 34 "upstream-freebsd/lib/msun/src/e_gamma.c", 35 "upstream-freebsd/lib/msun/src/e_gammaf.c", 36 "upstream-freebsd/lib/msun/src/e_gammaf_r.c", 37 "upstream-freebsd/lib/msun/src/e_gamma_r.c", 38 "upstream-freebsd/lib/msun/src/e_hypot.c", 39 "upstream-freebsd/lib/msun/src/e_hypotf.c", 40 "upstream-freebsd/lib/msun/src/e_j0.c", 41 "upstream-freebsd/lib/msun/src/e_j0f.c", 42 "upstream-freebsd/lib/msun/src/e_j1.c", 43 "upstream-freebsd/lib/msun/src/e_j1f.c", 44 "upstream-freebsd/lib/msun/src/e_jn.c", 45 "upstream-freebsd/lib/msun/src/e_jnf.c", 46 "upstream-freebsd/lib/msun/src/e_lgamma.c", 47 "upstream-freebsd/lib/msun/src/e_lgammaf.c", 48 "upstream-freebsd/lib/msun/src/e_lgammaf_r.c", 49 "upstream-freebsd/lib/msun/src/e_lgamma_r.c", 50 "upstream-freebsd/lib/msun/src/e_log10.c", 51 "upstream-freebsd/lib/msun/src/e_log10f.c", 52 "upstream-freebsd/lib/msun/src/e_remainder.c", 53 "upstream-freebsd/lib/msun/src/e_remainderf.c", 54 "upstream-freebsd/lib/msun/src/e_rem_pio2.c", 55 "upstream-freebsd/lib/msun/src/e_rem_pio2f.c", 56 "upstream-freebsd/lib/msun/src/e_scalb.c", 57 "upstream-freebsd/lib/msun/src/e_scalbf.c", 58 "upstream-freebsd/lib/msun/src/e_sinh.c", 59 "upstream-freebsd/lib/msun/src/e_sinhf.c", 60 "upstream-freebsd/lib/msun/src/e_sqrt.c", 61 "upstream-freebsd/lib/msun/src/e_sqrtf.c", 62 "upstream-freebsd/lib/msun/src/k_cos.c", 63 "upstream-freebsd/lib/msun/src/k_cosf.c", 64 "upstream-freebsd/lib/msun/src/k_exp.c", 65 "upstream-freebsd/lib/msun/src/k_expf.c", 66 "upstream-freebsd/lib/msun/src/k_rem_pio2.c", 67 "upstream-freebsd/lib/msun/src/k_sin.c", 68 "upstream-freebsd/lib/msun/src/k_sinf.c", 69 "upstream-freebsd/lib/msun/src/k_tan.c", 70 "upstream-freebsd/lib/msun/src/k_tanf.c", 71 "upstream-freebsd/lib/msun/src/s_asinh.c", 72 "upstream-freebsd/lib/msun/src/s_asinhf.c", 73 "upstream-freebsd/lib/msun/src/s_atan.c", 74 "upstream-freebsd/lib/msun/src/s_atanf.c", 75 "upstream-freebsd/lib/msun/src/s_carg.c", 76 "upstream-freebsd/lib/msun/src/s_cargf.c", 77 "upstream-freebsd/lib/msun/src/s_cargl.c", 78 "upstream-freebsd/lib/msun/src/s_cbrt.c", 79 "upstream-freebsd/lib/msun/src/s_cbrtf.c", 80 "upstream-freebsd/lib/msun/src/s_ccosh.c", 81 "upstream-freebsd/lib/msun/src/s_ccoshf.c", 82 "upstream-freebsd/lib/msun/src/s_ceil.c", 83 "upstream-freebsd/lib/msun/src/s_ceilf.c", 84 "upstream-freebsd/lib/msun/src/s_cexp.c", 85 "upstream-freebsd/lib/msun/src/s_cexpf.c", 86 "upstream-freebsd/lib/msun/src/s_cimag.c", 87 "upstream-freebsd/lib/msun/src/s_cimagf.c", 88 "upstream-freebsd/lib/msun/src/s_cimagl.c", 89 "upstream-freebsd/lib/msun/src/s_clog.c", 90 "upstream-freebsd/lib/msun/src/s_clogf.c", 91 "upstream-freebsd/lib/msun/src/s_conj.c", 92 "upstream-freebsd/lib/msun/src/s_conjf.c", 93 "upstream-freebsd/lib/msun/src/s_conjl.c", 94 "upstream-freebsd/lib/msun/src/s_copysign.c", 95 "upstream-freebsd/lib/msun/src/s_copysignf.c", 96 "upstream-freebsd/lib/msun/src/s_cos.c", 97 "upstream-freebsd/lib/msun/src/s_cpow.c", 98 "upstream-freebsd/lib/msun/src/s_cpowf.c", 99 "upstream-freebsd/lib/msun/src/s_cpowl.c", 100 "upstream-freebsd/lib/msun/src/s_cproj.c", 101 "upstream-freebsd/lib/msun/src/s_cprojf.c", 102 "upstream-freebsd/lib/msun/src/s_cprojl.c", 103 "upstream-freebsd/lib/msun/src/s_creal.c", 104 "upstream-freebsd/lib/msun/src/s_crealf.c", 105 "upstream-freebsd/lib/msun/src/s_creall.c", 106 "upstream-freebsd/lib/msun/src/s_csinh.c", 107 "upstream-freebsd/lib/msun/src/s_csinhf.c", 108 "upstream-freebsd/lib/msun/src/s_csqrt.c", 109 "upstream-freebsd/lib/msun/src/s_csqrtf.c", 110 "upstream-freebsd/lib/msun/src/s_ctanh.c", 111 "upstream-freebsd/lib/msun/src/s_ctanhf.c", 112 "upstream-freebsd/lib/msun/src/s_erf.c", 113 "upstream-freebsd/lib/msun/src/s_erff.c", 114 "upstream-freebsd/lib/msun/src/s_expm1.c", 115 "upstream-freebsd/lib/msun/src/s_expm1f.c", 116 "upstream-freebsd/lib/msun/src/s_fdim.c", 117 "upstream-freebsd/lib/msun/src/s_finite.c", 118 "upstream-freebsd/lib/msun/src/s_finitef.c", 119 "upstream-freebsd/lib/msun/src/s_floor.c", 120 "upstream-freebsd/lib/msun/src/s_floorf.c", 121 "upstream-freebsd/lib/msun/src/s_fma.c", 122 "upstream-freebsd/lib/msun/src/s_fmaf.c", 123 "upstream-freebsd/lib/msun/src/s_fmax.c", 124 "upstream-freebsd/lib/msun/src/s_fmaxf.c", 125 "upstream-freebsd/lib/msun/src/s_fmin.c", 126 "upstream-freebsd/lib/msun/src/s_fminf.c", 127 "upstream-freebsd/lib/msun/src/s_frexp.c", 128 "upstream-freebsd/lib/msun/src/s_frexpf.c", 129 "upstream-freebsd/lib/msun/src/s_ilogb.c", 130 "upstream-freebsd/lib/msun/src/s_ilogbf.c", 131 "upstream-freebsd/lib/msun/src/s_llrint.c", 132 "upstream-freebsd/lib/msun/src/s_llrintf.c", 133 "upstream-freebsd/lib/msun/src/s_llround.c", 134 "upstream-freebsd/lib/msun/src/s_llroundf.c", 135 "upstream-freebsd/lib/msun/src/s_log1p.c", 136 "upstream-freebsd/lib/msun/src/s_log1pf.c", 137 "upstream-freebsd/lib/msun/src/s_logb.c", 138 "upstream-freebsd/lib/msun/src/s_logbf.c", 139 "upstream-freebsd/lib/msun/src/s_lrint.c", 140 "upstream-freebsd/lib/msun/src/s_lrintf.c", 141 "upstream-freebsd/lib/msun/src/s_lround.c", 142 "upstream-freebsd/lib/msun/src/s_lroundf.c", 143 "upstream-freebsd/lib/msun/src/s_modf.c", 144 "upstream-freebsd/lib/msun/src/s_modff.c", 145 "upstream-freebsd/lib/msun/src/s_nan.c", 146 "upstream-freebsd/lib/msun/src/s_nearbyint.c", 147 "upstream-freebsd/lib/msun/src/s_nextafter.c", 148 "upstream-freebsd/lib/msun/src/s_nextafterf.c", 149 "upstream-freebsd/lib/msun/src/s_remquo.c", 150 "upstream-freebsd/lib/msun/src/s_remquof.c", 151 "upstream-freebsd/lib/msun/src/s_rint.c", 152 "upstream-freebsd/lib/msun/src/s_rintf.c", 153 "upstream-freebsd/lib/msun/src/s_round.c", 154 "upstream-freebsd/lib/msun/src/s_roundf.c", 155 "upstream-freebsd/lib/msun/src/s_scalbln.c", 156 "upstream-freebsd/lib/msun/src/s_scalbn.c", 157 "upstream-freebsd/lib/msun/src/s_scalbnf.c", 158 "upstream-freebsd/lib/msun/src/s_signgam.c", 159 "upstream-freebsd/lib/msun/src/s_significand.c", 160 "upstream-freebsd/lib/msun/src/s_significandf.c", 161 "upstream-freebsd/lib/msun/src/s_sin.c", 162 "upstream-freebsd/lib/msun/src/s_sincos.c", 163 "upstream-freebsd/lib/msun/src/s_tan.c", 164 "upstream-freebsd/lib/msun/src/s_tanf.c", 165 "upstream-freebsd/lib/msun/src/s_tanh.c", 166 "upstream-freebsd/lib/msun/src/s_tanhf.c", 167 "upstream-freebsd/lib/msun/src/s_tgammaf.c", 168 "upstream-freebsd/lib/msun/src/s_trunc.c", 169 "upstream-freebsd/lib/msun/src/s_truncf.c", 170 "upstream-freebsd/lib/msun/src/w_cabs.c", 171 "upstream-freebsd/lib/msun/src/w_cabsf.c", 172 "upstream-freebsd/lib/msun/src/w_cabsl.c", 173 "upstream-freebsd/lib/msun/src/w_drem.c", 174 "upstream-freebsd/lib/msun/src/w_dremf.c", 175 176 // The FreeBSD complex functions appear to be better, but they're incomplete. 177 // We take the FreeBSD implementations when they exist, but fill out the rest 178 // of <complex.h> from NetBSD... 179 "upstream-netbsd/lib/libm/complex/ccoshl.c", 180 "upstream-netbsd/lib/libm/complex/ccosl.c", 181 "upstream-netbsd/lib/libm/complex/cephes_subrl.c", 182 "upstream-netbsd/lib/libm/complex/cexpl.c", 183 "upstream-netbsd/lib/libm/complex/csinhl.c", 184 "upstream-netbsd/lib/libm/complex/csinl.c", 185 "upstream-netbsd/lib/libm/complex/ctanhl.c", 186 "upstream-netbsd/lib/libm/complex/ctanl.c", 187 188 // TODO: this comes from from upstream's libc, not libm, but it's an 189 // implementation detail that should have hidden visibility, so it needs 190 // to be in whatever library the math code is in. 191 "digittoint.c", 192 193 // Functionality not in the BSDs. 194 "significandl.c", 195 "fake_long_double.c", 196 197 // Home-grown stuff. 198 "builtins.cpp", 199 "signbit.cpp", 200 ], 201 202 multilib: { 203 lib64: { 204 srcs: [ 205 "upstream-freebsd/lib/msun/src/catrigl.c", 206 "upstream-freebsd/lib/msun/src/e_acosl.c", 207 "upstream-freebsd/lib/msun/src/e_acoshl.c", 208 "upstream-freebsd/lib/msun/src/e_asinl.c", 209 "upstream-freebsd/lib/msun/src/e_atan2l.c", 210 "upstream-freebsd/lib/msun/src/e_atanhl.c", 211 "upstream-freebsd/lib/msun/src/e_fmodl.c", 212 "upstream-freebsd/lib/msun/src/e_hypotl.c", 213 "upstream-freebsd/lib/msun/src/e_lgammal.c", 214 "upstream-freebsd/lib/msun/src/e_remainderl.c", 215 "upstream-freebsd/lib/msun/src/e_sqrtl.c", 216 "upstream-freebsd/lib/msun/src/s_asinhl.c", 217 "upstream-freebsd/lib/msun/src/s_atanl.c", 218 "upstream-freebsd/lib/msun/src/s_cbrtl.c", 219 "upstream-freebsd/lib/msun/src/s_ceill.c", 220 "upstream-freebsd/lib/msun/src/s_clogl.c", 221 "upstream-freebsd/lib/msun/src/s_copysignl.c", 222 "upstream-freebsd/lib/msun/src/e_coshl.c", 223 "upstream-freebsd/lib/msun/src/s_cosl.c", 224 "upstream-freebsd/lib/msun/src/s_csqrtl.c", 225 "upstream-freebsd/lib/msun/src/s_floorl.c", 226 "upstream-freebsd/lib/msun/src/s_fmal.c", 227 "upstream-freebsd/lib/msun/src/s_fmaxl.c", 228 "upstream-freebsd/lib/msun/src/s_fminl.c", 229 "upstream-freebsd/lib/msun/src/s_modfl.c", 230 "upstream-freebsd/lib/msun/src/s_frexpl.c", 231 "upstream-freebsd/lib/msun/src/s_ilogbl.c", 232 "upstream-freebsd/lib/msun/src/s_llrintl.c", 233 "upstream-freebsd/lib/msun/src/s_llroundl.c", 234 "upstream-freebsd/lib/msun/src/s_logbl.c", 235 "upstream-freebsd/lib/msun/src/s_lrintl.c", 236 "upstream-freebsd/lib/msun/src/s_lroundl.c", 237 "upstream-freebsd/lib/msun/src/s_nextafterl.c", 238 "upstream-freebsd/lib/msun/src/s_nexttoward.c", 239 "upstream-freebsd/lib/msun/src/s_nexttowardf.c", 240 "upstream-freebsd/lib/msun/src/s_remquol.c", 241 "upstream-freebsd/lib/msun/src/s_rintl.c", 242 "upstream-freebsd/lib/msun/src/s_roundl.c", 243 "upstream-freebsd/lib/msun/src/s_scalbnl.c", 244 "upstream-freebsd/lib/msun/src/s_sincosl.c", 245 "upstream-freebsd/lib/msun/src/e_sinhl.c", 246 "upstream-freebsd/lib/msun/src/s_sinl.c", 247 "upstream-freebsd/lib/msun/src/s_tanhl.c", 248 "upstream-freebsd/lib/msun/src/s_tanl.c", 249 "upstream-freebsd/lib/msun/src/s_truncl.c", 250 251 "upstream-freebsd/lib/msun/ld128/invtrig.c", 252 "upstream-freebsd/lib/msun/ld128/e_lgammal_r.c", 253 "upstream-freebsd/lib/msun/ld128/e_powl.c", 254 "upstream-freebsd/lib/msun/ld128/k_cosl.c", 255 "upstream-freebsd/lib/msun/ld128/k_sinl.c", 256 "upstream-freebsd/lib/msun/ld128/k_tanl.c", 257 "upstream-freebsd/lib/msun/ld128/s_erfl.c", 258 "upstream-freebsd/lib/msun/ld128/s_exp2l.c", 259 "upstream-freebsd/lib/msun/ld128/s_expl.c", 260 "upstream-freebsd/lib/msun/ld128/s_logl.c", 261 "upstream-freebsd/lib/msun/ld128/s_nanl.c", 262 ], 263 local_include_dirs: ["upstream-freebsd/lib/msun/ld128/"], 264 }, 265 }, 266 267 // arch-specific settings 268 arch: { 269 arm: { 270 srcs: [ 271 "arm/fenv.c", 272 ], 273 neon: { 274 srcs: [ 275 "arm/sqrt.S", 276 "arm/floor.S", 277 ], 278 279 exclude_srcs: [ 280 "upstream-freebsd/lib/msun/src/e_sqrt.c", 281 "upstream-freebsd/lib/msun/src/e_sqrtf.c", 282 "upstream-freebsd/lib/msun/src/s_floor.c", 283 ], 284 }, 285 instruction_set: "arm", 286 pack_relocations: false, 287 ldflags: ["-Wl,--hash-style=both"], 288 version_script: ":libm.arm.map", 289 }, 290 291 arm64: { 292 srcs: [ 293 "arm64/fenv.c", 294 "arm64/lrint.S", 295 "arm64/sqrt.S", 296 ], 297 exclude_srcs: [ 298 "upstream-freebsd/lib/msun/src/e_sqrt.c", 299 "upstream-freebsd/lib/msun/src/e_sqrtf.c", 300 "upstream-freebsd/lib/msun/src/s_ceil.c", 301 "upstream-freebsd/lib/msun/src/s_ceilf.c", 302 "upstream-freebsd/lib/msun/src/s_floor.c", 303 "upstream-freebsd/lib/msun/src/s_floorf.c", 304 "upstream-freebsd/lib/msun/src/s_fma.c", 305 "upstream-freebsd/lib/msun/src/s_fmaf.c", 306 "upstream-freebsd/lib/msun/src/s_fmax.c", 307 "upstream-freebsd/lib/msun/src/s_fmaxf.c", 308 "upstream-freebsd/lib/msun/src/s_fmin.c", 309 "upstream-freebsd/lib/msun/src/s_fminf.c", 310 "upstream-freebsd/lib/msun/src/s_llrint.c", 311 "upstream-freebsd/lib/msun/src/s_llrintf.c", 312 "upstream-freebsd/lib/msun/src/s_lrint.c", 313 "upstream-freebsd/lib/msun/src/s_lrintf.c", 314 "upstream-freebsd/lib/msun/src/s_rint.c", 315 "upstream-freebsd/lib/msun/src/s_rintf.c", 316 "upstream-freebsd/lib/msun/src/s_round.c", 317 "upstream-freebsd/lib/msun/src/s_roundf.c", 318 "upstream-freebsd/lib/msun/src/s_trunc.c", 319 "upstream-freebsd/lib/msun/src/s_truncf.c", 320 ], 321 version_script: ":libm.arm64.map", 322 }, 323 324 x86: { 325 srcs: [ 326 "i387/fenv.c", 327 "x86/sqrt.S", 328 "x86/sqrtf.S", 329 "x86/e_acos.S", 330 "x86/e_asin.S", 331 "x86/e_atan2.S", 332 "x86/e_cosh.S", 333 "x86/e_hypot.S", 334 "x86/e_log10.S", 335 "x86/e_sinh.S", 336 "x86/libm_reduce_pi04l.S", 337 "x86/libm_sincos_huge.S", 338 "x86/libm_tancot_huge.S", 339 "x86/lrint.S", 340 "x86/lrintf.S", 341 "x86/s_atan.S", 342 "x86/s_cbrt.S", 343 "x86/s_cos.S", 344 "x86/s_expm1.S", 345 "x86/s_log1p.S", 346 "x86/s_sin.S", 347 "x86/s_tanh.S", 348 "x86/s_tan.S", 349 ], 350 exclude_srcs: [ 351 "upstream-freebsd/lib/msun/src/e_acos.c", 352 "upstream-freebsd/lib/msun/src/e_asin.c", 353 "upstream-freebsd/lib/msun/src/e_atan2.c", 354 "upstream-freebsd/lib/msun/src/e_cosh.c", 355 "upstream-freebsd/lib/msun/src/e_hypot.c", 356 "upstream-freebsd/lib/msun/src/e_log10.c", 357 "upstream-freebsd/lib/msun/src/e_sinh.c", 358 "upstream-freebsd/lib/msun/src/e_sqrt.c", 359 "upstream-freebsd/lib/msun/src/e_sqrtf.c", 360 "upstream-freebsd/lib/msun/src/s_atan.c", 361 "upstream-freebsd/lib/msun/src/s_cbrt.c", 362 "upstream-freebsd/lib/msun/src/s_cos.c", 363 "upstream-freebsd/lib/msun/src/s_expm1.c", 364 "upstream-freebsd/lib/msun/src/s_log1p.c", 365 "upstream-freebsd/lib/msun/src/s_lrint.c", 366 "upstream-freebsd/lib/msun/src/s_lrintf.c", 367 "upstream-freebsd/lib/msun/src/s_sin.c", 368 "upstream-freebsd/lib/msun/src/s_tan.c", 369 "upstream-freebsd/lib/msun/src/s_tanh.c", 370 ], 371 sse4_1: { 372 srcs: [ 373 "x86/ceil.S", 374 "x86/ceilf.S", 375 "x86/floor.S", 376 "x86/floorf.S", 377 "x86/rint.S", 378 "x86/rintf.S", 379 "x86/trunc.S", 380 "x86/truncf.S", 381 ], 382 exclude_srcs: [ 383 "upstream-freebsd/lib/msun/src/s_ceil.c", 384 "upstream-freebsd/lib/msun/src/s_ceilf.c", 385 "upstream-freebsd/lib/msun/src/s_floor.c", 386 "upstream-freebsd/lib/msun/src/s_floorf.c", 387 "upstream-freebsd/lib/msun/src/s_rint.c", 388 "upstream-freebsd/lib/msun/src/s_rintf.c", 389 "upstream-freebsd/lib/msun/src/s_trunc.c", 390 "upstream-freebsd/lib/msun/src/s_truncf.c", 391 ], 392 }, 393 local_include_dirs: ["i387"], 394 pack_relocations: false, 395 ldflags: ["-Wl,--hash-style=both"], 396 version_script: ":libm.x86.map", 397 }, 398 399 x86_64: { 400 srcs: [ 401 "amd64/fenv.c", 402 "x86_64/sqrt.S", 403 "x86_64/sqrtf.S", 404 "x86_64/e_acos.S", 405 "x86_64/e_asin.S", 406 "x86_64/e_atan2.S", 407 "x86_64/e_cosh.S", 408 "x86_64/e_hypot.S", 409 "x86_64/e_log10.S", 410 "x86_64/e_sinh.S", 411 "x86_64/lrint.S", 412 "x86_64/lrintf.S", 413 "x86_64/s_atan.S", 414 "x86_64/s_cbrt.S", 415 "x86_64/s_cos.S", 416 "x86_64/s_expm1.S", 417 "x86_64/s_log1p.S", 418 "x86_64/s_sin.S", 419 "x86_64/s_tanh.S", 420 "x86_64/s_tan.S", 421 ], 422 exclude_srcs: [ 423 "upstream-freebsd/lib/msun/src/e_acos.c", 424 "upstream-freebsd/lib/msun/src/e_asin.c", 425 "upstream-freebsd/lib/msun/src/e_atan2.c", 426 "upstream-freebsd/lib/msun/src/e_cosh.c", 427 "upstream-freebsd/lib/msun/src/e_hypot.c", 428 "upstream-freebsd/lib/msun/src/e_log10.c", 429 "upstream-freebsd/lib/msun/src/e_sinh.c", 430 "upstream-freebsd/lib/msun/src/e_sqrt.c", 431 "upstream-freebsd/lib/msun/src/e_sqrtf.c", 432 "upstream-freebsd/lib/msun/src/s_atan.c", 433 "upstream-freebsd/lib/msun/src/s_cbrt.c", 434 "upstream-freebsd/lib/msun/src/s_cos.c", 435 "upstream-freebsd/lib/msun/src/s_expm1.c", 436 "upstream-freebsd/lib/msun/src/s_log1p.c", 437 "upstream-freebsd/lib/msun/src/s_llrint.c", 438 "upstream-freebsd/lib/msun/src/s_llrintf.c", 439 "upstream-freebsd/lib/msun/src/s_lrint.c", 440 "upstream-freebsd/lib/msun/src/s_lrintf.c", 441 "upstream-freebsd/lib/msun/src/s_sin.c", 442 "upstream-freebsd/lib/msun/src/s_tan.c", 443 "upstream-freebsd/lib/msun/src/s_tanh.c", 444 ], 445 sse4_1: { 446 srcs: [ 447 "x86_64/ceil.S", 448 "x86_64/ceilf.S", 449 "x86_64/floor.S", 450 "x86_64/floorf.S", 451 "x86_64/rint.S", 452 "x86_64/rintf.S", 453 "x86_64/trunc.S", 454 "x86_64/truncf.S", 455 ], 456 exclude_srcs: [ 457 "upstream-freebsd/lib/msun/src/s_ceil.c", 458 "upstream-freebsd/lib/msun/src/s_ceilf.c", 459 "upstream-freebsd/lib/msun/src/s_floor.c", 460 "upstream-freebsd/lib/msun/src/s_floorf.c", 461 "upstream-freebsd/lib/msun/src/s_rint.c", 462 "upstream-freebsd/lib/msun/src/s_rintf.c", 463 "upstream-freebsd/lib/msun/src/s_trunc.c", 464 "upstream-freebsd/lib/msun/src/s_truncf.c", 465 ], 466 }, 467 version_script: ":libm.x86_64.map", 468 }, 469 }, 470 471 local_include_dirs: [ 472 "upstream-freebsd/android/include/", 473 "upstream-freebsd/lib/msun/src/", 474 ], 475 476 cflags: [ 477 "-D__BIONIC_LP32_USE_LONG_DOUBLE", 478 "-D__BIONIC_NO_MATH_INLINES", 479 "-D_BSD_SOURCE", 480 "-DFLT_EVAL_METHOD=0", 481 "-include freebsd-compat.h", 482 "-fno-math-errno", 483 "-Wall", 484 "-Werror", 485 "-Wno-missing-braces", 486 "-Wno-parentheses", 487 "-Wno-sign-compare", 488 "-Wno-unknown-pragmas", 489 "-Wno-unused-const-variable", 490 "-Wno-unused-variable", 491 ], 492 493 ldflags: [ 494 "-Wl,--Bsymbolic-functions", 495 ], 496 497 // b/120614316, non-critical readibility check 498 tidy_checks: ["-cert-dcl16-c"], 499 500 include_dirs: ["bionic/libc"], 501 system_shared_libs: ["libc"], 502 503 native_coverage: bionic_coverage, 504 sanitize: { 505 address: false, 506 coverage: false, 507 integer_overflow: false, 508 }, 509 stl: "none", 510 511 stubs: { 512 symbol_file: "libm.map.txt", 513 versions: ["10000"], 514 }, 515} 516 517ndk_library { 518 name: "libm", 519 symbol_file: "libm.map.txt", 520 first_version: "9", 521} 522 523llndk_library { 524 name: "libm", 525 symbol_file: "libm.map.txt", 526} 527 528genrule { 529 name: "libm.arm.map", 530 out: ["libm.arm.map"], 531 srcs: ["libm.map.txt"], 532 tool_files: [":bionic-generate-version-script"], 533 cmd: "$(location :bionic-generate-version-script) arm $(in) $(out)", 534} 535 536genrule { 537 name: "libm.arm64.map", 538 out: ["libm.arm64.map"], 539 srcs: ["libm.map.txt"], 540 tool_files: [":bionic-generate-version-script"], 541 cmd: "$(location :bionic-generate-version-script) arm64 $(in) $(out)", 542} 543 544genrule { 545 name: "libm.x86.map", 546 out: ["libm.x86.map"], 547 srcs: ["libm.map.txt"], 548 tool_files: [":bionic-generate-version-script"], 549 cmd: "$(location :bionic-generate-version-script) x86 $(in) $(out)", 550} 551 552genrule { 553 name: "libm.x86_64.map", 554 out: ["libm.x86_64.map"], 555 srcs: ["libm.map.txt"], 556 tool_files: [":bionic-generate-version-script"], 557 cmd: "$(location :bionic-generate-version-script) x86_64 $(in) $(out)", 558} 559