diff options
Diffstat (limited to 'meta/recipes-devtools/python')
| -rw-r--r-- | meta/recipes-devtools/python/python3/crosspythonpath.patch | 25 | ||||
| -rw-r--r-- | meta/recipes-devtools/python/python3_3.7.4.bb | 2 |
2 files changed, 27 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3/crosspythonpath.patch b/meta/recipes-devtools/python/python3/crosspythonpath.patch new file mode 100644 index 0000000000..d789ab57d4 --- /dev/null +++ b/meta/recipes-devtools/python/python3/crosspythonpath.patch | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | configure.ac: add CROSSPYTHONPATH into PYTHONPATH for PYTHON_FOR_BUILD | ||
| 2 | |||
| 3 | When building x86->x86 the system will try to execute .so and related items | ||
| 4 | from the default PYTHONPATH. This will fail if the target CPU contains | ||
| 5 | instructions that the host CPU does not have, add CROSSPYTHONPATH | ||
| 6 | into PYTHONPATH so we can prepend the list to find correct libs. | ||
| 7 | |||
| 8 | Upstream-Status: Inappropriate [OE-Core integration specific] | ||
| 9 | |||
| 10 | Credits-to: Mark Hatle <mark.hatle@windriver.com> | ||
| 11 | Credits-to: Jackie Huang <jackie.huang@windriver.com> | ||
| 12 | Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com> | ||
| 13 | diff --git a/configure.ac b/configure.ac | ||
| 14 | index 4ab19a6..7036a53 100644 | ||
| 15 | --- a/configure.ac | ||
| 16 | +++ b/configure.ac | ||
| 17 | @@ -76,7 +76,7 @@ if test "$cross_compiling" = yes; then | ||
| 18 | AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found]) | ||
| 19 | fi | ||
| 20 | AC_MSG_RESULT($interp) | ||
| 21 | - PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp | ||
| 22 | + PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH):$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp | ||
| 23 | fi | ||
| 24 | elif test "$cross_compiling" = maybe; then | ||
| 25 | AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH]) | ||
diff --git a/meta/recipes-devtools/python/python3_3.7.4.bb b/meta/recipes-devtools/python/python3_3.7.4.bb index c21fe90f69..c5a5db1dc3 100644 --- a/meta/recipes-devtools/python/python3_3.7.4.bb +++ b/meta/recipes-devtools/python/python3_3.7.4.bb | |||
| @@ -24,6 +24,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ | |||
| 24 | file://0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch \ | 24 | file://0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch \ |
| 25 | file://0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch \ | 25 | file://0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch \ |
| 26 | file://0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch \ | 26 | file://0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch \ |
| 27 | file://crosspythonpath.patch \ | ||
| 27 | " | 28 | " |
| 28 | 29 | ||
| 29 | SRC_URI_append_class-native = " \ | 30 | SRC_URI_append_class-native = " \ |
| @@ -65,6 +66,7 @@ DEPENDS_append_class-nativesdk = " python3-native" | |||
| 65 | EXTRA_OECONF = " --without-ensurepip --enable-shared" | 66 | EXTRA_OECONF = " --without-ensurepip --enable-shared" |
| 66 | EXTRA_OECONF_append_class-native = " --bindir=${bindir}/${PN}" | 67 | EXTRA_OECONF_append_class-native = " --bindir=${bindir}/${PN}" |
| 67 | 68 | ||
| 69 | export CROSSPYTHONPATH="${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/" | ||
| 68 | 70 | ||
| 69 | EXTRANATIVEPATH += "python3-native" | 71 | EXTRANATIVEPATH += "python3-native" |
| 70 | 72 | ||
