source: chapter07/libstdc++.xml@ fcc02767

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 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 fcc02767 was fcc02767, checked in by Bruce Dubbs <bdubbs@…>, 4 years ago

Initial commit of alternative cross LFS

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11897 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-pass1" role="wrap">
9 <?dbhtml filename="gcc-libstdc++-pass1.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;, Pass 1</title>
18
19 <indexterm zone="ch-tools-libstdcpp-pass1">
20 <primary sortas="a-GCC">GCC</primary>
21 <secondary>tools, libstdc++ pass 1</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 the target
32 directory.
33 </para>
34
35 <segmentedlist>
36 <segtitle>&buildtime;</segtitle>
37 <segtitle>&diskspace;</segtitle>
38
39 <seglistitem>
40 <seg>&libstdcpp-ch5-sbu;</seg>
41 <seg>&libstdcpp-ch5-du;</seg>
42 </seglistitem>
43 </segmentedlist>
44
45 </sect2>
46
47 <sect2 role="installation">
48 <title>Installation of Target Libstdc++</title>
49
50 <note>
51 <para><application>Libstdc++</application> is part of the GCC sources.
52 You should first unpack the GCC tarball and change to the
53 <filename>gcc-&gcc-version;</filename> directory.</para>
54 </note>
55
56 <para>Create a separate build directory for Libstdc++ and enter it:</para>
57
58<screen><userinput remap="pre">mkdir -v build
59cd build</userinput></screen>
60
61 <para>Prepare Libstdc++ for compilation:</para>
62
63<screen><userinput remap="configure">../libstdc++-v3/configure \
64 --host=$LFS_TGT \
65 --build=$(../config.guess) \
66 --prefix=/usr \
67 --disable-multilib \
68 --disable-nls \
69 --disable-libstdcxx-pch \
70 --with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</userinput></screen>
71
72 <variablelist>
73 <title>The meaning of the configure options:</title>
74
75 <varlistentry>
76 <term><parameter>--host=...</parameter></term>
77 <listitem>
78 <para>Indicates to use the cross compiler we have just built
79 instead of the one in <filename>/usr/bin</filename>.</para>
80 </listitem>
81 </varlistentry>
82
83 <varlistentry>
84 <term><parameter>--disable-libstdcxx-pch</parameter></term>
85 <listitem>
86 <para>This switch prevents the installation of precompiled
87 include files, which are not needed at this stage.</para>
88 </listitem>
89 </varlistentry>
90
91 <varlistentry>
92 <term><parameter>--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</parameter></term>
93 <listitem>
94 <para>This is the location where the standard include files are
95 searched by the C++ compiler. In a normal build, this information
96 is automatically passed to the Libstdc++ <command>configure</command>
97 options from the top level directory. In our case, this information
98 must be explicitly given.</para>
99 </listitem>
100 </varlistentry>
101
102 </variablelist>
103
104 <para>Compile libstdc++ by running:</para>
105
106<screen><userinput remap="make">make</userinput></screen>
107
108 <para>Install the library:</para>
109
110<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
111
112 </sect2>
113
114 <sect2 role="content">
115 <title/>
116
117 <para>Details on this package are located in
118 <xref linkend="contents-gcc" role="."/></para>
119
120 </sect2>
121
122</sect1>
Note: See TracBrowser for help on using the repository browser.