Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 0b3e70d

Browse files
author
Matthias Koeppe
committed
build/pkgs/python3/spkg-configure.m4: If PYTHON_FOR_VENV is configured to build multiarch extensions, set SAGE_ARCHFLAGS to disable it
1 parent 986739b commit 0b3e70d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

build/pkgs/python3/spkg-configure.m4

+9
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ SAGE_SPKG_CONFIGURE([python3], [
7575
dnl POST
7676
AS_IF([test x$sage_spkg_install_python3 = xno], [
7777
PYTHON_FOR_VENV="$ac_cv_path_PYTHON3"
78+
AS_IF([test "$SAGE_ARCHFLAGS" = "unset"], [
79+
AC_MSG_CHECKING([whether $PYTHON_FOR_VENV is configured to build multiarch extensions])
80+
AS_IF([[CC="$CC" CXX="$CXX" conftest_venv/bin/python3 -m sysconfig | grep '^\sw*\(C\|LD\)FLAGS *=.*[" ]-arch.* -arch' ]] [>& AS_MESSAGE_LOG_FD 2>&1 ], [
81+
AC_MSG_RESULT([yes; disabling it by setting ARCHFLAGS])
82+
SAGE_ARCHFLAGS=""
83+
], [
84+
AC_MSG_RESULT([no])
85+
])
86+
])
7887
AS_IF([test "$SAGE_ARCHFLAGS" != "unset"], [
7988
ARCHFLAGS="$SAGE_ARCHFLAGS"
8089
export ARCHFLAGS

0 commit comments

Comments
 (0)