configure.html revision 1.11
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-2018 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 6.5, http://www.gnu.org/software/texinfo/ --> 23<head> 24<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 25<title>Installing GCC</title> 26 27<meta name="description" content="Installing GCC"> 28<meta name="keywords" content="Installing GCC"> 29<meta name="resource-type" content="document"> 30<meta name="distribution" content="global"> 31<meta name="Generator" content="makeinfo"> 32<style type="text/css"> 33<!-- 34a.summary-letter {text-decoration: none} 35blockquote.indentedblock {margin-right: 0em} 36blockquote.smallindentedblock {margin-right: 0em; font-size: smaller} 37blockquote.smallquotation {font-size: smaller} 38div.display {margin-left: 3.2em} 39div.example {margin-left: 3.2em} 40div.lisp {margin-left: 3.2em} 41div.smalldisplay {margin-left: 3.2em} 42div.smallexample {margin-left: 3.2em} 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.nolinebreak {white-space: nowrap} 54span.roman {font-family: initial; font-weight: normal} 55span.sansserif {font-family: sans-serif; font-weight: normal} 56ul.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. 88This document describes the recommended configuration procedure 89for both native and cross targets. 90</p> 91<p>We use <var>srcdir</var> to refer to the toplevel source directory for 92GCC; we use <var>objdir</var> to refer to the toplevel build/object directory. 93</p> 94<p>If you obtained the sources by cloning the repository, <var>srcdir</var> 95must refer to the top <samp>gcc</samp> directory, the one where the 96<samp>MAINTAINERS</samp> file can be found, and not its <samp>gcc</samp> 97subdirectory, 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-gcc-major-version-only</code></dt> 412<dd><p>Specifies that GCC should use only the major number rather than 413<var>major</var>.<var>minor</var>.<var>patchlevel</var> in filesystem paths. 414</p> 415</dd> 416<dt><code>--with-native-system-header-dir=<var>dirname</var></code></dt> 417<dd><p>Specifies that <var>dirname</var> is the directory that contains native system 418header files, rather than <samp>/usr/include</samp>. This option is most useful 419if you are creating a compiler that should be isolated from the system 420as much as possible. It is most commonly used with the 421<samp>--with-sysroot</samp> option and will cause GCC to search 422<var>dirname</var> inside the system root specified by that option. 423</p> 424</dd> 425<dt><code>--enable-shared[=<var>package</var>[,…]]</code></dt> 426<dd><p>Build shared versions of libraries, if shared libraries are supported on 427the target platform. Unlike GCC 2.95.x and earlier, shared libraries 428are enabled by default on all platforms that support shared libraries. 429</p> 430<p>If a list of packages is given as an argument, build shared libraries 431only for the listed packages. For other packages, only static libraries 432will be built. Package names currently recognized in the GCC tree are 433‘<samp>libgcc</samp>’ (also known as ‘<samp>gcc</samp>’), ‘<samp>libstdc++</samp>’ (not 434‘<samp>libstdc++-v3</samp>’), ‘<samp>libffi</samp>’, ‘<samp>zlib</samp>’, ‘<samp>boehm-gc</samp>’, 435‘<samp>ada</samp>’, ‘<samp>libada</samp>’, ‘<samp>libgo</samp>’, and ‘<samp>libobjc</samp>’. 436Note ‘<samp>libiberty</samp>’ does not support shared libraries at all. 437</p> 438<p>Use <samp>--disable-shared</samp> to build only static libraries. Note that 439<samp>--disable-shared</samp> does not accept a list of package names as 440argument, only <samp>--enable-shared</samp> does. 441</p> 442<p>Contrast with <samp>--enable-host-shared</samp>, which affects <em>host</em> 443code. 444</p> 445</dd> 446<dt><code>--enable-host-shared</code></dt> 447<dd><p>Specify that the <em>host</em> code should be built into position-independent 448machine code (with -fPIC), allowing it to be used within shared libraries, 449but yielding a slightly slower compiler. 450</p> 451<p>This option is required when building the libgccjit.so library. 452</p> 453<p>Contrast with <samp>--enable-shared</samp>, which affects <em>target</em> 454libraries. 455</p> 456</dd> 457<dt><code><a name="with-gnu-as"></a>--with-gnu-as</code></dt> 458<dd><p>Specify that the compiler should assume that the 459assembler it finds is the GNU assembler. However, this does not modify 460the rules to find an assembler and will result in confusion if the 461assembler found is not actually the GNU assembler. (Confusion may also 462result if the compiler finds the GNU assembler but has not been 463configured with <samp>--with-gnu-as</samp>.) If you have more than one 464assembler installed on your system, you may want to use this option in 465connection with <samp>--with-as=<var>pathname</var></samp> or 466<samp>--with-build-time-tools=<var>pathname</var></samp>. 467</p> 468<p>The following systems are the only ones where it makes a difference 469whether you use the GNU assembler. On any other system, 470<samp>--with-gnu-as</samp> has no effect. 471</p> 472<ul> 473<li> ‘<samp>hppa1.0-<var>any</var>-<var>any</var></samp>’ 474</li><li> ‘<samp>hppa1.1-<var>any</var>-<var>any</var></samp>’ 475</li><li> ‘<samp>sparc-sun-solaris2.<var>any</var></samp>’ 476</li><li> ‘<samp>sparc64-<var>any</var>-solaris2.<var>any</var></samp>’ 477</li></ul> 478 479</dd> 480<dt><code><a name="with-as"></a>--with-as=<var>pathname</var></code></dt> 481<dd><p>Specify that the compiler should use the assembler pointed to by 482<var>pathname</var>, rather than the one found by the standard rules to find 483an assembler, which are: 484</p><ul> 485<li> Unless GCC is being built with a cross compiler, check the 486<samp><var>libexec</var>/gcc/<var>target</var>/<var>version</var></samp> directory. 487<var>libexec</var> defaults to <samp><var>exec-prefix</var>/libexec</samp>; 488<var>exec-prefix</var> defaults to <var>prefix</var>, which 489defaults to <samp>/usr/local</samp> unless overridden by the 490<samp>--prefix=<var>pathname</var></samp> switch described above. <var>target</var> 491is the target system triple, such as ‘<samp>sparc-sun-solaris2.7</samp>’, and 492<var>version</var> denotes the GCC version, such as 3.0. 493 494</li><li> If the target system is the same that you are building on, check 495operating system specific directories (e.g. <samp>/usr/ccs/bin</samp> on 496Sun Solaris 2). 497 498</li><li> Check in the <code>PATH</code> for a tool whose name is prefixed by the 499target system triple. 500 501</li><li> Check in the <code>PATH</code> for a tool whose name is not prefixed by the 502target system triple, if the host and target system triple are 503the same (in other words, we use a host tool if it can be used for 504the target as well). 505</li></ul> 506 507<p>You may want to use <samp>--with-as</samp> if no assembler 508is installed in the directories listed above, or if you have multiple 509assemblers installed and want to choose one that is not found by the 510above rules. 511</p> 512</dd> 513<dt><code><a name="with-gnu-ld"></a>--with-gnu-ld</code></dt> 514<dd><p>Same as <a href="#with-gnu-as"><samp>--with-gnu-as</samp></a> 515but for the linker. 516</p> 517</dd> 518<dt><code>--with-ld=<var>pathname</var></code></dt> 519<dd><p>Same as <a href="#with-as"><samp>--with-as</samp></a> 520but for the linker. 521</p> 522</dd> 523<dt><code>--with-stabs</code></dt> 524<dd><p>Specify that stabs debugging 525information should be used instead of whatever format the host normally 526uses. Normally GCC uses the same debug format as the host system. 527</p> 528</dd> 529<dt><code>--with-tls=<var>dialect</var></code></dt> 530<dd><p>Specify the default TLS dialect, for systems were there is a choice. 531For ARM targets, possible values for <var>dialect</var> are <code>gnu</code> or 532<code>gnu2</code>, which select between the original GNU dialect and the GNU TLS 533descriptor-based dialect. 534</p> 535</dd> 536<dt><code>--enable-multiarch</code></dt> 537<dd><p>Specify whether to enable or disable multiarch support. The default is 538to check for glibc start files in a multiarch location, and enable it 539if the files are found. The auto detection is enabled for native builds, 540and for cross builds configured with <samp>--with-sysroot</samp>, and without 541<samp>--with-native-system-header-dir</samp>. 542More documentation about multiarch can be found at 543<a href="https://wiki.debian.org/Multiarch">https://wiki.debian.org/Multiarch</a>. 544</p> 545</dd> 546<dt><code>--enable-sjlj-exceptions</code></dt> 547<dd><p>Force use of the <code>setjmp</code>/<code>longjmp</code>-based scheme for exceptions. 548‘<samp>configure</samp>’ ordinarily picks the correct value based on the platform. 549Only use this option if you are sure you need a different setting. 550</p> 551</dd> 552<dt><code>--enable-vtable-verify</code></dt> 553<dd><p>Specify whether to enable or disable the vtable verification feature. 554Enabling this feature causes libstdc++ to be built with its virtual calls 555in verifiable mode. This means that, when linked with libvtv, every 556virtual call in libstdc++ will verify the vtable pointer through which the 557call will be made before actually making the call. If not linked with libvtv, 558the verifier will call stub functions (in libstdc++ itself) and do nothing. 559If vtable verification is disabled, then libstdc++ is not built with its 560virtual calls in verifiable mode at all. However the libvtv library will 561still be built (see <samp>--disable-libvtv</samp> to turn off building libvtv). 562<samp>--disable-vtable-verify</samp> is the default. 563</p> 564</dd> 565<dt><code>--disable-multilib</code></dt> 566<dd><p>Specify that multiple target 567libraries to support different target variants, calling 568conventions, etc. should not be built. The default is to build a 569predefined set of them. 570</p> 571<p>Some targets provide finer-grained control over which multilibs are built 572(e.g., <samp>--disable-softfloat</samp>): 573</p><dl compact="compact"> 574<dt><code>arm-*-*</code></dt> 575<dd><p>fpu, 26bit, underscore, interwork, biendian, nofmult. 576</p> 577</dd> 578<dt><code>m68*-*-*</code></dt> 579<dd><p>softfloat, m68881, m68000, m68020. 580</p> 581</dd> 582<dt><code>mips*-*-*</code></dt> 583<dd><p>single-float, biendian, softfloat. 584</p> 585</dd> 586<dt><code>powerpc*-*-*, rs6000*-*-*</code></dt> 587<dd><p>aix64, pthread, softfloat, powercpu, powerpccpu, powerpcos, biendian, 588sysv, aix. 589</p> 590</dd> 591</dl> 592 593</dd> 594<dt><code>--with-multilib-list=<var>list</var></code></dt> 595<dt><code>--without-multilib-list</code></dt> 596<dd><p>Specify what multilibs to build. <var>list</var> is a comma separated list of 597values, possibly consisting of a single value. Currently only implemented 598for aarch64*-*-*, arm*-*-*, sh*-*-* and x86-64-*-linux*. The accepted 599alues and meaning for each target is given below. 600</p> 601<dl compact="compact"> 602<dt><code>aarch64*-*-*</code></dt> 603<dd><p><var>list</var> is a comma separated list of <code>ilp32</code>, and <code>lp64</code> 604to enable ILP32 and LP64 run-time libraries, respectively. If 605<var>list</var> is empty, then there will be no multilibs and only the 606default run-time library will be built. If <var>list</var> is 607<code>default</code> or –with-multilib-list= is not specified, then the 608default set of libraries is selected based on the value of 609<samp>--target</samp>. 610</p> 611</dd> 612<dt><code>arm*-*-*</code></dt> 613<dd><p><var>list</var> is a comma separated list of <code>aprofile</code> and <code>rmprofile</code> 614to build multilibs for A or R and M architecture profiles respectively. Note 615that, due to some limitation of the current multilib framework, using the 616combined <code>aprofile,rmprofile</code> multilibs selects in some cases a less 617optimal multilib than when using the multilib profile for the architecture 618targetted. The special value <code>default</code> is also accepted and is equivalent 619to omitting the option, ie. only the default run-time library will be enabled. 620</p> 621<p>The table below gives the combination of ISAs, architectures, FPUs and 622floating-point ABIs for which multilibs are built for each accepted value. 623The union of these options is considered when specifying both <code>aprofile</code> 624and <code>rmprofile</code>. 625</p> 626<table> 627<tr><td width="15%">Option</td><td width="28%">aprofile</td><td width="30%">rmprofile</td></tr> 628<tr><td width="15%">ISAs</td><td width="28%"><code>-marm</code> and <code>-mthumb</code></td><td width="30%"><code>-mthumb</code></td></tr> 629<tr><td width="15%">Architectures<br><br><br><br><br><br></td><td width="28%">default architecture<br> 630<code>-march=armv7-a</code><br> 631<code>-march=armv7ve</code><br> 632<code>-march=armv8-a</code><br><br><br></td><td width="30%">default architecture<br> 633<code>-march=armv6s-m</code><br> 634<code>-march=armv7-m</code><br> 635<code>-march=armv7e-m</code><br> 636<code>-march=armv8-m.base</code><br> 637<code>-march=armv8-m.main</code><br> 638<code>-march=armv7</code></td></tr> 639<tr><td width="15%">FPUs<br><br><br><br><br></td><td width="28%">none<br> 640<code>-mfpu=vfpv3-d16</code><br> 641<code>-mfpu=neon</code><br> 642<code>-mfpu=vfpv4-d16</code><br> 643<code>-mfpu=neon-vfpv4</code><br> 644<code>-mfpu=neon-fp-armv8</code></td><td width="30%">none<br> 645<code>-mfpu=vfpv3-d16</code><br> 646<code>-mfpu=fpv4-sp-d16</code><br> 647<code>-mfpu=fpv5-sp-d16</code><br> 648<code>-mfpu=fpv5-d16</code><br></td></tr> 649<tr><td width="15%">floating-point ABIs<br><br></td><td width="28%"><code>-mfloat-abi=soft</code><br> 650<code>-mfloat-abi=softfp</code><br> 651<code>-mfloat-abi=hard</code></td><td width="30%"><code>-mfloat-abi=soft</code><br> 652<code>-mfloat-abi=softfp</code><br> 653<code>-mfloat-abi=hard</code></td></tr> 654</table> 655 656</dd> 657<dt><code>sh*-*-*</code></dt> 658<dd><p><var>list</var> is a comma separated list of CPU names. These must be of the 659form <code>sh*</code> or <code>m*</code> (in which case they match the compiler option 660for that processor). The list should not contain any endian options - 661these are handled by <samp>--with-endian</samp>. 662</p> 663<p>If <var>list</var> is empty, then there will be no multilibs for extra 664processors. The multilib for the secondary endian remains enabled. 665</p> 666<p>As a special case, if an entry in the list starts with a <code>!</code> 667(exclamation point), then it is added to the list of excluded multilibs. 668Entries of this sort should be compatible with ‘<samp>MULTILIB_EXCLUDES</samp>’ 669(once the leading <code>!</code> has been stripped). 670</p> 671<p>If <samp>--with-multilib-list</samp> is not given, then a default set of 672multilibs is selected based on the value of <samp>--target</samp>. This is 673usually the complete set of libraries, but some targets imply a more 674specialized subset. 675</p> 676<p>Example 1: to configure a compiler for SH4A only, but supporting both 677endians, with little endian being the default: 678</p><div class="smallexample"> 679<pre class="smallexample">--with-cpu=sh4a --with-endian=little,big --with-multilib-list= 680</pre></div> 681 682<p>Example 2: to configure a compiler for both SH4A and SH4AL-DSP, but with 683only little endian SH4AL: 684</p><div class="smallexample"> 685<pre class="smallexample">--with-cpu=sh4a --with-endian=little,big \ 686--with-multilib-list=sh4al,!mb/m4al 687</pre></div> 688 689</dd> 690<dt><code>x86-64-*-linux*</code></dt> 691<dd><p><var>list</var> is a comma separated list of <code>m32</code>, <code>m64</code> and 692<code>mx32</code> to enable 32-bit, 64-bit and x32 run-time libraries, 693respectively. If <var>list</var> is empty, then there will be no multilibs 694and only the default run-time library will be enabled. 695</p> 696<p>If <samp>--with-multilib-list</samp> is not given, then only 32-bit and 69764-bit run-time libraries will be enabled. 698</p></dd> 699</dl> 700 701</dd> 702<dt><code>--with-endian=<var>endians</var></code></dt> 703<dd><p>Specify what endians to use. 704Currently only implemented for sh*-*-*. 705</p> 706<p><var>endians</var> may be one of the following: 707</p><dl compact="compact"> 708<dt><code>big</code></dt> 709<dd><p>Use big endian exclusively. 710</p></dd> 711<dt><code>little</code></dt> 712<dd><p>Use little endian exclusively. 713</p></dd> 714<dt><code>big,little</code></dt> 715<dd><p>Use big endian by default. Provide a multilib for little endian. 716</p></dd> 717<dt><code>little,big</code></dt> 718<dd><p>Use little endian by default. Provide a multilib for big endian. 719</p></dd> 720</dl> 721 722</dd> 723<dt><code>--enable-threads</code></dt> 724<dd><p>Specify that the target 725supports threads. This affects the Objective-C compiler and runtime 726library, and exception handling for other languages like C++. 727On some systems, this is the default. 728</p> 729<p>In general, the best (and, in many cases, the only known) threading 730model available will be configured for use. Beware that on some 731systems, GCC has not been taught what threading models are generally 732available for the system. In this case, <samp>--enable-threads</samp> is an 733alias for <samp>--enable-threads=single</samp>. 734</p> 735</dd> 736<dt><code>--disable-threads</code></dt> 737<dd><p>Specify that threading support should be disabled for the system. 738This is an alias for <samp>--enable-threads=single</samp>. 739</p> 740</dd> 741<dt><code>--enable-threads=<var>lib</var></code></dt> 742<dd><p>Specify that 743<var>lib</var> is the thread support library. This affects the Objective-C 744compiler and runtime library, and exception handling for other languages 745like C++. The possibilities for <var>lib</var> are: 746</p> 747<dl compact="compact"> 748<dt><code>aix</code></dt> 749<dd><p>AIX thread support. 750</p></dd> 751<dt><code>dce</code></dt> 752<dd><p>DCE thread support. 753</p></dd> 754<dt><code>lynx</code></dt> 755<dd><p>LynxOS thread support. 756</p></dd> 757<dt><code>mipssde</code></dt> 758<dd><p>MIPS SDE thread support. 759</p></dd> 760<dt><code>no</code></dt> 761<dd><p>This is an alias for ‘<samp>single</samp>’. 762</p></dd> 763<dt><code>posix</code></dt> 764<dd><p>Generic POSIX/Unix98 thread support. 765</p></dd> 766<dt><code>rtems</code></dt> 767<dd><p>RTEMS thread support. 768</p></dd> 769<dt><code>single</code></dt> 770<dd><p>Disable thread support, should work for all platforms. 771</p></dd> 772<dt><code>tpf</code></dt> 773<dd><p>TPF thread support. 774</p></dd> 775<dt><code>vxworks</code></dt> 776<dd><p>VxWorks thread support. 777</p></dd> 778<dt><code>win32</code></dt> 779<dd><p>Microsoft Win32 API thread support. 780</p></dd> 781</dl> 782 783</dd> 784<dt><code>--enable-tls</code></dt> 785<dd><p>Specify that the target supports TLS (Thread Local Storage). Usually 786configure can correctly determine if TLS is supported. In cases where 787it guesses incorrectly, TLS can be explicitly enabled or disabled with 788<samp>--enable-tls</samp> or <samp>--disable-tls</samp>. This can happen if 789the assembler supports TLS but the C library does not, or if the 790assumptions made by the configure test are incorrect. 791</p> 792</dd> 793<dt><code>--disable-tls</code></dt> 794<dd><p>Specify that the target does not support TLS. 795This is an alias for <samp>--enable-tls=no</samp>. 796</p> 797</dd> 798<dt><code>--with-cpu=<var>cpu</var></code></dt> 799<dt><code>--with-cpu-32=<var>cpu</var></code></dt> 800<dt><code>--with-cpu-64=<var>cpu</var></code></dt> 801<dd><p>Specify which cpu variant the compiler should generate code for by default. 802<var>cpu</var> will be used as the default value of the <samp>-mcpu=</samp> switch. 803This option is only supported on some targets, including ARC, ARM, i386, M68k, 804PowerPC, and SPARC. It is mandatory for ARC. The <samp>--with-cpu-32</samp> and 805<samp>--with-cpu-64</samp> options specify separate default CPUs for 80632-bit and 64-bit modes; these options are only supported for i386, 807x86-64, PowerPC, and SPARC. 808</p> 809</dd> 810<dt><code>--with-schedule=<var>cpu</var></code></dt> 811<dt><code>--with-arch=<var>cpu</var></code></dt> 812<dt><code>--with-arch-32=<var>cpu</var></code></dt> 813<dt><code>--with-arch-64=<var>cpu</var></code></dt> 814<dt><code>--with-tune=<var>cpu</var></code></dt> 815<dt><code>--with-tune-32=<var>cpu</var></code></dt> 816<dt><code>--with-tune-64=<var>cpu</var></code></dt> 817<dt><code>--with-abi=<var>abi</var></code></dt> 818<dt><code>--with-fpu=<var>type</var></code></dt> 819<dt><code>--with-float=<var>type</var></code></dt> 820<dd><p>These configure options provide default values for the <samp>-mschedule=</samp>, 821<samp>-march=</samp>, <samp>-mtune=</samp>, <samp>-mabi=</samp>, and <samp>-mfpu=</samp> 822options and for <samp>-mhard-float</samp> or <samp>-msoft-float</samp>. As with 823<samp>--with-cpu</samp>, which switches will be accepted and acceptable values 824of the arguments depend on the target. 825</p> 826</dd> 827<dt><code>--with-mode=<var>mode</var></code></dt> 828<dd><p>Specify if the compiler should default to <samp>-marm</samp> or <samp>-mthumb</samp>. 829This option is only supported on ARM targets. 830</p> 831</dd> 832<dt><code>--with-stack-offset=<var>num</var></code></dt> 833<dd><p>This option sets the default for the -mstack-offset=<var>num</var> option, 834and will thus generally also control the setting of this option for 835libraries. This option is only supported on Epiphany targets. 836</p> 837</dd> 838<dt><code>--with-fpmath=<var>isa</var></code></dt> 839<dd><p>This options sets <samp>-mfpmath=sse</samp> by default and specifies the default 840ISA for floating-point arithmetics. You can select either ‘<samp>sse</samp>’ which 841enables <samp>-msse2</samp> or ‘<samp>avx</samp>’ which enables <samp>-mavx</samp> by default. 842This option is only supported on i386 and x86-64 targets. 843</p> 844</dd> 845<dt><code>--with-fp-32=<var>mode</var></code></dt> 846<dd><p>On MIPS targets, set the default value for the <samp>-mfp</samp> option when using 847the o32 ABI. The possibilities for <var>mode</var> are: 848</p><dl compact="compact"> 849<dt><code>32</code></dt> 850<dd><p>Use the o32 FP32 ABI extension, as with the <samp>-mfp32</samp> command-line 851option. 852</p></dd> 853<dt><code>xx</code></dt> 854<dd><p>Use the o32 FPXX ABI extension, as with the <samp>-mfpxx</samp> command-line 855option. 856</p></dd> 857<dt><code>64</code></dt> 858<dd><p>Use the o32 FP64 ABI extension, as with the <samp>-mfp64</samp> command-line 859option. 860</p></dd> 861</dl> 862<p>In the absence of this configuration option the default is to use the o32 863FP32 ABI extension. 864</p> 865</dd> 866<dt><code>--with-odd-spreg-32</code></dt> 867<dd><p>On MIPS targets, set the <samp>-modd-spreg</samp> option by default when using 868the o32 ABI. 869</p> 870</dd> 871<dt><code>--without-odd-spreg-32</code></dt> 872<dd><p>On MIPS targets, set the <samp>-mno-odd-spreg</samp> option by default when using 873the o32 ABI. This is normally used in conjunction with 874<samp>--with-fp-32=64</samp> in order to target the o32 FP64A ABI extension. 875</p> 876</dd> 877<dt><code>--with-nan=<var>encoding</var></code></dt> 878<dd><p>On MIPS targets, set the default encoding convention to use for the 879special not-a-number (NaN) IEEE 754 floating-point data. The 880possibilities for <var>encoding</var> are: 881</p><dl compact="compact"> 882<dt><code>legacy</code></dt> 883<dd><p>Use the legacy encoding, as with the <samp>-mnan=legacy</samp> command-line 884option. 885</p></dd> 886<dt><code>2008</code></dt> 887<dd><p>Use the 754-2008 encoding, as with the <samp>-mnan=2008</samp> command-line 888option. 889</p></dd> 890</dl> 891<p>To use this configuration option you must have an assembler version 892installed that supports the <samp>-mnan=</samp> command-line option too. 893In the absence of this configuration option the default convention is 894the legacy encoding, as when neither of the <samp>-mnan=2008</samp> and 895<samp>-mnan=legacy</samp> command-line options has been used. 896</p> 897</dd> 898<dt><code>--with-divide=<var>type</var></code></dt> 899<dd><p>Specify how the compiler should generate code for checking for 900division by zero. This option is only supported on the MIPS target. 901The possibilities for <var>type</var> are: 902</p><dl compact="compact"> 903<dt><code>traps</code></dt> 904<dd><p>Division by zero checks use conditional traps (this is the default on 905systems that support conditional traps). 906</p></dd> 907<dt><code>breaks</code></dt> 908<dd><p>Division by zero checks use the break instruction. 909</p></dd> 910</dl> 911 912 913</dd> 914<dt><code>--with-llsc</code></dt> 915<dd><p>On MIPS targets, make <samp>-mllsc</samp> the default when no 916<samp>-mno-llsc</samp> option is passed. This is the default for 917Linux-based targets, as the kernel will emulate them if the ISA does 918not provide them. 919</p> 920</dd> 921<dt><code>--without-llsc</code></dt> 922<dd><p>On MIPS targets, make <samp>-mno-llsc</samp> the default when no 923<samp>-mllsc</samp> option is passed. 924</p> 925</dd> 926<dt><code>--with-synci</code></dt> 927<dd><p>On MIPS targets, make <samp>-msynci</samp> the default when no 928<samp>-mno-synci</samp> option is passed. 929</p> 930</dd> 931<dt><code>--without-synci</code></dt> 932<dd><p>On MIPS targets, make <samp>-mno-synci</samp> the default when no 933<samp>-msynci</samp> option is passed. This is the default. 934</p> 935</dd> 936<dt><code>--with-lxc1-sxc1</code></dt> 937<dd><p>On MIPS targets, make <samp>-mlxc1-sxc1</samp> the default when no 938<samp>-mno-lxc1-sxc1</samp> option is passed. This is the default. 939</p> 940</dd> 941<dt><code>--without-lxc1-sxc1</code></dt> 942<dd><p>On MIPS targets, make <samp>-mno-lxc1-sxc1</samp> the default when no 943<samp>-mlxc1-sxc1</samp> option is passed. The indexed load/store 944instructions are not directly a problem but can lead to unexpected 945behaviour when deployed in an application intended for a 32-bit address 946space but run on a 64-bit processor. The issue is seen because all 947known MIPS 64-bit Linux kernels execute o32 and n32 applications 948with 64-bit addressing enabled which affects the overflow behaviour 949of the indexed addressing mode. GCC will assume that ordinary 95032-bit arithmetic overflow behaviour is the same whether performed 951as an <code>addu</code> instruction or as part of the address calculation 952in <code>lwxc1</code> type instructions. This assumption holds true in a 953pure 32-bit environment and can hold true in a 64-bit environment if 954the address space is accurately set to be 32-bit for o32 and n32. 955</p> 956</dd> 957<dt><code>--with-madd4</code></dt> 958<dd><p>On MIPS targets, make <samp>-mmadd4</samp> the default when no 959<samp>-mno-madd4</samp> option is passed. This is the default. 960</p> 961</dd> 962<dt><code>--without-madd4</code></dt> 963<dd><p>On MIPS targets, make <samp>-mno-madd4</samp> the default when no 964<samp>-mmadd4</samp> option is passed. The <code>madd4</code> instruction 965family can be problematic when targeting a combination of cores that 966implement these instructions differently. There are two known cores 967that implement these as fused operations instead of unfused (where 968unfused is normally expected). Disabling these instructions is the 969only way to ensure compatible code is generated; this will incur 970a performance penalty. 971</p> 972</dd> 973<dt><code>--with-mips-plt</code></dt> 974<dd><p>On MIPS targets, make use of copy relocations and PLTs. 975These features are extensions to the traditional 976SVR4-based MIPS ABIs and require support from GNU binutils 977and the runtime C library. 978</p> 979</dd> 980<dt><code>--enable-__cxa_atexit</code></dt> 981<dd><p>Define if you want to use __cxa_atexit, rather than atexit, to 982register C++ destructors for local statics and global objects. 983This is essential for fully standards-compliant handling of 984destructors, but requires __cxa_atexit in libc. This option is currently 985only available on systems with GNU libc. When enabled, this will cause 986<samp>-fuse-cxa-atexit</samp> to be passed by default. 987</p> 988</dd> 989<dt><code>--enable-gnu-indirect-function</code></dt> 990<dd><p>Define if you want to enable the <code>ifunc</code> attribute. This option is 991currently only available on systems with GNU libc on certain targets. 992</p> 993</dd> 994<dt><code>--enable-target-optspace</code></dt> 995<dd><p>Specify that target 996libraries should be optimized for code space instead of code speed. 997This is the default for the m32r platform. 998</p> 999</dd> 1000<dt><code>--with-cpp-install-dir=<var>dirname</var></code></dt> 1001<dd><p>Specify that the user visible <code>cpp</code> program should be installed 1002in <samp><var>prefix</var>/<var>dirname</var>/cpp</samp>, in addition to <var>bindir</var>. 1003</p> 1004</dd> 1005<dt><code>--enable-comdat</code></dt> 1006<dd><p>Enable COMDAT group support. This is primarily used to override the 1007automatically detected value. 1008</p> 1009</dd> 1010<dt><code>--enable-initfini-array</code></dt> 1011<dd><p>Force the use of sections <code>.init_array</code> and <code>.fini_array</code> 1012(instead of <code>.init</code> and <code>.fini</code>) for constructors and 1013destructors. Option <samp>--disable-initfini-array</samp> has the 1014opposite effect. If neither option is specified, the configure script 1015will try to guess whether the <code>.init_array</code> and 1016<code>.fini_array</code> sections are supported and, if they are, use them. 1017</p> 1018</dd> 1019<dt><code>--enable-link-mutex</code></dt> 1020<dd><p>When building GCC, use a mutex to avoid linking the compilers for 1021multiple languages at the same time, to avoid thrashing on build 1022systems with limited free memory. The default is not to use such a mutex. 1023</p> 1024</dd> 1025<dt><code>--enable-maintainer-mode</code></dt> 1026<dd><p>The build rules that regenerate the Autoconf and Automake output files as 1027well as the GCC master message catalog <samp>gcc.pot</samp> are normally 1028disabled. This is because it can only be rebuilt if the complete source 1029tree is present. If you have changed the sources and want to rebuild the 1030catalog, configuring with <samp>--enable-maintainer-mode</samp> will enable 1031this. Note that you need a recent version of the <code>gettext</code> tools 1032to do so. 1033</p> 1034</dd> 1035<dt><code>--disable-bootstrap</code></dt> 1036<dd><p>For a native build, the default configuration is to perform 1037a 3-stage bootstrap of the compiler when ‘<samp>make</samp>’ is invoked, 1038testing that GCC can compile itself correctly. If you want to disable 1039this process, you can configure with <samp>--disable-bootstrap</samp>. 1040</p> 1041</dd> 1042<dt><code>--enable-bootstrap</code></dt> 1043<dd><p>In special cases, you may want to perform a 3-stage build 1044even if the target and host triplets are different. 1045This is possible when the host can run code compiled for 1046the target (e.g. host is i686-linux, target is i486-linux). 1047Starting from GCC 4.2, to do this you have to configure explicitly 1048with <samp>--enable-bootstrap</samp>. 1049</p> 1050</dd> 1051<dt><code>--enable-generated-files-in-srcdir</code></dt> 1052<dd><p>Neither the .c and .h files that are generated from Bison and flex nor the 1053info manuals and man pages that are built from the .texi files are present 1054in the repository development tree. When building GCC from that development tree, 1055or from one of our snapshots, those generated files are placed in your 1056build directory, which allows for the source to be in a readonly 1057directory. 1058</p> 1059<p>If you configure with <samp>--enable-generated-files-in-srcdir</samp> then those 1060generated files will go into the source directory. This is mainly intended 1061for generating release or prerelease tarballs of the GCC sources, since it 1062is not a requirement that the users of source releases to have flex, Bison, 1063or makeinfo. 1064</p> 1065</dd> 1066<dt><code>--enable-version-specific-runtime-libs</code></dt> 1067<dd><p>Specify 1068that runtime libraries should be installed in the compiler specific 1069subdirectory (<samp><var>libdir</var>/gcc</samp>) rather than the usual places. In 1070addition, ‘<samp>libstdc++</samp>’’s include files will be installed into 1071<samp><var>libdir</var></samp> unless you overruled it by using 1072<samp>--with-gxx-include-dir=<var>dirname</var></samp>. Using this option is 1073particularly useful if you intend to use several versions of GCC in 1074parallel. This is currently supported by ‘<samp>libgfortran</samp>’, 1075‘<samp>libstdc++</samp>’, and ‘<samp>libobjc</samp>’. 1076</p> 1077</dd> 1078<dt><code><a name="WithAixSoname"></a>--with-aix-soname=‘<samp>aix</samp>’, ‘<samp>svr4</samp>’ or ‘<samp>both</samp>’</code></dt> 1079<dd><p>Traditional AIX shared library versioning (versioned <code>Shared Object</code> 1080files as members of unversioned <code>Archive Library</code> files named 1081‘<samp>lib.a</samp>’) causes numerous headaches for package managers. However, 1082<code>Import Files</code> as members of <code>Archive Library</code> files allow for 1083<strong>filename-based versioning</strong> of shared libraries as seen on Linux/SVR4, 1084where this is called the "SONAME". But as they prevent static linking, 1085<code>Import Files</code> may be used with <code>Runtime Linking</code> only, where the 1086linker does search for ‘<samp>libNAME.so</samp>’ before ‘<samp>libNAME.a</samp>’ library 1087filenames with the ‘<samp>-lNAME</samp>’ linker flag. 1088</p> 1089<a name="AixLdCommand"></a><p>For detailed information please refer to the AIX 1090<a href="https://www.ibm.com/support/knowledgecenter/search/%22the%20ld%20command%2C%20also%20called%20the%20linkage%20editor%20or%20binder%22">ld 1091Command</a> reference. 1092</p> 1093<p>As long as shared library creation is enabled, upon: 1094</p><dl compact="compact"> 1095<dt><code>--with-aix-soname=aix</code></dt> 1096<dt><code>--with-aix-soname=both</code></dt> 1097<dd><p>A (traditional AIX) <code>Shared Archive Library</code> file is created: 1098 </p><ul> 1099<li> using the ‘<samp>libNAME.a</samp>’ filename scheme 1100 </li><li> with the <code>Shared Object</code> file as archive member named 1101 ‘<samp>libNAME.so.V</samp>’ (except for ‘<samp>libgcc_s</samp>’, where the <code>Shared 1102 Object</code> file is named ‘<samp>shr.o</samp>’ for backwards compatibility), which 1103 <ul class="no-bullet"> 1104<li>- is used for runtime loading from inside the ‘<samp>libNAME.a</samp>’ file 1105 </li><li>- is used for dynamic loading via 1106 <code>dlopen("libNAME.a(libNAME.so.V)", RTLD_MEMBER)</code> 1107 </li><li>- is used for shared linking 1108 </li><li>- is used for static linking, so no separate <code>Static Archive 1109 Library</code> file is needed 1110 </li></ul> 1111</li></ul> 1112</dd> 1113<dt><code>--with-aix-soname=both</code></dt> 1114<dt><code>--with-aix-soname=svr4</code></dt> 1115<dd><p>A (second) <code>Shared Archive Library</code> file is created: 1116 </p><ul> 1117<li> using the ‘<samp>libNAME.so.V</samp>’ filename scheme 1118 </li><li> with the <code>Shared Object</code> file as archive member named 1119 ‘<samp>shr.o</samp>’, which 1120 <ul class="no-bullet"> 1121<li>- is created with the <code>-G linker flag</code> 1122 </li><li>- has the <code>F_LOADONLY</code> flag set 1123 </li><li>- is used for runtime loading from inside the ‘<samp>libNAME.so.V</samp>’ file 1124 </li><li>- is used for dynamic loading via <code>dlopen("libNAME.so.V(shr.o)", 1125 RTLD_MEMBER)</code> 1126 </li></ul> 1127</li><li> with the <code>Import File</code> as archive member named ‘<samp>shr.imp</samp>’, 1128 which 1129 <ul class="no-bullet"> 1130<li>- refers to ‘<samp>libNAME.so.V(shr.o)</samp>’ as the "SONAME", to be recorded 1131 in the <code>Loader Section</code> of subsequent binaries 1132 </li><li>- indicates whether ‘<samp>libNAME.so.V(shr.o)</samp>’ is 32 or 64 bit 1133 </li><li>- lists all the public symbols exported by ‘<samp>lib.so.V(shr.o)</samp>’, 1134 eventually decorated with the <code>‘<samp>weak</samp>’ Keyword</code> 1135 </li><li>- is necessary for shared linking against ‘<samp>lib.so.V(shr.o)</samp>’ 1136 </li></ul> 1137</li></ul> 1138<p>A symbolic link using the ‘<samp>libNAME.so</samp>’ filename scheme is created: 1139 </p><ul> 1140<li> pointing to the ‘<samp>libNAME.so.V</samp>’ <code>Shared Archive Library</code> file 1141 </li><li> to permit the <code>ld Command</code> to find ‘<samp>lib.so.V(shr.imp)</samp>’ via 1142 the ‘<samp>-lNAME</samp>’ argument (requires <code>Runtime Linking</code> to be enabled) 1143 </li><li> to permit dynamic loading of ‘<samp>lib.so.V(shr.o)</samp>’ without the need 1144 to specify the version number via <code>dlopen("libNAME.so(shr.o)", 1145 RTLD_MEMBER)</code> 1146 </li></ul> 1147</dd> 1148</dl> 1149 1150<p>As long as static library creation is enabled, upon: 1151</p><dl compact="compact"> 1152<dt><code>--with-aix-soname=svr4</code></dt> 1153<dd><p>A <code>Static Archive Library</code> is created: 1154 </p><ul> 1155<li> using the ‘<samp>libNAME.a</samp>’ filename scheme 1156 </li><li> with all the <code>Static Object</code> files as archive members, which 1157 <ul class="no-bullet"> 1158<li>- are used for static linking 1159 </li></ul> 1160</li></ul> 1161</dd> 1162</dl> 1163 1164<p>While the aix-soname=‘<samp>svr4</samp>’ option does not create <code>Shared Object</code> 1165files as members of unversioned <code>Archive Library</code> files any more, package 1166managers still are responsible to 1167<a href="./specific.html#TransferAixShobj">transfer</a> <code>Shared Object</code> files 1168found as member of a previously installed unversioned <code>Archive Library</code> 1169file into the newly installed <code>Archive Library</code> file with the same 1170filename. 1171</p> 1172<p><em>WARNING:</em> Creating <code>Shared Object</code> files with <code>Runtime Linking</code> 1173enabled may bloat the TOC, eventually leading to <code>TOC overflow</code> errors, 1174requiring the use of either the <samp>-Wl,-bbigtoc</samp> linker flag (seen to 1175break with the <code>GDB</code> debugger) or some of the TOC-related compiler flags, 1176see “RS/6000 and PowerPC Options” in the main manual. 1177</p> 1178<p><samp>--with-aix-soname</samp> is currently supported by ‘<samp>libgcc_s</samp>’ only, so 1179this option is still experimental and not for normal use yet. 1180</p> 1181<p>Default is the traditional behavior <samp>--with-aix-soname=‘<samp>aix</samp>’</samp>. 1182</p> 1183</dd> 1184<dt><code>--enable-languages=<var>lang1</var>,<var>lang2</var>,…</code></dt> 1185<dd><p>Specify that only a particular subset of compilers and 1186their runtime libraries should be built. For a list of valid values for 1187<var>langN</var> you can issue the following command in the 1188<samp>gcc</samp> directory of your GCC source tree:<br> 1189</p><div class="smallexample"> 1190<pre class="smallexample">grep ^language= */config-lang.in 1191</pre></div> 1192<p>Currently, you can use any of the following: 1193<code>all</code>, <code>default</code>, <code>ada</code>, <code>c</code>, <code>c++</code>, <code>fortran</code>, 1194<code>go</code>, <code>jit</code>, <code>lto</code>, <code>objc</code>, <code>obj-c++</code>. 1195Building the Ada compiler has special requirements, see below. 1196If you do not pass this flag, or specify the option <code>default</code>, then the 1197default languages available in the <samp>gcc</samp> sub-tree will be configured. 1198Ada, Go, Jit, and Objective-C++ are not default languages. LTO is not a 1199default language, but is built by default because <samp>--enable-lto</samp> is 1200enabled by default. The other languages are default languages. If 1201<code>all</code> is specified, then all available languages are built. An 1202exception is <code>jit</code> language, which requires 1203<samp>--enable-host-shared</samp> to be included with <code>all</code>. 1204</p> 1205</dd> 1206<dt><code>--enable-stage1-languages=<var>lang1</var>,<var>lang2</var>,…</code></dt> 1207<dd><p>Specify that a particular subset of compilers and their runtime 1208libraries should be built with the system C compiler during stage 1 of 1209the bootstrap process, rather than only in later stages with the 1210bootstrapped C compiler. The list of valid values is the same as for 1211<samp>--enable-languages</samp>, and the option <code>all</code> will select all 1212of the languages enabled by <samp>--enable-languages</samp>. This option is 1213primarily useful for GCC development; for instance, when a development 1214version of the compiler cannot bootstrap due to compiler bugs, or when 1215one is debugging front ends other than the C front end. When this 1216option is used, one can then build the target libraries for the 1217specified languages with the stage-1 compiler by using <code>make 1218stage1-bubble all-target</code>, or run the testsuite on the stage-1 compiler 1219for the specified languages using <code>make stage1-start check-gcc</code>. 1220</p> 1221</dd> 1222<dt><code>--disable-libada</code></dt> 1223<dd><p>Specify that the run-time libraries and tools used by GNAT should not 1224be built. This can be useful for debugging, or for compatibility with 1225previous Ada build procedures, when it was required to explicitly 1226do a ‘<samp>make -C gcc gnatlib_and_tools</samp>’. 1227</p> 1228</dd> 1229<dt><code>--disable-libsanitizer</code></dt> 1230<dd><p>Specify that the run-time libraries for the various sanitizers should 1231not be built. 1232</p> 1233</dd> 1234<dt><code>--disable-libssp</code></dt> 1235<dd><p>Specify that the run-time libraries for stack smashing protection 1236should not be built or linked against. On many targets library support 1237is provided by the C library instead. 1238</p> 1239</dd> 1240<dt><code>--disable-libquadmath</code></dt> 1241<dd><p>Specify that the GCC quad-precision math library should not be built. 1242On some systems, the library is required to be linkable when building 1243the Fortran front end, unless <samp>--disable-libquadmath-support</samp> 1244is used. 1245</p> 1246</dd> 1247<dt><code>--disable-libquadmath-support</code></dt> 1248<dd><p>Specify that the Fortran front end and <code>libgfortran</code> do not add 1249support for <code>libquadmath</code> on systems supporting it. 1250</p> 1251</dd> 1252<dt><code>--disable-libgomp</code></dt> 1253<dd><p>Specify that the GNU Offloading and Multi Processing Runtime Library 1254should not be built. 1255</p> 1256</dd> 1257<dt><code>--disable-libvtv</code></dt> 1258<dd><p>Specify that the run-time libraries used by vtable verification 1259should not be built. 1260</p> 1261</dd> 1262<dt><code>--with-dwarf2</code></dt> 1263<dd><p>Specify that the compiler should 1264use DWARF 2 debugging information as the default. 1265</p> 1266</dd> 1267<dt><code>--with-advance-toolchain=<var>at</var></code></dt> 1268<dd><p>On 64-bit PowerPC Linux systems, configure the compiler to use the 1269header files, library files, and the dynamic linker from the Advance 1270Toolchain release <var>at</var> instead of the default versions that are 1271provided by the Linux distribution. In general, this option is 1272intended for the developers of GCC, and it is not intended for general 1273use. 1274</p> 1275</dd> 1276<dt><code>--enable-targets=all</code></dt> 1277<dt><code>--enable-targets=<var>target_list</var></code></dt> 1278<dd><p>Some GCC targets, e.g. powerpc64-linux, build bi-arch compilers. 1279These are compilers that are able to generate either 64-bit or 32-bit 1280code. Typically, the corresponding 32-bit target, e.g. 1281powerpc-linux for powerpc64-linux, only generates 32-bit code. This 1282option enables the 32-bit target to be a bi-arch compiler, which is 1283useful when you want a bi-arch compiler that defaults to 32-bit, and 1284you are building a bi-arch or multi-arch binutils in a combined tree. 1285On mips-linux, this will build a tri-arch compiler (ABI o32/n32/64), 1286defaulted to o32. 1287Currently, this option only affects sparc-linux, powerpc-linux, x86-linux, 1288mips-linux and s390-linux. 1289</p> 1290</dd> 1291<dt><code>--enable-default-pie</code></dt> 1292<dd><p>Turn on <samp>-fPIE</samp> and <samp>-pie</samp> by default. 1293</p> 1294</dd> 1295<dt><code>--enable-secureplt</code></dt> 1296<dd><p>This option enables <samp>-msecure-plt</samp> by default for powerpc-linux. 1297See “RS/6000 and PowerPC Options” in the main manual 1298</p> 1299</dd> 1300<dt><code>--enable-default-ssp</code></dt> 1301<dd><p>Turn on <samp>-fstack-protector-strong</samp> by default. 1302</p> 1303</dd> 1304<dt><code>--enable-cld</code></dt> 1305<dd><p>This option enables <samp>-mcld</samp> by default for 32-bit x86 targets. 1306See “i386 and x86-64 Options” in the main manual 1307</p> 1308</dd> 1309<dt><code>--enable-win32-registry</code></dt> 1310<dt><code>--enable-win32-registry=<var>key</var></code></dt> 1311<dt><code>--disable-win32-registry</code></dt> 1312<dd><p>The <samp>--enable-win32-registry</samp> option enables Microsoft Windows-hosted GCC 1313to look up installations paths in the registry using the following key: 1314</p> 1315<div class="smallexample"> 1316<pre class="smallexample"><code>HKEY_LOCAL_MACHINE\SOFTWARE\Free Software Foundation\<var>key</var></code> 1317</pre></div> 1318 1319<p><var>key</var> defaults to GCC version number, and can be overridden by the 1320<samp>--enable-win32-registry=<var>key</var></samp> option. Vendors and distributors 1321who use custom installers are encouraged to provide a different key, 1322perhaps one comprised of vendor name and GCC version number, to 1323avoid conflict with existing installations. This feature is enabled 1324by default, and can be disabled by <samp>--disable-win32-registry</samp> 1325option. This option has no effect on the other hosts. 1326</p> 1327</dd> 1328<dt><code>--nfp</code></dt> 1329<dd><p>Specify that the machine does not have a floating point unit. This 1330option only applies to ‘<samp>m68k-sun-sunos<var>n</var></samp>’. On any other 1331system, <samp>--nfp</samp> has no effect. 1332</p> 1333</dd> 1334<dt><code>--enable-werror</code></dt> 1335<dt><code>--disable-werror</code></dt> 1336<dt><code>--enable-werror=yes</code></dt> 1337<dt><code>--enable-werror=no</code></dt> 1338<dd><p>When you specify this option, it controls whether certain files in the 1339compiler are built with <samp>-Werror</samp> in bootstrap stage2 and later. 1340If you don’t specify it, <samp>-Werror</samp> is turned on for the main 1341development trunk. However it defaults to off for release branches and 1342final releases. The specific files which get <samp>-Werror</samp> are 1343controlled by the Makefiles. 1344</p> 1345</dd> 1346<dt><code>--enable-checking</code></dt> 1347<dt><code>--disable-checking</code></dt> 1348<dt><code>--enable-checking=<var>list</var></code></dt> 1349<dd><p>This option controls performing internal consistency checks in the compiler. 1350It does not change the generated code, but adds error checking of the 1351requested complexity. This slows down the compiler and may only work 1352properly if you are building the compiler with GCC. 1353</p> 1354<p>When the option is not specified, the active set of checks depends on context. 1355Namely, bootstrap stage 1 defaults to ‘<samp>--enable-checking=yes</samp>’, builds 1356from release branches or release archives default to 1357‘<samp>--enable-checking=release</samp>’, and otherwise 1358‘<samp>--enable-checking=yes,extra</samp>’ is used. When the option is 1359specified without a <var>list</var>, the result is the same as 1360‘<samp>--enable-checking=yes</samp>’. Likewise, ‘<samp>--disable-checking</samp>’ is 1361equivalent to ‘<samp>--enable-checking=no</samp>’. 1362</p> 1363<p>The categories of checks available in <var>list</var> are ‘<samp>yes</samp>’ (most common 1364checks ‘<samp>assert,misc,gc,gimple,rtlflag,runtime,tree,types</samp>’), ‘<samp>no</samp>’ 1365(no checks at all), ‘<samp>all</samp>’ (all but ‘<samp>valgrind</samp>’), ‘<samp>release</samp>’ 1366(cheapest checks ‘<samp>assert,runtime</samp>’) or ‘<samp>none</samp>’ (same as ‘<samp>no</samp>’). 1367‘<samp>release</samp>’ checks are always on and to disable them 1368‘<samp>--disable-checking</samp>’ or ‘<samp>--enable-checking=no[,<other checks>]</samp>’ 1369must be explicitly requested. Disabling assertions makes the compiler and 1370runtime slightly faster but increases the risk of undetected internal errors 1371causing wrong code to be generated. 1372</p> 1373<p>Individual checks can be enabled with these flags: ‘<samp>assert</samp>’, ‘<samp>df</samp>’, 1374‘<samp>extra</samp>’, ‘<samp>fold</samp>’, ‘<samp>gc</samp>’, ‘<samp>gcac</samp>’, ‘<samp>gimple</samp>’, 1375‘<samp>misc</samp>’, ‘<samp>rtl</samp>’, ‘<samp>rtlflag</samp>’, ‘<samp>runtime</samp>’, ‘<samp>tree</samp>’, 1376‘<samp>types</samp>’ and ‘<samp>valgrind</samp>’. ‘<samp>extra</samp>’ extends ‘<samp>misc</samp>’ 1377checking with extra checks that might affect code generation and should 1378therefore not differ between stage1 and later stages in bootstrap. 1379</p> 1380<p>The ‘<samp>valgrind</samp>’ check requires the external <code>valgrind</code> simulator, 1381available from <a href="http://valgrind.org/">http://valgrind.org/</a>. The ‘<samp>rtl</samp>’ checks are 1382expensive and the ‘<samp>df</samp>’, ‘<samp>gcac</samp>’ and ‘<samp>valgrind</samp>’ checks are very 1383expensive. 1384</p> 1385</dd> 1386<dt><code>--disable-stage1-checking</code></dt> 1387<dt><code>--enable-stage1-checking</code></dt> 1388<dt><code>--enable-stage1-checking=<var>list</var></code></dt> 1389<dd><p>This option affects only bootstrap build. If no <samp>--enable-checking</samp> 1390option is specified the stage1 compiler is built with ‘<samp>yes</samp>’ checking 1391enabled, otherwise the stage1 checking flags are the same as specified by 1392<samp>--enable-checking</samp>. To build the stage1 compiler with 1393different checking options use <samp>--enable-stage1-checking</samp>. 1394The list of checking options is the same as for <samp>--enable-checking</samp>. 1395If your system is too slow or too small to bootstrap a released compiler 1396with checking for stage1 enabled, you can use ‘<samp>--disable-stage1-checking</samp>’ 1397to disable checking for the stage1 compiler. 1398</p> 1399</dd> 1400<dt><code>--enable-coverage</code></dt> 1401<dt><code>--enable-coverage=<var>level</var></code></dt> 1402<dd><p>With this option, the compiler is built to collect self coverage 1403information, every time it is run. This is for internal development 1404purposes, and only works when the compiler is being built with gcc. The 1405<var>level</var> argument controls whether the compiler is built optimized or 1406not, values are ‘<samp>opt</samp>’ and ‘<samp>noopt</samp>’. For coverage analysis you 1407want to disable optimization, for performance analysis you want to 1408enable optimization. When coverage is enabled, the default level is 1409without optimization. 1410</p> 1411</dd> 1412<dt><code>--enable-gather-detailed-mem-stats</code></dt> 1413<dd><p>When this option is specified more detailed information on memory 1414allocation is gathered. This information is printed when using 1415<samp>-fmem-report</samp>. 1416</p> 1417</dd> 1418<dt><code>--enable-valgrind-annotations</code></dt> 1419<dd><p>Mark selected memory related operations in the compiler when run under 1420valgrind to suppress false positives. 1421</p> 1422</dd> 1423<dt><code>--enable-nls</code></dt> 1424<dt><code>--disable-nls</code></dt> 1425<dd><p>The <samp>--enable-nls</samp> option enables Native Language Support (NLS), 1426which lets GCC output diagnostics in languages other than American 1427English. Native Language Support is enabled by default if not doing a 1428canadian cross build. The <samp>--disable-nls</samp> option disables NLS. 1429</p> 1430</dd> 1431<dt><code>--with-included-gettext</code></dt> 1432<dd><p>If NLS is enabled, the <samp>--with-included-gettext</samp> option causes the build 1433procedure to prefer its copy of GNU <code>gettext</code>. 1434</p> 1435</dd> 1436<dt><code>--with-catgets</code></dt> 1437<dd><p>If NLS is enabled, and if the host lacks <code>gettext</code> but has the 1438inferior <code>catgets</code> interface, the GCC build procedure normally 1439ignores <code>catgets</code> and instead uses GCC’s copy of the GNU 1440<code>gettext</code> library. The <samp>--with-catgets</samp> option causes the 1441build procedure to use the host’s <code>catgets</code> in this situation. 1442</p> 1443</dd> 1444<dt><code>--with-libiconv-prefix=<var>dir</var></code></dt> 1445<dd><p>Search for libiconv header files in <samp><var>dir</var>/include</samp> and 1446libiconv library files in <samp><var>dir</var>/lib</samp>. 1447</p> 1448</dd> 1449<dt><code>--enable-obsolete</code></dt> 1450<dd><p>Enable configuration for an obsoleted system. If you attempt to 1451configure GCC for a system (build, host, or target) which has been 1452obsoleted, and you do not specify this flag, configure will halt with an 1453error message. 1454</p> 1455<p>All support for systems which have been obsoleted in one release of GCC 1456is removed entirely in the next major release, unless someone steps 1457forward to maintain the port. 1458</p> 1459</dd> 1460<dt><code>--enable-decimal-float</code></dt> 1461<dt><code>--enable-decimal-float=yes</code></dt> 1462<dt><code>--enable-decimal-float=no</code></dt> 1463<dt><code>--enable-decimal-float=bid</code></dt> 1464<dt><code>--enable-decimal-float=dpd</code></dt> 1465<dt><code>--disable-decimal-float</code></dt> 1466<dd><p>Enable (or disable) support for the C decimal floating point extension 1467that is in the IEEE 754-2008 standard. This is enabled by default only 1468on PowerPC, i386, and x86_64 GNU/Linux systems. Other systems may also 1469support it, but require the user to specifically enable it. You can 1470optionally control which decimal floating point format is used (either 1471‘<samp>bid</samp>’ or ‘<samp>dpd</samp>’). The ‘<samp>bid</samp>’ (binary integer decimal) 1472format is default on i386 and x86_64 systems, and the ‘<samp>dpd</samp>’ 1473(densely packed decimal) format is default on PowerPC systems. 1474</p> 1475</dd> 1476<dt><code>--enable-fixed-point</code></dt> 1477<dt><code>--disable-fixed-point</code></dt> 1478<dd><p>Enable (or disable) support for C fixed-point arithmetic. 1479This option is enabled by default for some targets (such as MIPS) which 1480have hardware-support for fixed-point operations. On other targets, you 1481may enable this option manually. 1482</p> 1483</dd> 1484<dt><code>--with-long-double-128</code></dt> 1485<dd><p>Specify if <code>long double</code> type should be 128-bit by default on selected 1486GNU/Linux architectures. If using <code>--without-long-double-128</code>, 1487<code>long double</code> will be by default 64-bit, the same as <code>double</code> type. 1488When neither of these configure options are used, the default will be 1489128-bit <code>long double</code> when built against GNU C Library 2.4 and later, 149064-bit <code>long double</code> otherwise. 1491</p> 1492</dd> 1493<dt><code>--with-long-double-format=ibm</code></dt> 1494<dt><code>--with-long-double-format=ieee</code></dt> 1495<dd><p>Specify whether <code>long double</code> uses the IBM extended double format 1496or the IEEE 128-bit floating point format on PowerPC Linux systems. 1497This configuration switch will only work on little endian PowerPC 1498Linux systems and on big endian 64-bit systems where the default cpu 1499is at least power7 (i.e. <samp>--with-cpu=power7</samp>, 1500<samp>--with-cpu=power8</samp>, or <samp>--with-cpu=power9</samp> is used). 1501</p> 1502<p>If you use the <samp>--with-long-double-64</samp> configuration option, 1503the <samp>--with-long-double-format=ibm</samp> and 1504<samp>--with-long-double-format=ieee</samp> options are ignored. 1505</p> 1506<p>The default <code>long double</code> format is to use IBM extended double. 1507Until all of the libraries are converted to use IEEE 128-bit floating 1508point, it is not recommended to use 1509<samp>--with-long-double-format=ieee</samp>. 1510</p> 1511<p>On little endian PowerPC Linux systems, if you explicitly set the 1512<code>long double</code> type, it will build multilibs to allow you to 1513select either <code>long double</code> format, unless you disable multilibs 1514with the <code>--disable-multilib</code> option. At present, 1515<code>long double</code> multilibs are not built on big endian PowerPC Linux 1516systems. If you are building multilibs, you will need to configure 1517the compiler using the <samp>--with-system-zlib</samp> option. 1518</p> 1519<p>If you do not set the <code>long double</code> type explicitly, no multilibs 1520will be generated. 1521</p> 1522</dd> 1523<dt><code>--enable-fdpic</code></dt> 1524<dd><p>On SH Linux systems, generate ELF FDPIC code. 1525</p> 1526</dd> 1527<dt><code>--with-gmp=<var>pathname</var></code></dt> 1528<dt><code>--with-gmp-include=<var>pathname</var></code></dt> 1529<dt><code>--with-gmp-lib=<var>pathname</var></code></dt> 1530<dt><code>--with-mpfr=<var>pathname</var></code></dt> 1531<dt><code>--with-mpfr-include=<var>pathname</var></code></dt> 1532<dt><code>--with-mpfr-lib=<var>pathname</var></code></dt> 1533<dt><code>--with-mpc=<var>pathname</var></code></dt> 1534<dt><code>--with-mpc-include=<var>pathname</var></code></dt> 1535<dt><code>--with-mpc-lib=<var>pathname</var></code></dt> 1536<dd><p>If you want to build GCC but do not have the GMP library, the MPFR 1537library and/or the MPC library installed in a standard location and 1538do not have their sources present in the GCC source tree then you 1539can explicitly specify the directory where they are installed 1540(‘<samp>--with-gmp=<var>gmpinstalldir</var></samp>’, 1541‘<samp>--with-mpfr=<var>mpfrinstalldir</var></samp>’, 1542‘<samp>--with-mpc=<var>mpcinstalldir</var></samp>’). The 1543<samp>--with-gmp=<var>gmpinstalldir</var></samp> option is shorthand for 1544<samp>--with-gmp-lib=<var>gmpinstalldir</var>/lib</samp> and 1545<samp>--with-gmp-include=<var>gmpinstalldir</var>/include</samp>. Likewise the 1546<samp>--with-mpfr=<var>mpfrinstalldir</var></samp> option is shorthand for 1547<samp>--with-mpfr-lib=<var>mpfrinstalldir</var>/lib</samp> and 1548<samp>--with-mpfr-include=<var>mpfrinstalldir</var>/include</samp>, also the 1549<samp>--with-mpc=<var>mpcinstalldir</var></samp> option is shorthand for 1550<samp>--with-mpc-lib=<var>mpcinstalldir</var>/lib</samp> and 1551<samp>--with-mpc-include=<var>mpcinstalldir</var>/include</samp>. If these 1552shorthand assumptions are not correct, you can use the explicit 1553include and lib options directly. You might also need to ensure the 1554shared libraries can be found by the dynamic linker when building and 1555using GCC, for example by setting the runtime shared library path 1556variable (<code>LD_LIBRARY_PATH</code> on GNU/Linux and Solaris systems). 1557</p> 1558<p>These flags are applicable to the host platform only. When building 1559a cross compiler, they will not be used to configure target libraries. 1560</p> 1561</dd> 1562<dt><code>--with-isl=<var>pathname</var></code></dt> 1563<dt><code>--with-isl-include=<var>pathname</var></code></dt> 1564<dt><code>--with-isl-lib=<var>pathname</var></code></dt> 1565<dd><p>If you do not have the isl library installed in a standard location and you 1566want to build GCC, you can explicitly specify the directory where it is 1567installed (‘<samp>--with-isl=<var>islinstalldir</var></samp>’). The 1568<samp>--with-isl=<var>islinstalldir</var></samp> option is shorthand for 1569<samp>--with-isl-lib=<var>islinstalldir</var>/lib</samp> and 1570<samp>--with-isl-include=<var>islinstalldir</var>/include</samp>. If this 1571shorthand assumption is not correct, you can use the explicit 1572include and lib options directly. 1573</p> 1574<p>These flags are applicable to the host platform only. When building 1575a cross compiler, they will not be used to configure target libraries. 1576</p> 1577</dd> 1578<dt><code>--with-stage1-ldflags=<var>flags</var></code></dt> 1579<dd><p>This option may be used to set linker flags to be used when linking 1580stage 1 of GCC. These are also used when linking GCC if configured with 1581<samp>--disable-bootstrap</samp>. If <samp>--with-stage1-libs</samp> is not set to a 1582value, then the default is ‘<samp>-static-libstdc++ -static-libgcc</samp>’, if 1583supported. 1584</p> 1585</dd> 1586<dt><code>--with-stage1-libs=<var>libs</var></code></dt> 1587<dd><p>This option may be used to set libraries to be used when linking stage 1 1588of GCC. These are also used when linking GCC if configured with 1589<samp>--disable-bootstrap</samp>. 1590</p> 1591</dd> 1592<dt><code>--with-boot-ldflags=<var>flags</var></code></dt> 1593<dd><p>This option may be used to set linker flags to be used when linking 1594stage 2 and later when bootstrapping GCC. If –with-boot-libs 1595is not is set to a value, then the default is 1596‘<samp>-static-libstdc++ -static-libgcc</samp>’. 1597</p> 1598</dd> 1599<dt><code>--with-boot-libs=<var>libs</var></code></dt> 1600<dd><p>This option may be used to set libraries to be used when linking stage 2 1601and later when bootstrapping GCC. 1602</p> 1603</dd> 1604<dt><code>--with-debug-prefix-map=<var>map</var></code></dt> 1605<dd><p>Convert source directory names using <samp>-fdebug-prefix-map</samp> when 1606building runtime libraries. ‘<samp><var>map</var></samp>’ is a space-separated 1607list of maps of the form ‘<samp><var>old</var>=<var>new</var></samp>’. 1608</p> 1609</dd> 1610<dt><code>--enable-linker-build-id</code></dt> 1611<dd><p>Tells GCC to pass <samp>--build-id</samp> option to the linker for all final 1612links (links performed without the <samp>-r</samp> or <samp>--relocatable</samp> 1613option), if the linker supports it. If you specify 1614<samp>--enable-linker-build-id</samp>, but your linker does not 1615support <samp>--build-id</samp> option, a warning is issued and the 1616<samp>--enable-linker-build-id</samp> option is ignored. The default is off. 1617</p> 1618</dd> 1619<dt><code>--with-linker-hash-style=<var>choice</var></code></dt> 1620<dd><p>Tells GCC to pass <samp>--hash-style=<var>choice</var></samp> option to the 1621linker for all final links. <var>choice</var> can be one of 1622‘<samp>sysv</samp>’, ‘<samp>gnu</samp>’, and ‘<samp>both</samp>’ where ‘<samp>sysv</samp>’ is the default. 1623</p> 1624</dd> 1625<dt><code>--enable-gnu-unique-object</code></dt> 1626<dt><code>--disable-gnu-unique-object</code></dt> 1627<dd><p>Tells GCC to use the gnu_unique_object relocation for C++ template 1628static data members and inline function local statics. Enabled by 1629default for a toolchain with an assembler that accepts it and 1630GLIBC 2.11 or above, otherwise disabled. 1631</p> 1632</dd> 1633<dt><code>--with-diagnostics-color=<var>choice</var></code></dt> 1634<dd><p>Tells GCC to use <var>choice</var> as the default for <samp>-fdiagnostics-color=</samp> 1635option (if not used explicitly on the command line). <var>choice</var> 1636can be one of ‘<samp>never</samp>’, ‘<samp>auto</samp>’, ‘<samp>always</samp>’, and ‘<samp>auto-if-env</samp>’ 1637where ‘<samp>auto</samp>’ is the default. ‘<samp>auto-if-env</samp>’ means that 1638<samp>-fdiagnostics-color=auto</samp> will be the default if <code>GCC_COLORS</code> 1639is present and non-empty in the environment, and 1640<samp>-fdiagnostics-color=never</samp> otherwise. 1641</p> 1642</dd> 1643<dt><code>--enable-lto</code></dt> 1644<dt><code>--disable-lto</code></dt> 1645<dd><p>Enable support for link-time optimization (LTO). This is enabled by 1646default, and may be disabled using <samp>--disable-lto</samp>. 1647</p> 1648</dd> 1649<dt><code>--enable-linker-plugin-configure-flags=FLAGS</code></dt> 1650<dt><code>--enable-linker-plugin-flags=FLAGS</code></dt> 1651<dd><p>By default, linker plugins (such as the LTO plugin) are built for the 1652host system architecture. For the case that the linker has a 1653different (but run-time compatible) architecture, these flags can be 1654specified to build plugins that are compatible to the linker. For 1655example, if you are building GCC for a 64-bit x86_64 1656(‘<samp>x86_64-unknown-linux-gnu</samp>’) host system, but have a 32-bit x86 1657GNU/Linux (‘<samp>i686-pc-linux-gnu</samp>’) linker executable (which is 1658executable on the former system), you can configure GCC as follows for 1659getting compatible linker plugins: 1660</p> 1661<div class="smallexample"> 1662<pre class="smallexample">% <var>srcdir</var>/configure \ 1663 --host=x86_64-unknown-linux-gnu \ 1664 --enable-linker-plugin-configure-flags=--host=i686-pc-linux-gnu \ 1665 --enable-linker-plugin-flags='CC=gcc\ -m32\ -Wl,-rpath,[...]/i686-pc-linux-gnu/lib' 1666</pre></div> 1667 1668</dd> 1669<dt><code>--with-plugin-ld=<var>pathname</var></code></dt> 1670<dd><p>Enable an alternate linker to be used at link-time optimization (LTO) 1671link time when <samp>-fuse-linker-plugin</samp> is enabled. 1672This linker should have plugin support such as gold starting with 1673version 2.20 or GNU ld starting with version 2.21. 1674See <samp>-fuse-linker-plugin</samp> for details. 1675</p> 1676</dd> 1677<dt><code>--enable-canonical-system-headers</code></dt> 1678<dt><code>--disable-canonical-system-headers</code></dt> 1679<dd><p>Enable system header path canonicalization for <samp>libcpp</samp>. This can 1680produce shorter header file paths in diagnostics and dependency output 1681files, but these changed header paths may conflict with some compilation 1682environments. Enabled by default, and may be disabled using 1683<samp>--disable-canonical-system-headers</samp>. 1684</p> 1685</dd> 1686<dt><code>--with-glibc-version=<var>major</var>.<var>minor</var></code></dt> 1687<dd><p>Tell GCC that when the GNU C Library (glibc) is used on the target it 1688will be version <var>major</var>.<var>minor</var> or later. Normally this can 1689be detected from the C library’s header files, but this option may be 1690needed when bootstrapping a cross toolchain without the header files 1691available for building the initial bootstrap compiler. 1692</p> 1693<p>If GCC is configured with some multilibs that use glibc and some that 1694do not, this option applies only to the multilibs that use glibc. 1695However, such configurations may not work well as not all the relevant 1696configuration in GCC is on a per-multilib basis. 1697</p> 1698</dd> 1699<dt><code>--enable-as-accelerator-for=<var>target</var></code></dt> 1700<dd><p>Build as offload target compiler. Specify offload host triple by <var>target</var>. 1701</p> 1702</dd> 1703<dt><code>--enable-offload-targets=<var>target1</var>[=<var>path1</var>],…,<var>targetN</var>[=<var>pathN</var>]</code></dt> 1704<dd><p>Enable offloading to targets <var>target1</var>, …, <var>targetN</var>. 1705Offload compilers are expected to be already installed. Default search 1706path for them is <samp><var>exec-prefix</var></samp>, but it can be changed by 1707specifying paths <var>path1</var>, …, <var>pathN</var>. 1708</p> 1709<div class="smallexample"> 1710<pre class="smallexample">% <var>srcdir</var>/configure \ 1711 --enable-offload-target=i686-unknown-linux-gnu=/path/to/i686/compiler,x86_64-pc-linux-gnu 1712</pre></div> 1713 1714<p>If ‘<samp>hsa</samp>’ is specified as one of the targets, the compiler will be 1715built with support for HSA GPU accelerators. Because the same 1716compiler will emit the accelerator code, no path should be specified. 1717</p> 1718</dd> 1719<dt><code>--with-hsa-runtime=<var>pathname</var></code></dt> 1720<dt><code>--with-hsa-runtime-include=<var>pathname</var></code></dt> 1721<dt><code>--with-hsa-runtime-lib=<var>pathname</var></code></dt> 1722<dd> 1723<p>If you configure GCC with HSA offloading but do not have the HSA 1724run-time library installed in a standard location then you can 1725explicitly specify the directory where they are installed. The 1726<samp>--with-hsa-runtime=<var>hsainstalldir</var></samp> option is a 1727shorthand for 1728<samp>--with-hsa-runtime-lib=<var>hsainstalldir</var>/lib</samp> and 1729<samp>--with-hsa-runtime-include=<var>hsainstalldir</var>/include</samp>. 1730</p> 1731</dd> 1732<dt><code>--enable-cet</code></dt> 1733<dt><code>--disable-cet</code></dt> 1734<dd><p>Enable building target run-time libraries with control-flow 1735instrumentation, see <samp>-fcf-protection</samp> option. When 1736<code>--enable-cet</code> is specified target libraries are configured 1737to add <samp>-fcf-protection</samp> and, if needed, other target 1738specific options to a set of building options. 1739</p> 1740<p>The option is disabled by default. When <code>--enable-cet=auto</code> 1741is used, it is enabled on Linux/x86 if target binutils 1742supports <code>Intel CET</code> instructions and disabled otherwise. 1743In this case the target libraries are configured to get additional 1744<samp>-fcf-protection</samp> option. 1745</p></dd> 1746</dl> 1747 1748<a name="Cross-Compiler-Specific-Options"></a> 1749<h4 class="subheading">Cross-Compiler-Specific Options</h4> 1750<p>The following options only apply to building cross compilers. 1751</p> 1752<dl compact="compact"> 1753<dt><code>--with-sysroot</code></dt> 1754<dt><code>--with-sysroot=<var>dir</var></code></dt> 1755<dd><p>Tells GCC to consider <var>dir</var> as the root of a tree that contains 1756(a subset of) the root filesystem of the target operating system. 1757Target system headers, libraries and run-time object files will be 1758searched for in there. More specifically, this acts as if 1759<samp>--sysroot=<var>dir</var></samp> was added to the default options of the built 1760compiler. The specified directory is not copied into the 1761install tree, unlike the options <samp>--with-headers</samp> and 1762<samp>--with-libs</samp> that this option obsoletes. The default value, 1763in case <samp>--with-sysroot</samp> is not given an argument, is 1764<samp>${gcc_tooldir}/sys-root</samp>. If the specified directory is a 1765subdirectory of <samp>${exec_prefix}</samp>, then it will be found relative to 1766the GCC binaries if the installation tree is moved. 1767</p> 1768<p>This option affects the system root for the compiler used to build 1769target libraries (which runs on the build system) and the compiler newly 1770installed with <code>make install</code>; it does not affect the compiler which is 1771used to build GCC itself. 1772</p> 1773<p>If you specify the <samp>--with-native-system-header-dir=<var>dirname</var></samp> 1774option then the compiler will search that directory within <var>dirname</var> for 1775native system headers rather than the default <samp>/usr/include</samp>. 1776</p> 1777</dd> 1778<dt><code>--with-build-sysroot</code></dt> 1779<dt><code>--with-build-sysroot=<var>dir</var></code></dt> 1780<dd><p>Tells GCC to consider <var>dir</var> as the system root (see 1781<samp>--with-sysroot</samp>) while building target libraries, instead of 1782the directory specified with <samp>--with-sysroot</samp>. This option is 1783only useful when you are already using <samp>--with-sysroot</samp>. You 1784can use <samp>--with-build-sysroot</samp> when you are configuring with 1785<samp>--prefix</samp> set to a directory that is different from the one in 1786which you are installing GCC and your target libraries. 1787</p> 1788<p>This option affects the system root for the compiler used to build 1789target libraries (which runs on the build system); it does not affect 1790the compiler which is used to build GCC itself. 1791</p> 1792<p>If you specify the <samp>--with-native-system-header-dir=<var>dirname</var></samp> 1793option then the compiler will search that directory within <var>dirname</var> for 1794native system headers rather than the default <samp>/usr/include</samp>. 1795</p> 1796</dd> 1797<dt><code>--with-headers</code></dt> 1798<dt><code>--with-headers=<var>dir</var></code></dt> 1799<dd><p>Deprecated in favor of <samp>--with-sysroot</samp>. 1800Specifies that target headers are available when building a cross compiler. 1801The <var>dir</var> argument specifies a directory which has the target include 1802files. These include files will be copied into the <samp>gcc</samp> install 1803directory. <em>This option with the <var>dir</var> argument is required</em> when 1804building a cross compiler, if <samp><var>prefix</var>/<var>target</var>/sys-include</samp> 1805doesn’t pre-exist. If <samp><var>prefix</var>/<var>target</var>/sys-include</samp> does 1806pre-exist, the <var>dir</var> argument may be omitted. <code>fixincludes</code> 1807will be run on these files to make them compatible with GCC. 1808</p> 1809</dd> 1810<dt><code>--without-headers</code></dt> 1811<dd><p>Tells GCC not use any target headers from a libc when building a cross 1812compiler. When crossing to GNU/Linux, you need the headers so GCC 1813can build the exception handling for libgcc. 1814</p> 1815</dd> 1816<dt><code>--with-libs</code></dt> 1817<dt><code>--with-libs="<var>dir1</var> <var>dir2</var> … <var>dirN</var>"</code></dt> 1818<dd><p>Deprecated in favor of <samp>--with-sysroot</samp>. 1819Specifies a list of directories which contain the target runtime 1820libraries. These libraries will be copied into the <samp>gcc</samp> install 1821directory. If the directory list is omitted, this option has no 1822effect. 1823</p> 1824</dd> 1825<dt><code>--with-newlib</code></dt> 1826<dd><p>Specifies that ‘<samp>newlib</samp>’ is 1827being used as the target C library. This causes <code>__eprintf</code> to be 1828omitted from <samp>libgcc.a</samp> on the assumption that it will be provided by 1829‘<samp>newlib</samp>’. 1830</p> 1831</dd> 1832<dt><code>--with-avrlibc</code></dt> 1833<dd><p>Specifies that ‘<samp>AVR-Libc</samp>’ is 1834being used as the target C library. This causes float support 1835functions like <code>__addsf3</code> to be omitted from <samp>libgcc.a</samp> on 1836the assumption that it will be provided by <samp>libm.a</samp>. For more 1837technical details, cf. <a href="http://gcc.gnu.org/PR54461">PR54461</a>. 1838This option is only supported for the AVR target. It is not supported for 1839RTEMS configurations, which currently use newlib. The option is 1840supported since version 4.7.2 and is the default in 4.8.0 and newer. 1841</p> 1842</dd> 1843<dt><code>--with-nds32-lib=<var>library</var></code></dt> 1844<dd><p>Specifies that <var>library</var> setting is used for building <samp>libgcc.a</samp>. 1845Currently, the valid <var>library</var> is ‘<samp>newlib</samp>’ or ‘<samp>mculib</samp>’. 1846This option is only supported for the NDS32 target. 1847</p> 1848</dd> 1849<dt><code>--with-build-time-tools=<var>dir</var></code></dt> 1850<dd><p>Specifies where to find the set of target tools (assembler, linker, etc.) 1851that will be used while building GCC itself. This option can be useful 1852if the directory layouts are different between the system you are building 1853GCC on, and the system where you will deploy it. 1854</p> 1855<p>For example, on an ‘<samp>ia64-hp-hpux</samp>’ system, you may have the GNU 1856assembler and linker in <samp>/usr/bin</samp>, and the native tools in a 1857different path, and build a toolchain that expects to find the 1858native tools in <samp>/usr/bin</samp>. 1859</p> 1860<p>When you use this option, you should ensure that <var>dir</var> includes 1861<code>ar</code>, <code>as</code>, <code>ld</code>, <code>nm</code>, 1862<code>ranlib</code> and <code>strip</code> if necessary, and possibly 1863<code>objdump</code>. Otherwise, GCC may use an inconsistent set of 1864tools. 1865</p></dd> 1866</dl> 1867 1868<a name="Overriding-configure-test-results"></a> 1869<h4 class="subsubheading">Overriding <code>configure</code> test results</h4> 1870 1871<p>Sometimes, it might be necessary to override the result of some 1872<code>configure</code> test, for example in order to ease porting to a new 1873system or work around a bug in a test. The toplevel <code>configure</code> 1874script provides three variables for this: 1875</p> 1876<dl compact="compact"> 1877<dt><code>build_configargs</code></dt> 1878<dd><a name="index-build_005fconfigargs"></a> 1879<p>The contents of this variable is passed to all build <code>configure</code> 1880scripts. 1881</p> 1882</dd> 1883<dt><code>host_configargs</code></dt> 1884<dd><a name="index-host_005fconfigargs"></a> 1885<p>The contents of this variable is passed to all host <code>configure</code> 1886scripts. 1887</p> 1888</dd> 1889<dt><code>target_configargs</code></dt> 1890<dd><a name="index-target_005fconfigargs"></a> 1891<p>The contents of this variable is passed to all target <code>configure</code> 1892scripts. 1893</p> 1894</dd> 1895</dl> 1896 1897<p>In order to avoid shell and <code>make</code> quoting issues for complex 1898overrides, you can pass a setting for <code>CONFIG_SITE</code> and set 1899variables in the site file. 1900</p> 1901<a name="Objective-C-Specific-Options"></a> 1902<h4 class="subheading">Objective-C-Specific Options</h4> 1903 1904<p>The following options apply to the build of the Objective-C runtime library. 1905</p> 1906<dl compact="compact"> 1907<dt><code>--enable-objc-gc</code></dt> 1908<dd><p>Specify that an additional variant of the GNU Objective-C runtime library 1909is built, using an external build of the Boehm-Demers-Weiser garbage 1910collector (<a href="http://www.hboehm.info/gc/">http://www.hboehm.info/gc/</a>). This library needs to be 1911available for each multilib variant, unless configured with 1912<samp>--enable-objc-gc=‘<samp>auto</samp>’</samp> in which case the build of the 1913additional runtime library is skipped when not available and the build 1914continues. 1915</p> 1916</dd> 1917<dt><code>--with-target-bdw-gc=<var>list</var></code></dt> 1918<dt><code>--with-target-bdw-gc-include=<var>list</var></code></dt> 1919<dt><code>--with-target-bdw-gc-lib=<var>list</var></code></dt> 1920<dd><p>Specify search directories for the garbage collector header files and 1921libraries. <var>list</var> is a comma separated list of key value pairs of the 1922form ‘<samp><var>multilibdir</var>=<var>path</var></samp>’, where the default multilib key 1923is named as ‘<samp>.</samp>’ (dot), or is omitted (e.g. 1924‘<samp>--with-target-bdw-gc=/opt/bdw-gc,32=/opt-bdw-gc32</samp>’). 1925</p> 1926<p>The options <samp>--with-target-bdw-gc-include</samp> and 1927<samp>--with-target-bdw-gc-lib</samp> must always be specified together 1928for each multilib variant and they take precedence over 1929<samp>--with-target-bdw-gc</samp>. If <samp>--with-target-bdw-gc-include</samp> 1930is missing values for a multilib, then the value for the default 1931multilib is used (e.g. ‘<samp>--with-target-bdw-gc-include=/opt/bdw-gc/include</samp>’ 1932‘<samp>--with-target-bdw-gc-lib=/opt/bdw-gc/lib64,32=/opt-bdw-gc/lib32</samp>’). 1933If none of these options are specified, the library is assumed in 1934default locations. 1935</p></dd> 1936</dl> 1937 1938<hr /> 1939<p> 1940<p><a href="./index.html">Return to the GCC Installation page</a> 1941</p> 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953</body> 1954</html> 1955