From 5c9c08eabb88de10a220ef7458bfc7a4093367a9 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Fri, 13 Jan 2017 14:09:01 +1100 Subject: [PATCH] Toolchain detection: Fix issue when run in a clean project If the makefile config entry hasn't been generated yet, don't test the toolchain. Closes #226 https://github.com/espressif/esp-idf/issues/226 --- make/project.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/make/project.mk b/make/project.mk index 3de9361c82..c4c3022a6b 100644 --- a/make/project.mk +++ b/make/project.mk @@ -428,6 +428,7 @@ $(foreach submodule,$(subst $(IDF_PATH)/,,$(filter $(IDF_PATH)/%,$(COMPONENT_SUB # xtensa-esp32-elf-gcc (crosstool-NG crosstool-ng-1.22.0-59-ga194053) 4.8.5 # The part in brackets is extracted into TOOLCHAIN_COMMIT_DESC variable, # the part after the brackets is extracted into TOOLCHAIN_GCC_VER. +ifdef CONFIG_TOOLPREFIX 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') @@ -450,5 +451,6 @@ endif 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 +endif #MAKE_RESTARTS +endif #CONFIG_TOOLPREFIX