From f41431022bff872cdf81bd640005963ff9061bc8 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Thu, 23 Nov 2017 14:18:06 +1100 Subject: [PATCH] windows: Allow "make menuconfig" to work if ming32 gcc is also installed Closes https://github.com/espressif/esp-idf/issues/1296 --- tools/kconfig/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/kconfig/Makefile b/tools/kconfig/Makefile index 6675294b79..2454e47af7 100644 --- a/tools/kconfig/Makefile +++ b/tools/kconfig/Makefile @@ -23,6 +23,22 @@ CFLAGS := CPPFLAGS := LDFLAGS := +# Workaround for a bug on Windows if the mingw32 host compilers +# are installed in addition to the MSYS ones. The kconfig tools +# need to be compiled using the MSYS compiler. +# +# See https://github.com/espressif/esp-idf/issues/1296 +ifdef MSYSTEM +ifeq ("$(MSYSTEM)", "MINGW32") +ifeq ("$(CC)", "cc") +CC := /usr/bin/gcc +endif +ifeq ("$(LD)", "ld") +LD := /usr/bin/ld +endif +endif # MING32 +endif # MSYSTEM + default: mconf conf xconfig: qconf