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.
76 bits
/types
/struct_iovec.h \
79 sys
/single_threaded.h \
209 tst-allocate_once-mem.out \
210 tst-allocate_once.mtrace \
216 install-lib
:= libg.a
241 tst-mntent-blank-corrupt \
242 tst-mntent-blank-passno \
248 tst-preadvwritev64v2 \
262 # Tests which need libdl.
263 ifeq (yes
,$(build-shared
))
264 tests
+= tst-gethostid
272 tests-static
:= tst-empty
274 # Test for the internal, non-exported __fd_to_filename function.
275 tests-internal
+= tst-fd_to_filename
276 tests-static
+= tst-fd_to_filename
278 ifeq ($(run-built-tests
),yes
)
279 tests-special
+= $(objpfx
)tst-error1-mem.out \
280 $(objpfx
)tst-allocate_once-mem.out
283 tests-container
:= tst-syslog
285 CFLAGS-select.c
+= -fexceptions
-fasynchronous-unwind-tables
286 CFLAGS-tsearch.c
+= $(uses-callbacks
)
287 CFLAGS-lsearch.c
+= $(uses-callbacks
)
288 CFLAGS-pselect.c
+= -fexceptions
289 CFLAGS-readv.c
+= -fexceptions
-fasynchronous-unwind-tables
290 CFLAGS-writev.c
+= -fexceptions
-fasynchronous-unwind-tables
291 CFLAGS-preadv.c
+= -fexceptions
-fasynchronous-unwind-tables
292 CFLAGS-preadv64.c
+= -fexceptions
-fasynchronous-unwind-tables
293 CFLAGS-pwritev.c
+= -fexceptions
-fasynchronous-unwind-tables
294 CFLAGS-pwritev64.c
+= -fexceptions
-fasynchronous-unwind-tables
295 CFLAGS-preadv2.c
+= -fexceptions
-fasynchronous-unwind-tables
296 CFLAGS-preadv64v2.c
+= -fexceptions
-fasynchronous-unwind-tables
297 CFLAGS-pwritev2.c
+= -fexceptions
-fasynchronous-unwind-tables
298 CFLAGS-pwritev64v2.c
+= -fexceptions
-fasynchronous-unwind-tables
299 CFLAGS-usleep.c
+= -fexceptions
300 CFLAGS-syslog.c
+= -fexceptions
301 CFLAGS-error.c
+= -fexceptions
302 CFLAGS-getpass.c
+= -fexceptions
303 CFLAGS-mkstemp.c
+= -fexceptions
304 CFLAGS-mkstemp64.c
+= -fexceptions
305 CFLAGS-getsysstats.c
+= -fexceptions
306 CFLAGS-getusershell.c
+= -fexceptions
307 CFLAGS-err.c
+= -fexceptions
308 CFLAGS-tst-tsearch.c
+= $(stack-align-test-flags
)
309 CFLAGS-msync.c
+= -fexceptions
-fasynchronous-unwind-tables
310 CFLAGS-fdatasync.c
+= -fexceptions
-fasynchronous-unwind-tables
311 CFLAGS-fsync.c
+= -fexceptions
-fasynchronous-unwind-tables
312 CFLAGS-makedev.c
+= $(config-cflags-wno-ignored-attributes
)
313 CFLAGS-mmap64.c
+= $(config-cflags-wno-ignored-attributes
)
315 # Called during static library initialization, so turn stack-protection
316 # off for non-shared builds.
317 CFLAGS-sbrk.o
= $(no-stack-protector
)
318 CFLAGS-sbrk.op
= $(no-stack-protector
)
319 CFLAGS-brk.o
= $(no-stack-protector
)
320 CFLAGS-brk.op
= $(no-stack-protector
)
321 CFLAGS-mmap.o
= $(no-stack-protector
)
322 CFLAGS-mmap.op
= $(no-stack-protector
)
323 CFLAGS-mmap64.o
= $(no-stack-protector
)
324 CFLAGS-mmap64.op
= $(no-stack-protector
)
328 $(objpfx
)libg.a
: $(dep-dummy-lib
); $(make-dummy-lib
)
330 $(objpfx
)tst-tsearch
: $(libm
)
332 tst-error1-ENV
= MALLOC_TRACE
=$(objpfx
)tst-error1.mtrace \
333 LD_PRELOAD
=$(common-objpfx
)/malloc
/libc_malloc_debug.so
334 tst-error1-ARGS
= $(objpfx
)tst-error1.out
335 $(objpfx
)tst-error1-mem.out
: $(objpfx
)tst-error1.out
336 $(common-objpfx
)malloc
/mtrace
$(objpfx
)tst-error1.mtrace
> $@
; \
339 tst-allocate_once-ENV
= MALLOC_TRACE
=$(objpfx
)tst-allocate_once.mtrace \
340 LD_PRELOAD
=$(common-objpfx
)/malloc
/libc_malloc_debug.so
341 $(objpfx
)tst-allocate_once-mem.out
: $(objpfx
)tst-allocate_once.out
342 $(common-objpfx
)malloc
/mtrace
$(objpfx
)tst-allocate_once.mtrace
> $@
; \
345 $(objpfx
)tst-select
: $(librt
)
346 $(objpfx
)tst-select-time64
: $(librt
)
347 $(objpfx
)tst-pselect
: $(librt
)
348 $(objpfx
)tst-pselect-time64
: $(librt
)