From 67e23d2f5c3d4492681544bf4b1dbee5f8e1dc7a Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Tue, 12 Jul 1994 10:09:32 -0700 Subject: [PATCH] (end_final): Store full path name in .d file not just the filename. From-SVN: r7745 --- gcc/final.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gcc/final.c b/gcc/final.c index 20172513839..78a0a07368b 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);