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