%general-entities; ]> Perl-&perl-version; Perl temporary tools Installation of Perl First adapt some hard-wired paths to the C library by applying the following patch: patch -Np1 -i ../&perl-libc-patch; We will now make a change so we can make a cross-compiled version of perl. We will change the permissions on the files we need to update, so we can make a change. This change will rename miniperl to miniperl-cross: chmod 755 ext/util/make_ext cp ext/util/make_ext{,.orig} sed -e 's/miniperl/miniperl-cross/g' ext/util/make_ext.orig > ext/util/make_ext chmod 755 x2p/Makefile.SH cp x2p/Makefile.SH{,.orig} sed -e 's/miniperl/miniperl-cross/g' x2p/Makefile.SH.orig > x2p/Makefile.SH chmod 755 utils/Makefile cp utils/Makefile{,.orig} sed -e 's/miniperl/miniperl-cross/g' utils/Makefile.orig > utils/Makefile Prepare Perl for compilation (make sure to get the 'Data/Dumper IO Fcntl POSIX' part of the command correct—they are all letters): ./configure.gnu --prefix=/tools -Dstatic_ext='Data/Dumper IO Fcntl POSIX' The meaning of the configure option: -Dstatic_ext='Data/Dumper IO Fcntl POSIX' This tells Perl to build the minimum set of static extensions needed for installing and testing the Coreutils package in the next chapter. We will now make a host miniperl and rename it to miniperl-cross: make miniperl mv miniperl miniperl-cross make clean We will now make perl cross-compile friendly by forcing it to use our cross-tools we have created: cp config.sh{,.orig} sed -e "s@\(^ar=\).*@\1'${AR}'@g" \ -e "s@\(^ranlib=\).*@\1'${RANLIB}'@g" \ -e "s@\(^cc=\).*@\1'${CC}'@g" \ -e "s@\(^ld=\).*@\1'${CC}'@g" config.sh.orig > config.sh Now we will make miniperl for our architecture: make miniperl We will now edit the main Makefile to use our newly created miniperl-cross: cp Makefile{,.orig} sed -e 's|(LDLIBPTH) ./miniperl|(LDLIBPTH) ./miniperl-cross|g' Makefile.orig > Makefile Now we are ready to make our cross-compiled perl: make miniperl make perl utilities Install these tools and their libraries: cp perl pod/pod2man /tools/bin install -d /tools/lib/perl5/&perl-version; cp -R lib/* /tools/lib/perl5/&perl-version; <para>Details on this package are located in <xref linkend="contents-perl" role="."/></para> </sect2> </sect1>