summaryrefslogtreecommitdiff
path: root/gcc/configure.in
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-08 09:10:39 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-08 09:10:39 +0000
commitd5a37d7564609a8cc404136676a50a1881c3ba65 (patch)
treee2d82e59b9245ce51ddc5ea7ce561c3227228ba6 /gcc/configure.in
parent261f279f37c854b987564bca08ba3624f6d6e60b (diff)
downloadgcc-d5a37d7564609a8cc404136676a50a1881c3ba65.tar.gz
* configure.in (enable_coverage): New enable switch.
* configure: Rebuilt. * Makefile.in (COVERAGE_FLAGS, coverageexts): New variables. (INTERNAL_CFLAGS): Append COVERAGE_FLAGS. (ALL_FLAGS): Reorder so INTERNAL_CFLAGS comes after CFLAGS. (mostlyclean): Remove coverage files. * doc/install.texi: Document enable_coverage. * cp/Make-lang.in (c++.mostlyclean): Remove coverage files. * ada/Make-lang.in (ada.mostlyclean): Remove coverage files. * f/Make-lang.in (f.mostlyclean): Remove coverage files. * java/Make-lang.in (java.mostlyclean): Remove coverage files. * objc/Make-lang.in (objc.mostlyclean): Remove coverage files. * treelang/Make-lang.in (treelang.mostlyclean): Remove coverage files. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56126 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.in')
-rw-r--r--gcc/configure.in22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/configure.in b/gcc/configure.in
index 84cd3628b69..6b7d2f256f8 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -254,6 +254,28 @@ if test x$ac_gc_always_collect != x ; then
every opportunity. This is extremely expensive.])
fi
+# Enable code coverage collection
+AC_ARG_ENABLE(coverage,
+[ --enable-coverage[=LEVEL]
+ enable compiler\'s code coverage collection.
+ Use to measure compiler performance and locate
+ unused parts of the compiler. With LEVEL, specificy
+ optimization. Values are opt, noopt,
+ default is noopt],
+[case "${enableval}" in
+yes|noopt)
+ coverage_flags="-fprofile-arcs -ftest-coverage -O0"
+ ;;
+opt)
+ coverage_flags="-fprofile-arcs -ftest-coverage -O2"
+ ;;
+*)
+ AC_MSG_ERROR(unknown coverage setting $enableval)
+ ;;
+esac],
+[coverage_flags="-O2"])
+AC_SUBST(coverage_flags)
+
AC_ARG_WITH(cpp_install_dir,
[ --with-cpp-install-dir=DIR
install the user visible C preprocessor in DIR