configure.ac (enable-checking): Add release option.

* configure.ac (enable-checking): Add release option. Reorganize
	to avoid repetition.
	* configure: Rebuilt.
	* doc/install.texi (enable-checking): Amend documentation.

From-SVN: r87139
This commit is contained in:
Nathan Sidwell 2004-09-07 09:56:31 +00:00 committed by Nathan Sidwell
parent 32b2511f29
commit e1bbfc5cc2
4 changed files with 107 additions and 94 deletions

View file

@ -1,3 +1,10 @@
2004-09-07 Nathan Sidwell <nathan@codesourcery.com>
* configure.ac (enable-checking): Add release option. Reorganize
to avoid repetition.
* configure: Rebuilt.
* doc/install.texi (enable-checking): Amend documentation.
2004-09-06 H.J. Lu <hongjiu.lu@intel.com>
PR bootstrap/17313

87
gcc/configure vendored
View file

@ -867,9 +867,8 @@ Optional Features:
--enable-checking=LIST
enable expensive run-time checks. With LIST,
enable only specific categories of checks.
Categories are: none,assert,fold,gc,gcac,misc,
rtlflag,rtl,tree,valgrind;
default is assert,gc,misc,rtlflag,tree
Categories are: assert,fold,gc,gcac,misc,
rtlflag,rtl,tree,valgrind,release,yes,all;
--enable-mapped-location location_t is fileline integer cookie
--enable-coverage=LEVEL
enable compiler's code coverage collection.
@ -3928,54 +3927,56 @@ fi
# Check whether --enable-checking or --disable-checking was given.
if test "${enable_checking+set}" = set; then
enableval="$enable_checking"
ac_checking=
ac_checking_flags="${enableval}"
else
# Determine the default checks.
if test x$is_release = x ; then
ac_checking_flags=yes
else
ac_checking_flags=release
fi
fi;
ac_assert_checking=1
ac_checking=
ac_tree_checking=
ac_rtl_checking=
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_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 ;;
misc) ac_checking=1 ;;
rtlflag) ac_rtlflag_checking=1 ;;
rtl) ac_rtl_checking=1 ;;
tree) ac_tree_checking=1 ;;
valgrind) ac_checking_valgrind=1 ;;
*) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
for check in $ac_checking_flags
do
case $check in
yes) ac_assert_checking=1 ; ac_checking=1 ;
ac_tree_checking=1 ; ac_gc_checking=1 ;
ac_rtlflag_checking=1 ;;
no) ac_assert_checking= ; ac_checking= ;
ac_tree_checking= ; ac_rtl_checking= ;
ac_rtlflag_checking= ; ac_gc_checking= ;
ac_gc_always_collect= ; ac_fold_checking= ;;
all) ac_assert_checking=1 ; ac_checking=1 ;
ac_tree_checking=1 ; ac_rtl_checking=1 ;
ac_rtlflag_checking=1 ; ac_gc_checking=1 ;
ac_gc_always_collect=1 ; ac_fold_checking=1 ;;
release) ac_assert_checking=1 ;;
assert) ac_assert_checking=1 ;;
fold) ac_fold_checking=1 ;;
gc) ac_gc_checking=1 ;;
gcac) ac_gc_always_collect=1 ;;
misc) ac_checking=1 ;;
rtlflag) ac_rtlflag_checking=1 ;;
rtl) ac_rtl_checking=1 ;;
tree) ac_tree_checking=1 ;;
valgrind) ac_checking_valgrind=1 ;;
*) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
echo "$as_me: error: unknown check category $check" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
done
;;
esac
esac
done
IFS="$ac_save_IFS"
else
# 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
@ -5290,7 +5291,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:5293: version of makeinfo is $ac_prog_version" >&5
echo "configure:5294: version of makeinfo is $ac_prog_version" >&5
case $ac_prog_version in
'') gcc_cv_prog_makeinfo_modern=no;;
4.[2-9]*)

View file

