mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] Update Python-3.1.4 to 3.4.2
@ 2014-11-28 12:38 Pim Klanke
  0 siblings, 0 replies; only message in thread
From: Pim Klanke @ 2014-11-28 12:38 UTC (permalink / raw)
  To: ptxdist; +Cc: m.olbrich, mkl, Pim Klanke, han

From: Han Sierkstra <han@protonic.nl>
Signed-off-by: Pim Klanke <pim@protonic.nl>
---
 ...-for-socketcan-to-the-python-socket-modul.patch | 224 ---------------------
 patches/Python-3.1.4/0002-printf-format-zd.patch   |  50 -----
 ...-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch |  59 ------
 ...K_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch |  36 ----
 ..._LONG_DOUBLE-to-detect-long-double-suppor.patch |  35 ----
 ...K_SIZEOF-rather-than-handcrafted-test-wit.patch | 106 ----------
 patches/Python-3.1.4/0007-fix-silent-flag.patch    |  28 ---
 patches/Python-3.1.4/0008-use-PGEN_FOR_BUILD.patch |  33 ---
 .../0009-introduce-and-use-PYTHON_FOR_BUILD.patch  | 180 -----------------
 ...tils-introduce-and-use-EXECUTABLE_DIRNAME.patch |  64 ------
 ...n-t-leak-host-path-into-cross-compilation.patch |  87 --------
 ...y-skip-import-check-while-cross-compiling.patch |  27 ---
 .../0013-add-cross-compilation-support.patch       | 141 -------------
 .../0014-provide-wrapper-for-cross-python.patch    |  46 -----
 .../0015-0017-fix-for-new-autoconf.diff.patch      |  23 ---
 .../0016-0018-dont-add-rpaths.diff.patch           |  28 ---
 ...-add-cache-variable-for-sem_getvalue-test.patch |  45 -----
 ...on-buggy-getaddrinfo-when-cross-compiling.patch |  24 ---
 ...sting-LD_LIBRARY_PATH-during-make-not-dur.patch |  25 ---
 patches/Python-3.1.4/autogen.sh                    |  14 --
 patches/Python-3.1.4/series                        |  22 --
 ...n-t-leak-host-path-into-cross-compilation.patch |  27 +++
 rules/host-python3.make                            |   5 +-
 rules/python3.make                                 |  69 ++-----
 24 files changed, 46 insertions(+), 1352 deletions(-)
 delete mode 100644 patches/Python-3.1.4/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
 delete mode 100644 patches/Python-3.1.4/0002-printf-format-zd.patch
 delete mode 100644 patches/Python-3.1.4/0003-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch
 delete mode 100644 patches/Python-3.1.4/0004-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
 delete mode 100644 patches/Python-3.1.4/0005-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
 delete mode 100644 patches/Python-3.1.4/0006-use-AC_CHECK_SIZEOF-rather-than-handcrafted-test-wit.patch
 delete mode 100644 patches/Python-3.1.4/0007-fix-silent-flag.patch
 delete mode 100644 patches/Python-3.1.4/0008-use-PGEN_FOR_BUILD.patch
 delete mode 100644 patches/Python-3.1.4/0009-introduce-and-use-PYTHON_FOR_BUILD.patch
 delete mode 100644 patches/Python-3.1.4/0010-distutils-introduce-and-use-EXECUTABLE_DIRNAME.patch
 delete mode 100644 patches/Python-3.1.4/0011-setup.py-don-t-leak-host-path-into-cross-compilation.patch
 delete mode 100644 patches/Python-3.1.4/0012-setup.py-skip-import-check-while-cross-compiling.patch
 delete mode 100644 patches/Python-3.1.4/0013-add-cross-compilation-support.patch
 delete mode 100644 patches/Python-3.1.4/0014-provide-wrapper-for-cross-python.patch
 delete mode 100644 patches/Python-3.1.4/0015-0017-fix-for-new-autoconf.diff.patch
 delete mode 100644 patches/Python-3.1.4/0016-0018-dont-add-rpaths.diff.patch
 delete mode 100644 patches/Python-3.1.4/0017-add-cache-variable-for-sem_getvalue-test.patch
 delete mode 100644 patches/Python-3.1.4/0018-assume-non-buggy-getaddrinfo-when-cross-compiling.patch
 delete mode 100644 patches/Python-3.1.4/0019-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
 delete mode 100755 patches/Python-3.1.4/autogen.sh
 delete mode 100644 patches/Python-3.1.4/series
 create mode 100644 patches/Python-3.4.2/0001-don-t-leak-host-path-into-cross-compilation.patch

