source: chapter05/libstdc++.xml@ dd30a4b

7.9-systemd 7.9-systemd-rc1 7.9-systemd-rc2 systemd
Last change on this file since dd30a4b was dd30a4b, checked in by DJ Lucas <dj@…>, 6 years ago

Merge from trunk r10991.

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

  • Property mode set to 100644
File size: 3.8 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>libstdc++</productname>
13 <productnumber>&gcc-version;</productnumber>
14 <address>&gcc-url;</address>
15 </sect1info>
16
17 <title>Libstdc++-&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 for the correct
28 operation of the g++ compiler.</para>
29
30 <segmentedlist>
31 <segtitle>&buildtime;</segtitle>
32 <segtitle>&diskspace;</segtitle>
33
34 <seglistitem>
35 <seg>&libstdcpp-ch5-sbu;</seg>
36 <seg>&libstdcpp-ch5-du;</seg>
37 </seglistitem>
38 </segmentedlist>
39
40 </sect2>
41
42 <sect2 role="installation">
43 <title>Installation of Target Libstdc++</title>
44
45 <note>
46 <para><application>Libstdc++</application> is part of the GCC sources.
47 You should first unpack the GCC tarball and change to the
48 <filename>gcc-&gcc-version;</filename> directory.</para>
49 </note>
50
51 <para>Create a separate build directory for Libstdc++ and enter it:</para>
52
53<screen><userinput remap="pre">mkdir -v build
54cd build</userinput></screen>
55
56 <para>Prepare Libstdc++ for compilation:</para>
57
58<screen><userinput remap="configure">../libstdc++-v3/configure \
59 --host=$LFS_TGT \
60 --prefix=/tools \
61 --disable-multilib \
62 --disable-nls \
63 --disable-libstdcxx-threads \
64 --disable-libstdcxx-pch \
65 --with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</userinput></screen>
66
67 <variablelist>
68 <title>The meaning of the configure options:</title>
69
70 <varlistentry>
71 <term><parameter>--host=...</parameter></term>
72 <listitem>
73 <para>Indicates to use the cross compiler we have just built
74 instead of the one in <filename>/usr/bin</filename>.</para>
75 </listitem>
76 </varlistentry>
77
78 <varlistentry>
79 <term><parameter>--disable-libstdcxx-threads</parameter></term>
80 <listitem>
81 <para>Since we have not yet built the C threads library, the C++
82 one cannot be built either.</para>
83 </listitem>
84 </varlistentry>
85
86 <varlistentry>
87 <term><parameter>--disable-libstdcxx-pch</parameter></term>
88 <listitem>
89 <para>This switch prevents the installation of precompiled
90 include files, which are not needed at this stage.</para>
91 </listitem>
92 </varlistentry>
93
94 <varlistentry>
95 <term><parameter>--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</parameter></term>
96 <listitem>
97 <para>This is the location where the standard include files are
98 searched by the C++ compiler. In a normal build, this information
99 is automatically passed to the Libstdc++ <command>configure</command>
100 options from the top level directory. In our case, this information
101 must be explicitly given.</para>
102 </listitem>
103 </varlistentry>
104
105 </variablelist>
106
107 <para>Compile libstdc++ by running:</para>
108
109<screen><userinput remap="make">make</userinput></screen>
110
111 <para>Install the library:</para>
112
113<screen><userinput remap="install">make install</userinput></screen>
114
115 </sect2>
116
117 <sect2 role="content">
118 <title/>
119
120 <para>Details on this package are located in
121 <xref linkend="contents-gcc" role="."/></para>
122
123 </sect2>
124
125</sect1>
Note: See TracBrowser for help on using the repository browser.