Overall-Options.html 23 KB

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