configure.html 88 KB

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