summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3_3.3.3.bb
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-01-18 19:10:32 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-23 11:36:27 +0000
commitb2f8367dff8a2db49b9296bd27a2e94a3619884d (patch)
tree4a95853b17d9acecfa59d27b2b35122f47267f8a /meta/recipes-devtools/python/python3_3.3.3.bb
parent3873efd33c60010a096391b821ef9004755da1d5 (diff)
downloadast2050-yocto-poky-b2f8367dff8a2db49b9296bd27a2e94a3619884d.zip
ast2050-yocto-poky-b2f8367dff8a2db49b9296bd27a2e94a3619884d.tar.gz
python3: fix for cross compiling
Fixed: * python3 has introduced _PYTHON_PROJECT_BASE which is used for separate B and S, but it doesn't work when compile Modules, the target python3 runs python3-native's sysconfig to get srcdir which is the native's, there would be errors when native's srcdir has been removed, add _PYTHON_PROJECT_SRC to fix the problem. * Check cross_compiling when get FLAGS (From OE-Core rev: c33639963491f00f55b80299922895fe68b0637d) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3_3.3.3.bb')
-rw-r--r--meta/recipes-devtools/python/python3_3.3.3.bb10
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/recipes-devtools/python/python3_3.3.3.bb b/meta/recipes-devtools/python/python3_3.3.3.bb
index efa98c0..6147408 100644
--- a/meta/recipes-devtools/python/python3_3.3.3.bb
+++ b/meta/recipes-devtools/python/python3_3.3.3.bb
@@ -39,6 +39,8 @@ SRC_URI += "\
file://avoid-ncursesw-include-path.patch \
file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
file://python3-setup.py-no-host-headers-libs.patch \
+ file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
+ file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
"
SRC_URI[md5sum] = "f3ebe34d4d8695bf889279b54673e10c"
SRC_URI[sha256sum] = "e526e9b612f623888364d30cc9f3dfc34dcef39065c713bdbcddf47df84d8dcb"
@@ -66,6 +68,10 @@ TARGET_CC_ARCH += "-DNDEBUG -fno-inline"
EXTRA_OEMAKE += "CROSS_COMPILE=yes"
EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/"
+export CROSS_COMPILE = "${TARGET_PREFIX}"
+export _PYTHON_PROJECT_BASE = "${B}"
+export _PYTHON_PROJECT_SRC = "${S}"
+
# No ctypes option for python 3
PYTHONLSBOPTS = ""
@@ -107,8 +113,6 @@ do_compile() {
# then call do_install twice we get Makefile.orig == Makefile.sysroot
install -m 0644 Makefile Makefile.sysroot
- export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${B}"
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
STAGING_LIBDIR=${STAGING_LIBDIR} \
@@ -135,8 +139,6 @@ do_install() {
# go to ${D}${STAGING...}/...
install -m 0644 Makefile.orig Makefile
- export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${B}"
install -d ${D}${libdir}/pkgconfig
install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config
OpenPOWER on IntegriCloud