Updates to the rest of cross2 Chapter 7.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11919 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Bruce Dubbs 2020-06-11 05:55:06 +00:00
parent 387a32af4b
commit aefc8221f5
12 changed files with 71 additions and 83 deletions

View File

@ -45,7 +45,7 @@
<para>Prepare Bison for compilation:</para> <para>Prepare Bison for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \ <screen><userinput remap="configure">./configure --prefix=/usr \
--docdir=/usr/share/doc/bison-&bison-version;</userinput></screen> --docdir=/usr/share/doc/bison-&bison-version;</userinput></screen>
<variablelist> <variablelist>
@ -55,7 +55,7 @@
<term><parameter>--docdir=/usr/share/doc/bison-&bison-version;</parameter></term> <term><parameter>--docdir=/usr/share/doc/bison-&bison-version;</parameter></term>
<listitem> <listitem>
<para>This tells the build system to install bison documentation <para>This tells the build system to install bison documentation
into a versioned directory.</para> into a versioned directory.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@ -52,8 +52,7 @@ makeinfo --plaintext -o doc/dejagnu.txt doc/dejagnu.texi</userinput></scr
<screen><userinput remap="install">make install <screen><userinput remap="install">make install
install -v -dm755 /usr/share/doc/dejagnu-&dejagnu-version; install -v -dm755 /usr/share/doc/dejagnu-&dejagnu-version;
install -v -m644 doc/dejagnu.{html,txt} \ install -v -m644 doc/dejagnu.{html,txt} /usr/share/doc/dejagnu-&dejagnu-version;</userinput></screen>
/usr/share/doc/dejagnu-&dejagnu-version;</userinput></screen>
<para>To test the results, issue:</para> <para>To test the results, issue:</para>

View File

@ -62,9 +62,9 @@
<varlistentry> <varlistentry>
<term><parameter>--with-tcl=/usr/lib</parameter></term> <term><parameter>--with-tcl=/usr/lib</parameter></term>
<listitem> <listitem>
<para>This parameter is needed to tell the <para>This parameter is needed to tell
<command>configure</command> where the <command>configure</command> where the
<command>tclConfig.sh</command> is located.</para> <command>tclConfig.sh</command> script is located.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -72,9 +72,7 @@
<term><parameter>--with-tclinclude=/usr/include</parameter></term> <term><parameter>--with-tclinclude=/usr/include</parameter></term>
<listitem> <listitem>
<para>This explicitly tells Expect where to find Tcl's internal <para>This explicitly tells Expect where to find Tcl's internal
headers. Using this option avoids conditions where headers.</para>
<command>configure</command> fails because it cannot automatically
discover the location of Tcl's headers.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@ -67,7 +67,7 @@
<screen><userinput remap="make">make</userinput></screen> <screen><userinput remap="make">make</userinput></screen>
<para>Install the <command>msgfmt</command>, <command>msgmerge</command> and <para>Install the <command>msgfmt</command>, <command>msgmerge</command>, and
<command>xgettext</command> programs:</para> <command>xgettext</command> programs:</para>
<screen><userinput remap="install">cp -v gettext-tools/src/{msgfmt,msgmerge,xgettext} /usr/bin</userinput></screen> <screen><userinput remap="install">cp -v gettext-tools/src/{msgfmt,msgmerge,xgettext} /usr/bin</userinput></screen>
@ -77,8 +77,7 @@
<sect2 role="content"> <sect2 role="content">
<title/> <title/>
<para>Details on this package are located in <para>Details on this package are located in <xref linkend="contents-gettext" role="."/></para>
<xref linkend="contents-gettext" role="."/></para>
</sect2> </sect2>

View File

