kumquat-buildroot/package/python3/0032-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch
Peter Korsgaard ce81a6e6d2 package/python3: bump version to 3.9.9
Drop 0030-Fix-cross-compiling-the-uuid-module.patch as the patched code has
been reworked upstream and python3 is built with --disable-uuid:

91a51c5ffc

Rework 0033-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch as
the MULTIARCH code is now conditional on !darwin:

9901d153c2

Refresh and renumber remaining patches.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-12-16 20:07:37 +01:00

50 lines
1.8 KiB
Diff

From ffe8fb3065973204fce95130c32578163755b71e 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.
[Peter: update for 3.9.9, which made the MULTIARCH logic !darwin]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
configure.ac | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 7812dc5102..0ce52b9a7d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -883,7 +883,9 @@ fi
rm -f conftest.c conftest.out
if test x$PLATFORM_TRIPLET != xdarwin; then
- 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/')
fi
AC_SUBST(MULTIARCH)
--
2.20.1