Make endian-conversion macros always return correct types (bug 16458).
[glibc.git] / string / Makefile
blob7b3afa01ae6ff4d8c6d9c65f6a78dba6d0b23583
1 # Copyright (C) 1991-2017 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 # <http://www.gnu.org/licenses/>.
19 # Sub-makefile for string portion of library.
21 subdir := string
23 include ../Makeconfig
25 headers := string.h strings.h memory.h endian.h bits/endian.h \
26 argz.h envz.h byteswap.h bits/byteswap.h bits/byteswap-16.h \
27 bits/string.h bits/string2.h bits/string3.h \
28 bits/strings_fortified.h bits/uintn-identity.h
30 routines := strcat strchr strcmp strcoll strcpy strcspn \
31 strverscmp strdup strndup \
32 strerror _strerror strlen strnlen \
33 strncat strncmp strncpy \
34 strrchr strpbrk strsignal strspn strstr strtok \
35 strtok_r strxfrm memchr memcmp memmove memset \
36 mempcpy bcopy bzero ffs ffsll stpcpy stpncpy \
37 strcasecmp strncase strcasecmp_l strncase_l \
38 memccpy memcpy wordcopy strsep strcasestr \
39 swab strfry memfrob memmem rawmemchr strchrnul \
40 $(addprefix argz-,append count create ctsep next \
41 delete extract insert stringify \
42 addsep replace) \
43 envz basename \
44 strcoll_l strxfrm_l string-inlines memrchr \
45 xpg-strerror strerror_l explicit_bzero
47 strop-tests := memchr memcmp memcpy memmove mempcpy memset memccpy \
48 stpcpy stpncpy strcat strchr strcmp strcpy strcspn \
49 strlen strncmp strncpy strpbrk strrchr strspn memmem \
50 strstr strcasestr strnlen strcasecmp strncasecmp \
51 strncat rawmemchr strchrnul bcopy bzero memrchr \
52 explicit_bzero
53 tests := tester inl-tester noinl-tester testcopy test-ffs \
54 tst-strlen stratcliff tst-svc tst-inlcall \
55 bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap \
56 tst-strtok tst-strxfrm bug-strcoll1 tst-strfry \
57 bug-strtok1 $(addprefix test-,$(strop-tests)) \
58 bug-envz1 tst-strxfrm2 tst-endian tst-svc2 \
59 tst-strtok_r bug-strcoll2 tst-cmp tst-xbzero-opt \
60 test-endian-types
62 xtests = tst-strcoll-overflow
64 ifeq ($(run-built-tests),yes)
65 tests-special += $(objpfx)tst-svc-cmp.out
66 endif
68 include ../Rules
70 CFLAGS-inl-tester.c = -fno-builtin
71 CFLAGS-noinl-tester.c = -fno-builtin
72 CFLAGS-tst-strlen.c = -fno-builtin
73 CFLAGS-stratcliff.c = -fno-builtin
74 CFLAGS-test-ffs.c = -fno-builtin
75 CFLAGS-tst-inlcall.c = -fno-builtin
76 CFLAGS-tst-xbzero-opt.c = -O3
78 # Called during TLS initialization.
79 CFLAGS-memcpy.c = $(no-stack-protector)
80 CFLAGS-wordcopy.c = $(no-stack-protector)
82 ifeq ($(run-built-tests),yes)
83 $(objpfx)tst-svc-cmp.out: tst-svc.expect $(objpfx)tst-svc.out
84 cmp $^ > $@; \
85 $(evaluate-test)
87 LOCALES := de_DE.UTF-8 en_US.ISO-8859-1 en_US.UTF-8 \
88 tr_TR.ISO-8859-9 tr_TR.UTF-8 cs_CZ.UTF-8 \
89 da_DK.ISO-8859-1
90 include ../gen-locales.mk
92 $(objpfx)test-strcasecmp.out: $(gen-locales)
93 $(objpfx)test-strncasecmp.out: $(gen-locales)
94 $(objpfx)tst-strxfrm.out: $(gen-locales)
95 $(objpfx)tst-strxfrm2.out: $(gen-locales)
96 # bug-strcoll2 needs cs_CZ.UTF-8 and da_DK.ISO-8859-1.
97 $(objpfx)bug-strcoll2.out: $(gen-locales)
99 endif