A while ago, in 1abe1c5 (from https://bugs.python.org/issue14330) configure was updated to unset RUNSHARED when cross compiling. Unfortunately, this has the effect of disabling PGO during cross-compiles.
In python-build-standalone we patch this out so we can run PGO as we do frequent cross-compilation on systems that support emulated execution of the target binary, e.g., x86-64 macOS can be run on aarch64 via Rosetta.
I'd like to upstream this patch (see astral-sh/python-build-standalone#864) in a generalized form.
This is a subset of #113123 which is about generalized support for PGO in cross-compiles and focuses on setting a variable to wrapper program allowing emulated execution. I intend to look into that separately.
Linked PRs
A while ago, in 1abe1c5 (from https://bugs.python.org/issue14330)
configurewas updated to unsetRUNSHAREDwhen cross compiling. Unfortunately, this has the effect of disabling PGO during cross-compiles.In
python-build-standalonewe patch this out so we can run PGO as we do frequent cross-compilation on systems that support emulated execution of the target binary, e.g., x86-64 macOS can be run on aarch64 via Rosetta.I'd like to upstream this patch (see astral-sh/python-build-standalone#864) in a generalized form.
This is a subset of #113123 which is about generalized support for PGO in cross-compiles and focuses on setting a variable to wrapper program allowing emulated execution. I intend to look into that separately.
Linked PRs
--enable-cross-runconfigure option to avoid clearingRUNSHAREDon cross-compile #141927RUNSHAREDwhen cross-compiling #141958