1 # Copyright (C) 1992-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 I/O portion of the library.
33 bits
/statx-generic.h \
35 bits
/types
/struct_statx.h \
36 bits
/types
/struct_statx_timestamp.h \
74 file_change_detection \
152 # Exclude fortified routines from being built with _FORTIFY_SOURCE
153 routines_no_fortify
+= \
166 # routines_no_fortify
189 tst-copy_file_range \
219 tst-posix_fallocate \
220 tst-posix_fallocate64 \
238 tst-futimens-time64 \
240 tst-futimesat-time64 \
242 tst-lstat-nofollow-time64 \
246 tst-utimensat-time64 \
250 # Likewise for statx, but we do not need static linking here.
252 tst-file_change_detection \
260 ifeq ($(run-built-tests
),yes
)
262 $(objpfx
)ftwtest-time64.out \
263 $(objpfx
)ftwtest.out \
269 CFLAGS-open.c
+= -fexceptions
-fasynchronous-unwind-tables
$(config-cflags-wno-ignored-attributes
)
270 CFLAGS-openat.c
+= $(config-cflags-wno-ignored-attributes
)
271 CFLAGS-open64.c
+= -fexceptions
-fasynchronous-unwind-tables
272 CFLAGS-creat.c
+= -fexceptions
-fasynchronous-unwind-tables
273 CFLAGS-creat64.c
+= -fexceptions
-fasynchronous-unwind-tables
274 CFLAGS-fcntl.c
+= -fexceptions
-fasynchronous-unwind-tables
$(config-cflags-wno-ignored-attributes
)
275 CFLAGS-fcntl64.c
+= -fexceptions
-fasynchronous-unwind-tables
$(config-cflags-wno-ignored-attributes
)
276 CFLAGS-poll.c
+= -fexceptions
-fasynchronous-unwind-tables
277 CFLAGS-ppoll.c
+= -fexceptions
-fasynchronous-unwind-tables
278 CFLAGS-lockf.c
+= -fexceptions
-fasynchronous-unwind-tables
279 CFLAGS-lockf64.c
+= -fexceptions
-fasynchronous-unwind-tables
$(config-cflags-wno-ignored-attributes
)
280 CFLAGS-statfs.c
+= -fexceptions
281 CFLAGS-fstatfs.c
+= -fexceptions
282 CFLAGS-statvfs.c
+= -fexceptions
$(config-cflags-wno-ignored-attributes
)
283 CFLAGS-fstatvfs.c
+= -fexceptions
$(config-cflags-wno-ignored-attributes
)
284 CFLAGS-fts.c
+= -Wno-uninitialized
$(uses-callbacks
) -fexceptions
285 CFLAGS-fts64.c
+= -Wno-uninitialized
$(uses-callbacks
) -fexceptions
286 CFLAGS-fts64-time64.c
+= -Wno-uninitialized
$(uses-callbacks
) -fexceptions
287 CFLAGS-ftw.c
+= $(uses-callbacks
) -fexceptions
288 CFLAGS-ftw64.c
+= $(uses-callbacks
) -fexceptions
289 CFLAGS-ftw64-time64.c
+= $(uses-callbacks
) -fexceptions
290 CFLAGS-posix_fallocate.c
+= -fexceptions
291 CFLAGS-posix_fallocate64.c
+= -fexceptions
292 CFLAGS-fallocate.c
+= -fexceptions
293 CFLAGS-fallocate64.c
+= -fexceptions
294 CFLAGS-read.c
+= -fexceptions
-fasynchronous-unwind-tables
$(config-cflags-wno-ignored-attributes
)
295 CFLAGS-write.c
+= -fexceptions
-fasynchronous-unwind-tables
$(config-cflags-wno-ignored-attributes
)
296 CFLAGS-close.c
+= -fexceptions
-fasynchronous-unwind-tables
297 CFLAGS-lseek64.c
+= $(config-cflags-wno-ignored-attributes
)
298 CFLAGS-tst-read-zero.c
+= $(no-fortify-source
),-D_FORTIFY_SOURCE
=$(supported-fortify
)
300 CFLAGS-test-stat.c
+= -D_FILE_OFFSET_BITS
=64 -D_LARGEFILE64_SOURCE
301 CFLAGS-test-lfs.c
+= -D_LARGEFILE64_SOURCE
302 CFLAGS-tst-lchmod.c
+= -D_FILE_OFFSET_BITS
=64
304 test-stat2-ARGS
= Makefile .
$(objpfx
)test-stat2
306 tst-statvfs-ARGS
= $(objpfx
)tst-statvfs tst-statvfs.c
/tmp
308 tst-open-tmpfile-ARGS
= --test-dir
=$(objpfx
)
310 CFLAGS-ftwtest-time64.c
+= -D_TIME_BITS
=64 -D_FILE_OFFSET_BITS
=64
312 ifeq ($(run-built-tests
),yes
)
313 $(objpfx
)ftwtest.out
: ftwtest-sh
$(objpfx
)ftwtest
314 $(SHELL
) $< $(common-objpfx
) '$(test-program-cmd)' > $@
; \
317 $(objpfx
)ftwtest-time64.out
: ftwtest-sh
$(objpfx
)ftwtest-time64
318 $(SHELL
) $< $(common-objpfx
) '$(test-program-cmd)' > $@
; \