]> granicus.if.org Git - esp-idf/commitdiff
Toolchain detection: Allow for Windows executable name and not-yet-configured toolcha...
authorAngus Gratton <angus@espressif.com>
Fri, 13 Jan 2017 02:48:33 +0000 (13:48 +1100)
committerAngus Gratton <angus@espressif.com>
Fri, 13 Jan 2017 02:55:26 +0000 (13:55 +1100)
Windows executable name based on fix suggested by @krzysztof

make/project.mk

index d30d007dc5415f8af953afcafbaf0e1248adf9a2..3de9361c82198427dd695cd1ebbb9c218c9e6b70 100644 (file)
@@ -429,22 +429,26 @@ $(foreach submodule,$(subst $(IDF_PATH)/,,$(filter $(IDF_PATH)/%,$(COMPONENT_SUB
 # The part in brackets is extracted into TOOLCHAIN_COMMIT_DESC variable,
 # the part after the brackets is extracted into TOOLCHAIN_GCC_VER.
 ifndef MAKE_RESTARTS
-TOOLCHAIN_COMMIT_DESC := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf-gcc\ \(([^)]*).*|\1|gp')
-TOOLCHAIN_GCC_VER := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf-gcc\ \(.*\)\ (.*)|\1|gp')
+TOOLCHAIN_COMMIT_DESC := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf-gcc.*?\ \(([^)]*).*|\1|gp')
+TOOLCHAIN_GCC_VER := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf-gcc.*?\ \(.*\)\ (.*)|\1|gp')
 
 # Officially supported version(s)
 SUPPORTED_TOOLCHAIN_COMMIT_DESC := crosstool-NG crosstool-ng-1.22.0-61-gab8375a
 SUPPORTED_TOOLCHAIN_GCC_VERSIONS := 5.2.0
 
+ifdef TOOLCHAIN_COMMIT_DESC
 ifneq ($(TOOLCHAIN_COMMIT_DESC), $(SUPPORTED_TOOLCHAIN_COMMIT_DESC))
 $(info WARNING: Toolchain version is not supported: $(TOOLCHAIN_COMMIT_DESC))
 $(info Expected to see version: $(SUPPORTED_TOOLCHAIN_COMMIT_DESC))
 $(info Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.)
 endif
 ifeq (,$(findstring $(TOOLCHAIN_GCC_VER), $(SUPPORTED_TOOLCHAIN_GCC_VERSIONS)))
-$(warning WARNING: Compiler version is not supported: $(TOOLCHAIN_GCC_VER))
+$(info WARNING: Compiler version is not supported: $(TOOLCHAIN_GCC_VER))
 $(info Expected to see version(s): $(SUPPORTED_TOOLCHAIN_GCC_VERSIONS))
 $(info Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.)
 endif
-endif #MAKE_RESTARTS 
+else
+$(info WARNING: Failed to find Xtensa toolchain, may need to alter PATH or set one in the configuration menu)
+endif # TOOLCHAIN_COMMIT_DESC
+endif #MAKE_RESTARTS