Commit e1bbfc5c by Nathan Sidwell Committed by Nathan Sidwell

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
parent 32b2511f
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> 2004-09-06 H.J. Lu <hongjiu.lu@intel.com>
PR bootstrap/17313 PR bootstrap/17313
......
...@@ -867,9 +867,8 @@ Optional Features: ...@@ -867,9 +867,8 @@ Optional Features:
--enable-checking=LIST --enable-checking=LIST
enable expensive run-time checks. With LIST, enable expensive run-time checks. With LIST,
enable only specific categories of checks. enable only specific categories of checks.
Categories are: none,assert,fold,gc,gcac,misc, Categories are: assert,fold,gc,gcac,misc,
rtlflag,rtl,tree,valgrind; rtlflag,rtl,tree,valgrind,release,yes,all;
default is assert,gc,misc,rtlflag,tree
--enable-mapped-location location_t is fileline integer cookie --enable-mapped-location location_t is fileline integer cookie
--enable-coverage=LEVEL --enable-coverage=LEVEL
enable compiler's code coverage collection. enable compiler's code coverage collection.
...@@ -3928,25 +3927,40 @@ fi ...@@ -3928,25 +3927,40 @@ fi
# Check whether --enable-checking or --disable-checking was given. # Check whether --enable-checking or --disable-checking was given.
if test "${enable_checking+set}" = set; then if test "${enable_checking+set}" = set; then
enableval="$enable_checking" 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_tree_checking=
ac_rtl_checking= ac_rtl_checking=
ac_rtlflag_checking= ac_rtlflag_checking=
ac_gc_checking= ac_gc_checking=
ac_gc_always_collect= ac_gc_always_collect=
ac_fold_checking= ac_fold_checking=
ac_assert_checking= IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
case "${enableval}" in for check in $ac_checking_flags
yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ; do
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 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 ;; assert) ac_assert_checking=1 ;;
fold) ac_fold_checking=1 ;; fold) ac_fold_checking=1 ;;
gc) ac_gc_checking=1 ;; gc) ac_gc_checking=1 ;;
...@@ -3960,22 +3974,9 @@ no) ;; ...@@ -3960,22 +3974,9 @@ no) ;;
echo "$as_me: error: unknown check category $check" >&2;} echo "$as_me: error: unknown check category $check" >&2;}
{ (exit 1); exit 1; }; } ;; { (exit 1); exit 1; }; } ;;
esac esac
done done
;; IFS="$ac_save_IFS"
esac
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="" nocommon_flag=""
if test x$ac_checking != x ; then if test x$ac_checking != x ; then
...@@ -5290,7 +5291,7 @@ if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then ...@@ -5290,7 +5291,7 @@ if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
else else
ac_prog_version=`$MAKEINFO --version 2>&1 | ac_prog_version=`$MAKEINFO --version 2>&1 |
sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` 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 case $ac_prog_version in
'') gcc_cv_prog_makeinfo_modern=no;; '') gcc_cv_prog_makeinfo_modern=no;;
4.[2-9]*) 4.[2-9]*)
......
...@@ -392,28 +392,39 @@ AC_ARG_ENABLE(checking, ...@@ -392,28 +392,39 @@ AC_ARG_ENABLE(checking,
[ --enable-checking[=LIST] [ --enable-checking[=LIST]
enable expensive run-time checks. With LIST, enable expensive run-time checks. With LIST,
enable only specific categories of checks. enable only specific categories of checks.
Categories are: none,assert,fold,gc,gcac,misc, Categories are: assert,fold,gc,gcac,misc,
rtlflag,rtl,tree,valgrind; rtlflag,rtl,tree,valgrind,release,yes,all;],
default is assert,gc,misc,rtlflag,tree], [ac_checking_flags="${enableval}"],[
[ac_checking= # 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_tree_checking=
ac_rtl_checking= ac_rtl_checking=
ac_rtlflag_checking= ac_rtlflag_checking=
ac_gc_checking= ac_gc_checking=
ac_gc_always_collect= ac_gc_always_collect=
ac_fold_checking= ac_fold_checking=
ac_assert_checking= IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
case "${enableval}" in for check in $ac_checking_flags
yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ; do
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 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 ;; assert) ac_assert_checking=1 ;;
fold) ac_fold_checking=1 ;; fold) ac_fold_checking=1 ;;
gc) ac_gc_checking=1 ;; gc) ac_gc_checking=1 ;;
...@@ -425,19 +436,9 @@ no) ;; ...@@ -425,19 +436,9 @@ no) ;;
valgrind) ac_checking_valgrind=1 ;; valgrind) ac_checking_valgrind=1 ;;
*) AC_MSG_ERROR(unknown check category $check) ;; *) AC_MSG_ERROR(unknown check category $check) ;;
esac esac
done done
;; IFS="$ac_save_IFS"
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])
nocommon_flag="" nocommon_flag=""
if test x$ac_checking != x ; then if test x$ac_checking != x ; then
AC_DEFINE(ENABLE_CHECKING, 1, AC_DEFINE(ENABLE_CHECKING, 1,
......
...@@ -1099,17 +1099,21 @@ compiler and may only work properly if you are building the compiler ...@@ -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, 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 but off for releases. More control over the checks may be had by
specifying @var{list}; the categories of checks available are specifying @var{list}; the categories of checks available are
@samp{assert}, @samp{misc}, @samp{tree}, @samp{gc}, @samp{rtl}, @samp{release}, @samp{assert}, @samp{misc}, @samp{tree}, @samp{gc},
@samp{rtlflag}, @samp{fold}, @samp{gcac} and @samp{valgrind}. The check @samp{rtl}, @samp{rtlflag}, @samp{fold}, @samp{gcac} and
@samp{valgrind} requires the external @command{valgrind} simulator, @samp{valgrind}. The @samp{release} category enables only those checks
available from @uref{http://valgrind.kde.org/}. The default when suitable for release builds, currently this is just @samp{assert}. The
@var{list} is not specified is @samp{assert,misc,tree,gc,rtlflag}; the check @samp{valgrind} requires the external @command{valgrind}
checks @samp{rtl}, @samp{gcac} and @samp{valgrind} are very expensive. simulator, available from @uref{http://valgrind.kde.org/}. The checks
When checking is neither explicitly enabled nor disabled, assertion @samp{rtl}, @samp{gcac} and @samp{valgrind} are very expensive. The
checks are still done. To disable all checking, default when @var{list} is not specified is
@samp{--disable-checking} must be explicitly requested. Disabling @samp{assert,misc,tree,gc,rtlflag}. That is also the default for
assertions will make the compiler slightly faster but increase the risk development builds, when @samp{--enable-checking} is not specified. For
undetected internal errors causing wrong code to be generated. 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 @item --enable-coverage
@itemx --enable-coverage=@var{level} @itemx --enable-coverage=@var{level}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment