mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-08-01 17:15:13 +01:00
Automatic merge of trunk into multilib
This commit is contained in:
commit
8d5322ed52
@ -38,9 +38,10 @@
|
||||
|
||||
<para>From this point on, there is no need to use the
|
||||
<envar>LFS</envar> variable any more because all work will be restricted
|
||||
to the LFS file system; the <command>chroot</command> command tells the Bash shell that
|
||||
<filename class="directory">$LFS</filename> is now the root
|
||||
(<filename class="directory">/</filename>) directory.</para>
|
||||
to the LFS file system; the <command>chroot</command> command runs the
|
||||
Bash shell with the root
|
||||
(<filename class="directory">/</filename>) directory set to
|
||||
<filename class='directory'>$LFS</filename>.</para>
|
||||
|
||||
<para>Notice that <filename class="directory">/tools/bin</filename> is not
|
||||
in the <envar>PATH</envar>. This means that the cross toolchain will no longer be
|
||||
|
@ -41,8 +41,7 @@
|
||||
<xref linkend='ch-config-udev-device-node-creation'/> for details.)
|
||||
If the host kernel supports &devtmpfs;, we can simply mount a
|
||||
&devtmpfs; at <filename class='directory'>$LFS/dev</filename> and rely
|
||||
on the kernel to populate it (i.e., the udev daemon will do the
|
||||
necessary work automatically).</para>
|
||||
on the kernel to populate it.</para>
|
||||
|
||||
<para>But some host kernels lack &devtmpfs; support; these
|
||||
host distros use different methods to create the content of
|
||||
@ -51,8 +50,8 @@
|
||||
<filename class="directory">$LFS/dev</filename> directory is
|
||||
by bind mounting the host system's
|
||||
<filename class="directory">/dev</filename> directory. A bind mount is
|
||||
a special type of mount that generates a duplicate copy of a
|
||||
directory or mount point at some other location. Use the following
|
||||
a special type of mount that makes a directory subtree or a file
|
||||
visible at some other location. Use the following
|
||||
command to do this.</para>
|
||||
|
||||
<screen><userinput>mount -v --bind /dev $LFS/dev</userinput></screen>
|
||||
|
@ -43,7 +43,7 @@
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Glibc</title>
|
||||
|
||||
<para>First, fix an issue building Glibc with parallel jobs and make-4.4
|
||||
<para>First, fix an issue building Glibc with parallel jobs and Make-4.4
|
||||
or later:</para>
|
||||
|
||||
<screen><userinput remap="pre">sed '/MAKEFLAGS :=/s/)r/) -r/' -i Makerules</userinput></screen>
|
||||
@ -97,7 +97,7 @@ cd build</userinput></screen>
|
||||
<varlistentry>
|
||||
<term><parameter>--enable-kernel=&min-kernel;</parameter></term>
|
||||
<listitem>
|
||||
<para>This option tells the build system that this glibc may
|
||||
<para>This option tells the build system that this Glibc may
|
||||
be used with kernels as old as &min-kernel;. This means generating
|
||||
workarounds in case a system call introduced in a later version
|
||||
cannot be used.</para>
|
||||
@ -224,7 +224,7 @@ esac</userinput></screen>
|
||||
|
||||
<screen><userinput remap="install">make install</userinput></screen>
|
||||
|
||||
<para>Fix hardcoded path to the executable loader in
|
||||
<para>Fix a hardcoded path to the executable loader in the
|
||||
<command>ldd</command> script:</para>
|
||||
|
||||
<screen><userinput remap="install">sed '/RTLDLIST=/s@/usr@@g' -i /usr/bin/ldd</userinput></screen>
|
||||
@ -242,9 +242,9 @@ mkdir -pv /var/cache/nscd</userinput></screen>
|
||||
install -v -Dm644 ../nscd/nscd.service /usr/lib/systemd/system/nscd.service</userinput></screen>
|
||||
|
||||
<para>Next, install the locales that can make the system respond in a
|
||||
different language. None of the locales are required, but if some of them
|
||||
are missing, the test suites of future packages would skip important
|
||||
testcases.</para>
|
||||
different language. None of these locales are required, but if some of them
|
||||
are missing, the test suites of some packages will skip important
|
||||
test cases.</para>
|
||||
|
||||
<para>Individual locales can be installed using the
|
||||
<command>localedef</command> program. E.g., the second
|
||||
@ -297,7 +297,7 @@ localedef -i zh_TW -f UTF-8 zh_TW.UTF-8</userinput></screen>
|
||||
<para>In addition, install the locale for your own country, language and
|
||||
character set.</para>
|
||||
|
||||
<para>Alternatively, install all locales listed in the
|
||||
<para>Alternatively, install all the locales listed in the
|
||||
<filename>glibc-&glibc-version;/localedata/SUPPORTED</filename> file
|
||||
(it includes every locale listed above and many more) at once with the
|
||||
following time-consuming command:</para>
|
||||
@ -363,7 +363,7 @@ EOF</userinput></screen>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>Adding time zone data</title>
|
||||
<title>Adding Time Zone Data</title>
|
||||
|
||||
<para>Install and set up the time zone data with the following:</para>
|
||||
<screen><userinput>tar -xf ../../tzdata&tzdata-version;.tar.gz
|
||||
|
@ -20,20 +20,28 @@
|
||||
work is to know what each package is used for and why you (or the system)
|
||||
may need it.</para>
|
||||
|
||||
<para>We do not recommend using optimizations. They can make
|
||||
<para>We do not recommend using customized optimizations. They can make
|
||||
a program run slightly faster, but they may also cause compilation
|
||||
difficulties and problems when running the program. If a package refuses to
|
||||
compile when using optimization, try to compile it without optimization and
|
||||
see if that fixes the problem. Even if the package does compile when using
|
||||
difficulties, and problems when running the program. If a package refuses to
|
||||
compile with a customized optimization, try to compile it without
|
||||
optimization and see if that fixes the problem. Even if the package does compile when using a customized
|
||||
optimization, there is the risk it may have been compiled incorrectly because
|
||||
of the complex interactions between the code and build tools. Also note that
|
||||
of the complex interactions between the code and the build tools. Also note that
|
||||
the <option>-march</option> and <option>-mtune</option> options using values
|
||||
not specified in the book have not been tested. This may cause problems with
|
||||
the toolchain packages (Binutils, GCC and Glibc). The small potential gains
|
||||
achieved in using compiler optimizations are often outweighed by the risks.
|
||||
achieved by customizing compiler optimizations are often outweighed by the risks.
|
||||
First-time builders of LFS are encouraged to build without custom
|
||||
optimizations. The subsequent system will still run very fast and be stable
|
||||
at the same time.</para>
|
||||
optimizations.</para>
|
||||
|
||||
<para>On the other hand, we keep the optimizations enabled by the default
|
||||
configuration of the packages. In addition, we sometimes explicitly enable an
|
||||
optimized configuration provided by a package but not enabled by
|
||||
default. The package maintainers have already tested these configurations
|
||||
and consider them safe, so it's not likely they would break the build.
|
||||
Generally the default configuration already enables <option>-O2</option>
|
||||
or <option>-O3</option>, so the resulting system will still run very fast
|
||||
without any customized optimization, and be stable at the same time.</para>
|
||||
|
||||
<para>Before the installation instructions, each installation page provides
|
||||
information about the package, including a concise description of what it
|
||||
@ -42,31 +50,31 @@
|
||||
instructions, there is a list of programs and libraries (along with brief
|
||||
descriptions) that the package installs.</para>
|
||||
|
||||
<note><para>The SBU values and required disk space includes test suite data
|
||||
<note><para>The SBU values and required disk space include test suite data
|
||||
for all applicable packages in <xref linkend="chapter-building-system"/>. SBU
|
||||
values have been calculated using a single CPU core (-j1) for all
|
||||
operations.</para></note>
|
||||
|
||||
<sect2>
|
||||
<title>About libraries</title>
|
||||
<title>About Libraries</title>
|
||||
|
||||
<para>In general, the LFS editors discourage building and installing static
|
||||
libraries. The original purpose for most static libraries has been made
|
||||
libraries. Most static libraries have been made
|
||||
obsolete in a modern Linux system. In addition, linking a static library
|
||||
into a program can be detrimental. If an update to the library is needed
|
||||
to remove a security problem, all programs that use the static library will
|
||||
need to be relinked to the new library. Since the use of static libraries
|
||||
to remove a security problem, every program that uses the static library will
|
||||
need to be relinked with the new library. Since the use of static libraries
|
||||
is not always obvious, the relevant programs (and the procedures needed to
|
||||
do the linking) may not even be known.</para>
|
||||
|
||||
<para>In the procedures in this chapter, we remove or disable installation of
|
||||
<para>The procedures in this chapter remove or disable installation of
|
||||
most static libraries. Usually this is done by passing a
|
||||
<option>--disable-static</option> option to <command>configure</command>.
|
||||
In other cases, alternate means are needed. In a few cases, especially
|
||||
glibc and gcc, the use of static libraries remains essential to the general
|
||||
Glibc and GCC, the use of static libraries remains an essential feature of the
|
||||
package building process. </para>
|
||||
|
||||
<para>For a more complete discussion of libraries, see the discussion
|
||||
<para>For a more complete discussion of libraries, see
|
||||
<ulink url="&blfs-book;introduction/libraries.html">
|
||||
Libraries: Static or shared?</ulink> in the BLFS book.</para>
|
||||
|
||||
|
@ -12,10 +12,11 @@
|
||||
|
||||
<para>Package Management is an often requested addition to the LFS Book. A
|
||||
Package Manager tracks the installation of files, making it easier to
|
||||
remove and upgrade packages. As well as the binary and library files, a
|
||||
package manager will handle the installation of configuration files. Before
|
||||
remove and upgrade packages. A good package manager will also handle the
|
||||
configuration files specially to keep the user configuration when the
|
||||
package is reinstalled or upgraded. Before
|
||||
you begin to wonder, NO—this section will not talk about nor recommend
|
||||
any particular package manager. What it provides is a roundup of the more
|
||||
any particular package manager. What it does provide is a roundup of the more
|
||||
popular techniques and how they work. The perfect package manager for you may
|
||||
be among these techniques, or it may be a combination of two or more of these
|
||||
techniques. This section briefly mentions issues that may arise when upgrading
|
||||
@ -61,8 +62,8 @@
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>If Linux API headers or glibc need to be upgraded to a newer
|
||||
version, (e.g., from glibc-2.31 to glibc-2.32), it is safer to
|
||||
<para>If the Linux API headers or Glibc need to be upgraded to a newer
|
||||
version, (e.g., from Glibc-2.31 to Glibc-2.32), it is safer to
|
||||
rebuild LFS. Though you <emphasis>may</emphasis> be able to rebuild
|
||||
all the packages in their dependency order, we do not recommend
|
||||
it. </para>
|
||||
@ -202,7 +203,7 @@
|
||||
it is installed in <filename class="directory">/usr</filename> though in
|
||||
reality it is installed in the
|
||||
<filename class="directory">/usr/pkg</filename> hierarchy. Installing in
|
||||
this manner is not usually a trivial task. For example, consider that you
|
||||
this manner is not usually a trivial task. For example, suppose you
|
||||
are installing a package libfoo-1.1. The following instructions may
|
||||
not install the package properly:</para>
|
||||
|
||||
@ -321,7 +322,8 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput></screen>
|
||||
depend on the position of files on a disk system. Cloning an LFS build to
|
||||
another computer with the same architecture as the base system is as
|
||||
simple as using <command>tar</command> on the LFS partition that contains
|
||||
the root directory (about 250MB uncompressed for a base LFS build), copying
|
||||
the root directory (about 900MB uncompressed for a basic LFS build), copying
|
||||
<!-- D. Bryant created LFS 11.2 in October 2022; 900MB is (roughly) the size of his rsync archive. -->
|
||||
that file via network transfer or CD-ROM / USB stick to the new system, and expanding
|
||||
it. After that, a few configuration files will have to be changed.
|
||||
Configuration files that may need to be updated include:
|
||||
|
Loading…
Reference in New Issue
Block a user