]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libstdc++-v3/contrib/libstdc++-v3-4.3.3/doc/xml/manual/build.xml
update
[l4.git] / l4 / pkg / libstdc++-v3 / contrib / libstdc++-v3-4.3.3 / doc / xml / manual / build.xml
1 <sect1 id="manual.intro.setup.build" xreflabel="Building">
2 <?dbhtml filename="build.html"?>
3  
4 <sect1info>
5   <keywordset>
6     <keyword>
7       ISO C++
8     </keyword>
9     <keyword>
10       build
11     </keyword>
12   </keywordset>
13 </sect1info>
14
15 <title>Build</title>
16
17 <para>
18   Because libstdc++ is part of GCC, the primary source for
19    installation instructions is
20    <ulink url="http://gcc.gnu.org/install/">the GCC install page</ulink>.
21    Additional data is given here only where it applies to libstdc++.
22 </para>
23
24 <sect2 id="build.prereq" xreflabel="build.prereq">
25 <title>Prerequisites</title>
26   <para>
27     The list of software needed to build the library is kept with the
28     rest of the compiler, at
29       <ulink url="http://gcc.gnu.org/install/prerequisites.html">
30       http://gcc.gnu.org/install/prerequisites.html</ulink>.  The same page
31       also lists the tools you will need if you wish to modify the source.
32   </para>
33
34    <para>As of GCC 4.0.1 the minimum version of binutils required to build
35       libstdc++ is <code>2.15.90.0.1.1</code>. You can get snapshots
36       (as well as releases) of binutils from
37       <ulink url="ftp://sources.redhat.com/pub/binutils">
38       ftp://sources.redhat.com/pub/binutils</ulink>.
39       Older releases of libstdc++ do not require such a recent version,
40       but to take full advantage of useful space-saving features and
41       bug-fixes you should use a recent binutils if possible.
42       The configure process will automatically detect and use these
43       features if the underlying support is present.
44    </para>
45
46    <para>
47    Finally, a few system-specific requirements: 
48    </para>
49
50    <variablelist>
51       <varlistentry>
52         <term>linux</term>
53         
54         <listitem>
55         <para>
56           If gcc 3.1.0 or later on is being used on linux, an attempt
57           will be made to use "C" library functionality necessary for
58           C++ named locale support.  For gcc 3.2.1 and later, this
59           means that glibc 2.2.5 or later is required and the "C"
60           library de_DE locale information must be installed.
61         </para>
62
63         <para>
64           Note however that the sanity checks involving the de_DE
65           locale are skipped when an explicit --enable-clocale=gnu
66           configure option is used: only the basic checks are carried
67           out, defending against misconfigurations.
68         </para>
69
70         <para>
71           If the 'gnu' locale model is being used, the following
72           locales are used and tested in the libstdc++ testsuites.
73           The first column is the name of the locale, the second is
74           the character set it is expected to use.
75         </para>
76 <programlisting>
77 de_DE               ISO-8859-1
78 de_DE@euro          ISO-8859-15
79 en_HK               ISO-8859-1
80 en_PH               ISO-8859-1
81 en_US               ISO-8859-1
82 en_US.ISO-8859-1    ISO-8859-1
83 en_US.ISO-8859-15   ISO-8859-15
84 en_US.UTF-8         UTF-8
85 es_ES               ISO-8859-1
86 es_MX               ISO-8859-1
87 fr_FR               ISO-8859-1
88 fr_FR@euro          ISO-8859-15
89 is_IS               UTF-8
90 it_IT               ISO-8859-1
91 ja_JP.eucjp         EUC-JP
92 se_NO.UTF-8         UTF-8
93 ta_IN               UTF-8
94 zh_TW               BIG5
95 </programlisting>
96       <para>Failure to have the underlying "C" library locale
97       information installed will mean that C++ named locales for the
98       above regions will not work: because of this, the libstdc++
99       testsuite will skip the named locale tests. If this isn't an
100       issue, don't worry about it. If named locales are needed, the
101       underlying locale information must be installed. Note that
102       rebuilding libstdc++ after the "C" locales are installed is not
103       necessary.
104       </para>
105
106       <para>
107         To install support for locales, do only one of the following:
108       </para>
109
110       <itemizedlist>
111         <listitem> 
112           <para>install all locales</para>
113           <itemizedlist>
114             <listitem>
115               <para>with RedHat Linux:
116               </para>
117               <para> <code> export LC_ALL=C </code> 
118               </para>
119               <para> <code> rpm -e glibc-common --nodeps </code> 
120               </para>
121               <para> 
122                 <code> rpm -i --define "_install_langs all"
123                  glibc-common-2.2.5-34.i386.rpm 
124                 </code> 
125               </para>
126             </listitem>
127              <listitem> 
128              <para>
129                Instructions for other operating systems solicited.
130              </para>
131              </listitem>
132           </itemizedlist>
133         </listitem>
134         <listitem> 
135           <para>install just the necessary locales</para>
136           <itemizedlist>
137             <listitem>
138               <para>with Debian Linux:</para>
139               <para> Add the above list, as shown, to the file
140               <code>/etc/locale.gen</code> </para>
141               <para> run <code>/usr/sbin/locale-gen</code> </para>
142             </listitem>
143             <listitem> 
144               <para>on most Unix-like operating systems:</para>
145               <para><code> localedef -i de_DE -f ISO-8859-1 de_DE </code></para>
146               <para>(repeat for each entry in the above list) </para>
147             </listitem>
148             <listitem> 
149             <para>
150                Instructions for other operating systems solicited.
151             </para>
152             </listitem>
153           </itemizedlist>
154         </listitem>
155       </itemizedlist>
156       </listitem>
157       </varlistentry>
158    </variablelist>
159
160 </sect2>
161
162 <sect2 id="build.configure" xreflabel="build.make">
163 <title>Make</title>
164    <para>If you have never done this before, you should read the basic
165       <ulink url="http://gcc.gnu.org/install/">GCC Installation
166       Instructions</ulink> first.  Read <emphasis>all of them</emphasis>.
167       <emphasis>Twice.</emphasis>
168    </para>
169    <para>When building libstdc++ you'll have to configure
170       the entire <emphasis>gccsrcdir</emphasis> directory.  The full list of libstdc++
171       specific configuration options, not dependent on the specific compiler
172       release being used, can be found <ulink url="configopts.html">here</ulink>.
173    </para>
174    <para>Consider possibly using --enable-languages=c++ to save time by only
175       building the C++ language parts.
176    </para>
177
178    <programlisting>
179    cd <emphasis>gccbuilddir</emphasis>
180    <emphasis>gccsrcdir</emphasis>/configure --prefix=<emphasis>destdir</emphasis> --other-opts...</programlisting>
181 </sect2>
182 </sect1>