Procházet zdrojové kódy

Text updates for cross2 Chapter 5

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11914 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Bruce Dubbs před 4 roky
rodič
revize
79524a0c69

+ 1 - 1
chapter04/aboutsbus.xml

@@ -41,7 +41,7 @@
     compilation time for a package can be reduced by performing a "parallel
     compilation time for a package can be reduced by performing a "parallel
     make" by either setting an environment variable or telling the
     make" by either setting an environment variable or telling the
     <command>make</command> program how many processors are available.  For
     <command>make</command> program how many processors are available.  For
-    instance, an Intel i5-6500 COU  can support four simultaneous processes with:</para>
+    instance, an Intel i5-6500 CPU can support four simultaneous processes with:</para>
 
 
     <screen role="nodump"><userinput>export MAKEFLAGS='-j4'</userinput></screen>
     <screen role="nodump"><userinput>export MAKEFLAGS='-j4'</userinput></screen>
 
 

+ 5 - 16
chapter05/binutils-pass1.xml

@@ -63,13 +63,10 @@ cd       build</userinput></screen>
       to be of any use, measure the time it takes to build this package from
       to be of any use, measure the time it takes to build this package from
       the configuration, up to and including the first install. To achieve
       the configuration, up to and including the first install. To achieve
       this easily, wrap the commands in a <command>time</command>
       this easily, wrap the commands in a <command>time</command>
-      command like this: <userinput>time { ./configure ... &amp;&amp; ...
+      command like this: <userinput>time { ./configure ... &amp;&amp; make
       &amp;&amp; make install; }</userinput>.</para>
       &amp;&amp; make install; }</userinput>.</para>
     </note>
     </note>
-<!--
-    <note><para>The approximate build SBU values and required disk space
-    in Chapter&nbsp;5 does not include test suite data.</para></note>
--->
+
     <para>Now prepare Binutils for compilation:</para>
     <para>Now prepare Binutils for compilation:</para>
 
 
 <screen><userinput remap="configure">../configure --prefix=$LFS/tools       \
 <screen><userinput remap="configure">../configure --prefix=$LFS/tools       \
@@ -85,7 +82,7 @@ cd       build</userinput></screen>
         <term><parameter>--prefix=$LFS/tools</parameter></term>
         <term><parameter>--prefix=$LFS/tools</parameter></term>
         <listitem>
         <listitem>
           <para>This tells the configure script to prepare to install the
           <para>This tells the configure script to prepare to install the
-          Binutils programs in the <filename
+          binutils programs in the <filename
           class="directory">$LFS/tools</filename> directory.</para>
           class="directory">$LFS/tools</filename> directory.</para>
         </listitem>
         </listitem>
       </varlistentry>
       </varlistentry>
@@ -97,22 +94,14 @@ cd       build</userinput></screen>
           $LFS for the target system libraries as needed.</para>
           $LFS for the target system libraries as needed.</para>
         </listitem>
         </listitem>
       </varlistentry>
       </varlistentry>
- <!--
-      <varlistentry>
-        <term><parameter>- -with-lib-path=/tools/lib</parameter></term>
-        <listitem>
-          <para>This specifies which library path the linker should be
-          configured to use.</para>
-        </listitem>
-      </varlistentry>
-  -->
+
       <varlistentry>
       <varlistentry>
         <term><envar>--target=$LFS_TGT</envar></term>
         <term><envar>--target=$LFS_TGT</envar></term>
         <listitem>
         <listitem>
           <para>Because the machine description in the <envar>LFS_TGT</envar>
           <para>Because the machine description in the <envar>LFS_TGT</envar>
           variable is slightly different than the value returned by the
           variable is slightly different than the value returned by the
           <command>config.guess</command> script, this switch will tell the
           <command>config.guess</command> script, this switch will tell the
-          <command>configure</command> script to adjust Binutil's build system
+          <command>configure</command> script to adjust binutil's build system
           for building a cross linker.  </para>
           for building a cross linker.  </para>
         </listitem>
         </listitem>
       </varlistentry>
       </varlistentry>

+ 21 - 12
chapter05/gcc-pass1.xml

