summaryrefslogtreecommitdiffstats
path: root/patches/Python-2.6.6/0015-provide-wrapper-for-cross-python.patch
blob: 31e59f6d840b8c9ab4f472dc6cb9b4d6da4e942a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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@ "${@}"