Add armv7l support.
[platform/upstream/gcc47.git] / INSTALL / prerequisites.html
1 <html lang="en">
2 <head>
3 <title>Prerequisites for GCC</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="Prerequisites for GCC">
6 <meta name="generator" content="makeinfo 4.13">
7 <link title="Top" rel="top" href="#Top">
8 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9 <!--
10 Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
11 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
12 2010 Free Software Foundation, Inc.
13
14    Permission is granted to copy, distribute and/or modify this document
15 under the terms of the GNU Free Documentation License, Version 1.3 or
16 any later version published by the Free Software Foundation; with no
17 Invariant Sections, the Front-Cover texts being (a) (see below), and
18 with the Back-Cover Texts being (b) (see below).  A copy of the
19 license is included in the section entitled "GNU Free Documentation License".
20
21 (a) The FSF's Front-Cover Text is:
22
23      A GNU Manual
24
25 (b) The FSF's Back-Cover Text is:
26
27      You have freedom to copy and modify this GNU Manual, like GNU
28      software.  Copies published by the Free Software Foundation raise
29      funds for GNU development.-->
30 <meta http-equiv="Content-Style-Type" content="text/css">
31 <style type="text/css"><!--
32   pre.display { font-family:inherit }
33   pre.format  { font-family:inherit }
34   pre.smalldisplay { font-family:inherit; font-size:smaller }
35   pre.smallformat  { font-family:inherit; font-size:smaller }
36   pre.smallexample { font-size:smaller }
37   pre.smalllisp    { font-size:smaller }
38   span.sc    { font-variant:small-caps }
39   span.roman { font-family:serif; font-weight:normal; } 
40   span.sansserif { font-family:sans-serif; font-weight:normal; } 
41 --></style>
42 </head>
43 <body>
44 <h1 class="settitle">Prerequisites for GCC</h1>
45 <a name="index-Prerequisites-1"></a>
46 GCC requires that various tools and packages be available for use in the
47 build procedure.  Modifying GCC sources requires additional tools
48 described below.
49
50 <h3 class="heading"><a name="TOC0"></a>Tools/packages necessary for building GCC</h3>
51
52      <dl>
53 <dt>ISO C90 compiler<dd>Necessary to bootstrap GCC, although versions of GCC prior
54 to 3.4 also allow bootstrapping with a traditional (K&amp;R) C compiler.
55
56      <p>To build all languages in a cross-compiler or other configuration where
57 3-stage bootstrap is not performed, you need to start with an existing
58 GCC binary (version 2.95 or later) because source code for language
59 frontends other than C might use GCC extensions.
60
61      <br><dt>GNAT<dd>
62 In order to build the Ada compiler (GNAT) you must already have GNAT
63 installed because portions of the Ada frontend are written in Ada (with
64 GNAT extensions.)  Refer to the Ada installation instructions for more
65 specific information.
66
67      <br><dt>A &ldquo;working&rdquo; POSIX compatible shell, or GNU bash<dd>
68 Necessary when running <samp><span class="command">configure</span></samp> because some
69 <samp><span class="command">/bin/sh</span></samp> shells have bugs and may crash when configuring the
70 target libraries.  In other cases, <samp><span class="command">/bin/sh</span></samp> or <samp><span class="command">ksh</span></samp>
71 have disastrous corner-case performance problems.  This
72 can cause target <samp><span class="command">configure</span></samp> runs to literally take days to
73 complete in some cases.
74
75      <p>So on some platforms <samp><span class="command">/bin/ksh</span></samp> is sufficient, on others it
76 isn't.  See the host/target specific instructions for your platform, or
77 use <samp><span class="command">bash</span></samp> to be sure.  Then set <samp><span class="env">CONFIG_SHELL</span></samp> in your
78 environment to your &ldquo;good&rdquo; shell prior to running
79 <samp><span class="command">configure</span></samp>/<samp><span class="command">make</span></samp>.
80
81      <p><samp><span class="command">zsh</span></samp> is not a fully compliant POSIX shell and will not
82 work when configuring GCC.
83
84      <br><dt>A POSIX or SVR4 awk<dd>
85 Necessary for creating some of the generated source files for GCC. 
86 If in doubt, use a recent GNU awk version, as some of the older ones
87 are broken.  GNU awk version 3.1.5 is known to work.
88
89      <br><dt>GNU binutils<dd>
90 Necessary in some circumstances, optional in others.  See the
91 host/target specific instructions for your platform for the exact
92 requirements.
93
94      <br><dt>gzip version 1.2.4 (or later) or<dt>bzip2 version 1.0.2 (or later)<dd>
95 Necessary to uncompress GCC <samp><span class="command">tar</span></samp> files when source code is
96 obtained via FTP mirror sites.
97
98      <br><dt>GNU make version 3.80 (or later)<dd>
99 You must have GNU make installed to build GCC.
100
101      <br><dt>GNU tar version 1.14 (or later)<dd>
102 Necessary (only on some platforms) to untar the source code.  Many
103 systems' <samp><span class="command">tar</span></samp> programs will also work, only try GNU
104 <samp><span class="command">tar</span></samp> if you have problems.
105
106      <br><dt>Perl version 5.6.1 (or later)<dd>
107 Necessary when targetting Darwin, building &lsquo;<samp><span class="samp">libstdc++</span></samp>&rsquo;,
108 and not using <samp><span class="option">--disable-symvers</span></samp>. 
109 Necessary when targetting Solaris 2 with Sun <samp><span class="command">ld</span></samp> and not using
110 <samp><span class="option">--disable-symvers</span></samp>.  The bundled <samp><span class="command">perl</span></samp> in Solaris&nbsp;8
111 and up works.
112
113      <p>Necessary when regenerating <samp><span class="file">Makefile</span></samp> dependencies in libiberty. 
114 Necessary when regenerating <samp><span class="file">libiberty/functions.texi</span></samp>. 
115 Necessary when generating manpages from Texinfo manuals. 
116 Used by various scripts to generate some files included in SVN (mainly
117 Unicode-related and rarely changing) from source tables.
118
119      <br><dt><samp><span class="command">jar</span></samp>, or InfoZIP (<samp><span class="command">zip</span></samp> and <samp><span class="command">unzip</span></samp>)<dd>
120 Necessary to build libgcj, the GCJ runtime.
121
122 </dl>
123
124    <p>Several support libraries are necessary to build GCC, some are required,
125 others optional.  While any sufficiently new version of required tools
126 usually work, library requirements are generally stricter.  Newer
127 versions may work in some cases, but it's safer to use the exact
128 versions documented.  We appreciate bug reports about problems with
129 newer versions, though.  If your OS vendor provides packages for the
130 support libraries then using those packages may be the simplest way to
131 install the libraries.
132
133      <dl>
134 <dt>GNU Multiple Precision Library (GMP) version 4.3.2 (or later)<dd>
135 Necessary to build GCC.  If a GMP source distribution is found in a
136 subdirectory of your GCC sources named <samp><span class="file">gmp</span></samp>, it will be built
137 together with GCC.  Alternatively, if GMP is already installed but it
138 is not in your library search path, you will have to configure with the
139 <samp><span class="option">--with-gmp</span></samp> configure option.  See also <samp><span class="option">--with-gmp-lib</span></samp>
140 and <samp><span class="option">--with-gmp-include</span></samp>.
141
142      <br><dt>MPFR Library version 2.4.2 (or later)<dd>
143 Necessary to build GCC.  It can be downloaded from
144 <a href="http://www.mpfr.org/">http://www.mpfr.org/</a>.  If an MPFR source distribution is found
145 in a subdirectory of your GCC sources named <samp><span class="file">mpfr</span></samp>, it will be
146 built together with GCC.  Alternatively, if MPFR is already installed
147 but it is not in your default library search path, the
148 <samp><span class="option">--with-mpfr</span></samp> configure option should be used.  See also
149 <samp><span class="option">--with-mpfr-lib</span></samp> and <samp><span class="option">--with-mpfr-include</span></samp>.
150
151      <br><dt>MPC Library version 0.8.1 (or later)<dd>
152 Necessary to build GCC.  It can be downloaded from
153 <a href="http://www.multiprecision.org/">http://www.multiprecision.org/</a>.  If an MPC source distribution
154 is found in a subdirectory of your GCC sources named <samp><span class="file">mpc</span></samp>, it
155 will be built together with GCC.  Alternatively, if MPC is already
156 installed but it is not in your default library search path, the
157 <samp><span class="option">--with-mpc</span></samp> configure option should be used.  See also
158 <samp><span class="option">--with-mpc-lib</span></samp> and <samp><span class="option">--with-mpc-include</span></samp>.
159
160      <br><dt>Parma Polyhedra Library (PPL) version 0.11<dd>
161 Necessary to build GCC with the Graphite loop optimizations. 
162 It can be downloaded from <a href="http://www.cs.unipr.it/ppl/Download/">http://www.cs.unipr.it/ppl/Download/</a>.
163
164      <p>The <samp><span class="option">--with-ppl</span></samp> configure option should be used if PPL is not
165 installed in your default library search path.
166
167      <br><dt>CLooG-PPL version 0.15 or CLooG 0.16<dd>
168 Necessary to build GCC with the Graphite loop optimizations.  There
169 are two versions available.  CLooG-PPL 0.15 as well as CLooG 0.16. 
170 The former is the default right now.  It can be downloaded from
171 <a href="ftp://gcc.gnu.org/pub/gcc/infrastructure/">ftp://gcc.gnu.org/pub/gcc/infrastructure/</a> as
172 <samp><span class="file">cloog-ppl-0.15.tar.gz</span></samp>.
173
174      <p>CLooG 0.16 support is still in testing stage, but will be the
175 default in future GCC releases.  It is also available at
176 <a href="ftp://gcc.gnu.org/pub/gcc/infrastructure/">ftp://gcc.gnu.org/pub/gcc/infrastructure/</a> as
177 <samp><span class="file">cloog-0.16.1.tar.gz</span></samp>.  To use it add the additional configure
178 option <samp><span class="option">--enable-cloog-backend=isl</span></samp>.  Even if CLooG 0.16
179 does not use PPL, PPL is still required for Graphite.
180
181      <p>In both cases <samp><span class="option">--with-cloog</span></samp> configure option should be used
182 if CLooG is not installed in your default library search path.
183
184    </dl>
185
186 <h3 class="heading"><a name="TOC1"></a>Tools/packages necessary for modifying GCC</h3>
187
188      <dl>
189 <dt>autoconf version 2.64<dt>GNU m4 version 1.4.6 (or later)<dd>
190 Necessary when modifying <samp><span class="file">configure.ac</span></samp>, <samp><span class="file">aclocal.m4</span></samp>, etc. 
191 to regenerate <samp><span class="file">configure</span></samp> and <samp><span class="file">config.in</span></samp> files.
192
193      <br><dt>automake version 1.11.1<dd>
194 Necessary when modifying a <samp><span class="file">Makefile.am</span></samp> file to regenerate its
195 associated <samp><span class="file">Makefile.in</span></samp>.
196
197      <p>Much of GCC does not use automake, so directly edit the <samp><span class="file">Makefile.in</span></samp>
198 file.  Specifically this applies to the <samp><span class="file">gcc</span></samp>, <samp><span class="file">intl</span></samp>,
199 <samp><span class="file">libcpp</span></samp>, <samp><span class="file">libiberty</span></samp>, <samp><span class="file">libobjc</span></samp> directories as well
200 as any of their subdirectories.
201
202      <p>For directories that use automake, GCC requires the latest release in
203 the 1.11 series, which is currently 1.11.1.  When regenerating a directory
204 to a newer version, please update all the directories using an older 1.11
205 to the latest released version.
206
207      <br><dt>gettext version 0.14.5 (or later)<dd>
208 Needed to regenerate <samp><span class="file">gcc.pot</span></samp>.
209
210      <br><dt>gperf version 2.7.2 (or later)<dd>
211 Necessary when modifying <samp><span class="command">gperf</span></samp> input files, e.g. 
212 <samp><span class="file">gcc/cp/cfns.gperf</span></samp> to regenerate its associated header file, e.g. 
213 <samp><span class="file">gcc/cp/cfns.h</span></samp>.
214
215      <br><dt>DejaGnu 1.4.4<dt>Expect<dt>Tcl<dd>
216 Necessary to run the GCC testsuite; see the section on testing for details.
217
218      <br><dt>autogen version 5.5.4 (or later) and<dt>guile version 1.4.1 (or later)<dd>
219 Necessary to regenerate <samp><span class="file">fixinc/fixincl.x</span></samp> from
220 <samp><span class="file">fixinc/inclhack.def</span></samp> and <samp><span class="file">fixinc/*.tpl</span></samp>.
221
222      <p>Necessary to run &lsquo;<samp><span class="samp">make check</span></samp>&rsquo; for <samp><span class="file">fixinc</span></samp>.
223
224      <p>Necessary to regenerate the top level <samp><span class="file">Makefile.in</span></samp> file from
225 <samp><span class="file">Makefile.tpl</span></samp> and <samp><span class="file">Makefile.def</span></samp>.
226
227      <br><dt>Flex version 2.5.4 (or later)<dd>
228 Necessary when modifying <samp><span class="file">*.l</span></samp> files.
229
230      <p>Necessary to build GCC during development because the generated output
231 files are not included in the SVN repository.  They are included in
232 releases.
233
234      <br><dt>Texinfo version 4.7 (or later)<dd>
235 Necessary for running <samp><span class="command">makeinfo</span></samp> when modifying <samp><span class="file">*.texi</span></samp>
236 files to test your changes.
237
238      <p>Necessary for running <samp><span class="command">make dvi</span></samp> or <samp><span class="command">make pdf</span></samp> to
239 create printable documentation in DVI or PDF format.  Texinfo version
240 4.8 or later is required for <samp><span class="command">make pdf</span></samp>.
241
242      <p>Necessary to build GCC documentation during development because the
243 generated output files are not included in the SVN repository.  They are
244 included in releases.
245
246      <br><dt>TeX (any working version)<dd>
247 Necessary for running <samp><span class="command">texi2dvi</span></samp> and <samp><span class="command">texi2pdf</span></samp>, which
248 are used when running <samp><span class="command">make dvi</span></samp> or <samp><span class="command">make pdf</span></samp> to create
249 DVI or PDF files, respectively.
250
251      <br><dt>SVN (any version)<dt>SSH (any version)<dd>
252 Necessary to access the SVN repository.  Public releases and weekly
253 snapshots of the development sources are also available via FTP.
254
255      <br><dt>GNU diffutils version 2.7 (or later)<dd>
256 Useful when submitting patches for the GCC source code.
257
258      <br><dt>patch version 2.5.4 (or later)<dd>
259 Necessary when applying patches, created with <samp><span class="command">diff</span></samp>, to one's
260 own sources.
261
262      <br><dt>ecj1<dt>gjavah<dd>
263 If you wish to modify <samp><span class="file">.java</span></samp> files in libjava, you will need to
264 configure with <samp><span class="option">--enable-java-maintainer-mode</span></samp>, and you will need
265 to have executables named <samp><span class="command">ecj1</span></samp> and <samp><span class="command">gjavah</span></samp> in your path. 
266 The <samp><span class="command">ecj1</span></samp> executable should run the Eclipse Java compiler via
267 the GCC-specific entry point.  You can download a suitable jar from
268 <a href="ftp://sourceware.org/pub/java/">ftp://sourceware.org/pub/java/</a>, or by running the script
269 <samp><span class="command">contrib/download_ecj</span></samp>.
270
271      <br><dt>antlr.jar version 2.7.1 (or later)<dt>antlr binary<dd>
272 If you wish to build the <samp><span class="command">gjdoc</span></samp> binary in libjava, you will
273 need to have an <samp><span class="file">antlr.jar</span></samp> library available. The library is
274 searched for in system locations but can be specified with
275 <samp><span class="option">--with-antlr-jar=</span></samp> instead.  When configuring with
276 <samp><span class="option">--enable-java-maintainer-mode</span></samp>, you will need to have one of
277 the executables named <samp><span class="command">cantlr</span></samp>, <samp><span class="command">runantlr</span></samp> or
278 <samp><span class="command">antlr</span></samp> in your path.
279
280 </dl>
281
282    <p><hr />
283 <p><a href="./index.html">Return to the GCC Installation page</a>
284
285 <!-- ***Downloading the source************************************************** -->
286 <!-- ***Configuration*********************************************************** -->
287 <!-- ***Building**************************************************************** -->
288 <!-- ***Testing***************************************************************** -->
289 <!-- ***Final install*********************************************************** -->
290 <!-- ***Binaries**************************************************************** -->
291 <!-- ***Specific**************************************************************** -->
292 <!-- ***Old documentation****************************************************** -->
293 <!-- ***GFDL******************************************************************** -->
294 <!-- *************************************************************************** -->
295 <!-- Part 6 The End of the Document -->
296 </body></html>
297