From: Zanie Blue Date: Fri, 5 Dec 2025 02:15:04 +0000 (-0600) Subject: gh-141926: Do not unset `RUNSHARED` when cross-compiling (#141958) X-Git-Tag: v3.15.0a3~203 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=128d31637e8bf23f086d2a09081525adeeb1f65a;p=thirdparty%2FPython%2Fcpython.git gh-141926: Do not unset `RUNSHARED` when cross-compiling (#141958) --- diff --git a/Misc/NEWS.d/next/Build/2025-11-25-13-17-47.gh-issue-141926.KmuM2h.rst b/Misc/NEWS.d/next/Build/2025-11-25-13-17-47.gh-issue-141926.KmuM2h.rst new file mode 100644 index 000000000000..dab79ba5cf94 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2025-11-25-13-17-47.gh-issue-141926.KmuM2h.rst @@ -0,0 +1,4 @@ +``RUNSHARED`` is no longer cleared when cross-compiling. Previously, +``RUNSHARED`` was cleared when cross-compiling, which breaks PGO when using +``--enabled-shared`` on systems where the cross-compiled CPython is otherwise +executable (e.g., via transparent emulation). diff --git a/configure b/configure index 620878bb1813..1561f7f4134a 100755 --- a/configure +++ b/configure @@ -7808,10 +7808,6 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5 printf "%s\n" "$LDLIBRARY" >&6; } -if test "$cross_compiling" = yes; then - RUNSHARED= -fi - # HOSTRUNNER - Program to run CPython for the host platform { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking HOSTRUNNER" >&5 printf %s "checking HOSTRUNNER... " >&6; } diff --git a/configure.ac b/configure.ac index 8ef479fe3203..f2a7319d22d2 100644 --- a/configure.ac +++ b/configure.ac @@ -1639,10 +1639,6 @@ else # shared is disabled fi AC_MSG_RESULT([$LDLIBRARY]) -if test "$cross_compiling" = yes; then - RUNSHARED= -fi - # HOSTRUNNER - Program to run CPython for the host platform AC_MSG_CHECKING([HOSTRUNNER]) if test -z "$HOSTRUNNER"