x86: Support IBT and SHSTK in Intel CET [BZ #21598]
[glibc.git] / support / Makefile
blob652d2cdf6945b2eb960c10be555f1db67e36299b
1 # Makefile for support library, used only at build and test time
2 # Copyright (C) 2016-2018 Free Software Foundation, Inc.
3 # This file is part of the GNU C Library.
5 # The GNU C Library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
10 # The GNU C Library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with the GNU C Library; if not, see
17 # <http://www.gnu.org/licenses/>.
19 subdir := support
21 include ../Makeconfig
23 extra-libs := libsupport
24 extra-libs-others = $(extra-libs)
25 extra-libs-noinstall := $(extra-libs)
27 libsupport-routines = \
28 check \
29 check_addrinfo \
30 check_dns_packet \
31 check_hostent \
32 check_netent \
33 delayed_exit \
34 ignore_stderr \
35 next_to_fault \
36 oom_error \
37 resolv_test \
38 set_fortify_handler \
39 support-xfstat \
40 support-xstat \
41 support_become_root \
42 support_can_chroot \
43 support_capture_subprocess \
44 support_capture_subprocess_check \
45 support_chroot \
46 support_enter_mount_namespace \
47 support_enter_network_namespace \
48 support_format_address_family \
49 support_format_addrinfo \
50 support_format_dns_packet \
51 support_format_herrno \
52 support_format_hostent \
53 support_format_netent \
54 support_isolate_in_subprocess \
55 support_openpty \
56 support_quote_blob \
57 support_record_failure \
58 support_run_diff \
59 support_shared_allocate \
60 support_test_compare_blob \
61 support_test_compare_failure \
62 support_write_file_string \
63 support_test_main \
64 support_test_verify_impl \
65 temp_file \
66 write_message \
67 xaccept \
68 xaccept4 \
69 xasprintf \
70 xbind \
71 xcalloc \
72 xchroot \
73 xclose \
74 xconnect \
75 xdlfcn \
76 xdup2 \
77 xfclose \
78 xfopen \
79 xfork \
80 xftruncate \
81 xgetsockname \
82 xlisten \
83 xlseek \
84 xmalloc \
85 xmemstream \
86 xmkdir \
87 xmmap \
88 xmprotect \
89 xmunmap \
90 xopen \
91 xpipe \
92 xpoll \
93 xpthread_attr_destroy \
94 xpthread_attr_init \
95 xpthread_attr_setdetachstate \
96 xpthread_attr_setguardsize \
97 xpthread_attr_setstacksize \
98 xpthread_barrier_destroy \
99 xpthread_barrier_init \
100 xpthread_barrier_wait \
101 xpthread_barrierattr_destroy \
102 xpthread_barrierattr_init \
103 xpthread_barrierattr_setpshared \
104 xpthread_cancel \
105 xpthread_check_return \
106 xpthread_cond_wait \
107 xpthread_create \
108 xpthread_detach \
109 xpthread_join \
110 xpthread_mutex_consistent \
111 xpthread_mutex_destroy \
112 xpthread_mutex_init \
113 xpthread_mutex_lock \
114 xpthread_mutex_unlock \
115 xpthread_mutexattr_destroy \
116 xpthread_mutexattr_init \
117 xpthread_mutexattr_setprotocol \
118 xpthread_mutexattr_setpshared \
119 xpthread_mutexattr_setrobust \
120 xpthread_mutexattr_settype \
121 xpthread_once \
122 xpthread_rwlock_init \
123 xpthread_rwlock_rdlock \
124 xpthread_rwlock_unlock \
125 xpthread_rwlock_wrlock \
126 xpthread_rwlockattr_init \
127 xpthread_rwlockattr_setkind_np \
128 xpthread_sigmask \
129 xpthread_spin_lock \
130 xpthread_spin_unlock \
131 xraise \
132 xreadlink \
133 xrealloc \
134 xrecvfrom \
135 xsendto \
136 xsetsockopt \
137 xsigaction \
138 xsignal \
139 xsocket \
140 xstrdup \
141 xstrndup \
142 xsysconf \
143 xunlink \
144 xwaitpid \
145 xwrite \
147 libsupport-static-only-routines := $(libsupport-routines)
148 # Only build one variant of the library.
149 libsupport-inhibit-o := .os
150 ifeq ($(build-shared),yes)
151 libsupport-inhibit-o += .o
152 endif
154 tests = \
155 README-testing \
156 tst-support-namespace \
157 tst-support_capture_subprocess \
158 tst-support_format_dns_packet \
159 tst-support_quote_blob \
160 tst-support_record_failure \
161 tst-test_compare \
162 tst-test_compare_blob \
163 tst-xreadlink \
165 ifeq ($(run-built-tests),yes)
166 tests-special = \
167 $(objpfx)tst-support_record_failure-2.out
169 $(objpfx)tst-support_record_failure-2.out: tst-support_record_failure-2.sh \
170 $(objpfx)tst-support_record_failure
171 $(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
172 '$(run-program-env)' '$(test-program-prefix-after-env)' \
173 > $@; \
174 $(evaluate-test)
175 endif
177 $(objpfx)tst-support_format_dns_packet: $(common-objpfx)resolv/libresolv.so
179 include ../Rules