@ -392,52 +392,53 @@ AC_ARG_ENABLE(checking,
[ --enable-checking[=LIST]
enable expensive run-time checks. With LIST,
enable only specific categories of checks.
Categories are: none,assert,fold,gc,gcac,misc,
rtlflag,rtl,tree,valgrind;
default is assert,gc,misc,rtlflag,tree],
[ac_checking=
Categories are: assert,fold,gc,gcac,misc,
rtlflag,rtl,tree,valgrind,release,yes,all;],
[ac_checking_flags="${enableval}"],[
# Determine the default checks.
if test x$is_release = x ; then
ac_checking_flags=yes
else
ac_checking_flags=release
fi])
ac_assert_checking=1
ac_checking=
ac_tree_checking=
ac_rtl_checking=
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_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 ;;
misc) ac_checking=1 ;;
rtlflag) ac_rtlflag_checking=1 ;;
rtl) ac_rtl_checking=1 ;;
tree) ac_tree_checking=1 ;;
valgrind) ac_checking_valgrind=1 ;;
*) AC_MSG_ERROR(unknown check category $check) ;;
esac
done
;;
esac
], [
# 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])
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
for check in $ac_checking_flags
do
case $check in
yes) ac_assert_checking=1 ; ac_checking=1 ;
ac_tree_checking=1 ; ac_gc_checking=1 ;
ac_rtlflag_checking=1 ;;
no) ac_assert_checking= ; ac_checking= ;
ac_tree_checking= ; ac_rtl_checking= ;
ac_rtlflag_checking= ; ac_gc_checking= ;
ac_gc_always_collect= ; ac_fold_checking= ;;
all) ac_assert_checking=1 ; ac_checking=1 ;
ac_tree_checking=1 ; ac_rtl_checking=1 ;
ac_rtlflag_checking=1 ; ac_gc_checking=1 ;
ac_gc_always_collect=1 ; ac_fold_checking=1 ;;
release) ac_assert_checking=1 ;;
assert) ac_assert_checking=1 ;;
fold) ac_fold_checking=1 ;;
gc) ac_gc_checking=1 ;;
gcac) ac_gc_always_collect=1 ;;
misc) ac_checking=1 ;;
rtlflag) ac_rtlflag_checking=1 ;;
rtl) ac_rtl_checking=1 ;;
tree) ac_tree_checking=1 ;;
valgrind) ac_checking_valgrind=1 ;;
*) AC_MSG_ERROR(unknown check category $check) ;;
esac
done
IFS="$ac_save_IFS"
nocommon_flag=""
if test x$ac_checking != x ; then
AC_DEFINE(ENABLE_CHECKING, 1,

View file

@ -1099,17 +1099,21 @@ compiler and may only work properly if you are building the compiler
with GCC@. This is on by default when building from CVS or snapshots,
but off for releases. More control over the checks may be had by
specifying @var{list}; the categories of checks available are
@samp{assert}, @samp{misc}, @samp{tree}, @samp{gc}, @samp{rtl},
@samp{rtlflag}, @samp{fold}, @samp{gcac} and @samp{valgrind}. The check
@samp{valgrind} requires the external @command{valgrind} simulator,
available from @uref{http://valgrind.kde.org/}. The default when
@var{list} is not specified is @samp{assert,misc,tree,gc,rtlflag}; the
checks @samp{rtl}, @samp{gcac} and @samp{valgrind} are very expensive.
When checking is neither explicitly enabled nor disabled, assertion
checks are still done. To disable all checking,
@samp{--disable-checking} must be explicitly requested. Disabling
assertions will make the compiler slightly faster but increase the risk
undetected internal errors causing wrong code to be generated.
@samp{release}, @samp{assert}, @samp{misc}, @samp{tree}, @samp{gc},
@samp{rtl}, @samp{rtlflag}, @samp{fold}, @samp{gcac} and
@samp{valgrind}. The @samp{release} category enables only those checks
suitable for release builds, currently this is just @samp{assert}. The
check @samp{valgrind} requires the external @command{valgrind}
simulator, available from @uref{http://valgrind.kde.org/}. The checks
@samp{rtl}, @samp{gcac} and @samp{valgrind} are very expensive. The
default when @var{list} is not specified is
@samp{assert,misc,tree,gc,rtlflag}. That is also the default for
development builds, when @samp{--enable-checking} is not specified. For
release builds the default, when @samp{--enable-checking} is not given,
is @samp{release}. To disable all checking, @samp{--disable-checking}
must be explicitly requested. Disabling assertions will make the
compiler slightly faster but increase the risk of undetected internal
errors causing wrong code to be generated.
@item --enable-coverage
@itemx --enable-coverage=@var{level}