Commit 22aa533e by Nathan Sidwell Committed by Nathan Sidwell

configure.in (enable_coverage): New enable switch.

	* 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.

From-SVN: r56126
parent 90a589aa
2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
* 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.
2002-08-08 Neil Booth <neil@daikokuya.co.uk>
* c-opts.c (cpp_opts): New.
......
......@@ -69,6 +69,13 @@ CFLAGS = -g
STAGE1_CFLAGS = -g @stage1_cflags@
BOOT_CFLAGS = -g -O2
# Flags to determine code coverage. When coverage is disabled, this will
# contain the optimization flags, as you normally want code coverage
# without optimization. The -dumpbase $@ makes sure that the auxilary
# files end up near the object files.
COVERAGE_FLAGS = @coverage_flags@
coverageexts = .{da,bb,bbg}
# The warning flags are separate from BOOT_CFLAGS because people tend to
# override optimization flags and we'd like them to still have warnings
# turned on. These flags are also used to pass other stage dependent
......@@ -587,13 +594,13 @@ all.indirect: $(ALL)
# IN_GCC distinguishes between code compiled into GCC itself and other
# programs built during a bootstrap.
# autoconf inserts -DCROSS_COMPILE if we are building a cross compiler.
INTERNAL_CFLAGS = -DIN_GCC @CROSS@
INTERNAL_CFLAGS = -DIN_GCC @CROSS@ $(COVERAGE_FLAGS)
# This is the variable actually used when we compile.
# If you change this line, you probably also need to change the definition
# of HOST_CFLAGS in build-make to match.
ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) \
$(CFLAGS) $(WARN_CFLAGS) $(XCFLAGS) @DEFS@
ALL_CFLAGS = $(X_CFLAGS) $(T_CFLAGS) \
$(CFLAGS) $(INTERNAL_CFLAGS) $(WARN_CFLAGS) $(XCFLAGS) @DEFS@
# Likewise.
ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
......@@ -2602,6 +2609,7 @@ $(docdir)/fsf-funding.7: $(docdir)/include/funding.texi
INTL_MOSTLYCLEAN = intl.mostlyclean
mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean
-rm -f $(STAGESTUFF)
-rm -f *$(coverageexts)
-rm -rf libgcc
# Delete the temporary source copies for cross compilation.
-rm -f $(BUILD_PREFIX_1)rtl.c $(BUILD_PREFIX_1)print-rtl.c
......
2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
* ada/Make-lang.in (ada.mostlyclean): Remove coverage files.
2002-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* adadecode.c (ada_demangle): Use xstrdup in lieu of
......
......@@ -762,6 +762,7 @@ ada.uninstall:
ada.mostlyclean:
-$(RM) ada/*$(objext) ada/*.ali ada/b_*.c
-$(RM) ada/*$(coverageexts)
-$(RM) ada/sdefault.adb ada/stamp-sdefault
-$(RMDIR) ada/tools
ada.clean:
......
......@@ -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
......
2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
* cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
2002-08-07 Mark Mitchell <mark@codesourcery.com>
Rework build_component_ref.
......
......@@ -225,6 +225,7 @@ c++.uninstall:
c++.mostlyclean:
-rm -f cp/*$(objext) $(DEMANGLER_PROG)
-rm -f cp/*$(coverageexts)
c++.clean:
c++.distclean:
-rm -f cp/config.status cp/Makefile
......
......@@ -782,6 +782,17 @@ specifying @var{list}; the categories of checks available are
default when @var{list} is not specified is @samp{misc,tree,gc,rtlflag}; the
checks @samp{rtl} and @samp{gcac} are very expensive.
@item --enable-coverage
@item --enable-coverage=@var{level}
With this option, the compiler is built to collect self coverage
information, every time it is run. This is for internal development
purposes, and only works when the compiler is being built with gcc. The
@var{level} argument controls whether the compiler is built optimized or
not, values are @samp{opt} and @samp{noopt}. For coverage analysis you
want to disable optimization, for performance analysis you want to
enable optimization. When coverage is enabled, the default level is
without optimization.
@item --enable-nls
@itemx --disable-nls
The @option{--enable-nls} option enables Native Language Support (NLS),
......
Thu Aug 8 10:06:14 2002 Nathan Sidwell <nathan@codesourcery.com>
* f/Make-lang.in (f.mostlyclean): Remove coverage files.
2002-08-06 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* g77.texi (Top): Rename Index to Keyword Index.
......
......@@ -315,6 +315,7 @@ f77.uninstall: installdirs
f77.mostlyclean:
-rm -f f/*$(objext)
-rm -f f/*$(coverageexts)
-rm -f f/fini$(build_exeext) f/stamp-str f/str-*.h f/str-*.j
-rm -f f/intdoc$(build_exeext) f/ansify$(build_exeext) f/intdoc.h0
-rm -f g77.aux g77.cps g77.ky g77.toc g77.vr g77.fn g77.kys \
......
2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
* java/Make-lang.in (java.mostlyclean): Remove coverage files.
2002-08-05 Geoffrey Keating <geoffk@redhat.com>
* mangle_name.c: Don't include obstack.h twice.
......
......@@ -227,6 +227,7 @@ java.install-info: installdirs
java.mostlyclean:
-rm -f java/*$(objext) $(DEMANGLER_PROG)
-rm -f java/*$(coverageexts)
-rm -f jc1$(exeext) $(GCJ)$(exeext) jvgenmain$(exeext) gcjh$(exeext) jv-scan$(exeext) jcf-dump$(exeext) s-java
java.clean:
java.distclean:
......
......@@ -131,6 +131,7 @@ objc.uninstall:
objc.mostlyclean:
-rm -f tmp-objc-prs.y
-rm -f objc/*$(objext) objc/xforward objc/fflags
-rm -f objc/*$(coverageexts)
objc.clean: objc.mostlyclean
-rm -rf objc-headers
objc.distclean:
......
2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
* treelang/Make-lang.in (treelang.mostlyclean): Remove coverage files.
2002-07-11 Tim Josling <tej@melbpc.org.au>
Remove front end hard coding from gengtype.c.
......
......@@ -207,7 +207,8 @@ treelang.mostlyclean:
rm -f treelang/$$name$(exeext); \
fi ; \
done
-rm -f treelang/*.o
-rm -f treelang/*$(objext)
-rm -f treelang/*$(coverageexts)
-rm treelang.done
......
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