summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/Python-2.6.1-mingw.patch6
-rw-r--r--python/makefile.mk3
2 files changed, 8 insertions, 1 deletions
diff --git a/python/Python-2.6.1-mingw.patch b/python/Python-2.6.1-mingw.patch
index 63067227c112..26bc4cbd0648 100644
--- a/python/Python-2.6.1-mingw.patch
+++ b/python/Python-2.6.1-mingw.patch
@@ -1,6 +1,6 @@
--- misc/Python-2.6.1/Include/pyport.h 2008-06-11 16:41:16.000000000 +0900
+++ misc/build/Python-2.6.1/Include/pyport.h 2009-03-29 23:28:13.859000000 +0900
-@@ -3,6 +3,26 @@
+@@ -3,6 +3,30 @@
#include "pyconfig.h" /* include for defines */
@@ -9,6 +9,7 @@
+#undef HAVE_OPENPTY
+#undef HAVE_DEV_PTMX
+#undef _POSIX_THREADS
++#undef HAVE_PTHREAD_H
+#define MS_WINDOWS
+#define MS_WIN32
+#define Py_WIN_WIDE_FILENAMES
@@ -18,6 +19,9 @@
+#define NT_THREADS
+#define WITH_THREAD
+#define WINVER 0x0501
++#ifdef socklen_t
++#undef socklen_t
++#endif
+#define HAVE_ADDRINFO
+#define HAVE_GETADDRINFO
+#define HAVE_GETNAMEINFO
diff --git a/python/makefile.mk b/python/makefile.mk
index a84fccb6c9fc..663a5604603d 100644
--- a/python/makefile.mk
+++ b/python/makefile.mk
@@ -95,6 +95,9 @@ BUILD_DIR=
MYCWD=$(shell cygpath -m $(shell @pwd))/$(INPATH)/misc/build
python_CFLAGS=-mno-cygwin -mthreads
python_LDFLAGS=-mno-cygwin -mthreads
+.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
+python_LDFLAGS+=-shared-libgcc
+.ENDIF
CONFIGURE_ACTION=./configure --prefix=$(MYCWD)/python-inst --enable-shared CC="$(CC:s/guw.exe //)" CXX="$(CXX:s/guw.exe //)" MACHDEP=MINGW32 LN="cp -p" CFLAGS="$(python_CFLAGS)" LDFLAGS="$(python_LDFLAGS)"
BUILD_ACTION=$(ENV_BUILD) make ; make install
.ELSE