prabhuk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I want to use perl on a target which runs on ARM-Linux. I am trying to cross-compile perl for arm-linux with "arm-none-linux-gnueabi-gcc" compiler. I am using perl-5.12.3. What are the steps to be followed? Thanks, Prabhu

Replies are listed 'Best First'.
Re: Cross compile perl for arm-linux
by jczeus (Monk) on Mar 30, 2017 at 08:52 UTC
    This is an old thread, but I successfully cross-compiled perl5.24.1 for ARM with perl-cross on github.
      Hey jczeus, Can you kindly post the steps you followed to build perl on arm Android. Is that Android M or N? I am right now going to start it and would be really helpful if you could share your steps Thanks
Re: Cross compile perl for arm-linux
by Anonymous Monk on May 12, 2011 at 09:36 UTC
    Read the README, namely, perl-5.12.3/Cross/README
      Hi Anonymous, I have tried "make patch" and it exited with the below message.
      [root@linuxpc Cross]# make patch cd .. ; if [ ! -e ./CROSS_PATCHED ] ; then \ patch -p1 < Cross/Makefile.SH.patch; \ patch -p1 < Cross/installperl.patch ; mv installperl installpe +rl-patched ; \ sed -e 's/XXSTRIPXX/arm-linux/' installperl-patched > installp +erl; \ touch CROSS_PATCHED ; fi [root@linuxpc Cross]#
      Any inputs on how to proceed?
        Any inputs on how to proceed?

        Normally

Re: Cross compile perl for arm-linux
by Khen1950fx (Canon) on May 12, 2011 at 12:55 UTC
    You might try passing some flags to Configure. For example:
    sh ./Configure -Dusecrosscompile -Dtargethost=<IP of ARM computer> -Dtargetuser=<user name> -Dtargetarch=arm-linux -Dcc=arm-linux-gcc -Dusrinc=</your/path-to/arm-none-linux-gnueabi/include/> -Dincpth=</your/path_to//arm-none-linux-gnueabi/include/> -Dlibpth=</your/path_to/lib> -Dtargetdir=</your/path_to/dir>
    You can get the CROSS/Readme here. There's also perl-cross-arm.
      Why go to some url when there is a Cross directory/readme in the perl tree?
      How would one cross compile if they already have a compiler for the target arch already setup on their system, so the building can be done locally and then copied later after the build to the intended system, instead of ssh'ing and building on the intended system?