81 lines
2.4 KiB
Diff
81 lines
2.4 KiB
Diff
diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac
|
|
--- Python-3.7.0-orig/configure.ac 2018-07-12 10:21:07.175928700 +0300
|
|
+++ Python-3.7.0/configure.ac 2018-07-12 10:21:07.519129300 +0300
|
|
@@ -2617,6 +2617,9 @@
|
|
CYGWIN*) SHLIB_SUFFIX=.dll;;
|
|
*) SHLIB_SUFFIX=.so;;
|
|
esac
|
|
+ case $host_os in
|
|
+ mingw*) SHLIB_SUFFIX=.dll;;
|
|
+ esac
|
|
fi
|
|
AC_MSG_RESULT($SHLIB_SUFFIX)
|
|
|
|
@@ -3644,6 +3647,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"
|
|
@@ -4860,6 +4869,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.7.0-orig/Makefile.pre.in Python-3.7.0/Makefile.pre.in
|
|
--- Python-3.7.0-orig/Makefile.pre.in 2018-07-12 10:20:43.495087100 +0300
|
|
+++ Python-3.7.0/Makefile.pre.in 2018-07-12 10:21:07.519129300 +0300
|
|
@@ -791,6 +791,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
|
|
$(CC) -c $(PY_CORE_CFLAGS) \
|
|
-DABIFLAGS='"$(ABIFLAGS)"' \
|
|
diff -Naur Python-3.7.0-orig/Python/dynload_win.c Python-3.7.0/Python/dynload_win.c
|
|
--- Python-3.7.0-orig/Python/dynload_win.c 2018-06-27 06:07:35.000000000 +0300
|
|
+++ Python-3.7.0/Python/dynload_win.c 2018-07-12 10:21:07.534729300 +0300
|
|
@@ -33,11 +33,21 @@
|
|
#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
|
|
};
|
|
|
|
+#if defined(__MINGW32__)
|
|
+/* avoid compile error: conflicting types for 'strcasecmp' */
|
|
+# define strcasecmp fake_strcasecmp
|
|
+#endif
|
|
/* Case insensitive string compare, to avoid any dependencies on particular
|
|
C RTL implementations */
|
|
|