linux-origin
[Top] [All Lists]

Re: compiler bug?

To: Ralf Baechle <ralf@xxxxxxxxxxx>
Subject: Re: compiler bug?
From: Ulf Carlsson <ulfc@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 30 May 2000 03:03:52 -0700 (PDT)
Cc: John Hawkes <hawkes@xxxxxxxxxxxxxxxxxxxx>, Kanoj Sarcar <kanoj@xxxxxxxxxxxxxxxxxxxx>, linux-origin@xxxxxxxxxxx
In-reply-to: <20000527223544.A19779@xxxxxxxxxxxxxx>
Sender: owner-linux-origin@xxxxxxxxxxx
On Sat, 27 May 2000, Ralf Baechle wrote:

> On Fri, May 26, 2000 at 11:32:06AM -0700, Ulf Carlsson wrote:
> 
> > > Can anyone please suggest a workaround?  I'm stuck right now.
> > 
> > I think there should be a line that says
> > 
> >     CFLAGS_r4k_genex.o := -P
> > 
> > in the Makefile for the kernel directory.  If you do that cpp doesn't output
> > line numbers.
> 
> The workaround for the affected files is already in the CVS Makefile
> since a week.  I hope Ulf soon comes with a fix for the problem in
> binutils ...

I haven't found a nice solution directly in ecoff.c, but you can easily get
around the problem by not generating line number debug information when you're
expanding macros.  I don't think this has any unpleasant side-effects for
other architectures either.  You basically don't care about the line number
information cpp inserts into macros anyway.  I could compile some new RPM if
you really want to try this...

It is a design problem with the ecoff code and not just a silly bug that I
could fix without affecting anything else.

Ulf

Index: read.c
===================================================================
RCS file: /cvs/src/src/gas/read.c,v
retrieving revision 1.19
diff -u -p -r1.19 read.c
--- read.c      2000/04/21 20:22:22     1.19
+++ read.c      2000/05/30 09:43:20
@@ -875,8 +875,6 @@ read_a_source_file (name)
                      c = *input_line_pointer;
                      *input_line_pointer = '\0';
 
-                     generate_lineno_debug ();
-
                      if (macro_defined)
                        {
                          sb out;
@@ -899,6 +897,8 @@ read_a_source_file (name)
                              continue;
                            }
                        }
+
+                     generate_lineno_debug ();
 
                      if (mri_pending_align)
                        {


<Prev in Thread] Current Thread [Next in Thread>