@@ -131,37 +131,46 @@ cd       build</userinput></screen>
         </listitem>
         </listitem>
       </varlistentry>
       </varlistentry>
 
 
+      <varlistentry>
+        <term><parameter>--enable-initfini-array</parameter></term>
+        <listitem>
+          <para>This switch forces the use of some internal data structures
+          that are needed but cannot be detected when building a cross
+          compiler.</para>
+        </listitem>
+      </varlistentry>
+
       <varlistentry>
       <varlistentry>
         <term><parameter>--disable-shared</parameter></term>
         <term><parameter>--disable-shared</parameter></term>
         <listitem>
         <listitem>
           <para>This switch forces GCC to link its internal libraries
           <para>This switch forces GCC to link its internal libraries
-	  statically. We need this because the shared libraries require glibc,
-	  which is not yet installed on the target system.</para>
+          statically. We need this because the shared libraries require glibc,
+          which is not yet installed on the target system.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--disable-multilib</parameter></term>
+        <listitem>
+          <para>On x86_64, LFS does not support a multilib configuration.
+          This switch is harmless for x86.</para>
         </listitem>
         </listitem>
       </varlistentry>
       </varlistentry>
 
 
       <varlistentry>
       <varlistentry>
         <term><parameter>--disable-decimal-float, --disable-threads,
         <term><parameter>--disable-decimal-float, --disable-threads,
-              --disable-libatomic, --disable-libgomp, <!--- -disable-libmpx,-->
+              --disable-libatomic, --disable-libgomp, 
         --disable-libquadmath, --disable-libssp, --disable-libvtv,
         --disable-libquadmath, --disable-libssp, --disable-libvtv,
         --disable-libstdcxx</parameter></term>
         --disable-libstdcxx</parameter></term>
         <listitem>
         <listitem>
           <para>These switches disable support for the decimal floating point
           <para>These switches disable support for the decimal floating point
-          extension, threading, libatomic, libgomp, <!--libmpx, --> libquadmath, libssp,
+          extension, threading, libatomic, libgomp, libquadmath, libssp,
           libvtv, and the C++ standard library respectively. These features
           libvtv, and the C++ standard library respectively. These features
           will fail to compile when building a cross-compiler and are not
           will fail to compile when building a cross-compiler and are not
           necessary for the task of cross-compiling the temporary libc.</para>
           necessary for the task of cross-compiling the temporary libc.</para>
         </listitem>
         </listitem>
       </varlistentry>
       </varlistentry>
 
 
-      <varlistentry>
-        <term><parameter>--disable-multilib</parameter></term>
-        <listitem>
-          <para>On x86_64, LFS does not yet support a multilib configuration.
-          This switch is harmless for x86.</para>
-        </listitem>
-      </varlistentry>
-
       <varlistentry>
       <varlistentry>
         <term><parameter>--enable-languages=c,c++</parameter></term>
         <term><parameter>--enable-languages=c,c++</parameter></term>
         <listitem>
         <listitem>

+ 3 - 3
chapter05/generalinstructions.xml

@@ -18,7 +18,7 @@
   <listitem>
   <listitem>
     <para>Several of the packages are patched before compilation, but only when
     <para>Several of the packages are patched before compilation, but only when
     the patch is needed to circumvent a problem. A patch is often needed in
     the patch is needed to circumvent a problem. A patch is often needed in
-    both this and the next chapter, but sometimes in only one or the other.
+    both this and the following chapters, but sometimes in only one location.
     Therefore, do not be concerned if instructions for a downloaded patch seem
     Therefore, do not be concerned if instructions for a downloaded patch seem
     to be missing.  Warning messages about <emphasis>offset</emphasis> or
     to be missing.  Warning messages about <emphasis>offset</emphasis> or
     <emphasis>fuzz</emphasis> may also be encountered when applying a patch. Do
     <emphasis>fuzz</emphasis> may also be encountered when applying a patch. Do
@@ -93,8 +93,8 @@
           <orderedlist numeration="loweralpha" spacing="compact">
           <orderedlist numeration="loweralpha" spacing="compact">
             <listitem>
             <listitem>
               <para>Using the <command>tar</command> program, extract the package
               <para>Using the <command>tar</command> program, extract the package
