Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359903

Summary: RFE: specify gcov and gprof for Autotools projects in project settings
Product: z_Archived Reporter: Jeff Johnston <jjohnstn>
Component: AutotoolsAssignee: Jeff Johnston <jjohnstn>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.8.1   
Target Milestone: 0.9.0   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Jeff Johnston CLA 2011-10-04 15:33:32 EDT
To use gcov or gprof, the code must be compiled/linked with special flags.

For an Autotools project, the flags are buried inside the configure script so to do this, one must override compiler flags (CFLAGS) on the configure command.

Currently, this can be done manually using the advanced configure settings text entry (e.g. CFLAGS="-pg").

It would be nice to be able to specify these flags via the UI so that a user doesn't need to know the magic incantation to get it to work and such that they can easily switch the project to generate gcov/gprof info or not.
Comment 1 Jeff Johnston CLA 2011-10-04 15:35:56 EDT
A new set of CFLAGS options has been added to the Project Properties->Autotools->Configure Settings->Advanced page.  These are "debug, gcov, and gprof").  The settings are checkboxes and result in building a CFLAGS= statement that is appended to the configure command.  The user still has the ability to add CFLAGS on their own in the User settings field of the Advanced page.

Using gcov/gprof is as easy as clicking on the selections and then rebuilding.