1// Copyright (C) 2007 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15cc_library_static { 16 name: "libfdlibm", 17 host_supported: true, 18 19 srcs: [ 20 "k_standard.c", 21 "k_rem_pio2.c", 22 "k_cos.c", 23 "k_sin.c", 24 "k_tan.c", 25 "e_acos.c", 26 "e_acosh.c", 27 "e_asin.c", 28 "e_atan2.c", 29 "e_atanh.c", 30 "e_cosh.c", 31 "e_exp.c", 32 "e_fmod.c", 33 "e_gamma.c", 34 "e_gamma_r.c", 35 "e_hypot.c", 36 "e_j0.c", 37 "e_j1.c", 38 "e_jn.c", 39 "e_lgamma.c", 40 "e_lgamma_r.c", 41 "e_log.c", 42 "e_log10.c", 43 "e_pow.c", 44 "e_rem_pio2.c", 45 "e_remainder.c", 46 "e_scalb.c", 47 "e_sinh.c", 48 "e_sqrt.c", 49 "w_acos.c", 50 "w_acosh.c", 51 "w_asin.c", 52 "w_atan2.c", 53 "w_atanh.c", 54 "w_cosh.c", 55 "w_exp.c", 56 "w_fmod.c", 57 "w_gamma.c", 58 "w_gamma_r.c", 59 "w_hypot.c", 60 "w_j0.c", 61 "w_j1.c", 62 "w_jn.c", 63 "w_lgamma.c", 64 "w_lgamma_r.c", 65 "w_log.c", 66 "w_log10.c", 67 "w_pow.c", 68 "w_remainder.c", 69 "w_scalb.c", 70 "w_sinh.c", 71 "w_sqrt.c", 72 "s_asinh.c", 73 "s_atan.c", 74 "s_cbrt.c", 75 "s_ceil.c", 76 "s_copysign.c", 77 "s_cos.c", 78 "s_erf.c", 79 "s_expm1.c", 80 "s_fabs.c", 81 "s_finite.c", 82 "s_floor.c", 83 "s_frexp.c", 84 "s_ilogb.c", 85 "s_isnan.c", 86 "s_ldexp.c", 87 "s_lib_version.c", 88 "s_log1p.c", 89 "s_logb.c", 90 "s_matherr.c", 91 "s_modf.c", 92 "s_nextafter.c", 93 "s_rint.c", 94 "s_scalbn.c", 95 "s_signgam.c", 96 "s_significand.c", 97 "s_sin.c", 98 "s_tan.c", 99 "s_tanh.c", 100 ], 101 102 // c99 specifies a less relaxed floating point model that does not 103 // enable floating point expession contraction (e.g: fused multiply-add 104 // operations). 105 c_std: "c99", 106 107 cflags: [ 108 // This is necessary to guarantee that the FDLIBM functions are in 109 // "IEEE spirit", i.e. to guarantee that the IEEE 754 core functions 110 // are used. 111 "-D_IEEE_LIBM", 112 113 // Android only supports little-endian. 114 "-D__LITTLE_ENDIAN", 115 116 // Disable compiler optimizations that interact badly with this crufty 117 // library (see their own admission in 'readme'). Without this, we 118 // fail StrictMath tests on x86. 119 "-fno-strict-aliasing", 120 121 // Disable warnings. We need a specific version of fdlibm and can't fix this upstream. 122 "-Werror", 123 "-Wno-sign-compare", 124 "-Wno-dangling-else", 125 "-Wno-unknown-pragmas", 126 127 "-Wno-dangling-else", 128 "-Wno-logical-op-parentheses", 129 "-Wno-sometimes-uninitialized", 130 ], 131} 132