mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-18 19:29:21 +01:00
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:
parent
387a32af4b
commit
aefc8221f5
@ -45,7 +45,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
<variablelist>
|
||||
@ -55,7 +55,7 @@
|
||||
<term><parameter>--docdir=/usr/share/doc/bison-&bison-version;</parameter></term>
|
||||
<listitem>
|
||||
<para>This tells the build system to install bison documentation
|
||||
into a versioned directory.</para>
|
||||
into a versioned directory.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
@ -52,8 +52,7 @@ makeinfo --plaintext -o doc/dejagnu.txt doc/dejagnu.texi</userinput></scr
|
||||
|
||||
<screen><userinput remap="install">make install
|
||||
install -v -dm755 /usr/share/doc/dejagnu-&dejagnu-version;
|
||||
install -v -m644 doc/dejagnu.{html,txt} \
|
||||
/usr/share/doc/dejagnu-&dejagnu-version;</userinput></screen>
|
||||
install -v -m644 doc/dejagnu.{html,txt} /usr/share/doc/dejagnu-&dejagnu-version;</userinput></screen>
|
||||
|
||||
<para>To test the results, issue:</para>
|
||||
|
||||
|
@ -62,9 +62,9 @@
|
||||
<varlistentry>
|
||||
<term><parameter>--with-tcl=/usr/lib</parameter></term>
|
||||
<listitem>
|
||||
<para>This parameter is needed to tell the
|
||||
<para>This parameter is needed to tell
|
||||
<command>configure</command> where the
|
||||
<command>tclConfig.sh</command> is located.</para>
|
||||
<command>tclConfig.sh</command> script is located.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@ -72,9 +72,7 @@
|
||||
<term><parameter>--with-tclinclude=/usr/include</parameter></term>
|
||||
<listitem>
|
||||
<para>This explicitly tells Expect where to find Tcl's internal
|
||||
headers. Using this option avoids conditions where
|
||||
<command>configure</command> fails because it cannot automatically
|
||||
discover the location of Tcl's headers.</para>
|
||||
headers.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
@ -67,7 +67,7 @@
|
||||
|
||||
<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>
|
||||
|
||||
<screen><userinput remap="install">cp -v gettext-tools/src/{msgfmt,msgmerge,xgettext} /usr/bin</userinput></screen>
|
||||
@ -77,8 +77,7 @@
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-gettext" role="."/></para>
|
||||
<para>Details on this package are located in <xref linkend="contents-gettext" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -24,18 +24,16 @@
|
||||
<sect2 role="package">
|
||||
<title/>
|
||||
|
||||
<para>Again, when building <xref linkend="ch-tools-gcc-pass2"/>, we had to
|
||||
defer the installation of the C++ standard library, because no suitable
|
||||
compiler was available to compile it: we could not use the compiler
|
||||
installed, because this compiler is a native
|
||||
compiler, and should not be used outside of chroot without being at
|
||||
risk of polluting the build with some host components.</para>
|
||||
<para>When building <xref linkend="ch-tools-gcc-pass2"/> we had to defer
|
||||
the installation of the C++ standard library because no suitable compiler
|
||||
was available to compile it. We could not use the compiler built in that
|
||||
section because it is a native compiler and should not be used outside of
|
||||
chroot and risk polluting the libraries with some host components.</para>
|
||||
|
||||
<segmentedlist>
|
||||
<segtitle>&buildtime;</segtitle>
|
||||
<segtitle>&diskspace;</segtitle>
|
||||
|
||||
<!-- TODO -->
|
||||
<seglistitem>
|
||||
<seg>&libstdcpp-ch5-sbu;</seg>
|
||||
<seg>&libstdcpp-ch5-du;</seg>
|
||||
@ -53,17 +51,16 @@
|
||||
<filename>gcc-&gcc-version;</filename> directory.</para>
|
||||
</note>
|
||||
|
||||
<para>Create a link which exists when building Libstdc++ in the gcc
|
||||
tree:</para>
|
||||
<para>Create a link which exists when building libstdc++ in the gcc tree:</para>
|
||||
|
||||
<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
|
||||
cd build</userinput></screen>
|
||||
|
||||
<para>Prepare Libstdc++ for compilation:</para>
|
||||
<para>Prepare libstdc++ for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">../libstdc++-v3/configure \
|
||||
CXXFLAGS="-g -O2 -D_GNU_SOURCE" \
|
||||
@ -78,8 +75,8 @@ cd build</userinput></screen>
|
||||
<varlistentry>
|
||||
<term><parameter>CXXFLAGS="-g -O2 -D_GNU_SOURCE"</parameter></term>
|
||||
<listitem>
|
||||
<para>Those flags are passed by the top level Makefile when doing
|
||||
a full build of GCC.</para>
|
||||
<para>These flags are passed by the top level Makefile when doing
|
||||
a full build of GCC.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@ -106,8 +103,7 @@ cd build</userinput></screen>
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-gcc" role="."/></para>
|
||||
<para>Details on this package are located in <xref linkend="contents-gcc" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -60,7 +60,7 @@
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>Build the package:</para>
|
||||
<para>Build and install the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
||||
@ -71,8 +71,7 @@
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-perl" role="."/></para>
|
||||
<para>Details on this package are located in <xref linkend="contents-perl" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -80,8 +80,7 @@
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-python" role="."/></para>
|
||||
<para>Details on this package are located in <xref linkend="contents-python" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -28,37 +28,33 @@
|
||||
strip --strip-unneeded /usr/{,s}bin/*
|
||||
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.
|
||||
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
|
||||
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-->
|
||||
our cross-compiled programs.--></para>
|
||||
|
||||
<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
|
||||
ones would be destroyed and the toolchain packages would need to be
|
||||
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>
|
||||
|
||||
<para>The libtool .la files are only useful when linking with static
|
||||
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>
|
||||
|
||||
<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
|
||||
<envar>$LFS</envar> that can be used to build and install Glibc and Gcc in
|
||||
<para>At this point, you should have at least 5 GB of free space on the
|
||||
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 rest too.</para>
|
||||
the rest too. You can check the free disk space with the command
|
||||
<command>df -h /</command>.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
@ -70,9 +66,9 @@ strip --strip-unneeded /tools/bin/*</userinput></screen>
|
||||
a backup. When every check has passed successfully in the previously
|
||||
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
|
||||
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
|
||||
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.
|
||||
</para>
|
||||
|
||||
@ -83,14 +79,13 @@ strip --strip-unneeded /tools/bin/*</userinput></screen>
|
||||
<systemitem class="username">lfs</systemitem>. Leaving the
|
||||
chroot environment is required as the backup should be stored
|
||||
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:
|
||||
</para>
|
||||
|
||||
<screen role="nodump"><userinput>exit
|
||||
umount $LFS/dev{/pts,}
|
||||
umount $LFS/{sys,proc,run}
|
||||
</userinput></screen>
|
||||
umount $LFS/{sys,proc,run}</userinput></screen>
|
||||
|
||||
<para>Create the backup archive:</para>
|
||||
<screen role="nodump"><userinput>cd $LFS &&
|
||||
@ -98,12 +93,12 @@ tar -cJpf $HOME/temp-tools.tar.xz .
|
||||
</userinput></screen>
|
||||
|
||||
<para>
|
||||
In case you have to start over as some mistakes has been made, you can
|
||||
use this backup to restore the temporary tools and save some time on
|
||||
the way to recover. Since the sources are located under
|
||||
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 irecovery time.
|
||||
Since the sources are located under
|
||||
<filename class="directory">$LFS</filename>, they are included in the
|
||||
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:
|
||||
</para>
|
||||
|
||||
@ -113,8 +108,8 @@ tar -xpf $HOME/temp-tools.tar.xz
|
||||
</userinput></screen>
|
||||
|
||||
<para>
|
||||
Again, double check that the environment has been setup proper and
|
||||
continue building the rest of the system.
|
||||
Again, double check that the environment has been setup properly
|
||||
and continue building the rest of the system.
|
||||
</para>
|
||||
|
||||
<important>
|
||||
@ -122,7 +117,7 @@ tar -xpf $HOME/temp-tools.tar.xz
|
||||
If you left the chroot environment either to create a backup
|
||||
or restart building using a restore, remember to mount the
|
||||
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
|
||||
linkend='ch-tools-chroot'/>) again before continuing.</para>
|
||||
</important>
|
||||
|
@ -45,7 +45,7 @@
|
||||
<title>Installation of Tcl</title>
|
||||
|
||||
<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
|
||||
excessive, but it is very reassuring, if not essential, to know that the
|
||||
most important tools are working properly. These packages are required
|
||||
@ -70,7 +70,7 @@ cd unix
|
||||
<term><parameter>$([ "$(uname -m)" = x86_64 ] && echo --enable-64bit)</parameter></term>
|
||||
<listitem>
|
||||
<para>The construct <parameter>$(<shell command>)</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
|
||||
<parameter>--enable-64bit</parameter> if running on a 64 bit machine.
|
||||
</para>
|
||||
@ -100,11 +100,11 @@ sed -e "s|$SRCDIR/unix/pkgs/itcl&itcl-ver;|/usr/lib/itcl&itcl-ver;|" \
|
||||
|
||||
unset SRCDIR</userinput></screen>
|
||||
|
||||
<para>The various <quote>sed</quote> after the <quote>make</quote> command
|
||||
remove references to the build directory from various configuration files,
|
||||
and replaces them with the install directory. This is not mandatory
|
||||
for the remaining of LFS, but may be needed in case a package built later
|
||||
uses Tcl.</para>
|
||||
<para>The various <quote>sed</quote> instructions after the
|
||||
<quote>make</quote> command removes references to the build directory from
|
||||
the configuration files and replaces them with the install directory.
|
||||
This is not mandatory for the remainder of LFS, but may be needed in case a
|
||||
package built later uses Tcl.</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>
|
||||
|
||||
<para>Install Tcl's headers. The next package, Expect, requires them
|
||||
to build.</para>
|
||||
<para>Install Tcl's headers. The next package, Expect, requires them.</para>
|
||||
|
||||
<screen><userinput remap="install">make install-private-headers</userinput></screen>
|
||||
|
||||
@ -134,8 +133,14 @@ unset SRCDIR</userinput></screen>
|
||||
<segtitle>Installed library</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>tclsh (link to tclsh&tcl-major-version;) and tclsh&tcl-major-version;</seg>
|
||||
<seg>libtcl&tcl-major-version;.so, libtclstub&tcl-major-version;.a</seg>
|
||||
<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>
|
||||
</segmentedlist>
|
||||
|
||||
|
@ -66,8 +66,7 @@
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-texinfo" role="."/></para>
|
||||
<para>Details on this package are located in <xref linkend="contents-texinfo" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -48,7 +48,8 @@
|
||||
|
||||
<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; \
|
||||
--disable-chfn-chsh \
|
||||
--disable-login \
|
||||
@ -62,22 +63,22 @@
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the configure options:</title>
|
||||
<!-- TODO -->
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>ADJTIME_PATH=/var/lib/hwclock/adjtime</parameter></term>
|
||||
<listitem>
|
||||
<para>This sets the location of the file recording information about
|
||||
the hardware clock, in accordance to the FHS. This is not stricly
|
||||
needed fot his temporary tool, but it prevent creating a file
|
||||
the hardware clock in accordance to the FHS. This is not stricly
|
||||
needed for his temporary tool, but it prevents creating a file
|
||||
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>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--disable-*</parameter></term>
|
||||
<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>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -105,8 +106,7 @@
|
||||
<sect2 role="content">
|
||||
<title/>
|
||||
|
||||
<para>Details on this package are located in
|
||||
<xref linkend="contents-utillinux" role="."/></para>
|
||||
<para>Details on this package are located in <xref linkend="contents-utillinux" role="."/></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -62,9 +62,8 @@ rm -f /usr/lib/libz.a</userinput></screen>
|
||||
url="&blfs-book;/introduction/la-files.html">BLFS section "About Libtool
|
||||
Archive (.la) files"</ulink>.</para>
|
||||
|
||||
<para>Finally, remove the temporary 'tester' usr account created at the
|
||||
beginning of this chapter.</para>
|
||||
<para>Finally, remove the temporary 'tester' user account created at the
|
||||
beginning of the previous chapter.</para>
|
||||
|
||||
<screen><userinput>sed -i '/tester/d' /etc/passwd /etc/group
|
||||
rm -rf /home/tester</userinput></screen>
|
||||
<screen><userinput>userdel -r tester</userinput></screen>
|
||||
</sect1>
|
||||
|
Loading…
Reference in New Issue
Block a user