1 # Copyright (C) 1991-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 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
292 tests-container
:= tst-syslog
294 CFLAGS-select.c
+= -fexceptions
-fasynchronous-unwind-tables
295 CFLAGS-tsearch.c
+= $(uses-callbacks
)
296 CFLAGS-lsearch.c
+= $(uses-callbacks
)
297 CFLAGS-pselect.c
+= -fexceptions
298 CFLAGS-readv.c
+= -fexceptions
-fasynchronous-unwind-tables
299 CFLAGS-writev.c
+= -fexceptions
-fasynchronous-unwind-tables
300 CFLAGS-preadv.c
+= -fexceptions
-fasynchronous-unwind-tables
301 CFLAGS-preadv64.c
+= -fexceptions
-fasynchronous-unwind-tables
302 CFLAGS-pwritev.c
+= -fexceptions
-fasynchronous-unwind-tables
303 CFLAGS-pwritev64.c
+= -fexceptions
-fasynchronous-unwind-tables
304 CFLAGS-preadv2.c
+= -fexceptions
-fasynchronous-unwind-tables
305 CFLAGS-preadv64v2.c
+= -fexceptions
-fasynchronous-unwind-tables
306 CFLAGS-pwritev2.c
+= -fexceptions
-fasynchronous-unwind-tables
307 CFLAGS-pwritev64v2.c
+= -fexceptions
-fasynchronous-unwind-tables
308 CFLAGS-usleep.c
+= -fexceptions
309 CFLAGS-syslog.c
+= -fexceptions
310 CFLAGS-error.c
+= -fexceptions
311 CFLAGS-getpass.c
+= -fexceptions
312 CFLAGS-mkstemp.c
+= -fexceptions
313 CFLAGS-mkstemp64.c
+= -fexceptions
314 CFLAGS-getsysstats.c
+= -fexceptions
315 CFLAGS-getusershell.c
+= -fexceptions
316 CFLAGS-err.c
+= -fexceptions
317 CFLAGS-tst-tsearch.c
+= $(stack-align-test-flags
)
318 CFLAGS-msync.c
+= -fexceptions
-fasynchronous-unwind-tables
319 CFLAGS-fdatasync.c
+= -fexceptions
-fasynchronous-unwind-tables
320 CFLAGS-fsync.c
+= -fexceptions
-fasynchronous-unwind-tables
321 CFLAGS-makedev.c
+= $(config-cflags-wno-ignored-attributes
)
322 CFLAGS-mmap64.c
+= $(config-cflags-wno-ignored-attributes
)
324 # Called during static library initialization, so turn stack-protection
325 # off for non-shared builds.
326 CFLAGS-sbrk.o
= $(no-stack-protector
)
327 CFLAGS-sbrk.op
= $(no-stack-protector
)
328 CFLAGS-brk.o
= $(no-stack-protector
)
329 CFLAGS-brk.op
= $(no-stack-protector
)
330 CFLAGS-mmap.o
= $(no-stack-protector
)
331 CFLAGS-mmap.op
= $(no-stack-protector
)
332 CFLAGS-mmap64.o
= $(no-stack-protector
)
333 CFLAGS-mmap64.op
= $(no-stack-protector
)
337 $(objpfx
)libg.a
: $(dep-dummy-lib
); $(make-dummy-lib
)
339 $(objpfx
)tst-tsearch
: $(libm
)
341 tst-error1-ENV
= MALLOC_TRACE
=$(objpfx
)tst-error1.mtrace \
342 LD_PRELOAD
=$(common-objpfx
)/malloc
/libc_malloc_debug.so
343 tst-error1-ARGS
= $(objpfx
)tst-error1.out
344 $(objpfx
)tst-error1-mem.out
: $(objpfx
)tst-error1.out
345 $(common-objpfx
)malloc
/mtrace
$(objpfx
)tst-error1.mtrace
> $@
; \
348 tst-allocate_once-ENV
= MALLOC_TRACE
=$(objpfx
)tst-allocate_once.mtrace \
349 LD_PRELOAD
=$(common-objpfx
)/malloc
/libc_malloc_debug.so
350 $(objpfx
)tst-allocate_once-mem.out
: $(objpfx
)tst-allocate_once.out
351 $(common-objpfx
)malloc
/mtrace
$(objpfx
)tst-allocate_once.mtrace
> $@
; \
354 $(objpfx
)tst-select
: $(librt
)
355 $(objpfx
)tst-select-time64
: $(librt
)
356 $(objpfx
)tst-pselect
: $(librt
)
357 $(objpfx
)tst-pselect-time64
: $(librt
)