Changeset 673b0d8 for chapter05


Ignore:
Timestamp:
05/03/2004 10:59:46 AM (20 years ago)
Author:
Matthew Burgess <matthew@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
0c43171, 2ec64b3, a4a675f
Parents:
287ea55
Message:
  • Merged newxml into HEAD

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3435 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Location:
chapter05
Files:
5 added
25 edited
1 moved

Legend:

Unmodified
Added
Removed
  • chapter05/bash.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-bash">
    2 <title>Installing Bash-&bash-version;</title>
    3 <?dbhtml filename="bash.html" dir="chapter05"?>
     7<title>Bash-&bash-version;</title>
     8<?dbhtml filename="bash.html"?>
    49
    5 <screen>&buildtime; &bash-time-tools;
    6 &diskspace; &bash-compsize-tools;</screen>
     10<indexterm zone="ch-tools-bash">
     11<primary sortas="a-Bash">Bash</primary>
     12<secondary>tools</secondary></indexterm>
    713
    8 &aa-bash-down;
    9 &aa-bash-dep;
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bash.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     16<screen>&buildtime; 1.2 SBU
     17&diskspace; 27 MB</screen>
     18
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bash.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1221
    1322<sect2>
     
    1726patch:</para>
    1827
    19 <screen><userinput>patch -Np1 -i ../&bash-patch;</userinput></screen>
     28<screen><userinput>patch -Np1 -i ../bash-&bash-version;-2.patch</userinput></screen>
    2029
    2130<para>Now prepare Bash for compilation:</para>
     
    4150</sect2>
    4251
    43 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     52<sect2><title> </title><para> </para>
    4453<para>The details on this package are found in <xref linkend="contents-bash"/>.</para>
    45 <para>&nbsp;</para></sect2>
     54<para> </para></sect2>
    4655
    4756</sect1>
    48 
  • chapter05/binutils-pass1.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-binutils-pass1">
    2 <title>Installing Binutils-&binutils-version; - Pass 1</title>
    3 <?dbhtml filename="binutils-pass1.html" dir="chapter05"?>
     7<title>Binutils-&binutils-version; - Pass 1</title>
     8<?dbhtml filename="binutils-pass1.html"?>
    49
    5 <screen>&buildtime; &binutils-time-tools-pass1;
    6 &diskspace; &binutils-compsize-tools-pass1;</screen>
     10<indexterm zone="ch-tools-binutils-pass1">
     11<primary sortas="a-Binutils">Binutils</primary>
     12<secondary>tools, pass 1</secondary></indexterm>
    713
    8 &aa-binutils-down;
    9 &aa-binutils-dep;
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/binutils.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     16<screen>&buildtime; 1.0 SBU
     17&diskspace; 194 MB</screen>
     18
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/binutils.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1221
    1322<sect2>
     
    2231<emphasis>-mcpu</emphasis> options). Therefore, if you have defined any
    2332environment variables that override default optimizations, such as CFLAGS and
    24 CXXFLAGS, we recommend unsetting them when building Binutils.</para>
     33CXXFLAGS, we recommend un-setting them when building Binutils.</para>
    2534
    2635<para>The Binutils documentation recommends building Binutils outside of the
     
    3241<note><para>If you want the SBU values listed in the rest of the book to be of
    3342any use, you will have to measure the time it takes to build this package --
    34 from the configuration upto and including the first install. To achieve this
     43from the configuration up to and including the first install. To achieve this
    3544easily, you could wrap the four commands in a <command>time</command> command
    3645like this: <userinput>time { ./configure ... &amp;&amp; ... &amp;&amp; ...
     
    3948<para>Now prepare Binutils for compilation:</para>
    4049
    41 <screen><userinput>../&binutils-dir;/configure --prefix=/tools --disable-nls</userinput></screen>
     50<screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools --disable-nls</userinput></screen>
    4251
    4352<para>The meaning of the configure options:</para>
     
    8089second.</para>
    8190
    82 <para>And install the package:</para>
     91<para>Now install the package:</para>
    8392
    8493<screen><userinput>make install</userinput></screen>
    8594
    86 <para>Now prepare the linker for the "Adjusting" phase later on:</para>
     95<para>Now prepare the linker for the <quote>Adjusting</quote> phase later on:</para>
    8796
    8897<screen><userinput>make -C ld clean
     
    93102<itemizedlist>
    94103<listitem><para><userinput>-C ld clean</userinput>: This tells the make program
    95 to remove all the compiled files in the <filename
    96 class="directory">ld</filename> subdirectory.</para></listitem>
     104to remove all the compiled files in the <filename class="directory">ld</filename> subdirectory.</para></listitem>
    97105
    98106<listitem><para><userinput>-C ld LDFLAGS="-all-static"
     
    105113</itemizedlist>
    106114
    107 <!-- HACK - Force some whitespace to appease tidy -->
    108 <literallayout></literallayout>
    109115
    110116<warning><para><emphasis>Do not yet remove</emphasis> the Binutils build and
     
    112118further on in this chapter.</para></warning>
    113119
    114 <!-- HACK - Force some whitespace to appease tidy -->
    115 <literallayout></literallayout>
    116120
    117121</sect2>
    118122
    119 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     123<sect2><title> </title><para> </para>
    120124<para>The details on this package are found in <xref linkend="contents-binutils"/>.</para>
    121 <para>&nbsp;</para></sect2>
     125<para> </para></sect2>
    122126
    123127</sect1>
    124 
  • chapter05/binutils-pass2.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-binutils-pass2">
    2 <title>Installing Binutils-&binutils-version; - Pass 2</title>
    3 <?dbhtml filename="binutils-pass2.html" dir="chapter05"?>
     7<title>Binutils-&binutils-version; - Pass 2</title>
     8<?dbhtml filename="binutils-pass2.html"?>
    49
    5 <screen>&buildtime; &binutils-time-tools-pass2;
    6 &diskspace; &binutils-compsize-tools-pass2;</screen>
     10<indexterm zone="ch-tools-binutils-pass2">
     11<primary sortas="a-Binutils">Binutils</primary>
     12<secondary>tools, pass 2</secondary></indexterm>
    713
    8 &aa-binutils-down;
    9 &aa-binutils-dep;
     14<screen>&buildtime; 1.5 SBU
     15&diskspace; 108 MB</screen>
    1016
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
    1217
    1318<sect2>
     
    2126<para>Now prepare Binutils for compilation:</para>
    2227
    23 <screen><userinput>../&binutils-dir;/configure --prefix=/tools \
    24 &nbsp;&nbsp;&nbsp;&nbsp;--enable-shared --with-lib-path=/tools/lib</userinput></screen>
     28<screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \
     29    --enable-shared --with-lib-path=/tools/lib</userinput></screen>
    2530
    2631<para>The meaning of the new configure option:</para>
     
    6570make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen>
    6671
    67 <!-- HACK - Force some whitespace to appease tidy -->
    68 <literallayout></literallayout>
    6972
    7073<warning><para><emphasis>Do not yet remove</emphasis> the Binutils source and
     
    7275in the state they are in now.</para></warning>
    7376
    74 <!-- HACK - Force some whitespace to appease tidy -->
    75 <literallayout></literallayout>
    7677
    7778</sect2>
    7879
    79 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     80<sect2><title> </title><para> </para>
    8081<para>The details on this package are found in <xref linkend="contents-binutils"/>.</para>
    81 <para>&nbsp;</para></sect2>
     82<para> </para></sect2>
    8283
    8384</sect1>
    84 
  • chapter05/bzip2.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-bzip2">
    2 <title>Installing Bzip2-&bzip2-version;</title>
    3 <?dbhtml filename="bzip2.html" dir="chapter05"?>
     7<title>Bzip2-&bzip2-version;</title>
     8<?dbhtml filename="bzip2.html"?>
    49
    5 <screen>&buildtime; &bzip2-time-tools;
    6 &diskspace; &bzip2-compsize-tools;</screen>
     10<indexterm zone="ch-tools-bzip2">
     11<primary sortas="a-Bzip2">Bzip2</primary>
     12<secondary>tools</secondary></indexterm>
    713
    8 &aa-bzip2-down;
    9 &aa-bzip2-dep;
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bzip2.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     16<screen>&buildtime; 0.1 SBU
     17&diskspace; 2.5 MB</screen>
     18
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bzip2.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1221
    1322<sect2>
     
    2130</sect2>
    2231
    23 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     32<sect2><title> </title><para> </para>
    2433<para>The details on this package are found in <xref linkend="contents-bzip2"/>.</para>
    25 <para>&nbsp;</para></sect2>
     34<para> </para></sect2>
    2635
    2736</sect1>
    28 
  • chapter05/chapter05.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<chapter id="chapter-temporary-tools" xreflabel="Chapter 5">
     7<?dbhtml dir="chapter05"?>
    28<title>Constructing a temporary system</title>
    3 <?dbhtml filename="chapter05.html" dir="chapter05"?>
     9<?dbhtml filename="chapter05.html"?>
    410
    5 
    6 <sect1 id="ch-tools-introduction">
    7 <title>Introduction</title>
    8 <?dbhtml filename="introduction.html" dir="chapter05"?>
    9 
    10 <para>In this chapter we will compile and install a minimal
    11 Linux system. This system will contain just enough tools to be able
    12 to start constructing the final LFS system in the next chapter.</para>
    13 
    14 <para>The building of this minimal system is done in two steps: first we
    15 build a brand-new and host-independent toolchain (compiler, assembler,
    16 linker and libraries), and then use this to build all the other essential
    17 tools.</para>
    18 
    19 <para>The files compiled in this chapter will be installed under the
    20 <filename class="directory">$LFS/tools</filename> directory
    21 to keep them separate from the files installed in the next chapter.
    22 Since the packages compiled here are merely temporary, we don't want
    23 them to pollute the soon-to-be LFS system.</para>
    24 
    25 <para>Before issuing the build instructions for a package you are expected to
    26 have already unpacked it as user <emphasis>lfs</emphasis>, and to have
    27 performed a <userinput>cd</userinput> into the created directory. The build
    28 instructions assume that you are using the <command>bash</command>
    29 shell.</para>
    30 
    31 <para>Several of the packages are patched before compilation, but only when
    32 the patch is needed to circumvent a problem. Often the patch is needed in
    33 both this and the next chapter, but sometimes in only one of them. Therefore,
    34 don't worry when instructions for a downloaded patch seem to be missing. Also,
    35 when applying a patch, you'll occasionally see warning messages about
    36 <emphasis>offset</emphasis> or <emphasis>fuzz</emphasis>. These warnings are
    37 nothing to worry about, as the patch was still successfully applied.</para>
    38 
    39 <para>During the compilation of most packages you will see many warnings
    40 scroll by on your screen. These are normal and can safely be ignored. They are
    41 just what they say they are: warnings -- mostly about deprecated, but not
    42 invalid, use of the C or C++ syntax. It's just that C standards have changed
    43 rather often and some packages still use the older standard, which is not
    44 really a problem.</para>
    45 
    46 <para>After installing each package you should delete its source and build
    47 directories, <emphasis>unless</emphasis> told otherwise. Deleting the sources
    48 saves space, but also prevents misconfiguration when the same package is
    49 reinstalled further on. Only for three packages you will need to keep the
    50 source and build directories around for a while, so their contents can be used
    51 by later commands. Do not miss the reminders.</para>
    52 
    53 </sect1>
    54 
    55 
    56 <sect1 id="tools-technicalnotes">
    57 <title>Technical notes</title>
    58 <?dbhtml filename="technicalnotes.html" dir="chapter05"?>
    59 
    60 <para>This section attempts to explain some of the rationale and technical
    61 details behind the overall build method. It's not essential that you understand
    62 everything here immediately. Most of it will make sense once you have performed
    63 an actual build. Feel free to refer back here at any time.</para>
    64 
    65 <para>The overall goal of <xref linkend="chapter-temporary-tools"/> is to provide a sane,
    66 temporary environment that we can chroot into, and from which we can produce a
    67 clean, trouble-free build of the target LFS system in
    68 <xref linkend="chapter-building-system"/>. Along the way, we attempt to divorce ourselves
    69 from the host system as much as possible, and in so doing build a
    70 self-contained and self-hosted toolchain. It should be noted that the
    71 build process has been designed in such a way so as to minimize the risks for
    72 new readers and provide maximum educational value at the same time. In other
    73 words, more advanced techniques could be used to build the system.</para>
    74 
    75 <important>
    76 <para>Before continuing, you really should be aware of the name of your working
    77 platform, often also referred to as the <emphasis>target triplet</emphasis>. For
    78 many folks the target triplet will probably be
    79 <emphasis>i686-pc-linux-gnu</emphasis>. A simple way to determine your target
    80 triplet is to run the <filename>config.guess</filename> script that comes with
    81 the source for many packages. Unpack the Binutils sources and run the script:
    82 <userinput>./config.guess</userinput> and note the output.</para>
    83 
    84 <para>You'll also need to be aware of the name of your platform's
    85 <emphasis>dynamic linker</emphasis>, often also referred to as the
    86 <emphasis>dynamic loader</emphasis>, not to be confused with the standard linker
    87 <emphasis>ld</emphasis> that is part of Binutils. The dynamic linker is provided
    88 by Glibc and has the job of finding and loading the shared libraries needed by a
    89 program, preparing the program to run and then running it. For most folks the
    90 name of the dynamic linker will be <emphasis>ld-linux.so.2</emphasis>. On
    91 platforms that are less prevalent, the name might be
    92 <emphasis>ld.so.1</emphasis> and newer 64 bit platforms might even have
    93 something completely different. You should be able to determine the name
    94 of your platform's dynamic linker by looking in the
    95 <filename class="directory">/lib</filename> directory on your host system. A
    96 surefire way is to inspect a random binary from your host system by running:
    97 <userinput>readelf -l &lt;name of binary&gt; | grep interpreter</userinput>
    98 and noting the output. The authoritative reference covering all platforms is in
    99 the <filename>shlib-versions</filename> file in the root of the Glibc source
    100 tree.</para>
    101 </important>
    102 
    103 <para>Some key technical points of how the <xref linkend="chapter-temporary-tools"/> build
    104 method works:</para>
    105 
    106 <itemizedlist>
    107 <listitem><para>Similar in principle to cross compiling whereby tools installed
    108 into the same prefix work in cooperation and thus utilize a little GNU
    109 "magic".</para></listitem>
    110 
    111 <listitem><para>Careful manipulation of the standard linker's library search
    112 path to ensure programs are linked only against libraries we
    113 choose.</para></listitem>
    114 
    115 <listitem><para>Careful manipulation of <command>gcc</command>'s
    116 <emphasis>specs</emphasis> file to tell the compiler which target dynamic
    117 linker will be used.</para></listitem>
    118 </itemizedlist>
    119 
    120 <para>Binutils is installed first because both GCC and Glibc perform various
    121 feature tests on the assembler and linker during their respective runs of
    122 <command>./configure</command> to determine which software features to enable
    123 or disable. This is more important than one might first realize. An incorrectly
    124 configured GCC or Glibc can result in a subtly broken toolchain where the impact
    125 of such breakage might not show up until near the end of the build of a whole
    126 distribution. Thankfully, a test suite failure will usually alert us before too
    127 much time is wasted.</para>
    128 
    129 <para>Binutils installs its assembler and linker into two locations,
    130 <filename class="directory">/tools/bin</filename> and
    131 <filename class="directory">/tools/$TARGET_TRIPLET/bin</filename>. In reality,
    132 the tools in one location are hard linked to the other. An important facet of
    133 the linker is its library search order. Detailed information can be obtained
    134 from <command>ld</command> by passing it the <emphasis>--verbose</emphasis>
    135 flag. For example: <command>ld --verbose | grep SEARCH</command> will
    136 show you the current search paths and their order. You can see what files are
    137 actually linked by <command>ld</command> by compiling a dummy program and
    138 passing the <emphasis>--verbose</emphasis> switch to the linker. For example:
    139 <command>gcc dummy.c -Wl,--verbose 2>&amp;1 | grep succeeded</command>
    140 will show you all the files successfully opened during the linking.</para>
    141 
    142 <para>The next package installed is GCC and during its run of
    143 <command>./configure</command> you'll see, for example:</para>
    144 
    145 <blockquote><screen>checking what assembler to use... /tools/i686-pc-linux-gnu/bin/as
    146 checking what linker to use... /tools/i686-pc-linux-gnu/bin/ld</screen></blockquote>
    147 
    148 <para>This is important for the reasons mentioned above. It also demonstrates
    149 that GCC's configure script does not search the PATH directories to find which
    150 tools to use. However, during the actual operation of <command>gcc</command>
    151 itself, the same search paths are not necessarily used. You can find out which
    152 standard linker <command>gcc</command> will use by running:
    153 <command>gcc -print-prog-name=ld</command>.
    154 Detailed information can be obtained from <command>gcc</command> by passing
    155 it the <emphasis>-v</emphasis> flag while compiling a dummy program. For
    156 example: <command>gcc -v dummy.c</command> will show you detailed
    157 information about the preprocessor, compilation and assembly stages, including
    158 <command>gcc</command>'s include search paths and their order.</para>
    159  
    160 <para>The next package installed is Glibc. The most important considerations for
    161 building Glibc are the compiler, binary tools and kernel headers. The compiler
    162 is generally no problem as Glibc will always use the <command>gcc</command>
    163 found in a PATH directory. The binary tools and kernel headers can be a little
    164 more troublesome. Therefore we take no risks and use the available configure
    165 switches to enforce the correct selections. After the run of
    166 <command>./configure</command> you can check the contents of the
    167 <filename>config.make</filename> file in the
    168 <filename class="directory">glibc-build</filename> directory for all the
    169 important details. You'll note some interesting items like the use of
    170 <emphasis>CC="gcc -B/tools/bin/"</emphasis> to control which binary tools are
    171 used, and also the use of the <emphasis>-nostdinc</emphasis> and
    172 <emphasis>-isystem</emphasis> flags to control the compiler's include search
    173 path. These items help to highlight an important aspect of the Glibc package:
    174 it is very self-sufficient in terms of its build machinery and generally does
    175 not rely on toolchain defaults.</para>
    176 
    177 <para>After the Glibc installation, we make some adjustments to ensure that
    178 searching and linking take place only within our <filename>/tools</filename>
    179 prefix. We install an adjusted <command>ld</command>, which has a hard-wired
    180 search path limited to <filename class="directory">/tools/lib</filename>. Then
    181 we amend <command>gcc</command>'s specs file to point to our new dynamic
    182 linker in <filename class="directory">/tools/lib</filename>. This last step is
    183 <emphasis>vital</emphasis> to the whole process. As mentioned above, a
    184 hard-wired path to a dynamic linker is embedded into every ELF shared
    185 executable. You can inspect this by running:
    186 <command>readelf -l &lt;name of binary&gt; | grep interpreter</command>.
    187 By amending <command>gcc</command>'s specs file, we are ensuring that every
    188 program compiled from here through the end of this chapter will use our new
    189 dynamic linker in <filename class="directory">/tools/lib</filename>.</para>
    190 
    191 <para>The need to use the new dynamic linker is also the reason why we apply the
    192 Specs patch for the second pass of GCC. Failure to do so will result in the GCC
    193 programs themselves having the name of the dynamic linker from the host system's
    194 <filename class="directory">/lib</filename> directory embedded into them, which
    195 would defeat our goal of getting away from the host.</para>
    196 
    197 <para>During the second pass of Binutils, we are able to utilize the
    198 <emphasis>--with-lib-path</emphasis> configure switch to control
    199 <command>ld</command>'s library search path. From this point onwards, the
    200 core toolchain is self-contained and self-hosted. The remainder of the
    201 <xref linkend="chapter-temporary-tools"/> packages all build against the new Glibc in
    202 <filename class="directory">/tools</filename> and all is well.</para>
    203 
    204 <para>Upon entering the chroot environment in <xref linkend="chapter-building-system"/>, the
    205 first major package we install is Glibc, due to its self-sufficient nature that
    206 we mentioned above. Once this Glibc is installed into
    207 <filename class="directory">/usr</filename>, we perform a quick changeover of
    208 the toolchain defaults, then proceed for real in building the rest of the
    209 target LFS system.</para>
    210 
    211 </sect1>
    212 
    213 
    214 <sect1 id="tools-aboutlinking">
    215 <title>Notes on static linking</title>
    216 <?dbhtml filename="aboutlinking.html" dir="chapter05"?>
    217 
    218 <para>Most programs have to perform, beside their specific task, many rather
    219 common and sometimes trivial operations. These include allocating memory,
    220 searching directories, reading and writing files, string handling, pattern
    221 matching, arithmetic and many other tasks. Instead of obliging each program to
    222 reinvent the wheel, the GNU system provides all these basic functions in
    223 ready-made libraries. The major library on any Linux system is
    224 <emphasis>Glibc</emphasis>.</para>
    225 
    226 <para>There are two primary ways of linking the functions from a library to a
    227 program that uses them: statically or dynamically. When a program is linked
    228 statically, the code of the used functions is included in the executable,
    229 resulting in a rather bulky program. When a program is dynamically linked, what
    230 is included is a reference to the dynamic linker, the name of the library, and
    231 the name of the function, resulting in a much smaller executable. (A third way
    232 is to use the programming interface of the dynamic linker. See the
    233 <emphasis>dlopen</emphasis> man page for more information.)</para>
    234 
    235 <para>Dynamic linking is the default on Linux and has three major advantages
    236 over static linking. First, you need only one copy of the executable library
    237 code on your hard disk, instead of having many copies of the same code included
    238 into a whole bunch of programs -- thus saving disk space. Second, when several
    239 programs use the same library function at the same time, only one copy of the
    240 function's code is required in core -- thus saving memory space. Third, when a
    241 library function gets a bug fixed or is otherwise improved, you only need to
    242 recompile this one library, instead of having to recompile all the programs that
    243 make use of the improved function.</para>
    244 
    245 <para>If dynamic linking has several advantages, why then do we statically link
    246 the first two packages in this chapter? The reasons are threefold: historical,
    247 educational, and technical. Historical, because earlier versions of LFS
    248 statically linked every program in this chapter. Educational, because knowing
    249 the difference is useful. Technical, because we gain an element of independence
    250 from the host in doing so, meaning that those programs can be used
    251 independently of the host system. However, it's worth noting that an overall
    252 successful LFS build can still be achieved when the first two packages are
    253 built dynamically.</para>
    254 
    255 </sect1>
    256 
    257 
    258 &c5-binutils-pass1;
    259 &c5-gcc-pass1;
    260 &c5-kernelheaders;
    261 &c5-glibc;
    262 
    263 
    264 <sect1 id="ch-tools-adjusting">
    265 <title>Adjusting the toolchain</title>
    266 <?dbhtml filename="adjusting.html" dir="chapter05"?>
    267 
    268 <para>Now that the temporary C libraries have been installed, we want all
    269 the tools compiled in the rest of this chapter to be linked against these
    270 libraries. To accomplish this, we need to adjust the linker and the compiler's
    271 specs file. Some people would say that it is <emphasis>"black magic juju below
    272 this line"</emphasis>, but it is really very simple.</para>
    273 
    274 <para>First install the adjusted linker (adjusted at the end of the first pass
    275 of Binutils) by running the following command from within
    276 the <filename class="directory">binutils-build</filename> directory:</para>
    277 
    278 <screen><userinput>make -C ld install</userinput></screen>
    279 
    280 <para>From this point onwards everything will link <emphasis>only</emphasis>
    281 against the libraries in <filename>/tools/lib</filename>.</para>
    282 
    283 <note><para>If you somehow missed the earlier warning to retain the Binutils
    284 source and build directories from the first pass or otherwise accidentally
    285 deleted them or just don't have access to them, don't worry, all is not lost.
    286 Just ignore the above command. The result is a small chance of the subsequent
    287 testing programs linking against libraries on the host. This is not ideal, but
    288 it's not a major problem. The situation is corrected when we install the
    289 second pass of Binutils a bit further on.</para></note>
    290 
    291 <para>Now that the adjusted linker is installed, you have to
    292 <emphasis>remove</emphasis> the Binutils build and source directories.</para>
    293 
    294 <para>The next thing to do is to amend our GCC specs file so that it points
    295 to the new dynamic linker. A simple sed will accomplish this:</para>
    296 
    297 <!-- Ampersands are needed to allow cut and paste -->
    298 
    299 <screen><userinput>SPECFILE=/tools/lib/gcc-lib/*/*/specs &amp;&amp;
    300 sed -e 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2@g' \
    301 &nbsp;&nbsp;&nbsp;&nbsp;$SPECFILE &gt; tempspecfile &amp;&amp;
    302 mv -f tempspecfile $SPECFILE &amp;&amp;
    303 unset SPECFILE</userinput></screen>
    304 
    305 <para>We recommend that you cut-and-paste the above rather than try and type it
    306 all in. Or you can edit the specs file by hand if you want to: just replace the
    307 occurrence of "/lib/ld-linux.so.2" with "/tools/lib/ld-linux.so.2". Be sure to
    308 visually inspect the specs file to verify the intended change was actually
    309 made.</para>
    310 
    311 <important><para>If you are working on a platform where the name of the dynamic
    312 linker is something other than <filename>ld-linux.so.2</filename>, you
    313 <emphasis>must</emphasis> substitute <filename>ld-linux.so.2</filename> with the
    314 name of your platform's dynamic linker in the above commands. Refer back to
    315 <xref linkend="tools-technicalnotes"/> if necessary.</para></important>
    316 
    317 <para>Lastly, there is a possibility that some include files from the host
    318 system have found their way into GCC's private include dir. This can happen
    319 because of GCC's "fixincludes" process which runs as part of the GCC build.
    320 We'll explain more about this further on in this chapter. For now, run the
    321 following commands to eliminate this possibility:</para>
    322 
    323 <screen><userinput>rm -f /tools/lib/gcc-lib/*/*/include/{pthread.h,bits/sigthread.h}</userinput></screen>
    324 
    325 <!-- HACK - Force some whitespace to appease tidy -->
    326 <literallayout></literallayout>
    327 
    328 <caution><para>It is imperative at this point to stop and ensure that the basic
    329 functions (compiling and linking) of the new toolchain are working as expected.
    330 For this we are going to perform a simple sanity check:</para>
    331 
    332 <screen><userinput>echo 'main(){}' &gt; dummy.c
    333 cc dummy.c
    334 readelf -l a.out | grep ': /tools'</userinput></screen>
    335 
    336 <para>If everything is working correctly, there should be no errors, and the
    337 output of the last command will be (allowing for platform specific differences
    338 in dynamic linker name):</para>
    339 
    340 <blockquote><screen>[Requesting program interpreter: /tools/lib/ld-linux.so.2]</screen></blockquote>
    341 
    342 <para>Note especially that <filename class="directory">/tools/lib</filename>
    343 appears as the prefix of our dynamic linker.</para>
    344 
    345 <para>If you did not receive the output
    346 as shown above, or received no output at all, then something is seriously wrong.
    347 You will need to investigate and retrace your steps to find out where the
    348 problem is and correct it. There is no point in continuing until this is done.
    349 First, redo the sanity check using <command>gcc</command> instead of
    350 <command>cc</command>. If this works it means the
    351 <filename class="symlink">/tools/bin/cc</filename> symlink is missing. Revisit
    352 <xref linkend="ch-tools-gcc-pass1"/> and fix the symlink. Second, ensure your PATH
    353 is correct. You can check this by running <userinput>echo $PATH</userinput> and
    354 verifying that <filename class="directory">/tools/bin</filename> is at the head
    355 of the list. If the PATH is wrong it could mean you're not logged in as user
    356 <emphasis>lfs</emphasis> or something went wrong back in <xref
    357 linkend="prepare-settingenvironment"/>. Third, something may have gone wrong
    358 with the specs file amendment above. In this case redo the specs file amendment
    359 ensuring to cut-and-paste the commands as was recommended.</para>
    360 
    361 <para>Once you are satisfied that all is well, clean up the test files:</para>
    362 
    363 <screen><userinput>rm dummy.c a.out</userinput></screen>
    364 </caution>
    365 
    366 <!-- HACK - Force some whitespace to appease tidy -->
    367 <literallayout></literallayout>
    368 
    369 </sect1>
    370 
    371 
    372 &c5-tcl;
    373 &c5-expect;
    374 &c5-dejagnu;
    375 &c5-gcc-pass2;
    376 &c5-binutils-pass2;
    377 
    378 &c5-gawk;
    379 &c5-coreutils;
    380 &c5-bzip2;
    381 &c5-gzip;
    382 &c5-diffutils;
    383 &c5-findutils;
    384 &c5-make;
    385 &c5-grep;
    386 &c5-sed;
    387 &c5-gettext;
    388 &c5-ncurses;
    389 &c5-patch;
    390 &c5-tar;
    391 &c5-texinfo;
    392 &c5-bash;
    393 &c5-perl;
    394 
    395 
    396 <sect1 id="ch-tools-stripping">
    397 <title>Stripping</title>
    398 <?dbhtml filename="stripping.html" dir="chapter05"?>
    399 
    400 <para>The steps in this section are optional, but if your LFS partition is
    401 rather small, you will be glad to learn that you can remove some unnecessary
    402 things. The executables and libraries you have built so far contain about 130
    403 MB of unneeded debugging symbols. Remove those symbols with:</para>
    404 
    405 <screen><userinput>strip --strip-debug /tools/lib/*
    406 strip --strip-unneeded /tools/{,s}bin/*</userinput></screen>
    407 
    408 <para>The last of the above commands will skip some twenty files, reporting
    409 that it doesn't recognize their file format. Most of them are scripts instead
    410 of binaries.</para>
    411 
    412 <para>Take care <emphasis>not</emphasis> to use
    413 <emphasis>--strip-unneeded</emphasis> on the libraries -- the static ones
    414 would be destroyed and you would have to build the three toolchain packages
    415 all over again.</para>
    416 
    417 <para>To save another 30 MB, you can remove all the documentation:</para>
    418 
    419 <screen><userinput>rm -rf /tools/{doc,info,man}</userinput></screen>
    420 
    421 <para>You will now need to have at least 850 MB of free space on your LFS
    422 file system to be able to build and install Glibc in the next phase. If you can
    423 build and install Glibc, you can build and install the rest too.</para>
    424 
    425 </sect1>
     11<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
     12<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="toolchaintechnotes.xml"/>
     13<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils-pass1.xml"/>
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-pass1.xml"/>
     15<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kernel-headers.xml"/>
     16<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="glibc.xml"/>
     17<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="adjusting.xml"/>
     18<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tcl.xml"/>
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="expect.xml"/>
     20<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="dejagnu.xml"/>
     21<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-pass2.xml"/>
     22<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils-pass2.xml"/>
     23<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gawk.xml"/>
     24<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="coreutils.xml"/>
     25<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bzip2.xml"/>
     26<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gzip.xml"/>
     27<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="diffutils.xml"/>
     28<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="findutils.xml"/>
     29<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="make.xml"/>
     30<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grep.xml"/>
     31<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sed.xml"/>
     32<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gettext.xml"/>
     33<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ncurses.xml"/>
     34<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="patch.xml"/>
     35<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tar.xml"/>
     36<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="texinfo.xml"/>
     37<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bash.xml"/>
     38<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="util-linux.xml"/>
     39<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="perl.xml"/>
     40<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="stripping.xml"/>
    42641
    42742</chapter>
    428 
  • chapter05/coreutils.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-coreutils">
    2 <title>Installing Coreutils-&coreutils-version;</title>
    3 <?dbhtml filename="coreutils.html" dir="chapter05"?>
     7<title>Coreutils-&coreutils-version;</title>
     8<?dbhtml filename="coreutils.html"?>
    49
    5 <screen>&buildtime; &coreutils-time-tools;
    6 &diskspace; &coreutils-compsize-tools;</screen>
     10<indexterm zone="ch-tools-coreutils">
     11<primary sortas="a-Coreutils">Coreutils</primary>
     12<secondary>tools</secondary></indexterm>
    713
    8 <literallayout>Official download location for Coreutils (&coreutils-version;):
    9 <ulink url="ftp://ftp.gnu.org/gnu/coreutils/"/>
    10 And for the patch:
    11 <ulink url="&patches-root;&coreutils-posixver-patch;"/></literallayout>
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/coreutils.xml" xpointer="xpointer(/sect1/para[1])"/>
    1215
    13 &aa-coreutils-dep;
     16<screen>&buildtime; 0.9 SBU
     17&diskspace; 69 MB</screen>
    1418
    15 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/coreutils.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1621
    1722<sect2>
    1823<title>Installation of Coreutils</title>
    1924
    20 <para>This package has an issue when compiled against Glibc-&glibc-version;.
    21 Without the patch below, some of the Coreutils utilities (such as
     25<para>Prepare Coreutils for compilation:</para>
     26
     27<screen><userinput>DEFAULT_POSIX2_VERSION=199209 ./configure --prefix=/tools</userinput></screen>
     28
     29<para>This package has an issue when compiled against versions of glibc
     30later than 2.3.2.  Some of the Coreutils utilities (such as
    2231(<command>head</command>, <command>tail</command> and <command>sort</command>)
    2332will reject their traditional syntax, a syntax that has been in use for
    2433approximately 30 years. This old syntax is so pervasive that compatibility
    25 should be preserved until the many places where it is used can be updated. More
    26 details on this are provided in the comments inside the patch itself. Use of
    27 this patch is by no means compulsory, but not using it means you'll have to
    28 deal with the consequences yourself: patch the many packages that still use the
    29 old syntax. Therefore, better apply the patch:</para>
    30 
    31 <screen><userinput>patch -Np1 -i ../&coreutils-posixver-patch;</userinput></screen>
    32 
    33 <para>Now prepare Coreutils for compilation:</para>
    34 
    35 <screen><userinput>./configure --prefix=/tools</userinput></screen>
     34should be preserved until the many places where it is used can be
     35updated.  Backwards compatibility is achieved by setting the
     36DEFAULT_POSIX2_VERSION environment variable to &quot;199209&quot; in the above
     37command.  If you don&apos;t want coreutils to be backwards compatible
     38with the traditional syntax, then simply omit setting the DEFAULT_POSIX2_VERSION
     39environment variable.  Realise though, that doing so will mean you&apos;ll have
     40to deal with the consequences yourself: patch the many packages that still use
     41the old syntax.  We therefore recommend using the instructions exactly as given
     42above.</para>
    3643
    3744<para>Compile the package:</para>
     
    5158</sect2>
    5259
    53 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     60<sect2><title> </title><para> </para>
    5461<para>The details on this package are found in <xref linkend="contents-coreutils"/>.</para>
    55 <para>&nbsp;</para></sect2>
     62<para> </para></sect2>
    5663
    5764</sect1>
    58 
  • chapter05/dejagnu.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-dejagnu" xreflabel="DejaGnu">
    2 <title>Installing DejaGnu-&dejagnu-version;</title>
    3 <?dbhtml filename="dejagnu.html" dir="chapter05"?>
     7<title>DejaGnu-&dejagnu-version;</title>
     8<?dbhtml filename="dejagnu.html"?>
     9
     10<indexterm zone="ch-tools-dejagnu"><primary sortas="a-DejaGnu">DejaGnu</primary></indexterm>
    411
    512<para>The DejaGnu package contains a framework for testing other programs.</para>
    613
    7 <screen>&buildtime; &dejagnu-time-tools;
    8 &diskspace; &dejagnu-compsize-tools;</screen>
     14<screen>&buildtime; 0.1 SBU
     15&diskspace; 8.6 MB</screen>
    916
    10 &aa-dejagnu-down;
    11 &aa-dejagnu-dep;
     17<para>For its installation Dejagnu depends on: Bash, Binutils, Coreutils, Diffutils,
     18GCC, Glibc, Grep, Make, Sed.</para>
    1219
    13 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     20
    1421
    1522<sect2>
     
    2633</sect2>
    2734
    28 &aa-dejagnu-shortdesc;
    29 &aa-dejagnu-desc;
     35
     36<sect2 id="contents-dejagnu"><title>Contents of DejaGnu</title>
     37
     38<para><emphasis>Installed program</emphasis>: runtest</para>
     39
     40</sect2>
     41
     42
     43<sect2><title>Short description</title>
     44
     45<indexterm zone="ch-tools-dejagnu runtest"><primary sortas="b-runtest">runtest</primary></indexterm>
     46<para id="runtest"><command>runtest</command> is the wrapper script that finds the proper
     47expect shell and then runs DejaGnu.</para>
     48
     49</sect2>
     50
    3051
    3152</sect1>
    32 
  • chapter05/diffutils.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-diffutils">
    2 <title>Installing Diffutils-&diffutils-version;</title>
    3 <?dbhtml filename="diffutils.html" dir="chapter05"?>
     7<title>Diffutils-&diffutils-version;</title>
     8<?dbhtml filename="diffutils.html"?>
    49
    5 <screen>&buildtime; &diffutils-time-tools;
    6 &diskspace; &diffutils-compsize-tools;</screen>
     10<indexterm zone="ch-tools-diffutils">
     11<primary sortas="a-Diffutils">Diffutils</primary>
     12<secondary>tools</secondary></indexterm>
    713
    8 &aa-diffutils-down;
    9 &aa-diffutils-dep;
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/diffutils.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     16<screen>&buildtime; 0.1 SBU
     17&diskspace; 7.5 MB</screen>
     18
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/diffutils.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1221
    1322<sect2>
     
    2837</sect2>
    2938
    30 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     39<sect2><title> </title><para> </para>
    3140<para>The details on this package are found in <xref linkend="contents-diffutils"/>.</para>
    32 <para>&nbsp;</para></sect2>
     41<para> </para></sect2>
    3342
    3443</sect1>
    35 
  • chapter05/expect.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-expect" xreflabel="Expect">
    2 <title>Installing Expect-&expect-version;</title>
    3 <?dbhtml filename="expect.html" dir="chapter05"?>
     7<title>Expect-&expect-version;</title>
     8<?dbhtml filename="expect.html"?>
     9
     10<indexterm zone="ch-tools-expect"><primary sortas="a-Expect">Expect</primary></indexterm>
    411
    512<para>The Expect package contains a program for doing scripted dialogues with
    613other interactive programs.</para>
    714
    8 <screen>&buildtime; &expect-time-tools;
    9 &diskspace; &expect-compsize-tools;</screen>
     15<screen>&buildtime; 0.1 SBU
     16&diskspace; 3.9 MB</screen>
    1017
    11 &aa-expect-down;
    12 &aa-expect-dep;
     18<para>Expect installation depends on: Bash, Binutils, Coreutils, Diffutils,
     19GCC, Glibc, Grep, Make, Sed, Tcl.</para>
    1320
    14 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     21
    1522
    1623<sect2>
     
    2027suite run:</para>
    2128
    22 <screen><userinput>patch -Np1 -i ../&expect-patch;</userinput></screen>
     29<screen><userinput>patch -Np1 -i ../expect-&expect-version;-spawn-1.patch</userinput></screen>
    2330
    2431<para>Now prepare Expect for compilation:</para>
     
    6471</sect2>
    6572
    66 &aa-expect-shortdesc;
    67 &aa-expect-desc;
     73
     74<sect2 id="contents-expect"><title>Contents of Expect</title>
     75
     76<para><emphasis>Installed program</emphasis>: expect</para>
     77
     78<para><emphasis>Installed library</emphasis>: libexpect&expect-version;.a</para>
     79
     80</sect2>
     81
     82
     83<sect2><title>Short description</title>
     84
     85<indexterm zone="ch-tools-expect expect"><primary sortas="b-expect">expect</primary></indexterm>
     86<para id="expect"><command>expect</command> <quote>talks</quote> to other interactive
     87programs according to a script.</para>
     88
     89</sect2>
     90
    6891
    6992</sect1>
    70 
  • chapter05/findutils.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-findutils">
    2 <title>Installing Findutils-&findutils-version;</title>
    3 <?dbhtml filename="findutils.html" dir="chapter05"?>
     7<title>Findutils-&findutils-version;</title>
     8<?dbhtml filename="findutils.html"?>
    49
    5 <screen>&buildtime; &findutils-time-tools;
    6 &diskspace; &findutils-compsize-tools;</screen>
     10<indexterm zone="ch-tools-findutils">
     11<primary sortas="a-Findutils">Findutils</primary>
     12<secondary>tools</secondary></indexterm>
    713
    8 &aa-findutils-down;
    9 &aa-findutils-dep;
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/findutils.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     16<screen>&buildtime; 0.2 SBU
     17&diskspace; 7.6 MB</screen>
     18
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/findutils.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1221
    1322<sect2>
     
    3140</sect2>
    3241
    33 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     42<sect2><title> </title><para> </para>
    3443<para>The details on this package are found in <xref linkend="contents-findutils"/>.</para>
    35 <para>&nbsp;</para></sect2>
     44<para> </para></sect2>
    3645
    3746</sect1>
    38 
  • chapter05/gawk.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-gawk">
    2 <title>Installing Gawk-&gawk-version;</title>
    3 <?dbhtml filename="gawk.html" dir="chapter05"?>
     7<title>Gawk-&gawk-version;</title>
     8<?dbhtml filename="gawk.html"?>
    49
    5 <screen>&buildtime; &gawk-time-tools;
    6 &diskspace; &gawk-compsize-tools;</screen>
     10<indexterm zone="ch-tools-gawk">
     11<primary sortas="a-Gawk">Gawk</primary>
     12<secondary>tools</secondary></indexterm>
    713
    8 <literallayout>Official download location for Gawk (&gawk-version;):
    9 <ulink url="ftp://ftp.gnu.org/pub/gnu/gawk/"/></literallayout>
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gawk.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 &aa-gawk-dep;
     16<screen>&buildtime; 0.2 SBU
     17&diskspace; 17 MB</screen>
    1218
    13 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gawk.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1421
    1522<sect2>
     
    3340</sect2>
    3441
    35 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     42<sect2><title> </title><para> </para>
    3643<para>The details on this package are found in <xref linkend="contents-gawk"/>.</para>
    37 <para>&nbsp;</para></sect2>
     44<para> </para></sect2>
    3845
    3946</sect1>
    40 
  • chapter05/gcc-pass1.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-gcc-pass1">
    2 <title>Installing GCC-&gcc-version; - Pass 1</title>
    3 <?dbhtml filename="gcc-pass1.html" dir="chapter05"?>
     7<title>GCC-&gcc-version; - Pass 1</title>
     8<?dbhtml filename="gcc-pass1.html"?>
    49
    5 <screen>&buildtime; &gcc-time-tools-pass1;
    6 &diskspace; &gcc-compsize-tools-pass1;</screen>
     10<indexterm zone="ch-tools-gcc-pass1">
     11<primary sortas="a-GCC">GCC</primary>
     12<secondary>tools, pass 1</secondary></indexterm>
    713
    8 <literallayout>Official download location for GCC (&gcc-version;):
    9 <ulink url="ftp://ftp.gnu.org/pub/gnu/gcc/"/></literallayout>
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gcc.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 &aa-gcc-dep;
     16<screen>&buildtime; 4.4 SBU
     17&diskspace; 300 MB</screen>
    1218
    13 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gcc.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1421
    1522<sect2>
     
    1724
    1825<para>Unpack only the GCC-core tarball, as we won't be needing the C++ compiler
    19 nor the test suite at the moment.</para>
     26nor the test suite here.</para>
    2027
    2128<para>This package is known to behave badly when you change its default
     
    2330<emphasis>-mcpu</emphasis> options). Therefore, if you have defined any
    2431environment variables that override default optimizations, such as CFLAGS and
    25 CXXFLAGS, we recommend unsetting them when building GCC.</para>
     32CXXFLAGS, we recommend un-setting them when building GCC.</para>
    2633
    2734<para>The GCC documentation recommends building GCC outside of the source
     
    3340<para>Prepare GCC for compilation:</para>
    3441
    35 <screen><userinput>../&gcc-dir;/configure --prefix=/tools \
    36 &nbsp;&nbsp;&nbsp;&nbsp;--with-local-prefix=/tools \
    37 &nbsp;&nbsp;&nbsp;&nbsp;--disable-nls --enable-shared \
    38 &nbsp;&nbsp;&nbsp;&nbsp;--enable-languages=c</userinput></screen>
     42<screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
     43    --with-local-prefix=/tools \
     44    --disable-nls --enable-shared \
     45    --enable-languages=c</userinput></screen>
    3946
    4047<para>The meaning of the configure options:</para>
     
    4552from <command>gcc</command>'s include search path. This is not absolutely
    4653essential; however, we want to try to minimize the influence of the host
    47 system, thus making this a sensible thing to do.</para></listitem>
     54system, so this a sensible thing to do.</para></listitem>
    4855
    4956<listitem><para><userinput>--enable-shared</userinput>: This switch may
     
    8491programs from this first pass will soon be replaced.</para>
    8592
    86 <para>And install the package:</para>
     93<para>Now install the package:</para>
    8794
    8895<screen><userinput>make install</userinput></screen>
     
    99106</sect2>
    100107
    101 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     108<sect2><title> </title><para> </para>
    102109<para>The details on this package are found in <xref linkend="contents-gcc"/>.</para>
    103 <para>&nbsp;</para></sect2>
     110<para> </para></sect2>
    104111
    105112</sect1>
    106 
  • chapter05/gcc-pass2.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-gcc-pass2">
    2 <title>Installing GCC-&gcc-version; - Pass 2</title>
    3 <?dbhtml filename="gcc-pass2.html" dir="chapter05"?>
     7<title>GCC-&gcc-version; - Pass 2</title>
     8<?dbhtml filename="gcc-pass2.html"?>
    49
    5 <screen>&buildtime; &gcc-time-tools-pass2;
    6 &diskspace; &gcc-compsize-tools-pass2;</screen>
     10<indexterm zone="ch-tools-gcc-pass2">
     11<primary sortas="a-GCC">GCC</primary>
     12<secondary>tools, pass 2</secondary></indexterm>
    713
    8 &aa-gcc-down;
    9 &aa-gcc-dep;
     14<screen>&buildtime; 11.0 SBU
     15&diskspace; 274 MB</screen>
    1016
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
    1217
    1318<sect2>
     
    3843to unpack both the core and the g++ tarballs (and testsuite too, if you want to
    3944run the tests). Unpacking them in your working directory, they will all unfold
    40 into a single <filename>&gcc-dir;/</filename> subdirectory.</para>
     45into a single <filename>gcc-&gcc-version;/</filename> subdirectory.</para>
    4146
    4247<para>First correct a problem and make an essential adjustment:</para>
    4348
    44 <screen><userinput>patch -Np1 -i ../&gcc-nofixincludes-patch;
    45 patch -Np1 -i ../&gcc-specs-patch;</userinput></screen>
     49<screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes-1.patch
     50patch -Np1 -i ../gcc-&gcc-version;-specs-1.patch</userinput></screen>
    4651
    47 <para>The first patch disables the GCC "fixincludes" script. We mentioned this
    48 briefly earlier, but a slightly more in-depth explanation of the fixincludes
    49 process is warranted here. Under normal circumstances, the GCC fixincludes
    50 script scans your system for header files that need to be fixed. It might find
    51 that some Glibc header files on your host system need to be fixed, fix them and
    52 put them in the GCC private include directory. Then, later on in
    53 <xref linkend="chapter-building-system"/>, after we've installed the newer Glibc, this
    54 private include directory would be searched before the system include
    55 directory, resulting in GCC finding the fixed headers from the host system,
    56 which would most likely not match the Glibc version actually used for the LFS
    57 system.</para>
     52<para>The first patch disables the GCC <quote>fixincludes</quote> script. We
     53mentioned this briefly earlier, but a slightly more in-depth explanation of
     54the fixincludes process is warranted here. Under normal circumstances, the GCC
     55fixincludes script scans your system for header files that need to be fixed. It
     56might find that some Glibc header files on your host system need to be fixed,
     57fix them and put them in the GCC private include directory. Then, later on in
     58<xref linkend="chapter-building-system"/>, after we've installed the newer
     59Glibc, this private include directory would be searched before the system
     60include directory, resulting in GCC finding the fixed headers from the host
     61system, which would most likely not match the Glibc version actually used for
     62the LFS system.</para>
    5863
    5964<para>The second patch changes GCC's default location of the dynamic linker
     
    7883<para>Now prepare GCC for compilation:</para>
    7984
    80 <screen><userinput>../&gcc-dir;/configure --prefix=/tools \
    81 &nbsp;&nbsp;&nbsp;&nbsp;--with-local-prefix=/tools \
    82 &nbsp;&nbsp;&nbsp;&nbsp;--enable-clocale=gnu --enable-shared \
    83 &nbsp;&nbsp;&nbsp;&nbsp;--enable-threads=posix --enable-__cxa_atexit \
    84 &nbsp;&nbsp;&nbsp;&nbsp;--enable-languages=c,c++</userinput></screen>
     85<screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
     86    --with-local-prefix=/tools \
     87    --enable-clocale=gnu --enable-shared \
     88    --enable-threads=posix --enable-__cxa_atexit \
     89    --enable-languages=c,c++</userinput></screen>
    8590
    8691<para>The meaning of the new configure options:</para>
     
    129134a summary of the test suite results, run this:</para>
    130135 
    131 <screen><userinput>../&gcc-dir;/contrib/test_summary</userinput></screen>
     136<screen><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
    132137
    133138<para>(For just the summaries, pipe the output through
     
    147152<para>The unexpected pass for g++ is due to the use of
    148153<emphasis>--enable-__cxa_atexit</emphasis>. Apparently not all platforms
    149 supported by GCC have support for "__cxa_atexit" in their C libraries, so this
    150 test is not always expected to pass.</para>
     154supported by GCC have support for <quote>__cxa_atexit</quote> in their C
     155libraries, so this test is not always expected to pass.</para>
    151156
    152157<para>The 24 unexpected passes for libstdc++ are due to the use of
     
    161166<para>Having a few unexpected failures often cannot be avoided. The GCC
    162167developers are usually aware of these, but haven't yet gotten around to fixing
    163 them. In short, unless your results are vastly different from those at the
    164 above URL, it is safe to continue.</para>
     168them. One particular case in point is the filebuf_members test in the C++
     169standard library testsuite.  This test has been observed to fail in some
     170situations, but succeeed in others.  In short, unless your results are vastly
     171different from those at the above URL, it is safe to continue.</para>
    165172
    166173<para>And finally install the package:</para>
     
    176183</sect2>
    177184
    178 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     185<sect2><title> </title><para> </para>
    179186<para>The details on this package are found in <xref linkend="contents-gcc"/>.</para>
    180 <para>&nbsp;</para></sect2>
     187<para> </para></sect2>
    181188
    182189</sect1>
    183 
  • chapter05/gettext.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-gettext">
    2 <title>Installing Gettext-&gettext-version;</title>
    3 <?dbhtml filename="gettext.html" dir="chapter05"?>
     7<title>Gettext-&gettext-version;</title>
     8<?dbhtml filename="gettext.html"?>
    49
    5 <screen>&buildtime; &gettext-time-tools;
    6 &diskspace; &gettext-compsize-tools;</screen>
     10<indexterm zone="ch-tools-gettext">
     11<primary sortas="a-Gettext">Gettext</primary>
     12<secondary>tools</secondary></indexterm>
    713
    8 &aa-gettext-down;
    9 &aa-gettext-dep;
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gettext.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     16<screen>&buildtime; 0.5 SBU
     17&diskspace; 55 MB</screen>
     18
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gettext.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1221
    1322<sect2>
     
    3544</sect2>
    3645
    37 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     46<sect2><title> </title><para> </para>
    3847<para>The details on this package are found in <xref linkend="contents-gettext"/>.</para>
    39 <para>&nbsp;</para></sect2>
     48<para> </para></sect2>
    4049
    4150</sect1>
    42 
  • chapter05/glibc.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-glibc">
    2 <title>Installing Glibc-&glibc-version;</title>
    3 <?dbhtml filename="glibc.html" dir="chapter05"?>
     7<title>Glibc-&glibc-version;</title>
     8<?dbhtml filename="glibc.html"?>
    49
    5 <screen>&buildtime; &glibc-time-tools;
    6 &diskspace; &glibc-compsize-tools;</screen>
     10<indexterm zone="ch-tools-glibc">
     11<primary sortas="a-Glibc">Glibc</primary>
     12<secondary>tools</secondary></indexterm>
    713
    8 &aa-glibc-down;
    9 &aa-glibc-dep;
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/glibc.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     16<screen>&buildtime; 11.8 SBU
     17&diskspace; 800 MB</screen>
     18
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/glibc.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1221
    1322<sect2>
     
    1827<emphasis>-mcpu</emphasis> options). Therefore, if you have defined any
    1928environment variables that override default optimizations, such as CFLAGS and
    20 CXXFLAGS, we recommend unsetting them when building Glibc.</para>
     29CXXFLAGS, we recommend un-setting them when building Glibc.</para>
    2130
    2231<para>Basically, compiling Glibc in any other way than the book suggests
     
    3140<para>Next, prepare Glibc for compilation:</para>
    3241
    33 <screen><userinput>../&glibc-dir;/configure --prefix=/tools \
    34 &nbsp;&nbsp;&nbsp;&nbsp;--disable-profile --enable-add-ons=linuxthreads \
    35 &nbsp;&nbsp;&nbsp;&nbsp;--with-binutils=/tools/bin --with-headers=/tools/include \
    36 &nbsp;&nbsp;&nbsp;&nbsp;--without-gd --without-cvs</userinput></screen>
     42<screen><userinput>../glibc-&glibc-version;-20031202/configure --prefix=/tools \
     43    --disable-profile --enable-add-ons=linuxthreads \
     44    --with-binutils=/tools/bin --with-headers=/tools/include \
     45    --without-gd --without-cvs</userinput></screen>
    3746
    3847<para>The meaning of the configure options:</para>
    3948
    4049<itemizedlist>
    41 <listitem><para><userinput>--disable-profile</userinput>: This disables the
    42 building of the libraries with profiling information. Omit this option if you
     50<listitem><para><userinput>--disable-profile</userinput>: This
     51builds the libraries without profiling information. Omit this option if you
    4352plan to do profiling on the temporary tools.</para></listitem>
    4453
     
    5362Glibc build.</para></listitem>
    5463
    55 <listitem><para><userinput>--without-gd</userinput>: This switch ensures
    56 that we don't build the <command>memusagestat</command> program, which
     64<listitem><para><userinput>--without-gd</userinput>: This prevents
     65the build of the <command>memusagestat</command> program, which
    5766strangely enough insists on linking against the host's libraries (libgd,
    5867libpng, libz, and so forth).</para></listitem>
     
    142151communicate. These conventions range from very simple ones, such as the format
    143152for representing dates and times, to very complex ones, such as the language
    144 spoken. The "internationalization" of GNU programs works by means of
    145 <emphasis>locales</emphasis>.</para>
     153spoken. The <quote>internationalization</quote> of GNU programs works by means
     154of <emphasis>locales</emphasis>.</para>
    146155
    147156<note><para>If you are not running the test suites here in this chapter as per
     
    178187</sect2>
    179188
    180 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     189<sect2><title> </title><para> </para>
    181190<para>The details on this package are found in <xref linkend="contents-glibc"/>.</para>
    182 <para>&nbsp;</para></sect2>
     191<para> </para></sect2>
    183192
    184193</sect1>
    185 
  • chapter05/grep.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-grep">
    2 <title>Installing Grep-&grep-version;</title>
    3 <?dbhtml filename="grep.html" dir="chapter05"?>
     7<title>Grep-&grep-version;</title>
     8<?dbhtml filename="grep.html"?>
    49
    5 <screen>&buildtime; &grep-time-tools;
    6 &diskspace; &grep-compsize-tools;</screen>
     10<indexterm zone="ch-tools-grep">
     11<primary sortas="a-Grep">Grep</primary>
     12<secondary>tools</secondary></indexterm>
    713
    8 &aa-grep-down;
    9 &aa-grep-dep;
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/grep.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     16<screen>&buildtime; 0.1 SBU
     17&diskspace; 5.8 MB</screen>
     18
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/grep.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1221
    1322<sect2>
     
    1726
    1827<screen><userinput>./configure --prefix=/tools \
    19 &nbsp;&nbsp;&nbsp;&nbsp;--disable-perl-regexp --with-included-regex</userinput></screen>
     28    --disable-perl-regexp --with-included-regex</userinput></screen>
    2029
    2130<para>The meaning of the configure options:</para>
     
    4453</sect2>
    4554
    46 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     55<sect2><title> </title><para> </para>
    4756<para>The details on this package are found in <xref linkend="contents-grep"/>.</para>
    48 <para>&nbsp;</para></sect2>
     57<para> </para></sect2>
    4958
    5059</sect1>
    51 
  • chapter05/gzip.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-gzip">
    2 <title>Installing Gzip-&gzip-version;</title>
    3 <?dbhtml filename="gzip.html" dir="chapter05"?>
     7<title>Gzip-&gzip-version;</title>
     8<?dbhtml filename="gzip.html"?>
    49
    5 <screen>&buildtime; &gzip-time-tools;
    6 &diskspace; &gzip-compsize-tools;</screen>
     10<indexterm zone="ch-tools-gzip">
     11<primary sortas="a-Gzip">Gzip</primary>
     12<secondary>tools</secondary></indexterm>
    713
    8 &aa-gzip-down;
    9 &aa-gzip-dep;
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gzip.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     16<screen>&buildtime; 0.1 SBU
     17&diskspace; 2.6 MB</screen>
     18
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gzip.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1221
    1322<sect2>
     
    2837</sect2>
    2938
    30 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     39<sect2><title> </title><para> </para>
    3140<para>The details on this package are found in <xref linkend="contents-gzip"/>.</para>
    32 <para>&nbsp;</para></sect2>
     41<para> </para></sect2>
    3342
    3443</sect1>
    35 
  • chapter05/kernel-headers.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-kernel-headers">
    2 <title>Installing Linux-&kernel-version; headers</title>
    3 <?dbhtml filename="kernel-headers.html" dir="chapter05"?>
     7<title>Linux-&linux-version; headers</title>
     8<?dbhtml filename="kernel-headers.html"?>
    49
    5 <screen>&buildtime; &kernel-time-headers;
    6 &diskspace; &kernel-compsize-headers;</screen>
     10<indexterm zone="ch-tools-kernel-headers">
     11<primary sortas="a-Linux">Linux</primary>
     12<secondary>tools, headers</secondary></indexterm>
    713
    8 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     14<screen>&buildtime; 0.1 SBU
     15&diskspace; 186 MB</screen>
     16
    917
    1018<sect2>
     
    2230recommends that this command be issued prior to <emphasis>each</emphasis>
    2331kernel compilation. You shouldn't rely on the source tree being clean after
    24 untarring.</para>
     32un-tarring.</para>
    2533
    2634<para>Create the <filename>include/linux/version.h</filename> file:</para>
     
    3947cp -R include/asm-generic /tools/include</userinput></screen>
    4048
    41 <para>And finally install the cross-platform kernel header files:</para>
     49<para>Finally, install the cross-platform kernel header files:</para>
    4250
    4351<screen><userinput>cp -R include/linux /tools/include</userinput></screen>
     
    4654
    4755</sect1>
    48 
  • chapter05/make.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-make">
    2 <title>Installing Make-&make-version;</title>
    3 <?dbhtml filename="make.html" dir="chapter05"?>
     7<title>Make-&make-version;</title>
     8<?dbhtml filename="make.html"?>
    49
    5 <screen>&buildtime; &make-time-tools;
    6 &diskspace; &make-compsize-tools;</screen>
     10<indexterm zone="ch-tools-make">
     11<primary sortas="a-Make">Make</primary>
     12<secondary>tools</secondary></indexterm>
    713
    8 &aa-make-down;
    9 &aa-make-dep;
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/make.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     16<screen>&buildtime; 0.2 SBU
     17&diskspace; 8.8 MB</screen>
     18
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/make.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1221
    1322<sect2>
     
    3140</sect2>
    3241
    33 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     42<sect2><title> </title><para> </para>
    3443<para>The details on this package are found in <xref linkend="contents-make"/>.</para>
    35 <para>&nbsp;</para></sect2>
     44<para> </para></sect2>
    3645
    3746</sect1>
    38 
  • chapter05/ncurses.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-ncurses">
    2 <title>Installing Ncurses-&ncurses-version;</title>
    3 <?dbhtml filename="ncurses.html" dir="chapter05"?>
     7<title>Ncurses-&ncurses-version;</title>
     8<?dbhtml filename="ncurses.html"?>
    49
    5 <screen>&buildtime; &ncurses-time-tools;
    6 &diskspace; &ncurses-compsize-tools;</screen>
     10<indexterm zone="ch-tools-ncurses">
     11<primary sortas="a-Ncurses">Ncurses</primary>
     12<secondary>tools</secondary></indexterm>
    713
    8 &aa-ncurses-down;
    9 &aa-ncurses-dep;
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/ncurses.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     16<screen>&buildtime; 0.7 SBU
     17&diskspace; 26 MB</screen>
     18
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/ncurses.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1221
    1322<sect2>
     
    1726
    1827<screen><userinput>./configure --prefix=/tools --with-shared \
    19 &nbsp;&nbsp;&nbsp;&nbsp;--without-debug --without-ada --enable-overwrite</userinput></screen>
     28    --without-debug --without-ada --enable-overwrite</userinput></screen>
    2029
    2130<para>The meaning of the configure options:</para>
     
    4352</sect2>
    4453
    45 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     54<sect2><title> </title><para> </para>
    4655<para>The details on this package are found in <xref linkend="contents-ncurses"/>.</para>
    47 <para>&nbsp;</para></sect2>
     56<para> </para></sect2>
    4857
    4958</sect1>
    50 
  • chapter05/patch.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-patch">
    2 <title>Installing Patch-&patch-version;</title>
    3 <?dbhtml filename="patch.html" dir="chapter05"?>
     7<title>Patch-&patch-version;</title>
     8<?dbhtml filename="patch.html"?>
    49
    5 <screen>&buildtime; &patch-time-tools;
    6 &diskspace; &patch-compsize-tools;</screen>
     10<indexterm zone="ch-tools-patch">
     11<primary sortas="a-Patch">Patch</primary>
     12<secondary>tools</secondary></indexterm>
    713
    8 &aa-patch-down;
    9 &aa-patch-dep;
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/patch.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     16<screen>&buildtime; 0.1 SBU
     17&diskspace; 1.9 MB</screen>
     18
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/patch.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1221
    1322<sect2>
    1423<title>Installation of Patch</title>
    1524
    16 <para>Prepare Patch for compilation (setting the preprocessor flags to
     25<para>Prepare Patch for compilation (the preprocessor flag
    1726<emphasis>-D_GNU_SOURCE</emphasis> is only needed on the PowerPC platform, on
    1827other architectures you can leave it out):</para>
     
    3039</sect2>
    3140
    32 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     41<sect2><title> </title><para> </para>
    3342<para>The details on this package are found in <xref linkend="contents-patch"/>.</para>
    34 <para>&nbsp;</para></sect2>
     43<para> </para></sect2>
    3544
    3645</sect1>
    37 
  • chapter05/perl.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-perl">
    2 <title>Installing Perl-&perl-version;</title>
    3 <?dbhtml filename="perl.html" dir="chapter05"?>
     7<title>Perl-&perl-version;</title>
     8<?dbhtml filename="perl.html"?>
    49
    5 <screen>&buildtime; &perl-time-tools;
    6 &diskspace; &perl-compsize-tools;</screen>
     10<indexterm zone="ch-tools-perl">
     11<primary sortas="a-Perl">Perl</primary>
     12<secondary>tools</secondary></indexterm>
    713
    8 &aa-perl-down;
    9 &aa-perl-dep;
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/perl.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     16<screen>&buildtime; 0.8 SBU
     17&diskspace; 74 MB</screen>
     18
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/perl.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1221
    1322<sect2>
     
    1625<para>First adapt some hard-wired paths to the C library:</para>
    1726
    18 <screen><userinput>patch -Np1 -i ../&perl-libc-patch;</userinput></screen>
     27<screen><userinput>patch -Np1 -i ../perl-&perl-version;-libc-1.patch</userinput></screen>
    1928
    2029<para>Perl insists on using the <command>arch</command> program to find out
     
    2433chmod 755 /tools/bin/arch</userinput></screen>
    2534
    26 <para>Now prepare Perl for compilation (make sure you get the 'IO Fcntl'
     35<para>Now prepare Perl for compilation (make sure you get the 'IO Fcntl POSIX'
    2736right, they are all letters):</para>
    2837
    29 <screen><userinput>./configure.gnu --prefix=/tools -Dstatic_ext='IO Fcntl'</userinput></screen>
     38<screen><userinput>./configure.gnu --prefix=/tools -Dstatic_ext='IO Fcntl POSIX'</userinput></screen>
    3039
    3140<para>The meaning of the configure option:</para>
    3241
    3342<itemizedlist>
    34 <listitem><para><userinput>-Dstatic_ext='IO Fcntl'</userinput>: This tells
    35 Perl to build the minimum set of static extensions needed for running the
    36 Coreutils test suite in the next chapter.</para></listitem>
     43<listitem><para><userinput>-Dstatic_ext='IO Fcntl POSIX'</userinput>: This tells
     44Perl to build the minimum set of static extensions needed for installing and
     45testing the Coreutils package in the next chapter.</para></listitem>
    3746</itemizedlist>
    3847
     
    4958</sect2>
    5059
    51 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     60<sect2><title> </title><para> </para>
    5261<para>The details on this package are found in <xref linkend="contents-perl"/>.</para>
    53 <para>&nbsp;</para></sect2>
     62<para> </para></sect2>
    5463
    5564</sect1>
    56 
  • chapter05/sed.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-sed">
    2 <title>Installing Sed-&sed-version;</title>
    3 <?dbhtml filename="sed.html" dir="chapter05"?>
     7<title>Sed-&sed-version;</title>
     8<?dbhtml filename="sed.html"?>
    49
    5 <screen>&buildtime; &sed-time-tools;
    6 &diskspace; &sed-compsize-tools;</screen>
     10<indexterm zone="ch-tools-sed">
     11<primary sortas="a-Sed">Sed</primary>
     12<secondary>tools</secondary></indexterm>
    713
    8 &aa-sed-down;
    9 &aa-sed-dep;
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/sed.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     16<screen>&buildtime; 0.2 SBU
     17&diskspace; 5.2 MB</screen>
     18
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/sed.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1221
    1322<sect2>
     
    3140</sect2>
    3241
    33 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     42<sect2><title> </title><para> </para>
    3443<para>The details on this package are found in <xref linkend="contents-sed"/>.</para>
    35 <para>&nbsp;</para></sect2>
     44<para> </para></sect2>
    3645
    3746</sect1>
    38 
  • chapter05/tar.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-tar">
    2 <title>Installing Tar-&tar-version;</title>
    3 <?dbhtml filename="tar.html" dir="chapter05"?>
     7<title>Tar-&tar-version;</title>
     8<?dbhtml filename="tar.html"?>
    49
    5 <screen>&buildtime; &tar-time-tools;
    6 &diskspace; &tar-compsize-tools;</screen>
     10<indexterm zone="ch-tools-tar">
     11<primary sortas="a-Tar">Tar</primary>
     12<secondary>tools</secondary></indexterm>
    713
    8 &aa-tar-down;
    9 &aa-tar-dep;
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/tar.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     16<screen>&buildtime; 0.2 SBU
     17&diskspace; 10 MB</screen>
     18
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/tar.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1221
    1322<sect2>
     
    3140</sect2>
    3241
    33 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     42<sect2><title> </title><para> </para>
    3443<para>The details on this package are found in <xref linkend="contents-tar"/>.</para>
    35 <para>&nbsp;</para></sect2>
     44<para> </para></sect2>
    3645
    3746</sect1>
    38 
  • chapter05/tcl.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-tcl" xreflabel="Tcl">
    2 <title>Installing Tcl-&tcl-version;</title>
    3 <?dbhtml filename="tcl.html" dir="chapter05"?>
     7<title>Tcl-&tcl-version;</title>
     8<?dbhtml filename="tcl.html"?>
     9
     10<indexterm zone="ch-tools-tcl"><primary sortas="a-Tcl">Tcl</primary></indexterm>
    411
    512<para>The Tcl package contains the Tool Command Language.</para>
    613
    7 <screen>&buildtime; &tcl-time-tools;
    8 &diskspace; &tcl-compsize-tools;</screen>
     14<screen>&buildtime; 0.9 SBU
     15&diskspace; 23 MB</screen>
    916
    10 &aa-tcl-down;
    11 &aa-tcl-dep;
     17<para>Tcl installation depends on: Bash, Binutils, Coreutils, Diffutils,
     18GCC, Glibc, Grep, Make, Sed.</para>
    1219
    13 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     20
    1421
    1522<sect2>
    1623<title>Installation of Tcl</title>
    1724
    18 <para>This package and the next two are only installed to be able to run the
     25<para>This package and the next two are only installed to support running the
    1926test suites for GCC and Binutils. Installing three packages just for testing
    2027purposes may seem like overkill, but it is very reassuring, if not essential,
    21 to know that our most important tools are working properly. Even if you are
    22 not running the test suites here in this chapter as per our recommendation,
    23 these packages are still required for running the test suites in the next
     28to know that our most important tools are working properly. Even if the
     29the test suites are not run in this chapter (we recommend not running them),
     30these packages are still required to run the test suites in the next
    2431chapter.</para>
    2532
     
    3340<screen><userinput>make</userinput></screen>
    3441
    35 <para>(If you insist on testing the results, then issue:
     42<para>If you want to test the results, then issue:
    3643<userinput>TZ=UTC make test</userinput>. However, the Tcl test suite is known
    3744to experience failures under certain host conditions that are not fully
     
    4148(GMT), but only for the duration of the test suite run. This ensures the clock
    4249tests are exercised correctly. More information on the TZ environment variable
    43 will be given later on in <xref linkend="chapter-bootscripts"/>.)</para>
     50will be given later on in <xref linkend="chapter-bootscripts"/>.</para>
    4451
    4552<para>Install the package:</para>
     
    4754<screen><userinput>make install</userinput></screen>
    4855
    49 <!-- HACK - Force some whitespace to appease tidy -->
    50 <literallayout></literallayout>
    5156
    5257<warning><para><emphasis>Do not remove</emphasis> the
     
    5459will need its internal headers.</para></warning>
    5560
    56 <!-- HACK - Force some whitespace to appease tidy -->
    57 <literallayout></literallayout>
    5861
    59 <para>And make a necessary symbolic link:</para>
     62<para>Now make a necessary symbolic link:</para>
    6063
    6164<screen><userinput>ln -s tclsh8.4 /tools/bin/tclsh</userinput></screen>
     
    6366</sect2>
    6467
    65 &aa-tcl-shortdesc;
    66 &aa-tcl-desc;
     68
     69<sect2 id="contents-tcl"><title>Contents of Tcl</title>
     70
     71<para><emphasis>Installed programs</emphasis>: tclsh (link to tclsh8.4),
     72tclsh8.4</para>
     73
     74<para><emphasis>Installed library</emphasis>: libtcl8.4.so</para>
     75
     76</sect2>
     77
     78
     79<sect2><title>Short descriptions</title>
     80
     81<indexterm zone="ch-tools-tcl tclsh8.4"><primary sortas="b-tclsh8.4">tclsh8.4</primary></indexterm>
     82<para id="tclsh8.4"><command>tclsh8.4</command> is the Tcl command shell.</para>
     83
     84<indexterm zone="ch-tools-tcl libtcl8.4.so"><primary sortas="c-libtcl8.4.so">libtcl8.4.so</primary></indexterm>
     85<para id="libtcl8.4.so"><command>libtcl8.4.so</command> is the Tcl library.</para>
     86
     87</sect2>
     88
    6789
    6890</sect1>
    69 
  • chapter05/texinfo.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-tools-texinfo">
    2 <title>Installing Texinfo-&texinfo-version;</title>
    3 <?dbhtml filename="texinfo.html" dir="chapter05"?>
     7<title>Texinfo-&texinfo-version;</title>
     8<?dbhtml filename="texinfo.html"?>
    49
    5 <screen>&buildtime; &texinfo-time-tools;
    6 &diskspace; &texinfo-compsize-tools;</screen>
     10<indexterm zone="ch-tools-texinfo">
     11<primary sortas="a-Texinfo">Texinfo</primary>
     12<secondary>tools</secondary></indexterm>
    713
    8 &aa-texinfo-down;
    9 &aa-texinfo-dep;
     14<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/texinfo.xml" xpointer="xpointer(/sect1/para[1])"/>
    1015
    11 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     16<screen>&buildtime; 0.2 SBU
     17&diskspace; 16 MB</screen>
     18
     19<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/texinfo.xml" xpointer="xpointer(/sect1/para[2])"/>
     20
    1221
    1322<sect2>
     
    3140</sect2>
    3241
    33 <sect2><title>&nbsp;</title><para>&nbsp;</para>
     42<sect2><title> </title><para> </para>
    3443<para>The details on this package are found in <xref linkend="contents-texinfo"/>.</para>
    35 <para>&nbsp;</para></sect2>
     44<para> </para></sect2>
    3645
    3746</sect1>
    38 
Note: See TracChangeset for help on using the changeset viewer.