| Summary: | C/C++ GCC Cross Compiler support for dynamic libraries is broken | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | AK <kirsche40> | ||||||
| Component: | cdt-build-managed | Assignee: | Marc-André Laperle <malaperle> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Chris Recoskie <recoskie> | ||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | angvoz.dev, cdtdoug, malaperle, yevshif | ||||||
| Version: | 8.0 | ||||||||
| Target Milestone: | 8.0.2 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 353719 | ||||||||
| Attachments: |
|
||||||||
|
Description
AK
Hi Andrew (or Doug?), The wizard only asks for the compiler prefix and path when the "Cross-Compile Project" is selected. This is because a project template is used. I was thinking of removing the template and using a custom page instead that would be displayed anytime the Cross GCC toolchain is selected. That way, the UI won't be cluttered with additional project templates. Does that seem reasonable? Or is this too much of a departure to remove the project template? Thanks! Created attachment 209717 [details]
Use a custom page for Cross GCC toolchain
(In reply to comment #2) > Created attachment 209717 [details] > Use a custom page for Cross GCC toolchain If you ask me, I like it better that way. Shouldn't the custom page be presented before "Select Configuration"? I would think if you are creating cross-project you'd need that first, especially considering that UI does not remember the settings. If project templates don't support that user flow, too bad for the templates. Maybe we need to think about improving them. Take it with a grain of salt as I haven't used that toolchain before. (In reply to comment #3) > If you ask me, I like it better that way. Shouldn't the custom page be > presented before "Select Configuration"? Thanks for the feedback. From what I understand, only pages coming from templates can be displayed before CDTConfigWizardPage ("Select Configuration"), like the Hello world template. Custom pages are always after, like the XLC page and the custom page in this patch. I think it would be great if the custom pages could specify whether or not to be displayed before that page. But we could deal with this enhancement in another bug and fix the XLC page at the same time. > especially considering that UI does not remember the settings. Good catch, the Cross Compile template did remember the settings so I will look into remembering the settings for the custom page too. I'm redesigning the new project wizard. I'll make sure the Cross GCC template works as required here. (In reply to comment #5) > I'm redesigning the new project wizard. I'll make sure the Cross GCC template > works as required here. Ok, then maybe I'll drop the idea of removing the template and using a custom page since the wizard is being redesigned anyway. I was doing that to clean up the oddities in the current wizard but might as well go with the more conservative route and leave the big changes for CDT9/wizardageddon. Created attachment 210233 [details]
Reuse cross-compile template for shared, static library
This patch reuses the template for shared library and static library; it's much smaller than the previous patch. Since I would like this to be fixed in 8.0.2, I think this is more suitable because it doesn't do any drastic changes. Then in CDT 9 we can clean that up in the new wizard or if the new wizard doesn't happen, we can go with a custom page and make XLC work in the same fashion.
After applying the patch, Cross-compile Project appears under Shared Library and Static Library.
Please hold off on this. In the new scheme of things, we can do a better job of dealing with the cross gcc template. (In reply to comment #7) > Created attachment 210233 [details] > Reuse cross-compile template for shared, static library > > This patch reuses the template for shared library and static library; it's much > smaller than the previous patch. Since I would like this to be fixed in 8.0.2, > I think this is more suitable because it doesn't do any drastic changes. Then > in CDT 9 we can clean that up in the new wizard or if the new wizard doesn't > happen, we can go with a custom page and make XLC work in the same fashion. > > After applying the patch, Cross-compile Project appears under Shared Library > and Static Library. Or at least apply this to 8.0 only. (In reply to comment #9) > Or at least apply this to 8.0 only. Ok, patch applied to 8.0.2 only. I'll keep this opened until it's fixed on master. I applied the patch that uses a custom page to master with a minor change: It nows loads and saves default settings using SharedDefaults (like templates do), this also provides backward compatibility for defaults were already saved with the template. So with this change, users can select any project type that is compatible with the toolchain (Exec/Empty, Exec/Hello world, Static/Empty, Shared/Empty), select the Cross toolchain and still get the Cross compile page in the wizard. In previous versions, in was possible to select some combinations and not get the page: Exec/Empty project, Static/Empty, Shared/Empty. I also made it so that the Cross compile page needs to be visited. The changes reduce clutter and should make the Cross toolchain less error prone which will hopefully help bug 353719. |