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

Cross-compiling perl

From:
Alex Suykov
Date:
March 13, 2011 01:11
Subject:
Cross-compiling perl
Message ID:
20110313091057.GA28815@versa.bugs
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.

	http://prdownload.berlios.de/perlcross/perl-5.12.3-cross-0.4.tar.gz

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
        make DESTDIR=... install

Typical invocation for cross-build:

        ./configure --target=$target --prefix=/usr
        make
        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 config.sh 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 config.sh 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).



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About