On Fri, 2008-03-28 at 09:41 -0500, Nicolas Williams wrote:
> On Fri, Mar 28, 2008 at 01:12:45PM +0100, Mark Phalan wrote:
> > 
> > On Thu, 2008-03-27 at 21:39 +0100, Mark Phalan wrote:
> > > On 27 Mar 2008, at 20:44, Nicolas Williams wrote:
> > > > On Thu, Mar 27, 2008 at 07:10:19PM +0100, Mark Phalan wrote:
> > > >> Up until recently when I was debugging something I sometimes liked to
> > > >> build debug libraries that I could use with dbx.
> > > >> For e.g. when building mech_krb5.so.1 I built like this:
> > > >>
> > > >> CTFCONVERT_O="" CTFMERGE_LIB="" COPTFLAG="-g" COPTFLAG64="-g" make
> > > >> install
> > > >
> > > > I usually do this instead:
> > > >
> > > > % export STRIPSTABS_KEEP_STABS=1
> > > > % dmake COPTFLAG=-g COPTFLAG64=-g install
> > > >
> > > > STRIPSTABS_KEEP_STABS is that which tells the ctf tools not to remove
> > > > the debug info.
> > > 
> > > Thanks for the tip, I'll try this too.
> > 
> > I tried that. Unfortunately I got the same errors as before. Removing
> > the '-g' options results in a library which can be debugged but dbx
> > still notes as being optimized. I can live with that but I'd like to
> > compile the lib with no optimizations.
> 
> SO the problem is that -g appears twice?  How about using COPTFLAG= and
> COPTFLAG64=?

I don't think the problem is that '-g' appears twice. It works for me
now when I use:

COPTFLAG="-xO0 -g" COPTFLAG64="-xO0 -g"

No linking errors and no optimizations.


I'll give "COPTFLAG= COPTFLAG64=" a go too.

Cheers,

-M


Reply via email to