configure.html 102 KB

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