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

Bug 369888

Summary: [Scanner Discovery] Modifying the prefix in Cross settings doesn't modify the Scanner discovery command
Product: [Tools] CDT Reporter: Marc-André Laperle <malaperle>
Component: cdt-buildAssignee: Marc-André Laperle <malaperle>
Status: RESOLVED FIXED QA Contact: Andrew Gvozdev <angvoz.dev>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 8.0.1   
Target Milestone: 8.3.0   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 353719    

Description Marc-André Laperle CLA 2012-01-26 21:04:16 EST
1. Create a Cross GCC project, set a wrong prefix
2. Open the project properties, C/C++ Build, Settings, Cross Settings
3. Change prefix to the correct value, apply
4. Go to Discovery options. The "Compiler invocation command" is still set to the old one

Because of that, it's possible to have completely wrong includes and symbols.
Comment 1 Marc-André Laperle CLA 2012-01-26 21:23:51 EST
Andrew, this is also the case with "normal" GCC toolchains. The compiler
command can be changed in the build settings and the Scanner Discovery options
are not updated. I don't expect users to change the compiler command really
often for "normal" GCC but we could apply a similar solution for the Cross GCC
prefix and the compiler command in all GCC toolchains. I suggest that when the
values are different, an information line with a link is displayed below the
field:

(i) <-(info icon) The compiler command differs from the Compiler invocation
command in <link>Discovery options</link>

What do you think?
Comment 2 Andrew Gvozdev CLA 2012-01-27 07:48:12 EST
Yes, it is also valid case when scanner discovery command is different from that of compiler. A user can scan a file or run command remotely using ssh etc. Info message sounds as a valid option, other options could be a control such as a checkbox in scanner discovery options or popup question when changing compiler command.
Comment 3 Marc-André Laperle CLA 2013-10-16 01:07:29 EDT
Fixed by changing the Cross GCC toolchain to use a language setting provider. Done part of bug 392404.

https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=c644a857ba56c32171d4f5a738e19aea858f7faf