Bug 527337 - Where to add additional compiler option for gnu autotools project
Summary: Where to add additional compiler option for gnu autotools project
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-autotools (show other bugs)
Version: Next   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Jeff Johnston CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-16 06:16 EST by Chandrayya CLA
Modified: 2018-04-03 09:04 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chandrayya CLA 2017-11-16 06:16:45 EST
I have created GNU Autotools ANSI C hello world project(https://wiki.eclipse.org/Linux_Tools_Project/Autotools/User_Guide#Creating_an_Autotools_Project) 

I want to pass additional compiler options(like for ex: pthread), so I opened the project property dialog of the autotools project created before and navigated to Autotools > Configure Settings. Then in Configure tree node selected Advanced tree node. Here I have selected all compiler option checkboxes(line Debug(-g), Gprof support(-pg) etc) then added CFLAGS="-pthread" string in the additional command-line option text box.

After I run Reconfigure project, in the generated make file I am getting CFLAGS = "-pthread",  all other compiler options like -g, -pg were ignored. Is it a bug?

How I can pass additional compiler option(s) along with the compiler option(s) provided as GUI controls in autotools project property dialog, in a GUI way?
Comment 1 Ilya Basin CLA 2018-04-03 09:04:27 EDT
Since Eclipse is not smart enough to deduce the compiler flags by running the make command, we should unhide the "C/C++ Build -> Settings -> Tool Settings" property page in Autotools global project settings and in per-file properties.

Or add a feature to deduce these flags. This isn't rocket science.