source: chapter07/libstdc++-pass2.xml@ fcc02767

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 ml-11.0 multilib trunk xry111/git-transition xry111/glibc-2.34 xry111/tester-nohack xry111/usr-move
Last change on this file since fcc02767 was fcc02767, checked in by Bruce Dubbs <bdubbs@…>, 18 months 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.4 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-pass2" role="wrap">
9 <?dbhtml filename="gcc-libstdc++-pass2.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 2</title>
18
19 <indexterm zone="ch-tools-libstdcpp-pass2">
20 <primary sortas="a-GCC">GCC</primary>
21 <secondary>tools, libstdc++ pass 2</secondary>
22 </indexterm>
23
24 <sect2 role="package">
25 <title/>
26
27 <para>Again, when building <xref linkend="ch-tools-gcc-pass2"/>, we had to
28 defer the installation of the C++ standard library, because no suitable
29 compiler was available to compile it: we could not use the compiler
30 installed, because this compiler is a native
31 compiler, and should not be used outside of chroot without being at
32 risk of polluting the build with some host components.</para>
33
34 <segmentedlist>
35 <segtitle>&buildtime;</segtitle>
36 <segtitle>&diskspace;</segtitle>
37
38 <!-- TODO -->
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 link which exists when building Libstdc++ in the gcc
57 tree:</para>
58
59<screen><userinput remap="pre">ln -s gthr-posix.h libgcc/gthr-default.h</userinput></screen>
60
61 <para>Create a separate build directory for Libstdc++ and enter it:</para>
62
63<screen><userinput remap="pre">mkdir -v build
64cd build</userinput></screen>
65
66 <para>Prepare Libstdc++ for compilation:</para>
67
68<screen><userinput remap="configure">../libstdc++-v3/configure \
69 CXXFLAGS="-g -O2 -D_GNU_SOURCE" \
70 --prefix=/usr \
71 --disable-multilib \
72 --disable-nls \
73 --disable-libstdcxx-pch</userinput></screen>
74
75 <variablelist>
76 <title>The meaning of the configure options:</title>
77
78 <varlistentry>
79 <term><parameter>CXXFLAGS="-g -O2 -D_GNU_SOURCE"</parameter></term>
80 <listitem>
81 <para>Those flags are passed by the top level Makefile when doing
82 a full build of GCC.</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 </variablelist>
95
96 <para>Compile libstdc++ by running:</para>
97
98<screen><userinput remap="make">make</userinput></screen>
99
100 <para>Install the library:</para>
101
102<screen><userinput remap="install">make install</userinput></screen>
103
104 </sect2>
105
106 <sect2 role="content">
107 <title/>
108
109 <para>Details on this package are located in
110 <xref linkend="contents-gcc" role="."/></para>
111
112 </sect2>
113
114</sect1>
Note: See TracBrowser for help on using the repository browser.