1 # Copyright (C) 1995-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/>.
19 # Sub-makefile for wcsmbs portion of the library.
26 bits
/types
/__mbstate_t.h \
27 bits
/types
/mbstate_t.h \
124 # Exclude fortified routines from being built with _FORTIFY_SOURCE
125 routines_no_fortify
+= \
143 # routines_no_fortify
174 tst-fgetwc-after-eof \
187 tst-wcstod-nan-locale \
188 tst-wcstod-nan-sign \
191 tst-wcstol-binary-c11 \
192 tst-wcstol-binary-c23 \
193 tst-wcstol-binary-gnu11 \
194 tst-wcstol-binary-gnu23 \
198 tst-wscanf-binary-c11 \
199 tst-wscanf-binary-c23 \
200 tst-wscanf-binary-gnu11 \
201 tst-wscanf-binary-gnu89 \
203 tst-wscanf-to_inpunct \
210 ifeq ($(run-built-tests
),yes
)
214 en_US.ANSI_X3.4
-1968 \
223 include ..
/gen-locales.mk
225 $(objpfx
)tst-btowc.out
: $(gen-locales
)
226 $(objpfx
)tst-c16c32-1.out
: $(gen-locales
)
227 $(objpfx
)tst-mbrtowc.out
: $(gen-locales
)
228 $(objpfx
)tst-mbrtowc2.out
: $(gen-locales
)
229 $(objpfx
)tst-wcrtomb.out
: $(gen-locales
)
230 $(objpfx
)wcsmbs-tst1.out
: $(gen-locales
)
231 $(objpfx
)tst-wcstol-locale.out
: $(gen-locales
)
232 $(objpfx
)tst-wcstod-nan-locale.out
: $(gen-locales
)
233 $(objpfx
)tst-c16-surrogate.out
: $(gen-locales
)
234 $(objpfx
)tst-c32-state.out
: $(gen-locales
)
235 $(objpfx
)test-c8rtomb.out
: $(gen-locales
)
236 $(objpfx
)test-mbrtoc8.out
: $(gen-locales
)
237 $(objpfx
)tst-wscanf-to_inpunct.out
: $(gen-locales
)
240 $(objpfx
)tst-wcstod-round
: $(libm
)
242 CFLAGS-wcwidth.c
+= -I..
/wctype
243 CFLAGS-wcswidth.c
+= -I..
/wctype
245 strtox-CFLAGS
= -I..
/include
246 CFLAGS-wcstol.c
+= $(strtox-CFLAGS
) $(config-cflags-wno-ignored-attributes
)
247 CFLAGS-wcstoul.c
+= $(strtox-CFLAGS
) $(config-cflags-wno-ignored-attributes
)
248 CFLAGS-wcstoll.c
+= $(strtox-CFLAGS
)
249 CFLAGS-wcstoull.c
+= $(strtox-CFLAGS
)
250 CFLAGS-wcstod.c
+= $(strtox-CFLAGS
) $(config-cflags-wno-ignored-attributes
)
251 CFLAGS-wcstold.c
+= $(strtox-CFLAGS
) $(config-cflags-wno-ignored-attributes
)
252 CFLAGS-wcstof128.c
+= $(strtox-CFLAGS
)
253 CFLAGS-wcstof.c
+= $(strtox-CFLAGS
) $(config-cflags-wno-ignored-attributes
)
254 CFLAGS-wcstol_l.c
+= $(strtox-CFLAGS
)
255 CFLAGS-wcstoul_l.c
+= $(strtox-CFLAGS
)
256 CFLAGS-wcstoll_l.c
+= $(strtox-CFLAGS
)
257 CFLAGS-wcstoull_l.c
+= $(strtox-CFLAGS
)
258 CFLAGS-wcstod_l.c
+= $(strtox-CFLAGS
) $(config-cflags-wno-ignored-attributes
)
259 CFLAGS-wcstold_l.c
+= $(strtox-CFLAGS
) $(config-cflags-wno-ignored-attributes
)
260 CFLAGS-wcstof128_l.c
+= $(strtox-CFLAGS
)
261 CFLAGS-wcstof_l.c
+= $(strtox-CFLAGS
) $(config-cflags-wno-ignored-attributes
)
262 CPPFLAGS-tst-wchar-h.c
+= $(no-fortify-source
),-D_FORTIFY_SOURCE
=2
264 CFLAGS-wcschr.c
+= $(config-cflags-wno-ignored-attributes
)
265 CFLAGS-wmemchr.c
+= $(config-cflags-wno-ignored-attributes
)
266 CFLAGS-wmemset.c
+= $(config-cflags-wno-ignored-attributes
)
267 CFLAGS-mbrtowc.c
+= $(config-cflags-wno-ignored-attributes
)
268 CFLAGS-wcrtomb.c
+= $(config-cflags-wno-ignored-attributes
)
269 CFLAGS-wcstoll.c
+= $(config-cflags-wno-ignored-attributes
)
270 CFLAGS-wcstoull.c
+= $(config-cflags-wno-ignored-attributes
)
272 CFLAGS-isoc99_wscanf.c
+= -fexceptions
273 CFLAGS-isoc99_fwscanf.c
+= -fexceptions
274 CFLAGS-isoc99_vwscanf.c
+= -fexceptions
275 CFLAGS-isoc99_vfwscanf.c
+= -fexceptions
276 CFLAGS-isoc23_wscanf.c
+= -fexceptions
277 CFLAGS-isoc23_fwscanf.c
+= -fexceptions
278 CFLAGS-isoc23_vwscanf.c
+= -fexceptions
279 CFLAGS-isoc23_vfwscanf.c
+= -fexceptions
281 CPPFLAGS
+= $(libio-mtsafe
)
283 # We need to find the default version of strtold_l in stdlib.
284 CPPFLAGS-wcstold_l.c
+= -I..
/stdlib
286 $(objpfx
)tst-wcstod-nan-locale
: $(libm
)
287 $(objpfx
)tst-wcstod-nan-sign
: $(libm
)
289 # Some versions of GCC supported for building glibc do not support -std=c23
290 # or -std=gnu23 (added in GCC 14), or the older names -std=c2x or -std=gnu2x
291 # (added in GCC 9), so the tests for those versions use -std=c11 and -std=gnu11
292 # and then _ISOC23_SOURCE is defined in the test as needed.
293 CFLAGS-tst-wcstol-binary-c11.c
+= -std
=c11
294 CFLAGS-tst-wcstol-binary-c23.c
+= -std
=c11
295 CFLAGS-tst-wcstol-binary-gnu11.c
+= -std
=gnu11
296 CFLAGS-tst-wcstol-binary-gnu23.c
+= -std
=gnu11
297 CFLAGS-tst-wscanf-binary-c11.c
+= -std
=c11
-DOBJPFX
=\"$(objpfx
)\"
298 CFLAGS-tst-wscanf-binary-c23.c
+= -std
=c11
-DOBJPFX
=\"$(objpfx
)\"
299 CFLAGS-tst-wscanf-binary-gnu11.c
+= -std
=gnu11
-DOBJPFX
=\"$(objpfx
)\"
300 CFLAGS-tst-wscanf-binary-gnu89.c
+= -std
=gnu89
-DOBJPFX
=\"$(objpfx
)\"