File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -954,9 +954,9 @@ BOOTSTRAP_HEADERS = \
954
954
955
955
Programs/_bootstrap_python.o: Programs/_bootstrap_python.c $(BOOTSTRAP_HEADERS) $(PYTHON_HEADERS)
956
956
957
- _bootstrap_python: $(LIBRARY_OBJS_OMIT_FROZEN) Programs/_bootstrap_python.o Modules/getpath .o Modules/Setup.local
957
+ _bootstrap_python: $(LIBRARY_OBJS_OMIT_FROZEN) Programs/_bootstrap_python.o Modules/getpath_bootstrap .o Modules/Setup.local
958
958
$(LINKCC) $(PY_LDFLAGS_NOLTO) -o $@ $(LIBRARY_OBJS_OMIT_FROZEN) \
959
- Programs/_bootstrap_python.o Modules/getpath .o $(LIBS) $(MODLIBS) $(SYSLIBS)
959
+ Programs/_bootstrap_python.o Modules/getpath_bootstrap .o $(LIBS) $(MODLIBS) $(SYSLIBS)
960
960
961
961
############################################################################
962
962
# Deepfreeze targets
@@ -1205,6 +1205,18 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Python/frozen_modules/getpath.h M
1205
1205
-DPLATLIBDIR='"$(PLATLIBDIR)"' \
1206
1206
-o $@ $(srcdir)/Modules/getpath.c
1207
1207
1208
+ # like getpath.o with additional -DPY_BOOTSTRAP_PYTHON=1
1209
+ Modules/getpath_bootstrap.o: $(srcdir)/Modules/getpath.c Python/frozen_modules/getpath.h Makefile $(PYTHON_HEADERS)
1210
+ $(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
1211
+ -DPREFIX='"$(prefix)"' \
1212
+ -DEXEC_PREFIX='"$(exec_prefix)"' \
1213
+ -DVERSION='"$(VERSION)"' \
1214
+ -DVPATH='"$(VPATH)"' \
1215
+ -DPLATLIBDIR='"$(PLATLIBDIR)"' \
1216
+ -DPY_BOOTSTRAP_PYTHON=1 \
1217
+ -o $@ $(srcdir)/Modules/getpath.c
1218
+
1219
+
1208
1220
Programs/python.o: $(srcdir)/Programs/python.c
1209
1221
$(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/python.c
1210
1222
Original file line number Diff line number Diff line change @@ -754,7 +754,8 @@ library_to_dict(PyObject *dict, const char *key)
754
754
if (PyWin_DLLhModule ) {
755
755
return winmodule_to_dict (dict , key , PyWin_DLLhModule );
756
756
}
757
- #elif defined(WITH_NEXT_FRAMEWORK )
757
+ #elif defined(WITH_NEXT_FRAMEWORK ) && !defined(PY_BOOTSTRAP_PYTHON )
758
+ // _bootstrap_python does not use framework and crashes
758
759
static const char modPath [MAXPATHLEN + 1 ];
759
760
static int modPathInitialized = -1 ;
760
761
if (modPathInitialized < 0 ) {
You can’t perform that action at this time.
0 commit comments