diff options
Diffstat (limited to 'meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch')
-rw-r--r-- | meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch b/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch new file mode 100644 index 0000000000..58b8078068 --- /dev/null +++ b/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | # CTypes need to know the actual host we are building on. | ||
2 | # Signed-Off: Michael Dietrich <mdt@emdete.de> | ||
3 | |||
4 | Index: Python-2.6.1/setup.py | ||
5 | =================================================================== | ||
6 | --- Python-2.6.1.orig/setup.py | ||
7 | +++ Python-2.6.1/setup.py | ||
8 | @@ -1656,16 +1656,16 @@ class PyBuildExt(build_ext): | ||
9 | ffi_configfile): | ||
10 | from distutils.dir_util import mkpath | ||
11 | mkpath(ffi_builddir) | ||
12 | - config_args = [] | ||
13 | + config_args = ['--host=%s' % os.environ["HOST_SYS"], ] | ||
14 | |||
15 | # Pass empty CFLAGS because we'll just append the resulting | ||
16 | # CFLAGS to Python's; -g or -O2 is to be avoided. | ||
17 | - cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ | ||
18 | - % (ffi_builddir, ffi_srcdir, " ".join(config_args)) | ||
19 | + cmd = "(cd %s && autoconf -W cross) && (cd %s && env CFLAGS='' '%s/configure' %s)" \ | ||
20 | + % (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args)) | ||
21 | |||
22 | res = os.system(cmd) | ||
23 | if res or not os.path.exists(ffi_configfile): | ||
24 | - print "Failed to configure _ctypes module" | ||
25 | + print "Failed to configure _ctypes module (res=%d) or missing conffile=%s" % ( res, ffi_configfile ) | ||
26 | return False | ||
27 | |||
28 | fficonfig = {} | ||