patches/binutils/2.15/760-skip-comments.patch
changeset 747 d3e603e7c17c
parent 746 b150d6f590fc
child 748 61cd4eb6034d
     1.1 --- a/patches/binutils/2.15/760-skip-comments.patch	Mon Jul 28 21:08:01 2008 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,101 +0,0 @@
     1.4 -Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
     1.5 -Fixes
     1.6 -localealias.s:544: Error: junk at end of line, first unrecognized character is `,' 
     1.7 -when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
     1.8 -
     1.9 -Paths adjusted to match crosstool's patcher.
    1.10 -
    1.11 -Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
    1.12 -From: Andreas Schwab <schwab at suse dot de>
    1.13 -To: Nathan Sidwell <nathan at codesourcery dot com>
    1.14 -Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
    1.15 -Date: Fri, 23 Apr 2004 22:27:19 +0200
    1.16 -Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
    1.17 -
    1.18 -Nathan Sidwell <nathan@codesourcery.com> writes:
    1.19 -
    1.20 -> Index: read.c
    1.21 -> ===================================================================
    1.22 -> RCS file: /cvs/src/src/gas/read.c,v
    1.23 -> retrieving revision 1.76
    1.24 -> diff -c -3 -p -r1.76 read.c
    1.25 -> *** read.c	12 Mar 2004 17:48:12 -0000	1.76
    1.26 -> --- read.c	18 Mar 2004 09:56:05 -0000
    1.27 -> *************** read_a_source_file (char *name)
    1.28 -> *** 1053,1059 ****
    1.29 ->   #endif
    1.30 ->   	  input_line_pointer--;
    1.31 ->   	  /* Report unknown char as ignored.  */
    1.32 -> ! 	  ignore_rest_of_line ();
    1.33 ->   	}
    1.34 ->   
    1.35 ->   #ifdef md_after_pass_hook
    1.36 -> --- 1053,1059 ----
    1.37 ->   #endif
    1.38 ->   	  input_line_pointer--;
    1.39 ->   	  /* Report unknown char as ignored.  */
    1.40 -> ! 	  demand_empty_rest_of_line ();
    1.41 ->   	}
    1.42 ->   
    1.43 ->   #ifdef md_after_pass_hook
    1.44 -
    1.45 -This means that the unknown character is no longer ignored, despite the
    1.46 -comment.  As a side effect a line starting with a line comment character
    1.47 -not followed by APP in NO_APP mode now triggers an error instead of just a
    1.48 -warning, breaking builds of glibc on m68k-linux.  Earlier in
    1.49 -read_a_source_file where #APP is handled there is another comment that
    1.50 -claims that unknown comments are ignored, when in fact they aren't (only
    1.51 -the initial line comment character is skipped).
    1.52 -
    1.53 -Note that the presence of #APP will mess up the line counters, but
    1.54 -that appears to be difficult to fix.
    1.55 -
    1.56 -Andreas.
    1.57 -
    1.58 -2004-04-23  Andreas Schwab  <schwab@suse.de>
    1.59 -
    1.60 -	* read.c (read_a_source_file): Ignore unknown text after line
    1.61 -	comment character.  Fix misleading comment.
    1.62 -
    1.63 ---- binutils/gas/read.c.~1.78.~	2004-04-23 08:58:23.000000000 +0200
    1.64 -+++ binutils/gas/read.c	2004-04-23 21:49:01.000000000 +0200
    1.65 -@@ -1,6 +1,6 @@
    1.66 - /* read.c - read a source file -
    1.67 -    Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
    1.68 --   1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    1.69 -+   1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    1.70 - 
    1.71 - This file is part of GAS, the GNU Assembler.
    1.72 - 
    1.73 -@@ -950,10 +950,14 @@ read_a_source_file (char *name)
    1.74 - 	      unsigned int new_length;
    1.75 - 	      char *tmp_buf = 0;
    1.76 - 
    1.77 --	      bump_line_counters ();
    1.78 - 	      s = input_line_pointer;
    1.79 - 	      if (strncmp (s, "APP\n", 4))
    1.80 --		continue;	/* We ignore it */
    1.81 -+		{
    1.82 -+		  /* We ignore it */
    1.83 -+		  ignore_rest_of_line ();
    1.84 -+		  continue;
    1.85 -+		}
    1.86 -+	      bump_line_counters ();
    1.87 - 	      s += 4;
    1.88 - 
    1.89 - 	      sb_new (&sbuf);
    1.90 -@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
    1.91 - 	    continue;
    1.92 - #endif
    1.93 - 	  input_line_pointer--;
    1.94 --	  /* Report unknown char as ignored.  */
    1.95 -+	  /* Report unknown char as error.  */
    1.96 - 	  demand_empty_rest_of_line ();
    1.97 - 	}
    1.98 - 
    1.99 -
   1.100 --- 
   1.101 -Andreas Schwab, SuSE Labs, schwab@suse.de
   1.102 -SuSE Linux AG, Maxfeldstra&#xC3;e 5, 90409 N&#xC3;rnberg, Germany
   1.103 -Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
   1.104 -"And now for something completely different."