develooper Front page | perl.perl5.porters | Postings from March 2011

Cross-compiling perl

Alex Suykov
March 13, 2011 01:11
Cross-compiling perl
Message ID:
A little announcement, I guess it may be interesting for some people
on this list.

Some time ago I started working on an alternative configure/build system for
perl that would allow cross-compiling it in a manner similar to typical
autoconfed packages.

The project was announced in perl-dist about two years ago, but since then
there were lots of changes, the files were moved to another host etc.,
so I guess it's time to revive it a bit.

The package contains configure script, relevant Makefiles and several
files from the original perl package which I modified for various reasons.

To use, unpack over a clean perl-5.12.3 distribution.
Typical invocation for native build:

        ./configure --prefix=/usr
        make DESTDIR=... install

Typical invocation for cross-build:

        ./configure --target=$target --prefix=/usr
        make DESTDIR=... install

If you're lucky, that's all you need to perform a cross-build.

The key difference from the existing perl cross-compiling tools:
this script will try to generate for the target system,
without running anything on the target system.

Current status: configure implements most of the tests, including threads stuff.
The system allows building perl with dynamic or static XS modules from the
standard distribution. Installation works as well.
The system is mostly untested, but it still may be useful when for
the target platform is not available.

This script will only run on a moderately sane GNU system; for native builds
on exotic platforms, the original Configure should be preferred.

Feel free to send suggestions or bug reports.
I'm especially interested in any feedback on unusual target platforms, since
my own setup is somewhat limited (i686-pc-linux-gnu -> i586-pc-linux-uclibc). Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About