16b2dafd58ca698ddaa9121535efd3be510bd295
[openwrt.git] / toolchain / binutils / patches / 2.17 / 702-binutils-skip-comments.patch
1 Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
2 Fixes
3 localealias.s:544: Error: junk at end of line, first unrecognized character is `,'
4 when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
5
6 Paths adjusted to match crosstool's patcher.
7
8 Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
9 From: Andreas Schwab <schwab at suse dot de>
10 To: Nathan Sidwell <nathan at codesourcery dot com>
11 Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
12 Date: Fri, 23 Apr 2004 22:27:19 +0200
13 Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
14
15 Nathan Sidwell <nathan@codesourcery.com> writes:
16
17 > Index: read.c
18 > ===================================================================
19 > RCS file: /cvs/src/src/gas/read.c,v
20 > retrieving revision 1.76
21 > diff -c -3 -p -r1.76 read.c
22 > *** read.c 12 Mar 2004 17:48:12 -0000 1.76
23 > --- read.c 18 Mar 2004 09:56:05 -0000
24 > *************** read_a_source_file (char *name)
25 > *** 1053,1059 ****
26 > #endif
27 > input_line_pointer--;
28 > /* Report unknown char as ignored. */
29 > ! ignore_rest_of_line ();
30 > }
31 >
32 > #ifdef md_after_pass_hook
33 > --- 1053,1059 ----
34 > #endif
35 > input_line_pointer--;
36 > /* Report unknown char as ignored. */
37 > ! demand_empty_rest_of_line ();
38 > }
39 >
40 > #ifdef md_after_pass_hook
41
42 This means that the unknown character is no longer ignored, despite the
43 comment. As a side effect a line starting with a line comment character
44 not followed by APP in NO_APP mode now triggers an error instead of just a
45 warning, breaking builds of glibc on m68k-linux. Earlier in
46 read_a_source_file where #APP is handled there is another comment that
47 claims that unknown comments are ignored, when in fact they aren't (only
48 the initial line comment character is skipped).
49
50 Note that the presence of #APP will mess up the line counters, but
51 that appears to be difficult to fix.
52
53 Andreas.
54
55 2004-04-23 Andreas Schwab <schwab@suse.de>
56
57 * read.c (read_a_source_file): Ignore unknown text after line
58 comment character. Fix misleading comment.
59
60 Index: binutils-2.17/gas/read.c
61 ===================================================================
62 --- binutils-2.17.orig/gas/read.c 2007-06-28 09:19:34.031062944 +0200
63 +++ binutils-2.17/gas/read.c 2007-06-28 09:19:39.244270416 +0200
64 @@ -1008,10 +1008,14 @@
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 +1114,7 @@
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
This page took 0.044072 seconds and 3 git commands to generate.