Skip to content

Commit bb6f562

Browse files
committed
unix: always unset RUNSHARED when cross-compiling
This variable should only come into play when running binaries. If we force PGO when cross-compiling because we know it is possible (e.g. running i686 binaries on x86_64), we should allow attempts at running the target binary as it was built.
1 parent a6964aa commit bb6f562

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cpython-unix/build-cpython.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@ index 2d379feb4b..3eb8dbe9ea 100755
339339
EOF
340340
fi
341341

342-
# Configure nerfs RUNSHARED when cross-compiling, which prevents i386 PGO from
343-
# running from an x86_64 environment. Undo that, as we can run i386 from x86_64.
344-
if [[ -n "${CROSS_COMPILING}" && "${TARGET_TRIPLE}" = "i686-unknown-linux-gnu" ]]; then
342+
# Configure nerfs RUNSHARED when cross-compiling, which prevents PGO from running when
343+
# we can in fact run the target binaries (e.g. x86_64 host and i686 target). Undo that.
344+
if [ -n "${CROSS_COMPILING}" ]; then
345345
patch -p1 << "EOF"
346346
diff --git a/configure b/configure
347347
index 1252335472..33c11fbade 100755

0 commit comments

Comments
 (0)