This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: recent MIPS mdebug-related changes cause gcc testsuite failures.


On Fri, Jun 21, 2002 at 11:35:12AM -0700, cgd@broadcom.com wrote:
> At Fri, 21 Jun 2002 14:32:06 -0400, Daniel Jacobowitz wrote:
> > > *subtarget_asm_debugging_spec: {g} %{g0} %{g1} %{g2} %{g3} %{ggdb:-g}
> > > %%{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} %{gstabs:-g}
> > > %%{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3}
> > > %%{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2}
> > > %%{gstabs+3:-g3} %{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1}
> > > %%{gcoff2:-g2} %{gcoff3:-g3}
> > > 
> > > Doesn't look like that flag will be passed unmolested to the
> > > assembler.  "-mdebug" would have to be passed in via the specs, it
> > > seems...
> > > 
> > > 
> > > Thoughts?
> > 
> > That spec is just wrong, period.  According to standard practice, if we
> > have compiler debugging we do not desire assembler debugging; -g* (*
> > not equal to 0, at least) should cause -g0 to be passed to the
> > assembler.
> 
> Err, not sure what that's supposed to mean, and certainly I don't feel
> authoritative enough to submit a patch for that.  8-)
> 
> 
> > -gcoff{,1,2,3} should cause -mdebug to be passed to the assembler.
> > 
> > Would you mind submitting the appropriate GCC patch?
> 
> I'm currently testing a patch which changes
> SUBTARGET_ASM_DEBUGGING_SPEC to be like so:
> 
> ...
> %{gcoff:-g -mdebug} %{gcoff0:-g0 -mdebug} %{gcoff1:-g1 -mdebug} \
> %{gcoff2:-g2 -mdebug} %{gcoff3:-g3 -mdebug}"
> 
> 
> Is that what you mean?

That's what I meant (well, should have meant at least) by the second
half.  Telling the assembler -g is wrong too, for non-assembly source.

Fixing this is a little hard, because it requires actually checking for
the (recent, GAS only) -mdebug option.  You should probably add a
configure check for it rather than trying to key it off MASK_GAS, since
mips-elf doesn't even default to GAS.  Just copy the check for
--gstabs in configure.in and pick an appropriate version number (maybe
--2.13).

Then you do:

#if HAVE_AS_MDEBUG_DEBUG_FLAG
#define SUBTARGET_ASM_DEBUGGING_SPEC "%{gcoff* -mdebug}"
#else
...
#endif

ASM_DEBUG_SPEC needs to be adjusted also, probably, to pass -mdebug;
but that's not important.  The ... part can probably be the old
subtarget_asm_debugging_spec.  Then remove the override in linux.h.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]