1# 2# SPDX-License-Identifier: BSD-3-Clause 3# 4# Copyright © 2022 Keith Packard 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: 9# 10# 1. Redistributions of source code must retain the above copyright 11# notice, this list of conditions and the following disclaimer. 12# 13# 2. Redistributions in binary form must reproduce the above 14# copyright notice, this list of conditions and the following 15# disclaimer in the documentation and/or other materials provided 16# with the distribution. 17# 18# 3. Neither the name of the copyright holder nor the names of its 19# contributors may be used to endorse or promote products derived 20# from this software without specific prior written permission. 21# 22# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 27# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 28# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 29# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 33# OF THE POSSIBILITY OF SUCH DAMAGE. 34# 35 36srcs_ld_use = [] 37 38if have_long_double 39 40srcs_ld_arch = [ 41 'e_acoshl.c', 42 'e_atanhl.c', 43 'e_coshl.c', 44 'e_expl.c', 45 'e_fmodl.c', 46 'e_hypotl.c', 47 'e_lgammal_r.c', 48 'e_log10l.c', 49 'e_log2l.c', 50 'e_logl.c', 51 'e_powl.c', 52 'e_sinhl.c', 53 'e_tgammal.c', 54 'invtrig.c', 55 'k_cosl.c', 56 'k_sinl.c', 57 'k_tanl.c', 58 's_asinhl.c', 59 's_ceill.c', 60 's_copysignl.c', 61 's_erfl.c', 62 's_exp2l.c', 63 's_expm1l.c', 64 's_floorl.c', 65 's_fpclassifyl.c', 66 's_getpayloadl.c', 67 's_log1pl.c', 68 's_modfl.c', 69 's_nanl.c', 70 's_nextafterl.c', 71 's_nexttoward.c', 72 's_nexttowardf.c', 73 's_remquol.c', 74 's_significandl.c', 75 's_tanhl.c', 76 's_truncl.c', 77 ] 78 79srcs_ld_common = [ 80 'e_acosl.c', 81 'e_asinl.c', 82 'e_atan2l.c', 83 'e_lgammal.c', 84 'e_remainderl.c', 85 'e_sqrtl.c', 86 'k_rem_pio2.c', 87 'math_errl_check_oflowl.c', 88 'math_errl_check_uflowl.c', 89 'math_errl_divzerol.c', 90 'math_errl_invalidl.c', 91 'math_errl_oflowl.c', 92 'math_errl_uflowl.c', 93 'math_errl_with_errnol.c', 94 'polevll.c', 95 's_atanl.c', 96 's_ilogbl.c', 97 's_cbrtl.c', 98 's_cosl.c', 99 's_fabsl.c', 100 's_fdiml.c', 101 's_finitel.c', 102 's_fmal.c', 103 's_fmaxl.c', 104 's_fminl.c', 105 's_frexpl.c', 106 's_isinfl.c', 107 's_isnanl.c', 108 's_issignalingl.c', 109 's_llrintl.c', 110 's_llroundl.c', 111 's_logbl.c', 112 's_lrintl.c', 113 's_lroundl.c', 114 's_rintl.c', 115 's_roundl.c', 116 's_scalbl.c', 117 's_scalbln.c', 118 's_scalbnl.c', 119 's_sincosl.c', 120 's_sinl.c', 121 's_tanl.c', 122] 123 124srcs_ld = srcs_ld_arch + srcs_ld_common 125 126foreach file : srcs_ld 127 s_file = fs.replace_suffix(file, '.S') 128 if file in srcs_libm_machine 129 message('libm/ld/' + file + ': machine overrides generic') 130 elif s_file in srcs_libm_machine 131 message('libm/ld/' + s_file + ': machine overrides generic') 132 else 133 srcs_ld_use += file 134 endif 135endforeach 136 137endif 138 139src_libm_ld = files(srcs_ld_use) 140