diff options
author | Martin Thuresson <martinthuresson@gcc.gnu.org> | 2011-05-13 15:57:20 +0000 |
---|---|---|
committer | Martin Thuresson <martinthuresson@gcc.gnu.org> | 2011-05-13 15:57:20 +0000 |
commit | 9f47a24e79fbd0b73f65444c8c39d783e36f3a28 (patch) | |
tree | e6b3ff6bf898673cb3abd4a4ddabd51b7ba3484f /gcc/libgcov.c | |
parent | b8a71aedd80dc9c0212da116defa88b178d11e0b (diff) | |
download | gcc-9f47a24e79fbd0b73f65444c8c39d783e36f3a28.zip gcc-9f47a24e79fbd0b73f65444c8c39d783e36f3a28.tar.gz gcc-9f47a24e79fbd0b73f65444c8c39d783e36f3a28.tar.bz2 |
re PR gcov-profile/47793 (Relative path in fprofile-use turns into absolute path)
2011-05-13 Martin Thuresson <martint@google.com>
PR gcov-profile/47793
* libgcov.c (gcov_exit): Support relative profile paths.
* doc/invoke.texi (-fprofile-dir): Update for above change.
2011-05-13 Martin Thuresson <martint@google.com>
PR gcov-profile/47793
* gcc.dg/pr47793.c: New.
From-SVN: r173735
Diffstat (limited to 'gcc/libgcov.c')
-rw-r--r-- | gcc/libgcov.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/libgcov.c b/gcc/libgcov.c index 7d1f6d0..b39ef49 100644 --- a/gcc/libgcov.c +++ b/gcc/libgcov.c @@ -283,8 +283,9 @@ gcov_exit (void) } } /* Update complete filename with stripped original. */ - if (!IS_DIR_SEPARATOR (*fname) && !HAS_DRIVE_SPEC(fname)) - { + if (prefix_length != 0 && !IS_DIR_SEPARATOR (*fname)) + { + /* If prefix is given, add directory separator. */ strcpy (gi_filename_up, "/"); strcpy (gi_filename_up + 1, fname); } |