-              to be built.  In Chapter&nbsp;5, ensure you are the <emphasis>lfs</emphasis>
-              user when extracting the package.</para>
+              to be built.  In Chapters 5 and 6, ensure you are 
+              the <emphasis>lfs</emphasis> user when extracting the package.</para>
             </listitem>
             </listitem>
             <listitem>
             <listitem>
               <para>Change to the directory created when the package was
               <para>Change to the directory created when the package was

+ 2 - 2
chapter05/glibc.xml

@@ -211,14 +211,14 @@ readelf -l a.out | grep '/ld-linux'</userinput></screen>
 
 
     </caution>
     </caution>
 
 
-    <note><para>Building packages in the next sections will serve as an
+    <note><para>Building packages in the next chapter will serve as an
     additional check that the toolchain has been built properly. If some
     additional check that the toolchain has been built properly. If some
     package, especially binutils-pass2 or gcc-pass2, fails to build, it is
     package, especially binutils-pass2 or gcc-pass2, fails to build, it is
     an indication that something has gone wrong with the
     an indication that something has gone wrong with the
     previous Binutils, GCC, or Glibc installations.</para></note>
     previous Binutils, GCC, or Glibc installations.</para></note>
 
 
     <para>Now that our cross-toolchain is complete, finalize the installation
     <para>Now that our cross-toolchain is complete, finalize the installation
-    of the limits.h header. For doing so, run an utility provided by the GCC
+    of the limits.h header. For doing so, run a utility provided by the GCC
     developers:</para>
     developers:</para>
 
 
 <screen><userinput>$LFS/tools/libexec/gcc/$LFS_TGT/&gcc-version;/install-tools/mkheaders</userinput></screen>
 <screen><userinput>$LFS/tools/libexec/gcc/$LFS_TGT/&gcc-version;/install-tools/mkheaders</userinput></screen>

+ 6 - 6
chapter05/libstdc++.xml

@@ -53,12 +53,12 @@
       <filename>gcc-&gcc-version;</filename> directory.</para>
       <filename>gcc-&gcc-version;</filename> directory.</para>
     </note>
     </note>
 
 
-    <para>Create a separate build directory for Libstdc++ and enter it:</para>
+    <para>Create a separate build directory for libstdc++ and enter it:</para>
 
 
 <screen><userinput remap="pre">mkdir -v build
 <screen><userinput remap="pre">mkdir -v build
 cd       build</userinput></screen>
 cd       build</userinput></screen>
 
 
-    <para>Prepare Libstdc++ for compilation:</para>
+    <para>Prepare libstdc++ for compilation:</para>
 
 
 <screen><userinput remap="configure">../libstdc++-v3/configure           \
 <screen><userinput remap="configure">../libstdc++-v3/configure           \
     --host=$LFS_TGT                 \
     --host=$LFS_TGT                 \
@@ -75,7 +75,7 @@ cd       build</userinput></screen>
       <varlistentry>
       <varlistentry>
         <term><parameter>--host=...</parameter></term>
         <term><parameter>--host=...</parameter></term>
         <listitem>
         <listitem>
-          <para>Indicates to use the cross compiler we have just built
+          <para>Specifies the use the cross compiler we have just built
           instead of the one in <filename>/usr/bin</filename>.</para>
           instead of the one in <filename>/usr/bin</filename>.</para>
         </listitem>
         </listitem>
       </varlistentry>
       </varlistentry>
@@ -91,9 +91,9 @@ cd       build</userinput></screen>
       <varlistentry>
       <varlistentry>
         <term><parameter>--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</parameter></term>
         <term><parameter>--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</parameter></term>
         <listitem>
         <listitem>
-          <para>This is the location where the standard include files are
-          searched by the C++ compiler. In a normal build, this information
-          is automatically passed to the Libstdc++ <command>configure</command>
+          <para>This is the location where the C++ compiler should search for the
+          standard include files. In a normal build, this information
+          is automatically passed to the libstdc++ <command>configure</command>
           options from the top level directory. In our case, this information
           options from the top level directory. In our case, this information
           must be explicitly given.</para>
           must be explicitly given.</para>
         </listitem>
         </listitem>

+ 28 - 26
chapter05/toolchaintechnotes.xml

