1 # Copyright (C) 1996-2024 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
4 # The GNU C Library is free software; you can redistribute it and/or
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.
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
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, see
16 # <https://www.gnu.org/licenses/>.
18 # Makefile for the math library.
24 # Installed header files.
36 finclude
/math-vector-fortran.h \
37 bits
/libm-simd-decl-stubs.h \
39 bits
/flt-eval-method.h \
43 bits
/mathcalls-helper-functions.h \
45 bits
/floatn-common.h \
46 bits
/mathcalls-narrow.h
55 # Build the -lm library.
58 extra-libs-others
= $(extra-libs
)
84 # Wrappers for these functions generated per type using a file named
85 # <func>_template.c and the appropriate math-type-macros-<TYPE>.h.
120 s_fmaximum_mag_numF \
126 s_fminimum_mag_numF \
238 libm-compat-calls
= \
261 w_remainderF_compat \
276 libm-narrow-types-basic
= \
279 # libm-narrow-types-basic
280 libm-narrow-types-ldouble-yes
= \
283 # libm-narrow-types-ldouble-yes
284 libm-narrow-types-float128-yes
= \
288 # libm-narrow-types-float128-yes
289 libm-narrow-types-float128-alias-yes
= \
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
)) \
299 # Type specific routine support.
301 # The following three variables control what is included for each type:
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
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.
311 $(type-ldouble-
$(long-double-fcts
)) \
316 # Like types, but includes types whose functions alias those for
324 # long double support
325 type-ldouble-suffix
:= l
326 type-ldouble-routines
:= \
333 # type-ldouble-routines
334 type-ldouble-yes
:= ldouble
337 type-double-suffix
:=
338 type-double-routines
:= \
347 # type-double-routines
350 type-float-suffix
:= f
351 type-float-routines
:= \
358 # type-float-routines
361 type-float128-suffix
:= f128
362 type-float128-routines
:= \
368 # type-float128-routines
369 type-float128-yes
:= float128
371 # _Float64x may be supported, only as an alias type.
372 type-float64x-yes
:= float64x
374 # IBM long double support in additional to IEEE 128 long double support
375 type-ibm128-suffix
:= l
376 type-ibm128-yes
:= ibm128
379 $(type-float128-
$(float128-fcts
)) \
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
)) \
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).
400 $(test-type-pairs-f64xf128-
$(float128-alias-fcts
)) \
401 $(test-type-pairs-f64xf128-
$(float128-fcts
)) \
409 test-type-pairs-f64xf128-yes
= \
417 # test-type-pairs-f64xf128-yes
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)))
424 # Apply suffix to each type in arg 1
425 type-foreach
= $(foreach t
,$(types
),$(subst F
,$(type-
$(t
)-suffix),$(1)))
427 libm-routines
= $(strip $(libm-support
) \
428 $(call type-basic-foreach
, \
429 $(libm-compat-calls
)) \
430 $(call type-foreach
, $(libm-calls
)) \
431 $(foreach t
, $(types
), $(type-
$(t
)-routines
))) \
432 $(foreach f
,$(libm-narrow-fns
), \
433 $(subst F
,$(f
),$(libm-narrow-types
)))
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.
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.
452 generated
+= $(foreach s
,.c .S
,$(call type-foreach
, $(calls
:s_
%=m_
%$(s
))))
453 routines
= $(call type-foreach
, $(calls
))
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_
%))
458 ifeq ($(build-mathvec
),yes
)
459 # We need to install libm.so and libm.a as linker scripts
460 # for transparent use of vector math library.
461 install-lib-ldscripts
:= \
464 # install-lib-ldscripts
466 $(inst_libdir
)/libm.a \
467 $(inst_libdir
)/libm.so \
469 $(inst_libdir
)/libm.so
: $(common-objpfx
)format.lds \
473 (echo
'/* GNU ld script'; echo
'*/';\
475 echo
'GROUP ( $(slibdir)/libm.so$(libm.so-version) ' \
476 'AS_NEEDED ( $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
480 $(inst_libdir
)/libm-
$(version
).a
: $(objpfx
)libm.a \
484 $(inst_libdir
)/libm.a
: $(common-objpfx
)format.lds \
485 $(inst_libdir
)/libm-
$(version
).a \
486 $(objpfx
)..
/mathvec
/libmvec.a \
488 (echo
'/* GNU ld script'; echo
'*/';\
490 echo
'GROUP ( $(libdir)/libm-$(version).a $(libdir)/libmvec.a )' \
495 # Rules for the test suite.
503 test-fenv basic-test \
509 test-fesetexcept-traps \
510 test-fetestexceptflag \
513 test-flt-eval-method \
514 test-fp-ilogb-constants \
515 test-fp-llogb-constants \
518 test-iseqsig-excess-precision \
519 test-iszero-excess-precision \
526 test-nearbyint-except \
527 test-nearbyint-except-2 \
530 test-signgam-uchar-init \
532 test-signgam-uint-init \
533 test-signgam-ullong \
534 test-signgam-ullong-init \
544 ifneq ($(config-cflags-signaling-nans
),)
546 test-fe-snans-always-signal \
550 test-fpucw-ieee-static \
552 test-signgam-uchar-init-static \
553 test-signgam-uchar-static \
554 test-signgam-uint-init-static \
555 test-signgam-uint-static \
556 test-signgam-ullong-init-static \
557 test-signgam-ullong-static \
560 # The tested symbols matherr, _LIB_VERSION have been removed in glibc 2.27.
561 ifeq ($(have-GLIBC_2.26
)$(build-shared
),yesyes
)
568 # These tests use internal (unexported) GMP functions and are linked
569 # statically to obtain access to these functions.
579 test-math-iscanonical \
582 test-math-issignaling \
587 libm-vec-tests
= $(addprefix test-
,$(libmvec-tests
))
588 libm-test-support
= $(foreach t
,$(test-types
),libm-test-support-
$(t
))
589 test-extras
+= $(libm-test-support
)
590 extra-test-objs
+= $(addsuffix .o
, $(libm-test-support
))
591 libm-vec-test-wrappers
= $(addsuffix -wrappers
, $(libm-vec-tests
))
592 test-extras
+= $(libm-vec-test-wrappers
)
593 extra-test-objs
+= $(addsuffix .o
, $(libm-vec-test-wrappers
))
595 ulps-file
= $(firstword $(wildcard $(sysdirs
:%=%/libm-test-ulps
)))
597 $(objpfx
)libm-test-ulps.h
: $(ulps-file
) gen-libm-test.py
598 $(make-target-directory
)
599 $(PYTHON
) gen-libm-test.py
-u
$< -H
$@
601 libm-test-funcs-auto
= \
658 # libm-test-funcs-auto
659 libm-test-funcs-noauto
= \
664 compat_totalordermag \
735 # libm-test-funcs-noauto
736 libm-test-funcs-compat
= \
738 compat_totalordermag \
739 # libm-test-funcs-compat
740 libm-test-funcs-narrow
= \
747 # libm-test-funcs-narrow
748 libm-test-funcs-all
= \
749 $(libm-test-funcs-auto
) \
750 $(libm-test-funcs-noauto
) \
751 # libm-test-funcs-all
752 libm-test-c-auto
= $(foreach f
,$(libm-test-funcs-auto
),libm-test-
$(f
).c
)
753 libm-test-c-noauto
= $(foreach f
,$(libm-test-funcs-noauto
),libm-test-
$(f
).c
)
754 libm-test-c-narrow
= $(foreach f
,$(libm-test-funcs-narrow
),\
755 libm-test-narrow-
$(f
).c
)
757 $(libm-test-c-auto
) \
758 $(libm-test-c-narrow
) \
759 $(libm-test-c-noauto
) \
763 libm-tests-base-normal
= $(foreach t
,$(test-types
),test-
$(t
))
764 libm-tests-base-narrow
= $(foreach t
,$(test-type-pairs
),test-
$(t
))
765 libm-tests-base
= $(libm-tests-base-normal
) $(libm-vec-tests
)
766 libm-tests-normal
= $(foreach t
,$(libm-tests-base-normal
),\
767 $(foreach f
,$(libm-test-funcs-all
),\
769 libm-tests-narrow
= $(foreach t
,$(libm-tests-base-narrow
),\
770 $(foreach f
,$(libm-test-funcs-narrow
),\
772 libm-tests-vector
= $(foreach t
,$(libmvec-tests
),\
773 $(foreach f
,$($(t
)-funcs
),test-
$(t
)-$(f
)))
774 libm-tests
= $(libm-tests-normal
) $(libm-tests-narrow
) $(libm-tests-vector
)
775 libm-tests-compat
= $(foreach t
,$(libm-tests-base-normal
) \
776 $(libm-tests-base-finite
),\
777 $(foreach f
,$(libm-test-funcs-compat
),\
779 libm-tests-for-type
= $(foreach f
,$(libm-test-funcs-all
),\
780 test-
$(1)-$(f
) test-i
$(1)-$(f
)) \
781 $(filter test-
$(1)-%,$(libm-tests-vector
) \
782 $(libm-tests-narrow
))
784 libm-tests.o
= $(addsuffix .o
,$(libm-tests
))
786 tests
+= $(libm-tests
)
787 generated
+= $(addsuffix .c
,$(libm-tests
)) \
788 $(foreach t
,$(test-types
),libm-test-support-
$(t
).c
)
790 libm-test-c-auto-obj
= $(addprefix $(objpfx
),$(libm-test-c-auto
))
791 libm-test-c-noauto-obj
= $(addprefix $(objpfx
),$(libm-test-c-noauto
))
792 libm-test-c-narrow-obj
= $(addprefix $(objpfx
),$(libm-test-c-narrow
))
794 $(libm-test-c-noauto-obj
): $(objpfx
)libm-test
%.c
: libm-test
%.inc \
796 $(make-target-directory
)
797 $(PYTHON
) gen-libm-test.py
-c
$< -a
/dev
/null
-C
$@
799 $(libm-test-c-auto-obj
): $(objpfx
)libm-test
%.c
: libm-test
%.inc \
802 $(make-target-directory
)
803 $(PYTHON
) gen-libm-test.py
-c
$< -a auto-libm-test-out
$* -C
$@
805 $(libm-test-c-narrow-obj
): $(objpfx
)libm-test
%.c
: libm-test
%.inc \
808 $(make-target-directory
)
809 $(PYTHON
) gen-libm-test.py
-c
$< -a auto-libm-test-out
$* -C
$@
811 # Tests for totalorder compat symbols reuse the table of tests as
812 # processed by gen-libm-test.py, so add dependencies on the generated
814 $(foreach t
,$(libm-tests-base
),\
815 $(objpfx
)$(t
)-compat_totalorder.o
): $(objpfx
)libm-test-totalorder.c
817 $(foreach t
,$(libm-tests-base
),\
818 $(objpfx
)$(t
)-compat_totalordermag.o
): $(objpfx
)libm-test-totalordermag.c
820 # _Float128x omitted as not supported by gen-tgmath-tests.py.
821 tgmath3-narrow-types
= \
830 # tgmath3-narrow-types
831 tgmath3-narrow-macros
= $(foreach t
,$(tgmath3-narrow-types
), \
832 $(foreach f
,$(libm-narrow-fns
),$(t
)$(f
)))
834 $(tgmath3-narrow-macros
) \
916 tgmath3-macro-tests
= $(addprefix test-tgmath3-
,$(tgmath3-macros
))
917 tests
+= $(tgmath3-macro-tests
)
918 generated
+= $(addsuffix .c
,$(tgmath3-macro-tests
))
920 $(tgmath3-macro-tests
:%=$(objpfx
)%.o
): CFLAGS
+= -fno-builtin
922 $(foreach m
,$(tgmath3-macros
),\
923 $(objpfx
)test-tgmath3-
$(m
).c
): $(objpfx
)test-tgmath3-
%.c
: \
925 $(PYTHON
) gen-tgmath-tests.py
$* > $@
927 # Verify that the list of supported macros is in sync between the
928 # Makefile and gen-tgmath-tests.py.
929 tests-special
+= $(objpfx
)test-tgmath3-macro-list.out
930 $(objpfx
)test-tgmath3-macro-list.out
: gen-tgmath-tests.py
931 $(PYTHON
) $< check-list
$(tgmath3-macros
) > $@
; \
934 libm-test-fast-math-cflags
= -fno-builtin
-D__FAST_MATH__
-DTEST_FAST_MATH
935 libm-test-vec-cflags
= $(libm-test-fast-math-cflags
) -fno-inline \
936 -ffloat-store
-D_OPENMP
=201307 -Wno-unknown-pragmas
938 CFLAGS-test-double-vlen4-wrappers.c
+= $(double-vlen4-arch-ext-cflags
)
940 CFLAGS-test-double-vlen8-wrappers.c
+= $(double-vlen8-arch-ext-cflags
)
942 CFLAGS-test-float-vlen8-wrappers.c
+= $(float-vlen8-arch-ext-cflags
)
944 CFLAGS-test-float-vlen16-wrappers.c
+= $(float-vlen16-arch-ext-cflags
)
946 # The no-inline tests use -fsignaling-nans, and thereby use the
947 # versions of classification macros that support sNaNs. The inline
948 # function tests use the versions of classification macros that may
949 # raise spurious exceptions for sNaNs, but also do not test for
950 # exceptions. Thus both versions of the classification macros are
952 libm-test-no-inline-cflags
= -fno-inline
-ffloat-store
-fno-builtin \
953 $(config-cflags-signaling-nans
)
954 CFLAGS-test-tgmath.c
+= -fno-builtin
955 # The following testcase uses very long lines (>3 million), so it may take a
956 # while to compile it. See: http://llvm.org/bugs/show_bug.cgi?id=14106 and
957 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54402
958 CFLAGS-test-tgmath2.c
+= -fno-builtin
959 CFLAGS-test-tgmath-ret.c
+= -fno-builtin
960 CFLAGS-test-powl.c
+= -fno-builtin
962 CFLAGS-test-snan.c
+= $(config-cflags-signaling-nans
)
964 CFLAGS-test-signgam-uchar.c
+= -std
=c99
965 CFLAGS-test-signgam-uchar-init.c
+= -std
=c99
966 CFLAGS-test-signgam-uchar-static.c
+= -std
=c99
967 CFLAGS-test-signgam-uchar-init-static.c
+= -std
=c99
968 CFLAGS-test-signgam-uint.c
+= -std
=c99
969 CFLAGS-test-signgam-uint-init.c
+= -std
=c99
970 CFLAGS-test-signgam-uint-static.c
+= -std
=c99
971 CFLAGS-test-signgam-uint-init-static.c
+= -std
=c99
972 CFLAGS-test-signgam-ullong.c
+= -std
=c99
973 CFLAGS-test-signgam-ullong-init.c
+= -std
=c99
974 CFLAGS-test-signgam-ullong-static.c
+= -std
=c99
975 CFLAGS-test-signgam-ullong-init-static.c
+= -std
=c99
977 CFLAGS-test-math-cxx11.
cc += -std
=c
++11
979 CFLAGS-test-math-isinff.
cc += -std
=gnu
++11
980 CFLAGS-test-math-iszero.
cc += -std
=gnu
++11
981 CFLAGS-test-math-issignaling.
cc += -std
=gnu
++11
982 CFLAGS-test-math-iscanonical.
cc += -std
=gnu
++11
984 CFLAGS-test-iszero-excess-precision.c
+= -fexcess-precision
=standard
985 CFLAGS-test-iseqsig-excess-precision.c
+= -fexcess-precision
=standard
986 CFLAGS-test-flt-eval-method.c
+= -fexcess-precision
=standard
988 CFLAGS-test-fe-snans-always-signal.c
+= $(config-cflags-signaling-nans
)
990 CFLAGS-test-nan-const.c
+= -fno-builtin
994 gen-all-calls
= $(gen-libm-calls
) $(gen-calls
)
996 generated
+= $(addsuffix .c
,$(call type-foreach
,$(gen-all-calls
))) \
997 gen-libm-templates.stmp
999 # Create wrappers in the math build directory.
1000 $(objpfx
)gen-libm-templates.stmp
: Makefile
1001 $(make-target-directory
)
1002 for gcall in
$(gen-all-calls
); do \
1003 func
=$${gcall
%F
*}$${gcall
#*F}; \
1004 for type in
$(foreach t
,$(types
),$(t
)__
$(type-
$(t
)-suffix)); do \
1005 suff
=$${type
#*__}; \
1006 type
=$${type
%__
*}; \
1007 file
=$(objpfx
)$${gcall
%F
*}$${suff}$${gcall
#*F}.c; \
1009 echo
"#include <math-type-macros-$${type}.h>"; \
1010 echo
"#include <$${func}_template.c>"; \
1016 # Add dependency to ensure the generator runs prior.
1017 $(foreach t
, $(call type-foreach
, $(gen-all-calls
)), \
1018 $(objpfx
)$(t
).c
): $(objpfx
)gen-libm-templates.stmp
1020 # This must come after the inclusion of sysdeps Makefiles via Rules.
1022 $(foreach t
,$(libm-tests-normal
),$(objpfx
)$(t
).c
): $(objpfx
)test-
%.c
:
1024 type
=$${type_func
%%-*}; \
1025 func
=$${type_func
#*-}; \
1027 echo
"#include <test-$$type.h>"; \
1028 echo
"#include <test-math-exceptions.h>"; \
1029 echo
"#include <test-math-errno.h>"; \
1030 echo
"#include <test-math-scalar.h>"; \
1031 echo
"#include <libm-test-$$func.c>"; \
1034 $(foreach t
,$(libm-tests-narrow
),$(objpfx
)$(t
).c
): $(objpfx
)test-
%.c
:
1035 type_pair_func
=$*; \
1036 type_pair
=$${type_pair_func
%-*}; \
1037 func
=$${type_pair_func
##*-}; \
1038 ret_type
=$${type_pair
%%-*}; \
1039 arg_type
=$${type_pair
#*-}; \
1041 echo
"#include <test-$$ret_type.h>"; \
1042 echo
"#include <test-arg-$$arg_type.h>"; \
1043 echo
"#include <test-math-exceptions.h>"; \
1044 echo
"#include <test-math-errno.h>"; \
1045 echo
"#include <test-math-narrow.h>"; \
1046 echo
"#include <libm-test-narrow-$$func.c>"; \
1049 $(foreach t
,$(libm-tests-vector
),$(objpfx
)$(t
).c
): $(objpfx
)test-
%.c
:
1051 type
=$${type_func
%-*}; \
1052 func
=$${type_func
##*-}; \
1053 func_args
=$$(grep ALL_RM_TEST libm-test-
$$func.inc \
1054 | sed
's/.*RUN_TEST_LOOP_//;s/_.*//'); \
1056 echo
"#include <test-$$type.h>"; \
1057 echo
"WRAPPER_DECL_$$func_args (WRAPPER_NAME (FUNC ($$func)))"; \
1058 echo
"#include <libm-test-$$func.c>"; \
1061 $(foreach t
,$(test-types
),\
1062 $(objpfx
)libm-test-support-
$(t
).c
): $(objpfx
)libm-test-support-
%.c
:
1064 echo
"#include <test-$*.h>"; \
1065 echo
"#include <libm-test-support.c>"; \
1068 $(addprefix $(objpfx
), $(libm-tests.o
)): $(objpfx
)libm-test-ulps.h
1070 define o-iterator-doit
1071 $(foreach f
,$(libm-test-funcs-all
),\
1072 $(objpfx
)$(o
)-$(f
).o
): $(objpfx
)$(o
)%.o
: $(objpfx
)libm-test
%.c
1074 object-suffixes-left
:= $(libm-tests-base
)
1075 include $(o-iterator
)
1077 define o-iterator-doit
1078 $(foreach f
,$(libm-test-funcs-narrow
),\
1079 $(objpfx
)$(o
)-$(f
).o
): $(objpfx
)$(o
)%.o
: \
1080 $(objpfx
)libm-test-narrow
%.c
1082 object-suffixes-left
:= $(libm-tests-base-narrow
)
1083 include $(o-iterator
)
1085 define o-iterator-doit
1086 $(foreach f
,$(libm-test-funcs-all
),\
1087 $(objpfx
)$(o
)-$(f
).o
): CFLAGS
+= $(libm-test-no-inline-cflags
)
1089 object-suffixes-left
:= $(libm-tests-base-normal
)
1090 include $(o-iterator
)
1092 define o-iterator-doit
1093 $(foreach f
,$(libm-test-funcs-narrow
),\
1094 $(objpfx
)$(o
)-$(f
).o
): CFLAGS
+= $(libm-test-no-inline-cflags
)
1096 object-suffixes-left
:= $(libm-tests-base-narrow
)
1097 include $(o-iterator
)
1099 define o-iterator-doit
1100 $(foreach f
,$($(o
)-funcs
),\
1101 $(objpfx
)test-
$(o
)-$(f
).o
): CFLAGS
+= $(libm-test-vec-cflags
)
1103 object-suffixes-left
:= $(libmvec-tests
)
1104 include $(o-iterator
)
1106 define o-iterator-doit
1107 $(addprefix $(objpfx
),\
1108 $(call libm-tests-for-type
,$(o
))): $(objpfx
)libm-test-support-
$(o
).o
1110 object-suffixes-left
:= $(test-types
)
1111 include $(o-iterator
)
1113 define o-iterator-doit
1114 $(objpfx
)libm-test-support-
$(o
).o
: CFLAGS
+= $(libm-test-no-inline-cflags
)
1116 object-suffixes-left
:= $(test-types
)
1117 include $(o-iterator
)
1119 # Run the math programs to automatically generate ULPs files.
1122 run-regen-ulps
= $(test-wrapper-env
) \
1123 $(run-program-env
) \
1124 $($*-ENV
) $(rtld-prefix
) $(objpfx
)$${run}
1126 regen-ulps
: $(addprefix $(objpfx
),$(libm-tests
))
1127 rm -f
$(objpfx
)ULPs
; rm -f
$(objpfx
)NewUlps
; \
1128 cp
$(ulps-file
) $(objpfx
)libm-test-ulps
; \
1129 for run in
$(libm-tests
); do \
1130 echo
"Regenerating ULPs for $${run}"; \
1131 $(run-regen-ulps
) -u
-o
$(objpfx
); \
1132 cat
$(objpfx
)ULPs
>> $(objpfx
)libm-test-ulps
; \
1135 $(PYTHON
) gen-libm-test.py
-n
$(objpfx
)NewUlps \
1136 -u
$(objpfx
)libm-test-ulps
; \
1137 echo
"Automatic regeneration of ULPs complete."; \
1138 echo
"Difference between the current baseline and the new baseline is:";\
1139 diff
-urN
$(ulps-file
) $(objpfx
)NewUlps
; \
1140 echo
"Copy $(objpfx)NewUlps to $(ulps-file) (relative to source)."
1142 # The generated sysd-rules file defines rules like this for sources
1143 # coming from sysdeps/ directories. These rules find the generic sources.
1144 define o-iterator-doit
1145 $(objpfx
)m_
%$o: s_
%.c
$(before-compile
); $$(compile-command.c
)
1147 object-suffixes-left
:= $(all-object-suffixes
)
1148 include $(o-iterator
)
1150 # Likewise, for those generated files shared with libc.
1151 define o-iterator-doit
1152 $(objpfx
)m_
%$o: $(objpfx
)s_
%.c
$(before-compile
); $$(compile-command.c
)
1154 object-suffixes-left
:= $(all-object-suffixes
)
1155 include $(o-iterator
)
1157 ifneq ($(long-double-fcts
),yes
)
1158 # The `double' and `long double' types are the same on this machine.
1159 # We won't compile the `long double' code at all. Tell the `double' code
1160 # to define aliases for the `FUNCl' names.
1161 math-CPPFLAGS
+= -DNO_LONG_DOUBLE
1162 # GCC 10 diagnoses aliases with types conflicting with built-in
1164 CFLAGS-w_acos.c
+= -fno-builtin-acosl
1165 CFLAGS-w_acosh.c
+= -fno-builtin-acoshl
1166 CFLAGS-w_asin.c
+= -fno-builtin-asinl
1167 CFLAGS-s_asinh.c
+= -fno-builtin-asinhl
1168 CFLAGS-s_atan.c
+= -fno-builtin-atanl
1169 CFLAGS-w_atan2.c
+= -fno-builtin-atan2l
1170 CFLAGS-w_atanh.c
+= -fno-builtin-atanhl
1171 CFLAGS-s_cabs.c
+= -fno-builtin-cabsl
1172 CFLAGS-s_cacos.c
+= -fno-builtin-cacosl
1173 CFLAGS-s_cacosh.c
+= -fno-builtin-cacoshl
1174 CFLAGS-s_canonicalize.c
+= -fno-builtin-canonicalizel
1175 CFLAGS-s_carg.c
+= -fno-builtin-cargl
1176 CFLAGS-s_casin.c
+= -fno-builtin-casinl
1177 CFLAGS-s_casinh.c
+= -fno-builtin-casinhl
1178 CFLAGS-s_catan.c
+= -fno-builtin-catanl
1179 CFLAGS-s_catanh.c
+= -fno-builtin-catanhl
1180 CFLAGS-s_cbrt.c
+= -fno-builtin-cbrtl
1181 CFLAGS-s_ccos.c
+= -fno-builtin-ccosl
1182 CFLAGS-s_ccosh.c
+= -fno-builtin-ccoshl
1183 CFLAGS-s_ceil.c
+= -fno-builtin-ceill
1184 CFLAGS-s_cexp.c
+= -fno-builtin-cexpl
1185 CFLAGS-s_cimag.c
+= -fno-builtin-cimagl
1186 CFLAGS-s_clog.c
+= -fno-builtin-clogl
1187 CFLAGS-s_clog10.c
+= -fno-builtin-clog10l
1188 CFLAGS-s_conj.c
+= -fno-builtin-conjl
1189 CFLAGS-s_copysign.c
+= -fno-builtin-copysignl
1190 CFLAGS-s_cos.c
+= -fno-builtin-cosl
1191 CFLAGS-w_cosh.c
+= -fno-builtin-coshl
1192 CFLAGS-s_cpow.c
+= -fno-builtin-cpowl
1193 CFLAGS-s_cproj.c
+= -fno-builtin-cprojl
1194 CFLAGS-s_creal.c
+= -fno-builtin-creall
1195 CFLAGS-s_csin.c
+= -fno-builtin-csinl
1196 CFLAGS-s_csinh.c
+= -fno-builtin-csinhl
1197 CFLAGS-s_csqrt.c
+= -fno-builtin-csqrtl
1198 CFLAGS-s_ctan.c
+= -fno-builtin-ctanl
1199 CFLAGS-s_ctanh.c
+= -fno-builtin-ctanhl
1200 CFLAGS-s_erf.c
+= -fno-builtin-erfl
1201 CFLAGS-s_erfc.c
+= -fno-builtin-erfcl
1202 CFLAGS-e_exp.c
+= -fno-builtin-expl
1203 CFLAGS-w_exp10.c
+= -fno-builtin-exp10l
1204 CFLAGS-e_exp2.c
+= -fno-builtin-exp2l
1205 CFLAGS-s_expm1.c
+= -fno-builtin-expm1l
1206 CFLAGS-s_f32xaddf64.c
+= -fno-builtin-daddl
1207 CFLAGS-s_f32xdivf64.c
+= -fno-builtin-ddivl
1208 CFLAGS-s_f32xfmaf64.c
+= -fno-builtin-dfmal
1209 CFLAGS-s_f32xmulf64.c
+= -fno-builtin-dmull
1210 CFLAGS-s_f32xsqrtf64.c
+= -fno-builtin-dsqrtl
1211 CFLAGS-s_f32xsubf64.c
+= -fno-builtin-dsubl
1212 CFLAGS-s_fabs.c
+= -fno-builtin-fabsl
1213 CFLAGS-s_fadd.c
+= -fno-builtin-faddl
1214 CFLAGS-s_fdim.c
+= -fno-builtin-fdiml
1215 CFLAGS-s_fdiv.c
+= -fno-builtin-fdivl
1216 CFLAGS-s_ffma.c
+= -fno-builtin-ffmal
1217 CFLAGS-s_finite.c
+= -fno-builtin-finitel
1218 CFLAGS-s_floor.c
+= -fno-builtin-floorl
1219 CFLAGS-s_fma.c
+= -fno-builtin-fmal
1220 CFLAGS-s_fmax.c
+= -fno-builtin-fmaxl
1221 CFLAGS-s_fmaximum.c
+= -fno-builtin-fmaximuml
1222 CFLAGS-s_fmaximum_mag.c
+= -fno-builtin-fmaximum_magl
1223 CFLAGS-s_fmaximum_mag_num.c
+= -fno-builtin-fmaximum_mag_numl
1224 CFLAGS-s_fmaximum_num.c
+= -fno-builtin-fmaximum_numl
1225 CFLAGS-s_fmaxmag.c
+= -fno-builtin-fmaxmagl
1226 CFLAGS-s_fmin.c
+= -fno-builtin-fminl
1227 CFLAGS-s_fminimum.c
+= -fno-builtin-fminimuml
1228 CFLAGS-s_fminimum_mag.c
+= -fno-builtin-fminimum_magl
1229 CFLAGS-s_fminimum_mag_num.c
+= -fno-builtin-fminimum_mag_numl
1230 CFLAGS-s_fminimum_num.c
+= -fno-builtin-fminimum_numl
1231 CFLAGS-s_fminmag.c
+= -fno-builtin-fminmagl
1232 CFLAGS-w_fmod.c
+= -fno-builtin-fmodl
1233 CFLAGS-s_fmul.c
+= -fno-builtin-fmull
1234 CFLAGS-s_frexp.c
+= -fno-builtin-frexpl
1235 CFLAGS-s_fromfp.c
+= -fno-builtin-fromfpl
1236 CFLAGS-s_fromfpx.c
+= -fno-builtin-fromfpxl
1237 CFLAGS-s_fsqrt.c
+= -fno-builtin-fsqrtl
1238 CFLAGS-s_fsub.c
+= -fno-builtin-fsubl
1239 CFLAGS-s_getpayload.c
+= -fno-builtin-getpayloadl
1240 CFLAGS-w_hypot.c
+= -fno-builtin-hypotl
1241 CFLAGS-w_ilogb.c
+= -fno-builtin-ilogbl
1242 CFLAGS-s_isinf.c
+= -fno-builtin-isinfl
1243 CFLAGS-s_isnan.c
+= -fno-builtin-isnanl
1244 CFLAGS-w_j0.c
+= -fno-builtin-j0l
1245 CFLAGS-w_j1.c
+= -fno-builtin-j1l
1246 CFLAGS-w_jn.c
+= -fno-builtin-jnl
1247 CFLAGS-s_ldexp.c
+= -fno-builtin-ldexpl
1248 CFLAGS-w_lgamma.c
+= -fno-builtin-lgammal
1249 CFLAGS-w_lgamma_r.c
+= -fno-builtin-lgammal_r
1250 CFLAGS-w_llogb.c
+= -fno-builtin-llogbl
1251 CFLAGS-s_llrint.c
+= -fno-builtin-llrintl
1252 CFLAGS-s_llround.c
+= -fno-builtin-llroundl
1253 CFLAGS-e_log.c
+= -fno-builtin-logl
1254 CFLAGS-w_log10.c
+= -fno-builtin-log10l
1255 CFLAGS-w_log1p.c
+= -fno-builtin-log1pl
1256 CFLAGS-e_log2.c
+= -fno-builtin-log2l
1257 CFLAGS-s_logb.c
+= -fno-builtin-logbl
1258 CFLAGS-s_lrint.c
+= -fno-builtin-lrintl
1259 CFLAGS-s_lround.c
+= -fno-builtin-lroundl
1260 CFLAGS-s_modf.c
+= -fno-builtin-modfl
1261 CFLAGS-s_nan.c
+= -fno-builtin-nanl
1262 CFLAGS-s_nearbyint.c
+= -fno-builtin-nearbyintl
1263 CFLAGS-s_nextafter.c
+= -fno-builtin-nextafterl
1264 CFLAGS-s_nextdown.c
+= -fno-builtin-nextdownl
1265 CFLAGS-s_nexttoward.c
+= -fno-builtin-nexttoward
-fno-builtin-nexttowardl
1266 CFLAGS-s_nexttowardf.c
+= -fno-builtin-nexttowardf
1267 CFLAGS-s_nextup.c
+= -fno-builtin-nextupl
1268 CFLAGS-e_pow.c
+= -fno-builtin-powl
1269 CFLAGS-w_remainder.c
+= -fno-builtin-remainderl
-fno-builtin-dreml
1270 CFLAGS-s_remquo.c
+= -fno-builtin-remquol
1271 CFLAGS-s_rint.c
+= -fno-builtin-rintl
1272 CFLAGS-s_round.c
+= -fno-builtin-roundl
1273 CFLAGS-s_roundeven.c
+= -fno-builtin-roundevenl
1274 CFLAGS-w_scalb.c
+= -fno-builtin-scalbl
1275 CFLAGS-w_scalbln.c
+= -fno-builtin-scalblnl
1276 CFLAGS-s_scalbn.c
+= -fno-builtin-scalbnl
1277 CFLAGS-s_setpayload.c
+= -fno-builtin-setpayloadl
1278 CFLAGS-s_setpayloadsig.c
+= -fno-builtin-setpayloadsigl
1279 CFLAGS-s_significand.c
+= -fno-builtin-significandl
1280 CFLAGS-s_sin.c
+= -fno-builtin-sinl
1281 CFLAGS-s_sincos.c
+= -fno-builtin-sincosl
1282 CFLAGS-w_sinh.c
+= -fno-builtin-sinhl
1283 CFLAGS-w_sqrt.c
+= -fno-builtin-sqrtl
1284 CFLAGS-s_tan.c
+= -fno-builtin-tanl
1285 CFLAGS-s_tanh.c
+= -fno-builtin-tanhl
1286 CFLAGS-w_tgamma.c
+= -fno-builtin-tgammal
1287 CFLAGS-s_totalorder.c
+= -fno-builtin-totalorderl
1288 CFLAGS-s_totalordermag.c
+= -fno-builtin-totalordermagl
1289 CFLAGS-s_trunc.c
+= -fno-builtin-truncl
1290 CFLAGS-s_ufromfp.c
+= -fno-builtin-ufromfpl
1291 CFLAGS-s_ufromfpx.c
+= -fno-builtin-ufromfpxl
1292 CFLAGS-s_y0.c
+= -fno-builtin-y0l
1293 CFLAGS-s_y1.c
+= -fno-builtin-y1l
1294 CFLAGS-s_yn.c
+= -fno-builtin-ynl
1297 # Likewise, for _Float32x and _Float64 aliases.
1298 CFLAGS-w_acos.c
+= -fno-builtin-acosf32x
-fno-builtin-acosf64
1299 CFLAGS-w_acosh.c
+= -fno-builtin-acoshf32x
-fno-builtin-acoshf64
1300 CFLAGS-w_asin.c
+= -fno-builtin-asinf32x
-fno-builtin-asinf64
1301 CFLAGS-s_asinh.c
+= -fno-builtin-asinhf32x
-fno-builtin-asinhf64
1302 CFLAGS-s_atan.c
+= -fno-builtin-atanf32x
-fno-builtin-atanf64
1303 CFLAGS-w_atan2.c
+= -fno-builtin-atan2f32x
-fno-builtin-atan2f64
1304 CFLAGS-w_atanh.c
+= -fno-builtin-atanhf32x
-fno-builtin-atanhf64
1305 CFLAGS-s_cabs.c
+= -fno-builtin-cabsf32x
-fno-builtin-cabsf64
1306 CFLAGS-s_cacos.c
+= -fno-builtin-cacosf32x
-fno-builtin-cacosf64
1307 CFLAGS-s_cacosh.c
+= -fno-builtin-cacoshf32x
-fno-builtin-cacoshf64
1308 CFLAGS-s_canonicalize.c
+= -fno-builtin-canonicalizef32x
-fno-builtin-canonicalizef64
1309 CFLAGS-s_carg.c
+= -fno-builtin-cargf32x
-fno-builtin-cargf64
1310 CFLAGS-s_casin.c
+= -fno-builtin-casinf32x
-fno-builtin-casinf64
1311 CFLAGS-s_casinh.c
+= -fno-builtin-casinhf32x
-fno-builtin-casinhf64
1312 CFLAGS-s_catan.c
+= -fno-builtin-catanf32x
-fno-builtin-catanf64
1313 CFLAGS-s_catanh.c
+= -fno-builtin-catanhf32x
-fno-builtin-catanhf64
1314 CFLAGS-s_cbrt.c
+= -fno-builtin-cbrtf32x
-fno-builtin-cbrtf64
1315 CFLAGS-s_ccos.c
+= -fno-builtin-ccosf32x
-fno-builtin-ccosf64
1316 CFLAGS-s_ccosh.c
+= -fno-builtin-ccoshf32x
-fno-builtin-ccoshf64
1317 CFLAGS-s_ceil.c
+= -fno-builtin-ceilf32x
-fno-builtin-ceilf64
1318 CFLAGS-s_cexp.c
+= -fno-builtin-cexpf32x
-fno-builtin-cexpf64
1319 CFLAGS-s_cimag.c
+= -fno-builtin-cimagf32x
-fno-builtin-cimagf64
1320 CFLAGS-s_clog.c
+= -fno-builtin-clogf32x
-fno-builtin-clogf64
1321 CFLAGS-s_clog10.c
+= -fno-builtin-clog10f32x
-fno-builtin-clog10f64
1322 CFLAGS-s_conj.c
+= -fno-builtin-conjf32x
-fno-builtin-conjf64
1323 CFLAGS-s_copysign.c
+= -fno-builtin-copysignf32x
-fno-builtin-copysignf64
1324 CFLAGS-s_cos.c
+= -fno-builtin-cosf32x
-fno-builtin-cosf64
1325 CFLAGS-w_cosh.c
+= -fno-builtin-coshf32x
-fno-builtin-coshf64
1326 CFLAGS-s_cpow.c
+= -fno-builtin-cpowf32x
-fno-builtin-cpowf64
1327 CFLAGS-s_cproj.c
+= -fno-builtin-cprojf32x
-fno-builtin-cprojf64
1328 CFLAGS-s_creal.c
+= -fno-builtin-crealf32x
-fno-builtin-crealf64
1329 CFLAGS-s_csin.c
+= -fno-builtin-csinf32x
-fno-builtin-csinf64
1330 CFLAGS-s_csinh.c
+= -fno-builtin-csinhf32x
-fno-builtin-csinhf64
1331 CFLAGS-s_csqrt.c
+= -fno-builtin-csqrtf32x
-fno-builtin-csqrtf64
1332 CFLAGS-s_ctan.c
+= -fno-builtin-ctanf32x
-fno-builtin-ctanf64
1333 CFLAGS-s_ctanh.c
+= -fno-builtin-ctanhf32x
-fno-builtin-ctanhf64
1334 CFLAGS-s_erf.c
+= -fno-builtin-erff32x
-fno-builtin-erff64
1335 CFLAGS-s_erfc.c
+= -fno-builtin-erfcf32x
-fno-builtin-erfcf64
1336 CFLAGS-e_exp.c
+= -fno-builtin-expf32x
-fno-builtin-expf64
1337 CFLAGS-w_exp10.c
+= -fno-builtin-exp10f32x
-fno-builtin-exp10f64
1338 CFLAGS-e_exp2.c
+= -fno-builtin-exp2f32x
-fno-builtin-exp2f64
1339 CFLAGS-s_expm1.c
+= -fno-builtin-expm1f32x
-fno-builtin-expm1f64
1340 CFLAGS-s_fabs.c
+= -fno-builtin-fabsf32x
-fno-builtin-fabsf64
1341 CFLAGS-s_fadd.c
+= -fno-builtin-f32addf32x
-fno-builtin-f32addf64
1342 CFLAGS-s_fdim.c
+= -fno-builtin-fdimf32x
-fno-builtin-fdimf64
1343 CFLAGS-s_fdiv.c
+= -fno-builtin-f32divf32x
-fno-builtin-f32divf64
1344 CFLAGS-s_ffma.c
+= -fno-builtin-f32fmaf32x
-fno-builtin-f32fmaf64
1345 CFLAGS-s_floor.c
+= -fno-builtin-floorf32x
-fno-builtin-floorf64
1346 CFLAGS-s_fma.c
+= -fno-builtin-fmaf32x
-fno-builtin-fmaf64
1347 CFLAGS-s_fmax.c
+= -fno-builtin-fmaxf32x
-fno-builtin-fmaxf64
1348 CFLAGS-s_fmaximum.c
+= -fno-builtin-fmaximumf32x
-fno-builtin-fmaximumf64
1349 CFLAGS-s_fmaximum_mag.c
+= -fno-builtin-fmaximum_magf32x
-fno-builtin-fmaximum_magf64
1350 CFLAGS-s_fmaximum_mag_num.c
+= -fno-builtin-fmaximum_mag_numf32x
-fno-builtin-fmaximum_mag_numf64
1351 CFLAGS-s_fmaximum_num.c
+= -fno-builtin-fmaximum_numf32x
-fno-builtin-fmaximum_numf64
1352 CFLAGS-s_fmaxmag.c
+= -fno-builtin-fmaxmagf32x
-fno-builtin-fmaxmagf64
1353 CFLAGS-s_fmin.c
+= -fno-builtin-fminf32x
-fno-builtin-fminf64
1354 CFLAGS-s_fminimum.c
+= -fno-builtin-fminimumf32x
-fno-builtin-fminimumf64
1355 CFLAGS-s_fminimum_mag.c
+= -fno-builtin-fminimum_magf32x
-fno-builtin-fminimum_magf64
1356 CFLAGS-s_fminimum_mag_num.c
+= -fno-builtin-fminimum_mag_numf32x
-fno-builtin-fminimum_mag_numf64
1357 CFLAGS-s_fminimum_num.c
+= -fno-builtin-fminimum_numf32x
-fno-builtin-fminimum_numf64
1358 CFLAGS-s_fminmag.c
+= -fno-builtin-fminmagf32x
-fno-builtin-fminmagf64
1359 CFLAGS-w_fmod.c
+= -fno-builtin-fmodf32x
-fno-builtin-fmodf64
1360 CFLAGS-s_fmul.c
+= -fno-builtin-f32mulf32x
-fno-builtin-f32mulf64
1361 CFLAGS-s_frexp.c
+= -fno-builtin-frexpf32x
-fno-builtin-frexpf64
1362 CFLAGS-s_fromfp.c
+= -fno-builtin-fromfpf32x
-fno-builtin-fromfpf64
1363 CFLAGS-s_fromfpx.c
+= -fno-builtin-fromfpxf32x
-fno-builtin-fromfpxf64
1364 CFLAGS-s_fsqrt.c
+= -fno-builtin-f32sqrtf32x
-fno-builtin-f32sqrtf64
1365 CFLAGS-s_fsub.c
+= -fno-builtin-f32subf32x
-fno-builtin-f32subf64
1366 CFLAGS-s_getpayload.c
+= -fno-builtin-getpayloadf32x
-fno-builtin-getpayloadf64
1367 CFLAGS-w_hypot.c
+= -fno-builtin-hypotf32x
-fno-builtin-hypotf64
1368 CFLAGS-w_ilogb.c
+= -fno-builtin-ilogbf32x
-fno-builtin-ilogbf64
1369 CFLAGS-w_j0.c
+= -fno-builtin-j0f32x
-fno-builtin-j0f64
1370 CFLAGS-w_j1.c
+= -fno-builtin-j1f32x
-fno-builtin-j1f64
1371 CFLAGS-w_jn.c
+= -fno-builtin-jnf32x
-fno-builtin-jnf64
1372 CFLAGS-s_ldexp.c
+= -fno-builtin-ldexpf32x
-fno-builtin-ldexpf64
1373 CFLAGS-w_lgamma.c
+= -fno-builtin-lgammaf32x
-fno-builtin-lgammaf64
1374 CFLAGS-w_lgamma_r.c
+= -fno-builtin-lgammaf32x_r
-fno-builtin-lgammaf64_r
1375 CFLAGS-w_llogb.c
+= -fno-builtin-llogbf32x
-fno-builtin-llogbf64
1376 CFLAGS-s_llrint.c
+= -fno-builtin-llrintf32x
-fno-builtin-llrintf64
1377 CFLAGS-s_llround.c
+= -fno-builtin-llroundf32x
-fno-builtin-llroundf64
1378 CFLAGS-e_log.c
+= -fno-builtin-logf32x
-fno-builtin-logf64
1379 CFLAGS-w_log10.c
+= -fno-builtin-log10f32x
-fno-builtin-log10f64
1380 CFLAGS-w_log1p.c
+= -fno-builtin-log1pf32x
-fno-builtin-log1pf64
1381 CFLAGS-e_log2.c
+= -fno-builtin-log2f32x
-fno-builtin-log2f64
1382 CFLAGS-s_logb.c
+= -fno-builtin-logbf32x
-fno-builtin-logbf64
1383 CFLAGS-s_lrint.c
+= -fno-builtin-lrintf32x
-fno-builtin-lrintf64
1384 CFLAGS-s_lround.c
+= -fno-builtin-lroundf32x
-fno-builtin-lroundf64
1385 CFLAGS-s_modf.c
+= -fno-builtin-modff32x
-fno-builtin-modff64
1386 CFLAGS-s_nan.c
+= -fno-builtin-nanf32x
-fno-builtin-nanf64
1387 CFLAGS-s_nearbyint.c
+= -fno-builtin-nearbyintf32x
-fno-builtin-nearbyintf64
1388 CFLAGS-s_nextafter.c
+= -fno-builtin-nextafterf32x
-fno-builtin-nextafterf64
1389 CFLAGS-s_nextdown.c
+= -fno-builtin-nextdownf32x
-fno-builtin-nextdownf64
1390 CFLAGS-s_nextup.c
+= -fno-builtin-nextupf32x
-fno-builtin-nextupf64
1391 CFLAGS-e_pow.c
+= -fno-builtin-powf32x
-fno-builtin-powf64
1392 CFLAGS-w_remainder.c
+= -fno-builtin-remainderf32x
-fno-builtin-remainderf64
1393 CFLAGS-s_remquo.c
+= -fno-builtin-remquof32x
-fno-builtin-remquof64
1394 CFLAGS-s_rint.c
+= -fno-builtin-rintf32x
-fno-builtin-rintf64
1395 CFLAGS-s_round.c
+= -fno-builtin-roundf32x
-fno-builtin-roundf64
1396 CFLAGS-s_roundeven.c
+= -fno-builtin-roundevenf32x
-fno-builtin-roundevenf64
1397 CFLAGS-w_scalbln.c
+= -fno-builtin-scalblnf32x
-fno-builtin-scalblnf64
1398 CFLAGS-s_scalbn.c
+= -fno-builtin-scalbnf32x
-fno-builtin-scalbnf64
1399 CFLAGS-s_setpayload.c
+= -fno-builtin-setpayloadf32x
-fno-builtin-setpayloadf64
1400 CFLAGS-s_setpayloadsig.c
+= -fno-builtin-setpayloadsigf32x
-fno-builtin-setpayloadsigf64
1401 CFLAGS-s_sin.c
+= -fno-builtin-sinf32x
-fno-builtin-sinf64
1402 CFLAGS-s_sincos.c
+= -fno-builtin-sincosf32x
-fno-builtin-sincosf64
1403 CFLAGS-w_sinh.c
+= -fno-builtin-sinhf32x
-fno-builtin-sinhf64
1404 CFLAGS-w_sqrt.c
+= -fno-builtin-sqrtf32x
-fno-builtin-sqrtf64
1405 CFLAGS-s_tan.c
+= -fno-builtin-tanf32x
-fno-builtin-tanf64
1406 CFLAGS-s_tanh.c
+= -fno-builtin-tanhf32x
-fno-builtin-tanhf64
1407 CFLAGS-w_tgamma.c
+= -fno-builtin-tgammaf32x
-fno-builtin-tgammaf64
1408 CFLAGS-s_totalorder.c
+= -fno-builtin-totalorderf32x
-fno-builtin-totalorderf64
1409 CFLAGS-s_totalordermag.c
+= -fno-builtin-totalordermagf32x
-fno-builtin-totalordermagf64
1410 CFLAGS-s_trunc.c
+= -fno-builtin-truncf32x
-fno-builtin-truncf64
1411 CFLAGS-s_ufromfp.c
+= -fno-builtin-ufromfpf32x
-fno-builtin-ufromfpf64
1412 CFLAGS-s_ufromfpx.c
+= -fno-builtin-ufromfpxf32x
-fno-builtin-ufromfpxf64
1413 CFLAGS-s_y0.c
+= -fno-builtin-y0f32x
-fno-builtin-y0f64
1414 CFLAGS-s_y1.c
+= -fno-builtin-y1f32x
-fno-builtin-y1f64
1415 CFLAGS-s_yn.c
+= -fno-builtin-ynf32x
-fno-builtin-ynf64
1417 # Likewise, for _Float32 aliases.
1418 CFLAGS-w_acosf.c
+= -fno-builtin-acosf32
1419 CFLAGS-w_acoshf.c
+= -fno-builtin-acoshf32
1420 CFLAGS-w_asinf.c
+= -fno-builtin-asinf32
1421 CFLAGS-s_asinhf.c
+= -fno-builtin-asinhf32
1422 CFLAGS-s_atanf.c
+= -fno-builtin-atanf32
1423 CFLAGS-w_atan2f.c
+= -fno-builtin-atan2f32
1424 CFLAGS-w_atanhf.c
+= -fno-builtin-atanhf32
1425 CFLAGS-s_cabsf.c
+= -fno-builtin-cabsf32
1426 CFLAGS-s_cacosf.c
+= -fno-builtin-cacosf32
1427 CFLAGS-s_cacoshf.c
+= -fno-builtin-cacoshf32
1428 CFLAGS-s_canonicalizef.c
+= -fno-builtin-canonicalizef32
1429 CFLAGS-s_cargf.c
+= -fno-builtin-cargf32
1430 CFLAGS-s_casinf.c
+= -fno-builtin-casinf32
1431 CFLAGS-s_casinhf.c
+= -fno-builtin-casinhf32
1432 CFLAGS-s_catanf.c
+= -fno-builtin-catanf32
1433 CFLAGS-s_catanhf.c
+= -fno-builtin-catanhf32
1434 CFLAGS-s_cbrtf.c
+= -fno-builtin-cbrtf32
1435 CFLAGS-s_ccosf.c
+= -fno-builtin-ccosf32
1436 CFLAGS-s_ccoshf.c
+= -fno-builtin-ccoshf32
1437 CFLAGS-s_ceilf.c
+= -fno-builtin-ceilf32
1438 CFLAGS-s_cexpf.c
+= -fno-builtin-cexpf32
1439 CFLAGS-s_cimagf.c
+= -fno-builtin-cimagf32
1440 CFLAGS-s_clogf.c
+= -fno-builtin-clogf32
1441 CFLAGS-s_clog10f.c
+= -fno-builtin-clog10f32
1442 CFLAGS-s_conjf.c
+= -fno-builtin-conjf32
1443 CFLAGS-s_copysignf.c
+= -fno-builtin-copysignf32
1444 CFLAGS-s_cosf.c
+= -fno-builtin-cosf32
1445 CFLAGS-w_coshf.c
+= -fno-builtin-coshf32
1446 CFLAGS-s_cpowf.c
+= -fno-builtin-cpowf32
1447 CFLAGS-s_cprojf.c
+= -fno-builtin-cprojf32
1448 CFLAGS-s_crealf.c
+= -fno-builtin-crealf32
1449 CFLAGS-s_csinf.c
+= -fno-builtin-csinf32
1450 CFLAGS-s_csinhf.c
+= -fno-builtin-csinhf32
1451 CFLAGS-s_csqrtf.c
+= -fno-builtin-csqrtf32
1452 CFLAGS-s_ctanf.c
+= -fno-builtin-ctanf32
1453 CFLAGS-s_ctanhf.c
+= -fno-builtin-ctanhf32
1454 CFLAGS-s_erff.c
+= -fno-builtin-erff32
1455 CFLAGS-s_erfcf.c
+= -fno-builtin-erfcf32
1456 CFLAGS-e_expf.c
+= -fno-builtin-expf32
1457 CFLAGS-w_exp10f.c
+= -fno-builtin-exp10f32
1458 CFLAGS-e_exp2f.c
+= -fno-builtin-exp2f32
1459 CFLAGS-s_expm1f.c
+= -fno-builtin-expm1f32
1460 CFLAGS-s_fabsf.c
+= -fno-builtin-fabsf32
1461 CFLAGS-s_fdimf.c
+= -fno-builtin-fdimf32
1462 CFLAGS-s_floorf.c
+= -fno-builtin-floorf32
1463 CFLAGS-s_fmaf.c
+= -fno-builtin-fmaf32
1464 CFLAGS-s_fmaxf.c
+= -fno-builtin-fmaxf32
1465 CFLAGS-s_fmaximumf.c
+= -fno-builtin-fmaximumf32
1466 CFLAGS-s_fmaximum_magf.c
+= -fno-builtin-fmaximum_magf32
1467 CFLAGS-s_fmaximum_mag_numf.c
+= -fno-builtin-fmaximum_mag_numf32
1468 CFLAGS-s_fmaximum_numf.c
+= -fno-builtin-fmaximum_numf32
1469 CFLAGS-s_fmaxmagf.c
+= -fno-builtin-fmaxmagf32
1470 CFLAGS-s_fminf.c
+= -fno-builtin-fminf32
1471 CFLAGS-s_fminimumf.c
+= -fno-builtin-fminimumf32
1472 CFLAGS-s_fminimum_magf.c
+= -fno-builtin-fminimum_magf32
1473 CFLAGS-s_fminimum_mag_numf.c
+= -fno-builtin-fminimum_mag_numf32
1474 CFLAGS-s_fminimum_numf.c
+= -fno-builtin-fminimum_numf32
1475 CFLAGS-s_fminmagf.c
+= -fno-builtin-fminmagf32
1476 CFLAGS-w_fmodf.c
+= -fno-builtin-fmodf32
1477 CFLAGS-s_frexpf.c
+= -fno-builtin-frexpf32
1478 CFLAGS-s_fromfpf.c
+= -fno-builtin-fromfpf32
1479 CFLAGS-s_fromfpxf.c
+= -fno-builtin-fromfpxf32
1480 CFLAGS-s_getpayloadf.c
+= -fno-builtin-getpayloadf32
1481 CFLAGS-w_hypotf.c
+= -fno-builtin-hypotf32
1482 CFLAGS-w_ilogbf.c
+= -fno-builtin-ilogbf32
1483 CFLAGS-w_j0f.c
+= -fno-builtin-j0f32
1484 CFLAGS-w_j1f.c
+= -fno-builtin-j1f32
1485 CFLAGS-w_jnf.c
+= -fno-builtin-jnf32
1486 CFLAGS-s_ldexpf.c
+= -fno-builtin-ldexpf32
1487 CFLAGS-w_lgammaf.c
+= -fno-builtin-lgammaf32
1488 CFLAGS-w_lgammaf_r.c
+= -fno-builtin-lgammaf32_r
1489 CFLAGS-w_llogbf.c
+= -fno-builtin-llogbf32
1490 CFLAGS-s_llrintf.c
+= -fno-builtin-llrintf32
1491 CFLAGS-s_llroundf.c
+= -fno-builtin-llroundf32
1492 CFLAGS-e_logf.c
+= -fno-builtin-logf32
1493 CFLAGS-w_log10f.c
+= -fno-builtin-log10f32
1494 CFLAGS-w_log1pf.c
+= -fno-builtin-log1pf32
1495 CFLAGS-e_log2f.c
+= -fno-builtin-log2f32
1496 CFLAGS-s_logbf.c
+= -fno-builtin-logbf32
1497 CFLAGS-s_lrintf.c
+= -fno-builtin-lrintf32
1498 CFLAGS-s_lroundf.c
+= -fno-builtin-lroundf32
1499 CFLAGS-s_modff.c
+= -fno-builtin-modff32
1500 CFLAGS-s_nanf.c
+= -fno-builtin-nanf32
1501 CFLAGS-s_nearbyintf.c
+= -fno-builtin-nearbyintf32
1502 CFLAGS-s_nextafterf.c
+= -fno-builtin-nextafterf32
1503 CFLAGS-s_nextdownf.c
+= -fno-builtin-nextdownf32
1504 CFLAGS-s_nextupf.c
+= -fno-builtin-nextupf32
1505 CFLAGS-e_powf.c
+= -fno-builtin-powf32
1506 CFLAGS-w_remainderf.c
+= -fno-builtin-remainderf32
1507 CFLAGS-s_remquof.c
+= -fno-builtin-remquof32
1508 CFLAGS-s_rintf.c
+= -fno-builtin-rintf32
1509 CFLAGS-s_roundf.c
+= -fno-builtin-roundf32
1510 CFLAGS-s_roundevenf.c
+= -fno-builtin-roundevenf32
1511 CFLAGS-w_scalblnf.c
+= -fno-builtin-scalblnf32
1512 CFLAGS-s_scalbnf.c
+= -fno-builtin-scalbnf32
1513 CFLAGS-s_setpayloadf.c
+= -fno-builtin-setpayloadf32
1514 CFLAGS-s_setpayloadsigf.c
+= -fno-builtin-setpayloadsigf32
1515 CFLAGS-s_sinf.c
+= -fno-builtin-sinf32
1516 CFLAGS-s_sincosf.c
+= -fno-builtin-sincosf32
1517 CFLAGS-w_sinhf.c
+= -fno-builtin-sinhf32
1518 CFLAGS-w_sqrtf.c
+= -fno-builtin-sqrtf32
1519 CFLAGS-s_tanf.c
+= -fno-builtin-tanf32
1520 CFLAGS-s_tanhf.c
+= -fno-builtin-tanhf32
1521 CFLAGS-w_tgammaf.c
+= -fno-builtin-tgammaf32
1522 CFLAGS-s_totalorderf.c
+= -fno-builtin-totalorderf32
1523 CFLAGS-s_totalordermagf.c
+= -fno-builtin-totalordermagf32
1524 CFLAGS-s_truncf.c
+= -fno-builtin-truncf32
1525 CFLAGS-s_ufromfpf.c
+= -fno-builtin-ufromfpf32
1526 CFLAGS-s_ufromfpxf.c
+= -fno-builtin-ufromfpxf32
1527 CFLAGS-s_y0f.c
+= -fno-builtin-y0f32
1528 CFLAGS-s_y1f.c
+= -fno-builtin-y1f32
1529 CFLAGS-s_ynf.c
+= -fno-builtin-ynf32
1531 # These files quiet sNaNs in a way that is optimized away without
1533 CFLAGS-s_modf.c
+= $(config-cflags-signaling-nans
)
1534 CFLAGS-s_modff.c
+= $(config-cflags-signaling-nans
)
1535 CFLAGS-s_modfl.c
+= $(config-cflags-signaling-nans
)
1536 CFLAGS-s_modff128.c
+= $(config-cflags-signaling-nans
)
1538 $(addprefix $(objpfx
),\
1539 $(filter-out $(tests-static
) $(libm-tests-vector
),\
1540 $(tests
) $(tests-internal
))): $(libm
)
1541 $(addprefix $(objpfx
),$(tests-static
)): $(objpfx
)libm.a
1542 define o-iterator-doit
1543 $(foreach f
,$($(o
)-funcs
),\
1544 $(objpfx
)test-
$(o
)-$(f
)): $(objpfx
)test-
$(o
)-wrappers.o \
1547 object-suffixes-left
:= $(libmvec-tests
)
1548 include $(o-iterator
)
1550 $(objpfx
)test-fenv-tls
: $(shared-thread-library
)