ldbl-128ibm: Let long double files have specific compiler flags
authorTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Thu, 15 Feb 2018 17:44:47 +0000 (15:44 -0200)
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>
Fri, 6 Mar 2020 15:17:32 +0000 (09:17 -0600)
Soon, powerpc64le will need to provide extra compiler flags to the long
double files in order to continue to build using the IBM 128-bit
extended floating point type as long double.

sysdeps/ieee754/ldbl-128ibm/Makefile

index bdba6cc6b57e763e88e6c87cd1542712a7690c9f..c38d4f6ac203fb8eb6716fb3738c2fd5a0e164a0 100644 (file)
@@ -9,8 +9,24 @@ tests += tst-strtold-ldbl-128ibm
 $(objpfx)tst-strtold-ldbl-128ibm: $(libm)
 endif
 
+ldbl-tests = test-fmodl-ldbl-128ibm test-remainderl-ldbl-128ibm \
+            test-remquol-ldbl-128ibm test-canonical-ldbl-128ibm \
+            test-totalorderl-ldbl-128ibm
+
 ifeq ($(subdir),math)
-tests += test-fmodl-ldbl-128ibm test-remainderl-ldbl-128ibm \
-        test-remquol-ldbl-128ibm test-canonical-ldbl-128ibm \
-        test-totalorderl-ldbl-128ibm
+tests += $(ldbl-tests)
 endif
+
+# Long double files may need extra CFLAGS.
+ldbl-128ibm-routines = s_nexttoward s_nexttowardf \
+                      $(type-ldouble-routines) \
+                      $(subst F,$(type-ldouble-suffix),$(libm-compat-calls)) \
+                      $(subst F,$(type-ldouble-suffix),$(libm-calls)) \
+                      $(subst F,$(type-ldouble-suffix),$(calls)) \
+                      $(foreach f,$(libm-narrow-fns), \
+                                $(subst F,$(f), \
+                                        $(libm-narrow-types-ldouble-yes)))
+$(foreach suf,$(all-object-suffixes), \
+         $(foreach r,$(ldbl-128ibm-routines) $(ldbl-tests), \
+                   $(objpfx)$(r)$(suf))): \
+  CFLAGS += $(type-ldouble-CFLAGS)