From 3549e181bd89b7f8a978cae9f55679c4ccd9a010 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 16 Nov 2016 21:10:27 +0100 Subject: [PATCH] re PR bootstrap/72823 (r239175 causes build failure) PR bootstrap/72823 * configure.ac (ENABLE_ASSERT_CHECKING): Define if gcc configure would define that macro. * configure: Regenerated. * config.in: Regenerated. From-SVN: r242510 --- libcpp/ChangeLog | 8 ++++++++ libcpp/config.in | 3 +++ libcpp/configure | 12 ++++++++++-- libcpp/configure.ac | 11 +++++++++-- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index a298a2fcef6..7690b5deba9 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,11 @@ +2016-11-16 Jakub Jelinek + + PR bootstrap/72823 + * configure.ac (ENABLE_ASSERT_CHECKING): Define if gcc configure + would define that macro. + * configure: Regenerated. + * config.in: Regenerated. + 2016-11-08 Richard Earnshaw * lex.c (search_line_fast): New implementation for AArch64. diff --git a/libcpp/config.in b/libcpp/config.in index 3bbffe7815e..dd489a5f402 100644 --- a/libcpp/config.in +++ b/libcpp/config.in @@ -14,6 +14,9 @@ /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA +/* Define if you want assertions enabled. This is a cheap check. */ +#undef ENABLE_ASSERT_CHECKING + /* Define to enable system headers canonicalization. */ #undef ENABLE_CANONICAL_SYSTEM_HEADERS diff --git a/libcpp/configure b/libcpp/configure index b6f129c48b9..12c1907ed40 100755 --- a/libcpp/configure +++ b/libcpp/configure @@ -7288,9 +7288,11 @@ for check in release $ac_checking_flags do case $check in # these set all the flags to specific states - yes|all) ac_checking=1 ; ac_valgrind_checking= ;; - no|none|release) ac_checking= ; ac_valgrind_checking= ;; + yes|all) ac_checking=1 ; ac_assert_checking=1 ; ac_valgrind_checking= ;; + no|none) ac_checking= ; ac_assert_checking= ; ac_valgrind_checking= ;; + release) ac_checking= ; ac_assert_checking=1 ; ac_valgrind_checking= ;; # these enable particular checks + assert) ac_assert_checking=1 ;; misc) ac_checking=1 ;; valgrind) ac_valgrind_checking=1 ;; # accept @@ -7308,6 +7310,12 @@ else fi +if test x$ac_assert_checking != x ; then + +$as_echo "#define ENABLE_ASSERT_CHECKING 1" >>confdefs.h + +fi + if test x$ac_valgrind_checking != x ; then $as_echo "#define ENABLE_VALGRIND_CHECKING 1" >>confdefs.h diff --git a/libcpp/configure.ac b/libcpp/configure.ac index 3077ee09768..d0a59dc3e0f 100644 --- a/libcpp/configure.ac +++ b/libcpp/configure.ac @@ -152,9 +152,11 @@ for check in release $ac_checking_flags do case $check in # these set all the flags to specific states - yes|all) ac_checking=1 ; ac_valgrind_checking= ;; - no|none|release) ac_checking= ; ac_valgrind_checking= ;; + yes|all) ac_checking=1 ; ac_assert_checking=1 ; ac_valgrind_checking= ;; + no|none) ac_checking= ; ac_assert_checking= ; ac_valgrind_checking= ;; + release) ac_checking= ; ac_assert_checking=1 ; ac_valgrind_checking= ;; # these enable particular checks + assert) ac_assert_checking=1 ;; misc) ac_checking=1 ;; valgrind) ac_valgrind_checking=1 ;; # accept @@ -170,6 +172,11 @@ else AC_DEFINE(CHECKING_P, 0) fi +if test x$ac_assert_checking != x ; then + AC_DEFINE(ENABLE_ASSERT_CHECKING, 1, +[Define if you want assertions enabled. This is a cheap check.]) +fi + if test x$ac_valgrind_checking != x ; then AC_DEFINE(ENABLE_VALGRIND_CHECKING, 1, [Define if you want to workaround valgrind (a memory checker) warnings about -- 2.30.2