configure.html revision 1.1.1.13 1 1.1.1.13 mrg <html lang="en">
2 1.1.1.13 mrg <head>
3 1.1.1.13 mrg <title>Installing GCC: Configuration</title>
4 1.1.1.13 mrg <meta http-equiv="Content-Type" content="text/html">
5 1.1.1.13 mrg <meta name="description" content="Installing GCC: Configuration">
6 1.1.1.13 mrg <meta name="generator" content="makeinfo 4.13">
7 1.1.1.13 mrg <link title="Top" rel="top" href="#Top">
8 1.1.1.13 mrg <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9 1.1.1.13 mrg <!--
10 1.1.1.13 mrg Copyright (C) 1988-2017 Free Software Foundation, Inc.
11 1.1 mrg
12 1.1.1.13 mrg Permission is granted to copy, distribute and/or modify this document
13 1.1.1.3 skrll under the terms of the GNU Free Documentation License, Version 1.3 or
14 1.1 mrg any later version published by the Free Software Foundation; with no
15 1.1 mrg Invariant Sections, the Front-Cover texts being (a) (see below), and
16 1.1 mrg with the Back-Cover Texts being (b) (see below). A copy of the
17 1.1.1.13 mrg license is included in the section entitled "GNU Free Documentation License".
18 1.1 mrg
19 1.1 mrg (a) The FSF's Front-Cover Text is:
20 1.1 mrg
21 1.1.1.13 mrg A GNU Manual
22 1.1 mrg
23 1.1 mrg (b) The FSF's Back-Cover Text is:
24 1.1 mrg
25 1.1.1.13 mrg You have freedom to copy and modify this GNU Manual, like GNU
26 1.1 mrg software. Copies published by the Free Software Foundation raise
27 1.1.1.13 mrg funds for GNU development.-->
28 1.1.1.13 mrg <meta http-equiv="Content-Style-Type" content="text/css">
29 1.1.1.13 mrg <style type="text/css"><!--
30 1.1.1.13 mrg pre.display { font-family:inherit }
31 1.1.1.13 mrg pre.format { font-family:inherit }
32 1.1.1.13 mrg pre.smalldisplay { font-family:inherit; font-size:smaller }
33 1.1.1.13 mrg pre.smallformat { font-family:inherit; font-size:smaller }
34 1.1.1.13 mrg pre.smallexample { font-size:smaller }
35 1.1.1.13 mrg pre.smalllisp { font-size:smaller }
36 1.1.1.13 mrg span.sc { font-variant:small-caps }
37 1.1.1.13 mrg span.roman { font-family:serif; font-weight:normal; }
38 1.1.1.13 mrg span.sansserif { font-family:sans-serif; font-weight:normal; }
39 1.1.1.13 mrg --></style>
40 1.1 mrg </head>
41 1.1.1.13 mrg <body>
42 1.1.1.13 mrg <h1 class="settitle">Installing GCC: Configuration</h1>
43 1.1.1.13 mrg <a name="index-Configuration-1"></a><a name="index-Installing-GCC_003a-Configuration-2"></a>
44 1.1.1.13 mrg Like most GNU software, GCC must be configured before it can be built.
45 1.1.1.11 mrg This document describes the recommended configuration procedure
46 1.1.1.11 mrg for both native and cross targets.
47 1.1.1.13 mrg
48 1.1.1.13 mrg <p>We use <var>srcdir</var> to refer to the toplevel source directory for
49 1.1.1.11 mrg GCC; we use <var>objdir</var> to refer to the toplevel build/object directory.
50 1.1.1.13 mrg
51 1.1.1.13 mrg <p>If you obtained the sources via SVN, <var>srcdir</var> must refer to the top
52 1.1.1.13 mrg <samp><span class="file">gcc</span></samp> directory, the one where the <samp><span class="file">MAINTAINERS</span></samp> file can be
53 1.1.1.13 mrg found, and not its <samp><span class="file">gcc</span></samp> subdirectory, otherwise the build will fail.
54 1.1.1.13 mrg
55 1.1.1.13 mrg <p>If either <var>srcdir</var> or <var>objdir</var> is located on an automounted NFS
56 1.1.1.13 mrg file system, the shell's built-in <samp><span class="command">pwd</span></samp> command will return
57 1.1 mrg temporary pathnames. Using these can lead to various sorts of build
58 1.1.1.13 mrg problems. To avoid this issue, set the <samp><span class="env">PWDCMD</span></samp> environment
59 1.1.1.13 mrg variable to an automounter-aware <samp><span class="command">pwd</span></samp> command, e.g.,
60 1.1.1.13 mrg <samp><span class="command">pawd</span></samp> or ‘<samp><span class="samp">amq -w</span></samp>’, during the configuration and build
61 1.1 mrg phases.
62 1.1.1.13 mrg
63 1.1.1.13 mrg <p>First, we <strong>highly</strong> recommend that GCC be built into a
64 1.1 mrg separate directory from the sources which does <strong>not</strong> reside
65 1.1 mrg within the source tree. This is how we generally build GCC; building
66 1.1.1.13 mrg where <var>srcdir</var> == <var>objdir</var> should still work, but doesn't
67 1.1 mrg get extensive testing; building where <var>objdir</var> is a subdirectory
68 1.1 mrg of <var>srcdir</var> is unsupported.
69 1.1.1.13 mrg
70 1.1.1.13 mrg <p>If you have previously built GCC in the same directory for a
71 1.1.1.13 mrg different target machine, do ‘<samp><span class="samp">make distclean</span></samp>’ to delete all files
72 1.1.1.13 mrg that might be invalid. One of the files this deletes is <samp><span class="file">Makefile</span></samp>;
73 1.1.1.13 mrg if ‘<samp><span class="samp">make distclean</span></samp>’ complains that <samp><span class="file">Makefile</span></samp> does not exist
74 1.1.1.13 mrg or issues a message like “don't know how to make distclean” it probably
75 1.1 mrg means that the directory is already suitably clean. However, with the
76 1.1 mrg recommended method of building in a separate <var>objdir</var>, you should
77 1.1 mrg simply use a different <var>objdir</var> for each target.
78 1.1.1.13 mrg
79 1.1.1.13 mrg <p>Second, when configuring a native system, either <samp><span class="command">cc</span></samp> or
80 1.1.1.13 mrg <samp><span class="command">gcc</span></samp> must be in your path or you must set <samp><span class="env">CC</span></samp> in
81 1.1 mrg your environment before running configure. Otherwise the configuration
82 1.1 mrg scripts may fail.
83 1.1 mrg
84 1.1.1.13 mrg <p>To configure GCC:
85 1.1 mrg
86 1.1.1.13 mrg <pre class="smallexample"> % mkdir <var>objdir</var>
87 1.1.1.13 mrg % cd <var>objdir</var>
88 1.1.1.13 mrg % <var>srcdir</var>/configure [<var>options</var>] [<var>target</var>]
89 1.1.1.13 mrg </pre>
90 1.1.1.13 mrg <h3 class="heading"><a name="TOC0"></a>Distributor options</h3>
91 1.1 mrg
92 1.1 mrg <p>If you will be distributing binary versions of GCC, with modifications
93 1.1 mrg to the source code, you should use the options described in this
94 1.1 mrg section to make clear that your version contains modifications.
95 1.1.1.13 mrg
96 1.1.1.13 mrg <dl>
97 1.1.1.13 mrg <dt><code>--with-pkgversion=</code><var>version</var><dd>Specify a string that identifies your package. You may wish
98 1.1 mrg to include a build number or build date. This version string will be
99 1.1.1.13 mrg included in the output of <samp><span class="command">gcc --version</span></samp>. This suffix does
100 1.1.1.13 mrg not replace the default version string, only the ‘<samp><span class="samp">GCC</span></samp>’ part.
101 1.1.1.13 mrg
102 1.1.1.13 mrg <p>The default value is ‘<samp><span class="samp">GCC</span></samp>’.
103 1.1.1.13 mrg
104 1.1.1.13 mrg <br><dt><code>--with-bugurl=</code><var>url</var><dd>Specify the URL that users should visit if they wish to report a bug.
105 1.1 mrg You are of course welcome to forward bugs reported to you to the FSF,
106 1.1 mrg if you determine that they are not bugs in your modifications.
107 1.1 mrg
108 1.1.1.13 mrg <p>The default value refers to the FSF's GCC bug tracker.
109 1.1.1.13 mrg
110 1.1.1.13 mrg </dl>
111 1.1.1.13 mrg
112 1.1.1.13 mrg <h3 class="heading"><a name="TOC1"></a>Target specification</h3>
113 1.1.1.13 mrg
114 1.1.1.13 mrg <ul>
115 1.1.1.13 mrg <li>GCC has code to correctly determine the correct value for <var>target</var>
116 1.1 mrg for nearly all native systems. Therefore, we highly recommend you do
117 1.1 mrg not provide a configure target when configuring a native compiler.
118 1.1 mrg
119 1.1.1.13 mrg <li><var>target</var> must be specified as <samp><span class="option">--target=</span><var>target</var></samp>
120 1.1 mrg when configuring a cross compiler; examples of valid targets would be
121 1.1 mrg m68k-elf, sh-elf, etc.
122 1.1 mrg
123 1.1.1.13 mrg <li>Specifying just <var>target</var> instead of <samp><span class="option">--target=</span><var>target</var></samp>
124 1.1.1.13 mrg implies that the host defaults to <var>target</var>.
125 1.1.1.13 mrg </ul>
126 1.1.1.11 mrg
127 1.1.1.13 mrg <h3 class="heading"><a name="TOC2"></a>Options specification</h3>
128 1.1 mrg
129 1.1 mrg <p>Use <var>options</var> to override several configure time options for
130 1.1.1.13 mrg GCC. A list of supported <var>options</var> follows; ‘<samp><span class="samp">configure
131 1.1.1.13 mrg --help</span></samp>’ may list other options, but those not listed below may not
132 1.1 mrg work and should not normally be used.
133 1.1.1.13 mrg
134 1.1.1.13 mrg <p>Note that each <samp><span class="option">--enable</span></samp> option has a corresponding
135 1.1.1.13 mrg <samp><span class="option">--disable</span></samp> option and that each <samp><span class="option">--with</span></samp> option has a
136 1.1.1.13 mrg corresponding <samp><span class="option">--without</span></samp> option.
137 1.1.1.13 mrg
138 1.1.1.13 mrg <dl>
139 1.1.1.13 mrg <dt><code>--prefix=</code><var>dirname</var><dd>Specify the toplevel installation
140 1.1 mrg directory. This is the recommended way to install the tools into a directory
141 1.1 mrg other than the default. The toplevel installation directory defaults to
142 1.1.1.13 mrg <samp><span class="file">/usr/local</span></samp>.
143 1.1.1.13 mrg
144 1.1.1.13 mrg <p>We <strong>highly</strong> recommend against <var>dirname</var> being the same or a
145 1.1 mrg subdirectory of <var>objdir</var> or vice versa. If specifying a directory
146 1.1.1.13 mrg beneath a user's home directory tree, some shells will not expand
147 1.1.1.13 mrg <var>dirname</var> correctly if it contains the ‘<samp><span class="samp">~</span></samp>’ metacharacter; use
148 1.1.1.13 mrg <samp><span class="env">$HOME</span></samp> instead.
149 1.1.1.13 mrg
150 1.1.1.13 mrg <p>The following standard <samp><span class="command">autoconf</span></samp> options are supported. Normally you
151 1.1 mrg should not need to use these options.
152 1.1.1.13 mrg <dl>
153 1.1.1.13 mrg <dt><code>--exec-prefix=</code><var>dirname</var><dd>Specify the toplevel installation directory for architecture-dependent
154 1.1 mrg files. The default is <samp><var>prefix</var></samp>.
155 1.1.1.13 mrg
156 1.1.1.13 mrg <br><dt><code>--bindir=</code><var>dirname</var><dd>Specify the installation directory for the executables called by users
157 1.1.1.13 mrg (such as <samp><span class="command">gcc</span></samp> and <samp><span class="command">g++</span></samp>). The default is
158 1.1.1.13 mrg <samp><var>exec-prefix</var><span class="file">/bin</span></samp>.
159 1.1.1.13 mrg
160 1.1.1.13 mrg <br><dt><code>--libdir=</code><var>dirname</var><dd>Specify the installation directory for object code libraries and
161 1.1.1.13 mrg internal data files of GCC. The default is <samp><var>exec-prefix</var><span class="file">/lib</span></samp>.
162 1.1.1.13 mrg
163 1.1.1.13 mrg <br><dt><code>--libexecdir=</code><var>dirname</var><dd>Specify the installation directory for internal executables of GCC.
164 1.1.1.13 mrg The default is <samp><var>exec-prefix</var><span class="file">/libexec</span></samp>.
165 1.1.1.13 mrg
166 1.1.1.13 mrg <br><dt><code>--with-slibdir=</code><var>dirname</var><dd>Specify the installation directory for the shared libgcc library. The
167 1.1 mrg default is <samp><var>libdir</var></samp>.
168 1.1.1.13 mrg
169 1.1.1.13 mrg <br><dt><code>--datarootdir=</code><var>dirname</var><dd>Specify the root of the directory tree for read-only architecture-independent
170 1.1.1.13 mrg data files referenced by GCC. The default is <samp><var>prefix</var><span class="file">/share</span></samp>.
171 1.1.1.13 mrg
172 1.1.1.13 mrg <br><dt><code>--infodir=</code><var>dirname</var><dd>Specify the installation directory for documentation in info format.
173 1.1.1.13 mrg The default is <samp><var>datarootdir</var><span class="file">/info</span></samp>.
174 1.1.1.13 mrg
175 1.1.1.13 mrg <br><dt><code>--datadir=</code><var>dirname</var><dd>Specify the installation directory for some architecture-independent
176 1.1 mrg data files referenced by GCC. The default is <samp><var>datarootdir</var></samp>.
177 1.1.1.13 mrg
178 1.1.1.13 mrg <br><dt><code>--docdir=</code><var>dirname</var><dd>Specify the installation directory for documentation files (other
179 1.1.1.13 mrg than Info) for GCC. The default is <samp><var>datarootdir</var><span class="file">/doc</span></samp>.
180 1.1.1.13 mrg
181 1.1.1.13 mrg <br><dt><code>--htmldir=</code><var>dirname</var><dd>Specify the installation directory for HTML documentation files.
182 1.1 mrg The default is <samp><var>docdir</var></samp>.
183 1.1.1.13 mrg
184 1.1.1.13 mrg <br><dt><code>--pdfdir=</code><var>dirname</var><dd>Specify the installation directory for PDF documentation files.
185 1.1 mrg The default is <samp><var>docdir</var></samp>.
186 1.1.1.13 mrg
187 1.1.1.13 mrg <br><dt><code>--mandir=</code><var>dirname</var><dd>Specify the installation directory for manual pages. The default is
188 1.1.1.13 mrg <samp><var>datarootdir</var><span class="file">/man</span></samp>. (Note that the manual pages are only extracts
189 1.1 mrg from the full GCC manuals, which are provided in Texinfo format. The manpages
190 1.1 mrg are derived by an automatic conversion process from parts of the full
191 1.1 mrg manual.)
192 1.1.1.13 mrg
193 1.1.1.13 mrg <br><dt><code>--with-gxx-include-dir=</code><var>dirname</var><dd>Specify
194 1.1 mrg the installation directory for G++ header files. The default depends
195 1.1 mrg on other configuration options, and differs between cross and native
196 1.1 mrg configurations.
197 1.1.1.13 mrg
198 1.1.1.13 mrg <br><dt><code>--with-specs=</code><var>specs</var><dd>Specify additional command line driver SPECS.
199 1.1.1.3 skrll This can be useful if you need to turn on a non-standard feature by
200 1.1.1.13 mrg default without modifying the compiler's source code, for instance
201 1.1.1.13 mrg <samp><span class="option">--with-specs=%{!fcommon:%{!fno-common:-fno-common}}</span></samp>.
202 1.1.1.3 skrll See “Spec Files” in the main manual
203 1.1.1.3 skrll
204 1.1.1.13 mrg </dl>
205 1.1.1.13 mrg
206 1.1.1.13 mrg <br><dt><code>--program-prefix=</code><var>prefix</var><dd>GCC supports some transformations of the names of its programs when
207 1.1 mrg installing them. This option prepends <var>prefix</var> to the names of
208 1.1 mrg programs to install in <var>bindir</var> (see above). For example, specifying
209 1.1.1.13 mrg <samp><span class="option">--program-prefix=foo-</span></samp> would result in ‘<samp><span class="samp">gcc</span></samp>’
210 1.1.1.13 mrg being installed as <samp><span class="file">/usr/local/bin/foo-gcc</span></samp>.
211 1.1.1.13 mrg
212 1.1.1.13 mrg <br><dt><code>--program-suffix=</code><var>suffix</var><dd>Appends <var>suffix</var> to the names of programs to install in <var>bindir</var>
213 1.1.1.13 mrg (see above). For example, specifying <samp><span class="option">--program-suffix=-3.1</span></samp>
214 1.1.1.13 mrg would result in ‘<samp><span class="samp">gcc</span></samp>’ being installed as
215 1.1.1.13 mrg <samp><span class="file">/usr/local/bin/gcc-3.1</span></samp>.
216 1.1.1.13 mrg
217 1.1.1.13 mrg <br><dt><code>--program-transform-name=</code><var>pattern</var><dd>Applies the ‘<samp><span class="samp">sed</span></samp>’ script <var>pattern</var> to be applied to the names
218 1.1 mrg of programs to install in <var>bindir</var> (see above). <var>pattern</var> has to
219 1.1.1.13 mrg consist of one or more basic ‘<samp><span class="samp">sed</span></samp>’ editing commands, separated by
220 1.1.1.13 mrg semicolons. For example, if you want the ‘<samp><span class="samp">gcc</span></samp>’ program name to be
221 1.1.1.13 mrg transformed to the installed program <samp><span class="file">/usr/local/bin/myowngcc</span></samp> and
222 1.1.1.13 mrg the ‘<samp><span class="samp">g++</span></samp>’ program name to be transformed to
223 1.1.1.13 mrg <samp><span class="file">/usr/local/bin/gspecial++</span></samp> without changing other program names,
224 1.1 mrg you could use the pattern
225 1.1.1.13 mrg <samp><span class="option">--program-transform-name='s/^gcc$/myowngcc/; s/^g++$/gspecial++/'</span></samp>
226 1.1 mrg to achieve this effect.
227 1.1.1.13 mrg
228 1.1.1.13 mrg <p>All three options can be combined and used together, resulting in more
229 1.1 mrg complex conversion patterns. As a basic rule, <var>prefix</var> (and
230 1.1 mrg <var>suffix</var>) are prepended (appended) before further transformations
231 1.1 mrg can happen with a special transformation script <var>pattern</var>.
232 1.1.1.13 mrg
233 1.1.1.13 mrg <p>As currently implemented, this option only takes effect for native
234 1.1.1.13 mrg builds; cross compiler binaries' names are not transformed even when a
235 1.1 mrg transformation is explicitly asked for by one of these options.
236 1.1.1.13 mrg
237 1.1.1.13 mrg <p>For native builds, some of the installed programs are also installed
238 1.1 mrg with the target alias in front of their name, as in
239 1.1.1.13 mrg ‘<samp><span class="samp">i686-pc-linux-gnu-gcc</span></samp>’. All of the above transformations happen
240 1.1 mrg before the target alias is prepended to the name—so, specifying
241 1.1.1.13 mrg <samp><span class="option">--program-prefix=foo-</span></samp> and <samp><span class="option">program-suffix=-3.1</span></samp>, the
242 1.1 mrg resulting binary would be installed as
243 1.1.1.13 mrg <samp><span class="file">/usr/local/bin/i686-pc-linux-gnu-foo-gcc-3.1</span></samp>.
244 1.1.1.13 mrg
245 1.1.1.13 mrg <p>As a last shortcoming, none of the installed Ada programs are
246 1.1 mrg transformed yet, which will be fixed in some time.
247 1.1.1.13 mrg
248 1.1.1.13 mrg <br><dt><code>--with-local-prefix=</code><var>dirname</var><dd>Specify the
249 1.1 mrg installation directory for local include files. The default is
250 1.1.1.13 mrg <samp><span class="file">/usr/local</span></samp>. Specify this option if you want the compiler to
251 1.1.1.13 mrg search directory <samp><var>dirname</var><span class="file">/include</span></samp> for locally installed
252 1.1.1.13 mrg header files <em>instead</em> of <samp><span class="file">/usr/local/include</span></samp>.
253 1.1.1.13 mrg
254 1.1.1.13 mrg <p>You should specify <samp><span class="option">--with-local-prefix</span></samp> <strong>only</strong> if your
255 1.1.1.13 mrg site has a different convention (not <samp><span class="file">/usr/local</span></samp>) for where to put
256 1.1 mrg site-specific files.
257 1.1.1.13 mrg
258 1.1.1.13 mrg <p>The default value for <samp><span class="option">--with-local-prefix</span></samp> is <samp><span class="file">/usr/local</span></samp>
259 1.1.1.13 mrg regardless of the value of <samp><span class="option">--prefix</span></samp>. Specifying
260 1.1.1.13 mrg <samp><span class="option">--prefix</span></samp> has no effect on which directory GCC searches for
261 1.1 mrg local header files. This may seem counterintuitive, but actually it is
262 1.1 mrg logical.
263 1.1.1.13 mrg
264 1.1.1.13 mrg <p>The purpose of <samp><span class="option">--prefix</span></samp> is to specify where to <em>install
265 1.1.1.13 mrg GCC</em>. The local header files in <samp><span class="file">/usr/local/include</span></samp>—if you put
266 1.1 mrg any in that directory—are not part of GCC. They are part of other
267 1.1 mrg programs—perhaps many others. (GCC installs its own header files in
268 1.1.1.13 mrg another directory which is based on the <samp><span class="option">--prefix</span></samp> value.)
269 1.1.1.13 mrg
270 1.1.1.13 mrg <p>Both the local-prefix include directory and the GCC-prefix include
271 1.1.1.13 mrg directory are part of GCC's “system include” directories. Although these
272 1.1 mrg two directories are not fixed, they need to be searched in the proper
273 1.1 mrg order for the correct processing of the include_next directive. The
274 1.1 mrg local-prefix include directory is searched before the GCC-prefix
275 1.1 mrg include directory. Another characteristic of system include directories
276 1.1 mrg is that pedantic warnings are turned off for headers in these directories.
277 1.1.1.13 mrg
278 1.1.1.13 mrg <p>Some autoconf macros add <samp><span class="option">-I </span><var>directory</var></samp> options to the
279 1.1 mrg compiler command line, to ensure that directories containing installed
280 1.1.1.13 mrg packages' headers are searched. When <var>directory</var> is one of GCC's
281 1.1 mrg system include directories, GCC will ignore the option so that system
282 1.1 mrg directories continue to be processed in the correct order. This
283 1.1 mrg may result in a search order different from what was specified but the
284 1.1 mrg directory will still be searched.
285 1.1.1.13 mrg
286 1.1.1.13 mrg <p>GCC automatically searches for ordinary libraries using
287 1.1.1.13 mrg <samp><span class="env">GCC_EXEC_PREFIX</span></samp>. Thus, when the same installation prefix is
288 1.1 mrg used for both GCC and packages, GCC will automatically search for
289 1.1 mrg both headers and libraries. This provides a configuration that is
290 1.1 mrg easy to use. GCC behaves in a manner similar to that when it is
291 1.1.1.13 mrg installed as a system compiler in <samp><span class="file">/usr</span></samp>.
292 1.1.1.13 mrg
293 1.1.1.13 mrg <p>Sites that need to install multiple versions of GCC may not want to
294 1.1 mrg use the above simple configuration. It is possible to use the
295 1.1.1.13 mrg <samp><span class="option">--program-prefix</span></samp>, <samp><span class="option">--program-suffix</span></samp> and
296 1.1.1.13 mrg <samp><span class="option">--program-transform-name</span></samp> options to install multiple versions
297 1.1 mrg into a single directory, but it may be simpler to use different prefixes
298 1.1.1.13 mrg and the <samp><span class="option">--with-local-prefix</span></samp> option to specify the location of the
299 1.1 mrg site-specific files for each version. It will then be necessary for
300 1.1 mrg users to specify explicitly the location of local site libraries
301 1.1.1.13 mrg (e.g., with <samp><span class="env">LIBRARY_PATH</span></samp>).
302 1.1.1.13 mrg
303 1.1.1.13 mrg <p>The same value can be used for both <samp><span class="option">--with-local-prefix</span></samp> and
304 1.1.1.13 mrg <samp><span class="option">--prefix</span></samp> provided it is not <samp><span class="file">/usr</span></samp>. This can be used
305 1.1.1.13 mrg to avoid the default search of <samp><span class="file">/usr/local/include</span></samp>.
306 1.1.1.13 mrg
307 1.1.1.13 mrg <p><strong>Do not</strong> specify <samp><span class="file">/usr</span></samp> as the <samp><span class="option">--with-local-prefix</span></samp>!
308 1.1.1.13 mrg The directory you use for <samp><span class="option">--with-local-prefix</span></samp> <strong>must not</strong>
309 1.1.1.13 mrg contain any of the system's standard header files. If it did contain
310 1.1 mrg them, certain programs would be miscompiled (including GNU Emacs, on
311 1.1 mrg certain targets), because this would override and nullify the header
312 1.1.1.13 mrg file corrections made by the <samp><span class="command">fixincludes</span></samp> script.
313 1.1.1.13 mrg
314 1.1.1.13 mrg <p>Indications are that people who use this option use it based on mistaken
315 1.1 mrg ideas of what it is for. People use it as if it specified where to
316 1.1 mrg install part of GCC. Perhaps they make this assumption because
317 1.1 mrg installing GCC creates the directory.
318 1.1.1.13 mrg
319 1.1.1.13 mrg <br><dt><code>--with-gcc-major-version-only</code><dd>Specifies that GCC should use only the major number rather than
320 1.1.1.10 mrg <var>major</var>.<var>minor</var>.<var>patchlevel</var> in filesystem paths.
321 1.1.1.13 mrg
322 1.1.1.13 mrg <br><dt><code>--with-native-system-header-dir=</code><var>dirname</var><dd>Specifies that <var>dirname</var> is the directory that contains native system
323 1.1.1.13 mrg header files, rather than <samp><span class="file">/usr/include</span></samp>. This option is most useful
324 1.1.1.3 skrll if you are creating a compiler that should be isolated from the system
325 1.1.1.3 skrll as much as possible. It is most commonly used with the
326 1.1.1.13 mrg <samp><span class="option">--with-sysroot</span></samp> option and will cause GCC to search
327 1.1.1.3 skrll <var>dirname</var> inside the system root specified by that option.
328 1.1.1.13 mrg
329 1.1.1.13 mrg <br><dt><code>--enable-shared[=</code><var>package</var><code>[,...]]</code><dd>Build shared versions of libraries, if shared libraries are supported on
330 1.1 mrg the target platform. Unlike GCC 2.95.x and earlier, shared libraries
331 1.1 mrg are enabled by default on all platforms that support shared libraries.
332 1.1.1.13 mrg
333 1.1.1.13 mrg <p>If a list of packages is given as an argument, build shared libraries
334 1.1 mrg only for the listed packages. For other packages, only static libraries
335 1.1 mrg will be built. Package names currently recognized in the GCC tree are
336 1.1.1.13 mrg ‘<samp><span class="samp">libgcc</span></samp>’ (also known as ‘<samp><span class="samp">gcc</span></samp>’), ‘<samp><span class="samp">libstdc++</span></samp>’ (not
337 1.1.1.13 mrg ‘<samp><span class="samp">libstdc++-v3</span></samp>’), ‘<samp><span class="samp">libffi</span></samp>’, ‘<samp><span class="samp">zlib</span></samp>’, ‘<samp><span class="samp">boehm-gc</span></samp>’,
338 1.1.1.13 mrg ‘<samp><span class="samp">ada</span></samp>’, ‘<samp><span class="samp">libada</span></samp>’, ‘<samp><span class="samp">libgo</span></samp>’, and ‘<samp><span class="samp">libobjc</span></samp>’.
339 1.1.1.13 mrg Note ‘<samp><span class="samp">libiberty</span></samp>’ does not support shared libraries at all.
340 1.1.1.13 mrg
341 1.1.1.13 mrg <p>Use <samp><span class="option">--disable-shared</span></samp> to build only static libraries. Note that
342 1.1.1.13 mrg <samp><span class="option">--disable-shared</span></samp> does not accept a list of package names as
343 1.1.1.13 mrg argument, only <samp><span class="option">--enable-shared</span></samp> does.
344 1.1.1.13 mrg
345 1.1.1.13 mrg <p>Contrast with <samp><span class="option">--enable-host-shared</span></samp>, which affects <em>host</em>
346 1.1.1.6 mrg code.
347 1.1.1.13 mrg
348 1.1.1.13 mrg <br><dt><code>--enable-host-shared</code><dd>Specify that the <em>host</em> code should be built into position-independent
349 1.1.1.6 mrg machine code (with -fPIC), allowing it to be used within shared libraries,
350 1.1.1.6 mrg but yielding a slightly slower compiler.
351 1.1.1.13 mrg
352 1.1.1.13 mrg <p>This option is required when building the libgccjit.so library.
353 1.1.1.13 mrg
354 1.1.1.13 mrg <p>Contrast with <samp><span class="option">--enable-shared</span></samp>, which affects <em>target</em>
355 1.1.1.6 mrg libraries.
356 1.1.1.13 mrg
357 1.1.1.13 mrg <br><dt><code><a name="with-gnu-as"></a>--with-gnu-as</code><dd>Specify that the compiler should assume that the
358 1.1 mrg assembler it finds is the GNU assembler. However, this does not modify
359 1.1 mrg the rules to find an assembler and will result in confusion if the
360 1.1 mrg assembler found is not actually the GNU assembler. (Confusion may also
361 1.1 mrg result if the compiler finds the GNU assembler but has not been
362 1.1.1.13 mrg configured with <samp><span class="option">--with-gnu-as</span></samp>.) If you have more than one
363 1.1 mrg assembler installed on your system, you may want to use this option in
364 1.1.1.13 mrg connection with <samp><span class="option">--with-as=</span><var>pathname</var></samp> or
365 1.1.1.13 mrg <samp><span class="option">--with-build-time-tools=</span><var>pathname</var></samp>.
366 1.1.1.13 mrg
367 1.1.1.13 mrg <p>The following systems are the only ones where it makes a difference
368 1.1 mrg whether you use the GNU assembler. On any other system,
369 1.1.1.13 mrg <samp><span class="option">--with-gnu-as</span></samp> has no effect.
370 1.1.1.13 mrg
371 1.1.1.13 mrg <ul>
372 1.1.1.13 mrg <li>‘<samp><span class="samp">hppa1.0-</span><var>any</var><span class="samp">-</span><var>any</var></samp>’
373 1.1.1.13 mrg <li>‘<samp><span class="samp">hppa1.1-</span><var>any</var><span class="samp">-</span><var>any</var></samp>’
374 1.1.1.13 mrg <li>‘<samp><span class="samp">sparc-sun-solaris2.</span><var>any</var></samp>’
375 1.1.1.13 mrg <li>‘<samp><span class="samp">sparc64-</span><var>any</var><span class="samp">-solaris2.</span><var>any</var></samp>’
376 1.1.1.13 mrg </ul>
377 1.1.1.13 mrg
378 1.1.1.13 mrg <br><dt><code><a name="with-as"></a>--with-as=</code><var>pathname</var><dd>Specify that the compiler should use the assembler pointed to by
379 1.1 mrg <var>pathname</var>, rather than the one found by the standard rules to find
380 1.1 mrg an assembler, which are:
381 1.1.1.13 mrg <ul>
382 1.1.1.13 mrg <li>Unless GCC is being built with a cross compiler, check the
383 1.1.1.13 mrg <samp><var>libexec</var><span class="file">/gcc/</span><var>target</var><span class="file">/</span><var>version</var></samp> directory.
384 1.1.1.13 mrg <var>libexec</var> defaults to <samp><var>exec-prefix</var><span class="file">/libexec</span></samp>;
385 1.1 mrg <var>exec-prefix</var> defaults to <var>prefix</var>, which
386 1.1.1.13 mrg defaults to <samp><span class="file">/usr/local</span></samp> unless overridden by the
387 1.1.1.13 mrg <samp><span class="option">--prefix=</span><var>pathname</var></samp> switch described above. <var>target</var>
388 1.1.1.13 mrg is the target system triple, such as ‘<samp><span class="samp">sparc-sun-solaris2.7</span></samp>’, and
389 1.1 mrg <var>version</var> denotes the GCC version, such as 3.0.
390 1.1 mrg
391 1.1.1.13 mrg <li>If the target system is the same that you are building on, check
392 1.1.1.13 mrg operating system specific directories (e.g. <samp><span class="file">/usr/ccs/bin</span></samp> on
393 1.1 mrg Sun Solaris 2).
394 1.1 mrg
395 1.1.1.13 mrg <li>Check in the <samp><span class="env">PATH</span></samp> for a tool whose name is prefixed by the
396 1.1 mrg target system triple.
397 1.1 mrg
398 1.1.1.13 mrg <li>Check in the <samp><span class="env">PATH</span></samp> for a tool whose name is not prefixed by the
399 1.1 mrg target system triple, if the host and target system triple are
400 1.1 mrg the same (in other words, we use a host tool if it can be used for
401 1.1.1.13 mrg the target as well).
402 1.1.1.13 mrg </ul>
403 1.1 mrg
404 1.1.1.13 mrg <p>You may want to use <samp><span class="option">--with-as</span></samp> if no assembler
405 1.1 mrg is installed in the directories listed above, or if you have multiple
406 1.1 mrg assemblers installed and want to choose one that is not found by the
407 1.1 mrg above rules.
408 1.1.1.13 mrg
409 1.1.1.13 mrg <br><dt><code><a name="with-gnu-ld"></a>--with-gnu-ld</code><dd>Same as <a href="#with-gnu-as"><samp><span class="option">--with-gnu-as</span></samp></a>
410 1.1 mrg but for the linker.
411 1.1.1.13 mrg
412 1.1.1.13 mrg <br><dt><code>--with-ld=</code><var>pathname</var><dd>Same as <a href="#with-as"><samp><span class="option">--with-as</span></samp></a>
413 1.1 mrg but for the linker.
414 1.1.1.13 mrg
415 1.1.1.13 mrg <br><dt><code>--with-stabs</code><dd>Specify that stabs debugging
416 1.1 mrg information should be used instead of whatever format the host normally
417 1.1 mrg uses. Normally GCC uses the same debug format as the host system.
418 1.1.1.13 mrg
419 1.1.1.13 mrg <p>On MIPS based systems and on Alphas, you must specify whether you want
420 1.1.1.13 mrg GCC to create the normal ECOFF debugging format, or to use BSD-style
421 1.1.1.13 mrg stabs passed through the ECOFF symbol table. The normal ECOFF debug
422 1.1.1.13 mrg format cannot fully handle languages other than C. BSD stabs format can
423 1.1.1.13 mrg handle other languages, but it only works with the GNU debugger GDB.
424 1.1.1.13 mrg
425 1.1.1.13 mrg <p>Normally, GCC uses the ECOFF debugging format by default; if you
426 1.1.1.13 mrg prefer BSD stabs, specify <samp><span class="option">--with-stabs</span></samp> when you configure GCC.
427 1.1.1.13 mrg
428 1.1.1.13 mrg <p>No matter which default you choose when you configure GCC, the user
429 1.1.1.13 mrg can use the <samp><span class="option">-gcoff</span></samp> and <samp><span class="option">-gstabs+</span></samp> options to specify explicitly
430 1.1.1.13 mrg the debug format for a particular compilation.
431 1.1.1.13 mrg
432 1.1.1.13 mrg <p><samp><span class="option">--with-stabs</span></samp> is meaningful on the ISC system on the 386, also, if
433 1.1.1.13 mrg <samp><span class="option">--with-gas</span></samp> is used. It selects use of stabs debugging
434 1.1.1.13 mrg information embedded in COFF output. This kind of debugging information
435 1.1.1.13 mrg supports C++ well; ordinary COFF debugging information does not.
436 1.1.1.13 mrg
437 1.1.1.13 mrg <p><samp><span class="option">--with-stabs</span></samp> is also meaningful on 386 systems running SVR4. It
438 1.1.1.13 mrg selects use of stabs debugging information embedded in ELF output. The
439 1.1.1.13 mrg C++ compiler currently (2.6.0) does not support the DWARF debugging
440 1.1.1.13 mrg information normally used on 386 SVR4 platforms; stabs provide a
441 1.1.1.13 mrg workable alternative. This requires gas and gdb, as the normal SVR4
442 1.1.1.13 mrg tools can not generate or interpret stabs.
443 1.1.1.13 mrg
444 1.1.1.13 mrg <br><dt><code>--with-tls=</code><var>dialect</var><dd>Specify the default TLS dialect, for systems were there is a choice.
445 1.1.1.3 skrll For ARM targets, possible values for <var>dialect</var> are <code>gnu</code> or
446 1.1.1.3 skrll <code>gnu2</code>, which select between the original GNU dialect and the GNU TLS
447 1.1.1.3 skrll descriptor-based dialect.
448 1.1.1.13 mrg
449 1.1.1.13 mrg <br><dt><code>--enable-multiarch</code><dd>Specify whether to enable or disable multiarch support. The default is
450 1.1.1.3 skrll to check for glibc start files in a multiarch location, and enable it
451 1.1.1.3 skrll if the files are found. The auto detection is enabled for native builds,
452 1.1.1.13 mrg and for cross builds configured with <samp><span class="option">--with-sysroot</span></samp>, and without
453 1.1.1.13 mrg <samp><span class="option">--with-native-system-header-dir</span></samp>.
454 1.1.1.3 skrll More documentation about multiarch can be found at
455 1.1.1.8 mrg <a href="https://wiki.debian.org/Multiarch">https://wiki.debian.org/Multiarch</a>.
456 1.1.1.13 mrg
457 1.1.1.13 mrg <br><dt><code>--enable-sjlj-exceptions</code><dd>Force use of the <code>setjmp</code>/<code>longjmp</code>-based scheme for exceptions.
458 1.1.1.13 mrg ‘<samp><span class="samp">configure</span></samp>’ ordinarily picks the correct value based on the platform.
459 1.1.1.7 mrg Only use this option if you are sure you need a different setting.
460 1.1.1.13 mrg
461 1.1.1.13 mrg <br><dt><code>--enable-vtable-verify</code><dd>Specify whether to enable or disable the vtable verification feature.
462 1.1.1.6 mrg Enabling this feature causes libstdc++ to be built with its virtual calls
463 1.1.1.6 mrg in verifiable mode. This means that, when linked with libvtv, every
464 1.1.1.6 mrg virtual call in libstdc++ will verify the vtable pointer through which the
465 1.1.1.6 mrg call will be made before actually making the call. If not linked with libvtv,
466 1.1.1.13 mrg the verifier will call stub functions (in libstdc++ itself) and do nothing.
467 1.1.1.6 mrg If vtable verification is disabled, then libstdc++ is not built with its
468 1.1.1.6 mrg virtual calls in verifiable mode at all. However the libvtv library will
469 1.1.1.13 mrg still be built (see <samp><span class="option">--disable-libvtv</span></samp> to turn off building libvtv).
470 1.1.1.13 mrg <samp><span class="option">--disable-vtable-verify</span></samp> is the default.
471 1.1.1.13 mrg
472 1.1.1.13 mrg <br><dt><code>--disable-multilib</code><dd>Specify that multiple target
473 1.1 mrg libraries to support different target variants, calling
474 1.1 mrg conventions, etc. should not be built. The default is to build a
475 1.1 mrg predefined set of them.
476 1.1.1.13 mrg
477 1.1.1.13 mrg <p>Some targets provide finer-grained control over which multilibs are built
478 1.1.1.13 mrg (e.g., <samp><span class="option">--disable-softfloat</span></samp>):
479 1.1.1.13 mrg <dl>
480 1.1.1.13 mrg <dt><code>arm-*-*</code><dd>fpu, 26bit, underscore, interwork, biendian, nofmult.
481 1.1.1.13 mrg
482 1.1.1.13 mrg <br><dt><code>m68*-*-*</code><dd>softfloat, m68881, m68000, m68020.
483 1.1.1.13 mrg
484 1.1.1.13 mrg <br><dt><code>mips*-*-*</code><dd>single-float, biendian, softfloat.
485 1.1.1.13 mrg
486 1.1.1.13 mrg <br><dt><code>powerpc*-*-*, rs6000*-*-*</code><dd>aix64, pthread, softfloat, powercpu, powerpccpu, powerpcos, biendian,
487 1.1 mrg sysv, aix.
488 1.1 mrg
489 1.1.1.13 mrg </dl>
490 1.1.1.13 mrg
491 1.1.1.13 mrg <br><dt><code>--with-multilib-list=</code><var>list</var><dt><code>--without-multilib-list</code><dd>Specify what multilibs to build. <var>list</var> is a comma separated list of
492 1.1.1.10 mrg values, possibly consisting of a single value. Currently only implemented
493 1.1.1.13 mrg for arm*-*-*, sh*-*-* and x86-64-*-linux*. The accepted values and meaning
494 1.1.1.13 mrg for each target is given below.
495 1.1.1.13 mrg
496 1.1.1.13 mrg <dl>
497 1.1.1.13 mrg <dt><code>arm*-*-*</code><dd><var>list</var> is one of<code>default</code>, <code>aprofile</code> or <code>rmprofile</code>.
498 1.1.1.13 mrg Specifying <code>default</code> is equivalent to omitting this option, ie. only the
499 1.1.1.13 mrg default runtime library will be enabled. Specifying <code>aprofile</code> or
500 1.1.1.13 mrg <code>rmprofile</code> builds multilibs for a combination of ISA, architecture,
501 1.1.1.13 mrg FPU available and floating-point ABI.
502 1.1.1.13 mrg
503 1.1.1.13 mrg <p>The table below gives the combination of ISAs, architectures, FPUs and
504 1.1.1.10 mrg floating-point ABIs for which multilibs are built for each accepted value.
505 1.1.1.13 mrg
506 1.1.1.13 mrg <p><table summary=""><tr align="left"><td valign="top" width="15%">Option </td><td valign="top" width="28%">aprofile </td><td valign="top" width="30%">rmprofile
507 1.1.1.13 mrg <br></td></tr><tr align="left"><td valign="top" width="15%">ISAs
508 1.1.1.13 mrg </td><td valign="top" width="28%"><code>-marm</code> and <code>-mthumb</code>
509 1.1.1.13 mrg </td><td valign="top" width="30%"><code>-mthumb</code>
510 1.1.1.13 mrg <br></td></tr><tr align="left"><td valign="top" width="15%">Architectures<br><br><br><br><br><br>
511 1.1.1.13 mrg </td><td valign="top" width="28%">default architecture<br>
512 1.1.1.10 mrg <code>-march=armv7-a</code><br>
513 1.1.1.10 mrg <code>-march=armv7ve</code><br>
514 1.1.1.13 mrg <code>-march=armv8-a</code><br><br><br>
515 1.1.1.13 mrg </td><td valign="top" width="30%">default architecture<br>
516 1.1.1.10 mrg <code>-march=armv6s-m</code><br>
517 1.1.1.10 mrg <code>-march=armv7-m</code><br>
518 1.1.1.10 mrg <code>-march=armv7e-m</code><br>
519 1.1.1.10 mrg <code>-march=armv8-m.base</code><br>
520 1.1.1.10 mrg <code>-march=armv8-m.main</code><br>
521 1.1.1.13 mrg <code>-march=armv7</code>
522 1.1.1.13 mrg <br></td></tr><tr align="left"><td valign="top" width="15%">FPUs<br><br><br><br><br>
523 1.1.1.13 mrg </td><td valign="top" width="28%">none<br>
524 1.1.1.10 mrg <code>-mfpu=vfpv3-d16</code><br>
525 1.1.1.10 mrg <code>-mfpu=neon</code><br>
526 1.1.1.10 mrg <code>-mfpu=vfpv4-d16</code><br>
527 1.1.1.10 mrg <code>-mfpu=neon-vfpv4</code><br>
528 1.1.1.13 mrg <code>-mfpu=neon-fp-armv8</code>
529 1.1.1.13 mrg </td><td valign="top" width="30%">none<br>
530 1.1.1.10 mrg <code>-mfpu=vfpv3-d16</code><br>
531 1.1.1.10 mrg <code>-mfpu=fpv4-sp-d16</code><br>
532 1.1.1.10 mrg <code>-mfpu=fpv5-sp-d16</code><br>
533 1.1.1.13 mrg <code>-mfpu=fpv5-d16</code><br>
534 1.1.1.13 mrg <br></td></tr><tr align="left"><td valign="top" width="15%">floating-point ABIs<br><br>
535 1.1.1.13 mrg </td><td valign="top" width="28%"><code>-mfloat-abi=soft</code><br>
536 1.1.1.10 mrg <code>-mfloat-abi=softfp</code><br>
537 1.1.1.13 mrg <code>-mfloat-abi=hard</code>
538 1.1.1.13 mrg </td><td valign="top" width="30%"><code>-mfloat-abi=soft</code><br>
539 1.1.1.10 mrg <code>-mfloat-abi=softfp</code><br>
540 1.1.1.13 mrg <code>-mfloat-abi=hard</code>
541 1.1.1.13 mrg <br></td></tr></table>
542 1.1.1.10 mrg
543 1.1.1.13 mrg <br><dt><code>sh*-*-*</code><dd><var>list</var> is a comma separated list of CPU names. These must be of the
544 1.1 mrg form <code>sh*</code> or <code>m*</code> (in which case they match the compiler option
545 1.1 mrg for that processor). The list should not contain any endian options -
546 1.1.1.13 mrg these are handled by <samp><span class="option">--with-endian</span></samp>.
547 1.1.1.13 mrg
548 1.1.1.13 mrg <p>If <var>list</var> is empty, then there will be no multilibs for extra
549 1.1 mrg processors. The multilib for the secondary endian remains enabled.
550 1.1.1.13 mrg
551 1.1.1.13 mrg <p>As a special case, if an entry in the list starts with a <code>!</code>
552 1.1.1.13 mrg (exclamation point), then it is added to the list of excluded multilibs.
553 1.1.1.13 mrg Entries of this sort should be compatible with ‘<samp><span class="samp">MULTILIB_EXCLUDES</span></samp>’
554 1.1 mrg (once the leading <code>!</code> has been stripped).
555 1.1.1.13 mrg
556 1.1.1.13 mrg <p>If <samp><span class="option">--with-multilib-list</span></samp> is not given, then a default set of
557 1.1.1.13 mrg multilibs is selected based on the value of <samp><span class="option">--target</span></samp>. This is
558 1.1 mrg usually the complete set of libraries, but some targets imply a more
559 1.1 mrg specialized subset.
560 1.1.1.11 mrg
561 1.1.1.13 mrg <p>Example 1: to configure a compiler for SH4A only, but supporting both
562 1.1.1.13 mrg endians, with little endian being the default:
563 1.1.1.13 mrg <pre class="smallexample"> --with-cpu=sh4a --with-endian=little,big --with-multilib-list=
564 1.1.1.13 mrg </pre>
565 1.1.1.13 mrg <p>Example 2: to configure a compiler for both SH4A and SH4AL-DSP, but with
566 1.1 mrg only little endian SH4AL:
567 1.1.1.13 mrg <pre class="smallexample"> --with-cpu=sh4a --with-endian=little,big \
568 1.1.1.13 mrg --with-multilib-list=sh4al,!mb/m4al
569 1.1.1.13 mrg </pre>
570 1.1.1.13 mrg <br><dt><code>x86-64-*-linux*</code><dd><var>list</var> is a comma separated list of <code>m32</code>, <code>m64</code> and
571 1.1.1.3 skrll <code>mx32</code> to enable 32-bit, 64-bit and x32 run-time libraries,
572 1.1.1.3 skrll respectively. If <var>list</var> is empty, then there will be no multilibs
573 1.1.1.3 skrll and only the default run-time library will be enabled.
574 1.1.1.13 mrg
575 1.1.1.13 mrg <p>If <samp><span class="option">--with-multilib-list</span></samp> is not given, then only 32-bit and
576 1.1.1.13 mrg 64-bit run-time libraries will be enabled.
577 1.1.1.3 skrll </dl>
578 1.1.1.3 skrll
579 1.1.1.13 mrg <br><dt><code>--with-endian=</code><var>endians</var><dd>Specify what endians to use.
580 1.1 mrg Currently only implemented for sh*-*-*.
581 1.1.1.13 mrg
582 1.1.1.13 mrg <p><var>endians</var> may be one of the following:
583 1.1.1.13 mrg <dl>
584 1.1.1.13 mrg <dt><code>big</code><dd>Use big endian exclusively.
585 1.1.1.13 mrg <br><dt><code>little</code><dd>Use little endian exclusively.
586 1.1.1.13 mrg <br><dt><code>big,little</code><dd>Use big endian by default. Provide a multilib for little endian.
587 1.1.1.13 mrg <br><dt><code>little,big</code><dd>Use little endian by default. Provide a multilib for big endian.
588 1.1 mrg </dl>
589 1.1 mrg
590 1.1.1.13 mrg <br><dt><code>--enable-threads</code><dd>Specify that the target
591 1.1 mrg supports threads. This affects the Objective-C compiler and runtime
592 1.1.1.13 mrg library, and exception handling for other languages like C++.
593 1.1 mrg On some systems, this is the default.
594 1.1.1.13 mrg
595 1.1.1.13 mrg <p>In general, the best (and, in many cases, the only known) threading
596 1.1 mrg model available will be configured for use. Beware that on some
597 1.1 mrg systems, GCC has not been taught what threading models are generally
598 1.1.1.13 mrg available for the system. In this case, <samp><span class="option">--enable-threads</span></samp> is an
599 1.1.1.13 mrg alias for <samp><span class="option">--enable-threads=single</span></samp>.
600 1.1.1.13 mrg
601 1.1.1.13 mrg <br><dt><code>--disable-threads</code><dd>Specify that threading support should be disabled for the system.
602 1.1.1.13 mrg This is an alias for <samp><span class="option">--enable-threads=single</span></samp>.
603 1.1.1.13 mrg
604 1.1.1.13 mrg <br><dt><code>--enable-threads=</code><var>lib</var><dd>Specify that
605 1.1 mrg <var>lib</var> is the thread support library. This affects the Objective-C
606 1.1 mrg compiler and runtime library, and exception handling for other languages
607 1.1.1.10 mrg like C++. The possibilities for <var>lib</var> are:
608 1.1.1.13 mrg
609 1.1.1.13 mrg <dl>
610 1.1.1.13 mrg <dt><code>aix</code><dd>AIX thread support.
611 1.1.1.13 mrg <br><dt><code>dce</code><dd>DCE thread support.
612 1.1.1.13 mrg <br><dt><code>lynx</code><dd>LynxOS thread support.
613 1.1.1.13 mrg <br><dt><code>mipssde</code><dd>MIPS SDE thread support.
614 1.1.1.13 mrg <br><dt><code>no</code><dd>This is an alias for ‘<samp><span class="samp">single</span></samp>’.
615 1.1.1.13 mrg <br><dt><code>posix</code><dd>Generic POSIX/Unix98 thread support.
616 1.1.1.13 mrg <br><dt><code>rtems</code><dd>RTEMS thread support.
617 1.1.1.13 mrg <br><dt><code>single</code><dd>Disable thread support, should work for all platforms.
618 1.1.1.13 mrg <br><dt><code>tpf</code><dd>TPF thread support.
619 1.1.1.13 mrg <br><dt><code>vxworks</code><dd>VxWorks thread support.
620 1.1.1.13 mrg <br><dt><code>win32</code><dd>Microsoft Win32 API thread support.
621 1.1 mrg </dl>
622 1.1 mrg
623 1.1.1.13 mrg <br><dt><code>--enable-tls</code><dd>Specify that the target supports TLS (Thread Local Storage). Usually
624 1.1 mrg configure can correctly determine if TLS is supported. In cases where
625 1.1 mrg it guesses incorrectly, TLS can be explicitly enabled or disabled with
626 1.1.1.13 mrg <samp><span class="option">--enable-tls</span></samp> or <samp><span class="option">--disable-tls</span></samp>. This can happen if
627 1.1 mrg the assembler supports TLS but the C library does not, or if the
628 1.1 mrg assumptions made by the configure test are incorrect.
629 1.1.1.13 mrg
630 1.1.1.13 mrg <br><dt><code>--disable-tls</code><dd>Specify that the target does not support TLS.
631 1.1.1.13 mrg This is an alias for <samp><span class="option">--enable-tls=no</span></samp>.
632 1.1.1.13 mrg
633 1.1.1.13 mrg <br><dt><code>--with-cpu=</code><var>cpu</var><dt><code>--with-cpu-32=</code><var>cpu</var><dt><code>--with-cpu-64=</code><var>cpu</var><dd>Specify which cpu variant the compiler should generate code for by default.
634 1.1.1.13 mrg <var>cpu</var> will be used as the default value of the <samp><span class="option">-mcpu=</span></samp> switch.
635 1.1.1.6 mrg This option is only supported on some targets, including ARC, ARM, i386, M68k,
636 1.1.1.13 mrg PowerPC, and SPARC. It is mandatory for ARC. The <samp><span class="option">--with-cpu-32</span></samp> and
637 1.1.1.13 mrg <samp><span class="option">--with-cpu-64</span></samp> options specify separate default CPUs for
638 1.1 mrg 32-bit and 64-bit modes; these options are only supported for i386,
639 1.1.1.8 mrg x86-64, PowerPC, and SPARC.
640 1.1.1.13 mrg
641 1.1.1.13 mrg <br><dt><code>--with-schedule=</code><var>cpu</var><dt><code>--with-arch=</code><var>cpu</var><dt><code>--with-arch-32=</code><var>cpu</var><dt><code>--with-arch-64=</code><var>cpu</var><dt><code>--with-tune=</code><var>cpu</var><dt><code>--with-tune-32=</code><var>cpu</var><dt><code>--with-tune-64=</code><var>cpu</var><dt><code>--with-abi=</code><var>abi</var><dt><code>--with-fpu=</code><var>type</var><dt><code>--with-float=</code><var>type</var><dd>These configure options provide default values for the <samp><span class="option">-mschedule=</span></samp>,
642 1.1.1.13 mrg <samp><span class="option">-march=</span></samp>, <samp><span class="option">-mtune=</span></samp>, <samp><span class="option">-mabi=</span></samp>, and <samp><span class="option">-mfpu=</span></samp>
643 1.1.1.13 mrg options and for <samp><span class="option">-mhard-float</span></samp> or <samp><span class="option">-msoft-float</span></samp>. As with
644 1.1.1.13 mrg <samp><span class="option">--with-cpu</span></samp>, which switches will be accepted and acceptable values
645 1.1 mrg of the arguments depend on the target.
646 1.1.1.13 mrg
647 1.1.1.13 mrg <br><dt><code>--with-mode=</code><var>mode</var><dd>Specify if the compiler should default to <samp><span class="option">-marm</span></samp> or <samp><span class="option">-mthumb</span></samp>.
648 1.1 mrg This option is only supported on ARM targets.
649 1.1.1.13 mrg
650 1.1.1.13 mrg <br><dt><code>--with-stack-offset=</code><var>num</var><dd>This option sets the default for the -mstack-offset=<var>num</var> option,
651 1.1.1.3 skrll and will thus generally also control the setting of this option for
652 1.1.1.3 skrll libraries. This option is only supported on Epiphany targets.
653 1.1.1.13 mrg
654 1.1.1.13 mrg <br><dt><code>--with-fpmath=</code><var>isa</var><dd>This options sets <samp><span class="option">-mfpmath=sse</span></samp> by default and specifies the default
655 1.1.1.13 mrg ISA for floating-point arithmetics. You can select either ‘<samp><span class="samp">sse</span></samp>’ which
656 1.1.1.13 mrg enables <samp><span class="option">-msse2</span></samp> or ‘<samp><span class="samp">avx</span></samp>’ which enables <samp><span class="option">-mavx</span></samp> by default.
657 1.1.1.3 skrll This option is only supported on i386 and x86-64 targets.
658 1.1.1.13 mrg
659 1.1.1.13 mrg <br><dt><code>--with-fp-32=</code><var>mode</var><dd>On MIPS targets, set the default value for the <samp><span class="option">-mfp</span></samp> option when using
660 1.1.1.6 mrg the o32 ABI. The possibilities for <var>mode</var> are:
661 1.1.1.13 mrg <dl>
662 1.1.1.13 mrg <dt><code>32</code><dd>Use the o32 FP32 ABI extension, as with the <samp><span class="option">-mfp32</span></samp> command-line
663 1.1.1.13 mrg option.
664 1.1.1.13 mrg <br><dt><code>xx</code><dd>Use the o32 FPXX ABI extension, as with the <samp><span class="option">-mfpxx</span></samp> command-line
665 1.1.1.13 mrg option.
666 1.1.1.13 mrg <br><dt><code>64</code><dd>Use the o32 FP64 ABI extension, as with the <samp><span class="option">-mfp64</span></samp> command-line
667 1.1.1.13 mrg option.
668 1.1.1.6 mrg </dl>
669 1.1.1.13 mrg In the absence of this configuration option the default is to use the o32
670 1.1.1.6 mrg FP32 ABI extension.
671 1.1.1.13 mrg
672 1.1.1.13 mrg <br><dt><code>--with-odd-spreg-32</code><dd>On MIPS targets, set the <samp><span class="option">-modd-spreg</span></samp> option by default when using
673 1.1.1.6 mrg the o32 ABI.
674 1.1.1.13 mrg
675 1.1.1.13 mrg <br><dt><code>--without-odd-spreg-32</code><dd>On MIPS targets, set the <samp><span class="option">-mno-odd-spreg</span></samp> option by default when using
676 1.1.1.6 mrg the o32 ABI. This is normally used in conjunction with
677 1.1.1.13 mrg <samp><span class="option">--with-fp-32=64</span></samp> in order to target the o32 FP64A ABI extension.
678 1.1.1.13 mrg
679 1.1.1.13 mrg <br><dt><code>--with-nan=</code><var>encoding</var><dd>On MIPS targets, set the default encoding convention to use for the
680 1.1.1.6 mrg special not-a-number (NaN) IEEE 754 floating-point data. The
681 1.1.1.6 mrg possibilities for <var>encoding</var> are:
682 1.1.1.13 mrg <dl>
683 1.1.1.13 mrg <dt><code>legacy</code><dd>Use the legacy encoding, as with the <samp><span class="option">-mnan=legacy</span></samp> command-line
684 1.1.1.13 mrg option.
685 1.1.1.13 mrg <br><dt><code>2008</code><dd>Use the 754-2008 encoding, as with the <samp><span class="option">-mnan=2008</span></samp> command-line
686 1.1.1.13 mrg option.
687 1.1.1.6 mrg </dl>
688 1.1.1.13 mrg To use this configuration option you must have an assembler version
689 1.1.1.13 mrg installed that supports the <samp><span class="option">-mnan=</span></samp> command-line option too.
690 1.1.1.6 mrg In the absence of this configuration option the default convention is
691 1.1.1.13 mrg the legacy encoding, as when neither of the <samp><span class="option">-mnan=2008</span></samp> and
692 1.1.1.13 mrg <samp><span class="option">-mnan=legacy</span></samp> command-line options has been used.
693 1.1.1.13 mrg
694 1.1.1.13 mrg <br><dt><code>--with-divide=</code><var>type</var><dd>Specify how the compiler should generate code for checking for
695 1.1.1.13 mrg division by zero. This option is only supported on the MIPS target.
696 1.1 mrg The possibilities for <var>type</var> are:
697 1.1.1.13 mrg <dl>
698 1.1.1.13 mrg <dt><code>traps</code><dd>Division by zero checks use conditional traps (this is the default on
699 1.1.1.13 mrg systems that support conditional traps).
700 1.1.1.13 mrg <br><dt><code>breaks</code><dd>Division by zero checks use the break instruction.
701 1.1 mrg </dl>
702 1.1 mrg
703 1.1.1.13 mrg <!-- If you make -with-llsc the default for additional targets, -->
704 1.1.1.13 mrg <!-- update the -with-llsc description in the MIPS section below. -->
705 1.1.1.13 mrg <br><dt><code>--with-llsc</code><dd>On MIPS targets, make <samp><span class="option">-mllsc</span></samp> the default when no
706 1.1.1.13 mrg <samp><span class="option">-mno-llsc</span></samp> option is passed. This is the default for
707 1.1 mrg Linux-based targets, as the kernel will emulate them if the ISA does
708 1.1 mrg not provide them.
709 1.1.1.13 mrg
710 1.1.1.13 mrg <br><dt><code>--without-llsc</code><dd>On MIPS targets, make <samp><span class="option">-mno-llsc</span></samp> the default when no
711 1.1.1.13 mrg <samp><span class="option">-mllsc</span></samp> option is passed.
712 1.1.1.13 mrg
713 1.1.1.13 mrg <br><dt><code>--with-synci</code><dd>On MIPS targets, make <samp><span class="option">-msynci</span></samp> the default when no
714 1.1.1.13 mrg <samp><span class="option">-mno-synci</span></samp> option is passed.
715 1.1.1.13 mrg
716 1.1.1.13 mrg <br><dt><code>--without-synci</code><dd>On MIPS targets, make <samp><span class="option">-mno-synci</span></samp> the default when no
717 1.1.1.13 mrg <samp><span class="option">-msynci</span></samp> option is passed. This is the default.
718 1.1.1.13 mrg
719 1.1.1.13 mrg <br><dt><code>--with-lxc1-sxc1</code><dd>On MIPS targets, make <samp><span class="option">-mlxc1-sxc1</span></samp> the default when no
720 1.1.1.13 mrg <samp><span class="option">-mno-lxc1-sxc1</span></samp> option is passed. This is the default.
721 1.1.1.13 mrg
722 1.1.1.13 mrg <br><dt><code>--without-lxc1-sxc1</code><dd>On MIPS targets, make <samp><span class="option">-mno-lxc1-sxc1</span></samp> the default when no
723 1.1.1.13 mrg <samp><span class="option">-mlxc1-sxc1</span></samp> option is passed. The indexed load/store
724 1.1.1.10 mrg instructions are not directly a problem but can lead to unexpected
725 1.1.1.10 mrg behaviour when deployed in an application intended for a 32-bit address
726 1.1.1.10 mrg space but run on a 64-bit processor. The issue is seen because all
727 1.1.1.10 mrg known MIPS 64-bit Linux kernels execute o32 and n32 applications
728 1.1.1.10 mrg with 64-bit addressing enabled which affects the overflow behaviour
729 1.1.1.10 mrg of the indexed addressing mode. GCC will assume that ordinary
730 1.1.1.10 mrg 32-bit arithmetic overflow behaviour is the same whether performed
731 1.1.1.10 mrg as an <code>addu</code> instruction or as part of the address calculation
732 1.1.1.10 mrg in <code>lwxc1</code> type instructions. This assumption holds true in a
733 1.1.1.10 mrg pure 32-bit environment and can hold true in a 64-bit environment if
734 1.1.1.10 mrg the address space is accurately set to be 32-bit for o32 and n32.
735 1.1.1.13 mrg
736 1.1.1.13 mrg <br><dt><code>--with-madd4</code><dd>On MIPS targets, make <samp><span class="option">-mmadd4</span></samp> the default when no
737 1.1.1.13 mrg <samp><span class="option">-mno-madd4</span></samp> option is passed. This is the default.
738 1.1.1.13 mrg
739 1.1.1.13 mrg <br><dt><code>--without-madd4</code><dd>On MIPS targets, make <samp><span class="option">-mno-madd4</span></samp> the default when no
740 1.1.1.13 mrg <samp><span class="option">-mmadd4</span></samp> option is passed. The <code>madd4</code> instruction
741 1.1.1.10 mrg family can be problematic when targeting a combination of cores that
742 1.1.1.10 mrg implement these instructions differently. There are two known cores
743 1.1.1.10 mrg that implement these as fused operations instead of unfused (where
744 1.1.1.10 mrg unfused is normally expected). Disabling these instructions is the
745 1.1.1.10 mrg only way to ensure compatible code is generated; this will incur
746 1.1.1.10 mrg a performance penalty.
747 1.1.1.13 mrg
748 1.1.1.13 mrg <br><dt><code>--with-mips-plt</code><dd>On MIPS targets, make use of copy relocations and PLTs.
749 1.1 mrg These features are extensions to the traditional
750 1.1 mrg SVR4-based MIPS ABIs and require support from GNU binutils
751 1.1 mrg and the runtime C library.
752 1.1.1.13 mrg
753 1.1.1.13 mrg <br><dt><code>--enable-__cxa_atexit</code><dd>Define if you want to use __cxa_atexit, rather than atexit, to
754 1.1.1.13 mrg register C++ destructors for local statics and global objects.
755 1.1 mrg This is essential for fully standards-compliant handling of
756 1.1 mrg destructors, but requires __cxa_atexit in libc. This option is currently
757 1.1 mrg only available on systems with GNU libc. When enabled, this will cause
758 1.1.1.13 mrg <samp><span class="option">-fuse-cxa-atexit</span></samp> to be passed by default.
759 1.1.1.13 mrg
760 1.1.1.13 mrg <br><dt><code>--enable-gnu-indirect-function</code><dd>Define if you want to enable the <code>ifunc</code> attribute. This option is
761 1.1.1.3 skrll currently only available on systems with GNU libc on certain targets.
762 1.1.1.13 mrg
763 1.1.1.13 mrg <br><dt><code>--enable-target-optspace</code><dd>Specify that target
764 1.1.1.13 mrg libraries should be optimized for code space instead of code speed.
765 1.1 mrg This is the default for the m32r platform.
766 1.1.1.13 mrg
767 1.1.1.13 mrg <br><dt><code>--with-cpp-install-dir=</code><var>dirname</var><dd>Specify that the user visible <samp><span class="command">cpp</span></samp> program should be installed
768 1.1.1.13 mrg in <samp><var>prefix</var><span class="file">/</span><var>dirname</var><span class="file">/cpp</span></samp>, in addition to <var>bindir</var>.
769 1.1.1.13 mrg
770 1.1.1.13 mrg <br><dt><code>--enable-comdat</code><dd>Enable COMDAT group support. This is primarily used to override the
771 1.1 mrg automatically detected value.
772 1.1.1.13 mrg
773 1.1.1.13 mrg <br><dt><code>--enable-initfini-array</code><dd>Force the use of sections <code>.init_array</code> and <code>.fini_array</code>
774 1.1 mrg (instead of <code>.init</code> and <code>.fini</code>) for constructors and
775 1.1.1.13 mrg destructors. Option <samp><span class="option">--disable-initfini-array</span></samp> has the
776 1.1 mrg opposite effect. If neither option is specified, the configure script
777 1.1 mrg will try to guess whether the <code>.init_array</code> and
778 1.1 mrg <code>.fini_array</code> sections are supported and, if they are, use them.
779 1.1.1.13 mrg
780 1.1.1.13 mrg <br><dt><code>--enable-link-mutex</code><dd>When building GCC, use a mutex to avoid linking the compilers for
781 1.1.1.6 mrg multiple languages at the same time, to avoid thrashing on build
782 1.1.1.6 mrg systems with limited free memory. The default is not to use such a mutex.
783 1.1.1.13 mrg
784 1.1.1.13 mrg <br><dt><code>--enable-maintainer-mode</code><dd>The build rules that regenerate the Autoconf and Automake output files as
785 1.1.1.13 mrg well as the GCC master message catalog <samp><span class="file">gcc.pot</span></samp> are normally
786 1.1 mrg disabled. This is because it can only be rebuilt if the complete source
787 1.1 mrg tree is present. If you have changed the sources and want to rebuild the
788 1.1.1.13 mrg catalog, configuring with <samp><span class="option">--enable-maintainer-mode</span></samp> will enable
789 1.1 mrg this. Note that you need a recent version of the <code>gettext</code> tools
790 1.1 mrg to do so.
791 1.1.1.13 mrg
792 1.1.1.13 mrg <br><dt><code>--disable-bootstrap</code><dd>For a native build, the default configuration is to perform
793 1.1.1.13 mrg a 3-stage bootstrap of the compiler when ‘<samp><span class="samp">make</span></samp>’ is invoked,
794 1.1 mrg testing that GCC can compile itself correctly. If you want to disable
795 1.1.1.13 mrg this process, you can configure with <samp><span class="option">--disable-bootstrap</span></samp>.
796 1.1.1.13 mrg
797 1.1.1.13 mrg <br><dt><code>--enable-bootstrap</code><dd>In special cases, you may want to perform a 3-stage build
798 1.1.1.13 mrg even if the target and host triplets are different.
799 1.1 mrg This is possible when the host can run code compiled for
800 1.1.1.13 mrg the target (e.g. host is i686-linux, target is i486-linux).
801 1.1 mrg Starting from GCC 4.2, to do this you have to configure explicitly
802 1.1.1.13 mrg with <samp><span class="option">--enable-bootstrap</span></samp>.
803 1.1.1.13 mrg
804 1.1.1.13 mrg <br><dt><code>--enable-generated-files-in-srcdir</code><dd>Neither the .c and .h files that are generated from Bison and flex nor the
805 1.1 mrg info manuals and man pages that are built from the .texi files are present
806 1.1.1.13 mrg in the SVN development tree. When building GCC from that development tree,
807 1.1 mrg or from one of our snapshots, those generated files are placed in your
808 1.1 mrg build directory, which allows for the source to be in a readonly
809 1.1 mrg directory.
810 1.1.1.13 mrg
811 1.1.1.13 mrg <p>If you configure with <samp><span class="option">--enable-generated-files-in-srcdir</span></samp> then those
812 1.1 mrg generated files will go into the source directory. This is mainly intended
813 1.1 mrg for generating release or prerelease tarballs of the GCC sources, since it
814 1.1 mrg is not a requirement that the users of source releases to have flex, Bison,
815 1.1 mrg or makeinfo.
816 1.1.1.13 mrg
817 1.1.1.13 mrg <br><dt><code>--enable-version-specific-runtime-libs</code><dd>Specify
818 1.1 mrg that runtime libraries should be installed in the compiler specific
819 1.1.1.13 mrg subdirectory (<samp><var>libdir</var><span class="file">/gcc</span></samp>) rather than the usual places. In
820 1.1.1.13 mrg addition, ‘<samp><span class="samp">libstdc++</span></samp>’'s include files will be installed into
821 1.1 mrg <samp><var>libdir</var></samp> unless you overruled it by using
822 1.1.1.13 mrg <samp><span class="option">--with-gxx-include-dir=</span><var>dirname</var></samp>. Using this option is
823 1.1 mrg particularly useful if you intend to use several versions of GCC in
824 1.1.1.13 mrg parallel. This is currently supported by ‘<samp><span class="samp">libgfortran</span></samp>’,
825 1.1.1.13 mrg ‘<samp><span class="samp">libstdc++</span></samp>’, and ‘<samp><span class="samp">libobjc</span></samp>’.
826 1.1.1.13 mrg
827 1.1.1.13 mrg <br><dt><code><a name="WithAixSoname"></a>--with-aix-soname=‘</code><samp><span class="samp">aix</span></samp><code>’, ‘</code><samp><span class="samp">svr4</span></samp><code>’ or ‘</code><samp><span class="samp">both</span></samp><code>’</code><dd>Traditional AIX shared library versioning (versioned <code>Shared Object</code>
828 1.1.1.6 mrg files as members of unversioned <code>Archive Library</code> files named
829 1.1.1.13 mrg ‘<samp><span class="samp">lib.a</span></samp>’) causes numerous headaches for package managers. However,
830 1.1.1.6 mrg <code>Import Files</code> as members of <code>Archive Library</code> files allow for
831 1.1.1.6 mrg <strong>filename-based versioning</strong> of shared libraries as seen on Linux/SVR4,
832 1.1.1.13 mrg where this is called the "SONAME". But as they prevent static linking,
833 1.1.1.6 mrg <code>Import Files</code> may be used with <code>Runtime Linking</code> only, where the
834 1.1.1.13 mrg linker does search for ‘<samp><span class="samp">libNAME.so</span></samp>’ before ‘<samp><span class="samp">libNAME.a</span></samp>’ library
835 1.1.1.13 mrg filenames with the ‘<samp><span class="samp">-lNAME</span></samp>’ linker flag.
836 1.1.1.13 mrg
837 1.1.1.13 mrg <p><a name="AixLdCommand"></a>For detailed information please refer to the AIX
838 1.1.1.13 mrg <a href="https://www.ibm.com/support/knowledgecenter/search/%22the%20ld%20command%2C%20also%20called%20the%20linkage%20editor%20or%20binder%22">ld Command</a> reference.
839 1.1.1.13 mrg
840 1.1.1.13 mrg <p>As long as shared library creation is enabled, upon:
841 1.1.1.13 mrg <dl>
842 1.1.1.13 mrg <dt><code>--with-aix-soname=aix</code><br><dt><code>--with-aix-soname=both</code><dd> A (traditional AIX) <code>Shared Archive Library</code> file is created:
843 1.1.1.13 mrg <ul>
844 1.1.1.13 mrg <li>using the ‘<samp><span class="samp">libNAME.a</span></samp>’ filename scheme
845 1.1.1.13 mrg <li>with the <code>Shared Object</code> file as archive member named
846 1.1.1.13 mrg ‘<samp><span class="samp">libNAME.so.V</span></samp>’ (except for ‘<samp><span class="samp">libgcc_s</span></samp>’, where the <code>Shared
847 1.1.1.13 mrg Object</code> file is named ‘<samp><span class="samp">shr.o</span></samp>’ for backwards compatibility), which
848 1.1.1.13 mrg <ul>
849 1.1.1.13 mrg <li>is used for runtime loading from inside the ‘<samp><span class="samp">libNAME.a</span></samp>’ file
850 1.1.1.13 mrg <li>is used for dynamic loading via
851 1.1.1.13 mrg <code>dlopen("libNAME.a(libNAME.so.V)", RTLD_MEMBER)</code>
852 1.1.1.13 mrg <li>is used for shared linking
853 1.1.1.13 mrg <li>is used for static linking, so no separate <code>Static Archive
854 1.1.1.6 mrg Library</code> file is needed
855 1.1.1.13 mrg </ul>
856 1.1.1.13 mrg </ul>
857 1.1.1.13 mrg <br><dt><code>--with-aix-soname=both</code><br><dt><code>--with-aix-soname=svr4</code><dd> A (second) <code>Shared Archive Library</code> file is created:
858 1.1.1.13 mrg <ul>
859 1.1.1.13 mrg <li>using the ‘<samp><span class="samp">libNAME.so.V</span></samp>’ filename scheme
860 1.1.1.13 mrg <li>with the <code>Shared Object</code> file as archive member named
861 1.1.1.13 mrg ‘<samp><span class="samp">shr.o</span></samp>’, which
862 1.1.1.13 mrg <ul>
863 1.1.1.13 mrg <li>is created with the <code>-G linker flag</code>
864 1.1.1.13 mrg <li>has the <code>F_LOADONLY</code> flag set
865 1.1.1.13 mrg <li>is used for runtime loading from inside the ‘<samp><span class="samp">libNAME.so.V</span></samp>’ file
866 1.1.1.13 mrg <li>is used for dynamic loading via <code>dlopen("libNAME.so.V(shr.o)",
867 1.1.1.6 mrg RTLD_MEMBER)</code>
868 1.1.1.13 mrg </ul>
869 1.1.1.13 mrg <li>with the <code>Import File</code> as archive member named ‘<samp><span class="samp">shr.imp</span></samp>’,
870 1.1.1.6 mrg which
871 1.1.1.13 mrg <ul>
872 1.1.1.13 mrg <li>refers to ‘<samp><span class="samp">libNAME.so.V(shr.o)</span></samp>’ as the "SONAME", to be recorded
873 1.1.1.6 mrg in the <code>Loader Section</code> of subsequent binaries
874 1.1.1.13 mrg <li>indicates whether ‘<samp><span class="samp">libNAME.so.V(shr.o)</span></samp>’ is 32 or 64 bit
875 1.1.1.13 mrg <li>lists all the public symbols exported by ‘<samp><span class="samp">lib.so.V(shr.o)</span></samp>’,
876 1.1.1.13 mrg eventually decorated with the <code>‘</code><samp><span class="samp">weak</span></samp><code>’ Keyword</code>
877 1.1.1.13 mrg <li>is necessary for shared linking against ‘<samp><span class="samp">lib.so.V(shr.o)</span></samp>’
878 1.1.1.13 mrg </ul>
879 1.1.1.13 mrg </ul>
880 1.1.1.13 mrg A symbolic link using the ‘<samp><span class="samp">libNAME.so</span></samp>’ filename scheme is created:
881 1.1.1.13 mrg <ul>
882 1.1.1.13 mrg <li>pointing to the ‘<samp><span class="samp">libNAME.so.V</span></samp>’ <code>Shared Archive Library</code> file
883 1.1.1.13 mrg <li>to permit the <code>ld Command</code> to find ‘<samp><span class="samp">lib.so.V(shr.imp)</span></samp>’ via
884 1.1.1.13 mrg the ‘<samp><span class="samp">-lNAME</span></samp>’ argument (requires <code>Runtime Linking</code> to be enabled)
885 1.1.1.13 mrg <li>to permit dynamic loading of ‘<samp><span class="samp">lib.so.V(shr.o)</span></samp>’ without the need
886 1.1.1.13 mrg to specify the version number via <code>dlopen("libNAME.so(shr.o)",
887 1.1.1.6 mrg RTLD_MEMBER)</code>
888 1.1.1.13 mrg </ul>
889 1.1.1.13 mrg </dl>
890 1.1.1.6 mrg
891 1.1.1.13 mrg <p>As long as static library creation is enabled, upon:
892 1.1.1.13 mrg <dl>
893 1.1.1.13 mrg <dt><code>--with-aix-soname=svr4</code><dd> A <code>Static Archive Library</code> is created:
894 1.1.1.13 mrg <ul>
895 1.1.1.13 mrg <li>using the ‘<samp><span class="samp">libNAME.a</span></samp>’ filename scheme
896 1.1.1.13 mrg <li>with all the <code>Static Object</code> files as archive members, which
897 1.1.1.13 mrg <ul>
898 1.1.1.13 mrg <li>are used for static linking
899 1.1.1.13 mrg </ul>
900 1.1.1.13 mrg </ul>
901 1.1.1.13 mrg </dl>
902 1.1.1.6 mrg
903 1.1.1.13 mrg <p>While the aix-soname=‘<samp><span class="samp">svr4</span></samp>’ option does not create <code>Shared Object</code>
904 1.1.1.6 mrg files as members of unversioned <code>Archive Library</code> files any more, package
905 1.1.1.6 mrg managers still are responsible to
906 1.1.1.6 mrg <a href="./specific.html#TransferAixShobj">transfer</a> <code>Shared Object</code> files
907 1.1.1.6 mrg found as member of a previously installed unversioned <code>Archive Library</code>
908 1.1.1.6 mrg file into the newly installed <code>Archive Library</code> file with the same
909 1.1.1.6 mrg filename.
910 1.1.1.13 mrg
911 1.1.1.13 mrg <p><em>WARNING:</em> Creating <code>Shared Object</code> files with <code>Runtime Linking</code>
912 1.1.1.6 mrg enabled may bloat the TOC, eventually leading to <code>TOC overflow</code> errors,
913 1.1.1.13 mrg requiring the use of either the <samp><span class="option">-Wl,-bbigtoc</span></samp> linker flag (seen to
914 1.1.1.6 mrg break with the <code>GDB</code> debugger) or some of the TOC-related compiler flags,
915 1.1.1.6 mrg see “RS/6000 and PowerPC Options” in the main manual.
916 1.1.1.13 mrg
917 1.1.1.13 mrg <p><samp><span class="option">--with-aix-soname</span></samp> is currently supported by ‘<samp><span class="samp">libgcc_s</span></samp>’ only, so
918 1.1.1.6 mrg this option is still experimental and not for normal use yet.
919 1.1.1.13 mrg
920 1.1.1.13 mrg <p>Default is the traditional behavior <samp><span class="option">--with-aix-soname=‘</span><samp><span class="samp">aix</span></samp><span class="option">’</span></samp>.
921 1.1.1.13 mrg
922 1.1.1.13 mrg <br><dt><code>--enable-languages=</code><var>lang1</var><code>,</code><var>lang2</var><code>,...</code><dd>Specify that only a particular subset of compilers and
923 1.1 mrg their runtime libraries should be built. For a list of valid values for
924 1.1 mrg <var>langN</var> you can issue the following command in the
925 1.1.1.13 mrg <samp><span class="file">gcc</span></samp> directory of your GCC source tree:<br>
926 1.1.1.13 mrg <pre class="smallexample"> grep ^language= */config-lang.in
927 1.1.1.13 mrg </pre>
928 1.1.1.13 mrg <p>Currently, you can use any of the following:
929 1.1.1.13 mrg <code>all</code>, <code>ada</code>, <code>c</code>, <code>c++</code>, <code>fortran</code>,
930 1.1.1.13 mrg <code>go</code>, <code>jit</code>, <code>lto</code>, <code>objc</code>, <code>obj-c++</code>.
931 1.1.1.13 mrg Building the Ada compiler has special requirements, see below.
932 1.1.1.13 mrg If you do not pass this flag, or specify the option <code>all</code>, then all
933 1.1.1.13 mrg default languages available in the <samp><span class="file">gcc</span></samp> sub-tree will be configured.
934 1.1.1.8 mrg Ada, Go, Jit, and Objective-C++ are not default languages. LTO is not a
935 1.1.1.13 mrg default language, but is built by default because <samp><span class="option">--enable-lto</span></samp> is
936 1.1.1.13 mrg enabled by default. The other languages are default languages.
937 1.1.1.13 mrg
938 1.1.1.13 mrg <br><dt><code>--enable-stage1-languages=</code><var>lang1</var><code>,</code><var>lang2</var><code>,...</code><dd>Specify that a particular subset of compilers and their runtime
939 1.1 mrg libraries should be built with the system C compiler during stage 1 of
940 1.1 mrg the bootstrap process, rather than only in later stages with the
941 1.1 mrg bootstrapped C compiler. The list of valid values is the same as for
942 1.1.1.13 mrg <samp><span class="option">--enable-languages</span></samp>, and the option <code>all</code> will select all
943 1.1.1.13 mrg of the languages enabled by <samp><span class="option">--enable-languages</span></samp>. This option is
944 1.1 mrg primarily useful for GCC development; for instance, when a development
945 1.1 mrg version of the compiler cannot bootstrap due to compiler bugs, or when
946 1.1 mrg one is debugging front ends other than the C front end. When this
947 1.1 mrg option is used, one can then build the target libraries for the
948 1.1.1.13 mrg specified languages with the stage-1 compiler by using <samp><span class="command">make
949 1.1.1.13 mrg stage1-bubble all-target</span></samp>, or run the testsuite on the stage-1 compiler
950 1.1.1.13 mrg for the specified languages using <samp><span class="command">make stage1-start check-gcc</span></samp>.
951 1.1.1.13 mrg
952 1.1.1.13 mrg <br><dt><code>--disable-libada</code><dd>Specify that the run-time libraries and tools used by GNAT should not
953 1.1 mrg be built. This can be useful for debugging, or for compatibility with
954 1.1 mrg previous Ada build procedures, when it was required to explicitly
955 1.1.1.13 mrg do a ‘<samp><span class="samp">make -C gcc gnatlib_and_tools</span></samp>’.
956 1.1.1.13 mrg
957 1.1.1.13 mrg <br><dt><code>--disable-libsanitizer</code><dd>Specify that the run-time libraries for the various sanitizers should
958 1.1.1.6 mrg not be built.
959 1.1.1.13 mrg
960 1.1.1.13 mrg <br><dt><code>--disable-libssp</code><dd>Specify that the run-time libraries for stack smashing protection
961 1.1.1.13 mrg should not be built.
962 1.1.1.13 mrg
963 1.1.1.13 mrg <br><dt><code>--disable-libquadmath</code><dd>Specify that the GCC quad-precision math library should not be built.
964 1.1.1.3 skrll On some systems, the library is required to be linkable when building
965 1.1.1.13 mrg the Fortran front end, unless <samp><span class="option">--disable-libquadmath-support</span></samp>
966 1.1.1.3 skrll is used.
967 1.1.1.13 mrg
968 1.1.1.13 mrg <br><dt><code>--disable-libquadmath-support</code><dd>Specify that the Fortran front end and <code>libgfortran</code> do not add
969 1.1.1.3 skrll support for <code>libquadmath</code> on systems supporting it.
970 1.1.1.13 mrg
971 1.1.1.13 mrg <br><dt><code>--disable-libgomp</code><dd>Specify that the GNU Offloading and Multi Processing Runtime Library
972 1.1.1.6 mrg should not be built.
973 1.1.1.13 mrg
974 1.1.1.13 mrg <br><dt><code>--disable-libvtv</code><dd>Specify that the run-time libraries used by vtable verification
975 1.1.1.6 mrg should not be built.
976 1.1.1.13 mrg
977 1.1.1.13 mrg <br><dt><code>--with-dwarf2</code><dd>Specify that the compiler should
978 1.1 mrg use DWARF 2 debugging information as the default.
979 1.1.1.13 mrg
980 1.1.1.13 mrg <br><dt><code>--with-advance-toolchain=</code><var>at</var><dd>On 64-bit PowerPC Linux systems, configure the compiler to use the
981 1.1.1.8 mrg header files, library files, and the dynamic linker from the Advance
982 1.1.1.8 mrg Toolchain release <var>at</var> instead of the default versions that are
983 1.1.1.8 mrg provided by the Linux distribution. In general, this option is
984 1.1.1.8 mrg intended for the developers of GCC, and it is not intended for general
985 1.1.1.8 mrg use.
986 1.1.1.13 mrg
987 1.1.1.13 mrg <br><dt><code>--enable-targets=all</code><dt><code>--enable-targets=</code><var>target_list</var><dd>Some GCC targets, e.g. powerpc64-linux, build bi-arch compilers.
988 1.1 mrg These are compilers that are able to generate either 64-bit or 32-bit
989 1.1.1.13 mrg code. Typically, the corresponding 32-bit target, e.g.
990 1.1 mrg powerpc-linux for powerpc64-linux, only generates 32-bit code. This
991 1.1 mrg option enables the 32-bit target to be a bi-arch compiler, which is
992 1.1 mrg useful when you want a bi-arch compiler that defaults to 32-bit, and
993 1.1.1.13 mrg you are building a bi-arch or multi-arch binutils in a combined tree.
994 1.1 mrg On mips-linux, this will build a tri-arch compiler (ABI o32/n32/64),
995 1.1.1.13 mrg defaulted to o32.
996 1.1.1.3 skrll Currently, this option only affects sparc-linux, powerpc-linux, x86-linux,
997 1.1.1.3 skrll mips-linux and s390-linux.
998 1.1.1.13 mrg
999 1.1.1.13 mrg <br><dt><code>--enable-default-pie</code><dd>Turn on <samp><span class="option">-fPIE</span></samp> and <samp><span class="option">-pie</span></samp> by default.
1000 1.1.1.13 mrg
1001 1.1.1.13 mrg <br><dt><code>--enable-secureplt</code><dd>This option enables <samp><span class="option">-msecure-plt</span></samp> by default for powerpc-linux.
1002 1.1 mrg See “RS/6000 and PowerPC Options” in the main manual
1003 1.1.1.13 mrg
1004 1.1.1.13 mrg <br><dt><code>--enable-default-ssp</code><dd>Turn on <samp><span class="option">-fstack-protector-strong</span></samp> by default.
1005 1.1.1.13 mrg
1006 1.1.1.13 mrg <br><dt><code>--enable-cld</code><dd>This option enables <samp><span class="option">-mcld</span></samp> by default for 32-bit x86 targets.
1007 1.1 mrg See “i386 and x86-64 Options” in the main manual
1008 1.1.1.13 mrg
1009 1.1.1.13 mrg <br><dt><code>--enable-win32-registry</code><dt><code>--enable-win32-registry=</code><var>key</var><dt><code>--disable-win32-registry</code><dd>The <samp><span class="option">--enable-win32-registry</span></samp> option enables Microsoft Windows-hosted GCC
1010 1.1 mrg to look up installations paths in the registry using the following key:
1011 1.1 mrg
1012 1.1.1.13 mrg <pre class="smallexample"> <code>HKEY_LOCAL_MACHINE\SOFTWARE\Free Software Foundation\</code><var>key</var>
1013 1.1.1.13 mrg </pre>
1014 1.1.1.13 mrg <p><var>key</var> defaults to GCC version number, and can be overridden by the
1015 1.1.1.13 mrg <samp><span class="option">--enable-win32-registry=</span><var>key</var></samp> option. Vendors and distributors
1016 1.1 mrg who use custom installers are encouraged to provide a different key,
1017 1.1 mrg perhaps one comprised of vendor name and GCC version number, to
1018 1.1 mrg avoid conflict with existing installations. This feature is enabled
1019 1.1.1.13 mrg by default, and can be disabled by <samp><span class="option">--disable-win32-registry</span></samp>
1020 1.1 mrg option. This option has no effect on the other hosts.
1021 1.1.1.13 mrg
1022 1.1.1.13 mrg <br><dt><code>--nfp</code><dd>Specify that the machine does not have a floating point unit. This
1023 1.1.1.13 mrg option only applies to ‘<samp><span class="samp">m68k-sun-sunos</span><var>n</var></samp>’. On any other
1024 1.1.1.13 mrg system, <samp><span class="option">--nfp</span></samp> has no effect.
1025 1.1.1.13 mrg
1026 1.1.1.13 mrg <br><dt><code>--enable-werror</code><dt><code>--disable-werror</code><dt><code>--enable-werror=yes</code><dt><code>--enable-werror=no</code><dd>When you specify this option, it controls whether certain files in the
1027 1.1.1.13 mrg compiler are built with <samp><span class="option">-Werror</span></samp> in bootstrap stage2 and later.
1028 1.1.1.13 mrg If you don't specify it, <samp><span class="option">-Werror</span></samp> is turned on for the main
1029 1.1 mrg development trunk. However it defaults to off for release branches and
1030 1.1.1.13 mrg final releases. The specific files which get <samp><span class="option">-Werror</span></samp> are
1031 1.1 mrg controlled by the Makefiles.
1032 1.1.1.13 mrg
1033 1.1.1.13 mrg <br><dt><code>--enable-checking</code><dt><code>--enable-checking=</code><var>list</var><dd>When you specify this option, the compiler is built to perform internal
1034 1.1.1.13 mrg consistency checks of the requested complexity. This does not change the
1035 1.1.1.13 mrg generated code, but adds error checking within the compiler. This will
1036 1.1.1.13 mrg slow down the compiler and may only work properly if you are building
1037 1.1.1.13 mrg the compiler with GCC. This is ‘<samp><span class="samp">yes,extra</span></samp>’ by default when building
1038 1.1.1.13 mrg from SVN or snapshots, but ‘<samp><span class="samp">release</span></samp>’ for releases. The default
1039 1.1.1.13 mrg for building the stage1 compiler is ‘<samp><span class="samp">yes</span></samp>’. More control
1040 1.1.1.13 mrg over the checks may be had by specifying <var>list</var>. The categories of
1041 1.1.1.13 mrg checks available are ‘<samp><span class="samp">yes</span></samp>’ (most common checks
1042 1.1.1.13 mrg ‘<samp><span class="samp">assert,misc,tree,gc,rtlflag,runtime</span></samp>’), ‘<samp><span class="samp">no</span></samp>’ (no checks at
1043 1.1.1.13 mrg all), ‘<samp><span class="samp">all</span></samp>’ (all but ‘<samp><span class="samp">valgrind</span></samp>’), ‘<samp><span class="samp">release</span></samp>’ (cheapest
1044 1.1.1.13 mrg checks ‘<samp><span class="samp">assert,runtime</span></samp>’) or ‘<samp><span class="samp">none</span></samp>’ (same as ‘<samp><span class="samp">no</span></samp>’).
1045 1.1.1.13 mrg Individual checks can be enabled with these flags ‘<samp><span class="samp">assert</span></samp>’,
1046 1.1.1.13 mrg ‘<samp><span class="samp">df</span></samp>’, ‘<samp><span class="samp">fold</span></samp>’, ‘<samp><span class="samp">gc</span></samp>’, ‘<samp><span class="samp">gcac</span></samp>’, ‘<samp><span class="samp">misc</span></samp>’, ‘<samp><span class="samp">rtl</span></samp>’,
1047 1.1.1.13 mrg ‘<samp><span class="samp">rtlflag</span></samp>’, ‘<samp><span class="samp">runtime</span></samp>’, ‘<samp><span class="samp">tree</span></samp>’, ‘<samp><span class="samp">extra</span></samp>’ and ‘<samp><span class="samp">valgrind</span></samp>’.
1048 1.1.1.13 mrg ‘<samp><span class="samp">extra</span></samp>’ adds for ‘<samp><span class="samp">misc</span></samp>’ checking extra checks that might affect
1049 1.1.1.13 mrg code generation and should therefore not differ between stage1 and later
1050 1.1.1.13 mrg stages.
1051 1.1.1.13 mrg
1052 1.1.1.13 mrg <p>The ‘<samp><span class="samp">valgrind</span></samp>’ check requires the external <samp><span class="command">valgrind</span></samp>
1053 1.1.1.13 mrg simulator, available from <a href="http://valgrind.org/">http://valgrind.org/</a>. The
1054 1.1.1.13 mrg ‘<samp><span class="samp">df</span></samp>’, ‘<samp><span class="samp">rtl</span></samp>’, ‘<samp><span class="samp">gcac</span></samp>’ and ‘<samp><span class="samp">valgrind</span></samp>’ checks are very expensive.
1055 1.1.1.13 mrg To disable all checking, ‘<samp><span class="samp">--disable-checking</span></samp>’ or
1056 1.1.1.13 mrg ‘<samp><span class="samp">--enable-checking=none</span></samp>’ must be explicitly requested. Disabling
1057 1.1.1.13 mrg assertions will make the compiler and runtime slightly faster but
1058 1.1.1.13 mrg increase the risk of undetected internal errors causing wrong code to be
1059 1.1.1.13 mrg generated.
1060 1.1.1.13 mrg
1061 1.1.1.13 mrg <br><dt><code>--disable-stage1-checking</code><dt><code>--enable-stage1-checking</code><dt><code>--enable-stage1-checking=</code><var>list</var><dd>If no <samp><span class="option">--enable-checking</span></samp> option is specified the stage1
1062 1.1.1.13 mrg compiler will be built with ‘<samp><span class="samp">yes</span></samp>’ checking enabled, otherwise
1063 1.1.1.13 mrg the stage1 checking flags are the same as specified by
1064 1.1.1.13 mrg <samp><span class="option">--enable-checking</span></samp>. To build the stage1 compiler with
1065 1.1.1.13 mrg different checking options use <samp><span class="option">--enable-stage1-checking</span></samp>.
1066 1.1.1.13 mrg The list of checking options is the same as for <samp><span class="option">--enable-checking</span></samp>.
1067 1.1 mrg If your system is too slow or too small to bootstrap a released compiler
1068 1.1.1.13 mrg with checking for stage1 enabled, you can use ‘<samp><span class="samp">--disable-stage1-checking</span></samp>’
1069 1.1 mrg to disable checking for the stage1 compiler.
1070 1.1.1.13 mrg
1071 1.1.1.13 mrg <br><dt><code>--enable-coverage</code><dt><code>--enable-coverage=</code><var>level</var><dd>With this option, the compiler is built to collect self coverage
1072 1.1 mrg information, every time it is run. This is for internal development
1073 1.1 mrg purposes, and only works when the compiler is being built with gcc. The
1074 1.1 mrg <var>level</var> argument controls whether the compiler is built optimized or
1075 1.1.1.13 mrg not, values are ‘<samp><span class="samp">opt</span></samp>’ and ‘<samp><span class="samp">noopt</span></samp>’. For coverage analysis you
1076 1.1 mrg want to disable optimization, for performance analysis you want to
1077 1.1 mrg enable optimization. When coverage is enabled, the default level is
1078 1.1 mrg without optimization.
1079 1.1.1.13 mrg
1080 1.1.1.13 mrg <br><dt><code>--enable-gather-detailed-mem-stats</code><dd>When this option is specified more detailed information on memory
1081 1.1 mrg allocation is gathered. This information is printed when using
1082 1.1.1.13 mrg <samp><span class="option">-fmem-report</span></samp>.
1083 1.1.1.13 mrg
1084 1.1.1.13 mrg <br><dt><code>--enable-valgrind-annotations</code><dd>Mark selected memory related operations in the compiler when run under
1085 1.1.1.8 mrg valgrind to suppress false positives.
1086 1.1.1.13 mrg
1087 1.1.1.13 mrg <br><dt><code>--enable-nls</code><dt><code>--disable-nls</code><dd>The <samp><span class="option">--enable-nls</span></samp> option enables Native Language Support (NLS),
1088 1.1 mrg which lets GCC output diagnostics in languages other than American
1089 1.1 mrg English. Native Language Support is enabled by default if not doing a
1090 1.1.1.13 mrg canadian cross build. The <samp><span class="option">--disable-nls</span></samp> option disables NLS.
1091 1.1.1.13 mrg
1092 1.1.1.13 mrg <br><dt><code>--with-included-gettext</code><dd>If NLS is enabled, the <samp><span class="option">--with-included-gettext</span></samp> option causes the build
1093 1.1.1.13 mrg procedure to prefer its copy of GNU <samp><span class="command">gettext</span></samp>.
1094 1.1.1.13 mrg
1095 1.1.1.13 mrg <br><dt><code>--with-catgets</code><dd>If NLS is enabled, and if the host lacks <code>gettext</code> but has the
1096 1.1 mrg inferior <code>catgets</code> interface, the GCC build procedure normally
1097 1.1.1.13 mrg ignores <code>catgets</code> and instead uses GCC's copy of the GNU
1098 1.1.1.13 mrg <code>gettext</code> library. The <samp><span class="option">--with-catgets</span></samp> option causes the
1099 1.1.1.13 mrg build procedure to use the host's <code>catgets</code> in this situation.
1100 1.1.1.13 mrg
1101 1.1.1.13 mrg <br><dt><code>--with-libiconv-prefix=</code><var>dir</var><dd>Search for libiconv header files in <samp><var>dir</var><span class="file">/include</span></samp> and
1102 1.1.1.13 mrg libiconv library files in <samp><var>dir</var><span class="file">/lib</span></samp>.
1103 1.1.1.13 mrg
1104 1.1.1.13 mrg <br><dt><code>--enable-obsolete</code><dd>Enable configuration for an obsoleted system. If you attempt to
1105 1.1 mrg configure GCC for a system (build, host, or target) which has been
1106 1.1 mrg obsoleted, and you do not specify this flag, configure will halt with an
1107 1.1 mrg error message.
1108 1.1.1.13 mrg
1109 1.1.1.13 mrg <p>All support for systems which have been obsoleted in one release of GCC
1110 1.1 mrg is removed entirely in the next major release, unless someone steps
1111 1.1 mrg forward to maintain the port.
1112 1.1.1.13 mrg
1113 1.1.1.13 mrg <br><dt><code>--enable-decimal-float</code><dt><code>--enable-decimal-float=yes</code><dt><code>--enable-decimal-float=no</code><dt><code>--enable-decimal-float=bid</code><dt><code>--enable-decimal-float=dpd</code><dt><code>--disable-decimal-float</code><dd>Enable (or disable) support for the C decimal floating point extension
1114 1.1 mrg that is in the IEEE 754-2008 standard. This is enabled by default only
1115 1.1 mrg on PowerPC, i386, and x86_64 GNU/Linux systems. Other systems may also
1116 1.1 mrg support it, but require the user to specifically enable it. You can
1117 1.1 mrg optionally control which decimal floating point format is used (either
1118 1.1.1.13 mrg ‘<samp><span class="samp">bid</span></samp>’ or ‘<samp><span class="samp">dpd</span></samp>’). The ‘<samp><span class="samp">bid</span></samp>’ (binary integer decimal)
1119 1.1.1.13 mrg format is default on i386 and x86_64 systems, and the ‘<samp><span class="samp">dpd</span></samp>’
1120 1.1 mrg (densely packed decimal) format is default on PowerPC systems.
1121 1.1.1.13 mrg
1122 1.1.1.13 mrg <br><dt><code>--enable-fixed-point</code><dt><code>--disable-fixed-point</code><dd>Enable (or disable) support for C fixed-point arithmetic.
1123 1.1 mrg This option is enabled by default for some targets (such as MIPS) which
1124 1.1 mrg have hardware-support for fixed-point operations. On other targets, you
1125 1.1 mrg may enable this option manually.
1126 1.1.1.13 mrg
1127 1.1.1.13 mrg <br><dt><code>--with-long-double-128</code><dd>Specify if <code>long double</code> type should be 128-bit by default on selected
1128 1.1 mrg GNU/Linux architectures. If using <code>--without-long-double-128</code>,
1129 1.1.1.13 mrg <code>long double</code> will be by default 64-bit, the same as <code>double</code> type.
1130 1.1 mrg When neither of these configure options are used, the default will be
1131 1.1 mrg 128-bit <code>long double</code> when built against GNU C Library 2.4 and later,
1132 1.1 mrg 64-bit <code>long double</code> otherwise.
1133 1.1.1.13 mrg
1134 1.1.1.13 mrg <br><dt><code>--enable-fdpic</code><dd>On SH Linux systems, generate ELF FDPIC code.
1135 1.1.1.13 mrg
1136 1.1.1.13 mrg <br><dt><code>--with-gmp=</code><var>pathname</var><dt><code>--with-gmp-include=</code><var>pathname</var><dt><code>--with-gmp-lib=</code><var>pathname</var><dt><code>--with-mpfr=</code><var>pathname</var><dt><code>--with-mpfr-include=</code><var>pathname</var><dt><code>--with-mpfr-lib=</code><var>pathname</var><dt><code>--with-mpc=</code><var>pathname</var><dt><code>--with-mpc-include=</code><var>pathname</var><dt><code>--with-mpc-lib=</code><var>pathname</var><dd>If you want to build GCC but do not have the GMP library, the MPFR
1137 1.1 mrg library and/or the MPC library installed in a standard location and
1138 1.1.1.3 skrll do not have their sources present in the GCC source tree then you
1139 1.1.1.3 skrll can explicitly specify the directory where they are installed
1140 1.1.1.13 mrg (‘<samp><span class="samp">--with-gmp=</span><var>gmpinstalldir</var></samp>’,
1141 1.1.1.13 mrg ‘<samp><span class="samp">--with-mpfr=</span><var>mpfrinstalldir</var></samp>’,
1142 1.1.1.13 mrg ‘<samp><span class="samp">--with-mpc=</span><var>mpcinstalldir</var></samp>’). The
1143 1.1.1.13 mrg <samp><span class="option">--with-gmp=</span><var>gmpinstalldir</var></samp> option is shorthand for
1144 1.1.1.13 mrg <samp><span class="option">--with-gmp-lib=</span><var>gmpinstalldir</var><span class="option">/lib</span></samp> and
1145 1.1.1.13 mrg <samp><span class="option">--with-gmp-include=</span><var>gmpinstalldir</var><span class="option">/include</span></samp>. Likewise the
1146 1.1.1.13 mrg <samp><span class="option">--with-mpfr=</span><var>mpfrinstalldir</var></samp> option is shorthand for
1147 1.1.1.13 mrg <samp><span class="option">--with-mpfr-lib=</span><var>mpfrinstalldir</var><span class="option">/lib</span></samp> and
1148 1.1.1.13 mrg <samp><span class="option">--with-mpfr-include=</span><var>mpfrinstalldir</var><span class="option">/include</span></samp>, also the
1149 1.1.1.13 mrg <samp><span class="option">--with-mpc=</span><var>mpcinstalldir</var></samp> option is shorthand for
1150 1.1.1.13 mrg <samp><span class="option">--with-mpc-lib=</span><var>mpcinstalldir</var><span class="option">/lib</span></samp> and
1151 1.1.1.13 mrg <samp><span class="option">--with-mpc-include=</span><var>mpcinstalldir</var><span class="option">/include</span></samp>. If these
1152 1.1 mrg shorthand assumptions are not correct, you can use the explicit
1153 1.1.1.3 skrll include and lib options directly. You might also need to ensure the
1154 1.1.1.3 skrll shared libraries can be found by the dynamic linker when building and
1155 1.1.1.3 skrll using GCC, for example by setting the runtime shared library path
1156 1.1.1.13 mrg variable (<samp><span class="env">LD_LIBRARY_PATH</span></samp> on GNU/Linux and Solaris systems).
1157 1.1.1.13 mrg
1158 1.1.1.13 mrg <p>These flags are applicable to the host platform only. When building
1159 1.1.1.3 skrll a cross compiler, they will not be used to configure target libraries.
1160 1.1.1.13 mrg
1161 1.1.1.13 mrg <br><dt><code>--with-isl=</code><var>pathname</var><dt><code>--with-isl-include=</code><var>pathname</var><dt><code>--with-isl-lib=</code><var>pathname</var><dd>If you do not have the isl library installed in a standard location and you
1162 1.1.1.6 mrg want to build GCC, you can explicitly specify the directory where it is
1163 1.1.1.13 mrg installed (‘<samp><span class="samp">--with-isl=</span><var>islinstalldir</var></samp>’). The
1164 1.1.1.13 mrg <samp><span class="option">--with-isl=</span><var>islinstalldir</var></samp> option is shorthand for
1165 1.1.1.13 mrg <samp><span class="option">--with-isl-lib=</span><var>islinstalldir</var><span class="option">/lib</span></samp> and
1166 1.1.1.13 mrg <samp><span class="option">--with-isl-include=</span><var>islinstalldir</var><span class="option">/include</span></samp>. If this
1167 1.1.1.6 mrg shorthand assumption is not correct, you can use the explicit
1168 1.1 mrg include and lib options directly.
1169 1.1.1.13 mrg
1170 1.1.1.13 mrg <p>These flags are applicable to the host platform only. When building
1171 1.1.1.3 skrll a cross compiler, they will not be used to configure target libraries.
1172 1.1.1.13 mrg
1173 1.1.1.13 mrg <br><dt><code>--with-stage1-ldflags=</code><var>flags</var><dd>This option may be used to set linker flags to be used when linking
1174 1.1 mrg stage 1 of GCC. These are also used when linking GCC if configured with
1175 1.1.1.13 mrg <samp><span class="option">--disable-bootstrap</span></samp>. If <samp><span class="option">--with-stage1-libs</span></samp> is not set to a
1176 1.1.1.13 mrg value, then the default is ‘<samp><span class="samp">-static-libstdc++ -static-libgcc</span></samp>’, if
1177 1.1.1.8 mrg supported.
1178 1.1.1.13 mrg
1179 1.1.1.13 mrg <br><dt><code>--with-stage1-libs=</code><var>libs</var><dd>This option may be used to set libraries to be used when linking stage 1
1180 1.1 mrg of GCC. These are also used when linking GCC if configured with
1181 1.1.1.13 mrg <samp><span class="option">--disable-bootstrap</span></samp>.
1182 1.1.1.13 mrg
1183 1.1.1.13 mrg <br><dt><code>--with-boot-ldflags=</code><var>flags</var><dd>This option may be used to set linker flags to be used when linking
1184 1.1.1.8 mrg stage 2 and later when bootstrapping GCC. If –with-boot-libs
1185 1.1.1.8 mrg is not is set to a value, then the default is
1186 1.1.1.13 mrg ‘<samp><span class="samp">-static-libstdc++ -static-libgcc</span></samp>’.
1187 1.1.1.13 mrg
1188 1.1.1.13 mrg <br><dt><code>--with-boot-libs=</code><var>libs</var><dd>This option may be used to set libraries to be used when linking stage 2
1189 1.1.1.8 mrg and later when bootstrapping GCC.
1190 1.1.1.13 mrg
1191 1.1.1.13 mrg <br><dt><code>--with-debug-prefix-map=</code><var>map</var><dd>Convert source directory names using <samp><span class="option">-fdebug-prefix-map</span></samp> when
1192 1.1 mrg building runtime libraries. ‘<samp><var>map</var></samp>’ is a space-separated
1193 1.1.1.13 mrg list of maps of the form ‘<samp><var>old</var><span class="samp">=</span><var>new</var></samp>’.
1194 1.1.1.13 mrg
1195 1.1.1.13 mrg <br><dt><code>--enable-linker-build-id</code><dd>Tells GCC to pass <samp><span class="option">--build-id</span></samp> option to the linker for all final
1196 1.1.1.13 mrg links (links performed without the <samp><span class="option">-r</span></samp> or <samp><span class="option">--relocatable</span></samp>
1197 1.1 mrg option), if the linker supports it. If you specify
1198 1.1.1.13 mrg <samp><span class="option">--enable-linker-build-id</span></samp>, but your linker does not
1199 1.1.1.13 mrg support <samp><span class="option">--build-id</span></samp> option, a warning is issued and the
1200 1.1.1.13 mrg <samp><span class="option">--enable-linker-build-id</span></samp> option is ignored. The default is off.
1201 1.1.1.13 mrg
1202 1.1.1.13 mrg <br><dt><code>--with-linker-hash-style=</code><var>choice</var><dd>Tells GCC to pass <samp><span class="option">--hash-style=</span><var>choice</var></samp> option to the
1203 1.1.1.3 skrll linker for all final links. <var>choice</var> can be one of
1204 1.1.1.13 mrg ‘<samp><span class="samp">sysv</span></samp>’, ‘<samp><span class="samp">gnu</span></samp>’, and ‘<samp><span class="samp">both</span></samp>’ where ‘<samp><span class="samp">sysv</span></samp>’ is the default.
1205 1.1.1.13 mrg
1206 1.1.1.13 mrg <br><dt><code>--enable-gnu-unique-object</code><dt><code>--disable-gnu-unique-object</code><dd>Tells GCC to use the gnu_unique_object relocation for C++ template
1207 1.1 mrg static data members and inline function local statics. Enabled by
1208 1.1.1.6 mrg default for a toolchain with an assembler that accepts it and
1209 1.1 mrg GLIBC 2.11 or above, otherwise disabled.
1210 1.1.1.13 mrg
1211 1.1.1.13 mrg <br><dt><code>--with-diagnostics-color=</code><var>choice</var><dd>Tells GCC to use <var>choice</var> as the default for <samp><span class="option">-fdiagnostics-color=</span></samp>
1212 1.1.1.6 mrg option (if not used explicitly on the command line). <var>choice</var>
1213 1.1.1.13 mrg can be one of ‘<samp><span class="samp">never</span></samp>’, ‘<samp><span class="samp">auto</span></samp>’, ‘<samp><span class="samp">always</span></samp>’, and ‘<samp><span class="samp">auto-if-env</span></samp>’
1214 1.1.1.13 mrg where ‘<samp><span class="samp">auto</span></samp>’ is the default. ‘<samp><span class="samp">auto-if-env</span></samp>’ means that
1215 1.1.1.13 mrg <samp><span class="option">-fdiagnostics-color=auto</span></samp> will be the default if <code>GCC_COLORS</code>
1216 1.1.1.6 mrg is present and non-empty in the environment, and
1217 1.1.1.13 mrg <samp><span class="option">-fdiagnostics-color=never</span></samp> otherwise.
1218 1.1.1.13 mrg
1219 1.1.1.13 mrg <br><dt><code>--enable-lto</code><dt><code>--disable-lto</code><dd>Enable support for link-time optimization (LTO). This is enabled by
1220 1.1.1.13 mrg default, and may be disabled using <samp><span class="option">--disable-lto</span></samp>.
1221 1.1.1.13 mrg
1222 1.1.1.13 mrg <br><dt><code>--enable-linker-plugin-configure-flags=FLAGS</code><dt><code>--enable-linker-plugin-flags=FLAGS</code><dd>By default, linker plugins (such as the LTO plugin) are built for the
1223 1.1.1.6 mrg host system architecture. For the case that the linker has a
1224 1.1.1.6 mrg different (but run-time compatible) architecture, these flags can be
1225 1.1.1.6 mrg specified to build plugins that are compatible to the linker. For
1226 1.1.1.6 mrg example, if you are building GCC for a 64-bit x86_64
1227 1.1.1.13 mrg (‘<samp><span class="samp">x86_64-unknown-linux-gnu</span></samp>’) host system, but have a 32-bit x86
1228 1.1.1.13 mrg GNU/Linux (‘<samp><span class="samp">i686-pc-linux-gnu</span></samp>’) linker executable (which is
1229 1.1.1.6 mrg executable on the former system), you can configure GCC as follows for
1230 1.1.1.6 mrg getting compatible linker plugins:
1231 1.1.1.13 mrg
1232 1.1.1.13 mrg <pre class="smallexample"> % <var>srcdir</var>/configure \
1233 1.1.1.13 mrg --host=x86_64-unknown-linux-gnu \
1234 1.1.1.13 mrg --enable-linker-plugin-configure-flags=--host=i686-pc-linux-gnu \
1235 1.1.1.13 mrg --enable-linker-plugin-flags='CC=gcc\ -m32\ -Wl,-rpath,[...]/i686-pc-linux-gnu/lib'
1236 1.1.1.13 mrg </pre>
1237 1.1.1.13 mrg <br><dt><code>--with-plugin-ld=</code><var>pathname</var><dd>Enable an alternate linker to be used at link-time optimization (LTO)
1238 1.1.1.13 mrg link time when <samp><span class="option">-fuse-linker-plugin</span></samp> is enabled.
1239 1.1.1.3 skrll This linker should have plugin support such as gold starting with
1240 1.1.1.13 mrg version 2.20 or GNU ld starting with version 2.21.
1241 1.1.1.13 mrg See <samp><span class="option">-fuse-linker-plugin</span></samp> for details.
1242 1.1.1.13 mrg
1243 1.1.1.13 mrg <br><dt><code>--enable-canonical-system-headers</code><dt><code>--disable-canonical-system-headers</code><dd>Enable system header path canonicalization for <samp><span class="file">libcpp</span></samp>. This can
1244 1.1.1.3 skrll produce shorter header file paths in diagnostics and dependency output
1245 1.1.1.3 skrll files, but these changed header paths may conflict with some compilation
1246 1.1.1.3 skrll environments. Enabled by default, and may be disabled using
1247 1.1.1.13 mrg <samp><span class="option">--disable-canonical-system-headers</span></samp>.
1248 1.1.1.13 mrg
1249 1.1.1.13 mrg <br><dt><code>--with-glibc-version=</code><var>major</var><code>.</code><var>minor</var><dd>Tell GCC that when the GNU C Library (glibc) is used on the target it
1250 1.1.1.6 mrg will be version <var>major</var>.<var>minor</var> or later. Normally this can
1251 1.1.1.13 mrg be detected from the C library's header files, but this option may be
1252 1.1.1.6 mrg needed when bootstrapping a cross toolchain without the header files
1253 1.1.1.6 mrg available for building the initial bootstrap compiler.
1254 1.1.1.13 mrg
1255 1.1.1.13 mrg <p>If GCC is configured with some multilibs that use glibc and some that
1256 1.1.1.13 mrg do not, this option applies only to the multilibs that use glibc.
1257 1.1.1.6 mrg However, such configurations may not work well as not all the relevant
1258 1.1.1.6 mrg configuration in GCC is on a per-multilib basis.
1259 1.1.1.13 mrg
1260 1.1.1.13 mrg <br><dt><code>--enable-as-accelerator-for=</code><var>target</var><dd>Build as offload target compiler. Specify offload host triple by <var>target</var>.
1261 1.1.1.13 mrg
1262 1.1.1.13 mrg <br><dt><code>--enable-offload-targets=</code><var>target1</var><code>[=</code><var>path1</var><code>],...,</code><var>targetN</var><code>[=</code><var>pathN</var><code>]</code><dd>Enable offloading to targets <var>target1</var>, <small class="dots">...</small>, <var>targetN</var>.
1263 1.1.1.6 mrg Offload compilers are expected to be already installed. Default search
1264 1.1.1.6 mrg path for them is <samp><var>exec-prefix</var></samp>, but it can be changed by
1265 1.1.1.13 mrg specifying paths <var>path1</var>, <small class="dots">...</small>, <var>pathN</var>.
1266 1.1.1.8 mrg
1267 1.1.1.13 mrg <pre class="smallexample"> % <var>srcdir</var>/configure \
1268 1.1.1.13 mrg --enable-offload-target=i686-unknown-linux-gnu=/path/to/i686/compiler,x86_64-pc-linux-gnu
1269 1.1.1.13 mrg </pre>
1270 1.1.1.13 mrg <p>If ‘<samp><span class="samp">hsa</span></samp>’ is specified as one of the targets, the compiler will be
1271 1.1.1.8 mrg built with support for HSA GPU accelerators. Because the same
1272 1.1.1.8 mrg compiler will emit the accelerator code, no path should be specified.
1273 1.1.1.13 mrg
1274 1.1.1.13 mrg <br><dt><code>--with-hsa-runtime=</code><var>pathname</var><dt><code>--with-hsa-runtime-include=</code><var>pathname</var><dt><code>--with-hsa-runtime-lib=</code><var>pathname</var><dd>
1275 1.1.1.13 mrg If you configure GCC with HSA offloading but do not have the HSA
1276 1.1.1.8 mrg run-time library installed in a standard location then you can
1277 1.1.1.8 mrg explicitly specify the directory where they are installed. The
1278 1.1.1.13 mrg <samp><span class="option">--with-hsa-runtime=</span><var>hsainstalldir</var></samp> option is a
1279 1.1.1.8 mrg shorthand for
1280 1.1.1.13 mrg <samp><span class="option">--with-hsa-runtime-lib=</span><var>hsainstalldir</var><span class="option">/lib</span></samp> and
1281 1.1.1.13 mrg <samp><span class="option">--with-hsa-runtime-include=</span><var>hsainstalldir</var><span class="option">/include</span></samp>.
1282 1.1.1.7 mrg </dl>
1283 1.1.1.5 mrg
1284 1.1.1.13 mrg <h4 class="subheading"><a name="TOC3"></a>Cross-Compiler-Specific Options</h4>
1285 1.1.1.13 mrg
1286 1.1 mrg <p>The following options only apply to building cross compilers.
1287 1.1.1.13 mrg
1288 1.1.1.13 mrg <dl>
1289 1.1.1.13 mrg <dt><code>--with-sysroot</code><dt><code>--with-sysroot=</code><var>dir</var><dd>Tells GCC to consider <var>dir</var> as the root of a tree that contains
1290 1.1.1.13 mrg (a subset of) the root filesystem of the target operating system.
1291 1.1 mrg Target system headers, libraries and run-time object files will be
1292 1.1.1.3 skrll searched for in there. More specifically, this acts as if
1293 1.1.1.13 mrg <samp><span class="option">--sysroot=</span><var>dir</var></samp> was added to the default options of the built
1294 1.1 mrg compiler. The specified directory is not copied into the
1295 1.1.1.13 mrg install tree, unlike the options <samp><span class="option">--with-headers</span></samp> and
1296 1.1.1.13 mrg <samp><span class="option">--with-libs</span></samp> that this option obsoletes. The default value,
1297 1.1.1.13 mrg in case <samp><span class="option">--with-sysroot</span></samp> is not given an argument, is
1298 1.1.1.13 mrg <samp><span class="option">${gcc_tooldir}/sys-root</span></samp>. If the specified directory is a
1299 1.1.1.13 mrg subdirectory of <samp><span class="option">${exec_prefix}</span></samp>, then it will be found relative to
1300 1.1 mrg the GCC binaries if the installation tree is moved.
1301 1.1.1.13 mrg
1302 1.1.1.13 mrg <p>This option affects the system root for the compiler used to build
1303 1.1 mrg target libraries (which runs on the build system) and the compiler newly
1304 1.1 mrg installed with <code>make install</code>; it does not affect the compiler which is
1305 1.1 mrg used to build GCC itself.
1306 1.1.1.13 mrg
1307 1.1.1.13 mrg <p>If you specify the <samp><span class="option">--with-native-system-header-dir=</span><var>dirname</var></samp>
1308 1.1.1.3 skrll option then the compiler will search that directory within <var>dirname</var> for
1309 1.1.1.13 mrg native system headers rather than the default <samp><span class="file">/usr/include</span></samp>.
1310 1.1.1.13 mrg
1311 1.1.1.13 mrg <br><dt><code>--with-build-sysroot</code><dt><code>--with-build-sysroot=</code><var>dir</var><dd>Tells GCC to consider <var>dir</var> as the system root (see
1312 1.1.1.13 mrg <samp><span class="option">--with-sysroot</span></samp>) while building target libraries, instead of
1313 1.1.1.13 mrg the directory specified with <samp><span class="option">--with-sysroot</span></samp>. This option is
1314 1.1.1.13 mrg only useful when you are already using <samp><span class="option">--with-sysroot</span></samp>. You
1315 1.1.1.13 mrg can use <samp><span class="option">--with-build-sysroot</span></samp> when you are configuring with
1316 1.1.1.13 mrg <samp><span class="option">--prefix</span></samp> set to a directory that is different from the one in
1317 1.1 mrg which you are installing GCC and your target libraries.
1318 1.1.1.13 mrg
1319 1.1.1.13 mrg <p>This option affects the system root for the compiler used to build
1320 1.1 mrg target libraries (which runs on the build system); it does not affect
1321 1.1 mrg the compiler which is used to build GCC itself.
1322 1.1.1.13 mrg
1323 1.1.1.13 mrg <p>If you specify the <samp><span class="option">--with-native-system-header-dir=</span><var>dirname</var></samp>
1324 1.1.1.3 skrll option then the compiler will search that directory within <var>dirname</var> for
1325 1.1.1.13 mrg native system headers rather than the default <samp><span class="file">/usr/include</span></samp>.
1326 1.1.1.13 mrg
1327 1.1.1.13 mrg <br><dt><code>--with-headers</code><dt><code>--with-headers=</code><var>dir</var><dd>Deprecated in favor of <samp><span class="option">--with-sysroot</span></samp>.
1328 1.1.1.13 mrg Specifies that target headers are available when building a cross compiler.
1329 1.1 mrg The <var>dir</var> argument specifies a directory which has the target include
1330 1.1.1.13 mrg files. These include files will be copied into the <samp><span class="file">gcc</span></samp> install
1331 1.1.1.13 mrg directory. <em>This option with the </em><var>dir</var><em> argument is required</em> when
1332 1.1.1.13 mrg building a cross compiler, if <samp><var>prefix</var><span class="file">/</span><var>target</var><span class="file">/sys-include</span></samp>
1333 1.1.1.13 mrg doesn't pre-exist. If <samp><var>prefix</var><span class="file">/</span><var>target</var><span class="file">/sys-include</span></samp> does
1334 1.1.1.13 mrg pre-exist, the <var>dir</var> argument may be omitted. <samp><span class="command">fixincludes</span></samp>
1335 1.1 mrg will be run on these files to make them compatible with GCC.
1336 1.1.1.13 mrg
1337 1.1.1.13 mrg <br><dt><code>--without-headers</code><dd>Tells GCC not use any target headers from a libc when building a cross
1338 1.1 mrg compiler. When crossing to GNU/Linux, you need the headers so GCC
1339 1.1 mrg can build the exception handling for libgcc.
1340 1.1.1.13 mrg
1341 1.1.1.13 mrg <br><dt><code>--with-libs</code><dt><code>--with-libs="</code><var>dir1</var> <var>dir2</var><code> ... </code><var>dirN</var><code>"</code><dd>Deprecated in favor of <samp><span class="option">--with-sysroot</span></samp>.
1342 1.1 mrg Specifies a list of directories which contain the target runtime
1343 1.1.1.13 mrg libraries. These libraries will be copied into the <samp><span class="file">gcc</span></samp> install
1344 1.1 mrg directory. If the directory list is omitted, this option has no
1345 1.1 mrg effect.
1346 1.1.1.13 mrg
1347 1.1.1.13 mrg <br><dt><code>--with-newlib</code><dd>Specifies that ‘<samp><span class="samp">newlib</span></samp>’ is
1348 1.1 mrg being used as the target C library. This causes <code>__eprintf</code> to be
1349 1.1.1.13 mrg omitted from <samp><span class="file">libgcc.a</span></samp> on the assumption that it will be provided by
1350 1.1.1.13 mrg ‘<samp><span class="samp">newlib</span></samp>’.
1351 1.1.1.13 mrg
1352 1.1.1.13 mrg <br><dt><code>--with-avrlibc</code><dd>Specifies that ‘<samp><span class="samp">AVR-Libc</span></samp>’ is
1353 1.1.1.3 skrll being used as the target C library. This causes float support
1354 1.1.1.13 mrg functions like <code>__addsf3</code> to be omitted from <samp><span class="file">libgcc.a</span></samp> on
1355 1.1.1.13 mrg the assumption that it will be provided by <samp><span class="file">libm.a</span></samp>. For more
1356 1.1.1.13 mrg technical details, cf. <a href="http://gcc.gnu.org/PR54461">PR54461</a>.
1357 1.1.1.3 skrll This option is only supported for the AVR target. It is not supported for
1358 1.1.1.3 skrll RTEMS configurations, which currently use newlib. The option is
1359 1.1.1.3 skrll supported since version 4.7.2 and is the default in 4.8.0 and newer.
1360 1.1.1.13 mrg
1361 1.1.1.13 mrg <br><dt><code>--with-nds32-lib=</code><var>library</var><dd>Specifies that <var>library</var> setting is used for building <samp><span class="file">libgcc.a</span></samp>.
1362 1.1.1.13 mrg Currently, the valid <var>library</var> is ‘<samp><span class="samp">newlib</span></samp>’ or ‘<samp><span class="samp">mculib</span></samp>’.
1363 1.1.1.6 mrg This option is only supported for the NDS32 target.
1364 1.1.1.13 mrg
1365 1.1.1.13 mrg <br><dt><code>--with-build-time-tools=</code><var>dir</var><dd>Specifies where to find the set of target tools (assembler, linker, etc.)
1366 1.1 mrg that will be used while building GCC itself. This option can be useful
1367 1.1 mrg if the directory layouts are different between the system you are building
1368 1.1 mrg GCC on, and the system where you will deploy it.
1369 1.1.1.13 mrg
1370 1.1.1.13 mrg <p>For example, on an ‘<samp><span class="samp">ia64-hp-hpux</span></samp>’ system, you may have the GNU
1371 1.1.1.13 mrg assembler and linker in <samp><span class="file">/usr/bin</span></samp>, and the native tools in a
1372 1.1 mrg different path, and build a toolchain that expects to find the
1373 1.1.1.13 mrg native tools in <samp><span class="file">/usr/bin</span></samp>.
1374 1.1.1.13 mrg
1375 1.1.1.13 mrg <p>When you use this option, you should ensure that <var>dir</var> includes
1376 1.1.1.13 mrg <samp><span class="command">ar</span></samp>, <samp><span class="command">as</span></samp>, <samp><span class="command">ld</span></samp>, <samp><span class="command">nm</span></samp>,
1377 1.1.1.13 mrg <samp><span class="command">ranlib</span></samp> and <samp><span class="command">strip</span></samp> if necessary, and possibly
1378 1.1.1.13 mrg <samp><span class="command">objdump</span></samp>. Otherwise, GCC may use an inconsistent set of
1379 1.1.1.13 mrg tools.
1380 1.1.1.7 mrg </dl>
1381 1.1.1.7 mrg
1382 1.1.1.13 mrg <h5 class="subsubheading"><a name="TOC4"></a>Overriding <samp><span class="command">configure</span></samp> test results</h5>
1383 1.1.1.5 mrg
1384 1.1.1.7 mrg <p>Sometimes, it might be necessary to override the result of some
1385 1.1.1.13 mrg <samp><span class="command">configure</span></samp> test, for example in order to ease porting to a new
1386 1.1.1.13 mrg system or work around a bug in a test. The toplevel <samp><span class="command">configure</span></samp>
1387 1.1.1.7 mrg script provides three variables for this:
1388 1.1.1.13 mrg
1389 1.1.1.13 mrg <dl>
1390 1.1.1.13 mrg <dt><code>build_configargs</code><dd><a name="index-g_t_0040code_007bbuild_005fconfigargs_007d-3"></a>The contents of this variable is passed to all build <samp><span class="command">configure</span></samp>
1391 1.1.1.7 mrg scripts.
1392 1.1.1.13 mrg
1393 1.1.1.13 mrg <br><dt><code>host_configargs</code><dd><a name="index-g_t_0040code_007bhost_005fconfigargs_007d-4"></a>The contents of this variable is passed to all host <samp><span class="command">configure</span></samp>
1394 1.1.1.7 mrg scripts.
1395 1.1.1.13 mrg
1396 1.1.1.13 mrg <br><dt><code>target_configargs</code><dd><a name="index-g_t_0040code_007btarget_005fconfigargs_007d-5"></a>The contents of this variable is passed to all target <samp><span class="command">configure</span></samp>
1397 1.1.1.7 mrg scripts.
1398 1.1 mrg
1399 1.1.1.13 mrg </dl>
1400 1.1.1.13 mrg
1401 1.1.1.13 mrg <p>In order to avoid shell and <samp><span class="command">make</span></samp> quoting issues for complex
1402 1.1.1.13 mrg overrides, you can pass a setting for <samp><span class="env">CONFIG_SITE</span></samp> and set
1403 1.1.1.7 mrg variables in the site file.
1404 1.1.1.13 mrg
1405 1.1.1.13 mrg <h4 class="subheading"><a name="TOC5"></a>Objective-C-Specific Options</h4>
1406 1.1.1.9 mrg
1407 1.1.1.10 mrg <p>The following options apply to the build of the Objective-C runtime library.
1408 1.1.1.13 mrg
1409 1.1.1.13 mrg <dl>
1410 1.1.1.13 mrg <dt><code>--enable-objc-gc</code><dd>Specify that an additional variant of the GNU Objective-C runtime library
1411 1.1.1.10 mrg is built, using an external build of the Boehm-Demers-Weiser garbage
1412 1.1.1.10 mrg collector (<a href="http://www.hboehm.info/gc/">http://www.hboehm.info/gc/</a>). This library needs to be
1413 1.1.1.10 mrg available for each multilib variant, unless configured with
1414 1.1.1.13 mrg <samp><span class="option">--enable-objc-gc=‘</span><samp><span class="samp">auto</span></samp><span class="option">’</span></samp> in which case the build of the
1415 1.1.1.10 mrg additional runtime library is skipped when not available and the build
1416 1.1.1.10 mrg continues.
1417 1.1.1.13 mrg
1418 1.1.1.13 mrg <br><dt><code>--with-target-bdw-gc=</code><var>list</var><dt><code>--with-target-bdw-gc-include=</code><var>list</var><dt><code>--with-target-bdw-gc-lib=</code><var>list</var><dd>Specify search directories for the garbage collector header files and
1419 1.1.1.10 mrg libraries. <var>list</var> is a comma separated list of key value pairs of the
1420 1.1.1.13 mrg form ‘<samp><var>multilibdir</var><span class="samp">=</span><var>path</var></samp>’, where the default multilib key
1421 1.1.1.13 mrg is named as ‘<samp><span class="samp">.</span></samp>’ (dot), or is omitted (e.g.
1422 1.1.1.13 mrg ‘<samp><span class="samp">--with-target-bdw-gc=/opt/bdw-gc,32=/opt-bdw-gc32</span></samp>’).
1423 1.1.1.13 mrg
1424 1.1.1.13 mrg <p>The options <samp><span class="option">--with-target-bdw-gc-include</span></samp> and
1425 1.1.1.13 mrg <samp><span class="option">--with-target-bdw-gc-lib</span></samp> must always be specified together
1426 1.1.1.10 mrg for each multilib variant and they take precedence over
1427 1.1.1.13 mrg <samp><span class="option">--with-target-bdw-gc</span></samp>. If <samp><span class="option">--with-target-bdw-gc-include</span></samp>
1428 1.1.1.10 mrg is missing values for a multilib, then the value for the default
1429 1.1.1.13 mrg multilib is used (e.g. ‘<samp><span class="samp">--with-target-bdw-gc-include=/opt/bdw-gc/include</span></samp>’
1430 1.1.1.13 mrg ‘<samp><span class="samp">--with-target-bdw-gc-lib=/opt/bdw-gc/lib64,32=/opt-bdw-gc/lib32</span></samp>’).
1431 1.1.1.10 mrg If none of these options are specified, the library is assumed in
1432 1.1.1.13 mrg default locations.
1433 1.1.1.9 mrg </dl>
1434 1.1.1.3 skrll
1435 1.1.1.13 mrg <p><hr />
1436 1.1.1.9 mrg <p><a href="./index.html">Return to the GCC Installation page</a>
1437 1.1 mrg
1438 1.1.1.13 mrg <!-- ***Building**************************************************************** -->
1439 1.1.1.13 mrg <!-- ***Testing***************************************************************** -->
1440 1.1.1.13 mrg <!-- ***Final install*********************************************************** -->
1441 1.1.1.13 mrg <!-- ***Binaries**************************************************************** -->
1442 1.1.1.13 mrg <!-- ***Specific**************************************************************** -->
1443 1.1.1.13 mrg <!-- ***Old documentation****************************************************** -->
1444 1.1.1.13 mrg <!-- ***GFDL******************************************************************** -->
1445 1.1.1.13 mrg <!-- *************************************************************************** -->
1446 1.1.1.13 mrg <!-- Part 6 The End of the Document -->
1447 1.1.1.13 mrg </body></html>
1448 1.1 mrg
1449