[134ba96] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-temp-tools-perl" role="wrap">
|
---|
| 9 | <?dbhtml filename="perl.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Perl-&perl-version;</title>
|
---|
| 12 |
|
---|
| 13 | <indexterm zone="ch-temp-tools-perl">
|
---|
| 14 | <primary sortas="a-Perl">Perl</primary>
|
---|
| 15 | <secondary>temporary tools</secondary>
|
---|
| 16 | </indexterm>
|
---|
| 17 |
|
---|
| 18 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 19 | href="../../final-system/common/perl.xml"
|
---|
| 20 | xpointer="xpointer(//*[@role='package'])"/>
|
---|
| 21 |
|
---|
| 22 | <sect2 role="installation">
|
---|
| 23 | <title>Installation of Perl</title>
|
---|
| 24 |
|
---|
| 25 | <para os="a">First adapt some hard-wired paths to the C library by applying
|
---|
| 26 | the following patch:</para>
|
---|
| 27 |
|
---|
| 28 | <screen os="b"><userinput>patch -Np1 -i ../&perl-libc-patch;</userinput></screen>
|
---|
| 29 |
|
---|
| 30 | <para os="c">We will now make a change so we can make a cross-compiled version of
|
---|
| 31 | perl. We will change the permissions on the files we need to update, so we
|
---|
| 32 | can make a change. This change will rename miniperl to miniperl-cross:</para>
|
---|
| 33 |
|
---|
| 34 | <screen os="d"><userinput>chmod 755 ext/util/make_ext
|
---|
| 35 | cp ext/util/make_ext{,.orig}
|
---|
| 36 | sed -e 's/miniperl/miniperl-cross/g' ext/util/make_ext.orig > ext/util/make_ext
|
---|
| 37 | chmod 755 x2p/Makefile.SH
|
---|
| 38 | cp x2p/Makefile.SH{,.orig}
|
---|
| 39 | sed -e 's/miniperl/miniperl-cross/g' x2p/Makefile.SH.orig > x2p/Makefile.SH
|
---|
| 40 | chmod 755 utils/Makefile
|
---|
| 41 | cp utils/Makefile{,.orig}
|
---|
| 42 | sed -e 's/miniperl/miniperl-cross/g' utils/Makefile.orig > utils/Makefile</userinput></screen>
|
---|
| 43 |
|
---|
| 44 | <para os="e">Prepare Perl for compilation (make sure to get the 'Data/Dumper
|
---|
| 45 | IO Fcntl POSIX' part of the command correct—they are all letters):</para>
|
---|
| 46 |
|
---|
| 47 | <screen os="f"><userinput>./configure.gnu --prefix=/tools -Dstatic_ext='Data/Dumper IO Fcntl POSIX'</userinput></screen>
|
---|
| 48 |
|
---|
| 49 | <variablelist os="g">
|
---|
| 50 | <title>The meaning of the configure option:</title>
|
---|
| 51 |
|
---|
| 52 | <varlistentry>
|
---|
| 53 | <term><parameter>-Dstatic_ext='Data/Dumper IO Fcntl POSIX'</parameter></term>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>This tells Perl to build the minimum set of static
|
---|
| 56 | extensions needed for installing and testing the Coreutils
|
---|
| 57 | package in the next chapter.</para>
|
---|
| 58 | </listitem>
|
---|
| 59 | </varlistentry>
|
---|
| 60 |
|
---|
| 61 | </variablelist>
|
---|
| 62 |
|
---|
| 63 | <para os="h">We will now make a host miniperl and rename it to miniperl-cross:</para>
|
---|
| 64 |
|
---|
| 65 | <screen os="i"><userinput>make miniperl
|
---|
| 66 | mv miniperl miniperl-cross
|
---|
| 67 | make clean</userinput></screen>
|
---|
| 68 |
|
---|
[073be62] | 69 | <para os="j">We will now make perl cross-compile friendly by forcing it to use our
|
---|
[134ba96] | 70 | cross-tools we have created:</para>
|
---|
| 71 |
|
---|
[073be62] | 72 | <screen os="k"><userinput>cp config.sh{,.orig}
|
---|
[4590eeb] | 73 | sed -e "s@\(^ar=\).*@\1'${AR}'@g" \
|
---|
| 74 | -e "s@\(^ranlib=\).*@\1'${RANLIB}'@g" \
|
---|
[bd206a5] | 75 | -e "s@\(^cc=\).*@\1'${CC}'@g" \
|
---|
| 76 | -e "s@\(^ld=\).*@\1'${CC}'@g" config.sh.orig > config.sh</userinput></screen>
|
---|
[134ba96] | 77 |
|
---|
[073be62] | 78 | <para os="l">Now we will make miniperl for our architecture:</para>
|
---|
| 79 |
|
---|
| 80 | <screen os="m"><userinput>make miniperl</userinput></screen>
|
---|
| 81 |
|
---|
| 82 | <para os="n">We will now edit the main Makefile to use our newly created miniperl-cross:</para>
|
---|
| 83 |
|
---|
| 84 | <screen os="o"><userinput>cp Makefile{,.orig}
|
---|
| 85 | sed -e 's|(LDLIBPTH) ./miniperl|(LDLIBPTH) ./miniperl-cross|g' Makefile.orig > Makefile</userinput></screen>
|
---|
| 86 |
|
---|
| 87 | <para os="p">Now we are ready to make our cross-compiled perl:</para>
|
---|
[134ba96] | 88 |
|
---|
[073be62] | 89 | <screen os="q"><userinput>make miniperl
|
---|
[134ba96] | 90 | make perl utilities</userinput></screen>
|
---|
| 91 |
|
---|
[073be62] | 92 | <para os="r">Install these tools and their libraries:</para>
|
---|
[134ba96] | 93 |
|
---|
[073be62] | 94 | <screen os="s"><userinput>cp perl pod/pod2man /tools/bin
|
---|
[134ba96] | 95 | install -d /tools/lib/perl5/&perl-version;
|
---|
| 96 | cp -R lib/* /tools/lib/perl5/&perl-version;</userinput></screen>
|
---|
| 97 |
|
---|
| 98 | </sect2>
|
---|
| 99 |
|
---|
| 100 | <sect2 role="content">
|
---|
| 101 | <title/>
|
---|
| 102 |
|
---|
| 103 | <para>Details on this package are located in <xref
|
---|
| 104 | linkend="contents-perl" role="."/></para>
|
---|
| 105 |
|
---|
| 106 | </sect2>
|
---|
| 107 |
|
---|
| 108 | </sect1>
|
---|