@@ -16,13 +16,14 @@
   clearer after performing an actual build. This section can be referred
   clearer after performing an actual build. This section can be referred
   to at any time during the process.</para>
   to at any time during the process.</para>
 
 
-  <para>The overall goal of <xref linkend="chapter-temporary-tools"/> is to
-  produce a temporary area that contains a known-good set of tools that can be
-  isolated from the host system. By using <command>chroot</command>, the
-  commands in the remaining chapters will be contained within that environment,
-  ensuring a clean, trouble-free build of the target LFS system. The build
-  process has been designed to minimize the risks for new readers and to provide
-  the most educational value at the same time.</para>
+  <para>The overall goal of this chapter and <xref
+  linkend="chapter-temporary-tools"/> is to produce a temporary area that
+  contains a known-good set of tools that can be isolated from the host system.
+  By using <command>chroot</command>, the commands in the remaining chapters
+  will be contained within that environment, ensuring a clean, trouble-free
+  build of the target LFS system. The build process has been designed to
+  minimize the risks for new readers and to provide the most educational value
+  at the same time.</para>
 
 
   <para>The build process is based on the process of
   <para>The build process is based on the process of
   <emphasis>cross-compilation</emphasis>. Cross-compilation is normally used
   <emphasis>cross-compilation</emphasis>. Cross-compilation is normally used
@@ -143,7 +144,7 @@
       appearing, that proved insufficient. The word <quote>triplet</quote>
       appearing, that proved insufficient. The word <quote>triplet</quote>
       remained. A simple way to determine your machine triplet is to run
       remained. A simple way to determine your machine triplet is to run
       the <command>config.guess</command>
       the <command>config.guess</command>
-      script that comes with the source for many packages. Unpack the Binutils
+      script that comes with the source for many packages. Unpack the binutils
       sources and run the script: <userinput>./config.guess</userinput> and note
       sources and run the script: <userinput>./config.guess</userinput> and note
       the output. For example, for a 32-bit Intel processor the
       the output. For example, for a 32-bit Intel processor the
       output will be <emphasis>i686-pc-linux-gnu</emphasis>. On a 64-bit
       output will be <emphasis>i686-pc-linux-gnu</emphasis>. On a 64-bit
@@ -151,7 +152,7 @@
 
 
       <para>Also be aware of the name of the platform's dynamic linker, often
       <para>Also be aware of the name of the platform's dynamic linker, often
       referred to as the dynamic loader (not to be confused with the standard
       referred to as the dynamic loader (not to be confused with the standard
-      linker <command>ld</command> that is part of Binutils). The dynamic linker
+      linker <command>ld</command> that is part of binutils). The dynamic linker
       provided by Glibc finds and loads the shared libraries needed by a
       provided by Glibc finds and loads the shared libraries needed by a
       program, prepares the program to run, and then runs it. The name of the
       program, prepares the program to run, and then runs it. The name of the
       dynamic linker for a 32-bit Intel machine will be <filename
       dynamic linker for a 32-bit Intel machine will be <filename
@@ -168,9 +169,9 @@
     <para>In order to fake a cross compilation, the name of the host triplet
     <para>In order to fake a cross compilation, the name of the host triplet
     is slightly adjusted by changing the &quot;vendor&quot; field in the
     is slightly adjusted by changing the &quot;vendor&quot; field in the
     <envar>LFS_TGT</envar> variable. We also use the
     <envar>LFS_TGT</envar> variable. We also use the
-    <parameter>--with-sysroot</parameter> when building the cross linker and
-    cross compiler, to tell them where to find the needed host files. This
-    ensures none of the other programs built in <xref
+    <parameter>--with-sysroot</parameter> option when building the cross linker and
+    cross compiler to tell them where to find the needed host files. This
+    ensures that none of the other programs built in <xref
     linkend="chapter-temporary-tools"/> can link to libraries on the build
     linkend="chapter-temporary-tools"/> can link to libraries on the build
     machine. Only two stages are mandatory, and one more for tests:</para>
     machine. Only two stages are mandatory, and one more for tests:</para>
 
 
