No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

612 líneas
24KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <title>Overall Options (Using the GNU Compiler Collection (GCC))</title>
  21. <meta name="description" content="Overall Options (Using the GNU Compiler Collection (GCC))">
  22. <meta name="keywords" content="Overall Options (Using the GNU Compiler Collection (GCC))">
  23. <meta name="resource-type" content="document">
  24. <meta name="distribution" content="global">
  25. <meta name="Generator" content="makeinfo">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="Invoking-GCC.html#Invoking-GCC" rel="up" title="Invoking GCC">
  30. <link href="Invoking-G_002b_002b.html#Invoking-G_002b_002b" rel="next" title="Invoking G++">
  31. <link href="Option-Summary.html#Option-Summary" rel="prev" title="Option Summary">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.indentedblock {margin-right: 0em}
  36. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  37. blockquote.smallquotation {font-size: smaller}
  38. div.display {margin-left: 3.2em}
  39. div.example {margin-left: 3.2em}
  40. div.lisp {margin-left: 3.2em}
  41. div.smalldisplay {margin-left: 3.2em}
  42. div.smallexample {margin-left: 3.2em}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style: oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nolinebreak {white-space: nowrap}
  54. span.roman {font-family: initial; font-weight: normal}
  55. span.sansserif {font-family: sans-serif; font-weight: normal}
  56. ul.no-bullet {list-style: none}
  57. -->
  58. </style>
  59. </head>
  60. <body lang="en">
  61. <a name="Overall-Options"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="Invoking-G_002b_002b.html#Invoking-G_002b_002b" accesskey="n" rel="next">Invoking G++</a>, Previous: <a href="Option-Summary.html#Option-Summary" accesskey="p" rel="prev">Option Summary</a>, Up: <a href="Invoking-GCC.html#Invoking-GCC" accesskey="u" rel="up">Invoking GCC</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  65. </div>
  66. <hr>
  67. <a name="Options-Controlling-the-Kind-of-Output"></a>
  68. <h3 class="section">3.2 Options Controlling the Kind of Output</h3>
  69. <p>Compilation can involve up to four stages: preprocessing, compilation
  70. proper, assembly and linking, always in that order. GCC is capable of
  71. preprocessing and compiling several files either into several
  72. assembler input files, or into one assembler input file; then each
  73. assembler input file produces an object file, and linking combines all
  74. the object files (those newly compiled, and those specified as input)
  75. into an executable file.
  76. </p>
  77. <a name="index-file-name-suffix"></a>
  78. <p>For any given input file, the file name suffix determines what kind of
  79. compilation is done:
  80. </p>
  81. <dl compact="compact">
  82. <dt><code><var>file</var>.c</code></dt>
  83. <dd><p>C source code that must be preprocessed.
  84. </p>
  85. </dd>
  86. <dt><code><var>file</var>.i</code></dt>
  87. <dd><p>C source code that should not be preprocessed.
  88. </p>
  89. </dd>
  90. <dt><code><var>file</var>.ii</code></dt>
  91. <dd><p>C++ source code that should not be preprocessed.
  92. </p>
  93. </dd>
  94. <dt><code><var>file</var>.m</code></dt>
  95. <dd><p>Objective-C source code. Note that you must link with the <samp>libobjc</samp>
  96. library to make an Objective-C program work.
  97. </p>
  98. </dd>
  99. <dt><code><var>file</var>.mi</code></dt>
  100. <dd><p>Objective-C source code that should not be preprocessed.
  101. </p>
  102. </dd>
  103. <dt><code><var>file</var>.mm</code></dt>
  104. <dt><code><var>file</var>.M</code></dt>
  105. <dd><p>Objective-C++ source code. Note that you must link with the <samp>libobjc</samp>
  106. library to make an Objective-C++ program work. Note that &lsquo;<samp>.M</samp>&rsquo; refers
  107. to a literal capital M.
  108. </p>
  109. </dd>
  110. <dt><code><var>file</var>.mii</code></dt>
  111. <dd><p>Objective-C++ source code that should not be preprocessed.
  112. </p>
  113. </dd>
  114. <dt><code><var>file</var>.h</code></dt>
  115. <dd><p>C, C++, Objective-C or Objective-C++ header file to be turned into a
  116. precompiled header (default), or C, C++ header file to be turned into an
  117. Ada spec (via the <samp>-fdump-ada-spec</samp> switch).
  118. </p>
  119. </dd>
  120. <dt><code><var>file</var>.cc</code></dt>
  121. <dt><code><var>file</var>.cp</code></dt>
  122. <dt><code><var>file</var>.cxx</code></dt>
  123. <dt><code><var>file</var>.cpp</code></dt>
  124. <dt><code><var>file</var>.CPP</code></dt>
  125. <dt><code><var>file</var>.c++</code></dt>
  126. <dt><code><var>file</var>.C</code></dt>
  127. <dd><p>C++ source code that must be preprocessed. Note that in &lsquo;<samp>.cxx</samp>&rsquo;,
  128. the last two letters must both be literally &lsquo;<samp>x</samp>&rsquo;. Likewise,
  129. &lsquo;<samp>.C</samp>&rsquo; refers to a literal capital C.
  130. </p>
  131. </dd>
  132. <dt><code><var>file</var>.mm</code></dt>
  133. <dt><code><var>file</var>.M</code></dt>
  134. <dd><p>Objective-C++ source code that must be preprocessed.
  135. </p>
  136. </dd>
  137. <dt><code><var>file</var>.mii</code></dt>
  138. <dd><p>Objective-C++ source code that should not be preprocessed.
  139. </p>
  140. </dd>
  141. <dt><code><var>file</var>.hh</code></dt>
  142. <dt><code><var>file</var>.H</code></dt>
  143. <dt><code><var>file</var>.hp</code></dt>
  144. <dt><code><var>file</var>.hxx</code></dt>
  145. <dt><code><var>file</var>.hpp</code></dt>
  146. <dt><code><var>file</var>.HPP</code></dt>
  147. <dt><code><var>file</var>.h++</code></dt>
  148. <dt><code><var>file</var>.tcc</code></dt>
  149. <dd><p>C++ header file to be turned into a precompiled header or Ada spec.
  150. </p>
  151. </dd>
  152. <dt><code><var>file</var>.f</code></dt>
  153. <dt><code><var>file</var>.for</code></dt>
  154. <dt><code><var>file</var>.ftn</code></dt>
  155. <dd><p>Fixed form Fortran source code that should not be preprocessed.
  156. </p>
  157. </dd>
  158. <dt><code><var>file</var>.F</code></dt>
  159. <dt><code><var>file</var>.FOR</code></dt>
  160. <dt><code><var>file</var>.fpp</code></dt>
  161. <dt><code><var>file</var>.FPP</code></dt>
  162. <dt><code><var>file</var>.FTN</code></dt>
  163. <dd><p>Fixed form Fortran source code that must be preprocessed (with the traditional
  164. preprocessor).
  165. </p>
  166. </dd>
  167. <dt><code><var>file</var>.f90</code></dt>
  168. <dt><code><var>file</var>.f95</code></dt>
  169. <dt><code><var>file</var>.f03</code></dt>
  170. <dt><code><var>file</var>.f08</code></dt>
  171. <dd><p>Free form Fortran source code that should not be preprocessed.
  172. </p>
  173. </dd>
  174. <dt><code><var>file</var>.F90</code></dt>
  175. <dt><code><var>file</var>.F95</code></dt>
  176. <dt><code><var>file</var>.F03</code></dt>
  177. <dt><code><var>file</var>.F08</code></dt>
  178. <dd><p>Free form Fortran source code that must be preprocessed (with the
  179. traditional preprocessor).
  180. </p>
  181. </dd>
  182. <dt><code><var>file</var>.go</code></dt>
  183. <dd><p>Go source code.
  184. </p>
  185. </dd>
  186. <dt><code><var>file</var>.brig</code></dt>
  187. <dd><p>BRIG files (binary representation of HSAIL).
  188. </p>
  189. </dd>
  190. <dt><code><var>file</var>.d</code></dt>
  191. <dd><p>D source code.
  192. </p>
  193. </dd>
  194. <dt><code><var>file</var>.di</code></dt>
  195. <dd><p>D interface file.
  196. </p>
  197. </dd>
  198. <dt><code><var>file</var>.dd</code></dt>
  199. <dd><p>D documentation code (Ddoc).
  200. </p>
  201. </dd>
  202. <dt><code><var>file</var>.ads</code></dt>
  203. <dd><p>Ada source code file that contains a library unit declaration (a
  204. declaration of a package, subprogram, or generic, or a generic
  205. instantiation), or a library unit renaming declaration (a package,
  206. generic, or subprogram renaming declaration). Such files are also
  207. called <em>specs</em>.
  208. </p>
  209. </dd>
  210. <dt><code><var>file</var>.adb</code></dt>
  211. <dd><p>Ada source code file containing a library unit body (a subprogram or
  212. package body). Such files are also called <em>bodies</em>.
  213. </p>
  214. </dd>
  215. <dt><code><var>file</var>.s</code></dt>
  216. <dd><p>Assembler code.
  217. </p>
  218. </dd>
  219. <dt><code><var>file</var>.S</code></dt>
  220. <dt><code><var>file</var>.sx</code></dt>
  221. <dd><p>Assembler code that must be preprocessed.
  222. </p>
  223. </dd>
  224. <dt><code><var>other</var></code></dt>
  225. <dd><p>An object file to be fed straight into linking.
  226. Any file name with no recognized suffix is treated this way.
  227. </p></dd>
  228. </dl>
  229. <a name="index-x"></a>
  230. <p>You can specify the input language explicitly with the <samp>-x</samp> option:
  231. </p>
  232. <dl compact="compact">
  233. <dt><code>-x <var>language</var></code></dt>
  234. <dd><p>Specify explicitly the <var>language</var> for the following input files
  235. (rather than letting the compiler choose a default based on the file
  236. name suffix). This option applies to all following input files until
  237. the next <samp>-x</samp> option. Possible values for <var>language</var> are:
  238. </p><div class="smallexample">
  239. <pre class="smallexample">c c-header cpp-output
  240. c++ c++-header c++-cpp-output
  241. objective-c objective-c-header objective-c-cpp-output
  242. objective-c++ objective-c++-header objective-c++-cpp-output
  243. assembler assembler-with-cpp
  244. ada
  245. d
  246. f77 f77-cpp-input f95 f95-cpp-input
  247. go
  248. brig
  249. </pre></div>
  250. </dd>
  251. <dt><code>-x none</code></dt>
  252. <dd><p>Turn off any specification of a language, so that subsequent files are
  253. handled according to their file name suffixes (as they are if <samp>-x</samp>
  254. has not been used at all).
  255. </p></dd>
  256. </dl>
  257. <p>If you only want some of the stages of compilation, you can use
  258. <samp>-x</samp> (or filename suffixes) to tell <code>gcc</code> where to start, and
  259. one of the options <samp>-c</samp>, <samp>-S</samp>, or <samp>-E</samp> to say where
  260. <code>gcc</code> is to stop. Note that some combinations (for example,
  261. &lsquo;<samp>-x cpp-output -E</samp>&rsquo;) instruct <code>gcc</code> to do nothing at all.
  262. </p>
  263. <dl compact="compact">
  264. <dt><code>-c</code></dt>
  265. <dd><a name="index-c"></a>
  266. <p>Compile or assemble the source files, but do not link. The linking
  267. stage simply is not done. The ultimate output is in the form of an
  268. object file for each source file.
  269. </p>
  270. <p>By default, the object file name for a source file is made by replacing
  271. the suffix &lsquo;<samp>.c</samp>&rsquo;, &lsquo;<samp>.i</samp>&rsquo;, &lsquo;<samp>.s</samp>&rsquo;, etc., with &lsquo;<samp>.o</samp>&rsquo;.
  272. </p>
  273. <p>Unrecognized input files, not requiring compilation or assembly, are
  274. ignored.
  275. </p>
  276. </dd>
  277. <dt><code>-S</code></dt>
  278. <dd><a name="index-S"></a>
  279. <p>Stop after the stage of compilation proper; do not assemble. The output
  280. is in the form of an assembler code file for each non-assembler input
  281. file specified.
  282. </p>
  283. <p>By default, the assembler file name for a source file is made by
  284. replacing the suffix &lsquo;<samp>.c</samp>&rsquo;, &lsquo;<samp>.i</samp>&rsquo;, etc., with &lsquo;<samp>.s</samp>&rsquo;.
  285. </p>
  286. <p>Input files that don&rsquo;t require compilation are ignored.
  287. </p>
  288. </dd>
  289. <dt><code>-E</code></dt>
  290. <dd><a name="index-E"></a>
  291. <p>Stop after the preprocessing stage; do not run the compiler proper. The
  292. output is in the form of preprocessed source code, which is sent to the
  293. standard output.
  294. </p>
  295. <p>Input files that don&rsquo;t require preprocessing are ignored.
  296. </p>
  297. <a name="index-output-file-option"></a>
  298. </dd>
  299. <dt><code>-o <var>file</var></code></dt>
  300. <dd><a name="index-o"></a>
  301. <p>Place output in file <var>file</var>. This applies to whatever
  302. sort of output is being produced, whether it be an executable file,
  303. an object file, an assembler file or preprocessed C code.
  304. </p>
  305. <p>If <samp>-o</samp> is not specified, the default is to put an executable
  306. file in <samp>a.out</samp>, the object file for
  307. <samp><var>source</var>.<var>suffix</var></samp> in <samp><var>source</var>.o</samp>, its
  308. assembler file in <samp><var>source</var>.s</samp>, a precompiled header file in
  309. <samp><var>source</var>.<var>suffix</var>.gch</samp>, and all preprocessed C source on
  310. standard output.
  311. </p>
  312. </dd>
  313. <dt><code>-v</code></dt>
  314. <dd><a name="index-v"></a>
  315. <p>Print (on standard error output) the commands executed to run the stages
  316. of compilation. Also print the version number of the compiler driver
  317. program and of the preprocessor and the compiler proper.
  318. </p>
  319. </dd>
  320. <dt><code>-###</code></dt>
  321. <dd><a name="index-_0023_0023_0023"></a>
  322. <p>Like <samp>-v</samp> except the commands are not executed and arguments
  323. are quoted unless they contain only alphanumeric characters or <code>./-_</code>.
  324. This is useful for shell scripts to capture the driver-generated command lines.
  325. </p>
  326. </dd>
  327. <dt><code>--help</code></dt>
  328. <dd><a name="index-help"></a>
  329. <p>Print (on the standard output) a description of the command-line options
  330. understood by <code>gcc</code>. If the <samp>-v</samp> option is also specified
  331. then <samp>--help</samp> is also passed on to the various processes
  332. invoked by <code>gcc</code>, so that they can display the command-line options
  333. they accept. If the <samp>-Wextra</samp> option has also been specified
  334. (prior to the <samp>--help</samp> option), then command-line options that
  335. have no documentation associated with them are also displayed.
  336. </p>
  337. </dd>
  338. <dt><code>--target-help</code></dt>
  339. <dd><a name="index-target_002dhelp"></a>
  340. <p>Print (on the standard output) a description of target-specific command-line
  341. options for each tool. For some targets extra target-specific
  342. information may also be printed.
  343. </p>
  344. </dd>
  345. <dt><code>--help={<var>class</var><span class="roman">|[</span>^<span class="roman">]</span><var>qualifier</var>}<span class="roman">[</span>,&hellip;<span class="roman">]</span></code></dt>
  346. <dd><p>Print (on the standard output) a description of the command-line
  347. options understood by the compiler that fit into all specified classes
  348. and qualifiers. These are the supported classes:
  349. </p>
  350. <dl compact="compact">
  351. <dt>&lsquo;<samp>optimizers</samp>&rsquo;</dt>
  352. <dd><p>Display all of the optimization options supported by the
  353. compiler.
  354. </p>
  355. </dd>
  356. <dt>&lsquo;<samp>warnings</samp>&rsquo;</dt>
  357. <dd><p>Display all of the options controlling warning messages
  358. produced by the compiler.
  359. </p>
  360. </dd>
  361. <dt>&lsquo;<samp>target</samp>&rsquo;</dt>
  362. <dd><p>Display target-specific options. Unlike the
  363. <samp>--target-help</samp> option however, target-specific options of the
  364. linker and assembler are not displayed. This is because those
  365. tools do not currently support the extended <samp>--help=</samp> syntax.
  366. </p>
  367. </dd>
  368. <dt>&lsquo;<samp>params</samp>&rsquo;</dt>
  369. <dd><p>Display the values recognized by the <samp>--param</samp>
  370. option.
  371. </p>
  372. </dd>
  373. <dt><var>language</var></dt>
  374. <dd><p>Display the options supported for <var>language</var>, where
  375. <var>language</var> is the name of one of the languages supported in this
  376. version of GCC. If an option is supported by all languages, one needs
  377. to select &lsquo;<samp>common</samp>&rsquo; class.
  378. </p>
  379. </dd>
  380. <dt>&lsquo;<samp>common</samp>&rsquo;</dt>
  381. <dd><p>Display the options that are common to all languages.
  382. </p></dd>
  383. </dl>
  384. <p>These are the supported qualifiers:
  385. </p>
  386. <dl compact="compact">
  387. <dt>&lsquo;<samp>undocumented</samp>&rsquo;</dt>
  388. <dd><p>Display only those options that are undocumented.
  389. </p>
  390. </dd>
  391. <dt>&lsquo;<samp>joined</samp>&rsquo;</dt>
  392. <dd><p>Display options taking an argument that appears after an equal
  393. sign in the same continuous piece of text, such as:
  394. &lsquo;<samp>--help=target</samp>&rsquo;.
  395. </p>
  396. </dd>
  397. <dt>&lsquo;<samp>separate</samp>&rsquo;</dt>
  398. <dd><p>Display options taking an argument that appears as a separate word
  399. following the original option, such as: &lsquo;<samp>-o output-file</samp>&rsquo;.
  400. </p></dd>
  401. </dl>
  402. <p>Thus for example to display all the undocumented target-specific
  403. switches supported by the compiler, use:
  404. </p>
  405. <div class="smallexample">
  406. <pre class="smallexample">--help=target,undocumented
  407. </pre></div>
  408. <p>The sense of a qualifier can be inverted by prefixing it with the
  409. &lsquo;<samp>^</samp>&rsquo; character, so for example to display all binary warning
  410. options (i.e., ones that are either on or off and that do not take an
  411. argument) that have a description, use:
  412. </p>
  413. <div class="smallexample">
  414. <pre class="smallexample">--help=warnings,^joined,^undocumented
  415. </pre></div>
  416. <p>The argument to <samp>--help=</samp> should not consist solely of inverted
  417. qualifiers.
  418. </p>
  419. <p>Combining several classes is possible, although this usually
  420. restricts the output so much that there is nothing to display. One
  421. case where it does work, however, is when one of the classes is
  422. <var>target</var>. For example, to display all the target-specific
  423. optimization options, use:
  424. </p>
  425. <div class="smallexample">
  426. <pre class="smallexample">--help=target,optimizers
  427. </pre></div>
  428. <p>The <samp>--help=</samp> option can be repeated on the command line. Each
  429. successive use displays its requested class of options, skipping
  430. those that have already been displayed. If <samp>--help</samp> is also
  431. specified anywhere on the command line then this takes precedence
  432. over any <samp>--help=</samp> option.
  433. </p>
  434. <p>If the <samp>-Q</samp> option appears on the command line before the
  435. <samp>--help=</samp> option, then the descriptive text displayed by
  436. <samp>--help=</samp> is changed. Instead of describing the displayed
  437. options, an indication is given as to whether the option is enabled,
  438. disabled or set to a specific value (assuming that the compiler
  439. knows this at the point where the <samp>--help=</samp> option is used).
  440. </p>
  441. <p>Here is a truncated example from the ARM port of <code>gcc</code>:
  442. </p>
  443. <div class="smallexample">
  444. <pre class="smallexample"> % gcc -Q -mabi=2 --help=target -c
  445. The following options are target specific:
  446. -mabi= 2
  447. -mabort-on-noreturn [disabled]
  448. -mapcs [disabled]
  449. </pre></div>
  450. <p>The output is sensitive to the effects of previous command-line
  451. options, so for example it is possible to find out which optimizations
  452. are enabled at <samp>-O2</samp> by using:
  453. </p>
  454. <div class="smallexample">
  455. <pre class="smallexample">-Q -O2 --help=optimizers
  456. </pre></div>
  457. <p>Alternatively you can discover which binary optimizations are enabled
  458. by <samp>-O3</samp> by using:
  459. </p>
  460. <div class="smallexample">
  461. <pre class="smallexample">gcc -c -Q -O3 --help=optimizers &gt; /tmp/O3-opts
  462. gcc -c -Q -O2 --help=optimizers &gt; /tmp/O2-opts
  463. diff /tmp/O2-opts /tmp/O3-opts | grep enabled
  464. </pre></div>
  465. </dd>
  466. <dt><code>--version</code></dt>
  467. <dd><a name="index-version"></a>
  468. <p>Display the version number and copyrights of the invoked GCC.
  469. </p>
  470. </dd>
  471. <dt><code>-pass-exit-codes</code></dt>
  472. <dd><a name="index-pass_002dexit_002dcodes"></a>
  473. <p>Normally the <code>gcc</code> program exits with the code of 1 if any
  474. phase of the compiler returns a non-success return code. If you specify
  475. <samp>-pass-exit-codes</samp>, the <code>gcc</code> program instead returns with
  476. the numerically highest error produced by any phase returning an error
  477. indication. The C, C++, and Fortran front ends return 4 if an internal
  478. compiler error is encountered.
  479. </p>
  480. </dd>
  481. <dt><code>-pipe</code></dt>
  482. <dd><a name="index-pipe"></a>
  483. <p>Use pipes rather than temporary files for communication between the
  484. various stages of compilation. This fails to work on some systems where
  485. the assembler is unable to read from a pipe; but the GNU assembler has
  486. no trouble.
  487. </p>
  488. </dd>
  489. <dt><code>-specs=<var>file</var></code></dt>
  490. <dd><a name="index-specs"></a>
  491. <p>Process <var>file</var> after the compiler reads in the standard <samp>specs</samp>
  492. file, in order to override the defaults which the <code>gcc</code> driver
  493. program uses when determining what switches to pass to <code>cc1</code>,
  494. <code>cc1plus</code>, <code>as</code>, <code>ld</code>, etc. More than one
  495. <samp>-specs=<var>file</var></samp> can be specified on the command line, and they
  496. are processed in order, from left to right. See <a href="Spec-Files.html#Spec-Files">Spec Files</a>, for
  497. information about the format of the <var>file</var>.
  498. </p>
  499. </dd>
  500. <dt><code>-wrapper</code></dt>
  501. <dd><a name="index-wrapper"></a>
  502. <p>Invoke all subcommands under a wrapper program. The name of the
  503. wrapper program and its parameters are passed as a comma separated
  504. list.
  505. </p>
  506. <div class="smallexample">
  507. <pre class="smallexample">gcc -c t.c -wrapper gdb,--args
  508. </pre></div>
  509. <p>This invokes all subprograms of <code>gcc</code> under
  510. &lsquo;<samp>gdb --args</samp>&rsquo;, thus the invocation of <code>cc1</code> is
  511. &lsquo;<samp>gdb --args cc1 &hellip;</samp>&rsquo;.
  512. </p>
  513. </dd>
  514. <dt><code>-ffile-prefix-map=<var>old</var>=<var>new</var></code></dt>
  515. <dd><a name="index-ffile_002dprefix_002dmap"></a>
  516. <p>When compiling files residing in directory <samp><var>old</var></samp>, record
  517. any references to them in the result of the compilation as if the
  518. files resided in directory <samp><var>new</var></samp> instead. Specifying this
  519. option is equivalent to specifying all the individual
  520. <samp>-f*-prefix-map</samp> options. This can be used to make reproducible
  521. builds that are location independent. See also
  522. <samp>-fmacro-prefix-map</samp> and <samp>-fdebug-prefix-map</samp>.
  523. </p>
  524. </dd>
  525. <dt><code>-fplugin=<var>name</var>.so</code></dt>
  526. <dd><a name="index-fplugin"></a>
  527. <p>Load the plugin code in file <var>name</var>.so, assumed to be a
  528. shared object to be dlopen&rsquo;d by the compiler. The base name of
  529. the shared object file is used to identify the plugin for the
  530. purposes of argument parsing (See
  531. <samp>-fplugin-arg-<var>name</var>-<var>key</var>=<var>value</var></samp> below).
  532. Each plugin should define the callback functions specified in the
  533. Plugins API.
  534. </p>
  535. </dd>
  536. <dt><code>-fplugin-arg-<var>name</var>-<var>key</var>=<var>value</var></code></dt>
  537. <dd><a name="index-fplugin_002darg"></a>
  538. <p>Define an argument called <var>key</var> with a value of <var>value</var>
  539. for the plugin called <var>name</var>.
  540. </p>
  541. </dd>
  542. <dt><code>-fdump-ada-spec<span class="roman">[</span>-slim<span class="roman">]</span></code></dt>
  543. <dd><a name="index-fdump_002dada_002dspec"></a>
  544. <p>For C and C++ source and include files, generate corresponding Ada specs.
  545. See <a href="http://gcc.gnu.org/onlinedocs/gnat_ugn/Generating-Ada-Bindings-for-C-and-C_002b_002b-headers.html#Generating-Ada-Bindings-for-C-and-C_002b_002b-headers">Generating Ada Bindings for C and C++ headers</a> in <cite>GNAT User&rsquo;s Guide</cite>, which provides detailed documentation on this feature.
  546. </p>
  547. </dd>
  548. <dt><code>-fada-spec-parent=<var>unit</var></code></dt>
  549. <dd><a name="index-fada_002dspec_002dparent"></a>
  550. <p>In conjunction with <samp>-fdump-ada-spec<span class="roman">[</span>-slim<span class="roman">]</span></samp> above, generate
  551. Ada specs as child units of parent <var>unit</var>.
  552. </p>
  553. </dd>
  554. <dt><code>-fdump-go-spec=<var>file</var></code></dt>
  555. <dd><a name="index-fdump_002dgo_002dspec"></a>
  556. <p>For input files in any language, generate corresponding Go
  557. declarations in <var>file</var>. This generates Go <code>const</code>,
  558. <code>type</code>, <code>var</code>, and <code>func</code> declarations which may be a
  559. useful way to start writing a Go interface to code written in some
  560. other language.
  561. </p>
  562. </dd>
  563. <dt><code>@<var>file</var></code></dt>
  564. <dd><p>Read command-line options from <var>file</var>. The options read are
  565. inserted in place of the original @<var>file</var> option. If <var>file</var>
  566. does not exist, or cannot be read, then the option will be treated
  567. literally, and not removed.
  568. </p>
  569. <p>Options in <var>file</var> are separated by whitespace. A whitespace
  570. character may be included in an option by surrounding the entire
  571. option in either single or double quotes. Any character (including a
  572. backslash) may be included by prefixing the character to be included
  573. with a backslash. The <var>file</var> may itself contain additional
  574. @<var>file</var> options; any such options will be processed recursively.
  575. </p></dd>
  576. </dl>
  577. <hr>
  578. <div class="header">
  579. <p>
  580. Next: <a href="Invoking-G_002b_002b.html#Invoking-G_002b_002b" accesskey="n" rel="next">Invoking G++</a>, Previous: <a href="Option-Summary.html#Option-Summary" accesskey="p" rel="prev">Option Summary</a>, Up: <a href="Invoking-GCC.html#Invoking-GCC" accesskey="u" rel="up">Invoking GCC</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  581. </div>
  582. </body>
  583. </html>