Ticket #855 (assigned bug)
config/init/defaults.pm: Profiling options are too specific to GCC
Description
This ticket was created in 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:
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.
kid51