public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/97193] New: .gcno files are not written to same directory as the object file
@ 2020-09-24 12:22 mario at klebsch dot de
  2020-09-24 12:51 ` [Bug gcov-profile/97193] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: mario at klebsch dot de @ 2020-09-24 12:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97193

            Bug ID: 97193
           Summary: .gcno files are not written to same directory as the
                    object file
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mario at klebsch dot de
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

According to https://gcc.gnu.org/onlinedocs/gcc/Gcov-Data-Files.html, the .gcno
files should be written to the same directory as the object files.

> The .gcno files are placed in the same directory as the object file.

This seems to work with gcc 8.3.0 but does not work with gcc 9.3.0:

+ echo Toolchain 1
Toolchain 1
+ find . -name '*.gcno' -exec rm '{}' +
+ find . -name '*.o' -exec rm '{}' +
+ find . -name '*.gcno' -o -name '*.o'
+ toolchain1/bin/powerpc-603e-linux-gnu-gcc --version
powerpc-603e-linux-gnu-gcc (GCC) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

+ toolchain1/bin/powerpc-603e-linux-gnu-gcc -fprofile-arcs -ftest-coverage
-fprofile-dir=/tmp/coverage -c foo.c -o build/foo.o
+ find . -name '*.gcno' -o -name '*.o'
./build/foo.o
./build/foo.gcno
  ^^^^^
same directory as expected

+ echo Toolchain 2
Toolchain 2
+ find . -name '*.gcno' -exec rm '{}' +
+ find . -name '*.o' -exec rm '{}' +
+ find . -name '*.gcno' -o -name '*.o'
+ toolchain2/bin/powerpc-603e-linux-gnu-gcc --version
powerpc-603e-linux-gnu-gcc (GCC) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

+ toolchain2/bin/powerpc-603e-linux-gnu-gcc -fprofile-arcs -ftest-coverage
-fprofile-dir=/tmp/coverage -c foo.c -o build/foo.o
+ find . -name '*.gcno' -o -name '*.o'
./#tmp#gcc-bug#build#foo.gcno
./build/foo.o
^^^^^^^
Different directories, not as excpected. :-(

+ echo Natove compiler
Natove compiler
+ find . -name '*.gcno' -exec rm '{}' +
+ find . -name '*.o' -exec rm '{}' +
+ find . -name '*.gcno' -o -name '*.o'
+ gcc --version
gcc (Gentoo 9.3.0-r1 p3) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

+ gcc -fprofile-arcs -ftest-coverage -fprofile-dir=/tmp/coverage -c foo.c -o
build/foo.o
+ find . -name '*.gcno' -o -name '*.o'
./#tmp#gcc-bug#build#foo.gcno
./build/foo.o
^^^^^^^
Different directories, not as excpected. :-(

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/97193] .gcno files are not written to same directory as the object file
  2020-09-24 12:22 [Bug gcov-profile/97193] New: .gcno files are not written to same directory as the object file mario at klebsch dot de
@ 2020-09-24 12:51 ` rguenth at gcc dot gnu.org
  2020-09-24 12:57 ` marxin at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-09-24 12:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97193

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |documentation

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think that was a desired change and thus is expected which makes it a
documentation bug.  Martin?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/97193] .gcno files are not written to same directory as the object file
  2020-09-24 12:22 [Bug gcov-profile/97193] New: .gcno files are not written to same directory as the object file mario at klebsch dot de
  2020-09-24 12:51 ` [Bug gcov-profile/97193] " rguenth at gcc dot gnu.org
@ 2020-09-24 12:57 ` marxin at gcc dot gnu.org
  2020-09-24 20:27 ` mario at klebsch dot de
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-09-24 12:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97193

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org
   Last reconfirmed|                            |2020-09-24

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Mine.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/97193] .gcno files are not written to same directory as the object file
  2020-09-24 12:22 [Bug gcov-profile/97193] New: .gcno files are not written to same directory as the object file mario at klebsch dot de
  2020-09-24 12:51 ` [Bug gcov-profile/97193] " rguenth at gcc dot gnu.org
  2020-09-24 12:57 ` marxin at gcc dot gnu.org
@ 2020-09-24 20:27 ` mario at klebsch dot de
  2020-09-25  8:53 ` [Bug gcov-profile/97193] [9/10/11 Regression] " marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mario at klebsch dot de @ 2020-09-24 20:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97193

--- Comment #3 from Mario Klebsch <mario at klebsch dot de> ---
If it was a desired change, what were the reasons for this change?

This change breaks my makefiles. I am cross compiling for several different
targets possibly using a different version of gcc for each target. The build is
always performed in the source directory, writing the object files to different
directories for each target.

Now, the .gcno files of different build are all in the same directory. The
clean target of the makefile leaves these files around and they are not
archived as build products. They have horribly long file names littering my
source directory. These long file names make ls output unreadable.

I am sure, there was a good reason for this change, but for me it does not feel
like a good idea. :-(

Is there an option to select a different directory for these .gcno-files?

73, Mario

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/97193] [9/10/11 Regression] .gcno files are not written to same directory as the object file
  2020-09-24 12:22 [Bug gcov-profile/97193] New: .gcno files are not written to same directory as the object file mario at klebsch dot de
                   ` (2 preceding siblings ...)
  2020-09-24 20:27 ` mario at klebsch dot de
