summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--mpy-cross/Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/mpy-cross/Makefile b/mpy-cross/Makefile
index 3d5e5da2f9..6ed4e653f8 100644
--- a/mpy-cross/Makefile
+++ b/mpy-cross/Makefile
@@ -49,10 +49,10 @@ SRC_C = \
main.c \
gccollect.c \
-ifeq ($(OS),Windows_NT)
- ifeq (,$(findstring MSYS,$(UNAME_S)))
- SRC_C += windows/fmode.c
- endif
+# Add fmode when compiling with mingw gcc
+COMPILER_TARGET := $(shell $(CC) -dumpmachine)
+ifneq (,$(findstring mingw,$(COMPILER_TARGET)))
+ SRC_C += windows/fmode.c
endif
OBJ = $(PY_O)