@ -24,18 +24,16 @@
<sect2 role="package"> <sect2 role="package">
<title/> <title/>
<para>Again, when building <xref linkend="ch-tools-gcc-pass2"/>, we had to <para>When building <xref linkend="ch-tools-gcc-pass2"/> we had to defer
defer the installation of the C++ standard library, because no suitable the installation of the C++ standard library because no suitable compiler
compiler was available to compile it: we could not use the compiler was available to compile it. We could not use the compiler built in that
installed, because this compiler is a native section because it is a native compiler and should not be used outside of
compiler, and should not be used outside of chroot without being at chroot and risk polluting the libraries with some host components.</para>
risk of polluting the build with some host components.</para>
<segmentedlist> <segmentedlist>
<segtitle>&buildtime;</segtitle> <segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle> <segtitle>&diskspace;</segtitle>
<!-- TODO -->
<seglistitem> <seglistitem>
<seg>&libstdcpp-ch5-sbu;</seg> <seg>&libstdcpp-ch5-sbu;</seg>
<seg>&libstdcpp-ch5-du;</seg> <seg>&libstdcpp-ch5-du;</seg>
@ -53,17 +51,16 @@
<filename>gcc-&gcc-version;</filename> directory.</para> <filename>gcc-&gcc-version;</filename> directory.</para>
</note> </note>
<para>Create a link which exists when building Libstdc++ in the gcc <para>Create a link which exists when building libstdc++ in the gcc tree:</para>
tree:</para>
<screen><userinput remap="pre">ln -s gthr-posix.h libgcc/gthr-default.h</userinput></screen> <screen><userinput remap="pre">ln -s gthr-posix.h libgcc/gthr-default.h</userinput></screen>
<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 \
CXXFLAGS="-g -O2 -D_GNU_SOURCE" \ CXXFLAGS="-g -O2 -D_GNU_SOURCE" \
@ -78,8 +75,8 @@ cd build</userinput></screen>
<varlistentry> <varlistentry>
<term><parameter>CXXFLAGS="-g -O2 -D_GNU_SOURCE"</parameter></term> <term><parameter>CXXFLAGS="-g -O2 -D_GNU_SOURCE"</parameter></term>
<listitem> <listitem>
<para>Those flags are passed by the top level Makefile when doing <para>These flags are passed by the top level Makefile when doing
a full build of GCC.</para> a full build of GCC.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -106,8 +103,7 @@ cd build</userinput></screen>
<sect2 role="content"> <sect2 role="content">
<title/> <title/>
<para>Details on this package are located in <para>Details on this package are located in <xref linkend="contents-gcc" role="."/></para>
<xref linkend="contents-gcc" role="."/></para>
</sect2> </sect2>

View File

@ -60,7 +60,7 @@
</variablelist> </variablelist>
<para>Build the package:</para> <para>Build and install the package:</para>
<screen><userinput remap="make">make</userinput></screen> <screen><userinput remap="make">make</userinput></screen>
@ -71,8 +71,7 @@
<sect2 role="content"> <sect2 role="content">
<title/> <title/>
<para>Details on this package are located in <para>Details on this package are located in <xref linkend="contents-perl" role="."/></para>
<xref linkend="contents-perl" role="."/></para>
</sect2> </sect2>

View File

@ -80,8 +80,7 @@
<sect2 role="content"> <sect2 role="content">
<title/> <title/>
<para>Details on this package are located in <para>Details on this package are located in <xref linkend="contents-python" role="."/></para>
<xref linkend="contents-python" role="."/></para>
</sect2> </sect2>

View File

