New submission from Xavier de Gaye <xdeg...@gmail.com>:
'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. ---------- components: Cross-Build messages: 338335 nosy: Alex.Willmer, xdegaye priority: normal severity: normal stage: needs patch status: open title: generate correct pyconfig.h when cross-compiling type: enhancement versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36361> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com