Hello. As mentioned in here https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91971#c7, we should not mangle profile data and note files unless -fprofile-dir is used (and an absolute path is used).
Patch can bootstrap on x86_64-linux-gnu and survives regression tests. I'll install the patch if there are no objections. Thanks, Martin gcc/ChangeLog: 2019-12-04 Martin Liska <mli...@suse.cz> PR gcov-profile/91971 * coverage.c (coverage_init): Mangle full path only when -fprofile-dir is used. --- gcc/coverage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/coverage.c b/gcc/coverage.c index b8b20ddc8e3..2cdbb0172c9 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -1228,7 +1228,7 @@ coverage_init (const char *filename) else profile_data_prefix = getpwd (); } - else + else if (profile_data_prefix != NULL) { /* when filename is a absolute path, we also need to mangle the full path of filename to prevent the profiling data being stored into a