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

Re: Cross-building and Makefile.SH

Thread Previous | Thread Next
From:
Jess Robinson
Date:
December 18, 2012 13:24
Subject:
Re: Cross-building and Makefile.SH
Message ID:
op.wpikt5pl1zpo48@insel

Hi Neil,

On Thu, 13 Dec 2012 13:32:32 -0000, Neil Williams <codehelp@debian.org>  
wrote:

> 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.
>
> https://github.com/codehelp/perl-cross-debian
>
> The only upstream change is for Makefile.SH :
>
> https://github.com/codehelp/perl-cross-debian/blob/master/patches/5.14.2/cross-Makefile.diff

I haven't gotten to changing Makefile.SH yet, I've been doing the  
following:

1) Build a miniperl for the host system, in a separate host/ subdir (which  
has had ../Configure -Dmksymlinks run in it).
2) Ditto generate_uudmap
3) symlink/copy both of the above to the main dir which will build the  
cross-compiled Perl.
4) Build perl as otherwise normal.
(See https://github.com/castaway/perl/wiki which is, oops, slightly out of  
date, but more or less correct)

This currently fails at the point where it requires RUN_PERL, as I don't  
have a runnable one.

Your Makefile.SH patch looks like it makes a lot of sense for the  
miniperl/hostperl parts, I'll try applying it to my bleadperl. That will  
save me my extra manual symlinking/file copying.

I'd prefer the CROSS_PERL variable be named HOST_PERL or similar, since it  
sounds like its a cross-built perl at the moment, which is the opposite of  
the intention. Thinking a bit more about this on the fly, I'm going to  
need to detect and store (in %Config) a path-to-host-perl, which can be  
used for building / cross-compiling modules on the host for use on the  
target, later on. So I'll probably have it set RUN_PERL to that, if  
available, and you can stuff your detected Perl into the config.sh instead  
of passing it as an argument.

The only part I'm puzzling over is, what is the reason for:

+# Cross building requires a separate target to allow manipulation of the  
build tree
+extensions:     $(dynamic_ext) $(nonxs_ext)

Also I think I'll need to find a way to actually generate the uudmap +  
bitcount files, rather than ignore them and just steal the host ones.

Jess


Thread Previous | Thread Next


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