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
173 tst-fgetwc-after-eof \
186 tst-wcstod-nan-locale \
187 tst-wcstod-nan-sign \
190 tst-wcstol-binary-c11 \
191 tst-wcstol-binary-c23 \
192 tst-wcstol-binary-gnu11 \
193 tst-wcstol-binary-gnu23 \
197 tst-wscanf-binary-c11 \
198 tst-wscanf-binary-c23 \
199 tst-wscanf-binary-gnu11 \
200 tst-wscanf-binary-gnu89 \
202 tst-wscanf-to_inpunct \
209 ifeq ($(run-built-tests
),yes
)
213 en_US.ANSI_X3.4
-1968 \
222 include ..
/gen-locales.mk
224 $(objpfx
)tst-btowc.out
: $(gen-locales
)
225 $(objpfx
)tst-c16c32-1.out
: $(gen-locales
)
226 $(objpfx
)tst-mbrtowc.out
: $(gen-locales
)
227 $(objpfx
)tst-mbrtowc2.out
: $(gen-locales
)
228 $(objpfx
)tst-wcrtomb.out
: $(gen-locales
)
229 $(objpfx
)wcsmbs-tst1.out
: $(gen-locales
)
230 $(objpfx
)tst-wcstol-locale.out
: $(gen-locales
)
231 $(objpfx
)tst-wcstod-nan-locale.out
: $(gen-locales
)
232 $(objpfx
)tst-c16-surrogate.out
: $(gen-locales
)
233 $(objpfx
)tst-c32-state.out
: $(gen-locales
)
234 $(objpfx
)test-c8rtomb.out
: $(gen-locales
)
235 $(objpfx
)test-mbrtoc8.out
: $(gen-locales
)
236 $(objpfx
)tst-wscanf-to_inpunct.out
: $(gen-locales
)
239 $(objpfx
)tst-wcstod-round
: $(libm
)
241 CFLAGS-wcwidth.c
+= -I..
/wctype
242 CFLAGS-wcswidth.c
+= -I..
/wctype
244 strtox-CFLAGS
= -I..
/include
245 CFLAGS-wcstol.c
+= $(strtox-CFLAGS
) $(config-cflags-wno-ignored-attributes
)
246 CFLAGS-wcstoul.c
+= $(strtox-CFLAGS
) $(config-cflags-wno-ignored-attributes
)
247 CFLAGS-wcstoll.c
+= $(strtox-CFLAGS
)
248 CFLAGS-wcstoull.c
+= $(strtox-CFLAGS
)
249 CFLAGS-wcstod.c
+= $(strtox-CFLAGS
) $(config-cflags-wno-ignored-attributes
)
250 CFLAGS-wcstold.c
+= $(strtox-CFLAGS
) $(config-cflags-wno-ignored-attributes
)
251 CFLAGS-wcstof128.c
+= $(strtox-CFLAGS
)
252 CFLAGS-wcstof.c
+= $(strtox-CFLAGS
) $(config-cflags-wno-ignored-attributes
)
253 CFLAGS-wcstol_l.c
+= $(strtox-CFLAGS
)
254 CFLAGS-wcstoul_l.c
+= $(strtox-CFLAGS
)
255 CFLAGS-wcstoll_l.c
+= $(strtox-CFLAGS
)
256 CFLAGS-wcstoull_l.c
+= $(strtox-CFLAGS
)
257 CFLAGS-wcstod_l.c
+= $(strtox-CFLAGS
) $(config-cflags-wno-ignored-attributes
)
258 CFLAGS-wcstold_l.c
+= $(strtox-CFLAGS
) $(config-cflags-wno-ignored-attributes
)
259 CFLAGS-wcstof128_l.c
+= $(strtox-CFLAGS
)
260 CFLAGS-wcstof_l.c
+= $(strtox-CFLAGS
) $(config-cflags-wno-ignored-attributes
)
261 CPPFLAGS-tst-wchar-h.c
+= $(no-fortify-source
),-D_FORTIFY_SOURCE
=2
263 CFLAGS-wcschr.c
+= $(config-cflags-wno-ignored-attributes
)
264 CFLAGS-wmemchr.c
+= $(config-cflags-wno-ignored-attributes
)
265 CFLAGS-wmemset.c
+= $(config-cflags-wno-ignored-attributes
)
266 CFLAGS-mbrtowc.c
+= $(config-cflags-wno-ignored-attributes
)
267 CFLAGS-wcrtomb.c
+= $(config-cflags-wno-ignored-attributes
)
268 CFLAGS-wcstoll.c
+= $(config-cflags-wno-ignored-attributes
)
269 CFLAGS-wcstoull.c
+= $(config-cflags-wno-ignored-attributes
)
271 CFLAGS-isoc99_wscanf.c
+= -fexceptions
272 CFLAGS-isoc99_fwscanf.c
+= -fexceptions
273 CFLAGS-isoc99_vwscanf.c
+= -fexceptions
274 CFLAGS-isoc99_vfwscanf.c
+= -fexceptions
275 CFLAGS-isoc23_wscanf.c
+= -fexceptions
276 CFLAGS-isoc23_fwscanf.c
+= -fexceptions
277 CFLAGS-isoc23_vwscanf.c
+= -fexceptions
278 CFLAGS-isoc23_vfwscanf.c
+= -fexceptions
280 CPPFLAGS
+= $(libio-mtsafe
)
282 # We need to find the default version of strtold_l in stdlib.
283 CPPFLAGS-wcstold_l.c
+= -I..
/stdlib
285 $(objpfx
)tst-wcstod-nan-locale
: $(libm
)
286 $(objpfx
)tst-wcstod-nan-sign
: $(libm
)
288 # Some versions of GCC supported for building glibc do not support -std=c23
289 # or -std=gnu23 (added in GCC 14), or the older names -std=c2x or -std=gnu2x
290 # (added in GCC 9), so the tests for those versions use -std=c11 and -std=gnu11
291 # and then _ISOC23_SOURCE is defined in the test as needed.
292 CFLAGS-tst-wcstol-binary-c11.c
+= -std
=c11
293 CFLAGS-tst-wcstol-binary-c23.c
+= -std
=c11
294 CFLAGS-tst-wcstol-binary-gnu11.c
+= -std
=gnu11
295 CFLAGS-tst-wcstol-binary-gnu23.c
+= -std
=gnu11
296 CFLAGS-tst-wscanf-binary-c11.c
+= -std
=c11
-DOBJPFX
=\"$(objpfx
)\"
297 CFLAGS-tst-wscanf-binary-c23.c
+= -std
=c11
-DOBJPFX
=\"$(objpfx
)\"
298 CFLAGS-tst-wscanf-binary-gnu11.c
+= -std
=gnu11
-DOBJPFX
=\"$(objpfx
)\"
299 CFLAGS-tst-wscanf-binary-gnu89.c
+= -std
=gnu89
-DOBJPFX
=\"$(objpfx
)\"