[5be6331] | 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 |
|
---|
[cbfa0a3] | 30 | <para os="c">Now make a change to allow the creation of a cross-compiled version of
|
---|
| 31 | perl. This change will rename miniperl to miniperl-cross. The files that need to be modified also need their permissions changed:</para>
|
---|
[5be6331] | 32 |
|
---|
| 33 | <screen os="d"><userinput>chmod 755 ext/util/make_ext
|
---|
| 34 | cp ext/util/make_ext{,.orig}
|
---|
| 35 | sed -e 's/miniperl/miniperl-cross/g' ext/util/make_ext.orig > ext/util/make_ext
|
---|
| 36 | chmod 755 x2p/Makefile.SH
|
---|
| 37 | cp x2p/Makefile.SH{,.orig}
|
---|
| 38 | sed -e 's/miniperl/miniperl-cross/g' x2p/Makefile.SH.orig > x2p/Makefile.SH
|
---|
| 39 | chmod 755 utils/Makefile
|
---|
| 40 | cp utils/Makefile{,.orig}
|
---|
| 41 | sed -e 's/miniperl/miniperl-cross/g' utils/Makefile.orig > utils/Makefile</userinput></screen>
|
---|
| 42 |
|
---|
| 43 | <para os="e">Prepare Perl for compilation (make sure to get the 'Data/Dumper
|
---|
| 44 | IO Fcntl POSIX' part of the command correct—they are all letters):</para>
|
---|
| 45 |
|
---|
[51bfc04] | 46 | <screen os="f"><userinput>CC="gcc" ./configure.gnu --prefix=/tools -Dstatic_ext='Data/Dumper IO Fcntl POSIX'</userinput></screen>
|
---|
[5be6331] | 47 |
|
---|
| 48 | <variablelist os="g">
|
---|
| 49 | <title>The meaning of the configure option:</title>
|
---|
| 50 |
|
---|
| 51 | <varlistentry>
|
---|
| 52 | <term><parameter>-Dstatic_ext='Data/Dumper IO Fcntl POSIX'</parameter></term>
|
---|
| 53 | <listitem>
|
---|
| 54 | <para>This tells Perl to build the minimum set of static
|
---|
| 55 | extensions needed for installing and testing the Coreutils
|
---|
| 56 | package in the next chapter.</para>
|
---|
| 57 | </listitem>
|
---|
| 58 | </varlistentry>
|
---|
| 59 |
|
---|
| 60 | </variablelist>
|
---|
| 61 |
|
---|
| 62 | <para os="h">We will now make a host miniperl and rename it to miniperl-cross:</para>
|
---|
| 63 |
|
---|
| 64 | <screen os="i"><userinput>make miniperl
|
---|
| 65 | mv miniperl miniperl-cross
|
---|
| 66 | make clean</userinput></screen>
|
---|
| 67 |
|
---|
[73fdcb6] | 68 | <para os="j">We will now make perl cross-compile friendly by forcing it to use our
|
---|
[5be6331] | 69 | cross-tools we have created:</para>
|
---|
| 70 |
|
---|
[73fdcb6] | 71 | <screen os="k"><userinput>cp config.sh{,.orig}
|
---|
[b6f7e53] | 72 | sed -e "s@\(^ar=\).*@\1'${AR}'@g" \
|
---|
| 73 | -e "s@\(^ranlib=\).*@\1'${RANLIB}'@g" \
|
---|
[c8819a6] | 74 | -e "s@\(^cc=\).*@\1'${CC}'@g" \
|
---|
| 75 | -e "s@\(^ld=\).*@\1'${CC}'@g" config.sh.orig > config.sh</userinput></screen>
|
---|
[5be6331] | 76 |
|
---|
[73fdcb6] | 77 | <para os="l">Now we will make miniperl for our architecture:</para>
|
---|
| 78 |
|
---|
| 79 | <screen os="m"><userinput>make miniperl</userinput></screen>
|
---|
| 80 |
|
---|
| 81 | <para os="n">We will now edit the main Makefile to use our newly created miniperl-cross:</para>
|
---|
| 82 |
|
---|
| 83 | <screen os="o"><userinput>cp Makefile{,.orig}
|
---|
| 84 | sed -e 's|(LDLIBPTH) ./miniperl|(LDLIBPTH) ./miniperl-cross|g' Makefile.orig > Makefile</userinput></screen>
|
---|
| 85 |
|
---|
| 86 | <para os="p">Now we are ready to make our cross-compiled perl:</para>
|
---|
[5be6331] | 87 |
|
---|
[73fdcb6] | 88 | <screen os="q"><userinput>make miniperl
|
---|
[5be6331] | 89 | make perl utilities</userinput></screen>
|
---|
| 90 |
|
---|
[73fdcb6] | 91 | <para os="r">Install these tools and their libraries:</para>
|
---|
[5be6331] | 92 |
|
---|
[73fdcb6] | 93 | <screen os="s"><userinput>cp perl pod/pod2man /tools/bin
|
---|
[5be6331] | 94 | install -d /tools/lib/perl5/&perl-version;
|
---|
| 95 | cp -R lib/* /tools/lib/perl5/&perl-version;</userinput></screen>
|
---|
| 96 |
|
---|
| 97 | </sect2>
|
---|
| 98 |
|
---|
| 99 | <sect2 role="content">
|
---|
| 100 | <title/>
|
---|
| 101 |
|
---|
| 102 | <para>Details on this package are located in <xref
|
---|
| 103 | linkend="contents-perl" role="."/></para>
|
---|
| 104 |
|
---|
| 105 | </sect2>
|
---|
| 106 |
|
---|
| 107 | </sect1>
|
---|