getipv4sourcefilter: Get rid of alloca
[glibc.git] / wcsmbs / Makefile
blobea8ea7b3e6626473169b8b1563c89ae28b43034e
1 # Copyright (C) 1995-2023 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.
21 subdir := wcsmbs
23 include ../Makeconfig
25 headers := \
26 bits/types/__mbstate_t.h \
27 bits/types/mbstate_t.h \
28 bits/types/wint_t.h \
29 bits/wchar-ldbl.h \
30 bits/wchar.h \
31 bits/wchar2-decl.h \
32 bits/wchar2.h \
33 uchar.h \
34 wchar.h \
35 # headers
37 routines := \
38 btowc \
39 c16rtomb \
40 c32rtomb \
41 c8rtomb \
42 isoc23_fwscanf \
43 isoc23_swscanf \
44 isoc23_vfwscanf \
45 isoc23_vswscanf \
46 isoc23_vwscanf \
47 isoc23_wscanf \
48 isoc99_fwscanf \
49 isoc99_swscanf \
50 isoc99_vfwscanf \
51 isoc99_vswscanf \
52 isoc99_vwscanf \
53 isoc99_wscanf \
54 mbrlen \
55 mbrtoc8 \
56 mbrtoc16 \
57 mbrtoc32 \
58 mbrtowc \
59 mbsinit \
60 mbsnrtowcs \
61 mbsrtowcs \
62 mbsrtowcs_l \
63 wcpcpy \
64 wcpncpy \
65 wcrtomb \
66 wcscasecmp \
67 wcscasecmp_l \
68 wcscat \
69 wcschr \
70 wcschrnul \
71 wcscmp \
72 wcscoll \
73 wcscoll_l \
74 wcscpy \
75 wcscspn \
76 wcsdup \
77 wcslen \
78 wcsmbsload \
79 wcsncase \
80 wcsncase_l \
81 wcsncat \
82 wcsncmp \
83 wcsncpy \
84 wcsnlen \
85 wcsnrtombs \
86 wcspbrk \
87 wcsrchr \
88 wcsrtombs \
89 wcsspn \
90 wcsstr \
91 wcstod \
92 wcstod_l \
93 wcstod_nan \
94 wcstof \
95 wcstof_l \
96 wcstof_nan \
97 wcstok \
98 wcstol \
99 wcstol_l \
100 wcstold \
101 wcstold_l \
102 wcstold_nan \
103 wcstoll \
104 wcstoll_l \
105 wcstoul \
106 wcstoul_l \
107 wcstoull \
108 wcstoull_l \
109 wcswidth \
110 wcsxfrm \
111 wcsxfrm_l \
112 wctob \
113 wcwidth \
114 wmemchr \
115 wmemcmp \
116 wmemcpy \
117 wmemmove \
118 wmempcpy \
119 wmemset \
120 # routines
122 tests := \
123 test-c8rtomb \
124 test-char-types \
125 test-mbrtoc8 \
126 test-wcpcpy \
127 test-wcpncpy \
128 test-wcscat \
129 test-wcschr \
130 test-wcschrnul \
131 test-wcscmp \
132 test-wcscpy \
133 test-wcscspn \
134 test-wcsdup \
135 test-wcslen \
136 test-wcsncat \
137 test-wcsncmp \
138 test-wcsncpy \
139 test-wcsnlen \
140 test-wcspbrk \
141 test-wcsrchr \
142 test-wcsspn \
143 test-wmemchr \
144 test-wmemcmp \
145 test-wmemset \
146 tst-btowc \
147 tst-c16-surrogate \
148 tst-c16c32-1 \
149 tst-c32-state \
150 tst-fgetwc-after-eof \
151 tst-mbrtowc \
152 tst-mbrtowc2 \
153 tst-mbsrtowcs \
154 tst-mbstowcs \
155 tst-wchar-h \
156 tst-wcpncpy \
157 tst-wcrtomb \
158 tst-wcsnlen \
159 tst-wcstod-nan-locale \
160 tst-wcstod-nan-sign \
161 tst-wcstod-round \
162 tst-wcstof \
163 tst-wcstol-binary-c11 \
164 tst-wcstol-binary-c2x \
165 tst-wcstol-binary-gnu11 \
166 tst-wcstol-binary-gnu2x \
167 tst-wcstol-locale \
168 tst-wprintf-binary \
169 tst-wscanf-binary-c11 \
170 tst-wscanf-binary-c2x \
171 tst-wscanf-binary-gnu11 \
172 tst-wscanf-binary-gnu89 \
173 wcsatcliff \
174 wcsmbs-tst1 \
175 # tests
177 include ../Rules
179 ifeq ($(run-built-tests),yes)
180 LOCALES := \
181 de_DE.ISO-8859-1 \
182 de_DE.UTF-8 \
183 en_US.ANSI_X3.4-1968 \
184 hr_HR.ISO-8859-2 \
185 ja_JP.EUC-JP \
186 tr_TR.ISO-8859-9 \
187 tr_TR.UTF-8 \
188 zh_HK.BIG5-HKSCS \
189 zh_TW.EUC-TW \
190 # LOCALES
191 include ../gen-locales.mk
193 $(objpfx)tst-btowc.out: $(gen-locales)
194 $(objpfx)tst-c16c32-1.out: $(gen-locales)
195 $(objpfx)tst-mbrtowc.out: $(gen-locales)
196 $(objpfx)tst-mbrtowc2.out: $(gen-locales)
197 $(objpfx)tst-wcrtomb.out: $(gen-locales)
198 $(objpfx)wcsmbs-tst1.out: $(gen-locales)
199 $(objpfx)tst-wcstol-locale.out: $(gen-locales)
200 $(objpfx)tst-wcstod-nan-locale.out: $(gen-locales)
201 $(objpfx)tst-c16-surrogate.out: $(gen-locales)
202 $(objpfx)tst-c32-state.out: $(gen-locales)
203 $(objpfx)test-c8rtomb.out: $(gen-locales)
204 $(objpfx)test-mbrtoc8.out: $(gen-locales)
205 endif
207 $(objpfx)tst-wcstod-round: $(libm)
209 CFLAGS-wcwidth.c += -I../wctype
210 CFLAGS-wcswidth.c += -I../wctype
212 strtox-CFLAGS = -I../include
213 CFLAGS-wcstol.c += $(strtox-CFLAGS) $(config-cflags-wno-ignored-attributes)
214 CFLAGS-wcstoul.c += $(strtox-CFLAGS) $(config-cflags-wno-ignored-attributes)
215 CFLAGS-wcstoll.c += $(strtox-CFLAGS)
216 CFLAGS-wcstoull.c += $(strtox-CFLAGS)
217 CFLAGS-wcstod.c += $(strtox-CFLAGS) $(config-cflags-wno-ignored-attributes)
218 CFLAGS-wcstold.c += $(strtox-CFLAGS) $(config-cflags-wno-ignored-attributes)
219 CFLAGS-wcstof128.c += $(strtox-CFLAGS)
220 CFLAGS-wcstof.c += $(strtox-CFLAGS) $(config-cflags-wno-ignored-attributes)
221 CFLAGS-wcstol_l.c += $(strtox-CFLAGS)
222 CFLAGS-wcstoul_l.c += $(strtox-CFLAGS)
223 CFLAGS-wcstoll_l.c += $(strtox-CFLAGS)
224 CFLAGS-wcstoull_l.c += $(strtox-CFLAGS)
225 CFLAGS-wcstod_l.c += $(strtox-CFLAGS) $(config-cflags-wno-ignored-attributes)
226 CFLAGS-wcstold_l.c += $(strtox-CFLAGS) $(config-cflags-wno-ignored-attributes)
227 CFLAGS-wcstof128_l.c += $(strtox-CFLAGS)
228 CFLAGS-wcstof_l.c += $(strtox-CFLAGS) $(config-cflags-wno-ignored-attributes)
229 CPPFLAGS-tst-wchar-h.c += -D_FORTIFY_SOURCE=2
231 CFLAGS-wcschr.c += $(config-cflags-wno-ignored-attributes)
232 CFLAGS-wmemchr.c += $(config-cflags-wno-ignored-attributes)
233 CFLAGS-wmemset.c += $(config-cflags-wno-ignored-attributes)
234 CFLAGS-mbrtowc.c += $(config-cflags-wno-ignored-attributes)
235 CFLAGS-wcrtomb.c += $(config-cflags-wno-ignored-attributes)
236 CFLAGS-wcstoll.c += $(config-cflags-wno-ignored-attributes)
237 CFLAGS-wcstoull.c += $(config-cflags-wno-ignored-attributes)
239 CFLAGS-isoc99_wscanf.c += -fexceptions
240 CFLAGS-isoc99_fwscanf.c += -fexceptions
241 CFLAGS-isoc99_vwscanf.c += -fexceptions
242 CFLAGS-isoc99_vfwscanf.c += -fexceptions
243 CFLAGS-isoc23_wscanf.c += -fexceptions
244 CFLAGS-isoc23_fwscanf.c += -fexceptions
245 CFLAGS-isoc23_vwscanf.c += -fexceptions
246 CFLAGS-isoc23_vfwscanf.c += -fexceptions
248 CPPFLAGS += $(libio-mtsafe)
250 # We need to find the default version of strtold_l in stdlib.
251 CPPFLAGS-wcstold_l.c += -I../stdlib
253 $(objpfx)tst-wcstod-nan-locale: $(libm)
254 $(objpfx)tst-wcstod-nan-sign: $(libm)
256 # Some versions of GCC supported for building glibc do not support -std=c2x
257 # or -std=gnu2x, so the tests for those versions use -std=c11 and -std=gnu11
258 # and then _ISOC2X_SOURCE is defined in the test as needed.
259 CFLAGS-tst-wcstol-binary-c11.c += -std=c11
260 CFLAGS-tst-wcstol-binary-c2x.c += -std=c11
261 CFLAGS-tst-wcstol-binary-gnu11.c += -std=gnu11
262 CFLAGS-tst-wcstol-binary-gnu2x.c += -std=gnu11
263 CFLAGS-tst-wscanf-binary-c11.c += -std=c11 -DOBJPFX=\"$(objpfx)\"
264 CFLAGS-tst-wscanf-binary-c2x.c += -std=c11 -DOBJPFX=\"$(objpfx)\"
265 CFLAGS-tst-wscanf-binary-gnu11.c += -std=gnu11 -DOBJPFX=\"$(objpfx)\"
266 CFLAGS-tst-wscanf-binary-gnu89.c += -std=gnu89 -DOBJPFX=\"$(objpfx)\"