source: temp-system/common/perl.xml@ 10c15e3

Last change on this file since 10c15e3 was c8819a6, checked in by Jim Gifford <clfs@…>, 19 years ago

r960@server (orig r958): jim | 2005-12-23 21:29:31 -0800

r1188@server: jim | 2005-12-23 21:29:15 -0800
Fixed typos reported by Chris Staub. Thank You


  • Property mode set to 100644
File size: 3.8 KB
Line 
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
35cp ext/util/make_ext{,.orig}
36sed -e 's/miniperl/miniperl-cross/g' ext/util/make_ext.orig > ext/util/make_ext
37chmod 755 x2p/Makefile.SH
38cp x2p/Makefile.SH{,.orig}
39sed -e 's/miniperl/miniperl-cross/g' x2p/Makefile.SH.orig > x2p/Makefile.SH
40chmod 755 utils/Makefile
41cp utils/Makefile{,.orig}
42sed -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&mdash;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
66mv miniperl miniperl-cross
67make clean</userinput></screen>
68
69 <para os="j">We will now make perl cross-compile friendly by forcing it to use our
70 cross-tools we have created:</para>
71
72<screen os="k"><userinput>cp config.sh{,.orig}
73sed -e "s@\(^ar=\).*@\1'${AR}'@g" \
74 -e "s@\(^ranlib=\).*@\1'${RANLIB}'@g" \
75 -e "s@\(^cc=\).*@\1'${CC}'@g" \
76 -e "s@\(^ld=\).*@\1'${CC}'@g" config.sh.orig > config.sh</userinput></screen>
77
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}
85sed -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>
88
89<screen os="q"><userinput>make miniperl
90make perl utilities</userinput></screen>
91
92 <para os="r">Install these tools and their libraries:</para>
93
94<screen os="s"><userinput>cp perl pod/pod2man /tools/bin
95install -d /tools/lib/perl5/&perl-version;
96cp -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>
Note: See TracBrowser for help on using the repository browser.