-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
GCC compilers version 8 or newer are highly recommended. #2155
Conversation
Sming/build.mk
Outdated
GCC_MIN_MAJOR_VERSION = 8 | ||
GCC_VERSION_COMPATIBLE := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= $(GCC_MIN_MAJOR_VERSION)) | ||
|
||
ifeq ($(GCC_VERSION_COMPATIBLE),0) | ||
$(warning ***** Please, upgrade your GCC compiler to version $(GCC_MIN_MAJOR_VERSION) or newer *************) | ||
ifneq ($(GCC_UPGRADE_URL),) | ||
$(info Instructions for upgrading your compiler can be found here: $(GCC_UPGRADE_URL)) | ||
endif | ||
endif |
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.
How about:
GCC_MIN_VERSION := "8.0"
GCC_VERSION_COMPATIBLE := $(shell expr "$(GCC_VERSION)" ">=" "$(GCC_MIN_VERSION)")
ifeq ($(GCC_VERSION_COMPATIBLE),0)
$(warning ***** Please, upgrade your GCC compiler to version $(GCC_MIN_VERSION) or newer *************)
ifneq ($(GCC_UPGRADE_URL),)
$(info Instructions for upgrading your compiler can be found here: $(GCC_UPGRADE_URL))
endif
endif
https://stackoverflow.com/questions/42419301/makefile-emit-warning-gcc-version-is-lower-than-4-8-0
|
||
- produce smaller and better code | ||
- have features which improve code quality, easy of use, etc. | ||
|
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.
Bug fixes!
@@ -40,6 +40,8 @@ OBJCOPY := $(TOOLSPEC)objcopy | |||
OBJDUMP := $(TOOLSPEC)objdump | |||
GDB := $(TOOLSPEC)gdb | |||
|
|||
GCC_UPGRADE_URL := https://sming.readthedocs.io/en/latest/arch/esp8266/getting-started/eqt.html |
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.
Should we also update the 'pre-release' note on this page? I've yet to find any issues with it :-)
@mikee47 Recommended changes were applied. Something else to add to this PR? |
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.
Great, thanks slaff. I know there have been further updates to the esp-quick-toolchain since we introduced it but seems pretty solid to me! At some point we should take a look at what's changed.
Absolutely! Up to now there are only pre-release versions between |
i have a version 10 compiler this makefile; prints: GCC_VERSION=10 |
@frankdownunder Go to the application that you are trying to compile and type
Then paste here the whole output. |
It's because the comparison is lexical, "1" < "8". Need to strip out everything but the major part then compare numerically i.e. |
@frankdownunder Can you test if this PR: #2172 is fixing the problem? |
Start warning when older compiler is used.
Middle of 2021 we should enforce the usage of newer compilers only.