Xiaokang, Qin | d97d1ca | 2012-10-21 02:48:43 +0800 | [diff] [blame] | 1 | ifneq ($(TARGET_USE_PRIVATE_LIBM),true) |
Elliott Hughes | 1e83245 | 2014-07-11 01:24:15 +0000 | [diff] [blame] | 2 | LOCAL_PATH:= $(call my-dir) |
The Android Open Source Project | a27d2ba | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 3 | |
Dan Albert | 12e3f22 | 2014-09-30 16:56:43 -0700 | [diff] [blame] | 4 | bionic_coverage := false |
| 5 | |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 6 | ifneq (,$(filter $(TARGET_ARCH),x86 x86_64)) |
| 7 | # Clang has wrong long double sizes for x86. |
| 8 | libm_clang := false |
| 9 | endif |
The Android Open Source Project | a27d2ba | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 10 | |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 11 | # ----------------------------------------------------------------------------- |
| 12 | # libm.a |
| 13 | # ----------------------------------------------------------------------------- |
| 14 | include $(CLEAR_VARS) |
The Android Open Source Project | 4e468ed | 2008-12-17 18:03:48 -0800 | [diff] [blame] | 15 | |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 16 | LOCAL_MODULE := libm |
| 17 | |
| 18 | LOCAL_SRC_FILES := \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 19 | upstream-freebsd/lib/msun/bsdsrc/b_exp.c \ |
| 20 | upstream-freebsd/lib/msun/bsdsrc/b_log.c \ |
| 21 | upstream-freebsd/lib/msun/bsdsrc/b_tgamma.c \ |
Elliott Hughes | b8ee16f | 2014-11-06 11:16:55 -0800 | [diff] [blame] | 22 | upstream-freebsd/lib/msun/src/catrig.c \ |
| 23 | upstream-freebsd/lib/msun/src/catrigf.c \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 24 | upstream-freebsd/lib/msun/src/e_acos.c \ |
| 25 | upstream-freebsd/lib/msun/src/e_acosf.c \ |
| 26 | upstream-freebsd/lib/msun/src/e_acosh.c \ |
| 27 | upstream-freebsd/lib/msun/src/e_acoshf.c \ |
| 28 | upstream-freebsd/lib/msun/src/e_asin.c \ |
| 29 | upstream-freebsd/lib/msun/src/e_asinf.c \ |
| 30 | upstream-freebsd/lib/msun/src/e_atan2.c \ |
| 31 | upstream-freebsd/lib/msun/src/e_atan2f.c \ |
| 32 | upstream-freebsd/lib/msun/src/e_atanh.c \ |
| 33 | upstream-freebsd/lib/msun/src/e_atanhf.c \ |
| 34 | upstream-freebsd/lib/msun/src/e_cosh.c \ |
| 35 | upstream-freebsd/lib/msun/src/e_coshf.c \ |
| 36 | upstream-freebsd/lib/msun/src/e_exp.c \ |
| 37 | upstream-freebsd/lib/msun/src/e_expf.c \ |
| 38 | upstream-freebsd/lib/msun/src/e_fmod.c \ |
| 39 | upstream-freebsd/lib/msun/src/e_fmodf.c \ |
| 40 | upstream-freebsd/lib/msun/src/e_gamma.c \ |
| 41 | upstream-freebsd/lib/msun/src/e_gammaf.c \ |
| 42 | upstream-freebsd/lib/msun/src/e_gammaf_r.c \ |
| 43 | upstream-freebsd/lib/msun/src/e_gamma_r.c \ |
| 44 | upstream-freebsd/lib/msun/src/e_hypot.c \ |
| 45 | upstream-freebsd/lib/msun/src/e_hypotf.c \ |
| 46 | upstream-freebsd/lib/msun/src/e_j0.c \ |
| 47 | upstream-freebsd/lib/msun/src/e_j0f.c \ |
| 48 | upstream-freebsd/lib/msun/src/e_j1.c \ |
| 49 | upstream-freebsd/lib/msun/src/e_j1f.c \ |
| 50 | upstream-freebsd/lib/msun/src/e_jn.c \ |
| 51 | upstream-freebsd/lib/msun/src/e_jnf.c \ |
| 52 | upstream-freebsd/lib/msun/src/e_lgamma.c \ |
| 53 | upstream-freebsd/lib/msun/src/e_lgammaf.c \ |
| 54 | upstream-freebsd/lib/msun/src/e_lgammaf_r.c \ |
| 55 | upstream-freebsd/lib/msun/src/e_lgamma_r.c \ |
| 56 | upstream-freebsd/lib/msun/src/e_log10.c \ |
| 57 | upstream-freebsd/lib/msun/src/e_log10f.c \ |
| 58 | upstream-freebsd/lib/msun/src/e_log2.c \ |
| 59 | upstream-freebsd/lib/msun/src/e_log2f.c \ |
| 60 | upstream-freebsd/lib/msun/src/e_log.c \ |
| 61 | upstream-freebsd/lib/msun/src/e_logf.c \ |
| 62 | upstream-freebsd/lib/msun/src/e_pow.c \ |
| 63 | upstream-freebsd/lib/msun/src/e_powf.c \ |
| 64 | upstream-freebsd/lib/msun/src/e_remainder.c \ |
| 65 | upstream-freebsd/lib/msun/src/e_remainderf.c \ |
| 66 | upstream-freebsd/lib/msun/src/e_rem_pio2.c \ |
| 67 | upstream-freebsd/lib/msun/src/e_rem_pio2f.c \ |
| 68 | upstream-freebsd/lib/msun/src/e_scalb.c \ |
| 69 | upstream-freebsd/lib/msun/src/e_scalbf.c \ |
| 70 | upstream-freebsd/lib/msun/src/e_sinh.c \ |
| 71 | upstream-freebsd/lib/msun/src/e_sinhf.c \ |
Calin Juravle | 1abc9ff | 2014-04-17 18:17:32 +0100 | [diff] [blame] | 72 | upstream-freebsd/lib/msun/src/imprecise.c \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 73 | upstream-freebsd/lib/msun/src/k_cos.c \ |
| 74 | upstream-freebsd/lib/msun/src/k_cosf.c \ |
| 75 | upstream-freebsd/lib/msun/src/k_exp.c \ |
| 76 | upstream-freebsd/lib/msun/src/k_expf.c \ |
| 77 | upstream-freebsd/lib/msun/src/k_rem_pio2.c \ |
| 78 | upstream-freebsd/lib/msun/src/k_sin.c \ |
| 79 | upstream-freebsd/lib/msun/src/k_sinf.c \ |
| 80 | upstream-freebsd/lib/msun/src/k_tan.c \ |
| 81 | upstream-freebsd/lib/msun/src/k_tanf.c \ |
| 82 | upstream-freebsd/lib/msun/src/s_asinh.c \ |
| 83 | upstream-freebsd/lib/msun/src/s_asinhf.c \ |
| 84 | upstream-freebsd/lib/msun/src/s_atan.c \ |
| 85 | upstream-freebsd/lib/msun/src/s_atanf.c \ |
| 86 | upstream-freebsd/lib/msun/src/s_carg.c \ |
| 87 | upstream-freebsd/lib/msun/src/s_cargf.c \ |
Elliott Hughes | b8ee16f | 2014-11-06 11:16:55 -0800 | [diff] [blame] | 88 | upstream-freebsd/lib/msun/src/s_cargl.c \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 89 | upstream-freebsd/lib/msun/src/s_cbrt.c \ |
| 90 | upstream-freebsd/lib/msun/src/s_cbrtf.c \ |
| 91 | upstream-freebsd/lib/msun/src/s_ccosh.c \ |
| 92 | upstream-freebsd/lib/msun/src/s_ccoshf.c \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 93 | upstream-freebsd/lib/msun/src/s_cexp.c \ |
| 94 | upstream-freebsd/lib/msun/src/s_cexpf.c \ |
| 95 | upstream-freebsd/lib/msun/src/s_cimag.c \ |
| 96 | upstream-freebsd/lib/msun/src/s_cimagf.c \ |
Elliott Hughes | b8ee16f | 2014-11-06 11:16:55 -0800 | [diff] [blame] | 97 | upstream-freebsd/lib/msun/src/s_cimagl.c \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 98 | upstream-freebsd/lib/msun/src/s_conj.c \ |
| 99 | upstream-freebsd/lib/msun/src/s_conjf.c \ |
Elliott Hughes | b8ee16f | 2014-11-06 11:16:55 -0800 | [diff] [blame] | 100 | upstream-freebsd/lib/msun/src/s_conjl.c \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 101 | upstream-freebsd/lib/msun/src/s_copysign.c \ |
| 102 | upstream-freebsd/lib/msun/src/s_copysignf.c \ |
| 103 | upstream-freebsd/lib/msun/src/s_cos.c \ |
| 104 | upstream-freebsd/lib/msun/src/s_cosf.c \ |
| 105 | upstream-freebsd/lib/msun/src/s_cproj.c \ |
| 106 | upstream-freebsd/lib/msun/src/s_cprojf.c \ |
Elliott Hughes | b8ee16f | 2014-11-06 11:16:55 -0800 | [diff] [blame] | 107 | upstream-freebsd/lib/msun/src/s_cprojl.c \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 108 | upstream-freebsd/lib/msun/src/s_creal.c \ |
| 109 | upstream-freebsd/lib/msun/src/s_crealf.c \ |
Elliott Hughes | b8ee16f | 2014-11-06 11:16:55 -0800 | [diff] [blame] | 110 | upstream-freebsd/lib/msun/src/s_creall.c \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 111 | upstream-freebsd/lib/msun/src/s_csinh.c \ |
| 112 | upstream-freebsd/lib/msun/src/s_csinhf.c \ |
| 113 | upstream-freebsd/lib/msun/src/s_csqrt.c \ |
| 114 | upstream-freebsd/lib/msun/src/s_csqrtf.c \ |
Elliott Hughes | b8ee16f | 2014-11-06 11:16:55 -0800 | [diff] [blame] | 115 | upstream-freebsd/lib/msun/src/s_csqrtl.c \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 116 | upstream-freebsd/lib/msun/src/s_ctanh.c \ |
| 117 | upstream-freebsd/lib/msun/src/s_ctanhf.c \ |
| 118 | upstream-freebsd/lib/msun/src/s_erf.c \ |
| 119 | upstream-freebsd/lib/msun/src/s_erff.c \ |
| 120 | upstream-freebsd/lib/msun/src/s_exp2.c \ |
| 121 | upstream-freebsd/lib/msun/src/s_exp2f.c \ |
| 122 | upstream-freebsd/lib/msun/src/s_expm1.c \ |
| 123 | upstream-freebsd/lib/msun/src/s_expm1f.c \ |
| 124 | upstream-freebsd/lib/msun/src/s_fabs.c \ |
| 125 | upstream-freebsd/lib/msun/src/s_fabsf.c \ |
| 126 | upstream-freebsd/lib/msun/src/s_fdim.c \ |
| 127 | upstream-freebsd/lib/msun/src/s_finite.c \ |
| 128 | upstream-freebsd/lib/msun/src/s_finitef.c \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 129 | upstream-freebsd/lib/msun/src/s_fmax.c \ |
| 130 | upstream-freebsd/lib/msun/src/s_fmaxf.c \ |
| 131 | upstream-freebsd/lib/msun/src/s_fmin.c \ |
| 132 | upstream-freebsd/lib/msun/src/s_fminf.c \ |
| 133 | upstream-freebsd/lib/msun/src/s_frexp.c \ |
| 134 | upstream-freebsd/lib/msun/src/s_frexpf.c \ |
| 135 | upstream-freebsd/lib/msun/src/s_ilogb.c \ |
| 136 | upstream-freebsd/lib/msun/src/s_ilogbf.c \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 137 | upstream-freebsd/lib/msun/src/s_llround.c \ |
| 138 | upstream-freebsd/lib/msun/src/s_llroundf.c \ |
| 139 | upstream-freebsd/lib/msun/src/s_log1p.c \ |
| 140 | upstream-freebsd/lib/msun/src/s_log1pf.c \ |
| 141 | upstream-freebsd/lib/msun/src/s_logb.c \ |
| 142 | upstream-freebsd/lib/msun/src/s_logbf.c \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 143 | upstream-freebsd/lib/msun/src/s_lround.c \ |
| 144 | upstream-freebsd/lib/msun/src/s_lroundf.c \ |
| 145 | upstream-freebsd/lib/msun/src/s_modf.c \ |
| 146 | upstream-freebsd/lib/msun/src/s_modff.c \ |
| 147 | upstream-freebsd/lib/msun/src/s_nan.c \ |
| 148 | upstream-freebsd/lib/msun/src/s_nearbyint.c \ |
| 149 | upstream-freebsd/lib/msun/src/s_nextafter.c \ |
| 150 | upstream-freebsd/lib/msun/src/s_nextafterf.c \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 151 | upstream-freebsd/lib/msun/src/s_remquo.c \ |
| 152 | upstream-freebsd/lib/msun/src/s_remquof.c \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 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 \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 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_sinf.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 \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 168 | upstream-freebsd/lib/msun/src/w_cabs.c \ |
| 169 | upstream-freebsd/lib/msun/src/w_cabsf.c \ |
Elliott Hughes | b8ee16f | 2014-11-06 11:16:55 -0800 | [diff] [blame] | 170 | upstream-freebsd/lib/msun/src/w_cabsl.c \ |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 171 | upstream-freebsd/lib/msun/src/w_drem.c \ |
| 172 | upstream-freebsd/lib/msun/src/w_dremf.c \ |
The Android Open Source Project | 4e468ed | 2008-12-17 18:03:48 -0800 | [diff] [blame] | 173 | |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 174 | LOCAL_SRC_FILES_32 += \ |
Elliott Hughes | 20adf52 | 2013-12-19 11:30:51 -0800 | [diff] [blame] | 175 | fake_long_double.c \ |
The Android Open Source Project | 4e468ed | 2008-12-17 18:03:48 -0800 | [diff] [blame] | 176 | |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 177 | LOCAL_SRC_FILES_64 := \ |
Calin Juravle | 4d77c11 | 2014-03-14 17:56:46 +0000 | [diff] [blame] | 178 | upstream-freebsd/lib/msun/src/e_acosl.c \ |
| 179 | upstream-freebsd/lib/msun/src/e_acoshl.c \ |
| 180 | upstream-freebsd/lib/msun/src/e_asinl.c \ |
| 181 | upstream-freebsd/lib/msun/src/e_atan2l.c \ |
| 182 | upstream-freebsd/lib/msun/src/e_atanhl.c \ |
| 183 | upstream-freebsd/lib/msun/src/e_fmodl.c \ |
| 184 | upstream-freebsd/lib/msun/src/e_hypotl.c \ |
Elliott Hughes | 7553185 | 2014-09-18 11:23:58 -0700 | [diff] [blame] | 185 | upstream-freebsd/lib/msun/src/e_lgammal.c \ |
Calin Juravle | 4d77c11 | 2014-03-14 17:56:46 +0000 | [diff] [blame] | 186 | upstream-freebsd/lib/msun/src/e_remainderl.c \ |
| 187 | upstream-freebsd/lib/msun/src/e_sqrtl.c \ |
| 188 | upstream-freebsd/lib/msun/src/s_asinhl.c \ |
| 189 | upstream-freebsd/lib/msun/src/s_atanl.c \ |
| 190 | upstream-freebsd/lib/msun/src/s_cbrtl.c \ |
| 191 | upstream-freebsd/lib/msun/src/s_ceill.c \ |
| 192 | upstream-freebsd/lib/msun/src/s_copysignl.c \ |
Elliott Hughes | c729d4f | 2014-09-12 16:09:40 -0700 | [diff] [blame] | 193 | upstream-freebsd/lib/msun/src/e_coshl.c \ |
Calin Juravle | 4d77c11 | 2014-03-14 17:56:46 +0000 | [diff] [blame] | 194 | upstream-freebsd/lib/msun/src/s_cosl.c \ |
| 195 | upstream-freebsd/lib/msun/src/s_fabsl.c \ |
| 196 | upstream-freebsd/lib/msun/src/s_floorl.c \ |
| 197 | upstream-freebsd/lib/msun/src/s_fmal.c \ |
| 198 | upstream-freebsd/lib/msun/src/s_fmaxl.c \ |
| 199 | upstream-freebsd/lib/msun/src/s_fminl.c \ |
| 200 | upstream-freebsd/lib/msun/src/s_modfl.c \ |
| 201 | upstream-freebsd/lib/msun/src/s_frexpl.c \ |
| 202 | upstream-freebsd/lib/msun/src/s_ilogbl.c \ |
| 203 | upstream-freebsd/lib/msun/src/s_llrintl.c \ |
| 204 | upstream-freebsd/lib/msun/src/s_llroundl.c \ |
| 205 | upstream-freebsd/lib/msun/src/s_logbl.c \ |
| 206 | upstream-freebsd/lib/msun/src/s_lrintl.c \ |
| 207 | upstream-freebsd/lib/msun/src/s_lroundl.c \ |
| 208 | upstream-freebsd/lib/msun/src/s_nextafterl.c \ |
| 209 | upstream-freebsd/lib/msun/src/s_nexttoward.c \ |
Calin Juravle | 1abc9ff | 2014-04-17 18:17:32 +0100 | [diff] [blame] | 210 | upstream-freebsd/lib/msun/src/s_nexttowardf.c \ |
Calin Juravle | 4d77c11 | 2014-03-14 17:56:46 +0000 | [diff] [blame] | 211 | upstream-freebsd/lib/msun/src/s_remquol.c \ |
| 212 | upstream-freebsd/lib/msun/src/s_rintl.c \ |
| 213 | upstream-freebsd/lib/msun/src/s_roundl.c \ |
| 214 | upstream-freebsd/lib/msun/src/s_scalbnl.c \ |
Elliott Hughes | c729d4f | 2014-09-12 16:09:40 -0700 | [diff] [blame] | 215 | upstream-freebsd/lib/msun/src/e_sinhl.c \ |
Calin Juravle | 4d77c11 | 2014-03-14 17:56:46 +0000 | [diff] [blame] | 216 | upstream-freebsd/lib/msun/src/s_sinl.c \ |
Elliott Hughes | c729d4f | 2014-09-12 16:09:40 -0700 | [diff] [blame] | 217 | upstream-freebsd/lib/msun/src/s_tanhl.c \ |
Calin Juravle | 4d77c11 | 2014-03-14 17:56:46 +0000 | [diff] [blame] | 218 | upstream-freebsd/lib/msun/src/s_tanl.c \ |
| 219 | upstream-freebsd/lib/msun/src/s_truncl.c \ |
| 220 | |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 221 | LOCAL_SRC_FILES_64 += \ |
Calin Juravle | 4d77c11 | 2014-03-14 17:56:46 +0000 | [diff] [blame] | 222 | upstream-freebsd/lib/msun/ld128/invtrig.c \ |
Elliott Hughes | 7553185 | 2014-09-18 11:23:58 -0700 | [diff] [blame] | 223 | upstream-freebsd/lib/msun/ld128/e_lgammal_r.c \ |
Calin Juravle | 4d77c11 | 2014-03-14 17:56:46 +0000 | [diff] [blame] | 224 | upstream-freebsd/lib/msun/ld128/k_cosl.c \ |
| 225 | upstream-freebsd/lib/msun/ld128/k_sinl.c \ |
| 226 | upstream-freebsd/lib/msun/ld128/k_tanl.c \ |
Elliott Hughes | 460ad74 | 2014-09-12 14:00:02 -0700 | [diff] [blame] | 227 | upstream-freebsd/lib/msun/ld128/s_erfl.c \ |
Calin Juravle | 4d77c11 | 2014-03-14 17:56:46 +0000 | [diff] [blame] | 228 | upstream-freebsd/lib/msun/ld128/s_exp2l.c \ |
| 229 | upstream-freebsd/lib/msun/ld128/s_expl.c \ |
| 230 | upstream-freebsd/lib/msun/ld128/s_logl.c \ |
| 231 | upstream-freebsd/lib/msun/ld128/s_nanl.c \ |
The Android Open Source Project | 4e468ed | 2008-12-17 18:03:48 -0800 | [diff] [blame] | 232 | |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 233 | # TODO: this comes from from upstream's libc, not libm, but it's an |
| 234 | # implementation detail that should have hidden visibility, so it needs |
| 235 | # to be in whatever library the math code is in. |
| 236 | LOCAL_SRC_FILES += \ |
| 237 | digittoint.c \ |
The Android Open Source Project | 4e468ed | 2008-12-17 18:03:48 -0800 | [diff] [blame] | 238 | |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 239 | # Functionality not in the BSDs. |
| 240 | LOCAL_SRC_FILES += \ |
| 241 | significandl.c \ |
| 242 | sincos.c \ |
| 243 | |
| 244 | # Modified versions of BSD code. |
| 245 | LOCAL_SRC_FILES += \ |
| 246 | signbit.c \ |
| 247 | |
Amaury Le Leyzour | 32936c8 | 2015-02-17 15:05:51 -0800 | [diff] [blame] | 248 | # Arch specific optimizations. |
| 249 | |
| 250 | # ----------------------------------------------------------------------------- |
| 251 | # arm |
| 252 | # ----------------------------------------------------------------------------- |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 253 | LOCAL_SRC_FILES_arm += \ |
| 254 | arm/fenv.c \ |
Amaury Le Leyzour | 32936c8 | 2015-02-17 15:05:51 -0800 | [diff] [blame] | 255 | upstream-freebsd/lib/msun/src/s_ceil.c \ |
| 256 | upstream-freebsd/lib/msun/src/s_ceilf.c \ |
| 257 | upstream-freebsd/lib/msun/src/s_fma.c \ |
| 258 | upstream-freebsd/lib/msun/src/s_fmaf.c \ |
| 259 | upstream-freebsd/lib/msun/src/s_floorf.c \ |
| 260 | upstream-freebsd/lib/msun/src/s_llrint.c \ |
| 261 | upstream-freebsd/lib/msun/src/s_llrintf.c \ |
| 262 | upstream-freebsd/lib/msun/src/s_lrint.c \ |
| 263 | upstream-freebsd/lib/msun/src/s_lrintf.c \ |
| 264 | upstream-freebsd/lib/msun/src/s_rint.c \ |
| 265 | upstream-freebsd/lib/msun/src/s_rintf.c \ |
| 266 | upstream-freebsd/lib/msun/src/s_trunc.c \ |
| 267 | upstream-freebsd/lib/msun/src/s_truncf.c \ |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 268 | |
Shu Zhang | 3a629af | 2014-07-23 16:59:22 +0800 | [diff] [blame] | 269 | # s_floor.S requires neon instructions. |
| 270 | ifdef TARGET_2ND_ARCH |
| 271 | arch_variant := $(TARGET_2ND_ARCH_VARIANT) |
| 272 | else |
| 273 | arch_variant := $(TARGET_ARCH_VARIANT) |
| 274 | endif |
| 275 | |
| 276 | # Use the C version on armv7-a since it doesn't support neon instructions. |
| 277 | ifeq ($(arch_variant),armv7-a) |
Shu Zhang | c78fa26 | 2014-07-23 17:21:55 +0800 | [diff] [blame] | 278 | LOCAL_SRC_FILES_arm += \ |
| 279 | upstream-freebsd/lib/msun/src/e_sqrt.c \ |
| 280 | upstream-freebsd/lib/msun/src/e_sqrtf.c \ |
| 281 | upstream-freebsd/lib/msun/src/s_floor.c \ |
| 282 | |
Shu Zhang | 3a629af | 2014-07-23 16:59:22 +0800 | [diff] [blame] | 283 | else |
Shu Zhang | c78fa26 | 2014-07-23 17:21:55 +0800 | [diff] [blame] | 284 | LOCAL_SRC_FILES_arm += \ |
| 285 | arm/e_sqrt.S \ |
| 286 | arm/e_sqrtf.S \ |
| 287 | arm/s_floor.S \ |
| 288 | |
Shu Zhang | 3a629af | 2014-07-23 16:59:22 +0800 | [diff] [blame] | 289 | endif |
| 290 | |
Amaury Le Leyzour | 32936c8 | 2015-02-17 15:05:51 -0800 | [diff] [blame] | 291 | # ----------------------------------------------------------------------------- |
| 292 | # arm64 |
| 293 | # ----------------------------------------------------------------------------- |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 294 | LOCAL_SRC_FILES_arm64 += \ |
Amaury Le Leyzour | 32936c8 | 2015-02-17 15:05:51 -0800 | [diff] [blame] | 295 | arm64/ceil.S \ |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 296 | arm64/fenv.c \ |
Amaury Le Leyzour | 32936c8 | 2015-02-17 15:05:51 -0800 | [diff] [blame] | 297 | arm64/fma.S \ |
| 298 | arm64/floor.S \ |
| 299 | arm64/lrint.S \ |
| 300 | arm64/rint.S \ |
| 301 | arm64/sqrt.S \ |
| 302 | arm64/trunc.S \ |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 303 | |
Amaury Le Leyzour | 32936c8 | 2015-02-17 15:05:51 -0800 | [diff] [blame] | 304 | # ----------------------------------------------------------------------------- |
| 305 | # mips |
| 306 | # ----------------------------------------------------------------------------- |
| 307 | libm_mips_arch_files := \ |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 308 | mips/fenv.c \ |
Amaury Le Leyzour | 32936c8 | 2015-02-17 15:05:51 -0800 | [diff] [blame] | 309 | upstream-freebsd/lib/msun/src/e_sqrt.c \ |
| 310 | upstream-freebsd/lib/msun/src/e_sqrtf.c \ |
| 311 | upstream-freebsd/lib/msun/src/s_ceil.c \ |
| 312 | upstream-freebsd/lib/msun/src/s_ceilf.c \ |
| 313 | upstream-freebsd/lib/msun/src/s_fma.c \ |
| 314 | upstream-freebsd/lib/msun/src/s_fmaf.c \ |
Shu Zhang | 3a629af | 2014-07-23 16:59:22 +0800 | [diff] [blame] | 315 | upstream-freebsd/lib/msun/src/s_floor.c \ |
Amaury Le Leyzour | 32936c8 | 2015-02-17 15:05:51 -0800 | [diff] [blame] | 316 | upstream-freebsd/lib/msun/src/s_floorf.c \ |
| 317 | upstream-freebsd/lib/msun/src/s_llrint.c \ |
| 318 | upstream-freebsd/lib/msun/src/s_llrintf.c \ |
| 319 | upstream-freebsd/lib/msun/src/s_lrint.c \ |
| 320 | upstream-freebsd/lib/msun/src/s_lrintf.c \ |
| 321 | upstream-freebsd/lib/msun/src/s_rint.c \ |
| 322 | upstream-freebsd/lib/msun/src/s_rintf.c \ |
| 323 | upstream-freebsd/lib/msun/src/s_trunc.c \ |
| 324 | upstream-freebsd/lib/msun/src/s_truncf.c \ |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 325 | |
Amaury Le Leyzour | 32936c8 | 2015-02-17 15:05:51 -0800 | [diff] [blame] | 326 | LOCAL_SRC_FILES_mips += $(libm_mips_arch_files) |
| 327 | LOCAL_SRC_FILES_mips64 += $(libm_mips_arch_files) |
Duane Sand | 3d535d2 | 2015-02-11 12:51:42 -0800 | [diff] [blame] | 328 | |
Amaury Le Leyzour | 32936c8 | 2015-02-17 15:05:51 -0800 | [diff] [blame] | 329 | # ----------------------------------------------------------------------------- |
| 330 | # x86 |
| 331 | # ----------------------------------------------------------------------------- |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 332 | LOCAL_SRC_FILES_x86 += \ |
| 333 | i387/fenv.c \ |
Amaury Le Leyzour | 32936c8 | 2015-02-17 15:05:51 -0800 | [diff] [blame] | 334 | upstream-freebsd/lib/msun/src/s_fma.c \ |
| 335 | upstream-freebsd/lib/msun/src/s_fmaf.c \ |
Amaury Le Leyzour | 32936c8 | 2015-02-17 15:05:51 -0800 | [diff] [blame] | 336 | upstream-freebsd/lib/msun/src/s_llrint.c \ |
| 337 | upstream-freebsd/lib/msun/src/s_llrintf.c \ |
| 338 | upstream-freebsd/lib/msun/src/s_lrint.c \ |
| 339 | upstream-freebsd/lib/msun/src/s_lrintf.c \ |
| 340 | upstream-freebsd/lib/msun/src/s_rint.c \ |
| 341 | upstream-freebsd/lib/msun/src/s_rintf.c \ |
James Rose | 45789b6 | 2014-11-12 12:05:54 -0700 | [diff] [blame^] | 342 | x86/sqrt.S \ |
| 343 | x86/sqrtf.S \ |
| 344 | |
| 345 | ifeq ($(ARCH_X86_HAVE_SSE4_1),true) |
| 346 | LOCAL_SRC_FILES_x86 += \ |
| 347 | x86/ceil.S \ |
| 348 | x86/ceilf.S \ |
| 349 | x86/floor.S \ |
| 350 | x86/floorf.S \ |
| 351 | x86/trunc.S \ |
| 352 | x86/truncf.S \ |
| 353 | |
| 354 | else |
| 355 | LOCAL_SRC_FILES_x86 += \ |
| 356 | upstream-freebsd/lib/msun/src/s_ceil.c \ |
| 357 | upstream-freebsd/lib/msun/src/s_ceilf.c \ |
| 358 | upstream-freebsd/lib/msun/src/s_floor.c \ |
| 359 | upstream-freebsd/lib/msun/src/s_floorf.c \ |
Amaury Le Leyzour | 32936c8 | 2015-02-17 15:05:51 -0800 | [diff] [blame] | 360 | upstream-freebsd/lib/msun/src/s_trunc.c \ |
| 361 | upstream-freebsd/lib/msun/src/s_truncf.c \ |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 362 | |
James Rose | 45789b6 | 2014-11-12 12:05:54 -0700 | [diff] [blame^] | 363 | endif |
| 364 | |
Amaury Le Leyzour | 32936c8 | 2015-02-17 15:05:51 -0800 | [diff] [blame] | 365 | # ----------------------------------------------------------------------------- |
| 366 | # x86_64 |
| 367 | # ----------------------------------------------------------------------------- |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 368 | LOCAL_SRC_FILES_x86_64 += \ |
| 369 | amd64/fenv.c \ |
Amaury Le Leyzour | 32936c8 | 2015-02-17 15:05:51 -0800 | [diff] [blame] | 370 | upstream-freebsd/lib/msun/src/s_fma.c \ |
| 371 | upstream-freebsd/lib/msun/src/s_fmaf.c \ |
Amaury Le Leyzour | 32936c8 | 2015-02-17 15:05:51 -0800 | [diff] [blame] | 372 | upstream-freebsd/lib/msun/src/s_llrint.c \ |
| 373 | upstream-freebsd/lib/msun/src/s_llrintf.c \ |
| 374 | upstream-freebsd/lib/msun/src/s_lrint.c \ |
| 375 | upstream-freebsd/lib/msun/src/s_lrintf.c \ |
| 376 | upstream-freebsd/lib/msun/src/s_rint.c \ |
| 377 | upstream-freebsd/lib/msun/src/s_rintf.c \ |
James Rose | 45789b6 | 2014-11-12 12:05:54 -0700 | [diff] [blame^] | 378 | x86_64/sqrt.S \ |
| 379 | x86_64/sqrtf.S \ |
| 380 | |
| 381 | ifeq ($(ARCH_X86_HAVE_SSE4_1),true) |
| 382 | LOCAL_SRC_FILES_x86_64 += \ |
| 383 | x86_64/ceil.S \ |
| 384 | x86_64/ceilf.S \ |
| 385 | x86_64/floor.S \ |
| 386 | x86_64/floorf.S \ |
| 387 | x86_64/trunc.S \ |
| 388 | x86_64/truncf.S \ |
| 389 | |
| 390 | else |
| 391 | LOCAL_SRC_FILES_x86_64 += \ |
| 392 | upstream-freebsd/lib/msun/src/s_ceil.c \ |
| 393 | upstream-freebsd/lib/msun/src/s_ceilf.c \ |
| 394 | upstream-freebsd/lib/msun/src/s_floor.c \ |
| 395 | upstream-freebsd/lib/msun/src/s_floorf.c \ |
Amaury Le Leyzour | 32936c8 | 2015-02-17 15:05:51 -0800 | [diff] [blame] | 396 | upstream-freebsd/lib/msun/src/s_trunc.c \ |
| 397 | upstream-freebsd/lib/msun/src/s_truncf.c \ |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 398 | |
James Rose | 45789b6 | 2014-11-12 12:05:54 -0700 | [diff] [blame^] | 399 | endif |
| 400 | |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 401 | LOCAL_C_INCLUDES_x86 += $(LOCAL_PATH)/i387 |
| 402 | |
| 403 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/upstream-freebsd/lib/msun/src/ |
| 404 | LOCAL_C_INCLUDES_64 += $(LOCAL_PATH)/upstream-freebsd/lib/msun/ld128/ |
| 405 | |
| 406 | LOCAL_CLANG := $(libm_clang) |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 407 | LOCAL_ARM_MODE := arm |
| 408 | LOCAL_CFLAGS := \ |
Elliott Hughes | ab61eb3 | 2013-11-20 16:09:06 -0800 | [diff] [blame] | 409 | -DFLT_EVAL_METHOD=0 \ |
Elliott Hughes | ab61eb3 | 2013-11-20 16:09:06 -0800 | [diff] [blame] | 410 | -include $(LOCAL_PATH)/freebsd-compat.h \ |
Elliott Hughes | 9a5a3e8 | 2014-05-05 20:28:28 -0700 | [diff] [blame] | 411 | -Wno-missing-braces \ |
| 412 | -Wno-parentheses \ |
| 413 | -Wno-sign-compare \ |
| 414 | -Wno-uninitialized \ |
Elliott Hughes | 1e83245 | 2014-07-11 01:24:15 +0000 | [diff] [blame] | 415 | -Wno-unknown-pragmas \ |
Elliott Hughes | de9ac71 | 2014-05-19 16:58:52 -0700 | [diff] [blame] | 416 | -fvisibility=hidden \ |
Elliott Hughes | ab61eb3 | 2013-11-20 16:09:06 -0800 | [diff] [blame] | 417 | |
Shu Zhang | 3a629af | 2014-07-23 16:59:22 +0800 | [diff] [blame] | 418 | LOCAL_ASFLAGS := \ |
| 419 | -Ibionic/libc \ |
| 420 | |
Ben Cheng | ff00dc8 | 2014-05-29 16:02:09 -0700 | [diff] [blame] | 421 | # Workaround the GCC "(long)fn -> lfn" optimization bug which will result in |
| 422 | # self recursions for lrint, lrintf, and lrintl. |
| 423 | # BUG: 14225968 |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 424 | LOCAL_CFLAGS += \ |
| 425 | -fno-builtin-rint \ |
| 426 | -fno-builtin-rintf \ |
| 427 | -fno-builtin-rintl \ |
Ben Cheng | ff00dc8 | 2014-05-29 16:02:09 -0700 | [diff] [blame] | 428 | |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 429 | LOCAL_CONLY_FLAGS := \ |
| 430 | -std=c99 \ |
Ying Wang | 609526f | 2014-01-27 14:59:26 -0800 | [diff] [blame] | 431 | |
Dan Albert | 12e3f22 | 2014-09-30 16:56:43 -0700 | [diff] [blame] | 432 | LOCAL_NATIVE_COVERAGE := $(bionic_coverage) |
Dan Albert | da19478 | 2014-12-18 08:03:49 -0800 | [diff] [blame] | 433 | LOCAL_ADDRESS_SANITIZER := false |
The Android Open Source Project | a27d2ba | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 434 | include $(BUILD_STATIC_LIBRARY) |
| 435 | |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 436 | # ----------------------------------------------------------------------------- |
| 437 | # libm.so |
| 438 | # ----------------------------------------------------------------------------- |
The Android Open Source Project | a27d2ba | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 439 | include $(CLEAR_VARS) |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 440 | |
| 441 | LOCAL_MODULE := libm |
| 442 | LOCAL_CLANG := $(libm_clang) |
The Android Open Source Project | a27d2ba | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 443 | LOCAL_SYSTEM_SHARED_LIBRARIES := libc |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 444 | LOCAL_WHOLE_STATIC_LIBRARIES := libm |
Dan Albert | 71f9b34 | 2014-06-24 04:31:08 +0000 | [diff] [blame] | 445 | |
Dan Albert | 12e3f22 | 2014-09-30 16:56:43 -0700 | [diff] [blame] | 446 | LOCAL_NATIVE_COVERAGE := $(bionic_coverage) |
Dan Albert | da19478 | 2014-12-18 08:03:49 -0800 | [diff] [blame] | 447 | LOCAL_ADDRESS_SANITIZER := false |
Dan Albert | 12e3f22 | 2014-09-30 16:56:43 -0700 | [diff] [blame] | 448 | |
Dan Albert | e91d9cd | 2014-10-16 07:44:47 -0700 | [diff] [blame] | 449 | LOCAL_CXX_STL := none |
| 450 | |
Dan Albert | 71f9b34 | 2014-06-24 04:31:08 +0000 | [diff] [blame] | 451 | # We'd really like to do this for all architectures, but since this wasn't done |
| 452 | # before, these symbols must continue to be exported on LP32 for binary |
| 453 | # compatibility. |
Christopher Ferris | d40d1a0 | 2015-01-22 17:16:33 -0800 | [diff] [blame] | 454 | LOCAL_LDFLAGS_64 := -Wl,--exclude-libs,libgcc.a |
| 455 | |
The Android Open Source Project | a27d2ba | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 456 | include $(BUILD_SHARED_LIBRARY) |
Xiaokang, Qin | d97d1ca | 2012-10-21 02:48:43 +0800 | [diff] [blame] | 457 | endif |