diff options
author | Richard Biener <rguenther@suse.de> | 2019-05-07 08:52:33 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-05-07 08:52:33 +0000 |
commit | fe26771191ab959eab1b92ac8a574a900a2a3f4c (patch) | |
tree | fcbda5dd40eb68ec5cc39af1d1ec5ef5eb696728 /gcc | |
parent | 03de2955128860f04bd371b71e0f23b4498c94e2 (diff) | |
download | gcc-fe26771191ab959eab1b92ac8a574a900a2a3f4c.zip gcc-fe26771191ab959eab1b92ac8a574a900a2a3f4c.tar.gz gcc-fe26771191ab959eab1b92ac8a574a900a2a3f4c.tar.bz2 |
re PR lto/90369 (error: could not unlink output file)
2019-05-07 Richard Biener <rguenther@suse.de>
PR lto/90369
* lto-wrapper.c (debug_objcopy): Use the original filename
including archive offset for the filename used for -save-temps.
From-SVN: r270937
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lto-wrapper.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 028f992..161e966 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-05-07 Richard Biener <rguenther@suse.de> + + PR lto/90369 + * lto-wrapper.c (debug_objcopy): Use the original filename + including archive offset for the filename used for -save-temps. + 2019-05-07 Li Jia He <helijia@linux.ibm.com> * tree-ssa-phiopt.c (two_value_replacement): Fix a typo in parameter diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index 56eea90..ac97149 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -1044,6 +1044,7 @@ debug_objcopy (const char *infile, bool rename) int err; const char *p; + const char *orig_infile = infile; off_t inoff = 0; long loffset; int consumed; @@ -1080,9 +1081,9 @@ debug_objcopy (const char *infile, bool rename) if (save_temps) { - outfile = (char *) xmalloc (strlen (infile) + outfile = (char *) xmalloc (strlen (orig_infile) + sizeof (".debug.temp.o") + 1); - strcpy (outfile, infile); + strcpy (outfile, orig_infile); strcat (outfile, ".debug.temp.o"); } else |