annotate libsanitizer/configure.ac @ 144:8f4e72ab4e11

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