source: chapter05/libstdc++.xml@ 3dc9543

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 7.5 7.6 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 3dc9543 was 3dc9543, checked in by Bruce Dubbs <bdubbs@…>, 10 years ago

Change kmod instructions to allow installation of man pages.
Numerous whitespace fixes.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10480 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 directory for Libstdc++ and enter it:</para>
52
53<screen><userinput remap="pre">mkdir -pv ../gcc-build
54cd ../gcc-build</userinput></screen>
55
56 <para>Prepare Libstdc++ for compilation:</para>
57
58<screen><userinput remap="configure">../gcc-&gcc-version;/libstdc++-v3/configure \
59 --host=$LFS_TGT \
60 --prefix=/tools \
61 --disable-multilib \
62 --disable-shared \
63 --disable-nls \
64 --disable-libstdcxx-threads \
65 --disable-libstdcxx-pch \
66 --with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</userinput></screen>
67
68 <variablelist>
69 <title>The meaning of the configure options:</title>
70
71 <varlistentry>
72 <term><parameter>--host=...</parameter></term>
73 <listitem>
74 <para>Indicates to use the cross compiler we have just built
75 instead of the one in <filename>/usr/bin</filename>.</para>
76 </listitem>
77 </varlistentry>
78
79 <varlistentry>
80 <term><parameter>--disable-libstdcxx-threads</parameter></term>
81 <listitem>
82 <para>Since we have not built the thread C library, the C++
83 one cannot be built as well.</para>
84 </listitem>
85 </varlistentry>
86
87 <varlistentry>
88 <term><parameter>--disable-libstdcxx-pch</parameter></term>
89 <listitem>
90 <para>This switch prevents the installation of precompiled
91 include files, which are not needed at this stage.</para>
92 </listitem>
93 </varlistentry>
94
95 <varlistentry>
96 <term><parameter>--with-gxx-include-dir=/tools/include/c++/&gcc-version;</parameter></term>
97 <listitem>
98 <para>This is the location where the standard include files are
99 searched by the C++ compiler. In a normal build, this information
100 is automatically passed to the Libstdc++ <command>configure</command>
101 options from the toplevel directory. In our case, this information
102 must be explicitly given.</para>
103 </listitem>
104 </varlistentry>
105
106 </variablelist>
107
108 <para>Compile libstdc++ by running:</para>
109
110<screen><userinput remap="make">make</userinput></screen>
111
112 <para>Install the library:</para>
113
114<screen><userinput remap="install">make install</userinput></screen>
115
116 </sect2>
117
118 <sect2 role="content">
119 <title/>
120
121 <para>Details on this package are located in
122 <xref linkend="contents-gcc" role="."/></para>
123
124 </sect2>
125
126</sect1>
Note: See TracBrowser for help on using the repository browser.