-
Notifications
You must be signed in to change notification settings - Fork 3k
Tools: Check compiler version #7247
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
Conversation
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.
LGTM!
So even though this is technically enforcing something that we should already be checking, therefore making it a fix, because this has the potential to stir up a whole bunch of commotion if it comes into a patch release, I'm marking this as for coming in during the next feature release. @ARMmbed/mbed-os-maintainers Thoughts? |
/morph build |
Build : SUCCESSBuild number : 2374 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 2007 |
Test : SUCCESSBuild number : 2163 |
/morph uvisor-test |
1 similar comment
/morph uvisor-test |
👍 for having the version checked - we have them documented so issues reported are with tools we use and test.
Definitely minor fix. |
Are we sure that should be an error not warning? |
tools/toolchains/gcc.py
Outdated
if match: | ||
found_version = match.group(0) | ||
if found_version and not found_version.startswith(self.GCC_MAJOR + "."): | ||
raise NotSupportedException( |
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.
Do we really want to fail the build? Perhaps noticeable warning message will be sufficient?
Have you considered using LooseVersion
from distutils.version
package?
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.
LooseVersion is a good suggestion. I'll take a look.
@alzix It now uses version ranges with Everyone: It should now display an error, and keep compiling. |
@theotherjimmy I'm of the opinion that a warning could go into a patch, since it wouldn't lead to breaking changes for users. @ARMmbed/mbed-os-maintainers Any objections? |
/morph build |
Build : ABORTEDBuild number : 2391 |
ff26bd6
to
c273de6
Compare
Tests in. Many bugs prevented. |
LGTM |
/morph build |
Build : SUCCESSBuild number : 2456 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 2086 |
Test : SUCCESSBuild number : 2233 |
Just wondering if there is any particular reason for using ARM GCC version 6? I've been using ARM GCC version 7 but for no particular reason. Coincidentally ARM GCC V7 2018 q2 update was released yesterday. So with this change I get an error:
My guess is that updating to V7 is just a matter of time and inclination on your behalf. No doubt updating your infrastructure and testing every target is pretty tedious. I'm wondering whether to ignore your error; I've got no issues on STM32L4. Or to play safe and consistent and go back to V6?? Interestingly V6 uses more flash, 5888 bytes, and RAM, 198 bytes, than V7. |
We update it from time to time. @ARMmbed/mbed-os-tools might know more about upcoming version bump From our experience, we identified few bugs using different major (sometimes even minor version bumps) versions. It can happen that you face a bug that we can't reproduce (different tools used). Also consider that there are some precompiled binaries in the tree that are used with specific toolchain version. I would suggest to stay within the version specified as supported (if there are not any specific reason for v7).
I would like to know more about this, how the diff can be that big, what has changed with the update. |
I wondered if the difference would diminish in a release build, but apparently not. The following is from a release build for STM32L4. 6 2017-q2-update:
7 2017-q4-major:
Difference:
I highlighted I wonder if there is a significant default flag change but I haven't looked at the compiler release notes and, while I find this interesting, I've got more important things to be doing! We shall probably follow your advice and use the supported compiler. |
@mattbrown015 Interesting. Could you open an issue against the Mbed OS repo about this so that we can capture it? To your question, the intention of this PR was to notify users that we have a specific set/range of compiler versions that we support (in that we actively test and fix issues for). That's not to say that newer and/or older versions of compilers won't work, but to say so without being in a place to continuously say that that is the case without having the backend systems in place would be irrisponsible.
I think that depends on how much support you end up needing. We're not in a place to be able to help you if you're using an unsupported compiler, however since it sounds like things are still working fine for you, I'd suggest sticking to what you have now unless something breaks.
We're actually actively looking into enabling v6 in the least distupive manner as possible.
I'm not terribly surprised about this since I would expect a newer compiler version to have more optimizations. No idea what the specifics might be though. |
For what it's worth,
That's exactly the conversation we intend to happen! Now @mattbrown015 knows that he's taking a risk by using a compiler version that we don't test with. |
Description
In the past, we allowed any version of any toolchain. That will be a
problem if/when we upgrade to ARM Compiler 5.10 or IAR 8. This PR
has the tools enforce the version of the compiler on
mbed compile
,preventing any issues with compiler version
Pull request type