Commit cdce5c16 by Nathan Sidwell Committed by Nathan Sidwell

configure.ac (enable-checking): Explicitly set all variables for collective switch values.

	* configure.ac (enable-checking): Explicitly set all variables for
	collective switch values.  Alphabetize variables. Rename
	ac_checking_valgrind to ac_valgrind_checking.  Allow 'none' as
	synonym for 'no'.
	* doc/install.texi (enable-checking): Update documentation.
	* configure: Rebuilt.

From-SVN: r97390
parent a7818b66
2005-04-01 Nathan Sidwell <nathan@codesourcery.com>
* configure.ac (enable-checking): Explicitly set all variables for
collective switch values. Alphabetize variables. Rename
ac_checking_valgrind to ac_valgrind_checking. Allow 'none' as
synonym for 'no'.
* doc/install.texi (enable-checking): Update documentation.
* configure: Rebuilt.
2005-04-01 Kazu Hirata <kazu@cs.umass.edu> 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
* tree-inline.c (copy_body_r): Use CONSTANT_CLASS_P where * tree-inline.c (copy_body_r): Use CONSTANT_CLASS_P where
......
...@@ -867,8 +867,9 @@ Optional Features: ...@@ -867,8 +867,9 @@ 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: assert,fold,gc,gcac,misc, Categories are: yes,no,all,none,release.
rtlflag,rtl,runtime,tree,valgrind,release,yes,all; Flags are: assert,fold,gc,gcac,misc,
rtlflag,rtl,runtime,tree,valgrind.
--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.
...@@ -6275,40 +6276,50 @@ fi ...@@ -6275,40 +6276,50 @@ fi
fi; fi;
ac_assert_checking=1 ac_assert_checking=1
ac_checking= ac_checking=
ac_tree_checking= ac_fold_checking=
ac_gc_checking=
ac_gc_always_collect=
ac_rtl_checking= ac_rtl_checking=
ac_rtlflag_checking= ac_rtlflag_checking=
ac_runtime_checking=1 ac_runtime_checking=1
ac_gc_checking= ac_tree_checking=
ac_gc_always_collect= ac_valgrind_checking=
ac_fold_checking=
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
for check in $ac_checking_flags for check in $ac_checking_flags
do do
case $check in case $check in
# these set all the flags to specific states
yes) ac_assert_checking=1 ; ac_checking=1 ; yes) ac_assert_checking=1 ; ac_checking=1 ;
ac_tree_checking=1 ; ac_gc_checking=1 ; ac_fold_checking= ; ac_gc_checking=1 ;
ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;; ac_gc_always_collect= ; ac_rtl_checking= ;
no) ac_assert_checking= ; ac_checking= ; ac_rtlflag_checking=1 ; ac_runtime_chacking=1 ;
ac_tree_checking= ; ac_rtl_checking= ; ac_tree_checking=1 ; ac_valgrind_checking= ;;
ac_rtlflag_checking= ; ac_gc_checking= ; no|none) ac_assert_checking= ; ac_checking= ;
ac_gc_always_collect= ; ac_fold_checking= ;; ac_fold_checking= ; ac_gc_checking= ;
ac_gc_always_collect= ; ac_rtl_checking= ;
ac_rtlflag_checking= ; ac_runtime_chacking= ;
ac_tree_checking= ; ac_valgrind_checking= ;;
all) ac_assert_checking=1 ; ac_checking=1 ; all) ac_assert_checking=1 ; ac_checking=1 ;
ac_tree_checking=1 ; ac_rtl_checking=1 ; ac_fold_checking=1 ; ac_gc_checking=1 ;
ac_rtlflag_checking=1 ; ac_runtime_checking=1; ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
ac_gc_checking=1 ; ac_gc_always_collect=1 ; ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
ac_fold_checking=1 ;; ac_tree_checking=1 ; ac_valgrind_checking= ;;
release) ac_assert_checking=1 ; ac_runtime_checking=1 ;; release) ac_assert_checking=1 ; ac_checking= ;
ac_fold_checking= ; ac_gc_checking= ;
ac_gc_always_collect= ; ac_rtl_checking= ;
ac_rtlflag_checking= ; ac_runtime_checking=1 ;
ac_tree_checking= ; ac_valgrind_checking= ;;
# these enable particular checks
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 ;;
gcac) ac_gc_always_collect=1 ;; gcac) ac_gc_always_collect=1 ;;
misc) ac_checking=1 ;; misc) ac_checking=1 ;;
rtlflag) ac_rtlflag_checking=1 ;;
rtl) ac_rtl_checking=1 ;; rtl) ac_rtl_checking=1 ;;
rtlflag) ac_rtlflag_checking=1 ;;
runtime) ac_runtime_checking=1 ;; runtime) ac_runtime_checking=1 ;;
tree) ac_tree_checking=1 ;; tree) ac_tree_checking=1 ;;
valgrind) ac_checking_valgrind=1 ;; valgrind) ac_valgrind_checking=1 ;;
*) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
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; }; } ;;
...@@ -6532,7 +6543,7 @@ fi ...@@ -6532,7 +6543,7 @@ fi
if test x$ac_checking_valgrind != x ; then if test x$ac_valgrind_checking != x ; then
# It is certainly possible that there's valgrind but no valgrind.h. # It is certainly possible that there's valgrind but no valgrind.h.
# GCC relies on making annotations so we must have both. # GCC relies on making annotations so we must have both.
echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
...@@ -7388,7 +7399,7 @@ if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then ...@@ -7388,7 +7399,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:7381: version of makeinfo is $ac_prog_version" >&5 echo "configure:7402: 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]*)
......
...@@ -393,8 +393,9 @@ AC_ARG_ENABLE(checking, ...@@ -393,8 +393,9 @@ 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: assert,fold,gc,gcac,misc, Categories are: yes,no,all,none,release.
rtlflag,rtl,runtime,tree,valgrind,release,yes,all;], Flags are: assert,fold,gc,gcac,misc,
rtlflag,rtl,runtime,tree,valgrind.],
[ac_checking_flags="${enableval}"],[ [ac_checking_flags="${enableval}"],[
# Determine the default checks. # Determine the default checks.
if test x$is_release = x ; then if test x$is_release = x ; then
...@@ -404,40 +405,50 @@ else ...@@ -404,40 +405,50 @@ else
fi]) fi])
ac_assert_checking=1 ac_assert_checking=1
ac_checking= ac_checking=
ac_tree_checking= ac_fold_checking=
ac_gc_checking=
ac_gc_always_collect=
ac_rtl_checking= ac_rtl_checking=
ac_rtlflag_checking= ac_rtlflag_checking=
ac_runtime_checking=1 ac_runtime_checking=1
ac_gc_checking= ac_tree_checking=
ac_gc_always_collect= ac_valgrind_checking=
ac_fold_checking=
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
for check in $ac_checking_flags for check in $ac_checking_flags
do do
case $check in case $check in
# these set all the flags to specific states
yes) ac_assert_checking=1 ; ac_checking=1 ; yes) ac_assert_checking=1 ; ac_checking=1 ;
ac_tree_checking=1 ; ac_gc_checking=1 ; ac_fold_checking= ; ac_gc_checking=1 ;
ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;; ac_gc_always_collect= ; ac_rtl_checking= ;
no) ac_assert_checking= ; ac_checking= ; ac_rtlflag_checking=1 ; ac_runtime_chacking=1 ;
ac_tree_checking= ; ac_rtl_checking= ; ac_tree_checking=1 ; ac_valgrind_checking= ;;
ac_rtlflag_checking= ; ac_gc_checking= ; no|none) ac_assert_checking= ; ac_checking= ;
ac_gc_always_collect= ; ac_fold_checking= ;; ac_fold_checking= ; ac_gc_checking= ;
ac_gc_always_collect= ; ac_rtl_checking= ;
ac_rtlflag_checking= ; ac_runtime_chacking= ;
ac_tree_checking= ; ac_valgrind_checking= ;;
all) ac_assert_checking=1 ; ac_checking=1 ; all) ac_assert_checking=1 ; ac_checking=1 ;
ac_tree_checking=1 ; ac_rtl_checking=1 ; ac_fold_checking=1 ; ac_gc_checking=1 ;
ac_rtlflag_checking=1 ; ac_runtime_checking=1; ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
ac_gc_checking=1 ; ac_gc_always_collect=1 ; ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
ac_fold_checking=1 ;; ac_tree_checking=1 ; ac_valgrind_checking= ;;
release) ac_assert_checking=1 ; ac_runtime_checking=1 ;; release) ac_assert_checking=1 ; ac_checking= ;
ac_fold_checking= ; ac_gc_checking= ;
ac_gc_always_collect= ; ac_rtl_checking= ;
ac_rtlflag_checking= ; ac_runtime_checking=1 ;
ac_tree_checking= ; ac_valgrind_checking= ;;
# these enable particular checks
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 ;;
gcac) ac_gc_always_collect=1 ;; gcac) ac_gc_always_collect=1 ;;
misc) ac_checking=1 ;; misc) ac_checking=1 ;;
rtlflag) ac_rtlflag_checking=1 ;;
rtl) ac_rtl_checking=1 ;; rtl) ac_rtl_checking=1 ;;
rtlflag) ac_rtlflag_checking=1 ;;
runtime) ac_runtime_checking=1 ;; runtime) ac_runtime_checking=1 ;;
tree) ac_tree_checking=1 ;; tree) ac_tree_checking=1 ;;
valgrind) ac_checking_valgrind=1 ;; valgrind) ac_valgrind_checking=1 ;;
*) AC_MSG_ERROR(unknown check category $check) ;; *) AC_MSG_ERROR(unknown check category $check) ;;
esac esac
done done
...@@ -505,7 +516,7 @@ dnl # an if statement. This was the source of very frustrating bugs ...@@ -505,7 +516,7 @@ dnl # an if statement. This was the source of very frustrating bugs
dnl # in converting to autoconf 2.5x! dnl # in converting to autoconf 2.5x!
AC_CHECK_HEADER(valgrind.h, have_valgrind_h=yes, have_valgrind_h=no) AC_CHECK_HEADER(valgrind.h, have_valgrind_h=yes, have_valgrind_h=no)
if test x$ac_checking_valgrind != x ; then if test x$ac_valgrind_checking != x ; then
# It is certainly possible that there's valgrind but no valgrind.h. # It is certainly possible that there's valgrind but no valgrind.h.
# GCC relies on making annotations so we must have both. # GCC relies on making annotations so we must have both.
AC_MSG_CHECKING(for VALGRIND_DISCARD in <valgrind/memcheck.h>) AC_MSG_CHECKING(for VALGRIND_DISCARD in <valgrind/memcheck.h>)
......
...@@ -1099,30 +1099,29 @@ controlled by the Makefiles. ...@@ -1099,30 +1099,29 @@ controlled by the Makefiles.
@item --enable-checking @item --enable-checking
@itemx --enable-checking=@var{list} @itemx --enable-checking=@var{list}
When you specify this option, the compiler is built to perform checking When you specify this option, the compiler is built to perform internal
of tree node types when referencing fields of that node, and some other constency checks of the requested complexity. This does not change the
internal consistency checks. This does not change the generated code, generated code, but adds error checking within the compiler. This will
but adds error checking within the compiler. This will slow down the slow down the compiler and may only work properly if you are building
compiler and may only work properly if you are building the compiler the compiler with GCC@. This is @samp{yes} by default when building
with GCC@. This is on by default when building from CVS or snapshots, from CVS or snapshots, but @samp{release} for releases. More control
but off for releases. More control over the checks may be had by over the checks may be had by specifying @var{list}. The categories of
specifying @var{list}; the categories of checks available are checks available are @samp{yes} (most common checks
@samp{release}, @samp{assert}, @samp{misc}, @samp{tree}, @samp{gc}, @samp{assert,misc,tree,gc,rtlflag,runtime}), @samp{no} (no checks at
@samp{rtl}, @samp{rtlflag}, @samp{runtime}, @samp{fold}, @samp{gcac} and all), @samp{all} (all but @samp{valgrind}), @samp{release} (cheapest
@samp{valgrind}. The @samp{release} category enables only those checks checks @samp{assert,runtime}) or @samp{none} (same as @samp{no}).
suitable for release builds, currently this is @samp{assert} and Individual checks can be enabled with these flags @samp{assert},
@samp{runtime}. The check @samp{valgrind} requires the external @samp{fold}, @samp{gc}, @samp{gcac} @samp{misc}, @samp{rtl},
@command{valgrind} simulator, available from @samp{rtlflag}, @samp{runtime}, @samp{tree}, and @samp{valgrind}.
@uref{http://valgrind.kde.org/}. The checks @samp{rtl}, @samp{gcac} and
@samp{valgrind} are very expensive. The default when @var{list} is not The @samp{valgrind} check requires the external @command{valgrind}
specified is @samp{assert,misc,tree,gc,rtlflag,runtime}. That is also simulator, available from @uref{http://valgrind.kde.org/}. The
the default for development builds, when @samp{--enable-checking} is not @samp{rtl}, @samp{gcac} and @samp{valgrind} checks are very expensive.
specified. For release builds the default, when To disable all checking, @samp{--disable-checking} or
@samp{--enable-checking} is not given, is @samp{release}. To disable @samp{--enable-checking=none} must be explicitly requested. Disabling
all checking, @samp{--disable-checking} must be explicitly requested. assertions will make the compiler and runtime slightly faster but
Disabling assertions will make the compiler and runtime slightly faster increase the risk of undetected internal errors causing wrong code to be
but increase the risk of undetected internal errors causing wrong code generated.
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