3fed424566
Previously, we used support/scripts/pycompile.py to generate the pyc files for the python libraries. While the script worked, it did not follow the PEP 3147 layout requirements for py+pyc deployments. Now, use the package's own compileall.py script. This will follow PEP 3147 guidelines. It also supports "legacy" pyc only deployments as described here: https://peps.python.org/pep-3147/#case-4-legacy-pyc-files-and-source-less-imports With this change, we no longer need to hack support for side-by-side pyc files because files will be deployed as appropriate. This also has the added benefit of not requiring python3 on the host to build host-python3. Fixes: #14911 Signed-off-by: Vincent Fazio <vfazio@xes-inc.com> [yann.morin.1998@free.fr: - build-tested in a python-less environment - build+run-tested with the runtime-test infra ] Tested-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
52 lines
1.9 KiB
Diff
52 lines
1.9 KiB
Diff
From d009b0142f77881dd75ff760fec728dbc8581a03 Mon Sep 17 00:00:00 2001
|
|
From: Peter Korsgaard <peter@korsgaard.com>
|
|
Date: Fri, 2 Aug 2019 15:53:16 +0200
|
|
Subject: [PATCH] configure.ac: fixup $CC --print-multiarch output for
|
|
musl/uclibc GCC 8+ toolchains
|
|
|
|
GCC commit 6834b83784dcf0364eb820e8 (multiarch support for non-glibc linux
|
|
systems), which is part of GCC 8+, changed the multiarch logic to use
|
|
$arch-linux-musl / $arch-linux-uclibc rather than $arch-linux-gnu.
|
|
|
|
This then causes the python3 configure script to error out:
|
|
|
|
checking for the platform triplet based on compiler characteristics... powerpc-linux-gnu
|
|
configure: error: internal configure error for the platform triplet, please file a bug report
|
|
|
|
http://autobuild.buildroot.net/results/cb4/cb49c539501342e45cbe5ade82e588fcdf51f05b
|
|
|
|
As it requires that the --print-multiarch output (if not empty) matches the
|
|
deduced triplet (which always uses -linux-gnu).
|
|
|
|
It isn't quite clear why --print-multiarch returns something for a
|
|
non-multiarch toolchain on some architectures (E.G. PowerPC), but as a
|
|
workaround, rewrite the --print-multiarch output to match older GCC versions
|
|
to keep the configure script happy.
|
|
|
|
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
|
[Peter: updated for 3.10.2]
|
|
---
|
|
configure.ac | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 913051c276..aba03f3779 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -876,7 +876,11 @@ AC_MSG_CHECKING([for multiarch])
|
|
AS_CASE([$ac_sys_system],
|
|
[Darwin*], [MULTIARCH=""],
|
|
[FreeBSD*], [MULTIARCH=""],
|
|
- [MULTIARCH=$($CC --print-multiarch 2>/dev/null)]
|
|
+ [
|
|
+ # GCC 8+ returns $arch-linux-{musl,uclibc} for musl/uClibc based
|
|
+ # toolchains confusing python. Fix that up
|
|
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null | sed -E 's/-linux-(musl|uclibc)*$/-linux-gnu/')
|
|
+ ]
|
|
)
|
|
AC_SUBST([MULTIARCH])
|
|
AC_MSG_RESULT([$MULTIARCH])
|
|
--
|
|
2.20.1
|
|
|