x86-64: Optimize strlen/strnlen/wcslen/wcsnlen with AVX2
[glibc.git] / misc / Makefile
blob46072e62d957b9ece24f67f00fc13bd295f44013
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 misc portion of the library.
22 subdir := misc
24 include ../Makeconfig
26 headers := sys/uio.h bits/uio.h sys/ioctl.h bits/ioctls.h bits/ioctl-types.h \
27 sys/ptrace.h sys/file.h sys/dir.h sys/cdefs.h \
28 ar.h a.out.h libgen.h stab.h bits/stab.def sgtty.h \
29 ttyent.h paths.h sys/reboot.h \
30 sys/mman.h sys/param.h bits/param.h \
31 fstab.h mntent.h search.h err.h error.h \
32 sys/queue.h sysexits.h syscall.h sys/syscall.h sys/swap.h \
33 sys/select.h ustat.h sys/ustat.h bits/ustat.h sys/sysinfo.h \
34 regexp.h bits/select.h bits/mman.h sys/xattr.h \
35 syslog.h sys/syslog.h \
36 bits/syslog.h bits/syslog-ldbl.h bits/syslog-path.h bits/error.h \
37 bits/select2.h bits/hwcap.h sys/auxv.h \
38 sys/sysmacros.h bits/sysmacros.h bits/types/struct_iovec.h
40 routines := brk sbrk sstk ioctl \
41 readv writev preadv preadv64 pwritev pwritev64 \
42 preadv2 preadv64v2 pwritev2 pwritev64v2 \
43 setreuid setregid \
44 seteuid setegid \
45 getpagesize \
46 getdtsz \
47 gethostname sethostname getdomain setdomain \
48 select pselect \
49 acct chroot fsync sync fdatasync syncfs reboot \
50 gethostid sethostid \
51 revoke vhangup \
52 swapon swapoff mktemp mkstemp mkstemp64 mkdtemp \
53 mkostemp mkostemp64 mkstemps mkstemps64 mkostemps mkostemps64 \
54 ualarm usleep \
55 gtty stty \
56 ptrace \
57 fstab mntent mntent_r \
58 utimes lutimes futimes futimesat \
59 truncate ftruncate truncate64 ftruncate64 \
60 chflags fchflags \
61 insremque getttyent getusershell getpass ttyslot \
62 syslog syscall daemon \
63 mmap mmap64 munmap mprotect msync madvise mincore remap_file_pages\
64 mlock munlock mlockall munlockall \
65 efgcvt efgcvt_r qefgcvt qefgcvt_r \
66 hsearch hsearch_r tsearch lsearch \
67 err error ustat \
68 getsysstats dirname regexp \
69 getloadavg getclktck \
70 fgetxattr flistxattr fremovexattr fsetxattr getxattr \
71 listxattr lgetxattr llistxattr lremovexattr lsetxattr \
72 removexattr setxattr getauxval ifunc-impl-list makedev
74 generated += tst-error1.mtrace tst-error1-mem.out
76 aux := init-misc
77 install-lib := libg.a
78 gpl2lgpl := error.c error.h
80 tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
81 tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1 \
82 tst-mntent-blank-corrupt tst-mntent-blank-passno bug18240 \
83 tst-preadvwritev tst-preadvwritev64 tst-makedev tst-empty \
84 tst-preadvwritev2 tst-preadvwritev64v2
86 tests-internal := tst-atomic tst-atomic-long
87 tests-static := tst-empty
89 ifeq ($(run-built-tests),yes)
90 tests-special += $(objpfx)tst-error1-mem.out
91 endif
93 CFLAGS-select.c = -fexceptions -fasynchronous-unwind-tables
94 CFLAGS-tsearch.c = $(uses-callbacks)
95 CFLAGS-lsearch.c = $(uses-callbacks)
96 CFLAGS-pselect.c = -fexceptions
97 CFLAGS-readv.c = -fexceptions -fasynchronous-unwind-tables
98 CFLAGS-writev.c = -fexceptions -fasynchronous-unwind-tables
99 CFLAGS-preadv.c = -fexceptions -fasynchronous-unwind-tables
100 CFLAGS-preadv64.c = -fexceptions -fasynchronous-unwind-tables
101 CFLAGS-pwritev.c = -fexceptions -fasynchronous-unwind-tables
102 CFLAGS-pwritev64.c = -fexceptions -fasynchronous-unwind-tables
103 CFLAGS-preadv2.c = -fexceptions -fasynchronous-unwind-tables
104 CFLAGS-preadv64v2.c = -fexceptions -fasynchronous-unwind-tables
105 CFLAGS-pwritev2.c = -fexceptions -fasynchronous-unwind-tables
106 CFLAGS-pwritev64v2.c = -fexceptions -fasynchronous-unwind-tables
107 CFLAGS-usleep.c = -fexceptions
108 CFLAGS-syslog.c = -fexceptions
109 CFLAGS-error.c = -fexceptions
110 CFLAGS-getpass.c = -fexceptions
111 CFLAGS-mkstemp.c = -fexceptions
112 CFLAGS-mkstemp64.c = -fexceptions
113 CFLAGS-getsysstats.c = -fexceptions
114 CFLAGS-getusershell.c = -fexceptions
115 CFLAGS-err.c = -fexceptions
116 CFLAGS-tst-tsearch.c = $(stack-align-test-flags)
117 CFLAGS-msync.c = -fexceptions -fasynchronous-unwind-tables
118 CFLAGS-fdatasync.c = -fexceptions -fasynchronous-unwind-tables
119 CFLAGS-fsync.c = -fexceptions -fasynchronous-unwind-tables
121 # Called during static library initialization, so turn stack-protection
122 # off for non-shared builds.
123 CFLAGS-sbrk.o = $(no-stack-protector)
124 CFLAGS-sbrk.op = $(no-stack-protector)
125 CFLAGS-brk.o = $(no-stack-protector)
126 CFLAGS-brk.op = $(no-stack-protector)
128 include ../Rules
130 $(objpfx)libg.a: $(dep-dummy-lib); $(make-dummy-lib)
132 $(objpfx)tst-tsearch: $(libm)
134 tst-error1-ENV = MALLOC_TRACE=$(objpfx)tst-error1.mtrace
135 tst-error1-ARGS = $(objpfx)tst-error1.out
136 $(objpfx)tst-error1-mem.out: $(objpfx)tst-error1.out
137 $(common-objpfx)malloc/mtrace $(objpfx)tst-error1.mtrace > $@; \
138 $(evaluate-test)