annotate libsanitizer/configure.ac @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 # -*- Autoconf -*-
kono
parents:
diff changeset
2 # Process this file with autoconf to produce a configure script.
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 AC_INIT(package-unused, version-unused, libsanitizer)
kono
parents:
diff changeset
5 AC_CONFIG_SRCDIR([include/sanitizer/common_interface_defs.h])
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 AM_ENABLE_MULTILIB(, ..)
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
kono
parents:
diff changeset
10 AC_ARG_ENABLE(version-specific-runtime-libs,
kono
parents:
diff changeset
11 [ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
kono
parents:
diff changeset
12 [case "$enableval" in
kono
parents:
diff changeset
13 yes) version_specific_libs=yes ;;
kono
parents:
diff changeset
14 no) version_specific_libs=no ;;
kono
parents:
diff changeset
15 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
kono
parents:
diff changeset
16 esac],
kono
parents:
diff changeset
17 [version_specific_libs=no])
kono
parents:
diff changeset
18 AC_MSG_RESULT($version_specific_libs)
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 AC_USE_SYSTEM_EXTENSIONS
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 # Do not delete or change the following two lines. For why, see
kono
parents:
diff changeset
23 # http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
kono
parents:
diff changeset
24 AC_CANONICAL_SYSTEM
kono
parents:
diff changeset
25 target_alias=${target_alias-$host_alias}
kono
parents:
diff changeset
26 AC_SUBST(target_alias)
kono
parents:
diff changeset
27 GCC_LIBSTDCXX_RAW_CXX_FLAGS
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 AM_INIT_AUTOMAKE(foreign no-dist)
kono
parents:
diff changeset
30 AM_MAINTAINER_MODE
kono
parents:
diff changeset
31
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
32 GCC_WITH_TOOLEXECLIBDIR
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
33
111
kono
parents:
diff changeset
34 # Calculate toolexeclibdir
kono
parents:
diff changeset
35 # Also toolexecdir, though it's only used in toolexeclibdir
kono
parents:
diff changeset
36 case ${version_specific_libs} in
kono
parents:
diff changeset
37 yes)
kono
parents:
diff changeset
38 # Need the gcc compiler version to know where to install libraries
kono
parents:
diff changeset
39 # and header files if --enable-version-specific-runtime-libs option
kono
parents:
diff changeset
40 # is selected.
kono
parents:
diff changeset
41 toolexecdir='$(libdir)/gcc/$(target_alias)'
kono
parents:
diff changeset
42 toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
kono
parents:
diff changeset
43 ;;
kono
parents:
diff changeset
44 no)
kono
parents:
diff changeset
45 if test -n "$with_cross_host" &&
kono
parents:
diff changeset
46 test x"$with_cross_host" != x"no"; then
kono
parents:
diff changeset
47 # Install a library built with a cross compiler in tooldir, not libdir.
kono
parents:
diff changeset
48 toolexecdir='$(exec_prefix)/$(target_alias)'
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
49 case ${with_toolexeclibdir} in
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
50 no)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
51 toolexeclibdir='$(toolexecdir)/lib'
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
52 ;;
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
53 *)
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
54 toolexeclibdir=${with_toolexeclibdir}
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
55 ;;
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
56 esac
111
kono
parents:
diff changeset
57 else
kono
parents:
diff changeset
58 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
kono
parents:
diff changeset
59 toolexeclibdir='$(libdir)'
kono
parents:
diff changeset
60 fi
kono
parents:
diff changeset
61 multi_os_directory=`$CC -print-multi-os-directory`
kono
parents:
diff changeset
62 case $multi_os_directory in
kono
parents:
diff changeset
63 .) ;; # Avoid trailing /.
kono
parents:
diff changeset
64 *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
kono
parents:
diff changeset
65 esac
kono
parents:
diff changeset
66 ;;
kono
parents:
diff changeset
67 esac
kono
parents:
diff changeset
68 AC_SUBST(toolexecdir)
kono
parents:
diff changeset
69 AC_SUBST(toolexeclibdir)
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 # Checks for programs.
kono
parents:
diff changeset
72 AC_PROG_CC
kono
parents:
diff changeset
73 AC_PROG_CXX
kono
parents:
diff changeset
74 AM_PROG_AS
kono
parents:
diff changeset
75 AC_PROG_RANLIB
kono
parents:
diff changeset
76
kono
parents:
diff changeset
77 AC_LIBTOOL_DLOPEN
kono
parents:
diff changeset
78 AM_PROG_LIBTOOL
kono
parents:
diff changeset
79
kono
parents:
diff changeset
80 AC_PROG_AWK
kono
parents:
diff changeset
81 case "$AWK" in
kono
parents:
diff changeset
82 "") AC_MSG_ERROR([can't build without awk]) ;;
kono
parents:
diff changeset
83 esac
kono
parents:
diff changeset
84
kono
parents:
diff changeset
85 AC_SUBST(enable_shared)
kono
parents:
diff changeset
86 AC_SUBST(enable_static)
kono
parents:
diff changeset
87
kono
parents:
diff changeset
88 AC_CHECK_SIZEOF([void *])
kono
parents:
diff changeset
89
kono
parents:
diff changeset
90 if test "${multilib}" = "yes"; then
kono
parents:
diff changeset
91 multilib_arg="--enable-multilib"
kono
parents:
diff changeset
92 else
kono
parents:
diff changeset
93 multilib_arg=
kono
parents:
diff changeset
94 fi
kono
parents:
diff changeset
95
kono
parents:
diff changeset
96 # Get target configury.
kono
parents:
diff changeset
97 unset TSAN_SUPPORTED
kono
parents:
diff changeset
98 unset LSAN_SUPPORTED
kono
parents:
diff changeset
99 . ${srcdir}/configure.tgt
kono
parents:
diff changeset
100 AM_CONDITIONAL(TSAN_SUPPORTED, [test "x$TSAN_SUPPORTED" = "xyes"])
kono
parents:
diff changeset
101 AM_CONDITIONAL(LSAN_SUPPORTED, [test "x$LSAN_SUPPORTED" = "xyes"])
kono
parents:
diff changeset
102
kono
parents:
diff changeset
103 # Check for functions needed.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
104 AC_CHECK_FUNCS(clock_getres clock_gettime clock_settime lstat readlink)
111
kono
parents:
diff changeset
105
kono
parents:
diff changeset
106 # Common libraries that we need to link against for all sanitizer libs.
kono
parents:
diff changeset
107 link_sanitizer_common='-lpthread -lm'
kono
parents:
diff changeset
108
kono
parents:
diff changeset
109 # At least for glibc, shm_open is in librt. But don't pull that
kono
parents:
diff changeset
110 # in if it still doesn't give us the function we want. This
kono
parents:
diff changeset
111 # test is copied from libgomp.
kono
parents:
diff changeset
112 AC_CHECK_LIB(rt, shm_open,
kono
parents:
diff changeset
113 [link_sanitizer_common="-lrt $link_sanitizer_common"])
kono
parents:
diff changeset
114
kono
parents:
diff changeset
115 # Do a configure time check for -ldl
kono
parents:
diff changeset
116 AC_CHECK_LIB(dl, dlsym,
kono
parents:
diff changeset
117 [link_sanitizer_common="-ldl $link_sanitizer_common"])
kono
parents:
diff changeset
118
kono
parents:
diff changeset
119 # Set up the set of additional libraries that we need to link against for libasan.
kono
parents:
diff changeset
120 link_libasan=$link_sanitizer_common
kono
parents:
diff changeset
121 AC_SUBST(link_libasan)
kono
parents:
diff changeset
122
kono
parents:
diff changeset
123 # Set up the set of additional libraries that we need to link against for libtsan.
kono
parents:
diff changeset
124 link_libtsan=$link_sanitizer_common
kono
parents:
diff changeset
125 AC_SUBST(link_libtsan)
kono
parents:
diff changeset
126
kono
parents:
diff changeset
127 # Set up the set of additional libraries that we need to link against for libubsan.
kono
parents:
diff changeset
128 link_libubsan=$link_sanitizer_common
kono
parents:
diff changeset
129 AC_SUBST(link_libubsan)
kono
parents:
diff changeset
130
kono
parents:
diff changeset
131 # Set up the set of additional libraries that we need to link against for liblsan.
kono
parents:
diff changeset
132 link_liblsan=$link_sanitizer_common
kono
parents:
diff changeset
133 AC_SUBST(link_liblsan)
kono
parents:
diff changeset
134
kono
parents:
diff changeset
135
kono
parents:
diff changeset
136 # At least for glibc, clock_gettime is in librt. But don't pull that
kono
parents:
diff changeset
137 # in if it still doesn't give us the function we want. This
kono
parents:
diff changeset
138 # test is copied from libgomp.
kono
parents:
diff changeset
139 AC_CHECK_LIB(rt, clock_gettime,
kono
parents:
diff changeset
140 [link_libasan="-lrt $link_libasan"
kono
parents:
diff changeset
141 link_libtsan="-lrt $link_libtsan"
kono
parents:
diff changeset
142 # Other sanitizers do not override clock_* API
kono
parents:
diff changeset
143 ])
kono
parents:
diff changeset
144
kono
parents:
diff changeset
145 case "$host" in
kono
parents:
diff changeset
146 *-*-darwin*) MAC_INTERPOSE=true ; enable_static=no ;;
kono
parents:
diff changeset
147 *) MAC_INTERPOSE=false ;;
kono
parents:
diff changeset
148 esac
kono
parents:
diff changeset
149 AM_CONDITIONAL(USING_MAC_INTERPOSE, $MAC_INTERPOSE)
kono
parents:
diff changeset
150
kono
parents:
diff changeset
151 backtrace_supported=yes
kono
parents:
diff changeset
152
kono
parents:
diff changeset
153 AC_MSG_CHECKING([for necessary platform features])
kono
parents:
diff changeset
154 case "$target" in
kono
parents:
diff changeset
155 *-*-linux*)
kono
parents:
diff changeset
156 # Some old Linux distributions miss required syscalls.
kono
parents:
diff changeset
157 sanitizer_supported=no
kono
parents:
diff changeset
158 AC_TRY_COMPILE([#include <sys/syscall.h>],[
kono
parents:
diff changeset
159 syscall (__NR_gettid);
kono
parents:
diff changeset
160 syscall (__NR_futex);
kono
parents:
diff changeset
161 syscall (__NR_exit_group);
kono
parents:
diff changeset
162 ], [sanitizer_supported=yes])
kono
parents:
diff changeset
163 ;;
kono
parents:
diff changeset
164 *)
kono
parents:
diff changeset
165 sanitizer_supported=yes
kono
parents:
diff changeset
166 ;;
kono
parents:
diff changeset
167 esac
kono
parents:
diff changeset
168 AC_MSG_RESULT($sanitizer_supported)
kono
parents:
diff changeset
169 AM_CONDITIONAL(SANITIZER_SUPPORTED, test "$sanitizer_supported" = yes)
kono
parents:
diff changeset
170
kono
parents:
diff changeset
171 # Test for __sync support.
kono
parents:
diff changeset
172 AC_CACHE_CHECK([__sync extensions],
kono
parents:
diff changeset
173 [libsanitizer_cv_sys_sync],
kono
parents:
diff changeset
174 [if test -n "${with_target_subdir}"; then
kono
parents:
diff changeset
175 libsanitizer_cv_sys_sync=yes
kono
parents:
diff changeset
176 else
kono
parents:
diff changeset
177 AC_LINK_IFELSE(
kono
parents:
diff changeset
178 [AC_LANG_PROGRAM([int i;],
kono
parents:
diff changeset
179 [__sync_bool_compare_and_swap (&i, i, i);
kono
parents:
diff changeset
180 __sync_lock_test_and_set (&i, 1);
kono
parents:
diff changeset
181 __sync_lock_release (&i);])],
kono
parents:
diff changeset
182 [libsanitizer_cv_sys_sync=yes],
kono
parents:
diff changeset
183 [libsanitizer_cv_sys_sync=no])
kono
parents:
diff changeset
184 fi])
kono
parents:
diff changeset
185 if test "$libsanitizer_cv_sys_sync" = "yes"; then
kono
parents:
diff changeset
186 AC_DEFINE([HAVE_SYNC_FUNCTIONS], 1,
kono
parents:
diff changeset
187 [Define to 1 if you have the __sync functions])
kono
parents:
diff changeset
188 fi
kono
parents:
diff changeset
189
kono
parents:
diff changeset
190 # Test for __atomic support.
kono
parents:
diff changeset
191 AC_CACHE_CHECK([__atomic extensions],
kono
parents:
diff changeset
192 [libsanitizer_cv_sys_atomic],
kono
parents:
diff changeset
193 [if test -n "${with_target_subdir}"; then
kono
parents:
diff changeset
194 libsanitizer_cv_sys_atomic=yes
kono
parents:
diff changeset
195 else
kono
parents:
diff changeset
196 AC_LINK_IFELSE(
kono
parents:
diff changeset
197 [AC_LANG_PROGRAM([int i;],
kono
parents:
diff changeset
198 [__atomic_load_n (&i, __ATOMIC_ACQUIRE);
kono
parents:
diff changeset
199 __atomic_store_n (&i, 1, __ATOMIC_RELEASE);])],
kono
parents:
diff changeset
200 [libsanitizer_cv_sys_atomic=yes],
kono
parents:
diff changeset
201 [libsanitizer_cv_sys_atomic=no])
kono
parents:
diff changeset
202 fi])
kono
parents:
diff changeset
203 if test "$libsanitizer_cv_sys_atomic" = "yes"; then
kono
parents:
diff changeset
204 AC_DEFINE([HAVE_ATOMIC_FUNCTIONS], 1,
kono
parents:
diff changeset
205 [Define to 1 if you have the __atomic functions])
kono
parents:
diff changeset
206 fi
kono
parents:
diff changeset
207
kono
parents:
diff changeset
208 # The library needs to be able to read the executable itself. Compile
kono
parents:
diff changeset
209 # a file to determine the executable format. The awk script
kono
parents:
diff changeset
210 # filetype.awk prints out the file type.
kono
parents:
diff changeset
211 AC_CACHE_CHECK([output filetype],
kono
parents:
diff changeset
212 [libsanitizer_cv_sys_filetype],
kono
parents:
diff changeset
213 [filetype=
kono
parents:
diff changeset
214 AC_COMPILE_IFELSE(
kono
parents:
diff changeset
215 [AC_LANG_PROGRAM([int i;], [int j;])],
kono
parents:
diff changeset
216 [filetype=`${AWK} -f $srcdir/../libbacktrace/filetype.awk conftest.$ac_objext`],
kono
parents:
diff changeset
217 [AC_MSG_FAILURE([compiler failed])])
kono
parents:
diff changeset
218 libsanitizer_cv_sys_filetype=$filetype])
kono
parents:
diff changeset
219
kono
parents:
diff changeset
220 # Match the file type to decide what files to compile.
kono
parents:
diff changeset
221 FORMAT_FILE=
kono
parents:
diff changeset
222 case "$libsanitizer_cv_sys_filetype" in
kono
parents:
diff changeset
223 elf*) FORMAT_FILE="elf.lo" ;;
kono
parents:
diff changeset
224 *) AC_MSG_WARN([could not determine output file type])
kono
parents:
diff changeset
225 FORMAT_FILE="unknown.lo"
kono
parents:
diff changeset
226 backtrace_supported=no
kono
parents:
diff changeset
227 ;;
kono
parents:
diff changeset
228 esac
kono
parents:
diff changeset
229 AC_SUBST(FORMAT_FILE)
kono
parents:
diff changeset
230
kono
parents:
diff changeset
231 # ELF defines.
kono
parents:
diff changeset
232 elfsize=
kono
parents:
diff changeset
233 case "$libsanitizer_cv_sys_filetype" in
kono
parents:
diff changeset
234 elf32) elfsize=32 ;;
kono
parents:
diff changeset
235 elf64) elfsize=64 ;;
kono
parents:
diff changeset
236 esac
kono
parents:
diff changeset
237 AC_DEFINE_UNQUOTED([BACKTRACE_ELF_SIZE], [$elfsize], [ELF size: 32 or 64])
kono
parents:
diff changeset
238
kono
parents:
diff changeset
239 BACKTRACE_SUPPORTED=0
kono
parents:
diff changeset
240 if test "$backtrace_supported" = "yes"; then
kono
parents:
diff changeset
241 BACKTRACE_SUPPORTED=1
kono
parents:
diff changeset
242 fi
kono
parents:
diff changeset
243 AC_SUBST(BACKTRACE_SUPPORTED)
kono
parents:
diff changeset
244
kono
parents:
diff changeset
245 GCC_HEADER_STDINT(gstdint.h)
kono
parents:
diff changeset
246
kono
parents:
diff changeset
247 AC_CHECK_HEADERS(sys/mman.h alloca.h)
kono
parents:
diff changeset
248 if test "$ac_cv_header_sys_mman_h" = "no"; then
kono
parents:
diff changeset
249 have_mmap=no
kono
parents:
diff changeset
250 else
kono
parents:
diff changeset
251 if test -n "${with_target_subdir}"; then
kono
parents:
diff changeset
252 # When built as a GCC target library, we can't do a link test. We
kono
parents:
diff changeset
253 # simply assume that if we have mman.h, we have mmap.
kono
parents:
diff changeset
254 have_mmap=yes
kono
parents:
diff changeset
255 else
kono
parents:
diff changeset
256 AC_CHECK_FUNC(mmap, [have_mmap=yes], [have_mmap=no])
kono
parents:
diff changeset
257 fi
kono
parents:
diff changeset
258 fi
kono
parents:
diff changeset
259 if test "$have_mmap" = "no"; then
kono
parents:
diff changeset
260 VIEW_FILE=read.lo
kono
parents:
diff changeset
261 ALLOC_FILE=alloc.lo
kono
parents:
diff changeset
262 else
kono
parents:
diff changeset
263 VIEW_FILE=mmapio.lo
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
264 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
111
kono
parents:
diff changeset
265 #include <sys/mman.h>
kono
parents:
diff changeset
266 #if !defined(MAP_ANONYMOUS) && !defined(MAP_ANON)
kono
parents:
diff changeset
267 #error no MAP_ANONYMOUS
kono
parents:
diff changeset
268 #endif
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
269 ])], [ALLOC_FILE=mmap.lo], [ALLOC_FILE=alloc.lo])
111
kono
parents:
diff changeset
270 fi
kono
parents:
diff changeset
271 AC_SUBST(VIEW_FILE)
kono
parents:
diff changeset
272 AC_SUBST(ALLOC_FILE)
kono
parents:
diff changeset
273
kono
parents:
diff changeset
274 BACKTRACE_USES_MALLOC=0
kono
parents:
diff changeset
275 if test "$ALLOC_FILE" = "alloc.lo"; then
kono
parents:
diff changeset
276 BACKTRACE_USES_MALLOC=1
kono
parents:
diff changeset
277 fi
kono
parents:
diff changeset
278 AC_SUBST(BACKTRACE_USES_MALLOC)
kono
parents:
diff changeset
279
kono
parents:
diff changeset
280 # Don't care about thread support
kono
parents:
diff changeset
281 BACKTRACE_SUPPORTS_THREADS=0
kono
parents:
diff changeset
282 AC_SUBST(BACKTRACE_SUPPORTS_THREADS)
kono
parents:
diff changeset
283
kono
parents:
diff changeset
284 # Check for dl_iterate_phdr.
kono
parents:
diff changeset
285 AC_CHECK_HEADERS(link.h)
kono
parents:
diff changeset
286 if test "$ac_cv_header_link_h" = "no"; then
kono
parents:
diff changeset
287 have_dl_iterate_phdr=no
kono
parents:
diff changeset
288 else
kono
parents:
diff changeset
289 # When built as a GCC target library, we can't do a link test.
kono
parents:
diff changeset
290 AC_EGREP_HEADER([dl_iterate_phdr], [link.h], [have_dl_iterate_phdr=yes],
kono
parents:
diff changeset
291 [have_dl_iterate_phdr=no])
kono
parents:
diff changeset
292 fi
kono
parents:
diff changeset
293 if test "$have_dl_iterate_phdr" = "yes"; then
kono
parents:
diff changeset
294 AC_DEFINE(HAVE_DL_ITERATE_PHDR, 1, [Define if dl_iterate_phdr is available.])
kono
parents:
diff changeset
295 fi
kono
parents:
diff changeset
296
kono
parents:
diff changeset
297 # Check for the fcntl function.
kono
parents:
diff changeset
298 if test -n "${with_target_subdir}"; then
kono
parents:
diff changeset
299 case "${host}" in
kono
parents:
diff changeset
300 *-*-mingw*) have_fcntl=no ;;
kono
parents:
diff changeset
301 *) have_fcntl=yes ;;
kono
parents:
diff changeset
302 esac
kono
parents:
diff changeset
303 else
kono
parents:
diff changeset
304 AC_CHECK_FUNC(fcntl, [have_fcntl=yes], [have_fcntl=no])
kono
parents:
diff changeset
305 fi
kono
parents:
diff changeset
306 if test "$have_fcntl" = "yes"; then
kono
parents:
diff changeset
307 AC_DEFINE([HAVE_FCNTL], 1,
kono
parents:
diff changeset
308 [Define to 1 if you have the fcntl function])
kono
parents:
diff changeset
309 fi
kono
parents:
diff changeset
310
kono
parents:
diff changeset
311 AC_CHECK_DECLS(strnlen)
kono
parents:
diff changeset
312
kono
parents:
diff changeset
313 # Check for getexecname function.
kono
parents:
diff changeset
314 if test -n "${with_target_subdir}"; then
kono
parents:
diff changeset
315 case "${host}" in
kono
parents:
diff changeset
316 *-*-solaris2*) have_getexecname=yes ;;
kono
parents:
diff changeset
317 *) have_getexecname=no ;;
kono
parents:
diff changeset
318 esac
kono
parents:
diff changeset
319 else
kono
parents:
diff changeset
320 AC_CHECK_FUNC(getexecname, [have_getexecname=yes], [have_getexecname=no])
kono
parents:
diff changeset
321 fi
kono
parents:
diff changeset
322 if test "$have_getexecname" = "yes"; then
kono
parents:
diff changeset
323 AC_DEFINE(HAVE_GETEXECNAME, 1, [Define if getexecname is available.])
kono
parents:
diff changeset
324 fi
kono
parents:
diff changeset
325
kono
parents:
diff changeset
326 # Check for rpc/xdr.h
kono
parents:
diff changeset
327 AC_CHECK_HEADERS(rpc/xdr.h)
kono
parents:
diff changeset
328 if test x"$ac_cv_header_rpc_xdr_h" = xyes; then
kono
parents:
diff changeset
329 rpc_defs="$rpc_defs -DHAVE_RPC_XDR_H=1"
kono
parents:
diff changeset
330 else
kono
parents:
diff changeset
331 rpc_defs="$rpc_defs -DHAVE_RPC_XDR_H=0"
kono
parents:
diff changeset
332 fi
kono
parents:
diff changeset
333
kono
parents:
diff changeset
334 # Check for tirpc/rpc/xdr.h
kono
parents:
diff changeset
335 AC_CHECK_HEADERS(tirpc/rpc/xdr.h)
kono
parents:
diff changeset
336 if test x"$ac_cv_header_tirpc_rpc_xdr_h" = xyes; then
kono
parents:
diff changeset
337 rpc_defs="$rpc_defs -DHAVE_TIRPC_RPC_XDR_H=1"
kono
parents:
diff changeset
338 else
kono
parents:
diff changeset
339 rpc_defs="$rpc_defs -DHAVE_TIRPC_RPC_XDR_H=0"
kono
parents:
diff changeset
340 fi
kono
parents:
diff changeset
341
kono
parents:
diff changeset
342 AC_SUBST([RPC_DEFS], [$rpc_defs])
kono
parents:
diff changeset
343
kono
parents:
diff changeset
344 AM_CONDITIONAL(LIBBACKTRACE_SUPPORTED,
kono
parents:
diff changeset
345 [test "x${BACKTRACE_SUPPORTED}x${BACKTRACE_USES_MALLOC}" = "x1x0"])
kono
parents:
diff changeset
346
kono
parents:
diff changeset
347 AH_BOTTOM([#include "libbacktrace/backtrace-rename.h"])
kono
parents:
diff changeset
348 AC_CONFIG_FILES([Makefile libsanitizer.spec libbacktrace/backtrace-supported.h])
kono
parents:
diff changeset
349 AC_CONFIG_HEADER(config.h)
kono
parents:
diff changeset
350
kono
parents:
diff changeset
351 AC_CONFIG_FILES(AC_FOREACH([DIR], [interception sanitizer_common libbacktrace lsan asan ubsan], [DIR/Makefile ]),
kono
parents:
diff changeset
352 [cat > vpsed$$ << \_EOF
kono
parents:
diff changeset
353 s!`test -f '$<' || echo '$(srcdir)/'`!!
kono
parents:
diff changeset
354 _EOF
kono
parents:
diff changeset
355 sed -f vpsed$$ $ac_file > tmp$$
kono
parents:
diff changeset
356 mv tmp$$ $ac_file
kono
parents:
diff changeset
357 rm vpsed$$
kono
parents:
diff changeset
358 echo 'MULTISUBDIR =' >> $ac_file
kono
parents:
diff changeset
359 ml_norecursion=yes
kono
parents:
diff changeset
360 . ${multi_basedir}/config-ml.in
kono
parents:
diff changeset
361 AS_UNSET([ml_norecursion])
kono
parents:
diff changeset
362 ])
kono
parents:
diff changeset
363
kono
parents:
diff changeset
364 if test "x$TSAN_SUPPORTED" = "xyes"; then
kono
parents:
diff changeset
365 AC_CONFIG_FILES(AC_FOREACH([DIR], [tsan], [DIR/Makefile ]),
kono
parents:
diff changeset
366 [cat > vpsed$$ << \_EOF
kono
parents:
diff changeset
367 s!`test -f '$<' || echo '$(srcdir)/'`!!
kono
parents:
diff changeset
368 _EOF
kono
parents:
diff changeset
369 sed -f vpsed$$ $ac_file > tmp$$
kono
parents:
diff changeset
370 mv tmp$$ $ac_file
kono
parents:
diff changeset
371 rm vpsed$$
kono
parents:
diff changeset
372 echo 'MULTISUBDIR =' >> $ac_file
kono
parents:
diff changeset
373 ml_norecursion=yes
kono
parents:
diff changeset
374 . ${multi_basedir}/config-ml.in
kono
parents:
diff changeset
375 AS_UNSET([ml_norecursion])
kono
parents:
diff changeset
376 ])
kono
parents:
diff changeset
377 fi
kono
parents:
diff changeset
378
kono
parents:
diff changeset
379 AC_SUBST([TSAN_TARGET_DEPENDENT_OBJECTS])
kono
parents:
diff changeset
380 AC_SUBST([SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS])
kono
parents:
diff changeset
381
kono
parents:
diff changeset
382 # Determine what GCC version number to use in filesystem paths.
kono
parents:
diff changeset
383 GCC_BASE_VER
kono
parents:
diff changeset
384
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
385 # Add CET specific flags if Intel CET is enabled.
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
386 GCC_CET_FLAGS(CET_FLAGS)
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
387 EXTRA_CFLAGS="$EXTRA_CFLAGS $CET_FLAGS"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
388 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $CET_FLAGS"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
389 EXTRA_ASFLAGS=$CET_FLAGS
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
390 AC_SUBST(EXTRA_ASFLAGS)
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
391 AC_SUBST(EXTRA_CFLAGS)
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
392 AC_SUBST(EXTRA_CXXFLAGS)
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
393
111
kono
parents:
diff changeset
394 AC_OUTPUT