]>
Commit | Line | Data |
---|---|---|
dff8da6b | 1 | # Copyright (C) 1996-2024 Free Software Foundation, Inc. |
28f540f4 RM |
2 | # This file is part of the GNU C Library. |
3 | ||
4 | # The GNU C Library is free software; you can redistribute it and/or | |
41bdb6e2 AJ |
5 | # modify it under the terms of the GNU Lesser General Public |
6 | # License as published by the Free Software Foundation; either | |
7 | # version 2.1 of the License, or (at your option) any later version. | |
28f540f4 RM |
8 | |
9 | # The GNU C Library is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 | 12 | # Lesser General Public License for more details. |
28f540f4 | 13 | |
41bdb6e2 | 14 | # You should have received a copy of the GNU Lesser General Public |
59ba27a6 | 15 | # License along with the GNU C Library; if not, see |
5a82c748 | 16 | # <https://www.gnu.org/licenses/>. |
0c5ecdc4 UD |
17 | |
18 | # Makefile for the math library. | |
28f540f4 | 19 | |
f7eac6eb RM |
20 | subdir := math |
21 | ||
a5f891ac JM |
22 | include ../Makeconfig |
23 | ||
f7eac6eb | 24 | # Installed header files. |
c0d59e3e AZ |
25 | headers := \ |
26 | math.h \ | |
27 | bits/mathcalls.h \ | |
28 | fpu_control.h \ | |
29 | complex.h \ | |
30 | bits/cmathcalls.h \ | |
31 | fenv.h \ | |
32 | bits/fenv.h \ | |
33 | bits/mathdef.h \ | |
34 | tgmath.h \ | |
35 | bits/math-vector.h \ | |
36 | finclude/math-vector-fortran.h \ | |
37 | bits/libm-simd-decl-stubs.h \ | |
38 | bits/iscanonical.h \ | |
39 | bits/flt-eval-method.h \ | |
40 | bits/fp-fast.h \ | |
41 | bits/fp-logb.h \ | |
42 | bits/long-double.h \ | |
43 | bits/mathcalls-helper-functions.h \ | |
44 | bits/floatn.h \ | |
45 | bits/floatn-common.h \ | |
46 | bits/mathcalls-narrow.h | |
47 | # headers | |
f7eac6eb | 48 | |
5fbef188 | 49 | # FPU support code. |
c0d59e3e AZ |
50 | aux := \ |
51 | fpu_control \ | |
52 | setfpucw \ | |
53 | # aux | |
28f540f4 | 54 | |
f7eac6eb | 55 | # Build the -lm library. |
28f540f4 | 56 | |
f7eac6eb | 57 | extra-libs := libm |
ec4b0518 | 58 | extra-libs-others = $(extra-libs) |
58e07151 | 59 | |
c0d59e3e AZ |
60 | libm-support = \ |
61 | fclrexcpt \ | |
62 | fedisblxcpt \ | |
63 | feenablxcpt \ | |
64 | fegetenv \ | |
65 | fegetexcept \ | |
66 | fegetmode \ | |
67 | fegetround \ | |
68 | feholdexcpt \ | |
69 | fesetenv \ | |
70 | fesetexcept \ | |
71 | fesetmode\ | |
72 | fesetround \ | |
73 | fetestexceptflag \ | |
74 | feupdateenv \ | |
75 | fgetexcptflg \ | |
76 | fraiseexcpt \ | |
77 | fsetexcptflg \ | |
78 | ftestexcept \ | |
79 | s_lib_version \ | |
80 | s_matherr \ | |
81 | s_signgam \ | |
82 | # libm-support | |
b9e05ed0 | 83 | |
ce6698ea PM |
84 | # Wrappers for these functions generated per type using a file named |
85 | # <func>_template.c and the appropriate math-type-macros-<TYPE>.h. | |
c0d59e3e AZ |
86 | gen-libm-calls = \ |
87 | cabsF \ | |
88 | cargF \ | |
89 | cimagF \ | |
90 | conjF \ | |
91 | crealF \ | |
92 | e_exp2F \ | |
93 | e_scalbF \ | |
94 | k_casinhF \ | |
95 | k_casinhF \ | |
96 | s_cacosF \ | |
97 | s_cacoshF \ | |
98 | s_canonicalizeF \ | |
99 | s_casinF \ | |
100 | s_casinhF \ | |
101 | s_catanF \ | |
102 | s_catanhF \ | |
103 | s_ccosF \ | |
104 | s_ccoshF \ | |
105 | s_cexpF \ | |
106 | s_clog10F \ | |
107 | s_clogF \ | |
108 | s_cpowF \ | |
109 | s_cprojF \ | |
110 | s_csinF \ | |
111 | s_csinhF \ | |
112 | s_csinhF \ | |
113 | s_csqrtF \ | |
114 | s_ctanF \ | |
115 | s_ctanhF \ | |
116 | s_fdimF \ | |
117 | s_fmaxF \ | |
118 | s_fmaximumF \ | |
119 | s_fmaximum_magF \ | |
120 | s_fmaximum_mag_numF \ | |
121 | s_fmaximum_numF \ | |
122 | s_fmaxmagF \ | |
123 | s_fminF \ | |
124 | s_fminimumF \ | |
125 | s_fminimum_magF \ | |
126 | s_fminimum_mag_numF \ | |
127 | s_fminimum_numF \ | |
128 | s_fminmagF \ | |
129 | s_iseqsigF \ | |
130 | s_nanF \ | |
131 | s_nextdownF \ | |
132 | s_significandF \ | |
133 | w_acosF \ | |
134 | w_acoshF \ | |
135 | w_asinF \ | |
136 | w_atan2F \ | |
137 | w_atanhF \ | |
138 | w_coshF \ | |
139 | w_exp10F \ | |
140 | w_exp2F \ | |
141 | w_expF \ | |
142 | w_fmodF \ | |
143 | w_hypotF \ | |
144 | w_ilogbF \ | |
145 | w_j0F \ | |
146 | w_j1F \ | |
147 | w_jnF \ | |
148 | w_lgammaF \ | |
149 | w_lgammaF_r \ | |
150 | w_llogbF \ | |
151 | w_log10F \ | |
152 | w_log1pF \ | |
153 | w_log2F \ | |
154 | w_logF \ | |
155 | w_powF \ | |
156 | w_remainderF \ | |
157 | w_scalbF \ | |
158 | w_scalblnF \ | |
159 | w_sinhF \ | |
160 | w_sqrtF \ | |
161 | w_tgammaF \ | |
162 | # gen-libm-calls | |
163 | ||
164 | libm-calls = \ | |
165 | $(calls:s_%=m_%) \ | |
166 | $(gen-libm-calls) \ | |
167 | e_acosF \ | |
168 | e_acoshF \ | |
169 | e_asinF \ | |
170 | e_atan2F \ | |
171 | e_atanhF \ | |
172 | e_coshF \ | |
173 | e_exp10F \ | |
174 | e_expF \ | |
175 | e_fmodF \ | |
176 | e_gammaF_r \ | |
177 | e_hypotF \ | |
178 | e_ilogbF \ | |
179 | e_j0F \ | |
180 | e_j1F \ | |
181 | e_jnF \ | |
182 | e_lgammaF_r \ | |
183 | e_log10F \ | |
184 | e_log2F \ | |
185 | e_logF \ | |
186 | e_powF \ | |
187 | e_remainderF \ | |
188 | e_sinhF \ | |
189 | e_sqrtF \ | |
190 | gamma_productF \ | |
191 | k_tanF \ | |
192 | lgamma_negF \ | |
193 | lgamma_productF \ | |
194 | s_asinhF \ | |
195 | s_atanF \ | |
196 | s_cbrtF \ | |
197 | s_ceilF \ | |
198 | s_cosF \ | |
199 | s_erfF \ | |
200 | s_expm1F \ | |
201 | s_fabsF \ | |
202 | s_floorF \ | |
203 | s_fmaF \ | |
204 | s_fpclassifyF \ | |
205 | s_fromfpF \ | |
206 | s_fromfpxF \ | |
207 | s_getpayloadF \ | |
208 | s_issignalingF \ | |
209 | s_llrintF \ | |
210 | s_llroundF \ | |
211 | s_log1pF \ | |
212 | s_logbF \ | |
213 | s_lrintF \ | |
214 | s_lroundF \ | |
215 | s_nearbyintF \ | |
216 | s_nextafterF \ | |
217 | s_nexttowardF \ | |
218 | s_nextupF \ | |
219 | s_remquoF \ | |
220 | s_rintF \ | |
221 | s_roundF \ | |
222 | s_roundevenF \ | |
223 | s_scalblnF \ | |
224 | s_setpayloadF \ | |
225 | s_setpayloadsigF \ | |
226 | s_sinF \ | |
227 | s_sincosF \ | |
228 | s_tanF \ | |
229 | s_tanhF \ | |
230 | s_totalorderF \ | |
231 | s_totalordermagF \ | |
232 | s_truncF \ | |
233 | s_ufromfpF \ | |
234 | s_ufromfpxF \ | |
235 | x2y2m1F \ | |
236 | # libm-calls | |
237 | ||
238 | libm-compat-calls = \ | |
239 | k_standardF \ | |
240 | w_acosF_compat \ | |
241 | w_acoshF_compat \ | |
242 | w_asinF_compat \ | |
243 | w_atan2F_compat \ | |
244 | w_atanhF_compat \ | |
245 | w_coshF_compat \ | |
246 | w_exp10F_compat \ | |
247 | w_exp2F_compat \ | |
248 | w_expF_compat \ | |
249 | w_fmodF_compat \ | |
250 | w_hypotF_compat \ | |
251 | w_j0F_compat \ | |
252 | w_j1F_compat\ | |
253 | w_jnF_compat \ | |
254 | w_lgammaF_compat2 \ | |
255 | w_lgammaF_r_compat \ | |
256 | w_lgamma_compatF \ | |
257 | w_log10F_compat \ | |
258 | w_log2F_compat \ | |
259 | w_logF_compat \ | |
260 | w_powF_compat \ | |
261 | w_remainderF_compat \ | |
262 | w_scalbF_compat \ | |
263 | w_sinhF_compat \ | |
264 | w_sqrtF_compat \ | |
265 | w_tgammaF_compat \ | |
266 | # libm-compat-calls | |
267 | ||
268 | libm-narrow-fns = \ | |
269 | add \ | |
270 | div \ | |
271 | fma \ | |
272 | mul \ | |
273 | sqrt \ | |
274 | sub \ | |
275 | # libm-narrow-fns | |
276 | libm-narrow-types-basic = \ | |
277 | s_f32xFf64 \ | |
278 | s_fF \ | |
279 | # libm-narrow-types-basic | |
280 | libm-narrow-types-ldouble-yes = \ | |
281 | s_dFl \ | |
282 | s_fFl \ | |
283 | # libm-narrow-types-ldouble-yes | |
284 | libm-narrow-types-float128-yes = \ | |
285 | s_f32Ff128 \ | |
286 | s_f64Ff128 \ | |
287 | s_f64xFf128 \ | |
288 | # libm-narrow-types-float128-yes | |
289 | libm-narrow-types-float128-alias-yes = \ | |
290 | s_f64xFf128 \ | |
291 | # libm-narrow-types-float128-alias-yes | |
292 | libm-narrow-types = \ | |
293 | $(libm-narrow-types-basic) \ | |
294 | $(libm-narrow-types-float128-$(float128-fcts)) \ | |
295 | $(libm-narrow-types-float128-alias-$(float128-alias-fcts)) \ | |
296 | $(libm-narrow-types-ldouble-$(long-double-fcts)) \ | |
297 | # libm-narrow-types | |
63716ab2 | 298 | |
b9e05ed0 PM |
299 | # Type specific routine support. |
300 | # | |
301 | # The following three variables control what is included for each type: | |
302 | # | |
303 | # type-floatN-suffix = The suffix of the type | |
304 | # type-floatN-routines = Type specific support objects | |
305 | # type-floatN-yes = If the type is supported, evaluates to floatN | |
306 | # | |
307 | # Finally, note that types is an intentionally recursive variable. | |
308 | # We only know the full set of supported types for the target machine | |
309 | # after the Rules makefile has been parsed. | |
c0d59e3e AZ |
310 | types-basic = \ |
311 | $(type-ldouble-$(long-double-fcts)) \ | |
312 | double \ | |
313 | float \ | |
314 | # types-basic | |
b9e05ed0 | 315 | |
bc9620d0 JM |
316 | # Like types, but includes types whose functions alias those for |
317 | # another type. | |
c0d59e3e AZ |
318 | test-types-basic = \ |
319 | double \ | |
320 | float \ | |
321 | ldouble \ | |
322 | # test-types-basic | |
bc9620d0 | 323 | |
b9e05ed0 PM |
324 | # long double support |
325 | type-ldouble-suffix := l | |
c0d59e3e AZ |
326 | type-ldouble-routines := \ |
327 | e_rem_pio2l \ | |
328 | k_cosl \ | |
329 | k_sincosl \ | |
330 | k_sinl \ | |
331 | s_iscanonicall \ | |
332 | t_sincosl \ | |
333 | # type-ldouble-routines | |
b9e05ed0 PM |
334 | type-ldouble-yes := ldouble |
335 | ||
336 | # double support | |
337 | type-double-suffix := | |
c0d59e3e AZ |
338 | type-double-routines := \ |
339 | branred \ | |
340 | e_exp_data \ | |
341 | e_log2_data \ | |
342 | e_log_data \ | |
343 | e_pow_log_data \ | |
344 | k_rem_pio2 \ | |
345 | math_err \ | |
346 | sincostab \ | |
347 | # type-double-routines | |
b9e05ed0 PM |
348 | |
349 | # float support | |
350 | type-float-suffix := f | |
c0d59e3e AZ |
351 | type-float-routines := \ |
352 | e_exp2f_data \ | |
353 | e_log2f_data \ | |
354 | e_logf_data \ | |
355 | e_powf_log2_data \ | |
356 | math_errf \ | |
357 | s_sincosf_data \ | |
358 | # type-float-routines | |
b9e05ed0 | 359 | |
26265c3b PM |
360 | # _Float128 support |
361 | type-float128-suffix := f128 | |
c0d59e3e AZ |
362 | type-float128-routines := \ |
363 | e_rem_pio2f128 \ | |
364 | k_cosf128 \ | |
365 | k_sincosf128 \ | |
366 | k_sinf128 \ | |
367 | t_sincosf128 \ | |
368 | # type-float128-routines | |
26265c3b | 369 | type-float128-yes := float128 |
ae7207d0 JM |
370 | |
371 | # _Float64x may be supported, only as an alias type. | |
372 | type-float64x-yes := float64x | |
373 | ||
0059122a RS |
374 | # IBM long double support in additional to IEEE 128 long double support |
375 | type-ibm128-suffix := l | |
376 | type-ibm128-yes := ibm128 | |
377 | ||
c0d59e3e AZ |
378 | types = \ |
379 | $(type-float128-$(float128-fcts)) \ | |
380 | $(types-basic) \ | |
381 | # types | |
382 | test-types = \ | |
383 | $(test-types-basic) \ | |
384 | $(type-float128-$(float128-alias-fcts)) \ | |
385 | $(type-float128-$(float128-fcts)) \ | |
386 | $(type-float64x-$(float64x-alias-fcts)) \ | |
387 | $(type-ibm128-$(ibm128-fcts)) \ | |
388 | float32 \ | |
389 | float32x \ | |
390 | float64 \ | |
391 | # test-types | |
26265c3b | 392 | |
8e554659 JM |
393 | # Pairs of types for which narrowing functions should be tested (this |
394 | # variable has more entries than libm-narrow-types because it includes | |
395 | # pairs for which the functions sometimes or always alias functions | |
396 | # for other types). This definition embeds the assumption that if | |
397 | # _Float64x is supported, so is _Float128, and vice versa (they may or | |
398 | # may not have the same format). | |
c0d59e3e AZ |
399 | test-type-pairs = \ |
400 | $(test-type-pairs-f64xf128-$(float128-alias-fcts)) \ | |
401 | $(test-type-pairs-f64xf128-$(float128-fcts)) \ | |
402 | double-ldouble \ | |
403 | float-double \ | |
404 | float-ldouble \ | |
405 | float32-float32x \ | |
406 | float32-float64 \ | |
407 | float32x-float64 \ | |
408 | # test-type-pairs | |
409 | test-type-pairs-f64xf128-yes = \ | |
410 | float32-float128 \ | |
411 | float32-float64x \ | |
412 | float32x-float128 \ | |
413 | float32x-float64x \ | |
414 | float64-float128 \ | |
415 | float64-float64x \ | |
416 | float64x-float128 \ | |
417 | # test-type-pairs-f64xf128-yes | |
8e554659 | 418 | |
26265c3b PM |
419 | # For each of the basic types (float, double, long double), replace the |
420 | # occurrences of 'F' in arg 1 with the appropriate suffix for the type. | |
421 | type-basic-foreach = $(foreach t, $(types-basic), \ | |
422 | $(subst F,$(type-$(t)-suffix),$(1))) | |
b9e05ed0 PM |
423 | |
424 | # Apply suffix to each type in arg 1 | |
425 | type-foreach = $(foreach t,$(types),$(subst F,$(type-$(t)-suffix),$(1))) | |
426 | ||
3789e2fd | 427 | libm-routines = $(strip $(libm-support) \ |
26265c3b PM |
428 | $(call type-basic-foreach, \ |
429 | $(libm-compat-calls)) \ | |
b9e05ed0 PM |
430 | $(call type-foreach, $(libm-calls)) \ |
431 | $(foreach t, $(types), $(type-$(t)-routines))) \ | |
63716ab2 JM |
432 | $(foreach f,$(libm-narrow-fns), \ |
433 | $(subst F,$(f),$(libm-narrow-types))) | |
58e07151 | 434 | |
f7eac6eb RM |
435 | # These functions are in libc instead of libm because __printf_fp |
436 | # calls them, so any program using printf will need them linked in, | |
437 | # and we don't want to have to link every program with -lm. | |
92712dee RM |
438 | # In libm-calls (above), list m_foo in place of s_foo for any |
439 | # routine that should be compiled separately for its libc and libm versions. | |
c0d59e3e AZ |
440 | calls = \ |
441 | $(gen-calls) \ | |
442 | s_copysignF \ | |
443 | s_finiteF \ | |
444 | s_frexpF \ | |
445 | s_isinfF \ | |
446 | s_isnanF \ | |
447 | s_modfF \ | |
448 | s_scalbnF \ | |
449 | s_signbitF \ | |
450 | # calls | |
9f9834f5 | 451 | gen-calls = s_ldexpF |
b9e05ed0 PM |
452 | generated += $(foreach s,.c .S,$(call type-foreach, $(calls:s_%=m_%$(s)))) |
453 | routines = $(call type-foreach, $(calls)) | |
4898d971 SP |
454 | # The $(calls) that are shared between libm and libc are not included in static |
455 | # libm so the symbols end up in exactly one place. | |
456 | libm-shared-only-routines = $(call type-foreach, $(calls:s_%=m_%)) | |
8847214f | 457 | |
5695d46f | 458 | ifeq ($(build-mathvec),yes) |
cbd8f930 AS |
459 | # We need to install libm.so and libm.a as linker scripts |
460 | # for transparent use of vector math library. | |
c0d59e3e AZ |
461 | install-lib-ldscripts := \ |
462 | libm.a \ | |
463 | libm.so \ | |
464 | # install-lib-ldscripts | |
465 | install-others = \ | |
466 | $(inst_libdir)/libm.a \ | |
467 | $(inst_libdir)/libm.so \ | |
468 | # install-others | |
5695d46f AS |
469 | $(inst_libdir)/libm.so: $(common-objpfx)format.lds \ |
470 | $(libm) \ | |
471 | $(libmvec) \ | |
472 | $(+force) | |
473 | (echo '/* GNU ld script'; echo '*/';\ | |
474 | cat $<; \ | |
475 | echo 'GROUP ( $(slibdir)/libm.so$(libm.so-version) ' \ | |
d0007dc5 | 476 | 'AS_NEEDED ( $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \ |
f9378ac3 DAS |
477 | ) > $@.new |
478 | mv -f $@.new $@ | |
cbd8f930 | 479 | |
ffb8455c AS |
480 | $(inst_libdir)/libm-$(version).a: $(objpfx)libm.a \ |
481 | $(+force) | |
482 | $(do-install) | |
483 | ||
cbd8f930 | 484 | $(inst_libdir)/libm.a: $(common-objpfx)format.lds \ |
ffb8455c AS |
485 | $(inst_libdir)/libm-$(version).a \ |
486 | $(objpfx)../mathvec/libmvec.a \ | |
cbd8f930 AS |
487 | $(+force) |
488 | (echo '/* GNU ld script'; echo '*/';\ | |
489 | cat $<; \ | |
ffb8455c | 490 | echo 'GROUP ( $(libdir)/libm-$(version).a $(libdir)/libmvec.a )' \ |
cbd8f930 | 491 | ) > $@.new |
cbd8f930 | 492 | mv -f $@.new $@ |
5695d46f AS |
493 | endif |
494 | ||
c57abfa7 | 495 | # Rules for the test suite. |
c0d59e3e AZ |
496 | tests = \ |
497 | $(tests-static) \ | |
498 | bug-nextafter \ | |
499 | bug-nexttoward \ | |
500 | bug-tgmath1 \ | |
637bfc39 | 501 | test-ceil-except-2 \ |
c0d59e3e AZ |
502 | test-femode \ |
503 | test-femode-traps \ | |
504 | test-fenv basic-test \ | |
505 | test-fenv-clear \ | |
506 | test-fenv-preserve \ | |
507 | test-fenv-return \ | |
508 | test-fenv-tls \ | |
509 | test-fesetexcept \ | |
510 | test-fesetexcept-traps \ | |
511 | test-fetestexceptflag \ | |
512 | test-fexcept \ | |
513 | test-fexcept-traps \ | |
932544ef | 514 | test-floor-except-2 \ |
c0d59e3e AZ |
515 | test-flt-eval-method \ |
516 | test-fp-ilogb-constants \ | |
517 | test-fp-llogb-constants \ | |
518 | test-fpucw \ | |
519 | test-fpucw-ieee \ | |
520 | test-iseqsig-excess-precision \ | |
521 | test-iszero-excess-precision \ | |
522 | test-matherr-3 \ | |
523 | test-misc \ | |
524 | test-nan-const \ | |
525 | test-nan-overflow \ | |
526 | test-nan-payload \ | |
527 | test-narrow-macros \ | |
528 | test-nearbyint-except \ | |
529 | test-nearbyint-except-2 \ | |
530 | test-powl \ | |
531 | test-signgam-uchar \ | |
532 | test-signgam-uchar-init \ | |
533 | test-signgam-uint \ | |
534 | test-signgam-uint-init \ | |
535 | test-signgam-ullong \ | |
536 | test-signgam-ullong-init \ | |
537 | test-snan \ | |
538 | test-tgmath \ | |
539 | test-tgmath-int \ | |
540 | test-tgmath-ret \ | |
541 | test-tgmath2 \ | |
44ccc246 | 542 | test-trunc-except-2 \ |
c0d59e3e AZ |
543 | tst-CMPLX \ |
544 | tst-CMPLX2 \ | |
545 | tst-definitions \ | |
546 | # tests | |
5c5a8b99 | 547 | ifneq ($(config-cflags-signaling-nans),) |
c0d59e3e AZ |
548 | tests += \ |
549 | test-fe-snans-always-signal \ | |
550 | # tests | |
5c5a8b99 | 551 | endif |
c0d59e3e AZ |
552 | tests-static = \ |
553 | test-fpucw-ieee-static \ | |
554 | test-fpucw-static \ | |
555 | test-signgam-uchar-init-static \ | |
556 | test-signgam-uchar-static \ | |
557 | test-signgam-uint-init-static \ | |
558 | test-signgam-uint-static \ | |
559 | test-signgam-ullong-init-static \ | |
560 | test-signgam-ullong-static \ | |
561 | # tests-static | |
779c404d FW |
562 | |
563 | # The tested symbols matherr, _LIB_VERSION have been removed in glibc 2.27. | |
564 | ifeq ($(have-GLIBC_2.26)$(build-shared),yesyes) | |
c0d59e3e AZ |
565 | tests += \ |
566 | test-matherr \ | |
567 | test-matherr-2 \ | |
568 | # tests | |
779c404d | 569 | endif |
c57abfa7 | 570 | |
a4d57b79 FW |
571 | # These tests use internal (unexported) GMP functions and are linked |
572 | # statically to obtain access to these functions. | |
c0d59e3e AZ |
573 | tests-static += \ |
574 | atest-exp \ | |
575 | atest-exp2 \ | |
576 | atest-sincos \ | |
577 | # tests-static | |
a4d57b79 | 578 | |
0800411f | 579 | ifneq (,$(CXX)) |
c0d59e3e AZ |
580 | tests += \ |
581 | test-math-cxx11 \ | |
582 | test-math-iscanonical \ | |
583 | test-math-iseqsig \ | |
584 | test-math-isinff \ | |
585 | test-math-issignaling \ | |
586 | test-math-iszero \ | |
587 | # tests | |
0800411f RM |
588 | endif |
589 | ||
24a2718f | 590 | libm-vec-tests = $(addprefix test-,$(libmvec-tests)) |
bc9620d0 | 591 | libm-test-support = $(foreach t,$(test-types),libm-test-support-$(t)) |
3b2f6032 JM |
592 | test-extras += $(libm-test-support) |
593 | extra-test-objs += $(addsuffix .o, $(libm-test-support)) | |
b4bcb3ae AS |
594 | libm-vec-test-wrappers = $(addsuffix -wrappers, $(libm-vec-tests)) |
595 | test-extras += $(libm-vec-test-wrappers) | |
596 | extra-test-objs += $(addsuffix .o, $(libm-vec-test-wrappers)) | |
8847214f | 597 | |
e0a3ed4f | 598 | ulps-file = $(firstword $(wildcard $(sysdirs:%=%/libm-test-ulps))) |
882ed1be | 599 | |
2813e41e | 600 | $(objpfx)libm-test-ulps.h: $(ulps-file) gen-libm-test.py |
5cd81881 | 601 | $(make-target-directory) |
2813e41e | 602 | $(PYTHON) gen-libm-test.py -u $< -H $@ |
5cd81881 | 603 | |
c0d59e3e AZ |
604 | libm-test-funcs-auto = \ |
605 | acos \ | |
606 | acosh \ | |
607 | asin \ | |
608 | asinh \ | |
609 | atan \ | |
610 | atan2 \ | |
611 | atanh \ | |
612 | cabs \ | |
613 | cacos \ | |
614 | cacosh \ | |
615 | carg \ | |
616 | casin \ | |
617 | casinh \ | |
618 | catan \ | |
619 | catanh \ | |
620 | cbrt \ | |
621 | ccos \ | |
622 | ccosh \ | |
623 | cexp \ | |
624 | clog \ | |
625 | clog10 \ | |
626 | cos \ | |
627 | cosh \ | |
628 | cpow \ | |
629 | csin \ | |
630 | csinh \ | |
631 | csqrt \ | |
632 | ctan \ | |
633 | ctanh \ | |
634 | erf \ | |
635 | erfc \ | |
636 | exp \ | |
637 | exp2 \ | |
638 | exp10 \ | |
639 | expm1 \ | |
640 | fma \ | |
641 | hypot \ | |
642 | j0 \ | |
643 | j1 \ | |
644 | jn \ | |
645 | lgamma \ | |
646 | log \ | |
647 | log10 \ | |
648 | log1p \ | |
649 | log2 \ | |
650 | pow \ | |
651 | sin \ | |
652 | sincos \ | |
653 | sinh \ | |
654 | sqrt \ | |
655 | tan \ | |
656 | tanh \ | |
657 | tgamma \ | |
658 | y0 \ | |
659 | y1 \ | |
660 | yn \ | |
661 | # libm-test-funcs-auto | |
662 | libm-test-funcs-noauto = \ | |
663 | canonicalize \ | |
664 | ceil \ | |
665 | cimag \ | |
666 | compat_totalorder \ | |
667 | compat_totalordermag \ | |
668 | conj \ | |
669 | copysign \ | |
670 | cproj \ | |
671 | creal \ | |
672 | fabs \ | |
673 | fdim \ | |
674 | floor \ | |
675 | fmax \ | |
676 | fmaximum \ | |
677 | fmaximum_mag \ | |
678 | fmaximum_mag_num \ | |
679 | fmaximum_num \ | |
680 | fmaxmag \ | |
681 | fmin \ | |
682 | fminimum \ | |
683 | fminimum_mag \ | |
684 | fminimum_mag_num \ | |
685 | fminimum_num \ | |
686 | fminmag \ | |
687 | fmod \ | |
688 | fpclassify \ | |
689 | frexp \ | |
690 | fromfp \ | |
691 | fromfpx \ | |
692 | getpayload \ | |
693 | ilogb \ | |
694 | iscanonical \ | |
695 | iseqsig \ | |
696 | isfinite \ | |
697 | isgreater \ | |
698 | isgreaterequal \ | |
699 | isinf \ | |
700 | isless \ | |
701 | islessequal \ | |
702 | islessgreater \ | |
703 | isnan \ | |
704 | isnormal \ | |
705 | issignaling \ | |
706 | issubnormal \ | |
707 | isunordered \ | |
708 | iszero \ | |
709 | llogb \ | |
710 | llrint \ | |
711 | llround \ | |
712 | logb \ | |
713 | lrint \ | |
714 | lround \ | |
715 | modf \ | |
716 | nearbyint \ | |
717 | nextafter \ | |
718 | nextdown \ | |
719 | nexttoward \ | |
720 | nextup \ | |
721 | remainder \ | |
722 | remquo \ | |
723 | rint \ | |
724 | round \ | |
725 | roundeven \ | |
726 | scalb \ | |
727 | scalbln \ | |
728 | scalbn \ | |
729 | setpayload \ | |
730 | setpayloadsig \ | |
731 | signbit \ | |
732 | significand \ | |
733 | totalorder \ | |
734 | totalordermag \ | |
735 | trunc \ | |
736 | ufromfp \ | |
737 | ufromfpx \ | |
738 | # libm-test-funcs-noauto | |
739 | libm-test-funcs-compat = \ | |
740 | compat_totalorder \ | |
741 | compat_totalordermag \ | |
742 | # libm-test-funcs-compat | |
743 | libm-test-funcs-narrow = \ | |
744 | add \ | |
745 | div \ | |
746 | fma \ | |
747 | mul \ | |
748 | sqrt \ | |
749 | sub \ | |
750 | # libm-test-funcs-narrow | |
751 | libm-test-funcs-all = \ | |
752 | $(libm-test-funcs-auto) \ | |
753 | $(libm-test-funcs-noauto) \ | |
754 | # libm-test-funcs-all | |
5cbb5849 JM |
755 | libm-test-c-auto = $(foreach f,$(libm-test-funcs-auto),libm-test-$(f).c) |
756 | libm-test-c-noauto = $(foreach f,$(libm-test-funcs-noauto),libm-test-$(f).c) | |
8e554659 JM |
757 | libm-test-c-narrow = $(foreach f,$(libm-test-funcs-narrow),\ |
758 | libm-test-narrow-$(f).c) | |
c0d59e3e AZ |
759 | generated += \ |
760 | $(libm-test-c-auto) \ | |
761 | $(libm-test-c-narrow) \ | |
762 | $(libm-test-c-noauto) \ | |
763 | libm-test-ulps.h \ | |
764 | # generated | |
92061bb0 | 765 | |
bc9620d0 | 766 | libm-tests-base-normal = $(foreach t,$(test-types),test-$(t)) |
8e554659 | 767 | libm-tests-base-narrow = $(foreach t,$(test-type-pairs),test-$(t)) |
1c15464c | 768 | libm-tests-base = $(libm-tests-base-normal) $(libm-vec-tests) |
92061bb0 JM |
769 | libm-tests-normal = $(foreach t,$(libm-tests-base-normal),\ |
770 | $(foreach f,$(libm-test-funcs-all),\ | |
771 | $(t)-$(f))) | |
8e554659 JM |
772 | libm-tests-narrow = $(foreach t,$(libm-tests-base-narrow),\ |
773 | $(foreach f,$(libm-test-funcs-narrow),\ | |
774 | $(t)-$(f))) | |
92061bb0 JM |
775 | libm-tests-vector = $(foreach t,$(libmvec-tests),\ |
776 | $(foreach f,$($(t)-funcs),test-$(t)-$(f))) | |
1c15464c | 777 | libm-tests = $(libm-tests-normal) $(libm-tests-narrow) $(libm-tests-vector) |
42760d76 | 778 | libm-tests-compat = $(foreach t,$(libm-tests-base-normal) \ |
1c15464c | 779 | $(libm-tests-base-finite),\ |
42760d76 JM |
780 | $(foreach f,$(libm-test-funcs-compat),\ |
781 | $(t)-$(f))) | |
92061bb0 | 782 | libm-tests-for-type = $(foreach f,$(libm-test-funcs-all),\ |
55d53011 | 783 | test-$(1)-$(f) test-i$(1)-$(f)) \ |
8e554659 JM |
784 | $(filter test-$(1)-%,$(libm-tests-vector) \ |
785 | $(libm-tests-narrow)) | |
92061bb0 JM |
786 | |
787 | libm-tests.o = $(addsuffix .o,$(libm-tests)) | |
788 | ||
07db3f55 | 789 | tests += $(libm-tests) |
92061bb0 | 790 | generated += $(addsuffix .c,$(libm-tests)) \ |
bc9620d0 | 791 | $(foreach t,$(test-types),libm-test-support-$(t).c) |
5cbb5849 JM |
792 | |
793 | libm-test-c-auto-obj = $(addprefix $(objpfx),$(libm-test-c-auto)) | |
794 | libm-test-c-noauto-obj = $(addprefix $(objpfx),$(libm-test-c-noauto)) | |
8e554659 | 795 | libm-test-c-narrow-obj = $(addprefix $(objpfx),$(libm-test-c-narrow)) |
5cbb5849 | 796 | |
92061bb0 | 797 | $(libm-test-c-noauto-obj): $(objpfx)libm-test%.c: libm-test%.inc \ |
2813e41e | 798 | gen-libm-test.py |
5cbb5849 | 799 | $(make-target-directory) |
2813e41e | 800 | $(PYTHON) gen-libm-test.py -c $< -a /dev/null -C $@ |
4f1bc131 | 801 | |
5cbb5849 | 802 | $(libm-test-c-auto-obj): $(objpfx)libm-test%.c: libm-test%.inc \ |
2813e41e | 803 | gen-libm-test.py \ |
5cbb5849 | 804 | auto-libm-test-out% |
5cd81881 | 805 | $(make-target-directory) |
2813e41e | 806 | $(PYTHON) gen-libm-test.py -c $< -a auto-libm-test-out$* -C $@ |
8e554659 JM |
807 | |
808 | $(libm-test-c-narrow-obj): $(objpfx)libm-test%.c: libm-test%.inc \ | |
2813e41e | 809 | gen-libm-test.py \ |
8e554659 JM |
810 | auto-libm-test-out% |
811 | $(make-target-directory) | |
2813e41e | 812 | $(PYTHON) gen-libm-test.py -c $< -a auto-libm-test-out$* -C $@ |
8847214f | 813 | |
42760d76 JM |
814 | # Tests for totalorder compat symbols reuse the table of tests as |
815 | # processed by gen-libm-test.py, so add dependencies on the generated | |
816 | # .c files. | |
817 | $(foreach t,$(libm-tests-base),\ | |
818 | $(objpfx)$(t)-compat_totalorder.o): $(objpfx)libm-test-totalorder.c | |
819 | ||
820 | $(foreach t,$(libm-tests-base),\ | |
821 | $(objpfx)$(t)-compat_totalordermag.o): $(objpfx)libm-test-totalordermag.c | |
822 | ||
f9fabc1b | 823 | # _Float128x omitted as not supported by gen-tgmath-tests.py. |
c0d59e3e AZ |
824 | tgmath3-narrow-types = \ |
825 | d \ | |
826 | f \ | |
827 | f16 \ | |
828 | f32 \ | |
829 | f128 \ | |
830 | f32x \ | |
831 | f64 \ | |
832 | f64x \ | |
833 | # tgmath3-narrow-types | |
f9fabc1b JM |
834 | tgmath3-narrow-macros = $(foreach t,$(tgmath3-narrow-types), \ |
835 | $(foreach f,$(libm-narrow-fns),$(t)$(f))) | |
c0d59e3e AZ |
836 | tgmath3-macros = \ |
837 | $(tgmath3-narrow-macros) \ | |
838 | acos \ | |
839 | acosh \ | |
840 | asin \ | |
841 | asinh \ | |
842 | atan \ | |
843 | atan2 \ | |
844 | atanh \ | |
845 | carg \ | |
846 | cbrt \ | |
847 | ceil \ | |
848 | cimag \ | |
849 | conj \ | |
850 | copysign \ | |
851 | cos \ | |
852 | cosh \ | |
853 | cproj \ | |
854 | creal \ | |
855 | erf \ | |
856 | erfc \ | |
857 | exp \ | |
858 | exp2 \ | |
859 | exp10 \ | |
860 | expm1 \ | |
861 | fabs \ | |
862 | fdim \ | |
863 | floor \ | |
864 | fma \ | |
865 | fmax \ | |
866 | fmaximum \ | |
867 | fmaximum_mag \ | |
868 | fmaximum_mag_num \ | |
869 | fmaximum_num \ | |
870 | fmaxmag \ | |
871 | fmin \ | |
872 | fminimum \ | |
873 | fminimum_mag \ | |
874 | fminimum_mag_num \ | |
875 | fminimum_num \ | |
876 | fminmag \ | |
877 | fmod \ | |
878 | frexp \ | |
879 | fromfp \ | |
880 | fromfpx \ | |
881 | hypot \ | |
882 | ilogb \ | |
883 | ldexp \ | |
884 | lgamma \ | |
885 | llogb \ | |
886 | llrint \ | |
887 | llround \ | |
888 | log \ | |
889 | log10 \ | |
890 | log1p \ | |
891 | log2 \ | |
892 | logb \ | |
893 | lrint \ | |
894 | lround \ | |
895 | nearbyint \ | |
896 | nextafter \ | |
897 | nextdown \ | |
898 | nexttoward \ | |
899 | nextup \ | |
900 | pow \ | |
901 | remainder \ | |
902 | remquo \ | |
903 | rint \ | |
904 | round \ | |
905 | roundeven \ | |
906 | scalb \ | |
907 | scalbln \ | |
908 | scalbn \ | |
909 | sin \ | |
910 | sinh \ | |
911 | sqrt \ | |
912 | tan \ | |
913 | tanh \ | |
914 | tgamma \ | |
915 | trunc \ | |
916 | ufromfp \ | |
917 | ufromfpx \ | |
918 | # tgmath3-macros | |
7c67e6e8 JM |
919 | tgmath3-macro-tests = $(addprefix test-tgmath3-,$(tgmath3-macros)) |
920 | tests += $(tgmath3-macro-tests) | |
921 | generated += $(addsuffix .c,$(tgmath3-macro-tests)) | |
922 | ||
923 | $(tgmath3-macro-tests:%=$(objpfx)%.o): CFLAGS += -fno-builtin | |
924 | ||
925 | $(foreach m,$(tgmath3-macros),\ | |
926 | $(objpfx)test-tgmath3-$(m).c): $(objpfx)test-tgmath3-%.c: \ | |
927 | gen-tgmath-tests.py | |
928 | $(PYTHON) gen-tgmath-tests.py $* > $@ | |
929 | ||
930 | # Verify that the list of supported macros is in sync between the | |
931 | # Makefile and gen-tgmath-tests.py. | |
932 | tests-special += $(objpfx)test-tgmath3-macro-list.out | |
933 | $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py | |
934 | $(PYTHON) $< check-list $(tgmath3-macros) > $@; \ | |
935 | $(evaluate-test) | |
2dd0aec5 | 936 | |
24a2718f AS |
937 | libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH |
938 | libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \ | |
939 | -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas | |
940 | ||
36975e8e | 941 | CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags) |
24a2718f | 942 | |
36975e8e | 943 | CFLAGS-test-double-vlen8-wrappers.c += $(double-vlen8-arch-ext-cflags) |
24a2718f | 944 | |
36975e8e | 945 | CFLAGS-test-float-vlen8-wrappers.c += $(float-vlen8-arch-ext-cflags) |
2a523216 | 946 | |
36975e8e | 947 | CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags) |
2a523216 | 948 | |
26211284 JM |
949 | # The no-inline tests use -fsignaling-nans, and thereby use the |
950 | # versions of classification macros that support sNaNs. The inline | |
951 | # function tests use the versions of classification macros that may | |
952 | # raise spurious exceptions for sNaNs, but also do not test for | |
953 | # exceptions. Thus both versions of the classification macros are | |
954 | # validated. | |
955 | libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \ | |
5c5a8b99 | 956 | $(config-cflags-signaling-nans) |
36975e8e | 957 | CFLAGS-test-tgmath.c += -fno-builtin |
d077f65f MT |
958 | # The following testcase uses very long lines (>3 million), so it may take a |
959 | # while to compile it. See: http://llvm.org/bugs/show_bug.cgi?id=14106 and | |
5a82c748 | 960 | # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54402 |
36975e8e L |
961 | CFLAGS-test-tgmath2.c += -fno-builtin |
962 | CFLAGS-test-tgmath-ret.c += -fno-builtin | |
963 | CFLAGS-test-powl.c += -fno-builtin | |
964 | ||
5c5a8b99 | 965 | CFLAGS-test-snan.c += $(config-cflags-signaling-nans) |
36975e8e | 966 | |
36975e8e L |
967 | CFLAGS-test-signgam-uchar.c += -std=c99 |
968 | CFLAGS-test-signgam-uchar-init.c += -std=c99 | |
969 | CFLAGS-test-signgam-uchar-static.c += -std=c99 | |
970 | CFLAGS-test-signgam-uchar-init-static.c += -std=c99 | |
971 | CFLAGS-test-signgam-uint.c += -std=c99 | |
972 | CFLAGS-test-signgam-uint-init.c += -std=c99 | |
973 | CFLAGS-test-signgam-uint-static.c += -std=c99 | |
974 | CFLAGS-test-signgam-uint-init-static.c += -std=c99 | |
975 | CFLAGS-test-signgam-ullong.c += -std=c99 | |
976 | CFLAGS-test-signgam-ullong-init.c += -std=c99 | |
977 | CFLAGS-test-signgam-ullong-static.c += -std=c99 | |
978 | CFLAGS-test-signgam-ullong-init-static.c += -std=c99 | |
979 | ||
980 | CFLAGS-test-math-cxx11.cc += -std=c++11 | |
981 | ||
982 | CFLAGS-test-math-isinff.cc += -std=gnu++11 | |
983 | CFLAGS-test-math-iszero.cc += -std=gnu++11 | |
984 | CFLAGS-test-math-issignaling.cc += -std=gnu++11 | |
985 | CFLAGS-test-math-iscanonical.cc += -std=gnu++11 | |
986 | ||
987 | CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard | |
988 | CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard | |
989 | CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard | |
990 | ||
5c5a8b99 | 991 | CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans) |
36975e8e | 992 | |
48b12ed5 JM |
993 | CFLAGS-test-nan-const.c += -fno-builtin |
994 | ||
637bfc39 | 995 | CFLAGS-test-ceil-except-2.c += -fno-builtin |
932544ef | 996 | CFLAGS-test-floor-except-2.c += -fno-builtin |
44ccc246 | 997 | CFLAGS-test-trunc-except-2.c += -fno-builtin |
637bfc39 | 998 | |
28f540f4 RM |
999 | include ../Rules |
1000 | ||
9f9834f5 PM |
1001 | gen-all-calls = $(gen-libm-calls) $(gen-calls) |
1002 | ||
1003 | generated += $(addsuffix .c,$(call type-foreach,$(gen-all-calls))) \ | |
ce6698ea PM |
1004 | gen-libm-templates.stmp |
1005 | ||
1006 | # Create wrappers in the math build directory. | |
9f9834f5 PM |
1007 | $(objpfx)gen-libm-templates.stmp: Makefile |
1008 | $(make-target-directory) | |
1009 | for gcall in $(gen-all-calls); do \ | |
ce6698ea PM |
1010 | func=$${gcall%F*}$${gcall#*F}; \ |
1011 | for type in $(foreach t,$(types),$(t)__$(type-$(t)-suffix)); do \ | |
1012 | suff=$${type#*__}; \ | |
1013 | type=$${type%__*}; \ | |
1014 | file=$(objpfx)$${gcall%F*}$${suff}$${gcall#*F}.c; \ | |
1015 | ( \ | |
1016 | echo "#include <math-type-macros-$${type}.h>"; \ | |
1017 | echo "#include <$${func}_template.c>"; \ | |
1018 | ) > $${file}; \ | |
1019 | done; \ | |
1020 | done; \ | |
1021 | echo > $(@) | |
1022 | ||
1023 | # Add dependency to ensure the generator runs prior. | |
9f9834f5 | 1024 | $(foreach t, $(call type-foreach, $(gen-all-calls)), \ |
ce6698ea PM |
1025 | $(objpfx)$(t).c): $(objpfx)gen-libm-templates.stmp |
1026 | ||
b2faf4ea | 1027 | # This must come after the inclusion of sysdeps Makefiles via Rules. |
b2faf4ea | 1028 | |
92061bb0 JM |
1029 | $(foreach t,$(libm-tests-normal),$(objpfx)$(t).c): $(objpfx)test-%.c: |
1030 | type_func=$*; \ | |
1031 | type=$${type_func%%-*}; \ | |
1032 | func=$${type_func#*-}; \ | |
1033 | ( \ | |
1034 | echo "#include <test-$$type.h>"; \ | |
55d53011 | 1035 | echo "#include <test-math-exceptions.h>"; \ |
92061bb0 JM |
1036 | echo "#include <test-math-errno.h>"; \ |
1037 | echo "#include <test-math-scalar.h>"; \ | |
1038 | echo "#include <libm-test-$$func.c>"; \ | |
1039 | ) > $@ | |
1040 | ||
8e554659 JM |
1041 | $(foreach t,$(libm-tests-narrow),$(objpfx)$(t).c): $(objpfx)test-%.c: |
1042 | type_pair_func=$*; \ | |
1043 | type_pair=$${type_pair_func%-*}; \ | |
1044 | func=$${type_pair_func##*-}; \ | |
1045 | ret_type=$${type_pair%%-*}; \ | |
1046 | arg_type=$${type_pair#*-}; \ | |
1047 | ( \ | |
1048 | echo "#include <test-$$ret_type.h>"; \ | |
1049 | echo "#include <test-arg-$$arg_type.h>"; \ | |
55d53011 | 1050 | echo "#include <test-math-exceptions.h>"; \ |
8e554659 JM |
1051 | echo "#include <test-math-errno.h>"; \ |
1052 | echo "#include <test-math-narrow.h>"; \ | |
1053 | echo "#include <libm-test-narrow-$$func.c>"; \ | |
1054 | ) > $@ | |
1055 | ||
92061bb0 JM |
1056 | $(foreach t,$(libm-tests-vector),$(objpfx)$(t).c): $(objpfx)test-%.c: |
1057 | type_func=$*; \ | |
1058 | type=$${type_func%-*}; \ | |
1059 | func=$${type_func##*-}; \ | |
1060 | func_args=$$(grep ALL_RM_TEST libm-test-$$func.inc \ | |
1061 | | sed 's/.*RUN_TEST_LOOP_//;s/_.*//'); \ | |
1062 | ( \ | |
1063 | echo "#include <test-$$type.h>"; \ | |
1064 | echo "WRAPPER_DECL_$$func_args (WRAPPER_NAME (FUNC ($$func)))"; \ | |
1065 | echo "#include <libm-test-$$func.c>"; \ | |
1066 | ) > $@ | |
1067 | ||
bc9620d0 | 1068 | $(foreach t,$(test-types),\ |
92061bb0 JM |
1069 | $(objpfx)libm-test-support-$(t).c): $(objpfx)libm-test-support-%.c: |
1070 | ( \ | |
1071 | echo "#include <test-$*.h>"; \ | |
1072 | echo "#include <libm-test-support.c>"; \ | |
1073 | ) > $@ | |
1074 | ||
1075 | $(addprefix $(objpfx), $(libm-tests.o)): $(objpfx)libm-test-ulps.h | |
3b2f6032 | 1076 | |
92061bb0 JM |
1077 | define o-iterator-doit |
1078 | $(foreach f,$(libm-test-funcs-all),\ | |
1079 | $(objpfx)$(o)-$(f).o): $(objpfx)$(o)%.o: $(objpfx)libm-test%.c | |
1080 | endef | |
1081 | object-suffixes-left := $(libm-tests-base) | |
1082 | include $(o-iterator) | |
1083 | ||
8e554659 JM |
1084 | define o-iterator-doit |
1085 | $(foreach f,$(libm-test-funcs-narrow),\ | |
1086 | $(objpfx)$(o)-$(f).o): $(objpfx)$(o)%.o: \ | |
1087 | $(objpfx)libm-test-narrow%.c | |
1088 | endef | |
1089 | object-suffixes-left := $(libm-tests-base-narrow) | |
1090 | include $(o-iterator) | |
1091 | ||
92061bb0 JM |
1092 | define o-iterator-doit |
1093 | $(foreach f,$(libm-test-funcs-all),\ | |
1094 | $(objpfx)$(o)-$(f).o): CFLAGS += $(libm-test-no-inline-cflags) | |
1095 | endef | |
1096 | object-suffixes-left := $(libm-tests-base-normal) | |
1097 | include $(o-iterator) | |
3b2f6032 | 1098 | |
92061bb0 | 1099 | define o-iterator-doit |
8e554659 JM |
1100 | $(foreach f,$(libm-test-funcs-narrow),\ |
1101 | $(objpfx)$(o)-$(f).o): CFLAGS += $(libm-test-no-inline-cflags) | |
1102 | endef | |
1103 | object-suffixes-left := $(libm-tests-base-narrow) | |
1104 | include $(o-iterator) | |
1105 | ||
92061bb0 JM |
1106 | define o-iterator-doit |
1107 | $(foreach f,$($(o)-funcs),\ | |
1108 | $(objpfx)test-$(o)-$(f).o): CFLAGS += $(libm-test-vec-cflags) | |
1109 | endef | |
1110 | object-suffixes-left := $(libmvec-tests) | |
1111 | include $(o-iterator) | |
1112 | ||
1113 | define o-iterator-doit | |
3b2f6032 | 1114 | $(addprefix $(objpfx),\ |
92061bb0 JM |
1115 | $(call libm-tests-for-type,$(o))): $(objpfx)libm-test-support-$(o).o |
1116 | endef | |
bc9620d0 | 1117 | object-suffixes-left := $(test-types) |
92061bb0 JM |
1118 | include $(o-iterator) |
1119 | ||
1120 | define o-iterator-doit | |
1121 | $(objpfx)libm-test-support-$(o).o: CFLAGS += $(libm-test-no-inline-cflags) | |
1122 | endef | |
bc9620d0 | 1123 | object-suffixes-left := $(test-types) |
92061bb0 | 1124 | include $(o-iterator) |
3b2f6032 | 1125 | |
26510bdd CD |
1126 | # Run the math programs to automatically generate ULPs files. |
1127 | .PHONY: regen-ulps | |
1128 | ||
1129 | run-regen-ulps = $(test-wrapper-env) \ | |
8540f6d2 | 1130 | $(run-program-env) \ |
b9256ab6 | 1131 | $($*-ENV) $(rtld-prefix) $(objpfx)$${run} |
26510bdd CD |
1132 | |
1133 | regen-ulps: $(addprefix $(objpfx),$(libm-tests)) | |
1134 | rm -f $(objpfx)ULPs; rm -f $(objpfx)NewUlps; \ | |
1135 | cp $(ulps-file) $(objpfx)libm-test-ulps; \ | |
b9256ab6 | 1136 | for run in $(libm-tests); do \ |
26510bdd CD |
1137 | echo "Regenerating ULPs for $${run}"; \ |
1138 | $(run-regen-ulps) -u -o $(objpfx); \ | |
1139 | cat $(objpfx)ULPs >> $(objpfx)libm-test-ulps; \ | |
1140 | rm $(objpfx)ULPs; \ | |
1141 | done; \ | |
2813e41e JM |
1142 | $(PYTHON) gen-libm-test.py -n $(objpfx)NewUlps \ |
1143 | -u $(objpfx)libm-test-ulps; \ | |
26510bdd CD |
1144 | echo "Automatic regeneration of ULPs complete."; \ |
1145 | echo "Difference between the current baseline and the new baseline is:";\ | |
1146 | diff -urN $(ulps-file) $(objpfx)NewUlps; \ | |
1147 | echo "Copy $(objpfx)NewUlps to $(ulps-file) (relative to source)." | |
f7eac6eb | 1148 | |
2f663a98 RM |
1149 | # The generated sysd-rules file defines rules like this for sources |
1150 | # coming from sysdeps/ directories. These rules find the generic sources. | |
1151 | define o-iterator-doit | |
1152 | $(objpfx)m_%$o: s_%.c $(before-compile); $$(compile-command.c) | |
1153 | endef | |
1154 | object-suffixes-left := $(all-object-suffixes) | |
1155 | include $(o-iterator) | |
1156 | ||
9f9834f5 PM |
1157 | # Likewise, for those generated files shared with libc. |
1158 | define o-iterator-doit | |
1159 | $(objpfx)m_%$o: $(objpfx)s_%.c $(before-compile); $$(compile-command.c) | |
1160 | endef | |
1161 | object-suffixes-left := $(all-object-suffixes) | |
1162 | include $(o-iterator) | |
2f663a98 | 1163 | |
58e07151 RM |
1164 | ifneq ($(long-double-fcts),yes) |
1165 | # The `double' and `long double' types are the same on this machine. | |
1166 | # We won't compile the `long double' code at all. Tell the `double' code | |
eda162dd JM |
1167 | # to define aliases for the `FUNCl' names. |
1168 | math-CPPFLAGS += -DNO_LONG_DOUBLE | |
49348bea JM |
1169 | # GCC 10 diagnoses aliases with types conflicting with built-in |
1170 | # functions. | |
1171 | CFLAGS-w_acos.c += -fno-builtin-acosl | |
1172 | CFLAGS-w_acosh.c += -fno-builtin-acoshl | |
1173 | CFLAGS-w_asin.c += -fno-builtin-asinl | |
1174 | CFLAGS-s_asinh.c += -fno-builtin-asinhl | |
1175 | CFLAGS-s_atan.c += -fno-builtin-atanl | |
1176 | CFLAGS-w_atan2.c += -fno-builtin-atan2l | |
1177 | CFLAGS-w_atanh.c += -fno-builtin-atanhl | |
1178 | CFLAGS-s_cabs.c += -fno-builtin-cabsl | |
1179 | CFLAGS-s_cacos.c += -fno-builtin-cacosl | |
1180 | CFLAGS-s_cacosh.c += -fno-builtin-cacoshl | |
1181 | CFLAGS-s_canonicalize.c += -fno-builtin-canonicalizel | |
1182 | CFLAGS-s_carg.c += -fno-builtin-cargl | |
1183 | CFLAGS-s_casin.c += -fno-builtin-casinl | |
1184 | CFLAGS-s_casinh.c += -fno-builtin-casinhl | |
1185 | CFLAGS-s_catan.c += -fno-builtin-catanl | |
1186 | CFLAGS-s_catanh.c += -fno-builtin-catanhl | |
1187 | CFLAGS-s_cbrt.c += -fno-builtin-cbrtl | |
1188 | CFLAGS-s_ccos.c += -fno-builtin-ccosl | |
1189 | CFLAGS-s_ccosh.c += -fno-builtin-ccoshl | |
1190 | CFLAGS-s_ceil.c += -fno-builtin-ceill | |
1191 | CFLAGS-s_cexp.c += -fno-builtin-cexpl | |
1192 | CFLAGS-s_cimag.c += -fno-builtin-cimagl | |
1193 | CFLAGS-s_clog.c += -fno-builtin-clogl | |
1194 | CFLAGS-s_clog10.c += -fno-builtin-clog10l | |
1195 | CFLAGS-s_conj.c += -fno-builtin-conjl | |
1196 | CFLAGS-s_copysign.c += -fno-builtin-copysignl | |
1197 | CFLAGS-s_cos.c += -fno-builtin-cosl | |
1198 | CFLAGS-w_cosh.c += -fno-builtin-coshl | |
1199 | CFLAGS-s_cpow.c += -fno-builtin-cpowl | |
1200 | CFLAGS-s_cproj.c += -fno-builtin-cprojl | |
1201 | CFLAGS-s_creal.c += -fno-builtin-creall | |
1202 | CFLAGS-s_csin.c += -fno-builtin-csinl | |
1203 | CFLAGS-s_csinh.c += -fno-builtin-csinhl | |
1204 | CFLAGS-s_csqrt.c += -fno-builtin-csqrtl | |
1205 | CFLAGS-s_ctan.c += -fno-builtin-ctanl | |
1206 | CFLAGS-s_ctanh.c += -fno-builtin-ctanhl | |
49348bea JM |
1207 | CFLAGS-s_erf.c += -fno-builtin-erfl |
1208 | CFLAGS-s_erfc.c += -fno-builtin-erfcl | |
1209 | CFLAGS-e_exp.c += -fno-builtin-expl | |
1210 | CFLAGS-w_exp10.c += -fno-builtin-exp10l | |
1211 | CFLAGS-e_exp2.c += -fno-builtin-exp2l | |
1212 | CFLAGS-s_expm1.c += -fno-builtin-expm1l | |
f66780ba JM |
1213 | CFLAGS-s_f32xaddf64.c += -fno-builtin-daddl |
1214 | CFLAGS-s_f32xdivf64.c += -fno-builtin-ddivl | |
1215 | CFLAGS-s_f32xfmaf64.c += -fno-builtin-dfmal | |
1216 | CFLAGS-s_f32xmulf64.c += -fno-builtin-dmull | |
1217 | CFLAGS-s_f32xsqrtf64.c += -fno-builtin-dsqrtl | |
1218 | CFLAGS-s_f32xsubf64.c += -fno-builtin-dsubl | |
49348bea JM |
1219 | CFLAGS-s_fabs.c += -fno-builtin-fabsl |
1220 | CFLAGS-s_fadd.c += -fno-builtin-faddl | |
1221 | CFLAGS-s_fdim.c += -fno-builtin-fdiml | |
1222 | CFLAGS-s_fdiv.c += -fno-builtin-fdivl | |
b3f27d81 | 1223 | CFLAGS-s_ffma.c += -fno-builtin-ffmal |
49348bea JM |
1224 | CFLAGS-s_finite.c += -fno-builtin-finitel |
1225 | CFLAGS-s_floor.c += -fno-builtin-floorl | |
1226 | CFLAGS-s_fma.c += -fno-builtin-fmal | |
1227 | CFLAGS-s_fmax.c += -fno-builtin-fmaxl | |
90f0ac10 JM |
1228 | CFLAGS-s_fmaximum.c += -fno-builtin-fmaximuml |
1229 | CFLAGS-s_fmaximum_mag.c += -fno-builtin-fmaximum_magl | |
1230 | CFLAGS-s_fmaximum_mag_num.c += -fno-builtin-fmaximum_mag_numl | |
1231 | CFLAGS-s_fmaximum_num.c += -fno-builtin-fmaximum_numl | |
49348bea JM |
1232 | CFLAGS-s_fmaxmag.c += -fno-builtin-fmaxmagl |
1233 | CFLAGS-s_fmin.c += -fno-builtin-fminl | |
90f0ac10 JM |
1234 | CFLAGS-s_fminimum.c += -fno-builtin-fminimuml |
1235 | CFLAGS-s_fminimum_mag.c += -fno-builtin-fminimum_magl | |
1236 | CFLAGS-s_fminimum_mag_num.c += -fno-builtin-fminimum_mag_numl | |
1237 | CFLAGS-s_fminimum_num.c += -fno-builtin-fminimum_numl | |
49348bea JM |
1238 | CFLAGS-s_fminmag.c += -fno-builtin-fminmagl |
1239 | CFLAGS-w_fmod.c += -fno-builtin-fmodl | |
1240 | CFLAGS-s_fmul.c += -fno-builtin-fmull | |
1241 | CFLAGS-s_frexp.c += -fno-builtin-frexpl | |
1242 | CFLAGS-s_fromfp.c += -fno-builtin-fromfpl | |
1243 | CFLAGS-s_fromfpx.c += -fno-builtin-fromfpxl | |
abd38358 | 1244 | CFLAGS-s_fsqrt.c += -fno-builtin-fsqrtl |
49348bea | 1245 | CFLAGS-s_fsub.c += -fno-builtin-fsubl |
49348bea JM |
1246 | CFLAGS-s_getpayload.c += -fno-builtin-getpayloadl |
1247 | CFLAGS-w_hypot.c += -fno-builtin-hypotl | |
1248 | CFLAGS-w_ilogb.c += -fno-builtin-ilogbl | |
1249 | CFLAGS-s_isinf.c += -fno-builtin-isinfl | |
1250 | CFLAGS-s_isnan.c += -fno-builtin-isnanl | |
1251 | CFLAGS-w_j0.c += -fno-builtin-j0l | |
1252 | CFLAGS-w_j1.c += -fno-builtin-j1l | |
1253 | CFLAGS-w_jn.c += -fno-builtin-jnl | |
1254 | CFLAGS-s_ldexp.c += -fno-builtin-ldexpl | |
1255 | CFLAGS-w_lgamma.c += -fno-builtin-lgammal | |
1256 | CFLAGS-w_lgamma_r.c += -fno-builtin-lgammal_r | |
1257 | CFLAGS-w_llogb.c += -fno-builtin-llogbl | |
1258 | CFLAGS-s_llrint.c += -fno-builtin-llrintl | |
1259 | CFLAGS-s_llround.c += -fno-builtin-llroundl | |
1260 | CFLAGS-e_log.c += -fno-builtin-logl | |
1261 | CFLAGS-w_log10.c += -fno-builtin-log10l | |
1262 | CFLAGS-w_log1p.c += -fno-builtin-log1pl | |
1263 | CFLAGS-e_log2.c += -fno-builtin-log2l | |
1264 | CFLAGS-s_logb.c += -fno-builtin-logbl | |
1265 | CFLAGS-s_lrint.c += -fno-builtin-lrintl | |
1266 | CFLAGS-s_lround.c += -fno-builtin-lroundl | |
1267 | CFLAGS-s_modf.c += -fno-builtin-modfl | |
1268 | CFLAGS-s_nan.c += -fno-builtin-nanl | |
1269 | CFLAGS-s_nearbyint.c += -fno-builtin-nearbyintl | |
1270 | CFLAGS-s_nextafter.c += -fno-builtin-nextafterl | |
1271 | CFLAGS-s_nextdown.c += -fno-builtin-nextdownl | |
1272 | CFLAGS-s_nexttoward.c += -fno-builtin-nexttoward -fno-builtin-nexttowardl | |
1273 | CFLAGS-s_nexttowardf.c += -fno-builtin-nexttowardf | |
1274 | CFLAGS-s_nextup.c += -fno-builtin-nextupl | |
1275 | CFLAGS-e_pow.c += -fno-builtin-powl | |
1276 | CFLAGS-w_remainder.c += -fno-builtin-remainderl -fno-builtin-dreml | |
1277 | CFLAGS-s_remquo.c += -fno-builtin-remquol | |
1278 | CFLAGS-s_rint.c += -fno-builtin-rintl | |
1279 | CFLAGS-s_round.c += -fno-builtin-roundl | |
1280 | CFLAGS-s_roundeven.c += -fno-builtin-roundevenl | |
1281 | CFLAGS-w_scalb.c += -fno-builtin-scalbl | |
1282 | CFLAGS-w_scalbln.c += -fno-builtin-scalblnl | |
1283 | CFLAGS-s_scalbn.c += -fno-builtin-scalbnl | |
1284 | CFLAGS-s_setpayload.c += -fno-builtin-setpayloadl | |
1285 | CFLAGS-s_setpayloadsig.c += -fno-builtin-setpayloadsigl | |
1286 | CFLAGS-s_significand.c += -fno-builtin-significandl | |
1287 | CFLAGS-s_sin.c += -fno-builtin-sinl | |
1288 | CFLAGS-s_sincos.c += -fno-builtin-sincosl | |
1289 | CFLAGS-w_sinh.c += -fno-builtin-sinhl | |
1290 | CFLAGS-w_sqrt.c += -fno-builtin-sqrtl | |
1291 | CFLAGS-s_tan.c += -fno-builtin-tanl | |
1292 | CFLAGS-s_tanh.c += -fno-builtin-tanhl | |
1293 | CFLAGS-w_tgamma.c += -fno-builtin-tgammal | |
1294 | CFLAGS-s_totalorder.c += -fno-builtin-totalorderl | |
1295 | CFLAGS-s_totalordermag.c += -fno-builtin-totalordermagl | |
1296 | CFLAGS-s_trunc.c += -fno-builtin-truncl | |
1297 | CFLAGS-s_ufromfp.c += -fno-builtin-ufromfpl | |
1298 | CFLAGS-s_ufromfpx.c += -fno-builtin-ufromfpxl | |
1299 | CFLAGS-s_y0.c += -fno-builtin-y0l | |
1300 | CFLAGS-s_y1.c += -fno-builtin-y1l | |
1301 | CFLAGS-s_yn.c += -fno-builtin-ynl | |
58e07151 RM |
1302 | endif |
1303 | ||
f66780ba JM |
1304 | # Likewise, for _Float32x and _Float64 aliases. |
1305 | CFLAGS-w_acos.c += -fno-builtin-acosf32x -fno-builtin-acosf64 | |
1306 | CFLAGS-w_acosh.c += -fno-builtin-acoshf32x -fno-builtin-acoshf64 | |
1307 | CFLAGS-w_asin.c += -fno-builtin-asinf32x -fno-builtin-asinf64 | |
1308 | CFLAGS-s_asinh.c += -fno-builtin-asinhf32x -fno-builtin-asinhf64 | |
1309 | CFLAGS-s_atan.c += -fno-builtin-atanf32x -fno-builtin-atanf64 | |
1310 | CFLAGS-w_atan2.c += -fno-builtin-atan2f32x -fno-builtin-atan2f64 | |
1311 | CFLAGS-w_atanh.c += -fno-builtin-atanhf32x -fno-builtin-atanhf64 | |
1312 | CFLAGS-s_cabs.c += -fno-builtin-cabsf32x -fno-builtin-cabsf64 | |
1313 | CFLAGS-s_cacos.c += -fno-builtin-cacosf32x -fno-builtin-cacosf64 | |
1314 | CFLAGS-s_cacosh.c += -fno-builtin-cacoshf32x -fno-builtin-cacoshf64 | |
1315 | CFLAGS-s_canonicalize.c += -fno-builtin-canonicalizef32x -fno-builtin-canonicalizef64 | |
1316 | CFLAGS-s_carg.c += -fno-builtin-cargf32x -fno-builtin-cargf64 | |
1317 | CFLAGS-s_casin.c += -fno-builtin-casinf32x -fno-builtin-casinf64 | |
1318 | CFLAGS-s_casinh.c += -fno-builtin-casinhf32x -fno-builtin-casinhf64 | |
1319 | CFLAGS-s_catan.c += -fno-builtin-catanf32x -fno-builtin-catanf64 | |
1320 | CFLAGS-s_catanh.c += -fno-builtin-catanhf32x -fno-builtin-catanhf64 | |
1321 | CFLAGS-s_cbrt.c += -fno-builtin-cbrtf32x -fno-builtin-cbrtf64 | |
1322 | CFLAGS-s_ccos.c += -fno-builtin-ccosf32x -fno-builtin-ccosf64 | |
1323 | CFLAGS-s_ccosh.c += -fno-builtin-ccoshf32x -fno-builtin-ccoshf64 | |
1324 | CFLAGS-s_ceil.c += -fno-builtin-ceilf32x -fno-builtin-ceilf64 | |
1325 | CFLAGS-s_cexp.c += -fno-builtin-cexpf32x -fno-builtin-cexpf64 | |
1326 | CFLAGS-s_cimag.c += -fno-builtin-cimagf32x -fno-builtin-cimagf64 | |
1327 | CFLAGS-s_clog.c += -fno-builtin-clogf32x -fno-builtin-clogf64 | |
1328 | CFLAGS-s_clog10.c += -fno-builtin-clog10f32x -fno-builtin-clog10f64 | |
1329 | CFLAGS-s_conj.c += -fno-builtin-conjf32x -fno-builtin-conjf64 | |
1330 | CFLAGS-s_copysign.c += -fno-builtin-copysignf32x -fno-builtin-copysignf64 | |
1331 | CFLAGS-s_cos.c += -fno-builtin-cosf32x -fno-builtin-cosf64 | |
1332 | CFLAGS-w_cosh.c += -fno-builtin-coshf32x -fno-builtin-coshf64 | |
1333 | CFLAGS-s_cpow.c += -fno-builtin-cpowf32x -fno-builtin-cpowf64 | |
1334 | CFLAGS-s_cproj.c += -fno-builtin-cprojf32x -fno-builtin-cprojf64 | |
1335 | CFLAGS-s_creal.c += -fno-builtin-crealf32x -fno-builtin-crealf64 | |
1336 | CFLAGS-s_csin.c += -fno-builtin-csinf32x -fno-builtin-csinf64 | |
1337 | CFLAGS-s_csinh.c += -fno-builtin-csinhf32x -fno-builtin-csinhf64 | |
1338 | CFLAGS-s_csqrt.c += -fno-builtin-csqrtf32x -fno-builtin-csqrtf64 | |
1339 | CFLAGS-s_ctan.c += -fno-builtin-ctanf32x -fno-builtin-ctanf64 | |
1340 | CFLAGS-s_ctanh.c += -fno-builtin-ctanhf32x -fno-builtin-ctanhf64 | |
1341 | CFLAGS-s_erf.c += -fno-builtin-erff32x -fno-builtin-erff64 | |
1342 | CFLAGS-s_erfc.c += -fno-builtin-erfcf32x -fno-builtin-erfcf64 | |
1343 | CFLAGS-e_exp.c += -fno-builtin-expf32x -fno-builtin-expf64 | |
1344 | CFLAGS-w_exp10.c += -fno-builtin-exp10f32x -fno-builtin-exp10f64 | |
1345 | CFLAGS-e_exp2.c += -fno-builtin-exp2f32x -fno-builtin-exp2f64 | |
1346 | CFLAGS-s_expm1.c += -fno-builtin-expm1f32x -fno-builtin-expm1f64 | |
1347 | CFLAGS-s_fabs.c += -fno-builtin-fabsf32x -fno-builtin-fabsf64 | |
1348 | CFLAGS-s_fadd.c += -fno-builtin-f32addf32x -fno-builtin-f32addf64 | |
1349 | CFLAGS-s_fdim.c += -fno-builtin-fdimf32x -fno-builtin-fdimf64 | |
1350 | CFLAGS-s_fdiv.c += -fno-builtin-f32divf32x -fno-builtin-f32divf64 | |
1351 | CFLAGS-s_ffma.c += -fno-builtin-f32fmaf32x -fno-builtin-f32fmaf64 | |
1352 | CFLAGS-s_floor.c += -fno-builtin-floorf32x -fno-builtin-floorf64 | |
1353 | CFLAGS-s_fma.c += -fno-builtin-fmaf32x -fno-builtin-fmaf64 | |
1354 | CFLAGS-s_fmax.c += -fno-builtin-fmaxf32x -fno-builtin-fmaxf64 | |
1355 | CFLAGS-s_fmaximum.c += -fno-builtin-fmaximumf32x -fno-builtin-fmaximumf64 | |
1356 | CFLAGS-s_fmaximum_mag.c += -fno-builtin-fmaximum_magf32x -fno-builtin-fmaximum_magf64 | |
1357 | CFLAGS-s_fmaximum_mag_num.c += -fno-builtin-fmaximum_mag_numf32x -fno-builtin-fmaximum_mag_numf64 | |
1358 | CFLAGS-s_fmaximum_num.c += -fno-builtin-fmaximum_numf32x -fno-builtin-fmaximum_numf64 | |
1359 | CFLAGS-s_fmaxmag.c += -fno-builtin-fmaxmagf32x -fno-builtin-fmaxmagf64 | |
1360 | CFLAGS-s_fmin.c += -fno-builtin-fminf32x -fno-builtin-fminf64 | |
1361 | CFLAGS-s_fminimum.c += -fno-builtin-fminimumf32x -fno-builtin-fminimumf64 | |
1362 | CFLAGS-s_fminimum_mag.c += -fno-builtin-fminimum_magf32x -fno-builtin-fminimum_magf64 | |
1363 | CFLAGS-s_fminimum_mag_num.c += -fno-builtin-fminimum_mag_numf32x -fno-builtin-fminimum_mag_numf64 | |
1364 | CFLAGS-s_fminimum_num.c += -fno-builtin-fminimum_numf32x -fno-builtin-fminimum_numf64 | |
1365 | CFLAGS-s_fminmag.c += -fno-builtin-fminmagf32x -fno-builtin-fminmagf64 | |
1366 | CFLAGS-w_fmod.c += -fno-builtin-fmodf32x -fno-builtin-fmodf64 | |
1367 | CFLAGS-s_fmul.c += -fno-builtin-f32mulf32x -fno-builtin-f32mulf64 | |
1368 | CFLAGS-s_frexp.c += -fno-builtin-frexpf32x -fno-builtin-frexpf64 | |
1369 | CFLAGS-s_fromfp.c += -fno-builtin-fromfpf32x -fno-builtin-fromfpf64 | |
1370 | CFLAGS-s_fromfpx.c += -fno-builtin-fromfpxf32x -fno-builtin-fromfpxf64 | |
1371 | CFLAGS-s_fsqrt.c += -fno-builtin-f32sqrtf32x -fno-builtin-f32sqrtf64 | |
1372 | CFLAGS-s_fsub.c += -fno-builtin-f32subf32x -fno-builtin-f32subf64 | |
1373 | CFLAGS-s_getpayload.c += -fno-builtin-getpayloadf32x -fno-builtin-getpayloadf64 | |
1374 | CFLAGS-w_hypot.c += -fno-builtin-hypotf32x -fno-builtin-hypotf64 | |
1375 | CFLAGS-w_ilogb.c += -fno-builtin-ilogbf32x -fno-builtin-ilogbf64 | |
1376 | CFLAGS-w_j0.c += -fno-builtin-j0f32x -fno-builtin-j0f64 | |
1377 | CFLAGS-w_j1.c += -fno-builtin-j1f32x -fno-builtin-j1f64 | |
1378 | CFLAGS-w_jn.c += -fno-builtin-jnf32x -fno-builtin-jnf64 | |
1379 | CFLAGS-s_ldexp.c += -fno-builtin-ldexpf32x -fno-builtin-ldexpf64 | |
1380 | CFLAGS-w_lgamma.c += -fno-builtin-lgammaf32x -fno-builtin-lgammaf64 | |
1381 | CFLAGS-w_lgamma_r.c += -fno-builtin-lgammaf32x_r -fno-builtin-lgammaf64_r | |
1382 | CFLAGS-w_llogb.c += -fno-builtin-llogbf32x -fno-builtin-llogbf64 | |
1383 | CFLAGS-s_llrint.c += -fno-builtin-llrintf32x -fno-builtin-llrintf64 | |
1384 | CFLAGS-s_llround.c += -fno-builtin-llroundf32x -fno-builtin-llroundf64 | |
1385 | CFLAGS-e_log.c += -fno-builtin-logf32x -fno-builtin-logf64 | |
1386 | CFLAGS-w_log10.c += -fno-builtin-log10f32x -fno-builtin-log10f64 | |
1387 | CFLAGS-w_log1p.c += -fno-builtin-log1pf32x -fno-builtin-log1pf64 | |
1388 | CFLAGS-e_log2.c += -fno-builtin-log2f32x -fno-builtin-log2f64 | |
1389 | CFLAGS-s_logb.c += -fno-builtin-logbf32x -fno-builtin-logbf64 | |
1390 | CFLAGS-s_lrint.c += -fno-builtin-lrintf32x -fno-builtin-lrintf64 | |
1391 | CFLAGS-s_lround.c += -fno-builtin-lroundf32x -fno-builtin-lroundf64 | |
1392 | CFLAGS-s_modf.c += -fno-builtin-modff32x -fno-builtin-modff64 | |
1393 | CFLAGS-s_nan.c += -fno-builtin-nanf32x -fno-builtin-nanf64 | |
1394 | CFLAGS-s_nearbyint.c += -fno-builtin-nearbyintf32x -fno-builtin-nearbyintf64 | |
1395 | CFLAGS-s_nextafter.c += -fno-builtin-nextafterf32x -fno-builtin-nextafterf64 | |
1396 | CFLAGS-s_nextdown.c += -fno-builtin-nextdownf32x -fno-builtin-nextdownf64 | |
1397 | CFLAGS-s_nextup.c += -fno-builtin-nextupf32x -fno-builtin-nextupf64 | |
1398 | CFLAGS-e_pow.c += -fno-builtin-powf32x -fno-builtin-powf64 | |
1399 | CFLAGS-w_remainder.c += -fno-builtin-remainderf32x -fno-builtin-remainderf64 | |
1400 | CFLAGS-s_remquo.c += -fno-builtin-remquof32x -fno-builtin-remquof64 | |
1401 | CFLAGS-s_rint.c += -fno-builtin-rintf32x -fno-builtin-rintf64 | |
1402 | CFLAGS-s_round.c += -fno-builtin-roundf32x -fno-builtin-roundf64 | |
1403 | CFLAGS-s_roundeven.c += -fno-builtin-roundevenf32x -fno-builtin-roundevenf64 | |
1404 | CFLAGS-w_scalbln.c += -fno-builtin-scalblnf32x -fno-builtin-scalblnf64 | |
1405 | CFLAGS-s_scalbn.c += -fno-builtin-scalbnf32x -fno-builtin-scalbnf64 | |
1406 | CFLAGS-s_setpayload.c += -fno-builtin-setpayloadf32x -fno-builtin-setpayloadf64 | |
1407 | CFLAGS-s_setpayloadsig.c += -fno-builtin-setpayloadsigf32x -fno-builtin-setpayloadsigf64 | |
1408 | CFLAGS-s_sin.c += -fno-builtin-sinf32x -fno-builtin-sinf64 | |
1409 | CFLAGS-s_sincos.c += -fno-builtin-sincosf32x -fno-builtin-sincosf64 | |
1410 | CFLAGS-w_sinh.c += -fno-builtin-sinhf32x -fno-builtin-sinhf64 | |
1411 | CFLAGS-w_sqrt.c += -fno-builtin-sqrtf32x -fno-builtin-sqrtf64 | |
1412 | CFLAGS-s_tan.c += -fno-builtin-tanf32x -fno-builtin-tanf64 | |
1413 | CFLAGS-s_tanh.c += -fno-builtin-tanhf32x -fno-builtin-tanhf64 | |
1414 | CFLAGS-w_tgamma.c += -fno-builtin-tgammaf32x -fno-builtin-tgammaf64 | |
1415 | CFLAGS-s_totalorder.c += -fno-builtin-totalorderf32x -fno-builtin-totalorderf64 | |
1416 | CFLAGS-s_totalordermag.c += -fno-builtin-totalordermagf32x -fno-builtin-totalordermagf64 | |
1417 | CFLAGS-s_trunc.c += -fno-builtin-truncf32x -fno-builtin-truncf64 | |
1418 | CFLAGS-s_ufromfp.c += -fno-builtin-ufromfpf32x -fno-builtin-ufromfpf64 | |
1419 | CFLAGS-s_ufromfpx.c += -fno-builtin-ufromfpxf32x -fno-builtin-ufromfpxf64 | |
1420 | CFLAGS-s_y0.c += -fno-builtin-y0f32x -fno-builtin-y0f64 | |
1421 | CFLAGS-s_y1.c += -fno-builtin-y1f32x -fno-builtin-y1f64 | |
1422 | CFLAGS-s_yn.c += -fno-builtin-ynf32x -fno-builtin-ynf64 | |
1423 | ||
1424 | # Likewise, for _Float32 aliases. | |
1425 | CFLAGS-w_acosf.c += -fno-builtin-acosf32 | |
1426 | CFLAGS-w_acoshf.c += -fno-builtin-acoshf32 | |
1427 | CFLAGS-w_asinf.c += -fno-builtin-asinf32 | |
1428 | CFLAGS-s_asinhf.c += -fno-builtin-asinhf32 | |
1429 | CFLAGS-s_atanf.c += -fno-builtin-atanf32 | |
1430 | CFLAGS-w_atan2f.c += -fno-builtin-atan2f32 | |
1431 | CFLAGS-w_atanhf.c += -fno-builtin-atanhf32 | |
1432 | CFLAGS-s_cabsf.c += -fno-builtin-cabsf32 | |
1433 | CFLAGS-s_cacosf.c += -fno-builtin-cacosf32 | |
1434 | CFLAGS-s_cacoshf.c += -fno-builtin-cacoshf32 | |
1435 | CFLAGS-s_canonicalizef.c += -fno-builtin-canonicalizef32 | |
1436 | CFLAGS-s_cargf.c += -fno-builtin-cargf32 | |
1437 | CFLAGS-s_casinf.c += -fno-builtin-casinf32 | |
1438 | CFLAGS-s_casinhf.c += -fno-builtin-casinhf32 | |
1439 | CFLAGS-s_catanf.c += -fno-builtin-catanf32 | |
1440 | CFLAGS-s_catanhf.c += -fno-builtin-catanhf32 | |
1441 | CFLAGS-s_cbrtf.c += -fno-builtin-cbrtf32 | |
1442 | CFLAGS-s_ccosf.c += -fno-builtin-ccosf32 | |
1443 | CFLAGS-s_ccoshf.c += -fno-builtin-ccoshf32 | |
1444 | CFLAGS-s_ceilf.c += -fno-builtin-ceilf32 | |
1445 | CFLAGS-s_cexpf.c += -fno-builtin-cexpf32 | |
1446 | CFLAGS-s_cimagf.c += -fno-builtin-cimagf32 | |
1447 | CFLAGS-s_clogf.c += -fno-builtin-clogf32 | |
1448 | CFLAGS-s_clog10f.c += -fno-builtin-clog10f32 | |
1449 | CFLAGS-s_conjf.c += -fno-builtin-conjf32 | |
1450 | CFLAGS-s_copysignf.c += -fno-builtin-copysignf32 | |
1451 | CFLAGS-s_cosf.c += -fno-builtin-cosf32 | |
1452 | CFLAGS-w_coshf.c += -fno-builtin-coshf32 | |
1453 | CFLAGS-s_cpowf.c += -fno-builtin-cpowf32 | |
1454 | CFLAGS-s_cprojf.c += -fno-builtin-cprojf32 | |
1455 | CFLAGS-s_crealf.c += -fno-builtin-crealf32 | |
1456 | CFLAGS-s_csinf.c += -fno-builtin-csinf32 | |
1457 | CFLAGS-s_csinhf.c += -fno-builtin-csinhf32 | |
1458 | CFLAGS-s_csqrtf.c += -fno-builtin-csqrtf32 | |
1459 | CFLAGS-s_ctanf.c += -fno-builtin-ctanf32 | |
1460 | CFLAGS-s_ctanhf.c += -fno-builtin-ctanhf32 | |
1461 | CFLAGS-s_erff.c += -fno-builtin-erff32 | |
1462 | CFLAGS-s_erfcf.c += -fno-builtin-erfcf32 | |
1463 | CFLAGS-e_expf.c += -fno-builtin-expf32 | |
1464 | CFLAGS-w_exp10f.c += -fno-builtin-exp10f32 | |
1465 | CFLAGS-e_exp2f.c += -fno-builtin-exp2f32 | |
1466 | CFLAGS-s_expm1f.c += -fno-builtin-expm1f32 | |
1467 | CFLAGS-s_fabsf.c += -fno-builtin-fabsf32 | |
1468 | CFLAGS-s_fdimf.c += -fno-builtin-fdimf32 | |
1469 | CFLAGS-s_floorf.c += -fno-builtin-floorf32 | |
1470 | CFLAGS-s_fmaf.c += -fno-builtin-fmaf32 | |
1471 | CFLAGS-s_fmaxf.c += -fno-builtin-fmaxf32 | |
1472 | CFLAGS-s_fmaximumf.c += -fno-builtin-fmaximumf32 | |
1473 | CFLAGS-s_fmaximum_magf.c += -fno-builtin-fmaximum_magf32 | |
1474 | CFLAGS-s_fmaximum_mag_numf.c += -fno-builtin-fmaximum_mag_numf32 | |
1475 | CFLAGS-s_fmaximum_numf.c += -fno-builtin-fmaximum_numf32 | |
1476 | CFLAGS-s_fmaxmagf.c += -fno-builtin-fmaxmagf32 | |
1477 | CFLAGS-s_fminf.c += -fno-builtin-fminf32 | |
1478 | CFLAGS-s_fminimumf.c += -fno-builtin-fminimumf32 | |
1479 | CFLAGS-s_fminimum_magf.c += -fno-builtin-fminimum_magf32 | |
1480 | CFLAGS-s_fminimum_mag_numf.c += -fno-builtin-fminimum_mag_numf32 | |
1481 | CFLAGS-s_fminimum_numf.c += -fno-builtin-fminimum_numf32 | |
1482 | CFLAGS-s_fminmagf.c += -fno-builtin-fminmagf32 | |
1483 | CFLAGS-w_fmodf.c += -fno-builtin-fmodf32 | |
1484 | CFLAGS-s_frexpf.c += -fno-builtin-frexpf32 | |
1485 | CFLAGS-s_fromfpf.c += -fno-builtin-fromfpf32 | |
1486 | CFLAGS-s_fromfpxf.c += -fno-builtin-fromfpxf32 | |
1487 | CFLAGS-s_getpayloadf.c += -fno-builtin-getpayloadf32 | |
1488 | CFLAGS-w_hypotf.c += -fno-builtin-hypotf32 | |
1489 | CFLAGS-w_ilogbf.c += -fno-builtin-ilogbf32 | |
1490 | CFLAGS-w_j0f.c += -fno-builtin-j0f32 | |
1491 | CFLAGS-w_j1f.c += -fno-builtin-j1f32 | |
1492 | CFLAGS-w_jnf.c += -fno-builtin-jnf32 | |
1493 | CFLAGS-s_ldexpf.c += -fno-builtin-ldexpf32 | |
1494 | CFLAGS-w_lgammaf.c += -fno-builtin-lgammaf32 | |
1495 | CFLAGS-w_lgammaf_r.c += -fno-builtin-lgammaf32_r | |
1496 | CFLAGS-w_llogbf.c += -fno-builtin-llogbf32 | |
1497 | CFLAGS-s_llrintf.c += -fno-builtin-llrintf32 | |
1498 | CFLAGS-s_llroundf.c += -fno-builtin-llroundf32 | |
1499 | CFLAGS-e_logf.c += -fno-builtin-logf32 | |
1500 | CFLAGS-w_log10f.c += -fno-builtin-log10f32 | |
1501 | CFLAGS-w_log1pf.c += -fno-builtin-log1pf32 | |
1502 | CFLAGS-e_log2f.c += -fno-builtin-log2f32 | |
1503 | CFLAGS-s_logbf.c += -fno-builtin-logbf32 | |
1504 | CFLAGS-s_lrintf.c += -fno-builtin-lrintf32 | |
1505 | CFLAGS-s_lroundf.c += -fno-builtin-lroundf32 | |
1506 | CFLAGS-s_modff.c += -fno-builtin-modff32 | |
1507 | CFLAGS-s_nanf.c += -fno-builtin-nanf32 | |
1508 | CFLAGS-s_nearbyintf.c += -fno-builtin-nearbyintf32 | |
1509 | CFLAGS-s_nextafterf.c += -fno-builtin-nextafterf32 | |
1510 | CFLAGS-s_nextdownf.c += -fno-builtin-nextdownf32 | |
1511 | CFLAGS-s_nextupf.c += -fno-builtin-nextupf32 | |
1512 | CFLAGS-e_powf.c += -fno-builtin-powf32 | |
1513 | CFLAGS-w_remainderf.c += -fno-builtin-remainderf32 | |
1514 | CFLAGS-s_remquof.c += -fno-builtin-remquof32 | |
1515 | CFLAGS-s_rintf.c += -fno-builtin-rintf32 | |
1516 | CFLAGS-s_roundf.c += -fno-builtin-roundf32 | |
1517 | CFLAGS-s_roundevenf.c += -fno-builtin-roundevenf32 | |
1518 | CFLAGS-w_scalblnf.c += -fno-builtin-scalblnf32 | |
1519 | CFLAGS-s_scalbnf.c += -fno-builtin-scalbnf32 | |
1520 | CFLAGS-s_setpayloadf.c += -fno-builtin-setpayloadf32 | |
1521 | CFLAGS-s_setpayloadsigf.c += -fno-builtin-setpayloadsigf32 | |
1522 | CFLAGS-s_sinf.c += -fno-builtin-sinf32 | |
1523 | CFLAGS-s_sincosf.c += -fno-builtin-sincosf32 | |
1524 | CFLAGS-w_sinhf.c += -fno-builtin-sinhf32 | |
1525 | CFLAGS-w_sqrtf.c += -fno-builtin-sqrtf32 | |
1526 | CFLAGS-s_tanf.c += -fno-builtin-tanf32 | |
1527 | CFLAGS-s_tanhf.c += -fno-builtin-tanhf32 | |
1528 | CFLAGS-w_tgammaf.c += -fno-builtin-tgammaf32 | |
1529 | CFLAGS-s_totalorderf.c += -fno-builtin-totalorderf32 | |
1530 | CFLAGS-s_totalordermagf.c += -fno-builtin-totalordermagf32 | |
1531 | CFLAGS-s_truncf.c += -fno-builtin-truncf32 | |
1532 | CFLAGS-s_ufromfpf.c += -fno-builtin-ufromfpf32 | |
1533 | CFLAGS-s_ufromfpxf.c += -fno-builtin-ufromfpxf32 | |
1534 | CFLAGS-s_y0f.c += -fno-builtin-y0f32 | |
1535 | CFLAGS-s_y1f.c += -fno-builtin-y1f32 | |
1536 | CFLAGS-s_ynf.c += -fno-builtin-ynf32 | |
1537 | ||
a6a4395d JM |
1538 | # These files quiet sNaNs in a way that is optimized away without |
1539 | # -fsignaling-nans. | |
5c5a8b99 AZ |
1540 | CFLAGS-s_modf.c += $(config-cflags-signaling-nans) |
1541 | CFLAGS-s_modff.c += $(config-cflags-signaling-nans) | |
1542 | CFLAGS-s_modfl.c += $(config-cflags-signaling-nans) | |
1543 | CFLAGS-s_modff128.c += $(config-cflags-signaling-nans) | |
a6a4395d | 1544 | |
b4bcb3ae | 1545 | $(addprefix $(objpfx),\ |
92061bb0 | 1546 | $(filter-out $(tests-static) $(libm-tests-vector),\ |
813378e9 | 1547 | $(tests) $(tests-internal))): $(libm) |
95e7cf29 | 1548 | $(addprefix $(objpfx),$(tests-static)): $(objpfx)libm.a |
92061bb0 JM |
1549 | define o-iterator-doit |
1550 | $(foreach f,$($(o)-funcs),\ | |
1551 | $(objpfx)test-$(o)-$(f)): $(objpfx)test-$(o)-wrappers.o \ | |
1552 | $(libm) $(libmvec) | |
1553 | endef | |
1554 | object-suffixes-left := $(libmvec-tests) | |
1555 | include $(o-iterator) | |
9498096c | 1556 | |
79520f4b | 1557 | $(objpfx)test-fenv-tls: $(shared-thread-library) |