generic-poky/meta/recipes-devtools/python/python
Tom Zanussi ccf6077d4e 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)

(From OE-Core rev: d83e4ac25cca788d2b102c2072ccb367c0cab284)

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-30 16:38:14 +00:00
..
01-use-proper-tools-for-cross-build.patch recipes: Update upstream-status of patches 2011-05-13 11:02:19 +01:00
02-remove-test-for-cross.patch recipes: Update upstream-status of patches 2011-05-13 11:02:19 +01: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 recipes: Update upstream-status of patches 2011-05-13 11:02:19 +01:00
06-ctypes-libffi-fix-configure.patch python: add missing cytpes modules 2011-04-28 10:44:41 +01: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: Fix libdir usage which broke python packaging 2011-07-13 12:13:12 +01:00
remove_sqlite_rpath.patch python: fix sqlite RPATH issue 2012-01-30 16:37:54 +00:00
security_issue_2254_fix.patch python: fix security vulnerability 2011-07-22 11:51:05 +01:00
setup_py_skip_cross_import_check.patch python: skip setup.py 'import check' when cross-compiling 2012-01-30 16:38:14 +00:00
sitecustomize.py Major layout change to the packages directory 2010-08-27 15:29:45 +01:00