build: wire systime/printf sources and tests

This commit is contained in:
2026-09-05 22:46:19 -04:00
parent c67e890b17
commit ea0482e9ff
+45 -11
View File
@@ -23,13 +23,12 @@ AM_CFLAGS = @VLIBC_CFLAGS@
# src/unistd (todo 19), src/process (todo 20,23), # src/unistd (todo 19), src/process (todo 20,23),
# src/fcntl (todo 21), src/stat (todo 22), # src/fcntl (todo 21), src/stat (todo 22),
# src/dirent (todo 24), src/select (todo 25), # src/dirent (todo 24), src/select (todo 25),
# src/time (todo 26; todo 27 sys/time is a # src/time (todo 26 + todo 27's sys/time
# follow-up — gettimeofday/settimeofday/ # slice — gettimeofday/settimeofday/
# getitimer/setitimer/utimes.c + sys/time.h # getitimer/setitimer/utimes.c + sys/time.h —
# landed after this wiring), src/stdio (todo # all wired), src/stdio (todo 15-18 FILE core
# 15-18 FILE core + popen; vfprintf.c/ # + popen; vfprintf.c/vfprintf_float.c now
# vfprintf_float.c still to wire with the # wired with the printf test)
# printf test)
# todo 39-42 src/math todo 50 src/multibyte # todo 39-42 src/math todo 50 src/multibyte
# todo 11-14 src/stdlib todo 43 src/complex todo 53-54 src/regex # todo 11-14 src/stdlib todo 43 src/complex todo 53-54 src/regex
# todo 15-18 src/stdio todo 9,51 src/ctype todo 57-58 src/network # todo 15-18 src/stdio todo 9,51 src/ctype todo 57-58 src/network
@@ -61,7 +60,8 @@ AM_CFLAGS = @VLIBC_CFLAGS@
# time ctime/mktime/nanosleep/strftime/tzset L2 tails, stdio.c L2 tail, # time ctime/mktime/nanosleep/strftime/tzset L2 tails, stdio.c L2 tail,
# unistd lseek64/dup3/pipe2/truncate) stay in CORE. task-19's unistd dir is # unistd lseek64/dup3/pipe2/truncate) stay in CORE. task-19's unistd dir is
# CORE throughout (self-gated L2 sections, no whole-file gate). T27's # CORE throughout (self-gated L2 sections, no whole-file gate). T27's
# sys/time slice is NOT yet wired (uncommitted at wiring time). # sys/time slice (gettimeofday/settimeofday/getitimer/setitimer/utimes) is
# whole-file L2, so it lives in VLIBC_LEVEL2_SRCS.
VLIBC_CORE_SRCS = \ VLIBC_CORE_SRCS = \
src/vlibc.c \ src/vlibc.c \
src/internal/assert_fail.c \ src/internal/assert_fail.c \
@@ -113,6 +113,7 @@ VLIBC_CORE_SRCS = \
src/stdio/locking.c \ src/stdio/locking.c \
src/stdio/popen.c \ src/stdio/popen.c \
src/stdio/vfscanf.c \ src/stdio/vfscanf.c \
src/stdio/vfprintf.c \
src/unistd/access.c \ src/unistd/access.c \
src/unistd/close.c \ src/unistd/close.c \
src/unistd/dup.c \ src/unistd/dup.c \
@@ -186,7 +187,10 @@ VLIBC_CORE_SRCS = \
# W5/W6 whole-file-L2 joins (verified by reading each .c — the #if # W5/W6 whole-file-L2 joins (verified by reading each .c — the #if
# VLIBC_LEVEL_GE(2) wraps the whole body after the includes): lockf.c (XSI), # VLIBC_LEVEL_GE(2) wraps the whole body after the includes): lockf.c (XSI),
# mknod.c (XSI), readdir_r.c/scandir.c/alphasort.c (XSI dirent), ppoll.c # mknod.c (XSI), readdir_r.c/scandir.c/alphasort.c (XSI dirent), ppoll.c
# (Linux), strptime.c/timer.c (POSIX timers), plus the earlier strings slice. # (Linux), strptime.c/timer.c (POSIX timers), plus task 27's sys/time slice
# (gettimeofday.c/settimeofday.c/getitimer.c/setitimer.c/utimes.c — each
# whole-file L2, wired with the systime test), plus the earlier strings
# slice.
VLIBC_LEVEL2_SRCS = src/string/strlcpy.c src/string/strlcat.c \ VLIBC_LEVEL2_SRCS = src/string/strlcpy.c src/string/strlcat.c \
src/string/stpcpy.c src/string/memccpy.c \ src/string/stpcpy.c src/string/memccpy.c \
src/ctype/isascii.c src/ctype/toascii.c \ src/ctype/isascii.c src/ctype/toascii.c \
@@ -196,7 +200,9 @@ VLIBC_LEVEL2_SRCS = src/string/strlcpy.c src/string/strlcat.c \
src/stat/mknod.c \ src/stat/mknod.c \
src/dirent/readdir_r.c src/dirent/scandir.c src/dirent/alphasort.c \ src/dirent/readdir_r.c src/dirent/scandir.c src/dirent/alphasort.c \
src/select/ppoll.c \ src/select/ppoll.c \
src/time/strptime.c src/time/timer.c src/time/strptime.c src/time/timer.c \
src/time/gettimeofday.c src/time/settimeofday.c \
src/time/getitimer.c src/time/setitimer.c src/time/utimes.c
VLIBC_LEVEL3_SRCS = src/string/strcasestr.c VLIBC_LEVEL3_SRCS = src/string/strcasestr.c
vlibc_lib_LTLIBRARIES = libvlibc.la vlibc_lib_LTLIBRARIES = libvlibc.la
@@ -249,6 +255,7 @@ vlibc_include_HEADERS = \
include/unistd.h \ include/unistd.h \
include/sys/select.h \ include/sys/select.h \
include/sys/stat.h \ include/sys/stat.h \
include/sys/time.h \
include/sys/types.h \ include/sys/types.h \
include/sys/wait.h include/sys/wait.h
@@ -381,7 +388,8 @@ check_PROGRAMS = test_syscall test_strerror test_setjmp test_headers \
test_startup test_malloc test_string test_ctype test_strings \ test_startup test_malloc test_string test_ctype test_strings \
test_strtol test_qsort test_inttypes test_env \ test_strtol test_qsort test_inttypes test_env \
test_process test_fcntl test_stat test_wait test_dirent \ test_process test_fcntl test_stat test_wait test_dirent \
test_poll test_time test_scanf test_getline test_poll test_time test_scanf test_getline \
test_systime test_printf test_stdio test_unistd_file
test_syscall_SOURCES = tests/syscall_test.c test_syscall_SOURCES = tests/syscall_test.c
test_syscall_CFLAGS = $(VLIBC_TEST_CFLAGS) test_syscall_CFLAGS = $(VLIBC_TEST_CFLAGS)
@@ -515,6 +523,30 @@ test_getline_DEPENDENCIES = crt1.o libvlibc-check.a
test_getline_LINK = $(VLIBC_TEST_LINK) test_getline_LINK = $(VLIBC_TEST_LINK)
test_getline_LDADD = $(VLIBC_TEST_LDADD) test_getline_LDADD = $(VLIBC_TEST_LDADD)
test_systime_SOURCES = tests/test_systime.c
test_systime_CFLAGS = $(VLIBC_TEST_CFLAGS)
test_systime_DEPENDENCIES = crt1.o libvlibc-check.a
test_systime_LINK = $(VLIBC_TEST_LINK)
test_systime_LDADD = $(VLIBC_TEST_LDADD)
test_printf_SOURCES = tests/test_printf.c
test_printf_CFLAGS = $(VLIBC_TEST_CFLAGS)
test_printf_DEPENDENCIES = crt1.o libvlibc-check.a
test_printf_LINK = $(VLIBC_TEST_LINK)
test_printf_LDADD = $(VLIBC_TEST_LDADD)
test_stdio_SOURCES = tests/test_stdio.c
test_stdio_CFLAGS = $(VLIBC_TEST_CFLAGS)
test_stdio_DEPENDENCIES = crt1.o libvlibc-check.a
test_stdio_LINK = $(VLIBC_TEST_LINK)
test_stdio_LDADD = $(VLIBC_TEST_LDADD)
test_unistd_file_SOURCES = tests/test_unistd_file.c
test_unistd_file_CFLAGS = $(VLIBC_TEST_CFLAGS)
test_unistd_file_DEPENDENCIES = crt1.o libvlibc-check.a
test_unistd_file_LINK = $(VLIBC_TEST_LINK)
test_unistd_file_LDADD = $(VLIBC_TEST_LDADD)
# test_startup's default mode exits 42 by design, so it is NOT a bare TESTS # test_startup's default mode exits 42 by design, so it is NOT a bare TESTS
# entry; tests/startup_modes.sh runs its full mode matrix and the -f failure # entry; tests/startup_modes.sh runs its full mode matrix and the -f failure
# scenarios of the other binaries. test_malloc/test_string/test_ctype/ # scenarios of the other binaries. test_malloc/test_string/test_ctype/
@@ -528,6 +560,7 @@ TESTS = test_syscall test_strerror test_setjmp test_headers \
test_strtol test_qsort test_inttypes test_env \ test_strtol test_qsort test_inttypes test_env \
test_process test_fcntl test_stat test_wait test_dirent \ test_process test_fcntl test_stat test_wait test_dirent \
test_poll test_time test_scanf test_getline \ test_poll test_time test_scanf test_getline \
test_systime test_printf test_stdio test_unistd_file \
tests/startup_modes.sh tests/startup_modes.sh
CLEANFILES = crt1.o libvlibc-check.a $(VLIBC_CHECK_OBJECTS) CLEANFILES = crt1.o libvlibc-check.a $(VLIBC_CHECK_OBJECTS)
@@ -553,5 +586,6 @@ EXTRA_DIST = \
src/process/atfork_impl.h \ src/process/atfork_impl.h \
src/stat/stat_impl.h \ src/stat/stat_impl.h \
src/stdio/stdio_impl.h \ src/stdio/stdio_impl.h \
src/stdio/vfprintf_float.c \
src/time/time_impl.h \ src/time/time_impl.h \
src/unistd/unistd_impl.h src/unistd/unistd_impl.h