diff mbox

Revert 2015-11-09 sanitizer/obstack configury

Message ID 20160725011356.GA18978@bubble.grove.modra.org
State New
Headers show

Commit Message

Alan Modra July 25, 2016, 1:13 a.m. UTC
The 2015-11-23 sanitizer merge from upstream lost the changes from
f6528435 to sanitizer_common/sanitizer_common_interceptors.inc, which
made use of _OBSTACK_SIZE_T.  So the configury changes to define
_OBSTACK_SIZE_T don't do anything.  This wasn't such a bad thing
anyway..  The configure test wrongly adds -I${srcdir}/../include,
effectively resulting in a test of libiberty/obstack rather than libc
obstack support, and it's the latter that asan and tsan need to work
with.

So, remove the useless configure test.  Upstream santizer project has
been made aware of the problem if glibc obstack support is ever
updated.  Bootsrapped etc. x86_64-linux and committed as obvious.

	Revert 2015-11-09  Alan Modra  <amodra@gmail.com>
	* configure.ac: Don't substitute OBSTACK_DEFS.
	* asan/Makefile.am: Remove OBSTACK_DEFS from 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.
diff mbox

Patch

diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac
index 063b1d6..93192e1 100644
--- a/libsanitizer/configure.ac
+++ b/libsanitizer/configure.ac
@@ -339,30 +339,6 @@  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"])
 
diff --git a/libsanitizer/asan/Makefile.am b/libsanitizer/asan/Makefile.am
index 4500e21..bd3cd73 100644
--- a/libsanitizer/asan/Makefile.am
+++ b/libsanitizer/asan/Makefile.am
@@ -3,7 +3,7 @@  AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir)
 # May be used by toolexeclibdir.
 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
 
-DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DASAN_HAS_EXCEPTIONS=1 -DASAN_NEEDS_SEGV=1 -DCAN_SANITIZE_UB=0 @OBSTACK_DEFS@
+DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DASAN_HAS_EXCEPTIONS=1 -DASAN_NEEDS_SEGV=1 -DCAN_SANITIZE_UB=0
 if USING_MAC_INTERPOSE
 DEFS += -DMAC_INTERPOSE_FUNCTIONS -DMISSING_BLOCKS_SUPPORT
 endif
diff --git a/libsanitizer/tsan/Makefile.am b/libsanitizer/tsan/Makefile.am
index 6776923..9833de2 100644
--- a/libsanitizer/tsan/Makefile.am
+++ b/libsanitizer/tsan/Makefile.am
@@ -3,7 +3,7 @@  AM_CPPFLAGS = -I $(top_srcdir) -I $(top_srcdir)/include
 # May be used by toolexeclibdir.
 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
 
-DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DCAN_SANITIZE_UB=0 @OBSTACK_DEFS@
+DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DCAN_SANITIZE_UB=0
 AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long  -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros
 AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
 AM_CXXFLAGS += -std=gnu++11