summaryrefslogtreecommitdiff
path: root/libsanitizer/configure.ac
diff options
context:
space:
mode:
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-09 04:23:25 +0000
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-09 04:23:25 +0000
commitf65284355a76a5e1d5732f744a5f06658dc2b67f (patch)
tree0212f54a80b4b66513331116aad8fd4206c3c101 /libsanitizer/configure.ac
parent65c893900204393820e27c713e1dbe1e220bdc26 (diff)
downloadgcc-f65284355a76a5e1d5732f744a5f06658dc2b67f.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229986 138bc75d-0d04-0410-961f-82ee72b054a4
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 81fd46d2980..72b13a10367 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"])