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

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

Thread Next
Glenn Golden
July 19, 2016 00:59
Question about "./Configure -Doptimize=-g"
Message ID:
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 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 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About