develooper Front page | perl.perl5.porters | Postings from December 2012

Cross-building and Makefile.SH

Thread Next
Neil Williams
December 13, 2012 13:32
Cross-building and Makefile.SH
Message ID:
There is outline cross-build support already in perl but this appears
outdated. In Debian, I've been working on updating the existing
cross-building support from old versions of perl to the current major
release. The principle need is to support porting perl to new
architectures where an initial cross-build is necessary to provide a
platform to prepare a native build environment, not just for perl but
for a full bootstrap environment.

The only upstream change is for Makefile.SH :

This patch was developed for perl 5.12 and I've applied it to 5.14 and
5.16 with successful results.

The hard part is that full testing of a cross-build depends on the full
distro configuration, so doing a full test of the patch on 5.17 isn't

The history of these patches in Debian is recorded in #633884 and the
related #285559:

The principle emphasis is to allow the use of the host perl interpreter
instead of miniperl and is activated simply by passing an environment
variable to $(MAKE) with the path to the native perl interpreter.

To actually make the cross-compile work, the config.h and
files need to be cached from a native build for the same architecture
or ported from a similar architecture and for each variant of the perl
build: static, debug and shared. This stage is highly
configuration-dependent and I've only done this stage for the Debian

This part of the work is done by a separate package - perl-cross-debian
- which I will be maintaining for Debian. I'm hoping that the data
collected by the long term maintenance of cross-building support for
perl in Debian will help others use similar mechanisms for other

I'm willing to provide documentation, if appropriate.

Would these changes be suitable for the next perl major release?


Neil Williams

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About