Cross-Compiling Perl

Ken Moffat ken at
Wed Dec 28 13:27:28 PST 2005

On Wed, 28 Dec 2005, Joe Ciccone wrote:

> In my current build x86 -> x86_64 multilib the instructions that the
> book provide do not correctly cross-compile perl, After playin with it
> for a bit i ended up with the script below. I would like some opinions
> and ideas on how i can change or improve these instructions before I put
> them in the book.

  Thanks Joe, but not there yet.  My somewhat-delayed test build for x86 
from x86_64-64 has just got to perl (for the moment, using my patch to 
revert the 2005-11-05 init_array/fini_array stuff, only needed for the 
glibc headers), and died in the book's ./configure.gnu (it decided to 
include /usr/local and -ldb, probably because the host has Berkeley db - 
that ain't gonna work in a cross-compile).

  Your version gets further, but then dies with

Extracting config.h (with variable substitutions)
`sh  cflags "optimize='-O2'" perlmain.o`  perlmain.c
           CCCMD =   -DPERL_CORE -c  -O2
/bin/sh: -c: command not found
make: *** [perlmain.o] Error 127

  At the moment, I've no idea what is going on here (like most people, 
perl's configury does my head in).  Any ideas ?

  Alternatively, perhaps somebody (Jim?) would like to explain the 
benefits of cross-compiling perl when we are only going to use it as a 
test-tool ?  Thanks.

  das eine Mal als Tragödie, das andere Mal als Farce

More information about the cross-lfs mailing list