diff --git a/patches/Python-3.1.4/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch b/patches/Python-3.1.4/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
deleted file mode 100644
index 52a1e2e..0000000
--- a/patches/Python-3.1.4/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
+++ /dev/null
@@ -1,224 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Tue, 5 May 2009 15:17:20 +0200
-Subject: [PATCH] Add support for socketcan to the python socket module
-
-This patch add support for the protocol family AF_CAN. It contains all the
-necessary code to use the python socket module for socketcan.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- Lib/plat-linux2/IN.py  |  2 ++
- Modules/socketmodule.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++
- Modules/socketmodule.h | 11 +++++++
- configure.in           | 13 ++++++++
- 4 files changed, 115 insertions(+)
-
-diff --git a/Lib/plat-linux2/IN.py b/Lib/plat-linux2/IN.py
-index d7d3002..2e776e4 100644
---- a/Lib/plat-linux2/IN.py
-+++ b/Lib/plat-linux2/IN.py
-@@ -384,6 +384,7 @@ PF_SNA = 22
- PF_IRDA = 23
- PF_PPPOX = 24
- PF_WANPIPE = 25
-+PF_CAN = 29
- PF_BLUETOOTH = 31
- PF_MAX = 32
- AF_UNSPEC = PF_UNSPEC
-@@ -414,6 +415,7 @@ AF_SNA = PF_SNA
- AF_IRDA = PF_IRDA
- AF_PPPOX = PF_PPPOX
- AF_WANPIPE = PF_WANPIPE
-+AF_CAN = PF_CAN
- AF_BLUETOOTH = PF_BLUETOOTH
- AF_MAX = PF_MAX
- SOL_RAW = 255
-diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
-index 5e911e0..cdf095a 100644
---- a/Modules/socketmodule.c
-+++ b/Modules/socketmodule.c
-@@ -419,6 +419,10 @@ dup_socket(SOCKET handle)
- 
- #define SAS2SA(x)       ((struct sockaddr *)(x))
- 
-+#ifdef ENABLE_CAN
-+#include <linux/can/raw.h>
-+#endif
-+
- /*
-  * Constants for getnameinfo()
-  */
-@@ -1006,6 +1010,22 @@ makesockaddr(SOCKET_T sockfd, struct sockaddr *addr, size_t addrlen, int proto)
-     }
- #endif
- 
-+#ifdef ENABLE_CAN
-+    case AF_CAN:
-+    {
-+        struct sockaddr_can *a = (struct sockaddr_can *)addr;
-+        char *ifname = "";
-+        struct ifreq ifr;
-+        /* need to look up interface name give index */
-+        if (a->can_ifindex) {
-+            ifr.ifr_ifindex = a->can_ifindex;
-+            if (ioctl(sockfd, SIOCGIFNAME, &ifr) == 0)
-+                ifname = ifr.ifr_name;
-+        }
-+        return Py_BuildValue("s", ifname);
-+    }
-+#endif
-+
- #ifdef USE_BLUETOOTH
-     case AF_BLUETOOTH:
-         switch (proto) {
-@@ -1285,6 +1305,28 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
-     }
- #endif
- 
-+#ifdef ENABLE_CAN
-+    case AF_CAN:
-+    {
-+        struct sockaddr_can* addr;
-+        struct ifreq ifr;
-+        char *interfaceName;
-+        addr = (struct sockaddr_can*)addr_ret;
-+        if (!PyArg_Parse(args, "s", &interfaceName))
-+            return 0;
-+        strncpy(ifr.ifr_name, interfaceName, sizeof(ifr.ifr_name));
-+        ifr.ifr_name[(sizeof(ifr.ifr_name))-1] = '\0';
-+        if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) {
-+                s->errorhandler();
-+            return 0;
-+        }
-+        addr->can_family = AF_CAN;
-+        addr->can_ifindex = ifr.ifr_ifindex;
-+        *len_ret = sizeof *addr;
-+        return 1;
-+    }
-+#endif
-+
- #ifdef USE_BLUETOOTH
-     case AF_BLUETOOTH:
-     {
-@@ -1535,6 +1577,14 @@ getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret)
-     }
- #endif
- 
-+#ifdef ENABLE_CAN
-+    case AF_CAN:
-+    {
-+        *len_ret = sizeof (struct sockaddr_can);
-+        return 1;
-+    }
-+#endif
-+
- #ifdef USE_BLUETOOTH
-     case AF_BLUETOOTH:
-     {
-@@ -4425,6 +4475,10 @@ PyInit__socket(void)
-     PyModule_AddIntConstant(m, "AF_LLC", AF_LLC);
- #endif
- 
-+#ifdef ENABLE_CAN
-+    PyModule_AddIntConstant(m, "AF_CAN", AF_CAN);
-+#endif
-+
- #ifdef USE_BLUETOOTH
-     PyModule_AddIntConstant(m, "AF_BLUETOOTH", AF_BLUETOOTH);
-     PyModule_AddIntConstant(m, "BTPROTO_L2CAP", BTPROTO_L2CAP);
-@@ -4776,6 +4830,41 @@ PyInit__socket(void)
-     PyModule_AddIntConstant(m, "IPPROTO_MAX", IPPROTO_MAX);
- #endif
- 
-+#ifdef  CAN_RAW
-+    PyModule_AddIntConstant(m, "CAN_RAW", CAN_RAW);
-+#endif
-+#ifdef  CAN_BCM
-+    PyModule_AddIntConstant(m, "CAN_BCM", CAN_BCM);
-+#endif
-+#ifdef  CAN_TP16
-+    PyModule_AddIntConstant(m, "CAN_TP16", CAN_TP16);
-+#endif
-+#ifdef  CAN_TP20
-+    PyModule_AddIntConstant(m, "CAN_TP20", CAN_TP20);
-+#endif
-+#ifdef  CAN_MCNET
-+    PyModule_AddIntConstant(m, "CAN_MCNET", CAN_MCNET);
-+#endif
-+#ifdef  CAN_ISOTP
-+    PyModule_AddIntConstant(m, "CAN_ISOTP", CAN_ISOTP);
-+#endif
-+#ifdef  CAN_NPROTO
-+    PyModule_AddIntConstant(m, "CAN_NPROTO", CAN_NPROTO);
-+#endif
-+
-+#ifdef  SOL_CAN_BASE
-+    PyModule_AddIntConstant(m, "SOL_CAN_BASE", SOL_CAN_BASE);
-+#endif
-+#ifdef  SOL_CAN_RAW
-+    PyModule_AddIntConstant(m, "SOL_CAN_RAW", SOL_CAN_RAW);
-+#endif
-+#ifdef ENABLE_CAN
-+    PyModule_AddIntConstant(m, "CAN_RAW_FILTER", CAN_RAW_FILTER);
-+    PyModule_AddIntConstant(m, "CAN_RAW_ERR_FILTER", CAN_RAW_ERR_FILTER);
-+    PyModule_AddIntConstant(m, "CAN_RAW_LOOPBACK", CAN_RAW_LOOPBACK);
-+    PyModule_AddIntConstant(m, "CAN_RAW_RECV_OWN_MSGS", CAN_RAW_RECV_OWN_MSGS);
-+#endif
-+
-     /* Some port configuration */
- #ifdef  IPPORT_RESERVED
-     PyModule_AddIntConstant(m, "IPPORT_RESERVED", IPPORT_RESERVED);
-diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
-index 4f426f5..a274121 100644
---- a/Modules/socketmodule.h
-+++ b/Modules/socketmodule.h
-@@ -55,6 +55,14 @@ typedef int socklen_t;
- #include <bluetooth/hci.h>
- #endif
- 
-+#define AF_CAN 29
-+#define PF_CAN AF_CAN
-+
-+#ifdef HAVE_LINUX_CAN_H
-+#define ENABLE_CAN 1
-+#include <linux/can.h>
-+#endif
-+
- #ifdef HAVE_BLUETOOTH_H
- #include <bluetooth.h>
- #endif
-@@ -114,6 +122,9 @@ typedef union sock_addr {
-     struct sockaddr_in6 in6;
-     struct sockaddr_storage storage;
- #endif
-+#ifdef ENABLE_CAN
-+	struct sockaddr_can can;
-+#endif
- #ifdef HAVE_BLUETOOTH_BLUETOOTH_H
-     struct sockaddr_l2 bt_l2;
-     struct sockaddr_rc bt_rc;
-diff --git a/configure.in b/configure.in
-index 9b7a5a7..201fecf 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1349,6 +1349,19 @@ AC_CHECK_HEADERS(linux/netlink.h,,,[
- #endif
- ])
- 
-+AC_CHECK_HEADERS(linux/can.h,[],[],[#include <sys/socket.h>])
-+# check for AF_CAN
-+AC_TRY_COMPILE(
-+    [[#include <sys/socket.h>
-+      int domain = AF_CAN;]],
-+    [[socket(domain, 0, 0);]],
-+    [],
-+    [
-+        AC_DEFINE(AF_CAN, 29, [Define AF_CAN if not defined by sys/socket.h])
-+        AC_DEFINE(PF_CAN, 29, [Define PF_CAN if not defined by sys/socket.h])
-+    ]
-+)
-+
- # checks for typedefs
- was_it_defined=no
- AC_MSG_CHECKING(for clock_t in time.h)
diff --git a/patches/Python-3.1.4/0002-printf-format-zd.patch b/patches/Python-3.1.4/0002-printf-format-zd.patch
deleted file mode 100644
index da9e49e..0000000
--- a/patches/Python-3.1.4/0002-printf-format-zd.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Thu, 23 Apr 2009 08:49:08 +0200
-Subject: [PATCH] printf format %zd
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- configure.in | 23 +++++++++++++++++++----
- 1 file changed, 19 insertions(+), 4 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 201fecf..4fd2830 100644
---- a/configure.in
-+++ b/configure.in
-@@ -4038,7 +4038,8 @@ else
- fi
- 
- AC_MSG_CHECKING(for %zd printf() format support)
--AC_TRY_RUN([#include <stdio.h>
-+AC_CACHE_VAL([ac_cv_py_format_size_t],[
-+  AC_RUN_IFELSE([#include <stdio.h>
- #include <stddef.h>
- #include <string.h>
- 
-@@ -4072,9 +4073,23 @@ int main()
- 
-     return 0;
- }],
--[AC_MSG_RESULT(yes)
-- AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])],
-- AC_MSG_RESULT(no))
-+  [ac_cv_py_format_size_t=yes],
-+  [ac_cv_py_format_size_t=no],
-+  [ac_cv_py_format_size_t=cross],
-+)])
-+
-+case "${ac_cv_py_format_size_t}" in
-+yes)
-+  AC_MSG_RESULT([yes])
-+  AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])
-+  ;;
-+no)
-+  AC_MSG_RESULT([no])
-+  ;;
-+*)
-+  AC_MSG_ERROR([cross compiling - please ac_cv_py_format_size_t to yes (for working %zd printf() format support) or no])
-+  ;;
-+esac
- 
- AC_CHECK_TYPE(socklen_t,,
-   AC_DEFINE(socklen_t,int,
diff --git a/patches/Python-3.1.4/0003-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch b/patches/Python-3.1.4/0003-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch
deleted file mode 100644
index f65503e..0000000
--- a/patches/Python-3.1.4/0003-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Fri, 24 Apr 2009 18:35:19 +0200
-Subject: [PATCH] use AC_COMPILE_IFELSE rather than AC_TRY_RUN
-
-AC_TRY_RUN relys on executing the test, not working while cross
-compiling. Thus a hard wired value for the cross compilation must and is
-used.
-
-Switching to AC_COMPILE_IFELSE just tries to compile the test program
-which has the save effect and works even in the cross compiling
-scenario.
-
-This patch uses AC_COMPILE_IFELSE for these tests:
-"--enable-profiling, enable C-level code profiling"
-"whether $CC accepts -OPT:Olimit=0"
-"whether $CC accepts -Olimit 1500"
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- configure.in | 9 +++------
- 1 file changed, 3 insertions(+), 6 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 4fd2830..3fb4f38 100644
---- a/configure.in
-+++ b/configure.in
-@@ -665,9 +665,8 @@ AC_ARG_ENABLE(profiling,
-               AC_HELP_STRING(--enable-profiling, enable C-level code profiling),
- [ac_save_cc="$CC"
-  CC="$CC -pg"
-- AC_TRY_RUN([int main() { return 0; }],
-+ AC_COMPILE_IFELSE([int main() { return 0; }],
-    ac_enable_profiling="yes",
--   ac_enable_profiling="no",
-    ac_enable_profiling="no")
-  CC="$ac_save_cc"])
- AC_MSG_RESULT($ac_enable_profiling)
-@@ -1092,9 +1091,8 @@ AC_MSG_CHECKING(whether $CC accepts -OPT:Olimit=0)
- AC_CACHE_VAL(ac_cv_opt_olimit_ok,
- [ac_save_cc="$CC"
- CC="$CC -OPT:Olimit=0"
--AC_TRY_RUN([int main() { return 0; }],
-+AC_COMPILE_IFELSE([int main() { return 0; }],
-   ac_cv_opt_olimit_ok=yes,
--  ac_cv_opt_olimit_ok=no,
-   ac_cv_opt_olimit_ok=no)
- CC="$ac_save_cc"])
- AC_MSG_RESULT($ac_cv_opt_olimit_ok)
-@@ -1114,9 +1112,8 @@ else
-   AC_CACHE_VAL(ac_cv_olimit_ok,
-   [ac_save_cc="$CC"
-   CC="$CC -Olimit 1500"
--  AC_TRY_RUN([int main() { return 0; }],
-+  AC_COMPILE_IFELSE([int main() { return 0; }],
-     ac_cv_olimit_ok=yes,
--    ac_cv_olimit_ok=no,
-     ac_cv_olimit_ok=no)
-   CC="$ac_save_cc"])
-   AC_MSG_RESULT($ac_cv_olimit_ok)
diff --git a/patches/Python-3.1.4/0004-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch b/patches/Python-3.1.4/0004-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
deleted file mode 100644
index b3731a4..0000000
--- a/patches/Python-3.1.4/0004-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Fri, 24 Apr 2009 18:44:11 +0200
-Subject: [PATCH] use AC_CHECK_SIZEOF rather than AC_TRY_COMPILE for long long
- detection
-
-AC_CHECK_SIZEOF does first detect if the type is available and detects
-its size. Use it, rather than hand crafted function with AC_TRY_COMPILE.
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- configure.in | 12 +++---------
- 1 file changed, 3 insertions(+), 9 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 3fb4f38..905f323 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1465,15 +1465,9 @@ AC_CHECK_SIZEOF(fpos_t, 4)
- AC_CHECK_SIZEOF(size_t, 4)
- AC_CHECK_SIZEOF(pid_t, 4)
- 
--AC_MSG_CHECKING(for long long support)
--have_long_long=no
--AC_TRY_COMPILE([], [long long x; x = (long long)0;], [
--  AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.]) 
--  have_long_long=yes
--])
--AC_MSG_RESULT($have_long_long)
--if test "$have_long_long" = yes ; then
--AC_CHECK_SIZEOF(long long, 8)
-+AC_CHECK_SIZEOF(long long)
-+if test "$ac_cv_type_long_long" = "yes" ; then
-+  AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
- fi
- 
- AC_MSG_CHECKING(for long double support)
diff --git a/patches/Python-3.1.4/0005-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch b/patches/Python-3.1.4/0005-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
deleted file mode 100644
index 624dff3..0000000
--- a/patches/Python-3.1.4/0005-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Fri, 24 Apr 2009 18:47:19 +0200
-Subject: [PATCH] use AC_TYPE_LONG_DOUBLE to detect long double support
-
-use the correct AC_TYPE_LONG_DOUBLE function rahter than hand crafted
-test to detect long double support.
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- configure.in | 12 ++----------
- 1 file changed, 2 insertions(+), 10 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 905f323..5894ffe 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1470,16 +1470,8 @@ if test "$ac_cv_type_long_long" = "yes" ; then
-   AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
- fi
- 
--AC_MSG_CHECKING(for long double support)
--have_long_double=no
--AC_TRY_COMPILE([], [long double x; x = (long double)0;], [
--  AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define this if you have the type long double.]) 
--  have_long_double=yes
--])
--AC_MSG_RESULT($have_long_double)
--if test "$have_long_double" = yes ; then
--AC_CHECK_SIZEOF(long double, 16)
--fi
-+AC_TYPE_LONG_DOUBLE
-+AC_CHECK_SIZEOF(long double)
- 
- 
- AC_MSG_CHECKING(for _Bool support)
diff --git a/patches/Python-3.1.4/0006-use-AC_CHECK_SIZEOF-rather-than-handcrafted-test-wit.patch b/patches/Python-3.1.4/0006-use-AC_CHECK_SIZEOF-rather-than-handcrafted-test-wit.patch
deleted file mode 100644
index 7b67942..0000000
--- a/patches/Python-3.1.4/0006-use-AC_CHECK_SIZEOF-rather-than-handcrafted-test-wit.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Fri, 24 Apr 2009 19:10:14 +0200
-Subject: [PATCH] use AC_CHECK_SIZEOF rather than handcrafted test with
- AC_TRY_RUN
-
-AC_TRY_RUN doesn't work in the cross compilation scenario. Recent
-versions of autoconf support AC_CHECK_SIZEOF even while cross compiling.
-
-This patch converts the following tests to AC_CHECK_SIZEOF:
-- off_t
-- time_t
-- pthread_t
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- configure.in | 58 ++++------------------------------------------------------
- 1 file changed, 4 insertions(+), 54 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 5894ffe..315c435 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1495,23 +1495,9 @@ AC_CHECK_TYPES(uintptr_t,
-         #endif])
- 
- 
--# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
--AC_MSG_CHECKING(size of off_t)
--AC_CACHE_VAL(ac_cv_sizeof_off_t,
--[AC_TRY_RUN([#include <stdio.h>
-+AC_CHECK_SIZEOF([off_t],[],[
- #include <sys/types.h>
--main()
--{
--  FILE *f=fopen("conftestval", "w");
--  if (!f) exit(1);
--  fprintf(f, "%d\n", sizeof(off_t));
--  exit(0);
--}],
--ac_cv_sizeof_off_t=`cat conftestval`,
--ac_cv_sizeof_off_t=0,
--ac_cv_sizeof_off_t=4)
- ])
--AC_MSG_RESULT($ac_cv_sizeof_off_t)
- AC_DEFINE_UNQUOTED(SIZEOF_OFF_T, $ac_cv_sizeof_off_t,
- [The number of bytes in an off_t.])
- 
-@@ -1534,22 +1520,9 @@ else
- fi
- 
- # AC_CHECK_SIZEOF() doesn't include <time.h>.
--AC_MSG_CHECKING(size of time_t)
--AC_CACHE_VAL(ac_cv_sizeof_time_t,
--[AC_TRY_RUN([#include <stdio.h>
-+AC_CHECK_SIZEOF([time_t],[],[
- #include <time.h>
--main()
--{
--  FILE *f=fopen("conftestval", "w");
--  if (!f) exit(1);
--  fprintf(f, "%d\n", sizeof(time_t));
--  exit(0);
--}],
--ac_cv_sizeof_time_t=`cat conftestval`,
--ac_cv_sizeof_time_t=0,
--ac_cv_sizeof_time_t=4)
- ])
--AC_MSG_RESULT($ac_cv_sizeof_time_t)
- AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t, 
- [The number of bytes in a time_t.])
- 
-@@ -1563,32 +1536,9 @@ then CC="$CC -Kthread"
- elif test "$ac_cv_pthread" = "yes"
- then CC="$CC -pthread"
- fi
--AC_MSG_CHECKING(for pthread_t)
--have_pthread_t=no
--AC_TRY_COMPILE([#include <pthread.h>], [pthread_t x; x = *(pthread_t*)0;], have_pthread_t=yes)
--AC_MSG_RESULT($have_pthread_t)
--if test "$have_pthread_t" = yes ; then
--  # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
--  AC_MSG_CHECKING(size of pthread_t)
--  AC_CACHE_VAL(ac_cv_sizeof_pthread_t,
--  [AC_TRY_RUN([#include <stdio.h>
-+AC_CHECK_SIZEOF([pthread_t],[],[
- #include <pthread.h>
--  main()
--  {
--    FILE *f=fopen("conftestval", "w");
--    if (!f) exit(1);
--    fprintf(f, "%d\n", sizeof(pthread_t));
--    exit(0);
--  }],
--  ac_cv_sizeof_pthread_t=`cat conftestval`,
--  ac_cv_sizeof_pthread_t=0,
--  ac_cv_sizeof_pthread_t=4)
--  ])
--  AC_MSG_RESULT($ac_cv_sizeof_pthread_t)
--  AC_DEFINE_UNQUOTED(SIZEOF_PTHREAD_T, $ac_cv_sizeof_pthread_t,
--   [The number of bytes in a pthread_t.])
--fi
--CC="$ac_save_cc"
-+])
- 
- 
- 
diff --git a/patches/Python-3.1.4/0007-fix-silent-flag.patch b/patches/Python-3.1.4/0007-fix-silent-flag.patch
deleted file mode 100644
index 1c4390f..0000000
--- a/patches/Python-3.1.4/0007-fix-silent-flag.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Tue, 28 Apr 2009 13:08:35 +0200
-Subject: [PATCH] fix silent flag
-
-make uses "-s" as silent flag.
-only pass it (as "-q") to setup.py if a "s" (guarded by spaces)
-is detected in $MAKEFLAGS, "*s*" is not sufficient.
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- Makefile.pre.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile.pre.in b/Makefile.pre.in
-index ed1dc33..e96cc25 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -419,8 +419,8 @@ platform: $(BUILDPYTHON)
- 
- # Build the shared modules
- sharedmods: $(BUILDPYTHON)
--	@case $$MAKEFLAGS in \
--	*s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
-+	@case "$(MAKEFLAGS)" in \
-+	s|*\ s|s\ *|*\ s\ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
- 	*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
- 	esac
- 
diff --git a/patches/Python-3.1.4/0008-use-PGEN_FOR_BUILD.patch b/patches/Python-3.1.4/0008-use-PGEN_FOR_BUILD.patch
deleted file mode 100644
index c61d153..0000000
--- a/patches/Python-3.1.4/0008-use-PGEN_FOR_BUILD.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Tue, 28 Apr 2009 14:05:30 +0200
-Subject: [PATCH] use PGEN_FOR_BUILD
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- Makefile.pre.in | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile.pre.in b/Makefile.pre.in
-index e96cc25..503d34d 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -220,6 +220,7 @@ GRAMMAR_INPUT=	$(srcdir)/Grammar/Grammar
- ##########################################################################
- # Parser
- PGEN=		Parser/pgen$(EXE)
-+PGEN_FOR_BUILD=	$(PGEN)
- 
- POBJS=		\
- 		Parser/acceler.o \
-@@ -544,9 +545,9 @@ $(IO_OBJS): $(IO_H)
- 
- # Use a stamp file to prevent make -j invoking pgen twice
- $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
--Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
-+Parser/pgen.stamp: $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT)
- 		-@$(INSTALL) -d Include
--		$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+		$(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- 		-touch Parser/pgen.stamp
- 
- $(PGEN):	$(PGENOBJS)
diff --git a/patches/Python-3.1.4/0009-introduce-and-use-PYTHON_FOR_BUILD.patch b/patches/Python-3.1.4/0009-introduce-and-use-PYTHON_FOR_BUILD.patch
deleted file mode 100644
index 8dd9095..0000000
--- a/patches/Python-3.1.4/0009-introduce-and-use-PYTHON_FOR_BUILD.patch
+++ /dev/null
@@ -1,180 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Tue, 28 Apr 2009 14:22:01 +0200
-Subject: [PATCH] introduce and use PYTHON_FOR_BUILD
-
-When cross compiling, the python version just build cannot be executed,
-thus we need a python running on the build system. This patch introduced
-the variable PYTHON_FOR_BUILD to specify this python, default is to use
-"python" from $PATH.
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- Makefile.pre.in | 39 ++++++++++++++++++++-------------------
- configure.in    | 16 ++++++++++++++++
- 2 files changed, 36 insertions(+), 19 deletions(-)
-
-diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 503d34d..c438baf 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -179,7 +179,8 @@ LIBOBJDIR=	Python/
- LIBOBJS=	@LIBOBJS@
- 
- PYTHON=		python$(EXE)
--BUILDPYTHON=	python$(BUILDEXE)
-+BUILDPYTHON=	./python$(BUILDEXE)
-+PYTHON_FOR_BUILD=	@PYTHON_FOR_BUILD@
- 
- # The task to run while instrument when building the profile-opt target
- PROFILE_TASK=	$(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
-@@ -397,7 +398,7 @@ build_all_generate_profile:
- 	$(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov"
- 
- run_profile_task:
--	./$(BUILDPYTHON) $(PROFILE_TASK)
-+	$(PYTHON_FOR_BUILD) $(PROFILE_TASK)
- 
- build_all_use_profile:
- 	$(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use"
-@@ -414,15 +415,15 @@ $(BUILDPYTHON):	Modules/python.o $(LIBRARY) $(LDLIBRARY)
- 			Modules/python.o \
- 			$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
- 
--platform: $(BUILDPYTHON)
--	$(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
-+platform: $(PYTHON_FOR_BUILD)
-+	$(RUNSHARED) $(PYTHON_FOR_BUILD) -E -c 'import sys ; from distutils.util import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
- 
- 
- # Build the shared modules
--sharedmods: $(BUILDPYTHON)
-+sharedmods: $(BUILDPYTHON) $(PYTHON_FOR_BUILD)
- 	@case "$(MAKEFLAGS)" in \
--	s|*\ s|s\ *|*\ s\ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
--	*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
-+	s|*\ s|s\ *|*\ s\ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \
-+	*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \
- 	esac
- 
- # Build static library
-@@ -711,7 +712,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)
- 
- TESTOPTS=	-l $(EXTRATESTOPTS)
- TESTPROG=	$(srcdir)/Lib/test/regrtest.py
--TESTPYTHON=	$(RUNSHARED) ./$(BUILDPYTHON) -E -bb $(TESTPYTHONOPTS)
-+TESTPYTHON=	$(RUNSHARED) $(PYTHON_FOR_BUILD) -E -bb $(TESTPYTHONOPTS)
- test:		all platform
- 		-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
- 		-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
-@@ -734,7 +735,7 @@ testuniversal:	all platform
- 		-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
- 		-$(TESTPYTHON) $(TESTPROG) -uall $(TESTOPTS)
- 		$(TESTPYTHON) $(TESTPROG) -uall $(TESTOPTS)
--		$(RUNSHARED) /usr/libexec/oah/translate ./$(BUILDPYTHON) -E $(TESTPROG) -uall $(TESTOPTS)
-+		$(RUNSHARED) /usr/libexec/oah/translate $(PYTHON_FOR_BUILD) -E $(TESTPROG) -uall $(TESTOPTS)
- 
- 
- # Like testall, but with a single pass only
-@@ -916,25 +917,25 @@ libinstall:	build_all $(srcdir)/Lib/$(PLATDIR)
- 	done
- 	$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
- 	-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
--		./$(BUILDPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
-+		$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
- 		-d $(LIBDEST) -f \
- 		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
- 		$(DESTDIR)$(LIBDEST)
- 	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
--		./$(BUILDPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
-+		$(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
- 		-d $(LIBDEST) -f \
- 		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
- 		$(DESTDIR)$(LIBDEST)
- 	-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
--		./$(BUILDPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
-+		$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
- 		-d $(LIBDEST)/site-packages -f \
- 		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- 	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
--		./$(BUILDPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
-+		$(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
- 		-d $(LIBDEST)/site-packages -f \
- 		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- 	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
--		./$(BUILDPYTHON) -Wi -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
-+		$(PYTHON_FOR_BUILD) -Wi -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
- 
- # Create the PLATDIR source directory, if one wasn't distributed..
- $(srcdir)/Lib/$(PLATDIR):
-@@ -1026,7 +1027,7 @@ libainstall:	all
- # Install the dynamically loadable modules
- # This goes into $(exec_prefix)
- sharedinstall: sharedmods
--	$(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
-+	$(RUNSHARED) $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \
- 	   	--prefix=$(prefix) \
- 		--install-scripts=$(BINDIR) \
- 		--install-platlib=$(DESTSHARED) \
-@@ -1064,7 +1065,7 @@ frameworkinstallstructure:	$(LDLIBRARY)
- 		fi; \
- 	done
- 	$(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers
--	sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
-+	sed 's/%VERSION%/'"`$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
- 	$(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
- 	$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
- 	$(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
-@@ -1107,7 +1108,7 @@ frameworkinstallextras:
- # This installs a few of the useful scripts in Tools/scripts
- scriptsinstall:
- 	SRCDIR=$(srcdir) $(RUNSHARED) \
--	./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
-+	$(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/setup.py install \
- 	--prefix=$(prefix) \
- 	--install-scripts=$(BINDIR) \
- 	--root=$(DESTDIR)/
-@@ -1129,7 +1130,7 @@ config.status:	$(srcdir)/configure
- 
- # Run reindent on the library
- reindent:
--	./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
-+	$(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
- 
- # Rerun configure with the same options as it was run last time,
- # provided the config.status script exists
-@@ -1246,7 +1247,7 @@ funny:
- 
- # Perform some verification checks on any modified files.
- patchcheck:
--	$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
-+	$(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/patchcheck.py
- 
- # Dependencies
- 
-diff --git a/configure.in b/configure.in
-index 315c435..2233584 100644
---- a/configure.in
-+++ b/configure.in
-@@ -4095,6 +4095,22 @@ for dir in $SRCDIRS; do
- done
- AC_MSG_RESULT(done)
- 
-+
-+#
-+# PYTHON_FOR_BUILD
-+#
-+if test "$cross_compiling" = "yes"; then
-+    AC_MSG_CHECKING(python for build)
-+    PYTHON_FOR_BUILD="${PYTHON_FOR_BUILD-python}"
-+    PYTHON_FOR_BUILD="$(which ${PYTHON_FOR_BUILD})"
-+    AC_MSG_RESULT($PYTHON_FOR_BUILD)
-+else
-+    PYTHON_FOR_BUILD='$(BUILDPYTHON)'
-+fi
-+AC_SUBST(PYTHON_FOR_BUILD)
-+AC_ARG_VAR(PYTHON_FOR_BUILD,[build system python (default: python)])
-+
-+
- # generate output files
- AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
- AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
diff --git a/patches/Python-3.1.4/0010-distutils-introduce-and-use-EXECUTABLE_DIRNAME.patch b/patches/Python-3.1.4/0010-distutils-introduce-and-use-EXECUTABLE_DIRNAME.patch
deleted file mode 100644
index 691cd07..0000000
--- a/patches/Python-3.1.4/0010-distutils-introduce-and-use-EXECUTABLE_DIRNAME.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Tue, 28 Apr 2009 18:05:33 +0200
-Subject: [PATCH] distutils: introduce and use EXECUTABLE_DIRNAME
-
-os.path.realpath(sys.executable) is used several times in
-distutils.sysconfig. This patch introduces the variable
-EXECUTABLE_DIRNAME which holds this information.
-
-This makes it easier to overwrite this value in the cross compilation
-scenario. (see later patch)
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- Lib/distutils/sysconfig.py | 11 +++++------
- 1 file changed, 5 insertions(+), 6 deletions(-)
-
-diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
-index 9842d26..3c970a3 100644
---- a/Lib/distutils/sysconfig.py
-+++ b/Lib/distutils/sysconfig.py
-@@ -21,11 +21,12 @@ from .errors import DistutilsPlatformError
- # These are needed in a couple of spots, so just compute them once.
- PREFIX = os.path.normpath(sys.prefix)
- EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
-+EXECUTABLE_DIRNAME = os.path.dirname(os.path.realpath(sys.executable))
- 
- # Path to the base directory of the project. On Windows the binary may
- # live in project/PCBuild9.  If we're dealing with an x64 Windows build,
- # it'll live in project/PCbuild/amd64.
--project_base = os.path.dirname(os.path.realpath(sys.executable))
-+project_base = EXECUTABLE_DIRNAME
- if os.name == "nt" and "pcbuild" in project_base[-8:].lower():
-     project_base = os.path.abspath(os.path.join(project_base, os.path.pardir))
- # PC/VS7.1
-@@ -77,9 +78,8 @@ def get_python_inc(plat_specific=0, prefix=None):
-             # the build directory may not be the source directory, we
-             # must use "srcdir" from the makefile to find the "Include"
-             # directory.
--            base = os.path.dirname(os.path.realpath(sys.executable))
-             if plat_specific:
--                return base
-+                return EXECUTABLE_DIRNAME
-             else:
-                 incdir = os.path.join(get_config_var('srcdir'), 'Include')
-                 return os.path.normpath(incdir)
-@@ -223,8 +223,7 @@ def get_config_h_filename():
- def get_makefile_filename():
-     """Return full pathname of installed Makefile from the Python build."""
-     if python_build:
--        return os.path.join(os.path.dirname(os.path.realpath(sys.executable)),
--                            "Makefile")
-+        return os.path.join(EXECUTABLE_DIRNAME, "Makefile")
-     lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
-     return os.path.join(lib_dir, "config", "Makefile")
- 
-@@ -521,7 +520,7 @@ def get_config_vars(*args):
-         # testing, for example, we might be running a non-installed python
-         # from a different directory.
-         if python_build and os.name == "posix":
--            base = os.path.dirname(os.path.abspath(sys.executable))
-+            base = EXECUTABLE_DIRNAME
-             if (not os.path.isabs(_config_vars['srcdir']) and
-                 base != os.getcwd()):
-                 # srcdir is relative and we are not in the same directory
diff --git a/patches/Python-3.1.4/0011-setup.py-don-t-leak-host-path-into-cross-compilation.patch b/patches/Python-3.1.4/0011-setup.py-don-t-leak-host-path-into-cross-compilation.patch
deleted file mode 100644
index 80275e7..0000000
--- a/patches/Python-3.1.4/0011-setup.py-don-t-leak-host-path-into-cross-compilation.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Tue, 28 Apr 2009 19:07:54 +0200
-Subject: [PATCH] setup.py: don't leak host path into cross compilation
- environment
-
-During cross compilation we don't host path (neither include nor library
-search patch) to leak into our environment.
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- setup.py | 35 +++++++++++++++++++++++++++--------
- 1 file changed, 27 insertions(+), 8 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 1e15b7a..d0118ae 100644
---- a/setup.py
-+++ b/setup.py
-@@ -363,9 +363,11 @@ class PyBuildExt(build_ext):
- 
-     def detect_modules(self):
-         # Ensure that /usr/local is always used
--        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
--        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
--        self.add_multiarch_paths()
-+
-+        if os.environ.get('CROSS_COMPILING') != 'yes':
-+            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-+            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-+            self.add_multiarch_paths()
- 
-         # Add paths specified in the environment variables LDFLAGS and
-         # CPPFLAGS for header and library files.
-@@ -379,6 +381,10 @@ class PyBuildExt(build_ext):
-                 ('CPPFLAGS', '-I', self.compiler.include_dirs)):
-             env_val = sysconfig.get_config_var(env_var)
-             if env_val:
-+                # replace "-isystem" by "-I" so that the option
-+                # parser finds the dirs referenced by "-isystem"
-+                env_val = re.sub(r'(^|\s+)-isystem\s+','\\1-I', env_val)
-+
-                 # To prevent optparse from raising an exception about any
-                 # options in env_val that it doesn't know about we strip out
-                 # all double dashes and any dashes followed by a character
-@@ -415,11 +421,18 @@ class PyBuildExt(build_ext):
-         # lib_dirs and inc_dirs are used to search for files;
-         # if a file is found in one of those directories, it can
-         # be assumed that no additional -I,-L directives are needed.
--        lib_dirs = self.compiler.library_dirs + [
--            '/lib64', '/usr/lib64',
--            '/lib', '/usr/lib',
--            ]
--        inc_dirs = self.compiler.include_dirs + ['/usr/include']
-+        lib_dirs = self.compiler.library_dirs
-+        inc_dirs = self.compiler.include_dirs
-+
-+        if os.environ.get('CROSS_COMPILING') != 'yes':
-+            lib_dirs += [
-+                '/lib64', '/usr/lib64',
-+                '/lib', '/usr/lib',
-+                ]
-+            inc_dirs += ['/usr/include']
-+        else:
-+            lib_dirs += [ '.' ]
-+
-         exts = []
-         missing = []
- 
-@@ -809,6 +822,9 @@ class PyBuildExt(build_ext):
-             db_inc_paths.append('/pkg/db-3.%d/include' % x)
-             db_inc_paths.append('/opt/db-3.%d/include' % x)
- 
-+        if os.environ.get('CROSS_COMPILING') == 'yes':
-+            db_inc_paths = []
-+
-         # Add some common subdirectories for Sleepycat DB to the list,
-         # based on the standard include directories. This way DB3/4 gets
-         # picked up when it is installed in a non-standard prefix and
-@@ -949,6 +965,9 @@ class PyBuildExt(build_ext):
-         MIN_SQLITE_VERSION = ".".join([str(x)
-                                     for x in MIN_SQLITE_VERSION_NUMBER])
- 
-+        if os.environ.get('CROSS_COMPILING') == 'yes':
-+            sqlite_inc_paths = []
-+
-         # Scan the default include directories before the SQLite specific
-         # ones. This allows one to override the copy of sqlite on OSX,
-         # where /usr/include contains an old version of sqlite.
diff --git a/patches/Python-3.1.4/0012-setup.py-skip-import-check-while-cross-compiling.patch b/patches/Python-3.1.4/0012-setup.py-skip-import-check-while-cross-compiling.patch
deleted file mode 100644
index f515078..0000000
--- a/patches/Python-3.1.4/0012-setup.py-skip-import-check-while-cross-compiling.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Tue, 28 Apr 2009 19:08:19 +0200
-Subject: [PATCH] setup.py: skip import check while cross compiling
-
-during cross compilation we cannot import freshly for the target
-compiled modules into the build python. This patch skips this check.
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- setup.py | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/setup.py b/setup.py
-index d0118ae..d397504 100644
---- a/setup.py
-+++ b/setup.py
-@@ -292,6 +292,10 @@ class PyBuildExt(build_ext):
-             self.announce('WARNING: skipping import check for Cygwin-based "%s"'
-                 % ext.name)
-             return
-+        if os.environ.get('CROSS_COMPILING') == 'yes':
-+            self.announce('WARNING: skipping import check for cross compiled "%s"'
-+                % ext.name)
-+            return
-         ext_filename = os.path.join(
-             self.build_lib,
-             self.get_ext_filename(self.get_ext_fullname(ext.name)))
diff --git a/patches/Python-3.1.4/0013-add-cross-compilation-support.patch b/patches/Python-3.1.4/0013-add-cross-compilation-support.patch
deleted file mode 100644
index f12adea..0000000
--- a/patches/Python-3.1.4/0013-add-cross-compilation-support.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Mon, 4 May 2009 14:39:18 +0200
-Subject: [PATCH] add cross compilation support
-
-This patch adds preliminary cross compilation support to python.
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- Lib/distutils/sysconfig.py | 11 +++++++++--
- Makefile.pre.in            | 12 ++++++++----
- configure.in               | 31 ++++++++++++++++++++++++++++---
- setup.py                   |  6 +++++-
- 4 files changed, 50 insertions(+), 10 deletions(-)
-
-diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
-index 3c970a3..c3df55b 100644
---- a/Lib/distutils/sysconfig.py
-+++ b/Lib/distutils/sysconfig.py
-@@ -19,9 +19,16 @@ import sys
- from .errors import DistutilsPlatformError
- 
- # These are needed in a couple of spots, so just compute them once.
--PREFIX = os.path.normpath(sys.prefix)
--EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
- EXECUTABLE_DIRNAME = os.path.dirname(os.path.realpath(sys.executable))
-+if os.environ.get('CROSS_COMPILING') == 'yes':
-+    _sysroot=os.environ.get('_python_sysroot')
-+    PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))
-+    EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))
-+    if '_python_srcdir' in os.environ:
-+        EXECUTABLE_DIRNAME = os.path.normpath(os.environ['_python_srcdir'])
-+else:
-+    PREFIX = os.path.normpath(sys.prefix)
-+    EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
- 
- # Path to the base directory of the project. On Windows the binary may
- # live in project/PCBuild9.  If we're dealing with an x64 Windows build,
-diff --git a/Makefile.pre.in b/Makefile.pre.in
-index c438baf..e031a37 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -78,6 +78,10 @@ CFLAGSFORSHARED=@CFLAGSFORSHARED@
- # C flags used for building the interpreter object files
- PY_CFLAGS=	$(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
- 
-+# cross compiler options
-+ifndef DESTDIR
-+sysroot=	@SYSROOT@
-+endif
- 
- # Machine-dependent subdirectories
- MACHDEP=	@MACHDEP@
-@@ -93,11 +97,11 @@ datarootdir=    @datarootdir@
- 
- # Expanded directories
- BINDIR=		@bindir@
--LIBDIR=		@libdir@
-+LIBDIR=		$(sysroot)@libdir@
- MANDIR=		@mandir@
--INCLUDEDIR=	@includedir@
--CONFINCLUDEDIR=	$(exec_prefix)/include
--SCRIPTDIR=	$(prefix)/lib
-+INCLUDEDIR=	$(sysroot)@includedir@
-+CONFINCLUDEDIR=	$(sysroot)$(exec_prefix)/include
-+SCRIPTDIR=	$(sysroot)$(prefix)/lib
- 
- # Detailed destination directories
- BINLIBDEST=	$(LIBDIR)/python$(VERSION)
-diff --git a/configure.in b/configure.in
-index 2233584..394d686 100644
---- a/configure.in
-+++ b/configure.in
-@@ -21,6 +21,9 @@ if test "$prefix" != "/"; then
-     prefix=`echo "$prefix" | sed -e 's/\/$//g'`
- fi    
- 
-+AC_CANONICAL_BUILD
-+AC_CANONICAL_HOST
-+
- dnl This is for stuff that absolutely must end up in pyconfig.h.
- dnl Please use pyport.h instead, if possible.
- AH_TOP([
-@@ -764,9 +767,9 @@ fi
- 
- AC_MSG_RESULT($LDLIBRARY)
- 
--AC_PROG_RANLIB
--AC_SUBST(AR)
--AC_CHECK_PROGS(AR, ar aal, ar)
-+# find tools while respecting --host setting
-+AC_CHECK_TOOL(RANLIB,ranlib)
-+AC_CHECK_TOOLS(AR,ar aal,ar)
- 
- # tweak ARFLAGS only if the user didn't set it on the command line
- AC_SUBST(ARFLAGS)
-@@ -4111,6 +4114,28 @@ AC_SUBST(PYTHON_FOR_BUILD)
- AC_ARG_VAR(PYTHON_FOR_BUILD,[build system python (default: python)])
- 
- 
-+#
-+# Cross compiling
-+#
-+# special RUNSHARED
-+if test "$cross_compiling" = "yes"; then
-+    RUNSHARED="\
-+		CROSS_COMPILING=yes \
-+		_python_cross_host=${ac_cv_host} \
-+		_python_sysroot=\"\$(sysroot)\" \
-+		_python_srcdir=\"\$(srcdir)\" \
-+		_python_prefix=\"\$(prefix)\" \
-+		_python_exec_prefix=\"\$(exec_prefix)\""
-+fi
-+
-+# sysroot
-+AC_SUBST(SYSROOT)
-+if test "$cross_compiling" = "yes"; then
-+    AC_MSG_CHECKING([for SYSROOT])
-+    AC_MSG_RESULT([$SYSROOT])
-+fi
-+
-+
- # generate output files
- AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
- AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
-diff --git a/setup.py b/setup.py
-index d397504..2156621 100644
---- a/setup.py
-+++ b/setup.py
-@@ -1649,7 +1649,11 @@ class PyBuildExt(build_ext):
-                                          ffi_configfile):
-                 from distutils.dir_util import mkpath
-                 mkpath(ffi_builddir)
--                config_args = []
-+
-+                if os.environ.get('CROSS_COMPILING') != 'yes':
-+                    config_args = []
-+                else:
-+                    config_args = ['--host=%s' % os.environ["_python_cross_host"],]
- 
-                 # Pass empty CFLAGS because we'll just append the resulting
-                 # CFLAGS to Python's; -g or -O2 is to be avoided.
diff --git a/patches/Python-3.1.4/0014-provide-wrapper-for-cross-python.patch b/patches/Python-3.1.4/0014-provide-wrapper-for-cross-python.patch
deleted file mode 100644
index 1b735a0..0000000
--- a/patches/Python-3.1.4/0014-provide-wrapper-for-cross-python.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Mon, 4 May 2009 21:45:37 +0200
-Subject: [PATCH] provide wrapper for cross-python
-
-this patch provides a wrapper script that sets up a propper cross
-compilation environemnt and call the python_for_build
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- configure.in            |  2 +-
- cross-python-wrapper.in | 13 +++++++++++++
- 2 files changed, 14 insertions(+), 1 deletion(-)
- create mode 100644 cross-python-wrapper.in
-
-diff --git a/configure.in b/configure.in
-index 394d686..60284d4 100644
---- a/configure.in
-+++ b/configure.in
-@@ -4137,7 +4137,7 @@ fi
- 
- 
- # generate output files
--AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
-+AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc cross-python-wrapper)
- AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
- AC_OUTPUT
- 
-diff --git a/cross-python-wrapper.in b/cross-python-wrapper.in
-new file mode 100644
-index 0000000..9cfd36f
---- /dev/null
-+++ b/cross-python-wrapper.in
-@@ -0,0 +1,13 @@
-+#!/bin/sh
-+
-+prefix="@prefix@"
-+exec_prefix="@exec_prefix@"
-+
-+CROSS_COMPILING=yes
-+_python_sysroot="@SYSROOT@"
-+_python_prefix="${prefix}"
-+_python_exec_prefix="${exec_prefix}"
-+
-+export CROSS_COMPILING _python_sysroot _python_prefix _python_exec_prefix
-+
-+exec @PYTHON_FOR_BUILD@ "${@}"
diff --git a/patches/Python-3.1.4/0015-0017-fix-for-new-autoconf.diff.patch b/patches/Python-3.1.4/0015-0017-fix-for-new-autoconf.diff.patch
deleted file mode 100644
index d47647b..0000000
--- a/patches/Python-3.1.4/0015-0017-fix-for-new-autoconf.diff.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Wed, 3 Aug 2011 17:25:10 +0200
-Subject: [PATCH] 0017-fix-for-new-autoconf.diff
-
----
- configure.in | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/configure.in b/configure.in
-index 60284d4..eee0809 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1468,8 +1468,9 @@ AC_CHECK_SIZEOF(fpos_t, 4)
- AC_CHECK_SIZEOF(size_t, 4)
- AC_CHECK_SIZEOF(pid_t, 4)
- 
-+AC_TYPE_LONG_LONG_INT
- AC_CHECK_SIZEOF(long long)
--if test "$ac_cv_type_long_long" = "yes" ; then
-+if test "$ac_cv_type_long_long_int" = "yes" ; then
-   AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
- fi
- 
diff --git a/patches/Python-3.1.4/0016-0018-dont-add-rpaths.diff.patch b/patches/Python-3.1.4/0016-0018-dont-add-rpaths.diff.patch
deleted file mode 100644
index fa4db80..0000000
--- a/patches/Python-3.1.4/0016-0018-dont-add-rpaths.diff.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Wed, 3 Aug 2011 17:25:10 +0200
-Subject: [PATCH] 0018-dont-add-rpaths.diff
-
----
- setup.py | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 2156621..036063c 100644
---- a/setup.py
-+++ b/setup.py
-@@ -1051,7 +1051,6 @@ class PyBuildExt(build_ext):
-                                   include_dirs=["Modules/_sqlite",
-                                                 sqlite_incdir],
-                                   library_dirs=sqlite_libdir,
--                                  runtime_library_dirs=sqlite_libdir,
-                                   extra_link_args=sqlite_extra_link_args,
-                                   libraries=["sqlite3",]))
-         else:
-@@ -1113,7 +1112,6 @@ class PyBuildExt(build_ext):
-                         print("building dbm using bdb")
-                         dbmext = Extension('_dbm', ['_dbmmodule.c'],
-                                            library_dirs=dblib_dir,
--                                           runtime_library_dirs=dblib_dir,
-                                            include_dirs=db_incs,
-                                            define_macros=[
-                                                ('HAVE_BERKDB_H', None),
diff --git a/patches/Python-3.1.4/0017-add-cache-variable-for-sem_getvalue-test.patch b/patches/Python-3.1.4/0017-add-cache-variable-for-sem_getvalue-test.patch
deleted file mode 100644
index fc2bf8a..0000000
--- a/patches/Python-3.1.4/0017-add-cache-variable-for-sem_getvalue-test.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Wed, 3 Aug 2011 17:25:10 +0200
-Subject: [PATCH] add cache variable for sem_getvalue test
-
-AC_TRY_RUN is used to check for a broken sem_getvalue.
-This patch adds a cache variable (ac_cv_broken_sem_getvalue)
-that can be set when cross-compiling.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- configure.in | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index eee0809..415d3ca 100644
---- a/configure.in
-+++ b/configure.in
-@@ -3460,7 +3460,8 @@ fi
- 
- # Multiprocessing check for broken sem_getvalue
- AC_MSG_CHECKING(for broken sem_getvalue)
--AC_TRY_RUN([
-+AC_CACHE_VAL(ac_cv_broken_sem_getvalue,
-+[AC_TRY_RUN([
- #include <unistd.h>
- #include <fcntl.h>
- #include <stdio.h>
-@@ -3482,10 +3483,14 @@ int main(void){
-   return res==-1 ? 1 : 0;
- }
- ]
--,AC_MSG_RESULT(no),
-- AC_MSG_RESULT(yes)
-+,ac_cv_broken_sem_getvalue=no,
-+ ac_cv_broken_sem_getvalue=yes,
-+ ac_cv_broken_sem_getvalue=yes)
-+])
-+AC_MSG_RESULT($ac_cv_broken_sem_getvalue)
-+if test "x$ac_cv_broken_sem_getvalue" = "xyes"; then
-   AC_DEFINE(HAVE_BROKEN_SEM_GETVALUE, 1, define to 1 if your sem_getvalue is broken.)
--)
-+fi
- 
- # determine what size digit to use for Python's longs
- AC_MSG_CHECKING([digit size for Python's longs])
diff --git a/patches/Python-3.1.4/0018-assume-non-buggy-getaddrinfo-when-cross-compiling.patch b/patches/Python-3.1.4/0018-assume-non-buggy-getaddrinfo-when-cross-compiling.patch
deleted file mode 100644
index 39670a0..0000000
--- a/patches/Python-3.1.4/0018-assume-non-buggy-getaddrinfo-when-cross-compiling.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Wed, 14 Jul 2010 09:47:43 +0200
-Subject: [PATCH] assume non-buggy getaddrinfo when cross-compiling
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- configure.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 415d3ca..245cf3b 100644
---- a/configure.in
-+++ b/configure.in
-@@ -2951,8 +2951,8 @@ AC_MSG_RESULT(good)
- buggygetaddrinfo=no,
- AC_MSG_RESULT(buggy)
- buggygetaddrinfo=yes,
--AC_MSG_RESULT(buggy)
--buggygetaddrinfo=yes)], [
-+AC_MSG_RESULT(cross compiling: assume good)
-+buggygetaddrinfo=no)], [
- AC_MSG_RESULT(no)
- buggygetaddrinfo=yes
- ])
diff --git a/patches/Python-3.1.4/0019-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch b/patches/Python-3.1.4/0019-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
deleted file mode 100644
index a9f8d53..0000000
--- a/patches/Python-3.1.4/0019-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Wed, 5 Feb 2014 12:16:12 +0100
-Subject: [PATCH] resolve existing LD_LIBRARY_PATH during make, not during
- configure
-
-Otherwise, calling "make install" with fakeroot may not work correctly.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- configure.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.in b/configure.in
-index 245cf3b..74c73bd 100644
---- a/configure.in
-+++ b/configure.in
-@@ -715,7 +715,7 @@ if test $enable_shared = "yes"; then
-     Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
- 	  LDLIBRARY='libpython$(VERSION).so'
- 	  BLDLIBRARY='-L. -lpython$(VERSION)'
--	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
-+	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:'${LD_LIBRARY_PATH}'
- 	  case $ac_sys_system in
- 	      FreeBSD*)
- 		SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
diff --git a/patches/Python-3.1.4/autogen.sh b/patches/Python-3.1.4/autogen.sh
deleted file mode 100755
index 903ce78..0000000
--- a/patches/Python-3.1.4/autogen.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-# to add config.guess and config.sub
-automake --copy --add-missing || true
-
-autoheader --force
-
-autoconf \
-	--force \
-	--warnings=cross \
-	--warnings=syntax \
-	--warnings=obsolete \
-	--warnings=unsupported
-
diff --git a/patches/Python-3.1.4/series b/patches/Python-3.1.4/series
deleted file mode 100644
index 88259fa..0000000
--- a/patches/Python-3.1.4/series
+++ /dev/null
@@ -1,22 +0,0 @@
-# generated by git-ptx-patches
-#tag:base --start-number 1
-0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
-0002-printf-format-zd.patch
-0003-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch
-0004-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
-0005-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
-0006-use-AC_CHECK_SIZEOF-rather-than-handcrafted-test-wit.patch
-0007-fix-silent-flag.patch
-0008-use-PGEN_FOR_BUILD.patch
-0009-introduce-and-use-PYTHON_FOR_BUILD.patch
-0010-distutils-introduce-and-use-EXECUTABLE_DIRNAME.patch
-0011-setup.py-don-t-leak-host-path-into-cross-compilation.patch
-0012-setup.py-skip-import-check-while-cross-compiling.patch
-0013-add-cross-compilation-support.patch
-0014-provide-wrapper-for-cross-python.patch
-0015-0017-fix-for-new-autoconf.diff.patch
-0016-0018-dont-add-rpaths.diff.patch
-0017-add-cache-variable-for-sem_getvalue-test.patch
-0018-assume-non-buggy-getaddrinfo-when-cross-compiling.patch
-0019-resolve-existing-LD_LIBRARY_PATH-during-make-not-dur.patch
-# a73123a1c88455b3c54a85efc01f1a1d  - git-ptx-patches magic
diff --git a/patches/Python-3.4.2/0001-don-t-leak-host-path-into-cross-compilation.patch b/patches/Python-3.4.2/0001-don-t-leak-host-path-into-cross-compilation.patch
new file mode 100644
index 0000000..c2e5073
--- /dev/null
+++ b/patches/Python-3.4.2/0001-don-t-leak-host-path-into-cross-compilation.patch
@@ -0,0 +1,27 @@
+Index: Python-3.4.2/Lib/distutils/command/build_ext.py
+===================================================================
+--- Python-3.4.2.orig/Lib/distutils/command/build_ext.py	2014-10-08 10:18:12.000000000 +0200
++++ Python-3.4.2/Lib/distutils/command/build_ext.py	2014-10-24 12:04:09.465932044 +0200
+@@ -237,7 +237,7 @@
+         # Python's library directory must be appended to library_dirs
+         # See Issues: #1600860, #4366
+         if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
+-            if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
++            if not sysconfig.python_build:
+                 # building third party extensions
+                 self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
+             else:
+Index: Python-3.4.2/setup.py
+===================================================================
+--- Python-3.4.2.orig/setup.py	2014-10-08 10:18:16.000000000 +0200
++++ Python-3.4.2/setup.py	2014-10-24 12:04:07.225932121 +0200
+@@ -493,7 +493,8 @@
+                         add_dir_to_list(dir_list, directory)
+ 
+         if os.path.normpath(sys.base_prefix) != '/usr' \
+-                and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
++                and not sysconfig.get_config_var('PYTHONFRAMEWORK') \
++                and not cross_compiling:
+             # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
+             # (PYTHONFRAMEWORK is set) to avoid # linking problems when
+             # building a framework with different architectures than
diff --git a/rules/host-python3.make b/rules/host-python3.make
index f00e956..d0baa3c 100644
--- a/rules/host-python3.make
+++ b/rules/host-python3.make
@@ -39,8 +39,8 @@ HOST_PYTHON3_AUTOCONF := \
 	--with-pymalloc \
 	--with-signal-module \
 	--with-threads \
-	--with-wctype-functions \
-	--without-doc-strings
+	--without-doc-strings \
+	--without-ensurepip
 
 # ----------------------------------------------------------------------------
 # Install
@@ -49,7 +49,6 @@ HOST_PYTHON3_AUTOCONF := \
 $(STATEDIR)/host-python3.install:
 	@$(call targetinfo)
 	@$(call install, HOST_PYTHON3,,h)
-	install -m 0755 $(HOST_PYTHON3_DIR)/Parser/pgen $(HOST_PYTHON3_PKGDIR)/bin
 #
 # remove "python" so that it doesn't interfere with the build
 # machine's python
diff --git a/rules/python3.make b/rules/python3.make
index df28370..24031d2 100644
--- a/rules/python3.make
+++ b/rules/python3.make
@@ -17,12 +17,12 @@ PACKAGES-$(PTXCONF_PYTHON3) += python3
 #
 # Paths and names
 #
-PYTHON3_VERSION		:= 3.1.4
-PYTHON3_MD5		:= 09ed98eace4c403b475846702708675e
+PYTHON3_VERSION		:= 3.4.2
+PYTHON3_MD5		:= 5566bc7e1fdf6bed45f9a750d5f80fc2
 PYTHON3_MAJORMINOR	:= $(basename $(PYTHON3_VERSION))
 PYTHON3_SITEPACKAGES	:= /usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages
 PYTHON3			:= Python-$(PYTHON3_VERSION)
-PYTHON3_SUFFIX		:= tar.bz2
+PYTHON3_SUFFIX		:= tgz
 PYTHON3_SOURCE		:= $(SRCDIR)/$(PYTHON3).$(PYTHON3_SUFFIX)
 PYTHON3_DIR		:= $(BUILDDIR)/$(PYTHON3)
 
@@ -37,14 +37,15 @@ PYTHON3_URL		:= \
 PYTHON3_PATH	:= PATH=$(CROSS_PATH)
 PYTHON3_ENV 	:= \
 	$(CROSS_ENV) \
-	PYTHON_FOR_BUILD=$(PTXCONF_SYSROOT_HOST)/bin/python$(PYTHON3_MAJORMINOR) \
 	ac_sys_system=Linux \
 	ac_sys_release=2 \
 	MACHDEP=linux2 \
 	ac_cv_have_chflags=no \
 	ac_cv_have_lchflags=no \
 	ac_cv_py_format_size_t=yes \
-	ac_cv_broken_sem_getvalue=no
+	ac_cv_broken_sem_getvalue=no \
+	ac_cv_file__dev_ptmx=no \
+	ac_cv_file__dev_ptc=no \
 
 PYTHON3_BINCONFIG_GLOB := ""
 
@@ -58,8 +59,8 @@ PYTHON3_AUTOCONF := \
 	--with-pymalloc \
 	--with-signal-module \
 	--with-threads \
-	--with-wctype-functions \
-	--without-doc-strings
+	--without-doc-strings \
+	--without-ensurepip
 
 PYTHON3_MAKEVARS := \
 	PGEN_FOR_BUILD=$(PTXCONF_SYSROOT_HOST)/bin/pgen
@@ -70,55 +71,18 @@ PYTHON3_MAKEVARS := \
 
 $(STATEDIR)/python3.install:
 	@$(call targetinfo)
+	
+	# Remove unimportant libfiles that produce errors when compiled
+	@rm -vrf $(BUILDDIR)/Python-$(PYTHON3_VERSION)/Lib/lib2to3
+	@rm -vrf $(BUILDDIR)/Python-$(PYTHON3_VERSION)/Lib/test
+
 	@$(call install, PYTHON3)
-	@cp "$(PYTHON3_DIR)/cross-python-wrapper" "$(PYTHON3_PKGDIR)/usr/bin/"
-	@sed -i \
-		-e "s:$(SYSROOT):@SYSROOT@:g" \
-		-e "s:$(PTXCONF_SYSROOT_HOST):@SYSROOT_HOST@:g" \
-		$(PYTHON3_PKGDIR)/usr/lib/python$(PYTHON3_MAJORMINOR)/config/Makefile
 	@$(call touch)
 
-
 $(STATEDIR)/python3.install.post:
 	@$(call targetinfo)
-	@sed -i \
-		-e "s:@SYSROOT@:$(SYSROOT):g" \
-		-e "s:@SYSROOT_HOST@:$(PTXCONF_SYSROOT_HOST):g" \
-		$(PYTHON3_PKGDIR)/usr/lib/python$(PYTHON3_MAJORMINOR)/config/Makefile
-	@$(call world/install.post, PYTHON3)
-	@rm -f "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)"
-	@echo '#!/bin/sh'				>> "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)"
-	@echo ''					>> "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)"
-	@echo 'prefix="/usr"'				>> "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)"
-	@echo 'exec_prefix="$${prefix}"'		>> "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)"
-	@echo ''					>> "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)"
-	@echo 'CROSS_COMPILING=yes'			>> "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)"
-	@echo '_python_sysroot="$(SYSROOT)"'		>> "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)"
-	@echo '_python_prefix="$${prefix}"'		>> "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)"
-	@echo '_python_exec_prefix="$${exec_prefix}"'	>> "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)"
-	@echo ''					>> "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)"
-	@echo 'export CROSS_COMPILING _python_sysroot _python_prefix _python_exec_prefix' \
-							>> "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)"
-	@echo ''					>> "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)"
-	@echo 'exec $(PTXCONF_SYSROOT_HOST)/bin/python$(PYTHON3_MAJORMINOR) "$${@}"' \
-							>> "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)"
-
-#	@cp "$(PYTHON3_PKGDIR)/usr/bin/cross-python-wrapper" "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)"
-	@chmod a+x "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)"
-	@ln -sf "python$(PYTHON3_MAJORMINOR)" \
-		"$(PTXCONF_SYSROOT_CROSS)/bin/python3"
-
-	@echo "#!/bin/sh" \
-		> "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)-config"
-	@echo "exec \
-		\"$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)\" \
-		\"$(PTXCONF_SYSROOT_HOST)/bin/python$(PYTHON3_MAJORMINOR)-config\" \
-		\"\$${@}\"" \
-		>> "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)-config"
-	@chmod a+x "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)-config"
-	@ln -sf "python$(PYTHON3_MAJORMINOR)-config" \
-		"$(PTXCONF_SYSROOT_CROSS)/bin/python3-config"
-
+	# Byte compile all libraries
+	@$(PTXCONF_SYSROOT_HOST)/bin/python$(PYTHON3_MAJORMINOR) -m compileall -b -q $(PYTHON3_PKGDIR)/usr/lib/python$(PYTHON3_MAJORMINOR)
 	@$(call touch)
 
 # ----------------------------------------------------------------------------
@@ -144,6 +108,7 @@ $(STATEDIR)/python3.targetinstall:
 	@$(call install_fixup, python3,PRIORITY,optional)
 	@$(call install_fixup, python3,SECTION,base)
 	@$(call install_fixup, python3,AUTHOR,"Marc Kleine-Budde <mkl@pengutronix.de>")
+	@$(call install_fixup, python3,AUTHOR,"Han Sierkstra <han@protonic.nl>")
 	@$(call install_fixup, python3,DESCRIPTION,missing)
 
 	@cd $(PYTHON3_PKGDIR) && \
@@ -156,7 +121,7 @@ $(STATEDIR)/python3.targetinstall:
 	done
 
 	@$(call install_copy, python3, 0, 0, 755, -, /usr/bin/python$(PYTHON3_MAJORMINOR))
-	@$(call install_lib, python3, 0, 0, 644, libpython$(PYTHON3_MAJORMINOR))
+	@$(call install_lib, python3, 0, 0, 644, libpython$(PYTHON3_MAJORMINOR)m)
 
 ifdef PTXCONF_PYTHON3_SYMLINK
 	@$(call install_link, python3, python$(PYTHON3_MAJORMINOR), /usr/bin/python3)
-- 
1.9.1


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-28 12:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-28 12:38 [ptxdist] [PATCH] Update Python-3.1.4 to 3.4.2 Pim Klanke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox