packaging: support aarch64 build
[platform/upstream/gcc48.git] / INSTALL / prerequisites.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- Copyright (C) 1988-2013 Free Software Foundation, Inc.
4
5 Permission is granted to copy, distribute and/or modify this document
6 under the terms of the GNU Free Documentation License, Version 1.3 or
7 any later version published by the Free Software Foundation; with no
8 Invariant Sections, the Front-Cover texts being (a) (see below), and
9 with the Back-Cover Texts being (b) (see below).  A copy of the
10 license is included in the section entitled "GNU
11 Free Documentation License".
12
13 (a) The FSF's Front-Cover Text is:
14
15 A GNU Manual
16
17 (b) The FSF's Back-Cover Text is:
18
19 You have freedom to copy and modify this GNU Manual, like GNU
20      software.  Copies published by the Free Software Foundation raise
21      funds for GNU development. -->
22 <!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
23 <head>
24 <title>Installing GCC</title>
25
26 <meta name="description" content="Installing GCC">
27 <meta name="keywords" content="Installing GCC">
28 <meta name="resource-type" content="document">
29 <meta name="distribution" content="global">
30 <meta name="Generator" content="makeinfo">
31 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
32 <style type="text/css">
33 <!--
34 a.summary-letter {text-decoration: none}
35 blockquote.smallquotation {font-size: smaller}
36 div.display {margin-left: 3.2em}
37 div.example {margin-left: 3.2em}
38 div.indentedblock {margin-left: 3.2em}
39 div.lisp {margin-left: 3.2em}
40 div.smalldisplay {margin-left: 3.2em}
41 div.smallexample {margin-left: 3.2em}
42 div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
43 div.smalllisp {margin-left: 3.2em}
44 kbd {font-style:oblique}
45 pre.display {font-family: inherit}
46 pre.format {font-family: inherit}
47 pre.menu-comment {font-family: serif}
48 pre.menu-preformatted {font-family: serif}
49 pre.smalldisplay {font-family: inherit; font-size: smaller}
50 pre.smallexample {font-size: smaller}
51 pre.smallformat {font-family: inherit; font-size: smaller}
52 pre.smalllisp {font-size: smaller}
53 span.nocodebreak {white-space:nowrap}
54 span.nolinebreak {white-space:nowrap}
55 span.roman {font-family:serif; font-weight:normal}
56 span.sansserif {font-family:sans-serif; font-weight:normal}
57 ul.no-bullet {list-style: none}
58 -->
59 </style>
60
61
62 </head>
63
64 <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
65 <h1 class="settitle" align="center">Installing GCC</h1>
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83 <a name="index-Prerequisites"></a>
84
85 <p>GCC requires that various tools and packages be available for use in the
86 build procedure.  Modifying GCC sources requires additional tools
87 described below.
88 </p>
89 <a name="Tools_002fpackages-necessary-for-building-GCC"></a>
90 <h3 class="heading">Tools/packages necessary for building GCC</h3>
91 <dl compact="compact">
92 <dt>ISO C++98 compiler</dt>
93 <dd><p>Necessary to bootstrap GCC, although versions of GCC prior
94 to 4.8 also allow bootstrapping with a ISO C89 compiler and versions
95 of GCC prior to 3.4 also allow bootstrapping with a traditional
96 (K&amp;R) C compiler.
97 </p>
98 <p>To build all languages in a cross-compiler or other configuration where
99 3-stage bootstrap is not performed, you need to start with an existing
100 GCC binary (version 3.4 or later) because source code for language
101 frontends other than C might use GCC extensions.
102 </p>
103 <p>Note that to bootstrap GCC with versions of GCC earlier than 3.4, you
104 may need to use <samp>--disable-stage1-checking</samp>, though
105 bootstrapping the compiler with such earlier compilers is strongly
106 discouraged.
107 </p>
108 </dd>
109 <dt>GNAT</dt>
110 <dd>
111 <p>In order to build the Ada compiler (GNAT) you must already have GNAT
112 installed because portions of the Ada frontend are written in Ada (with
113 GNAT extensions.)  Refer to the Ada installation instructions for more
114 specific information.
115 </p>
116 </dd>
117 <dt>A &ldquo;working&rdquo; POSIX compatible shell, or GNU bash</dt>
118 <dd>
119 <p>Necessary when running <code>configure</code> because some
120 <code>/bin/sh</code> shells have bugs and may crash when configuring the
121 target libraries.  In other cases, <code>/bin/sh</code> or <code>ksh</code>
122 have disastrous corner-case performance problems.  This
123 can cause target <code>configure</code> runs to literally take days to
124 complete in some cases.
125 </p>
126 <p>So on some platforms <code>/bin/ksh</code> is sufficient, on others it
127 isn&rsquo;t.  See the host/target specific instructions for your platform, or
128 use <code>bash</code> to be sure.  Then set <code>CONFIG_SHELL</code> in your
129 environment to your &ldquo;good&rdquo; shell prior to running
130 <code>configure</code>/<code>make</code>.
131 </p>
132 <p><code>zsh</code> is not a fully compliant POSIX shell and will not
133 work when configuring GCC.
134 </p>
135 </dd>
136 <dt>A POSIX or SVR4 awk</dt>
137 <dd>
138 <p>Necessary for creating some of the generated source files for GCC.
139 If in doubt, use a recent GNU awk version, as some of the older ones
140 are broken.  GNU awk version 3.1.5 is known to work.
141 </p>
142 </dd>
143 <dt>GNU binutils</dt>
144 <dd>
145 <p>Necessary in some circumstances, optional in others.  See the
146 host/target specific instructions for your platform for the exact
147 requirements.
148 </p>
149 </dd>
150 <dt>gzip version 1.2.4 (or later) or</dt>
151 <dt>bzip2 version 1.0.2 (or later)</dt>
152 <dd>
153 <p>Necessary to uncompress GCC <code>tar</code> files when source code is
154 obtained via FTP mirror sites.
155 </p>
156 </dd>
157 <dt>GNU make version 3.80 (or later)</dt>
158 <dd>
159 <p>You must have GNU make installed to build GCC.
160 </p>
161 </dd>
162 <dt>GNU tar version 1.14 (or later)</dt>
163 <dd>
164 <p>Necessary (only on some platforms) to untar the source code.  Many
165 systems&rsquo; <code>tar</code> programs will also work, only try GNU
166 <code>tar</code> if you have problems.
167 </p>
168 </dd>
169 <dt>Perl version 5.6.1 (or later)</dt>
170 <dd>
171 <p>Necessary when targeting Darwin, building &lsquo;<samp>libstdc++</samp>&rsquo;,
172 and not using <samp>--disable-symvers</samp>.
173 Necessary when targeting Solaris 2 with Sun <code>ld</code> and not using
174 <samp>--disable-symvers</samp>.  The bundled <code>perl</code> in Solaris&nbsp;8
175 and up works.
176 </p>
177 <p>Necessary when regenerating <samp>Makefile</samp> dependencies in libiberty.
178 Necessary when regenerating <samp>libiberty/functions.texi</samp>.
179 Necessary when generating manpages from Texinfo manuals.
180 Used by various scripts to generate some files included in SVN (mainly
181 Unicode-related and rarely changing) from source tables.
182 </p>
183 </dd>
184 <dt><code>jar</code>, or InfoZIP (<code>zip</code> and <code>unzip</code>)</dt>
185 <dd>
186 <p>Necessary to build libgcj, the GCJ runtime.
187 </p>
188 </dd>
189 </dl>
190
191 <p>Several support libraries are necessary to build GCC, some are required,
192 others optional.  While any sufficiently new version of required tools
193 usually work, library requirements are generally stricter.  Newer
194 versions may work in some cases, but it&rsquo;s safer to use the exact
195 versions documented.  We appreciate bug reports about problems with
196 newer versions, though.  If your OS vendor provides packages for the
197 support libraries then using those packages may be the simplest way to
198 install the libraries.
199 </p>
200 <dl compact="compact">
201 <dt>GNU Multiple Precision Library (GMP) version 4.3.2 (or later)</dt>
202 <dd>
203 <p>Necessary to build GCC.  If a GMP source distribution is found in a
204 subdirectory of your GCC sources named <samp>gmp</samp>, it will be built
205 together with GCC.  Alternatively, if GMP is already installed but it
206 is not in your library search path, you will have to configure with the
207 <samp>--with-gmp</samp> configure option.  See also <samp>--with-gmp-lib</samp>
208 and <samp>--with-gmp-include</samp>.
209 </p>
210 </dd>
211 <dt>MPFR Library version 2.4.2 (or later)</dt>
212 <dd>
213 <p>Necessary to build GCC.  It can be downloaded from
214 <a href="http://www.mpfr.org/">http://www.mpfr.org/</a>.  If an MPFR source distribution is found
215 in a subdirectory of your GCC sources named <samp>mpfr</samp>, it will be
216 built together with GCC.  Alternatively, if MPFR is already installed
217 but it is not in your default library search path, the
218 <samp>--with-mpfr</samp> configure option should be used.  See also
219 <samp>--with-mpfr-lib</samp> and <samp>--with-mpfr-include</samp>.
220 </p>
221 </dd>
222 <dt>MPC Library version 0.8.1 (or later)</dt>
223 <dd>
224 <p>Necessary to build GCC.  It can be downloaded from
225 <a href="http://www.multiprecision.org/">http://www.multiprecision.org/</a>.  If an MPC source distribution
226 is found in a subdirectory of your GCC sources named <samp>mpc</samp>, it
227 will be built together with GCC.  Alternatively, if MPC is already
228 installed but it is not in your default library search path, the
229 <samp>--with-mpc</samp> configure option should be used.  See also
230 <samp>--with-mpc-lib</samp> and <samp>--with-mpc-include</samp>.
231 </p>
232 </dd>
233 <dt>ISL Library version 0.11.1</dt>
234 <dd>
235 <p>Necessary to build GCC with the Graphite loop optimizations.
236 It can be downloaded from <a href="ftp://gcc.gnu.org/pub/gcc/infrastructure/">ftp://gcc.gnu.org/pub/gcc/infrastructure/</a>
237 as <samp>isl-0.11.1.tar.bz2</samp>.
238 </p>
239 <p>The <samp>--with-isl</samp> configure option should be used if ISL is not
240 installed in your default library search path.
241 </p>
242 </dd>
243 <dt>CLooG 0.18.0</dt>
244 <dd>
245 <p>Necessary to build GCC with the Graphite loop optimizations.  It can be
246 downloaded from <a href="ftp://gcc.gnu.org/pub/gcc/infrastructure/">ftp://gcc.gnu.org/pub/gcc/infrastructure/</a> as
247 <samp>cloog-0.18.0.tar.gz</samp>.  The <samp>--with-cloog</samp> configure option should
248 be used if CLooG is not installed in your default library search path.
249 CLooG needs to be built against ISL 0.11.1.  Use <samp>--with-isl=system</samp>
250 to direct CLooG to pick up an already installed ISL, otherwise it will use
251 ISL 0.11.1 as bundled with CLooG.  CLooG needs to be configured to use GMP
252 internally, use <samp>--with-bits=gmp</samp> to direct it to do that.
253 </p>
254 </dd>
255 </dl>
256
257 <a name="Tools_002fpackages-necessary-for-modifying-GCC"></a>
258 <h3 class="heading">Tools/packages necessary for modifying GCC</h3>
259 <dl compact="compact">
260 <dt>autoconf version 2.64</dt>
261 <dt>GNU m4 version 1.4.6 (or later)</dt>
262 <dd>
263 <p>Necessary when modifying <samp>configure.ac</samp>, <samp>aclocal.m4</samp>, etc.
264 to regenerate <samp>configure</samp> and <samp>config.in</samp> files.
265 </p>
266 </dd>
267 <dt>automake version 1.11.1</dt>
268 <dd>
269 <p>Necessary when modifying a <samp>Makefile.am</samp> file to regenerate its
270 associated <samp>Makefile.in</samp>.
271 </p>
272 <p>Much of GCC does not use automake, so directly edit the <samp>Makefile.in</samp>
273 file.  Specifically this applies to the <samp>gcc</samp>, <samp>intl</samp>,
274 <samp>libcpp</samp>, <samp>libiberty</samp>, <samp>libobjc</samp> directories as well
275 as any of their subdirectories.
276 </p>
277 <p>For directories that use automake, GCC requires the latest release in
278 the 1.11 series, which is currently 1.11.1.  When regenerating a directory
279 to a newer version, please update all the directories using an older 1.11
280 to the latest released version.
281 </p>
282 </dd>
283 <dt>gettext version 0.14.5 (or later)</dt>
284 <dd>
285 <p>Needed to regenerate <samp>gcc.pot</samp>.
286 </p>
287 </dd>
288 <dt>gperf version 2.7.2 (or later)</dt>
289 <dd>
290 <p>Necessary when modifying <code>gperf</code> input files, e.g.
291 <samp>gcc/cp/cfns.gperf</samp> to regenerate its associated header file, e.g.
292 <samp>gcc/cp/cfns.h</samp>.
293 </p>
294 </dd>
295 <dt>DejaGnu 1.4.4</dt>
296 <dt>Expect</dt>
297 <dt>Tcl</dt>
298 <dd>
299 <p>Necessary to run the GCC testsuite; see the section on testing for details.
300 </p>
301 </dd>
302 <dt>autogen version 5.5.4 (or later) and</dt>
303 <dt>guile version 1.4.1 (or later)</dt>
304 <dd>
305 <p>Necessary to regenerate <samp>fixinc/fixincl.x</samp> from
306 <samp>fixinc/inclhack.def</samp> and <samp>fixinc/*.tpl</samp>.
307 </p>
308 <p>Necessary to run &lsquo;<samp>make check</samp>&rsquo; for <samp>fixinc</samp>.
309 </p>
310 <p>Necessary to regenerate the top level <samp>Makefile.in</samp> file from
311 <samp>Makefile.tpl</samp> and <samp>Makefile.def</samp>.
312 </p>
313 </dd>
314 <dt>Flex version 2.5.4 (or later)</dt>
315 <dd>
316 <p>Necessary when modifying <samp>*.l</samp> files.
317 </p>
318 <p>Necessary to build GCC during development because the generated output
319 files are not included in the SVN repository.  They are included in
320 releases.
321 </p>
322 </dd>
323 <dt>Texinfo version 4.7 (or later)</dt>
324 <dd>
325 <p>Necessary for running <code>makeinfo</code> when modifying <samp>*.texi</samp>
326 files to test your changes.
327 </p>
328 <p>Necessary for running <code>make dvi</code> or <code>make pdf</code> to
329 create printable documentation in DVI or PDF format.  Texinfo version
330 4.8 or later is required for <code>make pdf</code>.
331 </p>
332 <p>Necessary to build GCC documentation during development because the
333 generated output files are not included in the SVN repository.  They are
334 included in releases.
335 </p>
336 </dd>
337 <dt>TeX (any working version)</dt>
338 <dd>
339 <p>Necessary for running <code>texi2dvi</code> and <code>texi2pdf</code>, which
340 are used when running <code>make dvi</code> or <code>make pdf</code> to create
341 DVI or PDF files, respectively.
342 </p>
343 </dd>
344 <dt>SVN (any version)</dt>
345 <dt>SSH (any version)</dt>
346 <dd>
347 <p>Necessary to access the SVN repository.  Public releases and weekly
348 snapshots of the development sources are also available via FTP.
349 </p>
350 </dd>
351 <dt>GNU diffutils version 2.7 (or later)</dt>
352 <dd>
353 <p>Useful when submitting patches for the GCC source code.
354 </p>
355 </dd>
356 <dt>patch version 2.5.4 (or later)</dt>
357 <dd>
358 <p>Necessary when applying patches, created with <code>diff</code>, to one&rsquo;s
359 own sources.
360 </p>
361 </dd>
362 <dt>ecj1</dt>
363 <dt>gjavah</dt>
364 <dd>
365 <p>If you wish to modify <samp>.java</samp> files in libjava, you will need to
366 configure with <samp>--enable-java-maintainer-mode</samp>, and you will need
367 to have executables named <code>ecj1</code> and <code>gjavah</code> in your path.
368 The <code>ecj1</code> executable should run the Eclipse Java compiler via
369 the GCC-specific entry point.  You can download a suitable jar from
370 <a href="ftp://sourceware.org/pub/java/">ftp://sourceware.org/pub/java/</a>, or by running the script
371 <code>contrib/download_ecj</code>.
372 </p>
373 </dd>
374 <dt>antlr.jar version 2.7.1 (or later)</dt>
375 <dt>antlr binary</dt>
376 <dd>
377 <p>If you wish to build the <code>gjdoc</code> binary in libjava, you will
378 need to have an <samp>antlr.jar</samp> library available. The library is
379 searched for in system locations but can be specified with
380 <samp>--with-antlr-jar=</samp> instead.  When configuring with
381 <samp>--enable-java-maintainer-mode</samp>, you will need to have one of
382 the executables named <code>cantlr</code>, <code>runantlr</code> or
383 <code>antlr</code> in your path.
384 </p>
385 </dd>
386 </dl>
387
388 <hr />
389 <p><p><a href="./index.html">Return to the GCC Installation page</a>
390 </p>
391
392
393
394
395
396
397
398
399
400
401
402
403
404 </body>
405 </html>