@@ -215,7 +216,7 @@
     internal library is named libgcc, and must be linked to the glibc
     internal library is named libgcc, and must be linked to the glibc
     library to be fully functional! Furthermore, the standard library for
     library to be fully functional! Furthermore, the standard library for
     C++ (libstdc++) also needs being linked to glibc. The solution
     C++ (libstdc++) also needs being linked to glibc. The solution
-    to this chicken and egg problem is to first build a degraded cc1+libgcc,
+    to this chicken and egg problem is to first build a degraded cc1 based libgcc,
     lacking some fuctionalities such as threads and exception handling, then
     lacking some fuctionalities such as threads and exception handling, then
     build glibc using this degraded compiler (glibc itself is not
     build glibc using this degraded compiler (glibc itself is not
     degraded), then build libstdc++. But this last library will lack the
     degraded), then build libstdc++. But this last library will lack the
@@ -225,8 +226,8 @@
     paragraph is that cc1 is unable to build a fully functional libstdc++, but
     paragraph is that cc1 is unable to build a fully functional libstdc++, but
     this is the only compiler available for building the C/C++ libraries
     this is the only compiler available for building the C/C++ libraries
     during stage 2! Of course, the compiler built during stage 2, cc-lfs,
     during stage 2! Of course, the compiler built during stage 2, cc-lfs,
-    would be able to build those libraries, but (i) the build system of
-    gcc does not know that it is usable on pc, and (ii) using it on pc
+    would be able to build those libraries, but (1) the build system of
+    gcc does not know that it is usable on pc, and (2) using it on pc
     would be at risk of linking to the pc libraries, since cc-lfs is a native
     would be at risk of linking to the pc libraries, since cc-lfs is a native
     compiler. So we have to build libstdc++ later, in chroot.</para>
     compiler. So we have to build libstdc++ later, in chroot.</para>
 
 
@@ -306,17 +307,18 @@ checking what linker to use... /mnt/lfs/tools/i686-lfs-linux-gnu/bin/ld</compute
     package&mdash;it is very self-sufficient in terms of its build machinery
     package&mdash;it is very self-sufficient in terms of its build machinery
     and generally does not rely on toolchain defaults.</para>
     and generally does not rely on toolchain defaults.</para>
 
 
-    <para>As said above, the standard C++ library is compiled next, followed
-    by all the programs that need themselves to be built. The install step
-    uses the <envar>DESTDIR</envar> variable to have the programs land into
-    the LFS filesystem.</para>
-
-    <para>Then the native lfs compiler is built. First Binutils Pass 2, with
-    the same <envar>DESTDIR</envar> install as the other programs, then the
-    second pass of GCC, omitting libstdc++ and other non-important libraries.
-    Due to some weird logic in GCC's configure script,
-    <envar>CC_FOR_TARGET</envar> ends up as <command>cc</command> when host
-    is the same as target, but is different from build. This is why
+    <para>As said above, the standard C++ library is compiled next, followed in
+    Chapter 6 by all the programs that need themselves to be built. The install
+    step of libstdc++ uses the <envar>DESTDIR</envar> variable to have the
+    programs land into the LFS filesystem.</para>
+
+    <para>In Chapter 7 the native lfs compiler is built. First binutils-pass2,
+    with the same <envar>DESTDIR</envar> install as the other programs is
+    built, and then the second pass of GCC is constructed, omitting libstdc++
+    and other non-important libraries.  Due to some weird logic in GCC's
+    configure script, <envar>CC_FOR_TARGET</envar> ends up as
+    <command>cc</command> when the host is the same as the target, but is
+    different from the build system. This is why
     <parameter>CC_FOR_TARGET=$LFS_TGT-gcc</parameter> is put explicitely into
     <parameter>CC_FOR_TARGET=$LFS_TGT-gcc</parameter> is put explicitely into
     the configure options.</para>
     the configure options.</para>
 
 

+ 1 - 1
stylesheets/lfs-xsl/lfs.css

@@ -342,7 +342,7 @@ div.important em, div.warning em, div.caution em {
   margin-bottom: .3em;
   margin-bottom: .3em;
 }
 }
 
 
-.table table {
+.table table, .informaltable {
   margin-left: auto;
   margin-left: auto;
   margin-right: auto;
   margin-right: auto;
 }
 }