Cross compile perl
Alex Suykov had do some work for this purpose,and my compile script is based on her patch. StepsStep 1:Download perl source code from perl’s official site,such as:
Step 2:Download the corresponding perl cross compile patch from Alex Suykov ‘s site.
Step 3:Extract the source code to the some diretory.
Step 4:Edit the configure script below to generate the Makefile,replace the paths to your own,such as:
Be careful! : Installation script file: unset LD_LIBRARY_PATH LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE
export PATH=$PATH:/home/username/arm/gcc/bin
LDFLAGS='-L/home/username/arm/dist/lib' LD=/home/username/arm/gcc/bin/arm-none-linux-gnueabi-ld AR=/home/username/arm/gcc/bin/arm-none-linux-gnueabi-ar RANLIB=/home/username/arm/gcc/bin/arm-none-linux-gnueabi-ranlib NM=/home/username/arm/gcc/bin/arm-none-linux-gnueabi-nm READELF=/home/username/arm/gcc/bin/arm-none-linux-gnueabi-readelf OBJDUMP=/home/username/arm/gcc/bin/arm-none-linux-gnueabi-objdump CC=/home/username/arm/gcc/bin/arm-none-linux-gnueabi-gcc CXX=/home/username/arm/gcc/bin/arm-none-linux-gnueabi-g++ CFLAGS='--sysroot=/home/username/arm/gcc/arm-none-linux-gnueabi/sys-root' ./configure --target=arm-linux --host=arm-linux-gnueabi --prefix=/home/username/arm/dist
Step 3:After the configure stage finish successfully.
Step 4:After the make stage finish successfully.
Step 5:Copy the cross compile result to you device,and check the result by run perl from console:
If u get the correct version info,u succeed ! Ref: (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |