This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: generate correct pyconfig.h when cross-compiling
Type: enhancement Stage: patch review
Components: Cross-Build Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Alex.Willmer
Priority: normal Keywords: patch

Created on 2019-03-19 09:31 by xdegaye, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 12429 closed xdegaye, 2019-03-19 09:47
Messages (1)
msg338335 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2019-03-19 09:31
'configure' cache values are set to pessimistic defaults when cross-compiling. One of the most significant, ac_cv_computed_gotos, is set to 'no' in that case.  When ac_cv_computed_gotos is set to 'yes' on platforms that support it, it brings a 15-20 % gain in performance.  To know if a platform supports computed goto when not cross-compiling, a C test program is built and run using the AC_RUN_IFELSE autoconf macro in configure.ac.

Most platforms provide a way to transfer a file and to run a remote shell, whether it is using ssh or by other means (Android has the 'adb' swiss-knife tool).  This is a proposal to extend the AC_RUN_IFELSE macro to also copy the executable locally when cross-compiling. A script uploads it later on the platform, target of the cross-compilation, runs it on this platform, collects its exit status and sets the corresponding cache value accordingly in a config.site file.  A second run of 'configure', with the CONFIG_SITE environment variable set to the *absolute* path of this config.site file, allows configuring the build with the correct cache values for this platform.
History
Date User Action Args
2022-04-11 14:59:12adminsetgithub: 80542
2019-12-10 08:03:47xdegayesetnosy: - xdegaye
2019-03-19 09:47:33xdegayesetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request12383
2019-03-19 09:31:36xdegayecreate