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

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