patches/binutils/2.17/190-skip-comments.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Aug 02 18:28:10 2011 +0200 (2011-08-02)
changeset 2590 b64cfb67944e
parent 745 e445c00d134d
permissions -rw-r--r--
scripts/functions: svn retrieval first tries the mirror for tarballs

The svn download helper looks for the local tarballs dir to see if it
can find a pre-downloaded tarball, and if it does not find it, does
the actual fetch to upstream via svn.

In the process, it does not even try to get a tarball from the local
mirror, which can be useful if the mirror has been pre-populated
manually (or with a previously downloaded tree).

Fake a tarball get with the standard tarball-download helper, but
without specifying any upstream URL, which makes the helper directly
try the LAN mirror.

Of course, if no mirror is specified, no URL wil be available, and
the standard svn retrieval will kick in.

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