Fix profile name files without -fprofile-dir.

2019-12-05  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/91971
	* coverage.c (coverage_init): Mangle full path
	only when -fprofile-dir is used.

From-SVN: r278990
This commit is contained in:
Martin Liska 2019-12-05 10:08:44 +01:00 committed by Martin Liska
parent ca45475532
commit 42870a8682
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2019-12-05 Martin Liska <mliska@suse.cz>
PR gcov-profile/91971
* coverage.c (coverage_init): Mangle full path
only when -fprofile-dir is used.
2019-12-05 Jakub Jelinek <jakub@redhat.com>
PR target/92791

View File

@ -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