--- Python-3.6.1/Makefile.pre.in.orig 2017-06-13 18:47:49.722430000 +0200 +++ Python-3.6.1/Makefile.pre.in 2017-06-13 18:48:21.888269700 +0200 @@ -726,15 +726,15 @@ Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile -Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) +Programs/_freeze_importlib$(EXE): Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) -Python/importlib_external.h: @GENERATED_COMMENT@ $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib Python/marshal.c - ./Programs/_freeze_importlib \ +Python/importlib_external.h: @GENERATED_COMMENT@ $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib$(EXE) Python/marshal.c + ./Programs/_freeze_importlib$(EXE) \ $(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h -Python/importlib.h: @GENERATED_COMMENT@ $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib Python/marshal.c - ./Programs/_freeze_importlib \ +Python/importlib.h: @GENERATED_COMMENT@ $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib$(EXE) Python/marshal.c + ./Programs/_freeze_importlib$(EXE) \ $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h @@ -1626,7 +1626,7 @@ find build -name '*.py[co]' -exec rm -f {} ';' || true -rm -f pybuilddir.txt -rm -f Lib/lib2to3/*Grammar*.pickle - -rm -f Programs/_testembed Programs/_freeze_importlib + -rm -f Programs/_testembed Programs/_freeze_importlib$(EXE) -find build -type f -a ! -name '*.gc??' -exec rm -f {} ';' -rm -f Include/pydtrace_probes.h diff -Naur Python-3.5.2-orig/Programs/_freeze_importlib.c Python-3.5.2/Programs/_freeze_importlib.c --- Python-3.5.2-orig/Programs/_freeze_importlib.c 2016-06-26 00:38:38.000000000 +0300 +++ Python-3.5.2/Programs/_freeze_importlib.c 2016-07-12 14:22:31.403800700 +0300 @@ -20,7 +20,7 @@ {0, 0, 0} /* sentinel */ }; -#ifndef MS_WINDOWS +#ifndef _MSC_VER /* On Windows, this links with the regular pythonXY.dll, so this variable comes from frozen.obj. In the Makefile, frozen.o is not linked into this executable, so we define the variable here. */