set gcc_dir_version
[platform/upstream/gcc48.git] / INSTALL / configure.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
84
85 <a name="index-Configuration"></a>
86 <a name="index-Installing-GCC_003a-Configuration"></a>
87
88 <p>Like most GNU software, GCC must be configured before it can be built.
89 This document describes the recommended configuration procedure
90 for both native and cross targets.
91 </p>
92 <p>We use <var>srcdir</var> to refer to the toplevel source directory for
93 GCC; we use <var>objdir</var> to refer to the toplevel build/object directory.
94 </p>
95 <p>If you obtained the sources via SVN, <var>srcdir</var> must refer to the top
96 <samp>gcc</samp> directory, the one where the <samp>MAINTAINERS</samp> file can be
97 found, and not its <samp>gcc</samp> subdirectory, otherwise the build will fail.
98 </p>
99 <p>If either <var>srcdir</var> or <var>objdir</var> is located on an automounted NFS
100 file system, the shell&rsquo;s built-in <code>pwd</code> command will return
101 temporary pathnames.  Using these can lead to various sorts of build
102 problems.  To avoid this issue, set the <code>PWDCMD</code> environment
103 variable to an automounter-aware <code>pwd</code> command, e.g.,
104 <code>pawd</code> or &lsquo;<samp>amq -w</samp>&rsquo;, during the configuration and build
105 phases.
106 </p>
107 <p>First, we <strong>highly</strong> recommend that GCC be built into a
108 separate directory from the sources which does <strong>not</strong> reside
109 within the source tree.  This is how we generally build GCC; building
110 where <var>srcdir</var> == <var>objdir</var> should still work, but doesn&rsquo;t
111 get extensive testing; building where <var>objdir</var> is a subdirectory
112 of <var>srcdir</var> is unsupported.
113 </p>
114 <p>If you have previously built GCC in the same directory for a
115 different target machine, do &lsquo;<samp>make distclean</samp>&rsquo; to delete all files
116 that might be invalid.  One of the files this deletes is <samp>Makefile</samp>;
117 if &lsquo;<samp>make distclean</samp>&rsquo; complains that <samp>Makefile</samp> does not exist
118 or issues a message like &ldquo;don&rsquo;t know how to make distclean&rdquo; it probably
119 means that the directory is already suitably clean.  However, with the
120 recommended method of building in a separate <var>objdir</var>, you should
121 simply use a different <var>objdir</var> for each target.
122 </p>
123 <p>Second, when configuring a native system, either <code>cc</code> or
124 <code>gcc</code> must be in your path or you must set <code>CC</code> in
125 your environment before running configure.  Otherwise the configuration
126 scripts may fail.
127 </p>
128
129 <p>To configure GCC:
130 </p>
131 <div class="smallexample">
132 <pre class="smallexample">% mkdir <var>objdir</var>
133 % cd <var>objdir</var>
134 % <var>srcdir</var>/configure [<var>options</var>] [<var>target</var>]
135 </pre></div>
136
137 <a name="Distributor-options"></a>
138 <h3 class="heading">Distributor options</h3>
139
140 <p>If you will be distributing binary versions of GCC, with modifications
141 to the source code, you should use the options described in this
142 section to make clear that your version contains modifications.
143 </p>
144 <dl compact="compact">
145 <dt><code>--with-pkgversion=<var>version</var></code></dt>
146 <dd><p>Specify a string that identifies your package.  You may wish
147 to include a build number or build date.  This version string will be
148 included in the output of <code>gcc --version</code>.  This suffix does
149 not replace the default version string, only the &lsquo;<samp>GCC</samp>&rsquo; part.
150 </p>
151 <p>The default value is &lsquo;<samp>GCC</samp>&rsquo;.
152 </p>
153 </dd>
154 <dt><code>--with-bugurl=<var>url</var></code></dt>
155 <dd><p>Specify the URL that users should visit if they wish to report a bug.
156 You are of course welcome to forward bugs reported to you to the FSF,
157 if you determine that they are not bugs in your modifications.
158 </p>
159 <p>The default value refers to the FSF&rsquo;s GCC bug tracker.
160 </p>
161 </dd>
162 </dl>
163
164 <a name="Target-specification"></a>
165 <h3 class="heading">Target specification</h3>
166 <ul>
167 <li> GCC has code to correctly determine the correct value for <var>target</var>
168 for nearly all native systems.  Therefore, we highly recommend you do
169 not provide a configure target when configuring a native compiler.
170
171 </li><li> <var>target</var> must be specified as <samp>--target=<var>target</var></samp>
172 when configuring a cross compiler; examples of valid targets would be
173 m68k-elf, sh-elf, etc.
174
175 </li><li> Specifying just <var>target</var> instead of <samp>--target=<var>target</var></samp>
176 implies that the host defaults to <var>target</var>.
177 </li></ul>
178
179
180 <a name="Options-specification"></a>
181 <h3 class="heading">Options specification</h3>
182
183 <p>Use <var>options</var> to override several configure time options for
184 GCC.  A list of supported <var>options</var> follows; &lsquo;<samp>configure
185 --help</samp>&rsquo; may list other options, but those not listed below may not
186 work and should not normally be used.
187 </p>
188 <p>Note that each <samp>--enable</samp> option has a corresponding
189 <samp>--disable</samp> option and that each <samp>--with</samp> option has a
190 corresponding <samp>--without</samp> option.
191 </p>
192 <dl compact="compact">
193 <dt><code>--prefix=<var>dirname</var></code></dt>
194 <dd><p>Specify the toplevel installation
195 directory.  This is the recommended way to install the tools into a directory
196 other than the default.  The toplevel installation directory defaults to
197 <samp>/usr/local</samp>.
198 </p>
199 <p>We <strong>highly</strong> recommend against <var>dirname</var> being the same or a
200 subdirectory of <var>objdir</var> or vice versa.  If specifying a directory
201 beneath a user&rsquo;s home directory tree, some shells will not expand
202 <var>dirname</var> correctly if it contains the &lsquo;<samp>~</samp>&rsquo; metacharacter; use
203 <code>$HOME</code> instead.
204 </p>
205 <p>The following standard <code>autoconf</code> options are supported.  Normally you
206 should not need to use these options.
207 </p><dl compact="compact">
208 <dt><code>--exec-prefix=<var>dirname</var></code></dt>
209 <dd><p>Specify the toplevel installation directory for architecture-dependent
210 files.  The default is <samp><var>prefix</var></samp>.
211 </p>
212 </dd>
213 <dt><code>--bindir=<var>dirname</var></code></dt>
214 <dd><p>Specify the installation directory for the executables called by users
215 (such as <code>gcc</code> and <code>g++</code>).  The default is
216 <samp><var>exec-prefix</var>/bin</samp>.
217 </p>
218 </dd>
219 <dt><code>--libdir=<var>dirname</var></code></dt>
220 <dd><p>Specify the installation directory for object code libraries and
221 internal data files of GCC.  The default is <samp><var>exec-prefix</var>/lib</samp>.
222 </p>
223 </dd>
224 <dt><code>--libexecdir=<var>dirname</var></code></dt>
225 <dd><p>Specify the installation directory for internal executables of GCC.
226 The default is <samp><var>exec-prefix</var>/libexec</samp>.
227 </p>
228 </dd>
229 <dt><code>--with-slibdir=<var>dirname</var></code></dt>
230 <dd><p>Specify the installation directory for the shared libgcc library.  The
231 default is <samp><var>libdir</var></samp>.
232 </p>
233 </dd>
234 <dt><code>--datarootdir=<var>dirname</var></code></dt>
235 <dd><p>Specify the root of the directory tree for read-only architecture-independent
236 data files referenced by GCC.  The default is <samp><var>prefix</var>/share</samp>.
237 </p>
238 </dd>
239 <dt><code>--infodir=<var>dirname</var></code></dt>
240 <dd><p>Specify the installation directory for documentation in info format.
241 The default is <samp><var>datarootdir</var>/info</samp>.
242 </p>
243 </dd>
244 <dt><code>--datadir=<var>dirname</var></code></dt>
245 <dd><p>Specify the installation directory for some architecture-independent
246 data files referenced by GCC.  The default is <samp><var>datarootdir</var></samp>.
247 </p>
248 </dd>
249 <dt><code>--docdir=<var>dirname</var></code></dt>
250 <dd><p>Specify the installation directory for documentation files (other
251 than Info) for GCC.  The default is <samp><var>datarootdir</var>/doc</samp>.
252 </p>
253 </dd>
254 <dt><code>--htmldir=<var>dirname</var></code></dt>
255 <dd><p>Specify the installation directory for HTML documentation files.
256 The default is <samp><var>docdir</var></samp>.
257 </p>
258 </dd>
259 <dt><code>--pdfdir=<var>dirname</var></code></dt>
260 <dd><p>Specify the installation directory for PDF documentation files.
261 The default is <samp><var>docdir</var></samp>.
262 </p>
263 </dd>
264 <dt><code>--mandir=<var>dirname</var></code></dt>
265 <dd><p>Specify the installation directory for manual pages.  The default is
266 <samp><var>datarootdir</var>/man</samp>.  (Note that the manual pages are only extracts
267 from the full GCC manuals, which are provided in Texinfo format.  The manpages
268 are derived by an automatic conversion process from parts of the full
269 manual.)
270 </p>
271 </dd>
272 <dt><code>--with-gxx-include-dir=<var>dirname</var></code></dt>
273 <dd><p>Specify
274 the installation directory for G++ header files.  The default depends
275 on other configuration options, and differs between cross and native
276 configurations.
277 </p>
278 </dd>
279 <dt><code>--with-specs=<var>specs</var></code></dt>
280 <dd><p>Specify additional command line driver SPECS.
281 This can be useful if you need to turn on a non-standard feature by
282 default without modifying the compiler&rsquo;s source code, for instance
283 <samp>--with-specs=%{!fcommon:%{!fno-common:-fno-common}}</samp>.
284 See &ldquo;Spec Files&rdquo; in the main manual
285 </p>
286 </dd>
287 </dl>
288
289 </dd>
290 <dt><code>--program-prefix=<var>prefix</var></code></dt>
291 <dd><p>GCC supports some transformations of the names of its programs when
292 installing them.  This option prepends <var>prefix</var> to the names of
293 programs to install in <var>bindir</var> (see above).  For example, specifying
294 <samp>--program-prefix=foo-</samp> would result in &lsquo;<samp>gcc</samp>&rsquo;
295 being installed as <samp>/usr/local/bin/foo-gcc</samp>.
296 </p>
297 </dd>
298 <dt><code>--program-suffix=<var>suffix</var></code></dt>
299 <dd><p>Appends <var>suffix</var> to the names of programs to install in <var>bindir</var>
300 (see above).  For example, specifying <samp>--program-suffix=-3.1</samp>
301 would result in &lsquo;<samp>gcc</samp>&rsquo; being installed as
302 <samp>/usr/local/bin/gcc-3.1</samp>.
303 </p>
304 </dd>
305 <dt><code>--program-transform-name=<var>pattern</var></code></dt>
306 <dd><p>Applies the &lsquo;<samp>sed</samp>&rsquo; script <var>pattern</var> to be applied to the names
307 of programs to install in <var>bindir</var> (see above).  <var>pattern</var> has to
308 consist of one or more basic &lsquo;<samp>sed</samp>&rsquo; editing commands, separated by
309 semicolons.  For example, if you want the &lsquo;<samp>gcc</samp>&rsquo; program name to be
310 transformed to the installed program <samp>/usr/local/bin/myowngcc</samp> and
311 the &lsquo;<samp>g++</samp>&rsquo; program name to be transformed to
312 <samp>/usr/local/bin/gspecial++</samp> without changing other program names,
313 you could use the pattern
314 <samp>--program-transform-name='s/^gcc$/myowngcc/; s/^g++$/gspecial++/'</samp>
315 to achieve this effect.
316 </p>
317 <p>All three options can be combined and used together, resulting in more
318 complex conversion patterns.  As a basic rule, <var>prefix</var> (and
319 <var>suffix</var>) are prepended (appended) before further transformations
320 can happen with a special transformation script <var>pattern</var>.
321 </p>
322 <p>As currently implemented, this option only takes effect for native
323 builds; cross compiler binaries&rsquo; names are not transformed even when a
324 transformation is explicitly asked for by one of these options.
325 </p>
326 <p>For native builds, some of the installed programs are also installed
327 with the target alias in front of their name, as in
328 &lsquo;<samp>i686-pc-linux-gnu-gcc</samp>&rsquo;.  All of the above transformations happen
329 before the target alias is prepended to the name&mdash;so, specifying
330 <samp>--program-prefix=foo-</samp> and <samp>program-suffix=-3.1</samp>, the
331 resulting binary would be installed as
332 <samp>/usr/local/bin/i686-pc-linux-gnu-foo-gcc-3.1</samp>.
333 </p>
334 <p>As a last shortcoming, none of the installed Ada programs are
335 transformed yet, which will be fixed in some time.
336 </p>
337 </dd>
338 <dt><code>--with-local-prefix=<var>dirname</var></code></dt>
339 <dd><p>Specify the
340 installation directory for local include files.  The default is
341 <samp>/usr/local</samp>.  Specify this option if you want the compiler to
342 search directory <samp><var>dirname</var>/include</samp> for locally installed
343 header files <em>instead</em> of <samp>/usr/local/include</samp>.
344 </p>
345 <p>You should specify <samp>--with-local-prefix</samp> <strong>only</strong> if your
346 site has a different convention (not <samp>/usr/local</samp>) for where to put
347 site-specific files.
348 </p>
349 <p>The default value for <samp>--with-local-prefix</samp> is <samp>/usr/local</samp>
350 regardless of the value of <samp>--prefix</samp>.  Specifying
351 <samp>--prefix</samp> has no effect on which directory GCC searches for
352 local header files.  This may seem counterintuitive, but actually it is
353 logical.
354 </p>
355 <p>The purpose of <samp>--prefix</samp> is to specify where to <em>install
356 GCC</em>.  The local header files in <samp>/usr/local/include</samp>&mdash;if you put
357 any in that directory&mdash;are not part of GCC.  They are part of other
358 programs&mdash;perhaps many others.  (GCC installs its own header files in
359 another directory which is based on the <samp>--prefix</samp> value.)
360 </p>
361 <p>Both the local-prefix include directory and the GCC-prefix include
362 directory are part of GCC&rsquo;s &ldquo;system include&rdquo; directories.  Although these
363 two directories are not fixed, they need to be searched in the proper
364 order for the correct processing of the include_next directive.  The
365 local-prefix include directory is searched before the GCC-prefix
366 include directory.  Another characteristic of system include directories
367 is that pedantic warnings are turned off for headers in these directories.
368 </p>
369 <p>Some autoconf macros add <samp>-I <var>directory</var></samp> options to the
370 compiler command line, to ensure that directories containing installed
371 packages&rsquo; headers are searched.  When <var>directory</var> is one of GCC&rsquo;s
372 system include directories, GCC will ignore the option so that system
373 directories continue to be processed in the correct order.  This
374 may result in a search order different from what was specified but the
375 directory will still be searched.
376 </p>
377 <p>GCC automatically searches for ordinary libraries using
378 <code>GCC_EXEC_PREFIX</code>.  Thus, when the same installation prefix is
379 used for both GCC and packages, GCC will automatically search for
380 both headers and libraries.  This provides a configuration that is
381 easy to use.  GCC behaves in a manner similar to that when it is
382 installed as a system compiler in <samp>/usr</samp>.
383 </p>
384 <p>Sites that need to install multiple versions of GCC may not want to
385 use the above simple configuration.  It is possible to use the
386 <samp>--program-prefix</samp>, <samp>--program-suffix</samp> and
387 <samp>--program-transform-name</samp> options to install multiple versions
388 into a single directory, but it may be simpler to use different prefixes
389 and the <samp>--with-local-prefix</samp> option to specify the location of the
390 site-specific files for each version.  It will then be necessary for
391 users to specify explicitly the location of local site libraries
392 (e.g., with <code>LIBRARY_PATH</code>).
393 </p>
394 <p>The same value can be used for both <samp>--with-local-prefix</samp> and
395 <samp>--prefix</samp> provided it is not <samp>/usr</samp>.  This can be used
396 to avoid the default search of <samp>/usr/local/include</samp>.
397 </p>
398 <p><strong>Do not</strong> specify <samp>/usr</samp> as the <samp>--with-local-prefix</samp>!
399 The directory you use for <samp>--with-local-prefix</samp> <strong>must not</strong>
400 contain any of the system&rsquo;s standard header files.  If it did contain
401 them, certain programs would be miscompiled (including GNU Emacs, on
402 certain targets), because this would override and nullify the header
403 file corrections made by the <code>fixincludes</code> script.
404 </p>
405 <p>Indications are that people who use this option use it based on mistaken
406 ideas of what it is for.  People use it as if it specified where to
407 install part of GCC.  Perhaps they make this assumption because
408 installing GCC creates the directory.
409 </p>
410 </dd>
411 <dt><code>--with-native-system-header-dir=<var>dirname</var></code></dt>
412 <dd><p>Specifies that <var>dirname</var> is the directory that contains native system
413 header files, rather than <samp>/usr/include</samp>.  This option is most useful
414 if you are creating a compiler that should be isolated from the system
415 as much as possible.  It is most commonly used with the
416 <samp>--with-sysroot</samp> option and will cause GCC to search
417 <var>dirname</var> inside the system root specified by that option.
418 </p>
419 </dd>
420 <dt><code>--enable-shared[=<var>package</var>[,&hellip;]]</code></dt>
421 <dd><p>Build shared versions of libraries, if shared libraries are supported on
422 the target platform.  Unlike GCC 2.95.x and earlier, shared libraries
423 are enabled by default on all platforms that support shared libraries.
424 </p>
425 <p>If a list of packages is given as an argument, build shared libraries
426 only for the listed packages.  For other packages, only static libraries
427 will be built.  Package names currently recognized in the GCC tree are
428 &lsquo;<samp>libgcc</samp>&rsquo; (also known as &lsquo;<samp>gcc</samp>&rsquo;), &lsquo;<samp>libstdc++</samp>&rsquo; (not
429 &lsquo;<samp>libstdc++-v3</samp>&rsquo;), &lsquo;<samp>libffi</samp>&rsquo;, &lsquo;<samp>zlib</samp>&rsquo;, &lsquo;<samp>boehm-gc</samp>&rsquo;,
430 &lsquo;<samp>ada</samp>&rsquo;, &lsquo;<samp>libada</samp>&rsquo;, &lsquo;<samp>libjava</samp>&rsquo;, &lsquo;<samp>libgo</samp>&rsquo;, and &lsquo;<samp>libobjc</samp>&rsquo;.
431 Note &lsquo;<samp>libiberty</samp>&rsquo; does not support shared libraries at all.
432 </p>
433 <p>Use <samp>--disable-shared</samp> to build only static libraries.  Note that
434 <samp>--disable-shared</samp> does not accept a list of package names as
435 argument, only <samp>--enable-shared</samp> does.
436 </p>
437 </dd>
438 <dt><code><a name="with_002dgnu_002das"></a>--with-gnu-as</code></dt>
439 <dd><p>Specify that the compiler should assume that the
440 assembler it finds is the GNU assembler.  However, this does not modify
441 the rules to find an assembler and will result in confusion if the
442 assembler found is not actually the GNU assembler.  (Confusion may also
443 result if the compiler finds the GNU assembler but has not been
444 configured with <samp>--with-gnu-as</samp>.)  If you have more than one
445 assembler installed on your system, you may want to use this option in
446 connection with <samp>--with-as=<var>pathname</var></samp> or
447 <samp>--with-build-time-tools=<var>pathname</var></samp>.
448 </p>
449 <p>The following systems are the only ones where it makes a difference
450 whether you use the GNU assembler.  On any other system,
451 <samp>--with-gnu-as</samp> has no effect.
452 </p>
453 <ul>
454 <li> &lsquo;<samp>hppa1.0-<var>any</var>-<var>any</var></samp>&rsquo;
455 </li><li> &lsquo;<samp>hppa1.1-<var>any</var>-<var>any</var></samp>&rsquo;
456 </li><li> &lsquo;<samp>sparc-sun-solaris2.<var>any</var></samp>&rsquo;
457 </li><li> &lsquo;<samp>sparc64-<var>any</var>-solaris2.<var>any</var></samp>&rsquo;
458 </li></ul>
459
460 </dd>
461 <dt><code><a name="with_002das"></a>--with-as=<var>pathname</var></code></dt>
462 <dd><p>Specify that the compiler should use the assembler pointed to by
463 <var>pathname</var>, rather than the one found by the standard rules to find
464 an assembler, which are:
465 </p><ul>
466 <li> Unless GCC is being built with a cross compiler, check the
467 <samp><var>libexec</var>/gcc/<var>target</var>/<var>version</var></samp> directory.
468 <var>libexec</var> defaults to <samp><var>exec-prefix</var>/libexec</samp>;
469 <var>exec-prefix</var> defaults to <var>prefix</var>, which
470 defaults to <samp>/usr/local</samp> unless overridden by the
471 <samp>--prefix=<var>pathname</var></samp> switch described above.  <var>target</var>
472 is the target system triple, such as &lsquo;<samp>sparc-sun-solaris2.7</samp>&rsquo;, and
473 <var>version</var> denotes the GCC version, such as 3.0.
474
475 </li><li> If the target system is the same that you are building on, check
476 operating system specific directories (e.g. <samp>/usr/ccs/bin</samp> on
477 Sun Solaris 2).
478
479 </li><li> Check in the <code>PATH</code> for a tool whose name is prefixed by the
480 target system triple.
481
482 </li><li> Check in the <code>PATH</code> for a tool whose name is not prefixed by the
483 target system triple, if the host and target system triple are
484 the same (in other words, we use a host tool if it can be used for
485 the target as well).
486 </li></ul>
487
488 <p>You may want to use <samp>--with-as</samp> if no assembler
489 is installed in the directories listed above, or if you have multiple
490 assemblers installed and want to choose one that is not found by the
491 above rules.
492 </p>
493 </dd>
494 <dt><code><a name="with_002dgnu_002dld"></a>--with-gnu-ld</code></dt>
495 <dd><p>Same as <a href="#with-gnu-as"><samp>--with-gnu-as</samp></a>
496 but for the linker.
497 </p>
498 </dd>
499 <dt><code>--with-ld=<var>pathname</var></code></dt>
500 <dd><p>Same as <a href="#with-as"><samp>--with-as</samp></a>
501 but for the linker.
502 </p>
503 </dd>
504 <dt><code>--with-stabs</code></dt>
505 <dd><p>Specify that stabs debugging
506 information should be used instead of whatever format the host normally
507 uses.  Normally GCC uses the same debug format as the host system.
508 </p>
509 <p>On MIPS based systems and on Alphas, you must specify whether you want
510 GCC to create the normal ECOFF debugging format, or to use BSD-style
511 stabs passed through the ECOFF symbol table.  The normal ECOFF debug
512 format cannot fully handle languages other than C.  BSD stabs format can
513 handle other languages, but it only works with the GNU debugger GDB.
514 </p>
515 <p>Normally, GCC uses the ECOFF debugging format by default; if you
516 prefer BSD stabs, specify <samp>--with-stabs</samp> when you configure GCC.
517 </p>
518 <p>No matter which default you choose when you configure GCC, the user
519 can use the <samp>-gcoff</samp> and <samp>-gstabs+</samp> options to specify explicitly
520 the debug format for a particular compilation.
521 </p>
522 <p><samp>--with-stabs</samp> is meaningful on the ISC system on the 386, also, if
523 <samp>--with-gas</samp> is used.  It selects use of stabs debugging
524 information embedded in COFF output.  This kind of debugging information
525 supports C++ well; ordinary COFF debugging information does not.
526 </p>
527 <p><samp>--with-stabs</samp> is also meaningful on 386 systems running SVR4.  It
528 selects use of stabs debugging information embedded in ELF output.  The
529 C++ compiler currently (2.6.0) does not support the DWARF debugging
530 information normally used on 386 SVR4 platforms; stabs provide a
531 workable alternative.  This requires gas and gdb, as the normal SVR4
532 tools can not generate or interpret stabs.
533 </p>
534 </dd>
535 <dt><code>--with-tls=<var>dialect</var></code></dt>
536 <dd><p>Specify the default TLS dialect, for systems were there is a choice.
537 For ARM targets, possible values for <var>dialect</var> are <code>gnu</code> or
538 <code>gnu2</code>, which select between the original GNU dialect and the GNU TLS
539 descriptor-based dialect.
540 </p>
541 </dd>
542 <dt><code>--enable-multiarch</code></dt>
543 <dd><p>Specify whether to enable or disable multiarch support.  The default is
544 to check for glibc start files in a multiarch location, and enable it
545 if the files are found.  The auto detection is enabled for native builds,
546 and for cross builds configured with <samp>--with-sysroot</samp>, and without
547 <samp>--with-native-system-header-dir</samp>.
548 More documentation about multiarch can be found at
549 <a href="http://wiki.debian.org/Multiarch">http://wiki.debian.org/Multiarch</a>.
550 </p>
551 </dd>
552 <dt><code>--disable-multilib</code></dt>
553 <dd><p>Specify that multiple target
554 libraries to support different target variants, calling
555 conventions, etc. should not be built.  The default is to build a
556 predefined set of them.
557 </p>
558 <p>Some targets provide finer-grained control over which multilibs are built
559 (e.g., <samp>--disable-softfloat</samp>):
560 </p><dl compact="compact">
561 <dt><code>arm-*-*</code></dt>
562 <dd><p>fpu, 26bit, underscore, interwork, biendian, nofmult.
563 </p>
564 </dd>
565 <dt><code>m68*-*-*</code></dt>
566 <dd><p>softfloat, m68881, m68000, m68020.
567 </p>
568 </dd>
569 <dt><code>mips*-*-*</code></dt>
570 <dd><p>single-float, biendian, softfloat.
571 </p>
572 </dd>
573 <dt><code>powerpc*-*-*, rs6000*-*-*</code></dt>
574 <dd><p>aix64, pthread, softfloat, powercpu, powerpccpu, powerpcos, biendian,
575 sysv, aix.
576 </p>
577 </dd>
578 </dl>
579
580 </dd>
581 <dt><code>--with-multilib-list=<var>list</var></code></dt>
582 <dt><code>--without-multilib-list</code></dt>
583 <dd><p>Specify what multilibs to build.
584 Currently only implemented for sh*-*-* and x86-64-*-linux*.
585 </p>
586 <dl compact="compact">
587 <dt><code>sh*-*-*</code></dt>
588 <dd><p><var>list</var> is a comma separated list of CPU names.  These must be of the
589 form <code>sh*</code> or <code>m*</code> (in which case they match the compiler option
590 for that processor).  The list should not contain any endian options -
591 these are handled by <samp>--with-endian</samp>.
592 </p>
593 <p>If <var>list</var> is empty, then there will be no multilibs for extra
594 processors.  The multilib for the secondary endian remains enabled.
595 </p>
596 <p>As a special case, if an entry in the list starts with a <code>!</code>
597 (exclamation point), then it is added to the list of excluded multilibs.
598 Entries of this sort should be compatible with &lsquo;<samp>MULTILIB_EXCLUDES</samp>&rsquo;
599 (once the leading <code>!</code> has been stripped).
600 </p>
601 <p>If <samp>--with-multilib-list</samp> is not given, then a default set of
602 multilibs is selected based on the value of <samp>--target</samp>.  This is
603 usually the complete set of libraries, but some targets imply a more
604 specialized subset.
605 </p>
606 <p>Example 1: to configure a compiler for SH4A only, but supporting both
607 endians, with little endian being the default:
608 </p><div class="smallexample">
609 <pre class="smallexample">--with-cpu=sh4a --with-endian=little,big --with-multilib-list=
610 </pre></div>
611
612 <p>Example 2: to configure a compiler for both SH4A and SH4AL-DSP, but with
613 only little endian SH4AL:
614 </p><div class="smallexample">
615 <pre class="smallexample">--with-cpu=sh4a --with-endian=little,big \
616 --with-multilib-list=sh4al,!mb/m4al
617 </pre></div>
618
619 </dd>
620 <dt><code>x86-64-*-linux*</code></dt>
621 <dd><p><var>list</var> is a comma separated list of <code>m32</code>, <code>m64</code> and
622 <code>mx32</code> to enable 32-bit, 64-bit and x32 run-time libraries,
623 respectively.  If <var>list</var> is empty, then there will be no multilibs
624 and only the default run-time library will be enabled.
625 </p>
626 <p>If <samp>--with-multilib-list</samp> is not given, then only 32-bit and
627 64-bit run-time libraries will be enabled.
628 </p></dd>
629 </dl>
630
631 </dd>
632 <dt><code>--with-endian=<var>endians</var></code></dt>
633 <dd><p>Specify what endians to use.
634 Currently only implemented for sh*-*-*.
635 </p>
636 <p><var>endians</var> may be one of the following:
637 </p><dl compact="compact">
638 <dt><code>big</code></dt>
639 <dd><p>Use big endian exclusively.
640 </p></dd>
641 <dt><code>little</code></dt>
642 <dd><p>Use little endian exclusively.
643 </p></dd>
644 <dt><code>big,little</code></dt>
645 <dd><p>Use big endian by default.  Provide a multilib for little endian.
646 </p></dd>
647 <dt><code>little,big</code></dt>
648 <dd><p>Use little endian by default.  Provide a multilib for big endian.
649 </p></dd>
650 </dl>
651
652 </dd>
653 <dt><code>--enable-threads</code></dt>
654 <dd><p>Specify that the target
655 supports threads.  This affects the Objective-C compiler and runtime
656 library, and exception handling for other languages like C++ and Java.
657 On some systems, this is the default.
658 </p>
659 <p>In general, the best (and, in many cases, the only known) threading
660 model available will be configured for use.  Beware that on some
661 systems, GCC has not been taught what threading models are generally
662 available for the system.  In this case, <samp>--enable-threads</samp> is an
663 alias for <samp>--enable-threads=single</samp>.
664 </p>
665 </dd>
666 <dt><code>--disable-threads</code></dt>
667 <dd><p>Specify that threading support should be disabled for the system.
668 This is an alias for <samp>--enable-threads=single</samp>.
669 </p>
670 </dd>
671 <dt><code>--enable-threads=<var>lib</var></code></dt>
672 <dd><p>Specify that
673 <var>lib</var> is the thread support library.  This affects the Objective-C
674 compiler and runtime library, and exception handling for other languages
675 like C++ and Java.  The possibilities for <var>lib</var> are:
676 </p>
677 <dl compact="compact">
678 <dt><code>aix</code></dt>
679 <dd><p>AIX thread support.
680 </p></dd>
681 <dt><code>dce</code></dt>
682 <dd><p>DCE thread support.
683 </p></dd>
684 <dt><code>lynx</code></dt>
685 <dd><p>LynxOS thread support.
686 </p></dd>
687 <dt><code>mipssde</code></dt>
688 <dd><p>MIPS SDE thread support.
689 </p></dd>
690 <dt><code>no</code></dt>
691 <dd><p>This is an alias for &lsquo;<samp>single</samp>&rsquo;.
692 </p></dd>
693 <dt><code>posix</code></dt>
694 <dd><p>Generic POSIX/Unix98 thread support.
695 </p></dd>
696 <dt><code>rtems</code></dt>
697 <dd><p>RTEMS thread support.
698 </p></dd>
699 <dt><code>single</code></dt>
700 <dd><p>Disable thread support, should work for all platforms.
701 </p></dd>
702 <dt><code>tpf</code></dt>
703 <dd><p>TPF thread support.
704 </p></dd>
705 <dt><code>vxworks</code></dt>
706 <dd><p>VxWorks thread support.
707 </p></dd>
708 <dt><code>win32</code></dt>
709 <dd><p>Microsoft Win32 API thread support.
710 </p></dd>
711 </dl>
712
713 </dd>
714 <dt><code>--enable-tls</code></dt>
715 <dd><p>Specify that the target supports TLS (Thread Local Storage).  Usually
716 configure can correctly determine if TLS is supported.  In cases where
717 it guesses incorrectly, TLS can be explicitly enabled or disabled with
718 <samp>--enable-tls</samp> or <samp>--disable-tls</samp>.  This can happen if
719 the assembler supports TLS but the C library does not, or if the
720 assumptions made by the configure test are incorrect.
721 </p>
722 </dd>
723 <dt><code>--disable-tls</code></dt>
724 <dd><p>Specify that the target does not support TLS.
725 This is an alias for <samp>--enable-tls=no</samp>.
726 </p>
727 </dd>
728 <dt><code>--with-cpu=<var>cpu</var></code></dt>
729 <dt><code>--with-cpu-32=<var>cpu</var></code></dt>
730 <dt><code>--with-cpu-64=<var>cpu</var></code></dt>
731 <dd><p>Specify which cpu variant the compiler should generate code for by default.
732 <var>cpu</var> will be used as the default value of the <samp>-mcpu=</samp> switch.
733 This option is only supported on some targets, including ARM, i386, M68k,
734 PowerPC, and SPARC.  The <samp>--with-cpu-32</samp> and
735 <samp>--with-cpu-64</samp> options specify separate default CPUs for
736 32-bit and 64-bit modes; these options are only supported for i386,
737 x86-64 and PowerPC.
738 </p>
739 </dd>
740 <dt><code>--with-schedule=<var>cpu</var></code></dt>
741 <dt><code>--with-arch=<var>cpu</var></code></dt>
742 <dt><code>--with-arch-32=<var>cpu</var></code></dt>
743 <dt><code>--with-arch-64=<var>cpu</var></code></dt>
744 <dt><code>--with-tune=<var>cpu</var></code></dt>
745 <dt><code>--with-tune-32=<var>cpu</var></code></dt>
746 <dt><code>--with-tune-64=<var>cpu</var></code></dt>
747 <dt><code>--with-abi=<var>abi</var></code></dt>
748 <dt><code>--with-fpu=<var>type</var></code></dt>
749 <dt><code>--with-float=<var>type</var></code></dt>
750 <dd><p>These configure options provide default values for the <samp>-mschedule=</samp>,
751 <samp>-march=</samp>, <samp>-mtune=</samp>, <samp>-mabi=</samp>, and <samp>-mfpu=</samp>
752 options and for <samp>-mhard-float</samp> or <samp>-msoft-float</samp>.  As with
753 <samp>--with-cpu</samp>, which switches will be accepted and acceptable values
754 of the arguments depend on the target.
755 </p>
756 </dd>
757 <dt><code>--with-mode=<var>mode</var></code></dt>
758 <dd><p>Specify if the compiler should default to <samp>-marm</samp> or <samp>-mthumb</samp>.
759 This option is only supported on ARM targets.
760 </p>
761 </dd>
762 <dt><code>--with-stack-offset=<var>num</var></code></dt>
763 <dd><p>This option sets the default for the -mstack-offset=<var>num</var> option,
764 and will thus generally also control the setting of this option for
765 libraries.  This option is only supported on Epiphany targets.
766 </p>
767 </dd>
768 <dt><code>--with-fpmath=<var>isa</var></code></dt>
769 <dd><p>This options sets <samp>-mfpmath=sse</samp> by default and specifies the default
770 ISA for floating-point arithmetics.  You can select either &lsquo;<samp>sse</samp>&rsquo; which
771 enables <samp>-msse2</samp> or &lsquo;<samp>avx</samp>&rsquo; which enables <samp>-mavx</samp> by default.
772 This option is only supported on i386 and x86-64 targets.
773 </p>
774 </dd>
775 <dt><code>--with-divide=<var>type</var></code></dt>
776 <dd><p>Specify how the compiler should generate code for checking for
777 division by zero.  This option is only supported on the MIPS target.
778 The possibilities for <var>type</var> are:
779 </p><dl compact="compact">
780 <dt><code>traps</code></dt>
781 <dd><p>Division by zero checks use conditional traps (this is the default on
782 systems that support conditional traps).
783 </p></dd>
784 <dt><code>breaks</code></dt>
785 <dd><p>Division by zero checks use the break instruction.
786 </p></dd>
787 </dl>
788
789
790 </dd>
791 <dt><code>--with-llsc</code></dt>
792 <dd><p>On MIPS targets, make <samp>-mllsc</samp> the default when no
793 <samp>-mno-llsc</samp> option is passed.  This is the default for
794 Linux-based targets, as the kernel will emulate them if the ISA does
795 not provide them.
796 </p>
797 </dd>
798 <dt><code>--without-llsc</code></dt>
799 <dd><p>On MIPS targets, make <samp>-mno-llsc</samp> the default when no
800 <samp>-mllsc</samp> option is passed.
801 </p>
802 </dd>
803 <dt><code>--with-synci</code></dt>
804 <dd><p>On MIPS targets, make <samp>-msynci</samp> the default when no
805 <samp>-mno-synci</samp> option is passed.
806 </p>
807 </dd>
808 <dt><code>--without-synci</code></dt>
809 <dd><p>On MIPS targets, make <samp>-mno-synci</samp> the default when no
810 <samp>-msynci</samp> option is passed.  This is the default.
811 </p>
812 </dd>
813 <dt><code>--with-mips-plt</code></dt>
814 <dd><p>On MIPS targets, make use of copy relocations and PLTs.
815 These features are extensions to the traditional
816 SVR4-based MIPS ABIs and require support from GNU binutils
817 and the runtime C library.
818 </p>
819 </dd>
820 <dt><code>--enable-__cxa_atexit</code></dt>
821 <dd><p>Define if you want to use __cxa_atexit, rather than atexit, to
822 register C++ destructors for local statics and global objects.
823 This is essential for fully standards-compliant handling of
824 destructors, but requires __cxa_atexit in libc.  This option is currently
825 only available on systems with GNU libc.  When enabled, this will cause
826 <samp>-fuse-cxa-atexit</samp> to be passed by default.
827 </p>
828 </dd>
829 <dt><code>--enable-gnu-indirect-function</code></dt>
830 <dd><p>Define if you want to enable the <code>ifunc</code> attribute.  This option is
831 currently only available on systems with GNU libc on certain targets.
832 </p>
833 </dd>
834 <dt><code>--enable-target-optspace</code></dt>
835 <dd><p>Specify that target
836 libraries should be optimized for code space instead of code speed.
837 This is the default for the m32r platform.
838 </p>
839 </dd>
840 <dt><code>--with-cpp-install-dir=<var>dirname</var></code></dt>
841 <dd><p>Specify that the user visible <code>cpp</code> program should be installed
842 in <samp><var>prefix</var>/<var>dirname</var>/cpp</samp>, in addition to <var>bindir</var>.
843 </p>
844 </dd>
845 <dt><code>--enable-comdat</code></dt>
846 <dd><p>Enable COMDAT group support.  This is primarily used to override the
847 automatically detected value.
848 </p>
849 </dd>
850 <dt><code>--enable-initfini-array</code></dt>
851 <dd><p>Force the use of sections <code>.init_array</code> and <code>.fini_array</code>
852 (instead of <code>.init</code> and <code>.fini</code>) for constructors and
853 destructors.  Option <samp>--disable-initfini-array</samp> has the
854 opposite effect.  If neither option is specified, the configure script
855 will try to guess whether the <code>.init_array</code> and
856 <code>.fini_array</code> sections are supported and, if they are, use them.
857 </p>
858 </dd>
859 <dt><code>--enable-maintainer-mode</code></dt>
860 <dd><p>The build rules that regenerate the Autoconf and Automake output files as
861 well as the GCC master message catalog <samp>gcc.pot</samp> are normally
862 disabled.  This is because it can only be rebuilt if the complete source
863 tree is present.  If you have changed the sources and want to rebuild the
864 catalog, configuring with <samp>--enable-maintainer-mode</samp> will enable
865 this.  Note that you need a recent version of the <code>gettext</code> tools
866 to do so.
867 </p>
868 </dd>
869 <dt><code>--disable-bootstrap</code></dt>
870 <dd><p>For a native build, the default configuration is to perform
871 a 3-stage bootstrap of the compiler when &lsquo;<samp>make</samp>&rsquo; is invoked,
872 testing that GCC can compile itself correctly.  If you want to disable
873 this process, you can configure with <samp>--disable-bootstrap</samp>.
874 </p>
875 </dd>
876 <dt><code>--enable-bootstrap</code></dt>
877 <dd><p>In special cases, you may want to perform a 3-stage build
878 even if the target and host triplets are different.
879 This is possible when the host can run code compiled for
880 the target (e.g. host is i686-linux, target is i486-linux).
881 Starting from GCC 4.2, to do this you have to configure explicitly
882 with <samp>--enable-bootstrap</samp>.
883 </p>
884 </dd>
885 <dt><code>--enable-generated-files-in-srcdir</code></dt>
886 <dd><p>Neither the .c and .h files that are generated from Bison and flex nor the
887 info manuals and man pages that are built from the .texi files are present
888 in the SVN development tree.  When building GCC from that development tree,
889 or from one of our snapshots, those generated files are placed in your
890 build directory, which allows for the source to be in a readonly
891 directory.
892 </p>
893 <p>If you configure with <samp>--enable-generated-files-in-srcdir</samp> then those
894 generated files will go into the source directory.  This is mainly intended
895 for generating release or prerelease tarballs of the GCC sources, since it
896 is not a requirement that the users of source releases to have flex, Bison,
897 or makeinfo.
898 </p>
899 </dd>
900 <dt><code>--enable-version-specific-runtime-libs</code></dt>
901 <dd><p>Specify
902 that runtime libraries should be installed in the compiler specific
903 subdirectory (<samp><var>libdir</var>/gcc</samp>) rather than the usual places.  In
904 addition, &lsquo;<samp>libstdc++</samp>&rsquo;&rsquo;s include files will be installed into
905 <samp><var>libdir</var></samp> unless you overruled it by using
906 <samp>--with-gxx-include-dir=<var>dirname</var></samp>.  Using this option is
907 particularly useful if you intend to use several versions of GCC in
908 parallel.  This is currently supported by &lsquo;<samp>libgfortran</samp>&rsquo;,
909 &lsquo;<samp>libjava</samp>&rsquo;, &lsquo;<samp>libmudflap</samp>&rsquo;, &lsquo;<samp>libstdc++</samp>&rsquo;, and &lsquo;<samp>libobjc</samp>&rsquo;.
910 </p>
911 </dd>
912 <dt><code>--enable-languages=<var>lang1</var>,<var>lang2</var>,&hellip;</code></dt>
913 <dd><p>Specify that only a particular subset of compilers and
914 their runtime libraries should be built.  For a list of valid values for
915 <var>langN</var> you can issue the following command in the
916 <samp>gcc</samp> directory of your GCC source tree:<br>
917 </p><div class="smallexample">
918 <pre class="smallexample">grep language= */config-lang.in
919 </pre></div>
920 <p>Currently, you can use any of the following:
921 <code>all</code>, <code>ada</code>, <code>c</code>, <code>c++</code>, <code>fortran</code>,
922 <code>go</code>, <code>java</code>, <code>objc</code>, <code>obj-c++</code>.
923 Building the Ada compiler has special requirements, see below.
924 If you do not pass this flag, or specify the option <code>all</code>, then all
925 default languages available in the <samp>gcc</samp> sub-tree will be configured.
926 Ada, Go and Objective-C++ are not default languages; the rest are.
927 </p>
928 </dd>
929 <dt><code>--enable-stage1-languages=<var>lang1</var>,<var>lang2</var>,&hellip;</code></dt>
930 <dd><p>Specify that a particular subset of compilers and their runtime
931 libraries should be built with the system C compiler during stage 1 of
932 the bootstrap process, rather than only in later stages with the
933 bootstrapped C compiler.  The list of valid values is the same as for
934 <samp>--enable-languages</samp>, and the option <code>all</code> will select all
935 of the languages enabled by <samp>--enable-languages</samp>.  This option is
936 primarily useful for GCC development; for instance, when a development
937 version of the compiler cannot bootstrap due to compiler bugs, or when
938 one is debugging front ends other than the C front end.  When this
939 option is used, one can then build the target libraries for the
940 specified languages with the stage-1 compiler by using <code>make
941 stage1-bubble all-target</code>, or run the testsuite on the stage-1 compiler
942 for the specified languages using <code>make stage1-start check-gcc</code>.
943 </p>
944 </dd>
945 <dt><code>--disable-libada</code></dt>
946 <dd><p>Specify that the run-time libraries and tools used by GNAT should not
947 be built.  This can be useful for debugging, or for compatibility with
948 previous Ada build procedures, when it was required to explicitly
949 do a &lsquo;<samp>make -C gcc gnatlib_and_tools</samp>&rsquo;.
950 </p>
951 </dd>
952 <dt><code>--disable-libssp</code></dt>
953 <dd><p>Specify that the run-time libraries for stack smashing protection
954 should not be built.
955 </p>
956 </dd>
957 <dt><code>--disable-libquadmath</code></dt>
958 <dd><p>Specify that the GCC quad-precision math library should not be built.
959 On some systems, the library is required to be linkable when building
960 the Fortran front end, unless <samp>--disable-libquadmath-support</samp>
961 is used.
962 </p>
963 </dd>
964 <dt><code>--disable-libquadmath-support</code></dt>
965 <dd><p>Specify that the Fortran front end and <code>libgfortran</code> do not add
966 support for <code>libquadmath</code> on systems supporting it.
967 </p>
968 </dd>
969 <dt><code>--disable-libgomp</code></dt>
970 <dd><p>Specify that the run-time libraries used by GOMP should not be built.
971 </p>
972 </dd>
973 <dt><code>--with-dwarf2</code></dt>
974 <dd><p>Specify that the compiler should
975 use DWARF 2 debugging information as the default.
976 </p>
977 </dd>
978 <dt><code>--enable-targets=all</code></dt>
979 <dt><code>--enable-targets=<var>target_list</var></code></dt>
980 <dd><p>Some GCC targets, e.g. powerpc64-linux, build bi-arch compilers.
981 These are compilers that are able to generate either 64-bit or 32-bit
982 code.  Typically, the corresponding 32-bit target, e.g.
983 powerpc-linux for powerpc64-linux, only generates 32-bit code.  This
984 option enables the 32-bit target to be a bi-arch compiler, which is
985 useful when you want a bi-arch compiler that defaults to 32-bit, and
986 you are building a bi-arch or multi-arch binutils in a combined tree.
987 On mips-linux, this will build a tri-arch compiler (ABI o32/n32/64),
988 defaulted to o32.
989 Currently, this option only affects sparc-linux, powerpc-linux, x86-linux,
990 mips-linux and s390-linux.
991 </p>
992 </dd>
993 <dt><code>--enable-secureplt</code></dt>
994 <dd><p>This option enables <samp>-msecure-plt</samp> by default for powerpc-linux.
995 See &ldquo;RS/6000 and PowerPC Options&rdquo; in the main manual
996 </p>
997 </dd>
998 <dt><code>--enable-cld</code></dt>
999 <dd><p>This option enables <samp>-mcld</samp> by default for 32-bit x86 targets.
1000 See &ldquo;i386 and x86-64 Options&rdquo; in the main manual
1001 </p>
1002 </dd>
1003 <dt><code>--enable-win32-registry</code></dt>
1004 <dt><code>--enable-win32-registry=<var>key</var></code></dt>
1005 <dt><code>--disable-win32-registry</code></dt>
1006 <dd><p>The <samp>--enable-win32-registry</samp> option enables Microsoft Windows-hosted GCC
1007 to look up installations paths in the registry using the following key:
1008 </p>
1009 <div class="smallexample">
1010 <pre class="smallexample"><code>HKEY_LOCAL_MACHINE\SOFTWARE\Free Software Foundation\<var>key</var></code>
1011 </pre></div>
1012
1013 <p><var>key</var> defaults to GCC version number, and can be overridden by the
1014 <samp>--enable-win32-registry=<var>key</var></samp> option.  Vendors and distributors
1015 who use custom installers are encouraged to provide a different key,
1016 perhaps one comprised of vendor name and GCC version number, to
1017 avoid conflict with existing installations.  This feature is enabled
1018 by default, and can be disabled by <samp>--disable-win32-registry</samp>
1019 option.  This option has no effect on the other hosts.
1020 </p>
1021 </dd>
1022 <dt><code>--nfp</code></dt>
1023 <dd><p>Specify that the machine does not have a floating point unit.  This
1024 option only applies to &lsquo;<samp>m68k-sun-sunos<var>n</var></samp>&rsquo;.  On any other
1025 system, <samp>--nfp</samp> has no effect.
1026 </p>
1027 </dd>
1028 <dt><code>--enable-werror</code></dt>
1029 <dt><code>--disable-werror</code></dt>
1030 <dt><code>--enable-werror=yes</code></dt>
1031 <dt><code>--enable-werror=no</code></dt>
1032 <dd><p>When you specify this option, it controls whether certain files in the
1033 compiler are built with <samp>-Werror</samp> in bootstrap stage2 and later.
1034 If you don&rsquo;t specify it, <samp>-Werror</samp> is turned on for the main
1035 development trunk.  However it defaults to off for release branches and
1036 final releases.  The specific files which get <samp>-Werror</samp> are
1037 controlled by the Makefiles.
1038 </p>
1039 </dd>
1040 <dt><code>--enable-checking</code></dt>
1041 <dt><code>--enable-checking=<var>list</var></code></dt>
1042 <dd><p>When you specify this option, the compiler is built to perform internal
1043 consistency checks of the requested complexity.  This does not change the
1044 generated code, but adds error checking within the compiler.  This will
1045 slow down the compiler and may only work properly if you are building
1046 the compiler with GCC.  This is &lsquo;<samp>yes</samp>&rsquo; by default when building
1047 from SVN or snapshots, but &lsquo;<samp>release</samp>&rsquo; for releases.  The default
1048 for building the stage1 compiler is &lsquo;<samp>yes</samp>&rsquo;.  More control
1049 over the checks may be had by specifying <var>list</var>.  The categories of
1050 checks available are &lsquo;<samp>yes</samp>&rsquo; (most common checks
1051 &lsquo;<samp>assert,misc,tree,gc,rtlflag,runtime</samp>&rsquo;), &lsquo;<samp>no</samp>&rsquo; (no checks at
1052 all), &lsquo;<samp>all</samp>&rsquo; (all but &lsquo;<samp>valgrind</samp>&rsquo;), &lsquo;<samp>release</samp>&rsquo; (cheapest
1053 checks &lsquo;<samp>assert,runtime</samp>&rsquo;) or &lsquo;<samp>none</samp>&rsquo; (same as &lsquo;<samp>no</samp>&rsquo;).
1054 Individual checks can be enabled with these flags &lsquo;<samp>assert</samp>&rsquo;,
1055 &lsquo;<samp>df</samp>&rsquo;, &lsquo;<samp>fold</samp>&rsquo;, &lsquo;<samp>gc</samp>&rsquo;, &lsquo;<samp>gcac</samp>&rsquo; &lsquo;<samp>misc</samp>&rsquo;, &lsquo;<samp>rtl</samp>&rsquo;,
1056 &lsquo;<samp>rtlflag</samp>&rsquo;, &lsquo;<samp>runtime</samp>&rsquo;, &lsquo;<samp>tree</samp>&rsquo;, and &lsquo;<samp>valgrind</samp>&rsquo;.
1057 </p>
1058 <p>The &lsquo;<samp>valgrind</samp>&rsquo; check requires the external <code>valgrind</code>
1059 simulator, available from <a href="http://valgrind.org/">http://valgrind.org/</a>.  The
1060 &lsquo;<samp>df</samp>&rsquo;, &lsquo;<samp>rtl</samp>&rsquo;, &lsquo;<samp>gcac</samp>&rsquo; and &lsquo;<samp>valgrind</samp>&rsquo; checks are very expensive.
1061 To disable all checking, &lsquo;<samp>--disable-checking</samp>&rsquo; or
1062 &lsquo;<samp>--enable-checking=none</samp>&rsquo; must be explicitly requested.  Disabling
1063 assertions will make the compiler and runtime slightly faster but
1064 increase the risk of undetected internal errors causing wrong code to be
1065 generated.
1066 </p>
1067 </dd>
1068 <dt><code>--disable-stage1-checking</code></dt>
1069 <dt><code>--enable-stage1-checking</code></dt>
1070 <dt><code>--enable-stage1-checking=<var>list</var></code></dt>
1071 <dd><p>If no <samp>--enable-checking</samp> option is specified the stage1
1072 compiler will be built with &lsquo;<samp>yes</samp>&rsquo; checking enabled, otherwise
1073 the stage1 checking flags are the same as specified by
1074 <samp>--enable-checking</samp>.  To build the stage1 compiler with
1075 different checking options use <samp>--enable-stage1-checking</samp>.
1076 The list of checking options is the same as for <samp>--enable-checking</samp>.
1077 If your system is too slow or too small to bootstrap a released compiler
1078 with checking for stage1 enabled, you can use &lsquo;<samp>--disable-stage1-checking</samp>&rsquo;
1079 to disable checking for the stage1 compiler.
1080 </p>
1081 </dd>
1082 <dt><code>--enable-coverage</code></dt>
1083 <dt><code>--enable-coverage=<var>level</var></code></dt>
1084 <dd><p>With this option, the compiler is built to collect self coverage
1085 information, every time it is run.  This is for internal development
1086 purposes, and only works when the compiler is being built with gcc.  The
1087 <var>level</var> argument controls whether the compiler is built optimized or
1088 not, values are &lsquo;<samp>opt</samp>&rsquo; and &lsquo;<samp>noopt</samp>&rsquo;.  For coverage analysis you
1089 want to disable optimization, for performance analysis you want to
1090 enable optimization.  When coverage is enabled, the default level is
1091 without optimization.
1092 </p>
1093 </dd>
1094 <dt><code>--enable-gather-detailed-mem-stats</code></dt>
1095 <dd><p>When this option is specified more detailed information on memory
1096 allocation is gathered.  This information is printed when using
1097 <samp>-fmem-report</samp>.
1098 </p>
1099 </dd>
1100 <dt><code>--enable-nls</code></dt>
1101 <dt><code>--disable-nls</code></dt>
1102 <dd><p>The <samp>--enable-nls</samp> option enables Native Language Support (NLS),
1103 which lets GCC output diagnostics in languages other than American
1104 English.  Native Language Support is enabled by default if not doing a
1105 canadian cross build.  The <samp>--disable-nls</samp> option disables NLS.
1106 </p>
1107 </dd>
1108 <dt><code>--with-included-gettext</code></dt>
1109 <dd><p>If NLS is enabled, the <samp>--with-included-gettext</samp> option causes the build
1110 procedure to prefer its copy of GNU <code>gettext</code>.
1111 </p>
1112 </dd>
1113 <dt><code>--with-catgets</code></dt>
1114 <dd><p>If NLS is enabled, and if the host lacks <code>gettext</code> but has the
1115 inferior <code>catgets</code> interface, the GCC build procedure normally
1116 ignores <code>catgets</code> and instead uses GCC&rsquo;s copy of the GNU
1117 <code>gettext</code> library.  The <samp>--with-catgets</samp> option causes the
1118 build procedure to use the host&rsquo;s <code>catgets</code> in this situation.
1119 </p>
1120 </dd>
1121 <dt><code>--with-libiconv-prefix=<var>dir</var></code></dt>
1122 <dd><p>Search for libiconv header files in <samp><var>dir</var>/include</samp> and
1123 libiconv library files in <samp><var>dir</var>/lib</samp>.
1124 </p>
1125 </dd>
1126 <dt><code>--enable-obsolete</code></dt>
1127 <dd><p>Enable configuration for an obsoleted system.  If you attempt to
1128 configure GCC for a system (build, host, or target) which has been
1129 obsoleted, and you do not specify this flag, configure will halt with an
1130 error message.
1131 </p>
1132 <p>All support for systems which have been obsoleted in one release of GCC
1133 is removed entirely in the next major release, unless someone steps
1134 forward to maintain the port.
1135 </p>
1136 </dd>
1137 <dt><code>--enable-decimal-float</code></dt>
1138 <dt><code>--enable-decimal-float=yes</code></dt>
1139 <dt><code>--enable-decimal-float=no</code></dt>
1140 <dt><code>--enable-decimal-float=bid</code></dt>
1141 <dt><code>--enable-decimal-float=dpd</code></dt>
1142 <dt><code>--disable-decimal-float</code></dt>
1143 <dd><p>Enable (or disable) support for the C decimal floating point extension
1144 that is in the IEEE 754-2008 standard.  This is enabled by default only
1145 on PowerPC, i386, and x86_64 GNU/Linux systems.  Other systems may also
1146 support it, but require the user to specifically enable it.  You can
1147 optionally control which decimal floating point format is used (either
1148 &lsquo;<samp>bid</samp>&rsquo; or &lsquo;<samp>dpd</samp>&rsquo;).  The &lsquo;<samp>bid</samp>&rsquo; (binary integer decimal)
1149 format is default on i386 and x86_64 systems, and the &lsquo;<samp>dpd</samp>&rsquo;
1150 (densely packed decimal) format is default on PowerPC systems.
1151 </p>
1152 </dd>
1153 <dt><code>--enable-fixed-point</code></dt>
1154 <dt><code>--disable-fixed-point</code></dt>
1155 <dd><p>Enable (or disable) support for C fixed-point arithmetic.
1156 This option is enabled by default for some targets (such as MIPS) which
1157 have hardware-support for fixed-point operations.  On other targets, you
1158 may enable this option manually.
1159 </p>
1160 </dd>
1161 <dt><code>--with-long-double-128</code></dt>
1162 <dd><p>Specify if <code>long double</code> type should be 128-bit by default on selected
1163 GNU/Linux architectures.  If using <code>--without-long-double-128</code>,
1164 <code>long double</code> will be by default 64-bit, the same as <code>double</code> type.
1165 When neither of these configure options are used, the default will be
1166 128-bit <code>long double</code> when built against GNU C Library 2.4 and later,
1167 64-bit <code>long double</code> otherwise.
1168 </p>
1169 </dd>
1170 <dt><code>--with-gmp=<var>pathname</var></code></dt>
1171 <dt><code>--with-gmp-include=<var>pathname</var></code></dt>
1172 <dt><code>--with-gmp-lib=<var>pathname</var></code></dt>
1173 <dt><code>--with-mpfr=<var>pathname</var></code></dt>
1174 <dt><code>--with-mpfr-include=<var>pathname</var></code></dt>
1175 <dt><code>--with-mpfr-lib=<var>pathname</var></code></dt>
1176 <dt><code>--with-mpc=<var>pathname</var></code></dt>
1177 <dt><code>--with-mpc-include=<var>pathname</var></code></dt>
1178 <dt><code>--with-mpc-lib=<var>pathname</var></code></dt>
1179 <dd><p>If you want to build GCC but do not have the GMP library, the MPFR
1180 library and/or the MPC library installed in a standard location and
1181 do not have their sources present in the GCC source tree then you
1182 can explicitly specify the directory where they are installed
1183 (&lsquo;<samp>--with-gmp=<var>gmpinstalldir</var></samp>&rsquo;,
1184 &lsquo;<samp>--with-mpfr=<var>mpfrinstalldir</var></samp>&rsquo;,
1185 &lsquo;<samp>--with-mpc=<var>mpcinstalldir</var></samp>&rsquo;).  The
1186 <samp>--with-gmp=<var>gmpinstalldir</var></samp> option is shorthand for
1187 <samp>--with-gmp-lib=<var>gmpinstalldir</var>/lib</samp> and
1188 <samp>--with-gmp-include=<var>gmpinstalldir</var>/include</samp>.  Likewise the
1189 <samp>--with-mpfr=<var>mpfrinstalldir</var></samp> option is shorthand for
1190 <samp>--with-mpfr-lib=<var>mpfrinstalldir</var>/lib</samp> and
1191 <samp>--with-mpfr-include=<var>mpfrinstalldir</var>/include</samp>, also the
1192 <samp>--with-mpc=<var>mpcinstalldir</var></samp> option is shorthand for
1193 <samp>--with-mpc-lib=<var>mpcinstalldir</var>/lib</samp> and
1194 <samp>--with-mpc-include=<var>mpcinstalldir</var>/include</samp>.  If these
1195 shorthand assumptions are not correct, you can use the explicit
1196 include and lib options directly.  You might also need to ensure the
1197 shared libraries can be found by the dynamic linker when building and
1198 using GCC, for example by setting the runtime shared library path
1199 variable (<code>LD_LIBRARY_PATH</code> on GNU/Linux and Solaris systems).
1200 </p>
1201 <p>These flags are applicable to the host platform only.  When building
1202 a cross compiler, they will not be used to configure target libraries.
1203 </p>
1204 </dd>
1205 <dt><code>--with-isl=<var>pathname</var></code></dt>
1206 <dt><code>--with-isl-include=<var>pathname</var></code></dt>
1207 <dt><code>--with-isl-lib=<var>pathname</var></code></dt>
1208 <dt><code>--with-cloog=<var>pathname</var></code></dt>
1209 <dt><code>--with-cloog-include=<var>pathname</var></code></dt>
1210 <dt><code>--with-cloog-lib=<var>pathname</var></code></dt>
1211 <dd><p>If you do not have ISL and the CLooG
1212 libraries installed in a standard location and you want to build GCC,
1213 you can explicitly specify the directory where they are installed
1214 (&lsquo;<samp>--with-isl=<var>islinstalldir</var></samp>&rsquo;,
1215 &lsquo;<samp>--with-cloog=<var>clooginstalldir</var></samp>&rsquo;). The
1216 <samp>--with-isl=<var>islinstalldir</var></samp> option is shorthand for
1217 <samp>--with-isl-lib=<var>islinstalldir</var>/lib</samp> and
1218 <samp>--with-isl-include=<var>islinstalldir</var>/include</samp>.  Likewise the
1219 <samp>--with-cloog=<var>clooginstalldir</var></samp> option is shorthand for
1220 <samp>--with-cloog-lib=<var>clooginstalldir</var>/lib</samp> and
1221 <samp>--with-cloog-include=<var>clooginstalldir</var>/include</samp>.  If these
1222 shorthand assumptions are not correct, you can use the explicit
1223 include and lib options directly.
1224 </p>
1225 <p>These flags are applicable to the host platform only.  When building
1226 a cross compiler, they will not be used to configure target libraries.
1227 </p>
1228 </dd>
1229 <dt><code>--with-host-libstdcxx=<var>linker-args</var></code></dt>
1230 <dd><p>If you are linking with a static copy of PPL, you can use this option
1231 to specify how the linker should find the standard C++ library used
1232 internally by PPL.  Typical values of <var>linker-args</var> might be
1233 &lsquo;<samp>-lstdc++</samp>&rsquo; or &lsquo;<samp>-Wl,-Bstatic,-lstdc++,-Bdynamic -lm</samp>&rsquo;.  If you are
1234 linking with a shared copy of PPL, you probably do not need this
1235 option; shared library dependencies will cause the linker to search
1236 for the standard C++ library automatically.
1237 </p>
1238 </dd>
1239 <dt><code>--with-stage1-ldflags=<var>flags</var></code></dt>
1240 <dd><p>This option may be used to set linker flags to be used when linking
1241 stage 1 of GCC.  These are also used when linking GCC if configured with
1242 <samp>--disable-bootstrap</samp>.  By default no special flags are used.
1243 </p>
1244 </dd>
1245 <dt><code>--with-stage1-libs=<var>libs</var></code></dt>
1246 <dd><p>This option may be used to set libraries to be used when linking stage 1
1247 of GCC.  These are also used when linking GCC if configured with
1248 <samp>--disable-bootstrap</samp>.  The default is the argument to
1249 <samp>--with-host-libstdcxx</samp>, if specified.
1250 </p>
1251 </dd>
1252 <dt><code>--with-boot-ldflags=<var>flags</var></code></dt>
1253 <dd><p>This option may be used to set linker flags to be used when linking
1254 stage 2 and later when bootstrapping GCC.  If neither &ndash;with-boot-libs
1255 nor &ndash;with-host-libstdcxx is set to a value, then the default is
1256 &lsquo;<samp>-static-libstdc++ -static-libgcc</samp>&rsquo;.
1257 </p>
1258 </dd>
1259 <dt><code>--with-boot-libs=<var>libs</var></code></dt>
1260 <dd><p>This option may be used to set libraries to be used when linking stage 2
1261 and later when bootstrapping GCC.  The default is the argument to
1262 <samp>--with-host-libstdcxx</samp>, if specified.
1263 </p>
1264 </dd>
1265 <dt><code>--with-debug-prefix-map=<var>map</var></code></dt>
1266 <dd><p>Convert source directory names using <samp>-fdebug-prefix-map</samp> when
1267 building runtime libraries.  &lsquo;<samp><var>map</var></samp>&rsquo; is a space-separated
1268 list of maps of the form &lsquo;<samp><var>old</var>=<var>new</var></samp>&rsquo;.
1269 </p>
1270 </dd>
1271 <dt><code>--enable-linker-build-id</code></dt>
1272 <dd><p>Tells GCC to pass <samp>--build-id</samp> option to the linker for all final
1273 links (links performed without the <samp>-r</samp> or <samp>--relocatable</samp>
1274 option), if the linker supports it.  If you specify
1275 <samp>--enable-linker-build-id</samp>, but your linker does not
1276 support <samp>--build-id</samp> option, a warning is issued and the
1277 <samp>--enable-linker-build-id</samp> option is ignored.  The default is off.
1278 </p>
1279 </dd>
1280 <dt><code>--with-linker-hash-style=<var>choice</var></code></dt>
1281 <dd><p>Tells GCC to pass <samp>--hash-style=<var>choice</var></samp> option to the
1282 linker for all final links. <var>choice</var> can be one of
1283 &lsquo;<samp>sysv</samp>&rsquo;, &lsquo;<samp>gnu</samp>&rsquo;, and &lsquo;<samp>both</samp>&rsquo; where &lsquo;<samp>sysv</samp>&rsquo; is the default.
1284 </p>
1285 </dd>
1286 <dt><code>--enable-gnu-unique-object</code></dt>
1287 <dt><code>--disable-gnu-unique-object</code></dt>
1288 <dd><p>Tells GCC to use the gnu_unique_object relocation for C++ template
1289 static data members and inline function local statics.  Enabled by
1290 default for a native toolchain with an assembler that accepts it and
1291 GLIBC 2.11 or above, otherwise disabled.
1292 </p>
1293 </dd>
1294 <dt><code>--enable-lto</code></dt>
1295 <dt><code>--disable-lto</code></dt>
1296 <dd><p>Enable support for link-time optimization (LTO).  This is enabled by
1297 default, and may be disabled using <samp>--disable-lto</samp>.
1298 </p>
1299 </dd>
1300 <dt><code>--with-plugin-ld=<var>pathname</var></code></dt>
1301 <dd><p>Enable an alternate linker to be used at link-time optimization (LTO)
1302 link time when <samp>-fuse-linker-plugin</samp> is enabled.
1303 This linker should have plugin support such as gold starting with
1304 version 2.20 or GNU ld starting with version 2.21.
1305 See <samp>-fuse-linker-plugin</samp> for details.
1306 </p>
1307 </dd>
1308 <dt><code>--enable-canonical-system-headers</code></dt>
1309 <dt><code>--disable-canonical-system-headers</code></dt>
1310 <dd><p>Enable system header path canonicalization for <samp>libcpp</samp>.  This can
1311 produce shorter header file paths in diagnostics and dependency output
1312 files, but these changed header paths may conflict with some compilation
1313 environments.  Enabled by default, and may be disabled using
1314 <samp>--disable-canonical-system-headers</samp>.
1315 </p></dd>
1316 </dl>
1317
1318 <a name="Cross_002dCompiler_002dSpecific-Options"></a>
1319 <h4 class="subheading">Cross-Compiler-Specific Options</h4>
1320 <p>The following options only apply to building cross compilers.
1321 </p>
1322 <dl compact="compact">
1323 <dt><code>--with-sysroot</code></dt>
1324 <dt><code>--with-sysroot=<var>dir</var></code></dt>
1325 <dd><p>Tells GCC to consider <var>dir</var> as the root of a tree that contains
1326 (a subset of) the root filesystem of the target operating system.
1327 Target system headers, libraries and run-time object files will be
1328 searched for in there.  More specifically, this acts as if
1329 <samp>--sysroot=<var>dir</var></samp> was added to the default options of the built
1330 compiler.  The specified directory is not copied into the
1331 install tree, unlike the options <samp>--with-headers</samp> and
1332 <samp>--with-libs</samp> that this option obsoletes.  The default value,
1333 in case <samp>--with-sysroot</samp> is not given an argument, is
1334 <samp>${gcc_tooldir}/sys-root</samp>.  If the specified directory is a
1335 subdirectory of <samp>${exec_prefix}</samp>, then it will be found relative to
1336 the GCC binaries if the installation tree is moved.
1337 </p>
1338 <p>This option affects the system root for the compiler used to build
1339 target libraries (which runs on the build system) and the compiler newly
1340 installed with <code>make install</code>; it does not affect the compiler which is
1341 used to build GCC itself.
1342 </p>
1343 <p>If you specify the <samp>--with-native-system-header-dir=<var>dirname</var></samp>
1344 option then the compiler will search that directory within <var>dirname</var> for
1345 native system headers rather than the default <samp>/usr/include</samp>.
1346 </p>
1347 </dd>
1348 <dt><code>--with-build-sysroot</code></dt>
1349 <dt><code>--with-build-sysroot=<var>dir</var></code></dt>
1350 <dd><p>Tells GCC to consider <var>dir</var> as the system root (see
1351 <samp>--with-sysroot</samp>) while building target libraries, instead of
1352 the directory specified with <samp>--with-sysroot</samp>.  This option is
1353 only useful when you are already using <samp>--with-sysroot</samp>.  You
1354 can use <samp>--with-build-sysroot</samp> when you are configuring with
1355 <samp>--prefix</samp> set to a directory that is different from the one in
1356 which you are installing GCC and your target libraries.
1357 </p>
1358 <p>This option affects the system root for the compiler used to build
1359 target libraries (which runs on the build system); it does not affect
1360 the compiler which is used to build GCC itself.
1361 </p>
1362 <p>If you specify the <samp>--with-native-system-header-dir=<var>dirname</var></samp>
1363 option then the compiler will search that directory within <var>dirname</var> for
1364 native system headers rather than the default <samp>/usr/include</samp>.
1365 </p>
1366 </dd>
1367 <dt><code>--with-headers</code></dt>
1368 <dt><code>--with-headers=<var>dir</var></code></dt>
1369 <dd><p>Deprecated in favor of <samp>--with-sysroot</samp>.
1370 Specifies that target headers are available when building a cross compiler.
1371 The <var>dir</var> argument specifies a directory which has the target include
1372 files.  These include files will be copied into the <samp>gcc</samp> install
1373 directory.  <em>This option with the <var>dir</var> argument is required</em> when
1374 building a cross compiler, if <samp><var>prefix</var>/<var>target</var>/sys-include</samp>
1375 doesn&rsquo;t pre-exist.  If <samp><var>prefix</var>/<var>target</var>/sys-include</samp> does
1376 pre-exist, the <var>dir</var> argument may be omitted.  <code>fixincludes</code>
1377 will be run on these files to make them compatible with GCC.
1378 </p>
1379 </dd>
1380 <dt><code>--without-headers</code></dt>
1381 <dd><p>Tells GCC not use any target headers from a libc when building a cross
1382 compiler.  When crossing to GNU/Linux, you need the headers so GCC
1383 can build the exception handling for libgcc.
1384 </p>
1385 </dd>
1386 <dt><code>--with-libs</code></dt>
1387 <dt><code>--with-libs=&quot;<var>dir1</var> <var>dir2</var> &hellip; <var>dirN</var>&quot;</code></dt>
1388 <dd><p>Deprecated in favor of <samp>--with-sysroot</samp>.
1389 Specifies a list of directories which contain the target runtime
1390 libraries.  These libraries will be copied into the <samp>gcc</samp> install
1391 directory.  If the directory list is omitted, this option has no
1392 effect.
1393 </p>
1394 </dd>
1395 <dt><code>--with-newlib</code></dt>
1396 <dd><p>Specifies that &lsquo;<samp>newlib</samp>&rsquo; is
1397 being used as the target C library.  This causes <code>__eprintf</code> to be
1398 omitted from <samp>libgcc.a</samp> on the assumption that it will be provided by
1399 &lsquo;<samp>newlib</samp>&rsquo;.
1400 </p>
1401 </dd>
1402 <dt><code>--with-avrlibc</code></dt>
1403 <dd><p>Specifies that &lsquo;<samp>AVR-Libc</samp>&rsquo; is
1404 being used as the target C library.  This causes float support
1405 functions like <code>__addsf3</code> to be omitted from <samp>libgcc.a</samp> on
1406 the assumption that it will be provided by <samp>libm.a</samp>.  For more
1407 technical details, cf. <a href="http://gcc.gnu.org/PR54461">PR54461</a>.
1408 This option is only supported for the AVR target.  It is not supported for
1409 RTEMS configurations, which currently use newlib.  The option is
1410 supported since version 4.7.2 and is the default in 4.8.0 and newer.
1411 </p>
1412 </dd>
1413 <dt><code>--with-build-time-tools=<var>dir</var></code></dt>
1414 <dd><p>Specifies where to find the set of target tools (assembler, linker, etc.)
1415 that will be used while building GCC itself.  This option can be useful
1416 if the directory layouts are different between the system you are building
1417 GCC on, and the system where you will deploy it.
1418 </p>
1419 <p>For example, on an &lsquo;<samp>ia64-hp-hpux</samp>&rsquo; system, you may have the GNU
1420 assembler and linker in <samp>/usr/bin</samp>, and the native tools in a
1421 different path, and build a toolchain that expects to find the
1422 native tools in <samp>/usr/bin</samp>.
1423 </p>
1424 <p>When you use this option, you should ensure that <var>dir</var> includes
1425 <code>ar</code>, <code>as</code>, <code>ld</code>, <code>nm</code>,
1426 <code>ranlib</code> and <code>strip</code> if necessary, and possibly
1427 <code>objdump</code>.  Otherwise, GCC may use an inconsistent set of
1428 tools.
1429 </p></dd>
1430 </dl>
1431
1432 <a name="Java_002dSpecific-Options"></a>
1433 <h4 class="subheading">Java-Specific Options</h4>
1434
1435 <p>The following option applies to the build of the Java front end.
1436 </p>
1437 <dl compact="compact">
1438 <dt><code>--disable-libgcj</code></dt>
1439 <dd><p>Specify that the run-time libraries
1440 used by GCJ should not be built.  This is useful in case you intend
1441 to use GCJ with some other run-time, or you&rsquo;re going to install it
1442 separately, or it just happens not to build on your particular
1443 machine.  In general, if the Java front end is enabled, the GCJ
1444 libraries will be enabled too, unless they&rsquo;re known to not work on
1445 the target platform.  If GCJ is enabled but &lsquo;<samp>libgcj</samp>&rsquo; isn&rsquo;t built, you
1446 may need to port it; in this case, before modifying the top-level
1447 <samp>configure.in</samp> so that &lsquo;<samp>libgcj</samp>&rsquo; is enabled by default on this platform,
1448 you may use <samp>--enable-libgcj</samp> to override the default.
1449 </p>
1450 </dd>
1451 </dl>
1452
1453 <p>The following options apply to building &lsquo;<samp>libgcj</samp>&rsquo;.
1454 </p>
1455 <a name="General-Options"></a>
1456 <h4 class="subsubheading">General Options</h4>
1457
1458 <dl compact="compact">
1459 <dt><code>--enable-java-maintainer-mode</code></dt>
1460 <dd><p>By default the &lsquo;<samp>libjava</samp>&rsquo; build will not attempt to compile the
1461 <samp>.java</samp> source files to <samp>.class</samp>.  Instead, it will use the
1462 <samp>.class</samp> files from the source tree.  If you use this option you
1463 must have executables named <code>ecj1</code> and <code>gjavah</code> in your path
1464 for use by the build.  You must use this option if you intend to
1465 modify any <samp>.java</samp> files in <samp>libjava</samp>.
1466 </p>
1467 </dd>
1468 <dt><code>--with-java-home=<var>dirname</var></code></dt>
1469 <dd><p>This &lsquo;<samp>libjava</samp>&rsquo; option overrides the default value of the
1470 &lsquo;<samp>java.home</samp>&rsquo; system property.  It is also used to set
1471 &lsquo;<samp>sun.boot.class.path</samp>&rsquo; to <samp><var>dirname</var>/lib/rt.jar</samp>.  By
1472 default &lsquo;<samp>java.home</samp>&rsquo; is set to <samp><var>prefix</var></samp> and
1473 &lsquo;<samp>sun.boot.class.path</samp>&rsquo; to
1474 <samp><var>datadir</var>/java/libgcj-<var>version</var>.jar</samp>.
1475 </p>
1476 </dd>
1477 <dt><code>--with-ecj-jar=<var>filename</var></code></dt>
1478 <dd><p>This option can be used to specify the location of an external jar
1479 file containing the Eclipse Java compiler.  A specially modified
1480 version of this compiler is used by <code>gcj</code> to parse
1481 <samp>.java</samp> source files.  If this option is given, the
1482 &lsquo;<samp>libjava</samp>&rsquo; build will create and install an <samp>ecj1</samp> executable
1483 which uses this jar file at runtime.
1484 </p>
1485 <p>If this option is not given, but an <samp>ecj.jar</samp> file is found in
1486 the topmost source tree at configure time, then the &lsquo;<samp>libgcj</samp>&rsquo;
1487 build will create and install <samp>ecj1</samp>, and will also install the
1488 discovered <samp>ecj.jar</samp> into a suitable place in the install tree.
1489 </p>
1490 <p>If <samp>ecj1</samp> is not installed, then the user will have to supply one
1491 on his path in order for <code>gcj</code> to properly parse <samp>.java</samp>
1492 source files.  A suitable jar is available from
1493 <a href="ftp://sourceware.org/pub/java/">ftp://sourceware.org/pub/java/</a>.
1494 </p>
1495 </dd>
1496 <dt><code>--disable-getenv-properties</code></dt>
1497 <dd><p>Don&rsquo;t set system properties from <code>GCJ_PROPERTIES</code>.
1498 </p>
1499 </dd>
1500 <dt><code>--enable-hash-synchronization</code></dt>
1501 <dd><p>Use a global hash table for monitor locks.  Ordinarily,
1502 &lsquo;<samp>libgcj</samp>&rsquo;&rsquo;s &lsquo;<samp>configure</samp>&rsquo; script automatically makes
1503 the correct choice for this option for your platform.  Only use
1504 this if you know you need the library to be configured differently.
1505 </p>
1506 </dd>
1507 <dt><code>--enable-interpreter</code></dt>
1508 <dd><p>Enable the Java interpreter.  The interpreter is automatically
1509 enabled by default on all platforms that support it.  This option
1510 is really only useful if you want to disable the interpreter
1511 (using <samp>--disable-interpreter</samp>).
1512 </p>
1513 </dd>
1514 <dt><code>--disable-java-net</code></dt>
1515 <dd><p>Disable java.net.  This disables the native part of java.net only,
1516 using non-functional stubs for native method implementations.
1517 </p>
1518 </dd>
1519 <dt><code>--disable-jvmpi</code></dt>
1520 <dd><p>Disable JVMPI support.
1521 </p>
1522 </dd>
1523 <dt><code>--disable-libgcj-bc</code></dt>
1524 <dd><p>Disable BC ABI compilation of certain parts of libgcj.  By default,
1525 some portions of libgcj are compiled with <samp>-findirect-dispatch</samp>
1526 and <samp>-fno-indirect-classes</samp>, allowing them to be overridden at
1527 run-time.
1528 </p>
1529 <p>If <samp>--disable-libgcj-bc</samp> is specified, libgcj is built without
1530 these options.  This allows the compile-time linker to resolve
1531 dependencies when statically linking to libgcj.  However it makes it
1532 impossible to override the affected portions of libgcj at run-time.
1533 </p>
1534 </dd>
1535 <dt><code>--enable-reduced-reflection</code></dt>
1536 <dd><p>Build most of libgcj with <samp>-freduced-reflection</samp>.  This reduces
1537 the size of libgcj at the expense of not being able to do accurate
1538 reflection on the classes it contains.  This option is safe if you
1539 know that code using libgcj will never use reflection on the standard
1540 runtime classes in libgcj (including using serialization, RMI or CORBA).
1541 </p>
1542 </dd>
1543 <dt><code>--with-ecos</code></dt>
1544 <dd><p>Enable runtime eCos target support.
1545 </p>
1546 </dd>
1547 <dt><code>--without-libffi</code></dt>
1548 <dd><p>Don&rsquo;t use &lsquo;<samp>libffi</samp>&rsquo;.  This will disable the interpreter and JNI
1549 support as well, as these require &lsquo;<samp>libffi</samp>&rsquo; to work.
1550 </p>
1551 </dd>
1552 <dt><code>--enable-libgcj-debug</code></dt>
1553 <dd><p>Enable runtime debugging code.
1554 </p>
1555 </dd>
1556 <dt><code>--enable-libgcj-multifile</code></dt>
1557 <dd><p>If specified, causes all <samp>.java</samp> source files to be
1558 compiled into <samp>.class</samp> files in one invocation of
1559 &lsquo;<samp>gcj</samp>&rsquo;.  This can speed up build time, but is more
1560 resource-intensive.  If this option is unspecified or
1561 disabled, &lsquo;<samp>gcj</samp>&rsquo; is invoked once for each <samp>.java</samp>
1562 file to compile into a <samp>.class</samp> file.
1563 </p>
1564 </dd>
1565 <dt><code>--with-libiconv-prefix=DIR</code></dt>
1566 <dd><p>Search for libiconv in <samp>DIR/include</samp> and <samp>DIR/lib</samp>.
1567 </p>
1568 </dd>
1569 <dt><code>--enable-sjlj-exceptions</code></dt>
1570 <dd><p>Force use of the <code>setjmp</code>/<code>longjmp</code>-based scheme for exceptions.
1571 &lsquo;<samp>configure</samp>&rsquo; ordinarily picks the correct value based on the platform.
1572 Only use this option if you are sure you need a different setting.
1573 </p>
1574 </dd>
1575 <dt><code>--with-system-zlib</code></dt>
1576 <dd><p>Use installed &lsquo;<samp>zlib</samp>&rsquo; rather than that included with GCC.
1577 </p>
1578 </dd>
1579 <dt><code>--with-win32-nlsapi=ansi, unicows or unicode</code></dt>
1580 <dd><p>Indicates how MinGW &lsquo;<samp>libgcj</samp>&rsquo; translates between UNICODE
1581 characters and the Win32 API.
1582 </p>
1583 </dd>
1584 <dt><code>--enable-java-home</code></dt>
1585 <dd><p>If enabled, this creates a JPackage compatible SDK environment during install.
1586 Note that if &ndash;enable-java-home is used, &ndash;with-arch-directory=ARCH must also
1587 be specified.
1588 </p>
1589 </dd>
1590 <dt><code>--with-arch-directory=ARCH</code></dt>
1591 <dd><p>Specifies the name to use for the <samp>jre/lib/ARCH</samp> directory in the SDK
1592 environment created when &ndash;enable-java-home is passed. Typical names for this
1593 directory include i386, amd64, ia64, etc.
1594 </p>
1595 </dd>
1596 <dt><code>--with-os-directory=DIR</code></dt>
1597 <dd><p>Specifies the OS directory for the SDK include directory. This is set to auto
1598 detect, and is typically &rsquo;linux&rsquo;.
1599 </p>
1600 </dd>
1601 <dt><code>--with-origin-name=NAME</code></dt>
1602 <dd><p>Specifies the JPackage origin name. This defaults to the &rsquo;gcj&rsquo; in
1603 java-1.5.0-gcj.
1604 </p>
1605 </dd>
1606 <dt><code>--with-arch-suffix=SUFFIX</code></dt>
1607 <dd><p>Specifies the suffix for the sdk directory. Defaults to the empty string.
1608 Examples include &rsquo;.x86_64&rsquo; in &rsquo;java-1.5.0-gcj-1.5.0.0.x86_64&rsquo;.
1609 </p>
1610 </dd>
1611 <dt><code>--with-jvm-root-dir=DIR</code></dt>
1612 <dd><p>Specifies where to install the SDK. Default is $(prefix)/lib/jvm.
1613 </p>
1614 </dd>
1615 <dt><code>--with-jvm-jar-dir=DIR</code></dt>
1616 <dd><p>Specifies where to install jars. Default is $(prefix)/lib/jvm-exports.
1617 </p>
1618 </dd>
1619 <dt><code>--with-python-dir=DIR</code></dt>
1620 <dd><p>Specifies where to install the Python modules used for aot-compile. DIR should
1621 not include the prefix used in installation. For example, if the Python modules
1622 are to be installed in /usr/lib/python2.5/site-packages, then
1623 &ndash;with-python-dir=/lib/python2.5/site-packages should be passed. If this is
1624 not specified, then the Python modules are installed in $(prefix)/share/python.
1625 </p>
1626 </dd>
1627 <dt><code>--enable-aot-compile-rpm</code></dt>
1628 <dd><p>Adds aot-compile-rpm to the list of installed scripts.
1629 </p>
1630 </dd>
1631 <dt><code>--enable-browser-plugin</code></dt>
1632 <dd><p>Build the gcjwebplugin web browser plugin.
1633 </p>
1634 </dd>
1635 <dt><code>--enable-static-libjava</code></dt>
1636 <dd><p>Build static libraries in libjava. The default is to only build shared
1637 libraries.
1638 </p>
1639 <dl compact="compact">
1640 <dt><code>ansi</code></dt>
1641 <dd><p>Use the single-byte <code>char</code> and the Win32 A functions natively,
1642 translating to and from UNICODE when using these functions.  If
1643 unspecified, this is the default.
1644 </p>
1645 </dd>
1646 <dt><code>unicows</code></dt>
1647 <dd><p>Use the <code>WCHAR</code> and Win32 W functions natively.  Adds
1648 <code>-lunicows</code> to <samp>libgcj.spec</samp> to link with &lsquo;<samp>libunicows</samp>&rsquo;.
1649 <samp>unicows.dll</samp> needs to be deployed on Microsoft Windows 9X machines
1650 running built executables.  <samp>libunicows.a</samp>, an open-source
1651 import library around Microsoft&rsquo;s <code>unicows.dll</code>, is obtained from
1652 <a href="http://libunicows.sourceforge.net/">http://libunicows.sourceforge.net/</a>, which also gives details
1653 on getting <samp>unicows.dll</samp> from Microsoft.
1654 </p>
1655 </dd>
1656 <dt><code>unicode</code></dt>
1657 <dd><p>Use the <code>WCHAR</code> and Win32 W functions natively.  Does <em>not</em>
1658 add <code>-lunicows</code> to <samp>libgcj.spec</samp>.  The built executables will
1659 only run on Microsoft Windows NT and above.
1660 </p></dd>
1661 </dl>
1662 </dd>
1663 </dl>
1664
1665 <a name="AWT_002dSpecific-Options"></a>
1666 <h4 class="subsubheading">AWT-Specific Options</h4>
1667
1668 <dl compact="compact">
1669 <dt><code>--with-x</code></dt>
1670 <dd><p>Use the X Window System.
1671 </p>
1672 </dd>
1673 <dt><code>--enable-java-awt=PEER(S)</code></dt>
1674 <dd><p>Specifies the AWT peer library or libraries to build alongside
1675 &lsquo;<samp>libgcj</samp>&rsquo;.  If this option is unspecified or disabled, AWT
1676 will be non-functional.  Current valid values are <samp>gtk</samp> and
1677 <samp>xlib</samp>.  Multiple libraries should be separated by a
1678 comma (i.e. <samp>--enable-java-awt=gtk,xlib</samp>).
1679 </p>
1680 </dd>
1681 <dt><code>--enable-gtk-cairo</code></dt>
1682 <dd><p>Build the cairo Graphics2D implementation on GTK.
1683 </p>
1684 </dd>
1685 <dt><code>--enable-java-gc=TYPE</code></dt>
1686 <dd><p>Choose garbage collector.  Defaults to <samp>boehm</samp> if unspecified.
1687 </p>
1688 </dd>
1689 <dt><code>--disable-gtktest</code></dt>
1690 <dd><p>Do not try to compile and run a test GTK+ program.
1691 </p>
1692 </dd>
1693 <dt><code>--disable-glibtest</code></dt>
1694 <dd><p>Do not try to compile and run a test GLIB program.
1695 </p>
1696 </dd>
1697 <dt><code>--with-libart-prefix=PFX</code></dt>
1698 <dd><p>Prefix where libart is installed (optional).
1699 </p>
1700 </dd>
1701 <dt><code>--with-libart-exec-prefix=PFX</code></dt>
1702 <dd><p>Exec prefix where libart is installed (optional).
1703 </p>
1704 </dd>
1705 <dt><code>--disable-libarttest</code></dt>
1706 <dd><p>Do not try to compile and run a test libart program.
1707 </p>
1708 </dd>
1709 </dl>
1710
1711 <a name="Overriding-configure-test-results"></a>
1712 <h4 class="subsubheading">Overriding <code>configure</code> test results</h4>
1713
1714 <p>Sometimes, it might be necessary to override the result of some
1715 <code>configure</code> test, for example in order to ease porting to a new
1716 system or work around a bug in a test.  The toplevel <code>configure</code>
1717 script provides three variables for this:
1718 </p>
1719 <dl compact="compact">
1720 <dt><code>build_configargs</code></dt>
1721 <dd><a name="index-build_005fconfigargs"></a>
1722 <p>The contents of this variable is passed to all build <code>configure</code>
1723 scripts.
1724 </p>
1725 </dd>
1726 <dt><code>host_configargs</code></dt>
1727 <dd><a name="index-host_005fconfigargs"></a>
1728 <p>The contents of this variable is passed to all host <code>configure</code>
1729 scripts.
1730 </p>
1731 </dd>
1732 <dt><code>target_configargs</code></dt>
1733 <dd><a name="index-target_005fconfigargs"></a>
1734 <p>The contents of this variable is passed to all target <code>configure</code>
1735 scripts.
1736 </p>
1737 </dd>
1738 </dl>
1739
1740 <p>In order to avoid shell and <code>make</code> quoting issues for complex
1741 overrides, you can pass a setting for <code>CONFIG_SITE</code> and set
1742 variables in the site file.
1743 </p>
1744 <hr />
1745 <p><p><a href="./index.html">Return to the GCC Installation page</a>
1746 </p>
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758 </body>
1759 </html>