From b06f87c7eb14eb7806cd1fafa779bde8792ed874 Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Fri, 30 Sep 2016 18:57:49 +0000 Subject: [PATCH] configure.ac: Split CHECKING_P into CHECKING_P and ENABLE_EXTRA_CHECKING. 2016-09-30 Bernd Edlinger * configure.ac: Split CHECKING_P into CHECKING_P and ENABLE_EXTRA_CHECKING. * configure: Regenerated. * config.in: Adjust commment of CHECKING_P. Add ENABLE_EXTRA_CHECKING. * common.opt (flag_checking): Use CHECKING_P and ENABLE_EXTRA_CHECKING. From-SVN: r240677 --- gcc/ChangeLog | 8 ++++++++ gcc/common.opt | 2 +- gcc/config.in | 12 +++++++++--- gcc/configure | 19 +++++++++++-------- gcc/configure.ac | 17 ++++++++++------- 5 files changed, 39 insertions(+), 19 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 22801a2..83f5420 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2016-09-30 Bernd Edlinger + + * configure.ac: Split CHECKING_P into CHECKING_P and + ENABLE_EXTRA_CHECKING. + * configure: Regenerated. + * config.in: Adjust commment of CHECKING_P. Add ENABLE_EXTRA_CHECKING. + * common.opt (flag_checking): Use CHECKING_P and ENABLE_EXTRA_CHECKING. + 2016-09-30 Prasad Ghangal PR other/31566 diff --git a/gcc/common.opt b/gcc/common.opt index 0e01577..3425c19 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -1038,7 +1038,7 @@ Common Var(flag_check_new) Check the return value of new in C++. fchecking -Common Var(flag_checking) Init(CHECKING_P) +Common Var(flag_checking) Init(CHECKING_P ? ENABLE_EXTRA_CHECKING ? 2 : 1 : 0) Perform internal consistency checkings. fchecking= diff --git a/gcc/config.in b/gcc/config.in index 8470456..93a0301 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -30,14 +30,20 @@ #endif -/* Define to 1 if you want more run-time sanity checks. This one gets a grab - bag of miscellaneous but relatively cheap checks. Define to 2 if you want - also extra run-time checking that might affect code generation. */ +/* Define to 0/1 if you want more run-time sanity checks. This one gets a grab + bag of miscellaneous but relatively cheap checks. */ #ifndef USED_FOR_TARGET #undef CHECKING_P #endif +/* Define to 0/1 if you want also extra run-time checking that might affect + code generation. */ +#ifndef USED_FOR_TARGET +#undef ENABLE_EXTRA_CHECKING +#endif + + /* Define 0/1 to force the choice for exception handling model. */ #ifndef USED_FOR_TARGET #undef CONFIG_SJLJ_EXCEPTIONS diff --git a/gcc/configure b/gcc/configure index 47f70e6..2503ba9 100755 --- a/gcc/configure +++ b/gcc/configure @@ -7135,13 +7135,8 @@ IFS="$ac_save_IFS" nocommon_flag="" if test x$ac_checking != x ; then - if test x$ac_extra_checking != x ; then - ac_checking=2 - fi -cat >>confdefs.h <<_ACEOF -#define CHECKING_P $ac_checking -_ACEOF +$as_echo "#define CHECKING_P 1" >>confdefs.h nocommon_flag=-fno-common else @@ -7149,6 +7144,14 @@ else fi +if test x$ac_extra_checking != x ; then + +$as_echo "#define ENABLE_EXTRA_CHECKING 1" >>confdefs.h + +else + $as_echo "#define ENABLE_EXTRA_CHECKING 0" >>confdefs.h + +fi if test x$ac_df_checking != x ; then $as_echo "#define ENABLE_DF_CHECKING 1" >>confdefs.h @@ -18476,7 +18479,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18479 "configure" +#line 18482 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18582,7 +18585,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18585 "configure" +#line 18588 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index a702f17..fa789d5 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -579,18 +579,21 @@ IFS="$ac_save_IFS" nocommon_flag="" if test x$ac_checking != x ; then - if test x$ac_extra_checking != x ; then - ac_checking=2 - fi - AC_DEFINE_UNQUOTED(CHECKING_P, $ac_checking, -[Define to 1 if you want more run-time sanity checks. This one gets a grab - bag of miscellaneous but relatively cheap checks. Define to 2 if you want - also extra run-time checking that might affect code generation.]) + AC_DEFINE(CHECKING_P, 1, +[Define to 0/1 if you want more run-time sanity checks. This one gets a grab +bag of miscellaneous but relatively cheap checks.]) nocommon_flag=-fno-common else AC_DEFINE(CHECKING_P, 0) fi AC_SUBST(nocommon_flag) +if test x$ac_extra_checking != x ; then + AC_DEFINE(ENABLE_EXTRA_CHECKING, 1, +[Define to 0/1 if you want extra run-time checking that might affect code +generation.]) +else + AC_DEFINE(ENABLE_EXTRA_CHECKING, 0) +fi if test x$ac_df_checking != x ; then AC_DEFINE(ENABLE_DF_CHECKING, 1, [Define if you want more run-time sanity checks for dataflow.]) -- 2.7.4