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