-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set tool prefix for spawning GNU tool processes #368
Conversation
b9a3c24
to
c3daec5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this John!
I see that you are handling the prefix here and I think that the path is handled with the environment provider, but would it make sense to also expose the path using a build variable?
....cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossBuildMacroSupplier.java
Outdated
Show resolved
Hide resolved
core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/DefaultGnuToolFactory.java
Outdated
Show resolved
Hide resolved
@@ -32,7 +34,7 @@ | |||
targetTool="cdt.managedbuild.tool.gnu.cross.c.linker;cdt.managedbuild.tool.gnu.cross.cpp.linker;cdt.managedbuild.tool.gnu.archiver"> | |||
<targetPlatform | |||
archList="all" | |||
binaryParser="org.eclipse.cdt.core.ELF" | |||
binaryParser="org.eclipse.cdt.core.GNU_ELF" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the binary parser attribute is written out in the .cproject file of every created project.
While this in general would be good, for this particular change, it looks like all the existing projects will be stuck on org.eclipse.cdt.core.ELF until a manual change is done. Do you have any idea how to automatically migrate existing projects to the org.eclipse.cdt.core.GNU_ELF parser instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will think about this. Perhaps as a separate issue. It is easy to switch the active binary parser in the CDT project settings UI.
Do you think there could be any reason why someone would NOT wish to update their parser? I think it would be wise to prompt for confirmation if we decide to proceed.
Cc: @jonahgraham
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now, I do not see any reason why you would not want that.
Maybe we should invert the question and rather ask us why anyone would like to use the org.eclipse.cdt.core.ELF parser in the first place and if we have no clear answer to that, perhaps the org.eclipse.cdt.core.ELF and org.eclipse.cdt.core.GNU_ELF should be the same parser from now on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are, of course, non-GNU toolchains that generate ELF executable files. At present, the existence of the ELF parser and the GNU_ELF parser allows common code to determine whether use of GNU tools such as objcopy
should be attempted. In theory, an extender could integrate equivalent non-GNU tools.
@Torbjorn-Svensson, a toolchain can end up on the |
Allows the GNU tool prefix to be specified by a CDT build variable. Modifies the Cross GCC toolchain description to provide the GNU tool prefix. Part of eclipse-cdt#361
c3daec5
to
d06f55b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than 2 more places of the "null" part being on the left side (that I do not really care about), I think this looks good.
Thank you for the helpful reviews, @Torbjorn-Svensson. Perhaps we can discuss automatic update of the binary parser in legacy projects on the next CDT project call. |
Your welcome John! :) @jonahgraham, can you add this item to the next monthly call? |
Allows the GNU tool prefix to be specified by a CDT build variable.
Modifies the Cross GCC toolchain description to provide the GNU tool prefix.
Part of #361