source: BOOK/temp-system/common/perl.xml@ 5351ae2

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 5351ae2 was 64105d1, checked in by Jim Gifford <clfs@…>, 19 years ago

r977@server (orig r975): jim | 2005-12-29 10:28:41 -0800

r1221@server: jim | 2005-12-29 10:28:11 -0800
Added CC=gcc to perl in temp-system to fix configure issue


  • 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">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>
32
33<screen os="d"><userinput>chmod 755 ext/util/make_ext
34cp ext/util/make_ext{,.orig}
35sed -e 's/miniperl/miniperl-cross/g' ext/util/make_ext.orig > ext/util/make_ext
36chmod 755 x2p/Makefile.SH
37cp x2p/Makefile.SH{,.orig}
38sed -e 's/miniperl/miniperl-cross/g' x2p/Makefile.SH.orig > x2p/Makefile.SH
39chmod 755 utils/Makefile
40cp utils/Makefile{,.orig}
41sed -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&mdash;they are all letters):</para>
45
46<screen os="f"><userinput>CC="gcc" ./configure.gnu --prefix=/tools -Dstatic_ext='Data/Dumper IO Fcntl POSIX'</userinput></screen>
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
65mv miniperl miniperl-cross
66make clean</userinput></screen>
67
68 <para os="j">We will now make perl cross-compile friendly by forcing it to use our
69 cross-tools we have created:</para>
70
71<screen os="k"><userinput>cp config.sh{,.orig}
72sed -e "s@\(^ar=\).*@\1'${AR}'@g" \
73 -e "s@\(^ranlib=\).*@\1'${RANLIB}'@g" \
74 -e "s@\(^cc=\).*@\1'${CC}'@g" \
75 -e "s@\(^ld=\).*@\1'${CC}'@g" config.sh.orig > config.sh</userinput></screen>
76
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}
84sed -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>
87
88<screen os="q"><userinput>make miniperl
89make perl utilities</userinput></screen>
90
91 <para os="r">Install these tools and their libraries:</para>
92
93<screen os="s"><userinput>cp perl pod/pod2man /tools/bin
94install -d /tools/lib/perl5/&perl-version;
95cp -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>
Note: See TracBrowser for help on using the repository browser.