mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-03-06 14:24:48 +00:00
Text update to cross2 Chapter 4.
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11913 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
b99b7d3a6e
commit
ee714d385e
@ -20,16 +20,16 @@
|
|||||||
used instead.</para>
|
used instead.</para>
|
||||||
|
|
||||||
<para>The SBU measure works as follows. The first package to be compiled
|
<para>The SBU measure works as follows. The first package to be compiled
|
||||||
from this book is Binutils in <xref linkend="chapter-temporary-tools"/>. The
|
from this book is binutils in <xref linkend="chapter-cross-tools"/>. The
|
||||||
time it takes to compile this package is what will be referred to as the
|
time it takes to compile this package is what will be referred to as the
|
||||||
Standard Build Unit or SBU. All other compile times will be expressed relative
|
Standard Build Unit or SBU. All other compile times will be expressed relative
|
||||||
to this time.</para>
|
to this time.</para>
|
||||||
|
|
||||||
<para>For example, consider a package whose compilation time is 4.5
|
<para>For example, consider a package whose compilation time is 4.5
|
||||||
SBUs. This means that if a system took 10 minutes to compile and
|
SBUs. This means that if a system took 10 minutes to compile and
|
||||||
install the first pass of Binutils, it will take
|
install the first pass of binutils, it will take
|
||||||
<emphasis>approximately</emphasis> 45 minutes to build this example package.
|
<emphasis>approximately</emphasis> 45 minutes to build this example package.
|
||||||
Fortunately, most build times are shorter than the one for Binutils.</para>
|
Fortunately, most build times are shorter than the one for binutils.</para>
|
||||||
|
|
||||||
<para>In general, SBUs are not entirely accurate because they depend on many
|
<para>In general, SBUs are not entirely accurate because they depend on many
|
||||||
factors, including the host system's version of GCC. They are provided here
|
factors, including the host system's version of GCC. They are provided here
|
||||||
@ -41,13 +41,13 @@
|
|||||||
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, a Core2Duo can support two simultaneous processes with:</para>
|
instance, an Intel i5-6500 COU can support four simultaneous processes with:</para>
|
||||||
|
|
||||||
<screen role="nodump"><userinput>export MAKEFLAGS='-j 2'</userinput></screen>
|
<screen role="nodump"><userinput>export MAKEFLAGS='-j4'</userinput></screen>
|
||||||
|
|
||||||
<para>or just building with:</para>
|
<para>or just building with:</para>
|
||||||
|
|
||||||
<screen role="nodump"><userinput>make -j2</userinput></screen>
|
<screen role="nodump"><userinput>make -j4</userinput></screen>
|
||||||
|
|
||||||
<para>When multiple processors are used in this way, the SBU units in the
|
<para>When multiple processors are used in this way, the SBU units in the
|
||||||
book will vary even more than they normally would. In some cases, the make
|
book will vary even more than they normally would. In some cases, the make
|
||||||
|
@ -18,19 +18,20 @@
|
|||||||
that the package is totally bug free.</para>
|
that the package is totally bug free.</para>
|
||||||
|
|
||||||
<para>Some test suites are more important than others. For example,
|
<para>Some test suites are more important than others. For example,
|
||||||
the test suites for the core toolchain packages—GCC, Binutils, and
|
the test suites for the core toolchain packages—GCC, binutils, and
|
||||||
Glibc—are of the utmost importance due to their central role in a
|
glibc—are of the utmost importance due to their central role in a
|
||||||
properly functioning system. The test suites for GCC and Glibc can
|
properly functioning system. The test suites for GCC and glibc can
|
||||||
take a very long time to complete, especially on slower hardware, but
|
take a very long time to complete, especially on slower hardware, but
|
||||||
are strongly recommended.</para>
|
are strongly recommended.</para>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>Running the test suites in <xref linkend="chapter-temporary-tools"/>
|
<para>Running the test suites in <xref linkend="chapter-cross-tools"/>
|
||||||
|
and <xref linkend="chapter-temporary-tools"/>
|
||||||
is impossible, since the programs are compiled with a cross-compiler,
|
is impossible, since the programs are compiled with a cross-compiler,
|
||||||
so are not supposed to be able to run on the build host.</para>
|
so are not supposed to be able to run on the build host.</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<para>A common issue with running the test suites for Binutils and GCC
|
<para>A common issue with running the test suites for binutils and GCC
|
||||||
is running out of pseudo terminals (PTYs). This can result in a high
|
is running out of pseudo terminals (PTYs). This can result in a high
|
||||||
number of failing tests. This may happen for several reasons, but the
|
number of failing tests. This may happen for several reasons, but the
|
||||||
most likely cause is that the host system does not have the
|
most likely cause is that the host system does not have the
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
<title>Adding the LFS User</title>
|
<title>Adding the LFS User</title>
|
||||||
|
|
||||||
<para>When logged in as user <systemitem class="username">root</systemitem>,
|
<para>When logged in as user <systemitem class="username">root</systemitem>,
|
||||||
making a single mistake can damage or destroy a system. Therefore, we
|
making a single mistake can damage or destroy a system. Therefore,
|
||||||
recommend building the packages in the next chapter as an unprivileged user.
|
the packages in the next two chapters are built as an unprivileged user.
|
||||||
You could use your own user name, but to make it easier to set up a clean
|
You could use your own user name, but to make it easier to set up a clean
|
||||||
working environment, create a new user called <systemitem
|
working environment, create a new user called <systemitem
|
||||||
class="username">lfs</systemitem> as a member of a new group (also named
|
class="username">lfs</systemitem> as a member of a new group (also named
|
||||||
@ -62,7 +62,7 @@ useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen>
|
|||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><parameter>lfs</parameter></term>
|
<term><parameter>lfs</parameter></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>This is the actual name for the created group and user.</para>
|
<para>This is the actual name for the created user.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen>
|
|||||||
|
|
||||||
<para>Next, login as user <systemitem class="username">lfs</systemitem>.
|
<para>Next, login as user <systemitem class="username">lfs</systemitem>.
|
||||||
This can be done via a virtual console, through a display manager, or with
|
This can be done via a virtual console, through a display manager, or with
|
||||||
the following substitute user command:</para>
|
the following substitute/switch user command:</para>
|
||||||
|
|
||||||
<screen role="nodump"><userinput>su - lfs</userinput></screen>
|
<screen role="nodump"><userinput>su - lfs</userinput></screen>
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ export LFS LC_ALL LFS_TGT PATH</literal>
|
|||||||
EOF</userinput></screen>
|
EOF</userinput></screen>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<title>The meaning of the command line options in <filename>.bashrc</filename></title>
|
<title>The meaning of the settings in <filename>.bashrc</filename></title>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><parameter>set +h</parameter></term>
|
<term><parameter>set +h</parameter></term>
|
||||||
@ -136,7 +136,7 @@ EOF</userinput></screen>
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>By putting <filename class="directory">$LFS/tools/bin</filename> ahead of the
|
<para>By putting <filename class="directory">$LFS/tools/bin</filename> ahead of the
|
||||||
standard <envar>PATH</envar>, the cross-compiler installed at the beginning
|
standard <envar>PATH</envar>, the cross-compiler installed at the beginning
|
||||||
of <xref linkend="chapter-temporary-tools"/> is picked up by the shell
|
of <xref linkend="chapter-cross-tools"/> is picked up by the shell
|
||||||
immediately after its installation. This, combined with turning off hashing,
|
immediately after its installation. This, combined with turning off hashing,
|
||||||
limits the risk that the compiler from the host be used instead of the
|
limits the risk that the compiler from the host be used instead of the
|
||||||
cross-compiler.</para>
|
cross-compiler.</para>
|
||||||
@ -147,7 +147,7 @@ EOF</userinput></screen>
|
|||||||
<term><parameter>export LFS LC_ALL LFS_TGT PATH</parameter></term>
|
<term><parameter>export LFS LC_ALL LFS_TGT PATH</parameter></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>While the above commands have set some variables, in order
|
<para>While the above commands have set some variables, in order
|
||||||
to make them visible within any sub-shells, we export them</para>
|
to make them visible within any sub-shells, we export them.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user