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.
78 bits
/types
/struct_iovec.h \
81 sys
/single_threaded.h \
210 # Exclude fortified routines from being built with _FORTIFY_SOURCE
211 routines_no_fortify
+= \
215 # routines_no_fortify
218 tst-allocate_once-mem.out \
219 tst-allocate_once.mtrace \
225 install-lib
:= libg.a
250 tst-mntent-blank-corrupt \
251 tst-mntent-blank-passno \
257 tst-preadvwritev64v2 \
271 # Tests which need libdl.
272 ifeq (yes
,$(build-shared
))
273 tests
+= tst-gethostid
281 tests-static
:= tst-empty
283 # Test for the internal, non-exported __fd_to_filename function.
284 tests-internal
+= tst-fd_to_filename
285 tests-static
+= tst-fd_to_filename
287 ifeq ($(run-built-tests
),yes
)
288 tests-special
+= $(objpfx
)tst-error1-mem.out \
289 $(objpfx
)tst-allocate_once-mem.out
294 tst-syslog-long-progname \
297 CFLAGS-select.c
+= -fexceptions
-fasynchronous-unwind-tables
298 CFLAGS-tsearch.c
+= $(uses-callbacks
)
299 CFLAGS-lsearch.c
+= $(uses-callbacks
)
300 CFLAGS-pselect.c
+= -fexceptions
301 CFLAGS-readv.c
+= -fexceptions
-fasynchronous-unwind-tables
302 CFLAGS-writev.c
+= -fexceptions
-fasynchronous-unwind-tables
303 CFLAGS-preadv.c
+= -fexceptions
-fasynchronous-unwind-tables
304 CFLAGS-preadv64.c
+= -fexceptions
-fasynchronous-unwind-tables
305 CFLAGS-pwritev.c
+= -fexceptions
-fasynchronous-unwind-tables
306 CFLAGS-pwritev64.c
+= -fexceptions
-fasynchronous-unwind-tables
307 CFLAGS-preadv2.c
+= -fexceptions
-fasynchronous-unwind-tables
308 CFLAGS-preadv64v2.c
+= -fexceptions
-fasynchronous-unwind-tables
309 CFLAGS-pwritev2.c
+= -fexceptions
-fasynchronous-unwind-tables
310 CFLAGS-pwritev64v2.c
+= -fexceptions
-fasynchronous-unwind-tables
311 CFLAGS-usleep.c
+= -fexceptions
312 CFLAGS-syslog.c
+= -fexceptions
313 CFLAGS-error.c
+= -fexceptions
314 CFLAGS-getpass.c
+= -fexceptions
315 CFLAGS-mkstemp.c
+= -fexceptions
316 CFLAGS-mkstemp64.c
+= -fexceptions
317 CFLAGS-getsysstats.c
+= -fexceptions
318 CFLAGS-getusershell.c
+= -fexceptions
319 CFLAGS-err.c
+= -fexceptions
320 CFLAGS-tst-tsearch.c
+= $(stack-align-test-flags
)
321 CFLAGS-msync.c
+= -fexceptions
-fasynchronous-unwind-tables
322 CFLAGS-fdatasync.c
+= -fexceptions
-fasynchronous-unwind-tables
323 CFLAGS-fsync.c
+= -fexceptions
-fasynchronous-unwind-tables
324 CFLAGS-makedev.c
+= $(config-cflags-wno-ignored-attributes
)
325 CFLAGS-mmap64.c
+= $(config-cflags-wno-ignored-attributes
)
327 # Called during static library initialization, so turn stack-protection
328 # off for non-shared builds.
329 CFLAGS-sbrk.o
= $(no-stack-protector
)
330 CFLAGS-sbrk.op
= $(no-stack-protector
)
331 CFLAGS-brk.o
= $(no-stack-protector
)
332 CFLAGS-brk.op
= $(no-stack-protector
)
333 CFLAGS-mmap.o
= $(no-stack-protector
)
334 CFLAGS-mmap.op
= $(no-stack-protector
)
335 CFLAGS-mmap64.o
= $(no-stack-protector
)
336 CFLAGS-mmap64.op
= $(no-stack-protector
)
340 $(objpfx
)libg.a
: $(dep-dummy-lib
); $(make-dummy-lib
)
342 $(objpfx
)tst-tsearch
: $(libm
)
344 tst-error1-ENV
= MALLOC_TRACE
=$(objpfx
)tst-error1.mtrace \
345 LD_PRELOAD
=$(common-objpfx
)/malloc
/libc_malloc_debug.so
346 tst-error1-ARGS
= $(objpfx
)tst-error1.out
347 $(objpfx
)tst-error1-mem.out
: $(objpfx
)tst-error1.out
348 $(common-objpfx
)malloc
/mtrace
$(objpfx
)tst-error1.mtrace
> $@
; \
351 tst-allocate_once-ENV
= MALLOC_TRACE
=$(objpfx
)tst-allocate_once.mtrace \
352 LD_PRELOAD
=$(common-objpfx
)/malloc
/libc_malloc_debug.so
353 $(objpfx
)tst-allocate_once-mem.out
: $(objpfx
)tst-allocate_once.out
354 $(common-objpfx
)malloc
/mtrace
$(objpfx
)tst-allocate_once.mtrace
> $@
; \
357 tst-syslog-long-progname-ENV
= GLIBC_TUNABLES
=glibc.malloc.
check=3 \
358 LD_PRELOAD
=libc_malloc_debug.so
.0
360 $(objpfx
)tst-select
: $(librt
)
361 $(objpfx
)tst-select-time64
: $(librt
)
362 $(objpfx
)tst-pselect
: $(librt
)
363 $(objpfx
)tst-pselect-time64
: $(librt
)