source: chapter05/libstdc++.xml@ 105937c3

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 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 105937c3 was 105937c3, checked in by Pierre Labastie <pieere@…>, 7 years ago

The <productname> tag should contain the name of the package, not the name of what is installed (it is planned to use this information in jhalfs)

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11277 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 3.8 KB
RevLine 
[89afa22]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">
[105937c3]12 <productname>gcc</productname>
[89afa22]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
[f1dd547]51 <para>Create a separate build directory for Libstdc++ and enter it:</para>
[89afa22]52
[f1dd547]53<screen><userinput remap="pre">mkdir -v build
54cd build</userinput></screen>
[89afa22]55
56 <para>Prepare Libstdc++ for compilation:</para>
57
[f1dd547]58<screen><userinput remap="configure">../libstdc++-v3/configure \
[3dc9543]59 --host=$LFS_TGT \
60 --prefix=/tools \
61 --disable-multilib \
62 --disable-nls \
63 --disable-libstdcxx-threads \
64 --disable-libstdcxx-pch \
[89afa22]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>
[3375f61]81 <para>Since we have not yet built the C threads library, the C++
82 one cannot be built either.</para>
[89afa22]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>
[c5be634]95 <term><parameter>--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</parameter></term>
[89afa22]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>
[edbeeb5]100 options from the top level directory. In our case, this information
[4783efe]101 must be explicitly given.</para>
[89afa22]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.