develooper Front page | perl.perl5.porters | Postings from January 2013

Re: Cross-building and Makefile.SH

Thread Previous | Thread Next
Jess Robinson
January 8, 2013 09:53
Re: Cross-building and Makefile.SH
Message ID:
On Sun, 06 Jan 2013 13:50:42 -0000, Neil Williams <>  

> On Sun, 06 Jan 2013 00:01:21 -0000
> "Jess Robinson" <> wrote:
>> >> My branch now has a Configure which builds a miniperl (and
>> >> generate_uudmap) when cross compiling, and stores the path to them as
>> >> "hostperl" and "hostgenerate" in the The Makefile.SH then
>> >> uses
>> >> them if set, instead of building, by symlinking.
>> >>
>> >> I changed how you had it a bit, as the if/else logic is now outside  
>> of
>> >> the
>> >> makefile itself, rather than going into it.
>> >>
>> >> See attached, how does this look for you?
>> >
>> > I do get an amd64 host/miniperl with these options:
>> >
>> > LINE="-Dusecrosscompile -Dcrosscompileprefix=arm-linux-gnueabi"
>> > LINE=" ${LINE} -Dcc=arm-linux-gnueabi-gcc "
>> > LINE=" ${LINE} -Dtargetarch=armel -Dusedevel -Des -d"
>> > ./Configure ${LINE}
>> For the record my current options are: ./Configure -des -Dusedevel
>> -Dusecrosscompile -Dtargethost="emulator-5554"  
>> -Dtargetdir=/data/data/test
>> -Dsysroot=/usr/src/android/android-ndk-r8/platforms/android-8/arch-arm/
>> -Dcc=arm-linux-androideabi-gcc linux
>> targetarch/osname are derived from the gcc name as "linux-androideabi"
>> with these settings.
>> I dropped crosscompileprefix again, I'm now using the branch
>> which
>> doesn't have it.
>> > However, I don't actually get any cross-compilation in the branch - cc
>> > is still used instead of arm-linux-gnueabi-gcc and host/miniperl is  
>> not
>> > symlinked as ./miniperl (which is still an amd64 file).
>> Hmm, Do you have the resulting Makefile and available? It  
>> should
>> set "hostperl" to be host/miniperl, which ends up in the Makefile as
>> HOST_PERL, and when that's set, the MINIPERL_EXE rule should end up with
>> rm $MINIPERL_EXE; ln -s $HOST_PERL $MINIPERL_EXE much like yours did.
>> Maybe I have some bashisms in there too?
> Uploaded:
> Also the log from running the Configure and my option script.
> I should have some time to investigate further later in the week.

Thanks Neil, that's a bit odd. Did your previous, which gets  
loaded *after* hostperl and hostgenerate are set, already have empty  
values in for hostperl, hostgenerate? Try removing the first?  
This is probably also the reason that your CC value is not being used/set.

I should try and move the actual setting of these until after is  

I also notice you have an extra "linux" in your Configure options:
LINE="-des -Dusedevel -Dusecrosscompile "
LINE=" ${LINE} -Dcc=arm-linux-gnueabi-gcc linux"  <---
LINE=" ${LINE} -Dtargetarch=armel -Dtargethost=\"armel\""

Which is maybe why the targethost value is ignored, see "No targethost for  
running compiler tests against defined, running locally" in the log. Note  
that targethost is currently "a remote server/host to run small Configure  
tests on" in my branch. I should probably rename it to "buildhost" for  
less confusion.

Let me know if you get time to poke it further,


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