diff --git a/chapter05/binutils-pass1.xml b/chapter05/binutils-pass1.xml
index 9b8cb90de..039d36145 100644
--- a/chapter05/binutils-pass1.xml
+++ b/chapter05/binutils-pass1.xml
@@ -91,7 +91,7 @@ cd build
--prefix=$LFS/tools
This tells the configure script to prepare to install the
- binutils programs in the $LFS/tools directory.
diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml
index cca2f722f..b6245fce2 100644
--- a/chapter05/gcc-pass1.xml
+++ b/chapter05/gcc-pass1.xml
@@ -50,9 +50,9 @@
use them:
There are frequent misunderstandings about this chapter. The
- procedures are the same as every other chapter as explained earlier (). First extract the gcc tarball from the sources
- directory and then change to the directory created. Only then should you
+ procedures are the same as every other chapter, as explained earlier (). First, extract the gcc-&gcc-version; tarball from the sources
+ directory, and then change to the directory created. Only then should you
proceed with the instructions below.
tar -xf ../mpfr-&mpfr-version;.tar.xz
@@ -142,9 +142,9 @@ cd build
--with-glibc-version=&glibc-version;
- This option specifies the version of glibc which will be
+ This option specifies the version of Glibc which will be
used on the target. It is not relevant to the libc of the host
- distro because everything compiled by pass1 gcc will run in the
+ distro because everything compiled by pass1 GCC will run in the
chroot environment, which is isolated from libc of the host
distro.
@@ -187,7 +187,7 @@ cd build
--disable-shared
This switch forces GCC to link its internal libraries
- statically. We need this because the shared libraries require glibc,
+ statically. We need this because the shared libraries require Glibc,
which is not yet installed on the target system.
@@ -246,7 +246,7 @@ cd build
time of this build of GCC $LFS/usr/include/limits.h
does not exist, so the internal header that has just been installed is a
partial, self-contained file and does not include the extended features of
- the system header. This is adequate for building glibc, but the full
+ the system header. This is adequate for building Glibc, but the full
internal header will be needed later. Create a full version of the internal
header using a command that is identical to what the GCC build system does
in normal circumstances:
diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml
index 9cc4e4a65..b9d0ff7e1 100644
--- a/chapter05/glibc.xml
+++ b/chapter05/glibc.xml
@@ -61,13 +61,13 @@ ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64/ld-lsb-x86-64.so.3
The above command is correct. The ln command has
- a few syntactic versions, so be sure to check
+ several syntactic versions, so be sure to check
info coreutils ln and ln(1)
- before reporting what you may think is an error.
+ before reporting what may appear to be an error.
- Some of the Glibc programs use the non-FHS compliant
+ Some of the Glibc programs use the non-FHS-compliant
/var/db directory to store their
runtime data. Apply the following patch to make such programs store their
runtime data in the FHS-compliant locations:
@@ -139,7 +139,7 @@ cd build
libc_cv_slibdir=/usr/lib
This ensures that the library is installed in /usr/lib instead
- of the default /lib64 on 64 bit machines.
+ of the default /lib64 on 64-bit machines.
@@ -157,11 +157,11 @@ cd build
The missing or incompatible msgfmt program is
generally harmless. This msgfmt program is part of the
- Gettext package which the host distribution should provide.
+ Gettext package, which the host distribution should provide.
There have been reports that this package may fail when
- building as a "parallel make". If this occurs, rerun the make command
- with a "-j1" option.
+ building as a "parallel make". If that occurs, rerun the make command
+ with the "-j1" option.
Compile the package:
@@ -172,9 +172,9 @@ cd build
If LFS is not properly set, and despite the
recommendations, you are building as
root, the next command will
- install the newly built glibc to your host system, which most likely
- will render it unusable. So double check that the environment is
- correctly set, before running the following command.
+ install the newly built Glibc to your host system, which will almost
+ certainly render it unusable. So double-check that the environment is
+ correctly set, and that you are not &root;, before running the following command.
make DESTDIR=$LFS install
@@ -188,15 +188,15 @@ cd build
packages to define the location where the package should be
installed. If it is not set, it defaults to the root (/) directory. Here we specify that
- the package be installed in $LFS
- , which will become the root after $LFS
+ , which will become the root directory in .
- Fix hardcoded path to the executable loader in
+ Fix a hard coded path to the executable loader in the
ldd script:
sed '/RTLDLIST=/s@/usr@@g' -i $LFS/usr/bin/ldd
@@ -217,10 +217,10 @@ readelf -l a.out | grep ld-linux
Note that for 32-bit machines, the interpreter name will be
/lib/ld-linux.so.2.
- If the output is not shown as above or there was no output at all,
+ If the output is not as shown above, or there is no output at all,
then something is wrong. Investigate and retrace the steps to find out
where the problem is and correct it. This issue must be resolved before
- continuing on.
+ continuing.
Once all is well, clean up the test file:
@@ -228,14 +228,14 @@ readelf -l a.out | grep ld-linux
- Building packages in the next chapter will serve as an
+ Building the packages in the next chapter will serve as an
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
- previous Binutils, GCC, or Glibc installations.
+ preceding Binutils, GCC, or Glibc installations.
Now that our cross-toolchain is complete, finalize the installation
- of the limits.h header. For doing so, run a utility provided by the GCC
+ of the limits.h header. To do this, run a utility provided by the GCC
developers:
$LFS/tools/libexec/gcc/$LFS_TGT/&gcc-version;/install-tools/mkheaders
diff --git a/chapter05/libstdc++.xml b/chapter05/libstdc++.xml
index af2aa0f98..272e27762 100644
--- a/chapter05/libstdc++.xml
+++ b/chapter05/libstdc++.xml
@@ -28,7 +28,7 @@
to compile C++ code
(part of GCC is written in C++), but we had to defer its installation
when we built
- because it depends on glibc, which was not yet available in the target
+ because Libstdc++ depends on Glibc, which was not yet available in the target
directory.
@@ -53,12 +53,12 @@
gcc-&gcc-version; directory.
- Create a separate build directory for libstdc++ and enter it:
+ Create a separate build directory for Libstdc++ and enter it:
mkdir -v build
cd build
- Prepare libstdc++ for compilation:
+ Prepare Libstdc++ for compilation:
../libstdc++-v3/configure \
--host=$LFS_TGT \
@@ -83,7 +83,7 @@ cd build
--host=...
- Specifies that the cross compiler we have just built
+ Specifies that the cross-compiler we have just built
should be used instead of the one in
/usr/bin.
@@ -108,27 +108,27 @@ cd build
--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;
This specifies the installation directory for include files.
- Because libstdc++ is the standard C++ library for LFS, this
+ Because Libstdc++ is the standard C++ library for LFS, this
directory should match the location where the C++ compiler
($LFS_TGT-g++) would search for the
standard C++ include files. In a normal build, this information
- is automatically passed to the libstdc++ configure
+ is automatically passed to the Libstdc++ configure
options from the top level directory. In our case, this information
must be explicitly given.
The C++ compiler will prepend the sysroot path
- $LFS (specified building
- GCC pass 1) to the include file search path, so it will actually
+ $LFS (specified when building
+ GCC-pass1) to the include file search path, so it will actually
search in
$LFS/tools/$LFS_TGT/include/c++/&gcc-version;.
The combination of the DESTDIR
variable (in the make install command below)
- and this switch ensures to install the headers there.
+ and this switch causes the headers to be installed there.
- Compile libstdc++ by running:
+ Compile Libstdc++ by running:
make
@@ -137,7 +137,7 @@ cd build
make DESTDIR=$LFS install
Remove the libtool archive files because they are harmful for
- cross compilation:
+ cross-compilation:
rm -v $LFS/usr/lib/lib{stdc++,stdc++fs,supc++}.la
diff --git a/part3intro/toolchaintechnotes.xml b/part3intro/toolchaintechnotes.xml
index 820da0ada..5698115cf 100644
--- a/part3intro/toolchaintechnotes.xml
+++ b/part3intro/toolchaintechnotes.xml
@@ -145,7 +145,7 @@
Implementation of Cross-Compilation for LFS
- All the packages involved with cross-compilation use an
+ All the cross-compiled packages in this book use an
autoconf-based building system. The autoconf-based building system
accepts system types in the form cpu-vendor-kernel-os,
referred to as the system triplet. Since the vendor field is often
@@ -257,11 +257,28 @@
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
during stage 2. Of course, the compiler built by stage 2, cc-lfs,
- would be able to build those libraries, but (1) the build system of
- gcc does not know cc-lfs can run on pc, and (2) using cc-lfs on pc
- would create a risk of linking to the pc libraries, since cc-lfs is a native
- compiler. So we have to re-build libstdc++ later as a part of
- gcc stage 2.
+ would be able to build those libraries, but:
+
+
+
+
+ Generally cc-lfs cannot run on pc (the host distro). Despite the
+ triplets of pc and lfs are compatible to each other, an executable
+ for lfs will depend on glibc-&glibc-version; while the host distro
+ may utilize a different libc implementation (for example, musl) or
+ a previous release of glibc (for example, glibc-2.13).
+
+
+
+
+ Even if cc-lfs happens to run on pc, using it on pc would create
+ a risk of linking to the pc libraries, since cc-lfs is a native
+ compiler.
+
+
+
+
+ So we have to re-build libstdc++ later as a part of gcc stage 2.
In &ch-final; (or stage 3
), all the packages needed for
the LFS system are built. Even if a package has already been installed into