patches/binutils/2.15.91.0.2/binutils-skip-comments.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
yann@1
     1
Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
yann@1
     2
Fixes
yann@1
     3
localealias.s:544: Error: junk at end of line, first unrecognized character is `,' 
yann@1
     4
when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
yann@1
     5
yann@1
     6
Paths adjusted to match crosstool's patcher.
yann@1
     7
yann@1
     8
Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
yann@1
     9
From: Andreas Schwab <schwab at suse dot de>
yann@1
    10
To: Nathan Sidwell <nathan at codesourcery dot com>
yann@1
    11
Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
yann@1
    12
Date: Fri, 23 Apr 2004 22:27:19 +0200
yann@1
    13
Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
yann@1
    14
yann@1
    15
Nathan Sidwell <nathan@codesourcery.com> writes:
yann@1
    16
yann@1
    17
> Index: read.c
yann@1
    18
> ===================================================================
yann@1
    19
> RCS file: /cvs/src/src/gas/read.c,v
yann@1
    20
> retrieving revision 1.76
yann@1
    21
> diff -c -3 -p -r1.76 read.c
yann@1
    22
> *** read.c	12 Mar 2004 17:48:12 -0000	1.76
yann@1
    23
> --- read.c	18 Mar 2004 09:56:05 -0000
yann@1
    24
> *************** read_a_source_file (char *name)
yann@1
    25
> *** 1053,1059 ****
yann@1
    26
>   #endif
yann@1
    27
>   	  input_line_pointer--;
yann@1
    28
>   	  /* Report unknown char as ignored.  */
yann@1
    29
> ! 	  ignore_rest_of_line ();
yann@1
    30
>   	}
yann@1
    31
>   
yann@1
    32
>   #ifdef md_after_pass_hook
yann@1
    33
> --- 1053,1059 ----
yann@1
    34
>   #endif
yann@1
    35
>   	  input_line_pointer--;
yann@1
    36
>   	  /* Report unknown char as ignored.  */
yann@1
    37
> ! 	  demand_empty_rest_of_line ();
yann@1
    38
>   	}
yann@1
    39
>   
yann@1
    40
>   #ifdef md_after_pass_hook
yann@1
    41
yann@1
    42
This means that the unknown character is no longer ignored, despite the
yann@1
    43
comment.  As a side effect a line starting with a line comment character
yann@1
    44
not followed by APP in NO_APP mode now triggers an error instead of just a
yann@1
    45
warning, breaking builds of glibc on m68k-linux.  Earlier in
yann@1
    46
read_a_source_file where #APP is handled there is another comment that
yann@1
    47
claims that unknown comments are ignored, when in fact they aren't (only
yann@1
    48
the initial line comment character is skipped).
yann@1
    49
yann@1
    50
Note that the presence of #APP will mess up the line counters, but
yann@1
    51
that appears to be difficult to fix.
yann@1
    52
yann@1
    53
Andreas.
yann@1
    54
yann@1
    55
2004-04-23  Andreas Schwab  <schwab@suse.de>
yann@1
    56
yann@1
    57
	* read.c (read_a_source_file): Ignore unknown text after line
yann@1
    58
	comment character.  Fix misleading comment.
yann@1
    59
yann@1
    60
--- binutils/gas/read.c.~1.78.~	2004-04-23 08:58:23.000000000 +0200
yann@1
    61
+++ binutils/gas/read.c	2004-04-23 21:49:01.000000000 +0200
yann@1
    62
@@ -1,6 +1,6 @@
yann@1
    63
 /* read.c - read a source file -
yann@1
    64
    Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
yann@1
    65
-   1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
yann@1
    66
+   1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
yann@1
    67
 
yann@1
    68
 This file is part of GAS, the GNU Assembler.
yann@1
    69
 
yann@1
    70
@@ -950,10 +950,14 @@ read_a_source_file (char *name)
yann@1
    71
 	      unsigned int new_length;
yann@1
    72
 	      char *tmp_buf = 0;
yann@1
    73
 
yann@1
    74
-	      bump_line_counters ();
yann@1
    75
 	      s = input_line_pointer;
yann@1
    76
 	      if (strncmp (s, "APP\n", 4))
yann@1
    77
-		continue;	/* We ignore it */
yann@1
    78
+		{
yann@1
    79
+		  /* We ignore it */
yann@1
    80
+		  ignore_rest_of_line ();
yann@1
    81
+		  continue;
yann@1
    82
+		}
yann@1
    83
+	      bump_line_counters ();
yann@1
    84
 	      s += 4;
yann@1
    85
 
yann@1
    86
 	      sb_new (&sbuf);
yann@1
    87
@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
yann@1
    88
 	    continue;
yann@1
    89
 #endif
yann@1
    90
 	  input_line_pointer--;
yann@1
    91
-	  /* Report unknown char as ignored.  */
yann@1
    92
+	  /* Report unknown char as error.  */
yann@1
    93
 	  demand_empty_rest_of_line ();
yann@1
    94
 	}
yann@1
    95
 
yann@1
    96
yann@1
    97
-- 
yann@1
    98
Andreas Schwab, SuSE Labs, schwab@suse.de
yann@1
    99
SuSE Linux AG, Maxfeldstra&#xC3;e 5, 90409 N&#xC3;rnberg, Germany
yann@1
   100
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
yann@1
   101
"And now for something completely different."