Finished chapter 05 indentation.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7292 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Manuel Canales Esparcia 2006-01-22 13:13:52 +00:00
parent 7b82580d09
commit b28fd35a82
7 changed files with 493 additions and 405 deletions

View File

@ -1,26 +1,40 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-tools-sed" role="wrap"> <sect1 id="ch-tools-sed" role="wrap">
<title>Sed-&sed-version;</title>
<?dbhtml filename="sed.html"?> <?dbhtml filename="sed.html"?>
<title>Sed-&sed-version;</title>
<indexterm zone="ch-tools-sed"> <indexterm zone="ch-tools-sed">
<primary sortas="a-Sed">Sed</primary> <primary sortas="a-Sed">Sed</primary>
<secondary>tools</secondary></indexterm> <secondary>tools</secondary>
</indexterm>
<sect2 role="package"><title/> <sect2 role="package">
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/sed.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <title/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="../chapter06/sed.xml"
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist> <segmentedlist>
<segtitle>&buildtime;</segtitle> <segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle> <segtitle>&diskspace;</segtitle>
<seglistitem><seg>0.2 SBU</seg><seg>8.4 MB</seg></seglistitem>
<seglistitem>
<seg>0.2 SBU</seg>
<seg>8.4 MB</seg>
</seglistitem>
</segmentedlist> </segmentedlist>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/sed.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="../chapter06/sed.xml"
xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
</sect2> </sect2>
@ -35,7 +49,8 @@
<screen><userinput>make</userinput></screen> <screen><userinput>make</userinput></screen>
<para>To test the results, issue: <userinput>make check</userinput>.</para> <para>To test the results, issue:
<userinput>make check</userinput>.</para>
<para>Install the package:</para> <para>Install the package:</para>
@ -43,10 +58,12 @@
</sect2> </sect2>
<sect2 role="content"><title/> <sect2 role="content">
<para>Details on this package are located in <xref <title/>
linkend="contents-sed" role="."/></para>
<para>Details on this package are located in
<xref linkend="contents-sed" role="."/></para>
</sect2> </sect2>
</sect1> </sect1>

View File

