This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[trunk<-vta] Re: [vta] skip .gcno generation during -fcompare-debug-second
- From: Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 01 Jun 2009 05:28:52 -0300
- Subject: [trunk<-vta] Re: [vta] skip .gcno generation during -fcompare-debug-second
- References: <orfxl33x7r.fsf@livre.oliva.athome.lsd.ic.unicamp.br>
On Dec 5, 2008, Alexandre Oliva <aoliva@redhat.com> wrote:
> The only difference between the .gcno file generated for the first and
> the second compilations is the timestamp. The first is supposed to
> prevail, but if we overwrite the .gcno file during
> -fcompare-debug-second, it won't appear to match the object file
> produced by the first. Oops.
> This patch fixes this problem by avoiding the generation of the .gcno
> file during the second -fcompare-debug compilation. I'm installing it
> in the VTA branch.
Ok for trunk?
for gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* coverage.c (coverage_begin_output): Don't overwrite .gcno file
during -fcompare-debug-second compilation.
Index: gcc/coverage.c
===================================================================
--- gcc/coverage.c.orig 2008-10-10 09:31:06.000000000 -0300
+++ gcc/coverage.c 2008-12-02 03:42:38.000000000 -0200
@@ -552,7 +552,7 @@ coverage_begin_output (void)
{
/* We don't need to output .gcno file unless we're under -ftest-coverage
(e.g. -fprofile-arcs/generate/use don't need .gcno to work). */
- if (no_coverage || !flag_test_coverage)
+ if (no_coverage || !flag_test_coverage || flag_compare_debug)
return 0;
if (!bbg_function_announced)
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist Red Hat Brazil Compiler Engineer