improved plugin & associated makefile for recent target toolchains #411
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey guys,
I faced issues when compiling your tree with more recent target toolchains (the ones embedded in the tree are 5.4+). I know you don't propose recent toolchains directly, but this will help in later upgrades & does not break your code.
I found that the right way to include the plugin development headers is now #include <gcc-plugin.h>
For portability reason, I introduce a -DTARGET_CXX_VERSION= flag, which in the original case will equal 5, but for instance might equal 8 if I point to a newer toolchain.
That is why I modify #include <plugin.h> in nexmon.c if necessary
In newer toolchains the 'attribute_specs' structure has new attributes, which causes the previous construction to fail because the ordering is no longer respected. Therefore I also propose a reordering, if necessary