diff options
author | Matthew Burgess <matthew@linuxfromscratch.org> | 2013-04-28 21:11:44 +0000 |
---|---|---|
committer | Matthew Burgess <matthew@linuxfromscratch.org> | 2013-04-28 21:11:44 +0000 |
commit | 5042021869a2b8207d224f553ce4bd03c71e0506 (patch) | |
tree | 0bf4755a88175822c4546f72c22c5ff7f385f0e8 /chapter05 | |
parent | 1026c1ee3143b0f0804b6456c70cc0841a99db36 (diff) |
Sync with latest trunk updates
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/systemd/BOOK@10255 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter05')
-rw-r--r-- | chapter05/binutils-pass1.xml | 8 | ||||
-rw-r--r-- | chapter05/binutils-pass2.xml | 18 | ||||
-rw-r--r-- | chapter05/chapter05.xml | 1 | ||||
-rw-r--r-- | chapter05/diffutils.xml | 4 | ||||
-rw-r--r-- | chapter05/gcc-pass1.xml | 59 | ||||
-rw-r--r-- | chapter05/gcc-pass2.xml | 39 | ||||
-rw-r--r-- | chapter05/glibc.xml | 14 | ||||
-rw-r--r-- | chapter05/libstdc++.xml | 126 |
8 files changed, 202 insertions, 67 deletions
diff --git a/chapter05/binutils-pass1.xml b/chapter05/binutils-pass1.xml index decec8b6f..8a4880b46 100644 --- a/chapter05/binutils-pass1.xml +++ b/chapter05/binutils-pass1.xml @@ -52,6 +52,12 @@ linker and assembler to determine which of their own features to enable.</para> + <para>Fix a couple of syntax errors that prevent the documentation from + building with Texinfo-&texinfo-version;:</para> + +<screen><userinput remap="pre">sed -i -e 's/@colophon/@@colophon/' \ + -e 's/doc@cygnus.com/doc@@cygnus.com/' bfd/doc/bfd.texinfo</userinput></screen> + <para>The Binutils documentation recommends building Binutils outside of the source directory in a dedicated build directory:</para> @@ -72,7 +78,7 @@ cd ../binutils-build</userinput></screen> <para>Now prepare Binutils for compilation:</para> -<screen><userinput remap="configure">../binutils-&binutils-version;/configure \ +<screen><userinput remap="configure">../binutils-&binutils-version;/configure \ --prefix=/tools \ --with-sysroot=$LFS \ --with-lib-path=/tools/lib \ diff --git a/chapter05/binutils-pass2.xml b/chapter05/binutils-pass2.xml index 1cac61a18..4d661296c 100644 --- a/chapter05/binutils-pass2.xml +++ b/chapter05/binutils-pass2.xml @@ -43,6 +43,12 @@ <sect2 role="installation"> <title>Installation of Binutils</title> + <para>Fix a couple of syntax errors that prevent the documentation from + building with Texinfo-&texinfo-version;:</para> + +<screen><userinput remap="pre">sed -i -e 's/@colophon/@@colophon/' \ + -e 's/doc@cygnus.com/doc@@cygnus.com/' bfd/doc/bfd.texinfo</userinput></screen> + <para>Create a separate build directory again:</para> <screen><userinput remap="pre">mkdir -v ../binutils-build @@ -50,12 +56,12 @@ cd ../binutils-build</userinput></screen> <para>Prepare Binutils for compilation:</para> -<screen><userinput remap="configure">CC=$LFS_TGT-gcc \ -AR=$LFS_TGT-ar \ -RANLIB=$LFS_TGT-ranlib \ -../binutils-&binutils-version;/configure \ - --prefix=/tools \ - --disable-nls \ +<screen><userinput remap="configure">CC=$LFS_TGT-gcc \ +AR=$LFS_TGT-ar \ +RANLIB=$LFS_TGT-ranlib \ +../binutils-&binutils-version;/configure \ + --prefix=/tools \ + --disable-nls \ --with-lib-path=/tools/lib \ --with-sysroot</userinput></screen> diff --git a/chapter05/chapter05.xml b/chapter05/chapter05.xml index d6a977d48..d858c9a98 100644 --- a/chapter05/chapter05.xml +++ b/chapter05/chapter05.xml @@ -18,6 +18,7 @@ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-pass1.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="linux-headers.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libstdc++.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils-pass2.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-pass2.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tcl.xml"/> diff --git a/chapter05/diffutils.xml b/chapter05/diffutils.xml index 94ec7c49c..62ba35874 100644 --- a/chapter05/diffutils.xml +++ b/chapter05/diffutils.xml @@ -43,10 +43,6 @@ <sect2 role="installation"> <title>Installation of Diffutils</title> - <para>Fix an incompatibility between this package and Glibc-&glibc-version;:</para> - -<screen><userinput remap="pre">sed -i -e '/gets is a/d' lib/stdio.in.h</userinput></screen> - <para>Prepare Diffutils for compilation:</para> <screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index bf8076d1b..23c7fe7e8 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -105,11 +105,6 @@ done</userinput></screen> <screen><userinput remap="pre">sed -i '/k prot/agcc_cv_libc_provides_ssp=yes' gcc/configure</userinput></screen> - <para>Do not build the .info files. They are not needed here and - are broken with the current version of <command>makeinfo</command>.</para> - -<screen><userinput remap="pre">sed -i 's/BUILD_INFO=info/BUILD_INFO=/' gcc/configure</userinput></screen> - <para>The GCC documentation recommends building GCC outside of the source directory in a dedicated build directory:</para> @@ -118,24 +113,28 @@ cd ../gcc-build</userinput></screen> <para>Prepare GCC for compilation:</para> -<screen><userinput remap="configure">../gcc-&gcc-version;/configure \ - --target=$LFS_TGT \ - --prefix=/tools \ - --with-sysroot=$LFS \ - --with-newlib \ - --without-headers \ - --with-local-prefix=/tools \ - --with-native-system-header-dir=/tools/include \ - --disable-nls \ - --disable-shared \ - --disable-multilib \ - --disable-decimal-float \ - --disable-threads \ - --disable-libmudflap \ - --disable-libssp \ - --disable-libgomp \ - --disable-libquadmath \ - --enable-languages=c \ +<screen><userinput remap="configure">../gcc-&gcc-version;/configure \ + --target=$LFS_TGT \ + --prefix=/tools \ + --with-sysroot=$LFS \ + --with-newlib \ + --without-headers \ + --with-local-prefix=/tools \ + --with-native-system-header-dir=/tools/include \ + --disable-nls \ + --disable-shared \ + --disable-multilib \ + --disable-decimal-float \ + --disable-threads \ + --disable-libatomic \ + --disable-libgomp \ + --disable-libitm \ + --disable-libmudflap \ + --disable-libquadmath \ + --disable-libsanitizer \ + --disable-libssp \ + --disable-libstdc++-v3 \ + --enable-languages=c,c++ \ --with-mpfr-include=$(pwd)/../gcc-&gcc-version;/mpfr/src \ --with-mpfr-lib=$(pwd)/mpfr/src/.libs</userinput></screen> @@ -193,10 +192,14 @@ cd ../gcc-build</userinput></screen> </varlistentry> <varlistentry> - <term><parameter>--disable-decimal-float, --disable-threads, --disable-libmudflap, --disable-libssp, --disable-libgomp, --disable-libquadmath</parameter></term> + <term><parameter>--disable-decimal-float, --disable-threads, + --disable-libatomic, --disable-libgomp, --disable-libitm, + --disable-libmudflap, --disable-libquadmath, --disable-libsanitizer, + --disable-libssp, --disable-libstdc++-v3</parameter></term> <listitem> <para>These switches disable support for the decimal floating point - extension, threading, libmudflap, libssp and libgomp and libquadmath + extension, threading, libatomic, libgomp, libitm, libmudflap, + libquadmath, libsanitizer, libssp and the C++ standard library respectively. These features will fail to compile when building a cross-compiler and are not necessary for the task of cross-compiling the temporary libc.</para> @@ -212,10 +215,10 @@ cd ../gcc-build</userinput></screen> </varlistentry> <varlistentry> - <term><parameter>--enable-languages=c</parameter></term> + <term><parameter>--enable-languages=c,c++</parameter></term> <listitem> - <para>This option ensures that only the C compiler is built. - This is the only language needed now.</para> + <para>This option ensures that only the C and C++ compilers are built. + These are the only languages needed now.</para> </listitem> </varlistentry> diff --git a/chapter05/gcc-pass2.xml b/chapter05/gcc-pass2.xml index 6e7631741..a370daf71 100644 --- a/chapter05/gcc-pass2.xml +++ b/chapter05/gcc-pass2.xml @@ -97,11 +97,6 @@ mv -v gmp-&gmp-version; gmp tar -zxf ../mpc-&mpc-version;.tar.gz mv -v mpc-&mpc-version; mpc</userinput></screen> - <para>Again, do not build the .info files. They are not needed here and - are broken with the current version of <command>makeinfo</command>.</para> - - <screen><userinput remap="pre">sed -i 's/BUILD_INFO=info/BUILD_INFO=/' gcc/configure</userinput></screen> - <para>Create a separate build directory again:</para> <screen><userinput remap="pre">mkdir -v ../gcc-build @@ -112,22 +107,24 @@ cd ../gcc-build</userinput></screen> <para>Now prepare GCC for compilation:</para> -<screen><userinput remap="configure">CC=$LFS_TGT-gcc \ -AR=$LFS_TGT-ar \ -RANLIB=$LFS_TGT-ranlib \ -../gcc-&gcc-version;/configure \ - --prefix=/tools \ - --with-local-prefix=/tools \ - --with-native-system-header-dir=/tools/include \ - --enable-clocale=gnu \ - --enable-shared \ - --enable-threads=posix \ - --enable-__cxa_atexit \ - --enable-languages=c,c++ \ - --disable-libstdcxx-pch \ - --disable-multilib \ - --disable-bootstrap \ - --disable-libgomp \ +<screen><userinput remap="configure"> +CC=$LFS_TGT-gcc \ +CXX=$LFS_TGT-g++ \ +AR=$LFS_TGT-ar \ +RANLIB=$LFS_TGT-ranlib \ +../gcc-&gcc-version;/configure \ + --prefix=/tools \ + --with-local-prefix=/tools \ + --with-native-system-header-dir=/tools/include \ + --enable-clocale=gnu \ + --enable-shared \ + --enable-threads=posix \ + --enable-__cxa_atexit \ + --enable-languages=c,c++ \ + --disable-libstdcxx-pch \ + --disable-multilib \ + --disable-bootstrap \ + --disable-libgomp \ --with-mpfr-include=$(pwd)/../gcc-&gcc-version;/mpfr/src \ --with-mpfr-lib=$(pwd)/mpfr/src/.libs</userinput></screen> diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml index 642532c87..b774e2d03 100644 --- a/chapter05/glibc.xml +++ b/chapter05/glibc.xml @@ -76,14 +76,14 @@ esac</userinput></screen> <para>Next, prepare Glibc for compilation:</para> <screen><userinput remap="configure">../glibc-&glibc-version;/configure \ - --prefix=/tools \ - --host=$LFS_TGT \ + --prefix=/tools \ + --host=$LFS_TGT \ --build=$(../glibc-&glibc-version;/scripts/config.guess) \ - --disable-profile \ - --enable-kernel=2.6.25 \ - --with-headers=/tools/include \ - libc_cv_forced_unwind=yes \ - libc_cv_ctors_header=yes \ + --disable-profile \ + --enable-kernel=2.6.25 \ + --with-headers=/tools/include \ + libc_cv_forced_unwind=yes \ + libc_cv_ctors_header=yes \ libc_cv_c_cleanup=yes</userinput></screen> <variablelist> diff --git a/chapter05/libstdc++.xml b/chapter05/libstdc++.xml new file mode 100644 index 000000000..02c4a05db --- /dev/null +++ b/chapter05/libstdc++.xml @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-libstdcpp" role="wrap"> + <?dbhtml filename="gcc-libstdc++.html"?> + + <sect1info condition="script"> + <productname>libstdc++</productname> + <productnumber>&gcc-version;</productnumber> + <address>&gcc-url;</address> + </sect1info> + + <title>Libstdc++-&gcc-version;</title> + + <indexterm zone="ch-tools-libstdcpp"> + <primary sortas="a-GCC">GCC</primary> + <secondary>tools, libstdc++</secondary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>Libstdc++ is the standard C++ library. It is needed for the correct + operation of the g++ compiler.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&libstdcpp-ch5-sbu;</seg> + <seg>&libstdcpp-ch5-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Target Libstdc++</title> + + <note> + <para><application>Libstdc++</application> is part of the GCC sources. + You should first unpack the GCC tarball and change to the + <filename>gcc-&gcc-version;</filename> directory.</para> + </note> + + <para>Create a directory for Libstdc++ and enter it:</para> + +<screen><userinput remap="pre">mkdir -pv ../gcc-build +cd ../gcc-build</userinput></screen> + + <para>Prepare Libstdc++ for compilation:</para> + +<screen><userinput remap="configure">../gcc-&gcc-version;/libstdc++-v3/configure \ + --host=$LFS_TGT \ + --prefix=/tools \ + --disable-multilib \ + --disable-shared \ + --disable-nls \ + --disable-libstdcxx-threads \ + --disable-libstdcxx-pch \ + --with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</userinput></screen> + + <variablelist> + <title>The meaning of the configure options:</title> + + <varlistentry> + <term><parameter>--host=...</parameter></term> + <listitem> + <para>Indicates to use the cross compiler we have just built + instead of the one in <filename>/usr/bin</filename>.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--disable-libstdcxx-threads</parameter></term> + <listitem> + <para>Since we have not built the thread C library, the C++ + one cannot be built as well.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--disable-libstdcxx-pch</parameter></term> + <listitem> + <para>This switch prevents the installation of precompiled + include files, which are not needed at this stage.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--with-gxx-include-dir=/tools/include/c++/&gcc-version;</parameter></term> + <listitem> + <para>This is the location where the standard include files are + searched by the C++ compiler. In a normal build, this information + is automatically passed to the Libstdc++ <command>configure</command> + options from the toplevel directory. In our case, this information + must be explicitely given.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Compile libstdc++ by running:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the library:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + </sect2> + + <sect2 role="content"> + <title/> + + <para>Details on this package are located in + <xref linkend="contents-gcc" role="."/></para> + + </sect2> + +</sect1> |