patches/binutils/2.17/190-skip-comments.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Jan 22 22:32:25 2011 +0100 (2011-01-22)
changeset 2268 1300e1714c13
parent 745 e445c00d134d
permissions -rw-r--r--
libc/uClibc: move content of do_libc_headers into do_libc_start_files

It is unnecessary to split C library preparation into two steps, as only
one really makes sense. So, do_libc_headers is bound to be withdrawn
short-term, in favor of do_libc_start_files.

uClibc already had all its start files installation in do_libc_headers, and
do_libc_start_files was empty, just migrate the content of the former into
the latter.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 [removed first hunk so it would apply to 2.16.1 - copyright date already updated - dank]
     2 
     3 Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
     4 Fixes
     5 localealias.s:544: Error: junk at end of line, first unrecognized character is `,' 
     6 when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
     7 
     8 Paths adjusted to match crosstool's patcher.
     9 
    10 Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
    11 From: Andreas Schwab <schwab at suse dot de>
    12 To: Nathan Sidwell <nathan at codesourcery dot com>
    13 Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
    14 Date: Fri, 23 Apr 2004 22:27:19 +0200
    15 Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
    16 
    17 Nathan Sidwell <nathan@codesourcery.com> writes:
    18 
    19 > Index: read.c
    20 > ===================================================================
    21 > RCS file: /cvs/src/src/gas/read.c,v
    22 > retrieving revision 1.76
    23 > diff -c -3 -p -r1.76 read.c
    24 > *** read.c	12 Mar 2004 17:48:12 -0000	1.76
    25 > --- read.c	18 Mar 2004 09:56:05 -0000
    26 > *************** read_a_source_file (char *name)
    27 > *** 1053,1059 ****
    28 >   #endif
    29 >   	  input_line_pointer--;
    30 >   	  /* Report unknown char as ignored.  */
    31 > ! 	  ignore_rest_of_line ();
    32 >   	}
    33 >   
    34 >   #ifdef md_after_pass_hook
    35 > --- 1053,1059 ----
    36 >   #endif
    37 >   	  input_line_pointer--;
    38 >   	  /* Report unknown char as ignored.  */
    39 > ! 	  demand_empty_rest_of_line ();
    40 >   	}
    41 >   
    42 >   #ifdef md_after_pass_hook
    43 
    44 This means that the unknown character is no longer ignored, despite the
    45 comment.  As a side effect a line starting with a line comment character
    46 not followed by APP in NO_APP mode now triggers an error instead of just a
    47 warning, breaking builds of glibc on m68k-linux.  Earlier in
    48 read_a_source_file where #APP is handled there is another comment that
    49 claims that unknown comments are ignored, when in fact they aren't (only
    50 the initial line comment character is skipped).
    51 
    52 Note that the presence of #APP will mess up the line counters, but
    53 that appears to be difficult to fix.
    54 
    55 Andreas.
    56 
    57 2004-04-23  Andreas Schwab  <schwab@suse.de>
    58 
    59 	* read.c (read_a_source_file): Ignore unknown text after line
    60 	comment character.  Fix misleading comment.
    61 
    62 --- binutils/gas/read.c.~1.78.~	2004-04-23 08:58:23.000000000 +0200
    63 +++ binutils/gas/read.c	2004-04-23 21:49:01.000000000 +0200
    64 @@ -1008,10 +1008,14 @@ read_a_source_file (char *name)
    65  	      unsigned int new_length;
    66  	      char *tmp_buf = 0;
    67  
    68 -	      bump_line_counters ();
    69  	      s = input_line_pointer;
    70  	      if (strncmp (s, "APP\n", 4))
    71 -		continue;	/* We ignore it */
    72 +		{
    73 +		  /* We ignore it */
    74 +		  ignore_rest_of_line ();
    75 +		  continue;
    76 +		}
    77 +	      bump_line_counters ();
    78  	      s += 4;
    79  
    80  	      sb_new (&sbuf);
    81 @@ -1110,7 +1110,7 @@ read_a_source_file (char *name)
    82  	    continue;
    83  #endif
    84  	  input_line_pointer--;
    85 -	  /* Report unknown char as ignored.  */
    86 +	  /* Report unknown char as error.  */
    87  	  demand_empty_rest_of_line ();
    88  	}
    89  
    90 
    91 -- 
    92 Andreas Schwab, SuSE Labs, schwab@suse.de
    93 SuSE Linux AG, Maxfeldstra&#xC3;e 5, 90409 N&#xC3;rnberg, Germany
    94 Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
    95 "And now for something completely different."