Skip to content

Commit 6f2eaee

Browse files
committed
unix: restore RUNSHARED on i386 cross builds
This enables the build to perform PGO profiling.
1 parent 4165e73 commit 6f2eaee

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

cpython-unix/build-cpython.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,28 @@ index 2d379feb4b..3eb8dbe9ea 100755
208208
EOF
209209
fi
210210

211+
# Configure nerfs RUNSHARED when cross-compiling, which prevents i386 PGO from
212+
# running from an x86_64 environment. Undo that, as we can run i386 from x86_64.
213+
if [[ "${BUILD_TRIPLE}" != "${TARGET_TRIPLE}" && "${TARGET_TRIPLE}" = "i686-unknown-linux-gnu" ]]; then
214+
patch -p1 << "EOF"
215+
diff --git a/configure b/configure
216+
index 1252335472..33c11fbade 100755
217+
--- a/configure
218+
+++ b/configure
219+
@@ -5989,10 +5989,6 @@ else # shared is disabled
220+
esac
221+
fi
222+
223+
-if test "$cross_compiling" = yes; then
224+
- RUNSHARED=
225+
-fi
226+
-
227+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
228+
$as_echo "$LDLIBRARY" >&6; }
229+
230+
EOF
231+
fi
232+
211233
# Add a make target to write the PYTHON_FOR_BUILD variable so we can
212234
# invoke the host Python on our own.
213235
patch -p1 << "EOF"

0 commit comments

Comments
 (0)