Bug 55822 - Toolchain fix for CR100958 needs integration
Toolchain fix for CR100958 needs integration
Status: CLOSED WONTFIX
Product: eCos
Classification: Retired
Component: HAL (Show other bugs)
CVS
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Nick Garnett
Nick Garnett
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-07 03:34 EST by Jesper Skov
Modified: 2007-04-18 12:38 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-06-20 12:04:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jesper Skov 2001-11-07 03:34:49 EST
There are some build rules in the HALs which use explicit -o arguments
to work around CR100958. DJ (probably) fixed the problem with the
attached patch - but I don't see much point in testing it with a 99r1/00r1
toolchain until it's actually clear we have the resources to respin the
tools.

FWIW DJ argued that we should stop using DOS paths. See thread "CR 100958"
on ecc-comp-tools.
Comment 1 Jesper Skov 2001-11-07 03:38:09 EST
Attachments doesn't work, so here it is:



Index: cppmain.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/cppmain.c,v
retrieving revision 1.29.8.1
diff -p -3 -r1.29.8.1 cppmain.c
*** cppmain.c	2000/11/14 22:51:58	1.29.8.1
--- cppmain.c	2001/11/06 23:32:34
*************** cb_include (pfile, dir, str, len, ab)
*** 195,207 ****
    parse_out.lineno++;
  }
  
  static void
  cb_enter_file (pfile)
       cpp_reader *pfile;
  {
    cpp_buffer *ip = CPP_BUFFER (pfile);
  
!   cpp_printf (pfile, &parse_out, "# 1 \"%s\"%s%s\n", ip->nominal_fname,
  	      pfile->done_initializing ? " 1" : "",
  	      cpp_syshdr_flags (pfile, ip));
  
--- 195,233 ----
    parse_out.lineno++;
  }
  
+ static char *
+ cb_escaped_filename(name)
+      char *name;
+ {
+   static char *buf = 0;
+   int quotes;
+   char *cp, *bp;
+ 
+   if (buf)
+     free(buf);
+   quotes = 0;
+   for (cp = name; *cp; cp++)
+     if (*cp == '\\')
+       quotes++;
+   buf = xmalloc (strlen(name) + quotes + 1);
+   for (bp = buf, cp = name; *cp; cp++)
+     {
+       if (*cp == '\\')
+ 	*bp++ = '\\';
+       *bp++ = *cp;
+     }
+   *bp = 0;
+   return buf;
+ }
+ 
  static void
  cb_enter_file (pfile)
       cpp_reader *pfile;
  {
    cpp_buffer *ip = CPP_BUFFER (pfile);
  
!   cpp_printf (pfile, &parse_out, "# 1 \"%s\"%s%s\n",
! 	      cb_escaped_filename(ip->nominal_fname),
  	      pfile->done_initializing ? " 1" : "",
  	      cpp_syshdr_flags (pfile, ip));
  
*************** cb_leave_file (pfile)
*** 216,222 ****
    cpp_buffer *ip = CPP_BUFFER (pfile);
  
    cpp_printf (pfile, &parse_out, "# %u \"%s\" 2%s\n", ip->lineno,
! 	      ip->nominal_fname, cpp_syshdr_flags (pfile, ip));
  
    parse_out.lineno = ip->lineno;
    parse_out.last_fname = ip->nominal_fname;
--- 242,249 ----
    cpp_buffer *ip = CPP_BUFFER (pfile);
  
    cpp_printf (pfile, &parse_out, "# %u \"%s\" 2%s\n", ip->lineno,
! 	      cb_escaped_filename(ip->nominal_fname),
! 	      cpp_syshdr_flags (pfile, ip));
  
    parse_out.lineno = ip->lineno;
    parse_out.last_fname = ip->nominal_fname;
Index: cppoutput.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/Attic/cppoutput.c,v
retrieving revision 1.2.18.1
diff -p -3 -r1.2.18.1 cppoutput.c
*** cppoutput.c	2000/11/14 22:51:58	1.2.18.1
--- cppoutput.c	2001/11/06 23:32:34
*************** output_line_command (pfile, print, line)
*** 119,124 ****
--- 119,125 ----
       unsigned int line;
  {
    cpp_buffer *ip = CPP_BUFFER (pfile);
+   char *fp;
  
    if (line == 0)
      return;
*************** output_line_command (pfile, print, line)
*** 155,160 ****
--- 156,170 ----
  
    fprintf (print->outf, "# %u \"%s\"%s\n", line, ip->nominal_fname,
  	   cpp_syshdr_flags (pfile, ip));
+ 
+   fprintf (print->outf, "# %u \"", line);
+   for (fp = ip->nominal_fname; *fp; fp++)
+     {
+       if (*fp == '\\')
+ 	fputc('\\', print->outf);
+       fputc(*fp, print->outf);
+     }
+   fprintf (print->outf, "\"%s\n", cpp_syshdr_flags (pfile, ip));
  
    print->last_fname = ip->nominal_fname;
    print->lineno = line;
Comment 2 Alex Schuilenburg 2003-06-20 12:04:37 EDT
This bug has moved to http://bugs.ecos.sourceware.org/show_bug.cgi?id=55822

Note You need to log in before you can comment on or make changes to this bug.