[issue22625] When cross-compiling, don’t try to execute binaries
Robert Collins
report at bugs.python.org
Sun Mar 13 21:05:11 EDT 2016
Robert Collins added the comment:
So in general: https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/System-Type.html#System-Type and https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Hosts-and-Cross_002dCompilation.html
There are three platforms in play: target, host, build.
Host is the platform where what you build should run on.
build is the platform we are building on.
target is the platform where the *output* of the build thing itself should run on. Baby steps though: lets assume target==host always.
Now, the pathological case of building things is the canadian cross - https://en.wikipedia.org/wiki/Cross_compiler#Canadian_Cross
Note here that you actually build multiple different entire compilers, - and thats what we need here.
We need to build two python's.
One, for build, which pgen and _freeze_importlib can depend on.
One, for host, which is the output, and can depend on the output of running pgen and _freeze_importlib
I don't have examples of Makefile parameterisation to support this offhand, but gcc would be the obvious (if perhaps overwhelming) place to look at it.
The key things I'd expect are that:
- when host==build, the dependencies and outputs are identical, so we only build one copy of Python and everything else.
- when host!=build, we get a chain - the host Python -> pgenoutput -> pgen -> build Python -> pgenoutput
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22625>
_______________________________________
More information about the Python-bugs-list
mailing list