summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2013-06-12 13:50:26 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2013-06-13 20:17:04 +0200
commit6b32859839a1f63b594055a6f769f960a2873313 (patch)
treeb50cef321ebb78e8c4e19a45d8f36a5efb68ca29
parent369872cd9ed387bceffcbf36924551814e2ed3c0 (diff)
downloadptxdist-6b32859839a1f63b594055a6f769f960a2873313.tar.gz
ptxdist-6b32859839a1f63b594055a6f769f960a2873313.tar.xz
python: version bump 2.6.6 -> 2.7.5
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--patches/Python-2.6.6/0002-printf-format-zd.patch50
-rw-r--r--patches/Python-2.6.6/0003-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch71
-rw-r--r--patches/Python-2.6.6/0006-use-AC_CHECK_SIZEOF-rather-than-handcrafted-test-wit.patch106
-rw-r--r--patches/Python-2.6.6/0007-fix-silent-flag.patch28
-rw-r--r--patches/Python-2.6.6/0008-upstream-patch-to-fix-parallel-building.patch58
-rw-r--r--patches/Python-2.6.6/0009-use-PGEN_FOR_BUILD.patch33
-rw-r--r--patches/Python-2.6.6/0010-introduce-and-use-PYTHON_FOR_BUILD.patch178
-rw-r--r--patches/Python-2.6.6/0011-distutils-introduce-and-use-EXECUTABLE_DIRNAME.patch52
-rw-r--r--patches/Python-2.6.6/0012-setup.py-don-t-leak-host-path-into-cross-compilation.patch95
-rw-r--r--patches/Python-2.6.6/0013-setup.py-skip-import-check-while-cross-compiling.patch27
-rw-r--r--patches/Python-2.6.6/0014-add-cross-compilation-support.patch141
-rw-r--r--patches/Python-2.6.6/0015-provide-wrapper-for-cross-python.patch46
-rw-r--r--patches/Python-2.6.6/0016-python-fix-long-long-autoconf-test.patch26
-rw-r--r--patches/Python-2.6.6/0018-assume-non-buggy-getaddrinfo-when-cross-compiling.patch24
-rw-r--r--patches/Python-2.6.6/0019-also-build-_sha256-_sha512-if-openssl-is-not-found.patch24
-rw-r--r--patches/Python-2.6.6/series22
-rw-r--r--patches/Python-2.7.5/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch (renamed from patches/Python-2.6.6/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch)36
-rw-r--r--patches/Python-2.7.5/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch (renamed from patches/Python-2.6.6/0004-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch)25
-rw-r--r--patches/Python-2.7.5/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch (renamed from patches/Python-2.6.6/0005-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch)16
-rw-r--r--patches/Python-2.7.5/0004-use-PGEN_FOR_BUILD.patch32
-rw-r--r--patches/Python-2.7.5/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch40
-rw-r--r--patches/Python-2.7.5/0006-add-cross-compilation-support.patch61
-rw-r--r--patches/Python-2.7.5/0007-python-don-t-add-rpaths-in-setup.py.patch (renamed from patches/Python-2.6.6/0017-python-don-t-add-rpaths-in-setup.py.patch)18
-rw-r--r--patches/Python-2.7.5/0008-add-more-search-paths.patch28
-rwxr-xr-xpatches/Python-2.7.5/autogen.sh (renamed from patches/Python-2.6.6/autogen.sh)0
-rw-r--r--patches/Python-2.7.5/series11
-rw-r--r--rules/python.make75
27 files changed, 267 insertions, 1056 deletions
diff --git a/patches/Python-2.6.6/0002-printf-format-zd.patch b/patches/Python-2.6.6/0002-printf-format-zd.patch
deleted file mode 100644
index 10196deae..000000000
--- a/patches/Python-2.6.6/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 e9b5cf0..87fad98 100644
---- a/configure.in
-+++ b/configure.in
-@@ -3874,7 +3874,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>
-
-@@ -3908,9 +3909,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-2.6.6/0003-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch b/patches/Python-2.6.6/0003-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch
deleted file mode 100644
index c306d9231..000000000
--- a/patches/Python-2.6.6/0003-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch
+++ /dev/null
@@ -1,71 +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 -fno-strict-aliasing"
-"whether $CC accepts -OPT:Olimit=0"
-"whether $CC accepts -Olimit 1500"
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- configure.in | 12 ++++--------
- 1 file changed, 4 insertions(+), 8 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 87fad98..8d130b4 100644
---- a/configure.in
-+++ b/configure.in
-@@ -697,9 +697,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)
-@@ -922,9 +921,8 @@ yes)
- AC_MSG_CHECKING(whether $CC accepts -fno-strict-aliasing)
- ac_save_cc="$CC"
- CC="$CC -fno-strict-aliasing"
-- AC_TRY_RUN([int main() { return 0; }],
-+ AC_COMPILE_IFELSE([int main() { return 0; }],
- ac_cv_no_strict_aliasing_ok=yes,
-- ac_cv_no_strict_aliasing_ok=no,
- ac_cv_no_strict_aliasing_ok=no)
- CC="$ac_save_cc"
- AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok)
-@@ -1093,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)
-@@ -1115,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-2.6.6/0006-use-AC_CHECK_SIZEOF-rather-than-handcrafted-test-wit.patch b/patches/Python-2.6.6/0006-use-AC_CHECK_SIZEOF-rather-than-handcrafted-test-wit.patch
deleted file mode 100644
index 4914be9b9..000000000
--- a/patches/Python-2.6.6/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 cb09bf7..1066880 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1481,23 +1481,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.])
-
-@@ -1520,22 +1506,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.])
-
-@@ -1549,32 +1522,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"
-+])
-
- AC_MSG_CHECKING(for --enable-toolbox-glue)
- AC_ARG_ENABLE(toolbox-glue,
diff --git a/patches/Python-2.6.6/0007-fix-silent-flag.patch b/patches/Python-2.6.6/0007-fix-silent-flag.patch
deleted file mode 100644
index fa3079b8b..000000000
--- a/patches/Python-2.6.6/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 0329d67..f8a8d36 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -393,8 +393,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-2.6.6/0008-upstream-patch-to-fix-parallel-building.patch b/patches/Python-2.6.6/0008-upstream-patch-to-fix-parallel-building.patch
deleted file mode 100644
index 660430065..000000000
--- a/patches/Python-2.6.6/0008-upstream-patch-to-fix-parallel-building.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Wed, 23 Mar 2011 13:22:18 +0100
-Subject: [PATCH] upstream patch to fix parallel building
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
- # HG changeset patch
- # User Antoine Pitrou <solipsis@pitrou.net>
- # Date 1294081892 0
- # Node ID 78de3a7fb89634e296bc2574a5d2a5411e3bb2e6
- # Parent b0b4414c0bdc21de4365247888087dd7311f609d
- Merged revisions 84068,87558 via svnmerge from
- svn+ssh://pythondev@svn.python.org/python/branches/py3k
-
-........
- r84068 | martin.v.loewis | 2010-08-15 17:47:25 +0200 (dim., 15 août 2010) | 2 lines
-
- Don't run pgen twice when using make -j.
-........
- r87558 | victor.stinner | 2010-12-29 00:14:17 +0100 (mer., 29 déc. 2010) | 1 line
-
- Don't ignore pgen error (on "make Parser/pgen.stamp")
-........
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- Makefile.pre.in | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile.pre.in b/Makefile.pre.in
-index f8a8d36..8b1e44b 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -515,9 +515,12 @@ Modules/python.o: $(srcdir)/Modules/python.c
- $(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c
-
-
--$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
-+# Use a stamp file to prevent make -j invoking pgen twice
-+$(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
-+Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
- -@$(INSTALL) -d Include
-- -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+ $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+ -touch Parser/pgen.stamp
-
- $(PGEN): $(PGENOBJS)
- $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
-@@ -1149,7 +1152,7 @@ profile-removal:
-
- clobber: clean profile-removal
- -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
-- tags TAGS \
-+ tags TAGS Parser/pgen.stamp \
- config.cache config.log pyconfig.h Modules/config.c
- -rm -rf build platform
- -rm -rf $(PYTHONFRAMEWORKDIR)
diff --git a/patches/Python-2.6.6/0009-use-PGEN_FOR_BUILD.patch b/patches/Python-2.6.6/0009-use-PGEN_FOR_BUILD.patch
deleted file mode 100644
index 941b17ff1..000000000
--- a/patches/Python-2.6.6/0009-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 8b1e44b..703c6aa 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -205,6 +205,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
- ##########################################################################
- # Parser
- PGEN= Parser/pgen$(EXE)
-+PGEN_FOR_BUILD= $(PGEN)
-
- POBJS= \
- Parser/acceler.o \
-@@ -517,9 +518,9 @@ Modules/python.o: $(srcdir)/Modules/python.c
-
- # 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-2.6.6/0010-introduce-and-use-PYTHON_FOR_BUILD.patch b/patches/Python-2.6.6/0010-introduce-and-use-PYTHON_FOR_BUILD.patch
deleted file mode 100644
index 9c8a38fda..000000000
--- a/patches/Python-2.6.6/0010-introduce-and-use-PYTHON_FOR_BUILD.patch
+++ /dev/null
@@ -1,178 +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 703c6aa..78e9a60 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -174,7 +174,8 @@ LIBOBJS= @LIBOBJS@
- UNICODE_OBJS= @UNICODE_OBJS@
-
- 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
-@@ -371,7 +372,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"
-@@ -388,15 +389,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
-@@ -680,7 +681,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)
-
- TESTOPTS= -l $(EXTRATESTOPTS)
- TESTPROG= $(srcdir)/Lib/test/regrtest.py
--TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -E -tt
-+TESTPYTHON= $(RUNSHARED) $(PYTHON_FOR_BUILD) -E -tt
- test: all platform
- -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
- -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
-@@ -703,7 +704,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 -tt $(TESTPROG) -uall $(TESTOPTS)
-+ $(RUNSHARED) /usr/libexec/oah/translate $(PYTHON_FOR_BUILD) -E -tt $(TESTPROG) -uall $(TESTOPTS)
-
-
- # Like testall, but with a single pass only
-@@ -891,23 +892,23 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR)
- done
- $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
-+ $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST) -f \
- -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
-+ $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST) -f \
- -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
-+ $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST)/site-packages -f \
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
-+ $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST)/site-packages -f \
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
-+ $(PYTHON_FOR_BUILD) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
-
- # Create the PLATDIR source directory, if one wasn't distributed..
- $(srcdir)/Lib/$(PLATDIR):
-@@ -1005,7 +1006,7 @@ libainstall: all
- # Install the dynamically loadable modules
- # This goes into $(exec_prefix)
- sharedinstall:
-- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
-+ $(RUNSHARED) $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \
- --prefix=$(prefix) \
- --install-scripts=$(BINDIR) \
- --install-platlib=$(DESTSHARED) \
-@@ -1043,7 +1044,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
-@@ -1086,7 +1087,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)
-@@ -1108,7 +1109,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
-@@ -1206,7 +1207,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 1066880..52de250 100644
---- a/configure.in
-+++ b/configure.in
-@@ -3894,6 +3894,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)
- AC_OUTPUT
diff --git a/patches/Python-2.6.6/0011-distutils-introduce-and-use-EXECUTABLE_DIRNAME.patch b/patches/Python-2.6.6/0011-distutils-introduce-and-use-EXECUTABLE_DIRNAME.patch
deleted file mode 100644
index 14c11cd53..000000000
--- a/patches/Python-2.6.6/0011-distutils-introduce-and-use-EXECUTABLE_DIRNAME.patch
+++ /dev/null
@@ -1,52 +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 | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
-index 350e48c..83af687 100644
---- a/Lib/distutils/sysconfig.py
-+++ b/Lib/distutils/sysconfig.py
-@@ -21,11 +21,12 @@ from distutils.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
-@@ -74,7 +75,7 @@ def get_python_inc(plat_specific=0, prefix=None):
-
- if os.name == "posix":
- if python_build:
-- buildir = os.path.dirname(os.path.realpath(sys.executable))
-+ buildir = EXECUTABLE_DIRNAME
- if plat_specific:
- # python.h is located in the buildir
- inc_dir = buildir
-@@ -222,7 +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)),
-+ 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")
diff --git a/patches/Python-2.6.6/0012-setup.py-don-t-leak-host-path-into-cross-compilation.patch b/patches/Python-2.6.6/0012-setup.py-don-t-leak-host-path-into-cross-compilation.patch
deleted file mode 100644
index afd4b4119..000000000
--- a/patches/Python-2.6.6/0012-setup.py-don-t-leak-host-path-into-cross-compilation.patch
+++ /dev/null
@@ -1,95 +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 | 36 +++++++++++++++++++++++++++++-------
- 1 file changed, 29 insertions(+), 7 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 6e02114..08208bd 100644
---- a/setup.py
-+++ b/setup.py
-@@ -356,8 +356,10 @@ 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')
-+
-+ 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')
-
- # Add paths specified in the environment variables LDFLAGS and
- # CPPFLAGS for header and library files.
-@@ -371,6 +373,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
-@@ -407,11 +413,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 = []
-
-@@ -846,6 +859,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
-@@ -998,6 +1014,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.
-@@ -1095,6 +1114,9 @@ class PyBuildExt(build_ext):
- # the more recent berkeleydb's db.h file first in the include path
- # when attempting to compile and it will fail.
- f = "/usr/include/db.h"
-+ if os.environ.get('CROSS_COMPILING') == 'yes':
-+ f = ''
-+
-
- if sys.platform == 'darwin':
- if is_macosx_sdk_path(f):
diff --git a/patches/Python-2.6.6/0013-setup.py-skip-import-check-while-cross-compiling.patch b/patches/Python-2.6.6/0013-setup.py-skip-import-check-while-cross-compiling.patch
deleted file mode 100644
index 480f68869..000000000
--- a/patches/Python-2.6.6/0013-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 08208bd..01b0ffc 100644
---- a/setup.py
-+++ b/setup.py
-@@ -313,6 +313,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-2.6.6/0014-add-cross-compilation-support.patch b/patches/Python-2.6.6/0014-add-cross-compilation-support.patch
deleted file mode 100644
index e7573c26a..000000000
--- a/patches/Python-2.6.6/0014-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 83af687..f583381 100644
---- a/Lib/distutils/sysconfig.py
-+++ b/Lib/distutils/sysconfig.py
-@@ -19,9 +19,16 @@ import sys
- from distutils.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 78e9a60..8b6a6b4 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -72,6 +72,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@
-@@ -87,11 +91,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 52de250..88462b3 100644
---- a/configure.in
-+++ b/configure.in
-@@ -12,6 +12,9 @@ AC_INIT(python, PYTHON_VERSION, http://www.python.org/python-bugs)
- AC_CONFIG_SRCDIR([Include/object.h])
- AC_CONFIG_HEADER(pyconfig.h)
-
-+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([
-@@ -795,9 +798,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)
-
- AC_SUBST(SVNVERSION)
- AC_CHECK_PROG(SVNVERSION, svnversion, found, not-found)
-@@ -3910,6 +3913,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)
- AC_OUTPUT
-diff --git a/setup.py b/setup.py
-index 01b0ffc..d3aac1b 100644
---- a/setup.py
-+++ b/setup.py
-@@ -1849,7 +1849,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-2.6.6/0015-provide-wrapper-for-cross-python.patch b/patches/Python-2.6.6/0015-provide-wrapper-for-cross-python.patch
deleted file mode 100644
index 31e59f6d8..000000000
--- a/patches/Python-2.6.6/0015-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 88462b3..9b80a5d 100644
---- a/configure.in
-+++ b/configure.in
-@@ -3936,7 +3936,7 @@ fi
-
-
- # generate output files
--AC_CONFIG_FILES(Makefile.pre Modules/Setup.config)
-+AC_CONFIG_FILES(Makefile.pre Modules/Setup.config cross-python-wrapper)
- AC_OUTPUT
-
- echo "creating Modules/Setup"
-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-2.6.6/0016-python-fix-long-long-autoconf-test.patch b/patches/Python-2.6.6/0016-python-fix-long-long-autoconf-test.patch
deleted file mode 100644
index ac133bd42..000000000
--- a/patches/Python-2.6.6/0016-python-fix-long-long-autoconf-test.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From: unknown author <unknown.author@example.com>
-Date: Tue, 8 Feb 2011 15:10:31 +0100
-Subject: [PATCH] python: fix long long autoconf test
-
-New autoconf versions have AC_TYPE_LONG_LONG_INT, use it.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- configure.in | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/configure.in b/configure.in
-index 9b80a5d..2895a7d 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1458,8 +1458,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-2.6.6/0018-assume-non-buggy-getaddrinfo-when-cross-compiling.patch b/patches/Python-2.6.6/0018-assume-non-buggy-getaddrinfo-when-cross-compiling.patch
deleted file mode 100644
index cd25de424..000000000
--- a/patches/Python-2.6.6/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 2895a7d..9de0dcc 100644
---- a/configure.in
-+++ b/configure.in
-@@ -2954,8 +2954,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-2.6.6/0019-also-build-_sha256-_sha512-if-openssl-is-not-found.patch b/patches/Python-2.6.6/0019-also-build-_sha256-_sha512-if-openssl-is-not-found.patch
deleted file mode 100644
index 831129125..000000000
--- a/patches/Python-2.6.6/0019-also-build-_sha256-_sha512-if-openssl-is-not-found.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Mon, 27 Aug 2012 12:29:15 +0200
-Subject: [PATCH] also build _sha256/_sha512 if openssl is not found
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
- setup.py | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/setup.py b/setup.py
-index 8c86ed8..fc6cd8a 100644
---- a/setup.py
-+++ b/setup.py
-@@ -779,7 +779,9 @@ class PyBuildExt(build_ext):
- depends = ['md5.h']) )
- missing.append('_hashlib')
-
-- if (openssl_ver < 0x00908000):
-+ if (ssl_incs is None or
-+ ssl_libs is None or
-+ openssl_ver < 0x00908000):
- # OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash
- exts.append( Extension('_sha256', ['sha256module.c']) )
- exts.append( Extension('_sha512', ['sha512module.c']) )
diff --git a/patches/Python-2.6.6/series b/patches/Python-2.6.6/series
deleted file mode 100644
index 3b9537002..000000000
--- a/patches/Python-2.6.6/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-upstream-patch-to-fix-parallel-building.patch
-0009-use-PGEN_FOR_BUILD.patch
-0010-introduce-and-use-PYTHON_FOR_BUILD.patch
-0011-distutils-introduce-and-use-EXECUTABLE_DIRNAME.patch
-0012-setup.py-don-t-leak-host-path-into-cross-compilation.patch
-0013-setup.py-skip-import-check-while-cross-compiling.patch
-0014-add-cross-compilation-support.patch
-0015-provide-wrapper-for-cross-python.patch
-0016-python-fix-long-long-autoconf-test.patch
-0017-python-don-t-add-rpaths-in-setup.py.patch
-0018-assume-non-buggy-getaddrinfo-when-cross-compiling.patch
-0019-also-build-_sha256-_sha512-if-openssl-is-not-found.patch
-# 31950c9abe57324bafb77406b67f36fb - git-ptx-patches magic
diff --git a/patches/Python-2.6.6/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch b/patches/Python-2.7.5/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
index 1d3575147..360df3e28 100644
--- a/patches/Python-2.6.6/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
+++ b/patches/Python-2.7.5/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
@@ -8,10 +8,10 @@ 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 +++++++
+ Lib/plat-linux2/IN.py | 2 ++
+ Modules/socketmodule.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ Modules/socketmodule.h | 11 +++++++
+ configure.ac | 13 ++++++++
4 files changed, 115 insertions(+)
diff --git a/Lib/plat-linux2/IN.py b/Lib/plat-linux2/IN.py
@@ -35,10 +35,10 @@ index ad307f6..f72ae88 100644
AF_MAX = PF_MAX
SOL_RAW = 255
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
-index a28116c..8b3625d 100644
+index bdc055d..066221a 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
-@@ -417,6 +417,10 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
+@@ -420,6 +420,10 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
#define SAS2SA(x) ((struct sockaddr *)(x))
@@ -49,7 +49,7 @@ index a28116c..8b3625d 100644
/*
* Constants for getnameinfo()
*/
-@@ -1041,6 +1045,22 @@ makesockaddr(int sockfd, struct sockaddr *addr, int addrlen, int proto)
+@@ -1097,6 +1101,22 @@ makesockaddr(int sockfd, struct sockaddr *addr, int addrlen, int proto)
}
#endif
@@ -72,7 +72,7 @@ index a28116c..8b3625d 100644
#ifdef USE_BLUETOOTH
case AF_BLUETOOTH:
switch (proto) {
-@@ -1304,6 +1324,28 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
+@@ -1383,6 +1403,28 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
}
#endif
@@ -101,7 +101,7 @@ index a28116c..8b3625d 100644
#ifdef USE_BLUETOOTH
case AF_BLUETOOTH:
{
-@@ -1535,6 +1577,14 @@ getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret)
+@@ -1633,6 +1675,14 @@ getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret)
}
#endif
@@ -116,7 +116,7 @@ index a28116c..8b3625d 100644
#ifdef USE_BLUETOOTH
case AF_BLUETOOTH:
{
-@@ -4583,6 +4633,10 @@ init_socket(void)
+@@ -4758,6 +4808,10 @@ init_socket(void)
PyModule_AddIntConstant(m, "AF_LLC", AF_LLC);
#endif
@@ -127,7 +127,7 @@ index a28116c..8b3625d 100644
#ifdef USE_BLUETOOTH
PyModule_AddIntConstant(m, "AF_BLUETOOTH", AF_BLUETOOTH);
PyModule_AddIntConstant(m, "BTPROTO_L2CAP", BTPROTO_L2CAP);
-@@ -4916,6 +4970,41 @@ init_socket(void)
+@@ -5114,6 +5168,41 @@ init_socket(void)
PyModule_AddIntConstant(m, "IPPROTO_MAX", IPPROTO_MAX);
#endif
@@ -170,7 +170,7 @@ index a28116c..8b3625d 100644
#ifdef IPPORT_RESERVED
PyModule_AddIntConstant(m, "IPPORT_RESERVED", IPPORT_RESERVED);
diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
-index 9b85773..f0d8265 100644
+index 8515499..3eae3eb 100644
--- a/Modules/socketmodule.h
+++ b/Modules/socketmodule.h
@@ -55,6 +55,14 @@ typedef int socklen_t;
@@ -188,7 +188,7 @@ index 9b85773..f0d8265 100644
#ifdef HAVE_BLUETOOTH_H
#include <bluetooth.h>
#endif
-@@ -105,6 +113,9 @@ typedef union sock_addr {
+@@ -106,6 +114,9 @@ typedef union sock_addr {
struct sockaddr_in6 in6;
struct sockaddr_storage storage;
#endif
@@ -198,11 +198,11 @@ index 9b85773..f0d8265 100644
#ifdef HAVE_BLUETOOTH_BLUETOOTH_H
struct sockaddr_l2 bt_l2;
struct sockaddr_rc bt_rc;
-diff --git a/configure.in b/configure.in
-index a3b96ae..e9b5cf0 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1350,6 +1350,19 @@ AC_CHECK_HEADERS(linux/netlink.h,,,[
+diff --git a/configure.ac b/configure.ac
+index 30f5bf4..c9b78ff 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1539,6 +1539,19 @@ AC_CHECK_HEADERS(linux/netlink.h,,,[
#endif
])
diff --git a/patches/Python-2.6.6/0004-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch b/patches/Python-2.7.5/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
index ea451c967..08c3dd8c0 100644
--- a/patches/Python-2.6.6/0004-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
+++ b/patches/Python-2.7.5/0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
@@ -8,28 +8,29 @@ 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(-)
+ configure.ac | 12 ++++--------
+ 1 file changed, 4 insertions(+), 8 deletions(-)
-diff --git a/configure.in b/configure.in
-index 8d130b4..c85e89b 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1455,15 +1455,9 @@ AC_CHECK_SIZEOF(fpos_t, 4)
+diff --git a/configure.ac b/configure.ac
+index c9b78ff..ebc8285 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1676,15 +1676,11 @@ 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_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[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_TYPE_LONG_LONG_INT
++AC_CHECK_SIZEOF(long long)
++if test "$ac_cv_type_long_long_int" = "yes" ; then
+ 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
diff --git a/patches/Python-2.6.6/0005-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch b/patches/Python-2.7.5/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
index 23d41b4a7..9fdac2f25 100644
--- a/patches/Python-2.6.6/0005-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
+++ b/patches/Python-2.7.5/0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
@@ -7,23 +7,23 @@ test to detect long double support.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
- configure.in | 12 ++----------
+ configure.ac | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
-diff --git a/configure.in b/configure.in
-index c85e89b..cb09bf7 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1460,16 +1460,8 @@ if test "$ac_cv_type_long_long" = "yes" ; then
+diff --git a/configure.ac b/configure.ac
+index ebc8285..764a08f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1683,16 +1683,8 @@ 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
-AC_MSG_CHECKING(for long double support)
-have_long_double=no
--AC_TRY_COMPILE([], [long double x; x = (long double)0.;], [
+-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[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, 12)
diff --git a/patches/Python-2.7.5/0004-use-PGEN_FOR_BUILD.patch b/patches/Python-2.7.5/0004-use-PGEN_FOR_BUILD.patch
new file mode 100644
index 000000000..d892f9782
--- /dev/null
+++ b/patches/Python-2.7.5/0004-use-PGEN_FOR_BUILD.patch
@@ -0,0 +1,32 @@
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Wed, 12 Jun 2013 13:53:15 +0200
+Subject: [PATCH] use PGEN_FOR_BUILD
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ Makefile.pre.in | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 9d55550..4461970 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -227,6 +227,8 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
+ ##########################################################################
+ # Parser
+ PGEN= Parser/pgen$(EXE)
++PGEN_FOR_BUILD= $(PGEN)
++
+
+ PSRCS= \
+ Parser/acceler.c \
+@@ -593,7 +595,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule
+ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
+ @$(MKDIR_P) Include
+ $(MAKE) $(PGEN)
+- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
++ $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
+ $(MAKE) $(GRAMMAR_H)
+ touch $(GRAMMAR_C)
diff --git a/patches/Python-2.7.5/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch b/patches/Python-2.7.5/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
new file mode 100644
index 000000000..a9537bc14
--- /dev/null
+++ b/patches/Python-2.7.5/0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
@@ -0,0 +1,40 @@
+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 | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 716f08e..c556209 100644
+--- a/setup.py
++++ b/setup.py
+@@ -437,8 +437,10 @@ 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')
++
++ if not cross_compiling:
++ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
++ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ self.add_gcc_paths()
+ self.add_multiarch_paths()
+
+@@ -1203,6 +1205,9 @@ class PyBuildExt(build_ext):
+ # the more recent berkeleydb's db.h file first in the include path
+ # when attempting to compile and it will fail.
+ f = "/usr/include/db.h"
++ if cross_compiling:
++ f = ''
++
+
+ if host_platform == 'darwin':
+ if is_macosx_sdk_path(f):
diff --git a/patches/Python-2.7.5/0006-add-cross-compilation-support.patch b/patches/Python-2.7.5/0006-add-cross-compilation-support.patch
new file mode 100644
index 000000000..180c3eb70
--- /dev/null
+++ b/patches/Python-2.7.5/0006-add-cross-compilation-support.patch
@@ -0,0 +1,61 @@
+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>
+---
+ Makefile.pre.in | 12 ++++++++----
+ configure.ac | 7 +++++++
+ 2 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 4461970..584ed4f 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -84,6 +84,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@
+@@ -102,11 +106,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.ac b/configure.ac
+index 764a08f..c05c5fb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -939,6 +939,13 @@ if test "$cross_compiling" = yes; then
+ RUNSHARED=
+ fi
+
++# sysroot
++AC_SUBST(SYSROOT)
++if test "$cross_compiling" = yes; then
++ AC_MSG_CHECKING([for SYSROOT])
++ AC_MSG_RESULT([$SYSROOT])
++fi
++
+ AC_MSG_RESULT($LDLIBRARY)
+
+ AC_PROG_RANLIB
diff --git a/patches/Python-2.6.6/0017-python-don-t-add-rpaths-in-setup.py.patch b/patches/Python-2.7.5/0007-python-don-t-add-rpaths-in-setup.py.patch
index 878786007..fef885885 100644
--- a/patches/Python-2.6.6/0017-python-don-t-add-rpaths-in-setup.py.patch
+++ b/patches/Python-2.7.5/0007-python-don-t-add-rpaths-in-setup.py.patch
@@ -6,14 +6,14 @@ We don't add rpaths.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
- setup.py | 3 ---
- 1 file changed, 3 deletions(-)
+ setup.py | 2 --
+ 1 file changed, 2 deletions(-)
diff --git a/setup.py b/setup.py
-index d3aac1b..8c86ed8 100644
+index c556209..66a97bd 100644
--- a/setup.py
+++ b/setup.py
-@@ -991,7 +991,6 @@ class PyBuildExt(build_ext):
+@@ -1077,7 +1077,6 @@ class PyBuildExt(build_ext):
exts.append(Extension('_bsddb', ['_bsddb.c'],
depends = ['bsddb.h'],
library_dirs=dblib_dir,
@@ -21,7 +21,7 @@ index d3aac1b..8c86ed8 100644
include_dirs=db_incs,
libraries=dblibs))
else:
-@@ -1100,7 +1099,6 @@ class PyBuildExt(build_ext):
+@@ -1187,7 +1186,6 @@ class PyBuildExt(build_ext):
include_dirs=["Modules/_sqlite",
sqlite_incdir],
library_dirs=sqlite_libdir,
@@ -29,11 +29,3 @@ index d3aac1b..8c86ed8 100644
extra_link_args=sqlite_extra_link_args,
libraries=["sqlite3",]))
else:
-@@ -1176,7 +1174,6 @@ class PyBuildExt(build_ext):
- elif db_incs is not None:
- exts.append( Extension('dbm', ['dbmmodule.c'],
- library_dirs=dblib_dir,
-- runtime_library_dirs=dblib_dir,
- include_dirs=db_incs,
- define_macros=[('HAVE_BERKDB_H',None),
- ('DB_DBM_HSEARCH',None)],
diff --git a/patches/Python-2.7.5/0008-add-more-search-paths.patch b/patches/Python-2.7.5/0008-add-more-search-paths.patch
new file mode 100644
index 000000000..f160ac6f4
--- /dev/null
+++ b/patches/Python-2.7.5/0008-add-more-search-paths.patch
@@ -0,0 +1,28 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Thu, 13 Jun 2013 10:42:58 +0200
+Subject: [PATCH] add more search paths
+
+Without this setup.py won't find libs in <sysroot>/lib
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ setup.py | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 66a97bd..7bd9e9c 100644
+--- a/setup.py
++++ b/setup.py
+@@ -484,8 +484,10 @@ class PyBuildExt(build_ext):
+ # (PYTHONFRAMEWORK is set) to avoid # linking problems when
+ # building a framework with different architectures than
+ # the one that is currently installed (issue #7473)
+- add_dir_to_list(self.compiler.library_dirs,
+- sysconfig.get_config_var("LIBDIR"))
++ libdir = sysconfig.get_config_var("LIBDIR")
++ add_dir_to_list(self.compiler.library_dirs, libdir)
++ if libdir.endswith('/usr/lib'):
++ add_dir_to_list(self.compiler.library_dirs, libdir.replace('/usr/lib','/lib'))
+ add_dir_to_list(self.compiler.include_dirs,
+ sysconfig.get_config_var("INCLUDEDIR"))
+
diff --git a/patches/Python-2.6.6/autogen.sh b/patches/Python-2.7.5/autogen.sh
index 903ce7847..903ce7847 100755
--- a/patches/Python-2.6.6/autogen.sh
+++ b/patches/Python-2.7.5/autogen.sh
diff --git a/patches/Python-2.7.5/series b/patches/Python-2.7.5/series
new file mode 100644
index 000000000..32cca28e4
--- /dev/null
+++ b/patches/Python-2.7.5/series
@@ -0,0 +1,11 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
+0002-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
+0003-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
+0004-use-PGEN_FOR_BUILD.patch
+0005-setup.py-don-t-leak-host-path-into-cross-compilation.patch
+0006-add-cross-compilation-support.patch
+0007-python-don-t-add-rpaths-in-setup.py.patch
+0008-add-more-search-paths.patch
+# 411ac5f396ebdb4609a70a104096cc59 - git-ptx-patches magic
diff --git a/rules/python.make b/rules/python.make
index 1b9dc14a6..5b52058ce 100644
--- a/rules/python.make
+++ b/rules/python.make
@@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_PYTHON) += python
#
# Paths and names
#
-PYTHON_VERSION := 2.6.6
-PYTHON_MD5 := cf4e6881bb84a7ce6089e4a307f71f14
+PYTHON_VERSION := 2.7.5
+PYTHON_MD5 := 6334b666b7ff2038c761d7b27ba699c1
PYTHON_MAJORMINOR := $(basename $(PYTHON_VERSION))
PYTHON_SITEPACKAGES := /usr/lib/python$(PYTHON_MAJORMINOR)/site-packages
PYTHON := Python-$(PYTHON_VERSION)
@@ -36,16 +36,20 @@ CROSS_PYTHON := $(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON_MAJORMINOR)
# ----------------------------------------------------------------------------
PYTHON_PATH := PATH=$(CROSS_PATH)
-PYTHON_ENV := \
+PYTHON_CONF_ENV := \
$(CROSS_ENV) \
- PYTHON_FOR_BUILD=$(PTXCONF_SYSROOT_HOST)/bin/python$(PYTHON_MAJORMINOR) \
+ PYTHON_FOR_BUILD=$(PTXCONF_SYSROOT_CROSS)/bin/build-python \
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_have_size_t_format=yes \
+ ac_cv_broken_sem_getvalue=no \
+ ac_cv_buggy_getaddrinfo=no \
+ ac_cv_file__dev_ptmx=yes \
+ ac_cv_file__dev_ptc=no \
+ ac_cv_have_long_long_format=yes
PYTHON_BINCONFIG_GLOB := ""
@@ -62,7 +66,34 @@ PYTHON_AUTOCONF := \
--with-wctype-functions \
--without-doc-strings
-PYTHON_MAKEVARS := \
+PYTHON_BUILD_PYTHONPATH := \
+ $(PTXCONF_SYSROOT_HOST)/lib/python$(PYTHON_MAJORMINOR)/lib-dynload \
+ $(PYTHON_DIR)/build/lib.linux2-$(PTXCONF_ARCH_STRING)-$(PYTHON_MAJORMINOR) \
+ $(PYTHON_DIR)/Lib \
+ $(PYTHON_DIR)/Lib/plat-linux2
+
+$(STATEDIR)/python.prepare:
+ @$(call targetinfo)
+
+ @rm -f $(PTXCONF_SYSROOT_CROSS)/bin/{link,build}-python
+ @ln -s $(PTXCONF_SYSROOT_HOST)/bin/python$(PYTHON_MAJORMINOR) \
+ $(PTXCONF_SYSROOT_CROSS)/bin/link-python
+ @echo '#!/bin/sh' >> $(PTXCONF_SYSROOT_CROSS)/bin/build-python
+ @echo '' >> $(PTXCONF_SYSROOT_CROSS)/bin/build-python
+ @echo '_PYTHON_PROJECT_BASE="$(PYTHON_DIR)"' >> $(PTXCONF_SYSROOT_CROSS)/bin/build-python
+ @echo '_PYTHON_HOST_PLATFORM=linux2-$(PTXCONF_ARCH_STRING)' >> $(PTXCONF_SYSROOT_CROSS)/bin/build-python
+ @echo 'PYTHONPATH=$(subst $(space),:,$(PYTHON_BUILD_PYTHONPATH))' \
+ >> $(PTXCONF_SYSROOT_CROSS)/bin/build-python
+ @echo 'export _PYTHON_PROJECT_BASE _PYTHON_HOST_PLATFORM PYTHONPATH' \
+ >> $(PTXCONF_SYSROOT_CROSS)/bin/build-python
+ @echo '' >> $(PTXCONF_SYSROOT_CROSS)/bin/build-python
+ @echo 'exec $(PTXCONF_SYSROOT_CROSS)/bin/link-python "$${@}"' >> $(PTXCONF_SYSROOT_CROSS)/bin/build-python
+ @chmod a+x $(PTXCONF_SYSROOT_CROSS)/bin/build-python
+
+ @$(call world/prepare, PYTHON)
+ @$(call touch)
+
+PYTHON_MAKE_OPT := \
PGEN_FOR_BUILD=$(PTXCONF_SYSROOT_HOST)/bin/pgen
# ----------------------------------------------------------------------------
@@ -72,13 +103,16 @@ PYTHON_MAKEVARS := \
$(STATEDIR)/python.install:
@$(call targetinfo)
@$(call install, PYTHON)
- @cp "$(PYTHON_DIR)/cross-python-wrapper" "$(PYTHON_PKGDIR)/usr/bin/"
@sed -i \
-e "s:$(SYSROOT):@SYSROOT@:g" \
-e "s:$(PTXCONF_SYSROOT_HOST):@SYSROOT_HOST@:g" \
$(PYTHON_PKGDIR)/usr/lib/python$(PYTHON_MAJORMINOR)/config/Makefile
@$(call touch)
+PYTHON_PYTHONPATH := \
+ $(SYSROOT)/usr/lib/python$(PYTHON_MAJORMINOR) \
+ $(SYSROOT)/usr/lib/python$(PYTHON_MAJORMINOR)/plat-linux2 \
+ $(PTXCONF_SYSROOT_HOST)/lib/python$(PYTHON_MAJORMINOR)/lib-dynload
$(STATEDIR)/python.install.post:
@$(call targetinfo)
@@ -86,25 +120,18 @@ $(STATEDIR)/python.install.post:
-e "s:@SYSROOT@:$(SYSROOT):g" \
-e "s:@SYSROOT_HOST@:$(PTXCONF_SYSROOT_HOST):g" \
$(PYTHON_PKGDIR)/usr/lib/python$(PYTHON_MAJORMINOR)/config/Makefile
+
@$(call world/install.post, PYTHON)
@rm -f "$(CROSS_PYTHON)"
- @echo '#!/bin/sh' >> "$(CROSS_PYTHON)"
- @echo '' >> "$(CROSS_PYTHON)"
- @echo 'prefix="/usr"' >> "$(CROSS_PYTHON)"
- @echo 'exec_prefix="$${prefix}"' >> "$(CROSS_PYTHON)"
- @echo '' >> "$(CROSS_PYTHON)"
- @echo 'CROSS_COMPILING=yes' >> "$(CROSS_PYTHON)"
- @echo '_python_sysroot="$(SYSROOT)"' >> "$(CROSS_PYTHON)"
- @echo '_python_prefix="$${prefix}"' >> "$(CROSS_PYTHON)"
- @echo '_python_exec_prefix="$${exec_prefix}"' >> "$(CROSS_PYTHON)"
- @echo '' >> "$(CROSS_PYTHON)"
- @echo 'export CROSS_COMPILING _python_sysroot _python_prefix _python_exec_prefix' \
- >> "$(CROSS_PYTHON)"
- @echo '' >> "$(CROSS_PYTHON)"
+ @echo '#!/bin/sh' >> "$(CROSS_PYTHON)"
+ @echo '' >> "$(CROSS_PYTHON)"
+ @echo 'PYTHONHOME=$(SYSROOT)/usr' >> "$(CROSS_PYTHON)"
+ @echo '_PYTHON_HOST_PLATFORM=linux2-$(PTXCONF_ARCH_STRING)' >> "$(CROSS_PYTHON)"
+ @echo 'PYTHONPATH=$(subst $(space),:,$(PYTHON_PYTHONPATH))' >> "$(CROSS_PYTHON)"
+ @echo 'export _PYTHON_HOST_PLATFORM PYTHONPATH PYTHONHOME' >> "$(CROSS_PYTHON)"
+ @echo '' >> "$(CROSS_PYTHON)"
@echo 'exec $(PTXCONF_SYSROOT_HOST)/bin/python$(PYTHON_MAJORMINOR) "$${@}"' \
- >> "$(CROSS_PYTHON)"
-
-# @cp "$(PYTHON_PKGDIR)/usr/bin/cross-python-wrapper" "$(CROSS_PYTHON)"
+ >> "$(CROSS_PYTHON)"
@chmod a+x "$(CROSS_PYTHON)"
@echo "#!/bin/sh" \