build: wire strings.h sources and tests
This commit is contained in:
+18
-7
@@ -82,12 +82,16 @@ VLIBC_CORE_SRCS = \
|
|||||||
# (stpcpy/stpncpy) and memccpy.c are WHOLE-FILE L2-gated (#if VLIBC_LEVEL_GE(2)
|
# (stpcpy/stpncpy) and memccpy.c are WHOLE-FILE L2-gated (#if VLIBC_LEVEL_GE(2)
|
||||||
# around the entire body), and isascii.c/toascii.c hold only L2 symbols
|
# around the entire body), and isascii.c/toascii.c hold only L2 symbols
|
||||||
# (the header gates their declarations) — all four must be omitted from a
|
# (the header gates their declarations) — all four must be omitted from a
|
||||||
# level-1 profile, so they join the GE_2 conditional list. Files with L1
|
# level-1 profile, so they join the GE_2 conditional list. Task 10's
|
||||||
|
# strings_impl.c is likewise whole-file L2-gated (strcasecmp/strncasecmp/ffs/
|
||||||
|
# ffsl/ffsll/bcmp/bcopy/bzero/index/rindex — nothing is POSIX.1-2008 base), so
|
||||||
|
# it also joins the GE_2 conditional list. Files with L1
|
||||||
# bodies plus small L2 sections (strcoll.c, strdup.c) stay in VLIBC_CORE_SRCS
|
# bodies plus small L2 sections (strcoll.c, strdup.c) stay in VLIBC_CORE_SRCS
|
||||||
# and self-gate at level 1.
|
# and self-gate at level 1.
|
||||||
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 \
|
||||||
|
src/string/strings_impl.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
|
||||||
@@ -109,6 +113,7 @@ vlibc_include_HEADERS = \
|
|||||||
include/vlibc.h \
|
include/vlibc.h \
|
||||||
include/stddef.h \
|
include/stddef.h \
|
||||||
include/string.h \
|
include/string.h \
|
||||||
|
include/strings.h \
|
||||||
include/errno.h \
|
include/errno.h \
|
||||||
include/setjmp.h \
|
include/setjmp.h \
|
||||||
include/assert.h \
|
include/assert.h \
|
||||||
@@ -258,7 +263,7 @@ VLIBC_TEST_CFLAGS = -DVLIBC_LEVEL=$(VLIBC_TEST_LEVEL) -fno-stack-protector \
|
|||||||
-fno-pic -fno-pie
|
-fno-pic -fno-pie
|
||||||
|
|
||||||
check_PROGRAMS = test_syscall test_strerror test_setjmp test_headers \
|
check_PROGRAMS = test_syscall test_strerror test_setjmp test_headers \
|
||||||
test_startup test_malloc test_string test_ctype
|
test_startup test_malloc test_string test_ctype test_strings
|
||||||
|
|
||||||
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)
|
||||||
@@ -308,13 +313,19 @@ test_ctype_DEPENDENCIES = crt1.o libvlibc-check.a
|
|||||||
test_ctype_LINK = $(VLIBC_TEST_LINK)
|
test_ctype_LINK = $(VLIBC_TEST_LINK)
|
||||||
test_ctype_LDADD = $(VLIBC_TEST_LDADD)
|
test_ctype_LDADD = $(VLIBC_TEST_LDADD)
|
||||||
|
|
||||||
|
test_strings_SOURCES = tests/test_strings.c
|
||||||
|
test_strings_CFLAGS = $(VLIBC_TEST_CFLAGS)
|
||||||
|
test_strings_DEPENDENCIES = crt1.o libvlibc-check.a
|
||||||
|
test_strings_LINK = $(VLIBC_TEST_LINK)
|
||||||
|
test_strings_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 default
|
# scenarios of the other binaries. test_malloc/test_string/test_ctype/
|
||||||
# to the happy mode (exit 0 on all-pass) and are bare TESTS entries; their
|
# test_strings default to the happy mode (exit 0 on all-pass) and are bare
|
||||||
# -f/-p modes stay runnable by hand.
|
# TESTS entries; their -f/-p modes stay runnable by hand.
|
||||||
TESTS = test_syscall test_strerror test_setjmp test_headers \
|
TESTS = test_syscall test_strerror test_setjmp test_headers \
|
||||||
test_malloc test_string test_ctype \
|
test_malloc test_string test_ctype test_strings \
|
||||||
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user