From cfdffc45bc0853d5f13c87549de7cda1f244b1b2 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 5 Jan 2022 02:59:12 +0100 Subject: [PATCH 1/2] bpo-46263: Don't use MULTIARCH on FreeBSD --- .../Build/2022-01-05-02-58-10.bpo-46263.xiv8NU.rst | 1 + configure | 13 ++++++++++--- configure.ac | 11 +++++++---- 3 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 Misc/NEWS.d/next/Build/2022-01-05-02-58-10.bpo-46263.xiv8NU.rst diff --git a/Misc/NEWS.d/next/Build/2022-01-05-02-58-10.bpo-46263.xiv8NU.rst b/Misc/NEWS.d/next/Build/2022-01-05-02-58-10.bpo-46263.xiv8NU.rst new file mode 100644 index 00000000000000..3a575ed7f556b8 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2022-01-05-02-58-10.bpo-46263.xiv8NU.rst @@ -0,0 +1 @@ +``configure`` no longer sets ``MULTIARCH`` on FreeBSD platforms. diff --git a/configure b/configure index eca63518dbca31..f95b620251782f 100755 --- a/configure +++ b/configure @@ -6091,9 +6091,15 @@ $as_echo "none" >&6; } fi rm -f conftest.c conftest.out -if test x$PLATFORM_TRIPLET != xdarwin; then - MULTIARCH=$($CC --print-multiarch 2>/dev/null) -fi +case $ac_sys_system in #( + Darwin*) : + MULTIARCH="" ;; #( + FreeBSD*) : + MULTIARCH="" ;; #( + *) : + MULTIARCH=$($CC --print-multiarch 2>/dev/null) + ;; +esac if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then @@ -6104,6 +6110,7 @@ elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then MULTIARCH=$PLATFORM_TRIPLET fi + if test x$MULTIARCH != x; then MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\"" fi diff --git a/configure.ac b/configure.ac index 050b907ac86248..c662ddf8d6039a 100644 --- a/configure.ac +++ b/configure.ac @@ -987,10 +987,12 @@ else fi rm -f conftest.c conftest.out -if test x$PLATFORM_TRIPLET != xdarwin; then - MULTIARCH=$($CC --print-multiarch 2>/dev/null) -fi -AC_SUBST(MULTIARCH) +AS_CASE([$ac_sys_system], + [Darwin*], [MULTIARCH=""], + [FreeBSD*], [MULTIARCH=""], + [MULTIARCH=$($CC --print-multiarch 2>/dev/null)] +) +AC_SUBST([MULTIARCH]) if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then if test x$PLATFORM_TRIPLET != x$MULTIARCH; then @@ -1000,6 +1002,7 @@ elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then MULTIARCH=$PLATFORM_TRIPLET fi AC_SUBST(PLATFORM_TRIPLET) + if test x$MULTIARCH != x; then MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\"" fi From a3b26e1c51c68800c33b4f8a9ebd111676d7eb0f Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 5 Jan 2022 10:12:29 +0100 Subject: [PATCH 2/2] Print multiarch --- configure | 4 ++++ configure.ac | 2 ++ 2 files changed, 6 insertions(+) diff --git a/configure b/configure index f95b620251782f..b99b9f5e8d1fc8 100755 --- a/configure +++ b/configure @@ -6091,6 +6091,8 @@ $as_echo "none" >&6; } fi rm -f conftest.c conftest.out +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multiarch" >&5 +$as_echo_n "checking for multiarch... " >&6; } case $ac_sys_system in #( Darwin*) : MULTIARCH="" ;; #( @@ -6101,6 +6103,8 @@ case $ac_sys_system in #( ;; esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MULTIARCH" >&5 +$as_echo "$MULTIARCH" >&6; } if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then if test x$PLATFORM_TRIPLET != x$MULTIARCH; then diff --git a/configure.ac b/configure.ac index c662ddf8d6039a..d9bdf9f8c66e9e 100644 --- a/configure.ac +++ b/configure.ac @@ -987,12 +987,14 @@ 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