* Initial python-3.7 port * python3: Add setup.config.in to remove before patching * python3: Implement setenv for mingw. Fix building with NT threads. Build with unicode * Fix typos * Fix linking core modules * Mingw build have exec_prefix * Remove deprecated patch * Fix building python and modules. Failing to build readline module and install not working yet * More getpath changes and more aggressive path separator conversion * Fix readline module compilation and linking errors * python3: By default building with posix threads, NT threads are broken. Some patches optimization. First buildable commit * Py_DecodeLocale handle char, not wchar * Fix building multiprocessing module with posix threads
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-06-30 11:16:06.703405400 +0300
|
|
+++ Python-3.7.0/configure.ac 2018-06-30 11:16:06.999806000 +0300
|
|
@@ -2607,6 +2607,9 @@
|
|
CYGWIN*) SHLIB_SUFFIX=.dll;;
|
|
*) SHLIB_SUFFIX=.so;;
|
|
esac
|
|
+ case $host_os in
|
|
+ mingw*) SHLIB_SUFFIX=.dll;;
|
|
+ esac
|
|
fi
|
|
AC_MSG_RESULT($SHLIB_SUFFIX)
|
|
|
|
@@ -3634,6 +3637,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"
|
|
@@ -4850,6 +4859,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-06-30 11:15:34.367348400 +0300
|
|
+++ Python-3.7.0/Makefile.pre.in 2018-06-30 11:16:07.015406000 +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-06-30 11:16:07.015406000 +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 */
|
|
|