| diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac |
| --- Python-3.8.0-orig/configure.ac 2019-10-22 10:01:20.201777600 +0300 |
| +++ Python-3.8.0/configure.ac 2019-10-22 10:01:21.340579600 +0300 |
| @@ -2635,6 +2635,9 @@ |
| CYGWIN*) SHLIB_SUFFIX=.dll;; |
| *) SHLIB_SUFFIX=.so;; |
| esac |
| + case $host_os in |
| + mingw*) SHLIB_SUFFIX=.dll;; |
| + esac |
| fi |
| AC_MSG_RESULT($SHLIB_SUFFIX) |
| |
| @@ -3677,6 +3680,12 @@ |
| fi |
| ;; |
| esac |
| + case $host in |
| + *-*-mingw*) |
| + DYNLOADFILE="dynload_win.o" |
| + extra_machdep_objs="$extra_machdep_objs PC/dl_nt.o" |
| + ;; |
| + esac |
| fi |
| AC_MSG_RESULT($DYNLOADFILE) |
| if test "$DYNLOADFILE" != "dynload_stub.o" |
| @@ -4837,6 +4846,12 @@ |
| *) |
| EXT_SUFFIX=${SHLIB_SUFFIX};; |
| esac |
| +case $host_os in |
| + mingw*) |
| + dnl Synchronized with _PyImport_DynLoadFiletab (dynload_win.c) |
| + dnl Do not use more then one dot on this platform ! |
| + EXT_SUFFIX=-$SOABI$SHLIB_SUFFIX;; |
| +esac |
| |
| AC_MSG_CHECKING(LDVERSION) |
| LDVERSION='$(VERSION)$(ABIFLAGS)' |
| diff -Naur Python-3.8.0-orig/Makefile.pre.in Python-3.8.0/Makefile.pre.in |
| --- Python-3.8.0-orig/Makefile.pre.in 2019-10-22 10:00:29.734688900 +0300 |
| +++ Python-3.8.0/Makefile.pre.in 2019-10-22 10:01:21.746180300 +0300 |
| @@ -784,6 +784,12 @@ |
| -DSHLIB_EXT='"$(EXT_SUFFIX)"' \ |
| -o $@ $(srcdir)/Python/dynload_hpux.c |
| |
| +Python/dynload_win.o: $(srcdir)/Python/dynload_win.c Makefile |
| + $(CC) -c $(PY_CORE_CFLAGS) \ |
| + -DSHLIB_SUFFIX='"$(SHLIB_SUFFIX)"' \ |
| + -DEXT_SUFFIX='"$(EXT_SUFFIX)"' \ |
| + -o $@ $(srcdir)/Python/dynload_win.c |
| + |
| Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile $(srcdir)/Include/pydtrace.h |
| $(CC) -c $(PY_CORE_CFLAGS) \ |
| -DABIFLAGS='"$(ABIFLAGS)"' \ |
| diff -Naur Python-3.8.0-orig/Python/dynload_win.c Python-3.8.0/Python/dynload_win.c |
| --- Python-3.8.0-orig/Python/dynload_win.c 2019-10-14 16:34:47.000000000 +0300 |
| +++ Python-3.8.0/Python/dynload_win.c 2019-10-22 10:01:22.151781000 +0300 |
| @@ -33,6 +33,12 @@ |
| #define PYD_UNTAGGED_SUFFIX PYD_DEBUG_SUFFIX ".pyd" |
| |
| const char *_PyImport_DynLoadFiletab[] = { |
| +#ifdef EXT_SUFFIX |
| + EXT_SUFFIX, /* include SOABI flags where is encoded debug */ |
| +#endif |
| +#ifdef SHLIB_SUFFIX |
| + "-abi" PYTHON_ABI_STRING SHLIB_SUFFIX, |
| +#endif |
| PYD_TAGGED_SUFFIX, |
| PYD_UNTAGGED_SUFFIX, |
| NULL |
| @@ -203,8 +209,7 @@ |
| ensure DLLs adjacent to the PYD are preferred. */ |
| Py_BEGIN_ALLOW_THREADS |
| hDLL = LoadLibraryExW(wpathname, NULL, |
| - LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | |
| - LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR); |
| + LOAD_WITH_ALTERED_SEARCH_PATH); |
| Py_END_ALLOW_THREADS |
| #if HAVE_SXS |
| _Py_DeactivateActCtx(cookie); |