petdance/scratch — Issue #87: config/init/defaults.pm:  Profiling options are too specific to GCC
Author: petdance
Created: 2011-11-01 05:29:48+00:00
State: open
Labels: bug, configure, Pri-minor, Sev-medium

This ticket was created in [http://rt.perl.org/rt3/Ticket/Display.html?id=41497 RT #41497] by Paul T Cochrane in February 2007. I am moving it into the Trac system to raise its visibility. I believe it could be moved toward resolution by someone -- a newcomer, perhaps -- who was willing to spend some time doing Internet searching on the profiling options of various C compilers.

Original description:[[BR]]
'''The profiling options used in config/init/defaults.pm are specific to gcc. This should probably be specified in the relevant hints file.'''

The relevant code in ''config/init/defaults.pm'' is this:
{{{
if ( $conf->options->get('profile') ) {
$conf->data->set(
cc_debug => " -pg ",
ld_debug => " -pg ",
);
}
}}}
In the original ticket, Infinoid subsequently commented: ''This flag convinces gcc to generate profiling code specifically for
the GNU profiler, `gprof`. I find it *extremely* unlikely that this
flag would be available and/or mean the same thing for other compilers ...''

In addition, Andy Dougherty commented: ''[These options] are gcc-specific. A plain `-p` is common on Unix systems, but `-pg` is gcc-specific. For example, with Sun's C compiler, `-xpg` would be
the equivalent flag. (Though Sun's C compiler also has other profile
options selected by `-xprofile` ...)''

Could someone research profiling options on a variety of C compilers, including the principal C compilers for Windows?

Thank you very much.[[BR]]
kid51
Trac ID #855