develooper Front page | perl.perl5.porters | Postings from July 2016

Question about "./Configure -Doptimize=-g"

Thread Next
From:
Glenn Golden
Date:
July 19, 2016 00:59
Subject:
Question about "./Configure -Doptimize=-g"
Message ID:
20160719005935.GC15598@huh.zplane.com
Newbie hacker question:

I'm attempting to build git perl with debug support enabled so I can fiddle
around with the various runtime "-Dxxx" options.  The 'perlhacktips' doc
seems to imply that configuring with "-Doptimize=-g" will automatically also
enable the appropriate debugging flags:

    "Configure will also turn on the 'DEBUGGING' compilation symbol..."

The 'perlrun' doc seems to reinforce this idea:

    "This [DEBUGGING] flag is automatically set if you include -g
     option when 'Configure' asks you about optimizer/debugger flags."

But that doesn't seem to happen.

The config.sh that gets built using exactly this commandline:

    ./Configure -des -Dusedevel -Doptimize=-g		   # CMDLINE1

winds up without '-DDEBUGGING' in the ccflags variable.  But adding an
explicit '-DDEBUGGING' does the trick:

    ./Configure -des -Dusedevel -Doptimize=-g -DDEBUGGING  # CMDLINE2

Attached are the two config.sh files corresponding to the above commands.

(A "make veryclean" was done prior to each ./Configure.)

Am I misinterpreting the doc or is it just out of date?

Thread Next


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