diff --git a/chapter05/make.xml b/chapter05/make.xml
index 2d8bccdcf..5fa9a6aa1 100644
--- a/chapter05/make.xml
+++ b/chapter05/make.xml
@@ -12,7 +12,6 @@
tools
-
&buildtime;
@@ -20,8 +19,6 @@
0.2 SBU8.8 MB
-
-
@@ -31,21 +28,17 @@
./configure --prefix=/tools
-Compile the program:
+Compile the package:
make
-(If you want to test the results, then issue:
-make check.)
+To test the results, issue:
+make check
-Then install it and its documentation:
+Install the package:
make install
-
-The details on this package are found in .
-
-
diff --git a/chapter05/ncurses.xml b/chapter05/ncurses.xml
index 9bc86e181..c6edfe343 100644
--- a/chapter05/ncurses.xml
+++ b/chapter05/ncurses.xml
@@ -12,7 +12,6 @@
tools
-
&buildtime;
@@ -20,8 +19,6 @@
0.7 SBU26 MB
-
-
@@ -32,38 +29,14 @@
./configure --prefix=/tools --with-shared \
--without-debug --without-ada --enable-overwrite
-The meaning of the configure options:
-
-
-
---without-ada
-This tells Ncurses not
-to build its Ada bindings, even if an Ada compiler is installed on the host.
-This must be done because once we enter the chroot environment, Ada will no
-longer be available.
-
-
-
---enable-overwrite
-This tells Ncurses to install its header files into
-/tools/include instead of
-/tools/include/ncurses to ensure that
-other packages can find the Ncurses headers successfully.
-
-
-
-Compile the programs and libraries:
+Compile the package:
make
-Then install them and their documentation:
+Install the package:
make install
-
-The details on this package are found in .
-
-
diff --git a/chapter05/patch.xml b/chapter05/patch.xml
index 6f7fa5746..0fe5f59c5 100644
--- a/chapter05/patch.xml
+++ b/chapter05/patch.xml
@@ -12,7 +12,6 @@
tools
-
&buildtime;
@@ -20,31 +19,23 @@
0.1 SBU1.9 MB
-
-
Installation of Patch
-Prepare Patch for compilation (the preprocessor flag
--D_GNU_SOURCE is only needed on the PowerPC platform, on
-other architectures you can leave it out):
+Prepare Patch for compilation:
CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/tools
-Compile the program:
+Compile the package:
make
-Then install it and its documentation:
+Install the package:
make install
-
-The details on this package are found in .
-
-
diff --git a/chapter05/perl.xml b/chapter05/perl.xml
index c0de05a45..9c489e1fc 100644
--- a/chapter05/perl.xml
+++ b/chapter05/perl.xml
@@ -12,7 +12,6 @@
tools
-
&buildtime;
@@ -20,8 +19,6 @@
0.8 SBU74 MB
-
-
@@ -31,22 +28,10 @@
patch -Np1 -i ../perl-&perl-version;-libc-1.patch
-Now prepare Perl for compilation (make sure you get the 'IO Fcntl POSIX'
-right, they are all letters):
+Now prepare Perl for compilation:
./configure.gnu --prefix=/tools -Dstatic_ext='IO Fcntl POSIX'
-The meaning of the configure option:
-
-
-
--Dstatic_ext='IO Fcntl POSIX'
-This tells
-Perl to build the minimum set of static extensions needed for installing and
-testing the Coreutils package in the next chapter.
-
-
-
Compile only the required tools:
make perl utilities
@@ -59,8 +44,4 @@ cp -R lib/* /tools/lib/perl5/&perl-version;
-
-The details on this package are found in .
-
-
diff --git a/chapter05/sed.xml b/chapter05/sed.xml
index 265486c96..6de3aa83e 100644
--- a/chapter05/sed.xml
+++ b/chapter05/sed.xml
@@ -12,7 +12,6 @@
tools
-
&buildtime;
@@ -20,8 +19,6 @@
0.2 SBU5.2 MB
-
-
@@ -31,21 +28,17 @@
./configure --prefix=/tools
-Compile the program:
+Compile the package:
make
-(If you want to test the results, then issue:
-make check.)
+To test the results, issue:
+make check
-Then install it and its documentation:
+Install the package:
make install
-
-The details on this package are found in .
-
-
diff --git a/chapter05/stripping.xml b/chapter05/stripping.xml
index 935f848e6..586df1089 100644
--- a/chapter05/stripping.xml
+++ b/chapter05/stripping.xml
@@ -7,29 +7,9 @@
Stripping
-The steps in this section are optional, but if your LFS partition is
-rather small, you will be glad to learn that you can remove some unnecessary
-things. The executables and libraries you have built so far contain about 130
-MB of unneeded debugging symbols. Remove those symbols with:
-
strip --strip-debug /tools/lib/*
strip --strip-unneeded /tools/{,s}bin/*
-The last of the above commands will skip some twenty files, reporting
-that it doesn't recognize their file format. Most of them are scripts instead
-of binaries.
-
-Take care not to use
---strip-unneeded on the libraries -- the static ones
-would be destroyed and you would have to build the three toolchain packages
-all over again.
-
-To save another 30 MB, you can remove all the documentation:
-
rm -rf /tools/{doc,info,man}
-You will now need to have at least 850 MB of free space on your LFS
-file system to be able to build and install Glibc in the next phase. If you can
-build and install Glibc, you can build and install the rest too.
-
diff --git a/chapter05/tar.xml b/chapter05/tar.xml
index 62896f359..9602803b5 100644
--- a/chapter05/tar.xml
+++ b/chapter05/tar.xml
@@ -12,7 +12,6 @@
tools
-
&buildtime;
@@ -20,8 +19,6 @@
0.2 SBU10 MB
-
-
@@ -31,21 +28,17 @@
./configure --prefix=/tools
-Compile the programs:
+Compile the package:
make
-(If you want to test the results, then issue:
-make check.)
+To test the results, issue:
+make check
-Then install them and their documentation:
+Install the package:
make install
-
-The details on this package are found in .
-
-
diff --git a/chapter05/tcl.xml b/chapter05/tcl.xml
index 381cec992..74ee69e07 100644
--- a/chapter05/tcl.xml
+++ b/chapter05/tcl.xml
@@ -10,7 +10,6 @@
Tcl
-The Tcl package contains the Tool Command Language.
&buildtime;
@@ -18,25 +17,11 @@
0.9 SBU23 MB
-
-Tcl installation depends on
-Bash, Binutils, Coreutils, Diffutils,
-GCC, Glibc, Grep, Make, Sed
-
-
Installation of Tcl
-This package and the next two are only installed to support running the
-test suites for GCC and Binutils. Installing three packages just for testing
-purposes may seem like overkill, but it is very reassuring, if not essential,
-to know that our most important tools are working properly. Even if the
-the test suites are not run in this chapter (we recommend not running them),
-these packages are still required to run the test suites in the next
-chapter.
-
Prepare Tcl for compilation:
cd unix
@@ -46,15 +31,8 @@ chapter.
make
-If you want to test the results, then issue:
-TZ=UTC make test. However, the Tcl test suite is known
-to experience failures under certain host conditions that are not fully
-understood. Therefore, test suite failures here are not surprising, and are not
-considered critical. The TZ=UTC parameter sets the time
-zone to Coordinated Universal Time (UTC) also known as Greenwich Mean Time
-(GMT), but only for the duration of the test suite run. This ensures the clock
-tests are exercised correctly. More information on the TZ environment variable
-will be given later on in .
+To test the results, issue:
+TZ=UTC make test.
Install the package:
@@ -72,30 +50,7 @@ will need its internal headers.
Contents of Tcl
-
-Installed programs
-Installed library
-tclsh (link to tclsh8.4), tclsh8.4libtcl8.4.so
-
-
-Short descriptions
-
-
-tclsh8.4
-
-tclsh8.4
-is the Tcl command shell.
-
-
-
-
-libtcl8.4.so
-
-libtcl8.4.so
-is the Tcl library.
-
-
-
+See testing
diff --git a/chapter05/texinfo.xml b/chapter05/texinfo.xml
index d5e4faeac..5de86eab9 100644
--- a/chapter05/texinfo.xml
+++ b/chapter05/texinfo.xml
@@ -12,7 +12,6 @@
tools
-
&buildtime;
@@ -20,8 +19,6 @@
0.2 SBU16 MB
-
-
@@ -31,21 +28,17 @@
./configure --prefix=/tools
-Compile the programs:
+Compile the package:
make
-(If you want to test the results, then issue:
-make check.)
+To test the results, issue:
+make check
-Then install them and their documentation:
+Install the package:
make install
-
-The details on this package are found in .
-
-
diff --git a/chapter05/toolchaintechnotes.xml b/chapter05/toolchaintechnotes.xml
index 666e181e2..c644ba162 100644
--- a/chapter05/toolchaintechnotes.xml
+++ b/chapter05/toolchaintechnotes.xml
@@ -7,197 +7,6 @@
Toolchain technical notes
-This section attempts to explain some of the rationale and technical
-details behind the overall build method. It's not essential that you understand
-everything here immediately. Most of it will make sense once you have performed
-an actual build. Feel free to refer back here at any time.
-
-The overall goal of is to provide a sane,
-temporary environment that we can chroot into, and from which we can produce a
-clean, trouble-free build of the target LFS system in
-. Along the way, we attempt to divorce ourselves
-from the host system as much as possible, and in so doing build a
-self-contained and self-hosted toolchain. It should be noted that the
-build process has been designed to minimize the risks for
-new readers and provide maximum educational value at the same time. In other
-words, more advanced techniques could be used to build the system.
-
-
-Before continuing, you really should be aware of the name of your working
-platform, often also referred to as the target triplet. For
-many folks the target triplet will probably be
-i686-pc-linux-gnu. A simple way to determine your target
-triplet is to run the config.guess script that comes with
-the source for many packages. Unpack the Binutils sources and run the script:
-./config.guess and note the output.
-
-You'll also need to be aware of the name of your platform's
-dynamic linker, often also referred to as the
-dynamic loader, not to be confused with the standard linker
-ld that is part of Binutils. The dynamic linker is provided
-by Glibc and has the job of finding and loading the shared libraries needed by a
-program, preparing the program to run and then running it. For most folks the
-name of the dynamic linker will be ld-linux.so.2. On
-platforms that are less prevalent, the name might be
-ld.so.1 and newer 64 bit platforms might even have
-something completely different. You should be able to determine the name
-of your platform's dynamic linker by looking in the
-/lib directory on your host system. A
-sure-fire way is to inspect a random binary from your host system by running:
-readelf -l <name of binary> | grep interpreter
-and noting the output. The authoritative reference covering all platforms is in
-the shlib-versions file in the root of the Glibc source
-tree.
-
-
-Some key technical points of how the build
-method works:
-
-
-Similar in principle to cross compiling whereby tools installed
-into the same prefix work in cooperation and thus utilize a little GNU
-magic
.
-
-Careful manipulation of the standard linker's library search
-path to ensure programs are linked only against libraries we
-choose.
-
-Careful manipulation of gcc's
-specs file to tell the compiler which target dynamic
-linker will be used.
-
-
-Binutils is installed first because the ./configure runs of both GCC and Glibc perform various
-feature tests on the assembler and linker
-to determine which software features to enable
-or disable. This is more important than one might first realize. An incorrectly
-configured GCC or Glibc can result in a subtly broken toolchain where the impact
-of such breakage might not show up until near the end of the build of a whole
-distribution. Thankfully, a test suite failure will usually alert us before too
-much time is wasted.
-
-Binutils installs its assembler and linker into two locations,
-/tools/bin and
-/tools/$TARGET_TRIPLET/bin. In reality,
-the tools in one location are hard linked to the other. An important facet of
-the linker is its library search order. Detailed information can be obtained
-from ld by passing it the --verbose
-flag. For example: ld --verbose | grep SEARCH will
-show you the current search paths and their order. You can see what files are
-actually linked by ld by compiling a dummy program and
-passing the --verbose switch to the linker. For example:
-gcc dummy.c -Wl,--verbose 2>&1 | grep succeeded
-will show you all the files successfully opened during the linking.
-
-The next package installed is GCC and during its run of
-./configure you'll see, for example:
-
-checking what assembler to use... /tools/i686-pc-linux-gnu/bin/as
-checking what linker to use... /tools/i686-pc-linux-gnu/bin/ld
-
-This is important for the reasons mentioned above. It also demonstrates
-that GCC's configure script does not search the PATH directories to find which
-tools to use. However, during the actual operation of gcc
-itself, the same search paths are not necessarily used. You can find out which
-standard linker gcc will use by running:
-gcc -print-prog-name=ld.
-Detailed information can be obtained from gcc by passing
-it the -v flag while compiling a dummy program. For
-example: gcc -v dummy.c will show you detailed
-information about the preprocessor, compilation and assembly stages, including
-gcc's include search paths and their order.
-
-The next package installed is Glibc. The most important considerations for
-building Glibc are the compiler, binary tools and kernel headers. The compiler
-is generally no problem as Glibc will always use the gcc
-found in a PATH directory. The binary tools and kernel headers can be a little
-more troublesome. Therefore we take no risks and use the available configure
-switches to enforce the correct selections. After the run of
-./configure you can check the contents of the
-config.make file in the
-glibc-build directory for all the
-important details. You'll note some interesting items like the use of
-CC="gcc -B/tools/bin/" to control which binary tools are
-used, and also the use of the -nostdinc and
--isystem flags to control the compiler's include search
-path. These items help to highlight an important aspect of the Glibc package:
-it is very self-sufficient in terms of its build machinery and generally does
-not rely on toolchain defaults.
-
-After the Glibc installation, we make some adjustments to ensure that
-searching and linking take place only within our /tools
-prefix. We install an adjusted ld, which has a hard-wired
-search path limited to /tools/lib. Then
-we amend gcc's specs file to point to our new dynamic
-linker in /tools/lib. This last step is
-vital to the whole process. As mentioned above, a
-hard-wired path to a dynamic linker is embedded into every ELF shared
-executable. You can inspect this by running:
-readelf -l <name of binary> | grep interpreter.
-By amending gcc's specs file, we are ensuring that every
-program compiled from here through the end of this chapter will use our new
-dynamic linker in /tools/lib.
-
-The need to use the new dynamic linker is also the reason why we apply the
-Specs patch for the second pass of GCC. Failure to do so will result in the GCC
-programs themselves having the name of the dynamic linker from the host system's
-/lib directory embedded into them, which
-would defeat our goal of getting away from the host.
-
-During the second pass of Binutils, we are able to utilize the
---with-lib-path configure switch to control
-ld's library search path. From this point onwards, the
-core toolchain is self-contained and self-hosted. The remainder of the
- packages all build against the new Glibc in
-/tools and all is well.
-
-Upon entering the chroot environment in , the
-first major package we install is Glibc, due to its self-sufficient nature that
-we mentioned above. Once this Glibc is installed into
-/usr, we perform a quick changeover of
-the toolchain defaults, then proceed for real in building the rest of the
-target LFS system.
-
-
-Notes on static linking
-
-Most programs have to perform, beside their specific task, many rather
-common and sometimes trivial operations. These include allocating memory,
-searching directories, reading and writing files, string handling, pattern
-matching, arithmetic and many other tasks. Instead of obliging each program to
-reinvent the wheel, the GNU system provides all these basic functions in
-ready-made libraries. The major library on any Linux system is
-Glibc.
-
-There are two primary ways of linking the functions from a library to a
-program that uses them: statically or dynamically. When a program is linked
-statically, the code of the used functions is included in the executable,
-resulting in a rather bulky program. When a program is dynamically linked, what
-is included is a reference to the dynamic linker, the name of the library, and
-the name of the function, resulting in a much smaller executable. (A third way
-is to use the programming interface of the dynamic linker. See the
-dlopen man page for more information.)
-
-Dynamic linking is the default on Linux and has three major advantages
-over static linking. First, you need only one copy of the executable library
-code on your hard disk, instead of having many copies of the same code included
-into a whole bunch of programs -- thus saving disk space. Second, when several
-programs use the same library function at the same time, only one copy of the
-function's code is required in core -- thus saving memory space. Third, when a
-library function gets a bug fixed or is otherwise improved, you only need to
-recompile this one library, instead of having to recompile all the programs that
-make use of the improved function.
-
-If dynamic linking has several advantages, why then do we statically link
-the first two packages in this chapter? The reasons are threefold: historical,
-educational, and technical. Historical, because earlier versions of LFS
-statically linked every program in this chapter. Educational, because knowing
-the difference is useful. Technical, because we gain an element of independence
-from the host in doing so, meaning that those programs can be used
-independently of the host system. However, it's worth noting that an overall
-successful LFS build can still be achieved when the first two packages are
-built dynamically.
-
-
+See testing
diff --git a/chapter05/udev.xml b/chapter05/udev.xml
index b13120178..cd929ea64 100644
--- a/chapter05/udev.xml
+++ b/chapter05/udev.xml
@@ -12,7 +12,6 @@
tools
-
&buildtime;
@@ -20,10 +19,6 @@
0.2 SBU5.2 MB
-
-
@@ -37,20 +32,13 @@
make prefix=/tools udevdir=/dev
-Install it:
+Install the package:
make DESTDIR=/tools udevdir=/dev install
-Udev's configuration is far from ideal by default, so we install our own
-configuration files here:
-
cp ../udev-config-2.permissions /tools/etc/udev/permissions.d/00-lfs.permissions
cp ../udev-config-1.rules /tools/etc/udev/rules.d/00-lfs.rules
-
-The details on this package are found in .
-
-
diff --git a/chapter05/util-linux.xml b/chapter05/util-linux.xml
index 04a4a375e..e0087812e 100644
--- a/chapter05/util-linux.xml
+++ b/chapter05/util-linux.xml
@@ -12,7 +12,6 @@
tools
-
&buildtime;
@@ -20,17 +19,11 @@
0.2 SBU16 MB
-
-
Installation of Util-linux
-Util-linux doesn't use the freshly installed headers and libraries
-from the /tools directory. This is fixed by altering the configure
-script:
-
sed -i 's@/usr/include@/tools/include@g' configure
Prepare Util-linux for compilation:
@@ -41,8 +34,7 @@ script:
make -C lib
-Since you'll only need a couple of the utilities contained in
-this package, build just those:
+Build the needed utilities:
make -C mount mount umount
make -C text-utils more
@@ -51,9 +43,5 @@ make -C text-utils more
cp mount/{,u}mount text-utils/more /tools/bin
-
-
-
-The details on this package are found in .