OSDN Git Service

2009-10-14 Benjamin Kosnik <bkoz@redhat.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / doc / html / manual / setup.html
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 2. Setup</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content="&#10;      ISO C++&#10;    , &#10;      library&#10;    " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="intro.html" title="Part I.  Introduction" /><link rel="prev" href="bugs.html" title="Bugs" /><link rel="next" href="configure.html" title="Configure" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 2. Setup</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bugs.html">Prev</a> </td><th width="60%" align="center">Part I. 
4   Introduction
5   
6 </th><td width="20%" align="right"> <a accesskey="n" href="configure.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.setup"></a>Chapter 2. Setup</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="configure.html">Configure</a></span></dt><dt><span class="sect1"><a href="make.html">Make</a></span></dt></dl></div><p>To transform libstdc++ sources into installed include files
7    and properly built binaries useful for linking to other software is
8    a multi-step process. Steps include getting the sources,
9    configuring and building the sources, testing, and installation.
10    </p><p>The general outline of commands is something like:
11    </p><pre class="programlisting">
12    <span class="emphasis"><em>get gcc sources</em></span>
13    <span class="emphasis"><em>extract into gccsrcdir</em></span>
14    mkdir <span class="emphasis"><em>gccbuilddir</em></span>
15    cd <span class="emphasis"><em>gccbuilddir</em></span>
16    <span class="emphasis"><em>gccsrcdir</em></span>/configure --prefix=<span class="emphasis"><em>destdir</em></span> --other-opts...
17    make
18    make check
19    make install
20    </pre><p>
21      Each step is described in more detail in the following sections.
22    </p><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.prereq"></a>Prerequisites</h2></div></div></div><p>
23   Because libstdc++ is part of GCC, the primary source for
24    installation instructions is
25    <a class="ulink" href="http://gcc.gnu.org/install/" target="_top">the GCC install page</a>.
26    In particular, list of prerequisite software needed to build the library 
27    <a class="ulink" href="http://gcc.gnu.org/install/prerequisites.html" target="_top">
28    starts with those requirements.</a> The same pages also list
29    the tools you will need if you wish to modify the source.
30 </p><p>
31    Additional data is given here only where it applies to libstdc++.
32   </p><p>As of GCC 4.0.1 the minimum version of binutils required to build
33       libstdc++ is <code class="code">2.15.90.0.1.1</code>. You can get snapshots
34       (as well as releases) of binutils from
35       <a class="ulink" href="ftp://sources.redhat.com/pub/binutils" target="_top">
36       ftp://sources.redhat.com/pub/binutils</a>.
37       Older releases of libstdc++ do not require such a recent version,
38       but to take full advantage of useful space-saving features and
39       bug-fixes you should use a recent binutils whenever possible.
40       The configure process will automatically detect and use these
41       features if the underlying support is present.
42    </p><p>
43    Finally, a few system-specific requirements: 
44    </p><div class="variablelist"><dl><dt><span class="term">linux</span></dt><dd><p>
45           If gcc 3.1.0 or later on is being used on linux, an attempt
46           will be made to use "C" library functionality necessary for
47           C++ named locale support.  For gcc 3.2.1 and later, this
48           means that glibc 2.2.5 or later is required and the "C"
49           library de_DE locale information must be installed.
50         </p><p>
51           Note however that the sanity checks involving the de_DE
52           locale are skipped when an explicit --enable-clocale=gnu
53           configure option is used: only the basic checks are carried
54           out, defending against misconfigurations.
55         </p><p>
56           If the 'gnu' locale model is being used, the following
57           locales are used and tested in the libstdc++ testsuites.
58           The first column is the name of the locale, the second is
59           the character set it is expected to use.
60         </p><pre class="programlisting">
61 de_DE               ISO-8859-1
62 de_DE@euro          ISO-8859-15
63 en_HK               ISO-8859-1
64 en_PH               ISO-8859-1
65 en_US               ISO-8859-1
66 en_US.ISO-8859-1    ISO-8859-1
67 en_US.ISO-8859-15   ISO-8859-15
68 en_US.UTF-8         UTF-8
69 es_ES               ISO-8859-1
70 es_MX               ISO-8859-1
71 fr_FR               ISO-8859-1
72 fr_FR@euro          ISO-8859-15
73 is_IS               UTF-8
74 it_IT               ISO-8859-1
75 ja_JP.eucjp         EUC-JP
76 se_NO.UTF-8         UTF-8
77 ta_IN               UTF-8
78 zh_TW               BIG5
79 </pre><p>Failure to have the underlying "C" library locale
80       information installed will mean that C++ named locales for the
81       above regions will not work: because of this, the libstdc++
82       testsuite will skip the named locale tests. If this isn't an
83       issue, don't worry about it. If named locales are needed, the
84       underlying locale information must be installed. Note that
85       rebuilding libstdc++ after the "C" locales are installed is not
86       necessary.
87       </p><p>
88         To install support for locales, do only one of the following:
89       </p><div class="itemizedlist"><ul type="disc"><li><p>install all locales</p><div class="itemizedlist"><ul type="circle"><li><p>with RedHat Linux:
90               </p><p> <code class="code"> export LC_ALL=C </code> 
91               </p><p> <code class="code"> rpm -e glibc-common --nodeps </code> 
92               </p><p> 
93                 <code class="code"> rpm -i --define "_install_langs all"
94                  glibc-common-2.2.5-34.i386.rpm 
95                 </code> 
96               </p></li><li><p>
97                Instructions for other operating systems solicited.
98              </p></li></ul></div></li><li><p>install just the necessary locales</p><div class="itemizedlist"><ul type="circle"><li><p>with Debian Linux:</p><p> Add the above list, as shown, to the file
99               <code class="code">/etc/locale.gen</code> </p><p> run <code class="code">/usr/sbin/locale-gen</code> </p></li><li><p>on most Unix-like operating systems:</p><p><code class="code"> localedef -i de_DE -f ISO-8859-1 de_DE </code></p><p>(repeat for each entry in the above list) </p></li><li><p>
100                Instructions for other operating systems solicited.
101             </p></li></ul></div></li></ul></div></dd></dl></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bugs.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="intro.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="configure.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Bugs </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Configure</td></tr></table></div></body></html>