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