diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1994-07-12 10:09:32 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1994-07-12 10:09:32 -0700 |
commit | 67e23d2f5c3d4492681544bf4b1dbee5f8e1dc7a (patch) | |
tree | 348d94ba074b964e3bd0250bf9b8dae2791d1cf4 /gcc/final.c | |
parent | 78221d63e7596bac0d05b905219f01e0b9daab6d (diff) | |
download | gcc-67e23d2f5c3d4492681544bf4b1dbee5f8e1dc7a.zip gcc-67e23d2f5c3d4492681544bf4b1dbee5f8e1dc7a.tar.gz gcc-67e23d2f5c3d4492681544bf4b1dbee5f8e1dc7a.tar.bz2 |
(end_final): Store full path name in .d file not just the filename.
From-SVN: r7745
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/final.c b/gcc/final.c index 2017251..78a0a073 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -378,9 +378,13 @@ end_final (filename) compatibility. */ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "LPBX", 1); { - int len = strlen (filename); - char *data_file = (char *) alloca (len + 3); - strcpy (data_file, filename); + char *cwd = getpwd (); + int len = strlen (filename) + strlen (cwd) + 1; + char *data_file = (char *) alloca (len + 4); + + strcpy (data_file, cwd); + strcat (data_file, "/"); + strcat (data_file, filename); strip_off_ending (data_file, len); strcat (data_file, ".d"); assemble_string (data_file, strlen (data_file) + 1); |