AArch64: Remove SVE erf and erfc tables
[glibc.git] / misc / Makefile
bloba932b1aab461bc7dcae49af27848fa563e2611e9
1 # Copyright (C) 1991-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 misc portion of the library.
22 subdir := misc
24 include ../Makeconfig
26 headers := \
27 sys/uio.h \
28 bits/uio-ext.h \
29 bits/uio_lim.h \
30 sys/ioctl.h \
31 bits/ioctls.h \
32 bits/ioctl-types.h \
33 sys/ptrace.h \
34 sys/file.h \
35 sys/dir.h \
36 sys/cdefs.h \
37 ar.h \
38 a.out.h \
39 libgen.h \
40 stab.h \
41 bits/stab.def \
42 sgtty.h \
43 ttyent.h \
44 paths.h \
45 sys/reboot.h \
46 sys/mman.h \
47 sys/param.h \
48 bits/param.h \
49 fstab.h \
50 mntent.h \
51 search.h \
52 err.h \
53 error.h \
54 sys/queue.h \
55 sysexits.h \
56 syscall.h \
57 sys/syscall.h \
58 sys/swap.h \
59 sys/select.h \
60 sys/sysinfo.h \
61 regexp.h \
62 bits/select.h \
63 bits/mman.h \
64 sys/xattr.h \
65 syslog.h \
66 sys/syslog.h \
67 bits/syslog-decl.h \
68 bits/syslog.h \
69 bits/syslog-ldbl.h \
70 bits/syslog-path.h \
71 bits/error.h \
72 bits/select-decl.h \
73 bits/select2.h \
74 bits/hwcap.h \
75 sys/auxv.h \
76 sys/sysmacros.h \
77 bits/sysmacros.h \
78 bits/types/struct_iovec.h \
79 bits/err-ldbl.h \
80 bits/error-ldbl.h \
81 sys/single_threaded.h \
82 # headers
84 routines := \
85 acct \
86 allocate_once \
87 atomic_wide_counter \
88 brk \
89 chflags \
90 chroot \
91 daemon \
92 dirname \
93 efgcvt \
94 efgcvt_r \
95 err \
96 error \
97 fchflags \
98 fd_to_filename \
99 fdatasync \
100 fgetxattr \
101 flistxattr \
102 fremovexattr \
103 fsetxattr \
104 fstab \
105 fsync \
106 ftruncate \
107 ftruncate64 \
108 futimes \
109 futimesat \
110 getauxval \
111 getclktck \
112 getdomain \
113 getdtsz \
114 gethostid \
115 gethostname \
116 getloadavg \
117 getpagesize \
118 getpass \
119 getsysstats \
120 getttyent \
121 getusershell \
122 getxattr \
123 gtty \
124 hsearch \
125 hsearch_r \
126 ifunc-impl-list \
127 insremque \
128 ioctl \
129 lgetxattr \
130 listxattr \
131 llistxattr \
132 lremovexattr \
133 lsearch \
134 lsetxattr \
135 lutimes \
136 madvise \
137 makedev \
138 mincore \
139 mkdtemp \
140 mkostemp \
141 mkostemp64 \
142 mkostemps \
143 mkostemps64 \
144 mkstemp \
145 mkstemp64 \
146 mkstemps \
147 mkstemps64 \
148 mktemp \
149 mlock \
150 mlockall \
151 mmap \
152 mmap64 \
153 mntent \
154 mntent_r \
155 mprotect \
156 msync \
157 munlock \
158 munlockall \
159 munmap \
160 preadv \
161 preadv2 \
162 preadv64 \
163 preadv64v2 \
164 pselect \
165 ptrace \
166 pwritev \
167 pwritev2 \
168 pwritev64 \
169 pwritev64v2 \
170 qefgcvt \
171 qefgcvt_r \
172 readv \
173 reboot \
174 regexp \
175 remap_file_pages \
176 removexattr \
177 revoke \
178 sbrk \
179 select \
180 setdomain \
181 setegid \
182 seteuid \
183 sethostid \
184 sethostname \
185 setregid \
186 setreuid \
187 setxattr \
188 single_threaded \
189 sstk \
190 stty \
191 swapoff \
192 swapon \
193 sync \
194 syncfs \
195 syscall \
196 syslog \
197 truncate \
198 truncate64 \
199 tsearch \
200 ttyslot \
201 ualarm \
202 unwind-link \
203 usleep \
204 ustat \
205 utimes \
206 vhangup \
207 writev \
208 # routines
210 # Exclude fortified routines from being built with _FORTIFY_SOURCE
211 routines_no_fortify += \
212 getdomain \
213 gethostname \
214 syslog \
215 # routines_no_fortify
217 ifeq ($(run-built-tests),yes)
218 ifeq (yes,$(build-shared))
219 ifneq ($(PERL),no)
220 generated += \
221 tst-allocate_once-mem.out \
222 tst-allocate_once.mtrace \
223 tst-error1-mem.out \
224 tst-error1.mtrace \
225 # generated
226 endif
227 endif
228 endif
230 aux := init-misc
231 install-lib := libg.a
233 gpl2lgpl := \
234 error.c \
235 error.h \
236 # gpl2lgpl
238 tests := \
239 bug-hsearch1 \
240 bug18240 \
241 tst-dbl-efgcvt \
242 tst-dirname \
243 tst-empty \
244 tst-error1 \
245 tst-fdset \
246 tst-hsearch \
247 tst-insremque \
248 tst-ioctl \
249 tst-ldbl-efgcvt \
250 tst-ldbl-error \
251 tst-ldbl-errorfptr \
252 tst-ldbl-warn \
253 tst-makedev \
254 tst-mntent \
255 tst-mntent-autofs \
256 tst-mntent-blank-corrupt \
257 tst-mntent-blank-passno \
258 tst-mntent-escape \
259 tst-mntent2 \
260 tst-mremap1 \
261 tst-mremap2 \
262 tst-preadvwritev \
263 tst-preadvwritev2 \
264 tst-preadvwritev64 \
265 tst-preadvwritev64v2 \
266 tst-pselect \
267 tst-select \
268 tst-syscalls \
269 tst-tsearch \
270 tst-warn-wide \
271 # tests
273 tests-time64 := \
274 tst-ioctl-time64 \
275 tst-pselect-time64 \
276 tst-select-time64 \
277 # tests-time64
279 # Tests which need libdl.
280 ifeq (yes,$(build-shared))
281 tests += tst-gethostid
282 endif
284 tests-internal := \
285 tst-allocate_once \
286 tst-atomic \
287 tst-atomic-long \
288 # tests-internal
289 tests-static := tst-empty
291 # Test for the internal, non-exported __fd_to_filename function.
292 tests-internal += tst-fd_to_filename
293 tests-static += tst-fd_to_filename
295 # Tests with long run times.
296 xtests += \
297 tst-mkstemp-fuse \
298 tst-mkstemp-fuse-parallel \
299 # xtests
301 ifeq ($(run-built-tests),yes)
302 ifeq (yes,$(build-shared))
303 ifneq ($(PERL),no)
304 tests-special += \
305 $(objpfx)tst-allocate_once-mem.out \
306 $(objpfx)tst-error1-mem.out \
307 # tests-special
308 endif
309 endif
310 endif
312 tests-container := \
313 tst-syslog \
314 tst-syslog-long-progname \
315 # tests-container
317 CFLAGS-select.c += -fexceptions -fasynchronous-unwind-tables
318 CFLAGS-tsearch.c += $(uses-callbacks)
319 CFLAGS-lsearch.c += $(uses-callbacks)
320 CFLAGS-pselect.c += -fexceptions
321 CFLAGS-readv.c += -fexceptions -fasynchronous-unwind-tables
322 CFLAGS-writev.c += -fexceptions -fasynchronous-unwind-tables
323 CFLAGS-preadv.c += -fexceptions -fasynchronous-unwind-tables
324 CFLAGS-preadv64.c += -fexceptions -fasynchronous-unwind-tables
325 CFLAGS-pwritev.c += -fexceptions -fasynchronous-unwind-tables
326 CFLAGS-pwritev64.c += -fexceptions -fasynchronous-unwind-tables
327 CFLAGS-preadv2.c += -fexceptions -fasynchronous-unwind-tables
328 CFLAGS-preadv64v2.c += -fexceptions -fasynchronous-unwind-tables
329 CFLAGS-pwritev2.c += -fexceptions -fasynchronous-unwind-tables
330 CFLAGS-pwritev64v2.c += -fexceptions -fasynchronous-unwind-tables
331 CFLAGS-usleep.c += -fexceptions
332 CFLAGS-syslog.c += -fexceptions
333 CFLAGS-error.c += -fexceptions
334 CFLAGS-getpass.c += -fexceptions
335 CFLAGS-mkstemp.c += -fexceptions
336 CFLAGS-mkstemp64.c += -fexceptions
337 CFLAGS-getsysstats.c += -fexceptions
338 CFLAGS-getusershell.c += -fexceptions
339 CFLAGS-err.c += -fexceptions
340 CFLAGS-tst-tsearch.c += $(stack-align-test-flags)
341 CFLAGS-msync.c += -fexceptions -fasynchronous-unwind-tables
342 CFLAGS-fdatasync.c += -fexceptions -fasynchronous-unwind-tables
343 CFLAGS-fsync.c += -fexceptions -fasynchronous-unwind-tables
344 CFLAGS-makedev.c += $(config-cflags-wno-ignored-attributes)
345 CFLAGS-mmap64.c += $(config-cflags-wno-ignored-attributes)
347 # Called during static library initialization, so turn stack-protection
348 # off for non-shared builds.
349 CFLAGS-sbrk.o = $(no-stack-protector)
350 CFLAGS-sbrk.op = $(no-stack-protector)
351 CFLAGS-brk.o = $(no-stack-protector)
352 CFLAGS-brk.op = $(no-stack-protector)
353 CFLAGS-mmap.o = $(no-stack-protector)
354 CFLAGS-mmap.op = $(no-stack-protector)
355 CFLAGS-mmap64.o = $(no-stack-protector)
356 CFLAGS-mmap64.op = $(no-stack-protector)
358 include ../Rules
360 $(objpfx)libg.a: $(dep-dummy-lib); $(make-dummy-lib)
362 $(objpfx)tst-tsearch: $(libm)
364 tst-error1-ENV = MALLOC_TRACE=$(objpfx)tst-error1.mtrace \
365 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
366 tst-error1-ARGS = $(objpfx)tst-error1.out
367 $(objpfx)tst-error1-mem.out: $(objpfx)tst-error1.out
368 $(common-objpfx)malloc/mtrace $(objpfx)tst-error1.mtrace > $@; \
369 $(evaluate-test)
371 tst-allocate_once-ENV = MALLOC_TRACE=$(objpfx)tst-allocate_once.mtrace \
372 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
373 $(objpfx)tst-allocate_once-mem.out: $(objpfx)tst-allocate_once.out
374 $(common-objpfx)malloc/mtrace $(objpfx)tst-allocate_once.mtrace > $@; \
375 $(evaluate-test)
377 tst-syslog-long-progname-ENV = GLIBC_TUNABLES=glibc.malloc.check=3 \
378 LD_PRELOAD=libc_malloc_debug.so.0
380 $(objpfx)tst-select: $(librt)
381 $(objpfx)tst-select-time64: $(librt)
382 $(objpfx)tst-pselect: $(librt)
383 $(objpfx)tst-pselect-time64: $(librt)
384 $(objpfx)tst-mkstemp-fuse-parallel: $(shared-thread-library)