develooper Front page | perl.perl5.porters | Postings from April 2012

Re: [perl #112536] Setting -g3 is not trivial

Thread Previous
From:
Ruslan Zakirov
Date:
April 24, 2012 07:12
Subject:
Re: [perl #112536] Setting -g3 is not trivial
Message ID:
CAMOxC8siBSg8ZVcf+R9QSyhQ7FK7gqVpfWAAZzTk7Ww3sPniiQ@mail.gmail.com
On Tue, Apr 24, 2012 at 15:22, Nicholas Clark <nick@ccl4.org> wrote:
> On Mon, Apr 23, 2012 at 01:39:49PM +0200, Leon Timmermans wrote:
>> On Sun, Apr 22, 2012 at 12:05 PM, H.Merijn Brand <h.m.brand@xs4all.nl> wrote:
>> > I never thought of additional digits when allowing that. I could extend
>> > the current behavior to do so if p5p thinks that is sane.
>>
>> If you do that, don't forget to allow -ggdb3 and similar too too.
>
> Seems sane to me. At least, I can't think of anything it might be confused
> with.
>
> Is there a "list" of "similar too"? Or do we assume that anything
> /^-g[a-z0-9][-+a-z0-9]*$/ is valid?

I don't think so, but as I recall it's possible that you need
-gdwarf-2 -g3. Also, primary problem with instructions in INSTALL is
that those doesn't cover all possible cases. I wanted to compile
variant with -DDEBUGGING set and -gLevel adjusted to get macros
expansion in GDB. Even if you extended -DDEBUGGING option with -gXXX
support then it's still open question on how to set -DDEBUGGING for
perl itself.

May be the following is better:

-Aoptimize=-g3 -DEBUGGING

It probably works and you don't have to repeate -O3 flag in optimize.
If optimize option is properly described then there is no need in
-DEBUGGING=-g and =both variants. For backwards compatibility
-DDEBUGGING may add -g to optimize unless there -g* and -UDEBUGGING or
=none variant can delete all -g* flags from optimize.

> (ie is there a counter-example of a compiler flag starting -g that isn't
> about debugging, and would be confusing to add here)
>
> Nicholas Clark



-- 
Best regards, Ruslan.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About