aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-09-09 09:51:42 +0200
committerMichał Górny <mgorny@gentoo.org>2022-09-12 14:17:16 +0200
commit2615974a96c031f6b2fb4b33238ffa746b5bc1c2 (patch)
tree339f77b938802b13fa7e3e7706e06ba5ec2f8425
parentSkip sched/priority tests (diff)
downloadcpython-gentoo-3.11.0rc2.tar.gz
cpython-gentoo-3.11.0rc2.tar.bz2
cpython-gentoo-3.11.0rc2.zip
Workaround clang+musl build failuregentoo-3.11.0rc2
The current configure code detects musl and sets an appropriate suffix correctly but afterwards verifies that the detection result matches whatever --print-multiarch prints. Unfortunately, the current Clang releases incorrectly report linux-gnu on musl, causing the safety check to fail. Until upstreams sort that out, just nuke the multiarch check on musl target. Bug: https://bugs.gentoo.org/862888
-rw-r--r--configure.ac20
1 files changed, 11 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 0cb4e202ad2..4bc965239a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1069,11 +1069,22 @@ cat > conftest.c <<EOF
EOF
+AC_MSG_CHECKING([for multiarch])
+AS_CASE([$ac_sys_system],
+ [Darwin*], [MULTIARCH=""],
+ [FreeBSD*], [MULTIARCH=""],
+ [MULTIARCH=$($CC --print-multiarch 2>/dev/null)]
+)
+AC_SUBST([MULTIARCH])
+AC_MSG_RESULT([$MULTIARCH])
+
if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
case "$build_os" in
linux-musl*)
PLATFORM_TRIPLET=`echo "$PLATFORM_TRIPLET" | sed 's/linux-gnu/linux-musl/'`
+ # Gentoo hack: clang reports wrong MULTIARCH value for musl
+ MULTIARCH=
;;
esac
AC_MSG_RESULT([$PLATFORM_TRIPLET])
@@ -1082,15 +1093,6 @@ else
fi
rm -f conftest.c conftest.out
-AC_MSG_CHECKING([for multiarch])
-AS_CASE([$ac_sys_system],
- [Darwin*], [MULTIARCH=""],
- [FreeBSD*], [MULTIARCH=""],
- [MULTIARCH=$($CC --print-multiarch 2>/dev/null)]
-)
-AC_SUBST([MULTIARCH])
-AC_MSG_RESULT([$MULTIARCH])
-
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])