2 math/Makefile | 20 ++++++++++++++------
3 1 file changed, 14 insertions(+), 6 deletions(-)
8 test-misc test-fpucw tst-definitions test-tgmath test-tgmath-ret \
9 bug-nextafter bug-nexttoward bug-tgmath1 test-tgmath-int \
11 -# We do the `long double' tests only if this data type is available and
12 -# distinct from `double'.
13 +# We do the `long double' tests only if this data type is available.
14 test-longdouble-yes = test-ldouble test-ildoubl
15 distribute += $(test-longdouble-yes:=.c)
17 +ifeq ($(long-double-fcts),yes)
18 +# If we have distinct types then enable testing.
19 +test-long-double-fcts = yes
23 -libm-tests = test-float test-double $(test-longdouble-$(long-double-fcts)) \
24 +libm-tests = test-float test-double $(test-longdouble-$(test-long-double-fcts)) \
25 test-ifloat test-idouble
26 libm-tests.o = $(addsuffix .o,$(libm-tests))
29 ifneq ($(long-double-fcts),yes)
30 # The `double' and `long double' types are the same on this machine.
31 # We won't compile the `long double' code at all. Tell the `double' code
32 -# to define aliases for the `FUNCl' names. To avoid type conflicts in
33 -# defining those aliases, tell <math.h> to declare the `FUNCl' names with
34 -# `double' instead of `long double'.
35 +# to define aliases for the `FUNCl' names.
36 +ifeq ($(header-long-double-fcts),yes)
37 +math-CPPFLAGS += -DNO_LONG_DOUBLE
39 +# To avoid type conflicts in defining those aliases, tell <math.h> to
40 +# declare the `FUNCl' names with `double' instead of `long double'.
41 math-CPPFLAGS += -DNO_LONG_DOUBLE -D_Mlong_double_=double
45 # The fdlibm code generates a lot of these warnings but is otherwise clean.
46 override CFLAGS += -Wno-uninitialized