source: temp-system/common/perl.xml@ 5328cc9

Last change on this file since 5328cc9 was b6f7e53, checked in by Jim Gifford <clfs@…>, 19 years ago

r928@server (orig r926): jim | 2005-12-19 23:13:10 -0800

r1112@server: jim | 2005-12-19 09:05:55 -0800
Updated sed for perl change


  • Property mode set to 100644
File size: 3.7 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 edit the main Makefile to use our newly created miniperl-cross:</para>
70
71<screen os="k"><userinput>cp Makefile{,.orig}
72sed -e 's|(LDLIBPTH) ./miniperl|(LDLIBPTH) ./miniperl-cross|g' Makefile.orig > Makefile</userinput></screen>
73
74 <para os="l">We will now make perl cross-compile friendly by forcing it to use our
75 cross-tools we have created:</para>
76
77<screen os="m"><userinput>cp config.sh{,.orig}
78sed -e "s@\(^ar=\).*@\1'${AR}'@g" \
79 -e "s@\(^ranlib=\).*@\1'${RANLIB}'@g" \
80 -e "s@\(^cc=\).*@\1'${CC} ${BUILD32}'@g" \
81 -e "s@\(^ld=\).*@\1'${CC} ${BUILD32}'@g" config.sh.orig > config.sh</userinput></screen>
82
83 <para os="n">Now we are ready to make our cross-compiled perl:</para>
84
85<screen os="o"><userinput>make miniperl
86make perl utilities</userinput></screen>
87
88 <para os="p">Install these tools and their libraries:</para>
89
90<screen os="q"><userinput>cp perl pod/pod2man /tools/bin
91install -d /tools/lib/perl5/&perl-version;
92cp -R lib/* /tools/lib/perl5/&perl-version;</userinput></screen>
93
94 </sect2>
95
96 <sect2 role="content">
97 <title/>
98
99 <para>Details on this package are located in <xref
100 linkend="contents-perl" role="."/></para>
101
102 </sect2>
103
104</sect1>
Note: See TracBrowser for help on using the repository browser.