Indenting chapter 05, part 1.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7279 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Manuel Canales Esparcia 2006-01-17 19:37:53 +00:00
parent 10115162c0
commit 81109e3ece
8 changed files with 454 additions and 348 deletions

View File

@ -1,78 +1,82 @@
<?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-adjusting"> <sect1 id="ch-tools-adjusting">
<title>Adjusting the Toolchain</title> <?dbhtml filename="adjusting.html"?>
<?dbhtml filename="adjusting.html"?>
<para>Now that the temporary C libraries have been installed, all <title>Adjusting the Toolchain</title>
tools compiled in the rest of this chapter should be linked against
these libraries. In order to accomplish this, the linker and the
compiler's specs file need to be adjusted.</para>
<para>The linker, adjusted at the end of the first pass of Binutils, <para>Now that the temporary C libraries have been installed, all
is installed by running the following command from within the tools compiled in the rest of this chapter should be linked against
<filename class="directory">binutils-build</filename> directory:</para> these libraries. In order to accomplish this, the linker and the
compiler's specs file need to be adjusted.</para>
<para>The linker, adjusted at the end of the first pass of Binutils,
is installed by running the following command from within the
<filename class="directory">binutils-build</filename> directory:</para>
<screen><userinput>make -C ld install</userinput></screen> <screen><userinput>make -C ld install</userinput></screen>
<para>From this point onwards, everything will link only <para>From this point onwards, everything will link only against the
against the libraries in <filename class="directory">/tools/lib</filename>.</para> libraries in <filename class="directory">/tools/lib</filename>.</para>
<note><para>If the earlier warning to retain the Binutils source and <note>
build directories from the first pass was missed, ignore the above <para>If the earlier warning to retain the Binutils source and
command. This results in a small chance that the subsequent testing build directories from the first pass was missed, ignore the above
programs will link against libraries on the host. This is not ideal, command. This results in a small chance that the subsequent testing
but it is not a major problem. The situation is corrected when the programs will link against libraries on the host. This is not ideal,
second pass of Binutils is installed later.</para></note> but it is not a major problem. The situation is corrected when the
second pass of Binutils is installed later.</para>
</note>
<para>Now that the adjusted linker is installed, the Binutils build and source <para>Now that the adjusted linker is installed, the Binutils build and source
directories should be removed.</para> directories should be removed.</para>
<para>The next task is to point GCC to the new dynamic linker. This is done by <para>The next task is to point GCC to the new dynamic linker. This is done by
dumping GCC's <quote>specs</quote> file to a location where GCC will look for it dumping GCC's <quote>specs</quote> file to a location where GCC will look for it
by default. A simple <command>sed</command> substitution then alters the by default. A simple <command>sed</command> substitution then alters the
dynamic linker that GCC will use:</para> dynamic linker that GCC will use:</para>
<!-- Ampersands are needed to allow copy and paste --> <!-- Ampersands are needed to allow copy and paste -->
<screen><userinput>SPECFILE=`dirname $(gcc -print-libgcc-file-name)`/specs &amp;&amp; <screen><userinput>SPECFILE=`dirname $(gcc -print-libgcc-file-name)`/specs &amp;&amp;
gcc -dumpspecs > $SPECFILE &amp;&amp; gcc -dumpspecs > $SPECFILE &amp;&amp;
sed 's@^/lib/ld-linux.so.2@/tools&amp;@g' $SPECFILE &gt; tempspecfile &amp;&amp; sed 's@^/lib/ld-linux.so.2@/tools&amp;@g' $SPECFILE &gt; tempspecfile &amp;&amp;
mv -vf tempspecfile $SPECFILE &amp;&amp; mv -vf tempspecfile $SPECFILE &amp;&amp;
unset SPECFILE</userinput></screen> unset SPECFILE</userinput></screen>
<para>It is recommended that the above <para>It is recommended that the above command be copy-and-pasted in order to
command be copy-and-pasted in order to ensure accuracy. ensure accuracy. Alternatively, the specs file can be edited by hand. This is
Alternatively, the specs file can be edited by hand. This is done by done by replacing every occurrence of <quote>/lib/ld-linux.so.2</quote> with
replacing every occurrence of <quote>/lib/ld-linux.so.2</quote> with <quote>/tools/lib/ld-linux.so.2</quote></para>
<quote>/tools/lib/ld-linux.so.2</quote></para>
<para>Be sure to visually inspect the specs file in order to verify the <para>Be sure to visually inspect the specs file in order to verify the
intended changes have been made.</para> intended changes have been made.</para>
<important><para>If working on a platform where the name of the <important>
dynamic linker is something other than <para>If working on a platform where the name of the dynamic linker is
<filename class="libraryfile">ld-linux.so.2</filename>, replace something other than <filename class="libraryfile">ld-linux.so.2</filename>,
<quote>ld-linux.so.2</quote> with the name of the platform's replace <quote>ld-linux.so.2</quote> with the name of the platform's
dynamic linker in the above commands. Refer back to <xref dynamic linker in the above commands. Refer back to <xref
linkend="ch-tools-toolchaintechnotes" role=","/> if linkend="ch-tools-toolchaintechnotes" role=","/> if necessary.</para>
necessary.</para></important> </important>
<para>During the build process, GCC runs a script <para>During the build process, GCC runs a script
(<command>fixincludes</command>) that scans the system for header files that may (<command>fixincludes</command>) that scans the system for header files
need to be fixed (they might contain syntax errors, for example), and installs that may need to be fixed (they might contain syntax errors, for example),
the fixed versions in a private include directory. There is a possibility that, and installs the fixed versions in a private include directory. There is a
as a result of this process, some header files from the host system have found possibility that, as a result of this process, some header files from the
their way into GCC's private include directory. As the rest of this chapter only host system have found their way into GCC's private include directory. As
requires the headers from GCC and Glibc, which have both been installed at this the rest of this chapter only requires the headers from GCC and Glibc,
point, any &quot;fixed&quot; headers can safely be removed. This helps to avoid which have both been installed at this point, any <quote>fixed</quote>
any host headers polluting the build environment. Run the following commands to headers can safely be removed. This helps to avoid any host headers
remove the header files in GCC's private include directory (you may find it polluting the build environment. Run the following commands to remove the
easier to copy and paste these commands, rather than typing them by hand, due to header files in GCC's private include directory (you may find it easier to
their length):</para> copy and paste these commands, rather than typing them by hand, due to
their length):</para>
<!-- && used to ease copy and pasting --> <!-- && used to ease copy and pasting -->
<screen><userinput>GCC_INCLUDEDIR=`dirname $(gcc -print-libgcc-file-name)`/include &amp;&amp; <screen><userinput>GCC_INCLUDEDIR=`dirname $(gcc -print-libgcc-file-name)`/include &amp;&amp;
@ -80,50 +84,49 @@ find ${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; &amp;&amp;
rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*` &amp;&amp; rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*` &amp;&amp;
unset GCC_INCLUDEDIR</userinput></screen> unset GCC_INCLUDEDIR</userinput></screen>
<caution><para>At this point, it is imperative to stop and ensure that <caution>
the basic functions (compiling and linking) of the new toolchain are <para>At this point, it is imperative to stop and ensure that the basic
working as expected. To perform a sanity check, run the following functions (compiling and linking) of the new toolchain are working as
commands:</para> expected. To perform a sanity check, run the following commands:</para>
<screen><userinput>echo 'main(){}' &gt; dummy.c <screen><userinput>echo 'main(){}' &gt; dummy.c
cc dummy.c cc dummy.c
readelf -l a.out | grep ': /tools'</userinput></screen> readelf -l a.out | grep ': /tools'</userinput></screen>
<para>If everything is working correctly, there should be no errors, <para>If everything is working correctly, there should be no errors,
and the output of the last command will be of the form:</para> and the output of the last command will be of the form:</para>
<screen><computeroutput>[Requesting program interpreter: <screen><computeroutput>[Requesting program interpreter:
/tools/lib/ld-linux.so.2]</computeroutput></screen> /tools/lib/ld-linux.so.2]</computeroutput></screen>
<para>Note that <filename class="directory">/tools/lib</filename> <para>Note that <filename class="directory">/tools/lib</filename>
appears as the prefix of the dynamic linker.</para> appears as the prefix of the dynamic linker.</para>
<para>If the output is not shown as above or there was no output at <para>If the output is not shown as above or there was no output at all,
all, then something is wrong. Investigate and retrace the steps to then something is wrong. Investigate and retrace the steps to find out
find out where the problem is and correct it. This issue must be where the problem is and correct it. This issue must be resolved before
resolved before continuing on. First, perform the sanity check again, continuing on. First, perform the sanity check again, using
using <command>gcc</command> instead of <command>cc</command>. If this <command>gcc</command> instead of <command>cc</command>. If this works,
works, then the <filename class="symlink">/tools/bin/cc</filename> symlink is missing. then the <filename class="symlink">/tools/bin/cc</filename> symlink is
Revisit <xref linkend="ch-tools-gcc-pass1" role=","/> and install the symlink. missing. Revisit <xref linkend="ch-tools-gcc-pass1" role=","/> and install
Next, ensure that the <envar>PATH</envar> is correct. This can be checked by running the symlink. Next, ensure that the <envar>PATH</envar> is correct. This
<command>echo $PATH</command> and verifying that <filename can be checked by running <command>echo $PATH</command> and verifying that
class="directory">/tools/bin</filename> is at the head of the list. If <filename class="directory">/tools/bin</filename> is at the head of the
the <envar>PATH</envar> is wrong it could mean that you are not logged in as user list. If the <envar>PATH</envar> is wrong it could mean that you are not
<emphasis>lfs</emphasis> or that something went wrong back in <xref logged in as user <systemitem class="username">lfs</systemitem> or that
linkend="ch-tools-settingenviron" role="."/> Another option is that something something went wrong back in <xref linkend="ch-tools-settingenviron"
may have gone wrong with the specs file amendment above. In this case, role="."/> Another option is that something may have gone wrong with the
redo the specs file amendment, being careful to copy-and-paste the specs file amendment above. In this case, redo the specs file amendment,
commands.</para> being careful to copy-and-paste the commands.</para>
<para>Once all is well, clean up the test files:</para> <para>Once all is well, clean up the test files:</para>
<screen><userinput>rm -v dummy.c a.out</userinput></screen> <screen><userinput>rm -v dummy.c a.out</userinput></screen>
<para>Building TCL in the next section will serve as an additional check that <para>Building TCL in the next section will serve as an additional check that
the toolchain has been built properly. If TCL fails to build, it is an the toolchain has been built properly. If TCL fails to build, it is an
indication that something has gone wrong with the Binutils, GCC, or Glibc indication that something has gone wrong with the Binutils, GCC, or Glibc
installation, but not with TCL itself.</para> installation, but not with TCL itself.</para>
</caution>
</caution>
</sect1> </sect1>

View File

@ -1,69 +1,90 @@
<?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-bash" role="wrap"> <sect1 id="ch-tools-bash" role="wrap">
<title>Bash-&bash-version;</title> <?dbhtml filename="bash.html"?>
<?dbhtml filename="bash.html"?>
<indexterm zone="ch-tools-bash"> <title>Bash-&bash-version;</title>
<primary sortas="a-Bash">Bash</primary>
<secondary>tools</secondary></indexterm>
<sect2 role="package"><title/> <indexterm zone="ch-tools-bash">
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bash.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <primary sortas="a-Bash">Bash</primary>
<secondary>tools</secondary>
</indexterm>
<segmentedlist> <sect2 role="package">
<segtitle>&buildtime;</segtitle> <title/>
<segtitle>&diskspace;</segtitle>
<seglistitem><seg>1.2 SBU</seg><seg>20.7 MB</seg></seglistitem>
</segmentedlist>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bash.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="../chapter06/bash.xml"
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
</sect2> <segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<sect2 role="installation"> <seglistitem>
<title>Installation of Bash</title> <seg>1.2 SBU</seg>
<seg>20.7 MB</seg>
</seglistitem>
</segmentedlist>
<!-- Edit Me --> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
<para>Prepare Bash for compilation:</para> href="../chapter06/bash.xml"
xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
</sect2>
<sect2 role="installation">
<title>Installation of Bash</title>
<para>Prepare Bash for compilation:</para>
<screen><userinput>./configure --prefix=/tools --without-bash-malloc</userinput></screen> <screen><userinput>./configure --prefix=/tools --without-bash-malloc</userinput></screen>
<para>The meaning of the configure options:</para> <variablelist>
<title>The meaning of the configure options:</title>
<variablelist> <varlistentry>
<varlistentry> <term><parameter>--without-bash-malloc</parameter></term>
<term><parameter>--without-bash-malloc</parameter></term> <listitem>
<listitem><para>This options turns off the use of Bash's memory <para>This options turns off the use of Bash's memory allocation
allocation (malloc) function which is known to cause segmentation (<function>malloc</function>) function which is known to cause
faults. By turning this option off, Bash will use the malloc functions segmentation faults. By turning this option off, Bash will use
from Glibc which are more stable.</para></listitem> the <function>malloc</function> functions from Glibc which are
</varlistentry> more stable.</para>
</variablelist> </listitem>
</varlistentry>
<para>Compile the package:</para> </variablelist>
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen> <screen><userinput>make</userinput></screen>
<para>To test the results, issue: <userinput>make tests</userinput>.</para> <para>To test the results, issue:
<userinput>make tests</userinput>.</para>
<para>Install the package:</para> <para>Install the package:</para>
<screen><userinput>make install</userinput></screen> <screen><userinput>make install</userinput></screen>
<para>Make a link for the programs that use <command>sh</command> for <para>Make a link for the programs that use <command>sh</command> for
a shell:</para> a shell:</para>
<screen><userinput>ln -vs bash /tools/bin/sh</userinput></screen> <screen><userinput>ln -vs bash /tools/bin/sh</userinput></screen>
</sect2> </sect2>
<sect2 role="content"><title/> <sect2 role="content">
<para>Details on this package are located in <xref linkend="contents-bash" role="."/></para> <title/>
</sect2>
<para>Details on this package are located in
<xref linkend="contents-bash" role="."/></para>
</sect2>
</sect1> </sect1>

View File

@ -1,122 +1,153 @@
<?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-binutils-pass1" role="wrap"> <sect1 id="ch-tools-binutils-pass1" role="wrap">
<title>Binutils-&binutils-version; - Pass 1</title> <?dbhtml filename="binutils-pass1.html"?>
<?dbhtml filename="binutils-pass1.html"?>
<indexterm zone="ch-tools-binutils-pass1"> <title>Binutils-&binutils-version; - Pass 1</title>
<primary sortas="a-Binutils">Binutils</primary>
<secondary>tools, pass 1</secondary></indexterm>
<sect2 role="package"><title/> <indexterm zone="ch-tools-binutils-pass1">
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/binutils.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <primary sortas="a-Binutils">Binutils</primary>
<secondary>tools, pass 1</secondary>
</indexterm>
<segmentedlist> <sect2 role="package">
<segtitle>&buildtime;</segtitle> <title/>
<segtitle>&diskspace;</segtitle>
<seglistitem><seg>1.0 SBU</seg><seg>170 MB</seg></seglistitem>
</segmentedlist>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/binutils.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="../chapter06/binutils.xml"
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
</sect2> <segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<sect2 role="installation"> <seglistitem>
<title>Installation of Binutils</title> <seg>1.0 SBU</seg>
<seg>170 MB</seg>
</seglistitem>
</segmentedlist>
<para>It is important that Binutils be the first package compiled <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
because both Glibc and GCC perform various tests on the available href="../chapter06/binutils.xml"
linker and assembler to determine which of their own features to xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
enable.</para>
<para>The Binutils documentation recommends building Binutils outside of the </sect2>
source directory in a dedicated build directory:</para>
<sect2 role="installation">
<title>Installation of Binutils</title>
<para>It is important that Binutils be the first package compiled
because both Glibc and GCC perform various tests on the available
linker and assembler to determine which of their own features to
enable.</para>
<para>The Binutils documentation recommends building Binutils outside of the
source directory in a dedicated build directory:</para>
<screen><userinput>mkdir -v ../binutils-build <screen><userinput>mkdir -v ../binutils-build
cd ../binutils-build</userinput></screen> cd ../binutils-build</userinput></screen>
<note><para>In order for the SBU values listed in the rest of the book <note>
to be of any use, measure the time it takes to build this package from <para>In order for the SBU values listed in the rest of the book
the configuration, up to and including the first install. To achieve to be of any use, measure the time it takes to build this package from
this easily, wrap the three commands in a <command>time</command> the configuration, up to and including the first install. To achieve
command like this: <userinput>time { ./configure ... &amp;&amp; make this easily, wrap the three commands in a <command>time</command>
&amp;&amp; make install; }</userinput>.</para></note> command like this: <userinput>time { ./configure ... &amp;&amp; make
&amp;&amp; make install; }</userinput>.</para>
</note>
<para>Now prepare Binutils for compilation:</para> <para>Now prepare Binutils for compilation:</para>
<screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools --disable-nls</userinput></screen> <screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools --disable-nls</userinput></screen>
<para>The meaning of the configure options:</para> <variablelist>
<title>The meaning of the configure options:</title>
<variablelist> <varlistentry>
<varlistentry> <term><parameter>--prefix=/tools</parameter></term>
<term><parameter>--prefix=/tools</parameter></term> <listitem>
<listitem><para>This tells the configure script to prepare to install the Binutils <para>This tells the configure script to prepare to install the
programs in the <filename class="directory">/tools</filename> directory.</para></listitem> Binutils programs in the <filename class="directory">/tools</filename>
</varlistentry> directory.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><parameter>--disable-nls</parameter></term> <term><parameter>--disable-nls</parameter></term>
<listitem><para>This disables internationalization as i18n is not needed for the <listitem>
temporary tools.</para></listitem> <para>This disables internationalization as i18n is not needed for the
</varlistentry> temporary tools.</para>
</variablelist> </listitem>
</varlistentry>
<para>Continue with compiling the package:</para> </variablelist>
<para>Continue with compiling the package:</para>
<screen><userinput>make</userinput></screen> <screen><userinput>make</userinput></screen>
<para>Compilation is now complete. Ordinarily we would now run the <para>Compilation is now complete. Ordinarily we would now run the
test suite, but at this early stage the test suite framework (Tcl, test suite, but at this early stage the test suite framework (Tcl,
Expect, and DejaGNU) is not yet in place. The benefits of running the Expect, and DejaGNU) is not yet in place. The benefits of running the
tests at this point are minimal since the programs from this tests at this point are minimal since the programs from this
first pass will soon be replaced by those from the second.</para> first pass will soon be replaced by those from the second.</para>
<para>Install the package:</para> <para>Install the package:</para>
<screen><userinput>make install</userinput></screen> <screen><userinput>make install</userinput></screen>
<para>Next, prepare the linker for the <quote>Adjusting</quote> phase <para>Next, prepare the linker for the <quote>Adjusting</quote> phase
later on:</para> later on:</para>
<screen><userinput>make -C ld clean <screen><userinput>make -C ld clean
make -C ld LIB_PATH=/tools/lib</userinput></screen> make -C ld LIB_PATH=/tools/lib</userinput></screen>
<para>The meaning of the make parameters:</para> <variablelist>
<title>The meaning of the make parameters:</title>
<variablelist> <varlistentry>
<varlistentry> <term><parameter>-C ld clean</parameter></term>
<term><parameter>-C ld clean</parameter></term> <listitem>
<listitem><para>This tells the make program to remove all compiled <para>This tells the make program to remove all compiled
files in the <filename class="directory">ld</filename> files in the <filename class="directory">ld</filename>
subdirectory.</para></listitem> subdirectory.</para>
</varlistentry> </listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><parameter>-C ld LIB_PATH=/tools/lib</parameter></term> <term><parameter>-C ld LIB_PATH=/tools/lib</parameter></term>
<listitem><para>This option rebuilds everything in the <listitem>
<filename class="directory">ld</filename> subdirectory. Specifying <para>This option rebuilds everything in the <filename
the <envar>LIB_PATH</envar> Makefile variable on the command class="directory">ld</filename> subdirectory. Specifying the
line allows us to override the default value <envar>LIB_PATH</envar> Makefile variable on the command line
and point it to the temporary tools location. The value of this variable allows us to override the default value and point it to the
specifies the linker's default library search path. This preparation temporary tools location. The value of this variable specifies
is used later in the chapter.</para></listitem> the linker's default library search path. This preparation is
</varlistentry> used later in the chapter.</para>
</variablelist> </listitem>
</varlistentry>
<warning><para><emphasis>Do not</emphasis> remove the Binutils </variablelist>
build and source directories yet. These will be needed again in their
current state later in this chapter.</para></warning>
</sect2> <warning>
<para><emphasis>Do not</emphasis> remove the Binutils build and source
directories yet. These will be needed again in their current state later
in this chapter.</para>
</warning>
<sect2 role="content"><title/> </sect2>
<para>Details on this package are located in <xref
linkend="contents-binutils" role="."/></para> <sect2 role="content">
</sect2> <title/>
<para>Details on this package are located in
<xref linkend="contents-binutils" role="."/></para>
</sect2>
</sect1> </sect1>

View File

@ -1,91 +1,107 @@
<?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-binutils-pass2" role="wrap"> <sect1 id="ch-tools-binutils-pass2" role="wrap">
<title>Binutils-&binutils-version; - Pass 2</title> <?dbhtml filename="binutils-pass2.html"?>
<?dbhtml filename="binutils-pass2.html"?>
<indexterm zone="ch-tools-binutils-pass2"> <title>Binutils-&binutils-version; - Pass 2</title>
<primary sortas="a-Binutils">Binutils</primary>
<secondary>tools, pass 2</secondary></indexterm>
<sect2 role="package"><title/> <indexterm zone="ch-tools-binutils-pass2">
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" <primary sortas="a-Binutils">Binutils</primary>
href="../chapter06/binutils.xml" <secondary>tools, pass 2</secondary>
xpointer="xpointer(/sect1/sect2[1]/para[1])"/> </indexterm>
<segmentedlist> <sect2 role="package">
<segtitle>&buildtime;</segtitle> <title/>
<segtitle>&diskspace;</segtitle>
<seglistitem><seg>1.5 SBU</seg><seg>114 MB</seg></seglistitem>
</segmentedlist>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="../chapter06/binutils.xml" href="../chapter06/binutils.xml"
xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/> xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
</sect2> <segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<sect2 role="installation"> <seglistitem>
<title>Re-installation of Binutils</title> <seg>1.5 SBU</seg>
<seg>114 MB</seg>
</seglistitem>
</segmentedlist>
<para>Create a separate build directory again:</para> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="../chapter06/binutils.xml"
xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
</sect2>
<sect2 role="installation">
<title>Re-installation of Binutils</title>
<para>Create a separate build directory again:</para>
<screen><userinput>mkdir -v ../binutils-build <screen><userinput>mkdir -v ../binutils-build
cd ../binutils-build</userinput></screen> cd ../binutils-build</userinput></screen>
<para>Prepare Binutils for compilation:</para> <para>Prepare Binutils for compilation:</para>
<screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \ <screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \
--disable-nls --enable-shared --with-lib-path=/tools/lib</userinput></screen> --disable-nls --enable-shared --with-lib-path=/tools/lib</userinput></screen>
<para>The meaning of the new configure options:</para> <variablelist>
<title>The meaning of the new configure options:</title>
<variablelist> <varlistentry>
<varlistentry> <term><parameter>--with-lib-path=/tools/lib</parameter></term>
<term><parameter>--with-lib-path=/tools/lib</parameter></term> <listitem>
<listitem><para>This tells the configure script to specify the library <para>This tells the configure script to specify the library
search path during the compilation of Binutils, resulting in <filename search path during the compilation of Binutils, resulting in
class="directory">/tools/lib</filename> being passed to the linker. <filename class="directory">/tools/lib</filename> being passed
This prevents the linker from searching through library directories on to the linker. This prevents the linker from searching through
the host.</para></listitem> library directories on the host.</para>
</varlistentry> </listitem>
</variablelist> </varlistentry>
<para>Compile the package:</para> </variablelist>
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen> <screen><userinput>make</userinput></screen>
<para>Compilation is now complete. As discussed earlier, running the <para>Compilation is now complete. As discussed earlier, running the
test suite is not mandatory for the temporary tools here in this test suite is not mandatory for the temporary tools here in this
chapter. To run the Binutils test suite anyway, issue the following chapter. To run the Binutils test suite anyway, issue the following
command:</para> command:</para>
<screen><userinput>make check</userinput></screen> <screen><userinput>make check</userinput></screen>
<para>Install the package:</para> <para>Install the package:</para>
<screen><userinput>make install</userinput></screen> <screen><userinput>make install</userinput></screen>
<para>Now prepare the linker for the <quote>Re-adjusting</quote> phase in the next <para>Now prepare the linker for the <quote>Re-adjusting</quote> phase in
chapter:</para> the next chapter:</para>
<screen><userinput>make -C ld clean <screen><userinput>make -C ld clean
make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen> make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen>
<warning>
<para><emphasis>Do not</emphasis> remove the Binutils source and build
directories yet. These directories will be needed again in the next
chapter in their current state.</para>
</warning>
<warning><para><emphasis>Do not</emphasis> remove the Binutils source and </sect2>
build directories yet. These directories will be needed again in the next
chapter in their current state.</para></warning>
</sect2> <sect2 role="content">
<title/>
<sect2 role="content"><title/> <para>Details on this package are located in
<para>Details on this package are located in <xref <xref linkend="contents-binutils" role="."/></para>
linkend="contents-binutils" role="."/></para>
</sect2> </sect2>
</sect1> </sect1>

View File

@ -1,53 +1,69 @@
<?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-bison" xreflabel="Bison" role="wrap">
<title>Bison-&bison-version;</title>
<?dbhtml filename="bison.html"?>
<indexterm zone="ch-tools-bison"> <sect1 id="ch-tools-bison" role="wrap">
<primary sortas="a-Bison">Bison</primary> <?dbhtml filename="bison.html"?>
<secondary>tools</secondary></indexterm>
<sect2 role="package"><title/> <title>Bison-&bison-version;</title>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bison.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist> <indexterm zone="ch-tools-bison">
<segtitle>&buildtime;</segtitle> <primary sortas="a-Bison">Bison</primary>
<segtitle>&diskspace;</segtitle> <secondary>tools</secondary>
<seglistitem><seg>0.6 SBU</seg><seg>10.0 MB</seg></seglistitem> </indexterm>
</segmentedlist>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bison.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/> <sect2 role="package">
<title/>
</sect2> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="../chapter06/bison.xml"
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<sect2 role="installation"> <segmentedlist>
<title>Installation of Bison</title> <segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<para>Prepare Bison for compilation:</para> <seglistitem>
<seg>0.6 SBU</seg>
<seg>10.0 MB</seg>
</seglistitem>
</segmentedlist>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="../chapter06/bison.xml"
xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
</sect2>
<sect2 role="installation">
<title>Installation of Bison</title>
<para>Prepare Bison for compilation:</para>
<screen><userinput>./configure --prefix=/tools</userinput></screen> <screen><userinput>./configure --prefix=/tools</userinput></screen>
<para>Compile the package:</para> <para>Compile the package:</para>
<screen><userinput>make</userinput></screen> <screen><userinput>make</userinput></screen>
<para>To test the results, issue: <userinput>make <para>To test the results, issue:
check</userinput>.</para> <userinput>make check</userinput>.</para>
<para>Install the package:</para> <para>Install the package:</para>
<screen><userinput>make install</userinput></screen> <screen><userinput>make install</userinput></screen>
</sect2> </sect2>
<sect2 role="content"><title/> <sect2 role="content">
<para>Details on this package are located in <xref <title/>
linkend="contents-bison" role="."/></para>
</sect2> <para>Details on this package are located in
<xref linkend="contents-bison" role="."/></para>
</sect2>
</sect1> </sect1>

View File

@ -1,47 +1,63 @@
<?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-bzip2" role="wrap"> <sect1 id="ch-tools-bzip2" role="wrap">
<title>Bzip2-&bzip2-version;</title> <?dbhtml filename="bzip2.html"?>
<?dbhtml filename="bzip2.html"?>
<indexterm zone="ch-tools-bzip2"> <title>Bzip2-&bzip2-version;</title>
<primary sortas="a-Bzip2">Bzip2</primary>
<secondary>tools</secondary></indexterm>
<sect2 role="package"><title/> <indexterm zone="ch-tools-bzip2">
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bzip2.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <primary sortas="a-Bzip2">Bzip2</primary>
<secondary>tools</secondary>
</indexterm>
<segmentedlist> <sect2 role="package">
<segtitle>&buildtime;</segtitle> <title/>
<segtitle>&diskspace;</segtitle>
<seglistitem><seg>0.1 SBU</seg><seg>3.5 MB</seg></seglistitem>
</segmentedlist>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bzip2.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="../chapter06/bzip2.xml"
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
</sect2> <segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<sect2 role="installation"> <seglistitem>
<title>Installation of Bzip2</title> <seg>0.1 SBU</seg>
<seg>3.5 MB</seg>
</seglistitem>
</segmentedlist>
<para>The Bzip2 package does not contain a <command>configure</command> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
script. Compile and test it with:</para> href="../chapter06/bzip2.xml"
xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
</sect2>
<sect2 role="installation">
<title>Installation of Bzip2</title>
<para>The Bzip2 package does not contain a <command>configure</command>
script. Compile and test it with:</para>
<screen><userinput>make</userinput></screen> <screen><userinput>make</userinput></screen>
<para>Install the package:</para> <para>Install the package:</para>
<screen><userinput>make PREFIX=/tools install</userinput></screen> <screen><userinput>make PREFIX=/tools install</userinput></screen>
</sect2> </sect2>
<sect2 role="content"><title/> <sect2 role="content">
<para>Details on this package are located in <xref <title/>
linkend="contents-bzip2" role="."/></para>
</sect2> <para>Details on this package are located in
<xref linkend="contents-bzip2" role="."/></para>
</sect2>
</sect1> </sect1>

View File

@ -1,45 +1,48 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE chapter 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;
]> ]>
<chapter id="chapter-temporary-tools" xreflabel="Chapter 5">
<?dbhtml dir="chapter05"?>
<title>Constructing a Temporary System</title>
<?dbhtml filename="chapter05.html"?>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/> <chapter id="chapter-temporary-tools" xreflabel="Chapter 5">
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="toolchaintechnotes.xml"/> <?dbhtml dir="chapter05"?>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils-pass1.xml"/> <?dbhtml filename="chapter05.html"?>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-pass1.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="linux-libc-headers.xml"/> <title>Constructing a Temporary System</title>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="glibc.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="adjusting.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tcl.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="toolchaintechnotes.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="expect.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils-pass1.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="dejagnu.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-pass1.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-pass2.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="linux-libc-headers.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils-pass2.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="glibc.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gawk.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="adjusting.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="coreutils.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tcl.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bzip2.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="expect.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gzip.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="dejagnu.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="diffutils.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-pass2.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="findutils.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils-pass2.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="make.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gawk.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grep.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="coreutils.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sed.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bzip2.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gettext.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gzip.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ncurses.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="diffutils.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="patch.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="findutils.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tar.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="make.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="texinfo.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grep.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bash.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sed.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="m4.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gettext.xml"/>
<!--<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bison.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ncurses.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="flex.xml"/>--> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="patch.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="util-linux.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tar.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="perl.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="texinfo.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="stripping.xml"/> <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bash.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="m4.xml"/>
<!--<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bison.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="flex.xml"/>-->
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="util-linux.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="perl.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="stripping.xml"/>
</chapter> </chapter>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!ENTITY version "SVN-20060115"> <!ENTITY version "SVN-20060117">
<!ENTITY releasedate "January 15, 2006"> <!ENTITY releasedate "January 17, 2006">
<!ENTITY milestone "6.2"> <!ENTITY milestone "6.2">
<!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" --> <!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->