2 ldbl-extra-routines
+= fwscanf \
21 ifeq ($(subdir
),wcsmbs
)
22 ldbl-extra-routines
+= isoc99_fwscanf \
35 tests-internal
+= test-wcstold-ibm128 test-wcstold-ieee128
36 CFLAGS-test-wcstold-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi
37 CFLAGS-test-wcstold-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi
41 ifeq ($(subdir
),stdio-common
)
42 ldbl-extra-routines
+= printf_size \
70 # Printing long double values with IEEE binary128 format reuses part
71 # of the internal float128 implementation (__printf_fp, __printf_fphex,
72 # and __float128 variables and union members). Likewise, reading these
73 # values reuses __strtof128_internal. Thus, the compilation of the
74 # following functions, must have -mfloat128 and -mabi=ibmlongdouble
75 # passed to the compiler.
76 CFLAGS-vfprintf-internal.c
+= -mfloat128
-mabi
=ibmlongdouble
77 CFLAGS-vfwprintf-internal.c
+= -mfloat128
-mabi
=ibmlongdouble
78 CFLAGS-vfscanf-internal.c
+= -mfloat128
-mabi
=ibmlongdouble
79 CFLAGS-vfwscanf-internal.c
+= -mfloat128
-mabi
=ibmlongdouble
81 # Basic tests for the implementation of long double with IEEE binary128
82 # format and for the related redirections in installed headers.
83 tests-internal
+= test-printf-ieee128 test-printf-ibm128
84 CFLAGS-test-printf-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi
85 CFLAGS-test-printf-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi
87 tests-internal
+= test-wprintf-ieee128 test-wprintf-ibm128
88 CFLAGS-test-wprintf-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi
89 CFLAGS-test-wprintf-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi
91 # The following tests are setting _FORTIFY_SOURCE internally
92 tests-internal
+= test-obstack-ieee128 test-obstack-ibm128
93 CFLAGS-test-obstack-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi \
95 CFLAGS-test-obstack-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi \
98 # The following tests are setting _FORTIFY_SOURCE internally
99 tests-internal
+= test-obstack-chk-ieee128 test-obstack-chk-ibm128
100 CFLAGS-test-obstack-chk-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi \
102 CFLAGS-test-obstack-chk-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi \
105 tests-internal
+= test-scanf-ieee128 test-scanf-ibm128
106 CFLAGS-test-scanf-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi
-std
=c89
-D_GNU_SOURCE
107 CFLAGS-test-scanf-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi
-std
=c89
-D_GNU_SOURCE
109 tests-internal
+= test-wscanf-ieee128 test-wscanf-ibm128
110 CFLAGS-test-wscanf-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi
-std
=c89
-D_GNU_SOURCE
111 CFLAGS-test-wscanf-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi
-std
=c89
-D_GNU_SOURCE
113 tests-internal
+= test-isoc99-scanf-ieee128 test-isoc99-scanf-ibm128
114 CFLAGS-test-isoc99-scanf-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi
-std
=c99
115 CFLAGS-test-isoc99-scanf-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi
-std
=c99
117 tests-internal
+= test-isoc99-wscanf-ieee128 test-isoc99-wscanf-ibm128
118 CFLAGS-test-isoc99-wscanf-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi
-std
=c99
119 CFLAGS-test-isoc99-wscanf-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi
-std
=c99
121 ifeq ($(run-built-tests
),yes
)
122 tests-special
+= $(objpfx
)test-scanf-ieee128.out
123 tests-special
+= $(objpfx
)test-scanf-ibm128.out
125 tests-special
+= $(objpfx
)test-wscanf-ieee128.out
126 tests-special
+= $(objpfx
)test-wscanf-ibm128.out
128 tests-special
+= $(objpfx
)test-isoc99-scanf-ieee128.out
129 tests-special
+= $(objpfx
)test-isoc99-scanf-ibm128.out
131 tests-special
+= $(objpfx
)test-isoc99-wscanf-ieee128.out
132 tests-special
+= $(objpfx
)test-isoc99-wscanf-ibm128.out
135 $(objpfx
)test-scanf-ieee128.out
: \
136 ..
/sysdeps
/ieee754
/ldbl-128ibm-compat
/test-scanf-ldbl-compat.sh \
137 $(objpfx
)test-scanf-ieee128
138 $(SHELL
) $^
'$(test-program-prefix)' $@
; \
141 $(objpfx
)test-scanf-ibm128.out
: \
142 ..
/sysdeps
/ieee754
/ldbl-128ibm-compat
/test-scanf-ldbl-compat.sh \
143 $(objpfx
)test-scanf-ibm128
144 $(SHELL
) $^
'$(test-program-prefix)' $@
; \
147 $(objpfx
)test-wscanf-ieee128.out
: \
148 ..
/sysdeps
/ieee754
/ldbl-128ibm-compat
/test-scanf-ldbl-compat.sh \
149 $(objpfx
)test-wscanf-ieee128
150 $(SHELL
) $^
'$(test-program-prefix)' $@
; \
153 $(objpfx
)test-wscanf-ibm128.out
: \
154 ..
/sysdeps
/ieee754
/ldbl-128ibm-compat
/test-scanf-ldbl-compat.sh \
155 $(objpfx
)test-wscanf-ibm128
156 $(SHELL
) $^
'$(test-program-prefix)' $@
; \
159 $(objpfx
)test-isoc99-scanf-ieee128.out
: \
160 ..
/sysdeps
/ieee754
/ldbl-128ibm-compat
/test-scanf-ldbl-compat.sh \
161 $(objpfx
)test-isoc99-scanf-ieee128
162 $(SHELL
) $^
'$(test-program-prefix)' $@
; \
165 $(objpfx
)test-isoc99-scanf-ibm128.out
: \
166 ..
/sysdeps
/ieee754
/ldbl-128ibm-compat
/test-scanf-ldbl-compat.sh \
167 $(objpfx
)test-isoc99-scanf-ibm128
168 $(SHELL
) $^
'$(test-program-prefix)' $@
; \
171 $(objpfx
)test-isoc99-wscanf-ieee128.out
: \
172 ..
/sysdeps
/ieee754
/ldbl-128ibm-compat
/test-scanf-ldbl-compat.sh \
173 $(objpfx
)test-isoc99-wscanf-ieee128
174 $(SHELL
) $^
'$(test-program-prefix)' $@
; \
177 $(objpfx
)test-isoc99-wscanf-ibm128.out
: \
178 ..
/sysdeps
/ieee754
/ldbl-128ibm-compat
/test-scanf-ldbl-compat.sh \
179 $(objpfx
)test-isoc99-wscanf-ibm128
180 $(SHELL
) $^
'$(test-program-prefix)' $@
; \
183 tests-internal
+= test-printf-size-ieee128 test-printf-size-ibm128
184 CFLAGS-test-printf-size-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi
185 CFLAGS-test-printf-size-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi
187 ifeq ($(run-built-tests
),yes
)
188 tests-special
+= $(objpfx
)test-printf-size-ieee128.out
189 tests-special
+= $(objpfx
)test-printf-size-ibm128.out
192 $(objpfx
)test-printf-size-ieee128.out
: \
193 tst-printfsz-islongdouble.sh
$(objpfx
)test-printf-size-ieee128
194 $(SHELL
) $^
'$(test-program-prefix)' $@
; \
197 $(objpfx
)test-printf-size-ibm128.out
: \
198 tst-printfsz-islongdouble.sh
$(objpfx
)test-printf-size-ibm128
199 $(SHELL
) $^
'$(test-program-prefix)' $@
; \
203 ifeq ($(subdir
),debug
)
204 ldbl-extra-routines
+= asprintf_chk \
225 # The following tests are setting _FORTIFY_SOURCE internally
226 tests-internal
+= test-printf-chk-ieee128 test-printf-chk-ibm128
227 CFLAGS-test-printf-chk-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi \
229 CFLAGS-test-printf-chk-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi \
232 # The following tests are setting _FORTIFY_SOURCE internally
233 tests-internal
+= test-printf-chk-redir-ieee128 test-printf-chk-redir-ibm128
234 CFLAGS-test-printf-chk-redir-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble \
235 -Wno-psabi
-Wno-unused-result \
237 CFLAGS-test-printf-chk-redir-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi \
241 # The following tests are setting _FORTIFY_SOURCE internally
242 tests-internal
+= test-wprintf-chk-ieee128 test-wprintf-chk-ibm128
243 CFLAGS-test-wprintf-chk-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi \
245 CFLAGS-test-wprintf-chk-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi \
248 # The following tests are setting _FORTIFY_SOURCE internally
249 tests-internal
+= test-wprintf-chk-redir-ieee128 test-wprintf-chk-redir-ibm128
250 CFLAGS-test-wprintf-chk-redir-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble \
251 -Wno-psabi
-Wno-unused-result \
253 CFLAGS-test-wprintf-chk-redir-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi \
258 ifeq ($(subdir
),argp
)
259 ldbl-extra-routines
+= argp-help
261 $(objpfx
)tst-ieee128-argp.c
: tst-ldbl-argp.c
264 $(objpfx
)tst-ibm128-argp.c
: tst-ldbl-argp.c
267 tests-internal
+= tst-ieee128-argp tst-ibm128-argp
268 CFLAGS-tst-ieee128-argp.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi
269 CFLAGS-tst-ibm128-argp.c
+= -mabi
=ibmlongdouble
-Wno-psabi
272 ifeq ($(subdir
),misc
)
273 ldbl-extra-routines
+= err \
279 CFLAGS-ieee128-qefgcvt.c
+= -mabi
=ieeelongdouble
-Wno-psabi
-mno-gnu-attribute
280 CFLAGS-ieee128-qefgcvt_r.c
+= -mabi
=ieeelongdouble
-Wno-psabi
-mno-gnu-attribute
282 tests-internal
+= tst-ibm128-warn tst-ieee128-warn
283 tests-internal
+= tst-ibm128-error tst-ieee128-error
284 tests-internal
+= tst-ibm128-efgcvt tst-ieee128-efgcvt
285 tests-internal
+= tst-ieee128-errorfptr
287 $(objpfx
)tst-ibm128-
%.c
: tst-ldbl-
%.c
290 $(objpfx
)tst-ieee128-
%.c
: tst-ldbl-
%.c
293 CFLAGS-tst-ibm128-warn.c
+= -mabi
=ibmlongdouble
-Wno-psabi
294 CFLAGS-tst-ibm128-error.c
+= -mabi
=ibmlongdouble
-Wno-psabi
295 CFLAGS-tst-ibm128-efgcvt.c
+= -mabi
=ibmlongdouble
-Wno-psabi
297 CFLAGS-tst-ieee128-warn.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi
298 CFLAGS-tst-ieee128-error.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi
299 CFLAGS-tst-ieee128-efgcvt.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi
300 CFLAGS-tst-ieee128-errorfptr.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi
302 # The following tests are setting _FORTIFY_SOURCE internally
303 tests-container
+= test-syslog-ieee128 test-syslog-ibm128
304 CFLAGS-test-syslog-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi \
306 CFLAGS-test-syslog-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi \
309 # The following tests are setting _FORTIFY_SOURCE internally
310 tests-container
+= test-syslog-chk-ieee128 test-syslog-chk-ibm128
311 CFLAGS-test-syslog-chk-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi \
313 CFLAGS-test-syslog-chk-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi \
317 ifeq ($(subdir
),stdlib
)
318 ldbl-extra-routines
+= strfmon strfmon_l
320 # Printing long double values with IEEE binary128 format reuses part
321 # of the internal float128 implementation (__printf_fp, __printf_fphex,
322 # and __float128 variables and union members). Thus, the compilation of
323 # the following files, must have -mfloat128 passed to the compiler.
324 # Also, guarantee that they are compiled in IBM long double mode.
325 CFLAGS-strfmon.c
+= -mfloat128
-mabi
=ibmlongdouble
326 CFLAGS-strfmon_l.c
+= -mfloat128
-mabi
=ibmlongdouble
328 tests-internal
+= test-strfmon-ibm128 test-strfmon-ieee128
329 CFLAGS-test-strfmon-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi
330 CFLAGS-test-strfmon-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi
331 $(objpfx
)tst-strfmon-ibm128.out
: $(gen-locales
)
332 $(objpfx
)tst-strfmon-ieee128.out
: $(gen-locales
)
334 tests-internal
+= test-strfrom-ibm128 test-strfrom-ieee128
335 CFLAGS-test-strfrom-ieee128.c
+= -mfloat128
-mabi
=ieeelongdouble
-Wno-psabi
336 CFLAGS-test-strfrom-ibm128.c
+= -mabi
=ibmlongdouble
-Wno-psabi
340 ifeq ($(subdir
),math
)
341 # The totalorder{,mag} compatibility tests were added prior to this
342 # support. Thus, they can only correctly be used with ibm128.
343 CFLAGS-test-ldouble-compat_totalorder.c
+= -mabi
=ibmlongdouble
344 CFLAGS-test-ldouble-compat_totalordermag.c
+= -mabi
=ibmlongdouble
347 ifeq ($(subdir
), stdio-common
)
348 tests
+= tst-ibm128-scanf-binary-c11 \
349 tst-ibm128-scanf-binary-c2x \
350 tst-ibm128-scanf-binary-gnu11 \
351 tst-ibm128-scanf-binary-gnu89 \
352 tst-ieee128-scanf-binary-c11 \
353 tst-ieee128-scanf-binary-c2x \
354 tst-ieee128-scanf-binary-gnu11 \
355 tst-ieee128-scanf-binary-gnu89
357 # Some versions of GCC supported for building glibc do not support -std=c2x, so
358 # the test for that version uses -std=c11 and then _ISOC2X_SOURCE is defined in
359 # the test as needed.
360 CFLAGS-tst-ibm128-scanf-binary-c11.c
+= -mabi
=ibmlongdouble
-Wno-psabi \
361 -std
=c11
-DOBJPFX
=\"$(objpfx
)\"
362 CFLAGS-tst-ibm128-scanf-binary-c2x.c
+= -mabi
=ibmlongdouble
-Wno-psabi \
363 -std
=c11
-DOBJPFX
=\"$(objpfx
)\"
364 CFLAGS-tst-ibm128-scanf-binary-gnu11.c
+= -mabi
=ibmlongdouble
-Wno-psabi \
365 -std
=gnu11
-DOBJPFX
=\"$(objpfx
)\"
366 CFLAGS-tst-ibm128-scanf-binary-gnu89.c
+= -mabi
=ibmlongdouble
-Wno-psabi \
367 -std
=gnu89
-DOBJPFX
=\"$(objpfx
)\"
368 CFLAGS-tst-ieee128-scanf-binary-c11.c
+= -mfloat128
-mabi
=ieeelongdouble \
369 -Wno-psabi
-std
=c11 \
370 -DOBJPFX
=\"$(objpfx
)\"
371 CFLAGS-tst-ieee128-scanf-binary-c2x.c
+= -mfloat128
-mabi
=ieeelongdouble \
372 -Wno-psabi
-std
=c11 \
373 -DOBJPFX
=\"$(objpfx
)\"
374 CFLAGS-tst-ieee128-scanf-binary-gnu11.c
+= -mfloat128
-mabi
=ieeelongdouble \
375 -Wno-psabi
-std
=gnu11 \
376 -DOBJPFX
=\"$(objpfx
)\"
377 CFLAGS-tst-ieee128-scanf-binary-gnu89.c
+= -mfloat128
-mabi
=ieeelongdouble \
378 -Wno-psabi
-std
=gnu89 \
379 -DOBJPFX
=\"$(objpfx
)\"
383 ifeq ($(subdir
), wcsmbs
)
384 tests
+= tst-ibm128-wscanf-binary-c11 \
385 tst-ibm128-wscanf-binary-c2x \
386 tst-ibm128-wscanf-binary-gnu11 \
387 tst-ibm128-wscanf-binary-gnu89 \
388 tst-ieee128-wscanf-binary-c11 \
389 tst-ieee128-wscanf-binary-c2x \
390 tst-ieee128-wscanf-binary-gnu11 \
391 tst-ieee128-wscanf-binary-gnu89
393 # Some versions of GCC supported for building glibc do not support -std=c2x, so
394 # the test for that version uses -std=c11 and then _ISOC2X_SOURCE is defined in
395 # the test as needed.
396 CFLAGS-tst-ibm128-wscanf-binary-c11.c
+= -mabi
=ibmlongdouble
-Wno-psabi \
397 -std
=c11
-DOBJPFX
=\"$(objpfx
)\"
398 CFLAGS-tst-ibm128-wscanf-binary-c2x.c
+= -mabi
=ibmlongdouble
-Wno-psabi \
399 -std
=c11
-DOBJPFX
=\"$(objpfx
)\"
400 CFLAGS-tst-ibm128-wscanf-binary-gnu11.c
+= -mabi
=ibmlongdouble
-Wno-psabi \
401 -std
=gnu11
-DOBJPFX
=\"$(objpfx
)\"
402 CFLAGS-tst-ibm128-wscanf-binary-gnu89.c
+= -mabi
=ibmlongdouble
-Wno-psabi \
403 -std
=gnu89
-DOBJPFX
=\"$(objpfx
)\"
404 CFLAGS-tst-ieee128-wscanf-binary-c11.c
+= -mfloat128
-mabi
=ieeelongdouble \
405 -Wno-psabi
-std
=c11 \
406 -DOBJPFX
=\"$(objpfx
)\"
407 CFLAGS-tst-ieee128-wscanf-binary-c2x.c
+= -mfloat128
-mabi
=ieeelongdouble \
408 -Wno-psabi
-std
=c11 \
409 -DOBJPFX
=\"$(objpfx
)\"
410 CFLAGS-tst-ieee128-wscanf-binary-gnu11.c
+= -mfloat128
-mabi
=ieeelongdouble \
411 -Wno-psabi
-std
=gnu11 \
412 -DOBJPFX
=\"$(objpfx
)\"
413 CFLAGS-tst-ieee128-wscanf-binary-gnu89.c
+= -mfloat128
-mabi
=ieeelongdouble \
414 -Wno-psabi
-std
=gnu89 \
415 -DOBJPFX
=\"$(objpfx
)\"
419 # Add IEEE binary128 files as make targets.
420 routines
+= $(foreach r
,$(ldbl-extra-routines
),ieee128-
$(r
))
422 routines_no_fortify
+= \
445 # routines_no_fortify
447 # On powerpc64le, the routines responsible for converting between long
448 # double and string (e.g.: printf, scanf, strtold, strfroml) default to
449 # IBM long double mode. When support for TS 18661-3 was added, several
450 # internal functions were modified so that they could also handle
451 # floating-point variables with IEEE binary128 format, but as an
452 # additional type, _Float128.
454 # The following rule ensures that the string conversion routines will
455 # always be built in IBM long double mode, with additional support for
456 # IEEE binary128, through the use of -mabi=ibmlongdouble and -mfloat128.
457 ldbl-ibm128-files
:= $(objpfx
)test-
%-ibm128^ \
458 $(objpfx
)iovdprintf^ \
459 $(objpfx
)iovsprintf^ \
460 $(objpfx
)iovsscanf^ \
461 $(objpfx
)iovswscanf^ \
462 $(objpfx
)iovfscanf^ \
465 $(objpfx
)strtold_nan^ \
466 $(objpfx
)strtold_l^ \
469 $(objpfx
)wcstold_nan^ \
470 $(objpfx
)wcstold_l^ \
472 $(objpfx
)printf_fphex^ \
473 $(objpfx
)printf_fp^ \
474 $(foreach r
,$(ldbl-extra-routines
),$(objpfx
)$(r
)^
) \
475 $(foreach r
,$(ldbl-extra-routines
),$(objpfx
)$(r
)-internal^
)
476 obj-suf-foreach
= $(foreach suf
,$(all-object-suffixes
),$(subst ^
,$(suf
),$(1)))
478 # Explicitly add -mabi=ibm-long-double to required files.
479 $(call obj-suf-foreach
,$(ldbl-ibm128-files
)): \
480 sysdep-CFLAGS
+= -mabi
=ibmlongdouble