generic-poky/meta/recipes-devtools/python/python
Tom Zanussi 23d2eaf9d2 python: skip setup.py 'import check' when cross-compiling
build_extension() in setup.py, as part of the build process, does an
'import check' on the built extension.  The import check in turn
dlopen()'s the shared library associated with the extension, which
isn't something that makes sense if that library was cross-compiled
for a different architecture.

This was noticed with an x86_64 target that was compiled with avx
support, because it caused 'illegal instruction' exceptions:

| /bin/sh: line 1: 14575 Illegal instruction ... -E ./setup.py -q build

For other target architectures, it doesn't necessarily cause illegal
instruction exceptions, but still fails.  For example, on arm, the
failure pathway causes this warning:

*** WARNING: renaming "cmath" since importing it failed: .../cmath.so:
    wrong ELF class: ELFCLASS32

This patch to setup.py and the associated recipe changes allow the
whole 'import check' logic to be skipped when cross-compiling.

(From OE-Core rev: 25fae81538a92e15eab3fc169ebce44505f67839)

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-08 21:48:30 +00:00
..
01-use-proper-tools-for-cross-build.patch python, python-native: upgrade from 2.6.6 to 2.7.2 2011-10-31 22:03:20 +00:00
03-fix-tkinter-detection.patch recipes: Update upstream-status of patches 2011-05-13 11:02:19 +01:00
04-default-is-optimized.patch recipes: Update upstream-status of patches 2011-05-13 11:02:19 +01:00
05-enable-ctypes-cross-build.patch recipes: Update upstream-status of patches 2011-05-13 11:02:19 +01:00
06-avoid_usr_lib_termcap_path_in_linking.patch python, python-native: upgrade from 2.6.6 to 2.7.2 2011-10-31 22:03:20 +00:00
06-ctypes-libffi-fix-configure.patch python, python-native: upgrade from 2.6.6 to 2.7.2 2011-10-31 22:03:20 +00:00
07-linux3-regen-fix.patch python: add patch to fix cross compilation on host with linux-3.0 2011-07-21 10:59:19 +01:00
99-ignore-optimization-flag.patch recipes: Update upstream-status of patches 2011-05-13 11:02:19 +01:00
cgi_py.patch python: Fix cgi.py runtime issue 2011-09-22 05:07:00 +01:00
multilib.patch python, python-native: upgrade from 2.6.6 to 2.7.2 2011-10-31 22:03:20 +00:00
remove_sqlite_rpath.patch python: fix sqlite RPATH issue 2011-09-29 16:57:30 +01:00
setup_py_skip_cross_import_check.patch python: skip setup.py 'import check' when cross-compiling 2011-11-08 21:48:30 +00:00
sitecustomize.py Major layout change to the packages directory 2010-08-27 15:29:45 +01:00