@ 2020-09-25  8:53 ` marxin at gcc dot gnu.org
  2020-10-02 10:10 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-09-25  8:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97193

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|.gcno files are not written |[9/10/11 Regression] .gcno
                   |to same directory as the    |files are not written to
                   |object file                 |same directory as the
                   |                            |object file
   Target Milestone|---                         |9.4
      Known to fail|                            |10.2.0, 11.0
           Keywords|documentation               |
      Known to work|8.3.0                       |8.4.0

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
It's definitely a bug and it started with r9-1537-g1f2bb38a85710f65. *.gcno
files should be mangled like the *.gcda files. I'm testing a patch.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/97193] [9/10/11 Regression] .gcno files are not written to same directory as the object file
  2020-09-24 12:22 [Bug gcov-profile/97193] New: .gcno files are not written to same directory as the object file mario at klebsch dot de
                   ` (3 preceding siblings ...)
  2020-09-25  8:53 ` [Bug gcov-profile/97193] [9/10/11 Regression] " marxin at gcc dot gnu.org
@ 2020-10-02 10:10 ` cvs-commit at gcc dot gnu.org
  2020-10-02 10:11 ` [Bug gcov-profile/97193] [9/10 " marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-02 10:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97193

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:f8dcbea5d2fb17dca3a7de97f15fc49997222365

commit r11-3614-gf8dcbea5d2fb17dca3a7de97f15fc49997222365
Author: Martin Liska <mliska@suse.cz>
Date:   Fri Sep 25 10:53:26 2020 +0200

    GCOV: do not mangle .gcno files.

    gcc/ChangeLog:

            PR gcov-profile/97193
            * coverage.c (coverage_init): GCDA note files should not be
            mangled and should end in output directory.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/97193] [9/10 Regression] .gcno files are not written to same directory as the object file
  2020-09-24 12:22 [Bug gcov-profile/97193] New: .gcno files are not written to same directory as the object file mario at klebsch dot de
                   ` (4 preceding siblings ...)
  2020-10-02 10:10 ` cvs-commit at gcc dot gnu.org
@ 2020-10-02 10:11 ` marxin at gcc dot gnu.org
  2020-10-02 11:16 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-02 10:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97193

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[9/10/11 Regression] .gcno  |[9/10 Regression] .gcno
                   |files are not written to    |files are not written to
                   |same directory as the       |same directory as the
                   |object file                 |object file
      Known to work|                            |11.0
      Known to fail|11.0                        |

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed on master so far.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/97193] [9/10 Regression] .gcno files are not written to same directory as the object file
  2020-09-24 12:22 [Bug gcov-profile/97193] New: .gcno files are not written to same directory as the object file mario at klebsch dot de
                   ` (5 preceding siblings ...)
  2020-10-02 10:11 ` [Bug gcov-profile/97193] [9/10 " marxin at gcc dot gnu.org
@ 2020-10-02 11:16 ` cvs-commit at gcc dot gnu.org
  2020-10-02 11:17 ` cvs-commit at gcc dot gnu.org
  2020-10-02 11:18 ` marxin at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-02 11:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97193

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Martin Liska
<marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:f97ef0b2dfdad07db3d564b932c7b7373654b7d4

commit r10-8843-gf97ef0b2dfdad07db3d564b932c7b7373654b7d4
Author: Martin Liska <mliska@suse.cz>
Date:   Fri Sep 25 10:53:26 2020 +0200

    GCOV: do not mangle .gcno files.

    gcc/ChangeLog:

            PR gcov-profile/97193
            * coverage.c (coverage_init): GCDA note files should not be
            mangled and should end in output directory.

    (cherry picked from commit f8dcbea5d2fb17dca3a7de97f15fc49997222365)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/97193] [9/10 Regression] .gcno files are not written to same directory as the object file
  2020-09-24 12:22 [Bug gcov-profile/97193] New: .gcno files are not written to same directory as the object file mario at klebsch dot de
                   ` (6 preceding siblings ...)
  2020-10-02 11:16 ` cvs-commit at gcc dot gnu.org
@ 2020-10-02 11:17 ` cvs-commit at gcc dot gnu.org
  2020-10-02 11:18 ` marxin at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-02 11:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97193

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Martin Liska
<marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:991a376015309ac9b413eeb97d94511908498e9a

commit r9-8969-g991a376015309ac9b413eeb97d94511908498e9a
Author: Martin Liska <mliska@suse.cz>
Date:   Fri Sep 25 10:53:26 2020 +0200

    GCOV: do not mangle .gcno files.

    gcc/ChangeLog:

            PR gcov-profile/97193
            * coverage.c (coverage_init): GCDA note files should not be
            mangled and should end in output directory.

    (cherry picked from commit f8dcbea5d2fb17dca3a7de97f15fc49997222365)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug gcov-profile/97193] [9/10 Regression] .gcno files are not written to same directory as the object file
  2020-09-24 12:22 [Bug gcov-profile/97193] New: .gcno files are not written to same directory as the object file mario at klebsch dot de
                   ` (7 preceding siblings ...)
  2020-10-02 11:17 ` cvs-commit at gcc dot gnu.org
@ 2020-10-02 11:18 ` marxin at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-02 11:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97193

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed on all branches.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-10-02 11:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-24 12:22 [Bug gcov-profile/97193] New: .gcno files are not written to same directory as the object file mario at klebsch dot de
2020-09-24 12:51 ` [Bug gcov-profile/97193] " rguenth at gcc dot gnu.org
2020-09-24 12:57 ` marxin at gcc dot gnu.org
2020-09-24 20:27 ` mario at klebsch dot de
2020-09-25  8:53 ` [Bug gcov-profile/97193] [9/10/11 Regression] " marxin at gcc dot gnu.org
2020-10-02 10:10 ` cvs-commit at gcc dot gnu.org
2020-10-02 10:11 ` [Bug gcov-profile/97193] [9/10 " marxin at gcc dot gnu.org
2020-10-02 11:16 ` cvs-commit at gcc dot gnu.org
2020-10-02 11:17 ` cvs-commit at gcc dot gnu.org
2020-10-02 11:18 ` marxin at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).