diff -r 85e2cfe5b12d README --- a/README Sun Oct 30 04:30:36 2016 +0000 +++ b/README Mon Oct 31 16:36:48 2016 +0100 @@ -85,6 +85,40 @@ performance gains. +Cross Compiling on unix +----------------------- + +The cross-compilation of Python requires a natively installed python to run +Python scripts at multiple stages in the build process. The path to this +native python must be set in the $PATH environment variable and it must have +the same package version as the Python source being cross-built (for example +python3.6). + +One way to ensure that the previous rule is followed is to build the native +python from the same source first. For example: + + mkdir python-native cross-build install + cd python-native + ../configure && make + export PATH=$(pwd):$PATH + cd ../cross-build + ../configure --host= --build= \ + --enable-ipv6 ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no \ + && make DESTDIR=../install install + +If the target does not support ipv6, use --disable-ipv6 instead. If the target +Python can use /dev/ptmx or /dev/ptc to implement os.openpty(), set the +corresponding argument to "yes". + +On Android /usr/local does not exist and cannot be created and you must add the +--prefix option to configure, specifying the path where the standard library +will be installed so that the python interpreter can find it. Note that you +still need to use DESTDIR in the make install command (see +https://www.gnu.org/software/make/manual/html_node/DESTDIR.html). The shared +libraries of the extension modules may be installed separately using the +--exec-prefix option. + + What's New ----------