Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350499 - Changing C/C++ project toolchain away from Cross GCC loses Cross GCC option settings.
Summary: Changing C/C++ project toolchain away from Cross GCC loses Cross GCC option s...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build-managed (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 10.3.0   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-27 16:26 EDT by William Swanson CLA
Modified: 2021-04-25 11:27 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Swanson CLA 2011-06-27 16:26:17 EDT
Build Identifier: M20110210-1200

Seen on Eclipse 3.6.2, with CDT 7.0.2 and the crossgcc plugin version 1.0.0.201103141311 installed.

To reproduce,
- create a C or C++ project with the "Cross GCC" toolchain selected,
and fill in the "prefix" and "path" Cross GCC options.
- in the project properties dialog, go to the Settings page and confirm the options are set
- now go to the Toolchain page, and change the toolchain to anything other
than Cross GCC.
- on the Settings page, the Cross GCC fields are now blank, and one cannot recover their values even if one switches back to the Cross GCC toolchain.

While it's true in general that toolchain options are reset to the defaults when switching toolchains, the Cross GCC options are a special case because they define the cross-build toolchain being used. Silently losing their values can cause a project to start building incorrectly for no obvious reason.

The particular case in mind is where the Cross GCC options are generated by a wizard: if a curious user happens to go into the Toolchain page and experiment with changing the toolchain, they can unwittingly lose information that may be non-trivial for them to recreate, and not even be aware they've done so.

Possible resolutions: either preserve the Cross GCC options in the project metadata even if they are not used by the current toolchain, so they can be redisplayed, or at least display a warning when the user edits the toolchain that doing so will reset the Settings page to the default values for the new toolchain, and may make their project no longer build correctly.


Reproducible: Always
Comment 1 Eclipse Genie CLA 2021-04-24 05:21:16 EDT
New Gerrit change created: https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/179786