cross compile python 2.7.3 for embedded ARM
Refer to this article
http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html
http://www.ailis.de/~k/archives/19-ARM-cross-compiling-howto.html
- Download the source
- ./configure
- make python Parser/pgen
- mv python hostpython
- mv Parser/pgen Parser/hostpgen
- make distclean
- patch -p1 < ~/Downloads/Python-2.7.3-xcompile.patch
- ./configure CC=arm-linux-gnueabi-gcc CXX=arm-linux-gnurabi-g++ –host=arm-linux –build=i686-linux –prefix=/home/kclin/workspace/cross_result/pkg_config/ RANLIB=arm-linux-gnue|
abi-ranlib LD=arm-linux-gnueabi-ld –cache-file=arm-linux.cache LIBS=”-L/home/kclin/workspace/cross_result/pkg_config/lib -lffi” CFLAGS=”-I/home/kclin/workspace/cross_result/pkg_config/lib/libffi-3.0.13/include -I/home/kclin/worksp|
ace/cross_result/pkg_config/include” NM=arm-linux-gnueabi-nm –disable-ipv6 - make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen CROSS_COMPILE=arm-linux-gnueabi- CROSS_COMPILE_TARGET=yes HOSTARCH=i686-linux BUILDARCH=i386-linux-gnu
- make install HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen CROSS_COMPILE=arm-linux-gnueabi- CROSS_COMPILE_TARGET=yes HOSTARCH=i686-linux BUILDARCH=i386-linux-gnu