|
Packit |
6c4009 |
# Copyright (C) 1991-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
# This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The GNU C Library is free software; you can redistribute it and/or
|
|
Packit |
6c4009 |
# modify it under the terms of the GNU Lesser General Public
|
|
Packit |
6c4009 |
# License as published by the Free Software Foundation; either
|
|
Packit |
6c4009 |
# version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6c4009 |
# Lesser General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# You should have received a copy of the GNU Lesser General Public
|
|
Packit |
6c4009 |
# License along with the GNU C Library; if not, see
|
|
Packit |
6c4009 |
# <http://www.gnu.org/licenses/>.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#
|
|
Packit |
6c4009 |
# Sub-makefile for string portion of library.
|
|
Packit |
6c4009 |
#
|
|
Packit |
6c4009 |
subdir := string
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
include ../Makeconfig
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
headers := string.h bits/string_fortified.h \
|
|
Packit |
6c4009 |
strings.h bits/strings_fortified.h \
|
|
Packit |
6c4009 |
byteswap.h bits/byteswap.h \
|
|
Packit |
6c4009 |
endian.h bits/endian.h bits/uintn-identity.h \
|
|
Packit |
6c4009 |
memory.h argz.h envz.h
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
routines := strcat strchr strcmp strcoll strcpy strcspn \
|
|
Packit |
6c4009 |
strverscmp strdup strndup \
|
|
Packit |
6c4009 |
strerror _strerror strlen strnlen \
|
|
Packit |
6c4009 |
strncat strncmp strncpy \
|
|
Packit |
6c4009 |
strrchr strpbrk strsignal strspn strstr strtok \
|
|
Packit |
6c4009 |
strtok_r strxfrm memchr memcmp memmove memset \
|
|
Packit |
6c4009 |
mempcpy bcopy bzero ffs ffsll stpcpy stpncpy \
|
|
Packit |
6c4009 |
strcasecmp strncase strcasecmp_l strncase_l \
|
|
Packit |
6c4009 |
memccpy memcpy wordcopy strsep strcasestr \
|
|
Packit |
6c4009 |
swab strfry memfrob memmem rawmemchr strchrnul \
|
|
Packit |
6c4009 |
$(addprefix argz-,append count create ctsep next \
|
|
Packit |
6c4009 |
delete extract insert stringify \
|
|
Packit |
6c4009 |
addsep replace) \
|
|
Packit |
6c4009 |
envz basename \
|
|
Packit |
6c4009 |
strcoll_l strxfrm_l string-inlines memrchr \
|
|
Packit |
6c4009 |
xpg-strerror strerror_l explicit_bzero
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
strop-tests := memchr memcmp memcpy memmove mempcpy memset memccpy \
|
|
Packit |
6c4009 |
stpcpy stpncpy strcat strchr strcmp strcpy strcspn \
|
|
Packit |
6c4009 |
strlen strncmp strncpy strpbrk strrchr strspn memmem \
|
|
Packit |
6c4009 |
strstr strcasestr strnlen strcasecmp strncasecmp \
|
|
Packit |
6c4009 |
strncat rawmemchr strchrnul bcopy bzero memrchr \
|
|
Packit |
6c4009 |
explicit_bzero
|
|
Packit |
6c4009 |
tests := tester inl-tester noinl-tester testcopy test-ffs \
|
|
Packit |
6c4009 |
tst-strlen stratcliff tst-svc tst-inlcall \
|
|
Packit |
6c4009 |
bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap \
|
|
Packit |
6c4009 |
tst-strtok tst-strxfrm bug-strcoll1 tst-strfry \
|
|
Packit |
6c4009 |
bug-strtok1 $(addprefix test-,$(strop-tests)) \
|
|
Packit |
6c4009 |
bug-envz1 tst-strxfrm2 tst-endian tst-svc2 \
|
|
Packit |
6c4009 |
tst-strtok_r bug-strcoll2 tst-cmp tst-xbzero-opt \
|
|
Packit |
6c4009 |
test-endian-types test-endian-file-scope \
|
|
Packit |
6c4009 |
test-endian-sign-conversion
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# This test allocates a lot of memory and can run for a long time.
|
|
Packit |
6c4009 |
xtests = tst-strcoll-overflow
|
|
Packit |
6c4009 |
|
|
Packit Service |
386964 |
# This test needs libdl.
|
|
Packit Service |
386964 |
ifeq (yes,$(build-shared))
|
|
Packit Service |
386964 |
tests += test-strerror-errno
|
|
Packit Service |
386964 |
LDLIBS-test-strerror-errno = $(libdl)
|
|
Packit Service |
386964 |
endif
|
|
Packit Service |
386964 |
|
|
Packit |
6c4009 |
ifeq ($(run-built-tests),yes)
|
|
Packit |
6c4009 |
tests-special += $(objpfx)tst-svc-cmp.out
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
include ../Rules
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
CFLAGS-inl-tester.c += -fno-builtin
|
|
Packit |
6c4009 |
CFLAGS-noinl-tester.c += -fno-builtin
|
|
Packit |
6c4009 |
CFLAGS-tst-strlen.c += -fno-builtin
|
|
Packit |
6c4009 |
CFLAGS-stratcliff.c += -fno-builtin
|
|
Packit |
6c4009 |
CFLAGS-test-ffs.c += -fno-builtin
|
|
Packit |
6c4009 |
CFLAGS-tst-inlcall.c += -fno-builtin
|
|
Packit |
6c4009 |
CFLAGS-tst-xbzero-opt.c += -O3
|
|
Packit |
6c4009 |
CFLAGS-test-endian-sign-conversion.c += -Werror -Wsign-conversion
|
|
Packit |
6c4009 |
# BZ 21006: Resolve all functions but at least explicit_bzero at startup.
|
|
Packit |
6c4009 |
# Otherwise the test fails on s390x as the memcpy in prepare_test_buffer is
|
|
Packit |
6c4009 |
# done by loading r4 / r5 with the test_pattern and using store multiple
|
|
Packit |
6c4009 |
# instruction to store r4 / r5 to buf. If explicit_bzero would be resolved in
|
|
Packit |
6c4009 |
# setup_explicit_clear, r4 / r5 would be stored to stack by _dl_runtime_resolve
|
|
Packit |
6c4009 |
# and the call to memmem in count_test_patterns will find a hit of the
|
|
Packit |
6c4009 |
# test_pattern on the stack.
|
|
Packit |
6c4009 |
LDFLAGS-tst-xbzero-opt = -z now
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Called during TLS initialization.
|
|
Packit |
6c4009 |
CFLAGS-memcpy.c += $(no-stack-protector)
|
|
Packit |
6c4009 |
CFLAGS-wordcopy.c += $(no-stack-protector)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(run-built-tests),yes)
|
|
Packit |
6c4009 |
$(objpfx)tst-svc-cmp.out: tst-svc.expect $(objpfx)tst-svc.out
|
|
Packit |
6c4009 |
cmp $^ > $@; \
|
|
Packit |
6c4009 |
$(evaluate-test)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
LOCALES := de_DE.UTF-8 en_US.ISO-8859-1 en_US.UTF-8 \
|
|
Packit |
6c4009 |
tr_TR.ISO-8859-9 tr_TR.UTF-8 cs_CZ.UTF-8 \
|
|
Packit |
6c4009 |
da_DK.ISO-8859-1 en_GB.UTF-8
|
|
Packit |
6c4009 |
include ../gen-locales.mk
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
$(objpfx)test-strcasecmp.out: $(gen-locales)
|
|
Packit |
6c4009 |
$(objpfx)test-strncasecmp.out: $(gen-locales)
|
|
Packit |
6c4009 |
$(objpfx)tst-strxfrm.out: $(gen-locales)
|
|
Packit |
6c4009 |
$(objpfx)tst-strxfrm2.out: $(gen-locales)
|
|
Packit |
6c4009 |
# bug-strcoll2 needs cs_CZ.UTF-8 and da_DK.ISO-8859-1.
|
|
Packit |
6c4009 |
$(objpfx)bug-strcoll2.out: $(gen-locales)
|
|
Packit |
6c4009 |
$(objpfx)tst-strcoll-overflow.out: $(gen-locales)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
endif
|