@ -1,17 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-tools-stripping"> <sect1 id="ch-tools-stripping">
<title>Stripping</title>
<?dbhtml filename="stripping.html"?> <?dbhtml filename="stripping.html"?>
<para>The steps in this section are optional, but if the LFS partition <title>Stripping</title>
is rather small, it is beneficial to learn that unnecessary items can
be removed. The executables and libraries built so far contain about <para>The steps in this section are optional, but if the LFS partition is
130 MB of unneeded debugging symbols. Remove those symbols rather small, it is beneficial to learn that unnecessary items can be removed.
with:</para> The executables and libraries built so far contain about 130 MB of unneeded
debugging symbols. Remove those symbols with:</para>
<screen><userinput>strip --strip-debug /tools/lib/* <screen><userinput>strip --strip-debug /tools/lib/*
strip --strip-unneeded /tools/{,s}bin/*</userinput></screen> strip --strip-unneeded /tools/{,s}bin/*</userinput></screen>
@ -35,4 +37,3 @@ If you can build and install Glibc, you can build and install the rest
too.</para> too.</para>
</sect1> </sect1>

View File

@ -1,26 +1,40 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-tools-tar" role="wrap"> <sect1 id="ch-tools-tar" role="wrap">
<title>Tar-&tar-version;</title>
<?dbhtml filename="tar.html"?> <?dbhtml filename="tar.html"?>
<title>Tar-&tar-version;</title>
<indexterm zone="ch-tools-tar"> <indexterm zone="ch-tools-tar">
<primary sortas="a-Tar">Tar</primary> <primary sortas="a-Tar">Tar</primary>
<secondary>tools</secondary></indexterm> <secondary>tools</secondary>
</indexterm>
<sect2 role="package"><title/> <sect2 role="package">
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/tar.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <title/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="../chapter06/tar.xml"
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist> <segmentedlist>
<segtitle>&buildtime;</segtitle> <segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle> <segtitle>&diskspace;</segtitle>
<seglistitem><seg>0.2 SBU</seg><seg>12.7 MB</seg></seglistitem>
<seglistitem>
<seg>0.2 SBU</seg>
<seg>12.7 MB</seg>
</seglistitem>
</segmentedlist> </segmentedlist>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/tar.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="../chapter06/tar.xml"
xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
</sect2> </sect2>
@ -40,7 +54,8 @@ some issues with GCC-&gcc-version;:</para>
<screen><userinput>make</userinput></screen> <screen><userinput>make</userinput></screen>
<para>To test the results, issue: <userinput>make check</userinput>.</para> <para>To test the results, issue:
<userinput>make check</userinput>.</para>
<para>Install the package:</para> <para>Install the package:</para>
@ -48,10 +63,12 @@ some issues with GCC-&gcc-version;:</para>
</sect2> </sect2>
<sect2 role="content"><title/> <sect2 role="content">
<para>Details on this package are located in <xref <title/>
linkend="contents-tar" role="."/></para>
<para>Details on this package are located in
<xref linkend="contents-tar" role="."/></para>
</sect2> </sect2>
</sect1> </sect1>

View File

@ -1,27 +1,41 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-tools-tcl" role="wrap"> <sect1 id="ch-tools-tcl" role="wrap">
<title>Tcl-&tcl-version;</title>
<?dbhtml filename="tcl.html"?> <?dbhtml filename="tcl.html"?>
<indexterm zone="ch-tools-tcl"><primary sortas="a-Tcl">Tcl</primary></indexterm> <title>Tcl-&tcl-version;</title>
<indexterm zone="ch-tools-tcl">
<primary sortas="a-Tcl">Tcl</primary>
</indexterm>
<sect2 role="package">
<title/>
<sect2 role="package"><title/>
<para>The Tcl package contains the Tool Command Language.</para> <para>The Tcl package contains the Tool Command Language.</para>
<segmentedlist> <segmentedlist>
<segtitle>&buildtime;</segtitle> <segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle> <segtitle>&diskspace;</segtitle>
<seglistitem><seg>0.9 SBU</seg><seg>23.3 MB</seg></seglistitem>
<seglistitem>
<seg>0.9 SBU</seg>
<seg>23.3 MB</seg>
</seglistitem>
</segmentedlist> </segmentedlist>
<segmentedlist> <segmentedlist>
<segtitle>&dependencies;</segtitle> <segtitle>&dependencies;</segtitle>
<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
GCC, Glibc, Grep, Make, and Sed</seg></seglistitem> <seglistitem>
<seg>Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep,
Make, and Sed</seg>
</seglistitem>
</segmentedlist> </segmentedlist>
</sect2> </sect2>
@ -29,16 +43,16 @@ GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
<sect2 role="installation"> <sect2 role="installation">
<title>Installation of Tcl</title> <title>Installation of Tcl</title>
<para>This package and the next two (Expect and DejaGNU) are <para>This package and the next two (Expect and DejaGNU) are installed
installed to support running the test suites for GCC and Binutils. to support running the test suites for GCC and Binutils. Installing
Installing three packages for testing purposes may seem excessive, but three packages for testing purposes may seem excessive, but it is very
it is very reassuring, if not essential, to know that the most reassuring, if not essential, to know that the most important tools are
important tools are working properly. Even if the test suites are not working properly. Even if the test suites are not run in this chapter
run in this chapter (they are not mandatory), these packages (they are not mandatory), these packages are required to run the test
are required to run the test suites in <xref suites in <xref linkend="chapter-building-system"/>.</para>
linkend="chapter-building-system"/>.</para>
<para>Tcl's configure script has a syntax error:</para> <para>Tcl's configure script has a syntax error:</para>
<screen><userinput>cd unix <screen><userinput>cd unix
cp -v configure{,.orig} cp -v configure{,.orig}
sed "s/relid'/relid/" configure.orig &gt; configure</userinput></screen> sed "s/relid'/relid/" configure.orig &gt; configure</userinput></screen>
@ -52,21 +66,21 @@ sed "s/relid'/relid/" configure.orig &gt; configure</userinput></screen>
<screen><userinput>make</userinput></screen> <screen><userinput>make</userinput></screen>
<para>To test the results, issue: <userinput>TZ=UTC make test</userinput>. <para>To test the results, issue: <userinput>TZ=UTC make test</userinput>.
The Tcl test suite is known to experience failures The Tcl test suite is known to experience failures under certain host
under certain host conditions that are not fully understood. conditions that are not fully understood. Therefore, test suite failures
Therefore, test suite failures here are not surprising, and are not here are not surprising, and are not considered critical. The
considered critical. The <parameter>TZ=UTC</parameter> parameter sets <parameter>TZ=UTC</parameter> parameter sets the time zone to Coordinated
the time zone to Coordinated Universal Time (UTC), also known as Universal Time (UTC), also known as Greenwich Mean Time (GMT), but only
Greenwich Mean Time (GMT), but only for the duration of the test suite for the duration of the test suite run. This ensures that the clock tests
run. This ensures that the clock tests are exercised correctly. are exercised correctly. Details on the <envar>TZ</envar> environment
Details on the <envar>TZ</envar> environment variable are provided in variable are provided in <xref linkend="chapter-bootscripts"/>.</para>
<xref linkend="chapter-bootscripts"/>.</para>
<para>Install the package:</para> <para>Install the package:</para>
<screen><userinput>make install</userinput></screen> <screen><userinput>make install</userinput></screen>
<para>Install Tcl's headers. The next package, Expect, requires them to build.</para> <para>Install Tcl's headers. The next package, Expect, requires them
to build.</para>
<screen><userinput>make install-private-headers</userinput></screen> <screen><userinput>make install-private-headers</userinput></screen>
@ -76,15 +90,21 @@ Details on the <envar>TZ</envar> environment variable are provided in
</sect2> </sect2>
<sect2 id="contents-tcl" role="content"><title>Contents of Tcl</title> <sect2 id="contents-tcl" role="content">
<title>Contents of Tcl</title>
<segmentedlist> <segmentedlist>
<segtitle>Installed programs</segtitle> <segtitle>Installed programs</segtitle>
<segtitle>Installed library</segtitle> <segtitle>Installed library</segtitle>
<seglistitem><seg>tclsh (link to tclsh8.4) and tclsh8.4</seg><seg>libtcl8.4.so</seg></seglistitem>
<seglistitem>
<seg>tclsh (link to tclsh8.4) and tclsh8.4</seg>
<seg>libtcl8.4.so</seg>
</seglistitem>
</segmentedlist> </segmentedlist>
<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead> <variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?> <?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?> <?dbhtml list-presentation="table"?>
@ -92,7 +112,9 @@ Details on the <envar>TZ</envar> environment variable are provided in
<term><command>tclsh8.4</command></term> <term><command>tclsh8.4</command></term>
<listitem> <listitem>
<para>The Tcl command shell</para> <para>The Tcl command shell</para>
<indexterm zone="ch-tools-tcl tclsh8.4"><primary sortas="b-tclsh8.4">tclsh8.4</primary></indexterm> <indexterm zone="ch-tools-tcl tclsh8.4">
<primary sortas="b-tclsh8.4">tclsh8.4</primary>
</indexterm>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -100,7 +122,9 @@ Details on the <envar>TZ</envar> environment variable are provided in
<term><command>tclsh</command></term> <term><command>tclsh</command></term>
<listitem> <listitem>
<para>A link to tclsh8.4</para> <para>A link to tclsh8.4</para>
<indexterm zone="ch-tools-tcl tclsh"><primary sortas="b-tclsh">tclsh</primary></indexterm> <indexterm zone="ch-tools-tcl tclsh">
<primary sortas="b-tclsh">tclsh</primary>
</indexterm>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -108,12 +132,14 @@ Details on the <envar>TZ</envar> environment variable are provided in
<term><filename class="libraryfile">libtcl8.4.so</filename></term> <term><filename class="libraryfile">libtcl8.4.so</filename></term>
<listitem> <listitem>
<para>The Tcl library</para> <para>The Tcl library</para>
<indexterm zone="ch-tools-tcl libtcl8.4.so"><primary sortas="c-libtcl8.4.so">libtcl8.4.so</primary></indexterm> <indexterm zone="ch-tools-tcl libtcl8.4.so">
<primary sortas="c-libtcl8.4.so">libtcl8.4.so</primary>
</indexterm>
</listitem> </listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
</sect2> </sect2>
</sect1> </sect1>

View File

@ -1,26 +1,40 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-tools-texinfo" role="wrap"> <sect1 id="ch-tools-texinfo" role="wrap">
<title>Texinfo-&texinfo-version;</title>
<?dbhtml filename="texinfo.html"?> <?dbhtml filename="texinfo.html"?>
<title>Texinfo-&texinfo-version;</title>
<indexterm zone="ch-tools-texinfo"> <indexterm zone="ch-tools-texinfo">
<primary sortas="a-Texinfo">Texinfo</primary> <primary sortas="a-Texinfo">Texinfo</primary>
<secondary>tools</secondary></indexterm> <secondary>tools</secondary>
</indexterm>
<sect2 role="package"><title/> <sect2 role="package">
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/texinfo.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <title/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="../chapter06/texinfo.xml"
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist> <segmentedlist>
<segtitle>&buildtime;</segtitle> <segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle> <segtitle>&diskspace;</segtitle>
<seglistitem><seg>0.2 SBU</seg><seg>14.7 MB</seg></seglistitem>
<seglistitem>
<seg>0.2 SBU</seg>
<seg>14.7 MB</seg>
</seglistitem>
</segmentedlist> </segmentedlist>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/texinfo.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="../chapter06/texinfo.xml"
xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
</sect2> </sect2>
@ -35,7 +49,8 @@
<screen><userinput>make</userinput></screen> <screen><userinput>make</userinput></screen>
<para>To test the results, issue: <userinput>make check</userinput>.</para> <para>To test the results, issue:
<userinput>make check</userinput>.</para>
<para>Install the package:</para> <para>Install the package:</para>
@ -43,10 +58,12 @@
</sect2> </sect2>
<sect2 role="content"><title/> <sect2 role="content">
<para>Details on this package are located in <xref <title/>
linkend="contents-texinfo" role="."/></para>
<para>Details on this package are located in
<xref linkend="contents-texinfo" role="."/></para>
</sect2> </sect2>
</sect1> </sect1>

View File

@ -1,17 +1,20 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-tools-toolchaintechnotes"> <sect1 id="ch-tools-toolchaintechnotes">
<title>Toolchain Technical Notes</title>
<?dbhtml filename="toolchaintechnotes.html"?> <?dbhtml filename="toolchaintechnotes.html"?>
<para>This section explains some of the rationale and technical <title>Toolchain Technical Notes</title>
details behind the overall build method. It is not essential to
immediately understand everything in this section. Most of this <para>This section explains some of the rationale and technical details
information will be clearer after performing an actual build. This behind the overall build method. It is not essential to immediately
section can be referred back to at any time during the process.</para> understand everything in this section. Most of this information will be
clearer after performing an actual build. This section can be referred
back to at any time during the process.</para>
<para>The overall goal of <xref linkend="chapter-temporary-tools"/> is to <para>The overall goal of <xref linkend="chapter-temporary-tools"/> is to
provide a temporary environment that can be chrooted into and from which can be provide a temporary environment that can be chrooted into and from which can be
@ -31,67 +34,65 @@ simple way to determine the name of the target triplet is to run the
many packages. Unpack the Binutils sources and run the script: many packages. Unpack the Binutils sources and run the script:
<userinput>./config.guess</userinput> and note the output.</para> <userinput>./config.guess</userinput> and note the output.</para>
<para>Also be aware of the name of the platform's dynamic linker, <para>Also be aware of the name of the platform's dynamic linker, often
often referred to as the dynamic loader (not to be confused with the referred to as the dynamic loader (not to be confused with the standard
standard linker <command>ld</command> that is part of Binutils). The linker <command>ld</command> that is part of Binutils). The dynamic linker
dynamic linker provided by Glibc finds and loads the shared libraries provided by Glibc finds and loads the shared libraries needed by a program,
needed by a program, prepares the program to run, and then runs it. prepares the program to run, and then runs it. The name of the dynamic
The name of the dynamic linker will usually be linker will usually be <filename class="libraryfile">ld-linux.so.2</filename>.
<filename class="libraryfile">ld-linux.so.2</filename>. On platforms that are less On platforms that are less prevalent, the name might be <filename
prevalent, the name might be <filename class="libraryfile">ld.so.1</filename>, class="libraryfile">ld.so.1</filename>, and newer 64 bit platforms might
and newer 64 bit platforms might be named something else entirely. The name of be named something else entirely. The name of the platform's dynamic linker
the platform's dynamic linker can be determined by looking in the can be determined by looking in the <filename class="directory">/lib</filename>
<filename class="directory">/lib</filename> directory on the host directory on the host system. A sure-fire way to determine the name is to
system. A sure-fire way to determine the name is to inspect a random inspect a random binary from the host system by running:
binary from the host system by running: <userinput>readelf -l &lt;name <userinput>readelf -l &lt;name of binary&gt; | grep interpreter</userinput>
of binary&gt; | grep interpreter</userinput> and noting the output. and noting the output. The authoritative reference covering all platforms
The authoritative reference covering all platforms is in the is in the <filename>shlib-versions</filename> file in the root of the Glibc
<filename>shlib-versions</filename> file in the root of the Glibc
source tree.</para> source tree.</para>
</important> </important>
<para>Some key technical points of how the <xref linkend="chapter-temporary-tools"/> build <para>Some key technical points of how the <xref
method works:</para> linkend="chapter-temporary-tools"/> build method works:</para>
<itemizedlist> <itemizedlist>
<listitem><para>The process is similar in principle to <listitem>
cross-compiling, whereby tools installed in the same prefix work in <para>The process is similar in principle to cross-compiling, whereby
cooperation, and thus utilize a little GNU tools installed in the same prefix work in cooperation, and thus utilize
<quote>magic</quote></para></listitem> a little GNU <quote>magic</quote></para>
</listitem>
<listitem><para>Careful manipulation of the standard linker's library <listitem>
search path ensures programs are linked only against chosen <para>Careful manipulation of the standard linker's library search path
libraries</para></listitem> ensures programs are linked only against chosen libraries</para>
</listitem>
<listitem><para>Careful manipulation of <command>gcc</command>'s <listitem>
<para>Careful manipulation of <command>gcc</command>'s
<filename>specs</filename> file tells the compiler which target dynamic <filename>specs</filename> file tells the compiler which target dynamic
linker will be used</para></listitem> linker will be used</para>
</listitem>
</itemizedlist> </itemizedlist>
<para>Binutils is installed first because the <para>Binutils is installed first because the <command>configure</command>
<command>configure</command> runs of both GCC and Glibc perform runs of both GCC and Glibc perform various feature tests on the assembler
various feature tests on the assembler and linker to determine which and linker to determine which software features to enable or disable. This
software features to enable or disable. This is more important than is more important than one might first realize. An incorrectly configured
one might first realize. An incorrectly configured GCC or Glibc can GCC or Glibc can result in a subtly broken toolchain, where the impact of
result in a subtly broken toolchain, where the impact of such breakage such breakage might not show up until near the end of the build of an
might not show up until near the end of the build of an entire entire distribution. A test suite failure will usually highlight this error
distribution. A test suite failure will usually highlight this error
before too much additional work is performed.</para> before too much additional work is performed.</para>
<para>Binutils installs its assembler and linker in two locations, <para>Binutils installs its assembler and linker in two locations,
<filename class="directory">/tools/bin</filename> and <filename <filename class="directory">/tools/bin</filename> and <filename
class="directory">/tools/$TARGET_TRIPLET/bin</filename>. The tools in class="directory">/tools/$TARGET_TRIPLET/bin</filename>. The tools in one
one location are hard linked to the other. An important facet of the location are hard linked to the other. An important facet of the linker is
linker is its library search order. Detailed information can be its library search order. Detailed information can be obtained from
obtained from <command>ld</command> by passing it the <command>ld</command> by passing it the <parameter>--verbose</parameter>
<parameter>--verbose</parameter> flag. For example, an <userinput>ld flag. For example, an <userinput>ld --verbose | grep SEARCH</userinput>
--verbose | grep SEARCH</userinput> will illustrate the current search will illustrate the current search paths and their order. It shows which
paths and their order. It shows which files are linked by files are linked by <command>ld</command> by compiling a dummy program and
<command>ld</command> by compiling a dummy program and passing the passing the <parameter>--verbose</parameter> switch to the linker. For example,
<parameter>--verbose</parameter> switch to the linker. For example, <userinput>gcc dummy.c -Wl,--verbose 2&gt;&amp;1 | grep succeeded</userinput>
<userinput>gcc dummy.c -Wl,--verbose 2&gt;&amp;1 | grep will show all the files successfully opened during the linking.</para>
succeeded</userinput> will show all the files successfully opened
during the linking.</para>
<para>The next package installed is GCC. An example of what can be <para>The next package installed is GCC. An example of what can be
seen during its run of <command>configure</command> is:</para> seen during its run of <command>configure</command> is:</para>
@ -100,55 +101,49 @@ seen during its run of <command>configure</command> is:</para>
/tools/i686-pc-linux-gnu/bin/as /tools/i686-pc-linux-gnu/bin/as
checking what linker to use... /tools/i686-pc-linux-gnu/bin/ld</computeroutput></screen> checking what linker to use... /tools/i686-pc-linux-gnu/bin/ld</computeroutput></screen>
<para>This is important for the reasons mentioned above. It also <para>This is important for the reasons mentioned above. It also demonstrates
demonstrates that GCC's configure script does not search the PATH that GCC's configure script does not search the PATH directories to find which
directories to find which tools to use. However, during the actual tools to use. However, during the actual operation of <command>gcc</command>
operation of <command>gcc</command> itself, the same itself, the same search paths are not necessarily used. To find out which
search paths are not necessarily used. To find out which standard standard linker <command>gcc</command> will use, run:
linker <command>gcc</command> will use, run: <userinput>gcc <userinput>gcc -print-prog-name=ld</userinput>.</para>
-print-prog-name=ld</userinput>.</para>
<para>Detailed information can be obtained from <command>gcc</command> <para>Detailed information can be obtained from <command>gcc</command> by
by passing it the <parameter>-v</parameter> command line option while passing it the <parameter>-v</parameter> command line option while compiling
compiling a dummy program. For example, <userinput>gcc -v a dummy program. For example, <userinput>gcc -v dummy.c</userinput> will show
dummy.c</userinput> will show detailed information about the detailed information about the preprocessor, compilation, and assembly stages,
preprocessor, compilation, and assembly stages, including including <command>gcc</command>'s included search paths and their order.</para>
<command>gcc</command>'s included search paths and their order.</para>
<para>The next package installed is Glibc. The most important <para>The next package installed is Glibc. The most important considerations
considerations for building Glibc are the compiler, binary tools, and for building Glibc are the compiler, binary tools, and kernel headers. The
kernel headers. The compiler is generally not an issue since Glibc compiler is generally not an issue since Glibc will always use the
will always use the <command>gcc</command> found in a <command>gcc</command> found in a <envar>PATH</envar> directory. The binary
<envar>PATH</envar> directory. tools and kernel headers can be a bit more complicated. Therefore, take no
The binary tools and kernel headers can be a bit more complicated. risks and use the available configure switches to enforce the correct
Therefore, take no risks and use the available configure switches to selections. After the run of <command>configure</command>, check the contents
enforce the correct selections. After the run of of the <filename>config.make</filename> file in the <filename
<command>configure</command>, check the contents of the class="directory">glibc-build</filename> directory for all important details.
<filename>config.make</filename> file in the <filename Note the use of <parameter>CC="gcc -B/tools/bin/"</parameter> to control which
class="directory">glibc-build</filename> directory for all important binary tools are used and the use of the <parameter>-nostdinc</parameter>
details. Note the use of <parameter>CC="gcc -B/tools/bin/"</parameter> and <parameter>-isystem</parameter> flags to control the compiler's include
to control which binary tools are used and the use of the search path. These items highlight an important aspect of the Glibc
<parameter>-nostdinc</parameter> and <parameter>-isystem</parameter> package&mdash;it is very self-sufficient in terms of its build machinery and
flags to control the compiler's include search path. These items generally does not rely on toolchain defaults.</para>
highlight an important aspect of the Glibc package&mdash;it is very
self-sufficient in terms of its build machinery and generally does not
rely on toolchain defaults.</para>
<para>After the Glibc installation, make some adjustments to ensure <para>After the Glibc installation, make some adjustments to ensure that
that searching and linking take place only within the <filename searching and linking take place only within the <filename
class="directory">/tools</filename> prefix. Install an adjusted class="directory">/tools</filename> prefix. Install an adjusted
<command>ld</command>, which has a hard-wired search path limited to <command>ld</command>, which has a hard-wired search path limited to
<filename class="directory">/tools/lib</filename>. Then amend <filename class="directory">/tools/lib</filename>. Then amend
<command>gcc</command>'s specs file to point to the new dynamic linker <command>gcc</command>'s specs file to point to the new dynamic linker in
in <filename class="directory">/tools/lib</filename>. This last step <filename class="directory">/tools/lib</filename>. This last step is vital
is vital to the whole process. As mentioned above, a hard-wired path to the whole process. As mentioned above, a hard-wired path to a dynamic
to a dynamic linker is embedded into every Executable and Link Format linker is embedded into every Executable and Link Format (ELF)-shared
(ELF)-shared executable. This can be inspected by running: executable. This can be inspected by running:
<userinput>readelf -l &lt;name of binary&gt; | grep <userinput>readelf -l &lt;name of binary&gt; | grep interpreter</userinput>.
interpreter</userinput>. Amending gcc's specs file Amending gcc's specs file ensures that every program compiled from here
ensures that every program compiled from here through the end of this through the end of this chapter will use the new dynamic linker in
chapter will use the new dynamic linker in <filename <filename class="directory">/tools/lib</filename>.</para>
class="directory">/tools/lib</filename>.</para>
<para>The need to use the new dynamic linker is also the reason why <para>The need to use the new dynamic linker is also the reason why
the Specs patch is applied for the second pass of GCC. Failure to do the Specs patch is applied for the second pass of GCC. Failure to do
@ -161,9 +156,8 @@ would defeat the goal of getting away from the host.</para>
<parameter>--with-lib-path</parameter> configure switch to control <parameter>--with-lib-path</parameter> configure switch to control
<command>ld</command>'s library search path. From this point onwards, <command>ld</command>'s library search path. From this point onwards,
the core toolchain is self-contained and self-hosted. The remainder of the core toolchain is self-contained and self-hosted. The remainder of
the <xref linkend="chapter-temporary-tools"/> packages all build the <xref linkend="chapter-temporary-tools"/> packages all build against
against the new Glibc in <filename the new Glibc in <filename class="directory">/tools</filename>.</para>
class="directory">/tools</filename>.</para>
<para>Upon entering the chroot environment in <xref <para>Upon entering the chroot environment in <xref
linkend="chapter-building-system"/>, the first major package to be linkend="chapter-building-system"/>, the first major package to be
@ -222,4 +216,3 @@ achieved when the first two packages are built dynamically.</para>
</sect2>--> </sect2>-->
</sect1> </sect1>

View File

@ -1,35 +1,49 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-tools-util-linux" role="wrap"> <sect1 id="ch-tools-util-linux" role="wrap">
<title>Util-linux-&util-linux-version;</title>
<?dbhtml filename="util-linux.html"?> <?dbhtml filename="util-linux.html"?>
<title>Util-linux-&util-linux-version;</title>
<indexterm zone="ch-tools-util-linux"> <indexterm zone="ch-tools-util-linux">
<primary sortas="a-Util-linux">Util-linux</primary> <primary sortas="a-Util-linux">Util-linux</primary>
<secondary>tools</secondary></indexterm> <secondary>tools</secondary>
</indexterm>
<sect2 role="package"><title/> <sect2 role="package">
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/util-linux.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <title/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="../chapter06/util-linux.xml"
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist> <segmentedlist>
<segtitle>&buildtime;</segtitle> <segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle> <segtitle>&diskspace;</segtitle>
<seglistitem><seg>0.2 SBU</seg><seg>8.9 MB</seg></seglistitem>
<seglistitem>
<seg>0.2 SBU</seg>
<seg>8.9 MB</seg>
</seglistitem>
</segmentedlist> </segmentedlist>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/util-linux.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="../chapter06/util-linux.xml"
xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
</sect2> </sect2>
<sect2 role="installation"> <sect2 role="installation">
<title>Installation of Util-linux</title> <title>Installation of Util-linux</title>
<para>Util-linux does not use the freshly installed headers and libraries from <para>Util-linux does not use the freshly installed headers and libraries
the <filename class="directory">/tools</filename> directory by default. This is from the <filename class="directory">/tools</filename> directory by default.
fixed by altering the configure script:</para> This is fixed by altering the configure script:</para>
<screen><userinput>sed -i 's@/usr/include@/tools/include@g' configure</userinput></screen> <screen><userinput>sed -i 's@/usr/include@/tools/include@g' configure</userinput></screen>
@ -55,9 +69,12 @@ make -C text-utils more</userinput></screen>
</sect2> </sect2>
<sect2 role="content"><title/> <sect2 role="content">
<para>Details on this package are located in <xref <title/>
linkend="contents-utillinux" role="."/></para>
</sect2>
</sect1>
<para>Details on this package are located in
<xref linkend="contents-utillinux" role="."/></para>
</sect2>
</sect1>