]> code.ossystems Code Review - openembedded-core.git/commitdiff
python3: fix CROSSPYTHONPATH for cross builds
authorAwais Belal <awais_belal@mentor.com>
Tue, 14 Jun 2016 11:26:08 +0000 (16:26 +0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 15 Jun 2016 16:36:36 +0000 (17:36 +0100)
There are cases where target and host are of the same
type and at such instances the target modules may be
loaded if CROSSPYTHONPATH is not correct. This adds
host library paths so that target modules are not
loaded while cross compiling to avoid illegal instruction
issues.

Signed-off-by: Awais Belal <awais_belal@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-devtools/python/python3_3.5.1.bb

index ebfdcdb74988a6f2ca11276342e84e4608cdd1fa..78ae1740e3fb0e14cc23b91f4268ad4d584d5668 100644 (file)
@@ -70,8 +70,8 @@ export _PYTHON_PROJECT_BASE = "${B}"
 export _PYTHON_PROJECT_SRC = "${S}"
 export CCSHARED = "-fPIC"
 
-# Fix ctypes cross compilation
-export CROSSPYTHONPATH = "${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
+# Fix cross compilation of different modules
+export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
 
 # No ctypes option for python 3
 PYTHONLSBOPTS = ""