@ -28,37 +28,33 @@
strip --strip-unneeded /usr/{,s}bin/* strip --strip-unneeded /usr/{,s}bin/*
strip --strip-unneeded /tools/bin/*</userinput></screen> strip --strip-unneeded /tools/bin/*</userinput></screen>
<para>These commands will skip a number of files, reporting that it does not <para>These commands will skip a number of files reporting that it does not
recognize their file format. Most of these are scripts instead of binaries. recognize their file format. Most of these are scripts instead of binaries.
Note that we use the <command>strip</command> program built in <!--Note that we use the <command>strip</command> program built in
<quote>Binutils pass 1</quote>, since it is the one that knows how to strip <quote>Binutils pass 1</quote>, since it is the one that knows how to strip
our cross-compiled programs.</para> our cross-compiled programs.--></para>
<!-- Normally, the host "strip" could be used too, since it is actually the
same computer. But Some old versions of binutils may generate buggy crt1.o
and the like, because they do not know about recently introduced symbol
types. For more details,
see https://sourceware.org/bugzilla/show_bug.cgi?id=22875-->
<para>Take care <emphasis>not</emphasis> to use <para>Take care <emphasis>NOT</emphasis> to use
<parameter>--strip-unneeded</parameter> on the libraries. The static <parameter>--strip-unneeded</parameter> on the libraries. The static
ones would be destroyed and the toolchain packages would need to be ones would be destroyed and the toolchain packages would need to be
built all over again.</para> built all over again.</para>
<para>To save more, remove the documentation:</para> <para>To save more space, remove the documentation:</para>
<screen><userinput>rm -rf /usr/{,share}/{info,man,doc}</userinput></screen> <screen><userinput>rm -rf /usr/{,share}/{info,man,doc}</userinput></screen>
<para>The libtool .la files are only useful when linking with static <para>The libtool .la files are only useful when linking with static
libraries. They are unneeded, and potentially harmful, when using dynamic libraries. They are unneeded, and potentially harmful, when using dynamic
shared libraries, specially when using also non-autotools build systems. shared libraries, specially when using non-autotools build systems.
Remove those files now:</para> Remove those files now:</para>
<screen><userinput>find /usr/{lib,libexec} -name \*.la -delete</userinput></screen> <screen><userinput>find /usr/{lib,libexec} -name \*.la -delete</userinput></screen>
<para>At this point, you should have at least 3 GB of free space in <para>At this point, you should have at least 5 GB of free space on the
<envar>$LFS</envar> that can be used to build and install Glibc and Gcc in chroot partition that can be used to build and install Glibc and Gcc in
the next phase. If you can build and install Glibc, you can build and install the next phase. If you can build and install Glibc, you can build and install
the rest too.</para> the rest too. You can check the free disk space with the command
<command>df -h /</command>.</para>
</sect2> </sect2>
@ -70,9 +66,9 @@ strip --strip-unneeded /tools/bin/*</userinput></screen>
a backup. When every check has passed successfully in the previously a backup. When every check has passed successfully in the previously
built packages, your temporary tools are in a good state and might be built packages, your temporary tools are in a good state and might be
backed up for later reuse. In case of fatal failures in the subsequent backed up for later reuse. In case of fatal failures in the subsequent
sections, it often turns out that removing everything and starting over chapters, it often turns out that removing everything and starting over
(more carefully) is the best option to recover. Unfortunatly, all the (more carefully) is the best option to recover. Unfortunatly, all the
temporary tools will be removed, too. To avoid extra time to redo temporary tools will be removed, too. To avoid the extra time needed to redo
something which has been built successfully, prepare a backup. something which has been built successfully, prepare a backup.
</para> </para>
@ -83,14 +79,13 @@ strip --strip-unneeded /tools/bin/*</userinput></screen>
<systemitem class="username">lfs</systemitem>. Leaving the <systemitem class="username">lfs</systemitem>. Leaving the
chroot environment is required as the backup should be stored chroot environment is required as the backup should be stored
outside of the <filename class="directory">$LFS</filename> directory outside of the <filename class="directory">$LFS</filename> directory
but those cannot be accessed when in chroot. Leave chroot environment but those cannot be accessed when in chroot. Leave the chroot environment
and unmount the virtual kernel filesystems: and unmount the virtual kernel filesystems:
</para> </para>
<screen role="nodump"><userinput>exit <screen role="nodump"><userinput>exit
umount $LFS/dev{/pts,} umount $LFS/dev{/pts,}
umount $LFS/{sys,proc,run} umount $LFS/{sys,proc,run}</userinput></screen>
</userinput></screen>
<para>Create the backup archive:</para> <para>Create the backup archive:</para>
<screen role="nodump"><userinput>cd $LFS &amp;&amp; <screen role="nodump"><userinput>cd $LFS &amp;&amp;
@ -98,12 +93,12 @@ tar -cJpf $HOME/temp-tools.tar.xz .
</userinput></screen> </userinput></screen>
<para> <para>
In case you have to start over as some mistakes has been made, you can In case some mistakes have been made and you need to start over, you can
use this backup to restore the temporary tools and save some time on use this backup to restore the temporary tools and save some irecovery time.
the way to recover. Since the sources are located under Since the sources are located under
<filename class="directory">$LFS</filename>, they are included in the <filename class="directory">$LFS</filename>, they are included in the
backup archive as well, so you need not to download them again. After backup archive as well, so you need not to download them again. After
checking that <filename class="directory">$LFS</filename> is set proper, checking that <filename class="directory">$LFS</filename> is set properly,
restore the backup by executing the following commands: restore the backup by executing the following commands:
</para> </para>
@ -113,8 +108,8 @@ tar -xpf $HOME/temp-tools.tar.xz
</userinput></screen> </userinput></screen>
<para> <para>
Again, double check that the environment has been setup proper and Again, double check that the environment has been setup properly
continue building the rest of the system. and continue building the rest of the system.
</para> </para>
<important> <important>
@ -122,7 +117,7 @@ tar -xpf $HOME/temp-tools.tar.xz
If you left the chroot environment either to create a backup If you left the chroot environment either to create a backup
or restart building using a restore, remember to mount the or restart building using a restore, remember to mount the
kernel virtual filesystems as described in <xref kernel virtual filesystems as described in <xref
linkend='ch-tools-kernfs'/> and enter the linkend='ch-tools-kernfs'/> and re-enter the
chroot environment (see <xref chroot environment (see <xref
linkend='ch-tools-chroot'/>) again before continuing.</para> linkend='ch-tools-chroot'/>) again before continuing.</para>
</important> </important>

View File

@ -45,7 +45,7 @@
<title>Installation of Tcl</title> <title>Installation of Tcl</title>
<para>This package and the next two (Expect and DejaGNU) are <para>This package and the next two (Expect and DejaGNU) are
installed to support running the test suites for GCC and Binutils and other installed to support running the test suites for GCC and binutils and other
packages. Installing three packages for testing purposes may seem packages. Installing three packages for testing purposes may seem
excessive, but it is very reassuring, if not essential, to know that the excessive, but it is very reassuring, if not essential, to know that the
most important tools are working properly. These packages are required most important tools are working properly. These packages are required
@ -70,7 +70,7 @@ cd unix
<term><parameter>$([ "$(uname -m)" = x86_64 ] &amp;&amp; echo --enable-64bit)</parameter></term> <term><parameter>$([ "$(uname -m)" = x86_64 ] &amp;&amp; echo --enable-64bit)</parameter></term>
<listitem> <listitem>
<para>The construct <parameter>$(&lt;shell command&gt;)</parameter> <para>The construct <parameter>$(&lt;shell command&gt;)</parameter>
is replaced by the output of the chell command. Here this output is is replaced by the output of the shell command. Here this output is
empty if running on a 32 bit machine, and is empty if running on a 32 bit machine, and is
<parameter>--enable-64bit</parameter> if running on a 64 bit machine. <parameter>--enable-64bit</parameter> if running on a 64 bit machine.
</para> </para>
@ -100,11 +100,11 @@ sed -e "s|$SRCDIR/unix/pkgs/itcl&itcl-ver;|/usr/lib/itcl&itcl-ver;|" \
unset SRCDIR</userinput></screen> unset SRCDIR</userinput></screen>
<para>The various <quote>sed</quote> after the <quote>make</quote> command <para>The various <quote>sed</quote> instructions after the
remove references to the build directory from various configuration files, <quote>make</quote> command removes references to the build directory from
and replaces them with the install directory. This is not mandatory the configuration files and replaces them with the install directory.
for the remaining of LFS, but may be needed in case a package built later This is not mandatory for the remainder of LFS, but may be needed in case a
uses Tcl.</para> package built later uses Tcl.</para>
<para>Install the package:</para> <para>Install the package:</para>
@ -115,8 +115,7 @@ unset SRCDIR</userinput></screen>
<screen><userinput remap="install">chmod -v u+w /usr/lib/libtcl&tcl-major-version;.so</userinput></screen> <screen><userinput remap="install">chmod -v u+w /usr/lib/libtcl&tcl-major-version;.so</userinput></screen>
<para>Install Tcl's headers. The next package, Expect, requires them <para>Install Tcl's headers. The next package, Expect, requires them.</para>
to build.</para>
<screen><userinput remap="install">make install-private-headers</userinput></screen> <screen><userinput remap="install">make install-private-headers</userinput></screen>
@ -134,8 +133,14 @@ unset SRCDIR</userinput></screen>
<segtitle>Installed library</segtitle> <segtitle>Installed library</segtitle>
<seglistitem> <seglistitem>
<seg>tclsh (link to tclsh&tcl-major-version;) and tclsh&tcl-major-version;</seg> <seg>
<seg>libtcl&tcl-major-version;.so, libtclstub&tcl-major-version;.a</seg> tclsh (link to tclsh&tcl-major-version;) and
tclsh&tcl-major-version;
</seg>
<seg>
libtcl&tcl-major-version;.so and
libtclstub&tcl-major-version;.a
</seg>
</seglistitem> </seglistitem>
</segmentedlist> </segmentedlist>

View File

@ -66,8 +66,7 @@
<sect2 role="content"> <sect2 role="content">
<title/> <title/>
<para>Details on this package are located in <para>Details on this package are located in <xref linkend="contents-texinfo" role="."/></para>
<xref linkend="contents-texinfo" role="."/></para>
</sect2> </sect2>

View File

@ -48,7 +48,8 @@
<para>Prepare Util-linux for compilation:</para> <para>Prepare Util-linux for compilation:</para>
<screen><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ <screen><userinput remap="configure">
./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
--docdir=/usr/share/doc/util-linux-&util-linux-version; \ --docdir=/usr/share/doc/util-linux-&util-linux-version; \
--disable-chfn-chsh \ --disable-chfn-chsh \
--disable-login \ --disable-login \
@ -62,22 +63,22 @@
<variablelist> <variablelist>
<title>The meaning of the configure options:</title> <title>The meaning of the configure options:</title>
<!-- TODO -->
<varlistentry> <varlistentry>
<term><parameter>ADJTIME_PATH=/var/lib/hwclock/adjtime</parameter></term> <term><parameter>ADJTIME_PATH=/var/lib/hwclock/adjtime</parameter></term>
<listitem> <listitem>
<para>This sets the location of the file recording information about <para>This sets the location of the file recording information about
the hardware clock, in accordance to the FHS. This is not stricly the hardware clock in accordance to the FHS. This is not stricly
needed fot his temporary tool, but it prevent creating a file needed for his temporary tool, but it prevents creating a file
at another location, which would not be overwritten or removed at another location, which would not be overwritten or removed
when building the final util-linux.</para> when building the final util-linux package.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><parameter>--disable-*</parameter></term> <term><parameter>--disable-*</parameter></term>
<listitem> <listitem>
<para>Those switches prevent warnings about building components <para>These switches prevent warnings about building components
that require packages not in LFS or not installed yet.</para> that require packages not in LFS or not installed yet.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -105,8 +106,7 @@
<sect2 role="content"> <sect2 role="content">
<title/> <title/>
<para>Details on this package are located in <para>Details on this package are located in <xref linkend="contents-utillinux" role="."/></para>
<xref linkend="contents-utillinux" role="."/></para>
</sect2> </sect2>

View File

@ -62,9 +62,8 @@ rm -f /usr/lib/libz.a</userinput></screen>
url="&blfs-book;/introduction/la-files.html">BLFS section "About Libtool url="&blfs-book;/introduction/la-files.html">BLFS section "About Libtool
Archive (.la) files"</ulink>.</para> Archive (.la) files"</ulink>.</para>
<para>Finally, remove the temporary 'tester' usr account created at the <para>Finally, remove the temporary 'tester' user account created at the
beginning of this chapter.</para> beginning of the previous chapter.</para>
<screen><userinput>sed -i '/tester/d' /etc/passwd /etc/group <screen><userinput>userdel -r tester</userinput></screen>
rm -rf /home/tester</userinput></screen>
</sect1> </sect1>