source: chapter05/libstdc++.xml@ 0efb8e1

multilib-10.1
Last change on this file since 0efb8e1 was 0efb8e1, checked in by Thomas Trepl <thomas@…>, 4 years ago

MultiLib: Merge changes from trunk

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@11783 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 4.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-tools-libstdcpp" role="wrap">
9 <?dbhtml filename="gcc-libstdc++.html"?>
10
11 <sect1info condition="script">
12 <productname>gcc-libstdc++</productname>
13 <productnumber>&gcc-version;</productnumber>
14 <address>&gcc-url;</address>
15 </sect1info>
16
17 <title>Libstdc++ from GCC-&gcc-version;</title>
18
19 <indexterm zone="ch-tools-libstdcpp">
20 <primary sortas="a-GCC">GCC</primary>
21 <secondary>tools, libstdc++</secondary>
22 </indexterm>
23
24 <sect2 role="package">
25 <title/>
26
27 <para>Libstdc++ is the standard C++ library. It is needed
28 to compile C++ code
29 (part of GCC is written in C++), but we had to defer its installation
30 when we built <xref linkend="ch-tools-gcc-pass1"/>
31 because it depends on glibc, which was not yet available in /tools.
32 </para>
33
34 <segmentedlist>
35 <segtitle>&buildtime;</segtitle>
36 <segtitle>&diskspace;</segtitle>
37
38 <seglistitem>
39 <seg>&libstdcpp-ch5-sbu;</seg>
40 <seg>&libstdcpp-ch5-du;</seg>
41 </seglistitem>
42 </segmentedlist>
43
44 </sect2>
45
46 <sect2 role="installation">
47 <title>Installation of Target Libstdc++</title>
48
49 <note>
50 <para><application>Libstdc++</application> is part of the GCC sources.
51 You should first unpack the GCC tarball and change to the
52 <filename>gcc-&gcc-version;</filename> directory.</para>
53 </note>
54
55 <para>Create a separate build directory for Libstdc++ and enter it:</para>
56
57<screen><userinput remap="pre">mkdir -v build
58cd build</userinput></screen>
59
60 <para>Prepare Libstdc++ for compilation:</para>
61
62<screen><userinput remap="configure">../libstdc++-v3/configure \
63 --host=$LFS_TGT \
64 --prefix=/tools \
65 --disable-multilib \
66 --disable-nls \<!--
67 - -disable-libstdcxx-threads \-->
68 --disable-libstdcxx-pch \
69 --with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</userinput></screen>
70
71 <variablelist>
72 <title>The meaning of the configure options:</title>
73
74 <varlistentry>
75 <term><parameter>--host=...</parameter></term>
76 <listitem>
77 <para>Indicates to use the cross compiler we have just built
78 instead of the one in <filename>/usr/bin</filename>.</para>
79 </listitem>
80 </varlistentry>
81 <!--
82 <varlistentry>
83 <term><parameter>- -disable-libstdcxx-threads</parameter></term>
84 <listitem>
85 <para>Since gcc-pass1 is built without thread support, the C++
86 thread library cannot be built either.</para>
87 </listitem>
88 </varlistentry>
89 -->
90 <varlistentry>
91 <term><parameter>--disable-libstdcxx-pch</parameter></term>
92 <listitem>
93 <para>This switch prevents the installation of precompiled
94 include files, which are not needed at this stage.</para>
95 </listitem>
96 </varlistentry>
97
98 <varlistentry>
99 <term><parameter>--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</parameter></term>
100 <listitem>
101 <para>This is the location where the standard include files are
102 searched by the C++ compiler. In a normal build, this information
103 is automatically passed to the Libstdc++ <command>configure</command>
104 options from the top level directory. In our case, this information
105 must be explicitly given.</para>
106 </listitem>
107 </varlistentry>
108
109 </variablelist>
110
111 <para>Compile libstdc++ by running:</para>
112
113<screen><userinput remap="make">make</userinput></screen>
114
115 <para>Install the library:</para>
116
117<screen><userinput remap="install">make install</userinput></screen>
118
119 </sect2>
120
121 <sect2 role="content">
122 <title/>
123
124 <para>Details on this package are located in
125 <xref linkend="contents-gcc" role="."/></para>
126
127 </sect2>
128
129</sect1>
Note: See TracBrowser for help on using the repository browser.