Skip to content

Commit

Permalink
Attempt to set multiarch to a constant instead of disabling
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Sep 5, 2024
1 parent 7c3c95d commit 931009e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cpython-unix/build-cpython.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ if [ "${CC}" = "clang" ]; then
elif [ "${CC}" = "musl-clang" ]; then
# This appears to also be a problem for musl builds on 3.13.
if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then
patch -p1 -i ${ROOT}/patch-disable-multiarch-13.patch
patch -p1 -i ${ROOT}/patch-musl-multiarch-13.patch
fi
fi

Expand Down
1 change: 1 addition & 0 deletions cpython-unix/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ def build_cpython_host(
"build-cpython-host.sh",
"patch-disable-multiarch.patch",
"patch-disable-multiarch-13.patch",
"patch-musl-multiarch-13.patch",
"patch-disable-multiarch-legacy.patch",
}
for s in sorted(support):
Expand Down
17 changes: 17 additions & 0 deletions cpython-unix/patch-musl-multiarch-13.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff -u 13-a/configure.ac 13-b/configure.ac
--- 13-a/configure.ac 2024-05-08 05:21:00.000000000 -0400
+++ 13-b/configure.ac 2024-05-19 07:42:23.294762624 -0400
@@ -1090,12 +1090,7 @@
dnl architecture. PLATFORM_TRIPLET will be a pair or single value for these
dnl platforms.
AC_MSG_CHECKING([for multiarch])
-AS_CASE([$ac_sys_system],
- [Darwin*], [MULTIARCH=""],
- [iOS], [MULTIARCH=""],
- [FreeBSD*], [MULTIARCH=""],
- [MULTIARCH=$($CC --print-multiarch 2>/dev/null)]
-)
+MULTIARCH=x86_64-linux-musl
AC_SUBST([MULTIARCH])

if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then

0 comments on commit 931009e

Please sign in to comment.