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