diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2004-08-27 16:20:45 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-08-27 16:20:45 +0000 |
commit | 06c37c965a32bf125f32111fac25707bee54708a (patch) | |
tree | e2fce412e85b16b97075f73dc19c83b703a40a39 /gcc/configure | |
parent | 9d64df18fd9175749aea2742096b172f59a5ebeb (diff) | |
download | gcc-06c37c965a32bf125f32111fac25707bee54708a.zip gcc-06c37c965a32bf125f32111fac25707bee54708a.tar.gz gcc-06c37c965a32bf125f32111fac25707bee54708a.tar.bz2 |
configure.ac: Add ENABLE_ASSERT_CHECKING control.
* configure.ac: Add ENABLE_ASSERT_CHECKING control.
Add is_release variable, use it for --enable-werror and
--enable-checking defaults.
* system.h (gcc_assert, gcc_unreachable): New.
* doc/install.texi (--enable-checking): Update.
* configure, config.in: Rebuilt.
From-SVN: r86666
Diffstat (limited to 'gcc/configure')
-rwxr-xr-x | gcc/configure | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/gcc/configure b/gcc/configure index f7e2f30..3aaefd3 100755 --- a/gcc/configure +++ b/gcc/configure @@ -867,8 +867,9 @@ Optional Features: --enable-checking=LIST enable expensive run-time checks. With LIST, enable only specific categories of checks. - Categories are: fold,gc,gcac,misc,rtlflag,rtl, - tree,valgrind; default is gc,misc,rtlflag,tree + Categories are: none,assert,fold,gc,gcac,misc, + rtlflag,rtl,tree,valgrind; + default is assert,gc,misc,rtlflag,tree --enable-mapped-location location_t is fileline integer cookie --enable-coverage=LEVEL enable compiler's code coverage collection. @@ -1381,6 +1382,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers auto-host.h:config.in" +#Set to 1 on a release branch +is_release= + # Determine the host, build, and target systems ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do @@ -3902,13 +3906,18 @@ fi # Enable -Werror in bootstrap stage2 and later. -# Change the default to "no" on release branches. # Check whether --enable-werror or --disable-werror was given. if test "${enable_werror+set}" = set; then enableval="$enable_werror" else + if test x$is_release = x ; then + # Default to "yes" on development branches. enable_werror=yes +else + # Default to "no" on release branches. + enable_werror=no +fi fi; if test x$enable_werror = xyes ; then WERROR=-Werror @@ -3926,16 +3935,19 @@ ac_rtlflag_checking= ac_gc_checking= ac_gc_always_collect= ac_fold_checking= +ac_assert_checking= case "${enableval}" in yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ; - ac_rtlflag_checking=1 ;; + ac_rtlflag_checking=1 ; ac_assert_checking=1 ;; no) ;; *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," set fnord $enableval; shift IFS="$ac_save_IFS" + ac_assert_checking=1 for check do case $check in + assert) ac_assert_checking=1 ;; fold) ac_fold_checking=1 ;; gc) ac_gc_checking=1 ;; gcac) ac_gc_always_collect=1 ;; @@ -3953,8 +3965,16 @@ echo "$as_me: error: unknown check category $check" >&2;} esac else - # Enable some checks by default for development versions of GCC -ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1; + +# Determine the default checks. +if test x$is_release = x ; then + # Enable some checks for development versions of GCC + ac_assert_checking=1; + ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1; +else + # Disable all but assertions for release versions of GCC. + ac_assert_checking=1; +fi fi; nocommon_flag="" if test x$ac_checking != x ; then @@ -3966,6 +3986,13 @@ _ACEOF nocommon_flag=-fno-common fi +if test x$ac_assert_checking != x ; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_ASSERT_CHECKING 1 +_ACEOF + +fi if test x$ac_tree_checking != x ; then cat >>confdefs.h <<\_ACEOF @@ -5263,7 +5290,7 @@ if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then else ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` - echo "configure:5266: version of makeinfo is $ac_prog_version" >&5 + echo "configure:5293: version of makeinfo is $ac_prog_version" >&5 case $ac_prog_version in '') gcc_cv_prog_makeinfo_modern=no;; 4.[2-9]*) |