aboutsummaryrefslogtreecommitdiff
path: root/libsanitizer/configure.ac
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-11-09 14:53:25 +1030
committerAlan Modra <amodra@gcc.gnu.org>2015-11-09 14:53:25 +1030
commit62c0f0a637378ce3e08280855c78e07f52455d38 (patch)
tree0212f54a80b4b66513331116aad8fd4206c3c101 /libsanitizer/configure.ac
parent37697711e72258415e3e68f4fce1e405e7832d04 (diff)
downloadgcc-62c0f0a637378ce3e08280855c78e07f52455d38.zip
gcc-62c0f0a637378ce3e08280855c78e07f52455d38.tar.gz
gcc-62c0f0a637378ce3e08280855c78e07f52455d38.tar.bz2
Update libsanitizer obstack interceptors
New obstack uses sensible types, size_t instead of int for length params. Since libsanitizer does not use prototypes from obstack.h to call the real functions, it's necessary to update the libsanitizer function declarations emitted by the INTERCEPTOR macro. * sanitizer_common/sanitizer_common_interceptors.inc: Update size params for _obstack_begin_1, _obstack_begin, _obstack_newchunk interceptors. * configure.ac: Substitute OBSTACK_DEFS. * asan/Makefile.am: Add OBSTACK_DEFS to DEFS. * tsan/Makefile.am: Likewise. * configure: Regenerate. * Makefile.in: Regenerate. * asan/Makefile.in: Regenerate. * interception/Makefile.in: Regenerate. * libbacktrace/Makefile.in: Regenerate. * lsan/Makefile.in: Regenerate. * sanitizer_common/Makefile.in: Regenerate. * tsan/Makefile.in: Regenerate. * ubsan/Makefile.in: Regenerate. From-SVN: r229986
Diffstat (limited to 'libsanitizer/configure.ac')
-rw-r--r--libsanitizer/configure.ac24
1 files changed, 24 insertions, 0 deletions
diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac
index 81fd46d..72b13a1 100644
--- a/libsanitizer/configure.ac
+++ b/libsanitizer/configure.ac
@@ -335,6 +335,30 @@ fi
AC_SUBST([RPC_DEFS], [$rpc_defs])
+dnl If this file is processed by autoconf-2.67 or later then the CPPFLAGS
+dnl "-o conftest.iii" can disappear, conftest.iii be replaced with
+dnl conftest.i in the sed command line, and the rm deleted.
+dnl Not all cpp's accept -o, and gcc -E does not accept a second file
+dnl argument as the output file.
+AC_CACHE_CHECK([obstack params],
+[libsanitizer_cv_sys_obstack],
+[save_cppflags=$CPPFLAGS
+CPPFLAGS="-I${srcdir}/../include -o conftest.iii $CPPFLAGS"
+AC_PREPROC_IFELSE([AC_LANG_SOURCE([
+#include "obstack.h"
+#ifdef _OBSTACK_SIZE_T
+_OBSTACK_SIZE_T
+#else
+int
+#endif
+])],
+[libsanitizer_cv_sys_obstack=`sed -e '/^#/d;/^[ ]*$/d' conftest.iii | sed -e '$!d;s/size_t/SIZE_T/'`],
+[libsanitizer_cv_sys_obstack=int])
+CPPFLAGS=$save_cppflags
+rm -f conftest.iii
+])
+AC_SUBST([OBSTACK_DEFS], [-D_OBSTACK_SIZE_T=\"$libsanitizer_cv_sys_obstack\"])
+
AM_CONDITIONAL(LIBBACKTRACE_SUPPORTED,
[test "x${BACKTRACE_SUPPORTED}x${BACKTRACE_USES_MALLOC}" = "x1x0"])