develooper Front page | perl.perl5.porters | Postings from December 2008

Re: [PATCH] -g isn't always -g

Thread Previous | Thread Next
Reini Urban
December 24, 2008 08:30
Re: [PATCH] -g isn't always -g
Message ID:
Jarkko Hietaniemi schrieb:
> In Tru64 if one cranks up the optimization to -O4, one also needs to
> crank up the debugging to -g3, since -g is equivalent to -g2, which
> is not enough for -O4.  The problem is that the -g might be added
> by Configure when doing -DDEBUGGING/-DEBUGGING, so looking at optimize
> and/or ccflags in the hints file is not enough.
> I could have just tweaked this in hints/, but I would have
> just ended up duplicating much of the the Configure DEBUGGING logic.
> Therefore I introduced a new Configure variable 'debugging', which
> defaults to '-g', but can be whatever. I don't know that it's necessary
> to store it in, this patch doesn't, but I'll leave it to
> Configuremeister to decide.

Serious debugging on dwarf needs -g3 anyway, otherwise you get no 
macroexpansion. Accessing sv's or op's without macros causes headaches.

I would propose to raise -g to -g3 on all gcc dwarf capable platforms 
per default.

I always override it with -DDEBUGGING -Doptimize=-g3

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About