submitted-longdouble
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Sun, 28 May 2017 17:29:33 +0000 (17:29 +0000)
committerAurelien Jarno <aurel32@debian.org>
Sun, 28 May 2017 17:29:33 +0000 (17:29 +0000)
Gbp-Pq: Topic any
Gbp-Pq: Name submitted-longdouble.diff

math/Makefile

index 4f141812ba6a561434169604b3605f51958153b8..dae63015663bb3cb5c8102e78973ce602a7b634a 100644 (file)
@@ -120,17 +120,21 @@ tests-static = test-fpucw-static test-fpucw-ieee-static \
               test-signgam-uchar-static test-signgam-uchar-init-static \
               test-signgam-uint-static test-signgam-uint-init-static \
               test-signgam-ullong-static test-signgam-ullong-init-static
-# We do the `long double' tests only if this data type is available and
-# distinct from `double'.
+# We do the `long double' tests only if this data type is available.
 test-longdouble-yes = test-ldouble test-ildoubl test-ldouble-finite
 
+ifeq ($(long-double-fcts),yes)
+# If we have distinct types then enable testing.
+test-long-double-fcts = yes
+endif
+
 ifneq (,$(CXX))
 tests += test-math-isinff
 endif
 
 ifneq (no,$(PERL))
 libm-vec-tests = $(addprefix test-,$(libmvec-tests))
-libm-tests = test-float test-double $(test-longdouble-$(long-double-fcts)) \
+libm-tests = test-float test-double $(test-longdouble-$(test-long-double-fcts)) \
        test-ifloat test-idouble test-float-finite test-double-finite \
        $(libm-vec-tests)
 libm-tests.o = $(addsuffix .o,$(libm-tests))
@@ -296,11 +300,15 @@ math-CPPFLAGS += -D__NO_MATH_INLINES -D__LIBC_INTERNAL_MATH_INLINES
 ifneq ($(long-double-fcts),yes)
 # The `double' and `long double' types are the same on this machine.
 # We won't compile the `long double' code at all.  Tell the `double' code
-# to define aliases for the `FUNCl' names.  To avoid type conflicts in
-# defining those aliases, tell <math.h> to declare the `FUNCl' names with
-# `double' instead of `long double'.
+# to define aliases for the `FUNCl' names.
+ifeq ($(header-long-double-fcts),yes)
+math-CPPFLAGS += -DNO_LONG_DOUBLE
+else
+# To avoid type conflicts in  defining those aliases, tell <math.h> to
+# declare the `FUNCl' names with `double' instead of `long double'.
 math-CPPFLAGS += -DNO_LONG_DOUBLE -D_Mlong_double_=double
 endif
+endif
 
 # These files quiet sNaNs in a way that is optimized away without
 # -fsignaling-nans.