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

Re: Cross-building and Makefile.SH

Thread Previous | Thread Next
Jess Robinson
December 18, 2012 13:24
Re: Cross-building and Makefile.SH
Message ID:

Hi Neil,

On Thu, 13 Dec 2012 13:32:32 -0000, Neil Williams <>  

> 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 :

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

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 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 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.


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