You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29588 lines
1.3MB

  1. .\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
  2. .\"
  3. .\" Standard preamble:
  4. .\" ========================================================================
  5. .de Sp \" Vertical space (when we can't use .PP)
  6. .if t .sp .5v
  7. .if n .sp
  8. ..
  9. .de Vb \" Begin verbatim text
  10. .ft CW
  11. .nf
  12. .ne \\$1
  13. ..
  14. .de Ve \" End verbatim text
  15. .ft R
  16. .fi
  17. ..
  18. .\" Set up some character translations and predefined strings. \*(-- will
  19. .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
  20. .\" double quote, and \*(R" will give a right double quote. \*(C+ will
  21. .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
  22. .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
  23. .\" nothing in troff, for use with C<>.
  24. .tr \(*W-
  25. .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
  26. .ie n \{\
  27. . ds -- \(*W-
  28. . ds PI pi
  29. . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
  30. . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
  31. . ds L" ""
  32. . ds R" ""
  33. . ds C` ""
  34. . ds C' ""
  35. 'br\}
  36. .el\{\
  37. . ds -- \|\(em\|
  38. . ds PI \(*p
  39. . ds L" ``
  40. . ds R" ''
  41. . ds C`
  42. . ds C'
  43. 'br\}
  44. .\"
  45. .\" Escape single quotes in literal strings from groff's Unicode transform.
  46. .ie \n(.g .ds Aq \(aq
  47. .el .ds Aq '
  48. .\"
  49. .\" If the F register is turned on, we'll generate index entries on stderr for
  50. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  51. .\" entries marked with X<> in POD. Of course, you'll have to process the
  52. .\" output yourself in some meaningful fashion.
  53. .\"
  54. .\" Avoid warning from groff about undefined register 'F'.
  55. .de IX
  56. ..
  57. .nr rF 0
  58. .if \n(.g .if rF .nr rF 1
  59. .if (\n(rF:(\n(.g==0)) \{
  60. . if \nF \{
  61. . de IX
  62. . tm Index:\\$1\t\\n%\t"\\$2"
  63. ..
  64. . if !\nF==2 \{
  65. . nr % 0
  66. . nr F 2
  67. . \}
  68. . \}
  69. .\}
  70. .rr rF
  71. .\"
  72. .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
  73. .\" Fear. Run. Save yourself. No user-serviceable parts.
  74. . \" fudge factors for nroff and troff
  75. .if n \{\
  76. . ds #H 0
  77. . ds #V .8m
  78. . ds #F .3m
  79. . ds #[ \f1
  80. . ds #] \fP
  81. .\}
  82. .if t \{\
  83. . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
  84. . ds #V .6m
  85. . ds #F 0
  86. . ds #[ \&
  87. . ds #] \&
  88. .\}
  89. . \" simple accents for nroff and troff
  90. .if n \{\
  91. . ds ' \&
  92. . ds ` \&
  93. . ds ^ \&
  94. . ds , \&
  95. . ds ~ ~
  96. . ds /
  97. .\}
  98. .if t \{\
  99. . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
  100. . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
  101. . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
  102. . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
  103. . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
  104. . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
  105. .\}
  106. . \" troff and (daisy-wheel) nroff accents
  107. .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
  108. .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
  109. .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
  110. .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
  111. .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
  112. .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
  113. .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
  114. .ds ae a\h'-(\w'a'u*4/10)'e
  115. .ds Ae A\h'-(\w'A'u*4/10)'E
  116. . \" corrections for vroff
  117. .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
  118. .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
  119. . \" for low resolution devices (crt and lpr)
  120. .if \n(.H>23 .if \n(.V>19 \
  121. \{\
  122. . ds : e
  123. . ds 8 ss
  124. . ds o a
  125. . ds d- d\h'-1'\(ga
  126. . ds D- D\h'-1'\(hy
  127. . ds th \o'bp'
  128. . ds Th \o'LP'
  129. . ds ae ae
  130. . ds Ae AE
  131. .\}
  132. .rm #[ #] #H #V #F C
  133. .\" ========================================================================
  134. .\"
  135. .IX Title "GCC 1"
  136. .TH GCC 1 "2020-11-03" "gcc-10.2.1" "GNU"
  137. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  138. .\" way too many mistakes in technical documents.
  139. .if n .ad l
  140. .nh
  141. .SH "NAME"
  142. gcc \- GNU project C and C++ compiler
  143. .SH "SYNOPSIS"
  144. .IX Header "SYNOPSIS"
  145. gcc [\fB\-c\fR|\fB\-S\fR|\fB\-E\fR] [\fB\-std=\fR\fIstandard\fR]
  146. [\fB\-g\fR] [\fB\-pg\fR] [\fB\-O\fR\fIlevel\fR]
  147. [\fB\-W\fR\fIwarn\fR...] [\fB\-Wpedantic\fR]
  148. [\fB\-I\fR\fIdir\fR...] [\fB\-L\fR\fIdir\fR...]
  149. [\fB\-D\fR\fImacro\fR[=\fIdefn\fR]...] [\fB\-U\fR\fImacro\fR]
  150. [\fB\-f\fR\fIoption\fR...] [\fB\-m\fR\fImachine-option\fR...]
  151. [\fB\-o\fR \fIoutfile\fR] [@\fIfile\fR] \fIinfile\fR...
  152. .PP
  153. Only the most useful options are listed here; see below for the
  154. remainder. \fBg++\fR accepts mostly the same options as \fBgcc\fR.
  155. .SH "DESCRIPTION"
  156. .IX Header "DESCRIPTION"
  157. When you invoke \s-1GCC,\s0 it normally does preprocessing, compilation,
  158. assembly and linking. The \*(L"overall options\*(R" allow you to stop this
  159. process at an intermediate stage. For example, the \fB\-c\fR option
  160. says not to run the linker. Then the output consists of object files
  161. output by the assembler.
  162. .PP
  163. Other options are passed on to one or more stages of processing. Some options
  164. control the preprocessor and others the compiler itself. Yet other
  165. options control the assembler and linker; most of these are not
  166. documented here, since you rarely need to use any of them.
  167. .PP
  168. Most of the command-line options that you can use with \s-1GCC\s0 are useful
  169. for C programs; when an option is only useful with another language
  170. (usually \*(C+), the explanation says so explicitly. If the description
  171. for a particular option does not mention a source language, you can use
  172. that option with all supported languages.
  173. .PP
  174. The usual way to run \s-1GCC\s0 is to run the executable called \fBgcc\fR, or
  175. \&\fImachine\fR\fB\-gcc\fR when cross-compiling, or
  176. \&\fImachine\fR\fB\-gcc\-\fR\fIversion\fR to run a specific version of \s-1GCC.\s0
  177. When you compile \*(C+ programs, you should invoke \s-1GCC\s0 as \fBg++\fR
  178. instead.
  179. .PP
  180. The \fBgcc\fR program accepts options and file names as operands. Many
  181. options have multi-letter names; therefore multiple single-letter options
  182. may \fInot\fR be grouped: \fB\-dv\fR is very different from \fB\-d\ \-v\fR.
  183. .PP
  184. You can mix options and other arguments. For the most part, the order
  185. you use doesn't matter. Order does matter when you use several
  186. options of the same kind; for example, if you specify \fB\-L\fR more
  187. than once, the directories are searched in the order specified. Also,
  188. the placement of the \fB\-l\fR option is significant.
  189. .PP
  190. Many options have long names starting with \fB\-f\fR or with
  191. \&\fB\-W\fR\-\-\-for example,
  192. \&\fB\-fmove\-loop\-invariants\fR, \fB\-Wformat\fR and so on. Most of
  193. these have both positive and negative forms; the negative form of
  194. \&\fB\-ffoo\fR is \fB\-fno\-foo\fR. This manual documents
  195. only one of these two forms, whichever one is not the default.
  196. .PP
  197. Some options take one or more arguments typically separated either
  198. by a space or by the equals sign (\fB=\fR) from the option name.
  199. Unless documented otherwise, an argument can be either numeric or
  200. a string. Numeric arguments must typically be small unsigned decimal
  201. or hexadecimal integers. Hexadecimal arguments must begin with
  202. the \fB0x\fR prefix. Arguments to options that specify a size
  203. threshold of some sort may be arbitrarily large decimal or hexadecimal
  204. integers followed by a byte size suffix designating a multiple of bytes
  205. such as \f(CW\*(C`kB\*(C'\fR and \f(CW\*(C`KiB\*(C'\fR for kilobyte and kibibyte, respectively,
  206. \&\f(CW\*(C`MB\*(C'\fR and \f(CW\*(C`MiB\*(C'\fR for megabyte and mebibyte, \f(CW\*(C`GB\*(C'\fR and
  207. \&\f(CW\*(C`GiB\*(C'\fR for gigabyte and gigibyte, and so on. Such arguments are
  208. designated by \fIbyte-size\fR in the following text. Refer to the \s-1NIST,
  209. IEC,\s0 and other relevant national and international standards for the full
  210. listing and explanation of the binary and decimal byte size prefixes.
  211. .SH "OPTIONS"
  212. .IX Header "OPTIONS"
  213. .SS "Option Summary"
  214. .IX Subsection "Option Summary"
  215. Here is a summary of all the options, grouped by type. Explanations are
  216. in the following sections.
  217. .IP "\fIOverall Options\fR" 4
  218. .IX Item "Overall Options"
  219. \&\fB\-c \-S \-E \-o\fR \fIfile\fR \fB\-x\fR \fIlanguage\fR
  220. \&\fB\-v \-### \-\-help\fR[\fB=\fR\fIclass\fR[\fB,...\fR]] \fB\-\-target\-help \-\-version
  221. \&\-pass\-exit\-codes \-pipe \-specs=\fR\fIfile\fR \fB\-wrapper
  222. @\fR\fIfile\fR \fB\-ffile\-prefix\-map=\fR\fIold\fR\fB=\fR\fInew\fR
  223. \&\fB\-fplugin=\fR\fIfile\fR \fB\-fplugin\-arg\-\fR\fIname\fR\fB=\fR\fIarg\fR
  224. \&\fB\-fdump\-ada\-spec\fR[\fB\-slim\fR] \fB\-fada\-spec\-parent=\fR\fIunit\fR \fB\-fdump\-go\-spec=\fR\fIfile\fR
  225. .IP "\fIC Language Options\fR" 4
  226. .IX Item "C Language Options"
  227. \&\fB\-ansi \-std=\fR\fIstandard\fR \fB\-fgnu89\-inline
  228. \&\-fpermitted\-flt\-eval\-methods=\fR\fIstandard\fR
  229. \&\fB\-aux\-info\fR \fIfilename\fR \fB\-fallow\-parameterless\-variadic\-functions
  230. \&\-fno\-asm \-fno\-builtin \-fno\-builtin\-\fR\fIfunction\fR \fB\-fgimple
  231. \&\-fhosted \-ffreestanding
  232. \&\-fopenacc \-fopenacc\-dim=\fR\fIgeom\fR
  233. \&\fB\-fopenmp \-fopenmp\-simd
  234. \&\-fms\-extensions \-fplan9\-extensions \-fsso\-struct=\fR\fIendianness\fR
  235. \&\fB\-fallow\-single\-precision \-fcond\-mismatch \-flax\-vector\-conversions
  236. \&\-fsigned\-bitfields \-fsigned\-char
  237. \&\-funsigned\-bitfields \-funsigned\-char\fR
  238. .IP "\fI\*(C+ Language Options\fR" 4
  239. .IX Item " Language Options"
  240. \&\fB\-fabi\-version=\fR\fIn\fR \fB\-fno\-access\-control
  241. \&\-faligned\-new=\fR\fIn\fR \fB\-fargs\-in\-order=\fR\fIn\fR \fB\-fchar8_t \-fcheck\-new
  242. \&\-fconstexpr\-depth=\fR\fIn\fR \fB\-fconstexpr\-cache\-depth=\fR\fIn\fR
  243. \&\fB\-fconstexpr\-loop\-limit=\fR\fIn\fR \fB\-fconstexpr\-ops\-limit=\fR\fIn\fR
  244. \&\fB\-fno\-elide\-constructors
  245. \&\-fno\-enforce\-eh\-specs
  246. \&\-fno\-gnu\-keywords
  247. \&\-fno\-implicit\-templates
  248. \&\-fno\-implicit\-inline\-templates
  249. \&\-fno\-implement\-inlines \-fms\-extensions
  250. \&\-fnew\-inheriting\-ctors
  251. \&\-fnew\-ttp\-matching
  252. \&\-fno\-nonansi\-builtins \-fnothrow\-opt \-fno\-operator\-names
  253. \&\-fno\-optional\-diags \-fpermissive
  254. \&\-fno\-pretty\-templates
  255. \&\-fno\-rtti \-fsized\-deallocation
  256. \&\-ftemplate\-backtrace\-limit=\fR\fIn\fR
  257. \&\fB\-ftemplate\-depth=\fR\fIn\fR
  258. \&\fB\-fno\-threadsafe\-statics \-fuse\-cxa\-atexit
  259. \&\-fno\-weak \-nostdinc++
  260. \&\-fvisibility\-inlines\-hidden
  261. \&\-fvisibility\-ms\-compat
  262. \&\-fext\-numeric\-literals
  263. \&\-Wabi\-tag \-Wcatch\-value \-Wcatch\-value=\fR\fIn\fR
  264. \&\fB\-Wno\-class\-conversion \-Wclass\-memaccess
  265. \&\-Wcomma\-subscript \-Wconditionally\-supported
  266. \&\-Wno\-conversion\-null \-Wctor\-dtor\-privacy \-Wno\-delete\-incomplete
  267. \&\-Wdelete\-non\-virtual\-dtor \-Wdeprecated\-copy \-Wdeprecated\-copy\-dtor
  268. \&\-Weffc++ \-Wextra\-semi \-Wno\-inaccessible\-base
  269. \&\-Wno\-inherited\-variadic\-ctor \-Wno\-init\-list\-lifetime
  270. \&\-Wno\-invalid\-offsetof \-Wno\-literal\-suffix \-Wmismatched\-tags
  271. \&\-Wmultiple\-inheritance \-Wnamespaces \-Wnarrowing
  272. \&\-Wnoexcept \-Wnoexcept\-type \-Wnon\-virtual\-dtor
  273. \&\-Wpessimizing\-move \-Wno\-placement\-new \-Wplacement\-new=\fR\fIn\fR
  274. \&\fB\-Wredundant\-move \-Wredundant\-tags
  275. \&\-Wreorder \-Wregister
  276. \&\-Wstrict\-null\-sentinel \-Wno\-subobject\-linkage \-Wtemplates
  277. \&\-Wno\-non\-template\-friend \-Wold\-style\-cast
  278. \&\-Woverloaded\-virtual \-Wno\-pmf\-conversions \-Wsign\-promo
  279. \&\-Wsized\-deallocation \-Wsuggest\-final\-methods
  280. \&\-Wsuggest\-final\-types \-Wsuggest\-override
  281. \&\-Wno\-terminate \-Wuseless\-cast \-Wvirtual\-inheritance
  282. \&\-Wno\-virtual\-move\-assign \-Wvolatile \-Wzero\-as\-null\-pointer\-constant\fR
  283. .IP "\fIObjective-C and Objective\-\*(C+ Language Options\fR" 4
  284. .IX Item "Objective-C and Objective- Language Options"
  285. \&\fB\-fconstant\-string\-class=\fR\fIclass-name\fR
  286. \&\fB\-fgnu\-runtime \-fnext\-runtime
  287. \&\-fno\-nil\-receivers
  288. \&\-fobjc\-abi\-version=\fR\fIn\fR
  289. \&\fB\-fobjc\-call\-cxx\-cdtors
  290. \&\-fobjc\-direct\-dispatch
  291. \&\-fobjc\-exceptions
  292. \&\-fobjc\-gc
  293. \&\-fobjc\-nilcheck
  294. \&\-fobjc\-std=objc1
  295. \&\-fno\-local\-ivars
  296. \&\-fivar\-visibility=\fR[\fBpublic\fR|\fBprotected\fR|\fBprivate\fR|\fBpackage\fR]
  297. \&\fB\-freplace\-objc\-classes
  298. \&\-fzero\-link
  299. \&\-gen\-decls
  300. \&\-Wassign\-intercept \-Wno\-property\-assign\-default
  301. \&\-Wno\-protocol \-Wselector
  302. \&\-Wstrict\-selector\-match
  303. \&\-Wundeclared\-selector\fR
  304. .IP "\fIDiagnostic Message Formatting Options\fR" 4
  305. .IX Item "Diagnostic Message Formatting Options"
  306. \&\fB\-fmessage\-length=\fR\fIn\fR
  307. \&\fB\-fdiagnostics\-show\-location=\fR[\fBonce\fR|\fBevery-line\fR]
  308. \&\fB\-fdiagnostics\-color=\fR[\fBauto\fR|\fBnever\fR|\fBalways\fR]
  309. \&\fB\-fdiagnostics\-urls=\fR[\fBauto\fR|\fBnever\fR|\fBalways\fR]
  310. \&\fB\-fdiagnostics\-format=\fR[\fBtext\fR|\fBjson\fR]
  311. \&\fB\-fno\-diagnostics\-show\-option \-fno\-diagnostics\-show\-caret
  312. \&\-fno\-diagnostics\-show\-labels \-fno\-diagnostics\-show\-line\-numbers
  313. \&\-fno\-diagnostics\-show\-cwe
  314. \&\-fdiagnostics\-minimum\-margin\-width=\fR\fIwidth\fR
  315. \&\fB\-fdiagnostics\-parseable\-fixits \-fdiagnostics\-generate\-patch
  316. \&\-fdiagnostics\-show\-template\-tree \-fno\-elide\-type
  317. \&\-fdiagnostics\-path\-format=\fR[\fBnone\fR|\fBseparate-events\fR|\fBinline-events\fR]
  318. \&\fB\-fdiagnostics\-show\-path\-depths
  319. \&\-fno\-show\-column\fR
  320. .IP "\fIWarning Options\fR" 4
  321. .IX Item "Warning Options"
  322. \&\fB\-fsyntax\-only \-fmax\-errors=\fR\fIn\fR \fB\-Wpedantic
  323. \&\-pedantic\-errors
  324. \&\-w \-Wextra \-Wall \-Wabi=\fR\fIn\fR
  325. \&\fB\-Waddress \-Wno\-address\-of\-packed\-member \-Waggregate\-return
  326. \&\-Walloc\-size\-larger\-than=\fR\fIbyte-size\fR \fB\-Walloc\-zero
  327. \&\-Walloca \-Walloca\-larger\-than=\fR\fIbyte-size\fR
  328. \&\fB\-Wno\-aggressive\-loop\-optimizations
  329. \&\-Warith\-conversion
  330. \&\-Warray\-bounds \-Warray\-bounds=\fR\fIn\fR
  331. \&\fB\-Wno\-attributes \-Wattribute\-alias=\fR\fIn\fR \fB\-Wno\-attribute\-alias
  332. \&\-Wno\-attribute\-warning \-Wbool\-compare \-Wbool\-operation
  333. \&\-Wno\-builtin\-declaration\-mismatch
  334. \&\-Wno\-builtin\-macro\-redefined \-Wc90\-c99\-compat \-Wc99\-c11\-compat
  335. \&\-Wc11\-c2x\-compat
  336. \&\-Wc++\-compat \-Wc++11\-compat \-Wc++14\-compat \-Wc++17\-compat
  337. \&\-Wc++20\-compat
  338. \&\-Wcast\-align \-Wcast\-align=strict \-Wcast\-function\-type \-Wcast\-qual
  339. \&\-Wchar\-subscripts
  340. \&\-Wclobbered \-Wcomment
  341. \&\-Wconversion \-Wno\-coverage\-mismatch \-Wno\-cpp
  342. \&\-Wdangling\-else \-Wdate\-time
  343. \&\-Wno\-deprecated \-Wno\-deprecated\-declarations \-Wno\-designated\-init
  344. \&\-Wdisabled\-optimization
  345. \&\-Wno\-discarded\-array\-qualifiers \-Wno\-discarded\-qualifiers
  346. \&\-Wno\-div\-by\-zero \-Wdouble\-promotion
  347. \&\-Wduplicated\-branches \-Wduplicated\-cond
  348. \&\-Wempty\-body \-Wno\-endif\-labels \-Wenum\-compare \-Wenum\-conversion
  349. \&\-Werror \-Werror=* \-Wexpansion\-to\-defined \-Wfatal\-errors
  350. \&\-Wfloat\-conversion \-Wfloat\-equal \-Wformat \-Wformat=2
  351. \&\-Wno\-format\-contains\-nul \-Wno\-format\-extra\-args
  352. \&\-Wformat\-nonliteral \-Wformat\-overflow=\fR\fIn\fR
  353. \&\fB\-Wformat\-security \-Wformat\-signedness \-Wformat\-truncation=\fR\fIn\fR
  354. \&\fB\-Wformat\-y2k \-Wframe\-address
  355. \&\-Wframe\-larger\-than=\fR\fIbyte-size\fR \fB\-Wno\-free\-nonheap\-object
  356. \&\-Wno\-hsa \-Wno\-if\-not\-aligned \-Wno\-ignored\-attributes
  357. \&\-Wignored\-qualifiers \-Wno\-incompatible\-pointer\-types
  358. \&\-Wimplicit \-Wimplicit\-fallthrough \-Wimplicit\-fallthrough=\fR\fIn\fR
  359. \&\fB\-Wno\-implicit\-function\-declaration \-Wno\-implicit\-int
  360. \&\-Winit\-self \-Winline \-Wno\-int\-conversion \-Wint\-in\-bool\-context
  361. \&\-Wno\-int\-to\-pointer\-cast \-Wno\-invalid\-memory\-model
  362. \&\-Winvalid\-pch \-Wjump\-misses\-init \-Wlarger\-than=\fR\fIbyte-size\fR
  363. \&\fB\-Wlogical\-not\-parentheses \-Wlogical\-op \-Wlong\-long
  364. \&\-Wno\-lto\-type\-mismatch \-Wmain \-Wmaybe\-uninitialized
  365. \&\-Wmemset\-elt\-size \-Wmemset\-transposed\-args
  366. \&\-Wmisleading\-indentation \-Wmissing\-attributes \-Wmissing\-braces
  367. \&\-Wmissing\-field\-initializers \-Wmissing\-format\-attribute
  368. \&\-Wmissing\-include\-dirs \-Wmissing\-noreturn \-Wno\-missing\-profile
  369. \&\-Wno\-multichar \-Wmultistatement\-macros \-Wnonnull \-Wnonnull\-compare
  370. \&\-Wnormalized=\fR[\fBnone\fR|\fBid\fR|\fBnfc\fR|\fBnfkc\fR]
  371. \&\fB\-Wnull\-dereference \-Wno\-odr \-Wopenmp\-simd
  372. \&\-Wno\-overflow \-Woverlength\-strings \-Wno\-override\-init\-side\-effects
  373. \&\-Wpacked \-Wno\-packed\-bitfield\-compat \-Wpacked\-not\-aligned \-Wpadded
  374. \&\-Wparentheses \-Wno\-pedantic\-ms\-format
  375. \&\-Wpointer\-arith \-Wno\-pointer\-compare \-Wno\-pointer\-to\-int\-cast
  376. \&\-Wno\-pragmas \-Wno\-prio\-ctor\-dtor \-Wredundant\-decls
  377. \&\-Wrestrict \-Wno\-return\-local\-addr \-Wreturn\-type
  378. \&\-Wno\-scalar\-storage\-order \-Wsequence\-point
  379. \&\-Wshadow \-Wshadow=global \-Wshadow=local \-Wshadow=compatible\-local
  380. \&\-Wno\-shadow\-ivar
  381. \&\-Wno\-shift\-count\-negative \-Wno\-shift\-count\-overflow \-Wshift\-negative\-value
  382. \&\-Wno\-shift\-overflow \-Wshift\-overflow=\fR\fIn\fR
  383. \&\fB\-Wsign\-compare \-Wsign\-conversion
  384. \&\-Wno\-sizeof\-array\-argument
  385. \&\-Wsizeof\-pointer\-div \-Wsizeof\-pointer\-memaccess
  386. \&\-Wstack\-protector \-Wstack\-usage=\fR\fIbyte-size\fR \fB\-Wstrict\-aliasing
  387. \&\-Wstrict\-aliasing=n \-Wstrict\-overflow \-Wstrict\-overflow=\fR\fIn\fR
  388. \&\fB\-Wstring\-compare
  389. \&\-Wstringop\-overflow=\fR\fIn\fR \fB\-Wno\-stringop\-truncation
  390. \&\-Wsuggest\-attribute=\fR[\fBpure\fR|\fBconst\fR|\fBnoreturn\fR|\fBformat\fR|\fBmalloc\fR]
  391. \&\fB\-Wswitch \-Wno\-switch\-bool \-Wswitch\-default \-Wswitch\-enum
  392. \&\-Wno\-switch\-outside\-range \-Wno\-switch\-unreachable \-Wsync\-nand
  393. \&\-Wsystem\-headers \-Wtautological\-compare \-Wtrampolines \-Wtrigraphs
  394. \&\-Wtype\-limits \-Wundef
  395. \&\-Wuninitialized \-Wunknown\-pragmas
  396. \&\-Wunsuffixed\-float\-constants \-Wunused
  397. \&\-Wunused\-but\-set\-parameter \-Wunused\-but\-set\-variable
  398. \&\-Wunused\-const\-variable \-Wunused\-const\-variable=\fR\fIn\fR
  399. \&\fB\-Wunused\-function \-Wunused\-label \-Wunused\-local\-typedefs
  400. \&\-Wunused\-macros
  401. \&\-Wunused\-parameter \-Wno\-unused\-result
  402. \&\-Wunused\-value \-Wunused\-variable
  403. \&\-Wno\-varargs \-Wvariadic\-macros
  404. \&\-Wvector\-operation\-performance
  405. \&\-Wvla \-Wvla\-larger\-than=\fR\fIbyte-size\fR \fB\-Wno\-vla\-larger\-than
  406. \&\-Wvolatile\-register\-var \-Wwrite\-strings
  407. \&\-Wzero\-length\-bounds\fR
  408. .IP "\fIStatic Analyzer Options\fR" 4
  409. .IX Item "Static Analyzer Options"
  410. \&\fB\-fanalyzer
  411. \&\-fanalyzer\-call\-summaries
  412. \&\-fanalyzer\-checker=\fR\fIname\fR
  413. \&\fB\-fanalyzer\-fine\-grained
  414. \&\-fanalyzer\-state\-merge
  415. \&\-fanalyzer\-state\-purge
  416. \&\-fanalyzer\-transitivity
  417. \&\-fanalyzer\-verbose\-edges
  418. \&\-fanalyzer\-verbose\-state\-changes
  419. \&\-fanalyzer\-verbosity=\fR\fIlevel\fR
  420. \&\fB\-fdump\-analyzer
  421. \&\-fdump\-analyzer\-stderr
  422. \&\-fdump\-analyzer\-callgraph
  423. \&\-fdump\-analyzer\-exploded\-graph
  424. \&\-fdump\-analyzer\-exploded\-nodes
  425. \&\-fdump\-analyzer\-exploded\-nodes\-2
  426. \&\-fdump\-analyzer\-exploded\-nodes\-3
  427. \&\-fdump\-analyzer\-state\-purge
  428. \&\-fdump\-analyzer\-supergraph
  429. \&\-Wno\-analyzer\-double\-fclose
  430. \&\-Wno\-analyzer\-double\-free
  431. \&\-Wno\-analyzer\-exposure\-through\-output\-file
  432. \&\-Wno\-analyzer\-file\-leak
  433. \&\-Wno\-analyzer\-free\-of\-non\-heap
  434. \&\-Wno\-analyzer\-malloc\-leak
  435. \&\-Wno\-analyzer\-null\-argument
  436. \&\-Wno\-analyzer\-null\-dereference
  437. \&\-Wno\-analyzer\-possible\-null\-argument
  438. \&\-Wno\-analyzer\-possible\-null\-dereference
  439. \&\-Wno\-analyzer\-stale\-setjmp\-buffer
  440. \&\-Wno\-analyzer\-tainted\-array\-index
  441. \&\-Wanalyzer\-too\-complex
  442. \&\-Wno\-analyzer\-unsafe\-call\-within\-signal\-handler
  443. \&\-Wno\-analyzer\-use\-after\-free
  444. \&\-Wno\-analyzer\-use\-of\-pointer\-in\-stale\-stack\-frame
  445. \&\-Wno\-analyzer\-use\-of\-uninitialized\-value\fR
  446. .IP "\fIC and Objective-C-only Warning Options\fR" 4
  447. .IX Item "C and Objective-C-only Warning Options"
  448. \&\fB\-Wbad\-function\-cast \-Wmissing\-declarations
  449. \&\-Wmissing\-parameter\-type \-Wmissing\-prototypes \-Wnested\-externs
  450. \&\-Wold\-style\-declaration \-Wold\-style\-definition
  451. \&\-Wstrict\-prototypes \-Wtraditional \-Wtraditional\-conversion
  452. \&\-Wdeclaration\-after\-statement \-Wpointer\-sign\fR
  453. .IP "\fIDebugging Options\fR" 4
  454. .IX Item "Debugging Options"
  455. \&\fB\-g \-g\fR\fIlevel\fR \fB\-gdwarf \-gdwarf\-\fR\fIversion\fR
  456. \&\fB\-ggdb \-grecord\-gcc\-switches \-gno\-record\-gcc\-switches
  457. \&\-gstabs \-gstabs+ \-gstrict\-dwarf \-gno\-strict\-dwarf
  458. \&\-gas\-loc\-support \-gno\-as\-loc\-support
  459. \&\-gas\-locview\-support \-gno\-as\-locview\-support
  460. \&\-gcolumn\-info \-gno\-column\-info
  461. \&\-gstatement\-frontiers \-gno\-statement\-frontiers
  462. \&\-gvariable\-location\-views \-gno\-variable\-location\-views
  463. \&\-ginternal\-reset\-location\-views \-gno\-internal\-reset\-location\-views
  464. \&\-ginline\-points \-gno\-inline\-points
  465. \&\-gvms \-gxcoff \-gxcoff+ \-gz\fR[\fB=\fR\fItype\fR]
  466. \&\fB\-gsplit\-dwarf \-gdescribe\-dies \-gno\-describe\-dies
  467. \&\-fdebug\-prefix\-map=\fR\fIold\fR\fB=\fR\fInew\fR \fB\-fdebug\-types\-section
  468. \&\-fno\-eliminate\-unused\-debug\-types
  469. \&\-femit\-struct\-debug\-baseonly \-femit\-struct\-debug\-reduced
  470. \&\-femit\-struct\-debug\-detailed\fR[\fB=\fR\fIspec-list\fR]
  471. \&\fB\-fno\-eliminate\-unused\-debug\-symbols \-femit\-class\-debug\-always
  472. \&\-fno\-merge\-debug\-strings \-fno\-dwarf2\-cfi\-asm
  473. \&\-fvar\-tracking \-fvar\-tracking\-assignments\fR
  474. .IP "\fIOptimization Options\fR" 4
  475. .IX Item "Optimization Options"
  476. \&\fB\-faggressive\-loop\-optimizations
  477. \&\-falign\-functions[=\fR\fIn\fR\fB[:\fR\fIm\fR\fB:[\fR\fIn2\fR\fB[:\fR\fIm2\fR\fB]]]]
  478. \&\-falign\-jumps[=\fR\fIn\fR\fB[:\fR\fIm\fR\fB:[\fR\fIn2\fR\fB[:\fR\fIm2\fR\fB]]]]
  479. \&\-falign\-labels[=\fR\fIn\fR\fB[:\fR\fIm\fR\fB:[\fR\fIn2\fR\fB[:\fR\fIm2\fR\fB]]]]
  480. \&\-falign\-loops[=\fR\fIn\fR\fB[:\fR\fIm\fR\fB:[\fR\fIn2\fR\fB[:\fR\fIm2\fR\fB]]]]
  481. \&\-fno\-allocation\-dce \-fallow\-store\-data\-races
  482. \&\-fassociative\-math \-fauto\-profile \-fauto\-profile[=\fR\fIpath\fR\fB]
  483. \&\-fauto\-inc\-dec \-fbranch\-probabilities
  484. \&\-fcaller\-saves
  485. \&\-fcombine\-stack\-adjustments \-fconserve\-stack
  486. \&\-fcompare\-elim \-fcprop\-registers \-fcrossjumping
  487. \&\-fcse\-follow\-jumps \-fcse\-skip\-blocks \-fcx\-fortran\-rules
  488. \&\-fcx\-limited\-range
  489. \&\-fdata\-sections \-fdce \-fdelayed\-branch
  490. \&\-fdelete\-null\-pointer\-checks \-fdevirtualize \-fdevirtualize\-speculatively
  491. \&\-fdevirtualize\-at\-ltrans \-fdse
  492. \&\-fearly\-inlining \-fipa\-sra \-fexpensive\-optimizations \-ffat\-lto\-objects
  493. \&\-ffast\-math \-ffinite\-math\-only \-ffloat\-store \-fexcess\-precision=\fR\fIstyle\fR
  494. \&\fB\-ffinite\-loops
  495. \&\-fforward\-propagate \-ffp\-contract=\fR\fIstyle\fR \fB\-ffunction\-sections
  496. \&\-fgcse \-fgcse\-after\-reload \-fgcse\-las \-fgcse\-lm \-fgraphite\-identity
  497. \&\-fgcse\-sm \-fhoist\-adjacent\-loads \-fif\-conversion
  498. \&\-fif\-conversion2 \-findirect\-inlining
  499. \&\-finline\-functions \-finline\-functions\-called\-once \-finline\-limit=\fR\fIn\fR
  500. \&\fB\-finline\-small\-functions \-fipa\-cp \-fipa\-cp\-clone
  501. \&\-fipa\-bit\-cp \-fipa\-vrp \-fipa\-pta \-fipa\-profile \-fipa\-pure\-const
  502. \&\-fipa\-reference \-fipa\-reference\-addressable
  503. \&\-fipa\-stack\-alignment \-fipa\-icf \-fira\-algorithm=\fR\fIalgorithm\fR
  504. \&\fB\-flive\-patching=\fR\fIlevel\fR
  505. \&\fB\-fira\-region=\fR\fIregion\fR \fB\-fira\-hoist\-pressure
  506. \&\-fira\-loop\-pressure \-fno\-ira\-share\-save\-slots
  507. \&\-fno\-ira\-share\-spill\-slots
  508. \&\-fisolate\-erroneous\-paths\-dereference \-fisolate\-erroneous\-paths\-attribute
  509. \&\-fivopts \-fkeep\-inline\-functions \-fkeep\-static\-functions
  510. \&\-fkeep\-static\-consts \-flimit\-function\-alignment \-flive\-range\-shrinkage
  511. \&\-floop\-block \-floop\-interchange \-floop\-strip\-mine
  512. \&\-floop\-unroll\-and\-jam \-floop\-nest\-optimize
  513. \&\-floop\-parallelize\-all \-flra\-remat \-flto \-flto\-compression\-level
  514. \&\-flto\-partition=\fR\fIalg\fR \fB\-fmerge\-all\-constants
  515. \&\-fmerge\-constants \-fmodulo\-sched \-fmodulo\-sched\-allow\-regmoves
  516. \&\-fmove\-loop\-invariants \-fno\-branch\-count\-reg
  517. \&\-fno\-defer\-pop \-fno\-fp\-int\-builtin\-inexact \-fno\-function\-cse
  518. \&\-fno\-guess\-branch\-probability \-fno\-inline \-fno\-math\-errno \-fno\-peephole
  519. \&\-fno\-peephole2 \-fno\-printf\-return\-value \-fno\-sched\-interblock
  520. \&\-fno\-sched\-spec \-fno\-signed\-zeros
  521. \&\-fno\-toplevel\-reorder \-fno\-trapping\-math \-fno\-zero\-initialized\-in\-bss
  522. \&\-fomit\-frame\-pointer \-foptimize\-sibling\-calls
  523. \&\-fpartial\-inlining \-fpeel\-loops \-fpredictive\-commoning
  524. \&\-fprefetch\-loop\-arrays
  525. \&\-fprofile\-correction
  526. \&\-fprofile\-use \-fprofile\-use=\fR\fIpath\fR \fB\-fprofile\-partial\-training
  527. \&\-fprofile\-values \-fprofile\-reorder\-functions
  528. \&\-freciprocal\-math \-free \-frename\-registers \-freorder\-blocks
  529. \&\-freorder\-blocks\-algorithm=\fR\fIalgorithm\fR
  530. \&\fB\-freorder\-blocks\-and\-partition \-freorder\-functions
  531. \&\-frerun\-cse\-after\-loop \-freschedule\-modulo\-scheduled\-loops
  532. \&\-frounding\-math \-fsave\-optimization\-record
  533. \&\-fsched2\-use\-superblocks \-fsched\-pressure
  534. \&\-fsched\-spec\-load \-fsched\-spec\-load\-dangerous
  535. \&\-fsched\-stalled\-insns\-dep[=\fR\fIn\fR\fB] \-fsched\-stalled\-insns[=\fR\fIn\fR\fB]
  536. \&\-fsched\-group\-heuristic \-fsched\-critical\-path\-heuristic
  537. \&\-fsched\-spec\-insn\-heuristic \-fsched\-rank\-heuristic
  538. \&\-fsched\-last\-insn\-heuristic \-fsched\-dep\-count\-heuristic
  539. \&\-fschedule\-fusion
  540. \&\-fschedule\-insns \-fschedule\-insns2 \-fsection\-anchors
  541. \&\-fselective\-scheduling \-fselective\-scheduling2
  542. \&\-fsel\-sched\-pipelining \-fsel\-sched\-pipelining\-outer\-loops
  543. \&\-fsemantic\-interposition \-fshrink\-wrap \-fshrink\-wrap\-separate
  544. \&\-fsignaling\-nans
  545. \&\-fsingle\-precision\-constant \-fsplit\-ivs\-in\-unroller \-fsplit\-loops
  546. \&\-fsplit\-paths
  547. \&\-fsplit\-wide\-types \-fsplit\-wide\-types\-early \-fssa\-backprop \-fssa\-phiopt
  548. \&\-fstdarg\-opt \-fstore\-merging \-fstrict\-aliasing
  549. \&\-fthread\-jumps \-ftracer \-ftree\-bit\-ccp
  550. \&\-ftree\-builtin\-call\-dce \-ftree\-ccp \-ftree\-ch
  551. \&\-ftree\-coalesce\-vars \-ftree\-copy\-prop \-ftree\-dce \-ftree\-dominator\-opts
  552. \&\-ftree\-dse \-ftree\-forwprop \-ftree\-fre \-fcode\-hoisting
  553. \&\-ftree\-loop\-if\-convert \-ftree\-loop\-im
  554. \&\-ftree\-phiprop \-ftree\-loop\-distribution \-ftree\-loop\-distribute\-patterns
  555. \&\-ftree\-loop\-ivcanon \-ftree\-loop\-linear \-ftree\-loop\-optimize
  556. \&\-ftree\-loop\-vectorize
  557. \&\-ftree\-parallelize\-loops=\fR\fIn\fR \fB\-ftree\-pre \-ftree\-partial\-pre \-ftree\-pta
  558. \&\-ftree\-reassoc \-ftree\-scev\-cprop \-ftree\-sink \-ftree\-slsr \-ftree\-sra
  559. \&\-ftree\-switch\-conversion \-ftree\-tail\-merge
  560. \&\-ftree\-ter \-ftree\-vectorize \-ftree\-vrp \-funconstrained\-commons
  561. \&\-funit\-at\-a\-time \-funroll\-all\-loops \-funroll\-loops
  562. \&\-funsafe\-math\-optimizations \-funswitch\-loops
  563. \&\-fipa\-ra \-fvariable\-expansion\-in\-unroller \-fvect\-cost\-model \-fvpt
  564. \&\-fweb \-fwhole\-program \-fwpa \-fuse\-linker\-plugin
  565. \&\-\-param\fR \fIname\fR\fB=\fR\fIvalue\fR
  566. \&\fB\-O \-O0 \-O1 \-O2 \-O3 \-Os \-Ofast \-Og\fR
  567. .IP "\fIProgram Instrumentation Options\fR" 4
  568. .IX Item "Program Instrumentation Options"
  569. \&\fB\-p \-pg \-fprofile\-arcs \-\-coverage \-ftest\-coverage
  570. \&\-fprofile\-abs\-path
  571. \&\-fprofile\-dir=\fR\fIpath\fR \fB\-fprofile\-generate \-fprofile\-generate=\fR\fIpath\fR
  572. \&\fB\-fprofile\-note=\fR\fIpath\fR \fB\-fprofile\-prefix\-path=\fR\fIpath\fR
  573. \&\fB\-fprofile\-update=\fR\fImethod\fR \fB\-fprofile\-filter\-files=\fR\fIregex\fR
  574. \&\fB\-fprofile\-exclude\-files=\fR\fIregex\fR
  575. \&\fB\-fprofile\-reproducible=\fR[\fBmultithreaded\fR|\fBparallel-runs\fR|\fBserial\fR]
  576. \&\fB\-fsanitize=\fR\fIstyle\fR \fB\-fsanitize\-recover \-fsanitize\-recover=\fR\fIstyle\fR
  577. \&\fB\-fasan\-shadow\-offset=\fR\fInumber\fR \fB\-fsanitize\-sections=\fR\fIs1\fR\fB,\fR\fIs2\fR\fB,...
  578. \&\-fsanitize\-undefined\-trap\-on\-error \-fbounds\-check
  579. \&\-fcf\-protection=\fR[\fBfull\fR|\fBbranch\fR|\fBreturn\fR|\fBnone\fR|\fBcheck\fR]
  580. \&\fB\-fstack\-protector \-fstack\-protector\-all \-fstack\-protector\-strong
  581. \&\-fstack\-protector\-explicit \-fstack\-check
  582. \&\-fstack\-limit\-register=\fR\fIreg\fR \fB\-fstack\-limit\-symbol=\fR\fIsym\fR
  583. \&\fB\-fno\-stack\-limit \-fsplit\-stack
  584. \&\-fvtable\-verify=\fR[\fBstd\fR|\fBpreinit\fR|\fBnone\fR]
  585. \&\fB\-fvtv\-counts \-fvtv\-debug
  586. \&\-finstrument\-functions
  587. \&\-finstrument\-functions\-exclude\-function\-list=\fR\fIsym\fR\fB,\fR\fIsym\fR\fB,...
  588. \&\-finstrument\-functions\-exclude\-file\-list=\fR\fIfile\fR\fB,\fR\fIfile\fR\fB,...\fR
  589. .IP "\fIPreprocessor Options\fR" 4
  590. .IX Item "Preprocessor Options"
  591. \&\fB\-A\fR\fIquestion\fR\fB=\fR\fIanswer\fR
  592. \&\fB\-A\-\fR\fIquestion\fR[\fB=\fR\fIanswer\fR]
  593. \&\fB\-C \-CC \-D\fR\fImacro\fR[\fB=\fR\fIdefn\fR]
  594. \&\fB\-dD \-dI \-dM \-dN \-dU
  595. \&\-fdebug\-cpp \-fdirectives\-only \-fdollars\-in\-identifiers
  596. \&\-fexec\-charset=\fR\fIcharset\fR \fB\-fextended\-identifiers
  597. \&\-finput\-charset=\fR\fIcharset\fR \fB\-fmacro\-prefix\-map=\fR\fIold\fR\fB=\fR\fInew\fR
  598. \&\fB\-fmax\-include\-depth=\fR\fIdepth\fR
  599. \&\fB\-fno\-canonical\-system\-headers \-fpch\-deps \-fpch\-preprocess
  600. \&\-fpreprocessed \-ftabstop=\fR\fIwidth\fR \fB\-ftrack\-macro\-expansion
  601. \&\-fwide\-exec\-charset=\fR\fIcharset\fR \fB\-fworking\-directory
  602. \&\-H \-imacros\fR \fIfile\fR \fB\-include\fR \fIfile\fR
  603. \&\fB\-M \-MD \-MF \-MG \-MM \-MMD \-MP \-MQ \-MT
  604. \&\-no\-integrated\-cpp \-P \-pthread \-remap
  605. \&\-traditional \-traditional\-cpp \-trigraphs
  606. \&\-U\fR\fImacro\fR \fB\-undef
  607. \&\-Wp,\fR\fIoption\fR \fB\-Xpreprocessor\fR \fIoption\fR
  608. .IP "\fIAssembler Options\fR" 4
  609. .IX Item "Assembler Options"
  610. \&\fB\-Wa,\fR\fIoption\fR \fB\-Xassembler\fR \fIoption\fR
  611. .IP "\fILinker Options\fR" 4
  612. .IX Item "Linker Options"
  613. \&\fIobject-file-name\fR \fB\-fuse\-ld=\fR\fIlinker\fR \fB\-l\fR\fIlibrary\fR
  614. \&\fB\-nostartfiles \-nodefaultlibs \-nolibc \-nostdlib
  615. \&\-e\fR \fIentry\fR \fB\-\-entry=\fR\fIentry\fR
  616. \&\fB\-pie \-pthread \-r \-rdynamic
  617. \&\-s \-static \-static\-pie \-static\-libgcc \-static\-libstdc++
  618. \&\-static\-libasan \-static\-libtsan \-static\-liblsan \-static\-libubsan
  619. \&\-shared \-shared\-libgcc \-symbolic
  620. \&\-T\fR \fIscript\fR \fB\-Wl,\fR\fIoption\fR \fB\-Xlinker\fR \fIoption\fR
  621. \&\fB\-u\fR \fIsymbol\fR \fB\-z\fR \fIkeyword\fR
  622. .IP "\fIDirectory Options\fR" 4
  623. .IX Item "Directory Options"
  624. \&\fB\-B\fR\fIprefix\fR \fB\-I\fR\fIdir\fR \fB\-I\-
  625. \&\-idirafter\fR \fIdir\fR
  626. \&\fB\-imacros\fR \fIfile\fR \fB\-imultilib\fR \fIdir\fR
  627. \&\fB\-iplugindir=\fR\fIdir\fR \fB\-iprefix\fR \fIfile\fR
  628. \&\fB\-iquote\fR \fIdir\fR \fB\-isysroot\fR \fIdir\fR \fB\-isystem\fR \fIdir\fR
  629. \&\fB\-iwithprefix\fR \fIdir\fR \fB\-iwithprefixbefore\fR \fIdir\fR
  630. \&\fB\-L\fR\fIdir\fR \fB\-no\-canonical\-prefixes \-\-no\-sysroot\-suffix
  631. \&\-nostdinc \-nostdinc++ \-\-sysroot=\fR\fIdir\fR
  632. .IP "\fICode Generation Options\fR" 4
  633. .IX Item "Code Generation Options"
  634. \&\fB\-fcall\-saved\-\fR\fIreg\fR \fB\-fcall\-used\-\fR\fIreg\fR
  635. \&\fB\-ffixed\-\fR\fIreg\fR \fB\-fexceptions
  636. \&\-fnon\-call\-exceptions \-fdelete\-dead\-exceptions \-funwind\-tables
  637. \&\-fasynchronous\-unwind\-tables
  638. \&\-fno\-gnu\-unique
  639. \&\-finhibit\-size\-directive \-fcommon \-fno\-ident
  640. \&\-fpcc\-struct\-return \-fpic \-fPIC \-fpie \-fPIE \-fno\-plt
  641. \&\-fno\-jump\-tables
  642. \&\-frecord\-gcc\-switches
  643. \&\-freg\-struct\-return \-fshort\-enums \-fshort\-wchar
  644. \&\-fverbose\-asm \-fpack\-struct[=\fR\fIn\fR\fB]
  645. \&\-fleading\-underscore \-ftls\-model=\fR\fImodel\fR
  646. \&\fB\-fstack\-reuse=\fR\fIreuse_level\fR
  647. \&\fB\-ftrampolines \-ftrapv \-fwrapv
  648. \&\-fvisibility=\fR[\fBdefault\fR|\fBinternal\fR|\fBhidden\fR|\fBprotected\fR]
  649. \&\fB\-fstrict\-volatile\-bitfields \-fsync\-libcalls\fR
  650. .IP "\fIDeveloper Options\fR" 4
  651. .IX Item "Developer Options"
  652. \&\fB\-d\fR\fIletters\fR \fB\-dumpspecs \-dumpmachine \-dumpversion
  653. \&\-dumpfullversion \-fcallgraph\-info\fR[\fB=su,da\fR]
  654. \&\fB\-fchecking \-fchecking=\fR\fIn\fR
  655. \&\fB\-fdbg\-cnt\-list \-fdbg\-cnt=\fR\fIcounter-value-list\fR
  656. \&\fB\-fdisable\-ipa\-\fR\fIpass_name\fR
  657. \&\fB\-fdisable\-rtl\-\fR\fIpass_name\fR
  658. \&\fB\-fdisable\-rtl\-\fR\fIpass-name\fR\fB=\fR\fIrange-list\fR
  659. \&\fB\-fdisable\-tree\-\fR\fIpass_name\fR
  660. \&\fB\-fdisable\-tree\-\fR\fIpass-name\fR\fB=\fR\fIrange-list\fR
  661. \&\fB\-fdump\-debug \-fdump\-earlydebug
  662. \&\-fdump\-noaddr \-fdump\-unnumbered \-fdump\-unnumbered\-links
  663. \&\-fdump\-final\-insns\fR[\fB=\fR\fIfile\fR]
  664. \&\fB\-fdump\-ipa\-all \-fdump\-ipa\-cgraph \-fdump\-ipa\-inline
  665. \&\-fdump\-lang\-all
  666. \&\-fdump\-lang\-\fR\fIswitch\fR
  667. \&\fB\-fdump\-lang\-\fR\fIswitch\fR\fB\-\fR\fIoptions\fR
  668. \&\fB\-fdump\-lang\-\fR\fIswitch\fR\fB\-\fR\fIoptions\fR\fB=\fR\fIfilename\fR
  669. \&\fB\-fdump\-passes
  670. \&\-fdump\-rtl\-\fR\fIpass\fR \fB\-fdump\-rtl\-\fR\fIpass\fR\fB=\fR\fIfilename\fR
  671. \&\fB\-fdump\-statistics
  672. \&\-fdump\-tree\-all
  673. \&\-fdump\-tree\-\fR\fIswitch\fR
  674. \&\fB\-fdump\-tree\-\fR\fIswitch\fR\fB\-\fR\fIoptions\fR
  675. \&\fB\-fdump\-tree\-\fR\fIswitch\fR\fB\-\fR\fIoptions\fR\fB=\fR\fIfilename\fR
  676. \&\fB\-fcompare\-debug\fR[\fB=\fR\fIopts\fR] \fB\-fcompare\-debug\-second
  677. \&\-fenable\-\fR\fIkind\fR\fB\-\fR\fIpass\fR
  678. \&\fB\-fenable\-\fR\fIkind\fR\fB\-\fR\fIpass\fR\fB=\fR\fIrange-list\fR
  679. \&\fB\-fira\-verbose=\fR\fIn\fR
  680. \&\fB\-flto\-report \-flto\-report\-wpa \-fmem\-report\-wpa
  681. \&\-fmem\-report \-fpre\-ipa\-mem\-report \-fpost\-ipa\-mem\-report
  682. \&\-fopt\-info \-fopt\-info\-\fR\fIoptions\fR[\fB=\fR\fIfile\fR]
  683. \&\fB\-fprofile\-report
  684. \&\-frandom\-seed=\fR\fIstring\fR \fB\-fsched\-verbose=\fR\fIn\fR
  685. \&\fB\-fsel\-sched\-verbose \-fsel\-sched\-dump\-cfg \-fsel\-sched\-pipelining\-verbose
  686. \&\-fstats \-fstack\-usage \-ftime\-report \-ftime\-report\-details
  687. \&\-fvar\-tracking\-assignments\-toggle \-gtoggle
  688. \&\-print\-file\-name=\fR\fIlibrary\fR \fB\-print\-libgcc\-file\-name
  689. \&\-print\-multi\-directory \-print\-multi\-lib \-print\-multi\-os\-directory
  690. \&\-print\-prog\-name=\fR\fIprogram\fR \fB\-print\-search\-dirs \-Q
  691. \&\-print\-sysroot \-print\-sysroot\-headers\-suffix
  692. \&\-save\-temps \-save\-temps=cwd \-save\-temps=obj \-time\fR[\fB=\fR\fIfile\fR]
  693. .IP "\fIMachine-Dependent Options\fR" 4
  694. .IX Item "Machine-Dependent Options"
  695. \&\fIAArch64 Options\fR
  696. \&\fB\-mabi=\fR\fIname\fR \fB\-mbig\-endian \-mlittle\-endian
  697. \&\-mgeneral\-regs\-only
  698. \&\-mcmodel=tiny \-mcmodel=small \-mcmodel=large
  699. \&\-mstrict\-align \-mno\-strict\-align
  700. \&\-momit\-leaf\-frame\-pointer
  701. \&\-mtls\-dialect=desc \-mtls\-dialect=traditional
  702. \&\-mtls\-size=\fR\fIsize\fR
  703. \&\fB\-mfix\-cortex\-a53\-835769 \-mfix\-cortex\-a53\-843419
  704. \&\-mlow\-precision\-recip\-sqrt \-mlow\-precision\-sqrt \-mlow\-precision\-div
  705. \&\-mpc\-relative\-literal\-loads
  706. \&\-msign\-return\-address=\fR\fIscope\fR
  707. \&\fB\-mbranch\-protection=\fR\fInone\fR\fB|\fR\fIstandard\fR\fB|\fR\fIpac-ret\fR\fB[+\fR\fIleaf\fR
  708. \&\fB+\fR\fIb\-key\fR\fB]|\fR\fIbti\fR
  709. \&\fB\-mharden\-sls=\fR\fIopts\fR
  710. \&\fB\-march=\fR\fIname\fR \fB\-mcpu=\fR\fIname\fR \fB\-mtune=\fR\fIname\fR
  711. \&\fB\-moverride=\fR\fIstring\fR \fB\-mverbose\-cost\-dump
  712. \&\-mstack\-protector\-guard=\fR\fIguard\fR \fB\-mstack\-protector\-guard\-reg=\fR\fIsysreg\fR
  713. \&\fB\-mstack\-protector\-guard\-offset=\fR\fIoffset\fR \fB\-mtrack\-speculation
  714. \&\-moutline\-atomics\fR
  715. .Sp
  716. \&\fIAdapteva Epiphany Options\fR
  717. \&\fB\-mhalf\-reg\-file \-mprefer\-short\-insn\-regs
  718. \&\-mbranch\-cost=\fR\fInum\fR \fB\-mcmove \-mnops=\fR\fInum\fR \fB\-msoft\-cmpsf
  719. \&\-msplit\-lohi \-mpost\-inc \-mpost\-modify \-mstack\-offset=\fR\fInum\fR
  720. \&\fB\-mround\-nearest \-mlong\-calls \-mshort\-calls \-msmall16
  721. \&\-mfp\-mode=\fR\fImode\fR \fB\-mvect\-double \-max\-vect\-align=\fR\fInum\fR
  722. \&\fB\-msplit\-vecmove\-early \-m1reg\-\fR\fIreg\fR
  723. .Sp
  724. \&\fI\s-1AMD GCN\s0 Options\fR
  725. \&\fB\-march=\fR\fIgpu\fR \fB\-mtune=\fR\fIgpu\fR \fB\-mstack\-size=\fR\fIbytes\fR
  726. .Sp
  727. \&\fI\s-1ARC\s0 Options\fR
  728. \&\fB\-mbarrel\-shifter \-mjli\-always
  729. \&\-mcpu=\fR\fIcpu\fR \fB\-mA6 \-mARC600 \-mA7 \-mARC700
  730. \&\-mdpfp \-mdpfp\-compact \-mdpfp\-fast \-mno\-dpfp\-lrsr
  731. \&\-mea \-mno\-mpy \-mmul32x16 \-mmul64 \-matomic
  732. \&\-mnorm \-mspfp \-mspfp\-compact \-mspfp\-fast \-msimd \-msoft\-float \-mswap
  733. \&\-mcrc \-mdsp\-packa \-mdvbf \-mlock \-mmac\-d16 \-mmac\-24 \-mrtsc \-mswape
  734. \&\-mtelephony \-mxy \-misize \-mannotate\-align \-marclinux \-marclinux_prof
  735. \&\-mlong\-calls \-mmedium\-calls \-msdata \-mirq\-ctrl\-saved
  736. \&\-mrgf\-banked\-regs \-mlpc\-width=\fR\fIwidth\fR \fB\-G\fR \fInum\fR
  737. \&\fB\-mvolatile\-cache \-mtp\-regno=\fR\fIregno\fR
  738. \&\fB\-malign\-call \-mauto\-modify\-reg \-mbbit\-peephole \-mno\-brcc
  739. \&\-mcase\-vector\-pcrel \-mcompact\-casesi \-mno\-cond\-exec \-mearly\-cbranchsi
  740. \&\-mexpand\-adddi \-mindexed\-loads \-mlra \-mlra\-priority\-none
  741. \&\-mlra\-priority\-compact mlra-priority-noncompact \-mmillicode
  742. \&\-mmixed\-code \-mq\-class \-mRcq \-mRcw \-msize\-level=\fR\fIlevel\fR
  743. \&\fB\-mtune=\fR\fIcpu\fR \fB\-mmultcost=\fR\fInum\fR \fB\-mcode\-density\-frame
  744. \&\-munalign\-prob\-threshold=\fR\fIprobability\fR \fB\-mmpy\-option=\fR\fImulto\fR
  745. \&\fB\-mdiv\-rem \-mcode\-density \-mll64 \-mfpu=\fR\fIfpu\fR \fB\-mrf16 \-mbranch\-index\fR
  746. .Sp
  747. \&\fI\s-1ARM\s0 Options\fR
  748. \&\fB\-mapcs\-frame \-mno\-apcs\-frame
  749. \&\-mabi=\fR\fIname\fR
  750. \&\fB\-mapcs\-stack\-check \-mno\-apcs\-stack\-check
  751. \&\-mapcs\-reentrant \-mno\-apcs\-reentrant
  752. \&\-mgeneral\-regs\-only
  753. \&\-msched\-prolog \-mno\-sched\-prolog
  754. \&\-mlittle\-endian \-mbig\-endian
  755. \&\-mbe8 \-mbe32
  756. \&\-mfloat\-abi=\fR\fIname\fR
  757. \&\fB\-mfp16\-format=\fR\fIname\fR
  758. \&\fB\-mthumb\-interwork \-mno\-thumb\-interwork
  759. \&\-mcpu=\fR\fIname\fR \fB\-march=\fR\fIname\fR \fB\-mfpu=\fR\fIname\fR
  760. \&\fB\-mtune=\fR\fIname\fR \fB\-mprint\-tune\-info
  761. \&\-mstructure\-size\-boundary=\fR\fIn\fR
  762. \&\fB\-mabort\-on\-noreturn
  763. \&\-mlong\-calls \-mno\-long\-calls
  764. \&\-msingle\-pic\-base \-mno\-single\-pic\-base
  765. \&\-mpic\-register=\fR\fIreg\fR
  766. \&\fB\-mnop\-fun\-dllimport
  767. \&\-mpoke\-function\-name
  768. \&\-mthumb \-marm \-mflip\-thumb
  769. \&\-mtpcs\-frame \-mtpcs\-leaf\-frame
  770. \&\-mcaller\-super\-interworking \-mcallee\-super\-interworking
  771. \&\-mtp=\fR\fIname\fR \fB\-mtls\-dialect=\fR\fIdialect\fR
  772. \&\fB\-mword\-relocations
  773. \&\-mfix\-cortex\-m3\-ldrd
  774. \&\-munaligned\-access
  775. \&\-mneon\-for\-64bits
  776. \&\-mslow\-flash\-data
  777. \&\-masm\-syntax\-unified
  778. \&\-mrestrict\-it
  779. \&\-mverbose\-cost\-dump
  780. \&\-mpure\-code
  781. \&\-mcmse
  782. \&\-mfdpic\fR
  783. .Sp
  784. \&\fI\s-1AVR\s0 Options\fR
  785. \&\fB\-mmcu=\fR\fImcu\fR \fB\-mabsdata \-maccumulate\-args
  786. \&\-mbranch\-cost=\fR\fIcost\fR
  787. \&\fB\-mcall\-prologues \-mgas\-isr\-prologues \-mint8
  788. \&\-mdouble=\fR\fIbits\fR \fB\-mlong\-double=\fR\fIbits\fR
  789. \&\fB\-mn_flash=\fR\fIsize\fR \fB\-mno\-interrupts
  790. \&\-mmain\-is\-OS_task \-mrelax \-mrmw \-mstrict\-X \-mtiny\-stack
  791. \&\-mfract\-convert\-truncate
  792. \&\-mshort\-calls \-nodevicelib \-nodevicespecs
  793. \&\-Waddr\-space\-convert \-Wmisspelled\-isr\fR
  794. .Sp
  795. \&\fIBlackfin Options\fR
  796. \&\fB\-mcpu=\fR\fIcpu\fR[\fB\-\fR\fIsirevision\fR]
  797. \&\fB\-msim \-momit\-leaf\-frame\-pointer \-mno\-omit\-leaf\-frame\-pointer
  798. \&\-mspecld\-anomaly \-mno\-specld\-anomaly \-mcsync\-anomaly \-mno\-csync\-anomaly
  799. \&\-mlow\-64k \-mno\-low64k \-mstack\-check\-l1 \-mid\-shared\-library
  800. \&\-mno\-id\-shared\-library \-mshared\-library\-id=\fR\fIn\fR
  801. \&\fB\-mleaf\-id\-shared\-library \-mno\-leaf\-id\-shared\-library
  802. \&\-msep\-data \-mno\-sep\-data \-mlong\-calls \-mno\-long\-calls
  803. \&\-mfast\-fp \-minline\-plt \-mmulticore \-mcorea \-mcoreb \-msdram
  804. \&\-micplb\fR
  805. .Sp
  806. \&\fIC6X Options\fR
  807. \&\fB\-mbig\-endian \-mlittle\-endian \-march=\fR\fIcpu\fR
  808. \&\fB\-msim \-msdata=\fR\fIsdata-type\fR
  809. .Sp
  810. \&\fI\s-1CRIS\s0 Options\fR
  811. \&\fB\-mcpu=\fR\fIcpu\fR \fB\-march=\fR\fIcpu\fR \fB\-mtune=\fR\fIcpu\fR
  812. \&\fB\-mmax\-stack\-frame=\fR\fIn\fR \fB\-melinux\-stacksize=\fR\fIn\fR
  813. \&\fB\-metrax4 \-metrax100 \-mpdebug \-mcc\-init \-mno\-side\-effects
  814. \&\-mstack\-align \-mdata\-align \-mconst\-align
  815. \&\-m32\-bit \-m16\-bit \-m8\-bit \-mno\-prologue\-epilogue \-mno\-gotplt
  816. \&\-melf \-maout \-melinux \-mlinux \-sim \-sim2
  817. \&\-mmul\-bug\-workaround \-mno\-mul\-bug\-workaround\fR
  818. .Sp
  819. \&\fI\s-1CR16\s0 Options\fR
  820. \&\fB\-mmac
  821. \&\-mcr16cplus \-mcr16c
  822. \&\-msim \-mint32 \-mbit\-ops
  823. \&\-mdata\-model=\fR\fImodel\fR
  824. .Sp
  825. \&\fIC\-SKY Options\fR
  826. \&\fB\-march=\fR\fIarch\fR \fB\-mcpu=\fR\fIcpu\fR
  827. \&\fB\-mbig\-endian \-EB \-mlittle\-endian \-EL
  828. \&\-mhard\-float \-msoft\-float \-mfpu=\fR\fIfpu\fR \fB\-mdouble\-float \-mfdivdu
  829. \&\-melrw \-mistack \-mmp \-mcp \-mcache \-msecurity \-mtrust
  830. \&\-mdsp \-medsp \-mvdsp
  831. \&\-mdiv \-msmart \-mhigh\-registers \-manchor
  832. \&\-mpushpop \-mmultiple\-stld \-mconstpool \-mstack\-size \-mccrt
  833. \&\-mbranch\-cost=\fR\fIn\fR \fB\-mcse\-cc \-msched\-prolog\fR
  834. .Sp
  835. \&\fIDarwin Options\fR
  836. \&\fB\-all_load \-allowable_client \-arch \-arch_errors_fatal
  837. \&\-arch_only \-bind_at_load \-bundle \-bundle_loader
  838. \&\-client_name \-compatibility_version \-current_version
  839. \&\-dead_strip
  840. \&\-dependency\-file \-dylib_file \-dylinker_install_name
  841. \&\-dynamic \-dynamiclib \-exported_symbols_list
  842. \&\-filelist \-flat_namespace \-force_cpusubtype_ALL
  843. \&\-force_flat_namespace \-headerpad_max_install_names
  844. \&\-iframework
  845. \&\-image_base \-init \-install_name \-keep_private_externs
  846. \&\-multi_module \-multiply_defined \-multiply_defined_unused
  847. \&\-noall_load \-no_dead_strip_inits_and_terms
  848. \&\-nofixprebinding \-nomultidefs \-noprebind \-noseglinkedit
  849. \&\-pagezero_size \-prebind \-prebind_all_twolevel_modules
  850. \&\-private_bundle \-read_only_relocs \-sectalign
  851. \&\-sectobjectsymbols \-whyload \-seg1addr
  852. \&\-sectcreate \-sectobjectsymbols \-sectorder
  853. \&\-segaddr \-segs_read_only_addr \-segs_read_write_addr
  854. \&\-seg_addr_table \-seg_addr_table_filename \-seglinkedit
  855. \&\-segprot \-segs_read_only_addr \-segs_read_write_addr
  856. \&\-single_module \-static \-sub_library \-sub_umbrella
  857. \&\-twolevel_namespace \-umbrella \-undefined
  858. \&\-unexported_symbols_list \-weak_reference_mismatches
  859. \&\-whatsloaded \-F \-gused \-gfull \-mmacosx\-version\-min=\fR\fIversion\fR
  860. \&\fB\-mkernel \-mone\-byte\-bool\fR
  861. .Sp
  862. \&\fI\s-1DEC\s0 Alpha Options\fR
  863. \&\fB\-mno\-fp\-regs \-msoft\-float
  864. \&\-mieee \-mieee\-with\-inexact \-mieee\-conformant
  865. \&\-mfp\-trap\-mode=\fR\fImode\fR \fB\-mfp\-rounding\-mode=\fR\fImode\fR
  866. \&\fB\-mtrap\-precision=\fR\fImode\fR \fB\-mbuild\-constants
  867. \&\-mcpu=\fR\fIcpu-type\fR \fB\-mtune=\fR\fIcpu-type\fR
  868. \&\fB\-mbwx \-mmax \-mfix \-mcix
  869. \&\-mfloat\-vax \-mfloat\-ieee
  870. \&\-mexplicit\-relocs \-msmall\-data \-mlarge\-data
  871. \&\-msmall\-text \-mlarge\-text
  872. \&\-mmemory\-latency=\fR\fItime\fR
  873. .Sp
  874. \&\fIeBPF Options\fR
  875. \&\fB\-mbig\-endian \-mlittle\-endian \-mkernel=\fR\fIversion\fR
  876. \&\fB\-mframe\-limit=\fR\fIbytes\fR \fB\-mxbpf\fR
  877. .Sp
  878. \&\fI\s-1FR30\s0 Options\fR
  879. \&\fB\-msmall\-model \-mno\-lsim\fR
  880. .Sp
  881. \&\fI\s-1FT32\s0 Options\fR
  882. \&\fB\-msim \-mlra \-mnodiv \-mft32b \-mcompress \-mnopm\fR
  883. .Sp
  884. \&\fI\s-1FRV\s0 Options\fR
  885. \&\fB\-mgpr\-32 \-mgpr\-64 \-mfpr\-32 \-mfpr\-64
  886. \&\-mhard\-float \-msoft\-float
  887. \&\-malloc\-cc \-mfixed\-cc \-mdword \-mno\-dword
  888. \&\-mdouble \-mno\-double
  889. \&\-mmedia \-mno\-media \-mmuladd \-mno\-muladd
  890. \&\-mfdpic \-minline\-plt \-mgprel\-ro \-multilib\-library\-pic
  891. \&\-mlinked\-fp \-mlong\-calls \-malign\-labels
  892. \&\-mlibrary\-pic \-macc\-4 \-macc\-8
  893. \&\-mpack \-mno\-pack \-mno\-eflags \-mcond\-move \-mno\-cond\-move
  894. \&\-moptimize\-membar \-mno\-optimize\-membar
  895. \&\-mscc \-mno\-scc \-mcond\-exec \-mno\-cond\-exec
  896. \&\-mvliw\-branch \-mno\-vliw\-branch
  897. \&\-mmulti\-cond\-exec \-mno\-multi\-cond\-exec \-mnested\-cond\-exec
  898. \&\-mno\-nested\-cond\-exec \-mtomcat\-stats
  899. \&\-mTLS \-mtls
  900. \&\-mcpu=\fR\fIcpu\fR
  901. .Sp
  902. \&\fIGNU/Linux Options\fR
  903. \&\fB\-mglibc \-muclibc \-mmusl \-mbionic \-mandroid
  904. \&\-tno\-android\-cc \-tno\-android\-ld\fR
  905. .Sp
  906. \&\fIH8/300 Options\fR
  907. \&\fB\-mrelax \-mh \-ms \-mn \-mexr \-mno\-exr \-mint32 \-malign\-300\fR
  908. .Sp
  909. \&\fI\s-1HPPA\s0 Options\fR
  910. \&\fB\-march=\fR\fIarchitecture-type\fR
  911. \&\fB\-mcaller\-copies \-mdisable\-fpregs \-mdisable\-indexing
  912. \&\-mfast\-indirect\-calls \-mgas \-mgnu\-ld \-mhp\-ld
  913. \&\-mfixed\-range=\fR\fIregister-range\fR
  914. \&\fB\-mjump\-in\-delay \-mlinker\-opt \-mlong\-calls
  915. \&\-mlong\-load\-store \-mno\-disable\-fpregs
  916. \&\-mno\-disable\-indexing \-mno\-fast\-indirect\-calls \-mno\-gas
  917. \&\-mno\-jump\-in\-delay \-mno\-long\-load\-store
  918. \&\-mno\-portable\-runtime \-mno\-soft\-float
  919. \&\-mno\-space\-regs \-msoft\-float \-mpa\-risc\-1\-0
  920. \&\-mpa\-risc\-1\-1 \-mpa\-risc\-2\-0 \-mportable\-runtime
  921. \&\-mschedule=\fR\fIcpu-type\fR \fB\-mspace\-regs \-msio \-mwsio
  922. \&\-munix=\fR\fIunix-std\fR \fB\-nolibdld \-static \-threads\fR
  923. .Sp
  924. \&\fI\s-1IA\-64\s0 Options\fR
  925. \&\fB\-mbig\-endian \-mlittle\-endian \-mgnu\-as \-mgnu\-ld \-mno\-pic
  926. \&\-mvolatile\-asm\-stop \-mregister\-names \-msdata \-mno\-sdata
  927. \&\-mconstant\-gp \-mauto\-pic \-mfused\-madd
  928. \&\-minline\-float\-divide\-min\-latency
  929. \&\-minline\-float\-divide\-max\-throughput
  930. \&\-mno\-inline\-float\-divide
  931. \&\-minline\-int\-divide\-min\-latency
  932. \&\-minline\-int\-divide\-max\-throughput
  933. \&\-mno\-inline\-int\-divide
  934. \&\-minline\-sqrt\-min\-latency \-minline\-sqrt\-max\-throughput
  935. \&\-mno\-inline\-sqrt
  936. \&\-mdwarf2\-asm \-mearly\-stop\-bits
  937. \&\-mfixed\-range=\fR\fIregister-range\fR \fB\-mtls\-size=\fR\fItls-size\fR
  938. \&\fB\-mtune=\fR\fIcpu-type\fR \fB\-milp32 \-mlp64
  939. \&\-msched\-br\-data\-spec \-msched\-ar\-data\-spec \-msched\-control\-spec
  940. \&\-msched\-br\-in\-data\-spec \-msched\-ar\-in\-data\-spec \-msched\-in\-control\-spec
  941. \&\-msched\-spec\-ldc \-msched\-spec\-control\-ldc
  942. \&\-msched\-prefer\-non\-data\-spec\-insns \-msched\-prefer\-non\-control\-spec\-insns
  943. \&\-msched\-stop\-bits\-after\-every\-cycle \-msched\-count\-spec\-in\-critical\-path
  944. \&\-msel\-sched\-dont\-check\-control\-spec \-msched\-fp\-mem\-deps\-zero\-cost
  945. \&\-msched\-max\-memory\-insns\-hard\-limit \-msched\-max\-memory\-insns=\fR\fImax-insns\fR
  946. .Sp
  947. \&\fI\s-1LM32\s0 Options\fR
  948. \&\fB\-mbarrel\-shift\-enabled \-mdivide\-enabled \-mmultiply\-enabled
  949. \&\-msign\-extend\-enabled \-muser\-enabled\fR
  950. .Sp
  951. \&\fIM32R/D Options\fR
  952. \&\fB\-m32r2 \-m32rx \-m32r
  953. \&\-mdebug
  954. \&\-malign\-loops \-mno\-align\-loops
  955. \&\-missue\-rate=\fR\fInumber\fR
  956. \&\fB\-mbranch\-cost=\fR\fInumber\fR
  957. \&\fB\-mmodel=\fR\fIcode-size-model-type\fR
  958. \&\fB\-msdata=\fR\fIsdata-type\fR
  959. \&\fB\-mno\-flush\-func \-mflush\-func=\fR\fIname\fR
  960. \&\fB\-mno\-flush\-trap \-mflush\-trap=\fR\fInumber\fR
  961. \&\fB\-G\fR \fInum\fR
  962. .Sp
  963. \&\fIM32C Options\fR
  964. \&\fB\-mcpu=\fR\fIcpu\fR \fB\-msim \-memregs=\fR\fInumber\fR
  965. .Sp
  966. \&\fIM680x0 Options\fR
  967. \&\fB\-march=\fR\fIarch\fR \fB\-mcpu=\fR\fIcpu\fR \fB\-mtune=\fR\fItune\fR
  968. \&\fB\-m68000 \-m68020 \-m68020\-40 \-m68020\-60 \-m68030 \-m68040
  969. \&\-m68060 \-mcpu32 \-m5200 \-m5206e \-m528x \-m5307 \-m5407
  970. \&\-mcfv4e \-mbitfield \-mno\-bitfield \-mc68000 \-mc68020
  971. \&\-mnobitfield \-mrtd \-mno\-rtd \-mdiv \-mno\-div \-mshort
  972. \&\-mno\-short \-mhard\-float \-m68881 \-msoft\-float \-mpcrel
  973. \&\-malign\-int \-mstrict\-align \-msep\-data \-mno\-sep\-data
  974. \&\-mshared\-library\-id=n \-mid\-shared\-library \-mno\-id\-shared\-library
  975. \&\-mxgot \-mno\-xgot \-mlong\-jump\-table\-offsets\fR
  976. .Sp
  977. \&\fIMCore Options\fR
  978. \&\fB\-mhardlit \-mno\-hardlit \-mdiv \-mno\-div \-mrelax\-immediates
  979. \&\-mno\-relax\-immediates \-mwide\-bitfields \-mno\-wide\-bitfields
  980. \&\-m4byte\-functions \-mno\-4byte\-functions \-mcallgraph\-data
  981. \&\-mno\-callgraph\-data \-mslow\-bytes \-mno\-slow\-bytes \-mno\-lsim
  982. \&\-mlittle\-endian \-mbig\-endian \-m210 \-m340 \-mstack\-increment\fR
  983. .Sp
  984. \&\fIMeP Options\fR
  985. \&\fB\-mabsdiff \-mall\-opts \-maverage \-mbased=\fR\fIn\fR \fB\-mbitops
  986. \&\-mc=\fR\fIn\fR \fB\-mclip \-mconfig=\fR\fIname\fR \fB\-mcop \-mcop32 \-mcop64 \-mivc2
  987. \&\-mdc \-mdiv \-meb \-mel \-mio\-volatile \-ml \-mleadz \-mm \-mminmax
  988. \&\-mmult \-mno\-opts \-mrepeat \-ms \-msatur \-msdram \-msim \-msimnovec \-mtf
  989. \&\-mtiny=\fR\fIn\fR
  990. .Sp
  991. \&\fIMicroBlaze Options\fR
  992. \&\fB\-msoft\-float \-mhard\-float \-msmall\-divides \-mcpu=\fR\fIcpu\fR
  993. \&\fB\-mmemcpy \-mxl\-soft\-mul \-mxl\-soft\-div \-mxl\-barrel\-shift
  994. \&\-mxl\-pattern\-compare \-mxl\-stack\-check \-mxl\-gp\-opt \-mno\-clearbss
  995. \&\-mxl\-multiply\-high \-mxl\-float\-convert \-mxl\-float\-sqrt
  996. \&\-mbig\-endian \-mlittle\-endian \-mxl\-reorder \-mxl\-mode\-\fR\fIapp-model\fR
  997. \&\fB\-mpic\-data\-is\-text\-relative\fR
  998. .Sp
  999. \&\fI\s-1MIPS\s0 Options\fR
  1000. \&\fB\-EL \-EB \-march=\fR\fIarch\fR \fB\-mtune=\fR\fIarch\fR
  1001. \&\fB\-mips1 \-mips2 \-mips3 \-mips4 \-mips32 \-mips32r2 \-mips32r3 \-mips32r5
  1002. \&\-mips32r6 \-mips64 \-mips64r2 \-mips64r3 \-mips64r5 \-mips64r6
  1003. \&\-mips16 \-mno\-mips16 \-mflip\-mips16
  1004. \&\-minterlink\-compressed \-mno\-interlink\-compressed
  1005. \&\-minterlink\-mips16 \-mno\-interlink\-mips16
  1006. \&\-mabi=\fR\fIabi\fR \fB\-mabicalls \-mno\-abicalls
  1007. \&\-mshared \-mno\-shared \-mplt \-mno\-plt \-mxgot \-mno\-xgot
  1008. \&\-mgp32 \-mgp64 \-mfp32 \-mfpxx \-mfp64 \-mhard\-float \-msoft\-float
  1009. \&\-mno\-float \-msingle\-float \-mdouble\-float
  1010. \&\-modd\-spreg \-mno\-odd\-spreg
  1011. \&\-mabs=\fR\fImode\fR \fB\-mnan=\fR\fIencoding\fR
  1012. \&\fB\-mdsp \-mno\-dsp \-mdspr2 \-mno\-dspr2
  1013. \&\-mmcu \-mmno\-mcu
  1014. \&\-meva \-mno\-eva
  1015. \&\-mvirt \-mno\-virt
  1016. \&\-mxpa \-mno\-xpa
  1017. \&\-mcrc \-mno\-crc
  1018. \&\-mginv \-mno\-ginv
  1019. \&\-mmicromips \-mno\-micromips
  1020. \&\-mmsa \-mno\-msa
  1021. \&\-mloongson\-mmi \-mno\-loongson\-mmi
  1022. \&\-mloongson\-ext \-mno\-loongson\-ext
  1023. \&\-mloongson\-ext2 \-mno\-loongson\-ext2
  1024. \&\-mfpu=\fR\fIfpu-type\fR
  1025. \&\fB\-msmartmips \-mno\-smartmips
  1026. \&\-mpaired\-single \-mno\-paired\-single \-mdmx \-mno\-mdmx
  1027. \&\-mips3d \-mno\-mips3d \-mmt \-mno\-mt \-mllsc \-mno\-llsc
  1028. \&\-mlong64 \-mlong32 \-msym32 \-mno\-sym32
  1029. \&\-G\fR\fInum\fR \fB\-mlocal\-sdata \-mno\-local\-sdata
  1030. \&\-mextern\-sdata \-mno\-extern\-sdata \-mgpopt \-mno\-gopt
  1031. \&\-membedded\-data \-mno\-embedded\-data
  1032. \&\-muninit\-const\-in\-rodata \-mno\-uninit\-const\-in\-rodata
  1033. \&\-mcode\-readable=\fR\fIsetting\fR
  1034. \&\fB\-msplit\-addresses \-mno\-split\-addresses
  1035. \&\-mexplicit\-relocs \-mno\-explicit\-relocs
  1036. \&\-mcheck\-zero\-division \-mno\-check\-zero\-division
  1037. \&\-mdivide\-traps \-mdivide\-breaks
  1038. \&\-mload\-store\-pairs \-mno\-load\-store\-pairs
  1039. \&\-mmemcpy \-mno\-memcpy \-mlong\-calls \-mno\-long\-calls
  1040. \&\-mmad \-mno\-mad \-mimadd \-mno\-imadd \-mfused\-madd \-mno\-fused\-madd \-nocpp
  1041. \&\-mfix\-24k \-mno\-fix\-24k
  1042. \&\-mfix\-r4000 \-mno\-fix\-r4000 \-mfix\-r4400 \-mno\-fix\-r4400
  1043. \&\-mfix\-r5900 \-mno\-fix\-r5900
  1044. \&\-mfix\-r10000 \-mno\-fix\-r10000 \-mfix\-rm7000 \-mno\-fix\-rm7000
  1045. \&\-mfix\-vr4120 \-mno\-fix\-vr4120
  1046. \&\-mfix\-vr4130 \-mno\-fix\-vr4130 \-mfix\-sb1 \-mno\-fix\-sb1
  1047. \&\-mflush\-func=\fR\fIfunc\fR \fB\-mno\-flush\-func
  1048. \&\-mbranch\-cost=\fR\fInum\fR \fB\-mbranch\-likely \-mno\-branch\-likely
  1049. \&\-mcompact\-branches=\fR\fIpolicy\fR
  1050. \&\fB\-mfp\-exceptions \-mno\-fp\-exceptions
  1051. \&\-mvr4130\-align \-mno\-vr4130\-align \-msynci \-mno\-synci
  1052. \&\-mlxc1\-sxc1 \-mno\-lxc1\-sxc1 \-mmadd4 \-mno\-madd4
  1053. \&\-mrelax\-pic\-calls \-mno\-relax\-pic\-calls \-mmcount\-ra\-address
  1054. \&\-mframe\-header\-opt \-mno\-frame\-header\-opt\fR
  1055. .Sp
  1056. \&\fI\s-1MMIX\s0 Options\fR
  1057. \&\fB\-mlibfuncs \-mno\-libfuncs \-mepsilon \-mno\-epsilon \-mabi=gnu
  1058. \&\-mabi=mmixware \-mzero\-extend \-mknuthdiv \-mtoplevel\-symbols
  1059. \&\-melf \-mbranch\-predict \-mno\-branch\-predict \-mbase\-addresses
  1060. \&\-mno\-base\-addresses \-msingle\-exit \-mno\-single\-exit\fR
  1061. .Sp
  1062. \&\fI\s-1MN10300\s0 Options\fR
  1063. \&\fB\-mmult\-bug \-mno\-mult\-bug
  1064. \&\-mno\-am33 \-mam33 \-mam33\-2 \-mam34
  1065. \&\-mtune=\fR\fIcpu-type\fR
  1066. \&\fB\-mreturn\-pointer\-on\-d0
  1067. \&\-mno\-crt0 \-mrelax \-mliw \-msetlb\fR
  1068. .Sp
  1069. \&\fIMoxie Options\fR
  1070. \&\fB\-meb \-mel \-mmul.x \-mno\-crt0\fR
  1071. .Sp
  1072. \&\fI\s-1MSP430\s0 Options\fR
  1073. \&\fB\-msim \-masm\-hex \-mmcu= \-mcpu= \-mlarge \-msmall \-mrelax
  1074. \&\-mwarn\-mcu
  1075. \&\-mcode\-region= \-mdata\-region=
  1076. \&\-msilicon\-errata= \-msilicon\-errata\-warn=
  1077. \&\-mhwmult= \-minrt \-mtiny\-printf\fR
  1078. .Sp
  1079. \&\fI\s-1NDS32\s0 Options\fR
  1080. \&\fB\-mbig\-endian \-mlittle\-endian
  1081. \&\-mreduced\-regs \-mfull\-regs
  1082. \&\-mcmov \-mno\-cmov
  1083. \&\-mext\-perf \-mno\-ext\-perf
  1084. \&\-mext\-perf2 \-mno\-ext\-perf2
  1085. \&\-mext\-string \-mno\-ext\-string
  1086. \&\-mv3push \-mno\-v3push
  1087. \&\-m16bit \-mno\-16bit
  1088. \&\-misr\-vector\-size=\fR\fInum\fR
  1089. \&\fB\-mcache\-block\-size=\fR\fInum\fR
  1090. \&\fB\-march=\fR\fIarch\fR
  1091. \&\fB\-mcmodel=\fR\fIcode-model\fR
  1092. \&\fB\-mctor\-dtor \-mrelax\fR
  1093. .Sp
  1094. \&\fINios \s-1II\s0 Options\fR
  1095. \&\fB\-G\fR \fInum\fR \fB\-mgpopt=\fR\fIoption\fR \fB\-mgpopt \-mno\-gpopt
  1096. \&\-mgprel\-sec=\fR\fIregexp\fR \fB\-mr0rel\-sec=\fR\fIregexp\fR
  1097. \&\fB\-mel \-meb
  1098. \&\-mno\-bypass\-cache \-mbypass\-cache
  1099. \&\-mno\-cache\-volatile \-mcache\-volatile
  1100. \&\-mno\-fast\-sw\-div \-mfast\-sw\-div
  1101. \&\-mhw\-mul \-mno\-hw\-mul \-mhw\-mulx \-mno\-hw\-mulx \-mno\-hw\-div \-mhw\-div
  1102. \&\-mcustom\-\fR\fIinsn\fR\fB=\fR\fIN\fR \fB\-mno\-custom\-\fR\fIinsn\fR
  1103. \&\fB\-mcustom\-fpu\-cfg=\fR\fIname\fR
  1104. \&\fB\-mhal \-msmallc \-msys\-crt0=\fR\fIname\fR \fB\-msys\-lib=\fR\fIname\fR
  1105. \&\fB\-march=\fR\fIarch\fR \fB\-mbmx \-mno\-bmx \-mcdx \-mno\-cdx\fR
  1106. .Sp
  1107. \&\fINvidia \s-1PTX\s0 Options\fR
  1108. \&\fB\-m32 \-m64 \-mmainkernel \-moptimize\fR
  1109. .Sp
  1110. \&\fIOpenRISC Options\fR
  1111. \&\fB\-mboard=\fR\fIname\fR \fB\-mnewlib \-mhard\-mul \-mhard\-div
  1112. \&\-msoft\-mul \-msoft\-div
  1113. \&\-msoft\-float \-mhard\-float \-mdouble\-float \-munordered\-float
  1114. \&\-mcmov \-mror \-mrori \-msext \-msfimm \-mshftimm\fR
  1115. .Sp
  1116. \&\fI\s-1PDP\-11\s0 Options\fR
  1117. \&\fB\-mfpu \-msoft\-float \-mac0 \-mno\-ac0 \-m40 \-m45 \-m10
  1118. \&\-mint32 \-mno\-int16 \-mint16 \-mno\-int32
  1119. \&\-msplit \-munix\-asm \-mdec\-asm \-mgnu\-asm \-mlra\fR
  1120. .Sp
  1121. \&\fIpicoChip Options\fR
  1122. \&\fB\-mae=\fR\fIae_type\fR \fB\-mvliw\-lookahead=\fR\fIN\fR
  1123. \&\fB\-msymbol\-as\-address \-mno\-inefficient\-warnings\fR
  1124. .Sp
  1125. \&\fIPowerPC Options\fR
  1126. See \s-1RS/6000\s0 and PowerPC Options.
  1127. .Sp
  1128. \&\fI\s-1PRU\s0 Options\fR
  1129. \&\fB\-mmcu=\fR\fImcu\fR \fB\-minrt \-mno\-relax \-mloop
  1130. \&\-mabi=\fR\fIvariant\fR\fB \fR
  1131. .Sp
  1132. \&\fIRISC-V Options\fR
  1133. \&\fB\-mbranch\-cost=\fR\fIN\-instruction\fR
  1134. \&\fB\-mplt \-mno\-plt
  1135. \&\-mabi=\fR\fIABI-string\fR
  1136. \&\fB\-mfdiv \-mno\-fdiv
  1137. \&\-mdiv \-mno\-div
  1138. \&\-march=\fR\fIISA-string\fR
  1139. \&\fB\-mtune=\fR\fIprocessor-string\fR
  1140. \&\fB\-mpreferred\-stack\-boundary=\fR\fInum\fR
  1141. \&\fB\-msmall\-data\-limit=\fR\fIN\-bytes\fR
  1142. \&\fB\-msave\-restore \-mno\-save\-restore
  1143. \&\-mstrict\-align \-mno\-strict\-align
  1144. \&\-mcmodel=medlow \-mcmodel=medany
  1145. \&\-mexplicit\-relocs \-mno\-explicit\-relocs
  1146. \&\-mrelax \-mno\-relax
  1147. \&\-mriscv\-attribute \-mmo\-riscv\-attribute
  1148. \&\-malign\-data=\fR\fItype\fR
  1149. .Sp
  1150. \&\fI\s-1RL78\s0 Options\fR
  1151. \&\fB\-msim \-mmul=none \-mmul=g13 \-mmul=g14 \-mallregs
  1152. \&\-mcpu=g10 \-mcpu=g13 \-mcpu=g14 \-mg10 \-mg13 \-mg14
  1153. \&\-m64bit\-doubles \-m32bit\-doubles \-msave\-mduc\-in\-interrupts\fR
  1154. .Sp
  1155. \&\fI\s-1RS/6000\s0 and PowerPC Options\fR
  1156. \&\fB\-mcpu=\fR\fIcpu-type\fR
  1157. \&\fB\-mtune=\fR\fIcpu-type\fR
  1158. \&\fB\-mcmodel=\fR\fIcode-model\fR
  1159. \&\fB\-mpowerpc64
  1160. \&\-maltivec \-mno\-altivec
  1161. \&\-mpowerpc\-gpopt \-mno\-powerpc\-gpopt
  1162. \&\-mpowerpc\-gfxopt \-mno\-powerpc\-gfxopt
  1163. \&\-mmfcrf \-mno\-mfcrf \-mpopcntb \-mno\-popcntb \-mpopcntd \-mno\-popcntd
  1164. \&\-mfprnd \-mno\-fprnd
  1165. \&\-mcmpb \-mno\-cmpb \-mhard\-dfp \-mno\-hard\-dfp
  1166. \&\-mfull\-toc \-mminimal\-toc \-mno\-fp\-in\-toc \-mno\-sum\-in\-toc
  1167. \&\-m64 \-m32 \-mxl\-compat \-mno\-xl\-compat \-mpe
  1168. \&\-malign\-power \-malign\-natural
  1169. \&\-msoft\-float \-mhard\-float \-mmultiple \-mno\-multiple
  1170. \&\-mupdate \-mno\-update
  1171. \&\-mavoid\-indexed\-addresses \-mno\-avoid\-indexed\-addresses
  1172. \&\-mfused\-madd \-mno\-fused\-madd \-mbit\-align \-mno\-bit\-align
  1173. \&\-mstrict\-align \-mno\-strict\-align \-mrelocatable
  1174. \&\-mno\-relocatable \-mrelocatable\-lib \-mno\-relocatable\-lib
  1175. \&\-mtoc \-mno\-toc \-mlittle \-mlittle\-endian \-mbig \-mbig\-endian
  1176. \&\-mdynamic\-no\-pic \-mswdiv \-msingle\-pic\-base
  1177. \&\-mprioritize\-restricted\-insns=\fR\fIpriority\fR
  1178. \&\fB\-msched\-costly\-dep=\fR\fIdependence_type\fR
  1179. \&\fB\-minsert\-sched\-nops=\fR\fIscheme\fR
  1180. \&\fB\-mcall\-aixdesc \-mcall\-eabi \-mcall\-freebsd
  1181. \&\-mcall\-linux \-mcall\-netbsd \-mcall\-openbsd
  1182. \&\-mcall\-sysv \-mcall\-sysv\-eabi \-mcall\-sysv\-noeabi
  1183. \&\-mtraceback=\fR\fItraceback_type\fR
  1184. \&\fB\-maix\-struct\-return \-msvr4\-struct\-return
  1185. \&\-mabi=\fR\fIabi-type\fR \fB\-msecure\-plt \-mbss\-plt
  1186. \&\-mlongcall \-mno\-longcall \-mpltseq \-mno\-pltseq
  1187. \&\-mblock\-move\-inline\-limit=\fR\fInum\fR
  1188. \&\fB\-mblock\-compare\-inline\-limit=\fR\fInum\fR
  1189. \&\fB\-mblock\-compare\-inline\-loop\-limit=\fR\fInum\fR
  1190. \&\fB\-mstring\-compare\-inline\-limit=\fR\fInum\fR
  1191. \&\fB\-misel \-mno\-isel
  1192. \&\-mvrsave \-mno\-vrsave
  1193. \&\-mmulhw \-mno\-mulhw
  1194. \&\-mdlmzb \-mno\-dlmzb
  1195. \&\-mprototype \-mno\-prototype
  1196. \&\-msim \-mmvme \-mads \-myellowknife \-memb \-msdata
  1197. \&\-msdata=\fR\fIopt\fR \fB\-mreadonly\-in\-sdata \-mvxworks \-G\fR \fInum\fR
  1198. \&\fB\-mrecip \-mrecip=\fR\fIopt\fR \fB\-mno\-recip \-mrecip\-precision
  1199. \&\-mno\-recip\-precision
  1200. \&\-mveclibabi=\fR\fItype\fR \fB\-mfriz \-mno\-friz
  1201. \&\-mpointers\-to\-nested\-functions \-mno\-pointers\-to\-nested\-functions
  1202. \&\-msave\-toc\-indirect \-mno\-save\-toc\-indirect
  1203. \&\-mpower8\-fusion \-mno\-mpower8\-fusion \-mpower8\-vector \-mno\-power8\-vector
  1204. \&\-mcrypto \-mno\-crypto \-mhtm \-mno\-htm
  1205. \&\-mquad\-memory \-mno\-quad\-memory
  1206. \&\-mquad\-memory\-atomic \-mno\-quad\-memory\-atomic
  1207. \&\-mcompat\-align\-parm \-mno\-compat\-align\-parm
  1208. \&\-mfloat128 \-mno\-float128 \-mfloat128\-hardware \-mno\-float128\-hardware
  1209. \&\-mgnu\-attribute \-mno\-gnu\-attribute
  1210. \&\-mstack\-protector\-guard=\fR\fIguard\fR \fB\-mstack\-protector\-guard\-reg=\fR\fIreg\fR
  1211. \&\fB\-mstack\-protector\-guard\-offset=\fR\fIoffset\fR \fB\-mprefixed \-mno\-prefixed
  1212. \&\-mpcrel \-mno\-pcrel \-mmma \-mno\-mmma\fR
  1213. .Sp
  1214. \&\fI\s-1RX\s0 Options\fR
  1215. \&\fB\-m64bit\-doubles \-m32bit\-doubles \-fpu \-nofpu
  1216. \&\-mcpu=
  1217. \&\-mbig\-endian\-data \-mlittle\-endian\-data
  1218. \&\-msmall\-data
  1219. \&\-msim \-mno\-sim
  1220. \&\-mas100\-syntax \-mno\-as100\-syntax
  1221. \&\-mrelax
  1222. \&\-mmax\-constant\-size=
  1223. \&\-mint\-register=
  1224. \&\-mpid
  1225. \&\-mallow\-string\-insns \-mno\-allow\-string\-insns
  1226. \&\-mjsr
  1227. \&\-mno\-warn\-multiple\-fast\-interrupts
  1228. \&\-msave\-acc\-in\-interrupts\fR
  1229. .Sp
  1230. \&\fIS/390 and zSeries Options\fR
  1231. \&\fB\-mtune=\fR\fIcpu-type\fR \fB\-march=\fR\fIcpu-type\fR
  1232. \&\fB\-mhard\-float \-msoft\-float \-mhard\-dfp \-mno\-hard\-dfp
  1233. \&\-mlong\-double\-64 \-mlong\-double\-128
  1234. \&\-mbackchain \-mno\-backchain \-mpacked\-stack \-mno\-packed\-stack
  1235. \&\-msmall\-exec \-mno\-small\-exec \-mmvcle \-mno\-mvcle
  1236. \&\-m64 \-m31 \-mdebug \-mno\-debug \-mesa \-mzarch
  1237. \&\-mhtm \-mvx \-mzvector
  1238. \&\-mtpf\-trace \-mno\-tpf\-trace \-mtpf\-trace\-skip \-mno\-tpf\-trace\-skip
  1239. \&\-mfused\-madd \-mno\-fused\-madd
  1240. \&\-mwarn\-framesize \-mwarn\-dynamicstack \-mstack\-size \-mstack\-guard
  1241. \&\-mhotpatch=\fR\fIhalfwords\fR\fB,\fR\fIhalfwords\fR
  1242. .Sp
  1243. \&\fIScore Options\fR
  1244. \&\fB\-meb \-mel
  1245. \&\-mnhwloop
  1246. \&\-muls
  1247. \&\-mmac
  1248. \&\-mscore5 \-mscore5u \-mscore7 \-mscore7d\fR
  1249. .Sp
  1250. \&\fI\s-1SH\s0 Options\fR
  1251. \&\fB\-m1 \-m2 \-m2e
  1252. \&\-m2a\-nofpu \-m2a\-single\-only \-m2a\-single \-m2a
  1253. \&\-m3 \-m3e
  1254. \&\-m4\-nofpu \-m4\-single\-only \-m4\-single \-m4
  1255. \&\-m4a\-nofpu \-m4a\-single\-only \-m4a\-single \-m4a \-m4al
  1256. \&\-mb \-ml \-mdalign \-mrelax
  1257. \&\-mbigtable \-mfmovd \-mrenesas \-mno\-renesas \-mnomacsave
  1258. \&\-mieee \-mno\-ieee \-mbitops \-misize \-minline\-ic_invalidate \-mpadstruct
  1259. \&\-mprefergot \-musermode \-multcost=\fR\fInumber\fR \fB\-mdiv=\fR\fIstrategy\fR
  1260. \&\fB\-mdivsi3_libfunc=\fR\fIname\fR \fB\-mfixed\-range=\fR\fIregister-range\fR
  1261. \&\fB\-maccumulate\-outgoing\-args
  1262. \&\-matomic\-model=\fR\fIatomic-model\fR
  1263. \&\fB\-mbranch\-cost=\fR\fInum\fR \fB\-mzdcbranch \-mno\-zdcbranch
  1264. \&\-mcbranch\-force\-delay\-slot
  1265. \&\-mfused\-madd \-mno\-fused\-madd \-mfsca \-mno\-fsca \-mfsrra \-mno\-fsrra
  1266. \&\-mpretend\-cmove \-mtas\fR
  1267. .Sp
  1268. \&\fISolaris 2 Options\fR
  1269. \&\fB\-mclear\-hwcap \-mno\-clear\-hwcap \-mimpure\-text \-mno\-impure\-text
  1270. \&\-pthreads\fR
  1271. .Sp
  1272. \&\fI\s-1SPARC\s0 Options\fR
  1273. \&\fB\-mcpu=\fR\fIcpu-type\fR
  1274. \&\fB\-mtune=\fR\fIcpu-type\fR
  1275. \&\fB\-mcmodel=\fR\fIcode-model\fR
  1276. \&\fB\-mmemory\-model=\fR\fImem-model\fR
  1277. \&\fB\-m32 \-m64 \-mapp\-regs \-mno\-app\-regs
  1278. \&\-mfaster\-structs \-mno\-faster\-structs \-mflat \-mno\-flat
  1279. \&\-mfpu \-mno\-fpu \-mhard\-float \-msoft\-float
  1280. \&\-mhard\-quad\-float \-msoft\-quad\-float
  1281. \&\-mstack\-bias \-mno\-stack\-bias
  1282. \&\-mstd\-struct\-return \-mno\-std\-struct\-return
  1283. \&\-munaligned\-doubles \-mno\-unaligned\-doubles
  1284. \&\-muser\-mode \-mno\-user\-mode
  1285. \&\-mv8plus \-mno\-v8plus \-mvis \-mno\-vis
  1286. \&\-mvis2 \-mno\-vis2 \-mvis3 \-mno\-vis3
  1287. \&\-mvis4 \-mno\-vis4 \-mvis4b \-mno\-vis4b
  1288. \&\-mcbcond \-mno\-cbcond \-mfmaf \-mno\-fmaf \-mfsmuld \-mno\-fsmuld
  1289. \&\-mpopc \-mno\-popc \-msubxc \-mno\-subxc
  1290. \&\-mfix\-at697f \-mfix\-ut699 \-mfix\-ut700 \-mfix\-gr712rc
  1291. \&\-mlra \-mno\-lra\fR
  1292. .Sp
  1293. \&\fISystem V Options\fR
  1294. \&\fB\-Qy \-Qn \-YP,\fR\fIpaths\fR \fB\-Ym,\fR\fIdir\fR
  1295. .Sp
  1296. \&\fITILE-Gx Options\fR
  1297. \&\fB\-mcpu=CPU \-m32 \-m64 \-mbig\-endian \-mlittle\-endian
  1298. \&\-mcmodel=\fR\fIcode-model\fR
  1299. .Sp
  1300. \&\fITILEPro Options\fR
  1301. \&\fB\-mcpu=\fR\fIcpu\fR \fB\-m32\fR
  1302. .Sp
  1303. \&\fIV850 Options\fR
  1304. \&\fB\-mlong\-calls \-mno\-long\-calls \-mep \-mno\-ep
  1305. \&\-mprolog\-function \-mno\-prolog\-function \-mspace
  1306. \&\-mtda=\fR\fIn\fR \fB\-msda=\fR\fIn\fR \fB\-mzda=\fR\fIn\fR
  1307. \&\fB\-mapp\-regs \-mno\-app\-regs
  1308. \&\-mdisable\-callt \-mno\-disable\-callt
  1309. \&\-mv850e2v3 \-mv850e2 \-mv850e1 \-mv850es
  1310. \&\-mv850e \-mv850 \-mv850e3v5
  1311. \&\-mloop
  1312. \&\-mrelax
  1313. \&\-mlong\-jumps
  1314. \&\-msoft\-float
  1315. \&\-mhard\-float
  1316. \&\-mgcc\-abi
  1317. \&\-mrh850\-abi
  1318. \&\-mbig\-switch\fR
  1319. .Sp
  1320. \&\fI\s-1VAX\s0 Options\fR
  1321. \&\fB\-mg \-mgnu \-munix\fR
  1322. .Sp
  1323. \&\fIVisium Options\fR
  1324. \&\fB\-mdebug \-msim \-mfpu \-mno\-fpu \-mhard\-float \-msoft\-float
  1325. \&\-mcpu=\fR\fIcpu-type\fR \fB\-mtune=\fR\fIcpu-type\fR \fB\-msv\-mode \-muser\-mode\fR
  1326. .Sp
  1327. \&\fI\s-1VMS\s0 Options\fR
  1328. \&\fB\-mvms\-return\-codes \-mdebug\-main=\fR\fIprefix\fR \fB\-mmalloc64
  1329. \&\-mpointer\-size=\fR\fIsize\fR
  1330. .Sp
  1331. \&\fIVxWorks Options\fR
  1332. \&\fB\-mrtp \-non\-static \-Bstatic \-Bdynamic
  1333. \&\-Xbind\-lazy \-Xbind\-now\fR
  1334. .Sp
  1335. \&\fIx86 Options\fR
  1336. \&\fB\-mtune=\fR\fIcpu-type\fR \fB\-march=\fR\fIcpu-type\fR
  1337. \&\fB\-mtune\-ctrl=\fR\fIfeature-list\fR \fB\-mdump\-tune\-features \-mno\-default
  1338. \&\-mfpmath=\fR\fIunit\fR
  1339. \&\fB\-masm=\fR\fIdialect\fR \fB\-mno\-fancy\-math\-387
  1340. \&\-mno\-fp\-ret\-in\-387 \-m80387 \-mhard\-float \-msoft\-float
  1341. \&\-mno\-wide\-multiply \-mrtd \-malign\-double
  1342. \&\-mpreferred\-stack\-boundary=\fR\fInum\fR
  1343. \&\fB\-mincoming\-stack\-boundary=\fR\fInum\fR
  1344. \&\fB\-mcld \-mcx16 \-msahf \-mmovbe \-mcrc32
  1345. \&\-mrecip \-mrecip=\fR\fIopt\fR
  1346. \&\fB\-mvzeroupper \-mprefer\-avx128 \-mprefer\-vector\-width=\fR\fIopt\fR
  1347. \&\fB\-mmmx \-msse \-msse2 \-msse3 \-mssse3 \-msse4.1 \-msse4.2 \-msse4 \-mavx
  1348. \&\-mavx2 \-mavx512f \-mavx512pf \-mavx512er \-mavx512cd \-mavx512vl
  1349. \&\-mavx512bw \-mavx512dq \-mavx512ifma \-mavx512vbmi \-msha \-maes
  1350. \&\-mpclmul \-mfsgsbase \-mrdrnd \-mf16c \-mfma \-mpconfig \-mwbnoinvd
  1351. \&\-mptwrite \-mprefetchwt1 \-mclflushopt \-mclwb \-mxsavec \-mxsaves
  1352. \&\-msse4a \-m3dnow \-m3dnowa \-mpopcnt \-mabm \-mbmi \-mtbm \-mfma4 \-mxop
  1353. \&\-madx \-mlzcnt \-mbmi2 \-mfxsr \-mxsave \-mxsaveopt \-mrtm \-mhle \-mlwp
  1354. \&\-mmwaitx \-mclzero \-mpku \-mthreads \-mgfni \-mvaes \-mwaitpkg
  1355. \&\-mshstk \-mmanual\-endbr \-mforce\-indirect\-call \-mavx512vbmi2 \-mavx512bf16 \-menqcmd
  1356. \&\-mvpclmulqdq \-mavx512bitalg \-mmovdiri \-mmovdir64b \-mavx512vpopcntdq
  1357. \&\-mavx5124fmaps \-mavx512vnni \-mavx5124vnniw \-mprfchw \-mrdpid
  1358. \&\-mrdseed \-msgx \-mavx512vp2intersect
  1359. \&\-mcldemote \-mms\-bitfields \-mno\-align\-stringops \-minline\-all\-stringops
  1360. \&\-minline\-stringops\-dynamically \-mstringop\-strategy=\fR\fIalg\fR
  1361. \&\fB\-mmemcpy\-strategy=\fR\fIstrategy\fR \fB\-mmemset\-strategy=\fR\fIstrategy\fR
  1362. \&\fB\-mpush\-args \-maccumulate\-outgoing\-args \-m128bit\-long\-double
  1363. \&\-m96bit\-long\-double \-mlong\-double\-64 \-mlong\-double\-80 \-mlong\-double\-128
  1364. \&\-mregparm=\fR\fInum\fR \fB\-msseregparm
  1365. \&\-mveclibabi=\fR\fItype\fR \fB\-mvect8\-ret\-in\-mem
  1366. \&\-mpc32 \-mpc64 \-mpc80 \-mstackrealign
  1367. \&\-momit\-leaf\-frame\-pointer \-mno\-red\-zone \-mno\-tls\-direct\-seg\-refs
  1368. \&\-mcmodel=\fR\fIcode-model\fR \fB\-mabi=\fR\fIname\fR \fB\-maddress\-mode=\fR\fImode\fR
  1369. \&\fB\-m32 \-m64 \-mx32 \-m16 \-miamcu \-mlarge\-data\-threshold=\fR\fInum\fR
  1370. \&\fB\-msse2avx \-mfentry \-mrecord\-mcount \-mnop\-mcount \-m8bit\-idiv
  1371. \&\-minstrument\-return=\fR\fItype\fR \fB\-mfentry\-name=\fR\fIname\fR \fB\-mfentry\-section=\fR\fIname\fR
  1372. \&\fB\-mavx256\-split\-unaligned\-load \-mavx256\-split\-unaligned\-store
  1373. \&\-malign\-data=\fR\fItype\fR \fB\-mstack\-protector\-guard=\fR\fIguard\fR
  1374. \&\fB\-mstack\-protector\-guard\-reg=\fR\fIreg\fR
  1375. \&\fB\-mstack\-protector\-guard\-offset=\fR\fIoffset\fR
  1376. \&\fB\-mstack\-protector\-guard\-symbol=\fR\fIsymbol\fR
  1377. \&\fB\-mgeneral\-regs\-only \-mcall\-ms2sysv\-xlogues
  1378. \&\-mindirect\-branch=\fR\fIchoice\fR \fB\-mfunction\-return=\fR\fIchoice\fR
  1379. \&\fB\-mindirect\-branch\-register\fR
  1380. .Sp
  1381. \&\fIx86 Windows Options\fR
  1382. \&\fB\-mconsole \-mcygwin \-mno\-cygwin \-mdll
  1383. \&\-mnop\-fun\-dllimport \-mthread
  1384. \&\-municode \-mwin32 \-mwindows \-fno\-set\-stack\-executable\fR
  1385. .Sp
  1386. \&\fIXstormy16 Options\fR
  1387. \&\fB\-msim\fR
  1388. .Sp
  1389. \&\fIXtensa Options\fR
  1390. \&\fB\-mconst16 \-mno\-const16
  1391. \&\-mfused\-madd \-mno\-fused\-madd
  1392. \&\-mforce\-no\-pic
  1393. \&\-mserialize\-volatile \-mno\-serialize\-volatile
  1394. \&\-mtext\-section\-literals \-mno\-text\-section\-literals
  1395. \&\-mauto\-litpools \-mno\-auto\-litpools
  1396. \&\-mtarget\-align \-mno\-target\-align
  1397. \&\-mlongcalls \-mno\-longcalls\fR
  1398. .Sp
  1399. \&\fIzSeries Options\fR
  1400. See S/390 and zSeries Options.
  1401. .SS "Options Controlling the Kind of Output"
  1402. .IX Subsection "Options Controlling the Kind of Output"
  1403. Compilation can involve up to four stages: preprocessing, compilation
  1404. proper, assembly and linking, always in that order. \s-1GCC\s0 is capable of
  1405. preprocessing and compiling several files either into several
  1406. assembler input files, or into one assembler input file; then each
  1407. assembler input file produces an object file, and linking combines all
  1408. the object files (those newly compiled, and those specified as input)
  1409. into an executable file.
  1410. .PP
  1411. For any given input file, the file name suffix determines what kind of
  1412. compilation is done:
  1413. .IP "\fIfile\fR\fB.c\fR" 4
  1414. .IX Item "file.c"
  1415. C source code that must be preprocessed.
  1416. .IP "\fIfile\fR\fB.i\fR" 4
  1417. .IX Item "file.i"
  1418. C source code that should not be preprocessed.
  1419. .IP "\fIfile\fR\fB.ii\fR" 4
  1420. .IX Item "file.ii"
  1421. \&\*(C+ source code that should not be preprocessed.
  1422. .IP "\fIfile\fR\fB.m\fR" 4
  1423. .IX Item "file.m"
  1424. Objective-C source code. Note that you must link with the \fIlibobjc\fR
  1425. library to make an Objective-C program work.
  1426. .IP "\fIfile\fR\fB.mi\fR" 4
  1427. .IX Item "file.mi"
  1428. Objective-C source code that should not be preprocessed.
  1429. .IP "\fIfile\fR\fB.mm\fR" 4
  1430. .IX Item "file.mm"
  1431. .PD 0
  1432. .IP "\fIfile\fR\fB.M\fR" 4
  1433. .IX Item "file.M"
  1434. .PD
  1435. Objective\-\*(C+ source code. Note that you must link with the \fIlibobjc\fR
  1436. library to make an Objective\-\*(C+ program work. Note that \fB.M\fR refers
  1437. to a literal capital M.
  1438. .IP "\fIfile\fR\fB.mii\fR" 4
  1439. .IX Item "file.mii"
  1440. Objective\-\*(C+ source code that should not be preprocessed.
  1441. .IP "\fIfile\fR\fB.h\fR" 4
  1442. .IX Item "file.h"
  1443. C, \*(C+, Objective-C or Objective\-\*(C+ header file to be turned into a
  1444. precompiled header (default), or C, \*(C+ header file to be turned into an
  1445. Ada spec (via the \fB\-fdump\-ada\-spec\fR switch).
  1446. .IP "\fIfile\fR\fB.cc\fR" 4
  1447. .IX Item "file.cc"
  1448. .PD 0
  1449. .IP "\fIfile\fR\fB.cp\fR" 4
  1450. .IX Item "file.cp"
  1451. .IP "\fIfile\fR\fB.cxx\fR" 4
  1452. .IX Item "file.cxx"
  1453. .IP "\fIfile\fR\fB.cpp\fR" 4
  1454. .IX Item "file.cpp"
  1455. .IP "\fIfile\fR\fB.CPP\fR" 4
  1456. .IX Item "file.CPP"
  1457. .IP "\fIfile\fR\fB.c++\fR" 4
  1458. .IX Item "file.c++"
  1459. .IP "\fIfile\fR\fB.C\fR" 4
  1460. .IX Item "file.C"
  1461. .PD
  1462. \&\*(C+ source code that must be preprocessed. Note that in \fB.cxx\fR,
  1463. the last two letters must both be literally \fBx\fR. Likewise,
  1464. \&\fB.C\fR refers to a literal capital C.
  1465. .IP "\fIfile\fR\fB.mm\fR" 4
  1466. .IX Item "file.mm"
  1467. .PD 0
  1468. .IP "\fIfile\fR\fB.M\fR" 4
  1469. .IX Item "file.M"
  1470. .PD
  1471. Objective\-\*(C+ source code that must be preprocessed.
  1472. .IP "\fIfile\fR\fB.mii\fR" 4
  1473. .IX Item "file.mii"
  1474. Objective\-\*(C+ source code that should not be preprocessed.
  1475. .IP "\fIfile\fR\fB.hh\fR" 4
  1476. .IX Item "file.hh"
  1477. .PD 0
  1478. .IP "\fIfile\fR\fB.H\fR" 4
  1479. .IX Item "file.H"
  1480. .IP "\fIfile\fR\fB.hp\fR" 4
  1481. .IX Item "file.hp"
  1482. .IP "\fIfile\fR\fB.hxx\fR" 4
  1483. .IX Item "file.hxx"
  1484. .IP "\fIfile\fR\fB.hpp\fR" 4
  1485. .IX Item "file.hpp"
  1486. .IP "\fIfile\fR\fB.HPP\fR" 4
  1487. .IX Item "file.HPP"
  1488. .IP "\fIfile\fR\fB.h++\fR" 4
  1489. .IX Item "file.h++"
  1490. .IP "\fIfile\fR\fB.tcc\fR" 4
  1491. .IX Item "file.tcc"
  1492. .PD
  1493. \&\*(C+ header file to be turned into a precompiled header or Ada spec.
  1494. .IP "\fIfile\fR\fB.f\fR" 4
  1495. .IX Item "file.f"
  1496. .PD 0
  1497. .IP "\fIfile\fR\fB.for\fR" 4
  1498. .IX Item "file.for"
  1499. .IP "\fIfile\fR\fB.ftn\fR" 4
  1500. .IX Item "file.ftn"
  1501. .PD
  1502. Fixed form Fortran source code that should not be preprocessed.
  1503. .IP "\fIfile\fR\fB.F\fR" 4
  1504. .IX Item "file.F"
  1505. .PD 0
  1506. .IP "\fIfile\fR\fB.FOR\fR" 4
  1507. .IX Item "file.FOR"
  1508. .IP "\fIfile\fR\fB.fpp\fR" 4
  1509. .IX Item "file.fpp"
  1510. .IP "\fIfile\fR\fB.FPP\fR" 4
  1511. .IX Item "file.FPP"
  1512. .IP "\fIfile\fR\fB.FTN\fR" 4
  1513. .IX Item "file.FTN"
  1514. .PD
  1515. Fixed form Fortran source code that must be preprocessed (with the traditional
  1516. preprocessor).
  1517. .IP "\fIfile\fR\fB.f90\fR" 4
  1518. .IX Item "file.f90"
  1519. .PD 0
  1520. .IP "\fIfile\fR\fB.f95\fR" 4
  1521. .IX Item "file.f95"
  1522. .IP "\fIfile\fR\fB.f03\fR" 4
  1523. .IX Item "file.f03"
  1524. .IP "\fIfile\fR\fB.f08\fR" 4
  1525. .IX Item "file.f08"
  1526. .PD
  1527. Free form Fortran source code that should not be preprocessed.
  1528. .IP "\fIfile\fR\fB.F90\fR" 4
  1529. .IX Item "file.F90"
  1530. .PD 0
  1531. .IP "\fIfile\fR\fB.F95\fR" 4
  1532. .IX Item "file.F95"
  1533. .IP "\fIfile\fR\fB.F03\fR" 4
  1534. .IX Item "file.F03"
  1535. .IP "\fIfile\fR\fB.F08\fR" 4
  1536. .IX Item "file.F08"
  1537. .PD
  1538. Free form Fortran source code that must be preprocessed (with the
  1539. traditional preprocessor).
  1540. .IP "\fIfile\fR\fB.go\fR" 4
  1541. .IX Item "file.go"
  1542. Go source code.
  1543. .IP "\fIfile\fR\fB.brig\fR" 4
  1544. .IX Item "file.brig"
  1545. \&\s-1BRIG\s0 files (binary representation of \s-1HSAIL\s0).
  1546. .IP "\fIfile\fR\fB.d\fR" 4
  1547. .IX Item "file.d"
  1548. D source code.
  1549. .IP "\fIfile\fR\fB.di\fR" 4
  1550. .IX Item "file.di"
  1551. D interface file.
  1552. .IP "\fIfile\fR\fB.dd\fR" 4
  1553. .IX Item "file.dd"
  1554. D documentation code (Ddoc).
  1555. .IP "\fIfile\fR\fB.ads\fR" 4
  1556. .IX Item "file.ads"
  1557. Ada source code file that contains a library unit declaration (a
  1558. declaration of a package, subprogram, or generic, or a generic
  1559. instantiation), or a library unit renaming declaration (a package,
  1560. generic, or subprogram renaming declaration). Such files are also
  1561. called \fIspecs\fR.
  1562. .IP "\fIfile\fR\fB.adb\fR" 4
  1563. .IX Item "file.adb"
  1564. Ada source code file containing a library unit body (a subprogram or
  1565. package body). Such files are also called \fIbodies\fR.
  1566. .IP "\fIfile\fR\fB.s\fR" 4
  1567. .IX Item "file.s"
  1568. Assembler code.
  1569. .IP "\fIfile\fR\fB.S\fR" 4
  1570. .IX Item "file.S"
  1571. .PD 0
  1572. .IP "\fIfile\fR\fB.sx\fR" 4
  1573. .IX Item "file.sx"
  1574. .PD
  1575. Assembler code that must be preprocessed.
  1576. .IP "\fIother\fR" 4
  1577. .IX Item "other"
  1578. An object file to be fed straight into linking.
  1579. Any file name with no recognized suffix is treated this way.
  1580. .PP
  1581. You can specify the input language explicitly with the \fB\-x\fR option:
  1582. .IP "\fB\-x\fR \fIlanguage\fR" 4
  1583. .IX Item "-x language"
  1584. Specify explicitly the \fIlanguage\fR for the following input files
  1585. (rather than letting the compiler choose a default based on the file
  1586. name suffix). This option applies to all following input files until
  1587. the next \fB\-x\fR option. Possible values for \fIlanguage\fR are:
  1588. .Sp
  1589. .Vb 10
  1590. \& c c\-header cpp\-output
  1591. \& c++ c++\-header c++\-cpp\-output
  1592. \& objective\-c objective\-c\-header objective\-c\-cpp\-output
  1593. \& objective\-c++ objective\-c++\-header objective\-c++\-cpp\-output
  1594. \& assembler assembler\-with\-cpp
  1595. \& ada
  1596. \& d
  1597. \& f77 f77\-cpp\-input f95 f95\-cpp\-input
  1598. \& go
  1599. \& brig
  1600. .Ve
  1601. .IP "\fB\-x none\fR" 4
  1602. .IX Item "-x none"
  1603. Turn off any specification of a language, so that subsequent files are
  1604. handled according to their file name suffixes (as they are if \fB\-x\fR
  1605. has not been used at all).
  1606. .PP
  1607. If you only want some of the stages of compilation, you can use
  1608. \&\fB\-x\fR (or filename suffixes) to tell \fBgcc\fR where to start, and
  1609. one of the options \fB\-c\fR, \fB\-S\fR, or \fB\-E\fR to say where
  1610. \&\fBgcc\fR is to stop. Note that some combinations (for example,
  1611. \&\fB\-x cpp-output \-E\fR) instruct \fBgcc\fR to do nothing at all.
  1612. .IP "\fB\-c\fR" 4
  1613. .IX Item "-c"
  1614. Compile or assemble the source files, but do not link. The linking
  1615. stage simply is not done. The ultimate output is in the form of an
  1616. object file for each source file.
  1617. .Sp
  1618. By default, the object file name for a source file is made by replacing
  1619. the suffix \fB.c\fR, \fB.i\fR, \fB.s\fR, etc., with \fB.o\fR.
  1620. .Sp
  1621. Unrecognized input files, not requiring compilation or assembly, are
  1622. ignored.
  1623. .IP "\fB\-S\fR" 4
  1624. .IX Item "-S"
  1625. Stop after the stage of compilation proper; do not assemble. The output
  1626. is in the form of an assembler code file for each non-assembler input
  1627. file specified.
  1628. .Sp
  1629. By default, the assembler file name for a source file is made by
  1630. replacing the suffix \fB.c\fR, \fB.i\fR, etc., with \fB.s\fR.
  1631. .Sp
  1632. Input files that don't require compilation are ignored.
  1633. .IP "\fB\-E\fR" 4
  1634. .IX Item "-E"
  1635. Stop after the preprocessing stage; do not run the compiler proper. The
  1636. output is in the form of preprocessed source code, which is sent to the
  1637. standard output.
  1638. .Sp
  1639. Input files that don't require preprocessing are ignored.
  1640. .IP "\fB\-o\fR \fIfile\fR" 4
  1641. .IX Item "-o file"
  1642. Place output in file \fIfile\fR. This applies to whatever
  1643. sort of output is being produced, whether it be an executable file,
  1644. an object file, an assembler file or preprocessed C code.
  1645. .Sp
  1646. If \fB\-o\fR is not specified, the default is to put an executable
  1647. file in \fIa.out\fR, the object file for
  1648. \&\fI\fIsource\fI.\fIsuffix\fI\fR in \fI\fIsource\fI.o\fR, its
  1649. assembler file in \fI\fIsource\fI.s\fR, a precompiled header file in
  1650. \&\fI\fIsource\fI.\fIsuffix\fI.gch\fR, and all preprocessed C source on
  1651. standard output.
  1652. .IP "\fB\-v\fR" 4
  1653. .IX Item "-v"
  1654. Print (on standard error output) the commands executed to run the stages
  1655. of compilation. Also print the version number of the compiler driver
  1656. program and of the preprocessor and the compiler proper.
  1657. .IP "\fB\-###\fR" 4
  1658. .IX Item "-###"
  1659. Like \fB\-v\fR except the commands are not executed and arguments
  1660. are quoted unless they contain only alphanumeric characters or \f(CW\*(C`./\-_\*(C'\fR.
  1661. This is useful for shell scripts to capture the driver-generated command lines.
  1662. .IP "\fB\-\-help\fR" 4
  1663. .IX Item "--help"
  1664. Print (on the standard output) a description of the command-line options
  1665. understood by \fBgcc\fR. If the \fB\-v\fR option is also specified
  1666. then \fB\-\-help\fR is also passed on to the various processes
  1667. invoked by \fBgcc\fR, so that they can display the command-line options
  1668. they accept. If the \fB\-Wextra\fR option has also been specified
  1669. (prior to the \fB\-\-help\fR option), then command-line options that
  1670. have no documentation associated with them are also displayed.
  1671. .IP "\fB\-\-target\-help\fR" 4
  1672. .IX Item "--target-help"
  1673. Print (on the standard output) a description of target-specific command-line
  1674. options for each tool. For some targets extra target-specific
  1675. information may also be printed.
  1676. .IP "\fB\-\-help={\fR\fIclass\fR|[\fB^\fR]\fIqualifier\fR\fB}\fR[\fB,...\fR]" 4
  1677. .IX Item "--help={class|[^]qualifier}[,...]"
  1678. Print (on the standard output) a description of the command-line
  1679. options understood by the compiler that fit into all specified classes
  1680. and qualifiers. These are the supported classes:
  1681. .RS 4
  1682. .IP "\fBoptimizers\fR" 4
  1683. .IX Item "optimizers"
  1684. Display all of the optimization options supported by the
  1685. compiler.
  1686. .IP "\fBwarnings\fR" 4
  1687. .IX Item "warnings"
  1688. Display all of the options controlling warning messages
  1689. produced by the compiler.
  1690. .IP "\fBtarget\fR" 4
  1691. .IX Item "target"
  1692. Display target-specific options. Unlike the
  1693. \&\fB\-\-target\-help\fR option however, target-specific options of the
  1694. linker and assembler are not displayed. This is because those
  1695. tools do not currently support the extended \fB\-\-help=\fR syntax.
  1696. .IP "\fBparams\fR" 4
  1697. .IX Item "params"
  1698. Display the values recognized by the \fB\-\-param\fR
  1699. option.
  1700. .IP "\fIlanguage\fR" 4
  1701. .IX Item "language"
  1702. Display the options supported for \fIlanguage\fR, where
  1703. \&\fIlanguage\fR is the name of one of the languages supported in this
  1704. version of \s-1GCC. \s0 If an option is supported by all languages, one needs
  1705. to select \fBcommon\fR class.
  1706. .IP "\fBcommon\fR" 4
  1707. .IX Item "common"
  1708. Display the options that are common to all languages.
  1709. .RE
  1710. .RS 4
  1711. .Sp
  1712. These are the supported qualifiers:
  1713. .IP "\fBundocumented\fR" 4
  1714. .IX Item "undocumented"
  1715. Display only those options that are undocumented.
  1716. .IP "\fBjoined\fR" 4
  1717. .IX Item "joined"
  1718. Display options taking an argument that appears after an equal
  1719. sign in the same continuous piece of text, such as:
  1720. \&\fB\-\-help=target\fR.
  1721. .IP "\fBseparate\fR" 4
  1722. .IX Item "separate"
  1723. Display options taking an argument that appears as a separate word
  1724. following the original option, such as: \fB\-o output-file\fR.
  1725. .RE
  1726. .RS 4
  1727. .Sp
  1728. Thus for example to display all the undocumented target-specific
  1729. switches supported by the compiler, use:
  1730. .Sp
  1731. .Vb 1
  1732. \& \-\-help=target,undocumented
  1733. .Ve
  1734. .Sp
  1735. The sense of a qualifier can be inverted by prefixing it with the
  1736. \&\fB^\fR character, so for example to display all binary warning
  1737. options (i.e., ones that are either on or off and that do not take an
  1738. argument) that have a description, use:
  1739. .Sp
  1740. .Vb 1
  1741. \& \-\-help=warnings,^joined,^undocumented
  1742. .Ve
  1743. .Sp
  1744. The argument to \fB\-\-help=\fR should not consist solely of inverted
  1745. qualifiers.
  1746. .Sp
  1747. Combining several classes is possible, although this usually
  1748. restricts the output so much that there is nothing to display. One
  1749. case where it does work, however, is when one of the classes is
  1750. \&\fItarget\fR. For example, to display all the target-specific
  1751. optimization options, use:
  1752. .Sp
  1753. .Vb 1
  1754. \& \-\-help=target,optimizers
  1755. .Ve
  1756. .Sp
  1757. The \fB\-\-help=\fR option can be repeated on the command line. Each
  1758. successive use displays its requested class of options, skipping
  1759. those that have already been displayed. If \fB\-\-help\fR is also
  1760. specified anywhere on the command line then this takes precedence
  1761. over any \fB\-\-help=\fR option.
  1762. .Sp
  1763. If the \fB\-Q\fR option appears on the command line before the
  1764. \&\fB\-\-help=\fR option, then the descriptive text displayed by
  1765. \&\fB\-\-help=\fR is changed. Instead of describing the displayed
  1766. options, an indication is given as to whether the option is enabled,
  1767. disabled or set to a specific value (assuming that the compiler
  1768. knows this at the point where the \fB\-\-help=\fR option is used).
  1769. .Sp
  1770. Here is a truncated example from the \s-1ARM\s0 port of \fBgcc\fR:
  1771. .Sp
  1772. .Vb 5
  1773. \& % gcc \-Q \-mabi=2 \-\-help=target \-c
  1774. \& The following options are target specific:
  1775. \& \-mabi= 2
  1776. \& \-mabort\-on\-noreturn [disabled]
  1777. \& \-mapcs [disabled]
  1778. .Ve
  1779. .Sp
  1780. The output is sensitive to the effects of previous command-line
  1781. options, so for example it is possible to find out which optimizations
  1782. are enabled at \fB\-O2\fR by using:
  1783. .Sp
  1784. .Vb 1
  1785. \& \-Q \-O2 \-\-help=optimizers
  1786. .Ve
  1787. .Sp
  1788. Alternatively you can discover which binary optimizations are enabled
  1789. by \fB\-O3\fR by using:
  1790. .Sp
  1791. .Vb 3
  1792. \& gcc \-c \-Q \-O3 \-\-help=optimizers > /tmp/O3\-opts
  1793. \& gcc \-c \-Q \-O2 \-\-help=optimizers > /tmp/O2\-opts
  1794. \& diff /tmp/O2\-opts /tmp/O3\-opts | grep enabled
  1795. .Ve
  1796. .RE
  1797. .IP "\fB\-\-version\fR" 4
  1798. .IX Item "--version"
  1799. Display the version number and copyrights of the invoked \s-1GCC.\s0
  1800. .IP "\fB\-pass\-exit\-codes\fR" 4
  1801. .IX Item "-pass-exit-codes"
  1802. Normally the \fBgcc\fR program exits with the code of 1 if any
  1803. phase of the compiler returns a non-success return code. If you specify
  1804. \&\fB\-pass\-exit\-codes\fR, the \fBgcc\fR program instead returns with
  1805. the numerically highest error produced by any phase returning an error
  1806. indication. The C, \*(C+, and Fortran front ends return 4 if an internal
  1807. compiler error is encountered.
  1808. .IP "\fB\-pipe\fR" 4
  1809. .IX Item "-pipe"
  1810. Use pipes rather than temporary files for communication between the
  1811. various stages of compilation. This fails to work on some systems where
  1812. the assembler is unable to read from a pipe; but the \s-1GNU\s0 assembler has
  1813. no trouble.
  1814. .IP "\fB\-specs=\fR\fIfile\fR" 4
  1815. .IX Item "-specs=file"
  1816. Process \fIfile\fR after the compiler reads in the standard \fIspecs\fR
  1817. file, in order to override the defaults which the \fBgcc\fR driver
  1818. program uses when determining what switches to pass to \fBcc1\fR,
  1819. \&\fBcc1plus\fR, \fBas\fR, \fBld\fR, etc. More than one
  1820. \&\fB\-specs=\fR\fIfile\fR can be specified on the command line, and they
  1821. are processed in order, from left to right.
  1822. .IP "\fB\-wrapper\fR" 4
  1823. .IX Item "-wrapper"
  1824. Invoke all subcommands under a wrapper program. The name of the
  1825. wrapper program and its parameters are passed as a comma separated
  1826. list.
  1827. .Sp
  1828. .Vb 1
  1829. \& gcc \-c t.c \-wrapper gdb,\-\-args
  1830. .Ve
  1831. .Sp
  1832. This invokes all subprograms of \fBgcc\fR under
  1833. \&\fBgdb \-\-args\fR, thus the invocation of \fBcc1\fR is
  1834. \&\fBgdb \-\-args cc1 ...\fR.
  1835. .IP "\fB\-ffile\-prefix\-map=\fR\fIold\fR\fB=\fR\fInew\fR" 4
  1836. .IX Item "-ffile-prefix-map=old=new"
  1837. When compiling files residing in directory \fI\fIold\fI\fR, record
  1838. any references to them in the result of the compilation as if the
  1839. files resided in directory \fI\fInew\fI\fR instead. Specifying this
  1840. option is equivalent to specifying all the individual
  1841. \&\fB\-f*\-prefix\-map\fR options. This can be used to make reproducible
  1842. builds that are location independent. See also
  1843. \&\fB\-fmacro\-prefix\-map\fR and \fB\-fdebug\-prefix\-map\fR.
  1844. .IP "\fB\-fplugin=\fR\fIname\fR\fB.so\fR" 4
  1845. .IX Item "-fplugin=name.so"
  1846. Load the plugin code in file \fIname\fR.so, assumed to be a
  1847. shared object to be dlopen'd by the compiler. The base name of
  1848. the shared object file is used to identify the plugin for the
  1849. purposes of argument parsing (See
  1850. \&\fB\-fplugin\-arg\-\fR\fIname\fR\fB\-\fR\fIkey\fR\fB=\fR\fIvalue\fR below).
  1851. Each plugin should define the callback functions specified in the
  1852. Plugins \s-1API.\s0
  1853. .IP "\fB\-fplugin\-arg\-\fR\fIname\fR\fB\-\fR\fIkey\fR\fB=\fR\fIvalue\fR" 4
  1854. .IX Item "-fplugin-arg-name-key=value"
  1855. Define an argument called \fIkey\fR with a value of \fIvalue\fR
  1856. for the plugin called \fIname\fR.
  1857. .IP "\fB\-fdump\-ada\-spec\fR[\fB\-slim\fR]" 4
  1858. .IX Item "-fdump-ada-spec[-slim]"
  1859. For C and \*(C+ source and include files, generate corresponding Ada specs.
  1860. .IP "\fB\-fada\-spec\-parent=\fR\fIunit\fR" 4
  1861. .IX Item "-fada-spec-parent=unit"
  1862. In conjunction with \fB\-fdump\-ada\-spec\fR[\fB\-slim\fR] above, generate
  1863. Ada specs as child units of parent \fIunit\fR.
  1864. .IP "\fB\-fdump\-go\-spec=\fR\fIfile\fR" 4
  1865. .IX Item "-fdump-go-spec=file"
  1866. For input files in any language, generate corresponding Go
  1867. declarations in \fIfile\fR. This generates Go \f(CW\*(C`const\*(C'\fR,
  1868. \&\f(CW\*(C`type\*(C'\fR, \f(CW\*(C`var\*(C'\fR, and \f(CW\*(C`func\*(C'\fR declarations which may be a
  1869. useful way to start writing a Go interface to code written in some
  1870. other language.
  1871. .IP "\fB@\fR\fIfile\fR" 4
  1872. .IX Item "@file"
  1873. Read command-line options from \fIfile\fR. The options read are
  1874. inserted in place of the original @\fIfile\fR option. If \fIfile\fR
  1875. does not exist, or cannot be read, then the option will be treated
  1876. literally, and not removed.
  1877. .Sp
  1878. Options in \fIfile\fR are separated by whitespace. A whitespace
  1879. character may be included in an option by surrounding the entire
  1880. option in either single or double quotes. Any character (including a
  1881. backslash) may be included by prefixing the character to be included
  1882. with a backslash. The \fIfile\fR may itself contain additional
  1883. @\fIfile\fR options; any such options will be processed recursively.
  1884. .SS "Compiling \*(C+ Programs"
  1885. .IX Subsection "Compiling Programs"
  1886. \&\*(C+ source files conventionally use one of the suffixes \fB.C\fR,
  1887. \&\fB.cc\fR, \fB.cpp\fR, \fB.CPP\fR, \fB.c++\fR, \fB.cp\fR, or
  1888. \&\fB.cxx\fR; \*(C+ header files often use \fB.hh\fR, \fB.hpp\fR,
  1889. \&\fB.H\fR, or (for shared template code) \fB.tcc\fR; and
  1890. preprocessed \*(C+ files use the suffix \fB.ii\fR. \s-1GCC\s0 recognizes
  1891. files with these names and compiles them as \*(C+ programs even if you
  1892. call the compiler the same way as for compiling C programs (usually
  1893. with the name \fBgcc\fR).
  1894. .PP
  1895. However, the use of \fBgcc\fR does not add the \*(C+ library.
  1896. \&\fBg++\fR is a program that calls \s-1GCC\s0 and automatically specifies linking
  1897. against the \*(C+ library. It treats \fB.c\fR,
  1898. \&\fB.h\fR and \fB.i\fR files as \*(C+ source files instead of C source
  1899. files unless \fB\-x\fR is used. This program is also useful when
  1900. precompiling a C header file with a \fB.h\fR extension for use in \*(C+
  1901. compilations. On many systems, \fBg++\fR is also installed with
  1902. the name \fBc++\fR.
  1903. .PP
  1904. When you compile \*(C+ programs, you may specify many of the same
  1905. command-line options that you use for compiling programs in any
  1906. language; or command-line options meaningful for C and related
  1907. languages; or options that are meaningful only for \*(C+ programs.
  1908. .SS "Options Controlling C Dialect"
  1909. .IX Subsection "Options Controlling C Dialect"
  1910. The following options control the dialect of C (or languages derived
  1911. from C, such as \*(C+, Objective-C and Objective\-\*(C+) that the compiler
  1912. accepts:
  1913. .IP "\fB\-ansi\fR" 4
  1914. .IX Item "-ansi"
  1915. In C mode, this is equivalent to \fB\-std=c90\fR. In \*(C+ mode, it is
  1916. equivalent to \fB\-std=c++98\fR.
  1917. .Sp
  1918. This turns off certain features of \s-1GCC\s0 that are incompatible with \s-1ISO
  1919. C90 \s0(when compiling C code), or of standard \*(C+ (when compiling \*(C+ code),
  1920. such as the \f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`typeof\*(C'\fR keywords, and
  1921. predefined macros such as \f(CW\*(C`unix\*(C'\fR and \f(CW\*(C`vax\*(C'\fR that identify the
  1922. type of system you are using. It also enables the undesirable and
  1923. rarely used \s-1ISO\s0 trigraph feature. For the C compiler,
  1924. it disables recognition of \*(C+ style \fB//\fR comments as well as
  1925. the \f(CW\*(C`inline\*(C'\fR keyword.
  1926. .Sp
  1927. The alternate keywords \f(CW\*(C`_\|_asm_\|_\*(C'\fR, \f(CW\*(C`_\|_extension_\|_\*(C'\fR,
  1928. \&\f(CW\*(C`_\|_inline_\|_\*(C'\fR and \f(CW\*(C`_\|_typeof_\|_\*(C'\fR continue to work despite
  1929. \&\fB\-ansi\fR. You would not want to use them in an \s-1ISO C\s0 program, of
  1930. course, but it is useful to put them in header files that might be included
  1931. in compilations done with \fB\-ansi\fR. Alternate predefined macros
  1932. such as \f(CW\*(C`_\|_unix_\|_\*(C'\fR and \f(CW\*(C`_\|_vax_\|_\*(C'\fR are also available, with or
  1933. without \fB\-ansi\fR.
  1934. .Sp
  1935. The \fB\-ansi\fR option does not cause non-ISO programs to be
  1936. rejected gratuitously. For that, \fB\-Wpedantic\fR is required in
  1937. addition to \fB\-ansi\fR.
  1938. .Sp
  1939. The macro \f(CW\*(C`_\|_STRICT_ANSI_\|_\*(C'\fR is predefined when the \fB\-ansi\fR
  1940. option is used. Some header files may notice this macro and refrain
  1941. from declaring certain functions or defining certain macros that the
  1942. \&\s-1ISO\s0 standard doesn't call for; this is to avoid interfering with any
  1943. programs that might use these names for other things.
  1944. .Sp
  1945. Functions that are normally built in but do not have semantics
  1946. defined by \s-1ISO C \s0(such as \f(CW\*(C`alloca\*(C'\fR and \f(CW\*(C`ffs\*(C'\fR) are not built-in
  1947. functions when \fB\-ansi\fR is used.
  1948. .IP "\fB\-std=\fR" 4
  1949. .IX Item "-std="
  1950. Determine the language standard. This option
  1951. is currently only supported when compiling C or \*(C+.
  1952. .Sp
  1953. The compiler can accept several base standards, such as \fBc90\fR or
  1954. \&\fBc++98\fR, and \s-1GNU\s0 dialects of those standards, such as
  1955. \&\fBgnu90\fR or \fBgnu++98\fR. When a base standard is specified, the
  1956. compiler accepts all programs following that standard plus those
  1957. using \s-1GNU\s0 extensions that do not contradict it. For example,
  1958. \&\fB\-std=c90\fR turns off certain features of \s-1GCC\s0 that are
  1959. incompatible with \s-1ISO C90,\s0 such as the \f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`typeof\*(C'\fR
  1960. keywords, but not other \s-1GNU\s0 extensions that do not have a meaning in
  1961. \&\s-1ISO C90,\s0 such as omitting the middle term of a \f(CW\*(C`?:\*(C'\fR
  1962. expression. On the other hand, when a \s-1GNU\s0 dialect of a standard is
  1963. specified, all features supported by the compiler are enabled, even when
  1964. those features change the meaning of the base standard. As a result, some
  1965. strict-conforming programs may be rejected. The particular standard
  1966. is used by \fB\-Wpedantic\fR to identify which features are \s-1GNU\s0
  1967. extensions given that version of the standard. For example
  1968. \&\fB\-std=gnu90 \-Wpedantic\fR warns about \*(C+ style \fB//\fR
  1969. comments, while \fB\-std=gnu99 \-Wpedantic\fR does not.
  1970. .Sp
  1971. A value for this option must be provided; possible values are
  1972. .RS 4
  1973. .IP "\fBc90\fR" 4
  1974. .IX Item "c90"
  1975. .PD 0
  1976. .IP "\fBc89\fR" 4
  1977. .IX Item "c89"
  1978. .IP "\fBiso9899:1990\fR" 4
  1979. .IX Item "iso9899:1990"
  1980. .PD
  1981. Support all \s-1ISO C90\s0 programs (certain \s-1GNU\s0 extensions that conflict
  1982. with \s-1ISO C90\s0 are disabled). Same as \fB\-ansi\fR for C code.
  1983. .IP "\fBiso9899:199409\fR" 4
  1984. .IX Item "iso9899:199409"
  1985. \&\s-1ISO C90\s0 as modified in amendment 1.
  1986. .IP "\fBc99\fR" 4
  1987. .IX Item "c99"
  1988. .PD 0
  1989. .IP "\fBc9x\fR" 4
  1990. .IX Item "c9x"
  1991. .IP "\fBiso9899:1999\fR" 4
  1992. .IX Item "iso9899:1999"
  1993. .IP "\fBiso9899:199x\fR" 4
  1994. .IX Item "iso9899:199x"
  1995. .PD
  1996. \&\s-1ISO C99. \s0 This standard is substantially completely supported, modulo
  1997. bugs and floating-point issues
  1998. (mainly but not entirely relating to optional C99 features from
  1999. Annexes F and G). See
  2000. <\fBhttp://gcc.gnu.org/c99status.html\fR> for more information. The
  2001. names \fBc9x\fR and \fBiso9899:199x\fR are deprecated.
  2002. .IP "\fBc11\fR" 4
  2003. .IX Item "c11"
  2004. .PD 0
  2005. .IP "\fBc1x\fR" 4
  2006. .IX Item "c1x"
  2007. .IP "\fBiso9899:2011\fR" 4
  2008. .IX Item "iso9899:2011"
  2009. .PD
  2010. \&\s-1ISO C11,\s0 the 2011 revision of the \s-1ISO C\s0 standard. This standard is
  2011. substantially completely supported, modulo bugs, floating-point issues
  2012. (mainly but not entirely relating to optional C11 features from
  2013. Annexes F and G) and the optional Annexes K (Bounds-checking
  2014. interfaces) and L (Analyzability). The name \fBc1x\fR is deprecated.
  2015. .IP "\fBc17\fR" 4
  2016. .IX Item "c17"
  2017. .PD 0
  2018. .IP "\fBc18\fR" 4
  2019. .IX Item "c18"
  2020. .IP "\fBiso9899:2017\fR" 4
  2021. .IX Item "iso9899:2017"
  2022. .IP "\fBiso9899:2018\fR" 4
  2023. .IX Item "iso9899:2018"
  2024. .PD
  2025. \&\s-1ISO C17,\s0 the 2017 revision of the \s-1ISO C\s0 standard
  2026. (published in 2018). This standard is
  2027. same as C11 except for corrections of defects (all of which are also
  2028. applied with \fB\-std=c11\fR) and a new value of
  2029. \&\f(CW\*(C`_\|_STDC_VERSION_\|_\*(C'\fR, and so is supported to the same extent as C11.
  2030. .IP "\fBc2x\fR" 4
  2031. .IX Item "c2x"
  2032. The next version of the \s-1ISO C\s0 standard, still under development. The
  2033. support for this version is experimental and incomplete.
  2034. .IP "\fBgnu90\fR" 4
  2035. .IX Item "gnu90"
  2036. .PD 0
  2037. .IP "\fBgnu89\fR" 4
  2038. .IX Item "gnu89"
  2039. .PD
  2040. \&\s-1GNU\s0 dialect of \s-1ISO C90 \s0(including some C99 features).
  2041. .IP "\fBgnu99\fR" 4
  2042. .IX Item "gnu99"
  2043. .PD 0
  2044. .IP "\fBgnu9x\fR" 4
  2045. .IX Item "gnu9x"
  2046. .PD
  2047. \&\s-1GNU\s0 dialect of \s-1ISO C99. \s0 The name \fBgnu9x\fR is deprecated.
  2048. .IP "\fBgnu11\fR" 4
  2049. .IX Item "gnu11"
  2050. .PD 0
  2051. .IP "\fBgnu1x\fR" 4
  2052. .IX Item "gnu1x"
  2053. .PD
  2054. \&\s-1GNU\s0 dialect of \s-1ISO C11.\s0
  2055. The name \fBgnu1x\fR is deprecated.
  2056. .IP "\fBgnu17\fR" 4
  2057. .IX Item "gnu17"
  2058. .PD 0
  2059. .IP "\fBgnu18\fR" 4
  2060. .IX Item "gnu18"
  2061. .PD
  2062. \&\s-1GNU\s0 dialect of \s-1ISO C17. \s0 This is the default for C code.
  2063. .IP "\fBgnu2x\fR" 4
  2064. .IX Item "gnu2x"
  2065. The next version of the \s-1ISO C\s0 standard, still under development, plus
  2066. \&\s-1GNU\s0 extensions. The support for this version is experimental and
  2067. incomplete.
  2068. .IP "\fBc++98\fR" 4
  2069. .IX Item "c++98"
  2070. .PD 0
  2071. .IP "\fBc++03\fR" 4
  2072. .IX Item "c++03"
  2073. .PD
  2074. The 1998 \s-1ISO \*(C+\s0 standard plus the 2003 technical corrigendum and some
  2075. additional defect reports. Same as \fB\-ansi\fR for \*(C+ code.
  2076. .IP "\fBgnu++98\fR" 4
  2077. .IX Item "gnu++98"
  2078. .PD 0
  2079. .IP "\fBgnu++03\fR" 4
  2080. .IX Item "gnu++03"
  2081. .PD
  2082. \&\s-1GNU\s0 dialect of \fB\-std=c++98\fR.
  2083. .IP "\fBc++11\fR" 4
  2084. .IX Item "c++11"
  2085. .PD 0
  2086. .IP "\fBc++0x\fR" 4
  2087. .IX Item "c++0x"
  2088. .PD
  2089. The 2011 \s-1ISO \*(C+\s0 standard plus amendments.
  2090. The name \fBc++0x\fR is deprecated.
  2091. .IP "\fBgnu++11\fR" 4
  2092. .IX Item "gnu++11"
  2093. .PD 0
  2094. .IP "\fBgnu++0x\fR" 4
  2095. .IX Item "gnu++0x"
  2096. .PD
  2097. \&\s-1GNU\s0 dialect of \fB\-std=c++11\fR.
  2098. The name \fBgnu++0x\fR is deprecated.
  2099. .IP "\fBc++14\fR" 4
  2100. .IX Item "c++14"
  2101. .PD 0
  2102. .IP "\fBc++1y\fR" 4
  2103. .IX Item "c++1y"
  2104. .PD
  2105. The 2014 \s-1ISO \*(C+\s0 standard plus amendments.
  2106. The name \fBc++1y\fR is deprecated.
  2107. .IP "\fBgnu++14\fR" 4
  2108. .IX Item "gnu++14"
  2109. .PD 0
  2110. .IP "\fBgnu++1y\fR" 4
  2111. .IX Item "gnu++1y"
  2112. .PD
  2113. \&\s-1GNU\s0 dialect of \fB\-std=c++14\fR.
  2114. This is the default for \*(C+ code.
  2115. The name \fBgnu++1y\fR is deprecated.
  2116. .IP "\fBc++17\fR" 4
  2117. .IX Item "c++17"
  2118. .PD 0
  2119. .IP "\fBc++1z\fR" 4
  2120. .IX Item "c++1z"
  2121. .PD
  2122. The 2017 \s-1ISO \*(C+\s0 standard plus amendments.
  2123. The name \fBc++1z\fR is deprecated.
  2124. .IP "\fBgnu++17\fR" 4
  2125. .IX Item "gnu++17"
  2126. .PD 0
  2127. .IP "\fBgnu++1z\fR" 4
  2128. .IX Item "gnu++1z"
  2129. .PD
  2130. \&\s-1GNU\s0 dialect of \fB\-std=c++17\fR.
  2131. The name \fBgnu++1z\fR is deprecated.
  2132. .IP "\fBc++20\fR" 4
  2133. .IX Item "c++20"
  2134. .PD 0
  2135. .IP "\fBc++2a\fR" 4
  2136. .IX Item "c++2a"
  2137. .PD
  2138. The next revision of the \s-1ISO \*(C+\s0 standard, planned for
  2139. 2020. Support is highly experimental, and will almost certainly
  2140. change in incompatible ways in future releases.
  2141. .IP "\fBgnu++20\fR" 4
  2142. .IX Item "gnu++20"
  2143. .PD 0
  2144. .IP "\fBgnu++2a\fR" 4
  2145. .IX Item "gnu++2a"
  2146. .PD
  2147. \&\s-1GNU\s0 dialect of \fB\-std=c++20\fR. Support is highly experimental,
  2148. and will almost certainly change in incompatible ways in future
  2149. releases.
  2150. .RE
  2151. .RS 4
  2152. .RE
  2153. .IP "\fB\-fgnu89\-inline\fR" 4
  2154. .IX Item "-fgnu89-inline"
  2155. The option \fB\-fgnu89\-inline\fR tells \s-1GCC\s0 to use the traditional
  2156. \&\s-1GNU\s0 semantics for \f(CW\*(C`inline\*(C'\fR functions when in C99 mode.
  2157. .Sp
  2158. Using this option is roughly equivalent to adding the
  2159. \&\f(CW\*(C`gnu_inline\*(C'\fR function attribute to all inline functions.
  2160. .Sp
  2161. The option \fB\-fno\-gnu89\-inline\fR explicitly tells \s-1GCC\s0 to use the
  2162. C99 semantics for \f(CW\*(C`inline\*(C'\fR when in C99 or gnu99 mode (i.e., it
  2163. specifies the default behavior).
  2164. This option is not supported in \fB\-std=c90\fR or
  2165. \&\fB\-std=gnu90\fR mode.
  2166. .Sp
  2167. The preprocessor macros \f(CW\*(C`_\|_GNUC_GNU_INLINE_\|_\*(C'\fR and
  2168. \&\f(CW\*(C`_\|_GNUC_STDC_INLINE_\|_\*(C'\fR may be used to check which semantics are
  2169. in effect for \f(CW\*(C`inline\*(C'\fR functions.
  2170. .IP "\fB\-fpermitted\-flt\-eval\-methods=\fR\fIstyle\fR" 4
  2171. .IX Item "-fpermitted-flt-eval-methods=style"
  2172. \&\s-1ISO/IEC TS 18661\-3\s0 defines new permissible values for
  2173. \&\f(CW\*(C`FLT_EVAL_METHOD\*(C'\fR that indicate that operations and constants with
  2174. a semantic type that is an interchange or extended format should be
  2175. evaluated to the precision and range of that type. These new values are
  2176. a superset of those permitted under C99/C11, which does not specify the
  2177. meaning of other positive values of \f(CW\*(C`FLT_EVAL_METHOD\*(C'\fR. As such, code
  2178. conforming to C11 may not have been written expecting the possibility of
  2179. the new values.
  2180. .Sp
  2181. \&\fB\-fpermitted\-flt\-eval\-methods\fR specifies whether the compiler
  2182. should allow only the values of \f(CW\*(C`FLT_EVAL_METHOD\*(C'\fR specified in C99/C11,
  2183. or the extended set of values specified in \s-1ISO/IEC TS 18661\-3.\s0
  2184. .Sp
  2185. \&\fIstyle\fR is either \f(CW\*(C`c11\*(C'\fR or \f(CW\*(C`ts\-18661\-3\*(C'\fR as appropriate.
  2186. .Sp
  2187. The default when in a standards compliant mode (\fB\-std=c11\fR or similar)
  2188. is \fB\-fpermitted\-flt\-eval\-methods=c11\fR. The default when in a \s-1GNU\s0
  2189. dialect (\fB\-std=gnu11\fR or similar) is
  2190. \&\fB\-fpermitted\-flt\-eval\-methods=ts\-18661\-3\fR.
  2191. .IP "\fB\-aux\-info\fR \fIfilename\fR" 4
  2192. .IX Item "-aux-info filename"
  2193. Output to the given filename prototyped declarations for all functions
  2194. declared and/or defined in a translation unit, including those in header
  2195. files. This option is silently ignored in any language other than C.
  2196. .Sp
  2197. Besides declarations, the file indicates, in comments, the origin of
  2198. each declaration (source file and line), whether the declaration was
  2199. implicit, prototyped or unprototyped (\fBI\fR, \fBN\fR for new or
  2200. \&\fBO\fR for old, respectively, in the first character after the line
  2201. number and the colon), and whether it came from a declaration or a
  2202. definition (\fBC\fR or \fBF\fR, respectively, in the following
  2203. character). In the case of function definitions, a K&R\-style list of
  2204. arguments followed by their declarations is also provided, inside
  2205. comments, after the declaration.
  2206. .IP "\fB\-fallow\-parameterless\-variadic\-functions\fR" 4
  2207. .IX Item "-fallow-parameterless-variadic-functions"
  2208. Accept variadic functions without named parameters.
  2209. .Sp
  2210. Although it is possible to define such a function, this is not very
  2211. useful as it is not possible to read the arguments. This is only
  2212. supported for C as this construct is allowed by \*(C+.
  2213. .IP "\fB\-fno\-asm\fR" 4
  2214. .IX Item "-fno-asm"
  2215. Do not recognize \f(CW\*(C`asm\*(C'\fR, \f(CW\*(C`inline\*(C'\fR or \f(CW\*(C`typeof\*(C'\fR as a
  2216. keyword, so that code can use these words as identifiers. You can use
  2217. the keywords \f(CW\*(C`_\|_asm_\|_\*(C'\fR, \f(CW\*(C`_\|_inline_\|_\*(C'\fR and \f(CW\*(C`_\|_typeof_\|_\*(C'\fR
  2218. instead. \fB\-ansi\fR implies \fB\-fno\-asm\fR.
  2219. .Sp
  2220. In \*(C+, this switch only affects the \f(CW\*(C`typeof\*(C'\fR keyword, since
  2221. \&\f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`inline\*(C'\fR are standard keywords. You may want to
  2222. use the \fB\-fno\-gnu\-keywords\fR flag instead, which has the same
  2223. effect. In C99 mode (\fB\-std=c99\fR or \fB\-std=gnu99\fR), this
  2224. switch only affects the \f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`typeof\*(C'\fR keywords, since
  2225. \&\f(CW\*(C`inline\*(C'\fR is a standard keyword in \s-1ISO C99.\s0
  2226. .IP "\fB\-fno\-builtin\fR" 4
  2227. .IX Item "-fno-builtin"
  2228. .PD 0
  2229. .IP "\fB\-fno\-builtin\-\fR\fIfunction\fR" 4
  2230. .IX Item "-fno-builtin-function"
  2231. .PD
  2232. Don't recognize built-in functions that do not begin with
  2233. \&\fB_\|_builtin_\fR as prefix.
  2234. .Sp
  2235. \&\s-1GCC\s0 normally generates special code to handle certain built-in functions
  2236. more efficiently; for instance, calls to \f(CW\*(C`alloca\*(C'\fR may become single
  2237. instructions which adjust the stack directly, and calls to \f(CW\*(C`memcpy\*(C'\fR
  2238. may become inline copy loops. The resulting code is often both smaller
  2239. and faster, but since the function calls no longer appear as such, you
  2240. cannot set a breakpoint on those calls, nor can you change the behavior
  2241. of the functions by linking with a different library. In addition,
  2242. when a function is recognized as a built-in function, \s-1GCC\s0 may use
  2243. information about that function to warn about problems with calls to
  2244. that function, or to generate more efficient code, even if the
  2245. resulting code still contains calls to that function. For example,
  2246. warnings are given with \fB\-Wformat\fR for bad calls to
  2247. \&\f(CW\*(C`printf\*(C'\fR when \f(CW\*(C`printf\*(C'\fR is built in and \f(CW\*(C`strlen\*(C'\fR is
  2248. known not to modify global memory.
  2249. .Sp
  2250. With the \fB\-fno\-builtin\-\fR\fIfunction\fR option
  2251. only the built-in function \fIfunction\fR is
  2252. disabled. \fIfunction\fR must not begin with \fB_\|_builtin_\fR. If a
  2253. function is named that is not built-in in this version of \s-1GCC,\s0 this
  2254. option is ignored. There is no corresponding
  2255. \&\fB\-fbuiltin\-\fR\fIfunction\fR option; if you wish to enable
  2256. built-in functions selectively when using \fB\-fno\-builtin\fR or
  2257. \&\fB\-ffreestanding\fR, you may define macros such as:
  2258. .Sp
  2259. .Vb 2
  2260. \& #define abs(n) _\|_builtin_abs ((n))
  2261. \& #define strcpy(d, s) _\|_builtin_strcpy ((d), (s))
  2262. .Ve
  2263. .IP "\fB\-fgimple\fR" 4
  2264. .IX Item "-fgimple"
  2265. Enable parsing of function definitions marked with \f(CW\*(C`_\|_GIMPLE\*(C'\fR.
  2266. This is an experimental feature that allows unit testing of \s-1GIMPLE\s0
  2267. passes.
  2268. .IP "\fB\-fhosted\fR" 4
  2269. .IX Item "-fhosted"
  2270. Assert that compilation targets a hosted environment. This implies
  2271. \&\fB\-fbuiltin\fR. A hosted environment is one in which the
  2272. entire standard library is available, and in which \f(CW\*(C`main\*(C'\fR has a return
  2273. type of \f(CW\*(C`int\*(C'\fR. Examples are nearly everything except a kernel.
  2274. This is equivalent to \fB\-fno\-freestanding\fR.
  2275. .IP "\fB\-ffreestanding\fR" 4
  2276. .IX Item "-ffreestanding"
  2277. Assert that compilation targets a freestanding environment. This
  2278. implies \fB\-fno\-builtin\fR. A freestanding environment
  2279. is one in which the standard library may not exist, and program startup may
  2280. not necessarily be at \f(CW\*(C`main\*(C'\fR. The most obvious example is an \s-1OS\s0 kernel.
  2281. This is equivalent to \fB\-fno\-hosted\fR.
  2282. .IP "\fB\-fopenacc\fR" 4
  2283. .IX Item "-fopenacc"
  2284. Enable handling of OpenACC directives \f(CW\*(C`#pragma acc\*(C'\fR in C/\*(C+ and
  2285. \&\f(CW\*(C`!$acc\*(C'\fR in Fortran. When \fB\-fopenacc\fR is specified, the
  2286. compiler generates accelerated code according to the OpenACC Application
  2287. Programming Interface v2.6 <\fBhttps://www.openacc.org\fR>. This option
  2288. implies \fB\-pthread\fR, and thus is only supported on targets that
  2289. have support for \fB\-pthread\fR.
  2290. .IP "\fB\-fopenacc\-dim=\fR\fIgeom\fR" 4
  2291. .IX Item "-fopenacc-dim=geom"
  2292. Specify default compute dimensions for parallel offload regions that do
  2293. not explicitly specify. The \fIgeom\fR value is a triple of
  2294. \&':'\-separated sizes, in order 'gang', 'worker' and, 'vector'. A size
  2295. can be omitted, to use a target-specific default value.
  2296. .IP "\fB\-fopenmp\fR" 4
  2297. .IX Item "-fopenmp"
  2298. Enable handling of OpenMP directives \f(CW\*(C`#pragma omp\*(C'\fR in C/\*(C+ and
  2299. \&\f(CW\*(C`!$omp\*(C'\fR in Fortran. When \fB\-fopenmp\fR is specified, the
  2300. compiler generates parallel code according to the OpenMP Application
  2301. Program Interface v4.5 <\fBhttps://www.openmp.org\fR>. This option
  2302. implies \fB\-pthread\fR, and thus is only supported on targets that
  2303. have support for \fB\-pthread\fR. \fB\-fopenmp\fR implies
  2304. \&\fB\-fopenmp\-simd\fR.
  2305. .IP "\fB\-fopenmp\-simd\fR" 4
  2306. .IX Item "-fopenmp-simd"
  2307. Enable handling of OpenMP's \s-1SIMD\s0 directives with \f(CW\*(C`#pragma omp\*(C'\fR
  2308. in C/\*(C+ and \f(CW\*(C`!$omp\*(C'\fR in Fortran. Other OpenMP directives
  2309. are ignored.
  2310. .IP "\fB\-fgnu\-tm\fR" 4
  2311. .IX Item "-fgnu-tm"
  2312. When the option \fB\-fgnu\-tm\fR is specified, the compiler
  2313. generates code for the Linux variant of Intel's current Transactional
  2314. Memory \s-1ABI\s0 specification document (Revision 1.1, May 6 2009). This is
  2315. an experimental feature whose interface may change in future versions
  2316. of \s-1GCC,\s0 as the official specification changes. Please note that not
  2317. all architectures are supported for this feature.
  2318. .Sp
  2319. For more information on \s-1GCC\s0's support for transactional memory,
  2320. .Sp
  2321. Note that the transactional memory feature is not supported with
  2322. non-call exceptions (\fB\-fnon\-call\-exceptions\fR).
  2323. .IP "\fB\-fms\-extensions\fR" 4
  2324. .IX Item "-fms-extensions"
  2325. Accept some non-standard constructs used in Microsoft header files.
  2326. .Sp
  2327. In \*(C+ code, this allows member names in structures to be similar
  2328. to previous types declarations.
  2329. .Sp
  2330. .Vb 4
  2331. \& typedef int UOW;
  2332. \& struct ABC {
  2333. \& UOW UOW;
  2334. \& };
  2335. .Ve
  2336. .Sp
  2337. Some cases of unnamed fields in structures and unions are only
  2338. accepted with this option.
  2339. .Sp
  2340. Note that this option is off for all targets except for x86
  2341. targets using ms-abi.
  2342. .IP "\fB\-fplan9\-extensions\fR" 4
  2343. .IX Item "-fplan9-extensions"
  2344. Accept some non-standard constructs used in Plan 9 code.
  2345. .Sp
  2346. This enables \fB\-fms\-extensions\fR, permits passing pointers to
  2347. structures with anonymous fields to functions that expect pointers to
  2348. elements of the type of the field, and permits referring to anonymous
  2349. fields declared using a typedef. This is only
  2350. supported for C, not \*(C+.
  2351. .IP "\fB\-fcond\-mismatch\fR" 4
  2352. .IX Item "-fcond-mismatch"
  2353. Allow conditional expressions with mismatched types in the second and
  2354. third arguments. The value of such an expression is void. This option
  2355. is not supported for \*(C+.
  2356. .IP "\fB\-flax\-vector\-conversions\fR" 4
  2357. .IX Item "-flax-vector-conversions"
  2358. Allow implicit conversions between vectors with differing numbers of
  2359. elements and/or incompatible element types. This option should not be
  2360. used for new code.
  2361. .IP "\fB\-funsigned\-char\fR" 4
  2362. .IX Item "-funsigned-char"
  2363. Let the type \f(CW\*(C`char\*(C'\fR be unsigned, like \f(CW\*(C`unsigned char\*(C'\fR.
  2364. .Sp
  2365. Each kind of machine has a default for what \f(CW\*(C`char\*(C'\fR should
  2366. be. It is either like \f(CW\*(C`unsigned char\*(C'\fR by default or like
  2367. \&\f(CW\*(C`signed char\*(C'\fR by default.
  2368. .Sp
  2369. Ideally, a portable program should always use \f(CW\*(C`signed char\*(C'\fR or
  2370. \&\f(CW\*(C`unsigned char\*(C'\fR when it depends on the signedness of an object.
  2371. But many programs have been written to use plain \f(CW\*(C`char\*(C'\fR and
  2372. expect it to be signed, or expect it to be unsigned, depending on the
  2373. machines they were written for. This option, and its inverse, let you
  2374. make such a program work with the opposite default.
  2375. .Sp
  2376. The type \f(CW\*(C`char\*(C'\fR is always a distinct type from each of
  2377. \&\f(CW\*(C`signed char\*(C'\fR or \f(CW\*(C`unsigned char\*(C'\fR, even though its behavior
  2378. is always just like one of those two.
  2379. .IP "\fB\-fsigned\-char\fR" 4
  2380. .IX Item "-fsigned-char"
  2381. Let the type \f(CW\*(C`char\*(C'\fR be signed, like \f(CW\*(C`signed char\*(C'\fR.
  2382. .Sp
  2383. Note that this is equivalent to \fB\-fno\-unsigned\-char\fR, which is
  2384. the negative form of \fB\-funsigned\-char\fR. Likewise, the option
  2385. \&\fB\-fno\-signed\-char\fR is equivalent to \fB\-funsigned\-char\fR.
  2386. .IP "\fB\-fsigned\-bitfields\fR" 4
  2387. .IX Item "-fsigned-bitfields"
  2388. .PD 0
  2389. .IP "\fB\-funsigned\-bitfields\fR" 4
  2390. .IX Item "-funsigned-bitfields"
  2391. .IP "\fB\-fno\-signed\-bitfields\fR" 4
  2392. .IX Item "-fno-signed-bitfields"
  2393. .IP "\fB\-fno\-unsigned\-bitfields\fR" 4
  2394. .IX Item "-fno-unsigned-bitfields"
  2395. .PD
  2396. These options control whether a bit-field is signed or unsigned, when the
  2397. declaration does not use either \f(CW\*(C`signed\*(C'\fR or \f(CW\*(C`unsigned\*(C'\fR. By
  2398. default, such a bit-field is signed, because this is consistent: the
  2399. basic integer types such as \f(CW\*(C`int\*(C'\fR are signed types.
  2400. .IP "\fB\-fsso\-struct=\fR\fIendianness\fR" 4
  2401. .IX Item "-fsso-struct=endianness"
  2402. Set the default scalar storage order of structures and unions to the
  2403. specified endianness. The accepted values are \fBbig-endian\fR,
  2404. \&\fBlittle-endian\fR and \fBnative\fR for the native endianness of
  2405. the target (the default). This option is not supported for \*(C+.
  2406. .Sp
  2407. \&\fBWarning:\fR the \fB\-fsso\-struct\fR switch causes \s-1GCC\s0 to generate
  2408. code that is not binary compatible with code generated without it if the
  2409. specified endianness is not the native endianness of the target.
  2410. .SS "Options Controlling \*(C+ Dialect"
  2411. .IX Subsection "Options Controlling Dialect"
  2412. This section describes the command-line options that are only meaningful
  2413. for \*(C+ programs. You can also use most of the \s-1GNU\s0 compiler options
  2414. regardless of what language your program is in. For example, you
  2415. might compile a file \fIfirstClass.C\fR like this:
  2416. .PP
  2417. .Vb 1
  2418. \& g++ \-g \-fstrict\-enums \-O \-c firstClass.C
  2419. .Ve
  2420. .PP
  2421. In this example, only \fB\-fstrict\-enums\fR is an option meant
  2422. only for \*(C+ programs; you can use the other options with any
  2423. language supported by \s-1GCC.\s0
  2424. .PP
  2425. Some options for compiling C programs, such as \fB\-std\fR, are also
  2426. relevant for \*(C+ programs.
  2427. .PP
  2428. Here is a list of options that are \fIonly\fR for compiling \*(C+ programs:
  2429. .IP "\fB\-fabi\-version=\fR\fIn\fR" 4
  2430. .IX Item "-fabi-version=n"
  2431. Use version \fIn\fR of the \*(C+ \s-1ABI. \s0 The default is version 0.
  2432. .Sp
  2433. Version 0 refers to the version conforming most closely to
  2434. the \*(C+ \s-1ABI\s0 specification. Therefore, the \s-1ABI\s0 obtained using version 0
  2435. will change in different versions of G++ as \s-1ABI\s0 bugs are fixed.
  2436. .Sp
  2437. Version 1 is the version of the \*(C+ \s-1ABI\s0 that first appeared in G++ 3.2.
  2438. .Sp
  2439. Version 2 is the version of the \*(C+ \s-1ABI\s0 that first appeared in G++
  2440. 3.4, and was the default through G++ 4.9.
  2441. .Sp
  2442. Version 3 corrects an error in mangling a constant address as a
  2443. template argument.
  2444. .Sp
  2445. Version 4, which first appeared in G++ 4.5, implements a standard
  2446. mangling for vector types.
  2447. .Sp
  2448. Version 5, which first appeared in G++ 4.6, corrects the mangling of
  2449. attribute const/volatile on function pointer types, decltype of a
  2450. plain decl, and use of a function parameter in the declaration of
  2451. another parameter.
  2452. .Sp
  2453. Version 6, which first appeared in G++ 4.7, corrects the promotion
  2454. behavior of \*(C+11 scoped enums and the mangling of template argument
  2455. packs, const/static_cast, prefix ++ and \-\-, and a class scope function
  2456. used as a template argument.
  2457. .Sp
  2458. Version 7, which first appeared in G++ 4.8, that treats nullptr_t as a
  2459. builtin type and corrects the mangling of lambdas in default argument
  2460. scope.
  2461. .Sp
  2462. Version 8, which first appeared in G++ 4.9, corrects the substitution
  2463. behavior of function types with function-cv-qualifiers.
  2464. .Sp
  2465. Version 9, which first appeared in G++ 5.2, corrects the alignment of
  2466. \&\f(CW\*(C`nullptr_t\*(C'\fR.
  2467. .Sp
  2468. Version 10, which first appeared in G++ 6.1, adds mangling of
  2469. attributes that affect type identity, such as ia32 calling convention
  2470. attributes (e.g. \fBstdcall\fR).
  2471. .Sp
  2472. Version 11, which first appeared in G++ 7, corrects the mangling of
  2473. sizeof... expressions and operator names. For multiple entities with
  2474. the same name within a function, that are declared in different scopes,
  2475. the mangling now changes starting with the twelfth occurrence. It also
  2476. implies \fB\-fnew\-inheriting\-ctors\fR.
  2477. .Sp
  2478. Version 12, which first appeared in G++ 8, corrects the calling
  2479. conventions for empty classes on the x86_64 target and for classes
  2480. with only deleted copy/move constructors. It accidentally changes the
  2481. calling convention for classes with a deleted copy constructor and a
  2482. trivial move constructor.
  2483. .Sp
  2484. Version 13, which first appeared in G++ 8.2, fixes the accidental
  2485. change in version 12.
  2486. .Sp
  2487. Version 14, which first appeared in G++ 10, corrects the mangling of
  2488. the nullptr expression.
  2489. .Sp
  2490. See also \fB\-Wabi\fR.
  2491. .IP "\fB\-fabi\-compat\-version=\fR\fIn\fR" 4
  2492. .IX Item "-fabi-compat-version=n"
  2493. On targets that support strong aliases, G++
  2494. works around mangling changes by creating an alias with the correct
  2495. mangled name when defining a symbol with an incorrect mangled name.
  2496. This switch specifies which \s-1ABI\s0 version to use for the alias.
  2497. .Sp
  2498. With \fB\-fabi\-version=0\fR (the default), this defaults to 11 (\s-1GCC 7\s0
  2499. compatibility). If another \s-1ABI\s0 version is explicitly selected, this
  2500. defaults to 0. For compatibility with \s-1GCC\s0 versions 3.2 through 4.9,
  2501. use \fB\-fabi\-compat\-version=2\fR.
  2502. .Sp
  2503. If this option is not provided but \fB\-Wabi=\fR\fIn\fR is, that
  2504. version is used for compatibility aliases. If this option is provided
  2505. along with \fB\-Wabi\fR (without the version), the version from this
  2506. option is used for the warning.
  2507. .IP "\fB\-fno\-access\-control\fR" 4
  2508. .IX Item "-fno-access-control"
  2509. Turn off all access checking. This switch is mainly useful for working
  2510. around bugs in the access control code.
  2511. .IP "\fB\-faligned\-new\fR" 4
  2512. .IX Item "-faligned-new"
  2513. Enable support for \*(C+17 \f(CW\*(C`new\*(C'\fR of types that require more
  2514. alignment than \f(CW\*(C`void* ::operator new(std::size_t)\*(C'\fR provides. A
  2515. numeric argument such as \f(CW\*(C`\-faligned\-new=32\*(C'\fR can be used to
  2516. specify how much alignment (in bytes) is provided by that function,
  2517. but few users will need to override the default of
  2518. \&\f(CW\*(C`alignof(std::max_align_t)\*(C'\fR.
  2519. .Sp
  2520. This flag is enabled by default for \fB\-std=c++17\fR.
  2521. .IP "\fB\-fchar8_t\fR" 4
  2522. .IX Item "-fchar8_t"
  2523. .PD 0
  2524. .IP "\fB\-fno\-char8_t\fR" 4
  2525. .IX Item "-fno-char8_t"
  2526. .PD
  2527. Enable support for \f(CW\*(C`char8_t\*(C'\fR as adopted for \*(C+2a. This includes
  2528. the addition of a new \f(CW\*(C`char8_t\*(C'\fR fundamental type, changes to the
  2529. types of \s-1UTF\-8\s0 string and character literals, new signatures for
  2530. user-defined literals, associated standard library updates, and new
  2531. \&\f(CW\*(C`_\|_cpp_char8_t\*(C'\fR and \f(CW\*(C`_\|_cpp_lib_char8_t\*(C'\fR feature test macros.
  2532. .Sp
  2533. This option enables functions to be overloaded for ordinary and \s-1UTF\-8\s0
  2534. strings:
  2535. .Sp
  2536. .Vb 4
  2537. \& int f(const char *); // #1
  2538. \& int f(const char8_t *); // #2
  2539. \& int v1 = f("text"); // Calls #1
  2540. \& int v2 = f(u8"text"); // Calls #2
  2541. .Ve
  2542. .Sp
  2543. and introduces new signatures for user-defined literals:
  2544. .Sp
  2545. .Vb 6
  2546. \& int operator""_udl1(char8_t);
  2547. \& int v3 = u8\*(Aqx\*(Aq_udl1;
  2548. \& int operator""_udl2(const char8_t*, std::size_t);
  2549. \& int v4 = u8"text"_udl2;
  2550. \& template<typename T, T...> int operator""_udl3();
  2551. \& int v5 = u8"text"_udl3;
  2552. .Ve
  2553. .Sp
  2554. The change to the types of \s-1UTF\-8\s0 string and character literals introduces
  2555. incompatibilities with \s-1ISO \*(C+11\s0 and later standards. For example, the
  2556. following code is well-formed under \s-1ISO \*(C+11,\s0 but is ill-formed when
  2557. \&\fB\-fchar8_t\fR is specified.
  2558. .Sp
  2559. .Vb 10
  2560. \& char ca[] = u8"xx"; // error: char\-array initialized from wide
  2561. \& // string
  2562. \& const char *cp = u8"xx";// error: invalid conversion from
  2563. \& // \`const char8_t*\*(Aq to \`const char*\*(Aq
  2564. \& int f(const char*);
  2565. \& auto v = f(u8"xx"); // error: invalid conversion from
  2566. \& // \`const char8_t*\*(Aq to \`const char*\*(Aq
  2567. \& std::string s{u8"xx"}; // error: no matching function for call to
  2568. \& // \`std::basic_string<char>::basic_string()\*(Aq
  2569. \& using namespace std::literals;
  2570. \& s = u8"xx"s; // error: conversion from
  2571. \& // \`basic_string<char8_t>\*(Aq to non\-scalar
  2572. \& // type \`basic_string<char>\*(Aq requested
  2573. .Ve
  2574. .IP "\fB\-fcheck\-new\fR" 4
  2575. .IX Item "-fcheck-new"
  2576. Check that the pointer returned by \f(CW\*(C`operator new\*(C'\fR is non-null
  2577. before attempting to modify the storage allocated. This check is
  2578. normally unnecessary because the \*(C+ standard specifies that
  2579. \&\f(CW\*(C`operator new\*(C'\fR only returns \f(CW0\fR if it is declared
  2580. \&\f(CW\*(C`throw()\*(C'\fR, in which case the compiler always checks the
  2581. return value even without this option. In all other cases, when
  2582. \&\f(CW\*(C`operator new\*(C'\fR has a non-empty exception specification, memory
  2583. exhaustion is signalled by throwing \f(CW\*(C`std::bad_alloc\*(C'\fR. See also
  2584. \&\fBnew (nothrow)\fR.
  2585. .IP "\fB\-fconcepts\fR" 4
  2586. .IX Item "-fconcepts"
  2587. .PD 0
  2588. .IP "\fB\-fconcepts\-ts\fR" 4
  2589. .IX Item "-fconcepts-ts"
  2590. .PD
  2591. Below \fB\-std=c++2a\fR, \fB\-fconcepts\fR enables support for the
  2592. \&\*(C+ Extensions for Concepts Technical Specification, \s-1ISO 19217 \s0(2015).
  2593. .Sp
  2594. With \fB\-std=c++2a\fR and above, Concepts are part of the language
  2595. standard, so \fB\-fconcepts\fR defaults to on. But the standard
  2596. specification of Concepts differs significantly from the \s-1TS,\s0 so some
  2597. constructs that were allowed in the \s-1TS\s0 but didn't make it into the
  2598. standard can still be enabled by \fB\-fconcepts\-ts\fR.
  2599. .IP "\fB\-fconstexpr\-depth=\fR\fIn\fR" 4
  2600. .IX Item "-fconstexpr-depth=n"
  2601. Set the maximum nested evaluation depth for \*(C+11 constexpr functions
  2602. to \fIn\fR. A limit is needed to detect endless recursion during
  2603. constant expression evaluation. The minimum specified by the standard
  2604. is 512.
  2605. .IP "\fB\-fconstexpr\-cache\-depth=\fR\fIn\fR" 4
  2606. .IX Item "-fconstexpr-cache-depth=n"
  2607. Set the maximum level of nested evaluation depth for \*(C+11 constexpr
  2608. functions that will be cached to \fIn\fR. This is a heuristic that
  2609. trades off compilation speed (when the cache avoids repeated
  2610. calculations) against memory consumption (when the cache grows very
  2611. large from highly recursive evaluations). The default is 8. Very few
  2612. users are likely to want to adjust it, but if your code does heavy
  2613. constexpr calculations you might want to experiment to find which
  2614. value works best for you.
  2615. .IP "\fB\-fconstexpr\-loop\-limit=\fR\fIn\fR" 4
  2616. .IX Item "-fconstexpr-loop-limit=n"
  2617. Set the maximum number of iterations for a loop in \*(C+14 constexpr functions
  2618. to \fIn\fR. A limit is needed to detect infinite loops during
  2619. constant expression evaluation. The default is 262144 (1<<18).
  2620. .IP "\fB\-fconstexpr\-ops\-limit=\fR\fIn\fR" 4
  2621. .IX Item "-fconstexpr-ops-limit=n"
  2622. Set the maximum number of operations during a single constexpr evaluation.
  2623. Even when number of iterations of a single loop is limited with the above limit,
  2624. if there are several nested loops and each of them has many iterations but still
  2625. smaller than the above limit, or if in a body of some loop or even outside
  2626. of a loop too many expressions need to be evaluated, the resulting constexpr
  2627. evaluation might take too long.
  2628. The default is 33554432 (1<<25).
  2629. .IP "\fB\-fcoroutines\fR" 4
  2630. .IX Item "-fcoroutines"
  2631. Enable support for the \*(C+ coroutines extension (experimental).
  2632. .IP "\fB\-fno\-elide\-constructors\fR" 4
  2633. .IX Item "-fno-elide-constructors"
  2634. The \*(C+ standard allows an implementation to omit creating a temporary
  2635. that is only used to initialize another object of the same type.
  2636. Specifying this option disables that optimization, and forces G++ to
  2637. call the copy constructor in all cases. This option also causes G++
  2638. to call trivial member functions which otherwise would be expanded inline.
  2639. .Sp
  2640. In \*(C+17, the compiler is required to omit these temporaries, but this
  2641. option still affects trivial member functions.
  2642. .IP "\fB\-fno\-enforce\-eh\-specs\fR" 4
  2643. .IX Item "-fno-enforce-eh-specs"
  2644. Don't generate code to check for violation of exception specifications
  2645. at run time. This option violates the \*(C+ standard, but may be useful
  2646. for reducing code size in production builds, much like defining
  2647. \&\f(CW\*(C`NDEBUG\*(C'\fR. This does not give user code permission to throw
  2648. exceptions in violation of the exception specifications; the compiler
  2649. still optimizes based on the specifications, so throwing an
  2650. unexpected exception results in undefined behavior at run time.
  2651. .IP "\fB\-fextern\-tls\-init\fR" 4
  2652. .IX Item "-fextern-tls-init"
  2653. .PD 0
  2654. .IP "\fB\-fno\-extern\-tls\-init\fR" 4
  2655. .IX Item "-fno-extern-tls-init"
  2656. .PD
  2657. The \*(C+11 and OpenMP standards allow \f(CW\*(C`thread_local\*(C'\fR and
  2658. \&\f(CW\*(C`threadprivate\*(C'\fR variables to have dynamic (runtime)
  2659. initialization. To support this, any use of such a variable goes
  2660. through a wrapper function that performs any necessary initialization.
  2661. When the use and definition of the variable are in the same
  2662. translation unit, this overhead can be optimized away, but when the
  2663. use is in a different translation unit there is significant overhead
  2664. even if the variable doesn't actually need dynamic initialization. If
  2665. the programmer can be sure that no use of the variable in a
  2666. non-defining \s-1TU\s0 needs to trigger dynamic initialization (either
  2667. because the variable is statically initialized, or a use of the
  2668. variable in the defining \s-1TU\s0 will be executed before any uses in
  2669. another \s-1TU\s0), they can avoid this overhead with the
  2670. \&\fB\-fno\-extern\-tls\-init\fR option.
  2671. .Sp
  2672. On targets that support symbol aliases, the default is
  2673. \&\fB\-fextern\-tls\-init\fR. On targets that do not support symbol
  2674. aliases, the default is \fB\-fno\-extern\-tls\-init\fR.
  2675. .IP "\fB\-fno\-gnu\-keywords\fR" 4
  2676. .IX Item "-fno-gnu-keywords"
  2677. Do not recognize \f(CW\*(C`typeof\*(C'\fR as a keyword, so that code can use this
  2678. word as an identifier. You can use the keyword \f(CW\*(C`_\|_typeof_\|_\*(C'\fR instead.
  2679. This option is implied by the strict \s-1ISO \*(C+\s0 dialects: \fB\-ansi\fR,
  2680. \&\fB\-std=c++98\fR, \fB\-std=c++11\fR, etc.
  2681. .IP "\fB\-fno\-implicit\-templates\fR" 4
  2682. .IX Item "-fno-implicit-templates"
  2683. Never emit code for non-inline templates that are instantiated
  2684. implicitly (i.e. by use); only emit code for explicit instantiations.
  2685. If you use this option, you must take care to structure your code to
  2686. include all the necessary explicit instantiations to avoid getting
  2687. undefined symbols at link time.
  2688. .IP "\fB\-fno\-implicit\-inline\-templates\fR" 4
  2689. .IX Item "-fno-implicit-inline-templates"
  2690. Don't emit code for implicit instantiations of inline templates, either.
  2691. The default is to handle inlines differently so that compiles with and
  2692. without optimization need the same set of explicit instantiations.
  2693. .IP "\fB\-fno\-implement\-inlines\fR" 4
  2694. .IX Item "-fno-implement-inlines"
  2695. To save space, do not emit out-of-line copies of inline functions
  2696. controlled by \f(CW\*(C`#pragma implementation\*(C'\fR. This causes linker
  2697. errors if these functions are not inlined everywhere they are called.
  2698. .IP "\fB\-fms\-extensions\fR" 4
  2699. .IX Item "-fms-extensions"
  2700. Disable Wpedantic warnings about constructs used in \s-1MFC,\s0 such as implicit
  2701. int and getting a pointer to member function via non-standard syntax.
  2702. .IP "\fB\-fnew\-inheriting\-ctors\fR" 4
  2703. .IX Item "-fnew-inheriting-ctors"
  2704. Enable the P0136 adjustment to the semantics of \*(C+11 constructor
  2705. inheritance. This is part of \*(C+17 but also considered to be a Defect
  2706. Report against \*(C+11 and \*(C+14. This flag is enabled by default
  2707. unless \fB\-fabi\-version=10\fR or lower is specified.
  2708. .IP "\fB\-fnew\-ttp\-matching\fR" 4
  2709. .IX Item "-fnew-ttp-matching"
  2710. Enable the P0522 resolution to Core issue 150, template template
  2711. parameters and default arguments: this allows a template with default
  2712. template arguments as an argument for a template template parameter
  2713. with fewer template parameters. This flag is enabled by default for
  2714. \&\fB\-std=c++17\fR.
  2715. .IP "\fB\-fno\-nonansi\-builtins\fR" 4
  2716. .IX Item "-fno-nonansi-builtins"
  2717. Disable built-in declarations of functions that are not mandated by
  2718. \&\s-1ANSI/ISO C. \s0 These include \f(CW\*(C`ffs\*(C'\fR, \f(CW\*(C`alloca\*(C'\fR, \f(CW\*(C`_exit\*(C'\fR,
  2719. \&\f(CW\*(C`index\*(C'\fR, \f(CW\*(C`bzero\*(C'\fR, \f(CW\*(C`conjf\*(C'\fR, and other related functions.
  2720. .IP "\fB\-fnothrow\-opt\fR" 4
  2721. .IX Item "-fnothrow-opt"
  2722. Treat a \f(CW\*(C`throw()\*(C'\fR exception specification as if it were a
  2723. \&\f(CW\*(C`noexcept\*(C'\fR specification to reduce or eliminate the text size
  2724. overhead relative to a function with no exception specification. If
  2725. the function has local variables of types with non-trivial
  2726. destructors, the exception specification actually makes the
  2727. function smaller because the \s-1EH\s0 cleanups for those variables can be
  2728. optimized away. The semantic effect is that an exception thrown out of
  2729. a function with such an exception specification results in a call
  2730. to \f(CW\*(C`terminate\*(C'\fR rather than \f(CW\*(C`unexpected\*(C'\fR.
  2731. .IP "\fB\-fno\-operator\-names\fR" 4
  2732. .IX Item "-fno-operator-names"
  2733. Do not treat the operator name keywords \f(CW\*(C`and\*(C'\fR, \f(CW\*(C`bitand\*(C'\fR,
  2734. \&\f(CW\*(C`bitor\*(C'\fR, \f(CW\*(C`compl\*(C'\fR, \f(CW\*(C`not\*(C'\fR, \f(CW\*(C`or\*(C'\fR and \f(CW\*(C`xor\*(C'\fR as
  2735. synonyms as keywords.
  2736. .IP "\fB\-fno\-optional\-diags\fR" 4
  2737. .IX Item "-fno-optional-diags"
  2738. Disable diagnostics that the standard says a compiler does not need to
  2739. issue. Currently, the only such diagnostic issued by G++ is the one for
  2740. a name having multiple meanings within a class.
  2741. .IP "\fB\-fpermissive\fR" 4
  2742. .IX Item "-fpermissive"
  2743. Downgrade some diagnostics about nonconformant code from errors to
  2744. warnings. Thus, using \fB\-fpermissive\fR allows some
  2745. nonconforming code to compile.
  2746. .IP "\fB\-fno\-pretty\-templates\fR" 4
  2747. .IX Item "-fno-pretty-templates"
  2748. When an error message refers to a specialization of a function
  2749. template, the compiler normally prints the signature of the
  2750. template followed by the template arguments and any typedefs or
  2751. typenames in the signature (e.g. \f(CW\*(C`void f(T) [with T = int]\*(C'\fR
  2752. rather than \f(CW\*(C`void f(int)\*(C'\fR) so that it's clear which template is
  2753. involved. When an error message refers to a specialization of a class
  2754. template, the compiler omits any template arguments that match
  2755. the default template arguments for that template. If either of these
  2756. behaviors make it harder to understand the error message rather than
  2757. easier, you can use \fB\-fno\-pretty\-templates\fR to disable them.
  2758. .IP "\fB\-fno\-rtti\fR" 4
  2759. .IX Item "-fno-rtti"
  2760. Disable generation of information about every class with virtual
  2761. functions for use by the \*(C+ run-time type identification features
  2762. (\f(CW\*(C`dynamic_cast\*(C'\fR and \f(CW\*(C`typeid\*(C'\fR). If you don't use those parts
  2763. of the language, you can save some space by using this flag. Note that
  2764. exception handling uses the same information, but G++ generates it as
  2765. needed. The \f(CW\*(C`dynamic_cast\*(C'\fR operator can still be used for casts that
  2766. do not require run-time type information, i.e. casts to \f(CW\*(C`void *\*(C'\fR or to
  2767. unambiguous base classes.
  2768. .Sp
  2769. Mixing code compiled with \fB\-frtti\fR with that compiled with
  2770. \&\fB\-fno\-rtti\fR may not work. For example, programs may
  2771. fail to link if a class compiled with \fB\-fno\-rtti\fR is used as a base
  2772. for a class compiled with \fB\-frtti\fR.
  2773. .IP "\fB\-fsized\-deallocation\fR" 4
  2774. .IX Item "-fsized-deallocation"
  2775. Enable the built-in global declarations
  2776. .Sp
  2777. .Vb 2
  2778. \& void operator delete (void *, std::size_t) noexcept;
  2779. \& void operator delete[] (void *, std::size_t) noexcept;
  2780. .Ve
  2781. .Sp
  2782. as introduced in \*(C+14. This is useful for user-defined replacement
  2783. deallocation functions that, for example, use the size of the object
  2784. to make deallocation faster. Enabled by default under
  2785. \&\fB\-std=c++14\fR and above. The flag \fB\-Wsized\-deallocation\fR
  2786. warns about places that might want to add a definition.
  2787. .IP "\fB\-fstrict\-enums\fR" 4
  2788. .IX Item "-fstrict-enums"
  2789. Allow the compiler to optimize using the assumption that a value of
  2790. enumerated type can only be one of the values of the enumeration (as
  2791. defined in the \*(C+ standard; basically, a value that can be
  2792. represented in the minimum number of bits needed to represent all the
  2793. enumerators). This assumption may not be valid if the program uses a
  2794. cast to convert an arbitrary integer value to the enumerated type.
  2795. .IP "\fB\-fstrong\-eval\-order\fR" 4
  2796. .IX Item "-fstrong-eval-order"
  2797. Evaluate member access, array subscripting, and shift expressions in
  2798. left-to-right order, and evaluate assignment in right-to-left order,
  2799. as adopted for \*(C+17. Enabled by default with \fB\-std=c++17\fR.
  2800. \&\fB\-fstrong\-eval\-order=some\fR enables just the ordering of member
  2801. access and shift expressions, and is the default without
  2802. \&\fB\-std=c++17\fR.
  2803. .IP "\fB\-ftemplate\-backtrace\-limit=\fR\fIn\fR" 4
  2804. .IX Item "-ftemplate-backtrace-limit=n"
  2805. Set the maximum number of template instantiation notes for a single
  2806. warning or error to \fIn\fR. The default value is 10.
  2807. .IP "\fB\-ftemplate\-depth=\fR\fIn\fR" 4
  2808. .IX Item "-ftemplate-depth=n"
  2809. Set the maximum instantiation depth for template classes to \fIn\fR.
  2810. A limit on the template instantiation depth is needed to detect
  2811. endless recursions during template class instantiation. \s-1ANSI/ISO \*(C+\s0
  2812. conforming programs must not rely on a maximum depth greater than 17
  2813. (changed to 1024 in \*(C+11). The default value is 900, as the compiler
  2814. can run out of stack space before hitting 1024 in some situations.
  2815. .IP "\fB\-fno\-threadsafe\-statics\fR" 4
  2816. .IX Item "-fno-threadsafe-statics"
  2817. Do not emit the extra code to use the routines specified in the \*(C+
  2818. \&\s-1ABI\s0 for thread-safe initialization of local statics. You can use this
  2819. option to reduce code size slightly in code that doesn't need to be
  2820. thread-safe.
  2821. .IP "\fB\-fuse\-cxa\-atexit\fR" 4
  2822. .IX Item "-fuse-cxa-atexit"
  2823. Register destructors for objects with static storage duration with the
  2824. \&\f(CW\*(C`_\|_cxa_atexit\*(C'\fR function rather than the \f(CW\*(C`atexit\*(C'\fR function.
  2825. This option is required for fully standards-compliant handling of static
  2826. destructors, but only works if your C library supports
  2827. \&\f(CW\*(C`_\|_cxa_atexit\*(C'\fR.
  2828. .IP "\fB\-fno\-use\-cxa\-get\-exception\-ptr\fR" 4
  2829. .IX Item "-fno-use-cxa-get-exception-ptr"
  2830. Don't use the \f(CW\*(C`_\|_cxa_get_exception_ptr\*(C'\fR runtime routine. This
  2831. causes \f(CW\*(C`std::uncaught_exception\*(C'\fR to be incorrect, but is necessary
  2832. if the runtime routine is not available.
  2833. .IP "\fB\-fvisibility\-inlines\-hidden\fR" 4
  2834. .IX Item "-fvisibility-inlines-hidden"
  2835. This switch declares that the user does not attempt to compare
  2836. pointers to inline functions or methods where the addresses of the two functions
  2837. are taken in different shared objects.
  2838. .Sp
  2839. The effect of this is that \s-1GCC\s0 may, effectively, mark inline methods with
  2840. \&\f(CW\*(C`_\|_attribute_\|_ ((visibility ("hidden")))\*(C'\fR so that they do not
  2841. appear in the export table of a \s-1DSO\s0 and do not require a \s-1PLT\s0 indirection
  2842. when used within the \s-1DSO. \s0 Enabling this option can have a dramatic effect
  2843. on load and link times of a \s-1DSO\s0 as it massively reduces the size of the
  2844. dynamic export table when the library makes heavy use of templates.
  2845. .Sp
  2846. The behavior of this switch is not quite the same as marking the
  2847. methods as hidden directly, because it does not affect static variables
  2848. local to the function or cause the compiler to deduce that
  2849. the function is defined in only one shared object.
  2850. .Sp
  2851. You may mark a method as having a visibility explicitly to negate the
  2852. effect of the switch for that method. For example, if you do want to
  2853. compare pointers to a particular inline method, you might mark it as
  2854. having default visibility. Marking the enclosing class with explicit
  2855. visibility has no effect.
  2856. .Sp
  2857. Explicitly instantiated inline methods are unaffected by this option
  2858. as their linkage might otherwise cross a shared library boundary.
  2859. .IP "\fB\-fvisibility\-ms\-compat\fR" 4
  2860. .IX Item "-fvisibility-ms-compat"
  2861. This flag attempts to use visibility settings to make \s-1GCC\s0's \*(C+
  2862. linkage model compatible with that of Microsoft Visual Studio.
  2863. .Sp
  2864. The flag makes these changes to \s-1GCC\s0's linkage model:
  2865. .RS 4
  2866. .IP "1." 4
  2867. .IX Item "1."
  2868. It sets the default visibility to \f(CW\*(C`hidden\*(C'\fR, like
  2869. \&\fB\-fvisibility=hidden\fR.
  2870. .IP "2." 4
  2871. .IX Item "2."
  2872. Types, but not their members, are not hidden by default.
  2873. .IP "3." 4
  2874. .IX Item "3."
  2875. The One Definition Rule is relaxed for types without explicit
  2876. visibility specifications that are defined in more than one
  2877. shared object: those declarations are permitted if they are
  2878. permitted when this option is not used.
  2879. .RE
  2880. .RS 4
  2881. .Sp
  2882. In new code it is better to use \fB\-fvisibility=hidden\fR and
  2883. export those classes that are intended to be externally visible.
  2884. Unfortunately it is possible for code to rely, perhaps accidentally,
  2885. on the Visual Studio behavior.
  2886. .Sp
  2887. Among the consequences of these changes are that static data members
  2888. of the same type with the same name but defined in different shared
  2889. objects are different, so changing one does not change the other;
  2890. and that pointers to function members defined in different shared
  2891. objects may not compare equal. When this flag is given, it is a
  2892. violation of the \s-1ODR\s0 to define types with the same name differently.
  2893. .RE
  2894. .IP "\fB\-fno\-weak\fR" 4
  2895. .IX Item "-fno-weak"
  2896. Do not use weak symbol support, even if it is provided by the linker.
  2897. By default, G++ uses weak symbols if they are available. This
  2898. option exists only for testing, and should not be used by end-users;
  2899. it results in inferior code and has no benefits. This option may
  2900. be removed in a future release of G++.
  2901. .IP "\fB\-fext\-numeric\-literals\fR (\*(C+ and Objective\-\*(C+ only)" 4
  2902. .IX Item "-fext-numeric-literals ( and Objective- only)"
  2903. Accept imaginary, fixed-point, or machine-defined
  2904. literal number suffixes as \s-1GNU\s0 extensions.
  2905. When this option is turned off these suffixes are treated
  2906. as \*(C+11 user-defined literal numeric suffixes.
  2907. This is on by default for all pre\-\*(C+11 dialects and all \s-1GNU\s0 dialects:
  2908. \&\fB\-std=c++98\fR, \fB\-std=gnu++98\fR, \fB\-std=gnu++11\fR,
  2909. \&\fB\-std=gnu++14\fR.
  2910. This option is off by default
  2911. for \s-1ISO \*(C+11\s0 onwards (\fB\-std=c++11\fR, ...).
  2912. .IP "\fB\-nostdinc++\fR" 4
  2913. .IX Item "-nostdinc++"
  2914. Do not search for header files in the standard directories specific to
  2915. \&\*(C+, but do still search the other standard directories. (This option
  2916. is used when building the \*(C+ library.)
  2917. .PP
  2918. In addition, these warning options have meanings only for \*(C+ programs:
  2919. .IP "\fB\-Wabi\-tag\fR (\*(C+ and Objective\-\*(C+ only)" 4
  2920. .IX Item "-Wabi-tag ( and Objective- only)"
  2921. Warn when a type with an \s-1ABI\s0 tag is used in a context that does not
  2922. have that \s-1ABI\s0 tag. See \fB\*(C+ Attributes\fR for more information
  2923. about \s-1ABI\s0 tags.
  2924. .IP "\fB\-Wcomma\-subscript\fR (\*(C+ and Objective\-\*(C+ only)" 4
  2925. .IX Item "-Wcomma-subscript ( and Objective- only)"
  2926. Warn about uses of a comma expression within a subscripting expression.
  2927. This usage was deprecated in \*(C+2a. However, a comma expression wrapped
  2928. in \f(CW\*(C`( )\*(C'\fR is not deprecated. Example:
  2929. .Sp
  2930. .Vb 4
  2931. \& void f(int *a, int b, int c) {
  2932. \& a[b,c]; // deprecated
  2933. \& a[(b,c)]; // OK
  2934. \& }
  2935. .Ve
  2936. .Sp
  2937. Enabled by default with \fB\-std=c++2a\fR.
  2938. .IP "\fB\-Wctor\-dtor\-privacy\fR (\*(C+ and Objective\-\*(C+ only)" 4
  2939. .IX Item "-Wctor-dtor-privacy ( and Objective- only)"
  2940. Warn when a class seems unusable because all the constructors or
  2941. destructors in that class are private, and it has neither friends nor
  2942. public static member functions. Also warn if there are no non-private
  2943. methods, and there's at least one private member function that isn't
  2944. a constructor or destructor.
  2945. .IP "\fB\-Wdelete\-non\-virtual\-dtor\fR (\*(C+ and Objective\-\*(C+ only)" 4
  2946. .IX Item "-Wdelete-non-virtual-dtor ( and Objective- only)"
  2947. Warn when \f(CW\*(C`delete\*(C'\fR is used to destroy an instance of a class that
  2948. has virtual functions and non-virtual destructor. It is unsafe to delete
  2949. an instance of a derived class through a pointer to a base class if the
  2950. base class does not have a virtual destructor. This warning is enabled
  2951. by \fB\-Wall\fR.
  2952. .IP "\fB\-Wdeprecated\-copy\fR (\*(C+ and Objective\-\*(C+ only)" 4
  2953. .IX Item "-Wdeprecated-copy ( and Objective- only)"
  2954. Warn that the implicit declaration of a copy constructor or copy
  2955. assignment operator is deprecated if the class has a user-provided
  2956. copy constructor or copy assignment operator, in \*(C+11 and up. This
  2957. warning is enabled by \fB\-Wextra\fR. With
  2958. \&\fB\-Wdeprecated\-copy\-dtor\fR, also deprecate if the class has a
  2959. user-provided destructor.
  2960. .IP "\fB\-Wno\-init\-list\-lifetime\fR (\*(C+ and Objective\-\*(C+ only)" 4
  2961. .IX Item "-Wno-init-list-lifetime ( and Objective- only)"
  2962. Do not warn about uses of \f(CW\*(C`std::initializer_list\*(C'\fR that are likely
  2963. to result in dangling pointers. Since the underlying array for an
  2964. \&\f(CW\*(C`initializer_list\*(C'\fR is handled like a normal \*(C+ temporary object,
  2965. it is easy to inadvertently keep a pointer to the array past the end
  2966. of the array's lifetime. For example:
  2967. .RS 4
  2968. .IP "*" 4
  2969. If a function returns a temporary \f(CW\*(C`initializer_list\*(C'\fR, or a local
  2970. \&\f(CW\*(C`initializer_list\*(C'\fR variable, the array's lifetime ends at the end
  2971. of the return statement, so the value returned has a dangling pointer.
  2972. .IP "*" 4
  2973. If a new-expression creates an \f(CW\*(C`initializer_list\*(C'\fR, the array only
  2974. lives until the end of the enclosing full-expression, so the
  2975. \&\f(CW\*(C`initializer_list\*(C'\fR in the heap has a dangling pointer.
  2976. .IP "*" 4
  2977. When an \f(CW\*(C`initializer_list\*(C'\fR variable is assigned from a
  2978. brace-enclosed initializer list, the temporary array created for the
  2979. right side of the assignment only lives until the end of the
  2980. full-expression, so at the next statement the \f(CW\*(C`initializer_list\*(C'\fR
  2981. variable has a dangling pointer.
  2982. .Sp
  2983. .Vb 6
  2984. \& // li\*(Aqs initial underlying array lives as long as li
  2985. \& std::initializer_list<int> li = { 1,2,3 };
  2986. \& // assignment changes li to point to a temporary array
  2987. \& li = { 4, 5 };
  2988. \& // now the temporary is gone and li has a dangling pointer
  2989. \& int i = li.begin()[0] // undefined behavior
  2990. .Ve
  2991. .IP "*" 4
  2992. When a list constructor stores the \f(CW\*(C`begin\*(C'\fR pointer from the
  2993. \&\f(CW\*(C`initializer_list\*(C'\fR argument, this doesn't extend the lifetime of
  2994. the array, so if a class variable is constructed from a temporary
  2995. \&\f(CW\*(C`initializer_list\*(C'\fR, the pointer is left dangling by the end of
  2996. the variable declaration statement.
  2997. .RE
  2998. .RS 4
  2999. .RE
  3000. .IP "\fB\-Wno\-literal\-suffix\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3001. .IX Item "-Wno-literal-suffix ( and Objective- only)"
  3002. Do not warn when a string or character literal is followed by a
  3003. ud-suffix which does not begin with an underscore. As a conforming
  3004. extension, \s-1GCC\s0 treats such suffixes as separate preprocessing tokens
  3005. in order to maintain backwards compatibility with code that uses
  3006. formatting macros from \f(CW\*(C`<inttypes.h>\*(C'\fR. For example:
  3007. .Sp
  3008. .Vb 3
  3009. \& #define _\|_STDC_FORMAT_MACROS
  3010. \& #include <inttypes.h>
  3011. \& #include <stdio.h>
  3012. \&
  3013. \& int main() {
  3014. \& int64_t i64 = 123;
  3015. \& printf("My int64: %" PRId64"\en", i64);
  3016. \& }
  3017. .Ve
  3018. .Sp
  3019. In this case, \f(CW\*(C`PRId64\*(C'\fR is treated as a separate preprocessing token.
  3020. .Sp
  3021. This option also controls warnings when a user-defined literal
  3022. operator is declared with a literal suffix identifier that doesn't
  3023. begin with an underscore. Literal suffix identifiers that don't begin
  3024. with an underscore are reserved for future standardization.
  3025. .Sp
  3026. These warnings are enabled by default.
  3027. .IP "\fB\-Wno\-narrowing\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3028. .IX Item "-Wno-narrowing ( and Objective- only)"
  3029. For \*(C+11 and later standards, narrowing conversions are diagnosed by default,
  3030. as required by the standard. A narrowing conversion from a constant produces
  3031. an error, and a narrowing conversion from a non-constant produces a warning,
  3032. but \fB\-Wno\-narrowing\fR suppresses the diagnostic.
  3033. Note that this does not affect the meaning of well-formed code;
  3034. narrowing conversions are still considered ill-formed in \s-1SFINAE\s0 contexts.
  3035. .Sp
  3036. With \fB\-Wnarrowing\fR in \*(C+98, warn when a narrowing
  3037. conversion prohibited by \*(C+11 occurs within
  3038. \&\fB{ }\fR, e.g.
  3039. .Sp
  3040. .Vb 1
  3041. \& int i = { 2.2 }; // error: narrowing from double to int
  3042. .Ve
  3043. .Sp
  3044. This flag is included in \fB\-Wall\fR and \fB\-Wc++11\-compat\fR.
  3045. .IP "\fB\-Wnoexcept\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3046. .IX Item "-Wnoexcept ( and Objective- only)"
  3047. Warn when a noexcept-expression evaluates to false because of a call
  3048. to a function that does not have a non-throwing exception
  3049. specification (i.e. \f(CW\*(C`throw()\*(C'\fR or \f(CW\*(C`noexcept\*(C'\fR) but is known by
  3050. the compiler to never throw an exception.
  3051. .IP "\fB\-Wnoexcept\-type\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3052. .IX Item "-Wnoexcept-type ( and Objective- only)"
  3053. Warn if the \*(C+17 feature making \f(CW\*(C`noexcept\*(C'\fR part of a function
  3054. type changes the mangled name of a symbol relative to \*(C+14. Enabled
  3055. by \fB\-Wabi\fR and \fB\-Wc++17\-compat\fR.
  3056. .Sp
  3057. As an example:
  3058. .Sp
  3059. .Vb 3
  3060. \& template <class T> void f(T t) { t(); };
  3061. \& void g() noexcept;
  3062. \& void h() { f(g); }
  3063. .Ve
  3064. .Sp
  3065. In \*(C+14, \f(CW\*(C`f\*(C'\fR calls \f(CW\*(C`f<void(*)()>\*(C'\fR, but in
  3066. \&\*(C+17 it calls \f(CW\*(C`f<void(*)()noexcept>\*(C'\fR.
  3067. .IP "\fB\-Wclass\-memaccess\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3068. .IX Item "-Wclass-memaccess ( and Objective- only)"
  3069. Warn when the destination of a call to a raw memory function such as
  3070. \&\f(CW\*(C`memset\*(C'\fR or \f(CW\*(C`memcpy\*(C'\fR is an object of class type, and when writing
  3071. into such an object might bypass the class non-trivial or deleted constructor
  3072. or copy assignment, violate const-correctness or encapsulation, or corrupt
  3073. virtual table pointers. Modifying the representation of such objects may
  3074. violate invariants maintained by member functions of the class. For example,
  3075. the call to \f(CW\*(C`memset\*(C'\fR below is undefined because it modifies a non-trivial
  3076. class object and is, therefore, diagnosed. The safe way to either initialize
  3077. or clear the storage of objects of such types is by using the appropriate
  3078. constructor or assignment operator, if one is available.
  3079. .Sp
  3080. .Vb 2
  3081. \& std::string str = "abc";
  3082. \& memset (&str, 0, sizeof str);
  3083. .Ve
  3084. .Sp
  3085. The \fB\-Wclass\-memaccess\fR option is enabled by \fB\-Wall\fR.
  3086. Explicitly casting the pointer to the class object to \f(CW\*(C`void *\*(C'\fR or
  3087. to a type that can be safely accessed by the raw memory function suppresses
  3088. the warning.
  3089. .IP "\fB\-Wnon\-virtual\-dtor\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3090. .IX Item "-Wnon-virtual-dtor ( and Objective- only)"
  3091. Warn when a class has virtual functions and an accessible non-virtual
  3092. destructor itself or in an accessible polymorphic base class, in which
  3093. case it is possible but unsafe to delete an instance of a derived
  3094. class through a pointer to the class itself or base class. This
  3095. warning is automatically enabled if \fB\-Weffc++\fR is specified.
  3096. .IP "\fB\-Wregister\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3097. .IX Item "-Wregister ( and Objective- only)"
  3098. Warn on uses of the \f(CW\*(C`register\*(C'\fR storage class specifier, except
  3099. when it is part of the \s-1GNU \s0\fBExplicit Register Variables\fR extension.
  3100. The use of the \f(CW\*(C`register\*(C'\fR keyword as storage class specifier has
  3101. been deprecated in \*(C+11 and removed in \*(C+17.
  3102. Enabled by default with \fB\-std=c++17\fR.
  3103. .IP "\fB\-Wreorder\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3104. .IX Item "-Wreorder ( and Objective- only)"
  3105. Warn when the order of member initializers given in the code does not
  3106. match the order in which they must be executed. For instance:
  3107. .Sp
  3108. .Vb 5
  3109. \& struct A {
  3110. \& int i;
  3111. \& int j;
  3112. \& A(): j (0), i (1) { }
  3113. \& };
  3114. .Ve
  3115. .Sp
  3116. The compiler rearranges the member initializers for \f(CW\*(C`i\*(C'\fR
  3117. and \f(CW\*(C`j\*(C'\fR to match the declaration order of the members, emitting
  3118. a warning to that effect. This warning is enabled by \fB\-Wall\fR.
  3119. .IP "\fB\-Wno\-pessimizing\-move\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3120. .IX Item "-Wno-pessimizing-move ( and Objective- only)"
  3121. This warning warns when a call to \f(CW\*(C`std::move\*(C'\fR prevents copy
  3122. elision. A typical scenario when copy elision can occur is when returning in
  3123. a function with a class return type, when the expression being returned is the
  3124. name of a non-volatile automatic object, and is not a function parameter, and
  3125. has the same type as the function return type.
  3126. .Sp
  3127. .Vb 9
  3128. \& struct T {
  3129. \& ...
  3130. \& };
  3131. \& T fn()
  3132. \& {
  3133. \& T t;
  3134. \& ...
  3135. \& return std::move (t);
  3136. \& }
  3137. .Ve
  3138. .Sp
  3139. But in this example, the \f(CW\*(C`std::move\*(C'\fR call prevents copy elision.
  3140. .Sp
  3141. This warning is enabled by \fB\-Wall\fR.
  3142. .IP "\fB\-Wno\-redundant\-move\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3143. .IX Item "-Wno-redundant-move ( and Objective- only)"
  3144. This warning warns about redundant calls to \f(CW\*(C`std::move\*(C'\fR; that is, when
  3145. a move operation would have been performed even without the \f(CW\*(C`std::move\*(C'\fR
  3146. call. This happens because the compiler is forced to treat the object as if
  3147. it were an rvalue in certain situations such as returning a local variable,
  3148. where copy elision isn't applicable. Consider:
  3149. .Sp
  3150. .Vb 8
  3151. \& struct T {
  3152. \& ...
  3153. \& };
  3154. \& T fn(T t)
  3155. \& {
  3156. \& ...
  3157. \& return std::move (t);
  3158. \& }
  3159. .Ve
  3160. .Sp
  3161. Here, the \f(CW\*(C`std::move\*(C'\fR call is redundant. Because G++ implements Core
  3162. Issue 1579, another example is:
  3163. .Sp
  3164. .Vb 12
  3165. \& struct T { // convertible to U
  3166. \& ...
  3167. \& };
  3168. \& struct U {
  3169. \& ...
  3170. \& };
  3171. \& U fn()
  3172. \& {
  3173. \& T t;
  3174. \& ...
  3175. \& return std::move (t);
  3176. \& }
  3177. .Ve
  3178. .Sp
  3179. In this example, copy elision isn't applicable because the type of the
  3180. expression being returned and the function return type differ, yet G++
  3181. treats the return value as if it were designated by an rvalue.
  3182. .Sp
  3183. This warning is enabled by \fB\-Wextra\fR.
  3184. .IP "\fB\-Wredundant\-tags\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3185. .IX Item "-Wredundant-tags ( and Objective- only)"
  3186. Warn about redundant class-key and enum-key in references to class types
  3187. and enumerated types in contexts where the key can be eliminated without
  3188. causing an ambiguity. For example:
  3189. .Sp
  3190. .Vb 2
  3191. \& struct foo;
  3192. \& struct foo *p; // warn that keyword struct can be eliminated
  3193. .Ve
  3194. .Sp
  3195. On the other hand, in this example there is no warning:
  3196. .Sp
  3197. .Vb 3
  3198. \& struct foo;
  3199. \& void foo (); // "hides" struct foo
  3200. \& void bar (struct foo&); // no warning, keyword struct is necessary
  3201. .Ve
  3202. .IP "\fB\-Wno\-subobject\-linkage\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3203. .IX Item "-Wno-subobject-linkage ( and Objective- only)"
  3204. Do not warn
  3205. if a class type has a base or a field whose type uses the anonymous
  3206. namespace or depends on a type with no linkage. If a type A depends on
  3207. a type B with no or internal linkage, defining it in multiple
  3208. translation units would be an \s-1ODR\s0 violation because the meaning of B
  3209. is different in each translation unit. If A only appears in a single
  3210. translation unit, the best way to silence the warning is to give it
  3211. internal linkage by putting it in an anonymous namespace as well. The
  3212. compiler doesn't give this warning for types defined in the main .C
  3213. file, as those are unlikely to have multiple definitions.
  3214. \&\fB\-Wsubobject\-linkage\fR is enabled by default.
  3215. .IP "\fB\-Weffc++\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3216. .IX Item "-Weffc++ ( and Objective- only)"
  3217. Warn about violations of the following style guidelines from Scott Meyers'
  3218. \&\fIEffective \*(C+\fR series of books:
  3219. .RS 4
  3220. .IP "*" 4
  3221. Define a copy constructor and an assignment operator for classes
  3222. with dynamically-allocated memory.
  3223. .IP "*" 4
  3224. Prefer initialization to assignment in constructors.
  3225. .IP "*" 4
  3226. Have \f(CW\*(C`operator=\*(C'\fR return a reference to \f(CW*this\fR.
  3227. .IP "*" 4
  3228. Don't try to return a reference when you must return an object.
  3229. .IP "*" 4
  3230. Distinguish between prefix and postfix forms of increment and
  3231. decrement operators.
  3232. .IP "*" 4
  3233. Never overload \f(CW\*(C`&&\*(C'\fR, \f(CW\*(C`||\*(C'\fR, or \f(CW\*(C`,\*(C'\fR.
  3234. .RE
  3235. .RS 4
  3236. .Sp
  3237. This option also enables \fB\-Wnon\-virtual\-dtor\fR, which is also
  3238. one of the effective \*(C+ recommendations. However, the check is
  3239. extended to warn about the lack of virtual destructor in accessible
  3240. non-polymorphic bases classes too.
  3241. .Sp
  3242. When selecting this option, be aware that the standard library
  3243. headers do not obey all of these guidelines; use \fBgrep \-v\fR
  3244. to filter out those warnings.
  3245. .RE
  3246. .IP "\fB\-Wstrict\-null\-sentinel\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3247. .IX Item "-Wstrict-null-sentinel ( and Objective- only)"
  3248. Warn about the use of an uncasted \f(CW\*(C`NULL\*(C'\fR as sentinel. When
  3249. compiling only with \s-1GCC\s0 this is a valid sentinel, as \f(CW\*(C`NULL\*(C'\fR is defined
  3250. to \f(CW\*(C`_\|_null\*(C'\fR. Although it is a null pointer constant rather than a
  3251. null pointer, it is guaranteed to be of the same size as a pointer.
  3252. But this use is not portable across different compilers.
  3253. .IP "\fB\-Wno\-non\-template\-friend\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3254. .IX Item "-Wno-non-template-friend ( and Objective- only)"
  3255. Disable warnings when non-template friend functions are declared
  3256. within a template. In very old versions of \s-1GCC\s0 that predate implementation
  3257. of the \s-1ISO\s0 standard, declarations such as
  3258. \&\fBfriend int foo(int)\fR, where the name of the friend is an unqualified-id,
  3259. could be interpreted as a particular specialization of a template
  3260. function; the warning exists to diagnose compatibility problems,
  3261. and is enabled by default.
  3262. .IP "\fB\-Wold\-style\-cast\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3263. .IX Item "-Wold-style-cast ( and Objective- only)"
  3264. Warn if an old-style (C\-style) cast to a non-void type is used within
  3265. a \*(C+ program. The new-style casts (\f(CW\*(C`dynamic_cast\*(C'\fR,
  3266. \&\f(CW\*(C`static_cast\*(C'\fR, \f(CW\*(C`reinterpret_cast\*(C'\fR, and \f(CW\*(C`const_cast\*(C'\fR) are
  3267. less vulnerable to unintended effects and much easier to search for.
  3268. .IP "\fB\-Woverloaded\-virtual\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3269. .IX Item "-Woverloaded-virtual ( and Objective- only)"
  3270. Warn when a function declaration hides virtual functions from a
  3271. base class. For example, in:
  3272. .Sp
  3273. .Vb 3
  3274. \& struct A {
  3275. \& virtual void f();
  3276. \& };
  3277. \&
  3278. \& struct B: public A {
  3279. \& void f(int);
  3280. \& };
  3281. .Ve
  3282. .Sp
  3283. the \f(CW\*(C`A\*(C'\fR class version of \f(CW\*(C`f\*(C'\fR is hidden in \f(CW\*(C`B\*(C'\fR, and code
  3284. like:
  3285. .Sp
  3286. .Vb 2
  3287. \& B* b;
  3288. \& b\->f();
  3289. .Ve
  3290. .Sp
  3291. fails to compile.
  3292. .IP "\fB\-Wno\-pmf\-conversions\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3293. .IX Item "-Wno-pmf-conversions ( and Objective- only)"
  3294. Disable the diagnostic for converting a bound pointer to member function
  3295. to a plain pointer.
  3296. .IP "\fB\-Wsign\-promo\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3297. .IX Item "-Wsign-promo ( and Objective- only)"
  3298. Warn when overload resolution chooses a promotion from unsigned or
  3299. enumerated type to a signed type, over a conversion to an unsigned type of
  3300. the same size. Previous versions of G++ tried to preserve
  3301. unsignedness, but the standard mandates the current behavior.
  3302. .IP "\fB\-Wtemplates\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3303. .IX Item "-Wtemplates ( and Objective- only)"
  3304. Warn when a primary template declaration is encountered. Some coding
  3305. rules disallow templates, and this may be used to enforce that rule.
  3306. The warning is inactive inside a system header file, such as the \s-1STL,\s0 so
  3307. one can still use the \s-1STL. \s0 One may also instantiate or specialize
  3308. templates.
  3309. .IP "\fB\-Wmismatched\-tags\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3310. .IX Item "-Wmismatched-tags ( and Objective- only)"
  3311. Warn for declarations of structs, classes, and class templates and their
  3312. specializations with a class-key that does not match either the definition
  3313. or the first declaration if no definition is provided.
  3314. .Sp
  3315. For example, the declaration of \f(CW\*(C`struct Object\*(C'\fR in the argument list
  3316. of \f(CW\*(C`draw\*(C'\fR triggers the warning. To avoid it, either remove the redundant
  3317. class-key \f(CW\*(C`struct\*(C'\fR or replace it with \f(CW\*(C`class\*(C'\fR to match its definition.
  3318. .Sp
  3319. .Vb 5
  3320. \& class Object {
  3321. \& public:
  3322. \& virtual ~Object () = 0;
  3323. \& };
  3324. \& void draw (struct Object*);
  3325. .Ve
  3326. .Sp
  3327. It is not wrong to declare a class with the class-key \f(CW\*(C`struct\*(C'\fR as
  3328. the example above shows. The \fB\-Wmismatched\-tags\fR option is intended
  3329. to help achieve a consistent style of class declarations. In code that is
  3330. intended to be portable to Windows-based compilers the warning helps prevent
  3331. unresolved references due to the difference in the mangling of symbols
  3332. declared with different class-keys. The option can be used either on its
  3333. own or in conjunction with \fB\-Wredundant\-tags\fR.
  3334. .IP "\fB\-Wmultiple\-inheritance\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3335. .IX Item "-Wmultiple-inheritance ( and Objective- only)"
  3336. Warn when a class is defined with multiple direct base classes. Some
  3337. coding rules disallow multiple inheritance, and this may be used to
  3338. enforce that rule. The warning is inactive inside a system header file,
  3339. such as the \s-1STL,\s0 so one can still use the \s-1STL. \s0 One may also define
  3340. classes that indirectly use multiple inheritance.
  3341. .IP "\fB\-Wvirtual\-inheritance\fR" 4
  3342. .IX Item "-Wvirtual-inheritance"
  3343. Warn when a class is defined with a virtual direct base class. Some
  3344. coding rules disallow multiple inheritance, and this may be used to
  3345. enforce that rule. The warning is inactive inside a system header file,
  3346. such as the \s-1STL,\s0 so one can still use the \s-1STL. \s0 One may also define
  3347. classes that indirectly use virtual inheritance.
  3348. .IP "\fB\-Wno\-virtual\-move\-assign\fR" 4
  3349. .IX Item "-Wno-virtual-move-assign"
  3350. Suppress warnings about inheriting from a virtual base with a
  3351. non-trivial \*(C+11 move assignment operator. This is dangerous because
  3352. if the virtual base is reachable along more than one path, it is
  3353. moved multiple times, which can mean both objects end up in the
  3354. moved-from state. If the move assignment operator is written to avoid
  3355. moving from a moved-from object, this warning can be disabled.
  3356. .IP "\fB\-Wnamespaces\fR" 4
  3357. .IX Item "-Wnamespaces"
  3358. Warn when a namespace definition is opened. Some coding rules disallow
  3359. namespaces, and this may be used to enforce that rule. The warning is
  3360. inactive inside a system header file, such as the \s-1STL,\s0 so one can still
  3361. use the \s-1STL. \s0 One may also use using directives and qualified names.
  3362. .IP "\fB\-Wno\-terminate\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3363. .IX Item "-Wno-terminate ( and Objective- only)"
  3364. Disable the warning about a throw-expression that will immediately
  3365. result in a call to \f(CW\*(C`terminate\*(C'\fR.
  3366. .IP "\fB\-Wno\-class\-conversion\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3367. .IX Item "-Wno-class-conversion ( and Objective- only)"
  3368. Do not warn when a conversion function converts an
  3369. object to the same type, to a base class of that type, or to void; such
  3370. a conversion function will never be called.
  3371. .IP "\fB\-Wvolatile\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3372. .IX Item "-Wvolatile ( and Objective- only)"
  3373. Warn about deprecated uses of the \f(CW\*(C`volatile\*(C'\fR qualifier. This includes
  3374. postfix and prefix \f(CW\*(C`++\*(C'\fR and \f(CW\*(C`\-\-\*(C'\fR expressions of
  3375. \&\f(CW\*(C`volatile\*(C'\fR\-qualified types, using simple assignments where the left
  3376. operand is a \f(CW\*(C`volatile\*(C'\fR\-qualified non-class type for their value,
  3377. compound assignments where the left operand is a \f(CW\*(C`volatile\*(C'\fR\-qualified
  3378. non-class type, \f(CW\*(C`volatile\*(C'\fR\-qualified function return type,
  3379. \&\f(CW\*(C`volatile\*(C'\fR\-qualified parameter type, and structured bindings of a
  3380. \&\f(CW\*(C`volatile\*(C'\fR\-qualified type. This usage was deprecated in \*(C+20.
  3381. .Sp
  3382. Enabled by default with \fB\-std=c++2a\fR.
  3383. .IP "\fB\-Wzero\-as\-null\-pointer\-constant\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3384. .IX Item "-Wzero-as-null-pointer-constant ( and Objective- only)"
  3385. Warn when a literal \fB0\fR is used as null pointer constant. This can
  3386. be useful to facilitate the conversion to \f(CW\*(C`nullptr\*(C'\fR in \*(C+11.
  3387. .IP "\fB\-Waligned\-new\fR" 4
  3388. .IX Item "-Waligned-new"
  3389. Warn about a new-expression of a type that requires greater alignment
  3390. than the \f(CW\*(C`alignof(std::max_align_t)\*(C'\fR but uses an allocation
  3391. function without an explicit alignment parameter. This option is
  3392. enabled by \fB\-Wall\fR.
  3393. .Sp
  3394. Normally this only warns about global allocation functions, but
  3395. \&\fB\-Waligned\-new=all\fR also warns about class member allocation
  3396. functions.
  3397. .IP "\fB\-Wno\-placement\-new\fR" 4
  3398. .IX Item "-Wno-placement-new"
  3399. .PD 0
  3400. .IP "\fB\-Wplacement\-new=\fR\fIn\fR" 4
  3401. .IX Item "-Wplacement-new=n"
  3402. .PD
  3403. Warn about placement new expressions with undefined behavior, such as
  3404. constructing an object in a buffer that is smaller than the type of
  3405. the object. For example, the placement new expression below is diagnosed
  3406. because it attempts to construct an array of 64 integers in a buffer only
  3407. 64 bytes large.
  3408. .Sp
  3409. .Vb 2
  3410. \& char buf [64];
  3411. \& new (buf) int[64];
  3412. .Ve
  3413. .Sp
  3414. This warning is enabled by default.
  3415. .RS 4
  3416. .IP "\fB\-Wplacement\-new=1\fR" 4
  3417. .IX Item "-Wplacement-new=1"
  3418. This is the default warning level of \fB\-Wplacement\-new\fR. At this
  3419. level the warning is not issued for some strictly undefined constructs that
  3420. \&\s-1GCC\s0 allows as extensions for compatibility with legacy code. For example,
  3421. the following \f(CW\*(C`new\*(C'\fR expression is not diagnosed at this level even
  3422. though it has undefined behavior according to the \*(C+ standard because
  3423. it writes past the end of the one-element array.
  3424. .Sp
  3425. .Vb 3
  3426. \& struct S { int n, a[1]; };
  3427. \& S *s = (S *)malloc (sizeof *s + 31 * sizeof s\->a[0]);
  3428. \& new (s\->a)int [32]();
  3429. .Ve
  3430. .IP "\fB\-Wplacement\-new=2\fR" 4
  3431. .IX Item "-Wplacement-new=2"
  3432. At this level, in addition to diagnosing all the same constructs as at level
  3433. 1, a diagnostic is also issued for placement new expressions that construct
  3434. an object in the last member of structure whose type is an array of a single
  3435. element and whose size is less than the size of the object being constructed.
  3436. While the previous example would be diagnosed, the following construct makes
  3437. use of the flexible member array extension to avoid the warning at level 2.
  3438. .Sp
  3439. .Vb 3
  3440. \& struct S { int n, a[]; };
  3441. \& S *s = (S *)malloc (sizeof *s + 32 * sizeof s\->a[0]);
  3442. \& new (s\->a)int [32]();
  3443. .Ve
  3444. .RE
  3445. .RS 4
  3446. .RE
  3447. .IP "\fB\-Wcatch\-value\fR" 4
  3448. .IX Item "-Wcatch-value"
  3449. .PD 0
  3450. .IP "\fB\-Wcatch\-value=\fR\fIn\fR\fB \fR(\*(C+ and Objective\-\*(C+ only)" 4
  3451. .IX Item "-Wcatch-value=n ( and Objective- only)"
  3452. .PD
  3453. Warn about catch handlers that do not catch via reference.
  3454. With \fB\-Wcatch\-value=1\fR (or \fB\-Wcatch\-value\fR for short)
  3455. warn about polymorphic class types that are caught by value.
  3456. With \fB\-Wcatch\-value=2\fR warn about all class types that are caught
  3457. by value. With \fB\-Wcatch\-value=3\fR warn about all types that are
  3458. not caught by reference. \fB\-Wcatch\-value\fR is enabled by \fB\-Wall\fR.
  3459. .IP "\fB\-Wconditionally\-supported\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3460. .IX Item "-Wconditionally-supported ( and Objective- only)"
  3461. Warn for conditionally-supported (\*(C+11 [intro.defs]) constructs.
  3462. .IP "\fB\-Wno\-delete\-incomplete\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3463. .IX Item "-Wno-delete-incomplete ( and Objective- only)"
  3464. Do not warn when deleting a pointer to incomplete type, which may cause
  3465. undefined behavior at runtime. This warning is enabled by default.
  3466. .IP "\fB\-Wextra\-semi\fR (\*(C+, Objective\-\*(C+ only)" 4
  3467. .IX Item "-Wextra-semi (, Objective- only)"
  3468. Warn about redundant semicolons after in-class function definitions.
  3469. .IP "\fB\-Wno\-inaccessible\-base\fR (\*(C+, Objective\-\*(C+ only)" 4
  3470. .IX Item "-Wno-inaccessible-base (, Objective- only)"
  3471. This option controls warnings
  3472. when a base class is inaccessible in a class derived from it due to
  3473. ambiguity. The warning is enabled by default.
  3474. Note that the warning for ambiguous virtual
  3475. bases is enabled by the \fB\-Wextra\fR option.
  3476. .Sp
  3477. .Vb 1
  3478. \& struct A { int a; };
  3479. \&
  3480. \& struct B : A { };
  3481. \&
  3482. \& struct C : B, A { };
  3483. .Ve
  3484. .IP "\fB\-Wno\-inherited\-variadic\-ctor\fR" 4
  3485. .IX Item "-Wno-inherited-variadic-ctor"
  3486. Suppress warnings about use of \*(C+11 inheriting constructors when the
  3487. base class inherited from has a C variadic constructor; the warning is
  3488. on by default because the ellipsis is not inherited.
  3489. .IP "\fB\-Wno\-invalid\-offsetof\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3490. .IX Item "-Wno-invalid-offsetof ( and Objective- only)"
  3491. Suppress warnings from applying the \f(CW\*(C`offsetof\*(C'\fR macro to a non-POD
  3492. type. According to the 2014 \s-1ISO \*(C+\s0 standard, applying \f(CW\*(C`offsetof\*(C'\fR
  3493. to a non-standard-layout type is undefined. In existing \*(C+ implementations,
  3494. however, \f(CW\*(C`offsetof\*(C'\fR typically gives meaningful results.
  3495. This flag is for users who are aware that they are
  3496. writing nonportable code and who have deliberately chosen to ignore the
  3497. warning about it.
  3498. .Sp
  3499. The restrictions on \f(CW\*(C`offsetof\*(C'\fR may be relaxed in a future version
  3500. of the \*(C+ standard.
  3501. .IP "\fB\-Wsized\-deallocation\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3502. .IX Item "-Wsized-deallocation ( and Objective- only)"
  3503. Warn about a definition of an unsized deallocation function
  3504. .Sp
  3505. .Vb 2
  3506. \& void operator delete (void *) noexcept;
  3507. \& void operator delete[] (void *) noexcept;
  3508. .Ve
  3509. .Sp
  3510. without a definition of the corresponding sized deallocation function
  3511. .Sp
  3512. .Vb 2
  3513. \& void operator delete (void *, std::size_t) noexcept;
  3514. \& void operator delete[] (void *, std::size_t) noexcept;
  3515. .Ve
  3516. .Sp
  3517. or vice versa. Enabled by \fB\-Wextra\fR along with
  3518. \&\fB\-fsized\-deallocation\fR.
  3519. .IP "\fB\-Wsuggest\-final\-types\fR" 4
  3520. .IX Item "-Wsuggest-final-types"
  3521. Warn about types with virtual methods where code quality would be improved
  3522. if the type were declared with the \*(C+11 \f(CW\*(C`final\*(C'\fR specifier,
  3523. or, if possible,
  3524. declared in an anonymous namespace. This allows \s-1GCC\s0 to more aggressively
  3525. devirtualize the polymorphic calls. This warning is more effective with
  3526. link-time optimization,
  3527. where the information about the class hierarchy graph is
  3528. more complete.
  3529. .IP "\fB\-Wsuggest\-final\-methods\fR" 4
  3530. .IX Item "-Wsuggest-final-methods"
  3531. Warn about virtual methods where code quality would be improved if the method
  3532. were declared with the \*(C+11 \f(CW\*(C`final\*(C'\fR specifier,
  3533. or, if possible, its type were
  3534. declared in an anonymous namespace or with the \f(CW\*(C`final\*(C'\fR specifier.
  3535. This warning is
  3536. more effective with link-time optimization, where the information about the
  3537. class hierarchy graph is more complete. It is recommended to first consider
  3538. suggestions of \fB\-Wsuggest\-final\-types\fR and then rebuild with new
  3539. annotations.
  3540. .IP "\fB\-Wsuggest\-override\fR" 4
  3541. .IX Item "-Wsuggest-override"
  3542. Warn about overriding virtual functions that are not marked with the
  3543. \&\f(CW\*(C`override\*(C'\fR keyword.
  3544. .IP "\fB\-Wuseless\-cast\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3545. .IX Item "-Wuseless-cast ( and Objective- only)"
  3546. Warn when an expression is casted to its own type.
  3547. .IP "\fB\-Wno\-conversion\-null\fR (\*(C+ and Objective\-\*(C+ only)" 4
  3548. .IX Item "-Wno-conversion-null ( and Objective- only)"
  3549. Do not warn for conversions between \f(CW\*(C`NULL\*(C'\fR and non-pointer
  3550. types. \fB\-Wconversion\-null\fR is enabled by default.
  3551. .SS "Options Controlling Objective-C and Objective\-\*(C+ Dialects"
  3552. .IX Subsection "Options Controlling Objective-C and Objective- Dialects"
  3553. (\s-1NOTE:\s0 This manual does not describe the Objective-C and Objective\-\*(C+
  3554. languages themselves.
  3555. .PP
  3556. This section describes the command-line options that are only meaningful
  3557. for Objective-C and Objective\-\*(C+ programs. You can also use most of
  3558. the language-independent \s-1GNU\s0 compiler options.
  3559. For example, you might compile a file \fIsome_class.m\fR like this:
  3560. .PP
  3561. .Vb 1
  3562. \& gcc \-g \-fgnu\-runtime \-O \-c some_class.m
  3563. .Ve
  3564. .PP
  3565. In this example, \fB\-fgnu\-runtime\fR is an option meant only for
  3566. Objective-C and Objective\-\*(C+ programs; you can use the other options with
  3567. any language supported by \s-1GCC.\s0
  3568. .PP
  3569. Note that since Objective-C is an extension of the C language, Objective-C
  3570. compilations may also use options specific to the C front-end (e.g.,
  3571. \&\fB\-Wtraditional\fR). Similarly, Objective\-\*(C+ compilations may use
  3572. \&\*(C+\-specific options (e.g., \fB\-Wabi\fR).
  3573. .PP
  3574. Here is a list of options that are \fIonly\fR for compiling Objective-C
  3575. and Objective\-\*(C+ programs:
  3576. .IP "\fB\-fconstant\-string\-class=\fR\fIclass-name\fR" 4
  3577. .IX Item "-fconstant-string-class=class-name"
  3578. Use \fIclass-name\fR as the name of the class to instantiate for each
  3579. literal string specified with the syntax \f(CW\*(C`@"..."\*(C'\fR. The default
  3580. class name is \f(CW\*(C`NXConstantString\*(C'\fR if the \s-1GNU\s0 runtime is being used, and
  3581. \&\f(CW\*(C`NSConstantString\*(C'\fR if the NeXT runtime is being used (see below). The
  3582. \&\fB\-fconstant\-cfstrings\fR option, if also present, overrides the
  3583. \&\fB\-fconstant\-string\-class\fR setting and cause \f(CW\*(C`@"..."\*(C'\fR literals
  3584. to be laid out as constant CoreFoundation strings.
  3585. .IP "\fB\-fgnu\-runtime\fR" 4
  3586. .IX Item "-fgnu-runtime"
  3587. Generate object code compatible with the standard \s-1GNU\s0 Objective-C
  3588. runtime. This is the default for most types of systems.
  3589. .IP "\fB\-fnext\-runtime\fR" 4
  3590. .IX Item "-fnext-runtime"
  3591. Generate output compatible with the NeXT runtime. This is the default
  3592. for NeXT-based systems, including Darwin and Mac \s-1OS X. \s0 The macro
  3593. \&\f(CW\*(C`_\|_NEXT_RUNTIME_\|_\*(C'\fR is predefined if (and only if) this option is
  3594. used.
  3595. .IP "\fB\-fno\-nil\-receivers\fR" 4
  3596. .IX Item "-fno-nil-receivers"
  3597. Assume that all Objective-C message dispatches (\f(CW\*(C`[receiver
  3598. message:arg]\*(C'\fR) in this translation unit ensure that the receiver is
  3599. not \f(CW\*(C`nil\*(C'\fR. This allows for more efficient entry points in the
  3600. runtime to be used. This option is only available in conjunction with
  3601. the NeXT runtime and \s-1ABI\s0 version 0 or 1.
  3602. .IP "\fB\-fobjc\-abi\-version=\fR\fIn\fR" 4
  3603. .IX Item "-fobjc-abi-version=n"
  3604. Use version \fIn\fR of the Objective-C \s-1ABI\s0 for the selected runtime.
  3605. This option is currently supported only for the NeXT runtime. In that
  3606. case, Version 0 is the traditional (32\-bit) \s-1ABI\s0 without support for
  3607. properties and other Objective-C 2.0 additions. Version 1 is the
  3608. traditional (32\-bit) \s-1ABI\s0 with support for properties and other
  3609. Objective-C 2.0 additions. Version 2 is the modern (64\-bit) \s-1ABI. \s0 If
  3610. nothing is specified, the default is Version 0 on 32\-bit target
  3611. machines, and Version 2 on 64\-bit target machines.
  3612. .IP "\fB\-fobjc\-call\-cxx\-cdtors\fR" 4
  3613. .IX Item "-fobjc-call-cxx-cdtors"
  3614. For each Objective-C class, check if any of its instance variables is a
  3615. \&\*(C+ object with a non-trivial default constructor. If so, synthesize a
  3616. special \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR instance method which runs
  3617. non-trivial default constructors on any such instance variables, in order,
  3618. and then return \f(CW\*(C`self\*(C'\fR. Similarly, check if any instance variable
  3619. is a \*(C+ object with a non-trivial destructor, and if so, synthesize a
  3620. special \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR method which runs
  3621. all such default destructors, in reverse order.
  3622. .Sp
  3623. The \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR and \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR
  3624. methods thusly generated only operate on instance variables
  3625. declared in the current Objective-C class, and not those inherited
  3626. from superclasses. It is the responsibility of the Objective-C
  3627. runtime to invoke all such methods in an object's inheritance
  3628. hierarchy. The \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR methods are invoked
  3629. by the runtime immediately after a new object instance is allocated;
  3630. the \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR methods are invoked immediately
  3631. before the runtime deallocates an object instance.
  3632. .Sp
  3633. As of this writing, only the NeXT runtime on Mac \s-1OS X 10.4\s0 and later has
  3634. support for invoking the \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR and
  3635. \&\f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR methods.
  3636. .IP "\fB\-fobjc\-direct\-dispatch\fR" 4
  3637. .IX Item "-fobjc-direct-dispatch"
  3638. Allow fast jumps to the message dispatcher. On Darwin this is
  3639. accomplished via the comm page.
  3640. .IP "\fB\-fobjc\-exceptions\fR" 4
  3641. .IX Item "-fobjc-exceptions"
  3642. Enable syntactic support for structured exception handling in
  3643. Objective-C, similar to what is offered by \*(C+. This option
  3644. is required to use the Objective-C keywords \f(CW@try\fR,
  3645. \&\f(CW@throw\fR, \f(CW@catch\fR, \f(CW@finally\fR and
  3646. \&\f(CW@synchronized\fR. This option is available with both the \s-1GNU\s0
  3647. runtime and the NeXT runtime (but not available in conjunction with
  3648. the NeXT runtime on Mac \s-1OS X 10.2\s0 and earlier).
  3649. .IP "\fB\-fobjc\-gc\fR" 4
  3650. .IX Item "-fobjc-gc"
  3651. Enable garbage collection (\s-1GC\s0) in Objective-C and Objective\-\*(C+
  3652. programs. This option is only available with the NeXT runtime; the
  3653. \&\s-1GNU\s0 runtime has a different garbage collection implementation that
  3654. does not require special compiler flags.
  3655. .IP "\fB\-fobjc\-nilcheck\fR" 4
  3656. .IX Item "-fobjc-nilcheck"
  3657. For the NeXT runtime with version 2 of the \s-1ABI,\s0 check for a nil
  3658. receiver in method invocations before doing the actual method call.
  3659. This is the default and can be disabled using
  3660. \&\fB\-fno\-objc\-nilcheck\fR. Class methods and super calls are never
  3661. checked for nil in this way no matter what this flag is set to.
  3662. Currently this flag does nothing when the \s-1GNU\s0 runtime, or an older
  3663. version of the NeXT runtime \s-1ABI,\s0 is used.
  3664. .IP "\fB\-fobjc\-std=objc1\fR" 4
  3665. .IX Item "-fobjc-std=objc1"
  3666. Conform to the language syntax of Objective-C 1.0, the language
  3667. recognized by \s-1GCC 4.0. \s0 This only affects the Objective-C additions to
  3668. the C/\*(C+ language; it does not affect conformance to C/\*(C+ standards,
  3669. which is controlled by the separate C/\*(C+ dialect option flags. When
  3670. this option is used with the Objective-C or Objective\-\*(C+ compiler,
  3671. any Objective-C syntax that is not recognized by \s-1GCC 4.0\s0 is rejected.
  3672. This is useful if you need to make sure that your Objective-C code can
  3673. be compiled with older versions of \s-1GCC.\s0
  3674. .IP "\fB\-freplace\-objc\-classes\fR" 4
  3675. .IX Item "-freplace-objc-classes"
  3676. Emit a special marker instructing \fB\f(BIld\fB\|(1)\fR not to statically link in
  3677. the resulting object file, and allow \fB\f(BIdyld\fB\|(1)\fR to load it in at
  3678. run time instead. This is used in conjunction with the Fix-and-Continue
  3679. debugging mode, where the object file in question may be recompiled and
  3680. dynamically reloaded in the course of program execution, without the need
  3681. to restart the program itself. Currently, Fix-and-Continue functionality
  3682. is only available in conjunction with the NeXT runtime on Mac \s-1OS X 10.3\s0
  3683. and later.
  3684. .IP "\fB\-fzero\-link\fR" 4
  3685. .IX Item "-fzero-link"
  3686. When compiling for the NeXT runtime, the compiler ordinarily replaces calls
  3687. to \f(CW\*(C`objc_getClass("...")\*(C'\fR (when the name of the class is known at
  3688. compile time) with static class references that get initialized at load time,
  3689. which improves run-time performance. Specifying the \fB\-fzero\-link\fR flag
  3690. suppresses this behavior and causes calls to \f(CW\*(C`objc_getClass("...")\*(C'\fR
  3691. to be retained. This is useful in Zero-Link debugging mode, since it allows
  3692. for individual class implementations to be modified during program execution.
  3693. The \s-1GNU\s0 runtime currently always retains calls to \f(CW\*(C`objc_get_class("...")\*(C'\fR
  3694. regardless of command-line options.
  3695. .IP "\fB\-fno\-local\-ivars\fR" 4
  3696. .IX Item "-fno-local-ivars"
  3697. By default instance variables in Objective-C can be accessed as if
  3698. they were local variables from within the methods of the class they're
  3699. declared in. This can lead to shadowing between instance variables
  3700. and other variables declared either locally inside a class method or
  3701. globally with the same name. Specifying the \fB\-fno\-local\-ivars\fR
  3702. flag disables this behavior thus avoiding variable shadowing issues.
  3703. .IP "\fB\-fivar\-visibility=\fR[\fBpublic\fR|\fBprotected\fR|\fBprivate\fR|\fBpackage\fR]" 4
  3704. .IX Item "-fivar-visibility=[public|protected|private|package]"
  3705. Set the default instance variable visibility to the specified option
  3706. so that instance variables declared outside the scope of any access
  3707. modifier directives default to the specified visibility.
  3708. .IP "\fB\-gen\-decls\fR" 4
  3709. .IX Item "-gen-decls"
  3710. Dump interface declarations for all classes seen in the source file to a
  3711. file named \fI\fIsourcename\fI.decl\fR.
  3712. .IP "\fB\-Wassign\-intercept\fR (Objective-C and Objective\-\*(C+ only)" 4
  3713. .IX Item "-Wassign-intercept (Objective-C and Objective- only)"
  3714. Warn whenever an Objective-C assignment is being intercepted by the
  3715. garbage collector.
  3716. .IP "\fB\-Wno\-property\-assign\-default\fR (Objective-C and Objective\-\*(C+ only)" 4
  3717. .IX Item "-Wno-property-assign-default (Objective-C and Objective- only)"
  3718. Do not warn if a property for an Objective-C object has no assign
  3719. semantics specified.
  3720. .IP "\fB\-Wno\-protocol\fR (Objective-C and Objective\-\*(C+ only)" 4
  3721. .IX Item "-Wno-protocol (Objective-C and Objective- only)"
  3722. If a class is declared to implement a protocol, a warning is issued for
  3723. every method in the protocol that is not implemented by the class. The
  3724. default behavior is to issue a warning for every method not explicitly
  3725. implemented in the class, even if a method implementation is inherited
  3726. from the superclass. If you use the \fB\-Wno\-protocol\fR option, then
  3727. methods inherited from the superclass are considered to be implemented,
  3728. and no warning is issued for them.
  3729. .IP "\fB\-Wselector\fR (Objective-C and Objective\-\*(C+ only)" 4
  3730. .IX Item "-Wselector (Objective-C and Objective- only)"
  3731. Warn if multiple methods of different types for the same selector are
  3732. found during compilation. The check is performed on the list of methods
  3733. in the final stage of compilation. Additionally, a check is performed
  3734. for each selector appearing in a \f(CW\*(C`@selector(...)\*(C'\fR
  3735. expression, and a corresponding method for that selector has been found
  3736. during compilation. Because these checks scan the method table only at
  3737. the end of compilation, these warnings are not produced if the final
  3738. stage of compilation is not reached, for example because an error is
  3739. found during compilation, or because the \fB\-fsyntax\-only\fR option is
  3740. being used.
  3741. .IP "\fB\-Wstrict\-selector\-match\fR (Objective-C and Objective\-\*(C+ only)" 4
  3742. .IX Item "-Wstrict-selector-match (Objective-C and Objective- only)"
  3743. Warn if multiple methods with differing argument and/or return types are
  3744. found for a given selector when attempting to send a message using this
  3745. selector to a receiver of type \f(CW\*(C`id\*(C'\fR or \f(CW\*(C`Class\*(C'\fR. When this flag
  3746. is off (which is the default behavior), the compiler omits such warnings
  3747. if any differences found are confined to types that share the same size
  3748. and alignment.
  3749. .IP "\fB\-Wundeclared\-selector\fR (Objective-C and Objective\-\*(C+ only)" 4
  3750. .IX Item "-Wundeclared-selector (Objective-C and Objective- only)"
  3751. Warn if a \f(CW\*(C`@selector(...)\*(C'\fR expression referring to an
  3752. undeclared selector is found. A selector is considered undeclared if no
  3753. method with that name has been declared before the
  3754. \&\f(CW\*(C`@selector(...)\*(C'\fR expression, either explicitly in an
  3755. \&\f(CW@interface\fR or \f(CW@protocol\fR declaration, or implicitly in
  3756. an \f(CW@implementation\fR section. This option always performs its
  3757. checks as soon as a \f(CW\*(C`@selector(...)\*(C'\fR expression is found,
  3758. while \fB\-Wselector\fR only performs its checks in the final stage of
  3759. compilation. This also enforces the coding style convention
  3760. that methods and selectors must be declared before being used.
  3761. .IP "\fB\-print\-objc\-runtime\-info\fR" 4
  3762. .IX Item "-print-objc-runtime-info"
  3763. Generate C header describing the largest structure that is passed by
  3764. value, if any.
  3765. .SS "Options to Control Diagnostic Messages Formatting"
  3766. .IX Subsection "Options to Control Diagnostic Messages Formatting"
  3767. Traditionally, diagnostic messages have been formatted irrespective of
  3768. the output device's aspect (e.g. its width, ...). You can use the
  3769. options described below
  3770. to control the formatting algorithm for diagnostic messages,
  3771. e.g. how many characters per line, how often source location
  3772. information should be reported. Note that some language front ends may not
  3773. honor these options.
  3774. .IP "\fB\-fmessage\-length=\fR\fIn\fR" 4
  3775. .IX Item "-fmessage-length=n"
  3776. Try to format error messages so that they fit on lines of about
  3777. \&\fIn\fR characters. If \fIn\fR is zero, then no line-wrapping is
  3778. done; each error message appears on a single line. This is the
  3779. default for all front ends.
  3780. .Sp
  3781. Note \- this option also affects the display of the \fB#error\fR and
  3782. \&\fB#warning\fR pre-processor directives, and the \fBdeprecated\fR
  3783. function/type/variable attribute. It does not however affect the
  3784. \&\fBpragma \s-1GCC\s0 warning\fR and \fBpragma \s-1GCC\s0 error\fR pragmas.
  3785. .IP "\fB\-fdiagnostics\-show\-location=once\fR" 4
  3786. .IX Item "-fdiagnostics-show-location=once"
  3787. Only meaningful in line-wrapping mode. Instructs the diagnostic messages
  3788. reporter to emit source location information \fIonce\fR; that is, in
  3789. case the message is too long to fit on a single physical line and has to
  3790. be wrapped, the source location won't be emitted (as prefix) again,
  3791. over and over, in subsequent continuation lines. This is the default
  3792. behavior.
  3793. .IP "\fB\-fdiagnostics\-show\-location=every\-line\fR" 4
  3794. .IX Item "-fdiagnostics-show-location=every-line"
  3795. Only meaningful in line-wrapping mode. Instructs the diagnostic
  3796. messages reporter to emit the same source location information (as
  3797. prefix) for physical lines that result from the process of breaking
  3798. a message which is too long to fit on a single line.
  3799. .IP "\fB\-fdiagnostics\-color[=\fR\fI\s-1WHEN\s0\fR\fB]\fR" 4
  3800. .IX Item "-fdiagnostics-color[=WHEN]"
  3801. .PD 0
  3802. .IP "\fB\-fno\-diagnostics\-color\fR" 4
  3803. .IX Item "-fno-diagnostics-color"
  3804. .PD
  3805. Use color in diagnostics. \fI\s-1WHEN\s0\fR is \fBnever\fR, \fBalways\fR,
  3806. or \fBauto\fR. The default depends on how the compiler has been configured,
  3807. it can be any of the above \fI\s-1WHEN\s0\fR options or also \fBnever\fR
  3808. if \fB\s-1GCC_COLORS\s0\fR environment variable isn't present in the environment,
  3809. and \fBauto\fR otherwise.
  3810. \&\fBauto\fR makes \s-1GCC\s0 use color only when the standard error is a terminal,
  3811. and when not executing in an emacs shell.
  3812. The forms \fB\-fdiagnostics\-color\fR and \fB\-fno\-diagnostics\-color\fR are
  3813. aliases for \fB\-fdiagnostics\-color=always\fR and
  3814. \&\fB\-fdiagnostics\-color=never\fR, respectively.
  3815. .Sp
  3816. The colors are defined by the environment variable \fB\s-1GCC_COLORS\s0\fR.
  3817. Its value is a colon-separated list of capabilities and Select Graphic
  3818. Rendition (\s-1SGR\s0) substrings. \s-1SGR\s0 commands are interpreted by the
  3819. terminal or terminal emulator. (See the section in the documentation
  3820. of your text terminal for permitted values and their meanings as
  3821. character attributes.) These substring values are integers in decimal
  3822. representation and can be concatenated with semicolons.
  3823. Common values to concatenate include
  3824. \&\fB1\fR for bold,
  3825. \&\fB4\fR for underline,
  3826. \&\fB5\fR for blink,
  3827. \&\fB7\fR for inverse,
  3828. \&\fB39\fR for default foreground color,
  3829. \&\fB30\fR to \fB37\fR for foreground colors,
  3830. \&\fB90\fR to \fB97\fR for 16\-color mode foreground colors,
  3831. \&\fB38;5;0\fR to \fB38;5;255\fR
  3832. for 88\-color and 256\-color modes foreground colors,
  3833. \&\fB49\fR for default background color,
  3834. \&\fB40\fR to \fB47\fR for background colors,
  3835. \&\fB100\fR to \fB107\fR for 16\-color mode background colors,
  3836. and \fB48;5;0\fR to \fB48;5;255\fR
  3837. for 88\-color and 256\-color modes background colors.
  3838. .Sp
  3839. The default \fB\s-1GCC_COLORS\s0\fR is
  3840. .Sp
  3841. .Vb 4
  3842. \& error=01;31:warning=01;35:note=01;36:range1=32:range2=34:locus=01:\e
  3843. \& quote=01:path=01;36:fixit\-insert=32:fixit\-delete=31:\e
  3844. \& diff\-filename=01:diff\-hunk=32:diff\-delete=31:diff\-insert=32:\e
  3845. \& type\-diff=01;32
  3846. .Ve
  3847. .Sp
  3848. where \fB01;31\fR is bold red, \fB01;35\fR is bold magenta,
  3849. \&\fB01;36\fR is bold cyan, \fB32\fR is green, \fB34\fR is blue,
  3850. \&\fB01\fR is bold, and \fB31\fR is red.
  3851. Setting \fB\s-1GCC_COLORS\s0\fR to the empty string disables colors.
  3852. Supported capabilities are as follows.
  3853. .RS 4
  3854. .ie n .IP """error=""" 4
  3855. .el .IP "\f(CWerror=\fR" 4
  3856. .IX Item "error="
  3857. \&\s-1SGR\s0 substring for error: markers.
  3858. .ie n .IP """warning=""" 4
  3859. .el .IP "\f(CWwarning=\fR" 4
  3860. .IX Item "warning="
  3861. \&\s-1SGR\s0 substring for warning: markers.
  3862. .ie n .IP """note=""" 4
  3863. .el .IP "\f(CWnote=\fR" 4
  3864. .IX Item "note="
  3865. \&\s-1SGR\s0 substring for note: markers.
  3866. .ie n .IP """path=""" 4
  3867. .el .IP "\f(CWpath=\fR" 4
  3868. .IX Item "path="
  3869. \&\s-1SGR\s0 substring for colorizing paths of control-flow events as printed
  3870. via \fB\-fdiagnostics\-path\-format=\fR, such as the identifiers of
  3871. individual events and lines indicating interprocedural calls and returns.
  3872. .ie n .IP """range1=""" 4
  3873. .el .IP "\f(CWrange1=\fR" 4
  3874. .IX Item "range1="
  3875. \&\s-1SGR\s0 substring for first additional range.
  3876. .ie n .IP """range2=""" 4
  3877. .el .IP "\f(CWrange2=\fR" 4
  3878. .IX Item "range2="
  3879. \&\s-1SGR\s0 substring for second additional range.
  3880. .ie n .IP """locus=""" 4
  3881. .el .IP "\f(CWlocus=\fR" 4
  3882. .IX Item "locus="
  3883. \&\s-1SGR\s0 substring for location information, \fBfile:line\fR or
  3884. \&\fBfile:line:column\fR etc.
  3885. .ie n .IP """quote=""" 4
  3886. .el .IP "\f(CWquote=\fR" 4
  3887. .IX Item "quote="
  3888. \&\s-1SGR\s0 substring for information printed within quotes.
  3889. .ie n .IP """fixit\-insert=""" 4
  3890. .el .IP "\f(CWfixit\-insert=\fR" 4
  3891. .IX Item "fixit-insert="
  3892. \&\s-1SGR\s0 substring for fix-it hints suggesting text to
  3893. be inserted or replaced.
  3894. .ie n .IP """fixit\-delete=""" 4
  3895. .el .IP "\f(CWfixit\-delete=\fR" 4
  3896. .IX Item "fixit-delete="
  3897. \&\s-1SGR\s0 substring for fix-it hints suggesting text to
  3898. be deleted.
  3899. .ie n .IP """diff\-filename=""" 4
  3900. .el .IP "\f(CWdiff\-filename=\fR" 4
  3901. .IX Item "diff-filename="
  3902. \&\s-1SGR\s0 substring for filename headers within generated patches.
  3903. .ie n .IP """diff\-hunk=""" 4
  3904. .el .IP "\f(CWdiff\-hunk=\fR" 4
  3905. .IX Item "diff-hunk="
  3906. \&\s-1SGR\s0 substring for the starts of hunks within generated patches.
  3907. .ie n .IP """diff\-delete=""" 4
  3908. .el .IP "\f(CWdiff\-delete=\fR" 4
  3909. .IX Item "diff-delete="
  3910. \&\s-1SGR\s0 substring for deleted lines within generated patches.
  3911. .ie n .IP """diff\-insert=""" 4
  3912. .el .IP "\f(CWdiff\-insert=\fR" 4
  3913. .IX Item "diff-insert="
  3914. \&\s-1SGR\s0 substring for inserted lines within generated patches.
  3915. .ie n .IP """type\-diff=""" 4
  3916. .el .IP "\f(CWtype\-diff=\fR" 4
  3917. .IX Item "type-diff="
  3918. \&\s-1SGR\s0 substring for highlighting mismatching types within template
  3919. arguments in the \*(C+ frontend.
  3920. .RE
  3921. .RS 4
  3922. .RE
  3923. .IP "\fB\-fdiagnostics\-urls[=\fR\fI\s-1WHEN\s0\fR\fB]\fR" 4
  3924. .IX Item "-fdiagnostics-urls[=WHEN]"
  3925. Use escape sequences to embed URLs in diagnostics. For example, when
  3926. \&\fB\-fdiagnostics\-show\-option\fR emits text showing the command-line
  3927. option controlling a diagnostic, embed a \s-1URL\s0 for documentation of that
  3928. option.
  3929. .Sp
  3930. \&\fI\s-1WHEN\s0\fR is \fBnever\fR, \fBalways\fR, or \fBauto\fR.
  3931. \&\fBauto\fR makes \s-1GCC\s0 use \s-1URL\s0 escape sequences only when the standard error
  3932. is a terminal, and when not executing in an emacs shell or any graphical
  3933. terminal which is known to be incompatible with this feature, see below.
  3934. .Sp
  3935. The default depends on how the compiler has been configured.
  3936. It can be any of the above \fI\s-1WHEN\s0\fR options.
  3937. .Sp
  3938. \&\s-1GCC\s0 can also be configured (via the
  3939. \&\fB\-\-with\-diagnostics\-urls=auto\-if\-env\fR configure-time option)
  3940. so that the default is affected by environment variables.
  3941. Under such a configuration, \s-1GCC\s0 defaults to using \fBauto\fR
  3942. if either \fB\s-1GCC_URLS\s0\fR or \fB\s-1TERM_URLS\s0\fR environment variables are
  3943. present and non-empty in the environment of the compiler, or \fBnever\fR
  3944. if neither are.
  3945. .Sp
  3946. However, even with \fB\-fdiagnostics\-urls=always\fR the behavior is
  3947. dependent on those environment variables:
  3948. If \fB\s-1GCC_URLS\s0\fR is set to empty or \fBno\fR, do not embed URLs in
  3949. diagnostics. If set to \fBst\fR, URLs use \s-1ST\s0 escape sequences.
  3950. If set to \fBbel\fR, the default, URLs use \s-1BEL\s0 escape sequences.
  3951. Any other non-empty value enables the feature.
  3952. If \fB\s-1GCC_URLS\s0\fR is not set, use \fB\s-1TERM_URLS\s0\fR as a fallback.
  3953. Note: \s-1ST\s0 is an \s-1ANSI\s0 escape sequence, string terminator \fB\s-1ESC\s0 \e\fR,
  3954. \&\s-1BEL\s0 is an \s-1ASCII\s0 character, CTRL-G that usually sounds like a beep.
  3955. .Sp
  3956. At this time \s-1GCC\s0 tries to detect also a few terminals that are known to
  3957. not implement the \s-1URL\s0 feature, and have bugs or at least had bugs in
  3958. some versions that are still in use, where the \s-1URL\s0 escapes are likely
  3959. to misbehave, i.e. print garbage on the screen.
  3960. That list is currently xfce4\-terminal, certain known to be buggy
  3961. gnome-terminal versions, the linux console, and mingw.
  3962. This check can be skipped with the \fB\-fdiagnostics\-urls=always\fR.
  3963. .IP "\fB\-fno\-diagnostics\-show\-option\fR" 4
  3964. .IX Item "-fno-diagnostics-show-option"
  3965. By default, each diagnostic emitted includes text indicating the
  3966. command-line option that directly controls the diagnostic (if such an
  3967. option is known to the diagnostic machinery). Specifying the
  3968. \&\fB\-fno\-diagnostics\-show\-option\fR flag suppresses that behavior.
  3969. .IP "\fB\-fno\-diagnostics\-show\-caret\fR" 4
  3970. .IX Item "-fno-diagnostics-show-caret"
  3971. By default, each diagnostic emitted includes the original source line
  3972. and a caret \fB^\fR indicating the column. This option suppresses this
  3973. information. The source line is truncated to \fIn\fR characters, if
  3974. the \fB\-fmessage\-length=n\fR option is given. When the output is done
  3975. to the terminal, the width is limited to the width given by the
  3976. \&\fB\s-1COLUMNS\s0\fR environment variable or, if not set, to the terminal width.
  3977. .IP "\fB\-fno\-diagnostics\-show\-labels\fR" 4
  3978. .IX Item "-fno-diagnostics-show-labels"
  3979. By default, when printing source code (via \fB\-fdiagnostics\-show\-caret\fR),
  3980. diagnostics can label ranges of source code with pertinent information, such
  3981. as the types of expressions:
  3982. .Sp
  3983. .Vb 4
  3984. \& printf ("foo %s bar", long_i + long_j);
  3985. \& ~^ ~~~~~~~~~~~~~~~
  3986. \& | |
  3987. \& char * long int
  3988. .Ve
  3989. .Sp
  3990. This option suppresses the printing of these labels (in the example above,
  3991. the vertical bars and the \*(L"char *\*(R" and \*(L"long int\*(R" text).
  3992. .IP "\fB\-fno\-diagnostics\-show\-cwe\fR" 4
  3993. .IX Item "-fno-diagnostics-show-cwe"
  3994. Diagnostic messages can optionally have an associated
  3995. \&\f(CW@url\fR{https://cwe.mitre.org/index.html, \s-1CWE\s0} identifier.
  3996. \&\s-1GCC\s0 itself only provides such metadata for some of the \fB\-fanalyzer\fR
  3997. diagnostics. \s-1GCC\s0 plugins may also provide diagnostics with such metadata.
  3998. By default, if this information is present, it will be printed with
  3999. the diagnostic. This option suppresses the printing of this metadata.
  4000. .IP "\fB\-fno\-diagnostics\-show\-line\-numbers\fR" 4
  4001. .IX Item "-fno-diagnostics-show-line-numbers"
  4002. By default, when printing source code (via \fB\-fdiagnostics\-show\-caret\fR),
  4003. a left margin is printed, showing line numbers. This option suppresses this
  4004. left margin.
  4005. .IP "\fB\-fdiagnostics\-minimum\-margin\-width=\fR\fIwidth\fR" 4
  4006. .IX Item "-fdiagnostics-minimum-margin-width=width"
  4007. This option controls the minimum width of the left margin printed by
  4008. \&\fB\-fdiagnostics\-show\-line\-numbers\fR. It defaults to 6.
  4009. .IP "\fB\-fdiagnostics\-parseable\-fixits\fR" 4
  4010. .IX Item "-fdiagnostics-parseable-fixits"
  4011. Emit fix-it hints in a machine-parseable format, suitable for consumption
  4012. by IDEs. For each fix-it, a line will be printed after the relevant
  4013. diagnostic, starting with the string \*(L"fix-it:\*(R". For example:
  4014. .Sp
  4015. .Vb 1
  4016. \& fix\-it:"test.c":{45:3\-45:21}:"gtk_widget_show_all"
  4017. .Ve
  4018. .Sp
  4019. The location is expressed as a half-open range, expressed as a count of
  4020. bytes, starting at byte 1 for the initial column. In the above example,
  4021. bytes 3 through 20 of line 45 of \*(L"test.c\*(R" are to be replaced with the
  4022. given string:
  4023. .Sp
  4024. .Vb 5
  4025. \& 00000000011111111112222222222
  4026. \& 12345678901234567890123456789
  4027. \& gtk_widget_showall (dlg);
  4028. \& ^^^^^^^^^^^^^^^^^^
  4029. \& gtk_widget_show_all
  4030. .Ve
  4031. .Sp
  4032. The filename and replacement string escape backslash as \*(L"\e\e\*(R", tab as \*(L"\et\*(R",
  4033. newline as \*(L"\en\*(R", double quotes as \*(L"\e\*(R"\*(L", non-printable characters as octal
  4034. (e.g. vertical tab as \*(R"\e013").
  4035. .Sp
  4036. An empty replacement string indicates that the given range is to be removed.
  4037. An empty range (e.g. \*(L"45:3\-45:3\*(R") indicates that the string is to
  4038. be inserted at the given position.
  4039. .IP "\fB\-fdiagnostics\-generate\-patch\fR" 4
  4040. .IX Item "-fdiagnostics-generate-patch"
  4041. Print fix-it hints to stderr in unified diff format, after any diagnostics
  4042. are printed. For example:
  4043. .Sp
  4044. .Vb 3
  4045. \& \-\-\- test.c
  4046. \& +++ test.c
  4047. \& @ \-42,5 +42,5 @
  4048. \&
  4049. \& void show_cb(GtkDialog *dlg)
  4050. \& {
  4051. \& \- gtk_widget_showall(dlg);
  4052. \& + gtk_widget_show_all(dlg);
  4053. \& }
  4054. .Ve
  4055. .Sp
  4056. The diff may or may not be colorized, following the same rules
  4057. as for diagnostics (see \fB\-fdiagnostics\-color\fR).
  4058. .IP "\fB\-fdiagnostics\-show\-template\-tree\fR" 4
  4059. .IX Item "-fdiagnostics-show-template-tree"
  4060. In the \*(C+ frontend, when printing diagnostics showing mismatching
  4061. template types, such as:
  4062. .Sp
  4063. .Vb 2
  4064. \& could not convert \*(Aqstd::map<int, std::vector<double> >()\*(Aq
  4065. \& from \*(Aqmap<[...],vector<double>>\*(Aq to \*(Aqmap<[...],vector<float>>
  4066. .Ve
  4067. .Sp
  4068. the \fB\-fdiagnostics\-show\-template\-tree\fR flag enables printing a
  4069. tree-like structure showing the common and differing parts of the types,
  4070. such as:
  4071. .Sp
  4072. .Vb 4
  4073. \& map<
  4074. \& [...],
  4075. \& vector<
  4076. \& [double != float]>>
  4077. .Ve
  4078. .Sp
  4079. The parts that differ are highlighted with color (\*(L"double\*(R" and
  4080. \&\*(L"float\*(R" in this case).
  4081. .IP "\fB\-fno\-elide\-type\fR" 4
  4082. .IX Item "-fno-elide-type"
  4083. By default when the \*(C+ frontend prints diagnostics showing mismatching
  4084. template types, common parts of the types are printed as \*(L"[...]\*(R" to
  4085. simplify the error message. For example:
  4086. .Sp
  4087. .Vb 2
  4088. \& could not convert \*(Aqstd::map<int, std::vector<double> >()\*(Aq
  4089. \& from \*(Aqmap<[...],vector<double>>\*(Aq to \*(Aqmap<[...],vector<float>>
  4090. .Ve
  4091. .Sp
  4092. Specifying the \fB\-fno\-elide\-type\fR flag suppresses that behavior.
  4093. This flag also affects the output of the
  4094. \&\fB\-fdiagnostics\-show\-template\-tree\fR flag.
  4095. .IP "\fB\-fdiagnostics\-path\-format=\fR\fI\s-1KIND\s0\fR" 4
  4096. .IX Item "-fdiagnostics-path-format=KIND"
  4097. Specify how to print paths of control-flow events for diagnostics that
  4098. have such a path associated with them.
  4099. .Sp
  4100. \&\fI\s-1KIND\s0\fR is \fBnone\fR, \fBseparate-events\fR, or \fBinline-events\fR,
  4101. the default.
  4102. .Sp
  4103. \&\fBnone\fR means to not print diagnostic paths.
  4104. .Sp
  4105. \&\fBseparate-events\fR means to print a separate \*(L"note\*(R" diagnostic for
  4106. each event within the diagnostic. For example:
  4107. .Sp
  4108. .Vb 4
  4109. \& test.c:29:5: error: passing NULL as argument 1 to \*(AqPyList_Append\*(Aq which requires a non\-NULL parameter
  4110. \& test.c:25:10: note: (1) when \*(AqPyList_New\*(Aq fails, returning NULL
  4111. \& test.c:27:3: note: (2) when \*(Aqi < count\*(Aq
  4112. \& test.c:29:5: note: (3) when calling \*(AqPyList_Append\*(Aq, passing NULL from (1) as argument 1
  4113. .Ve
  4114. .Sp
  4115. \&\fBinline-events\fR means to print the events \*(L"inline\*(R" within the source
  4116. code. This view attempts to consolidate the events into runs of
  4117. sufficiently-close events, printing them as labelled ranges within the source.
  4118. .Sp
  4119. For example, the same events as above might be printed as:
  4120. .Sp
  4121. .Vb 10
  4122. \& \*(Aqtest\*(Aq: events 1\-3
  4123. \& |
  4124. \& | 25 | list = PyList_New(0);
  4125. \& | | ^~~~~~~~~~~~~
  4126. \& | | |
  4127. \& | | (1) when \*(AqPyList_New\*(Aq fails, returning NULL
  4128. \& | 26 |
  4129. \& | 27 | for (i = 0; i < count; i++) {
  4130. \& | | ~~~
  4131. \& | | |
  4132. \& | | (2) when \*(Aqi < count\*(Aq
  4133. \& | 28 | item = PyLong_FromLong(random());
  4134. \& | 29 | PyList_Append(list, item);
  4135. \& | | ~~~~~~~~~~~~~~~~~~~~~~~~~
  4136. \& | | |
  4137. \& | | (3) when calling \*(AqPyList_Append\*(Aq, passing NULL from (1) as argument 1
  4138. \& |
  4139. .Ve
  4140. .Sp
  4141. Interprocedural control flow is shown by grouping the events by stack frame,
  4142. and using indentation to show how stack frames are nested, pushed, and popped.
  4143. .Sp
  4144. For example:
  4145. .Sp
  4146. .Vb 10
  4147. \& \*(Aqtest\*(Aq: events 1\-2
  4148. \& |
  4149. \& | 133 | {
  4150. \& | | ^
  4151. \& | | |
  4152. \& | | (1) entering \*(Aqtest\*(Aq
  4153. \& | 134 | boxed_int *obj = make_boxed_int (i);
  4154. \& | | ~~~~~~~~~~~~~~~~~~
  4155. \& | | |
  4156. \& | | (2) calling \*(Aqmake_boxed_int\*(Aq
  4157. \& |
  4158. \& +\-\-> \*(Aqmake_boxed_int\*(Aq: events 3\-4
  4159. \& |
  4160. \& | 120 | {
  4161. \& | | ^
  4162. \& | | |
  4163. \& | | (3) entering \*(Aqmake_boxed_int\*(Aq
  4164. \& | 121 | boxed_int *result = (boxed_int *)wrapped_malloc (sizeof (boxed_int));
  4165. \& | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4166. \& | | |
  4167. \& | | (4) calling \*(Aqwrapped_malloc\*(Aq
  4168. \& |
  4169. \& +\-\-> \*(Aqwrapped_malloc\*(Aq: events 5\-6
  4170. \& |
  4171. \& | 7 | {
  4172. \& | | ^
  4173. \& | | |
  4174. \& | | (5) entering \*(Aqwrapped_malloc\*(Aq
  4175. \& | 8 | return malloc (size);
  4176. \& | | ~~~~~~~~~~~~~
  4177. \& | | |
  4178. \& | | (6) calling \*(Aqmalloc\*(Aq
  4179. \& |
  4180. \& <\-\-\-\-\-\-\-\-\-\-\-\-\-+
  4181. \& |
  4182. \& \*(Aqtest\*(Aq: event 7
  4183. \& |
  4184. \& | 138 | free_boxed_int (obj);
  4185. \& | | ^~~~~~~~~~~~~~~~~~~~
  4186. \& | | |
  4187. \& | | (7) calling \*(Aqfree_boxed_int\*(Aq
  4188. \& |
  4189. \& (etc)
  4190. .Ve
  4191. .IP "\fB\-fdiagnostics\-show\-path\-depths\fR" 4
  4192. .IX Item "-fdiagnostics-show-path-depths"
  4193. This option provides additional information when printing control-flow paths
  4194. associated with a diagnostic.
  4195. .Sp
  4196. If this is option is provided then the stack depth will be printed for
  4197. each run of events within \fB\-fdiagnostics\-path\-format=separate\-events\fR.
  4198. .Sp
  4199. This is intended for use by \s-1GCC\s0 developers and plugin developers when
  4200. debugging diagnostics that report interprocedural control flow.
  4201. .IP "\fB\-fno\-show\-column\fR" 4
  4202. .IX Item "-fno-show-column"
  4203. Do not print column numbers in diagnostics. This may be necessary if
  4204. diagnostics are being scanned by a program that does not understand the
  4205. column numbers, such as \fBdejagnu\fR.
  4206. .IP "\fB\-fdiagnostics\-format=\fR\fI\s-1FORMAT\s0\fR" 4
  4207. .IX Item "-fdiagnostics-format=FORMAT"
  4208. Select a different format for printing diagnostics.
  4209. \&\fI\s-1FORMAT\s0\fR is \fBtext\fR or \fBjson\fR.
  4210. The default is \fBtext\fR.
  4211. .Sp
  4212. The \fBjson\fR format consists of a top-level \s-1JSON\s0 array containing \s-1JSON\s0
  4213. objects representing the diagnostics.
  4214. .Sp
  4215. The \s-1JSON\s0 is emitted as one line, without formatting; the examples below
  4216. have been formatted for clarity.
  4217. .Sp
  4218. Diagnostics can have child diagnostics. For example, this error and note:
  4219. .Sp
  4220. .Vb 8
  4221. \& misleading\-indentation.c:15:3: warning: this \*(Aqif\*(Aq clause does not
  4222. \& guard... [\-Wmisleading\-indentation]
  4223. \& 15 | if (flag)
  4224. \& | ^~
  4225. \& misleading\-indentation.c:17:5: note: ...this statement, but the latter
  4226. \& is misleadingly indented as if it were guarded by the \*(Aqif\*(Aq
  4227. \& 17 | y = 2;
  4228. \& | ^
  4229. .Ve
  4230. .Sp
  4231. might be printed in \s-1JSON\s0 form (after formatting) like this:
  4232. .Sp
  4233. .Vb 10
  4234. \& [
  4235. \& {
  4236. \& "kind": "warning",
  4237. \& "locations": [
  4238. \& {
  4239. \& "caret": {
  4240. \& "column": 3,
  4241. \& "file": "misleading\-indentation.c",
  4242. \& "line": 15
  4243. \& },
  4244. \& "finish": {
  4245. \& "column": 4,
  4246. \& "file": "misleading\-indentation.c",
  4247. \& "line": 15
  4248. \& }
  4249. \& }
  4250. \& ],
  4251. \& "message": "this \eu2018if\eu2019 clause does not guard...",
  4252. \& "option": "\-Wmisleading\-indentation",
  4253. \& "option_url": "https://gcc.gnu.org/onlinedocs/gcc/Warning\-Options.html#index\-Wmisleading\-indentation",
  4254. \& "children": [
  4255. \& {
  4256. \& "kind": "note",
  4257. \& "locations": [
  4258. \& {
  4259. \& "caret": {
  4260. \& "column": 5,
  4261. \& "file": "misleading\-indentation.c",
  4262. \& "line": 17
  4263. \& }
  4264. \& }
  4265. \& ],
  4266. \& "message": "...this statement, but the latter is ..."
  4267. \& }
  4268. \& ]
  4269. \& },
  4270. \& ...
  4271. \& ]
  4272. .Ve
  4273. .Sp
  4274. where the \f(CW\*(C`note\*(C'\fR is a child of the \f(CW\*(C`warning\*(C'\fR.
  4275. .Sp
  4276. A diagnostic has a \f(CW\*(C`kind\*(C'\fR. If this is \f(CW\*(C`warning\*(C'\fR, then there is
  4277. an \f(CW\*(C`option\*(C'\fR key describing the command-line option controlling the
  4278. warning.
  4279. .Sp
  4280. A diagnostic can contain zero or more locations. Each location has up
  4281. to three positions within it: a \f(CW\*(C`caret\*(C'\fR position and optional
  4282. \&\f(CW\*(C`start\*(C'\fR and \f(CW\*(C`finish\*(C'\fR positions. A location can also have
  4283. an optional \f(CW\*(C`label\*(C'\fR string. For example, this error:
  4284. .Sp
  4285. .Vb 7
  4286. \& bad\-binary\-ops.c:64:23: error: invalid operands to binary + (have \*(AqS\*(Aq {aka
  4287. \& \*(Aqstruct s\*(Aq} and \*(AqT\*(Aq {aka \*(Aqstruct t\*(Aq})
  4288. \& 64 | return callee_4a () + callee_4b ();
  4289. \& | ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~
  4290. \& | | |
  4291. \& | | T {aka struct t}
  4292. \& | S {aka struct s}
  4293. .Ve
  4294. .Sp
  4295. has three locations. Its primary location is at the \*(L"+\*(R" token at column
  4296. 23. It has two secondary locations, describing the left and right-hand sides
  4297. of the expression, which have labels. It might be printed in \s-1JSON\s0 form as:
  4298. .Sp
  4299. .Vb 10
  4300. \& {
  4301. \& "children": [],
  4302. \& "kind": "error",
  4303. \& "locations": [
  4304. \& {
  4305. \& "caret": {
  4306. \& "column": 23, "file": "bad\-binary\-ops.c", "line": 64
  4307. \& }
  4308. \& },
  4309. \& {
  4310. \& "caret": {
  4311. \& "column": 10, "file": "bad\-binary\-ops.c", "line": 64
  4312. \& },
  4313. \& "finish": {
  4314. \& "column": 21, "file": "bad\-binary\-ops.c", "line": 64
  4315. \& },
  4316. \& "label": "S {aka struct s}"
  4317. \& },
  4318. \& {
  4319. \& "caret": {
  4320. \& "column": 25, "file": "bad\-binary\-ops.c", "line": 64
  4321. \& },
  4322. \& "finish": {
  4323. \& "column": 36, "file": "bad\-binary\-ops.c", "line": 64
  4324. \& },
  4325. \& "label": "T {aka struct t}"
  4326. \& }
  4327. \& ],
  4328. \& "message": "invalid operands to binary + ..."
  4329. \& }
  4330. .Ve
  4331. .Sp
  4332. If a diagnostic contains fix-it hints, it has a \f(CW\*(C`fixits\*(C'\fR array,
  4333. consisting of half-open intervals, similar to the output of
  4334. \&\fB\-fdiagnostics\-parseable\-fixits\fR. For example, this diagnostic
  4335. with a replacement fix-it hint:
  4336. .Sp
  4337. .Vb 5
  4338. \& demo.c:8:15: error: \*(Aqstruct s\*(Aq has no member named \*(Aqcolour\*(Aq; did you
  4339. \& mean \*(Aqcolor\*(Aq?
  4340. \& 8 | return ptr\->colour;
  4341. \& | ^~~~~~
  4342. \& | color
  4343. .Ve
  4344. .Sp
  4345. might be printed in \s-1JSON\s0 form as:
  4346. .Sp
  4347. .Vb 10
  4348. \& {
  4349. \& "children": [],
  4350. \& "fixits": [
  4351. \& {
  4352. \& "next": {
  4353. \& "column": 21,
  4354. \& "file": "demo.c",
  4355. \& "line": 8
  4356. \& },
  4357. \& "start": {
  4358. \& "column": 15,
  4359. \& "file": "demo.c",
  4360. \& "line": 8
  4361. \& },
  4362. \& "string": "color"
  4363. \& }
  4364. \& ],
  4365. \& "kind": "error",
  4366. \& "locations": [
  4367. \& {
  4368. \& "caret": {
  4369. \& "column": 15,
  4370. \& "file": "demo.c",
  4371. \& "line": 8
  4372. \& },
  4373. \& "finish": {
  4374. \& "column": 20,
  4375. \& "file": "demo.c",
  4376. \& "line": 8
  4377. \& }
  4378. \& }
  4379. \& ],
  4380. \& "message": "\eu2018struct s\eu2019 has no member named ..."
  4381. \& }
  4382. .Ve
  4383. .Sp
  4384. where the fix-it hint suggests replacing the text from \f(CW\*(C`start\*(C'\fR up
  4385. to but not including \f(CW\*(C`next\*(C'\fR with \f(CW\*(C`string\*(C'\fR's value. Deletions
  4386. are expressed via an empty value for \f(CW\*(C`string\*(C'\fR, insertions by
  4387. having \f(CW\*(C`start\*(C'\fR equal \f(CW\*(C`next\*(C'\fR.
  4388. .Sp
  4389. If the diagnostic has a path of control-flow events associated with it,
  4390. it has a \f(CW\*(C`path\*(C'\fR array of objects representing the events. Each
  4391. event object has a \f(CW\*(C`description\*(C'\fR string, a \f(CW\*(C`location\*(C'\fR object,
  4392. along with a \f(CW\*(C`function\*(C'\fR string and a \f(CW\*(C`depth\*(C'\fR number for
  4393. representing interprocedural paths. The \f(CW\*(C`function\*(C'\fR represents the
  4394. current function at that event, and the \f(CW\*(C`depth\*(C'\fR represents the
  4395. stack depth relative to some baseline: the higher, the more frames are
  4396. within the stack.
  4397. .Sp
  4398. For example, the intraprocedural example shown for
  4399. \&\fB\-fdiagnostics\-path\-format=\fR might have this \s-1JSON\s0 for its path:
  4400. .Sp
  4401. .Vb 10
  4402. \& "path": [
  4403. \& {
  4404. \& "depth": 0,
  4405. \& "description": "when \*(AqPyList_New\*(Aq fails, returning NULL",
  4406. \& "function": "test",
  4407. \& "location": {
  4408. \& "column": 10,
  4409. \& "file": "test.c",
  4410. \& "line": 25
  4411. \& }
  4412. \& },
  4413. \& {
  4414. \& "depth": 0,
  4415. \& "description": "when \*(Aqi < count\*(Aq",
  4416. \& "function": "test",
  4417. \& "location": {
  4418. \& "column": 3,
  4419. \& "file": "test.c",
  4420. \& "line": 27
  4421. \& }
  4422. \& },
  4423. \& {
  4424. \& "depth": 0,
  4425. \& "description": "when calling \*(AqPyList_Append\*(Aq, passing NULL from (1) as argument 1",
  4426. \& "function": "test",
  4427. \& "location": {
  4428. \& "column": 5,
  4429. \& "file": "test.c",
  4430. \& "line": 29
  4431. \& }
  4432. \& }
  4433. \& ]
  4434. .Ve
  4435. .SS "Options to Request or Suppress Warnings"
  4436. .IX Subsection "Options to Request or Suppress Warnings"
  4437. Warnings are diagnostic messages that report constructions that
  4438. are not inherently erroneous but that are risky or suggest there
  4439. may have been an error.
  4440. .PP
  4441. The following language-independent options do not enable specific
  4442. warnings but control the kinds of diagnostics produced by \s-1GCC.\s0
  4443. .IP "\fB\-fsyntax\-only\fR" 4
  4444. .IX Item "-fsyntax-only"
  4445. Check the code for syntax errors, but don't do anything beyond that.
  4446. .IP "\fB\-fmax\-errors=\fR\fIn\fR" 4
  4447. .IX Item "-fmax-errors=n"
  4448. Limits the maximum number of error messages to \fIn\fR, at which point
  4449. \&\s-1GCC\s0 bails out rather than attempting to continue processing the source
  4450. code. If \fIn\fR is 0 (the default), there is no limit on the number
  4451. of error messages produced. If \fB\-Wfatal\-errors\fR is also
  4452. specified, then \fB\-Wfatal\-errors\fR takes precedence over this
  4453. option.
  4454. .IP "\fB\-w\fR" 4
  4455. .IX Item "-w"
  4456. Inhibit all warning messages.
  4457. .IP "\fB\-Werror\fR" 4
  4458. .IX Item "-Werror"
  4459. Make all warnings into errors.
  4460. .IP "\fB\-Werror=\fR" 4
  4461. .IX Item "-Werror="
  4462. Make the specified warning into an error. The specifier for a warning
  4463. is appended; for example \fB\-Werror=switch\fR turns the warnings
  4464. controlled by \fB\-Wswitch\fR into errors. This switch takes a
  4465. negative form, to be used to negate \fB\-Werror\fR for specific
  4466. warnings; for example \fB\-Wno\-error=switch\fR makes
  4467. \&\fB\-Wswitch\fR warnings not be errors, even when \fB\-Werror\fR
  4468. is in effect.
  4469. .Sp
  4470. The warning message for each controllable warning includes the
  4471. option that controls the warning. That option can then be used with
  4472. \&\fB\-Werror=\fR and \fB\-Wno\-error=\fR as described above.
  4473. (Printing of the option in the warning message can be disabled using the
  4474. \&\fB\-fno\-diagnostics\-show\-option\fR flag.)
  4475. .Sp
  4476. Note that specifying \fB\-Werror=\fR\fIfoo\fR automatically implies
  4477. \&\fB\-W\fR\fIfoo\fR. However, \fB\-Wno\-error=\fR\fIfoo\fR does not
  4478. imply anything.
  4479. .IP "\fB\-Wfatal\-errors\fR" 4
  4480. .IX Item "-Wfatal-errors"
  4481. This option causes the compiler to abort compilation on the first error
  4482. occurred rather than trying to keep going and printing further error
  4483. messages.
  4484. .PP
  4485. You can request many specific warnings with options beginning with
  4486. \&\fB\-W\fR, for example \fB\-Wimplicit\fR to request warnings on
  4487. implicit declarations. Each of these specific warning options also
  4488. has a negative form beginning \fB\-Wno\-\fR to turn off warnings; for
  4489. example, \fB\-Wno\-implicit\fR. This manual lists only one of the
  4490. two forms, whichever is not the default. For further
  4491. language-specific options also refer to \fB\*(C+ Dialect Options\fR and
  4492. \&\fBObjective-C and Objective\-\*(C+ Dialect Options\fR.
  4493. Additional warnings can be produced by enabling the static analyzer;
  4494. .PP
  4495. Some options, such as \fB\-Wall\fR and \fB\-Wextra\fR, turn on other
  4496. options, such as \fB\-Wunused\fR, which may turn on further options,
  4497. such as \fB\-Wunused\-value\fR. The combined effect of positive and
  4498. negative forms is that more specific options have priority over less
  4499. specific ones, independently of their position in the command-line. For
  4500. options of the same specificity, the last one takes effect. Options
  4501. enabled or disabled via pragmas take effect
  4502. as if they appeared at the end of the command-line.
  4503. .PP
  4504. When an unrecognized warning option is requested (e.g.,
  4505. \&\fB\-Wunknown\-warning\fR), \s-1GCC\s0 emits a diagnostic stating
  4506. that the option is not recognized. However, if the \fB\-Wno\-\fR form
  4507. is used, the behavior is slightly different: no diagnostic is
  4508. produced for \fB\-Wno\-unknown\-warning\fR unless other diagnostics
  4509. are being produced. This allows the use of new \fB\-Wno\-\fR options
  4510. with old compilers, but if something goes wrong, the compiler
  4511. warns that an unrecognized option is present.
  4512. .PP
  4513. The effectiveness of some warnings depends on optimizations also being
  4514. enabled. For example \fB\-Wsuggest\-final\-types\fR is more effective
  4515. with link-time optimization and \fB\-Wmaybe\-uninitialized\fR does not
  4516. warn at all unless optimization is enabled.
  4517. .IP "\fB\-Wpedantic\fR" 4
  4518. .IX Item "-Wpedantic"
  4519. .PD 0
  4520. .IP "\fB\-pedantic\fR" 4
  4521. .IX Item "-pedantic"
  4522. .PD
  4523. Issue all the warnings demanded by strict \s-1ISO C\s0 and \s-1ISO \*(C+\s0;
  4524. reject all programs that use forbidden extensions, and some other
  4525. programs that do not follow \s-1ISO C\s0 and \s-1ISO \*(C+. \s0 For \s-1ISO C,\s0 follows the
  4526. version of the \s-1ISO C\s0 standard specified by any \fB\-std\fR option used.
  4527. .Sp
  4528. Valid \s-1ISO C\s0 and \s-1ISO \*(C+\s0 programs should compile properly with or without
  4529. this option (though a rare few require \fB\-ansi\fR or a
  4530. \&\fB\-std\fR option specifying the required version of \s-1ISO C\s0). However,
  4531. without this option, certain \s-1GNU\s0 extensions and traditional C and \*(C+
  4532. features are supported as well. With this option, they are rejected.
  4533. .Sp
  4534. \&\fB\-Wpedantic\fR does not cause warning messages for use of the
  4535. alternate keywords whose names begin and end with \fB_\|_\fR. This alternate
  4536. format can also be used to disable warnings for non-ISO \fB_\|_intN\fR types,
  4537. i.e. \fB_\|_intN_\|_\fR.
  4538. Pedantic warnings are also disabled in the expression that follows
  4539. \&\f(CW\*(C`_\|_extension_\|_\*(C'\fR. However, only system header files should use
  4540. these escape routes; application programs should avoid them.
  4541. .Sp
  4542. Some users try to use \fB\-Wpedantic\fR to check programs for strict \s-1ISO
  4543. C\s0 conformance. They soon find that it does not do quite what they want:
  4544. it finds some non-ISO practices, but not all\-\-\-only those for which
  4545. \&\s-1ISO C \s0\fIrequires\fR a diagnostic, and some others for which
  4546. diagnostics have been added.
  4547. .Sp
  4548. A feature to report any failure to conform to \s-1ISO C\s0 might be useful in
  4549. some instances, but would require considerable additional work and would
  4550. be quite different from \fB\-Wpedantic\fR. We don't have plans to
  4551. support such a feature in the near future.
  4552. .Sp
  4553. Where the standard specified with \fB\-std\fR represents a \s-1GNU\s0
  4554. extended dialect of C, such as \fBgnu90\fR or \fBgnu99\fR, there is a
  4555. corresponding \fIbase standard\fR, the version of \s-1ISO C\s0 on which the \s-1GNU\s0
  4556. extended dialect is based. Warnings from \fB\-Wpedantic\fR are given
  4557. where they are required by the base standard. (It does not make sense
  4558. for such warnings to be given only for features not in the specified \s-1GNU
  4559. C\s0 dialect, since by definition the \s-1GNU\s0 dialects of C include all
  4560. features the compiler supports with the given option, and there would be
  4561. nothing to warn about.)
  4562. .IP "\fB\-pedantic\-errors\fR" 4
  4563. .IX Item "-pedantic-errors"
  4564. Give an error whenever the \fIbase standard\fR (see \fB\-Wpedantic\fR)
  4565. requires a diagnostic, in some cases where there is undefined behavior
  4566. at compile-time and in some other cases that do not prevent compilation
  4567. of programs that are valid according to the standard. This is not
  4568. equivalent to \fB\-Werror=pedantic\fR, since there are errors enabled
  4569. by this option and not enabled by the latter and vice versa.
  4570. .IP "\fB\-Wall\fR" 4
  4571. .IX Item "-Wall"
  4572. This enables all the warnings about constructions that some users
  4573. consider questionable, and that are easy to avoid (or modify to
  4574. prevent the warning), even in conjunction with macros. This also
  4575. enables some language-specific warnings described in \fB\*(C+ Dialect
  4576. Options\fR and \fBObjective-C and Objective\-\*(C+ Dialect Options\fR.
  4577. .Sp
  4578. \&\fB\-Wall\fR turns on the following warning flags:
  4579. .Sp
  4580. \&\fB\-Waddress
  4581. \&\-Warray\-bounds=1\fR (only with\fB \fR\fB\-O2\fR)
  4582. \&\fB\-Wbool\-compare
  4583. \&\-Wbool\-operation
  4584. \&\-Wc++11\-compat \-Wc++14\-compat
  4585. \&\-Wcatch\-value\fR (\*(C+ and Objective\-\*(C+ only)
  4586. \&\fB\-Wchar\-subscripts
  4587. \&\-Wcomment
  4588. \&\-Wduplicate\-decl\-specifier\fR (C and Objective-C only)
  4589. \&\fB\-Wenum\-compare\fR (in C/ObjC; this is on by default in \*(C+)
  4590. \&\fB\-Wenum\-conversion\fR in C/ObjC;
  4591. \&\fB\-Wformat
  4592. \&\-Wformat\-overflow
  4593. \&\-Wformat\-truncation
  4594. \&\-Wint\-in\-bool\-context
  4595. \&\-Wimplicit\fR (C and Objective-C only)
  4596. \&\fB\-Wimplicit\-int\fR (C and Objective-C only)
  4597. \&\fB\-Wimplicit\-function\-declaration\fR (C and Objective-C only)
  4598. \&\fB\-Winit\-self\fR (only for \*(C+)
  4599. \&\fB\-Wlogical\-not\-parentheses
  4600. \&\-Wmain\fR (only for C/ObjC and unless\fB \fR\fB\-ffreestanding\fR)
  4601. \&\fB\-Wmaybe\-uninitialized
  4602. \&\-Wmemset\-elt\-size
  4603. \&\-Wmemset\-transposed\-args
  4604. \&\-Wmisleading\-indentation\fR (only for C/\*(C+)
  4605. \&\fB\-Wmissing\-attributes
  4606. \&\-Wmissing\-braces\fR (only for C/ObjC)
  4607. \&\fB\-Wmultistatement\-macros
  4608. \&\-Wnarrowing\fR (only for \*(C+)
  4609. \&\fB\-Wnonnull
  4610. \&\-Wnonnull\-compare
  4611. \&\-Wopenmp\-simd
  4612. \&\-Wparentheses
  4613. \&\-Wpessimizing\-move\fR (only for \*(C+)
  4614. \&\fB\-Wpointer\-sign
  4615. \&\-Wreorder
  4616. \&\-Wrestrict
  4617. \&\-Wreturn\-type
  4618. \&\-Wsequence\-point
  4619. \&\-Wsign\-compare\fR (only in \*(C+)
  4620. \&\fB\-Wsizeof\-pointer\-div
  4621. \&\-Wsizeof\-pointer\-memaccess
  4622. \&\-Wstrict\-aliasing
  4623. \&\-Wstrict\-overflow=1
  4624. \&\-Wswitch
  4625. \&\-Wtautological\-compare
  4626. \&\-Wtrigraphs
  4627. \&\-Wuninitialized
  4628. \&\-Wunknown\-pragmas
  4629. \&\-Wunused\-function
  4630. \&\-Wunused\-label
  4631. \&\-Wunused\-value
  4632. \&\-Wunused\-variable
  4633. \&\-Wvolatile\-register\-var
  4634. \&\-Wzero\-length\-bounds\fR
  4635. .Sp
  4636. Note that some warning flags are not implied by \fB\-Wall\fR. Some of
  4637. them warn about constructions that users generally do not consider
  4638. questionable, but which occasionally you might wish to check for;
  4639. others warn about constructions that are necessary or hard to avoid in
  4640. some cases, and there is no simple way to modify the code to suppress
  4641. the warning. Some of them are enabled by \fB\-Wextra\fR but many of
  4642. them must be enabled individually.
  4643. .IP "\fB\-Wextra\fR" 4
  4644. .IX Item "-Wextra"
  4645. This enables some extra warning flags that are not enabled by
  4646. \&\fB\-Wall\fR. (This option used to be called \fB\-W\fR. The older
  4647. name is still supported, but the newer name is more descriptive.)
  4648. .Sp
  4649. \&\fB\-Wclobbered
  4650. \&\-Wcast\-function\-type
  4651. \&\-Wdeprecated\-copy\fR (\*(C+ only)
  4652. \&\fB\-Wempty\-body
  4653. \&\-Wignored\-qualifiers
  4654. \&\-Wimplicit\-fallthrough=3
  4655. \&\-Wmissing\-field\-initializers
  4656. \&\-Wmissing\-parameter\-type\fR (C only)
  4657. \&\fB\-Wold\-style\-declaration\fR (C only)
  4658. \&\fB\-Woverride\-init
  4659. \&\-Wsign\-compare\fR (C only)
  4660. \&\fB\-Wstring\-compare
  4661. \&\-Wredundant\-move\fR (only for \*(C+)
  4662. \&\fB\-Wtype\-limits
  4663. \&\-Wuninitialized
  4664. \&\-Wshift\-negative\-value\fR (in \*(C+03 and in C99 and newer)
  4665. \&\fB\-Wunused\-parameter\fR (only with\fB \fR\fB\-Wunused\fR\fB \fRor\fB \fR\fB\-Wall\fR)
  4666. \&\fB\-Wunused\-but\-set\-parameter\fR (only with\fB \fR\fB\-Wunused\fR\fB \fRor\fB \fR\fB\-Wall\fR)
  4667. .Sp
  4668. The option \fB\-Wextra\fR also prints warning messages for the
  4669. following cases:
  4670. .RS 4
  4671. .IP "*" 4
  4672. A pointer is compared against integer zero with \f(CW\*(C`<\*(C'\fR, \f(CW\*(C`<=\*(C'\fR,
  4673. \&\f(CW\*(C`>\*(C'\fR, or \f(CW\*(C`>=\*(C'\fR.
  4674. .IP "*" 4
  4675. (\*(C+ only) An enumerator and a non-enumerator both appear in a
  4676. conditional expression.
  4677. .IP "*" 4
  4678. (\*(C+ only) Ambiguous virtual bases.
  4679. .IP "*" 4
  4680. (\*(C+ only) Subscripting an array that has been declared \f(CW\*(C`register\*(C'\fR.
  4681. .IP "*" 4
  4682. (\*(C+ only) Taking the address of a variable that has been declared
  4683. \&\f(CW\*(C`register\*(C'\fR.
  4684. .IP "*" 4
  4685. (\*(C+ only) A base class is not initialized in the copy constructor
  4686. of a derived class.
  4687. .RE
  4688. .RS 4
  4689. .RE
  4690. .IP "\fB\-Wabi\fR (C, Objective-C, \*(C+ and Objective\-\*(C+ only)" 4
  4691. .IX Item "-Wabi (C, Objective-C, and Objective- only)"
  4692. Warn about code affected by \s-1ABI\s0 changes. This includes code that may
  4693. not be compatible with the vendor-neutral \*(C+ \s-1ABI\s0 as well as the psABI
  4694. for the particular target.
  4695. .Sp
  4696. Since G++ now defaults to updating the \s-1ABI\s0 with each major release,
  4697. normally \fB\-Wabi\fR warns only about \*(C+ \s-1ABI\s0 compatibility
  4698. problems if there is a check added later in a release series for an
  4699. \&\s-1ABI\s0 issue discovered since the initial release. \fB\-Wabi\fR warns
  4700. about more things if an older \s-1ABI\s0 version is selected (with
  4701. \&\fB\-fabi\-version=\fR\fIn\fR).
  4702. .Sp
  4703. \&\fB\-Wabi\fR can also be used with an explicit version number to
  4704. warn about \*(C+ \s-1ABI\s0 compatibility with a particular \fB\-fabi\-version\fR
  4705. level, e.g. \fB\-Wabi=2\fR to warn about changes relative to
  4706. \&\fB\-fabi\-version=2\fR.
  4707. .Sp
  4708. If an explicit version number is provided and
  4709. \&\fB\-fabi\-compat\-version\fR is not specified, the version number
  4710. from this option is used for compatibility aliases. If no explicit
  4711. version number is provided with this option, but
  4712. \&\fB\-fabi\-compat\-version\fR is specified, that version number is
  4713. used for \*(C+ \s-1ABI\s0 warnings.
  4714. .Sp
  4715. Although an effort has been made to warn about
  4716. all such cases, there are probably some cases that are not warned about,
  4717. even though G++ is generating incompatible code. There may also be
  4718. cases where warnings are emitted even though the code that is generated
  4719. is compatible.
  4720. .Sp
  4721. You should rewrite your code to avoid these warnings if you are
  4722. concerned about the fact that code generated by G++ may not be binary
  4723. compatible with code generated by other compilers.
  4724. .Sp
  4725. Known incompatibilities in \fB\-fabi\-version=2\fR (which was the
  4726. default from \s-1GCC 3.4\s0 to 4.9) include:
  4727. .RS 4
  4728. .IP "*" 4
  4729. A template with a non-type template parameter of reference type was
  4730. mangled incorrectly:
  4731. .Sp
  4732. .Vb 3
  4733. \& extern int N;
  4734. \& template <int &> struct S {};
  4735. \& void n (S<N>) {2}
  4736. .Ve
  4737. .Sp
  4738. This was fixed in \fB\-fabi\-version=3\fR.
  4739. .IP "*" 4
  4740. \&\s-1SIMD\s0 vector types declared using \f(CW\*(C`_\|_attribute ((vector_size))\*(C'\fR were
  4741. mangled in a non-standard way that does not allow for overloading of
  4742. functions taking vectors of different sizes.
  4743. .Sp
  4744. The mangling was changed in \fB\-fabi\-version=4\fR.
  4745. .IP "*" 4
  4746. \&\f(CW\*(C`_\|_attribute ((const))\*(C'\fR and \f(CW\*(C`noreturn\*(C'\fR were mangled as type
  4747. qualifiers, and \f(CW\*(C`decltype\*(C'\fR of a plain declaration was folded away.
  4748. .Sp
  4749. These mangling issues were fixed in \fB\-fabi\-version=5\fR.
  4750. .IP "*" 4
  4751. Scoped enumerators passed as arguments to a variadic function are
  4752. promoted like unscoped enumerators, causing \f(CW\*(C`va_arg\*(C'\fR to complain.
  4753. On most targets this does not actually affect the parameter passing
  4754. \&\s-1ABI,\s0 as there is no way to pass an argument smaller than \f(CW\*(C`int\*(C'\fR.
  4755. .Sp
  4756. Also, the \s-1ABI\s0 changed the mangling of template argument packs,
  4757. \&\f(CW\*(C`const_cast\*(C'\fR, \f(CW\*(C`static_cast\*(C'\fR, prefix increment/decrement, and
  4758. a class scope function used as a template argument.
  4759. .Sp
  4760. These issues were corrected in \fB\-fabi\-version=6\fR.
  4761. .IP "*" 4
  4762. Lambdas in default argument scope were mangled incorrectly, and the
  4763. \&\s-1ABI\s0 changed the mangling of \f(CW\*(C`nullptr_t\*(C'\fR.
  4764. .Sp
  4765. These issues were corrected in \fB\-fabi\-version=7\fR.
  4766. .IP "*" 4
  4767. When mangling a function type with function-cv-qualifiers, the
  4768. un-qualified function type was incorrectly treated as a substitution
  4769. candidate.
  4770. .Sp
  4771. This was fixed in \fB\-fabi\-version=8\fR, the default for \s-1GCC 5.1.\s0
  4772. .IP "*" 4
  4773. \&\f(CW\*(C`decltype(nullptr)\*(C'\fR incorrectly had an alignment of 1, leading to
  4774. unaligned accesses. Note that this did not affect the \s-1ABI\s0 of a
  4775. function with a \f(CW\*(C`nullptr_t\*(C'\fR parameter, as parameters have a
  4776. minimum alignment.
  4777. .Sp
  4778. This was fixed in \fB\-fabi\-version=9\fR, the default for \s-1GCC 5.2.\s0
  4779. .IP "*" 4
  4780. Target-specific attributes that affect the identity of a type, such as
  4781. ia32 calling conventions on a function type (stdcall, regparm, etc.),
  4782. did not affect the mangled name, leading to name collisions when
  4783. function pointers were used as template arguments.
  4784. .Sp
  4785. This was fixed in \fB\-fabi\-version=10\fR, the default for \s-1GCC 6.1.\s0
  4786. .RE
  4787. .RS 4
  4788. .Sp
  4789. This option also enables warnings about psABI-related changes.
  4790. The known psABI changes at this point include:
  4791. .IP "*" 4
  4792. For SysV/x86\-64, unions with \f(CW\*(C`long double\*(C'\fR members are
  4793. passed in memory as specified in psABI. Prior to \s-1GCC 4.4,\s0 this was not
  4794. the case. For example:
  4795. .Sp
  4796. .Vb 4
  4797. \& union U {
  4798. \& long double ld;
  4799. \& int i;
  4800. \& };
  4801. .Ve
  4802. .Sp
  4803. \&\f(CW\*(C`union U\*(C'\fR is now always passed in memory.
  4804. .RE
  4805. .RS 4
  4806. .RE
  4807. .IP "\fB\-Wchar\-subscripts\fR" 4
  4808. .IX Item "-Wchar-subscripts"
  4809. Warn if an array subscript has type \f(CW\*(C`char\*(C'\fR. This is a common cause
  4810. of error, as programmers often forget that this type is signed on some
  4811. machines.
  4812. This warning is enabled by \fB\-Wall\fR.
  4813. .IP "\fB\-Wno\-coverage\-mismatch\fR" 4
  4814. .IX Item "-Wno-coverage-mismatch"
  4815. Warn if feedback profiles do not match when using the
  4816. \&\fB\-fprofile\-use\fR option.
  4817. If a source file is changed between compiling with \fB\-fprofile\-generate\fR
  4818. and with \fB\-fprofile\-use\fR, the files with the profile feedback can fail
  4819. to match the source file and \s-1GCC\s0 cannot use the profile feedback
  4820. information. By default, this warning is enabled and is treated as an
  4821. error. \fB\-Wno\-coverage\-mismatch\fR can be used to disable the
  4822. warning or \fB\-Wno\-error=coverage\-mismatch\fR can be used to
  4823. disable the error. Disabling the error for this warning can result in
  4824. poorly optimized code and is useful only in the
  4825. case of very minor changes such as bug fixes to an existing code-base.
  4826. Completely disabling the warning is not recommended.
  4827. .IP "\fB\-Wno\-cpp\fR" 4
  4828. .IX Item "-Wno-cpp"
  4829. (C, Objective-C, \*(C+, Objective\-\*(C+ and Fortran only)
  4830. Suppress warning messages emitted by \f(CW\*(C`#warning\*(C'\fR directives.
  4831. .IP "\fB\-Wdouble\-promotion\fR (C, \*(C+, Objective-C and Objective\-\*(C+ only)" 4
  4832. .IX Item "-Wdouble-promotion (C, , Objective-C and Objective- only)"
  4833. Give a warning when a value of type \f(CW\*(C`float\*(C'\fR is implicitly
  4834. promoted to \f(CW\*(C`double\*(C'\fR. CPUs with a 32\-bit \*(L"single-precision\*(R"
  4835. floating-point unit implement \f(CW\*(C`float\*(C'\fR in hardware, but emulate
  4836. \&\f(CW\*(C`double\*(C'\fR in software. On such a machine, doing computations
  4837. using \f(CW\*(C`double\*(C'\fR values is much more expensive because of the
  4838. overhead required for software emulation.
  4839. .Sp
  4840. It is easy to accidentally do computations with \f(CW\*(C`double\*(C'\fR because
  4841. floating-point literals are implicitly of type \f(CW\*(C`double\*(C'\fR. For
  4842. example, in:
  4843. .Sp
  4844. .Vb 4
  4845. \& float area(float radius)
  4846. \& {
  4847. \& return 3.14159 * radius * radius;
  4848. \& }
  4849. .Ve
  4850. .Sp
  4851. the compiler performs the entire computation with \f(CW\*(C`double\*(C'\fR
  4852. because the floating-point literal is a \f(CW\*(C`double\*(C'\fR.
  4853. .IP "\fB\-Wduplicate\-decl\-specifier\fR (C and Objective-C only)" 4
  4854. .IX Item "-Wduplicate-decl-specifier (C and Objective-C only)"
  4855. Warn if a declaration has duplicate \f(CW\*(C`const\*(C'\fR, \f(CW\*(C`volatile\*(C'\fR,
  4856. \&\f(CW\*(C`restrict\*(C'\fR or \f(CW\*(C`_Atomic\*(C'\fR specifier. This warning is enabled by
  4857. \&\fB\-Wall\fR.
  4858. .IP "\fB\-Wformat\fR" 4
  4859. .IX Item "-Wformat"
  4860. .PD 0
  4861. .IP "\fB\-Wformat=\fR\fIn\fR" 4
  4862. .IX Item "-Wformat=n"
  4863. .PD
  4864. Check calls to \f(CW\*(C`printf\*(C'\fR and \f(CW\*(C`scanf\*(C'\fR, etc., to make sure that
  4865. the arguments supplied have types appropriate to the format string
  4866. specified, and that the conversions specified in the format string make
  4867. sense. This includes standard functions, and others specified by format
  4868. attributes, in the \f(CW\*(C`printf\*(C'\fR,
  4869. \&\f(CW\*(C`scanf\*(C'\fR, \f(CW\*(C`strftime\*(C'\fR and \f(CW\*(C`strfmon\*(C'\fR (an X/Open extension,
  4870. not in the C standard) families (or other target-specific families).
  4871. Which functions are checked without format attributes having been
  4872. specified depends on the standard version selected, and such checks of
  4873. functions without the attribute specified are disabled by
  4874. \&\fB\-ffreestanding\fR or \fB\-fno\-builtin\fR.
  4875. .Sp
  4876. The formats are checked against the format features supported by \s-1GNU\s0
  4877. libc version 2.2. These include all \s-1ISO C90\s0 and C99 features, as well
  4878. as features from the Single Unix Specification and some \s-1BSD\s0 and \s-1GNU\s0
  4879. extensions. Other library implementations may not support all these
  4880. features; \s-1GCC\s0 does not support warning about features that go beyond a
  4881. particular library's limitations. However, if \fB\-Wpedantic\fR is used
  4882. with \fB\-Wformat\fR, warnings are given about format features not
  4883. in the selected standard version (but not for \f(CW\*(C`strfmon\*(C'\fR formats,
  4884. since those are not in any version of the C standard).
  4885. .RS 4
  4886. .IP "\fB\-Wformat=1\fR" 4
  4887. .IX Item "-Wformat=1"
  4888. .PD 0
  4889. .IP "\fB\-Wformat\fR" 4
  4890. .IX Item "-Wformat"
  4891. .PD
  4892. Option \fB\-Wformat\fR is equivalent to \fB\-Wformat=1\fR, and
  4893. \&\fB\-Wno\-format\fR is equivalent to \fB\-Wformat=0\fR. Since
  4894. \&\fB\-Wformat\fR also checks for null format arguments for several
  4895. functions, \fB\-Wformat\fR also implies \fB\-Wnonnull\fR. Some
  4896. aspects of this level of format checking can be disabled by the
  4897. options: \fB\-Wno\-format\-contains\-nul\fR,
  4898. \&\fB\-Wno\-format\-extra\-args\fR, and \fB\-Wno\-format\-zero\-length\fR.
  4899. \&\fB\-Wformat\fR is enabled by \fB\-Wall\fR.
  4900. .IP "\fB\-Wformat=2\fR" 4
  4901. .IX Item "-Wformat=2"
  4902. Enable \fB\-Wformat\fR plus additional format checks. Currently
  4903. equivalent to \fB\-Wformat \-Wformat\-nonliteral \-Wformat\-security
  4904. \&\-Wformat\-y2k\fR.
  4905. .RE
  4906. .RS 4
  4907. .RE
  4908. .IP "\fB\-Wno\-format\-contains\-nul\fR" 4
  4909. .IX Item "-Wno-format-contains-nul"
  4910. If \fB\-Wformat\fR is specified, do not warn about format strings that
  4911. contain \s-1NUL\s0 bytes.
  4912. .IP "\fB\-Wno\-format\-extra\-args\fR" 4
  4913. .IX Item "-Wno-format-extra-args"
  4914. If \fB\-Wformat\fR is specified, do not warn about excess arguments to a
  4915. \&\f(CW\*(C`printf\*(C'\fR or \f(CW\*(C`scanf\*(C'\fR format function. The C standard specifies
  4916. that such arguments are ignored.
  4917. .Sp
  4918. Where the unused arguments lie between used arguments that are
  4919. specified with \fB$\fR operand number specifications, normally
  4920. warnings are still given, since the implementation could not know what
  4921. type to pass to \f(CW\*(C`va_arg\*(C'\fR to skip the unused arguments. However,
  4922. in the case of \f(CW\*(C`scanf\*(C'\fR formats, this option suppresses the
  4923. warning if the unused arguments are all pointers, since the Single
  4924. Unix Specification says that such unused arguments are allowed.
  4925. .IP "\fB\-Wformat\-overflow\fR" 4
  4926. .IX Item "-Wformat-overflow"
  4927. .PD 0
  4928. .IP "\fB\-Wformat\-overflow=\fR\fIlevel\fR" 4
  4929. .IX Item "-Wformat-overflow=level"
  4930. .PD
  4931. Warn about calls to formatted input/output functions such as \f(CW\*(C`sprintf\*(C'\fR
  4932. and \f(CW\*(C`vsprintf\*(C'\fR that might overflow the destination buffer. When the
  4933. exact number of bytes written by a format directive cannot be determined
  4934. at compile-time it is estimated based on heuristics that depend on the
  4935. \&\fIlevel\fR argument and on optimization. While enabling optimization
  4936. will in most cases improve the accuracy of the warning, it may also
  4937. result in false positives.
  4938. .RS 4
  4939. .IP "\fB\-Wformat\-overflow\fR" 4
  4940. .IX Item "-Wformat-overflow"
  4941. .PD 0
  4942. .IP "\fB\-Wformat\-overflow=1\fR" 4
  4943. .IX Item "-Wformat-overflow=1"
  4944. .PD
  4945. Level \fI1\fR of \fB\-Wformat\-overflow\fR enabled by \fB\-Wformat\fR
  4946. employs a conservative approach that warns only about calls that most
  4947. likely overflow the buffer. At this level, numeric arguments to format
  4948. directives with unknown values are assumed to have the value of one, and
  4949. strings of unknown length to be empty. Numeric arguments that are known
  4950. to be bounded to a subrange of their type, or string arguments whose output
  4951. is bounded either by their directive's precision or by a finite set of
  4952. string literals, are assumed to take on the value within the range that
  4953. results in the most bytes on output. For example, the call to \f(CW\*(C`sprintf\*(C'\fR
  4954. below is diagnosed because even with both \fIa\fR and \fIb\fR equal to zero,
  4955. the terminating \s-1NUL\s0 character (\f(CW\*(Aq\e0\*(Aq\fR) appended by the function
  4956. to the destination buffer will be written past its end. Increasing
  4957. the size of the buffer by a single byte is sufficient to avoid the
  4958. warning, though it may not be sufficient to avoid the overflow.
  4959. .Sp
  4960. .Vb 5
  4961. \& void f (int a, int b)
  4962. \& {
  4963. \& char buf [13];
  4964. \& sprintf (buf, "a = %i, b = %i\en", a, b);
  4965. \& }
  4966. .Ve
  4967. .IP "\fB\-Wformat\-overflow=2\fR" 4
  4968. .IX Item "-Wformat-overflow=2"
  4969. Level \fI2\fR warns also about calls that might overflow the destination
  4970. buffer given an argument of sufficient length or magnitude. At level
  4971. \&\fI2\fR, unknown numeric arguments are assumed to have the minimum
  4972. representable value for signed types with a precision greater than 1, and
  4973. the maximum representable value otherwise. Unknown string arguments whose
  4974. length cannot be assumed to be bounded either by the directive's precision,
  4975. or by a finite set of string literals they may evaluate to, or the character
  4976. array they may point to, are assumed to be 1 character long.
  4977. .Sp
  4978. At level \fI2\fR, the call in the example above is again diagnosed, but
  4979. this time because with \fIa\fR equal to a 32\-bit \f(CW\*(C`INT_MIN\*(C'\fR the first
  4980. \&\f(CW%i\fR directive will write some of its digits beyond the end of
  4981. the destination buffer. To make the call safe regardless of the values
  4982. of the two variables, the size of the destination buffer must be increased
  4983. to at least 34 bytes. \s-1GCC\s0 includes the minimum size of the buffer in
  4984. an informational note following the warning.
  4985. .Sp
  4986. An alternative to increasing the size of the destination buffer is to
  4987. constrain the range of formatted values. The maximum length of string
  4988. arguments can be bounded by specifying the precision in the format
  4989. directive. When numeric arguments of format directives can be assumed
  4990. to be bounded by less than the precision of their type, choosing
  4991. an appropriate length modifier to the format specifier will reduce
  4992. the required buffer size. For example, if \fIa\fR and \fIb\fR in the
  4993. example above can be assumed to be within the precision of
  4994. the \f(CW\*(C`short int\*(C'\fR type then using either the \f(CW%hi\fR format
  4995. directive or casting the argument to \f(CW\*(C`short\*(C'\fR reduces the maximum
  4996. required size of the buffer to 24 bytes.
  4997. .Sp
  4998. .Vb 5
  4999. \& void f (int a, int b)
  5000. \& {
  5001. \& char buf [23];
  5002. \& sprintf (buf, "a = %hi, b = %i\en", a, (short)b);
  5003. \& }
  5004. .Ve
  5005. .RE
  5006. .RS 4
  5007. .RE
  5008. .IP "\fB\-Wno\-format\-zero\-length\fR" 4
  5009. .IX Item "-Wno-format-zero-length"
  5010. If \fB\-Wformat\fR is specified, do not warn about zero-length formats.
  5011. The C standard specifies that zero-length formats are allowed.
  5012. .IP "\fB\-Wformat\-nonliteral\fR" 4
  5013. .IX Item "-Wformat-nonliteral"
  5014. If \fB\-Wformat\fR is specified, also warn if the format string is not a
  5015. string literal and so cannot be checked, unless the format function
  5016. takes its format arguments as a \f(CW\*(C`va_list\*(C'\fR.
  5017. .IP "\fB\-Wformat\-security\fR" 4
  5018. .IX Item "-Wformat-security"
  5019. If \fB\-Wformat\fR is specified, also warn about uses of format
  5020. functions that represent possible security problems. At present, this
  5021. warns about calls to \f(CW\*(C`printf\*(C'\fR and \f(CW\*(C`scanf\*(C'\fR functions where the
  5022. format string is not a string literal and there are no format arguments,
  5023. as in \f(CW\*(C`printf (foo);\*(C'\fR. This may be a security hole if the format
  5024. string came from untrusted input and contains \fB\f(CB%n\fB\fR. (This is
  5025. currently a subset of what \fB\-Wformat\-nonliteral\fR warns about, but
  5026. in future warnings may be added to \fB\-Wformat\-security\fR that are not
  5027. included in \fB\-Wformat\-nonliteral\fR.)
  5028. .IP "\fB\-Wformat\-signedness\fR" 4
  5029. .IX Item "-Wformat-signedness"
  5030. If \fB\-Wformat\fR is specified, also warn if the format string
  5031. requires an unsigned argument and the argument is signed and vice versa.
  5032. .IP "\fB\-Wformat\-truncation\fR" 4
  5033. .IX Item "-Wformat-truncation"
  5034. .PD 0
  5035. .IP "\fB\-Wformat\-truncation=\fR\fIlevel\fR" 4
  5036. .IX Item "-Wformat-truncation=level"
  5037. .PD
  5038. Warn about calls to formatted input/output functions such as \f(CW\*(C`snprintf\*(C'\fR
  5039. and \f(CW\*(C`vsnprintf\*(C'\fR that might result in output truncation. When the exact
  5040. number of bytes written by a format directive cannot be determined at
  5041. compile-time it is estimated based on heuristics that depend on
  5042. the \fIlevel\fR argument and on optimization. While enabling optimization
  5043. will in most cases improve the accuracy of the warning, it may also result
  5044. in false positives. Except as noted otherwise, the option uses the same
  5045. logic \fB\-Wformat\-overflow\fR.
  5046. .RS 4
  5047. .IP "\fB\-Wformat\-truncation\fR" 4
  5048. .IX Item "-Wformat-truncation"
  5049. .PD 0
  5050. .IP "\fB\-Wformat\-truncation=1\fR" 4
  5051. .IX Item "-Wformat-truncation=1"
  5052. .PD
  5053. Level \fI1\fR of \fB\-Wformat\-truncation\fR enabled by \fB\-Wformat\fR
  5054. employs a conservative approach that warns only about calls to bounded
  5055. functions whose return value is unused and that will most likely result
  5056. in output truncation.
  5057. .IP "\fB\-Wformat\-truncation=2\fR" 4
  5058. .IX Item "-Wformat-truncation=2"
  5059. Level \fI2\fR warns also about calls to bounded functions whose return
  5060. value is used and that might result in truncation given an argument of
  5061. sufficient length or magnitude.
  5062. .RE
  5063. .RS 4
  5064. .RE
  5065. .IP "\fB\-Wformat\-y2k\fR" 4
  5066. .IX Item "-Wformat-y2k"
  5067. If \fB\-Wformat\fR is specified, also warn about \f(CW\*(C`strftime\*(C'\fR
  5068. formats that may yield only a two-digit year.
  5069. .IP "\fB\-Wnonnull\fR" 4
  5070. .IX Item "-Wnonnull"
  5071. Warn about passing a null pointer for arguments marked as
  5072. requiring a non-null value by the \f(CW\*(C`nonnull\*(C'\fR function attribute.
  5073. .Sp
  5074. \&\fB\-Wnonnull\fR is included in \fB\-Wall\fR and \fB\-Wformat\fR. It
  5075. can be disabled with the \fB\-Wno\-nonnull\fR option.
  5076. .IP "\fB\-Wnonnull\-compare\fR" 4
  5077. .IX Item "-Wnonnull-compare"
  5078. Warn when comparing an argument marked with the \f(CW\*(C`nonnull\*(C'\fR
  5079. function attribute against null inside the function.
  5080. .Sp
  5081. \&\fB\-Wnonnull\-compare\fR is included in \fB\-Wall\fR. It
  5082. can be disabled with the \fB\-Wno\-nonnull\-compare\fR option.
  5083. .IP "\fB\-Wnull\-dereference\fR" 4
  5084. .IX Item "-Wnull-dereference"
  5085. Warn if the compiler detects paths that trigger erroneous or
  5086. undefined behavior due to dereferencing a null pointer. This option
  5087. is only active when \fB\-fdelete\-null\-pointer\-checks\fR is active,
  5088. which is enabled by optimizations in most targets. The precision of
  5089. the warnings depends on the optimization options used.
  5090. .IP "\fB\-Winit\-self\fR (C, \*(C+, Objective-C and Objective\-\*(C+ only)" 4
  5091. .IX Item "-Winit-self (C, , Objective-C and Objective- only)"
  5092. Warn about uninitialized variables that are initialized with themselves.
  5093. Note this option can only be used with the \fB\-Wuninitialized\fR option.
  5094. .Sp
  5095. For example, \s-1GCC\s0 warns about \f(CW\*(C`i\*(C'\fR being uninitialized in the
  5096. following snippet only when \fB\-Winit\-self\fR has been specified:
  5097. .Sp
  5098. .Vb 5
  5099. \& int f()
  5100. \& {
  5101. \& int i = i;
  5102. \& return i;
  5103. \& }
  5104. .Ve
  5105. .Sp
  5106. This warning is enabled by \fB\-Wall\fR in \*(C+.
  5107. .IP "\fB\-Wno\-implicit\-int\fR (C and Objective-C only)" 4
  5108. .IX Item "-Wno-implicit-int (C and Objective-C only)"
  5109. This option controls warnings when a declaration does not specify a type.
  5110. This warning is enabled by default in C99 and later dialects of C,
  5111. and also by \fB\-Wall\fR.
  5112. .IP "\fB\-Wno\-implicit\-function\-declaration\fR (C and Objective-C only)" 4
  5113. .IX Item "-Wno-implicit-function-declaration (C and Objective-C only)"
  5114. This option controls warnings when a function is used before being declared.
  5115. This warning is enabled by default in C99 and later dialects of C,
  5116. and also by \fB\-Wall\fR.
  5117. The warning is made into an error by \fB\-pedantic\-errors\fR.
  5118. .IP "\fB\-Wimplicit\fR (C and Objective-C only)" 4
  5119. .IX Item "-Wimplicit (C and Objective-C only)"
  5120. Same as \fB\-Wimplicit\-int\fR and \fB\-Wimplicit\-function\-declaration\fR.
  5121. This warning is enabled by \fB\-Wall\fR.
  5122. .IP "\fB\-Wimplicit\-fallthrough\fR" 4
  5123. .IX Item "-Wimplicit-fallthrough"
  5124. \&\fB\-Wimplicit\-fallthrough\fR is the same as \fB\-Wimplicit\-fallthrough=3\fR
  5125. and \fB\-Wno\-implicit\-fallthrough\fR is the same as
  5126. \&\fB\-Wimplicit\-fallthrough=0\fR.
  5127. .IP "\fB\-Wimplicit\-fallthrough=\fR\fIn\fR" 4
  5128. .IX Item "-Wimplicit-fallthrough=n"
  5129. Warn when a switch case falls through. For example:
  5130. .Sp
  5131. .Vb 11
  5132. \& switch (cond)
  5133. \& {
  5134. \& case 1:
  5135. \& a = 1;
  5136. \& break;
  5137. \& case 2:
  5138. \& a = 2;
  5139. \& case 3:
  5140. \& a = 3;
  5141. \& break;
  5142. \& }
  5143. .Ve
  5144. .Sp
  5145. This warning does not warn when the last statement of a case cannot
  5146. fall through, e.g. when there is a return statement or a call to function
  5147. declared with the noreturn attribute. \fB\-Wimplicit\-fallthrough=\fR
  5148. also takes into account control flow statements, such as ifs, and only
  5149. warns when appropriate. E.g.
  5150. .Sp
  5151. .Vb 10
  5152. \& switch (cond)
  5153. \& {
  5154. \& case 1:
  5155. \& if (i > 3) {
  5156. \& bar (5);
  5157. \& break;
  5158. \& } else if (i < 1) {
  5159. \& bar (0);
  5160. \& } else
  5161. \& return;
  5162. \& default:
  5163. \& ...
  5164. \& }
  5165. .Ve
  5166. .Sp
  5167. Since there are occasions where a switch case fall through is desirable,
  5168. \&\s-1GCC\s0 provides an attribute, \f(CW\*(C`_\|_attribute_\|_ ((fallthrough))\*(C'\fR, that is
  5169. to be used along with a null statement to suppress this warning that
  5170. would normally occur:
  5171. .Sp
  5172. .Vb 8
  5173. \& switch (cond)
  5174. \& {
  5175. \& case 1:
  5176. \& bar (0);
  5177. \& _\|_attribute_\|_ ((fallthrough));
  5178. \& default:
  5179. \& ...
  5180. \& }
  5181. .Ve
  5182. .Sp
  5183. \&\*(C+17 provides a standard way to suppress the \fB\-Wimplicit\-fallthrough\fR
  5184. warning using \f(CW\*(C`[[fallthrough]];\*(C'\fR instead of the \s-1GNU\s0 attribute. In \*(C+11
  5185. or \*(C+14 users can use \f(CW\*(C`[[gnu::fallthrough]];\*(C'\fR, which is a \s-1GNU\s0 extension.
  5186. Instead of these attributes, it is also possible to add a fallthrough comment
  5187. to silence the warning. The whole body of the C or \*(C+ style comment should
  5188. match the given regular expressions listed below. The option argument \fIn\fR
  5189. specifies what kind of comments are accepted:
  5190. .RS 4
  5191. .IP "*<\fB\-Wimplicit\-fallthrough=0\fR disables the warning altogether.>" 4
  5192. .IX Item "*<-Wimplicit-fallthrough=0 disables the warning altogether.>"
  5193. .PD 0
  5194. .ie n .IP "*<\fB\-Wimplicit\-fallthrough=1\fR matches "".*"" regular>" 4
  5195. .el .IP "*<\fB\-Wimplicit\-fallthrough=1\fR matches \f(CW.*\fR regular>" 4
  5196. .IX Item "*<-Wimplicit-fallthrough=1 matches .* regular>"
  5197. .PD
  5198. expression, any comment is used as fallthrough comment.
  5199. .IP "*<\fB\-Wimplicit\-fallthrough=2\fR case insensitively matches>" 4
  5200. .IX Item "*<-Wimplicit-fallthrough=2 case insensitively matches>"
  5201. \&\f(CW\*(C`.*falls?[ \et\-]*thr(ough|u).*\*(C'\fR regular expression.
  5202. .IP "*<\fB\-Wimplicit\-fallthrough=3\fR case sensitively matches one of the>" 4
  5203. .IX Item "*<-Wimplicit-fallthrough=3 case sensitively matches one of the>"
  5204. following regular expressions:
  5205. .RS 4
  5206. .ie n .IP "*<""\-fallthrough"">" 4
  5207. .el .IP "*<\f(CW\-fallthrough\fR>" 4
  5208. .IX Item "*<-fallthrough>"
  5209. .PD 0
  5210. .ie n .IP "*<""@fallthrough@"">" 4
  5211. .el .IP "*<\f(CW@fallthrough@\fR>" 4
  5212. .IX Item "*<@fallthrough@>"
  5213. .ie n .IP "*<""lint \-fallthrough[ \et]*"">" 4
  5214. .el .IP "*<\f(CWlint \-fallthrough[ \et]*\fR>" 4
  5215. .IX Item "*<lint -fallthrough[ t]*>"
  5216. .ie n .IP "*<""[ \et.!]*(ELSE,? |INTENTIONAL(LY)? )?FALL(S | |\-)?THR(OUGH|U)[ \et.!]*(\-[^\en\er]*)?"">" 4
  5217. .el .IP "*<\f(CW[ \et.!]*(ELSE,? |INTENTIONAL(LY)? )?FALL(S | |\-)?THR(OUGH|U)[ \et.!]*(\-[^\en\er]*)?\fR>" 4
  5218. .IX Item "*<[ t.!]*(ELSE,? |INTENTIONAL(LY)? )?FALL(S | |-)?THR(OUGH|U)[ t.!]*(-[^nr]*)?>"
  5219. .ie n .IP "*<""[ \et.!]*(Else,? |Intentional(ly)? )?Fall((s | |\-)[Tt]|t)hr(ough|u)[ \et.!]*(\-[^\en\er]*)?"">" 4
  5220. .el .IP "*<\f(CW[ \et.!]*(Else,? |Intentional(ly)? )?Fall((s | |\-)[Tt]|t)hr(ough|u)[ \et.!]*(\-[^\en\er]*)?\fR>" 4
  5221. .IX Item "*<[ t.!]*(Else,? |Intentional(ly)? )?Fall((s | |-)[Tt]|t)hr(ough|u)[ t.!]*(-[^nr]*)?>"
  5222. .ie n .IP "*<""[ \et.!]*([Ee]lse,? |[Ii]ntentional(ly)? )?fall(s | |\-)?thr(ough|u)[ \et.!]*(\-[^\en\er]*)?"">" 4
  5223. .el .IP "*<\f(CW[ \et.!]*([Ee]lse,? |[Ii]ntentional(ly)? )?fall(s | |\-)?thr(ough|u)[ \et.!]*(\-[^\en\er]*)?\fR>" 4
  5224. .IX Item "*<[ t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )?fall(s | |-)?thr(ough|u)[ t.!]*(-[^nr]*)?>"
  5225. .RE
  5226. .RS 4
  5227. .RE
  5228. .IP "*<\fB\-Wimplicit\-fallthrough=4\fR case sensitively matches one of the>" 4
  5229. .IX Item "*<-Wimplicit-fallthrough=4 case sensitively matches one of the>"
  5230. .PD
  5231. following regular expressions:
  5232. .RS 4
  5233. .ie n .IP "*<""\-fallthrough"">" 4
  5234. .el .IP "*<\f(CW\-fallthrough\fR>" 4
  5235. .IX Item "*<-fallthrough>"
  5236. .PD 0
  5237. .ie n .IP "*<""@fallthrough@"">" 4
  5238. .el .IP "*<\f(CW@fallthrough@\fR>" 4
  5239. .IX Item "*<@fallthrough@>"
  5240. .ie n .IP "*<""lint \-fallthrough[ \et]*"">" 4
  5241. .el .IP "*<\f(CWlint \-fallthrough[ \et]*\fR>" 4
  5242. .IX Item "*<lint -fallthrough[ t]*>"
  5243. .ie n .IP "*<""[ \et]*FALLTHR(OUGH|U)[ \et]*"">" 4
  5244. .el .IP "*<\f(CW[ \et]*FALLTHR(OUGH|U)[ \et]*\fR>" 4
  5245. .IX Item "*<[ t]*FALLTHR(OUGH|U)[ t]*>"
  5246. .RE
  5247. .RS 4
  5248. .RE
  5249. .IP "*<\fB\-Wimplicit\-fallthrough=5\fR doesn't recognize any comments as>" 4
  5250. .IX Item "*<-Wimplicit-fallthrough=5 doesn't recognize any comments as>"
  5251. .PD
  5252. fallthrough comments, only attributes disable the warning.
  5253. .RE
  5254. .RS 4
  5255. .Sp
  5256. The comment needs to be followed after optional whitespace and other comments
  5257. by \f(CW\*(C`case\*(C'\fR or \f(CW\*(C`default\*(C'\fR keywords or by a user label that precedes some
  5258. \&\f(CW\*(C`case\*(C'\fR or \f(CW\*(C`default\*(C'\fR label.
  5259. .Sp
  5260. .Vb 8
  5261. \& switch (cond)
  5262. \& {
  5263. \& case 1:
  5264. \& bar (0);
  5265. \& /* FALLTHRU */
  5266. \& default:
  5267. \& ...
  5268. \& }
  5269. .Ve
  5270. .Sp
  5271. The \fB\-Wimplicit\-fallthrough=3\fR warning is enabled by \fB\-Wextra\fR.
  5272. .RE
  5273. .IP "\fB\-Wno\-if\-not\-aligned\fR (C, \*(C+, Objective-C and Objective\-\*(C+ only)" 4
  5274. .IX Item "-Wno-if-not-aligned (C, , Objective-C and Objective- only)"
  5275. Control if warnings triggered by the \f(CW\*(C`warn_if_not_aligned\*(C'\fR attribute
  5276. should be issued. These warnings are enabled by default.
  5277. .IP "\fB\-Wignored\-qualifiers\fR (C and \*(C+ only)" 4
  5278. .IX Item "-Wignored-qualifiers (C and only)"
  5279. Warn if the return type of a function has a type qualifier
  5280. such as \f(CW\*(C`const\*(C'\fR. For \s-1ISO C\s0 such a type qualifier has no effect,
  5281. since the value returned by a function is not an lvalue.
  5282. For \*(C+, the warning is only emitted for scalar types or \f(CW\*(C`void\*(C'\fR.
  5283. \&\s-1ISO C\s0 prohibits qualified \f(CW\*(C`void\*(C'\fR return types on function
  5284. definitions, so such return types always receive a warning
  5285. even without this option.
  5286. .Sp
  5287. This warning is also enabled by \fB\-Wextra\fR.
  5288. .IP "\fB\-Wno\-ignored\-attributes\fR (C and \*(C+ only)" 4
  5289. .IX Item "-Wno-ignored-attributes (C and only)"
  5290. This option controls warnings when an attribute is ignored.
  5291. This is different from the
  5292. \&\fB\-Wattributes\fR option in that it warns whenever the compiler decides
  5293. to drop an attribute, not that the attribute is either unknown, used in a
  5294. wrong place, etc. This warning is enabled by default.
  5295. .IP "\fB\-Wmain\fR" 4
  5296. .IX Item "-Wmain"
  5297. Warn if the type of \f(CW\*(C`main\*(C'\fR is suspicious. \f(CW\*(C`main\*(C'\fR should be
  5298. a function with external linkage, returning int, taking either zero
  5299. arguments, two, or three arguments of appropriate types. This warning
  5300. is enabled by default in \*(C+ and is enabled by either \fB\-Wall\fR
  5301. or \fB\-Wpedantic\fR.
  5302. .IP "\fB\-Wmisleading\-indentation\fR (C and \*(C+ only)" 4
  5303. .IX Item "-Wmisleading-indentation (C and only)"
  5304. Warn when the indentation of the code does not reflect the block structure.
  5305. Specifically, a warning is issued for \f(CW\*(C`if\*(C'\fR, \f(CW\*(C`else\*(C'\fR, \f(CW\*(C`while\*(C'\fR, and
  5306. \&\f(CW\*(C`for\*(C'\fR clauses with a guarded statement that does not use braces,
  5307. followed by an unguarded statement with the same indentation.
  5308. .Sp
  5309. In the following example, the call to \*(L"bar\*(R" is misleadingly indented as
  5310. if it were guarded by the \*(L"if\*(R" conditional.
  5311. .Sp
  5312. .Vb 3
  5313. \& if (some_condition ())
  5314. \& foo ();
  5315. \& bar (); /* Gotcha: this is not guarded by the "if". */
  5316. .Ve
  5317. .Sp
  5318. In the case of mixed tabs and spaces, the warning uses the
  5319. \&\fB\-ftabstop=\fR option to determine if the statements line up
  5320. (defaulting to 8).
  5321. .Sp
  5322. The warning is not issued for code involving multiline preprocessor logic
  5323. such as the following example.
  5324. .Sp
  5325. .Vb 6
  5326. \& if (flagA)
  5327. \& foo (0);
  5328. \& #if SOME_CONDITION_THAT_DOES_NOT_HOLD
  5329. \& if (flagB)
  5330. \& #endif
  5331. \& foo (1);
  5332. .Ve
  5333. .Sp
  5334. The warning is not issued after a \f(CW\*(C`#line\*(C'\fR directive, since this
  5335. typically indicates autogenerated code, and no assumptions can be made
  5336. about the layout of the file that the directive references.
  5337. .Sp
  5338. This warning is enabled by \fB\-Wall\fR in C and \*(C+.
  5339. .IP "\fB\-Wmissing\-attributes\fR" 4
  5340. .IX Item "-Wmissing-attributes"
  5341. Warn when a declaration of a function is missing one or more attributes
  5342. that a related function is declared with and whose absence may adversely
  5343. affect the correctness or efficiency of generated code. For example,
  5344. the warning is issued for declarations of aliases that use attributes
  5345. to specify less restrictive requirements than those of their targets.
  5346. This typically represents a potential optimization opportunity.
  5347. By contrast, the \fB\-Wattribute\-alias=2\fR option controls warnings
  5348. issued when the alias is more restrictive than the target, which could
  5349. lead to incorrect code generation.
  5350. Attributes considered include \f(CW\*(C`alloc_align\*(C'\fR, \f(CW\*(C`alloc_size\*(C'\fR,
  5351. \&\f(CW\*(C`cold\*(C'\fR, \f(CW\*(C`const\*(C'\fR, \f(CW\*(C`hot\*(C'\fR, \f(CW\*(C`leaf\*(C'\fR, \f(CW\*(C`malloc\*(C'\fR,
  5352. \&\f(CW\*(C`nonnull\*(C'\fR, \f(CW\*(C`noreturn\*(C'\fR, \f(CW\*(C`nothrow\*(C'\fR, \f(CW\*(C`pure\*(C'\fR,
  5353. \&\f(CW\*(C`returns_nonnull\*(C'\fR, and \f(CW\*(C`returns_twice\*(C'\fR.
  5354. .Sp
  5355. In \*(C+, the warning is issued when an explicit specialization of a primary
  5356. template declared with attribute \f(CW\*(C`alloc_align\*(C'\fR, \f(CW\*(C`alloc_size\*(C'\fR,
  5357. \&\f(CW\*(C`assume_aligned\*(C'\fR, \f(CW\*(C`format\*(C'\fR, \f(CW\*(C`format_arg\*(C'\fR, \f(CW\*(C`malloc\*(C'\fR,
  5358. or \f(CW\*(C`nonnull\*(C'\fR is declared without it. Attributes \f(CW\*(C`deprecated\*(C'\fR,
  5359. \&\f(CW\*(C`error\*(C'\fR, and \f(CW\*(C`warning\*(C'\fR suppress the warning..
  5360. .Sp
  5361. You can use the \f(CW\*(C`copy\*(C'\fR attribute to apply the same
  5362. set of attributes to a declaration as that on another declaration without
  5363. explicitly enumerating the attributes. This attribute can be applied
  5364. to declarations of functions,
  5365. variables, or types.
  5366. .Sp
  5367. \&\fB\-Wmissing\-attributes\fR is enabled by \fB\-Wall\fR.
  5368. .Sp
  5369. For example, since the declaration of the primary function template
  5370. below makes use of both attribute \f(CW\*(C`malloc\*(C'\fR and \f(CW\*(C`alloc_size\*(C'\fR
  5371. the declaration of the explicit specialization of the template is
  5372. diagnosed because it is missing one of the attributes.
  5373. .Sp
  5374. .Vb 3
  5375. \& template <class T>
  5376. \& T* _\|_attribute_\|_ ((malloc, alloc_size (1)))
  5377. \& allocate (size_t);
  5378. \&
  5379. \& template <>
  5380. \& void* _\|_attribute_\|_ ((malloc)) // missing alloc_size
  5381. \& allocate<void> (size_t);
  5382. .Ve
  5383. .IP "\fB\-Wmissing\-braces\fR" 4
  5384. .IX Item "-Wmissing-braces"
  5385. Warn if an aggregate or union initializer is not fully bracketed. In
  5386. the following example, the initializer for \f(CW\*(C`a\*(C'\fR is not fully
  5387. bracketed, but that for \f(CW\*(C`b\*(C'\fR is fully bracketed.
  5388. .Sp
  5389. .Vb 2
  5390. \& int a[2][2] = { 0, 1, 2, 3 };
  5391. \& int b[2][2] = { { 0, 1 }, { 2, 3 } };
  5392. .Ve
  5393. .Sp
  5394. This warning is enabled by \fB\-Wall\fR.
  5395. .IP "\fB\-Wmissing\-include\-dirs\fR (C, \*(C+, Objective-C and Objective\-\*(C+ only)" 4
  5396. .IX Item "-Wmissing-include-dirs (C, , Objective-C and Objective- only)"
  5397. Warn if a user-supplied include directory does not exist.
  5398. .IP "\fB\-Wno\-missing\-profile\fR" 4
  5399. .IX Item "-Wno-missing-profile"
  5400. This option controls warnings if feedback profiles are missing when using the
  5401. \&\fB\-fprofile\-use\fR option.
  5402. This option diagnoses those cases where a new function or a new file is added
  5403. between compiling with \fB\-fprofile\-generate\fR and with
  5404. \&\fB\-fprofile\-use\fR, without regenerating the profiles.
  5405. In these cases, the profile feedback data files do not contain any
  5406. profile feedback information for
  5407. the newly added function or file respectively. Also, in the case when profile
  5408. count data (.gcda) files are removed, \s-1GCC\s0 cannot use any profile feedback
  5409. information. In all these cases, warnings are issued to inform you that a
  5410. profile generation step is due.
  5411. Ignoring the warning can result in poorly optimized code.
  5412. \&\fB\-Wno\-missing\-profile\fR can be used to
  5413. disable the warning, but this is not recommended and should be done only
  5414. when non-existent profile data is justified.
  5415. .IP "\fB\-Wmultistatement\-macros\fR" 4
  5416. .IX Item "-Wmultistatement-macros"
  5417. Warn about unsafe multiple statement macros that appear to be guarded
  5418. by a clause such as \f(CW\*(C`if\*(C'\fR, \f(CW\*(C`else\*(C'\fR, \f(CW\*(C`for\*(C'\fR, \f(CW\*(C`switch\*(C'\fR, or
  5419. \&\f(CW\*(C`while\*(C'\fR, in which only the first statement is actually guarded after
  5420. the macro is expanded.
  5421. .Sp
  5422. For example:
  5423. .Sp
  5424. .Vb 3
  5425. \& #define DOIT x++; y++
  5426. \& if (c)
  5427. \& DOIT;
  5428. .Ve
  5429. .Sp
  5430. will increment \f(CW\*(C`y\*(C'\fR unconditionally, not just when \f(CW\*(C`c\*(C'\fR holds.
  5431. The can usually be fixed by wrapping the macro in a do-while loop:
  5432. .Sp
  5433. .Vb 3
  5434. \& #define DOIT do { x++; y++; } while (0)
  5435. \& if (c)
  5436. \& DOIT;
  5437. .Ve
  5438. .Sp
  5439. This warning is enabled by \fB\-Wall\fR in C and \*(C+.
  5440. .IP "\fB\-Wparentheses\fR" 4
  5441. .IX Item "-Wparentheses"
  5442. Warn if parentheses are omitted in certain contexts, such
  5443. as when there is an assignment in a context where a truth value
  5444. is expected, or when operators are nested whose precedence people
  5445. often get confused about.
  5446. .Sp
  5447. Also warn if a comparison like \f(CW\*(C`x<=y<=z\*(C'\fR appears; this is
  5448. equivalent to \f(CW\*(C`(x<=y ? 1 : 0) <= z\*(C'\fR, which is a different
  5449. interpretation from that of ordinary mathematical notation.
  5450. .Sp
  5451. Also warn for dangerous uses of the \s-1GNU\s0 extension to
  5452. \&\f(CW\*(C`?:\*(C'\fR with omitted middle operand. When the condition
  5453. in the \f(CW\*(C`?\*(C'\fR: operator is a boolean expression, the omitted value is
  5454. always 1. Often programmers expect it to be a value computed
  5455. inside the conditional expression instead.
  5456. .Sp
  5457. For \*(C+ this also warns for some cases of unnecessary parentheses in
  5458. declarations, which can indicate an attempt at a function call instead
  5459. of a declaration:
  5460. .Sp
  5461. .Vb 5
  5462. \& {
  5463. \& // Declares a local variable called mymutex.
  5464. \& std::unique_lock<std::mutex> (mymutex);
  5465. \& // User meant std::unique_lock<std::mutex> lock (mymutex);
  5466. \& }
  5467. .Ve
  5468. .Sp
  5469. This warning is enabled by \fB\-Wall\fR.
  5470. .IP "\fB\-Wsequence\-point\fR" 4
  5471. .IX Item "-Wsequence-point"
  5472. Warn about code that may have undefined semantics because of violations
  5473. of sequence point rules in the C and \*(C+ standards.
  5474. .Sp
  5475. The C and \*(C+ standards define the order in which expressions in a C/\*(C+
  5476. program are evaluated in terms of \fIsequence points\fR, which represent
  5477. a partial ordering between the execution of parts of the program: those
  5478. executed before the sequence point, and those executed after it. These
  5479. occur after the evaluation of a full expression (one which is not part
  5480. of a larger expression), after the evaluation of the first operand of a
  5481. \&\f(CW\*(C`&&\*(C'\fR, \f(CW\*(C`||\*(C'\fR, \f(CW\*(C`? :\*(C'\fR or \f(CW\*(C`,\*(C'\fR (comma) operator, before a
  5482. function is called (but after the evaluation of its arguments and the
  5483. expression denoting the called function), and in certain other places.
  5484. Other than as expressed by the sequence point rules, the order of
  5485. evaluation of subexpressions of an expression is not specified. All
  5486. these rules describe only a partial order rather than a total order,
  5487. since, for example, if two functions are called within one expression
  5488. with no sequence point between them, the order in which the functions
  5489. are called is not specified. However, the standards committee have
  5490. ruled that function calls do not overlap.
  5491. .Sp
  5492. It is not specified when between sequence points modifications to the
  5493. values of objects take effect. Programs whose behavior depends on this
  5494. have undefined behavior; the C and \*(C+ standards specify that \*(L"Between
  5495. the previous and next sequence point an object shall have its stored
  5496. value modified at most once by the evaluation of an expression.
  5497. Furthermore, the prior value shall be read only to determine the value
  5498. to be stored.\*(R". If a program breaks these rules, the results on any
  5499. particular implementation are entirely unpredictable.
  5500. .Sp
  5501. Examples of code with undefined behavior are \f(CW\*(C`a = a++;\*(C'\fR, \f(CW\*(C`a[n]
  5502. = b[n++]\*(C'\fR and \f(CW\*(C`a[i++] = i;\*(C'\fR. Some more complicated cases are not
  5503. diagnosed by this option, and it may give an occasional false positive
  5504. result, but in general it has been found fairly effective at detecting
  5505. this sort of problem in programs.
  5506. .Sp
  5507. The \*(C+17 standard will define the order of evaluation of operands in
  5508. more cases: in particular it requires that the right-hand side of an
  5509. assignment be evaluated before the left-hand side, so the above
  5510. examples are no longer undefined. But this option will still warn
  5511. about them, to help people avoid writing code that is undefined in C
  5512. and earlier revisions of \*(C+.
  5513. .Sp
  5514. The standard is worded confusingly, therefore there is some debate
  5515. over the precise meaning of the sequence point rules in subtle cases.
  5516. Links to discussions of the problem, including proposed formal
  5517. definitions, may be found on the \s-1GCC\s0 readings page, at
  5518. <\fBhttp://gcc.gnu.org/readings.html\fR>.
  5519. .Sp
  5520. This warning is enabled by \fB\-Wall\fR for C and \*(C+.
  5521. .IP "\fB\-Wno\-return\-local\-addr\fR" 4
  5522. .IX Item "-Wno-return-local-addr"
  5523. Do not warn about returning a pointer (or in \*(C+, a reference) to a
  5524. variable that goes out of scope after the function returns.
  5525. .IP "\fB\-Wreturn\-type\fR" 4
  5526. .IX Item "-Wreturn-type"
  5527. Warn whenever a function is defined with a return type that defaults
  5528. to \f(CW\*(C`int\*(C'\fR. Also warn about any \f(CW\*(C`return\*(C'\fR statement with no
  5529. return value in a function whose return type is not \f(CW\*(C`void\*(C'\fR
  5530. (falling off the end of the function body is considered returning
  5531. without a value).
  5532. .Sp
  5533. For C only, warn about a \f(CW\*(C`return\*(C'\fR statement with an expression in a
  5534. function whose return type is \f(CW\*(C`void\*(C'\fR, unless the expression type is
  5535. also \f(CW\*(C`void\*(C'\fR. As a \s-1GNU\s0 extension, the latter case is accepted
  5536. without a warning unless \fB\-Wpedantic\fR is used. Attempting
  5537. to use the return value of a non\-\f(CW\*(C`void\*(C'\fR function other than \f(CW\*(C`main\*(C'\fR
  5538. that flows off the end by reaching the closing curly brace that terminates
  5539. the function is undefined.
  5540. .Sp
  5541. Unlike in C, in \*(C+, flowing off the end of a non\-\f(CW\*(C`void\*(C'\fR function other
  5542. than \f(CW\*(C`main\*(C'\fR results in undefined behavior even when the value of
  5543. the function is not used.
  5544. .Sp
  5545. This warning is enabled by default in \*(C+ and by \fB\-Wall\fR otherwise.
  5546. .IP "\fB\-Wno\-shift\-count\-negative\fR" 4
  5547. .IX Item "-Wno-shift-count-negative"
  5548. Controls warnings if a shift count is negative.
  5549. This warning is enabled by default.
  5550. .IP "\fB\-Wno\-shift\-count\-overflow\fR" 4
  5551. .IX Item "-Wno-shift-count-overflow"
  5552. Controls warnings if a shift count is greater than or equal to the bit width
  5553. of the type. This warning is enabled by default.
  5554. .IP "\fB\-Wshift\-negative\-value\fR" 4
  5555. .IX Item "-Wshift-negative-value"
  5556. Warn if left shifting a negative value. This warning is enabled by
  5557. \&\fB\-Wextra\fR in C99 and \*(C+11 modes (and newer).
  5558. .IP "\fB\-Wno\-shift\-overflow\fR" 4
  5559. .IX Item "-Wno-shift-overflow"
  5560. .PD 0
  5561. .IP "\fB\-Wshift\-overflow=\fR\fIn\fR" 4
  5562. .IX Item "-Wshift-overflow=n"
  5563. .PD
  5564. These options control warnings about left shift overflows.
  5565. .RS 4
  5566. .IP "\fB\-Wshift\-overflow=1\fR" 4
  5567. .IX Item "-Wshift-overflow=1"
  5568. This is the warning level of \fB\-Wshift\-overflow\fR and is enabled
  5569. by default in C99 and \*(C+11 modes (and newer). This warning level does
  5570. not warn about left-shifting 1 into the sign bit. (However, in C, such
  5571. an overflow is still rejected in contexts where an integer constant expression
  5572. is required.) No warning is emitted in \*(C+2A mode (and newer), as signed left
  5573. shifts always wrap.
  5574. .IP "\fB\-Wshift\-overflow=2\fR" 4
  5575. .IX Item "-Wshift-overflow=2"
  5576. This warning level also warns about left-shifting 1 into the sign bit,
  5577. unless \*(C+14 mode (or newer) is active.
  5578. .RE
  5579. .RS 4
  5580. .RE
  5581. .IP "\fB\-Wswitch\fR" 4
  5582. .IX Item "-Wswitch"
  5583. Warn whenever a \f(CW\*(C`switch\*(C'\fR statement has an index of enumerated type
  5584. and lacks a \f(CW\*(C`case\*(C'\fR for one or more of the named codes of that
  5585. enumeration. (The presence of a \f(CW\*(C`default\*(C'\fR label prevents this
  5586. warning.) \f(CW\*(C`case\*(C'\fR labels outside the enumeration range also
  5587. provoke warnings when this option is used (even if there is a
  5588. \&\f(CW\*(C`default\*(C'\fR label).
  5589. This warning is enabled by \fB\-Wall\fR.
  5590. .IP "\fB\-Wswitch\-default\fR" 4
  5591. .IX Item "-Wswitch-default"
  5592. Warn whenever a \f(CW\*(C`switch\*(C'\fR statement does not have a \f(CW\*(C`default\*(C'\fR
  5593. case.
  5594. .IP "\fB\-Wswitch\-enum\fR" 4
  5595. .IX Item "-Wswitch-enum"
  5596. Warn whenever a \f(CW\*(C`switch\*(C'\fR statement has an index of enumerated type
  5597. and lacks a \f(CW\*(C`case\*(C'\fR for one or more of the named codes of that
  5598. enumeration. \f(CW\*(C`case\*(C'\fR labels outside the enumeration range also
  5599. provoke warnings when this option is used. The only difference
  5600. between \fB\-Wswitch\fR and this option is that this option gives a
  5601. warning about an omitted enumeration code even if there is a
  5602. \&\f(CW\*(C`default\*(C'\fR label.
  5603. .IP "\fB\-Wno\-switch\-bool\fR" 4
  5604. .IX Item "-Wno-switch-bool"
  5605. Do not warn when a \f(CW\*(C`switch\*(C'\fR statement has an index of boolean type
  5606. and the case values are outside the range of a boolean type.
  5607. It is possible to suppress this warning by casting the controlling
  5608. expression to a type other than \f(CW\*(C`bool\*(C'\fR. For example:
  5609. .Sp
  5610. .Vb 4
  5611. \& switch ((int) (a == 4))
  5612. \& {
  5613. \& ...
  5614. \& }
  5615. .Ve
  5616. .Sp
  5617. This warning is enabled by default for C and \*(C+ programs.
  5618. .IP "\fB\-Wno\-switch\-outside\-range\fR" 4
  5619. .IX Item "-Wno-switch-outside-range"
  5620. This option controls warnings when a \f(CW\*(C`switch\*(C'\fR case has a value
  5621. that is outside of its
  5622. respective type range. This warning is enabled by default for
  5623. C and \*(C+ programs.
  5624. .IP "\fB\-Wno\-switch\-unreachable\fR" 4
  5625. .IX Item "-Wno-switch-unreachable"
  5626. Do not warn when a \f(CW\*(C`switch\*(C'\fR statement contains statements between the
  5627. controlling expression and the first case label, which will never be
  5628. executed. For example:
  5629. .Sp
  5630. .Vb 7
  5631. \& switch (cond)
  5632. \& {
  5633. \& i = 15;
  5634. \& ...
  5635. \& case 5:
  5636. \& ...
  5637. \& }
  5638. .Ve
  5639. .Sp
  5640. \&\fB\-Wswitch\-unreachable\fR does not warn if the statement between the
  5641. controlling expression and the first case label is just a declaration:
  5642. .Sp
  5643. .Vb 8
  5644. \& switch (cond)
  5645. \& {
  5646. \& int i;
  5647. \& ...
  5648. \& case 5:
  5649. \& i = 5;
  5650. \& ...
  5651. \& }
  5652. .Ve
  5653. .Sp
  5654. This warning is enabled by default for C and \*(C+ programs.
  5655. .IP "\fB\-Wsync\-nand\fR (C and \*(C+ only)" 4
  5656. .IX Item "-Wsync-nand (C and only)"
  5657. Warn when \f(CW\*(C`_\|_sync_fetch_and_nand\*(C'\fR and \f(CW\*(C`_\|_sync_nand_and_fetch\*(C'\fR
  5658. built-in functions are used. These functions changed semantics in \s-1GCC 4.4.\s0
  5659. .IP "\fB\-Wunused\-but\-set\-parameter\fR" 4
  5660. .IX Item "-Wunused-but-set-parameter"
  5661. Warn whenever a function parameter is assigned to, but otherwise unused
  5662. (aside from its declaration).
  5663. .Sp
  5664. To suppress this warning use the \f(CW\*(C`unused\*(C'\fR attribute.
  5665. .Sp
  5666. This warning is also enabled by \fB\-Wunused\fR together with
  5667. \&\fB\-Wextra\fR.
  5668. .IP "\fB\-Wunused\-but\-set\-variable\fR" 4
  5669. .IX Item "-Wunused-but-set-variable"
  5670. Warn whenever a local variable is assigned to, but otherwise unused
  5671. (aside from its declaration).
  5672. This warning is enabled by \fB\-Wall\fR.
  5673. .Sp
  5674. To suppress this warning use the \f(CW\*(C`unused\*(C'\fR attribute.
  5675. .Sp
  5676. This warning is also enabled by \fB\-Wunused\fR, which is enabled
  5677. by \fB\-Wall\fR.
  5678. .IP "\fB\-Wunused\-function\fR" 4
  5679. .IX Item "-Wunused-function"
  5680. Warn whenever a static function is declared but not defined or a
  5681. non-inline static function is unused.
  5682. This warning is enabled by \fB\-Wall\fR.
  5683. .IP "\fB\-Wunused\-label\fR" 4
  5684. .IX Item "-Wunused-label"
  5685. Warn whenever a label is declared but not used.
  5686. This warning is enabled by \fB\-Wall\fR.
  5687. .Sp
  5688. To suppress this warning use the \f(CW\*(C`unused\*(C'\fR attribute.
  5689. .IP "\fB\-Wunused\-local\-typedefs\fR (C, Objective-C, \*(C+ and Objective\-\*(C+ only)" 4
  5690. .IX Item "-Wunused-local-typedefs (C, Objective-C, and Objective- only)"
  5691. Warn when a typedef locally defined in a function is not used.
  5692. This warning is enabled by \fB\-Wall\fR.
  5693. .IP "\fB\-Wunused\-parameter\fR" 4
  5694. .IX Item "-Wunused-parameter"
  5695. Warn whenever a function parameter is unused aside from its declaration.
  5696. .Sp
  5697. To suppress this warning use the \f(CW\*(C`unused\*(C'\fR attribute.
  5698. .IP "\fB\-Wno\-unused\-result\fR" 4
  5699. .IX Item "-Wno-unused-result"
  5700. Do not warn if a caller of a function marked with attribute
  5701. \&\f(CW\*(C`warn_unused_result\*(C'\fR does not use
  5702. its return value. The default is \fB\-Wunused\-result\fR.
  5703. .IP "\fB\-Wunused\-variable\fR" 4
  5704. .IX Item "-Wunused-variable"
  5705. Warn whenever a local or static variable is unused aside from its
  5706. declaration. This option implies \fB\-Wunused\-const\-variable=1\fR for C,
  5707. but not for \*(C+. This warning is enabled by \fB\-Wall\fR.
  5708. .Sp
  5709. To suppress this warning use the \f(CW\*(C`unused\*(C'\fR attribute.
  5710. .IP "\fB\-Wunused\-const\-variable\fR" 4
  5711. .IX Item "-Wunused-const-variable"
  5712. .PD 0
  5713. .IP "\fB\-Wunused\-const\-variable=\fR\fIn\fR" 4
  5714. .IX Item "-Wunused-const-variable=n"
  5715. .PD
  5716. Warn whenever a constant static variable is unused aside from its declaration.
  5717. \&\fB\-Wunused\-const\-variable=1\fR is enabled by \fB\-Wunused\-variable\fR
  5718. for C, but not for \*(C+. In C this declares variable storage, but in \*(C+ this
  5719. is not an error since const variables take the place of \f(CW\*(C`#define\*(C'\fRs.
  5720. .Sp
  5721. To suppress this warning use the \f(CW\*(C`unused\*(C'\fR attribute.
  5722. .RS 4
  5723. .IP "\fB\-Wunused\-const\-variable=1\fR" 4
  5724. .IX Item "-Wunused-const-variable=1"
  5725. This is the warning level that is enabled by \fB\-Wunused\-variable\fR for
  5726. C. It warns only about unused static const variables defined in the main
  5727. compilation unit, but not about static const variables declared in any
  5728. header included.
  5729. .IP "\fB\-Wunused\-const\-variable=2\fR" 4
  5730. .IX Item "-Wunused-const-variable=2"
  5731. This warning level also warns for unused constant static variables in
  5732. headers (excluding system headers). This is the warning level of
  5733. \&\fB\-Wunused\-const\-variable\fR and must be explicitly requested since
  5734. in \*(C+ this isn't an error and in C it might be harder to clean up all
  5735. headers included.
  5736. .RE
  5737. .RS 4
  5738. .RE
  5739. .IP "\fB\-Wunused\-value\fR" 4
  5740. .IX Item "-Wunused-value"
  5741. Warn whenever a statement computes a result that is explicitly not
  5742. used. To suppress this warning cast the unused expression to
  5743. \&\f(CW\*(C`void\*(C'\fR. This includes an expression-statement or the left-hand
  5744. side of a comma expression that contains no side effects. For example,
  5745. an expression such as \f(CW\*(C`x[i,j]\*(C'\fR causes a warning, while
  5746. \&\f(CW\*(C`x[(void)i,j]\*(C'\fR does not.
  5747. .Sp
  5748. This warning is enabled by \fB\-Wall\fR.
  5749. .IP "\fB\-Wunused\fR" 4
  5750. .IX Item "-Wunused"
  5751. All the above \fB\-Wunused\fR options combined.
  5752. .Sp
  5753. In order to get a warning about an unused function parameter, you must
  5754. either specify \fB\-Wextra \-Wunused\fR (note that \fB\-Wall\fR implies
  5755. \&\fB\-Wunused\fR), or separately specify \fB\-Wunused\-parameter\fR.
  5756. .IP "\fB\-Wuninitialized\fR" 4
  5757. .IX Item "-Wuninitialized"
  5758. Warn if an automatic variable is used without first being initialized.
  5759. In \*(C+, warn if a non-static reference or non-static \f(CW\*(C`const\*(C'\fR
  5760. member appears in a class without constructors.
  5761. .Sp
  5762. If you want to warn about code that uses the uninitialized value of the
  5763. variable in its own initializer, use the \fB\-Winit\-self\fR option.
  5764. .Sp
  5765. These warnings occur for individual uninitialized elements of
  5766. structure, union or array variables as well as for variables that are
  5767. uninitialized as a whole. They do not occur for variables or elements
  5768. declared \f(CW\*(C`volatile\*(C'\fR. Because these warnings depend on
  5769. optimization, the exact variables or elements for which there are
  5770. warnings depend on the precise optimization options and version of \s-1GCC\s0
  5771. used.
  5772. .Sp
  5773. Note that there may be no warning about a variable that is used only
  5774. to compute a value that itself is never used, because such
  5775. computations may be deleted by data flow analysis before the warnings
  5776. are printed.
  5777. .IP "\fB\-Wno\-invalid\-memory\-model\fR" 4
  5778. .IX Item "-Wno-invalid-memory-model"
  5779. This option controls warnings
  5780. for invocations of \fB_\|_atomic Builtins\fR, \fB_\|_sync Builtins\fR,
  5781. and the C11 atomic generic functions with a memory consistency argument
  5782. that is either invalid for the operation or outside the range of values
  5783. of the \f(CW\*(C`memory_order\*(C'\fR enumeration. For example, since the
  5784. \&\f(CW\*(C`_\|_atomic_store\*(C'\fR and \f(CW\*(C`_\|_atomic_store_n\*(C'\fR built-ins are only
  5785. defined for the relaxed, release, and sequentially consistent memory
  5786. orders the following code is diagnosed:
  5787. .Sp
  5788. .Vb 4
  5789. \& void store (int *i)
  5790. \& {
  5791. \& _\|_atomic_store_n (i, 0, memory_order_consume);
  5792. \& }
  5793. .Ve
  5794. .Sp
  5795. \&\fB\-Winvalid\-memory\-model\fR is enabled by default.
  5796. .IP "\fB\-Wmaybe\-uninitialized\fR" 4
  5797. .IX Item "-Wmaybe-uninitialized"
  5798. For an automatic (i.e. local) variable, if there exists a path from the
  5799. function entry to a use of the variable that is initialized, but there exist
  5800. some other paths for which the variable is not initialized, the compiler
  5801. emits a warning if it cannot prove the uninitialized paths are not
  5802. executed at run time.
  5803. .Sp
  5804. These warnings are only possible in optimizing compilation, because otherwise
  5805. \&\s-1GCC\s0 does not keep track of the state of variables.
  5806. .Sp
  5807. These warnings are made optional because \s-1GCC\s0 may not be able to determine when
  5808. the code is correct in spite of appearing to have an error. Here is one
  5809. example of how this can happen:
  5810. .Sp
  5811. .Vb 12
  5812. \& {
  5813. \& int x;
  5814. \& switch (y)
  5815. \& {
  5816. \& case 1: x = 1;
  5817. \& break;
  5818. \& case 2: x = 4;
  5819. \& break;
  5820. \& case 3: x = 5;
  5821. \& }
  5822. \& foo (x);
  5823. \& }
  5824. .Ve
  5825. .Sp
  5826. If the value of \f(CW\*(C`y\*(C'\fR is always 1, 2 or 3, then \f(CW\*(C`x\*(C'\fR is
  5827. always initialized, but \s-1GCC\s0 doesn't know this. To suppress the
  5828. warning, you need to provide a default case with \fIassert\fR\|(0) or
  5829. similar code.
  5830. .Sp
  5831. This option also warns when a non-volatile automatic variable might be
  5832. changed by a call to \f(CW\*(C`longjmp\*(C'\fR.
  5833. The compiler sees only the calls to \f(CW\*(C`setjmp\*(C'\fR. It cannot know
  5834. where \f(CW\*(C`longjmp\*(C'\fR will be called; in fact, a signal handler could
  5835. call it at any point in the code. As a result, you may get a warning
  5836. even when there is in fact no problem because \f(CW\*(C`longjmp\*(C'\fR cannot
  5837. in fact be called at the place that would cause a problem.
  5838. .Sp
  5839. Some spurious warnings can be avoided if you declare all the functions
  5840. you use that never return as \f(CW\*(C`noreturn\*(C'\fR.
  5841. .Sp
  5842. This warning is enabled by \fB\-Wall\fR or \fB\-Wextra\fR.
  5843. .IP "\fB\-Wunknown\-pragmas\fR" 4
  5844. .IX Item "-Wunknown-pragmas"
  5845. Warn when a \f(CW\*(C`#pragma\*(C'\fR directive is encountered that is not understood by
  5846. \&\s-1GCC. \s0 If this command-line option is used, warnings are even issued
  5847. for unknown pragmas in system header files. This is not the case if
  5848. the warnings are only enabled by the \fB\-Wall\fR command-line option.
  5849. .IP "\fB\-Wno\-pragmas\fR" 4
  5850. .IX Item "-Wno-pragmas"
  5851. Do not warn about misuses of pragmas, such as incorrect parameters,
  5852. invalid syntax, or conflicts between pragmas. See also
  5853. \&\fB\-Wunknown\-pragmas\fR.
  5854. .IP "\fB\-Wno\-prio\-ctor\-dtor\fR" 4
  5855. .IX Item "-Wno-prio-ctor-dtor"
  5856. Do not warn if a priority from 0 to 100 is used for constructor or destructor.
  5857. The use of constructor and destructor attributes allow you to assign a
  5858. priority to the constructor/destructor to control its order of execution
  5859. before \f(CW\*(C`main\*(C'\fR is called or after it returns. The priority values must be
  5860. greater than 100 as the compiler reserves priority values between 0\-\-100 for
  5861. the implementation.
  5862. .IP "\fB\-Wstrict\-aliasing\fR" 4
  5863. .IX Item "-Wstrict-aliasing"
  5864. This option is only active when \fB\-fstrict\-aliasing\fR is active.
  5865. It warns about code that might break the strict aliasing rules that the
  5866. compiler is using for optimization. The warning does not catch all
  5867. cases, but does attempt to catch the more common pitfalls. It is
  5868. included in \fB\-Wall\fR.
  5869. It is equivalent to \fB\-Wstrict\-aliasing=3\fR
  5870. .IP "\fB\-Wstrict\-aliasing=n\fR" 4
  5871. .IX Item "-Wstrict-aliasing=n"
  5872. This option is only active when \fB\-fstrict\-aliasing\fR is active.
  5873. It warns about code that might break the strict aliasing rules that the
  5874. compiler is using for optimization.
  5875. Higher levels correspond to higher accuracy (fewer false positives).
  5876. Higher levels also correspond to more effort, similar to the way \fB\-O\fR
  5877. works.
  5878. \&\fB\-Wstrict\-aliasing\fR is equivalent to \fB\-Wstrict\-aliasing=3\fR.
  5879. .Sp
  5880. Level 1: Most aggressive, quick, least accurate.
  5881. Possibly useful when higher levels
  5882. do not warn but \fB\-fstrict\-aliasing\fR still breaks the code, as it has very few
  5883. false negatives. However, it has many false positives.
  5884. Warns for all pointer conversions between possibly incompatible types,
  5885. even if never dereferenced. Runs in the front end only.
  5886. .Sp
  5887. Level 2: Aggressive, quick, not too precise.
  5888. May still have many false positives (not as many as level 1 though),
  5889. and few false negatives (but possibly more than level 1).
  5890. Unlike level 1, it only warns when an address is taken. Warns about
  5891. incomplete types. Runs in the front end only.
  5892. .Sp
  5893. Level 3 (default for \fB\-Wstrict\-aliasing\fR):
  5894. Should have very few false positives and few false
  5895. negatives. Slightly slower than levels 1 or 2 when optimization is enabled.
  5896. Takes care of the common pun+dereference pattern in the front end:
  5897. \&\f(CW\*(C`*(int*)&some_float\*(C'\fR.
  5898. If optimization is enabled, it also runs in the back end, where it deals
  5899. with multiple statement cases using flow-sensitive points-to information.
  5900. Only warns when the converted pointer is dereferenced.
  5901. Does not warn about incomplete types.
  5902. .IP "\fB\-Wstrict\-overflow\fR" 4
  5903. .IX Item "-Wstrict-overflow"
  5904. .PD 0
  5905. .IP "\fB\-Wstrict\-overflow=\fR\fIn\fR" 4
  5906. .IX Item "-Wstrict-overflow=n"
  5907. .PD
  5908. This option is only active when signed overflow is undefined.
  5909. It warns about cases where the compiler optimizes based on the
  5910. assumption that signed overflow does not occur. Note that it does not
  5911. warn about all cases where the code might overflow: it only warns
  5912. about cases where the compiler implements some optimization. Thus
  5913. this warning depends on the optimization level.
  5914. .Sp
  5915. An optimization that assumes that signed overflow does not occur is
  5916. perfectly safe if the values of the variables involved are such that
  5917. overflow never does, in fact, occur. Therefore this warning can
  5918. easily give a false positive: a warning about code that is not
  5919. actually a problem. To help focus on important issues, several
  5920. warning levels are defined. No warnings are issued for the use of
  5921. undefined signed overflow when estimating how many iterations a loop
  5922. requires, in particular when determining whether a loop will be
  5923. executed at all.
  5924. .RS 4
  5925. .IP "\fB\-Wstrict\-overflow=1\fR" 4
  5926. .IX Item "-Wstrict-overflow=1"
  5927. Warn about cases that are both questionable and easy to avoid. For
  5928. example the compiler simplifies
  5929. \&\f(CW\*(C`x + 1 > x\*(C'\fR to \f(CW1\fR. This level of
  5930. \&\fB\-Wstrict\-overflow\fR is enabled by \fB\-Wall\fR; higher levels
  5931. are not, and must be explicitly requested.
  5932. .IP "\fB\-Wstrict\-overflow=2\fR" 4
  5933. .IX Item "-Wstrict-overflow=2"
  5934. Also warn about other cases where a comparison is simplified to a
  5935. constant. For example: \f(CW\*(C`abs (x) >= 0\*(C'\fR. This can only be
  5936. simplified when signed integer overflow is undefined, because
  5937. \&\f(CW\*(C`abs (INT_MIN)\*(C'\fR overflows to \f(CW\*(C`INT_MIN\*(C'\fR, which is less than
  5938. zero. \fB\-Wstrict\-overflow\fR (with no level) is the same as
  5939. \&\fB\-Wstrict\-overflow=2\fR.
  5940. .IP "\fB\-Wstrict\-overflow=3\fR" 4
  5941. .IX Item "-Wstrict-overflow=3"
  5942. Also warn about other cases where a comparison is simplified. For
  5943. example: \f(CW\*(C`x + 1 > 1\*(C'\fR is simplified to \f(CW\*(C`x > 0\*(C'\fR.
  5944. .IP "\fB\-Wstrict\-overflow=4\fR" 4
  5945. .IX Item "-Wstrict-overflow=4"
  5946. Also warn about other simplifications not covered by the above cases.
  5947. For example: \f(CW\*(C`(x * 10) / 5\*(C'\fR is simplified to \f(CW\*(C`x * 2\*(C'\fR.
  5948. .IP "\fB\-Wstrict\-overflow=5\fR" 4
  5949. .IX Item "-Wstrict-overflow=5"
  5950. Also warn about cases where the compiler reduces the magnitude of a
  5951. constant involved in a comparison. For example: \f(CW\*(C`x + 2 > y\*(C'\fR is
  5952. simplified to \f(CW\*(C`x + 1 >= y\*(C'\fR. This is reported only at the
  5953. highest warning level because this simplification applies to many
  5954. comparisons, so this warning level gives a very large number of
  5955. false positives.
  5956. .RE
  5957. .RS 4
  5958. .RE
  5959. .IP "\fB\-Wstring\-compare\fR" 4
  5960. .IX Item "-Wstring-compare"
  5961. Warn for calls to \f(CW\*(C`strcmp\*(C'\fR and \f(CW\*(C`strncmp\*(C'\fR whose result is
  5962. determined to be either zero or non-zero in tests for such equality
  5963. owing to the length of one argument being greater than the size of
  5964. the array the other argument is stored in (or the bound in the case
  5965. of \f(CW\*(C`strncmp\*(C'\fR). Such calls could be mistakes. For example,
  5966. the call to \f(CW\*(C`strcmp\*(C'\fR below is diagnosed because its result is
  5967. necessarily non-zero irrespective of the contents of the array \f(CW\*(C`a\*(C'\fR.
  5968. .Sp
  5969. .Vb 8
  5970. \& extern char a[4];
  5971. \& void f (char *d)
  5972. \& {
  5973. \& strcpy (d, "string");
  5974. \& ...
  5975. \& if (0 == strcmp (a, d)) // cannot be true
  5976. \& puts ("a and d are the same");
  5977. \& }
  5978. .Ve
  5979. .Sp
  5980. \&\fB\-Wstring\-compare\fR is enabled by \fB\-Wextra\fR.
  5981. .IP "\fB\-Wstringop\-overflow\fR" 4
  5982. .IX Item "-Wstringop-overflow"
  5983. .PD 0
  5984. .IP "\fB\-Wstringop\-overflow=\fR\fItype\fR" 4
  5985. .IX Item "-Wstringop-overflow=type"
  5986. .PD
  5987. Warn for calls to string manipulation functions such as \f(CW\*(C`memcpy\*(C'\fR and
  5988. \&\f(CW\*(C`strcpy\*(C'\fR that are determined to overflow the destination buffer. The
  5989. optional argument is one greater than the type of Object Size Checking to
  5990. perform to determine the size of the destination.
  5991. The argument is meaningful only for functions that operate on character arrays
  5992. but not for raw memory functions like \f(CW\*(C`memcpy\*(C'\fR which always make use
  5993. of Object Size type\-0. The option also warns for calls that specify a size
  5994. in excess of the largest possible object or at most \f(CW\*(C`SIZE_MAX / 2\*(C'\fR bytes.
  5995. The option produces the best results with optimization enabled but can detect
  5996. a small subset of simple buffer overflows even without optimization in
  5997. calls to the \s-1GCC\s0 built-in functions like \f(CW\*(C`_\|_builtin_memcpy\*(C'\fR that
  5998. correspond to the standard functions. In any case, the option warns about
  5999. just a subset of buffer overflows detected by the corresponding overflow
  6000. checking built-ins. For example, the option issues a warning for
  6001. the \f(CW\*(C`strcpy\*(C'\fR call below because it copies at least 5 characters
  6002. (the string \f(CW"blue"\fR including the terminating \s-1NUL\s0) into the buffer
  6003. of size 4.
  6004. .Sp
  6005. .Vb 11
  6006. \& enum Color { blue, purple, yellow };
  6007. \& const char* f (enum Color clr)
  6008. \& {
  6009. \& static char buf [4];
  6010. \& const char *str;
  6011. \& switch (clr)
  6012. \& {
  6013. \& case blue: str = "blue"; break;
  6014. \& case purple: str = "purple"; break;
  6015. \& case yellow: str = "yellow"; break;
  6016. \& }
  6017. \&
  6018. \& return strcpy (buf, str); // warning here
  6019. \& }
  6020. .Ve
  6021. .Sp
  6022. Option \fB\-Wstringop\-overflow=2\fR is enabled by default.
  6023. .RS 4
  6024. .IP "\fB\-Wstringop\-overflow\fR" 4
  6025. .IX Item "-Wstringop-overflow"
  6026. .PD 0
  6027. .IP "\fB\-Wstringop\-overflow=1\fR" 4
  6028. .IX Item "-Wstringop-overflow=1"
  6029. .PD
  6030. The \fB\-Wstringop\-overflow=1\fR option uses type-zero Object Size Checking
  6031. to determine the sizes of destination objects. This is the default setting
  6032. of the option. At this setting the option does not warn for writes past
  6033. the end of subobjects of larger objects accessed by pointers unless the
  6034. size of the largest surrounding object is known. When the destination may
  6035. be one of several objects it is assumed to be the largest one of them. On
  6036. Linux systems, when optimization is enabled at this setting the option warns
  6037. for the same code as when the \f(CW\*(C`_FORTIFY_SOURCE\*(C'\fR macro is defined to
  6038. a non-zero value.
  6039. .IP "\fB\-Wstringop\-overflow=2\fR" 4
  6040. .IX Item "-Wstringop-overflow=2"
  6041. The \fB\-Wstringop\-overflow=2\fR option uses type-one Object Size Checking
  6042. to determine the sizes of destination objects. At this setting the option
  6043. warna about overflows when writing to members of the largest complete
  6044. objects whose exact size is known. However, it does not warn for excessive
  6045. writes to the same members of unknown objects referenced by pointers since
  6046. they may point to arrays containing unknown numbers of elements.
  6047. .IP "\fB\-Wstringop\-overflow=3\fR" 4
  6048. .IX Item "-Wstringop-overflow=3"
  6049. The \fB\-Wstringop\-overflow=3\fR option uses type-two Object Size Checking
  6050. to determine the sizes of destination objects. At this setting the option
  6051. warns about overflowing the smallest object or data member. This is the
  6052. most restrictive setting of the option that may result in warnings for safe
  6053. code.
  6054. .IP "\fB\-Wstringop\-overflow=4\fR" 4
  6055. .IX Item "-Wstringop-overflow=4"
  6056. The \fB\-Wstringop\-overflow=4\fR option uses type-three Object Size Checking
  6057. to determine the sizes of destination objects. At this setting the option
  6058. warns about overflowing any data members, and when the destination is
  6059. one of several objects it uses the size of the largest of them to decide
  6060. whether to issue a warning. Similarly to \fB\-Wstringop\-overflow=3\fR this
  6061. setting of the option may result in warnings for benign code.
  6062. .RE
  6063. .RS 4
  6064. .RE
  6065. .IP "\fB\-Wno\-stringop\-truncation\fR" 4
  6066. .IX Item "-Wno-stringop-truncation"
  6067. Do not warn for calls to bounded string manipulation functions
  6068. such as \f(CW\*(C`strncat\*(C'\fR,
  6069. \&\f(CW\*(C`strncpy\*(C'\fR, and \f(CW\*(C`stpncpy\*(C'\fR that may either truncate the copied string
  6070. or leave the destination unchanged.
  6071. .Sp
  6072. In the following example, the call to \f(CW\*(C`strncat\*(C'\fR specifies a bound that
  6073. is less than the length of the source string. As a result, the copy of
  6074. the source will be truncated and so the call is diagnosed. To avoid the
  6075. warning use \f(CW\*(C`bufsize \- strlen (buf) \- 1)\*(C'\fR as the bound.
  6076. .Sp
  6077. .Vb 4
  6078. \& void append (char *buf, size_t bufsize)
  6079. \& {
  6080. \& strncat (buf, ".txt", 3);
  6081. \& }
  6082. .Ve
  6083. .Sp
  6084. As another example, the following call to \f(CW\*(C`strncpy\*(C'\fR results in copying
  6085. to \f(CW\*(C`d\*(C'\fR just the characters preceding the terminating \s-1NUL,\s0 without
  6086. appending the \s-1NUL\s0 to the end. Assuming the result of \f(CW\*(C`strncpy\*(C'\fR is
  6087. necessarily a NUL-terminated string is a common mistake, and so the call
  6088. is diagnosed. To avoid the warning when the result is not expected to be
  6089. NUL-terminated, call \f(CW\*(C`memcpy\*(C'\fR instead.
  6090. .Sp
  6091. .Vb 4
  6092. \& void copy (char *d, const char *s)
  6093. \& {
  6094. \& strncpy (d, s, strlen (s));
  6095. \& }
  6096. .Ve
  6097. .Sp
  6098. In the following example, the call to \f(CW\*(C`strncpy\*(C'\fR specifies the size
  6099. of the destination buffer as the bound. If the length of the source
  6100. string is equal to or greater than this size the result of the copy will
  6101. not be NUL-terminated. Therefore, the call is also diagnosed. To avoid
  6102. the warning, specify \f(CW\*(C`sizeof buf \- 1\*(C'\fR as the bound and set the last
  6103. element of the buffer to \f(CW\*(C`NUL\*(C'\fR.
  6104. .Sp
  6105. .Vb 6
  6106. \& void copy (const char *s)
  6107. \& {
  6108. \& char buf[80];
  6109. \& strncpy (buf, s, sizeof buf);
  6110. \& ...
  6111. \& }
  6112. .Ve
  6113. .Sp
  6114. In situations where a character array is intended to store a sequence
  6115. of bytes with no terminating \f(CW\*(C`NUL\*(C'\fR such an array may be annotated
  6116. with attribute \f(CW\*(C`nonstring\*(C'\fR to avoid this warning. Such arrays,
  6117. however, are not suitable arguments to functions that expect
  6118. \&\f(CW\*(C`NUL\*(C'\fR\-terminated strings. To help detect accidental misuses of
  6119. such arrays \s-1GCC\s0 issues warnings unless it can prove that the use is
  6120. safe.
  6121. .IP "\fB\-Wsuggest\-attribute=\fR[\fBpure\fR|\fBconst\fR|\fBnoreturn\fR|\fBformat\fR|\fBcold\fR|\fBmalloc\fR]" 4
  6122. .IX Item "-Wsuggest-attribute=[pure|const|noreturn|format|cold|malloc]"
  6123. Warn for cases where adding an attribute may be beneficial. The
  6124. attributes currently supported are listed below.
  6125. .RS 4
  6126. .IP "\fB\-Wsuggest\-attribute=pure\fR" 4
  6127. .IX Item "-Wsuggest-attribute=pure"
  6128. .PD 0
  6129. .IP "\fB\-Wsuggest\-attribute=const\fR" 4
  6130. .IX Item "-Wsuggest-attribute=const"
  6131. .IP "\fB\-Wsuggest\-attribute=noreturn\fR" 4
  6132. .IX Item "-Wsuggest-attribute=noreturn"
  6133. .IP "\fB\-Wmissing\-noreturn\fR" 4
  6134. .IX Item "-Wmissing-noreturn"
  6135. .IP "\fB\-Wsuggest\-attribute=malloc\fR" 4
  6136. .IX Item "-Wsuggest-attribute=malloc"
  6137. .PD
  6138. Warn about functions that might be candidates for attributes
  6139. \&\f(CW\*(C`pure\*(C'\fR, \f(CW\*(C`const\*(C'\fR or \f(CW\*(C`noreturn\*(C'\fR or \f(CW\*(C`malloc\*(C'\fR. The compiler
  6140. only warns for functions visible in other compilation units or (in the case of
  6141. \&\f(CW\*(C`pure\*(C'\fR and \f(CW\*(C`const\*(C'\fR) if it cannot prove that the function returns
  6142. normally. A function returns normally if it doesn't contain an infinite loop or
  6143. return abnormally by throwing, calling \f(CW\*(C`abort\*(C'\fR or trapping. This analysis
  6144. requires option \fB\-fipa\-pure\-const\fR, which is enabled by default at
  6145. \&\fB\-O\fR and higher. Higher optimization levels improve the accuracy
  6146. of the analysis.
  6147. .IP "\fB\-Wsuggest\-attribute=format\fR" 4
  6148. .IX Item "-Wsuggest-attribute=format"
  6149. .PD 0
  6150. .IP "\fB\-Wmissing\-format\-attribute\fR" 4
  6151. .IX Item "-Wmissing-format-attribute"
  6152. .PD
  6153. Warn about function pointers that might be candidates for \f(CW\*(C`format\*(C'\fR
  6154. attributes. Note these are only possible candidates, not absolute ones.
  6155. \&\s-1GCC\s0 guesses that function pointers with \f(CW\*(C`format\*(C'\fR attributes that
  6156. are used in assignment, initialization, parameter passing or return
  6157. statements should have a corresponding \f(CW\*(C`format\*(C'\fR attribute in the
  6158. resulting type. I.e. the left-hand side of the assignment or
  6159. initialization, the type of the parameter variable, or the return type
  6160. of the containing function respectively should also have a \f(CW\*(C`format\*(C'\fR
  6161. attribute to avoid the warning.
  6162. .Sp
  6163. \&\s-1GCC\s0 also warns about function definitions that might be
  6164. candidates for \f(CW\*(C`format\*(C'\fR attributes. Again, these are only
  6165. possible candidates. \s-1GCC\s0 guesses that \f(CW\*(C`format\*(C'\fR attributes
  6166. might be appropriate for any function that calls a function like
  6167. \&\f(CW\*(C`vprintf\*(C'\fR or \f(CW\*(C`vscanf\*(C'\fR, but this might not always be the
  6168. case, and some functions for which \f(CW\*(C`format\*(C'\fR attributes are
  6169. appropriate may not be detected.
  6170. .IP "\fB\-Wsuggest\-attribute=cold\fR" 4
  6171. .IX Item "-Wsuggest-attribute=cold"
  6172. Warn about functions that might be candidates for \f(CW\*(C`cold\*(C'\fR attribute. This
  6173. is based on static detection and generally only warns about functions which
  6174. always leads to a call to another \f(CW\*(C`cold\*(C'\fR function such as wrappers of
  6175. \&\*(C+ \f(CW\*(C`throw\*(C'\fR or fatal error reporting functions leading to \f(CW\*(C`abort\*(C'\fR.
  6176. .RE
  6177. .RS 4
  6178. .RE
  6179. .IP "\fB\-Walloc\-zero\fR" 4
  6180. .IX Item "-Walloc-zero"
  6181. Warn about calls to allocation functions decorated with attribute
  6182. \&\f(CW\*(C`alloc_size\*(C'\fR that specify zero bytes, including those to the built-in
  6183. forms of the functions \f(CW\*(C`aligned_alloc\*(C'\fR, \f(CW\*(C`alloca\*(C'\fR, \f(CW\*(C`calloc\*(C'\fR,
  6184. \&\f(CW\*(C`malloc\*(C'\fR, and \f(CW\*(C`realloc\*(C'\fR. Because the behavior of these functions
  6185. when called with a zero size differs among implementations (and in the case
  6186. of \f(CW\*(C`realloc\*(C'\fR has been deprecated) relying on it may result in subtle
  6187. portability bugs and should be avoided.
  6188. .IP "\fB\-Walloc\-size\-larger\-than=\fR\fIbyte-size\fR" 4
  6189. .IX Item "-Walloc-size-larger-than=byte-size"
  6190. Warn about calls to functions decorated with attribute \f(CW\*(C`alloc_size\*(C'\fR
  6191. that attempt to allocate objects larger than the specified number of bytes,
  6192. or where the result of the size computation in an integer type with infinite
  6193. precision would exceed the value of \fB\s-1PTRDIFF_MAX\s0\fR on the target.
  6194. \&\fB\-Walloc\-size\-larger\-than=\fR\fB\s-1PTRDIFF_MAX\s0\fR is enabled by default.
  6195. Warnings controlled by the option can be disabled either by specifying
  6196. \&\fIbyte-size\fR of \fB\s-1SIZE_MAX\s0\fR or more or by
  6197. \&\fB\-Wno\-alloc\-size\-larger\-than\fR.
  6198. .IP "\fB\-Wno\-alloc\-size\-larger\-than\fR" 4
  6199. .IX Item "-Wno-alloc-size-larger-than"
  6200. Disable \fB\-Walloc\-size\-larger\-than=\fR warnings. The option is
  6201. equivalent to \fB\-Walloc\-size\-larger\-than=\fR\fB\s-1SIZE_MAX\s0\fR or
  6202. larger.
  6203. .IP "\fB\-Walloca\fR" 4
  6204. .IX Item "-Walloca"
  6205. This option warns on all uses of \f(CW\*(C`alloca\*(C'\fR in the source.
  6206. .IP "\fB\-Walloca\-larger\-than=\fR\fIbyte-size\fR" 4
  6207. .IX Item "-Walloca-larger-than=byte-size"
  6208. This option warns on calls to \f(CW\*(C`alloca\*(C'\fR with an integer argument whose
  6209. value is either zero, or that is not bounded by a controlling predicate
  6210. that limits its value to at most \fIbyte-size\fR. It also warns for calls
  6211. to \f(CW\*(C`alloca\*(C'\fR where the bound value is unknown. Arguments of non-integer
  6212. types are considered unbounded even if they appear to be constrained to
  6213. the expected range.
  6214. .Sp
  6215. For example, a bounded case of \f(CW\*(C`alloca\*(C'\fR could be:
  6216. .Sp
  6217. .Vb 9
  6218. \& void func (size_t n)
  6219. \& {
  6220. \& void *p;
  6221. \& if (n <= 1000)
  6222. \& p = alloca (n);
  6223. \& else
  6224. \& p = malloc (n);
  6225. \& f (p);
  6226. \& }
  6227. .Ve
  6228. .Sp
  6229. In the above example, passing \f(CW\*(C`\-Walloca\-larger\-than=1000\*(C'\fR would not
  6230. issue a warning because the call to \f(CW\*(C`alloca\*(C'\fR is known to be at most
  6231. 1000 bytes. However, if \f(CW\*(C`\-Walloca\-larger\-than=500\*(C'\fR were passed,
  6232. the compiler would emit a warning.
  6233. .Sp
  6234. Unbounded uses, on the other hand, are uses of \f(CW\*(C`alloca\*(C'\fR with no
  6235. controlling predicate constraining its integer argument. For example:
  6236. .Sp
  6237. .Vb 5
  6238. \& void func ()
  6239. \& {
  6240. \& void *p = alloca (n);
  6241. \& f (p);
  6242. \& }
  6243. .Ve
  6244. .Sp
  6245. If \f(CW\*(C`\-Walloca\-larger\-than=500\*(C'\fR were passed, the above would trigger
  6246. a warning, but this time because of the lack of bounds checking.
  6247. .Sp
  6248. Note, that even seemingly correct code involving signed integers could
  6249. cause a warning:
  6250. .Sp
  6251. .Vb 8
  6252. \& void func (signed int n)
  6253. \& {
  6254. \& if (n < 500)
  6255. \& {
  6256. \& p = alloca (n);
  6257. \& f (p);
  6258. \& }
  6259. \& }
  6260. .Ve
  6261. .Sp
  6262. In the above example, \fIn\fR could be negative, causing a larger than
  6263. expected argument to be implicitly cast into the \f(CW\*(C`alloca\*(C'\fR call.
  6264. .Sp
  6265. This option also warns when \f(CW\*(C`alloca\*(C'\fR is used in a loop.
  6266. .Sp
  6267. \&\fB\-Walloca\-larger\-than=\fR\fB\s-1PTRDIFF_MAX\s0\fR is enabled by default
  6268. but is usually only effective when \fB\-ftree\-vrp\fR is active (default
  6269. for \fB\-O2\fR and above).
  6270. .Sp
  6271. See also \fB\-Wvla\-larger\-than=\fR\fBbyte-size\fR.
  6272. .IP "\fB\-Wno\-alloca\-larger\-than\fR" 4
  6273. .IX Item "-Wno-alloca-larger-than"
  6274. Disable \fB\-Walloca\-larger\-than=\fR warnings. The option is
  6275. equivalent to \fB\-Walloca\-larger\-than=\fR\fB\s-1SIZE_MAX\s0\fR or larger.
  6276. .IP "\fB\-Warith\-conversion\fR" 4
  6277. .IX Item "-Warith-conversion"
  6278. Do warn about implicit conversions from arithmetic operations even
  6279. when conversion of the operands to the same type cannot change their
  6280. values. This affects warnings from \fB\-Wconversion\fR,
  6281. \&\fB\-Wfloat\-conversion\fR, and \fB\-Wsign\-conversion\fR.
  6282. .Sp
  6283. .Vb 5
  6284. \& void f (char c, int i)
  6285. \& {
  6286. \& c = c + i; // warns with B<\-Wconversion>
  6287. \& c = c + 1; // only warns with B<\-Warith\-conversion>
  6288. \& }
  6289. .Ve
  6290. .IP "\fB\-Warray\-bounds\fR" 4
  6291. .IX Item "-Warray-bounds"
  6292. .PD 0
  6293. .IP "\fB\-Warray\-bounds=\fR\fIn\fR" 4
  6294. .IX Item "-Warray-bounds=n"
  6295. .PD
  6296. This option is only active when \fB\-ftree\-vrp\fR is active
  6297. (default for \fB\-O2\fR and above). It warns about subscripts to arrays
  6298. that are always out of bounds. This warning is enabled by \fB\-Wall\fR.
  6299. .RS 4
  6300. .IP "\fB\-Warray\-bounds=1\fR" 4
  6301. .IX Item "-Warray-bounds=1"
  6302. This is the warning level of \fB\-Warray\-bounds\fR and is enabled
  6303. by \fB\-Wall\fR; higher levels are not, and must be explicitly requested.
  6304. .IP "\fB\-Warray\-bounds=2\fR" 4
  6305. .IX Item "-Warray-bounds=2"
  6306. This warning level also warns about out of bounds access for
  6307. arrays at the end of a struct and for arrays accessed through
  6308. pointers. This warning level may give a larger number of
  6309. false positives and is deactivated by default.
  6310. .RE
  6311. .RS 4
  6312. .RE
  6313. .IP "\fB\-Wattribute\-alias=\fR\fIn\fR" 4
  6314. .IX Item "-Wattribute-alias=n"
  6315. .PD 0
  6316. .IP "\fB\-Wno\-attribute\-alias\fR" 4
  6317. .IX Item "-Wno-attribute-alias"
  6318. .PD
  6319. Warn about declarations using the \f(CW\*(C`alias\*(C'\fR and similar attributes whose
  6320. target is incompatible with the type of the alias.
  6321. .RS 4
  6322. .IP "\fB\-Wattribute\-alias=1\fR" 4
  6323. .IX Item "-Wattribute-alias=1"
  6324. The default warning level of the \fB\-Wattribute\-alias\fR option diagnoses
  6325. incompatibilities between the type of the alias declaration and that of its
  6326. target. Such incompatibilities are typically indicative of bugs.
  6327. .IP "\fB\-Wattribute\-alias=2\fR" 4
  6328. .IX Item "-Wattribute-alias=2"
  6329. At this level \fB\-Wattribute\-alias\fR also diagnoses cases where
  6330. the attributes of the alias declaration are more restrictive than the
  6331. attributes applied to its target. These mismatches can potentially
  6332. result in incorrect code generation. In other cases they may be
  6333. benign and could be resolved simply by adding the missing attribute to
  6334. the target. For comparison, see the \fB\-Wmissing\-attributes\fR
  6335. option, which controls diagnostics when the alias declaration is less
  6336. restrictive than the target, rather than more restrictive.
  6337. .Sp
  6338. Attributes considered include \f(CW\*(C`alloc_align\*(C'\fR, \f(CW\*(C`alloc_size\*(C'\fR,
  6339. \&\f(CW\*(C`cold\*(C'\fR, \f(CW\*(C`const\*(C'\fR, \f(CW\*(C`hot\*(C'\fR, \f(CW\*(C`leaf\*(C'\fR, \f(CW\*(C`malloc\*(C'\fR,
  6340. \&\f(CW\*(C`nonnull\*(C'\fR, \f(CW\*(C`noreturn\*(C'\fR, \f(CW\*(C`nothrow\*(C'\fR, \f(CW\*(C`pure\*(C'\fR,
  6341. \&\f(CW\*(C`returns_nonnull\*(C'\fR, and \f(CW\*(C`returns_twice\*(C'\fR.
  6342. .RE
  6343. .RS 4
  6344. .Sp
  6345. \&\fB\-Wattribute\-alias\fR is equivalent to \fB\-Wattribute\-alias=1\fR.
  6346. This is the default. You can disable these warnings with either
  6347. \&\fB\-Wno\-attribute\-alias\fR or \fB\-Wattribute\-alias=0\fR.
  6348. .RE
  6349. .IP "\fB\-Wbool\-compare\fR" 4
  6350. .IX Item "-Wbool-compare"
  6351. Warn about boolean expression compared with an integer value different from
  6352. \&\f(CW\*(C`true\*(C'\fR/\f(CW\*(C`false\*(C'\fR. For instance, the following comparison is
  6353. always false:
  6354. .Sp
  6355. .Vb 3
  6356. \& int n = 5;
  6357. \& ...
  6358. \& if ((n > 1) == 2) { ... }
  6359. .Ve
  6360. .Sp
  6361. This warning is enabled by \fB\-Wall\fR.
  6362. .IP "\fB\-Wbool\-operation\fR" 4
  6363. .IX Item "-Wbool-operation"
  6364. Warn about suspicious operations on expressions of a boolean type. For
  6365. instance, bitwise negation of a boolean is very likely a bug in the program.
  6366. For C, this warning also warns about incrementing or decrementing a boolean,
  6367. which rarely makes sense. (In \*(C+, decrementing a boolean is always invalid.
  6368. Incrementing a boolean is invalid in \*(C+17, and deprecated otherwise.)
  6369. .Sp
  6370. This warning is enabled by \fB\-Wall\fR.
  6371. .IP "\fB\-Wduplicated\-branches\fR" 4
  6372. .IX Item "-Wduplicated-branches"
  6373. Warn when an if-else has identical branches. This warning detects cases like
  6374. .Sp
  6375. .Vb 4
  6376. \& if (p != NULL)
  6377. \& return 0;
  6378. \& else
  6379. \& return 0;
  6380. .Ve
  6381. .Sp
  6382. It doesn't warn when both branches contain just a null statement. This warning
  6383. also warn for conditional operators:
  6384. .Sp
  6385. .Vb 1
  6386. \& int i = x ? *p : *p;
  6387. .Ve
  6388. .IP "\fB\-Wduplicated\-cond\fR" 4
  6389. .IX Item "-Wduplicated-cond"
  6390. Warn about duplicated conditions in an if-else-if chain. For instance,
  6391. warn for the following code:
  6392. .Sp
  6393. .Vb 2
  6394. \& if (p\->q != NULL) { ... }
  6395. \& else if (p\->q != NULL) { ... }
  6396. .Ve
  6397. .IP "\fB\-Wframe\-address\fR" 4
  6398. .IX Item "-Wframe-address"
  6399. Warn when the \fB_\|_builtin_frame_address\fR or \fB_\|_builtin_return_address\fR
  6400. is called with an argument greater than 0. Such calls may return indeterminate
  6401. values or crash the program. The warning is included in \fB\-Wall\fR.
  6402. .IP "\fB\-Wno\-discarded\-qualifiers\fR (C and Objective-C only)" 4
  6403. .IX Item "-Wno-discarded-qualifiers (C and Objective-C only)"
  6404. Do not warn if type qualifiers on pointers are being discarded.
  6405. Typically, the compiler warns if a \f(CW\*(C`const char *\*(C'\fR variable is
  6406. passed to a function that takes a \f(CW\*(C`char *\*(C'\fR parameter. This option
  6407. can be used to suppress such a warning.
  6408. .IP "\fB\-Wno\-discarded\-array\-qualifiers\fR (C and Objective-C only)" 4
  6409. .IX Item "-Wno-discarded-array-qualifiers (C and Objective-C only)"
  6410. Do not warn if type qualifiers on arrays which are pointer targets
  6411. are being discarded. Typically, the compiler warns if a
  6412. \&\f(CW\*(C`const int (*)[]\*(C'\fR variable is passed to a function that
  6413. takes a \f(CW\*(C`int (*)[]\*(C'\fR parameter. This option can be used to
  6414. suppress such a warning.
  6415. .IP "\fB\-Wno\-incompatible\-pointer\-types\fR (C and Objective-C only)" 4
  6416. .IX Item "-Wno-incompatible-pointer-types (C and Objective-C only)"
  6417. Do not warn when there is a conversion between pointers that have incompatible
  6418. types. This warning is for cases not covered by \fB\-Wno\-pointer\-sign\fR,
  6419. which warns for pointer argument passing or assignment with different
  6420. signedness.
  6421. .IP "\fB\-Wno\-int\-conversion\fR (C and Objective-C only)" 4
  6422. .IX Item "-Wno-int-conversion (C and Objective-C only)"
  6423. Do not warn about incompatible integer to pointer and pointer to integer
  6424. conversions. This warning is about implicit conversions; for explicit
  6425. conversions the warnings \fB\-Wno\-int\-to\-pointer\-cast\fR and
  6426. \&\fB\-Wno\-pointer\-to\-int\-cast\fR may be used.
  6427. .IP "\fB\-Wzero\-length\-bounds\fR" 4
  6428. .IX Item "-Wzero-length-bounds"
  6429. Warn about accesses to elements of zero-length array members that might
  6430. overlap other members of the same object. Declaring interior zero-length
  6431. arrays is discouraged because accesses to them are undefined. See
  6432. .Sp
  6433. For example, the first two stores in function \f(CW\*(C`bad\*(C'\fR are diagnosed
  6434. because the array elements overlap the subsequent members \f(CW\*(C`b\*(C'\fR and
  6435. \&\f(CW\*(C`c\*(C'\fR. The third store is diagnosed by \fB\-Warray\-bounds\fR
  6436. because it is beyond the bounds of the enclosing object.
  6437. .Sp
  6438. .Vb 2
  6439. \& struct X { int a[0]; int b, c; };
  6440. \& struct X x;
  6441. \&
  6442. \& void bad (void)
  6443. \& {
  6444. \& x.a[0] = 0; // \-Wzero\-length\-bounds
  6445. \& x.a[1] = 1; // \-Wzero\-length\-bounds
  6446. \& x.a[2] = 2; // \-Warray\-bounds
  6447. \& }
  6448. .Ve
  6449. .Sp
  6450. Option \fB\-Wzero\-length\-bounds\fR is enabled by \fB\-Warray\-bounds\fR.
  6451. .IP "\fB\-Wno\-div\-by\-zero\fR" 4
  6452. .IX Item "-Wno-div-by-zero"
  6453. Do not warn about compile-time integer division by zero. Floating-point
  6454. division by zero is not warned about, as it can be a legitimate way of
  6455. obtaining infinities and NaNs.
  6456. .IP "\fB\-Wsystem\-headers\fR" 4
  6457. .IX Item "-Wsystem-headers"
  6458. Print warning messages for constructs found in system header files.
  6459. Warnings from system headers are normally suppressed, on the assumption
  6460. that they usually do not indicate real problems and would only make the
  6461. compiler output harder to read. Using this command-line option tells
  6462. \&\s-1GCC\s0 to emit warnings from system headers as if they occurred in user
  6463. code. However, note that using \fB\-Wall\fR in conjunction with this
  6464. option does \fInot\fR warn about unknown pragmas in system
  6465. headers\-\-\-for that, \fB\-Wunknown\-pragmas\fR must also be used.
  6466. .IP "\fB\-Wtautological\-compare\fR" 4
  6467. .IX Item "-Wtautological-compare"
  6468. Warn if a self-comparison always evaluates to true or false. This
  6469. warning detects various mistakes such as:
  6470. .Sp
  6471. .Vb 3
  6472. \& int i = 1;
  6473. \& ...
  6474. \& if (i > i) { ... }
  6475. .Ve
  6476. .Sp
  6477. This warning also warns about bitwise comparisons that always evaluate
  6478. to true or false, for instance:
  6479. .Sp
  6480. .Vb 1
  6481. \& if ((a & 16) == 10) { ... }
  6482. .Ve
  6483. .Sp
  6484. will always be false.
  6485. .Sp
  6486. This warning is enabled by \fB\-Wall\fR.
  6487. .IP "\fB\-Wtrampolines\fR" 4
  6488. .IX Item "-Wtrampolines"
  6489. Warn about trampolines generated for pointers to nested functions.
  6490. A trampoline is a small piece of data or code that is created at run
  6491. time on the stack when the address of a nested function is taken, and is
  6492. used to call the nested function indirectly. For some targets, it is
  6493. made up of data only and thus requires no special treatment. But, for
  6494. most targets, it is made up of code and thus requires the stack to be
  6495. made executable in order for the program to work properly.
  6496. .IP "\fB\-Wfloat\-equal\fR" 4
  6497. .IX Item "-Wfloat-equal"
  6498. Warn if floating-point values are used in equality comparisons.
  6499. .Sp
  6500. The idea behind this is that sometimes it is convenient (for the
  6501. programmer) to consider floating-point values as approximations to
  6502. infinitely precise real numbers. If you are doing this, then you need
  6503. to compute (by analyzing the code, or in some other way) the maximum or
  6504. likely maximum error that the computation introduces, and allow for it
  6505. when performing comparisons (and when producing output, but that's a
  6506. different problem). In particular, instead of testing for equality, you
  6507. should check to see whether the two values have ranges that overlap; and
  6508. this is done with the relational operators, so equality comparisons are
  6509. probably mistaken.
  6510. .IP "\fB\-Wtraditional\fR (C and Objective-C only)" 4
  6511. .IX Item "-Wtraditional (C and Objective-C only)"
  6512. Warn about certain constructs that behave differently in traditional and
  6513. \&\s-1ISO C. \s0 Also warn about \s-1ISO C\s0 constructs that have no traditional C
  6514. equivalent, and/or problematic constructs that should be avoided.
  6515. .RS 4
  6516. .IP "*" 4
  6517. Macro parameters that appear within string literals in the macro body.
  6518. In traditional C macro replacement takes place within string literals,
  6519. but in \s-1ISO C\s0 it does not.
  6520. .IP "*" 4
  6521. In traditional C, some preprocessor directives did not exist.
  6522. Traditional preprocessors only considered a line to be a directive
  6523. if the \fB#\fR appeared in column 1 on the line. Therefore
  6524. \&\fB\-Wtraditional\fR warns about directives that traditional C
  6525. understands but ignores because the \fB#\fR does not appear as the
  6526. first character on the line. It also suggests you hide directives like
  6527. \&\f(CW\*(C`#pragma\*(C'\fR not understood by traditional C by indenting them. Some
  6528. traditional implementations do not recognize \f(CW\*(C`#elif\*(C'\fR, so this option
  6529. suggests avoiding it altogether.
  6530. .IP "*" 4
  6531. A function-like macro that appears without arguments.
  6532. .IP "*" 4
  6533. The unary plus operator.
  6534. .IP "*" 4
  6535. The \fBU\fR integer constant suffix, or the \fBF\fR or \fBL\fR floating-point
  6536. constant suffixes. (Traditional C does support the \fBL\fR suffix on integer
  6537. constants.) Note, these suffixes appear in macros defined in the system
  6538. headers of most modern systems, e.g. the \fB_MIN\fR/\fB_MAX\fR macros in \f(CW\*(C`<limits.h>\*(C'\fR.
  6539. Use of these macros in user code might normally lead to spurious
  6540. warnings, however \s-1GCC\s0's integrated preprocessor has enough context to
  6541. avoid warning in these cases.
  6542. .IP "*" 4
  6543. A function declared external in one block and then used after the end of
  6544. the block.
  6545. .IP "*" 4
  6546. A \f(CW\*(C`switch\*(C'\fR statement has an operand of type \f(CW\*(C`long\*(C'\fR.
  6547. .IP "*" 4
  6548. A non\-\f(CW\*(C`static\*(C'\fR function declaration follows a \f(CW\*(C`static\*(C'\fR one.
  6549. This construct is not accepted by some traditional C compilers.
  6550. .IP "*" 4
  6551. The \s-1ISO\s0 type of an integer constant has a different width or
  6552. signedness from its traditional type. This warning is only issued if
  6553. the base of the constant is ten. I.e. hexadecimal or octal values, which
  6554. typically represent bit patterns, are not warned about.
  6555. .IP "*" 4
  6556. Usage of \s-1ISO\s0 string concatenation is detected.
  6557. .IP "*" 4
  6558. Initialization of automatic aggregates.
  6559. .IP "*" 4
  6560. Identifier conflicts with labels. Traditional C lacks a separate
  6561. namespace for labels.
  6562. .IP "*" 4
  6563. Initialization of unions. If the initializer is zero, the warning is
  6564. omitted. This is done under the assumption that the zero initializer in
  6565. user code appears conditioned on e.g. \f(CW\*(C`_\|_STDC_\|_\*(C'\fR to avoid missing
  6566. initializer warnings and relies on default initialization to zero in the
  6567. traditional C case.
  6568. .IP "*" 4
  6569. Conversions by prototypes between fixed/floating\-point values and vice
  6570. versa. The absence of these prototypes when compiling with traditional
  6571. C causes serious problems. This is a subset of the possible
  6572. conversion warnings; for the full set use \fB\-Wtraditional\-conversion\fR.
  6573. .IP "*" 4
  6574. Use of \s-1ISO C\s0 style function definitions. This warning intentionally is
  6575. \&\fInot\fR issued for prototype declarations or variadic functions
  6576. because these \s-1ISO C\s0 features appear in your code when using
  6577. libiberty's traditional C compatibility macros, \f(CW\*(C`PARAMS\*(C'\fR and
  6578. \&\f(CW\*(C`VPARAMS\*(C'\fR. This warning is also bypassed for nested functions
  6579. because that feature is already a \s-1GCC\s0 extension and thus not relevant to
  6580. traditional C compatibility.
  6581. .RE
  6582. .RS 4
  6583. .RE
  6584. .IP "\fB\-Wtraditional\-conversion\fR (C and Objective-C only)" 4
  6585. .IX Item "-Wtraditional-conversion (C and Objective-C only)"
  6586. Warn if a prototype causes a type conversion that is different from what
  6587. would happen to the same argument in the absence of a prototype. This
  6588. includes conversions of fixed point to floating and vice versa, and
  6589. conversions changing the width or signedness of a fixed-point argument
  6590. except when the same as the default promotion.
  6591. .IP "\fB\-Wdeclaration\-after\-statement\fR (C and Objective-C only)" 4
  6592. .IX Item "-Wdeclaration-after-statement (C and Objective-C only)"
  6593. Warn when a declaration is found after a statement in a block. This
  6594. construct, known from \*(C+, was introduced with \s-1ISO C99\s0 and is by default
  6595. allowed in \s-1GCC. \s0 It is not supported by \s-1ISO C90. \s0
  6596. .IP "\fB\-Wshadow\fR" 4
  6597. .IX Item "-Wshadow"
  6598. Warn whenever a local variable or type declaration shadows another
  6599. variable, parameter, type, class member (in \*(C+), or instance variable
  6600. (in Objective-C) or whenever a built-in function is shadowed. Note
  6601. that in \*(C+, the compiler warns if a local variable shadows an
  6602. explicit typedef, but not if it shadows a struct/class/enum.
  6603. If this warning is enabled, it includes also all instances of
  6604. local shadowing. This means that \fB\-Wno\-shadow=local\fR
  6605. and \fB\-Wno\-shadow=compatible\-local\fR are ignored when
  6606. \&\fB\-Wshadow\fR is used.
  6607. Same as \fB\-Wshadow=global\fR.
  6608. .IP "\fB\-Wno\-shadow\-ivar\fR (Objective-C only)" 4
  6609. .IX Item "-Wno-shadow-ivar (Objective-C only)"
  6610. Do not warn whenever a local variable shadows an instance variable in an
  6611. Objective-C method.
  6612. .IP "\fB\-Wshadow=global\fR" 4
  6613. .IX Item "-Wshadow=global"
  6614. Warn for any shadowing.
  6615. Same as \fB\-Wshadow\fR.
  6616. .IP "\fB\-Wshadow=local\fR" 4
  6617. .IX Item "-Wshadow=local"
  6618. Warn when a local variable shadows another local variable or parameter.
  6619. .IP "\fB\-Wshadow=compatible\-local\fR" 4
  6620. .IX Item "-Wshadow=compatible-local"
  6621. Warn when a local variable shadows another local variable or parameter
  6622. whose type is compatible with that of the shadowing variable. In \*(C+,
  6623. type compatibility here means the type of the shadowing variable can be
  6624. converted to that of the shadowed variable. The creation of this flag
  6625. (in addition to \fB\-Wshadow=local\fR) is based on the idea that when
  6626. a local variable shadows another one of incompatible type, it is most
  6627. likely intentional, not a bug or typo, as shown in the following example:
  6628. .Sp
  6629. .Vb 8
  6630. \& for (SomeIterator i = SomeObj.begin(); i != SomeObj.end(); ++i)
  6631. \& {
  6632. \& for (int i = 0; i < N; ++i)
  6633. \& {
  6634. \& ...
  6635. \& }
  6636. \& ...
  6637. \& }
  6638. .Ve
  6639. .Sp
  6640. Since the two variable \f(CW\*(C`i\*(C'\fR in the example above have incompatible types,
  6641. enabling only \fB\-Wshadow=compatible\-local\fR does not emit a warning.
  6642. Because their types are incompatible, if a programmer accidentally uses one
  6643. in place of the other, type checking is expected to catch that and emit an
  6644. error or warning. Use of this flag instead of \fB\-Wshadow=local\fR can
  6645. possibly reduce the number of warnings triggered by intentional shadowing.
  6646. Note that this also means that shadowing \f(CW\*(C`const char *i\*(C'\fR by
  6647. \&\f(CW\*(C`char *i\*(C'\fR does not emit a warning.
  6648. .Sp
  6649. This warning is also enabled by \fB\-Wshadow=local\fR.
  6650. .IP "\fB\-Wlarger\-than=\fR\fIbyte-size\fR" 4
  6651. .IX Item "-Wlarger-than=byte-size"
  6652. Warn whenever an object is defined whose size exceeds \fIbyte-size\fR.
  6653. \&\fB\-Wlarger\-than=\fR\fB\s-1PTRDIFF_MAX\s0\fR is enabled by default.
  6654. Warnings controlled by the option can be disabled either by specifying
  6655. \&\fIbyte-size\fR of \fB\s-1SIZE_MAX\s0\fR or more or by
  6656. \&\fB\-Wno\-larger\-than\fR.
  6657. .IP "\fB\-Wno\-larger\-than\fR" 4
  6658. .IX Item "-Wno-larger-than"
  6659. Disable \fB\-Wlarger\-than=\fR warnings. The option is equivalent
  6660. to \fB\-Wlarger\-than=\fR\fB\s-1SIZE_MAX\s0\fR or larger.
  6661. .IP "\fB\-Wframe\-larger\-than=\fR\fIbyte-size\fR" 4
  6662. .IX Item "-Wframe-larger-than=byte-size"
  6663. Warn if the size of a function frame exceeds \fIbyte-size\fR.
  6664. The computation done to determine the stack frame size is approximate
  6665. and not conservative.
  6666. The actual requirements may be somewhat greater than \fIbyte-size\fR
  6667. even if you do not get a warning. In addition, any space allocated
  6668. via \f(CW\*(C`alloca\*(C'\fR, variable-length arrays, or related constructs
  6669. is not included by the compiler when determining
  6670. whether or not to issue a warning.
  6671. \&\fB\-Wframe\-larger\-than=\fR\fB\s-1PTRDIFF_MAX\s0\fR is enabled by default.
  6672. Warnings controlled by the option can be disabled either by specifying
  6673. \&\fIbyte-size\fR of \fB\s-1SIZE_MAX\s0\fR or more or by
  6674. \&\fB\-Wno\-frame\-larger\-than\fR.
  6675. .IP "\fB\-Wno\-frame\-larger\-than\fR" 4
  6676. .IX Item "-Wno-frame-larger-than"
  6677. Disable \fB\-Wframe\-larger\-than=\fR warnings. The option is equivalent
  6678. to \fB\-Wframe\-larger\-than=\fR\fB\s-1SIZE_MAX\s0\fR or larger.
  6679. .IP "\fB\-Wno\-free\-nonheap\-object\fR" 4
  6680. .IX Item "-Wno-free-nonheap-object"
  6681. Do not warn when attempting to free an object that was not allocated
  6682. on the heap.
  6683. .IP "\fB\-Wstack\-usage=\fR\fIbyte-size\fR" 4
  6684. .IX Item "-Wstack-usage=byte-size"
  6685. Warn if the stack usage of a function might exceed \fIbyte-size\fR.
  6686. The computation done to determine the stack usage is conservative.
  6687. Any space allocated via \f(CW\*(C`alloca\*(C'\fR, variable-length arrays, or related
  6688. constructs is included by the compiler when determining whether or not to
  6689. issue a warning.
  6690. .Sp
  6691. The message is in keeping with the output of \fB\-fstack\-usage\fR.
  6692. .RS 4
  6693. .IP "*" 4
  6694. If the stack usage is fully static but exceeds the specified amount, it's:
  6695. .Sp
  6696. .Vb 1
  6697. \& warning: stack usage is 1120 bytes
  6698. .Ve
  6699. .IP "*" 4
  6700. If the stack usage is (partly) dynamic but bounded, it's:
  6701. .Sp
  6702. .Vb 1
  6703. \& warning: stack usage might be 1648 bytes
  6704. .Ve
  6705. .IP "*" 4
  6706. If the stack usage is (partly) dynamic and not bounded, it's:
  6707. .Sp
  6708. .Vb 1
  6709. \& warning: stack usage might be unbounded
  6710. .Ve
  6711. .RE
  6712. .RS 4
  6713. .Sp
  6714. \&\fB\-Wstack\-usage=\fR\fB\s-1PTRDIFF_MAX\s0\fR is enabled by default.
  6715. Warnings controlled by the option can be disabled either by specifying
  6716. \&\fIbyte-size\fR of \fB\s-1SIZE_MAX\s0\fR or more or by
  6717. \&\fB\-Wno\-stack\-usage\fR.
  6718. .RE
  6719. .IP "\fB\-Wno\-stack\-usage\fR" 4
  6720. .IX Item "-Wno-stack-usage"
  6721. Disable \fB\-Wstack\-usage=\fR warnings. The option is equivalent
  6722. to \fB\-Wstack\-usage=\fR\fB\s-1SIZE_MAX\s0\fR or larger.
  6723. .IP "\fB\-Wunsafe\-loop\-optimizations\fR" 4
  6724. .IX Item "-Wunsafe-loop-optimizations"
  6725. Warn if the loop cannot be optimized because the compiler cannot
  6726. assume anything on the bounds of the loop indices. With
  6727. \&\fB\-funsafe\-loop\-optimizations\fR warn if the compiler makes
  6728. such assumptions.
  6729. .IP "\fB\-Wno\-pedantic\-ms\-format\fR (MinGW targets only)" 4
  6730. .IX Item "-Wno-pedantic-ms-format (MinGW targets only)"
  6731. When used in combination with \fB\-Wformat\fR
  6732. and \fB\-pedantic\fR without \s-1GNU\s0 extensions, this option
  6733. disables the warnings about non-ISO \f(CW\*(C`printf\*(C'\fR / \f(CW\*(C`scanf\*(C'\fR format
  6734. width specifiers \f(CW\*(C`I32\*(C'\fR, \f(CW\*(C`I64\*(C'\fR, and \f(CW\*(C`I\*(C'\fR used on Windows targets,
  6735. which depend on the \s-1MS\s0 runtime.
  6736. .IP "\fB\-Wpointer\-arith\fR" 4
  6737. .IX Item "-Wpointer-arith"
  6738. Warn about anything that depends on the \*(L"size of\*(R" a function type or
  6739. of \f(CW\*(C`void\*(C'\fR. \s-1GNU C\s0 assigns these types a size of 1, for
  6740. convenience in calculations with \f(CW\*(C`void *\*(C'\fR pointers and pointers
  6741. to functions. In \*(C+, warn also when an arithmetic operation involves
  6742. \&\f(CW\*(C`NULL\*(C'\fR. This warning is also enabled by \fB\-Wpedantic\fR.
  6743. .IP "\fB\-Wno\-pointer\-compare\fR" 4
  6744. .IX Item "-Wno-pointer-compare"
  6745. Do not warn if a pointer is compared with a zero character constant.
  6746. This usually
  6747. means that the pointer was meant to be dereferenced. For example:
  6748. .Sp
  6749. .Vb 3
  6750. \& const char *p = foo ();
  6751. \& if (p == \*(Aq\e0\*(Aq)
  6752. \& return 42;
  6753. .Ve
  6754. .Sp
  6755. Note that the code above is invalid in \*(C+11.
  6756. .Sp
  6757. This warning is enabled by default.
  6758. .IP "\fB\-Wtype\-limits\fR" 4
  6759. .IX Item "-Wtype-limits"
  6760. Warn if a comparison is always true or always false due to the limited
  6761. range of the data type, but do not warn for constant expressions. For
  6762. example, warn if an unsigned variable is compared against zero with
  6763. \&\f(CW\*(C`<\*(C'\fR or \f(CW\*(C`>=\*(C'\fR. This warning is also enabled by
  6764. \&\fB\-Wextra\fR.
  6765. .IP "\fB\-Wabsolute\-value\fR (C and Objective-C only)" 4
  6766. .IX Item "-Wabsolute-value (C and Objective-C only)"
  6767. Warn for calls to standard functions that compute the absolute value
  6768. of an argument when a more appropriate standard function is available.
  6769. For example, calling \f(CW\*(C`abs(3.14)\*(C'\fR triggers the warning because the
  6770. appropriate function to call to compute the absolute value of a double
  6771. argument is \f(CW\*(C`fabs\*(C'\fR. The option also triggers warnings when the
  6772. argument in a call to such a function has an unsigned type. This
  6773. warning can be suppressed with an explicit type cast and it is also
  6774. enabled by \fB\-Wextra\fR.
  6775. .IP "\fB\-Wcomment\fR" 4
  6776. .IX Item "-Wcomment"
  6777. .PD 0
  6778. .IP "\fB\-Wcomments\fR" 4
  6779. .IX Item "-Wcomments"
  6780. .PD
  6781. Warn whenever a comment-start sequence \fB/*\fR appears in a \fB/*\fR
  6782. comment, or whenever a backslash-newline appears in a \fB//\fR comment.
  6783. This warning is enabled by \fB\-Wall\fR.
  6784. .IP "\fB\-Wtrigraphs\fR" 4
  6785. .IX Item "-Wtrigraphs"
  6786. Warn if any trigraphs are encountered that might change the meaning of
  6787. the program. Trigraphs within comments are not warned about,
  6788. except those that would form escaped newlines.
  6789. .Sp
  6790. This option is implied by \fB\-Wall\fR. If \fB\-Wall\fR is not
  6791. given, this option is still enabled unless trigraphs are enabled. To
  6792. get trigraph conversion without warnings, but get the other
  6793. \&\fB\-Wall\fR warnings, use \fB\-trigraphs \-Wall \-Wno\-trigraphs\fR.
  6794. .IP "\fB\-Wundef\fR" 4
  6795. .IX Item "-Wundef"
  6796. Warn if an undefined identifier is evaluated in an \f(CW\*(C`#if\*(C'\fR directive.
  6797. Such identifiers are replaced with zero.
  6798. .IP "\fB\-Wexpansion\-to\-defined\fR" 4
  6799. .IX Item "-Wexpansion-to-defined"
  6800. Warn whenever \fBdefined\fR is encountered in the expansion of a macro
  6801. (including the case where the macro is expanded by an \fB#if\fR directive).
  6802. Such usage is not portable.
  6803. This warning is also enabled by \fB\-Wpedantic\fR and \fB\-Wextra\fR.
  6804. .IP "\fB\-Wunused\-macros\fR" 4
  6805. .IX Item "-Wunused-macros"
  6806. Warn about macros defined in the main file that are unused. A macro
  6807. is \fIused\fR if it is expanded or tested for existence at least once.
  6808. The preprocessor also warns if the macro has not been used at the
  6809. time it is redefined or undefined.
  6810. .Sp
  6811. Built-in macros, macros defined on the command line, and macros
  6812. defined in include files are not warned about.
  6813. .Sp
  6814. \&\fINote:\fR If a macro is actually used, but only used in skipped
  6815. conditional blocks, then the preprocessor reports it as unused. To avoid the
  6816. warning in such a case, you might improve the scope of the macro's
  6817. definition by, for example, moving it into the first skipped block.
  6818. Alternatively, you could provide a dummy use with something like:
  6819. .Sp
  6820. .Vb 2
  6821. \& #if defined the_macro_causing_the_warning
  6822. \& #endif
  6823. .Ve
  6824. .IP "\fB\-Wno\-endif\-labels\fR" 4
  6825. .IX Item "-Wno-endif-labels"
  6826. Do not warn whenever an \f(CW\*(C`#else\*(C'\fR or an \f(CW\*(C`#endif\*(C'\fR are followed by text.
  6827. This sometimes happens in older programs with code of the form
  6828. .Sp
  6829. .Vb 5
  6830. \& #if FOO
  6831. \& ...
  6832. \& #else FOO
  6833. \& ...
  6834. \& #endif FOO
  6835. .Ve
  6836. .Sp
  6837. The second and third \f(CW\*(C`FOO\*(C'\fR should be in comments.
  6838. This warning is on by default.
  6839. .IP "\fB\-Wbad\-function\-cast\fR (C and Objective-C only)" 4
  6840. .IX Item "-Wbad-function-cast (C and Objective-C only)"
  6841. Warn when a function call is cast to a non-matching type.
  6842. For example, warn if a call to a function returning an integer type
  6843. is cast to a pointer type.
  6844. .IP "\fB\-Wc90\-c99\-compat\fR (C and Objective-C only)" 4
  6845. .IX Item "-Wc90-c99-compat (C and Objective-C only)"
  6846. Warn about features not present in \s-1ISO C90,\s0 but present in \s-1ISO C99.\s0
  6847. For instance, warn about use of variable length arrays, \f(CW\*(C`long long\*(C'\fR
  6848. type, \f(CW\*(C`bool\*(C'\fR type, compound literals, designated initializers, and so
  6849. on. This option is independent of the standards mode. Warnings are disabled
  6850. in the expression that follows \f(CW\*(C`_\|_extension_\|_\*(C'\fR.
  6851. .IP "\fB\-Wc99\-c11\-compat\fR (C and Objective-C only)" 4
  6852. .IX Item "-Wc99-c11-compat (C and Objective-C only)"
  6853. Warn about features not present in \s-1ISO C99,\s0 but present in \s-1ISO C11.\s0
  6854. For instance, warn about use of anonymous structures and unions,
  6855. \&\f(CW\*(C`_Atomic\*(C'\fR type qualifier, \f(CW\*(C`_Thread_local\*(C'\fR storage-class specifier,
  6856. \&\f(CW\*(C`_Alignas\*(C'\fR specifier, \f(CW\*(C`Alignof\*(C'\fR operator, \f(CW\*(C`_Generic\*(C'\fR keyword,
  6857. and so on. This option is independent of the standards mode. Warnings are
  6858. disabled in the expression that follows \f(CW\*(C`_\|_extension_\|_\*(C'\fR.
  6859. .IP "\fB\-Wc11\-c2x\-compat\fR (C and Objective-C only)" 4
  6860. .IX Item "-Wc11-c2x-compat (C and Objective-C only)"
  6861. Warn about features not present in \s-1ISO C11,\s0 but present in \s-1ISO C2X.\s0
  6862. For instance, warn about omitting the string in \f(CW\*(C`_Static_assert\*(C'\fR,
  6863. use of \fB[[]]\fR syntax for attributes, use of decimal
  6864. floating-point types, and so on. This option is independent of the
  6865. standards mode. Warnings are disabled in the expression that follows
  6866. \&\f(CW\*(C`_\|_extension_\|_\*(C'\fR.
  6867. .IP "\fB\-Wc++\-compat\fR (C and Objective-C only)" 4
  6868. .IX Item "-Wc++-compat (C and Objective-C only)"
  6869. Warn about \s-1ISO C\s0 constructs that are outside of the common subset of
  6870. \&\s-1ISO C\s0 and \s-1ISO \*(C+,\s0 e.g. request for implicit conversion from
  6871. \&\f(CW\*(C`void *\*(C'\fR to a pointer to non\-\f(CW\*(C`void\*(C'\fR type.
  6872. .IP "\fB\-Wc++11\-compat\fR (\*(C+ and Objective\-\*(C+ only)" 4
  6873. .IX Item "-Wc++11-compat ( and Objective- only)"
  6874. Warn about \*(C+ constructs whose meaning differs between \s-1ISO \*(C+ 1998\s0
  6875. and \s-1ISO \*(C+ 2011,\s0 e.g., identifiers in \s-1ISO \*(C+ 1998\s0 that are keywords
  6876. in \s-1ISO \*(C+ 2011. \s0 This warning turns on \fB\-Wnarrowing\fR and is
  6877. enabled by \fB\-Wall\fR.
  6878. .IP "\fB\-Wc++14\-compat\fR (\*(C+ and Objective\-\*(C+ only)" 4
  6879. .IX Item "-Wc++14-compat ( and Objective- only)"
  6880. Warn about \*(C+ constructs whose meaning differs between \s-1ISO \*(C+ 2011\s0
  6881. and \s-1ISO \*(C+ 2014. \s0 This warning is enabled by \fB\-Wall\fR.
  6882. .IP "\fB\-Wc++17\-compat\fR (\*(C+ and Objective\-\*(C+ only)" 4
  6883. .IX Item "-Wc++17-compat ( and Objective- only)"
  6884. Warn about \*(C+ constructs whose meaning differs between \s-1ISO \*(C+ 2014\s0
  6885. and \s-1ISO \*(C+ 2017. \s0 This warning is enabled by \fB\-Wall\fR.
  6886. .IP "\fB\-Wc++20\-compat\fR (\*(C+ and Objective\-\*(C+ only)" 4
  6887. .IX Item "-Wc++20-compat ( and Objective- only)"
  6888. Warn about \*(C+ constructs whose meaning differs between \s-1ISO \*(C+ 2017\s0
  6889. and \s-1ISO \*(C+ 2020. \s0 This warning is enabled by \fB\-Wall\fR.
  6890. .IP "\fB\-Wcast\-qual\fR" 4
  6891. .IX Item "-Wcast-qual"
  6892. Warn whenever a pointer is cast so as to remove a type qualifier from
  6893. the target type. For example, warn if a \f(CW\*(C`const char *\*(C'\fR is cast
  6894. to an ordinary \f(CW\*(C`char *\*(C'\fR.
  6895. .Sp
  6896. Also warn when making a cast that introduces a type qualifier in an
  6897. unsafe way. For example, casting \f(CW\*(C`char **\*(C'\fR to \f(CW\*(C`const char **\*(C'\fR
  6898. is unsafe, as in this example:
  6899. .Sp
  6900. .Vb 6
  6901. \& /* p is char ** value. */
  6902. \& const char **q = (const char **) p;
  6903. \& /* Assignment of readonly string to const char * is OK. */
  6904. \& *q = "string";
  6905. \& /* Now char** pointer points to read\-only memory. */
  6906. \& **p = \*(Aqb\*(Aq;
  6907. .Ve
  6908. .IP "\fB\-Wcast\-align\fR" 4
  6909. .IX Item "-Wcast-align"
  6910. Warn whenever a pointer is cast such that the required alignment of the
  6911. target is increased. For example, warn if a \f(CW\*(C`char *\*(C'\fR is cast to
  6912. an \f(CW\*(C`int *\*(C'\fR on machines where integers can only be accessed at
  6913. two\- or four-byte boundaries.
  6914. .IP "\fB\-Wcast\-align=strict\fR" 4
  6915. .IX Item "-Wcast-align=strict"
  6916. Warn whenever a pointer is cast such that the required alignment of the
  6917. target is increased. For example, warn if a \f(CW\*(C`char *\*(C'\fR is cast to
  6918. an \f(CW\*(C`int *\*(C'\fR regardless of the target machine.
  6919. .IP "\fB\-Wcast\-function\-type\fR" 4
  6920. .IX Item "-Wcast-function-type"
  6921. Warn when a function pointer is cast to an incompatible function pointer.
  6922. In a cast involving function types with a variable argument list only
  6923. the types of initial arguments that are provided are considered.
  6924. Any parameter of pointer-type matches any other pointer-type. Any benign
  6925. differences in integral types are ignored, like \f(CW\*(C`int\*(C'\fR vs. \f(CW\*(C`long\*(C'\fR
  6926. on \s-1ILP32\s0 targets. Likewise type qualifiers are ignored. The function
  6927. type \f(CW\*(C`void (*) (void)\*(C'\fR is special and matches everything, which can
  6928. be used to suppress this warning.
  6929. In a cast involving pointer to member types this warning warns whenever
  6930. the type cast is changing the pointer to member type.
  6931. This warning is enabled by \fB\-Wextra\fR.
  6932. .IP "\fB\-Wwrite\-strings\fR" 4
  6933. .IX Item "-Wwrite-strings"
  6934. When compiling C, give string constants the type \f(CW\*(C`const
  6935. char[\f(CIlength\f(CW]\*(C'\fR so that copying the address of one into a
  6936. non\-\f(CW\*(C`const\*(C'\fR \f(CW\*(C`char *\*(C'\fR pointer produces a warning. These
  6937. warnings help you find at compile time code that can try to write
  6938. into a string constant, but only if you have been very careful about
  6939. using \f(CW\*(C`const\*(C'\fR in declarations and prototypes. Otherwise, it is
  6940. just a nuisance. This is why we did not make \fB\-Wall\fR request
  6941. these warnings.
  6942. .Sp
  6943. When compiling \*(C+, warn about the deprecated conversion from string
  6944. literals to \f(CW\*(C`char *\*(C'\fR. This warning is enabled by default for \*(C+
  6945. programs.
  6946. .IP "\fB\-Wclobbered\fR" 4
  6947. .IX Item "-Wclobbered"
  6948. Warn for variables that might be changed by \f(CW\*(C`longjmp\*(C'\fR or
  6949. \&\f(CW\*(C`vfork\*(C'\fR. This warning is also enabled by \fB\-Wextra\fR.
  6950. .IP "\fB\-Wconversion\fR" 4
  6951. .IX Item "-Wconversion"
  6952. Warn for implicit conversions that may alter a value. This includes
  6953. conversions between real and integer, like \f(CW\*(C`abs (x)\*(C'\fR when
  6954. \&\f(CW\*(C`x\*(C'\fR is \f(CW\*(C`double\*(C'\fR; conversions between signed and unsigned,
  6955. like \f(CW\*(C`unsigned ui = \-1\*(C'\fR; and conversions to smaller types, like
  6956. \&\f(CW\*(C`sqrtf (M_PI)\*(C'\fR. Do not warn for explicit casts like \f(CW\*(C`abs
  6957. ((int) x)\*(C'\fR and \f(CW\*(C`ui = (unsigned) \-1\*(C'\fR, or if the value is not
  6958. changed by the conversion like in \f(CW\*(C`abs (2.0)\*(C'\fR. Warnings about
  6959. conversions between signed and unsigned integers can be disabled by
  6960. using \fB\-Wno\-sign\-conversion\fR.
  6961. .Sp
  6962. For \*(C+, also warn for confusing overload resolution for user-defined
  6963. conversions; and conversions that never use a type conversion
  6964. operator: conversions to \f(CW\*(C`void\*(C'\fR, the same type, a base class or a
  6965. reference to them. Warnings about conversions between signed and
  6966. unsigned integers are disabled by default in \*(C+ unless
  6967. \&\fB\-Wsign\-conversion\fR is explicitly enabled.
  6968. .Sp
  6969. Warnings about conversion from arithmetic on a small type back to that
  6970. type are only given with \fB\-Warith\-conversion\fR.
  6971. .IP "\fB\-Wdangling\-else\fR" 4
  6972. .IX Item "-Wdangling-else"
  6973. Warn about constructions where there may be confusion to which
  6974. \&\f(CW\*(C`if\*(C'\fR statement an \f(CW\*(C`else\*(C'\fR branch belongs. Here is an example of
  6975. such a case:
  6976. .Sp
  6977. .Vb 7
  6978. \& {
  6979. \& if (a)
  6980. \& if (b)
  6981. \& foo ();
  6982. \& else
  6983. \& bar ();
  6984. \& }
  6985. .Ve
  6986. .Sp
  6987. In C/\*(C+, every \f(CW\*(C`else\*(C'\fR branch belongs to the innermost possible
  6988. \&\f(CW\*(C`if\*(C'\fR statement, which in this example is \f(CW\*(C`if (b)\*(C'\fR. This is
  6989. often not what the programmer expected, as illustrated in the above
  6990. example by indentation the programmer chose. When there is the
  6991. potential for this confusion, \s-1GCC\s0 issues a warning when this flag
  6992. is specified. To eliminate the warning, add explicit braces around
  6993. the innermost \f(CW\*(C`if\*(C'\fR statement so there is no way the \f(CW\*(C`else\*(C'\fR
  6994. can belong to the enclosing \f(CW\*(C`if\*(C'\fR. The resulting code
  6995. looks like this:
  6996. .Sp
  6997. .Vb 9
  6998. \& {
  6999. \& if (a)
  7000. \& {
  7001. \& if (b)
  7002. \& foo ();
  7003. \& else
  7004. \& bar ();
  7005. \& }
  7006. \& }
  7007. .Ve
  7008. .Sp
  7009. This warning is enabled by \fB\-Wparentheses\fR.
  7010. .IP "\fB\-Wdate\-time\fR" 4
  7011. .IX Item "-Wdate-time"
  7012. Warn when macros \f(CW\*(C`_\|_TIME_\|_\*(C'\fR, \f(CW\*(C`_\|_DATE_\|_\*(C'\fR or \f(CW\*(C`_\|_TIMESTAMP_\|_\*(C'\fR
  7013. are encountered as they might prevent bit-wise-identical reproducible
  7014. compilations.
  7015. .IP "\fB\-Wempty\-body\fR" 4
  7016. .IX Item "-Wempty-body"
  7017. Warn if an empty body occurs in an \f(CW\*(C`if\*(C'\fR, \f(CW\*(C`else\*(C'\fR or \f(CW\*(C`do
  7018. while\*(C'\fR statement. This warning is also enabled by \fB\-Wextra\fR.
  7019. .IP "\fB\-Wno\-endif\-labels\fR" 4
  7020. .IX Item "-Wno-endif-labels"
  7021. Do not warn about stray tokens after \f(CW\*(C`#else\*(C'\fR and \f(CW\*(C`#endif\*(C'\fR.
  7022. .IP "\fB\-Wenum\-compare\fR" 4
  7023. .IX Item "-Wenum-compare"
  7024. Warn about a comparison between values of different enumerated types.
  7025. In \*(C+ enumerated type mismatches in conditional expressions are also
  7026. diagnosed and the warning is enabled by default. In C this warning is
  7027. enabled by \fB\-Wall\fR.
  7028. .IP "\fB\-Wenum\-conversion\fR (C, Objective-C only)" 4
  7029. .IX Item "-Wenum-conversion (C, Objective-C only)"
  7030. Warn when a value of enumerated type is implicitly converted to a
  7031. different enumerated type. This warning is enabled by \fB\-Wextra\fR.
  7032. .IP "\fB\-Wjump\-misses\-init\fR (C, Objective-C only)" 4
  7033. .IX Item "-Wjump-misses-init (C, Objective-C only)"
  7034. Warn if a \f(CW\*(C`goto\*(C'\fR statement or a \f(CW\*(C`switch\*(C'\fR statement jumps
  7035. forward across the initialization of a variable, or jumps backward to a
  7036. label after the variable has been initialized. This only warns about
  7037. variables that are initialized when they are declared. This warning is
  7038. only supported for C and Objective-C; in \*(C+ this sort of branch is an
  7039. error in any case.
  7040. .Sp
  7041. \&\fB\-Wjump\-misses\-init\fR is included in \fB\-Wc++\-compat\fR. It
  7042. can be disabled with the \fB\-Wno\-jump\-misses\-init\fR option.
  7043. .IP "\fB\-Wsign\-compare\fR" 4
  7044. .IX Item "-Wsign-compare"
  7045. Warn when a comparison between signed and unsigned values could produce
  7046. an incorrect result when the signed value is converted to unsigned.
  7047. In \*(C+, this warning is also enabled by \fB\-Wall\fR. In C, it is
  7048. also enabled by \fB\-Wextra\fR.
  7049. .IP "\fB\-Wsign\-conversion\fR" 4
  7050. .IX Item "-Wsign-conversion"
  7051. Warn for implicit conversions that may change the sign of an integer
  7052. value, like assigning a signed integer expression to an unsigned
  7053. integer variable. An explicit cast silences the warning. In C, this
  7054. option is enabled also by \fB\-Wconversion\fR.
  7055. .IP "\fB\-Wfloat\-conversion\fR" 4
  7056. .IX Item "-Wfloat-conversion"
  7057. Warn for implicit conversions that reduce the precision of a real value.
  7058. This includes conversions from real to integer, and from higher precision
  7059. real to lower precision real values. This option is also enabled by
  7060. \&\fB\-Wconversion\fR.
  7061. .IP "\fB\-Wno\-scalar\-storage\-order\fR" 4
  7062. .IX Item "-Wno-scalar-storage-order"
  7063. Do not warn on suspicious constructs involving reverse scalar storage order.
  7064. .IP "\fB\-Wsizeof\-pointer\-div\fR" 4
  7065. .IX Item "-Wsizeof-pointer-div"
  7066. Warn for suspicious divisions of two sizeof expressions that divide
  7067. the pointer size by the element size, which is the usual way to compute
  7068. the array size but won't work out correctly with pointers. This warning
  7069. warns e.g. about \f(CW\*(C`sizeof (ptr) / sizeof (ptr[0])\*(C'\fR if \f(CW\*(C`ptr\*(C'\fR is
  7070. not an array, but a pointer. This warning is enabled by \fB\-Wall\fR.
  7071. .IP "\fB\-Wsizeof\-pointer\-memaccess\fR" 4
  7072. .IX Item "-Wsizeof-pointer-memaccess"
  7073. Warn for suspicious length parameters to certain string and memory built-in
  7074. functions if the argument uses \f(CW\*(C`sizeof\*(C'\fR. This warning triggers for
  7075. example for \f(CW\*(C`memset (ptr, 0, sizeof (ptr));\*(C'\fR if \f(CW\*(C`ptr\*(C'\fR is not
  7076. an array, but a pointer, and suggests a possible fix, or about
  7077. \&\f(CW\*(C`memcpy (&foo, ptr, sizeof (&foo));\*(C'\fR. \fB\-Wsizeof\-pointer\-memaccess\fR
  7078. also warns about calls to bounded string copy functions like \f(CW\*(C`strncat\*(C'\fR
  7079. or \f(CW\*(C`strncpy\*(C'\fR that specify as the bound a \f(CW\*(C`sizeof\*(C'\fR expression of
  7080. the source array. For example, in the following function the call to
  7081. \&\f(CW\*(C`strncat\*(C'\fR specifies the size of the source string as the bound. That
  7082. is almost certainly a mistake and so the call is diagnosed.
  7083. .Sp
  7084. .Vb 7
  7085. \& void make_file (const char *name)
  7086. \& {
  7087. \& char path[PATH_MAX];
  7088. \& strncpy (path, name, sizeof path \- 1);
  7089. \& strncat (path, ".text", sizeof ".text");
  7090. \& ...
  7091. \& }
  7092. .Ve
  7093. .Sp
  7094. The \fB\-Wsizeof\-pointer\-memaccess\fR option is enabled by \fB\-Wall\fR.
  7095. .IP "\fB\-Wno\-sizeof\-array\-argument\fR" 4
  7096. .IX Item "-Wno-sizeof-array-argument"
  7097. Do not warn when the \f(CW\*(C`sizeof\*(C'\fR operator is applied to a parameter that is
  7098. declared as an array in a function definition. This warning is enabled by
  7099. default for C and \*(C+ programs.
  7100. .IP "\fB\-Wmemset\-elt\-size\fR" 4
  7101. .IX Item "-Wmemset-elt-size"
  7102. Warn for suspicious calls to the \f(CW\*(C`memset\*(C'\fR built-in function, if the
  7103. first argument references an array, and the third argument is a number
  7104. equal to the number of elements, but not equal to the size of the array
  7105. in memory. This indicates that the user has omitted a multiplication by
  7106. the element size. This warning is enabled by \fB\-Wall\fR.
  7107. .IP "\fB\-Wmemset\-transposed\-args\fR" 4
  7108. .IX Item "-Wmemset-transposed-args"
  7109. Warn for suspicious calls to the \f(CW\*(C`memset\*(C'\fR built-in function where
  7110. the second argument is not zero and the third argument is zero. For
  7111. example, the call \f(CW\*(C`memset (buf, sizeof buf, 0)\*(C'\fR is diagnosed because
  7112. \&\f(CW\*(C`memset (buf, 0, sizeof buf)\*(C'\fR was meant instead. The diagnostic
  7113. is only emitted if the third argument is a literal zero. Otherwise, if
  7114. it is an expression that is folded to zero, or a cast of zero to some
  7115. type, it is far less likely that the arguments have been mistakenly
  7116. transposed and no warning is emitted. This warning is enabled
  7117. by \fB\-Wall\fR.
  7118. .IP "\fB\-Waddress\fR" 4
  7119. .IX Item "-Waddress"
  7120. Warn about suspicious uses of memory addresses. These include using
  7121. the address of a function in a conditional expression, such as
  7122. \&\f(CW\*(C`void func(void); if (func)\*(C'\fR, and comparisons against the memory
  7123. address of a string literal, such as \f(CW\*(C`if (x == "abc")\*(C'\fR. Such
  7124. uses typically indicate a programmer error: the address of a function
  7125. always evaluates to true, so their use in a conditional usually
  7126. indicate that the programmer forgot the parentheses in a function
  7127. call; and comparisons against string literals result in unspecified
  7128. behavior and are not portable in C, so they usually indicate that the
  7129. programmer intended to use \f(CW\*(C`strcmp\*(C'\fR. This warning is enabled by
  7130. \&\fB\-Wall\fR.
  7131. .IP "\fB\-Wno\-address\-of\-packed\-member\fR" 4
  7132. .IX Item "-Wno-address-of-packed-member"
  7133. Do not warn when the address of packed member of struct or union is taken,
  7134. which usually results in an unaligned pointer value. This is
  7135. enabled by default.
  7136. .IP "\fB\-Wlogical\-op\fR" 4
  7137. .IX Item "-Wlogical-op"
  7138. Warn about suspicious uses of logical operators in expressions.
  7139. This includes using logical operators in contexts where a
  7140. bit-wise operator is likely to be expected. Also warns when
  7141. the operands of a logical operator are the same:
  7142. .Sp
  7143. .Vb 2
  7144. \& extern int a;
  7145. \& if (a < 0 && a < 0) { ... }
  7146. .Ve
  7147. .IP "\fB\-Wlogical\-not\-parentheses\fR" 4
  7148. .IX Item "-Wlogical-not-parentheses"
  7149. Warn about logical not used on the left hand side operand of a comparison.
  7150. This option does not warn if the right operand is considered to be a boolean
  7151. expression. Its purpose is to detect suspicious code like the following:
  7152. .Sp
  7153. .Vb 3
  7154. \& int a;
  7155. \& ...
  7156. \& if (!a > 1) { ... }
  7157. .Ve
  7158. .Sp
  7159. It is possible to suppress the warning by wrapping the \s-1LHS\s0 into
  7160. parentheses:
  7161. .Sp
  7162. .Vb 1
  7163. \& if ((!a) > 1) { ... }
  7164. .Ve
  7165. .Sp
  7166. This warning is enabled by \fB\-Wall\fR.
  7167. .IP "\fB\-Waggregate\-return\fR" 4
  7168. .IX Item "-Waggregate-return"
  7169. Warn if any functions that return structures or unions are defined or
  7170. called. (In languages where you can return an array, this also elicits
  7171. a warning.)
  7172. .IP "\fB\-Wno\-aggressive\-loop\-optimizations\fR" 4
  7173. .IX Item "-Wno-aggressive-loop-optimizations"
  7174. Warn if in a loop with constant number of iterations the compiler detects
  7175. undefined behavior in some statement during one or more of the iterations.
  7176. .IP "\fB\-Wno\-attributes\fR" 4
  7177. .IX Item "-Wno-attributes"
  7178. Do not warn if an unexpected \f(CW\*(C`_\|_attribute_\|_\*(C'\fR is used, such as
  7179. unrecognized attributes, function attributes applied to variables,
  7180. etc. This does not stop errors for incorrect use of supported
  7181. attributes.
  7182. .IP "\fB\-Wno\-builtin\-declaration\-mismatch\fR" 4
  7183. .IX Item "-Wno-builtin-declaration-mismatch"
  7184. Warn if a built-in function is declared with an incompatible signature
  7185. or as a non-function, or when a built-in function declared with a type
  7186. that does not include a prototype is called with arguments whose promoted
  7187. types do not match those expected by the function. When \fB\-Wextra\fR
  7188. is specified, also warn when a built-in function that takes arguments is
  7189. declared without a prototype. The \fB\-Wbuiltin\-declaration\-mismatch\fR
  7190. warning is enabled by default. To avoid the warning include the appropriate
  7191. header to bring the prototypes of built-in functions into scope.
  7192. .Sp
  7193. For example, the call to \f(CW\*(C`memset\*(C'\fR below is diagnosed by the warning
  7194. because the function expects a value of type \f(CW\*(C`size_t\*(C'\fR as its argument
  7195. but the type of \f(CW32\fR is \f(CW\*(C`int\*(C'\fR. With \fB\-Wextra\fR,
  7196. the declaration of the function is diagnosed as well.
  7197. .Sp
  7198. .Vb 5
  7199. \& extern void* memset ();
  7200. \& void f (void *d)
  7201. \& {
  7202. \& memset (d, \*(Aq\e0\*(Aq, 32);
  7203. \& }
  7204. .Ve
  7205. .IP "\fB\-Wno\-builtin\-macro\-redefined\fR" 4
  7206. .IX Item "-Wno-builtin-macro-redefined"
  7207. Do not warn if certain built-in macros are redefined. This suppresses
  7208. warnings for redefinition of \f(CW\*(C`_\|_TIMESTAMP_\|_\*(C'\fR, \f(CW\*(C`_\|_TIME_\|_\*(C'\fR,
  7209. \&\f(CW\*(C`_\|_DATE_\|_\*(C'\fR, \f(CW\*(C`_\|_FILE_\|_\*(C'\fR, and \f(CW\*(C`_\|_BASE_FILE_\|_\*(C'\fR.
  7210. .IP "\fB\-Wstrict\-prototypes\fR (C and Objective-C only)" 4
  7211. .IX Item "-Wstrict-prototypes (C and Objective-C only)"
  7212. Warn if a function is declared or defined without specifying the
  7213. argument types. (An old-style function definition is permitted without
  7214. a warning if preceded by a declaration that specifies the argument
  7215. types.)
  7216. .IP "\fB\-Wold\-style\-declaration\fR (C and Objective-C only)" 4
  7217. .IX Item "-Wold-style-declaration (C and Objective-C only)"
  7218. Warn for obsolescent usages, according to the C Standard, in a
  7219. declaration. For example, warn if storage-class specifiers like
  7220. \&\f(CW\*(C`static\*(C'\fR are not the first things in a declaration. This warning
  7221. is also enabled by \fB\-Wextra\fR.
  7222. .IP "\fB\-Wold\-style\-definition\fR (C and Objective-C only)" 4
  7223. .IX Item "-Wold-style-definition (C and Objective-C only)"
  7224. Warn if an old-style function definition is used. A warning is given
  7225. even if there is a previous prototype. A definition using \fB()\fR
  7226. is not considered an old-style definition in C2X mode, because it is
  7227. equivalent to \fB(void)\fR in that case, but is considered an
  7228. old-style definition for older standards.
  7229. .IP "\fB\-Wmissing\-parameter\-type\fR (C and Objective-C only)" 4
  7230. .IX Item "-Wmissing-parameter-type (C and Objective-C only)"
  7231. A function parameter is declared without a type specifier in K&R\-style
  7232. functions:
  7233. .Sp
  7234. .Vb 1
  7235. \& void foo(bar) { }
  7236. .Ve
  7237. .Sp
  7238. This warning is also enabled by \fB\-Wextra\fR.
  7239. .IP "\fB\-Wmissing\-prototypes\fR (C and Objective-C only)" 4
  7240. .IX Item "-Wmissing-prototypes (C and Objective-C only)"
  7241. Warn if a global function is defined without a previous prototype
  7242. declaration. This warning is issued even if the definition itself
  7243. provides a prototype. Use this option to detect global functions
  7244. that do not have a matching prototype declaration in a header file.
  7245. This option is not valid for \*(C+ because all function declarations
  7246. provide prototypes and a non-matching declaration declares an
  7247. overload rather than conflict with an earlier declaration.
  7248. Use \fB\-Wmissing\-declarations\fR to detect missing declarations in \*(C+.
  7249. .IP "\fB\-Wmissing\-declarations\fR" 4
  7250. .IX Item "-Wmissing-declarations"
  7251. Warn if a global function is defined without a previous declaration.
  7252. Do so even if the definition itself provides a prototype.
  7253. Use this option to detect global functions that are not declared in
  7254. header files. In C, no warnings are issued for functions with previous
  7255. non-prototype declarations; use \fB\-Wmissing\-prototypes\fR to detect
  7256. missing prototypes. In \*(C+, no warnings are issued for function templates,
  7257. or for inline functions, or for functions in anonymous namespaces.
  7258. .IP "\fB\-Wmissing\-field\-initializers\fR" 4
  7259. .IX Item "-Wmissing-field-initializers"
  7260. Warn if a structure's initializer has some fields missing. For
  7261. example, the following code causes such a warning, because
  7262. \&\f(CW\*(C`x.h\*(C'\fR is implicitly zero:
  7263. .Sp
  7264. .Vb 2
  7265. \& struct s { int f, g, h; };
  7266. \& struct s x = { 3, 4 };
  7267. .Ve
  7268. .Sp
  7269. This option does not warn about designated initializers, so the following
  7270. modification does not trigger a warning:
  7271. .Sp
  7272. .Vb 2
  7273. \& struct s { int f, g, h; };
  7274. \& struct s x = { .f = 3, .g = 4 };
  7275. .Ve
  7276. .Sp
  7277. In C this option does not warn about the universal zero initializer
  7278. \&\fB{ 0 }\fR:
  7279. .Sp
  7280. .Vb 2
  7281. \& struct s { int f, g, h; };
  7282. \& struct s x = { 0 };
  7283. .Ve
  7284. .Sp
  7285. Likewise, in \*(C+ this option does not warn about the empty { }
  7286. initializer, for example:
  7287. .Sp
  7288. .Vb 2
  7289. \& struct s { int f, g, h; };
  7290. \& s x = { };
  7291. .Ve
  7292. .Sp
  7293. This warning is included in \fB\-Wextra\fR. To get other \fB\-Wextra\fR
  7294. warnings without this one, use \fB\-Wextra \-Wno\-missing\-field\-initializers\fR.
  7295. .IP "\fB\-Wno\-multichar\fR" 4
  7296. .IX Item "-Wno-multichar"
  7297. Do not warn if a multicharacter constant (\fB'\s-1FOOF\s0'\fR) is used.
  7298. Usually they indicate a typo in the user's code, as they have
  7299. implementation-defined values, and should not be used in portable code.
  7300. .IP "\fB\-Wnormalized=\fR[\fBnone\fR|\fBid\fR|\fBnfc\fR|\fBnfkc\fR]" 4
  7301. .IX Item "-Wnormalized=[none|id|nfc|nfkc]"
  7302. In \s-1ISO C\s0 and \s-1ISO \*(C+,\s0 two identifiers are different if they are
  7303. different sequences of characters. However, sometimes when characters
  7304. outside the basic \s-1ASCII\s0 character set are used, you can have two
  7305. different character sequences that look the same. To avoid confusion,
  7306. the \s-1ISO 10646\s0 standard sets out some \fInormalization rules\fR which
  7307. when applied ensure that two sequences that look the same are turned into
  7308. the same sequence. \s-1GCC\s0 can warn you if you are using identifiers that
  7309. have not been normalized; this option controls that warning.
  7310. .Sp
  7311. There are four levels of warning supported by \s-1GCC. \s0 The default is
  7312. \&\fB\-Wnormalized=nfc\fR, which warns about any identifier that is
  7313. not in the \s-1ISO 10646 \*(L"C\*(R"\s0 normalized form, \fI\s-1NFC\s0\fR. \s-1NFC\s0 is the
  7314. recommended form for most uses. It is equivalent to
  7315. \&\fB\-Wnormalized\fR.
  7316. .Sp
  7317. Unfortunately, there are some characters allowed in identifiers by
  7318. \&\s-1ISO C\s0 and \s-1ISO \*(C+\s0 that, when turned into \s-1NFC,\s0 are not allowed in
  7319. identifiers. That is, there's no way to use these symbols in portable
  7320. \&\s-1ISO C\s0 or \*(C+ and have all your identifiers in \s-1NFC.
  7321. \&\s0\fB\-Wnormalized=id\fR suppresses the warning for these characters.
  7322. It is hoped that future versions of the standards involved will correct
  7323. this, which is why this option is not the default.
  7324. .Sp
  7325. You can switch the warning off for all characters by writing
  7326. \&\fB\-Wnormalized=none\fR or \fB\-Wno\-normalized\fR. You should
  7327. only do this if you are using some other normalization scheme (like
  7328. \&\*(L"D\*(R"), because otherwise you can easily create bugs that are
  7329. literally impossible to see.
  7330. .Sp
  7331. Some characters in \s-1ISO 10646\s0 have distinct meanings but look identical
  7332. in some fonts or display methodologies, especially once formatting has
  7333. been applied. For instance \f(CW\*(C`\eu207F\*(C'\fR, \*(L"\s-1SUPERSCRIPT LATIN SMALL
  7334. LETTER N\*(R",\s0 displays just like a regular \f(CW\*(C`n\*(C'\fR that has been
  7335. placed in a superscript. \s-1ISO 10646\s0 defines the \fI\s-1NFKC\s0\fR
  7336. normalization scheme to convert all these into a standard form as
  7337. well, and \s-1GCC\s0 warns if your code is not in \s-1NFKC\s0 if you use
  7338. \&\fB\-Wnormalized=nfkc\fR. This warning is comparable to warning
  7339. about every identifier that contains the letter O because it might be
  7340. confused with the digit 0, and so is not the default, but may be
  7341. useful as a local coding convention if the programming environment
  7342. cannot be fixed to display these characters distinctly.
  7343. .IP "\fB\-Wno\-attribute\-warning\fR" 4
  7344. .IX Item "-Wno-attribute-warning"
  7345. Do not warn about usage of functions
  7346. declared with \f(CW\*(C`warning\*(C'\fR attribute. By default, this warning is
  7347. enabled. \fB\-Wno\-attribute\-warning\fR can be used to disable the
  7348. warning or \fB\-Wno\-error=attribute\-warning\fR can be used to
  7349. disable the error when compiled with \fB\-Werror\fR flag.
  7350. .IP "\fB\-Wno\-deprecated\fR" 4
  7351. .IX Item "-Wno-deprecated"
  7352. Do not warn about usage of deprecated features.
  7353. .IP "\fB\-Wno\-deprecated\-declarations\fR" 4
  7354. .IX Item "-Wno-deprecated-declarations"
  7355. Do not warn about uses of functions,
  7356. variables, and types marked as deprecated by using the \f(CW\*(C`deprecated\*(C'\fR
  7357. attribute.
  7358. .IP "\fB\-Wno\-overflow\fR" 4
  7359. .IX Item "-Wno-overflow"
  7360. Do not warn about compile-time overflow in constant expressions.
  7361. .IP "\fB\-Wno\-odr\fR" 4
  7362. .IX Item "-Wno-odr"
  7363. Warn about One Definition Rule violations during link-time optimization.
  7364. Enabled by default.
  7365. .IP "\fB\-Wopenmp\-simd\fR" 4
  7366. .IX Item "-Wopenmp-simd"
  7367. Warn if the vectorizer cost model overrides the OpenMP
  7368. simd directive set by user. The \fB\-fsimd\-cost\-model=unlimited\fR
  7369. option can be used to relax the cost model.
  7370. .IP "\fB\-Woverride\-init\fR (C and Objective-C only)" 4
  7371. .IX Item "-Woverride-init (C and Objective-C only)"
  7372. Warn if an initialized field without side effects is overridden when
  7373. using designated initializers.
  7374. .Sp
  7375. This warning is included in \fB\-Wextra\fR. To get other
  7376. \&\fB\-Wextra\fR warnings without this one, use \fB\-Wextra
  7377. \&\-Wno\-override\-init\fR.
  7378. .IP "\fB\-Wno\-override\-init\-side\-effects\fR (C and Objective-C only)" 4
  7379. .IX Item "-Wno-override-init-side-effects (C and Objective-C only)"
  7380. Do not warn if an initialized field with side effects is overridden when
  7381. using designated initializers. This warning is enabled by default.
  7382. .IP "\fB\-Wpacked\fR" 4
  7383. .IX Item "-Wpacked"
  7384. Warn if a structure is given the packed attribute, but the packed
  7385. attribute has no effect on the layout or size of the structure.
  7386. Such structures may be mis-aligned for little benefit. For
  7387. instance, in this code, the variable \f(CW\*(C`f.x\*(C'\fR in \f(CW\*(C`struct bar\*(C'\fR
  7388. is misaligned even though \f(CW\*(C`struct bar\*(C'\fR does not itself
  7389. have the packed attribute:
  7390. .Sp
  7391. .Vb 8
  7392. \& struct foo {
  7393. \& int x;
  7394. \& char a, b, c, d;
  7395. \& } _\|_attribute_\|_((packed));
  7396. \& struct bar {
  7397. \& char z;
  7398. \& struct foo f;
  7399. \& };
  7400. .Ve
  7401. .IP "\fB\-Wnopacked\-bitfield\-compat\fR" 4
  7402. .IX Item "-Wnopacked-bitfield-compat"
  7403. The 4.1, 4.2 and 4.3 series of \s-1GCC\s0 ignore the \f(CW\*(C`packed\*(C'\fR attribute
  7404. on bit-fields of type \f(CW\*(C`char\*(C'\fR. This was fixed in \s-1GCC 4.4\s0 but
  7405. the change can lead to differences in the structure layout. \s-1GCC\s0
  7406. informs you when the offset of such a field has changed in \s-1GCC 4.4.\s0
  7407. For example there is no longer a 4\-bit padding between field \f(CW\*(C`a\*(C'\fR
  7408. and \f(CW\*(C`b\*(C'\fR in this structure:
  7409. .Sp
  7410. .Vb 5
  7411. \& struct foo
  7412. \& {
  7413. \& char a:4;
  7414. \& char b:8;
  7415. \& } _\|_attribute_\|_ ((packed));
  7416. .Ve
  7417. .Sp
  7418. This warning is enabled by default. Use
  7419. \&\fB\-Wno\-packed\-bitfield\-compat\fR to disable this warning.
  7420. .IP "\fB\-Wpacked\-not\-aligned\fR (C, \*(C+, Objective-C and Objective\-\*(C+ only)" 4
  7421. .IX Item "-Wpacked-not-aligned (C, , Objective-C and Objective- only)"
  7422. Warn if a structure field with explicitly specified alignment in a
  7423. packed struct or union is misaligned. For example, a warning will
  7424. be issued on \f(CW\*(C`struct S\*(C'\fR, like, \f(CW\*(C`warning: alignment 1 of
  7425. \&\*(Aqstruct S\*(Aq is less than 8\*(C'\fR, in this code:
  7426. .Sp
  7427. .Vb 4
  7428. \& struct _\|_attribute_\|_ ((aligned (8))) S8 { char a[8]; };
  7429. \& struct _\|_attribute_\|_ ((packed)) S {
  7430. \& struct S8 s8;
  7431. \& };
  7432. .Ve
  7433. .Sp
  7434. This warning is enabled by \fB\-Wall\fR.
  7435. .IP "\fB\-Wpadded\fR" 4
  7436. .IX Item "-Wpadded"
  7437. Warn if padding is included in a structure, either to align an element
  7438. of the structure or to align the whole structure. Sometimes when this
  7439. happens it is possible to rearrange the fields of the structure to
  7440. reduce the padding and so make the structure smaller.
  7441. .IP "\fB\-Wredundant\-decls\fR" 4
  7442. .IX Item "-Wredundant-decls"
  7443. Warn if anything is declared more than once in the same scope, even in
  7444. cases where multiple declaration is valid and changes nothing.
  7445. .IP "\fB\-Wrestrict\fR" 4
  7446. .IX Item "-Wrestrict"
  7447. Warn when an object referenced by a \f(CW\*(C`restrict\*(C'\fR\-qualified parameter
  7448. (or, in \*(C+, a \f(CW\*(C`_\|_restrict\*(C'\fR\-qualified parameter) is aliased by another
  7449. argument, or when copies between such objects overlap. For example,
  7450. the call to the \f(CW\*(C`strcpy\*(C'\fR function below attempts to truncate the string
  7451. by replacing its initial characters with the last four. However, because
  7452. the call writes the terminating \s-1NUL\s0 into \f(CW\*(C`a[4]\*(C'\fR, the copies overlap and
  7453. the call is diagnosed.
  7454. .Sp
  7455. .Vb 6
  7456. \& void foo (void)
  7457. \& {
  7458. \& char a[] = "abcd1234";
  7459. \& strcpy (a, a + 4);
  7460. \& ...
  7461. \& }
  7462. .Ve
  7463. .Sp
  7464. The \fB\-Wrestrict\fR option detects some instances of simple overlap
  7465. even without optimization but works best at \fB\-O2\fR and above. It
  7466. is included in \fB\-Wall\fR.
  7467. .IP "\fB\-Wnested\-externs\fR (C and Objective-C only)" 4
  7468. .IX Item "-Wnested-externs (C and Objective-C only)"
  7469. Warn if an \f(CW\*(C`extern\*(C'\fR declaration is encountered within a function.
  7470. .IP "\fB\-Winline\fR" 4
  7471. .IX Item "-Winline"
  7472. Warn if a function that is declared as inline cannot be inlined.
  7473. Even with this option, the compiler does not warn about failures to
  7474. inline functions declared in system headers.
  7475. .Sp
  7476. The compiler uses a variety of heuristics to determine whether or not
  7477. to inline a function. For example, the compiler takes into account
  7478. the size of the function being inlined and the amount of inlining
  7479. that has already been done in the current function. Therefore,
  7480. seemingly insignificant changes in the source program can cause the
  7481. warnings produced by \fB\-Winline\fR to appear or disappear.
  7482. .IP "\fB\-Wint\-in\-bool\-context\fR" 4
  7483. .IX Item "-Wint-in-bool-context"
  7484. Warn for suspicious use of integer values where boolean values are expected,
  7485. such as conditional expressions (?:) using non-boolean integer constants in
  7486. boolean context, like \f(CW\*(C`if (a <= b ? 2 : 3)\*(C'\fR. Or left shifting of signed
  7487. integers in boolean context, like \f(CW\*(C`for (a = 0; 1 << a; a++);\*(C'\fR. Likewise
  7488. for all kinds of multiplications regardless of the data type.
  7489. This warning is enabled by \fB\-Wall\fR.
  7490. .IP "\fB\-Wno\-int\-to\-pointer\-cast\fR" 4
  7491. .IX Item "-Wno-int-to-pointer-cast"
  7492. Suppress warnings from casts to pointer type of an integer of a
  7493. different size. In \*(C+, casting to a pointer type of smaller size is
  7494. an error. \fBWint-to-pointer-cast\fR is enabled by default.
  7495. .IP "\fB\-Wno\-pointer\-to\-int\-cast\fR (C and Objective-C only)" 4
  7496. .IX Item "-Wno-pointer-to-int-cast (C and Objective-C only)"
  7497. Suppress warnings from casts from a pointer to an integer type of a
  7498. different size.
  7499. .IP "\fB\-Winvalid\-pch\fR" 4
  7500. .IX Item "-Winvalid-pch"
  7501. Warn if a precompiled header is found in
  7502. the search path but cannot be used.
  7503. .IP "\fB\-Wlong\-long\fR" 4
  7504. .IX Item "-Wlong-long"
  7505. Warn if \f(CW\*(C`long long\*(C'\fR type is used. This is enabled by either
  7506. \&\fB\-Wpedantic\fR or \fB\-Wtraditional\fR in \s-1ISO C90\s0 and \*(C+98
  7507. modes. To inhibit the warning messages, use \fB\-Wno\-long\-long\fR.
  7508. .IP "\fB\-Wvariadic\-macros\fR" 4
  7509. .IX Item "-Wvariadic-macros"
  7510. Warn if variadic macros are used in \s-1ISO C90\s0 mode, or if the \s-1GNU\s0
  7511. alternate syntax is used in \s-1ISO C99\s0 mode. This is enabled by either
  7512. \&\fB\-Wpedantic\fR or \fB\-Wtraditional\fR. To inhibit the warning
  7513. messages, use \fB\-Wno\-variadic\-macros\fR.
  7514. .IP "\fB\-Wno\-varargs\fR" 4
  7515. .IX Item "-Wno-varargs"
  7516. Do not warn upon questionable usage of the macros used to handle variable
  7517. arguments like \f(CW\*(C`va_start\*(C'\fR. These warnings are enabled by default.
  7518. .IP "\fB\-Wvector\-operation\-performance\fR" 4
  7519. .IX Item "-Wvector-operation-performance"
  7520. Warn if vector operation is not implemented via \s-1SIMD\s0 capabilities of the
  7521. architecture. Mainly useful for the performance tuning.
  7522. Vector operation can be implemented \f(CW\*(C`piecewise\*(C'\fR, which means that the
  7523. scalar operation is performed on every vector element;
  7524. \&\f(CW\*(C`in parallel\*(C'\fR, which means that the vector operation is implemented
  7525. using scalars of wider type, which normally is more performance efficient;
  7526. and \f(CW\*(C`as a single scalar\*(C'\fR, which means that vector fits into a
  7527. scalar type.
  7528. .IP "\fB\-Wvla\fR" 4
  7529. .IX Item "-Wvla"
  7530. Warn if a variable-length array is used in the code.
  7531. \&\fB\-Wno\-vla\fR prevents the \fB\-Wpedantic\fR warning of
  7532. the variable-length array.
  7533. .IP "\fB\-Wvla\-larger\-than=\fR\fIbyte-size\fR" 4
  7534. .IX Item "-Wvla-larger-than=byte-size"
  7535. If this option is used, the compiler warns for declarations of
  7536. variable-length arrays whose size is either unbounded, or bounded
  7537. by an argument that allows the array size to exceed \fIbyte-size\fR
  7538. bytes. This is similar to how \fB\-Walloca\-larger\-than=\fR\fIbyte-size\fR
  7539. works, but with variable-length arrays.
  7540. .Sp
  7541. Note that \s-1GCC\s0 may optimize small variable-length arrays of a known
  7542. value into plain arrays, so this warning may not get triggered for
  7543. such arrays.
  7544. .Sp
  7545. \&\fB\-Wvla\-larger\-than=\fR\fB\s-1PTRDIFF_MAX\s0\fR is enabled by default but
  7546. is typically only effective when \fB\-ftree\-vrp\fR is active (default
  7547. for \fB\-O2\fR and above).
  7548. .Sp
  7549. See also \fB\-Walloca\-larger\-than=\fR\fIbyte-size\fR.
  7550. .IP "\fB\-Wno\-vla\-larger\-than\fR" 4
  7551. .IX Item "-Wno-vla-larger-than"
  7552. Disable \fB\-Wvla\-larger\-than=\fR warnings. The option is equivalent
  7553. to \fB\-Wvla\-larger\-than=\fR\fB\s-1SIZE_MAX\s0\fR or larger.
  7554. .IP "\fB\-Wvolatile\-register\-var\fR" 4
  7555. .IX Item "-Wvolatile-register-var"
  7556. Warn if a register variable is declared volatile. The volatile
  7557. modifier does not inhibit all optimizations that may eliminate reads
  7558. and/or writes to register variables. This warning is enabled by
  7559. \&\fB\-Wall\fR.
  7560. .IP "\fB\-Wdisabled\-optimization\fR" 4
  7561. .IX Item "-Wdisabled-optimization"
  7562. Warn if a requested optimization pass is disabled. This warning does
  7563. not generally indicate that there is anything wrong with your code; it
  7564. merely indicates that \s-1GCC\s0's optimizers are unable to handle the code
  7565. effectively. Often, the problem is that your code is too big or too
  7566. complex; \s-1GCC\s0 refuses to optimize programs when the optimization
  7567. itself is likely to take inordinate amounts of time.
  7568. .IP "\fB\-Wpointer\-sign\fR (C and Objective-C only)" 4
  7569. .IX Item "-Wpointer-sign (C and Objective-C only)"
  7570. Warn for pointer argument passing or assignment with different signedness.
  7571. This option is only supported for C and Objective-C. It is implied by
  7572. \&\fB\-Wall\fR and by \fB\-Wpedantic\fR, which can be disabled with
  7573. \&\fB\-Wno\-pointer\-sign\fR.
  7574. .IP "\fB\-Wstack\-protector\fR" 4
  7575. .IX Item "-Wstack-protector"
  7576. This option is only active when \fB\-fstack\-protector\fR is active. It
  7577. warns about functions that are not protected against stack smashing.
  7578. .IP "\fB\-Woverlength\-strings\fR" 4
  7579. .IX Item "-Woverlength-strings"
  7580. Warn about string constants that are longer than the \*(L"minimum
  7581. maximum\*(R" length specified in the C standard. Modern compilers
  7582. generally allow string constants that are much longer than the
  7583. standard's minimum limit, but very portable programs should avoid
  7584. using longer strings.
  7585. .Sp
  7586. The limit applies \fIafter\fR string constant concatenation, and does
  7587. not count the trailing \s-1NUL. \s0 In C90, the limit was 509 characters; in
  7588. C99, it was raised to 4095. \*(C+98 does not specify a normative
  7589. minimum maximum, so we do not diagnose overlength strings in \*(C+.
  7590. .Sp
  7591. This option is implied by \fB\-Wpedantic\fR, and can be disabled with
  7592. \&\fB\-Wno\-overlength\-strings\fR.
  7593. .IP "\fB\-Wunsuffixed\-float\-constants\fR (C and Objective-C only)" 4
  7594. .IX Item "-Wunsuffixed-float-constants (C and Objective-C only)"
  7595. Issue a warning for any floating constant that does not have
  7596. a suffix. When used together with \fB\-Wsystem\-headers\fR it
  7597. warns about such constants in system header files. This can be useful
  7598. when preparing code to use with the \f(CW\*(C`FLOAT_CONST_DECIMAL64\*(C'\fR pragma
  7599. from the decimal floating-point extension to C99.
  7600. .IP "\fB\-Wno\-lto\-type\-mismatch\fR" 4
  7601. .IX Item "-Wno-lto-type-mismatch"
  7602. During the link-time optimization, do not warn about type mismatches in
  7603. global declarations from different compilation units.
  7604. Requires \fB\-flto\fR to be enabled. Enabled by default.
  7605. .IP "\fB\-Wno\-designated\-init\fR (C and Objective-C only)" 4
  7606. .IX Item "-Wno-designated-init (C and Objective-C only)"
  7607. Suppress warnings when a positional initializer is used to initialize
  7608. a structure that has been marked with the \f(CW\*(C`designated_init\*(C'\fR
  7609. attribute.
  7610. .IP "\fB\-Wno\-hsa\fR" 4
  7611. .IX Item "-Wno-hsa"
  7612. Do not warn when \s-1HSAIL\s0 cannot be emitted for the compiled function or
  7613. OpenMP construct. These warnings are enabled by default.
  7614. .SS "Options That Control Static Analysis"
  7615. .IX Subsection "Options That Control Static Analysis"
  7616. .IP "\fB\-fanalyzer\fR" 4
  7617. .IX Item "-fanalyzer"
  7618. This option enables an static analysis of program flow which looks
  7619. for \*(L"interesting\*(R" interprocedural paths through the
  7620. code, and issues warnings for problems found on them.
  7621. .Sp
  7622. This analysis is much more expensive than other \s-1GCC\s0 warnings.
  7623. .Sp
  7624. Enabling this option effectively enables the following warnings:
  7625. .Sp
  7626. \&\fB\-Wanalyzer\-double\-fclose
  7627. \&\-Wanalyzer\-double\-free
  7628. \&\-Wanalyzer\-exposure\-through\-output\-file
  7629. \&\-Wanalyzer\-file\-leak
  7630. \&\-Wanalyzer\-free\-of\-non\-heap
  7631. \&\-Wanalyzer\-malloc\-leak
  7632. \&\-Wanalyzer\-possible\-null\-argument
  7633. \&\-Wanalyzer\-possible\-null\-dereference
  7634. \&\-Wanalyzer\-null\-argument
  7635. \&\-Wanalyzer\-null\-dereference
  7636. \&\-Wanalyzer\-stale\-setjmp\-buffer
  7637. \&\-Wanalyzer\-tainted\-array\-index
  7638. \&\-Wanalyzer\-unsafe\-call\-within\-signal\-handler
  7639. \&\-Wanalyzer\-use\-after\-free
  7640. \&\-Wanalyzer\-use\-of\-pointer\-in\-stale\-stack\-frame\fR
  7641. .Sp
  7642. This option is only available if \s-1GCC\s0 was configured with analyzer
  7643. support enabled.
  7644. .IP "\fB\-Wanalyzer\-too\-complex\fR" 4
  7645. .IX Item "-Wanalyzer-too-complex"
  7646. If \fB\-fanalyzer\fR is enabled, the analyzer uses various heuristics
  7647. to attempt to explore the control flow and data flow in the program,
  7648. but these can be defeated by sufficiently complicated code.
  7649. .Sp
  7650. By default, the analysis silently stops if the code is too
  7651. complicated for the analyzer to fully explore and it reaches an internal
  7652. limit. The \fB\-Wanalyzer\-too\-complex\fR option warns if this occurs.
  7653. .IP "\fB\-Wno\-analyzer\-double\-fclose\fR" 4
  7654. .IX Item "-Wno-analyzer-double-fclose"
  7655. This warning requires \fB\-fanalyzer\fR, which enables it; use
  7656. \&\fB\-Wno\-analyzer\-double\-fclose\fR to disable it.
  7657. .Sp
  7658. This diagnostic warns for paths through the code in which a \f(CW\*(C`FILE *\*(C'\fR
  7659. can have \f(CW\*(C`fclose\*(C'\fR called on it more than once.
  7660. .IP "\fB\-Wno\-analyzer\-double\-free\fR" 4
  7661. .IX Item "-Wno-analyzer-double-free"
  7662. This warning requires \fB\-fanalyzer\fR, which enables it; use
  7663. \&\fB\-Wno\-analyzer\-double\-free\fR to disable it.
  7664. .Sp
  7665. This diagnostic warns for paths through the code in which a pointer
  7666. can have \f(CW\*(C`free\*(C'\fR called on it more than once.
  7667. .IP "\fB\-Wno\-analyzer\-exposure\-through\-output\-file\fR" 4
  7668. .IX Item "-Wno-analyzer-exposure-through-output-file"
  7669. This warning requires \fB\-fanalyzer\fR, which enables it; use
  7670. \&\fB\-Wno\-analyzer\-exposure\-through\-output\-file\fR
  7671. to disable it.
  7672. .Sp
  7673. This diagnostic warns for paths through the code in which a
  7674. security-sensitive value is written to an output file
  7675. (such as writing a password to a log file).
  7676. .IP "\fB\-Wno\-analyzer\-file\-leak\fR" 4
  7677. .IX Item "-Wno-analyzer-file-leak"
  7678. This warning requires \fB\-fanalyzer\fR, which enables it; use
  7679. \&\fB\-Wno\-analyzer\-file\-leak\fR
  7680. to disable it.
  7681. .Sp
  7682. This diagnostic warns for paths through the code in which a
  7683. \&\f(CW\*(C`<stdio.h>\*(C'\fR \f(CW\*(C`FILE *\*(C'\fR stream object is leaked.
  7684. .IP "\fB\-Wno\-analyzer\-free\-of\-non\-heap\fR" 4
  7685. .IX Item "-Wno-analyzer-free-of-non-heap"
  7686. This warning requires \fB\-fanalyzer\fR, which enables it; use
  7687. \&\fB\-Wno\-analyzer\-free\-of\-non\-heap\fR
  7688. to disable it.
  7689. .Sp
  7690. This diagnostic warns for paths through the code in which \f(CW\*(C`free\*(C'\fR
  7691. is called on a non-heap pointer (e.g. an on-stack buffer, or a global).
  7692. .IP "\fB\-Wno\-analyzer\-malloc\-leak\fR" 4
  7693. .IX Item "-Wno-analyzer-malloc-leak"
  7694. This warning requires \fB\-fanalyzer\fR, which enables it; use
  7695. \&\fB\-Wno\-analyzer\-malloc\-leak\fR
  7696. to disable it.
  7697. .Sp
  7698. This diagnostic warns for paths through the code in which a
  7699. pointer allocated via \f(CW\*(C`malloc\*(C'\fR is leaked.
  7700. .IP "\fB\-Wno\-analyzer\-possible\-null\-argument\fR" 4
  7701. .IX Item "-Wno-analyzer-possible-null-argument"
  7702. This warning requires \fB\-fanalyzer\fR, which enables it; use
  7703. \&\fB\-Wno\-analyzer\-possible\-null\-argument\fR to disable it.
  7704. .Sp
  7705. This diagnostic warns for paths through the code in which a
  7706. possibly-NULL value is passed to a function argument marked
  7707. with \f(CW\*(C`_\|_attribute_\|_((nonnull))\*(C'\fR as requiring a non-NULL
  7708. value.
  7709. .IP "\fB\-Wno\-analyzer\-possible\-null\-dereference\fR" 4
  7710. .IX Item "-Wno-analyzer-possible-null-dereference"
  7711. This warning requires \fB\-fanalyzer\fR, which enables it; use
  7712. \&\fB\-Wno\-analyzer\-possible\-null\-dereference\fR to disable it.
  7713. .Sp
  7714. This diagnostic warns for paths through the code in which a
  7715. possibly-NULL value is dereferenced.
  7716. .IP "\fB\-Wno\-analyzer\-null\-argument\fR" 4
  7717. .IX Item "-Wno-analyzer-null-argument"
  7718. This warning requires \fB\-fanalyzer\fR, which enables it; use
  7719. \&\fB\-Wno\-analyzer\-null\-argument\fR to disable it.
  7720. .Sp
  7721. This diagnostic warns for paths through the code in which a
  7722. value known to be \s-1NULL\s0 is passed to a function argument marked
  7723. with \f(CW\*(C`_\|_attribute_\|_((nonnull))\*(C'\fR as requiring a non-NULL
  7724. value.
  7725. .IP "\fB\-Wno\-analyzer\-null\-dereference\fR" 4
  7726. .IX Item "-Wno-analyzer-null-dereference"
  7727. This warning requires \fB\-fanalyzer\fR, which enables it; use
  7728. \&\fB\-Wno\-analyzer\-null\-dereference\fR to disable it.
  7729. .Sp
  7730. This diagnostic warns for paths through the code in which a
  7731. value known to be \s-1NULL\s0 is dereferenced.
  7732. .IP "\fB\-Wno\-analyzer\-stale\-setjmp\-buffer\fR" 4
  7733. .IX Item "-Wno-analyzer-stale-setjmp-buffer"
  7734. This warning requires \fB\-fanalyzer\fR, which enables it; use
  7735. \&\fB\-Wno\-analyzer\-stale\-setjmp\-buffer\fR to disable it.
  7736. .Sp
  7737. This diagnostic warns for paths through the code in which
  7738. \&\f(CW\*(C`longjmp\*(C'\fR is called to rewind to a \f(CW\*(C`jmp_buf\*(C'\fR relating
  7739. to a \f(CW\*(C`setjmp\*(C'\fR call in a function that has returned.
  7740. .Sp
  7741. When \f(CW\*(C`setjmp\*(C'\fR is called on a \f(CW\*(C`jmp_buf\*(C'\fR to record a rewind
  7742. location, it records the stack frame. The stack frame becomes invalid
  7743. when the function containing the \f(CW\*(C`setjmp\*(C'\fR call returns. Attempting
  7744. to rewind to it via \f(CW\*(C`longjmp\*(C'\fR would reference a stack frame that
  7745. no longer exists, and likely lead to a crash (or worse).
  7746. .IP "\fB\-Wno\-analyzer\-tainted\-array\-index\fR" 4
  7747. .IX Item "-Wno-analyzer-tainted-array-index"
  7748. This warning requires both \fB\-fanalyzer\fR and
  7749. \&\fB\-fanalyzer\-checker=taint\fR to enable it;
  7750. use \fB\-Wno\-analyzer\-tainted\-array\-index\fR to disable it.
  7751. .Sp
  7752. This diagnostic warns for paths through the code in which a value
  7753. that could be under an attacker's control is used as the index
  7754. of an array access without being sanitized.
  7755. .IP "\fB\-Wno\-analyzer\-unsafe\-call\-within\-signal\-handler\fR" 4
  7756. .IX Item "-Wno-analyzer-unsafe-call-within-signal-handler"
  7757. This warning requires \fB\-fanalyzer\fR, which enables it; use
  7758. \&\fB\-Wno\-analyzer\-unsafe\-call\-within\-signal\-handler\fR to disable it.
  7759. .Sp
  7760. This diagnostic warns for paths through the code in which a
  7761. function known to be async-signal-unsafe (such as \f(CW\*(C`fprintf\*(C'\fR) is
  7762. called from a signal handler.
  7763. .IP "\fB\-Wno\-analyzer\-use\-after\-free\fR" 4
  7764. .IX Item "-Wno-analyzer-use-after-free"
  7765. This warning requires \fB\-fanalyzer\fR, which enables it; use
  7766. \&\fB\-Wno\-analyzer\-use\-after\-free\fR to disable it.
  7767. .Sp
  7768. This diagnostic warns for paths through the code in which a
  7769. pointer is used after \f(CW\*(C`free\*(C'\fR is called on it.
  7770. .IP "\fB\-Wno\-analyzer\-use\-of\-pointer\-in\-stale\-stack\-frame\fR" 4
  7771. .IX Item "-Wno-analyzer-use-of-pointer-in-stale-stack-frame"
  7772. This warning requires \fB\-fanalyzer\fR, which enables it; use
  7773. \&\fB\-Wno\-analyzer\-use\-of\-pointer\-in\-stale\-stack\-frame\fR
  7774. to disable it.
  7775. .Sp
  7776. This diagnostic warns for paths through the code in which a pointer
  7777. is dereferenced that points to a variable in a stale stack frame.
  7778. .PP
  7779. Pertinent parameters for controlling the exploration are:
  7780. \&\fB\-\-param analyzer\-bb\-explosion\-factor=\fR\fIvalue\fR,
  7781. \&\fB\-\-param analyzer\-max\-enodes\-per\-program\-point=\fR\fIvalue\fR,
  7782. \&\fB\-\-param analyzer\-max\-recursion\-depth=\fR\fIvalue\fR, and
  7783. \&\fB\-\-param analyzer\-min\-snodes\-for\-call\-summary=\fR\fIvalue\fR.
  7784. .PP
  7785. The following options control the analyzer.
  7786. .IP "\fB\-fanalyzer\-call\-summaries\fR" 4
  7787. .IX Item "-fanalyzer-call-summaries"
  7788. Simplify interprocedural analysis by computing the effect of certain calls,
  7789. rather than exploring all paths through the function from callsite to each
  7790. possible return.
  7791. .Sp
  7792. If enabled, call summaries are only used for functions with more than one
  7793. call site, and that are sufficiently complicated (as per
  7794. \&\fB\-\-param analyzer\-min\-snodes\-for\-call\-summary=\fR\fIvalue\fR).
  7795. .IP "\fB\-fanalyzer\-checker=\fR\fIname\fR" 4
  7796. .IX Item "-fanalyzer-checker=name"
  7797. Restrict the analyzer to run just the named checker, and enable it.
  7798. .Sp
  7799. Some checkers are disabled by default (even with \fB\-fanalyzer\fR),
  7800. such as the \f(CW\*(C`taint\*(C'\fR checker that implements
  7801. \&\fB\-Wanalyzer\-tainted\-array\-index\fR, and this option is required
  7802. to enable them.
  7803. .IP "\fB\-fanalyzer\-fine\-grained\fR" 4
  7804. .IX Item "-fanalyzer-fine-grained"
  7805. This option is intended for analyzer developers.
  7806. .Sp
  7807. Internally the analyzer builds an \*(L"exploded graph\*(R" that combines
  7808. control flow graphs with data flow information.
  7809. .Sp
  7810. By default, an edge in this graph can contain the effects of a run
  7811. of multiple statements within a basic block. With
  7812. \&\fB\-fanalyzer\-fine\-grained\fR, each statement gets its own edge.
  7813. .IP "\fB\-fanalyzer\-show\-duplicate\-count\fR" 4
  7814. .IX Item "-fanalyzer-show-duplicate-count"
  7815. This option is intended for analyzer developers: if multiple diagnostics
  7816. have been detected as being duplicates of each other, it emits a note when
  7817. reporting the best diagnostic, giving the number of additional diagnostics
  7818. that were suppressed by the deduplication logic.
  7819. .IP "\fB\-fno\-analyzer\-state\-merge\fR" 4
  7820. .IX Item "-fno-analyzer-state-merge"
  7821. This option is intended for analyzer developers.
  7822. .Sp
  7823. By default the analyzer attempts to simplify analysis by merging
  7824. sufficiently similar states at each program point as it builds its
  7825. \&\*(L"exploded graph\*(R". With \fB\-fno\-analyzer\-state\-merge\fR this
  7826. merging can be suppressed, for debugging state-handling issues.
  7827. .IP "\fB\-fno\-analyzer\-state\-purge\fR" 4
  7828. .IX Item "-fno-analyzer-state-purge"
  7829. This option is intended for analyzer developers.
  7830. .Sp
  7831. By default the analyzer attempts to simplify analysis by purging
  7832. aspects of state at a program point that appear to no longer be relevant
  7833. e.g. the values of locals that aren't accessed later in the function
  7834. and which aren't relevant to leak analysis.
  7835. .Sp
  7836. With \fB\-fno\-analyzer\-state\-purge\fR this purging of state can
  7837. be suppressed, for debugging state-handling issues.
  7838. .IP "\fB\-fanalyzer\-transitivity\fR" 4
  7839. .IX Item "-fanalyzer-transitivity"
  7840. This option enables transitivity of constraints within the analyzer.
  7841. .IP "\fB\-fanalyzer\-verbose\-edges\fR" 4
  7842. .IX Item "-fanalyzer-verbose-edges"
  7843. This option is intended for analyzer developers. It enables more
  7844. verbose, lower-level detail in the descriptions of control flow
  7845. within diagnostic paths.
  7846. .IP "\fB\-fanalyzer\-verbose\-state\-changes\fR" 4
  7847. .IX Item "-fanalyzer-verbose-state-changes"
  7848. This option is intended for analyzer developers. It enables more
  7849. verbose, lower-level detail in the descriptions of events relating
  7850. to state machines within diagnostic paths.
  7851. .IP "\fB\-fanalyzer\-verbosity=\fR\fIlevel\fR" 4
  7852. .IX Item "-fanalyzer-verbosity=level"
  7853. This option controls the complexity of the control flow paths that are
  7854. emitted for analyzer diagnostics.
  7855. .Sp
  7856. The \fIlevel\fR can be one of:
  7857. .RS 4
  7858. .IP "\fB0\fR" 4
  7859. .IX Item "0"
  7860. At this level, interprocedural call and return events are displayed,
  7861. along with the most pertinent state-change events relating to
  7862. a diagnostic. For example, for a double\-\f(CW\*(C`free\*(C'\fR diagnostic,
  7863. both calls to \f(CW\*(C`free\*(C'\fR will be shown.
  7864. .IP "\fB1\fR" 4
  7865. .IX Item "1"
  7866. As per the previous level, but also show events for the entry
  7867. to each function.
  7868. .IP "\fB2\fR" 4
  7869. .IX Item "2"
  7870. As per the previous level, but also show events relating to
  7871. control flow that are significant to triggering the issue
  7872. (e.g. \*(L"true path taken\*(R" at a conditional).
  7873. .Sp
  7874. This level is the default.
  7875. .IP "\fB3\fR" 4
  7876. .IX Item "3"
  7877. As per the previous level, but show all control flow events, not
  7878. just significant ones.
  7879. .IP "\fB4\fR" 4
  7880. .IX Item "4"
  7881. This level is intended for analyzer developers; it adds various
  7882. other events intended for debugging the analyzer.
  7883. .RE
  7884. .RS 4
  7885. .RE
  7886. .IP "\fB\-fdump\-analyzer\fR" 4
  7887. .IX Item "-fdump-analyzer"
  7888. Dump internal details about what the analyzer is doing to
  7889. \&\fI\fIfile\fI.analyzer.txt\fR.
  7890. This option is overridden by \fB\-fdump\-analyzer\-stderr\fR.
  7891. .IP "\fB\-fdump\-analyzer\-stderr\fR" 4
  7892. .IX Item "-fdump-analyzer-stderr"
  7893. Dump internal details about what the analyzer is doing to stderr.
  7894. This option overrides \fB\-fdump\-analyzer\fR.
  7895. .IP "\fB\-fdump\-analyzer\-callgraph\fR" 4
  7896. .IX Item "-fdump-analyzer-callgraph"
  7897. Dump a representation of the call graph suitable for viewing with
  7898. GraphViz to \fI\fIfile\fI.callgraph.dot\fR.
  7899. .IP "\fB\-fdump\-analyzer\-exploded\-graph\fR" 4
  7900. .IX Item "-fdump-analyzer-exploded-graph"
  7901. Dump a representation of the \*(L"exploded graph\*(R" suitable for viewing with
  7902. GraphViz to \fI\fIfile\fI.eg.dot\fR.
  7903. Nodes are color-coded based on state-machine states to emphasize
  7904. state changes.
  7905. .IP "\fB\-fdump\-analyzer\-exploded\-nodes\fR" 4
  7906. .IX Item "-fdump-analyzer-exploded-nodes"
  7907. Emit diagnostics showing where nodes in the \*(L"exploded graph\*(R" are
  7908. in relation to the program source.
  7909. .IP "\fB\-fdump\-analyzer\-exploded\-nodes\-2\fR" 4
  7910. .IX Item "-fdump-analyzer-exploded-nodes-2"
  7911. Dump a textual representation of the \*(L"exploded graph\*(R" to
  7912. \&\fI\fIfile\fI.eg.txt\fR.
  7913. .IP "\fB\-fdump\-analyzer\-exploded\-nodes\-3\fR" 4
  7914. .IX Item "-fdump-analyzer-exploded-nodes-3"
  7915. Dump a textual representation of the \*(L"exploded graph\*(R" to
  7916. one dump file per node, to \fI\fIfile\fI.eg\-\fIid\fI.txt\fR.
  7917. This is typically a large number of dump files.
  7918. .IP "\fB\-fdump\-analyzer\-state\-purge\fR" 4
  7919. .IX Item "-fdump-analyzer-state-purge"
  7920. As per \fB\-fdump\-analyzer\-supergraph\fR, dump a representation of the
  7921. \&\*(L"supergraph\*(R" suitable for viewing with GraphViz, but annotate the
  7922. graph with information on what state will be purged at each node.
  7923. The graph is written to \fI\fIfile\fI.state\-purge.dot\fR.
  7924. .IP "\fB\-fdump\-analyzer\-supergraph\fR" 4
  7925. .IX Item "-fdump-analyzer-supergraph"
  7926. Dump representations of the \*(L"supergraph\*(R" suitable for viewing with
  7927. GraphViz to \fI\fIfile\fI.supergraph.dot\fR and to
  7928. \&\fI\fIfile\fI.supergraph\-eg.dot\fR. These show all of the
  7929. control flow graphs in the program, with interprocedural edges for
  7930. calls and returns. The second dump contains annotations showing nodes
  7931. in the \*(L"exploded graph\*(R" and diagnostics associated with them.
  7932. .SS "Options for Debugging Your Program"
  7933. .IX Subsection "Options for Debugging Your Program"
  7934. To tell \s-1GCC\s0 to emit extra information for use by a debugger, in almost
  7935. all cases you need only to add \fB\-g\fR to your other options.
  7936. .PP
  7937. \&\s-1GCC\s0 allows you to use \fB\-g\fR with
  7938. \&\fB\-O\fR. The shortcuts taken by optimized code may occasionally
  7939. be surprising: some variables you declared may not exist
  7940. at all; flow of control may briefly move where you did not expect it;
  7941. some statements may not be executed because they compute constant
  7942. results or their values are already at hand; some statements may
  7943. execute in different places because they have been moved out of loops.
  7944. Nevertheless it is possible to debug optimized output. This makes
  7945. it reasonable to use the optimizer for programs that might have bugs.
  7946. .PP
  7947. If you are not using some other optimization option, consider
  7948. using \fB\-Og\fR with \fB\-g\fR.
  7949. With no \fB\-O\fR option at all, some compiler passes that collect
  7950. information useful for debugging do not run at all, so that
  7951. \&\fB\-Og\fR may result in a better debugging experience.
  7952. .IP "\fB\-g\fR" 4
  7953. .IX Item "-g"
  7954. Produce debugging information in the operating system's native format
  7955. (stabs, \s-1COFF, XCOFF,\s0 or \s-1DWARF\s0). \s-1GDB\s0 can work with this debugging
  7956. information.
  7957. .Sp
  7958. On most systems that use stabs format, \fB\-g\fR enables use of extra
  7959. debugging information that only \s-1GDB\s0 can use; this extra information
  7960. makes debugging work better in \s-1GDB\s0 but probably makes other debuggers
  7961. crash or
  7962. refuse to read the program. If you want to control for certain whether
  7963. to generate the extra information, use \fB\-gstabs+\fR, \fB\-gstabs\fR,
  7964. \&\fB\-gxcoff+\fR, \fB\-gxcoff\fR, or \fB\-gvms\fR (see below).
  7965. .IP "\fB\-ggdb\fR" 4
  7966. .IX Item "-ggdb"
  7967. Produce debugging information for use by \s-1GDB. \s0 This means to use the
  7968. most expressive format available (\s-1DWARF,\s0 stabs, or the native format
  7969. if neither of those are supported), including \s-1GDB\s0 extensions if at all
  7970. possible.
  7971. .IP "\fB\-gdwarf\fR" 4
  7972. .IX Item "-gdwarf"
  7973. .PD 0
  7974. .IP "\fB\-gdwarf\-\fR\fIversion\fR" 4
  7975. .IX Item "-gdwarf-version"
  7976. .PD
  7977. Produce debugging information in \s-1DWARF\s0 format (if that is supported).
  7978. The value of \fIversion\fR may be either 2, 3, 4 or 5; the default version
  7979. for most targets is 4. \s-1DWARF\s0 Version 5 is only experimental.
  7980. .Sp
  7981. Note that with \s-1DWARF\s0 Version 2, some ports require and always
  7982. use some non-conflicting \s-1DWARF 3\s0 extensions in the unwind tables.
  7983. .Sp
  7984. Version 4 may require \s-1GDB 7.0\s0 and \fB\-fvar\-tracking\-assignments\fR
  7985. for maximum benefit.
  7986. .Sp
  7987. \&\s-1GCC\s0 no longer supports \s-1DWARF\s0 Version 1, which is substantially
  7988. different than Version 2 and later. For historical reasons, some
  7989. other DWARF-related options such as
  7990. \&\fB\-fno\-dwarf2\-cfi\-asm\fR) retain a reference to \s-1DWARF\s0 Version 2
  7991. in their names, but apply to all currently-supported versions of \s-1DWARF.\s0
  7992. .IP "\fB\-gstabs\fR" 4
  7993. .IX Item "-gstabs"
  7994. Produce debugging information in stabs format (if that is supported),
  7995. without \s-1GDB\s0 extensions. This is the format used by \s-1DBX\s0 on most \s-1BSD\s0
  7996. systems. On \s-1MIPS,\s0 Alpha and System V Release 4 systems this option
  7997. produces stabs debugging output that is not understood by \s-1DBX.\s0
  7998. On System V Release 4 systems this option requires the \s-1GNU\s0 assembler.
  7999. .IP "\fB\-gstabs+\fR" 4
  8000. .IX Item "-gstabs+"
  8001. Produce debugging information in stabs format (if that is supported),
  8002. using \s-1GNU\s0 extensions understood only by the \s-1GNU\s0 debugger (\s-1GDB\s0). The
  8003. use of these extensions is likely to make other debuggers crash or
  8004. refuse to read the program.
  8005. .IP "\fB\-gxcoff\fR" 4
  8006. .IX Item "-gxcoff"
  8007. Produce debugging information in \s-1XCOFF\s0 format (if that is supported).
  8008. This is the format used by the \s-1DBX\s0 debugger on \s-1IBM RS/6000\s0 systems.
  8009. .IP "\fB\-gxcoff+\fR" 4
  8010. .IX Item "-gxcoff+"
  8011. Produce debugging information in \s-1XCOFF\s0 format (if that is supported),
  8012. using \s-1GNU\s0 extensions understood only by the \s-1GNU\s0 debugger (\s-1GDB\s0). The
  8013. use of these extensions is likely to make other debuggers crash or
  8014. refuse to read the program, and may cause assemblers other than the \s-1GNU\s0
  8015. assembler (\s-1GAS\s0) to fail with an error.
  8016. .IP "\fB\-gvms\fR" 4
  8017. .IX Item "-gvms"
  8018. Produce debugging information in Alpha/VMS debug format (if that is
  8019. supported). This is the format used by \s-1DEBUG\s0 on Alpha/VMS systems.
  8020. .IP "\fB\-g\fR\fIlevel\fR" 4
  8021. .IX Item "-glevel"
  8022. .PD 0
  8023. .IP "\fB\-ggdb\fR\fIlevel\fR" 4
  8024. .IX Item "-ggdblevel"
  8025. .IP "\fB\-gstabs\fR\fIlevel\fR" 4
  8026. .IX Item "-gstabslevel"
  8027. .IP "\fB\-gxcoff\fR\fIlevel\fR" 4
  8028. .IX Item "-gxcofflevel"
  8029. .IP "\fB\-gvms\fR\fIlevel\fR" 4
  8030. .IX Item "-gvmslevel"
  8031. .PD
  8032. Request debugging information and also use \fIlevel\fR to specify how
  8033. much information. The default level is 2.
  8034. .Sp
  8035. Level 0 produces no debug information at all. Thus, \fB\-g0\fR negates
  8036. \&\fB\-g\fR.
  8037. .Sp
  8038. Level 1 produces minimal information, enough for making backtraces in
  8039. parts of the program that you don't plan to debug. This includes
  8040. descriptions of functions and external variables, and line number
  8041. tables, but no information about local variables.
  8042. .Sp
  8043. Level 3 includes extra information, such as all the macro definitions
  8044. present in the program. Some debuggers support macro expansion when
  8045. you use \fB\-g3\fR.
  8046. .Sp
  8047. If you use multiple \fB\-g\fR options, with or without level numbers,
  8048. the last such option is the one that is effective.
  8049. .Sp
  8050. \&\fB\-gdwarf\fR does not accept a concatenated debug level, to avoid
  8051. confusion with \fB\-gdwarf\-\fR\fIlevel\fR.
  8052. Instead use an additional \fB\-g\fR\fIlevel\fR option to change the
  8053. debug level for \s-1DWARF.\s0
  8054. .IP "\fB\-fno\-eliminate\-unused\-debug\-symbols\fR" 4
  8055. .IX Item "-fno-eliminate-unused-debug-symbols"
  8056. By default, no debug information is produced for symbols that are not actually
  8057. used. Use this option if you want debug information for all symbols.
  8058. .IP "\fB\-femit\-class\-debug\-always\fR" 4
  8059. .IX Item "-femit-class-debug-always"
  8060. Instead of emitting debugging information for a \*(C+ class in only one
  8061. object file, emit it in all object files using the class. This option
  8062. should be used only with debuggers that are unable to handle the way \s-1GCC\s0
  8063. normally emits debugging information for classes because using this
  8064. option increases the size of debugging information by as much as a
  8065. factor of two.
  8066. .IP "\fB\-fno\-merge\-debug\-strings\fR" 4
  8067. .IX Item "-fno-merge-debug-strings"
  8068. Direct the linker to not merge together strings in the debugging
  8069. information that are identical in different object files. Merging is
  8070. not supported by all assemblers or linkers. Merging decreases the size
  8071. of the debug information in the output file at the cost of increasing
  8072. link processing time. Merging is enabled by default.
  8073. .IP "\fB\-fdebug\-prefix\-map=\fR\fIold\fR\fB=\fR\fInew\fR" 4
  8074. .IX Item "-fdebug-prefix-map=old=new"
  8075. When compiling files residing in directory \fI\fIold\fI\fR, record
  8076. debugging information describing them as if the files resided in
  8077. directory \fI\fInew\fI\fR instead. This can be used to replace a
  8078. build-time path with an install-time path in the debug info. It can
  8079. also be used to change an absolute path to a relative path by using
  8080. \&\fI.\fR for \fInew\fR. This can give more reproducible builds, which
  8081. are location independent, but may require an extra command to tell \s-1GDB\s0
  8082. where to find the source files. See also \fB\-ffile\-prefix\-map\fR.
  8083. .IP "\fB\-fvar\-tracking\fR" 4
  8084. .IX Item "-fvar-tracking"
  8085. Run variable tracking pass. It computes where variables are stored at each
  8086. position in code. Better debugging information is then generated
  8087. (if the debugging information format supports this information).
  8088. .Sp
  8089. It is enabled by default when compiling with optimization (\fB\-Os\fR,
  8090. \&\fB\-O\fR, \fB\-O2\fR, ...), debugging information (\fB\-g\fR) and
  8091. the debug info format supports it.
  8092. .IP "\fB\-fvar\-tracking\-assignments\fR" 4
  8093. .IX Item "-fvar-tracking-assignments"
  8094. Annotate assignments to user variables early in the compilation and
  8095. attempt to carry the annotations over throughout the compilation all the
  8096. way to the end, in an attempt to improve debug information while
  8097. optimizing. Use of \fB\-gdwarf\-4\fR is recommended along with it.
  8098. .Sp
  8099. It can be enabled even if var-tracking is disabled, in which case
  8100. annotations are created and maintained, but discarded at the end.
  8101. By default, this flag is enabled together with \fB\-fvar\-tracking\fR,
  8102. except when selective scheduling is enabled.
  8103. .IP "\fB\-gsplit\-dwarf\fR" 4
  8104. .IX Item "-gsplit-dwarf"
  8105. Separate as much \s-1DWARF\s0 debugging information as possible into a
  8106. separate output file with the extension \fI.dwo\fR. This option allows
  8107. the build system to avoid linking files with debug information. To
  8108. be useful, this option requires a debugger capable of reading \fI.dwo\fR
  8109. files.
  8110. .IP "\fB\-gdescribe\-dies\fR" 4
  8111. .IX Item "-gdescribe-dies"
  8112. Add description attributes to some \s-1DWARF\s0 DIEs that have no name attribute,
  8113. such as artificial variables, external references and call site
  8114. parameter DIEs.
  8115. .IP "\fB\-gpubnames\fR" 4
  8116. .IX Item "-gpubnames"
  8117. Generate \s-1DWARF \s0\f(CW\*(C`.debug_pubnames\*(C'\fR and \f(CW\*(C`.debug_pubtypes\*(C'\fR sections.
  8118. .IP "\fB\-ggnu\-pubnames\fR" 4
  8119. .IX Item "-ggnu-pubnames"
  8120. Generate \f(CW\*(C`.debug_pubnames\*(C'\fR and \f(CW\*(C`.debug_pubtypes\*(C'\fR sections in a format
  8121. suitable for conversion into a \s-1GDB\s0 index. This option is only useful
  8122. with a linker that can produce \s-1GDB\s0 index version 7.
  8123. .IP "\fB\-fdebug\-types\-section\fR" 4
  8124. .IX Item "-fdebug-types-section"
  8125. When using \s-1DWARF\s0 Version 4 or higher, type DIEs can be put into
  8126. their own \f(CW\*(C`.debug_types\*(C'\fR section instead of making them part of the
  8127. \&\f(CW\*(C`.debug_info\*(C'\fR section. It is more efficient to put them in a separate
  8128. comdat section since the linker can then remove duplicates.
  8129. But not all \s-1DWARF\s0 consumers support \f(CW\*(C`.debug_types\*(C'\fR sections yet
  8130. and on some objects \f(CW\*(C`.debug_types\*(C'\fR produces larger instead of smaller
  8131. debugging information.
  8132. .IP "\fB\-grecord\-gcc\-switches\fR" 4
  8133. .IX Item "-grecord-gcc-switches"
  8134. .PD 0
  8135. .IP "\fB\-gno\-record\-gcc\-switches\fR" 4
  8136. .IX Item "-gno-record-gcc-switches"
  8137. .PD
  8138. This switch causes the command-line options used to invoke the
  8139. compiler that may affect code generation to be appended to the
  8140. DW_AT_producer attribute in \s-1DWARF\s0 debugging information. The options
  8141. are concatenated with spaces separating them from each other and from
  8142. the compiler version.
  8143. It is enabled by default.
  8144. See also \fB\-frecord\-gcc\-switches\fR for another
  8145. way of storing compiler options into the object file.
  8146. .IP "\fB\-gstrict\-dwarf\fR" 4
  8147. .IX Item "-gstrict-dwarf"
  8148. Disallow using extensions of later \s-1DWARF\s0 standard version than selected
  8149. with \fB\-gdwarf\-\fR\fIversion\fR. On most targets using non-conflicting
  8150. \&\s-1DWARF\s0 extensions from later standard versions is allowed.
  8151. .IP "\fB\-gno\-strict\-dwarf\fR" 4
  8152. .IX Item "-gno-strict-dwarf"
  8153. Allow using extensions of later \s-1DWARF\s0 standard version than selected with
  8154. \&\fB\-gdwarf\-\fR\fIversion\fR.
  8155. .IP "\fB\-gas\-loc\-support\fR" 4
  8156. .IX Item "-gas-loc-support"
  8157. Inform the compiler that the assembler supports \f(CW\*(C`.loc\*(C'\fR directives.
  8158. It may then use them for the assembler to generate \s-1DWARF2+\s0 line number
  8159. tables.
  8160. .Sp
  8161. This is generally desirable, because assembler-generated line-number
  8162. tables are a lot more compact than those the compiler can generate
  8163. itself.
  8164. .Sp
  8165. This option will be enabled by default if, at \s-1GCC\s0 configure time, the
  8166. assembler was found to support such directives.
  8167. .IP "\fB\-gno\-as\-loc\-support\fR" 4
  8168. .IX Item "-gno-as-loc-support"
  8169. Force \s-1GCC\s0 to generate \s-1DWARF2+\s0 line number tables internally, if \s-1DWARF2+\s0
  8170. line number tables are to be generated.
  8171. .IP "\fB\-gas\-locview\-support\fR" 4
  8172. .IX Item "-gas-locview-support"
  8173. Inform the compiler that the assembler supports \f(CW\*(C`view\*(C'\fR assignment
  8174. and reset assertion checking in \f(CW\*(C`.loc\*(C'\fR directives.
  8175. .Sp
  8176. This option will be enabled by default if, at \s-1GCC\s0 configure time, the
  8177. assembler was found to support them.
  8178. .IP "\fB\-gno\-as\-locview\-support\fR" 4
  8179. .IX Item "-gno-as-locview-support"
  8180. Force \s-1GCC\s0 to assign view numbers internally, if
  8181. \&\fB\-gvariable\-location\-views\fR are explicitly requested.
  8182. .IP "\fB\-gcolumn\-info\fR" 4
  8183. .IX Item "-gcolumn-info"
  8184. .PD 0
  8185. .IP "\fB\-gno\-column\-info\fR" 4
  8186. .IX Item "-gno-column-info"
  8187. .PD
  8188. Emit location column information into \s-1DWARF\s0 debugging information, rather
  8189. than just file and line.
  8190. This option is enabled by default.
  8191. .IP "\fB\-gstatement\-frontiers\fR" 4
  8192. .IX Item "-gstatement-frontiers"
  8193. .PD 0
  8194. .IP "\fB\-gno\-statement\-frontiers\fR" 4
  8195. .IX Item "-gno-statement-frontiers"
  8196. .PD
  8197. This option causes \s-1GCC\s0 to create markers in the internal representation
  8198. at the beginning of statements, and to keep them roughly in place
  8199. throughout compilation, using them to guide the output of \f(CW\*(C`is_stmt\*(C'\fR
  8200. markers in the line number table. This is enabled by default when
  8201. compiling with optimization (\fB\-Os\fR, \fB\-O\fR, \fB\-O2\fR,
  8202. \&...), and outputting \s-1DWARF 2\s0 debug information at the normal level.
  8203. .IP "\fB\-gvariable\-location\-views\fR" 4
  8204. .IX Item "-gvariable-location-views"
  8205. .PD 0
  8206. .IP "\fB\-gvariable\-location\-views=incompat5\fR" 4
  8207. .IX Item "-gvariable-location-views=incompat5"
  8208. .IP "\fB\-gno\-variable\-location\-views\fR" 4
  8209. .IX Item "-gno-variable-location-views"
  8210. .PD
  8211. Augment variable location lists with progressive view numbers implied
  8212. from the line number table. This enables debug information consumers to
  8213. inspect state at certain points of the program, even if no instructions
  8214. associated with the corresponding source locations are present at that
  8215. point. If the assembler lacks support for view numbers in line number
  8216. tables, this will cause the compiler to emit the line number table,
  8217. which generally makes them somewhat less compact. The augmented line
  8218. number tables and location lists are fully backward-compatible, so they
  8219. can be consumed by debug information consumers that are not aware of
  8220. these augmentations, but they won't derive any benefit from them either.
  8221. .Sp
  8222. This is enabled by default when outputting \s-1DWARF 2\s0 debug information at
  8223. the normal level, as long as there is assembler support,
  8224. \&\fB\-fvar\-tracking\-assignments\fR is enabled and
  8225. \&\fB\-gstrict\-dwarf\fR is not. When assembler support is not
  8226. available, this may still be enabled, but it will force \s-1GCC\s0 to output
  8227. internal line number tables, and if
  8228. \&\fB\-ginternal\-reset\-location\-views\fR is not enabled, that will most
  8229. certainly lead to silently mismatching location views.
  8230. .Sp
  8231. There is a proposed representation for view numbers that is not backward
  8232. compatible with the location list format introduced in \s-1DWARF 5,\s0 that can
  8233. be enabled with \fB\-gvariable\-location\-views=incompat5\fR. This
  8234. option may be removed in the future, is only provided as a reference
  8235. implementation of the proposed representation. Debug information
  8236. consumers are not expected to support this extended format, and they
  8237. would be rendered unable to decode location lists using it.
  8238. .IP "\fB\-ginternal\-reset\-location\-views\fR" 4
  8239. .IX Item "-ginternal-reset-location-views"
  8240. .PD 0
  8241. .IP "\fB\-gno\-internal\-reset\-location\-views\fR" 4
  8242. .IX Item "-gno-internal-reset-location-views"
  8243. .PD
  8244. Attempt to determine location views that can be omitted from location
  8245. view lists. This requires the compiler to have very accurate insn
  8246. length estimates, which isn't always the case, and it may cause
  8247. incorrect view lists to be generated silently when using an assembler
  8248. that does not support location view lists. The \s-1GNU\s0 assembler will flag
  8249. any such error as a \f(CW\*(C`view number mismatch\*(C'\fR. This is only enabled
  8250. on ports that define a reliable estimation function.
  8251. .IP "\fB\-ginline\-points\fR" 4
  8252. .IX Item "-ginline-points"
  8253. .PD 0
  8254. .IP "\fB\-gno\-inline\-points\fR" 4
  8255. .IX Item "-gno-inline-points"
  8256. .PD
  8257. Generate extended debug information for inlined functions. Location
  8258. view tracking markers are inserted at inlined entry points, so that
  8259. address and view numbers can be computed and output in debug
  8260. information. This can be enabled independently of location views, in
  8261. which case the view numbers won't be output, but it can only be enabled
  8262. along with statement frontiers, and it is only enabled by default if
  8263. location views are enabled.
  8264. .IP "\fB\-gz\fR[\fB=\fR\fItype\fR]" 4
  8265. .IX Item "-gz[=type]"
  8266. Produce compressed debug sections in \s-1DWARF\s0 format, if that is supported.
  8267. If \fItype\fR is not given, the default type depends on the capabilities
  8268. of the assembler and linker used. \fItype\fR may be one of
  8269. \&\fBnone\fR (don't compress debug sections), \fBzlib\fR (use zlib
  8270. compression in \s-1ELF\s0 gABI format), or \fBzlib-gnu\fR (use zlib
  8271. compression in traditional \s-1GNU\s0 format). If the linker doesn't support
  8272. writing compressed debug sections, the option is rejected. Otherwise,
  8273. if the assembler does not support them, \fB\-gz\fR is silently ignored
  8274. when producing object files.
  8275. .IP "\fB\-femit\-struct\-debug\-baseonly\fR" 4
  8276. .IX Item "-femit-struct-debug-baseonly"
  8277. Emit debug information for struct-like types
  8278. only when the base name of the compilation source file
  8279. matches the base name of file in which the struct is defined.
  8280. .Sp
  8281. This option substantially reduces the size of debugging information,
  8282. but at significant potential loss in type information to the debugger.
  8283. See \fB\-femit\-struct\-debug\-reduced\fR for a less aggressive option.
  8284. See \fB\-femit\-struct\-debug\-detailed\fR for more detailed control.
  8285. .Sp
  8286. This option works only with \s-1DWARF\s0 debug output.
  8287. .IP "\fB\-femit\-struct\-debug\-reduced\fR" 4
  8288. .IX Item "-femit-struct-debug-reduced"
  8289. Emit debug information for struct-like types
  8290. only when the base name of the compilation source file
  8291. matches the base name of file in which the type is defined,
  8292. unless the struct is a template or defined in a system header.
  8293. .Sp
  8294. This option significantly reduces the size of debugging information,
  8295. with some potential loss in type information to the debugger.
  8296. See \fB\-femit\-struct\-debug\-baseonly\fR for a more aggressive option.
  8297. See \fB\-femit\-struct\-debug\-detailed\fR for more detailed control.
  8298. .Sp
  8299. This option works only with \s-1DWARF\s0 debug output.
  8300. .IP "\fB\-femit\-struct\-debug\-detailed\fR[\fB=\fR\fIspec-list\fR]" 4
  8301. .IX Item "-femit-struct-debug-detailed[=spec-list]"
  8302. Specify the struct-like types
  8303. for which the compiler generates debug information.
  8304. The intent is to reduce duplicate struct debug information
  8305. between different object files within the same program.
  8306. .Sp
  8307. This option is a detailed version of
  8308. \&\fB\-femit\-struct\-debug\-reduced\fR and \fB\-femit\-struct\-debug\-baseonly\fR,
  8309. which serves for most needs.
  8310. .Sp
  8311. A specification has the syntax[\fBdir:\fR|\fBind:\fR][\fBord:\fR|\fBgen:\fR](\fBany\fR|\fBsys\fR|\fBbase\fR|\fBnone\fR)
  8312. .Sp
  8313. The optional first word limits the specification to
  8314. structs that are used directly (\fBdir:\fR) or used indirectly (\fBind:\fR).
  8315. A struct type is used directly when it is the type of a variable, member.
  8316. Indirect uses arise through pointers to structs.
  8317. That is, when use of an incomplete struct is valid, the use is indirect.
  8318. An example is
  8319. \&\fBstruct one direct; struct two * indirect;\fR.
  8320. .Sp
  8321. The optional second word limits the specification to
  8322. ordinary structs (\fBord:\fR) or generic structs (\fBgen:\fR).
  8323. Generic structs are a bit complicated to explain.
  8324. For \*(C+, these are non-explicit specializations of template classes,
  8325. or non-template classes within the above.
  8326. Other programming languages have generics,
  8327. but \fB\-femit\-struct\-debug\-detailed\fR does not yet implement them.
  8328. .Sp
  8329. The third word specifies the source files for those
  8330. structs for which the compiler should emit debug information.
  8331. The values \fBnone\fR and \fBany\fR have the normal meaning.
  8332. The value \fBbase\fR means that
  8333. the base of name of the file in which the type declaration appears
  8334. must match the base of the name of the main compilation file.
  8335. In practice, this means that when compiling \fIfoo.c\fR, debug information
  8336. is generated for types declared in that file and \fIfoo.h\fR,
  8337. but not other header files.
  8338. The value \fBsys\fR means those types satisfying \fBbase\fR
  8339. or declared in system or compiler headers.
  8340. .Sp
  8341. You may need to experiment to determine the best settings for your application.
  8342. .Sp
  8343. The default is \fB\-femit\-struct\-debug\-detailed=all\fR.
  8344. .Sp
  8345. This option works only with \s-1DWARF\s0 debug output.
  8346. .IP "\fB\-fno\-dwarf2\-cfi\-asm\fR" 4
  8347. .IX Item "-fno-dwarf2-cfi-asm"
  8348. Emit \s-1DWARF\s0 unwind info as compiler generated \f(CW\*(C`.eh_frame\*(C'\fR section
  8349. instead of using \s-1GAS \s0\f(CW\*(C`.cfi_*\*(C'\fR directives.
  8350. .IP "\fB\-fno\-eliminate\-unused\-debug\-types\fR" 4
  8351. .IX Item "-fno-eliminate-unused-debug-types"
  8352. Normally, when producing \s-1DWARF\s0 output, \s-1GCC\s0 avoids producing debug symbol
  8353. output for types that are nowhere used in the source file being compiled.
  8354. Sometimes it is useful to have \s-1GCC\s0 emit debugging
  8355. information for all types declared in a compilation
  8356. unit, regardless of whether or not they are actually used
  8357. in that compilation unit, for example
  8358. if, in the debugger, you want to cast a value to a type that is
  8359. not actually used in your program (but is declared). More often,
  8360. however, this results in a significant amount of wasted space.
  8361. .SS "Options That Control Optimization"
  8362. .IX Subsection "Options That Control Optimization"
  8363. These options control various sorts of optimizations.
  8364. .PP
  8365. Without any optimization option, the compiler's goal is to reduce the
  8366. cost of compilation and to make debugging produce the expected
  8367. results. Statements are independent: if you stop the program with a
  8368. breakpoint between statements, you can then assign a new value to any
  8369. variable or change the program counter to any other statement in the
  8370. function and get exactly the results you expect from the source
  8371. code.
  8372. .PP
  8373. Turning on optimization flags makes the compiler attempt to improve
  8374. the performance and/or code size at the expense of compilation time
  8375. and possibly the ability to debug the program.
  8376. .PP
  8377. The compiler performs optimization based on the knowledge it has of the
  8378. program. Compiling multiple files at once to a single output file mode allows
  8379. the compiler to use information gained from all of the files when compiling
  8380. each of them.
  8381. .PP
  8382. Not all optimizations are controlled directly by a flag. Only
  8383. optimizations that have a flag are listed in this section.
  8384. .PP
  8385. Most optimizations are completely disabled at \fB\-O0\fR or if an
  8386. \&\fB\-O\fR level is not set on the command line, even if individual
  8387. optimization flags are specified. Similarly, \fB\-Og\fR suppresses
  8388. many optimization passes.
  8389. .PP
  8390. Depending on the target and how \s-1GCC\s0 was configured, a slightly different
  8391. set of optimizations may be enabled at each \fB\-O\fR level than
  8392. those listed here. You can invoke \s-1GCC\s0 with \fB\-Q \-\-help=optimizers\fR
  8393. to find out the exact set of optimizations that are enabled at each level.
  8394. .IP "\fB\-O\fR" 4
  8395. .IX Item "-O"
  8396. .PD 0
  8397. .IP "\fB\-O1\fR" 4
  8398. .IX Item "-O1"
  8399. .PD
  8400. Optimize. Optimizing compilation takes somewhat more time, and a lot
  8401. more memory for a large function.
  8402. .Sp
  8403. With \fB\-O\fR, the compiler tries to reduce code size and execution
  8404. time, without performing any optimizations that take a great deal of
  8405. compilation time.
  8406. .Sp
  8407. \&\fB\-O\fR turns on the following optimization flags:
  8408. .Sp
  8409. \&\fB\-fauto\-inc\-dec
  8410. \&\-fbranch\-count\-reg
  8411. \&\-fcombine\-stack\-adjustments
  8412. \&\-fcompare\-elim
  8413. \&\-fcprop\-registers
  8414. \&\-fdce
  8415. \&\-fdefer\-pop
  8416. \&\-fdelayed\-branch
  8417. \&\-fdse
  8418. \&\-fforward\-propagate
  8419. \&\-fguess\-branch\-probability
  8420. \&\-fif\-conversion
  8421. \&\-fif\-conversion2
  8422. \&\-finline\-functions\-called\-once
  8423. \&\-fipa\-profile
  8424. \&\-fipa\-pure\-const
  8425. \&\-fipa\-reference
  8426. \&\-fipa\-reference\-addressable
  8427. \&\-fmerge\-constants
  8428. \&\-fmove\-loop\-invariants
  8429. \&\-fomit\-frame\-pointer
  8430. \&\-freorder\-blocks
  8431. \&\-fshrink\-wrap
  8432. \&\-fshrink\-wrap\-separate
  8433. \&\-fsplit\-wide\-types
  8434. \&\-fssa\-backprop
  8435. \&\-fssa\-phiopt
  8436. \&\-ftree\-bit\-ccp
  8437. \&\-ftree\-ccp
  8438. \&\-ftree\-ch
  8439. \&\-ftree\-coalesce\-vars
  8440. \&\-ftree\-copy\-prop
  8441. \&\-ftree\-dce
  8442. \&\-ftree\-dominator\-opts
  8443. \&\-ftree\-dse
  8444. \&\-ftree\-forwprop
  8445. \&\-ftree\-fre
  8446. \&\-ftree\-phiprop
  8447. \&\-ftree\-pta
  8448. \&\-ftree\-scev\-cprop
  8449. \&\-ftree\-sink
  8450. \&\-ftree\-slsr
  8451. \&\-ftree\-sra
  8452. \&\-ftree\-ter
  8453. \&\-funit\-at\-a\-time\fR
  8454. .IP "\fB\-O2\fR" 4
  8455. .IX Item "-O2"
  8456. Optimize even more. \s-1GCC\s0 performs nearly all supported optimizations
  8457. that do not involve a space-speed tradeoff.
  8458. As compared to \fB\-O\fR, this option increases both compilation time
  8459. and the performance of the generated code.
  8460. .Sp
  8461. \&\fB\-O2\fR turns on all optimization flags specified by \fB\-O\fR. It
  8462. also turns on the following optimization flags:
  8463. .Sp
  8464. \&\fB\-falign\-functions \-falign\-jumps
  8465. \&\-falign\-labels \-falign\-loops
  8466. \&\-fcaller\-saves
  8467. \&\-fcode\-hoisting
  8468. \&\-fcrossjumping
  8469. \&\-fcse\-follow\-jumps \-fcse\-skip\-blocks
  8470. \&\-fdelete\-null\-pointer\-checks
  8471. \&\-fdevirtualize \-fdevirtualize\-speculatively
  8472. \&\-fexpensive\-optimizations
  8473. \&\-ffinite\-loops
  8474. \&\-fgcse \-fgcse\-lm
  8475. \&\-fhoist\-adjacent\-loads
  8476. \&\-finline\-functions
  8477. \&\-finline\-small\-functions
  8478. \&\-findirect\-inlining
  8479. \&\-fipa\-bit\-cp \-fipa\-cp \-fipa\-icf
  8480. \&\-fipa\-ra \-fipa\-sra \-fipa\-vrp
  8481. \&\-fisolate\-erroneous\-paths\-dereference
  8482. \&\-flra\-remat
  8483. \&\-foptimize\-sibling\-calls
  8484. \&\-foptimize\-strlen
  8485. \&\-fpartial\-inlining
  8486. \&\-fpeephole2
  8487. \&\-freorder\-blocks\-algorithm=stc
  8488. \&\-freorder\-blocks\-and\-partition \-freorder\-functions
  8489. \&\-frerun\-cse\-after\-loop
  8490. \&\-fschedule\-insns \-fschedule\-insns2
  8491. \&\-fsched\-interblock \-fsched\-spec
  8492. \&\-fstore\-merging
  8493. \&\-fstrict\-aliasing
  8494. \&\-fthread\-jumps
  8495. \&\-ftree\-builtin\-call\-dce
  8496. \&\-ftree\-pre
  8497. \&\-ftree\-switch\-conversion \-ftree\-tail\-merge
  8498. \&\-ftree\-vrp\fR
  8499. .Sp
  8500. Please note the warning under \fB\-fgcse\fR about
  8501. invoking \fB\-O2\fR on programs that use computed gotos.
  8502. .IP "\fB\-O3\fR" 4
  8503. .IX Item "-O3"
  8504. Optimize yet more. \fB\-O3\fR turns on all optimizations specified
  8505. by \fB\-O2\fR and also turns on the following optimization flags:
  8506. .Sp
  8507. \&\fB\-fgcse\-after\-reload
  8508. \&\-fipa\-cp\-clone
  8509. \&\-floop\-interchange
  8510. \&\-floop\-unroll\-and\-jam
  8511. \&\-fpeel\-loops
  8512. \&\-fpredictive\-commoning
  8513. \&\-fsplit\-loops
  8514. \&\-fsplit\-paths
  8515. \&\-ftree\-loop\-distribution
  8516. \&\-ftree\-loop\-vectorize
  8517. \&\-ftree\-partial\-pre
  8518. \&\-ftree\-slp\-vectorize
  8519. \&\-funswitch\-loops
  8520. \&\-fvect\-cost\-model
  8521. \&\-fvect\-cost\-model=dynamic
  8522. \&\-fversion\-loops\-for\-strides\fR
  8523. .IP "\fB\-O0\fR" 4
  8524. .IX Item "-O0"
  8525. Reduce compilation time and make debugging produce the expected
  8526. results. This is the default.
  8527. .IP "\fB\-Os\fR" 4
  8528. .IX Item "-Os"
  8529. Optimize for size. \fB\-Os\fR enables all \fB\-O2\fR optimizations
  8530. except those that often increase code size:
  8531. .Sp
  8532. \&\fB\-falign\-functions \-falign\-jumps
  8533. \&\-falign\-labels \-falign\-loops
  8534. \&\-fprefetch\-loop\-arrays \-freorder\-blocks\-algorithm=stc\fR
  8535. .Sp
  8536. It also enables \fB\-finline\-functions\fR, causes the compiler to tune for
  8537. code size rather than execution speed, and performs further optimizations
  8538. designed to reduce code size.
  8539. .IP "\fB\-Ofast\fR" 4
  8540. .IX Item "-Ofast"
  8541. Disregard strict standards compliance. \fB\-Ofast\fR enables all
  8542. \&\fB\-O3\fR optimizations. It also enables optimizations that are not
  8543. valid for all standard-compliant programs.
  8544. It turns on \fB\-ffast\-math\fR, \fB\-fallow\-store\-data\-races\fR
  8545. and the Fortran-specific \fB\-fstack\-arrays\fR, unless
  8546. \&\fB\-fmax\-stack\-var\-size\fR is specified, and \fB\-fno\-protect\-parens\fR.
  8547. .IP "\fB\-Og\fR" 4
  8548. .IX Item "-Og"
  8549. Optimize debugging experience. \fB\-Og\fR should be the optimization
  8550. level of choice for the standard edit-compile-debug cycle, offering
  8551. a reasonable level of optimization while maintaining fast compilation
  8552. and a good debugging experience. It is a better choice than \fB\-O0\fR
  8553. for producing debuggable code because some compiler passes
  8554. that collect debug information are disabled at \fB\-O0\fR.
  8555. .Sp
  8556. Like \fB\-O0\fR, \fB\-Og\fR completely disables a number of
  8557. optimization passes so that individual options controlling them have
  8558. no effect. Otherwise \fB\-Og\fR enables all \fB\-O1\fR
  8559. optimization flags except for those that may interfere with debugging:
  8560. .Sp
  8561. \&\fB\-fbranch\-count\-reg \-fdelayed\-branch
  8562. \&\-fdse \-fif\-conversion \-fif\-conversion2
  8563. \&\-finline\-functions\-called\-once
  8564. \&\-fmove\-loop\-invariants \-fssa\-phiopt
  8565. \&\-ftree\-bit\-ccp \-ftree\-dse \-ftree\-pta \-ftree\-sra\fR
  8566. .PP
  8567. If you use multiple \fB\-O\fR options, with or without level numbers,
  8568. the last such option is the one that is effective.
  8569. .PP
  8570. Options of the form \fB\-f\fR\fIflag\fR specify machine-independent
  8571. flags. Most flags have both positive and negative forms; the negative
  8572. form of \fB\-ffoo\fR is \fB\-fno\-foo\fR. In the table
  8573. below, only one of the forms is listed\-\-\-the one you typically
  8574. use. You can figure out the other form by either removing \fBno\-\fR
  8575. or adding it.
  8576. .PP
  8577. The following options control specific optimizations. They are either
  8578. activated by \fB\-O\fR options or are related to ones that are. You
  8579. can use the following flags in the rare cases when \*(L"fine-tuning\*(R" of
  8580. optimizations to be performed is desired.
  8581. .IP "\fB\-fno\-defer\-pop\fR" 4
  8582. .IX Item "-fno-defer-pop"
  8583. For machines that must pop arguments after a function call, always pop
  8584. the arguments as soon as each function returns.
  8585. At levels \fB\-O1\fR and higher, \fB\-fdefer\-pop\fR is the default;
  8586. this allows the compiler to let arguments accumulate on the stack for several
  8587. function calls and pop them all at once.
  8588. .IP "\fB\-fforward\-propagate\fR" 4
  8589. .IX Item "-fforward-propagate"
  8590. Perform a forward propagation pass on \s-1RTL. \s0 The pass tries to combine two
  8591. instructions and checks if the result can be simplified. If loop unrolling
  8592. is active, two passes are performed and the second is scheduled after
  8593. loop unrolling.
  8594. .Sp
  8595. This option is enabled by default at optimization levels \fB\-O\fR,
  8596. \&\fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  8597. .IP "\fB\-ffp\-contract=\fR\fIstyle\fR" 4
  8598. .IX Item "-ffp-contract=style"
  8599. \&\fB\-ffp\-contract=off\fR disables floating-point expression contraction.
  8600. \&\fB\-ffp\-contract=fast\fR enables floating-point expression contraction
  8601. such as forming of fused multiply-add operations if the target has
  8602. native support for them.
  8603. \&\fB\-ffp\-contract=on\fR enables floating-point expression contraction
  8604. if allowed by the language standard. This is currently not implemented
  8605. and treated equal to \fB\-ffp\-contract=off\fR.
  8606. .Sp
  8607. The default is \fB\-ffp\-contract=fast\fR.
  8608. .IP "\fB\-fomit\-frame\-pointer\fR" 4
  8609. .IX Item "-fomit-frame-pointer"
  8610. Omit the frame pointer in functions that don't need one. This avoids the
  8611. instructions to save, set up and restore the frame pointer; on many targets
  8612. it also makes an extra register available.
  8613. .Sp
  8614. On some targets this flag has no effect because the standard calling sequence
  8615. always uses a frame pointer, so it cannot be omitted.
  8616. .Sp
  8617. Note that \fB\-fno\-omit\-frame\-pointer\fR doesn't guarantee the frame pointer
  8618. is used in all functions. Several targets always omit the frame pointer in
  8619. leaf functions.
  8620. .Sp
  8621. Enabled by default at \fB\-O\fR and higher.
  8622. .IP "\fB\-foptimize\-sibling\-calls\fR" 4
  8623. .IX Item "-foptimize-sibling-calls"
  8624. Optimize sibling and tail recursive calls.
  8625. .Sp
  8626. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  8627. .IP "\fB\-foptimize\-strlen\fR" 4
  8628. .IX Item "-foptimize-strlen"
  8629. Optimize various standard C string functions (e.g. \f(CW\*(C`strlen\*(C'\fR,
  8630. \&\f(CW\*(C`strchr\*(C'\fR or \f(CW\*(C`strcpy\*(C'\fR) and
  8631. their \f(CW\*(C`_FORTIFY_SOURCE\*(C'\fR counterparts into faster alternatives.
  8632. .Sp
  8633. Enabled at levels \fB\-O2\fR, \fB\-O3\fR.
  8634. .IP "\fB\-fno\-inline\fR" 4
  8635. .IX Item "-fno-inline"
  8636. Do not expand any functions inline apart from those marked with
  8637. the \f(CW\*(C`always_inline\*(C'\fR attribute. This is the default when not
  8638. optimizing.
  8639. .Sp
  8640. Single functions can be exempted from inlining by marking them
  8641. with the \f(CW\*(C`noinline\*(C'\fR attribute.
  8642. .IP "\fB\-finline\-small\-functions\fR" 4
  8643. .IX Item "-finline-small-functions"
  8644. Integrate functions into their callers when their body is smaller than expected
  8645. function call code (so overall size of program gets smaller). The compiler
  8646. heuristically decides which functions are simple enough to be worth integrating
  8647. in this way. This inlining applies to all functions, even those not declared
  8648. inline.
  8649. .Sp
  8650. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  8651. .IP "\fB\-findirect\-inlining\fR" 4
  8652. .IX Item "-findirect-inlining"
  8653. Inline also indirect calls that are discovered to be known at compile
  8654. time thanks to previous inlining. This option has any effect only
  8655. when inlining itself is turned on by the \fB\-finline\-functions\fR
  8656. or \fB\-finline\-small\-functions\fR options.
  8657. .Sp
  8658. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  8659. .IP "\fB\-finline\-functions\fR" 4
  8660. .IX Item "-finline-functions"
  8661. Consider all functions for inlining, even if they are not declared inline.
  8662. The compiler heuristically decides which functions are worth integrating
  8663. in this way.
  8664. .Sp
  8665. If all calls to a given function are integrated, and the function is
  8666. declared \f(CW\*(C`static\*(C'\fR, then the function is normally not output as
  8667. assembler code in its own right.
  8668. .Sp
  8669. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. Also enabled
  8670. by \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  8671. .IP "\fB\-finline\-functions\-called\-once\fR" 4
  8672. .IX Item "-finline-functions-called-once"
  8673. Consider all \f(CW\*(C`static\*(C'\fR functions called once for inlining into their
  8674. caller even if they are not marked \f(CW\*(C`inline\*(C'\fR. If a call to a given
  8675. function is integrated, then the function is not output as assembler code
  8676. in its own right.
  8677. .Sp
  8678. Enabled at levels \fB\-O1\fR, \fB\-O2\fR, \fB\-O3\fR and \fB\-Os\fR,
  8679. but not \fB\-Og\fR.
  8680. .IP "\fB\-fearly\-inlining\fR" 4
  8681. .IX Item "-fearly-inlining"
  8682. Inline functions marked by \f(CW\*(C`always_inline\*(C'\fR and functions whose body seems
  8683. smaller than the function call overhead early before doing
  8684. \&\fB\-fprofile\-generate\fR instrumentation and real inlining pass. Doing so
  8685. makes profiling significantly cheaper and usually inlining faster on programs
  8686. having large chains of nested wrapper functions.
  8687. .Sp
  8688. Enabled by default.
  8689. .IP "\fB\-fipa\-sra\fR" 4
  8690. .IX Item "-fipa-sra"
  8691. Perform interprocedural scalar replacement of aggregates, removal of
  8692. unused parameters and replacement of parameters passed by reference
  8693. by parameters passed by value.
  8694. .Sp
  8695. Enabled at levels \fB\-O2\fR, \fB\-O3\fR and \fB\-Os\fR.
  8696. .IP "\fB\-finline\-limit=\fR\fIn\fR" 4
  8697. .IX Item "-finline-limit=n"
  8698. By default, \s-1GCC\s0 limits the size of functions that can be inlined. This flag
  8699. allows coarse control of this limit. \fIn\fR is the size of functions that
  8700. can be inlined in number of pseudo instructions.
  8701. .Sp
  8702. Inlining is actually controlled by a number of parameters, which may be
  8703. specified individually by using \fB\-\-param\fR \fIname\fR\fB=\fR\fIvalue\fR.
  8704. The \fB\-finline\-limit=\fR\fIn\fR option sets some of these parameters
  8705. as follows:
  8706. .RS 4
  8707. .IP "\fBmax-inline-insns-single\fR" 4
  8708. .IX Item "max-inline-insns-single"
  8709. is set to \fIn\fR/2.
  8710. .IP "\fBmax-inline-insns-auto\fR" 4
  8711. .IX Item "max-inline-insns-auto"
  8712. is set to \fIn\fR/2.
  8713. .RE
  8714. .RS 4
  8715. .Sp
  8716. See below for a documentation of the individual
  8717. parameters controlling inlining and for the defaults of these parameters.
  8718. .Sp
  8719. \&\fINote:\fR there may be no value to \fB\-finline\-limit\fR that results
  8720. in default behavior.
  8721. .Sp
  8722. \&\fINote:\fR pseudo instruction represents, in this particular context, an
  8723. abstract measurement of function's size. In no way does it represent a count
  8724. of assembly instructions and as such its exact meaning might change from one
  8725. release to an another.
  8726. .RE
  8727. .IP "\fB\-fno\-keep\-inline\-dllexport\fR" 4
  8728. .IX Item "-fno-keep-inline-dllexport"
  8729. This is a more fine-grained version of \fB\-fkeep\-inline\-functions\fR,
  8730. which applies only to functions that are declared using the \f(CW\*(C`dllexport\*(C'\fR
  8731. attribute or declspec.
  8732. .IP "\fB\-fkeep\-inline\-functions\fR" 4
  8733. .IX Item "-fkeep-inline-functions"
  8734. In C, emit \f(CW\*(C`static\*(C'\fR functions that are declared \f(CW\*(C`inline\*(C'\fR
  8735. into the object file, even if the function has been inlined into all
  8736. of its callers. This switch does not affect functions using the
  8737. \&\f(CW\*(C`extern inline\*(C'\fR extension in \s-1GNU C90. \s0 In \*(C+, emit any and all
  8738. inline functions into the object file.
  8739. .IP "\fB\-fkeep\-static\-functions\fR" 4
  8740. .IX Item "-fkeep-static-functions"
  8741. Emit \f(CW\*(C`static\*(C'\fR functions into the object file, even if the function
  8742. is never used.
  8743. .IP "\fB\-fkeep\-static\-consts\fR" 4
  8744. .IX Item "-fkeep-static-consts"
  8745. Emit variables declared \f(CW\*(C`static const\*(C'\fR when optimization isn't turned
  8746. on, even if the variables aren't referenced.
  8747. .Sp
  8748. \&\s-1GCC\s0 enables this option by default. If you want to force the compiler to
  8749. check if a variable is referenced, regardless of whether or not
  8750. optimization is turned on, use the \fB\-fno\-keep\-static\-consts\fR option.
  8751. .IP "\fB\-fmerge\-constants\fR" 4
  8752. .IX Item "-fmerge-constants"
  8753. Attempt to merge identical constants (string constants and floating-point
  8754. constants) across compilation units.
  8755. .Sp
  8756. This option is the default for optimized compilation if the assembler and
  8757. linker support it. Use \fB\-fno\-merge\-constants\fR to inhibit this
  8758. behavior.
  8759. .Sp
  8760. Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  8761. .IP "\fB\-fmerge\-all\-constants\fR" 4
  8762. .IX Item "-fmerge-all-constants"
  8763. Attempt to merge identical constants and identical variables.
  8764. .Sp
  8765. This option implies \fB\-fmerge\-constants\fR. In addition to
  8766. \&\fB\-fmerge\-constants\fR this considers e.g. even constant initialized
  8767. arrays or initialized constant variables with integral or floating-point
  8768. types. Languages like C or \*(C+ require each variable, including multiple
  8769. instances of the same variable in recursive calls, to have distinct locations,
  8770. so using this option results in non-conforming
  8771. behavior.
  8772. .IP "\fB\-fmodulo\-sched\fR" 4
  8773. .IX Item "-fmodulo-sched"
  8774. Perform swing modulo scheduling immediately before the first scheduling
  8775. pass. This pass looks at innermost loops and reorders their
  8776. instructions by overlapping different iterations.
  8777. .IP "\fB\-fmodulo\-sched\-allow\-regmoves\fR" 4
  8778. .IX Item "-fmodulo-sched-allow-regmoves"
  8779. Perform more aggressive SMS-based modulo scheduling with register moves
  8780. allowed. By setting this flag certain anti-dependences edges are
  8781. deleted, which triggers the generation of reg-moves based on the
  8782. life-range analysis. This option is effective only with
  8783. \&\fB\-fmodulo\-sched\fR enabled.
  8784. .IP "\fB\-fno\-branch\-count\-reg\fR" 4
  8785. .IX Item "-fno-branch-count-reg"
  8786. Disable the optimization pass that scans for opportunities to use
  8787. \&\*(L"decrement and branch\*(R" instructions on a count register instead of
  8788. instruction sequences that decrement a register, compare it against zero, and
  8789. then branch based upon the result. This option is only meaningful on
  8790. architectures that support such instructions, which include x86, PowerPC,
  8791. \&\s-1IA\-64\s0 and S/390. Note that the \fB\-fno\-branch\-count\-reg\fR option
  8792. doesn't remove the decrement and branch instructions from the generated
  8793. instruction stream introduced by other optimization passes.
  8794. .Sp
  8795. The default is \fB\-fbranch\-count\-reg\fR at \fB\-O1\fR and higher,
  8796. except for \fB\-Og\fR.
  8797. .IP "\fB\-fno\-function\-cse\fR" 4
  8798. .IX Item "-fno-function-cse"
  8799. Do not put function addresses in registers; make each instruction that
  8800. calls a constant function contain the function's address explicitly.
  8801. .Sp
  8802. This option results in less efficient code, but some strange hacks
  8803. that alter the assembler output may be confused by the optimizations
  8804. performed when this option is not used.
  8805. .Sp
  8806. The default is \fB\-ffunction\-cse\fR
  8807. .IP "\fB\-fno\-zero\-initialized\-in\-bss\fR" 4
  8808. .IX Item "-fno-zero-initialized-in-bss"
  8809. If the target supports a \s-1BSS\s0 section, \s-1GCC\s0 by default puts variables that
  8810. are initialized to zero into \s-1BSS. \s0 This can save space in the resulting
  8811. code.
  8812. .Sp
  8813. This option turns off this behavior because some programs explicitly
  8814. rely on variables going to the data section\-\-\-e.g., so that the
  8815. resulting executable can find the beginning of that section and/or make
  8816. assumptions based on that.
  8817. .Sp
  8818. The default is \fB\-fzero\-initialized\-in\-bss\fR.
  8819. .IP "\fB\-fthread\-jumps\fR" 4
  8820. .IX Item "-fthread-jumps"
  8821. Perform optimizations that check to see if a jump branches to a
  8822. location where another comparison subsumed by the first is found. If
  8823. so, the first branch is redirected to either the destination of the
  8824. second branch or a point immediately following it, depending on whether
  8825. the condition is known to be true or false.
  8826. .Sp
  8827. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  8828. .IP "\fB\-fsplit\-wide\-types\fR" 4
  8829. .IX Item "-fsplit-wide-types"
  8830. When using a type that occupies multiple registers, such as \f(CW\*(C`long
  8831. long\*(C'\fR on a 32\-bit system, split the registers apart and allocate them
  8832. independently. This normally generates better code for those types,
  8833. but may make debugging more difficult.
  8834. .Sp
  8835. Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR,
  8836. \&\fB\-Os\fR.
  8837. .IP "\fB\-fsplit\-wide\-types\-early\fR" 4
  8838. .IX Item "-fsplit-wide-types-early"
  8839. Fully split wide types early, instead of very late.
  8840. This option has no effect unless \fB\-fsplit\-wide\-types\fR is turned on.
  8841. .Sp
  8842. This is the default on some targets.
  8843. .IP "\fB\-fcse\-follow\-jumps\fR" 4
  8844. .IX Item "-fcse-follow-jumps"
  8845. In common subexpression elimination (\s-1CSE\s0), scan through jump instructions
  8846. when the target of the jump is not reached by any other path. For
  8847. example, when \s-1CSE\s0 encounters an \f(CW\*(C`if\*(C'\fR statement with an
  8848. \&\f(CW\*(C`else\*(C'\fR clause, \s-1CSE\s0 follows the jump when the condition
  8849. tested is false.
  8850. .Sp
  8851. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  8852. .IP "\fB\-fcse\-skip\-blocks\fR" 4
  8853. .IX Item "-fcse-skip-blocks"
  8854. This is similar to \fB\-fcse\-follow\-jumps\fR, but causes \s-1CSE\s0 to
  8855. follow jumps that conditionally skip over blocks. When \s-1CSE\s0
  8856. encounters a simple \f(CW\*(C`if\*(C'\fR statement with no else clause,
  8857. \&\fB\-fcse\-skip\-blocks\fR causes \s-1CSE\s0 to follow the jump around the
  8858. body of the \f(CW\*(C`if\*(C'\fR.
  8859. .Sp
  8860. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  8861. .IP "\fB\-frerun\-cse\-after\-loop\fR" 4
  8862. .IX Item "-frerun-cse-after-loop"
  8863. Re-run common subexpression elimination after loop optimizations are
  8864. performed.
  8865. .Sp
  8866. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  8867. .IP "\fB\-fgcse\fR" 4
  8868. .IX Item "-fgcse"
  8869. Perform a global common subexpression elimination pass.
  8870. This pass also performs global constant and copy propagation.
  8871. .Sp
  8872. \&\fINote:\fR When compiling a program using computed gotos, a \s-1GCC\s0
  8873. extension, you may get better run-time performance if you disable
  8874. the global common subexpression elimination pass by adding
  8875. \&\fB\-fno\-gcse\fR to the command line.
  8876. .Sp
  8877. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  8878. .IP "\fB\-fgcse\-lm\fR" 4
  8879. .IX Item "-fgcse-lm"
  8880. When \fB\-fgcse\-lm\fR is enabled, global common subexpression elimination
  8881. attempts to move loads that are only killed by stores into themselves. This
  8882. allows a loop containing a load/store sequence to be changed to a load outside
  8883. the loop, and a copy/store within the loop.
  8884. .Sp
  8885. Enabled by default when \fB\-fgcse\fR is enabled.
  8886. .IP "\fB\-fgcse\-sm\fR" 4
  8887. .IX Item "-fgcse-sm"
  8888. When \fB\-fgcse\-sm\fR is enabled, a store motion pass is run after
  8889. global common subexpression elimination. This pass attempts to move
  8890. stores out of loops. When used in conjunction with \fB\-fgcse\-lm\fR,
  8891. loops containing a load/store sequence can be changed to a load before
  8892. the loop and a store after the loop.
  8893. .Sp
  8894. Not enabled at any optimization level.
  8895. .IP "\fB\-fgcse\-las\fR" 4
  8896. .IX Item "-fgcse-las"
  8897. When \fB\-fgcse\-las\fR is enabled, the global common subexpression
  8898. elimination pass eliminates redundant loads that come after stores to the
  8899. same memory location (both partial and full redundancies).
  8900. .Sp
  8901. Not enabled at any optimization level.
  8902. .IP "\fB\-fgcse\-after\-reload\fR" 4
  8903. .IX Item "-fgcse-after-reload"
  8904. When \fB\-fgcse\-after\-reload\fR is enabled, a redundant load elimination
  8905. pass is performed after reload. The purpose of this pass is to clean up
  8906. redundant spilling.
  8907. .Sp
  8908. Enabled by \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  8909. .IP "\fB\-faggressive\-loop\-optimizations\fR" 4
  8910. .IX Item "-faggressive-loop-optimizations"
  8911. This option tells the loop optimizer to use language constraints to
  8912. derive bounds for the number of iterations of a loop. This assumes that
  8913. loop code does not invoke undefined behavior by for example causing signed
  8914. integer overflows or out-of-bound array accesses. The bounds for the
  8915. number of iterations of a loop are used to guide loop unrolling and peeling
  8916. and loop exit test optimizations.
  8917. This option is enabled by default.
  8918. .IP "\fB\-funconstrained\-commons\fR" 4
  8919. .IX Item "-funconstrained-commons"
  8920. This option tells the compiler that variables declared in common blocks
  8921. (e.g. Fortran) may later be overridden with longer trailing arrays. This
  8922. prevents certain optimizations that depend on knowing the array bounds.
  8923. .IP "\fB\-fcrossjumping\fR" 4
  8924. .IX Item "-fcrossjumping"
  8925. Perform cross-jumping transformation.
  8926. This transformation unifies equivalent code and saves code size. The
  8927. resulting code may or may not perform better than without cross-jumping.
  8928. .Sp
  8929. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  8930. .IP "\fB\-fauto\-inc\-dec\fR" 4
  8931. .IX Item "-fauto-inc-dec"
  8932. Combine increments or decrements of addresses with memory accesses.
  8933. This pass is always skipped on architectures that do not have
  8934. instructions to support this. Enabled by default at \fB\-O\fR and
  8935. higher on architectures that support this.
  8936. .IP "\fB\-fdce\fR" 4
  8937. .IX Item "-fdce"
  8938. Perform dead code elimination (\s-1DCE\s0) on \s-1RTL.\s0
  8939. Enabled by default at \fB\-O\fR and higher.
  8940. .IP "\fB\-fdse\fR" 4
  8941. .IX Item "-fdse"
  8942. Perform dead store elimination (\s-1DSE\s0) on \s-1RTL.\s0
  8943. Enabled by default at \fB\-O\fR and higher.
  8944. .IP "\fB\-fif\-conversion\fR" 4
  8945. .IX Item "-fif-conversion"
  8946. Attempt to transform conditional jumps into branch-less equivalents. This
  8947. includes use of conditional moves, min, max, set flags and abs instructions, and
  8948. some tricks doable by standard arithmetics. The use of conditional execution
  8949. on chips where it is available is controlled by \fB\-fif\-conversion2\fR.
  8950. .Sp
  8951. Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR, but
  8952. not with \fB\-Og\fR.
  8953. .IP "\fB\-fif\-conversion2\fR" 4
  8954. .IX Item "-fif-conversion2"
  8955. Use conditional execution (where available) to transform conditional jumps into
  8956. branch-less equivalents.
  8957. .Sp
  8958. Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR, but
  8959. not with \fB\-Og\fR.
  8960. .IP "\fB\-fdeclone\-ctor\-dtor\fR" 4
  8961. .IX Item "-fdeclone-ctor-dtor"
  8962. The \*(C+ \s-1ABI\s0 requires multiple entry points for constructors and
  8963. destructors: one for a base subobject, one for a complete object, and
  8964. one for a virtual destructor that calls operator delete afterwards.
  8965. For a hierarchy with virtual bases, the base and complete variants are
  8966. clones, which means two copies of the function. With this option, the
  8967. base and complete variants are changed to be thunks that call a common
  8968. implementation.
  8969. .Sp
  8970. Enabled by \fB\-Os\fR.
  8971. .IP "\fB\-fdelete\-null\-pointer\-checks\fR" 4
  8972. .IX Item "-fdelete-null-pointer-checks"
  8973. Assume that programs cannot safely dereference null pointers, and that
  8974. no code or data element resides at address zero.
  8975. This option enables simple constant
  8976. folding optimizations at all optimization levels. In addition, other
  8977. optimization passes in \s-1GCC\s0 use this flag to control global dataflow
  8978. analyses that eliminate useless checks for null pointers; these assume
  8979. that a memory access to address zero always results in a trap, so
  8980. that if a pointer is checked after it has already been dereferenced,
  8981. it cannot be null.
  8982. .Sp
  8983. Note however that in some environments this assumption is not true.
  8984. Use \fB\-fno\-delete\-null\-pointer\-checks\fR to disable this optimization
  8985. for programs that depend on that behavior.
  8986. .Sp
  8987. This option is enabled by default on most targets. On Nios \s-1II ELF,\s0 it
  8988. defaults to off. On \s-1AVR, CR16,\s0 and \s-1MSP430,\s0 this option is completely disabled.
  8989. .Sp
  8990. Passes that use the dataflow information
  8991. are enabled independently at different optimization levels.
  8992. .IP "\fB\-fdevirtualize\fR" 4
  8993. .IX Item "-fdevirtualize"
  8994. Attempt to convert calls to virtual functions to direct calls. This
  8995. is done both within a procedure and interprocedurally as part of
  8996. indirect inlining (\fB\-findirect\-inlining\fR) and interprocedural constant
  8997. propagation (\fB\-fipa\-cp\fR).
  8998. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  8999. .IP "\fB\-fdevirtualize\-speculatively\fR" 4
  9000. .IX Item "-fdevirtualize-speculatively"
  9001. Attempt to convert calls to virtual functions to speculative direct calls.
  9002. Based on the analysis of the type inheritance graph, determine for a given call
  9003. the set of likely targets. If the set is small, preferably of size 1, change
  9004. the call into a conditional deciding between direct and indirect calls. The
  9005. speculative calls enable more optimizations, such as inlining. When they seem
  9006. useless after further optimization, they are converted back into original form.
  9007. .IP "\fB\-fdevirtualize\-at\-ltrans\fR" 4
  9008. .IX Item "-fdevirtualize-at-ltrans"
  9009. Stream extra information needed for aggressive devirtualization when running
  9010. the link-time optimizer in local transformation mode.
  9011. This option enables more devirtualization but
  9012. significantly increases the size of streamed data. For this reason it is
  9013. disabled by default.
  9014. .IP "\fB\-fexpensive\-optimizations\fR" 4
  9015. .IX Item "-fexpensive-optimizations"
  9016. Perform a number of minor optimizations that are relatively expensive.
  9017. .Sp
  9018. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  9019. .IP "\fB\-free\fR" 4
  9020. .IX Item "-free"
  9021. Attempt to remove redundant extension instructions. This is especially
  9022. helpful for the x86\-64 architecture, which implicitly zero-extends in 64\-bit
  9023. registers after writing to their lower 32\-bit half.
  9024. .Sp
  9025. Enabled for Alpha, AArch64 and x86 at levels \fB\-O2\fR,
  9026. \&\fB\-O3\fR, \fB\-Os\fR.
  9027. .IP "\fB\-fno\-lifetime\-dse\fR" 4
  9028. .IX Item "-fno-lifetime-dse"
  9029. In \*(C+ the value of an object is only affected by changes within its
  9030. lifetime: when the constructor begins, the object has an indeterminate
  9031. value, and any changes during the lifetime of the object are dead when
  9032. the object is destroyed. Normally dead store elimination will take
  9033. advantage of this; if your code relies on the value of the object
  9034. storage persisting beyond the lifetime of the object, you can use this
  9035. flag to disable this optimization. To preserve stores before the
  9036. constructor starts (e.g. because your operator new clears the object
  9037. storage) but still treat the object as dead after the destructor, you
  9038. can use \fB\-flifetime\-dse=1\fR. The default behavior can be
  9039. explicitly selected with \fB\-flifetime\-dse=2\fR.
  9040. \&\fB\-flifetime\-dse=0\fR is equivalent to \fB\-fno\-lifetime\-dse\fR.
  9041. .IP "\fB\-flive\-range\-shrinkage\fR" 4
  9042. .IX Item "-flive-range-shrinkage"
  9043. Attempt to decrease register pressure through register live range
  9044. shrinkage. This is helpful for fast processors with small or moderate
  9045. size register sets.
  9046. .IP "\fB\-fira\-algorithm=\fR\fIalgorithm\fR" 4
  9047. .IX Item "-fira-algorithm=algorithm"
  9048. Use the specified coloring algorithm for the integrated register
  9049. allocator. The \fIalgorithm\fR argument can be \fBpriority\fR, which
  9050. specifies Chow's priority coloring, or \fB\s-1CB\s0\fR, which specifies
  9051. Chaitin-Briggs coloring. Chaitin-Briggs coloring is not implemented
  9052. for all architectures, but for those targets that do support it, it is
  9053. the default because it generates better code.
  9054. .IP "\fB\-fira\-region=\fR\fIregion\fR" 4
  9055. .IX Item "-fira-region=region"
  9056. Use specified regions for the integrated register allocator. The
  9057. \&\fIregion\fR argument should be one of the following:
  9058. .RS 4
  9059. .IP "\fBall\fR" 4
  9060. .IX Item "all"
  9061. Use all loops as register allocation regions.
  9062. This can give the best results for machines with a small and/or
  9063. irregular register set.
  9064. .IP "\fBmixed\fR" 4
  9065. .IX Item "mixed"
  9066. Use all loops except for loops with small register pressure
  9067. as the regions. This value usually gives
  9068. the best results in most cases and for most architectures,
  9069. and is enabled by default when compiling with optimization for speed
  9070. (\fB\-O\fR, \fB\-O2\fR, ...).
  9071. .IP "\fBone\fR" 4
  9072. .IX Item "one"
  9073. Use all functions as a single region.
  9074. This typically results in the smallest code size, and is enabled by default for
  9075. \&\fB\-Os\fR or \fB\-O0\fR.
  9076. .RE
  9077. .RS 4
  9078. .RE
  9079. .IP "\fB\-fira\-hoist\-pressure\fR" 4
  9080. .IX Item "-fira-hoist-pressure"
  9081. Use \s-1IRA\s0 to evaluate register pressure in the code hoisting pass for
  9082. decisions to hoist expressions. This option usually results in smaller
  9083. code, but it can slow the compiler down.
  9084. .Sp
  9085. This option is enabled at level \fB\-Os\fR for all targets.
  9086. .IP "\fB\-fira\-loop\-pressure\fR" 4
  9087. .IX Item "-fira-loop-pressure"
  9088. Use \s-1IRA\s0 to evaluate register pressure in loops for decisions to move
  9089. loop invariants. This option usually results in generation
  9090. of faster and smaller code on machines with large register files (>= 32
  9091. registers), but it can slow the compiler down.
  9092. .Sp
  9093. This option is enabled at level \fB\-O3\fR for some targets.
  9094. .IP "\fB\-fno\-ira\-share\-save\-slots\fR" 4
  9095. .IX Item "-fno-ira-share-save-slots"
  9096. Disable sharing of stack slots used for saving call-used hard
  9097. registers living through a call. Each hard register gets a
  9098. separate stack slot, and as a result function stack frames are
  9099. larger.
  9100. .IP "\fB\-fno\-ira\-share\-spill\-slots\fR" 4
  9101. .IX Item "-fno-ira-share-spill-slots"
  9102. Disable sharing of stack slots allocated for pseudo-registers. Each
  9103. pseudo-register that does not get a hard register gets a separate
  9104. stack slot, and as a result function stack frames are larger.
  9105. .IP "\fB\-flra\-remat\fR" 4
  9106. .IX Item "-flra-remat"
  9107. Enable CFG-sensitive rematerialization in \s-1LRA. \s0 Instead of loading
  9108. values of spilled pseudos, \s-1LRA\s0 tries to rematerialize (recalculate)
  9109. values if it is profitable.
  9110. .Sp
  9111. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  9112. .IP "\fB\-fdelayed\-branch\fR" 4
  9113. .IX Item "-fdelayed-branch"
  9114. If supported for the target machine, attempt to reorder instructions
  9115. to exploit instruction slots available after delayed branch
  9116. instructions.
  9117. .Sp
  9118. Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR,
  9119. but not at \fB\-Og\fR.
  9120. .IP "\fB\-fschedule\-insns\fR" 4
  9121. .IX Item "-fschedule-insns"
  9122. If supported for the target machine, attempt to reorder instructions to
  9123. eliminate execution stalls due to required data being unavailable. This
  9124. helps machines that have slow floating point or memory load instructions
  9125. by allowing other instructions to be issued until the result of the load
  9126. or floating-point instruction is required.
  9127. .Sp
  9128. Enabled at levels \fB\-O2\fR, \fB\-O3\fR.
  9129. .IP "\fB\-fschedule\-insns2\fR" 4
  9130. .IX Item "-fschedule-insns2"
  9131. Similar to \fB\-fschedule\-insns\fR, but requests an additional pass of
  9132. instruction scheduling after register allocation has been done. This is
  9133. especially useful on machines with a relatively small number of
  9134. registers and where memory load instructions take more than one cycle.
  9135. .Sp
  9136. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  9137. .IP "\fB\-fno\-sched\-interblock\fR" 4
  9138. .IX Item "-fno-sched-interblock"
  9139. Disable instruction scheduling across basic blocks, which
  9140. is normally enabled when scheduling before register allocation, i.e.
  9141. with \fB\-fschedule\-insns\fR or at \fB\-O2\fR or higher.
  9142. .IP "\fB\-fno\-sched\-spec\fR" 4
  9143. .IX Item "-fno-sched-spec"
  9144. Disable speculative motion of non-load instructions, which
  9145. is normally enabled when scheduling before register allocation, i.e.
  9146. with \fB\-fschedule\-insns\fR or at \fB\-O2\fR or higher.
  9147. .IP "\fB\-fsched\-pressure\fR" 4
  9148. .IX Item "-fsched-pressure"
  9149. Enable register pressure sensitive insn scheduling before register
  9150. allocation. This only makes sense when scheduling before register
  9151. allocation is enabled, i.e. with \fB\-fschedule\-insns\fR or at
  9152. \&\fB\-O2\fR or higher. Usage of this option can improve the
  9153. generated code and decrease its size by preventing register pressure
  9154. increase above the number of available hard registers and subsequent
  9155. spills in register allocation.
  9156. .IP "\fB\-fsched\-spec\-load\fR" 4
  9157. .IX Item "-fsched-spec-load"
  9158. Allow speculative motion of some load instructions. This only makes
  9159. sense when scheduling before register allocation, i.e. with
  9160. \&\fB\-fschedule\-insns\fR or at \fB\-O2\fR or higher.
  9161. .IP "\fB\-fsched\-spec\-load\-dangerous\fR" 4
  9162. .IX Item "-fsched-spec-load-dangerous"
  9163. Allow speculative motion of more load instructions. This only makes
  9164. sense when scheduling before register allocation, i.e. with
  9165. \&\fB\-fschedule\-insns\fR or at \fB\-O2\fR or higher.
  9166. .IP "\fB\-fsched\-stalled\-insns\fR" 4
  9167. .IX Item "-fsched-stalled-insns"
  9168. .PD 0
  9169. .IP "\fB\-fsched\-stalled\-insns=\fR\fIn\fR" 4
  9170. .IX Item "-fsched-stalled-insns=n"
  9171. .PD
  9172. Define how many insns (if any) can be moved prematurely from the queue
  9173. of stalled insns into the ready list during the second scheduling pass.
  9174. \&\fB\-fno\-sched\-stalled\-insns\fR means that no insns are moved
  9175. prematurely, \fB\-fsched\-stalled\-insns=0\fR means there is no limit
  9176. on how many queued insns can be moved prematurely.
  9177. \&\fB\-fsched\-stalled\-insns\fR without a value is equivalent to
  9178. \&\fB\-fsched\-stalled\-insns=1\fR.
  9179. .IP "\fB\-fsched\-stalled\-insns\-dep\fR" 4
  9180. .IX Item "-fsched-stalled-insns-dep"
  9181. .PD 0
  9182. .IP "\fB\-fsched\-stalled\-insns\-dep=\fR\fIn\fR" 4
  9183. .IX Item "-fsched-stalled-insns-dep=n"
  9184. .PD
  9185. Define how many insn groups (cycles) are examined for a dependency
  9186. on a stalled insn that is a candidate for premature removal from the queue
  9187. of stalled insns. This has an effect only during the second scheduling pass,
  9188. and only if \fB\-fsched\-stalled\-insns\fR is used.
  9189. \&\fB\-fno\-sched\-stalled\-insns\-dep\fR is equivalent to
  9190. \&\fB\-fsched\-stalled\-insns\-dep=0\fR.
  9191. \&\fB\-fsched\-stalled\-insns\-dep\fR without a value is equivalent to
  9192. \&\fB\-fsched\-stalled\-insns\-dep=1\fR.
  9193. .IP "\fB\-fsched2\-use\-superblocks\fR" 4
  9194. .IX Item "-fsched2-use-superblocks"
  9195. When scheduling after register allocation, use superblock scheduling.
  9196. This allows motion across basic block boundaries,
  9197. resulting in faster schedules. This option is experimental, as not all machine
  9198. descriptions used by \s-1GCC\s0 model the \s-1CPU\s0 closely enough to avoid unreliable
  9199. results from the algorithm.
  9200. .Sp
  9201. This only makes sense when scheduling after register allocation, i.e. with
  9202. \&\fB\-fschedule\-insns2\fR or at \fB\-O2\fR or higher.
  9203. .IP "\fB\-fsched\-group\-heuristic\fR" 4
  9204. .IX Item "-fsched-group-heuristic"
  9205. Enable the group heuristic in the scheduler. This heuristic favors
  9206. the instruction that belongs to a schedule group. This is enabled
  9207. by default when scheduling is enabled, i.e. with \fB\-fschedule\-insns\fR
  9208. or \fB\-fschedule\-insns2\fR or at \fB\-O2\fR or higher.
  9209. .IP "\fB\-fsched\-critical\-path\-heuristic\fR" 4
  9210. .IX Item "-fsched-critical-path-heuristic"
  9211. Enable the critical-path heuristic in the scheduler. This heuristic favors
  9212. instructions on the critical path. This is enabled by default when
  9213. scheduling is enabled, i.e. with \fB\-fschedule\-insns\fR
  9214. or \fB\-fschedule\-insns2\fR or at \fB\-O2\fR or higher.
  9215. .IP "\fB\-fsched\-spec\-insn\-heuristic\fR" 4
  9216. .IX Item "-fsched-spec-insn-heuristic"
  9217. Enable the speculative instruction heuristic in the scheduler. This
  9218. heuristic favors speculative instructions with greater dependency weakness.
  9219. This is enabled by default when scheduling is enabled, i.e.
  9220. with \fB\-fschedule\-insns\fR or \fB\-fschedule\-insns2\fR
  9221. or at \fB\-O2\fR or higher.
  9222. .IP "\fB\-fsched\-rank\-heuristic\fR" 4
  9223. .IX Item "-fsched-rank-heuristic"
  9224. Enable the rank heuristic in the scheduler. This heuristic favors
  9225. the instruction belonging to a basic block with greater size or frequency.
  9226. This is enabled by default when scheduling is enabled, i.e.
  9227. with \fB\-fschedule\-insns\fR or \fB\-fschedule\-insns2\fR or
  9228. at \fB\-O2\fR or higher.
  9229. .IP "\fB\-fsched\-last\-insn\-heuristic\fR" 4
  9230. .IX Item "-fsched-last-insn-heuristic"
  9231. Enable the last-instruction heuristic in the scheduler. This heuristic
  9232. favors the instruction that is less dependent on the last instruction
  9233. scheduled. This is enabled by default when scheduling is enabled,
  9234. i.e. with \fB\-fschedule\-insns\fR or \fB\-fschedule\-insns2\fR or
  9235. at \fB\-O2\fR or higher.
  9236. .IP "\fB\-fsched\-dep\-count\-heuristic\fR" 4
  9237. .IX Item "-fsched-dep-count-heuristic"
  9238. Enable the dependent-count heuristic in the scheduler. This heuristic
  9239. favors the instruction that has more instructions depending on it.
  9240. This is enabled by default when scheduling is enabled, i.e.
  9241. with \fB\-fschedule\-insns\fR or \fB\-fschedule\-insns2\fR or
  9242. at \fB\-O2\fR or higher.
  9243. .IP "\fB\-freschedule\-modulo\-scheduled\-loops\fR" 4
  9244. .IX Item "-freschedule-modulo-scheduled-loops"
  9245. Modulo scheduling is performed before traditional scheduling. If a loop
  9246. is modulo scheduled, later scheduling passes may change its schedule.
  9247. Use this option to control that behavior.
  9248. .IP "\fB\-fselective\-scheduling\fR" 4
  9249. .IX Item "-fselective-scheduling"
  9250. Schedule instructions using selective scheduling algorithm. Selective
  9251. scheduling runs instead of the first scheduler pass.
  9252. .IP "\fB\-fselective\-scheduling2\fR" 4
  9253. .IX Item "-fselective-scheduling2"
  9254. Schedule instructions using selective scheduling algorithm. Selective
  9255. scheduling runs instead of the second scheduler pass.
  9256. .IP "\fB\-fsel\-sched\-pipelining\fR" 4
  9257. .IX Item "-fsel-sched-pipelining"
  9258. Enable software pipelining of innermost loops during selective scheduling.
  9259. This option has no effect unless one of \fB\-fselective\-scheduling\fR or
  9260. \&\fB\-fselective\-scheduling2\fR is turned on.
  9261. .IP "\fB\-fsel\-sched\-pipelining\-outer\-loops\fR" 4
  9262. .IX Item "-fsel-sched-pipelining-outer-loops"
  9263. When pipelining loops during selective scheduling, also pipeline outer loops.
  9264. This option has no effect unless \fB\-fsel\-sched\-pipelining\fR is turned on.
  9265. .IP "\fB\-fsemantic\-interposition\fR" 4
  9266. .IX Item "-fsemantic-interposition"
  9267. Some object formats, like \s-1ELF,\s0 allow interposing of symbols by the
  9268. dynamic linker.
  9269. This means that for symbols exported from the \s-1DSO,\s0 the compiler cannot perform
  9270. interprocedural propagation, inlining and other optimizations in anticipation
  9271. that the function or variable in question may change. While this feature is
  9272. useful, for example, to rewrite memory allocation functions by a debugging
  9273. implementation, it is expensive in the terms of code quality.
  9274. With \fB\-fno\-semantic\-interposition\fR the compiler assumes that
  9275. if interposition happens for functions the overwriting function will have
  9276. precisely the same semantics (and side effects).
  9277. Similarly if interposition happens
  9278. for variables, the constructor of the variable will be the same. The flag
  9279. has no effect for functions explicitly declared inline
  9280. (where it is never allowed for interposition to change semantics)
  9281. and for symbols explicitly declared weak.
  9282. .IP "\fB\-fshrink\-wrap\fR" 4
  9283. .IX Item "-fshrink-wrap"
  9284. Emit function prologues only before parts of the function that need it,
  9285. rather than at the top of the function. This flag is enabled by default at
  9286. \&\fB\-O\fR and higher.
  9287. .IP "\fB\-fshrink\-wrap\-separate\fR" 4
  9288. .IX Item "-fshrink-wrap-separate"
  9289. Shrink-wrap separate parts of the prologue and epilogue separately, so that
  9290. those parts are only executed when needed.
  9291. This option is on by default, but has no effect unless \fB\-fshrink\-wrap\fR
  9292. is also turned on and the target supports this.
  9293. .IP "\fB\-fcaller\-saves\fR" 4
  9294. .IX Item "-fcaller-saves"
  9295. Enable allocation of values to registers that are clobbered by
  9296. function calls, by emitting extra instructions to save and restore the
  9297. registers around such calls. Such allocation is done only when it
  9298. seems to result in better code.
  9299. .Sp
  9300. This option is always enabled by default on certain machines, usually
  9301. those which have no call-preserved registers to use instead.
  9302. .Sp
  9303. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  9304. .IP "\fB\-fcombine\-stack\-adjustments\fR" 4
  9305. .IX Item "-fcombine-stack-adjustments"
  9306. Tracks stack adjustments (pushes and pops) and stack memory references
  9307. and then tries to find ways to combine them.
  9308. .Sp
  9309. Enabled by default at \fB\-O1\fR and higher.
  9310. .IP "\fB\-fipa\-ra\fR" 4
  9311. .IX Item "-fipa-ra"
  9312. Use caller save registers for allocation if those registers are not used by
  9313. any called function. In that case it is not necessary to save and restore
  9314. them around calls. This is only possible if called functions are part of
  9315. same compilation unit as current function and they are compiled before it.
  9316. .Sp
  9317. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR, however the option
  9318. is disabled if generated code will be instrumented for profiling
  9319. (\fB\-p\fR, or \fB\-pg\fR) or if callee's register usage cannot be known
  9320. exactly (this happens on targets that do not expose prologues
  9321. and epilogues in \s-1RTL\s0).
  9322. .IP "\fB\-fconserve\-stack\fR" 4
  9323. .IX Item "-fconserve-stack"
  9324. Attempt to minimize stack usage. The compiler attempts to use less
  9325. stack space, even if that makes the program slower. This option
  9326. implies setting the \fBlarge-stack-frame\fR parameter to 100
  9327. and the \fBlarge-stack-frame-growth\fR parameter to 400.
  9328. .IP "\fB\-ftree\-reassoc\fR" 4
  9329. .IX Item "-ftree-reassoc"
  9330. Perform reassociation on trees. This flag is enabled by default
  9331. at \fB\-O\fR and higher.
  9332. .IP "\fB\-fcode\-hoisting\fR" 4
  9333. .IX Item "-fcode-hoisting"
  9334. Perform code hoisting. Code hoisting tries to move the
  9335. evaluation of expressions executed on all paths to the function exit
  9336. as early as possible. This is especially useful as a code size
  9337. optimization, but it often helps for code speed as well.
  9338. This flag is enabled by default at \fB\-O2\fR and higher.
  9339. .IP "\fB\-ftree\-pre\fR" 4
  9340. .IX Item "-ftree-pre"
  9341. Perform partial redundancy elimination (\s-1PRE\s0) on trees. This flag is
  9342. enabled by default at \fB\-O2\fR and \fB\-O3\fR.
  9343. .IP "\fB\-ftree\-partial\-pre\fR" 4
  9344. .IX Item "-ftree-partial-pre"
  9345. Make partial redundancy elimination (\s-1PRE\s0) more aggressive. This flag is
  9346. enabled by default at \fB\-O3\fR.
  9347. .IP "\fB\-ftree\-forwprop\fR" 4
  9348. .IX Item "-ftree-forwprop"
  9349. Perform forward propagation on trees. This flag is enabled by default
  9350. at \fB\-O\fR and higher.
  9351. .IP "\fB\-ftree\-fre\fR" 4
  9352. .IX Item "-ftree-fre"
  9353. Perform full redundancy elimination (\s-1FRE\s0) on trees. The difference
  9354. between \s-1FRE\s0 and \s-1PRE\s0 is that \s-1FRE\s0 only considers expressions
  9355. that are computed on all paths leading to the redundant computation.
  9356. This analysis is faster than \s-1PRE,\s0 though it exposes fewer redundancies.
  9357. This flag is enabled by default at \fB\-O\fR and higher.
  9358. .IP "\fB\-ftree\-phiprop\fR" 4
  9359. .IX Item "-ftree-phiprop"
  9360. Perform hoisting of loads from conditional pointers on trees. This
  9361. pass is enabled by default at \fB\-O\fR and higher.
  9362. .IP "\fB\-fhoist\-adjacent\-loads\fR" 4
  9363. .IX Item "-fhoist-adjacent-loads"
  9364. Speculatively hoist loads from both branches of an if-then-else if the
  9365. loads are from adjacent locations in the same structure and the target
  9366. architecture has a conditional move instruction. This flag is enabled
  9367. by default at \fB\-O2\fR and higher.
  9368. .IP "\fB\-ftree\-copy\-prop\fR" 4
  9369. .IX Item "-ftree-copy-prop"
  9370. Perform copy propagation on trees. This pass eliminates unnecessary
  9371. copy operations. This flag is enabled by default at \fB\-O\fR and
  9372. higher.
  9373. .IP "\fB\-fipa\-pure\-const\fR" 4
  9374. .IX Item "-fipa-pure-const"
  9375. Discover which functions are pure or constant.
  9376. Enabled by default at \fB\-O\fR and higher.
  9377. .IP "\fB\-fipa\-reference\fR" 4
  9378. .IX Item "-fipa-reference"
  9379. Discover which static variables do not escape the
  9380. compilation unit.
  9381. Enabled by default at \fB\-O\fR and higher.
  9382. .IP "\fB\-fipa\-reference\-addressable\fR" 4
  9383. .IX Item "-fipa-reference-addressable"
  9384. Discover read-only, write-only and non-addressable static variables.
  9385. Enabled by default at \fB\-O\fR and higher.
  9386. .IP "\fB\-fipa\-stack\-alignment\fR" 4
  9387. .IX Item "-fipa-stack-alignment"
  9388. Reduce stack alignment on call sites if possible.
  9389. Enabled by default.
  9390. .IP "\fB\-fipa\-pta\fR" 4
  9391. .IX Item "-fipa-pta"
  9392. Perform interprocedural pointer analysis and interprocedural modification
  9393. and reference analysis. This option can cause excessive memory and
  9394. compile-time usage on large compilation units. It is not enabled by
  9395. default at any optimization level.
  9396. .IP "\fB\-fipa\-profile\fR" 4
  9397. .IX Item "-fipa-profile"
  9398. Perform interprocedural profile propagation. The functions called only from
  9399. cold functions are marked as cold. Also functions executed once (such as
  9400. \&\f(CW\*(C`cold\*(C'\fR, \f(CW\*(C`noreturn\*(C'\fR, static constructors or destructors) are identified. Cold
  9401. functions and loop less parts of functions executed once are then optimized for
  9402. size.
  9403. Enabled by default at \fB\-O\fR and higher.
  9404. .IP "\fB\-fipa\-cp\fR" 4
  9405. .IX Item "-fipa-cp"
  9406. Perform interprocedural constant propagation.
  9407. This optimization analyzes the program to determine when values passed
  9408. to functions are constants and then optimizes accordingly.
  9409. This optimization can substantially increase performance
  9410. if the application has constants passed to functions.
  9411. This flag is enabled by default at \fB\-O2\fR, \fB\-Os\fR and \fB\-O3\fR.
  9412. It is also enabled by \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  9413. .IP "\fB\-fipa\-cp\-clone\fR" 4
  9414. .IX Item "-fipa-cp-clone"
  9415. Perform function cloning to make interprocedural constant propagation stronger.
  9416. When enabled, interprocedural constant propagation performs function cloning
  9417. when externally visible function can be called with constant arguments.
  9418. Because this optimization can create multiple copies of functions,
  9419. it may significantly increase code size
  9420. (see \fB\-\-param ipa\-cp\-unit\-growth=\fR\fIvalue\fR).
  9421. This flag is enabled by default at \fB\-O3\fR.
  9422. It is also enabled by \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  9423. .IP "\fB\-fipa\-bit\-cp\fR" 4
  9424. .IX Item "-fipa-bit-cp"
  9425. When enabled, perform interprocedural bitwise constant
  9426. propagation. This flag is enabled by default at \fB\-O2\fR and
  9427. by \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  9428. It requires that \fB\-fipa\-cp\fR is enabled.
  9429. .IP "\fB\-fipa\-vrp\fR" 4
  9430. .IX Item "-fipa-vrp"
  9431. When enabled, perform interprocedural propagation of value
  9432. ranges. This flag is enabled by default at \fB\-O2\fR. It requires
  9433. that \fB\-fipa\-cp\fR is enabled.
  9434. .IP "\fB\-fipa\-icf\fR" 4
  9435. .IX Item "-fipa-icf"
  9436. Perform Identical Code Folding for functions and read-only variables.
  9437. The optimization reduces code size and may disturb unwind stacks by replacing
  9438. a function by equivalent one with a different name. The optimization works
  9439. more effectively with link-time optimization enabled.
  9440. .Sp
  9441. Although the behavior is similar to the Gold Linker's \s-1ICF\s0 optimization, \s-1GCC ICF\s0
  9442. works on different levels and thus the optimizations are not same \- there are
  9443. equivalences that are found only by \s-1GCC\s0 and equivalences found only by Gold.
  9444. .Sp
  9445. This flag is enabled by default at \fB\-O2\fR and \fB\-Os\fR.
  9446. .IP "\fB\-flive\-patching=\fR\fIlevel\fR" 4
  9447. .IX Item "-flive-patching=level"
  9448. Control \s-1GCC\s0's optimizations to produce output suitable for live-patching.
  9449. .Sp
  9450. If the compiler's optimization uses a function's body or information extracted
  9451. from its body to optimize/change another function, the latter is called an
  9452. impacted function of the former. If a function is patched, its impacted
  9453. functions should be patched too.
  9454. .Sp
  9455. The impacted functions are determined by the compiler's interprocedural
  9456. optimizations. For example, a caller is impacted when inlining a function
  9457. into its caller,
  9458. cloning a function and changing its caller to call this new clone,
  9459. or extracting a function's pureness/constness information to optimize
  9460. its direct or indirect callers, etc.
  9461. .Sp
  9462. Usually, the more \s-1IPA\s0 optimizations enabled, the larger the number of
  9463. impacted functions for each function. In order to control the number of
  9464. impacted functions and more easily compute the list of impacted function,
  9465. \&\s-1IPA\s0 optimizations can be partially enabled at two different levels.
  9466. .Sp
  9467. The \fIlevel\fR argument should be one of the following:
  9468. .RS 4
  9469. .IP "\fBinline-clone\fR" 4
  9470. .IX Item "inline-clone"
  9471. Only enable inlining and cloning optimizations, which includes inlining,
  9472. cloning, interprocedural scalar replacement of aggregates and partial inlining.
  9473. As a result, when patching a function, all its callers and its clones'
  9474. callers are impacted, therefore need to be patched as well.
  9475. .Sp
  9476. \&\fB\-flive\-patching=inline\-clone\fR disables the following optimization flags:
  9477. \&\fB\-fwhole\-program \-fipa\-pta \-fipa\-reference \-fipa\-ra
  9478. \&\-fipa\-icf \-fipa\-icf\-functions \-fipa\-icf\-variables
  9479. \&\-fipa\-bit\-cp \-fipa\-vrp \-fipa\-pure\-const \-fipa\-reference\-addressable
  9480. \&\-fipa\-stack\-alignment\fR
  9481. .IP "\fBinline-only-static\fR" 4
  9482. .IX Item "inline-only-static"
  9483. Only enable inlining of static functions.
  9484. As a result, when patching a static function, all its callers are impacted
  9485. and so need to be patched as well.
  9486. .Sp
  9487. In addition to all the flags that \fB\-flive\-patching=inline\-clone\fR
  9488. disables,
  9489. \&\fB\-flive\-patching=inline\-only\-static\fR disables the following additional
  9490. optimization flags:
  9491. \&\fB\-fipa\-cp\-clone \-fipa\-sra \-fpartial\-inlining \-fipa\-cp\fR
  9492. .RE
  9493. .RS 4
  9494. .Sp
  9495. When \fB\-flive\-patching\fR is specified without any value, the default value
  9496. is \fIinline-clone\fR.
  9497. .Sp
  9498. This flag is disabled by default.
  9499. .Sp
  9500. Note that \fB\-flive\-patching\fR is not supported with link-time optimization
  9501. (\fB\-flto\fR).
  9502. .RE
  9503. .IP "\fB\-fisolate\-erroneous\-paths\-dereference\fR" 4
  9504. .IX Item "-fisolate-erroneous-paths-dereference"
  9505. Detect paths that trigger erroneous or undefined behavior due to
  9506. dereferencing a null pointer. Isolate those paths from the main control
  9507. flow and turn the statement with erroneous or undefined behavior into a trap.
  9508. This flag is enabled by default at \fB\-O2\fR and higher and depends on
  9509. \&\fB\-fdelete\-null\-pointer\-checks\fR also being enabled.
  9510. .IP "\fB\-fisolate\-erroneous\-paths\-attribute\fR" 4
  9511. .IX Item "-fisolate-erroneous-paths-attribute"
  9512. Detect paths that trigger erroneous or undefined behavior due to a null value
  9513. being used in a way forbidden by a \f(CW\*(C`returns_nonnull\*(C'\fR or \f(CW\*(C`nonnull\*(C'\fR
  9514. attribute. Isolate those paths from the main control flow and turn the
  9515. statement with erroneous or undefined behavior into a trap. This is not
  9516. currently enabled, but may be enabled by \fB\-O2\fR in the future.
  9517. .IP "\fB\-ftree\-sink\fR" 4
  9518. .IX Item "-ftree-sink"
  9519. Perform forward store motion on trees. This flag is
  9520. enabled by default at \fB\-O\fR and higher.
  9521. .IP "\fB\-ftree\-bit\-ccp\fR" 4
  9522. .IX Item "-ftree-bit-ccp"
  9523. Perform sparse conditional bit constant propagation on trees and propagate
  9524. pointer alignment information.
  9525. This pass only operates on local scalar variables and is enabled by default
  9526. at \fB\-O1\fR and higher, except for \fB\-Og\fR.
  9527. It requires that \fB\-ftree\-ccp\fR is enabled.
  9528. .IP "\fB\-ftree\-ccp\fR" 4
  9529. .IX Item "-ftree-ccp"
  9530. Perform sparse conditional constant propagation (\s-1CCP\s0) on trees. This
  9531. pass only operates on local scalar variables and is enabled by default
  9532. at \fB\-O\fR and higher.
  9533. .IP "\fB\-fssa\-backprop\fR" 4
  9534. .IX Item "-fssa-backprop"
  9535. Propagate information about uses of a value up the definition chain
  9536. in order to simplify the definitions. For example, this pass strips
  9537. sign operations if the sign of a value never matters. The flag is
  9538. enabled by default at \fB\-O\fR and higher.
  9539. .IP "\fB\-fssa\-phiopt\fR" 4
  9540. .IX Item "-fssa-phiopt"
  9541. Perform pattern matching on \s-1SSA PHI\s0 nodes to optimize conditional
  9542. code. This pass is enabled by default at \fB\-O1\fR and higher,
  9543. except for \fB\-Og\fR.
  9544. .IP "\fB\-ftree\-switch\-conversion\fR" 4
  9545. .IX Item "-ftree-switch-conversion"
  9546. Perform conversion of simple initializations in a switch to
  9547. initializations from a scalar array. This flag is enabled by default
  9548. at \fB\-O2\fR and higher.
  9549. .IP "\fB\-ftree\-tail\-merge\fR" 4
  9550. .IX Item "-ftree-tail-merge"
  9551. Look for identical code sequences. When found, replace one with a jump to the
  9552. other. This optimization is known as tail merging or cross jumping. This flag
  9553. is enabled by default at \fB\-O2\fR and higher. The compilation time
  9554. in this pass can
  9555. be limited using \fBmax-tail-merge-comparisons\fR parameter and
  9556. \&\fBmax-tail-merge-iterations\fR parameter.
  9557. .IP "\fB\-ftree\-dce\fR" 4
  9558. .IX Item "-ftree-dce"
  9559. Perform dead code elimination (\s-1DCE\s0) on trees. This flag is enabled by
  9560. default at \fB\-O\fR and higher.
  9561. .IP "\fB\-ftree\-builtin\-call\-dce\fR" 4
  9562. .IX Item "-ftree-builtin-call-dce"
  9563. Perform conditional dead code elimination (\s-1DCE\s0) for calls to built-in functions
  9564. that may set \f(CW\*(C`errno\*(C'\fR but are otherwise free of side effects. This flag is
  9565. enabled by default at \fB\-O2\fR and higher if \fB\-Os\fR is not also
  9566. specified.
  9567. .IP "\fB\-ffinite\-loops\fR" 4
  9568. .IX Item "-ffinite-loops"
  9569. Assume that a loop with an exit will eventually take the exit and not loop
  9570. indefinitely. This allows the compiler to remove loops that otherwise have
  9571. no side-effects, not considering eventual endless looping as such.
  9572. .Sp
  9573. This option is enabled by default at \fB\-O2\fR for \*(C+ with \-std=c++11
  9574. or higher.
  9575. .IP "\fB\-ftree\-dominator\-opts\fR" 4
  9576. .IX Item "-ftree-dominator-opts"
  9577. Perform a variety of simple scalar cleanups (constant/copy
  9578. propagation, redundancy elimination, range propagation and expression
  9579. simplification) based on a dominator tree traversal. This also
  9580. performs jump threading (to reduce jumps to jumps). This flag is
  9581. enabled by default at \fB\-O\fR and higher.
  9582. .IP "\fB\-ftree\-dse\fR" 4
  9583. .IX Item "-ftree-dse"
  9584. Perform dead store elimination (\s-1DSE\s0) on trees. A dead store is a store into
  9585. a memory location that is later overwritten by another store without
  9586. any intervening loads. In this case the earlier store can be deleted. This
  9587. flag is enabled by default at \fB\-O\fR and higher.
  9588. .IP "\fB\-ftree\-ch\fR" 4
  9589. .IX Item "-ftree-ch"
  9590. Perform loop header copying on trees. This is beneficial since it increases
  9591. effectiveness of code motion optimizations. It also saves one jump. This flag
  9592. is enabled by default at \fB\-O\fR and higher. It is not enabled
  9593. for \fB\-Os\fR, since it usually increases code size.
  9594. .IP "\fB\-ftree\-loop\-optimize\fR" 4
  9595. .IX Item "-ftree-loop-optimize"
  9596. Perform loop optimizations on trees. This flag is enabled by default
  9597. at \fB\-O\fR and higher.
  9598. .IP "\fB\-ftree\-loop\-linear\fR" 4
  9599. .IX Item "-ftree-loop-linear"
  9600. .PD 0
  9601. .IP "\fB\-floop\-strip\-mine\fR" 4
  9602. .IX Item "-floop-strip-mine"
  9603. .IP "\fB\-floop\-block\fR" 4
  9604. .IX Item "-floop-block"
  9605. .PD
  9606. Perform loop nest optimizations. Same as
  9607. \&\fB\-floop\-nest\-optimize\fR. To use this code transformation, \s-1GCC\s0 has
  9608. to be configured with \fB\-\-with\-isl\fR to enable the Graphite loop
  9609. transformation infrastructure.
  9610. .IP "\fB\-fgraphite\-identity\fR" 4
  9611. .IX Item "-fgraphite-identity"
  9612. Enable the identity transformation for graphite. For every SCoP we generate
  9613. the polyhedral representation and transform it back to gimple. Using
  9614. \&\fB\-fgraphite\-identity\fR we can check the costs or benefits of the
  9615. \&\s-1GIMPLE \-\s0> \s-1GRAPHITE \-\s0> \s-1GIMPLE\s0 transformation. Some minimal optimizations
  9616. are also performed by the code generator isl, like index splitting and
  9617. dead code elimination in loops.
  9618. .IP "\fB\-floop\-nest\-optimize\fR" 4
  9619. .IX Item "-floop-nest-optimize"
  9620. Enable the isl based loop nest optimizer. This is a generic loop nest
  9621. optimizer based on the Pluto optimization algorithms. It calculates a loop
  9622. structure optimized for data-locality and parallelism. This option
  9623. is experimental.
  9624. .IP "\fB\-floop\-parallelize\-all\fR" 4
  9625. .IX Item "-floop-parallelize-all"
  9626. Use the Graphite data dependence analysis to identify loops that can
  9627. be parallelized. Parallelize all the loops that can be analyzed to
  9628. not contain loop carried dependences without checking that it is
  9629. profitable to parallelize the loops.
  9630. .IP "\fB\-ftree\-coalesce\-vars\fR" 4
  9631. .IX Item "-ftree-coalesce-vars"
  9632. While transforming the program out of the \s-1SSA\s0 representation, attempt to
  9633. reduce copying by coalescing versions of different user-defined
  9634. variables, instead of just compiler temporaries. This may severely
  9635. limit the ability to debug an optimized program compiled with
  9636. \&\fB\-fno\-var\-tracking\-assignments\fR. In the negated form, this flag
  9637. prevents \s-1SSA\s0 coalescing of user variables. This option is enabled by
  9638. default if optimization is enabled, and it does very little otherwise.
  9639. .IP "\fB\-ftree\-loop\-if\-convert\fR" 4
  9640. .IX Item "-ftree-loop-if-convert"
  9641. Attempt to transform conditional jumps in the innermost loops to
  9642. branch-less equivalents. The intent is to remove control-flow from
  9643. the innermost loops in order to improve the ability of the
  9644. vectorization pass to handle these loops. This is enabled by default
  9645. if vectorization is enabled.
  9646. .IP "\fB\-ftree\-loop\-distribution\fR" 4
  9647. .IX Item "-ftree-loop-distribution"
  9648. Perform loop distribution. This flag can improve cache performance on
  9649. big loop bodies and allow further loop optimizations, like
  9650. parallelization or vectorization, to take place. For example, the loop
  9651. .Sp
  9652. .Vb 4
  9653. \& DO I = 1, N
  9654. \& A(I) = B(I) + C
  9655. \& D(I) = E(I) * F
  9656. \& ENDDO
  9657. .Ve
  9658. .Sp
  9659. is transformed to
  9660. .Sp
  9661. .Vb 6
  9662. \& DO I = 1, N
  9663. \& A(I) = B(I) + C
  9664. \& ENDDO
  9665. \& DO I = 1, N
  9666. \& D(I) = E(I) * F
  9667. \& ENDDO
  9668. .Ve
  9669. .Sp
  9670. This flag is enabled by default at \fB\-O3\fR.
  9671. It is also enabled by \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  9672. .IP "\fB\-ftree\-loop\-distribute\-patterns\fR" 4
  9673. .IX Item "-ftree-loop-distribute-patterns"
  9674. Perform loop distribution of patterns that can be code generated with
  9675. calls to a library. This flag is enabled by default at \fB\-O2\fR and
  9676. higher, and by \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  9677. .Sp
  9678. This pass distributes the initialization loops and generates a call to
  9679. memset zero. For example, the loop
  9680. .Sp
  9681. .Vb 4
  9682. \& DO I = 1, N
  9683. \& A(I) = 0
  9684. \& B(I) = A(I) + I
  9685. \& ENDDO
  9686. .Ve
  9687. .Sp
  9688. is transformed to
  9689. .Sp
  9690. .Vb 6
  9691. \& DO I = 1, N
  9692. \& A(I) = 0
  9693. \& ENDDO
  9694. \& DO I = 1, N
  9695. \& B(I) = A(I) + I
  9696. \& ENDDO
  9697. .Ve
  9698. .Sp
  9699. and the initialization loop is transformed into a call to memset zero.
  9700. This flag is enabled by default at \fB\-O3\fR.
  9701. It is also enabled by \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  9702. .IP "\fB\-floop\-interchange\fR" 4
  9703. .IX Item "-floop-interchange"
  9704. Perform loop interchange outside of graphite. This flag can improve cache
  9705. performance on loop nest and allow further loop optimizations, like
  9706. vectorization, to take place. For example, the loop
  9707. .Sp
  9708. .Vb 4
  9709. \& for (int i = 0; i < N; i++)
  9710. \& for (int j = 0; j < N; j++)
  9711. \& for (int k = 0; k < N; k++)
  9712. \& c[i][j] = c[i][j] + a[i][k]*b[k][j];
  9713. .Ve
  9714. .Sp
  9715. is transformed to
  9716. .Sp
  9717. .Vb 4
  9718. \& for (int i = 0; i < N; i++)
  9719. \& for (int k = 0; k < N; k++)
  9720. \& for (int j = 0; j < N; j++)
  9721. \& c[i][j] = c[i][j] + a[i][k]*b[k][j];
  9722. .Ve
  9723. .Sp
  9724. This flag is enabled by default at \fB\-O3\fR.
  9725. It is also enabled by \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  9726. .IP "\fB\-floop\-unroll\-and\-jam\fR" 4
  9727. .IX Item "-floop-unroll-and-jam"
  9728. Apply unroll and jam transformations on feasible loops. In a loop
  9729. nest this unrolls the outer loop by some factor and fuses the resulting
  9730. multiple inner loops. This flag is enabled by default at \fB\-O3\fR.
  9731. It is also enabled by \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  9732. .IP "\fB\-ftree\-loop\-im\fR" 4
  9733. .IX Item "-ftree-loop-im"
  9734. Perform loop invariant motion on trees. This pass moves only invariants that
  9735. are hard to handle at \s-1RTL\s0 level (function calls, operations that expand to
  9736. nontrivial sequences of insns). With \fB\-funswitch\-loops\fR it also moves
  9737. operands of conditions that are invariant out of the loop, so that we can use
  9738. just trivial invariantness analysis in loop unswitching. The pass also includes
  9739. store motion.
  9740. .IP "\fB\-ftree\-loop\-ivcanon\fR" 4
  9741. .IX Item "-ftree-loop-ivcanon"
  9742. Create a canonical counter for number of iterations in loops for which
  9743. determining number of iterations requires complicated analysis. Later
  9744. optimizations then may determine the number easily. Useful especially
  9745. in connection with unrolling.
  9746. .IP "\fB\-ftree\-scev\-cprop\fR" 4
  9747. .IX Item "-ftree-scev-cprop"
  9748. Perform final value replacement. If a variable is modified in a loop
  9749. in such a way that its value when exiting the loop can be determined using
  9750. only its initial value and the number of loop iterations, replace uses of
  9751. the final value by such a computation, provided it is sufficiently cheap.
  9752. This reduces data dependencies and may allow further simplifications.
  9753. Enabled by default at \fB\-O\fR and higher.
  9754. .IP "\fB\-fivopts\fR" 4
  9755. .IX Item "-fivopts"
  9756. Perform induction variable optimizations (strength reduction, induction
  9757. variable merging and induction variable elimination) on trees.
  9758. .IP "\fB\-ftree\-parallelize\-loops=n\fR" 4
  9759. .IX Item "-ftree-parallelize-loops=n"
  9760. Parallelize loops, i.e., split their iteration space to run in n threads.
  9761. This is only possible for loops whose iterations are independent
  9762. and can be arbitrarily reordered. The optimization is only
  9763. profitable on multiprocessor machines, for loops that are CPU-intensive,
  9764. rather than constrained e.g. by memory bandwidth. This option
  9765. implies \fB\-pthread\fR, and thus is only supported on targets
  9766. that have support for \fB\-pthread\fR.
  9767. .IP "\fB\-ftree\-pta\fR" 4
  9768. .IX Item "-ftree-pta"
  9769. Perform function-local points-to analysis on trees. This flag is
  9770. enabled by default at \fB\-O1\fR and higher, except for \fB\-Og\fR.
  9771. .IP "\fB\-ftree\-sra\fR" 4
  9772. .IX Item "-ftree-sra"
  9773. Perform scalar replacement of aggregates. This pass replaces structure
  9774. references with scalars to prevent committing structures to memory too
  9775. early. This flag is enabled by default at \fB\-O1\fR and higher,
  9776. except for \fB\-Og\fR.
  9777. .IP "\fB\-fstore\-merging\fR" 4
  9778. .IX Item "-fstore-merging"
  9779. Perform merging of narrow stores to consecutive memory addresses. This pass
  9780. merges contiguous stores of immediate values narrower than a word into fewer
  9781. wider stores to reduce the number of instructions. This is enabled by default
  9782. at \fB\-O2\fR and higher as well as \fB\-Os\fR.
  9783. .IP "\fB\-ftree\-ter\fR" 4
  9784. .IX Item "-ftree-ter"
  9785. Perform temporary expression replacement during the \s-1SSA\-\s0>normal phase. Single
  9786. use/single def temporaries are replaced at their use location with their
  9787. defining expression. This results in non-GIMPLE code, but gives the expanders
  9788. much more complex trees to work on resulting in better \s-1RTL\s0 generation. This is
  9789. enabled by default at \fB\-O\fR and higher.
  9790. .IP "\fB\-ftree\-slsr\fR" 4
  9791. .IX Item "-ftree-slsr"
  9792. Perform straight-line strength reduction on trees. This recognizes related
  9793. expressions involving multiplications and replaces them by less expensive
  9794. calculations when possible. This is enabled by default at \fB\-O\fR and
  9795. higher.
  9796. .IP "\fB\-ftree\-vectorize\fR" 4
  9797. .IX Item "-ftree-vectorize"
  9798. Perform vectorization on trees. This flag enables \fB\-ftree\-loop\-vectorize\fR
  9799. and \fB\-ftree\-slp\-vectorize\fR if not explicitly specified.
  9800. .IP "\fB\-ftree\-loop\-vectorize\fR" 4
  9801. .IX Item "-ftree-loop-vectorize"
  9802. Perform loop vectorization on trees. This flag is enabled by default at
  9803. \&\fB\-O3\fR and by \fB\-ftree\-vectorize\fR, \fB\-fprofile\-use\fR,
  9804. and \fB\-fauto\-profile\fR.
  9805. .IP "\fB\-ftree\-slp\-vectorize\fR" 4
  9806. .IX Item "-ftree-slp-vectorize"
  9807. Perform basic block vectorization on trees. This flag is enabled by default at
  9808. \&\fB\-O3\fR and by \fB\-ftree\-vectorize\fR, \fB\-fprofile\-use\fR,
  9809. and \fB\-fauto\-profile\fR.
  9810. .IP "\fB\-fvect\-cost\-model=\fR\fImodel\fR" 4
  9811. .IX Item "-fvect-cost-model=model"
  9812. Alter the cost model used for vectorization. The \fImodel\fR argument
  9813. should be one of \fBunlimited\fR, \fBdynamic\fR or \fBcheap\fR.
  9814. With the \fBunlimited\fR model the vectorized code-path is assumed
  9815. to be profitable while with the \fBdynamic\fR model a runtime check
  9816. guards the vectorized code-path to enable it only for iteration
  9817. counts that will likely execute faster than when executing the original
  9818. scalar loop. The \fBcheap\fR model disables vectorization of
  9819. loops where doing so would be cost prohibitive for example due to
  9820. required runtime checks for data dependence or alignment but otherwise
  9821. is equal to the \fBdynamic\fR model.
  9822. The default cost model depends on other optimization flags and is
  9823. either \fBdynamic\fR or \fBcheap\fR.
  9824. .IP "\fB\-fsimd\-cost\-model=\fR\fImodel\fR" 4
  9825. .IX Item "-fsimd-cost-model=model"
  9826. Alter the cost model used for vectorization of loops marked with the OpenMP
  9827. simd directive. The \fImodel\fR argument should be one of
  9828. \&\fBunlimited\fR, \fBdynamic\fR, \fBcheap\fR. All values of \fImodel\fR
  9829. have the same meaning as described in \fB\-fvect\-cost\-model\fR and by
  9830. default a cost model defined with \fB\-fvect\-cost\-model\fR is used.
  9831. .IP "\fB\-ftree\-vrp\fR" 4
  9832. .IX Item "-ftree-vrp"
  9833. Perform Value Range Propagation on trees. This is similar to the
  9834. constant propagation pass, but instead of values, ranges of values are
  9835. propagated. This allows the optimizers to remove unnecessary range
  9836. checks like array bound checks and null pointer checks. This is
  9837. enabled by default at \fB\-O2\fR and higher. Null pointer check
  9838. elimination is only done if \fB\-fdelete\-null\-pointer\-checks\fR is
  9839. enabled.
  9840. .IP "\fB\-fsplit\-paths\fR" 4
  9841. .IX Item "-fsplit-paths"
  9842. Split paths leading to loop backedges. This can improve dead code
  9843. elimination and common subexpression elimination. This is enabled by
  9844. default at \fB\-O3\fR and above.
  9845. .IP "\fB\-fsplit\-ivs\-in\-unroller\fR" 4
  9846. .IX Item "-fsplit-ivs-in-unroller"
  9847. Enables expression of values of induction variables in later iterations
  9848. of the unrolled loop using the value in the first iteration. This breaks
  9849. long dependency chains, thus improving efficiency of the scheduling passes.
  9850. .Sp
  9851. A combination of \fB\-fweb\fR and \s-1CSE\s0 is often sufficient to obtain the
  9852. same effect. However, that is not reliable in cases where the loop body
  9853. is more complicated than a single basic block. It also does not work at all
  9854. on some architectures due to restrictions in the \s-1CSE\s0 pass.
  9855. .Sp
  9856. This optimization is enabled by default.
  9857. .IP "\fB\-fvariable\-expansion\-in\-unroller\fR" 4
  9858. .IX Item "-fvariable-expansion-in-unroller"
  9859. With this option, the compiler creates multiple copies of some
  9860. local variables when unrolling a loop, which can result in superior code.
  9861. .Sp
  9862. This optimization is enabled by default for PowerPC targets, but disabled
  9863. by default otherwise.
  9864. .IP "\fB\-fpartial\-inlining\fR" 4
  9865. .IX Item "-fpartial-inlining"
  9866. Inline parts of functions. This option has any effect only
  9867. when inlining itself is turned on by the \fB\-finline\-functions\fR
  9868. or \fB\-finline\-small\-functions\fR options.
  9869. .Sp
  9870. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  9871. .IP "\fB\-fpredictive\-commoning\fR" 4
  9872. .IX Item "-fpredictive-commoning"
  9873. Perform predictive commoning optimization, i.e., reusing computations
  9874. (especially memory loads and stores) performed in previous
  9875. iterations of loops.
  9876. .Sp
  9877. This option is enabled at level \fB\-O3\fR.
  9878. It is also enabled by \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  9879. .IP "\fB\-fprefetch\-loop\-arrays\fR" 4
  9880. .IX Item "-fprefetch-loop-arrays"
  9881. If supported by the target machine, generate instructions to prefetch
  9882. memory to improve the performance of loops that access large arrays.
  9883. .Sp
  9884. This option may generate better or worse code; results are highly
  9885. dependent on the structure of loops within the source code.
  9886. .Sp
  9887. Disabled at level \fB\-Os\fR.
  9888. .IP "\fB\-fno\-printf\-return\-value\fR" 4
  9889. .IX Item "-fno-printf-return-value"
  9890. Do not substitute constants for known return value of formatted output
  9891. functions such as \f(CW\*(C`sprintf\*(C'\fR, \f(CW\*(C`snprintf\*(C'\fR, \f(CW\*(C`vsprintf\*(C'\fR, and
  9892. \&\f(CW\*(C`vsnprintf\*(C'\fR (but not \f(CW\*(C`printf\*(C'\fR of \f(CW\*(C`fprintf\*(C'\fR). This
  9893. transformation allows \s-1GCC\s0 to optimize or even eliminate branches based
  9894. on the known return value of these functions called with arguments that
  9895. are either constant, or whose values are known to be in a range that
  9896. makes determining the exact return value possible. For example, when
  9897. \&\fB\-fprintf\-return\-value\fR is in effect, both the branch and the
  9898. body of the \f(CW\*(C`if\*(C'\fR statement (but not the call to \f(CW\*(C`snprint\*(C'\fR)
  9899. can be optimized away when \f(CW\*(C`i\*(C'\fR is a 32\-bit or smaller integer
  9900. because the return value is guaranteed to be at most 8.
  9901. .Sp
  9902. .Vb 3
  9903. \& char buf[9];
  9904. \& if (snprintf (buf, "%08x", i) >= sizeof buf)
  9905. \& ...
  9906. .Ve
  9907. .Sp
  9908. The \fB\-fprintf\-return\-value\fR option relies on other optimizations
  9909. and yields best results with \fB\-O2\fR and above. It works in tandem
  9910. with the \fB\-Wformat\-overflow\fR and \fB\-Wformat\-truncation\fR
  9911. options. The \fB\-fprintf\-return\-value\fR option is enabled by default.
  9912. .IP "\fB\-fno\-peephole\fR" 4
  9913. .IX Item "-fno-peephole"
  9914. .PD 0
  9915. .IP "\fB\-fno\-peephole2\fR" 4
  9916. .IX Item "-fno-peephole2"
  9917. .PD
  9918. Disable any machine-specific peephole optimizations. The difference
  9919. between \fB\-fno\-peephole\fR and \fB\-fno\-peephole2\fR is in how they
  9920. are implemented in the compiler; some targets use one, some use the
  9921. other, a few use both.
  9922. .Sp
  9923. \&\fB\-fpeephole\fR is enabled by default.
  9924. \&\fB\-fpeephole2\fR enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  9925. .IP "\fB\-fno\-guess\-branch\-probability\fR" 4
  9926. .IX Item "-fno-guess-branch-probability"
  9927. Do not guess branch probabilities using heuristics.
  9928. .Sp
  9929. \&\s-1GCC\s0 uses heuristics to guess branch probabilities if they are
  9930. not provided by profiling feedback (\fB\-fprofile\-arcs\fR). These
  9931. heuristics are based on the control flow graph. If some branch probabilities
  9932. are specified by \f(CW\*(C`_\|_builtin_expect\*(C'\fR, then the heuristics are
  9933. used to guess branch probabilities for the rest of the control flow graph,
  9934. taking the \f(CW\*(C`_\|_builtin_expect\*(C'\fR info into account. The interactions
  9935. between the heuristics and \f(CW\*(C`_\|_builtin_expect\*(C'\fR can be complex, and in
  9936. some cases, it may be useful to disable the heuristics so that the effects
  9937. of \f(CW\*(C`_\|_builtin_expect\*(C'\fR are easier to understand.
  9938. .Sp
  9939. It is also possible to specify expected probability of the expression
  9940. with \f(CW\*(C`_\|_builtin_expect_with_probability\*(C'\fR built-in function.
  9941. .Sp
  9942. The default is \fB\-fguess\-branch\-probability\fR at levels
  9943. \&\fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  9944. .IP "\fB\-freorder\-blocks\fR" 4
  9945. .IX Item "-freorder-blocks"
  9946. Reorder basic blocks in the compiled function in order to reduce number of
  9947. taken branches and improve code locality.
  9948. .Sp
  9949. Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  9950. .IP "\fB\-freorder\-blocks\-algorithm=\fR\fIalgorithm\fR" 4
  9951. .IX Item "-freorder-blocks-algorithm=algorithm"
  9952. Use the specified algorithm for basic block reordering. The
  9953. \&\fIalgorithm\fR argument can be \fBsimple\fR, which does not increase
  9954. code size (except sometimes due to secondary effects like alignment),
  9955. or \fBstc\fR, the \*(L"software trace cache\*(R" algorithm, which tries to
  9956. put all often executed code together, minimizing the number of branches
  9957. executed by making extra copies of code.
  9958. .Sp
  9959. The default is \fBsimple\fR at levels \fB\-O\fR, \fB\-Os\fR, and
  9960. \&\fBstc\fR at levels \fB\-O2\fR, \fB\-O3\fR.
  9961. .IP "\fB\-freorder\-blocks\-and\-partition\fR" 4
  9962. .IX Item "-freorder-blocks-and-partition"
  9963. In addition to reordering basic blocks in the compiled function, in order
  9964. to reduce number of taken branches, partitions hot and cold basic blocks
  9965. into separate sections of the assembly and \fI.o\fR files, to improve
  9966. paging and cache locality performance.
  9967. .Sp
  9968. This optimization is automatically turned off in the presence of
  9969. exception handling or unwind tables (on targets using setjump/longjump or target specific scheme), for linkonce sections, for functions with a user-defined
  9970. section attribute and on any architecture that does not support named
  9971. sections. When \fB\-fsplit\-stack\fR is used this option is not
  9972. enabled by default (to avoid linker errors), but may be enabled
  9973. explicitly (if using a working linker).
  9974. .Sp
  9975. Enabled for x86 at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  9976. .IP "\fB\-freorder\-functions\fR" 4
  9977. .IX Item "-freorder-functions"
  9978. Reorder functions in the object file in order to
  9979. improve code locality. This is implemented by using special
  9980. subsections \f(CW\*(C`.text.hot\*(C'\fR for most frequently executed functions and
  9981. \&\f(CW\*(C`.text.unlikely\*(C'\fR for unlikely executed functions. Reordering is done by
  9982. the linker so object file format must support named sections and linker must
  9983. place them in a reasonable way.
  9984. .Sp
  9985. This option isn't effective unless you either provide profile feedback
  9986. (see \fB\-fprofile\-arcs\fR for details) or manually annotate functions with
  9987. \&\f(CW\*(C`hot\*(C'\fR or \f(CW\*(C`cold\*(C'\fR attributes.
  9988. .Sp
  9989. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  9990. .IP "\fB\-fstrict\-aliasing\fR" 4
  9991. .IX Item "-fstrict-aliasing"
  9992. Allow the compiler to assume the strictest aliasing rules applicable to
  9993. the language being compiled. For C (and \*(C+), this activates
  9994. optimizations based on the type of expressions. In particular, an
  9995. object of one type is assumed never to reside at the same address as an
  9996. object of a different type, unless the types are almost the same. For
  9997. example, an \f(CW\*(C`unsigned int\*(C'\fR can alias an \f(CW\*(C`int\*(C'\fR, but not a
  9998. \&\f(CW\*(C`void*\*(C'\fR or a \f(CW\*(C`double\*(C'\fR. A character type may alias any other
  9999. type.
  10000. .Sp
  10001. Pay special attention to code like this:
  10002. .Sp
  10003. .Vb 4
  10004. \& union a_union {
  10005. \& int i;
  10006. \& double d;
  10007. \& };
  10008. \&
  10009. \& int f() {
  10010. \& union a_union t;
  10011. \& t.d = 3.0;
  10012. \& return t.i;
  10013. \& }
  10014. .Ve
  10015. .Sp
  10016. The practice of reading from a different union member than the one most
  10017. recently written to (called \*(L"type-punning\*(R") is common. Even with
  10018. \&\fB\-fstrict\-aliasing\fR, type-punning is allowed, provided the memory
  10019. is accessed through the union type. So, the code above works as
  10020. expected. However, this code might not:
  10021. .Sp
  10022. .Vb 7
  10023. \& int f() {
  10024. \& union a_union t;
  10025. \& int* ip;
  10026. \& t.d = 3.0;
  10027. \& ip = &t.i;
  10028. \& return *ip;
  10029. \& }
  10030. .Ve
  10031. .Sp
  10032. Similarly, access by taking the address, casting the resulting pointer
  10033. and dereferencing the result has undefined behavior, even if the cast
  10034. uses a union type, e.g.:
  10035. .Sp
  10036. .Vb 4
  10037. \& int f() {
  10038. \& double d = 3.0;
  10039. \& return ((union a_union *) &d)\->i;
  10040. \& }
  10041. .Ve
  10042. .Sp
  10043. The \fB\-fstrict\-aliasing\fR option is enabled at levels
  10044. \&\fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  10045. .IP "\fB\-falign\-functions\fR" 4
  10046. .IX Item "-falign-functions"
  10047. .PD 0
  10048. .IP "\fB\-falign\-functions=\fR\fIn\fR" 4
  10049. .IX Item "-falign-functions=n"
  10050. .IP "\fB\-falign\-functions=\fR\fIn\fR\fB:\fR\fIm\fR" 4
  10051. .IX Item "-falign-functions=n:m"
  10052. .IP "\fB\-falign\-functions=\fR\fIn\fR\fB:\fR\fIm\fR\fB:\fR\fIn2\fR" 4
  10053. .IX Item "-falign-functions=n:m:n2"
  10054. .IP "\fB\-falign\-functions=\fR\fIn\fR\fB:\fR\fIm\fR\fB:\fR\fIn2\fR\fB:\fR\fIm2\fR" 4
  10055. .IX Item "-falign-functions=n:m:n2:m2"
  10056. .PD
  10057. Align the start of functions to the next power-of-two greater than or
  10058. equal to \fIn\fR, skipping up to \fIm\fR\-1 bytes. This ensures that at
  10059. least the first \fIm\fR bytes of the function can be fetched by the \s-1CPU\s0
  10060. without crossing an \fIn\fR\-byte alignment boundary.
  10061. .Sp
  10062. If \fIm\fR is not specified, it defaults to \fIn\fR.
  10063. .Sp
  10064. Examples: \fB\-falign\-functions=32\fR aligns functions to the next
  10065. 32\-byte boundary, \fB\-falign\-functions=24\fR aligns to the next
  10066. 32\-byte boundary only if this can be done by skipping 23 bytes or less,
  10067. \&\fB\-falign\-functions=32:7\fR aligns to the next
  10068. 32\-byte boundary only if this can be done by skipping 6 bytes or less.
  10069. .Sp
  10070. The second pair of \fIn2\fR:\fIm2\fR values allows you to specify
  10071. a secondary alignment: \fB\-falign\-functions=64:7:32:3\fR aligns to
  10072. the next 64\-byte boundary if this can be done by skipping 6 bytes or less,
  10073. otherwise aligns to the next 32\-byte boundary if this can be done
  10074. by skipping 2 bytes or less.
  10075. If \fIm2\fR is not specified, it defaults to \fIn2\fR.
  10076. .Sp
  10077. Some assemblers only support this flag when \fIn\fR is a power of two;
  10078. in that case, it is rounded up.
  10079. .Sp
  10080. \&\fB\-fno\-align\-functions\fR and \fB\-falign\-functions=1\fR are
  10081. equivalent and mean that functions are not aligned.
  10082. .Sp
  10083. If \fIn\fR is not specified or is zero, use a machine-dependent default.
  10084. The maximum allowed \fIn\fR option value is 65536.
  10085. .Sp
  10086. Enabled at levels \fB\-O2\fR, \fB\-O3\fR.
  10087. .IP "\fB\-flimit\-function\-alignment\fR" 4
  10088. .IX Item "-flimit-function-alignment"
  10089. If this option is enabled, the compiler tries to avoid unnecessarily
  10090. overaligning functions. It attempts to instruct the assembler to align
  10091. by the amount specified by \fB\-falign\-functions\fR, but not to
  10092. skip more bytes than the size of the function.
  10093. .IP "\fB\-falign\-labels\fR" 4
  10094. .IX Item "-falign-labels"
  10095. .PD 0
  10096. .IP "\fB\-falign\-labels=\fR\fIn\fR" 4
  10097. .IX Item "-falign-labels=n"
  10098. .IP "\fB\-falign\-labels=\fR\fIn\fR\fB:\fR\fIm\fR" 4
  10099. .IX Item "-falign-labels=n:m"
  10100. .IP "\fB\-falign\-labels=\fR\fIn\fR\fB:\fR\fIm\fR\fB:\fR\fIn2\fR" 4
  10101. .IX Item "-falign-labels=n:m:n2"
  10102. .IP "\fB\-falign\-labels=\fR\fIn\fR\fB:\fR\fIm\fR\fB:\fR\fIn2\fR\fB:\fR\fIm2\fR" 4
  10103. .IX Item "-falign-labels=n:m:n2:m2"
  10104. .PD
  10105. Align all branch targets to a power-of-two boundary.
  10106. .Sp
  10107. Parameters of this option are analogous to the \fB\-falign\-functions\fR option.
  10108. \&\fB\-fno\-align\-labels\fR and \fB\-falign\-labels=1\fR are
  10109. equivalent and mean that labels are not aligned.
  10110. .Sp
  10111. If \fB\-falign\-loops\fR or \fB\-falign\-jumps\fR are applicable and
  10112. are greater than this value, then their values are used instead.
  10113. .Sp
  10114. If \fIn\fR is not specified or is zero, use a machine-dependent default
  10115. which is very likely to be \fB1\fR, meaning no alignment.
  10116. The maximum allowed \fIn\fR option value is 65536.
  10117. .Sp
  10118. Enabled at levels \fB\-O2\fR, \fB\-O3\fR.
  10119. .IP "\fB\-falign\-loops\fR" 4
  10120. .IX Item "-falign-loops"
  10121. .PD 0
  10122. .IP "\fB\-falign\-loops=\fR\fIn\fR" 4
  10123. .IX Item "-falign-loops=n"
  10124. .IP "\fB\-falign\-loops=\fR\fIn\fR\fB:\fR\fIm\fR" 4
  10125. .IX Item "-falign-loops=n:m"
  10126. .IP "\fB\-falign\-loops=\fR\fIn\fR\fB:\fR\fIm\fR\fB:\fR\fIn2\fR" 4
  10127. .IX Item "-falign-loops=n:m:n2"
  10128. .IP "\fB\-falign\-loops=\fR\fIn\fR\fB:\fR\fIm\fR\fB:\fR\fIn2\fR\fB:\fR\fIm2\fR" 4
  10129. .IX Item "-falign-loops=n:m:n2:m2"
  10130. .PD
  10131. Align loops to a power-of-two boundary. If the loops are executed
  10132. many times, this makes up for any execution of the dummy padding
  10133. instructions.
  10134. .Sp
  10135. If \fB\-falign\-labels\fR is greater than this value, then its value
  10136. is used instead.
  10137. .Sp
  10138. Parameters of this option are analogous to the \fB\-falign\-functions\fR option.
  10139. \&\fB\-fno\-align\-loops\fR and \fB\-falign\-loops=1\fR are
  10140. equivalent and mean that loops are not aligned.
  10141. The maximum allowed \fIn\fR option value is 65536.
  10142. .Sp
  10143. If \fIn\fR is not specified or is zero, use a machine-dependent default.
  10144. .Sp
  10145. Enabled at levels \fB\-O2\fR, \fB\-O3\fR.
  10146. .IP "\fB\-falign\-jumps\fR" 4
  10147. .IX Item "-falign-jumps"
  10148. .PD 0
  10149. .IP "\fB\-falign\-jumps=\fR\fIn\fR" 4
  10150. .IX Item "-falign-jumps=n"
  10151. .IP "\fB\-falign\-jumps=\fR\fIn\fR\fB:\fR\fIm\fR" 4
  10152. .IX Item "-falign-jumps=n:m"
  10153. .IP "\fB\-falign\-jumps=\fR\fIn\fR\fB:\fR\fIm\fR\fB:\fR\fIn2\fR" 4
  10154. .IX Item "-falign-jumps=n:m:n2"
  10155. .IP "\fB\-falign\-jumps=\fR\fIn\fR\fB:\fR\fIm\fR\fB:\fR\fIn2\fR\fB:\fR\fIm2\fR" 4
  10156. .IX Item "-falign-jumps=n:m:n2:m2"
  10157. .PD
  10158. Align branch targets to a power-of-two boundary, for branch targets
  10159. where the targets can only be reached by jumping. In this case,
  10160. no dummy operations need be executed.
  10161. .Sp
  10162. If \fB\-falign\-labels\fR is greater than this value, then its value
  10163. is used instead.
  10164. .Sp
  10165. Parameters of this option are analogous to the \fB\-falign\-functions\fR option.
  10166. \&\fB\-fno\-align\-jumps\fR and \fB\-falign\-jumps=1\fR are
  10167. equivalent and mean that loops are not aligned.
  10168. .Sp
  10169. If \fIn\fR is not specified or is zero, use a machine-dependent default.
  10170. The maximum allowed \fIn\fR option value is 65536.
  10171. .Sp
  10172. Enabled at levels \fB\-O2\fR, \fB\-O3\fR.
  10173. .IP "\fB\-fno\-allocation\-dce\fR" 4
  10174. .IX Item "-fno-allocation-dce"
  10175. Do not remove unused \*(C+ allocations in dead code elimination.
  10176. .IP "\fB\-fallow\-store\-data\-races\fR" 4
  10177. .IX Item "-fallow-store-data-races"
  10178. Allow the compiler to introduce new data races on stores.
  10179. .Sp
  10180. Enabled at level \fB\-Ofast\fR.
  10181. .IP "\fB\-funit\-at\-a\-time\fR" 4
  10182. .IX Item "-funit-at-a-time"
  10183. This option is left for compatibility reasons. \fB\-funit\-at\-a\-time\fR
  10184. has no effect, while \fB\-fno\-unit\-at\-a\-time\fR implies
  10185. \&\fB\-fno\-toplevel\-reorder\fR and \fB\-fno\-section\-anchors\fR.
  10186. .Sp
  10187. Enabled by default.
  10188. .IP "\fB\-fno\-toplevel\-reorder\fR" 4
  10189. .IX Item "-fno-toplevel-reorder"
  10190. Do not reorder top-level functions, variables, and \f(CW\*(C`asm\*(C'\fR
  10191. statements. Output them in the same order that they appear in the
  10192. input file. When this option is used, unreferenced static variables
  10193. are not removed. This option is intended to support existing code
  10194. that relies on a particular ordering. For new code, it is better to
  10195. use attributes when possible.
  10196. .Sp
  10197. \&\fB\-ftoplevel\-reorder\fR is the default at \fB\-O1\fR and higher, and
  10198. also at \fB\-O0\fR if \fB\-fsection\-anchors\fR is explicitly requested.
  10199. Additionally \fB\-fno\-toplevel\-reorder\fR implies
  10200. \&\fB\-fno\-section\-anchors\fR.
  10201. .IP "\fB\-fweb\fR" 4
  10202. .IX Item "-fweb"
  10203. Constructs webs as commonly used for register allocation purposes and assign
  10204. each web individual pseudo register. This allows the register allocation pass
  10205. to operate on pseudos directly, but also strengthens several other optimization
  10206. passes, such as \s-1CSE,\s0 loop optimizer and trivial dead code remover. It can,
  10207. however, make debugging impossible, since variables no longer stay in a
  10208. \&\*(L"home register\*(R".
  10209. .Sp
  10210. Enabled by default with \fB\-funroll\-loops\fR.
  10211. .IP "\fB\-fwhole\-program\fR" 4
  10212. .IX Item "-fwhole-program"
  10213. Assume that the current compilation unit represents the whole program being
  10214. compiled. All public functions and variables with the exception of \f(CW\*(C`main\*(C'\fR
  10215. and those merged by attribute \f(CW\*(C`externally_visible\*(C'\fR become static functions
  10216. and in effect are optimized more aggressively by interprocedural optimizers.
  10217. .Sp
  10218. This option should not be used in combination with \fB\-flto\fR.
  10219. Instead relying on a linker plugin should provide safer and more precise
  10220. information.
  10221. .IP "\fB\-flto[=\fR\fIn\fR\fB]\fR" 4
  10222. .IX Item "-flto[=n]"
  10223. This option runs the standard link-time optimizer. When invoked
  10224. with source code, it generates \s-1GIMPLE \s0(one of \s-1GCC\s0's internal
  10225. representations) and writes it to special \s-1ELF\s0 sections in the object
  10226. file. When the object files are linked together, all the function
  10227. bodies are read from these \s-1ELF\s0 sections and instantiated as if they
  10228. had been part of the same translation unit.
  10229. .Sp
  10230. To use the link-time optimizer, \fB\-flto\fR and optimization
  10231. options should be specified at compile time and during the final link.
  10232. It is recommended that you compile all the files participating in the
  10233. same link with the same options and also specify those options at
  10234. link time.
  10235. For example:
  10236. .Sp
  10237. .Vb 3
  10238. \& gcc \-c \-O2 \-flto foo.c
  10239. \& gcc \-c \-O2 \-flto bar.c
  10240. \& gcc \-o myprog \-flto \-O2 foo.o bar.o
  10241. .Ve
  10242. .Sp
  10243. The first two invocations to \s-1GCC\s0 save a bytecode representation
  10244. of \s-1GIMPLE\s0 into special \s-1ELF\s0 sections inside \fIfoo.o\fR and
  10245. \&\fIbar.o\fR. The final invocation reads the \s-1GIMPLE\s0 bytecode from
  10246. \&\fIfoo.o\fR and \fIbar.o\fR, merges the two files into a single
  10247. internal image, and compiles the result as usual. Since both
  10248. \&\fIfoo.o\fR and \fIbar.o\fR are merged into a single image, this
  10249. causes all the interprocedural analyses and optimizations in \s-1GCC\s0 to
  10250. work across the two files as if they were a single one. This means,
  10251. for example, that the inliner is able to inline functions in
  10252. \&\fIbar.o\fR into functions in \fIfoo.o\fR and vice-versa.
  10253. .Sp
  10254. Another (simpler) way to enable link-time optimization is:
  10255. .Sp
  10256. .Vb 1
  10257. \& gcc \-o myprog \-flto \-O2 foo.c bar.c
  10258. .Ve
  10259. .Sp
  10260. The above generates bytecode for \fIfoo.c\fR and \fIbar.c\fR,
  10261. merges them together into a single \s-1GIMPLE\s0 representation and optimizes
  10262. them as usual to produce \fImyprog\fR.
  10263. .Sp
  10264. The important thing to keep in mind is that to enable link-time
  10265. optimizations you need to use the \s-1GCC\s0 driver to perform the link step.
  10266. \&\s-1GCC\s0 automatically performs link-time optimization if any of the
  10267. objects involved were compiled with the \fB\-flto\fR command-line option.
  10268. You can always override
  10269. the automatic decision to do link-time optimization
  10270. by passing \fB\-fno\-lto\fR to the link command.
  10271. .Sp
  10272. To make whole program optimization effective, it is necessary to make
  10273. certain whole program assumptions. The compiler needs to know
  10274. what functions and variables can be accessed by libraries and runtime
  10275. outside of the link-time optimized unit. When supported by the linker,
  10276. the linker plugin (see \fB\-fuse\-linker\-plugin\fR) passes information
  10277. to the compiler about used and externally visible symbols. When
  10278. the linker plugin is not available, \fB\-fwhole\-program\fR should be
  10279. used to allow the compiler to make these assumptions, which leads
  10280. to more aggressive optimization decisions.
  10281. .Sp
  10282. When a file is compiled with \fB\-flto\fR without
  10283. \&\fB\-fuse\-linker\-plugin\fR, the generated object file is larger than
  10284. a regular object file because it contains \s-1GIMPLE\s0 bytecodes and the usual
  10285. final code (see \fB\-ffat\-lto\-objects\fR. This means that
  10286. object files with \s-1LTO\s0 information can be linked as normal object
  10287. files; if \fB\-fno\-lto\fR is passed to the linker, no
  10288. interprocedural optimizations are applied. Note that when
  10289. \&\fB\-fno\-fat\-lto\-objects\fR is enabled the compile stage is faster
  10290. but you cannot perform a regular, non-LTO link on them.
  10291. .Sp
  10292. When producing the final binary, \s-1GCC\s0 only
  10293. applies link-time optimizations to those files that contain bytecode.
  10294. Therefore, you can mix and match object files and libraries with
  10295. \&\s-1GIMPLE\s0 bytecodes and final object code. \s-1GCC\s0 automatically selects
  10296. which files to optimize in \s-1LTO\s0 mode and which files to link without
  10297. further processing.
  10298. .Sp
  10299. Generally, options specified at link time override those
  10300. specified at compile time, although in some cases \s-1GCC\s0 attempts to infer
  10301. link-time options from the settings used to compile the input files.
  10302. .Sp
  10303. If you do not specify an optimization level option \fB\-O\fR at
  10304. link time, then \s-1GCC\s0 uses the highest optimization level
  10305. used when compiling the object files. Note that it is generally
  10306. ineffective to specify an optimization level option only at link time and
  10307. not at compile time, for two reasons. First, compiling without
  10308. optimization suppresses compiler passes that gather information
  10309. needed for effective optimization at link time. Second, some early
  10310. optimization passes can be performed only at compile time and
  10311. not at link time.
  10312. .Sp
  10313. There are some code generation flags preserved by \s-1GCC\s0 when
  10314. generating bytecodes, as they need to be used during the final link.
  10315. Currently, the following options and their settings are taken from
  10316. the first object file that explicitly specifies them:
  10317. \&\fB\-fPIC\fR, \fB\-fpic\fR, \fB\-fpie\fR, \fB\-fcommon\fR,
  10318. \&\fB\-fexceptions\fR, \fB\-fnon\-call\-exceptions\fR, \fB\-fgnu\-tm\fR
  10319. and all the \fB\-m\fR target flags.
  10320. .Sp
  10321. Certain ABI-changing flags are required to match in all compilation units,
  10322. and trying to override this at link time with a conflicting value
  10323. is ignored. This includes options such as \fB\-freg\-struct\-return\fR
  10324. and \fB\-fpcc\-struct\-return\fR.
  10325. .Sp
  10326. Other options such as \fB\-ffp\-contract\fR, \fB\-fno\-strict\-overflow\fR,
  10327. \&\fB\-fwrapv\fR, \fB\-fno\-trapv\fR or \fB\-fno\-strict\-aliasing\fR
  10328. are passed through to the link stage and merged conservatively for
  10329. conflicting translation units. Specifically
  10330. \&\fB\-fno\-strict\-overflow\fR, \fB\-fwrapv\fR and \fB\-fno\-trapv\fR take
  10331. precedence; and for example \fB\-ffp\-contract=off\fR takes precedence
  10332. over \fB\-ffp\-contract=fast\fR. You can override them at link time.
  10333. .Sp
  10334. Diagnostic options such as \fB\-Wstringop\-overflow\fR are passed
  10335. through to the link stage and their setting matches that of the
  10336. compile-step at function granularity. Note that this matters only
  10337. for diagnostics emitted during optimization. Note that code
  10338. transforms such as inlining can lead to warnings being enabled
  10339. or disabled for regions if code not consistent with the setting
  10340. at compile time.
  10341. .Sp
  10342. When you need to pass options to the assembler via \fB\-Wa\fR or
  10343. \&\fB\-Xassembler\fR make sure to either compile such translation
  10344. units with \fB\-fno\-lto\fR or consistently use the same assembler
  10345. options on all translation units. You can alternatively also
  10346. specify assembler options at \s-1LTO\s0 link time.
  10347. .Sp
  10348. To enable debug info generation you need to supply \fB\-g\fR at
  10349. compile time. If any of the input files at link time were built
  10350. with debug info generation enabled the link will enable debug info
  10351. generation as well. Any elaborate debug info settings
  10352. like the dwarf level \fB\-gdwarf\-5\fR need to be explicitly repeated
  10353. at the linker command line and mixing different settings in different
  10354. translation units is discouraged.
  10355. .Sp
  10356. If \s-1LTO\s0 encounters objects with C linkage declared with incompatible
  10357. types in separate translation units to be linked together (undefined
  10358. behavior according to \s-1ISO C99 6.2.7\s0), a non-fatal diagnostic may be
  10359. issued. The behavior is still undefined at run time. Similar
  10360. diagnostics may be raised for other languages.
  10361. .Sp
  10362. Another feature of \s-1LTO\s0 is that it is possible to apply interprocedural
  10363. optimizations on files written in different languages:
  10364. .Sp
  10365. .Vb 4
  10366. \& gcc \-c \-flto foo.c
  10367. \& g++ \-c \-flto bar.cc
  10368. \& gfortran \-c \-flto baz.f90
  10369. \& g++ \-o myprog \-flto \-O3 foo.o bar.o baz.o \-lgfortran
  10370. .Ve
  10371. .Sp
  10372. Notice that the final link is done with \fBg++\fR to get the \*(C+
  10373. runtime libraries and \fB\-lgfortran\fR is added to get the Fortran
  10374. runtime libraries. In general, when mixing languages in \s-1LTO\s0 mode, you
  10375. should use the same link command options as when mixing languages in a
  10376. regular (non-LTO) compilation.
  10377. .Sp
  10378. If object files containing \s-1GIMPLE\s0 bytecode are stored in a library archive, say
  10379. \&\fIlibfoo.a\fR, it is possible to extract and use them in an \s-1LTO\s0 link if you
  10380. are using a linker with plugin support. To create static libraries suitable
  10381. for \s-1LTO,\s0 use \fBgcc-ar\fR and \fBgcc-ranlib\fR instead of \fBar\fR
  10382. and \fBranlib\fR;
  10383. to show the symbols of object files with \s-1GIMPLE\s0 bytecode, use
  10384. \&\fBgcc-nm\fR. Those commands require that \fBar\fR, \fBranlib\fR
  10385. and \fBnm\fR have been compiled with plugin support. At link time, use the
  10386. flag \fB\-fuse\-linker\-plugin\fR to ensure that the library participates in
  10387. the \s-1LTO\s0 optimization process:
  10388. .Sp
  10389. .Vb 1
  10390. \& gcc \-o myprog \-O2 \-flto \-fuse\-linker\-plugin a.o b.o \-lfoo
  10391. .Ve
  10392. .Sp
  10393. With the linker plugin enabled, the linker extracts the needed
  10394. \&\s-1GIMPLE\s0 files from \fIlibfoo.a\fR and passes them on to the running \s-1GCC\s0
  10395. to make them part of the aggregated \s-1GIMPLE\s0 image to be optimized.
  10396. .Sp
  10397. If you are not using a linker with plugin support and/or do not
  10398. enable the linker plugin, then the objects inside \fIlibfoo.a\fR
  10399. are extracted and linked as usual, but they do not participate
  10400. in the \s-1LTO\s0 optimization process. In order to make a static library suitable
  10401. for both \s-1LTO\s0 optimization and usual linkage, compile its object files with
  10402. \&\fB\-flto\fR \fB\-ffat\-lto\-objects\fR.
  10403. .Sp
  10404. Link-time optimizations do not require the presence of the whole program to
  10405. operate. If the program does not require any symbols to be exported, it is
  10406. possible to combine \fB\-flto\fR and \fB\-fwhole\-program\fR to allow
  10407. the interprocedural optimizers to use more aggressive assumptions which may
  10408. lead to improved optimization opportunities.
  10409. Use of \fB\-fwhole\-program\fR is not needed when linker plugin is
  10410. active (see \fB\-fuse\-linker\-plugin\fR).
  10411. .Sp
  10412. The current implementation of \s-1LTO\s0 makes no
  10413. attempt to generate bytecode that is portable between different
  10414. types of hosts. The bytecode files are versioned and there is a
  10415. strict version check, so bytecode files generated in one version of
  10416. \&\s-1GCC\s0 do not work with an older or newer version of \s-1GCC.\s0
  10417. .Sp
  10418. Link-time optimization does not work well with generation of debugging
  10419. information on systems other than those using a combination of \s-1ELF\s0 and
  10420. \&\s-1DWARF.\s0
  10421. .Sp
  10422. If you specify the optional \fIn\fR, the optimization and code
  10423. generation done at link time is executed in parallel using \fIn\fR
  10424. parallel jobs by utilizing an installed \fBmake\fR program. The
  10425. environment variable \fB\s-1MAKE\s0\fR may be used to override the program
  10426. used.
  10427. .Sp
  10428. You can also specify \fB\-flto=jobserver\fR to use \s-1GNU\s0 make's
  10429. job server mode to determine the number of parallel jobs. This
  10430. is useful when the Makefile calling \s-1GCC\s0 is already executing in parallel.
  10431. You must prepend a \fB+\fR to the command recipe in the parent Makefile
  10432. for this to work. This option likely only works if \fB\s-1MAKE\s0\fR is
  10433. \&\s-1GNU\s0 make. Even without the option value, \s-1GCC\s0 tries to automatically
  10434. detect a running \s-1GNU\s0 make's job server.
  10435. .Sp
  10436. Use \fB\-flto=auto\fR to use \s-1GNU\s0 make's job server, if available,
  10437. or otherwise fall back to autodetection of the number of \s-1CPU\s0 threads
  10438. present in your system.
  10439. .IP "\fB\-flto\-partition=\fR\fIalg\fR" 4
  10440. .IX Item "-flto-partition=alg"
  10441. Specify the partitioning algorithm used by the link-time optimizer.
  10442. The value is either \fB1to1\fR to specify a partitioning mirroring
  10443. the original source files or \fBbalanced\fR to specify partitioning
  10444. into equally sized chunks (whenever possible) or \fBmax\fR to create
  10445. new partition for every symbol where possible. Specifying \fBnone\fR
  10446. as an algorithm disables partitioning and streaming completely.
  10447. The default value is \fBbalanced\fR. While \fB1to1\fR can be used
  10448. as an workaround for various code ordering issues, the \fBmax\fR
  10449. partitioning is intended for internal testing only.
  10450. The value \fBone\fR specifies that exactly one partition should be
  10451. used while the value \fBnone\fR bypasses partitioning and executes
  10452. the link-time optimization step directly from the \s-1WPA\s0 phase.
  10453. .IP "\fB\-flto\-compression\-level=\fR\fIn\fR" 4
  10454. .IX Item "-flto-compression-level=n"
  10455. This option specifies the level of compression used for intermediate
  10456. language written to \s-1LTO\s0 object files, and is only meaningful in
  10457. conjunction with \s-1LTO\s0 mode (\fB\-flto\fR). Valid
  10458. values are 0 (no compression) to 9 (maximum compression). Values
  10459. outside this range are clamped to either 0 or 9. If the option is not
  10460. given, a default balanced compression setting is used.
  10461. .IP "\fB\-fuse\-linker\-plugin\fR" 4
  10462. .IX Item "-fuse-linker-plugin"
  10463. Enables the use of a linker plugin during link-time optimization. This
  10464. option relies on plugin support in the linker, which is available in gold
  10465. or in \s-1GNU\s0 ld 2.21 or newer.
  10466. .Sp
  10467. This option enables the extraction of object files with \s-1GIMPLE\s0 bytecode out
  10468. of library archives. This improves the quality of optimization by exposing
  10469. more code to the link-time optimizer. This information specifies what
  10470. symbols can be accessed externally (by non-LTO object or during dynamic
  10471. linking). Resulting code quality improvements on binaries (and shared
  10472. libraries that use hidden visibility) are similar to \fB\-fwhole\-program\fR.
  10473. See \fB\-flto\fR for a description of the effect of this flag and how to
  10474. use it.
  10475. .Sp
  10476. This option is enabled by default when \s-1LTO\s0 support in \s-1GCC\s0 is enabled
  10477. and \s-1GCC\s0 was configured for use with
  10478. a linker supporting plugins (\s-1GNU\s0 ld 2.21 or newer or gold).
  10479. .IP "\fB\-ffat\-lto\-objects\fR" 4
  10480. .IX Item "-ffat-lto-objects"
  10481. Fat \s-1LTO\s0 objects are object files that contain both the intermediate language
  10482. and the object code. This makes them usable for both \s-1LTO\s0 linking and normal
  10483. linking. This option is effective only when compiling with \fB\-flto\fR
  10484. and is ignored at link time.
  10485. .Sp
  10486. \&\fB\-fno\-fat\-lto\-objects\fR improves compilation time over plain \s-1LTO,\s0 but
  10487. requires the complete toolchain to be aware of \s-1LTO.\s0 It requires a linker with
  10488. linker plugin support for basic functionality. Additionally,
  10489. \&\fBnm\fR, \fBar\fR and \fBranlib\fR
  10490. need to support linker plugins to allow a full-featured build environment
  10491. (capable of building static libraries etc). \s-1GCC\s0 provides the \fBgcc-ar\fR,
  10492. \&\fBgcc-nm\fR, \fBgcc-ranlib\fR wrappers to pass the right options
  10493. to these tools. With non fat \s-1LTO\s0 makefiles need to be modified to use them.
  10494. .Sp
  10495. Note that modern binutils provide plugin auto-load mechanism.
  10496. Installing the linker plugin into \fI\f(CI$libdir\fI/bfd\-plugins\fR has the same
  10497. effect as usage of the command wrappers (\fBgcc-ar\fR, \fBgcc-nm\fR and
  10498. \&\fBgcc-ranlib\fR).
  10499. .Sp
  10500. The default is \fB\-fno\-fat\-lto\-objects\fR on targets with linker plugin
  10501. support.
  10502. .IP "\fB\-fcompare\-elim\fR" 4
  10503. .IX Item "-fcompare-elim"
  10504. After register allocation and post-register allocation instruction splitting,
  10505. identify arithmetic instructions that compute processor flags similar to a
  10506. comparison operation based on that arithmetic. If possible, eliminate the
  10507. explicit comparison operation.
  10508. .Sp
  10509. This pass only applies to certain targets that cannot explicitly represent
  10510. the comparison operation before register allocation is complete.
  10511. .Sp
  10512. Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  10513. .IP "\fB\-fcprop\-registers\fR" 4
  10514. .IX Item "-fcprop-registers"
  10515. After register allocation and post-register allocation instruction splitting,
  10516. perform a copy-propagation pass to try to reduce scheduling dependencies
  10517. and occasionally eliminate the copy.
  10518. .Sp
  10519. Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  10520. .IP "\fB\-fprofile\-correction\fR" 4
  10521. .IX Item "-fprofile-correction"
  10522. Profiles collected using an instrumented binary for multi-threaded programs may
  10523. be inconsistent due to missed counter updates. When this option is specified,
  10524. \&\s-1GCC\s0 uses heuristics to correct or smooth out such inconsistencies. By
  10525. default, \s-1GCC\s0 emits an error message when an inconsistent profile is detected.
  10526. .Sp
  10527. This option is enabled by \fB\-fauto\-profile\fR.
  10528. .IP "\fB\-fprofile\-partial\-training\fR" 4
  10529. .IX Item "-fprofile-partial-training"
  10530. With \f(CW\*(C`\-fprofile\-use\*(C'\fR all portions of programs not executed during train
  10531. run are optimized agressively for size rather than speed. In some cases it is
  10532. not practical to train all possible hot paths in the program. (For
  10533. example, program may contain functions specific for a given hardware and
  10534. trianing may not cover all hardware configurations program is run on.) With
  10535. \&\f(CW\*(C`\-fprofile\-partial\-training\*(C'\fR profile feedback will be ignored for all
  10536. functions not executed during the train run leading them to be optimized as if
  10537. they were compiled without profile feedback. This leads to better performance
  10538. when train run is not representative but also leads to significantly bigger
  10539. code.
  10540. .IP "\fB\-fprofile\-use\fR" 4
  10541. .IX Item "-fprofile-use"
  10542. .PD 0
  10543. .IP "\fB\-fprofile\-use=\fR\fIpath\fR" 4
  10544. .IX Item "-fprofile-use=path"
  10545. .PD
  10546. Enable profile feedback-directed optimizations,
  10547. and the following optimizations, many of which
  10548. are generally profitable only with profile feedback available:
  10549. .Sp
  10550. \&\fB\-fbranch\-probabilities \-fprofile\-values
  10551. \&\-funroll\-loops \-fpeel\-loops \-ftracer \-fvpt
  10552. \&\-finline\-functions \-fipa\-cp \-fipa\-cp\-clone \-fipa\-bit\-cp
  10553. \&\-fpredictive\-commoning \-fsplit\-loops \-funswitch\-loops
  10554. \&\-fgcse\-after\-reload \-ftree\-loop\-vectorize \-ftree\-slp\-vectorize
  10555. \&\-fvect\-cost\-model=dynamic \-ftree\-loop\-distribute\-patterns
  10556. \&\-fprofile\-reorder\-functions\fR
  10557. .Sp
  10558. Before you can use this option, you must first generate profiling information.
  10559. .Sp
  10560. By default, \s-1GCC\s0 emits an error message if the feedback profiles do not
  10561. match the source code. This error can be turned into a warning by using
  10562. \&\fB\-Wno\-error=coverage\-mismatch\fR. Note this may result in poorly
  10563. optimized code. Additionally, by default, \s-1GCC\s0 also emits a warning message if
  10564. the feedback profiles do not exist (see \fB\-Wmissing\-profile\fR).
  10565. .Sp
  10566. If \fIpath\fR is specified, \s-1GCC\s0 looks at the \fIpath\fR to find
  10567. the profile feedback data files. See \fB\-fprofile\-dir\fR.
  10568. .IP "\fB\-fauto\-profile\fR" 4
  10569. .IX Item "-fauto-profile"
  10570. .PD 0
  10571. .IP "\fB\-fauto\-profile=\fR\fIpath\fR" 4
  10572. .IX Item "-fauto-profile=path"
  10573. .PD
  10574. Enable sampling-based feedback-directed optimizations,
  10575. and the following optimizations,
  10576. many of which are generally profitable only with profile feedback available:
  10577. .Sp
  10578. \&\fB\-fbranch\-probabilities \-fprofile\-values
  10579. \&\-funroll\-loops \-fpeel\-loops \-ftracer \-fvpt
  10580. \&\-finline\-functions \-fipa\-cp \-fipa\-cp\-clone \-fipa\-bit\-cp
  10581. \&\-fpredictive\-commoning \-fsplit\-loops \-funswitch\-loops
  10582. \&\-fgcse\-after\-reload \-ftree\-loop\-vectorize \-ftree\-slp\-vectorize
  10583. \&\-fvect\-cost\-model=dynamic \-ftree\-loop\-distribute\-patterns
  10584. \&\-fprofile\-correction\fR
  10585. .Sp
  10586. \&\fIpath\fR is the name of a file containing AutoFDO profile information.
  10587. If omitted, it defaults to \fIfbdata.afdo\fR in the current directory.
  10588. .Sp
  10589. Producing an AutoFDO profile data file requires running your program
  10590. with the \fBperf\fR utility on a supported GNU/Linux target system.
  10591. For more information, see <\fBhttps://perf.wiki.kernel.org/\fR>.
  10592. .Sp
  10593. E.g.
  10594. .Sp
  10595. .Vb 2
  10596. \& perf record \-e br_inst_retired:near_taken \-b \-o perf.data \e
  10597. \& \-\- your_program
  10598. .Ve
  10599. .Sp
  10600. Then use the \fBcreate_gcov\fR tool to convert the raw profile data
  10601. to a format that can be used by \s-1GCC. \s0 You must also supply the
  10602. unstripped binary for your program to this tool.
  10603. See <\fBhttps://github.com/google/autofdo\fR>.
  10604. .Sp
  10605. E.g.
  10606. .Sp
  10607. .Vb 2
  10608. \& create_gcov \-\-binary=your_program.unstripped \-\-profile=perf.data \e
  10609. \& \-\-gcov=profile.afdo
  10610. .Ve
  10611. .PP
  10612. The following options control compiler behavior regarding floating-point
  10613. arithmetic. These options trade off between speed and
  10614. correctness. All must be specifically enabled.
  10615. .IP "\fB\-ffloat\-store\fR" 4
  10616. .IX Item "-ffloat-store"
  10617. Do not store floating-point variables in registers, and inhibit other
  10618. options that might change whether a floating-point value is taken from a
  10619. register or memory.
  10620. .Sp
  10621. This option prevents undesirable excess precision on machines such as
  10622. the 68000 where the floating registers (of the 68881) keep more
  10623. precision than a \f(CW\*(C`double\*(C'\fR is supposed to have. Similarly for the
  10624. x86 architecture. For most programs, the excess precision does only
  10625. good, but a few programs rely on the precise definition of \s-1IEEE\s0 floating
  10626. point. Use \fB\-ffloat\-store\fR for such programs, after modifying
  10627. them to store all pertinent intermediate computations into variables.
  10628. .IP "\fB\-fexcess\-precision=\fR\fIstyle\fR" 4
  10629. .IX Item "-fexcess-precision=style"
  10630. This option allows further control over excess precision on machines
  10631. where floating-point operations occur in a format with more precision or
  10632. range than the \s-1IEEE\s0 standard and interchange floating-point types. By
  10633. default, \fB\-fexcess\-precision=fast\fR is in effect; this means that
  10634. operations may be carried out in a wider precision than the types specified
  10635. in the source if that would result in faster code, and it is unpredictable
  10636. when rounding to the types specified in the source code takes place.
  10637. When compiling C, if \fB\-fexcess\-precision=standard\fR is specified then
  10638. excess precision follows the rules specified in \s-1ISO C99\s0; in particular,
  10639. both casts and assignments cause values to be rounded to their
  10640. semantic types (whereas \fB\-ffloat\-store\fR only affects
  10641. assignments). This option is enabled by default for C if a strict
  10642. conformance option such as \fB\-std=c99\fR is used.
  10643. \&\fB\-ffast\-math\fR enables \fB\-fexcess\-precision=fast\fR by default
  10644. regardless of whether a strict conformance option is used.
  10645. .Sp
  10646. \&\fB\-fexcess\-precision=standard\fR is not implemented for languages
  10647. other than C. On the x86, it has no effect if \fB\-mfpmath=sse\fR
  10648. or \fB\-mfpmath=sse+387\fR is specified; in the former case, \s-1IEEE\s0
  10649. semantics apply without excess precision, and in the latter, rounding
  10650. is unpredictable.
  10651. .IP "\fB\-ffast\-math\fR" 4
  10652. .IX Item "-ffast-math"
  10653. Sets the options \fB\-fno\-math\-errno\fR, \fB\-funsafe\-math\-optimizations\fR,
  10654. \&\fB\-ffinite\-math\-only\fR, \fB\-fno\-rounding\-math\fR,
  10655. \&\fB\-fno\-signaling\-nans\fR, \fB\-fcx\-limited\-range\fR and
  10656. \&\fB\-fexcess\-precision=fast\fR.
  10657. .Sp
  10658. This option causes the preprocessor macro \f(CW\*(C`_\|_FAST_MATH_\|_\*(C'\fR to be defined.
  10659. .Sp
  10660. This option is not turned on by any \fB\-O\fR option besides
  10661. \&\fB\-Ofast\fR since it can result in incorrect output for programs
  10662. that depend on an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications
  10663. for math functions. It may, however, yield faster code for programs
  10664. that do not require the guarantees of these specifications.
  10665. .IP "\fB\-fno\-math\-errno\fR" 4
  10666. .IX Item "-fno-math-errno"
  10667. Do not set \f(CW\*(C`errno\*(C'\fR after calling math functions that are executed
  10668. with a single instruction, e.g., \f(CW\*(C`sqrt\*(C'\fR. A program that relies on
  10669. \&\s-1IEEE\s0 exceptions for math error handling may want to use this flag
  10670. for speed while maintaining \s-1IEEE\s0 arithmetic compatibility.
  10671. .Sp
  10672. This option is not turned on by any \fB\-O\fR option since
  10673. it can result in incorrect output for programs that depend on
  10674. an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications for
  10675. math functions. It may, however, yield faster code for programs
  10676. that do not require the guarantees of these specifications.
  10677. .Sp
  10678. The default is \fB\-fmath\-errno\fR.
  10679. .Sp
  10680. On Darwin systems, the math library never sets \f(CW\*(C`errno\*(C'\fR. There is
  10681. therefore no reason for the compiler to consider the possibility that
  10682. it might, and \fB\-fno\-math\-errno\fR is the default.
  10683. .IP "\fB\-funsafe\-math\-optimizations\fR" 4
  10684. .IX Item "-funsafe-math-optimizations"
  10685. Allow optimizations for floating-point arithmetic that (a) assume
  10686. that arguments and results are valid and (b) may violate \s-1IEEE\s0 or
  10687. \&\s-1ANSI\s0 standards. When used at link time, it may include libraries
  10688. or startup files that change the default \s-1FPU\s0 control word or other
  10689. similar optimizations.
  10690. .Sp
  10691. This option is not turned on by any \fB\-O\fR option since
  10692. it can result in incorrect output for programs that depend on
  10693. an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications for
  10694. math functions. It may, however, yield faster code for programs
  10695. that do not require the guarantees of these specifications.
  10696. Enables \fB\-fno\-signed\-zeros\fR, \fB\-fno\-trapping\-math\fR,
  10697. \&\fB\-fassociative\-math\fR and \fB\-freciprocal\-math\fR.
  10698. .Sp
  10699. The default is \fB\-fno\-unsafe\-math\-optimizations\fR.
  10700. .IP "\fB\-fassociative\-math\fR" 4
  10701. .IX Item "-fassociative-math"
  10702. Allow re-association of operands in series of floating-point operations.
  10703. This violates the \s-1ISO C\s0 and \*(C+ language standard by possibly changing
  10704. computation result. \s-1NOTE:\s0 re-ordering may change the sign of zero as
  10705. well as ignore NaNs and inhibit or create underflow or overflow (and
  10706. thus cannot be used on code that relies on rounding behavior like
  10707. \&\f(CW\*(C`(x + 2**52) \- 2**52\*(C'\fR. May also reorder floating-point comparisons
  10708. and thus may not be used when ordered comparisons are required.
  10709. This option requires that both \fB\-fno\-signed\-zeros\fR and
  10710. \&\fB\-fno\-trapping\-math\fR be in effect. Moreover, it doesn't make
  10711. much sense with \fB\-frounding\-math\fR. For Fortran the option
  10712. is automatically enabled when both \fB\-fno\-signed\-zeros\fR and
  10713. \&\fB\-fno\-trapping\-math\fR are in effect.
  10714. .Sp
  10715. The default is \fB\-fno\-associative\-math\fR.
  10716. .IP "\fB\-freciprocal\-math\fR" 4
  10717. .IX Item "-freciprocal-math"
  10718. Allow the reciprocal of a value to be used instead of dividing by
  10719. the value if this enables optimizations. For example \f(CW\*(C`x / y\*(C'\fR
  10720. can be replaced with \f(CW\*(C`x * (1/y)\*(C'\fR, which is useful if \f(CW\*(C`(1/y)\*(C'\fR
  10721. is subject to common subexpression elimination. Note that this loses
  10722. precision and increases the number of flops operating on the value.
  10723. .Sp
  10724. The default is \fB\-fno\-reciprocal\-math\fR.
  10725. .IP "\fB\-ffinite\-math\-only\fR" 4
  10726. .IX Item "-ffinite-math-only"
  10727. Allow optimizations for floating-point arithmetic that assume
  10728. that arguments and results are not NaNs or +\-Infs.
  10729. .Sp
  10730. This option is not turned on by any \fB\-O\fR option since
  10731. it can result in incorrect output for programs that depend on
  10732. an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications for
  10733. math functions. It may, however, yield faster code for programs
  10734. that do not require the guarantees of these specifications.
  10735. .Sp
  10736. The default is \fB\-fno\-finite\-math\-only\fR.
  10737. .IP "\fB\-fno\-signed\-zeros\fR" 4
  10738. .IX Item "-fno-signed-zeros"
  10739. Allow optimizations for floating-point arithmetic that ignore the
  10740. signedness of zero. \s-1IEEE\s0 arithmetic specifies the behavior of
  10741. distinct +0.0 and \-0.0 values, which then prohibits simplification
  10742. of expressions such as x+0.0 or 0.0*x (even with \fB\-ffinite\-math\-only\fR).
  10743. This option implies that the sign of a zero result isn't significant.
  10744. .Sp
  10745. The default is \fB\-fsigned\-zeros\fR.
  10746. .IP "\fB\-fno\-trapping\-math\fR" 4
  10747. .IX Item "-fno-trapping-math"
  10748. Compile code assuming that floating-point operations cannot generate
  10749. user-visible traps. These traps include division by zero, overflow,
  10750. underflow, inexact result and invalid operation. This option requires
  10751. that \fB\-fno\-signaling\-nans\fR be in effect. Setting this option may
  10752. allow faster code if one relies on \*(L"non-stop\*(R" \s-1IEEE\s0 arithmetic, for example.
  10753. .Sp
  10754. This option should never be turned on by any \fB\-O\fR option since
  10755. it can result in incorrect output for programs that depend on
  10756. an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications for
  10757. math functions.
  10758. .Sp
  10759. The default is \fB\-ftrapping\-math\fR.
  10760. .IP "\fB\-frounding\-math\fR" 4
  10761. .IX Item "-frounding-math"
  10762. Disable transformations and optimizations that assume default floating-point
  10763. rounding behavior. This is round-to-zero for all floating point
  10764. to integer conversions, and round-to-nearest for all other arithmetic
  10765. truncations. This option should be specified for programs that change
  10766. the \s-1FP\s0 rounding mode dynamically, or that may be executed with a
  10767. non-default rounding mode. This option disables constant folding of
  10768. floating-point expressions at compile time (which may be affected by
  10769. rounding mode) and arithmetic transformations that are unsafe in the
  10770. presence of sign-dependent rounding modes.
  10771. .Sp
  10772. The default is \fB\-fno\-rounding\-math\fR.
  10773. .Sp
  10774. This option is experimental and does not currently guarantee to
  10775. disable all \s-1GCC\s0 optimizations that are affected by rounding mode.
  10776. Future versions of \s-1GCC\s0 may provide finer control of this setting
  10777. using C99's \f(CW\*(C`FENV_ACCESS\*(C'\fR pragma. This command-line option
  10778. will be used to specify the default state for \f(CW\*(C`FENV_ACCESS\*(C'\fR.
  10779. .IP "\fB\-fsignaling\-nans\fR" 4
  10780. .IX Item "-fsignaling-nans"
  10781. Compile code assuming that \s-1IEEE\s0 signaling NaNs may generate user-visible
  10782. traps during floating-point operations. Setting this option disables
  10783. optimizations that may change the number of exceptions visible with
  10784. signaling NaNs. This option implies \fB\-ftrapping\-math\fR.
  10785. .Sp
  10786. This option causes the preprocessor macro \f(CW\*(C`_\|_SUPPORT_SNAN_\|_\*(C'\fR to
  10787. be defined.
  10788. .Sp
  10789. The default is \fB\-fno\-signaling\-nans\fR.
  10790. .Sp
  10791. This option is experimental and does not currently guarantee to
  10792. disable all \s-1GCC\s0 optimizations that affect signaling NaN behavior.
  10793. .IP "\fB\-fno\-fp\-int\-builtin\-inexact\fR" 4
  10794. .IX Item "-fno-fp-int-builtin-inexact"
  10795. Do not allow the built-in functions \f(CW\*(C`ceil\*(C'\fR, \f(CW\*(C`floor\*(C'\fR,
  10796. \&\f(CW\*(C`round\*(C'\fR and \f(CW\*(C`trunc\*(C'\fR, and their \f(CW\*(C`float\*(C'\fR and \f(CW\*(C`long
  10797. double\*(C'\fR variants, to generate code that raises the \*(L"inexact\*(R"
  10798. floating-point exception for noninteger arguments. \s-1ISO C99\s0 and C11
  10799. allow these functions to raise the \*(L"inexact\*(R" exception, but \s-1ISO/IEC
  10800. TS 18661\-1:2014,\s0 the C bindings to \s-1IEEE 754\-2008,\s0 as integrated into
  10801. \&\s-1ISO C2X,\s0 does not allow these functions to do so.
  10802. .Sp
  10803. The default is \fB\-ffp\-int\-builtin\-inexact\fR, allowing the
  10804. exception to be raised, unless C2X or a later C standard is selected.
  10805. This option does nothing unless \fB\-ftrapping\-math\fR is in effect.
  10806. .Sp
  10807. Even if \fB\-fno\-fp\-int\-builtin\-inexact\fR is used, if the functions
  10808. generate a call to a library function then the \*(L"inexact\*(R" exception
  10809. may be raised if the library implementation does not follow \s-1TS 18661.\s0
  10810. .IP "\fB\-fsingle\-precision\-constant\fR" 4
  10811. .IX Item "-fsingle-precision-constant"
  10812. Treat floating-point constants as single precision instead of
  10813. implicitly converting them to double-precision constants.
  10814. .IP "\fB\-fcx\-limited\-range\fR" 4
  10815. .IX Item "-fcx-limited-range"
  10816. When enabled, this option states that a range reduction step is not
  10817. needed when performing complex division. Also, there is no checking
  10818. whether the result of a complex multiplication or division is \f(CW\*(C`NaN
  10819. + I*NaN\*(C'\fR, with an attempt to rescue the situation in that case. The
  10820. default is \fB\-fno\-cx\-limited\-range\fR, but is enabled by
  10821. \&\fB\-ffast\-math\fR.
  10822. .Sp
  10823. This option controls the default setting of the \s-1ISO C99
  10824. \&\s0\f(CW\*(C`CX_LIMITED_RANGE\*(C'\fR pragma. Nevertheless, the option applies to
  10825. all languages.
  10826. .IP "\fB\-fcx\-fortran\-rules\fR" 4
  10827. .IX Item "-fcx-fortran-rules"
  10828. Complex multiplication and division follow Fortran rules. Range
  10829. reduction is done as part of complex division, but there is no checking
  10830. whether the result of a complex multiplication or division is \f(CW\*(C`NaN
  10831. + I*NaN\*(C'\fR, with an attempt to rescue the situation in that case.
  10832. .Sp
  10833. The default is \fB\-fno\-cx\-fortran\-rules\fR.
  10834. .PP
  10835. The following options control optimizations that may improve
  10836. performance, but are not enabled by any \fB\-O\fR options. This
  10837. section includes experimental options that may produce broken code.
  10838. .IP "\fB\-fbranch\-probabilities\fR" 4
  10839. .IX Item "-fbranch-probabilities"
  10840. After running a program compiled with \fB\-fprofile\-arcs\fR,
  10841. you can compile it a second time using
  10842. \&\fB\-fbranch\-probabilities\fR, to improve optimizations based on
  10843. the number of times each branch was taken. When a program
  10844. compiled with \fB\-fprofile\-arcs\fR exits, it saves arc execution
  10845. counts to a file called \fI\fIsourcename\fI.gcda\fR for each source
  10846. file. The information in this data file is very dependent on the
  10847. structure of the generated code, so you must use the same source code
  10848. and the same optimization options for both compilations.
  10849. .Sp
  10850. With \fB\-fbranch\-probabilities\fR, \s-1GCC\s0 puts a
  10851. \&\fB\s-1REG_BR_PROB\s0\fR note on each \fB\s-1JUMP_INSN\s0\fR and \fB\s-1CALL_INSN\s0\fR.
  10852. These can be used to improve optimization. Currently, they are only
  10853. used in one place: in \fIreorg.c\fR, instead of guessing which path a
  10854. branch is most likely to take, the \fB\s-1REG_BR_PROB\s0\fR values are used to
  10855. exactly determine which path is taken more often.
  10856. .Sp
  10857. Enabled by \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  10858. .IP "\fB\-fprofile\-values\fR" 4
  10859. .IX Item "-fprofile-values"
  10860. If combined with \fB\-fprofile\-arcs\fR, it adds code so that some
  10861. data about values of expressions in the program is gathered.
  10862. .Sp
  10863. With \fB\-fbranch\-probabilities\fR, it reads back the data gathered
  10864. from profiling values of expressions for usage in optimizations.
  10865. .Sp
  10866. Enabled by \fB\-fprofile\-generate\fR, \fB\-fprofile\-use\fR, and
  10867. \&\fB\-fauto\-profile\fR.
  10868. .IP "\fB\-fprofile\-reorder\-functions\fR" 4
  10869. .IX Item "-fprofile-reorder-functions"
  10870. Function reordering based on profile instrumentation collects
  10871. first time of execution of a function and orders these functions
  10872. in ascending order.
  10873. .Sp
  10874. Enabled with \fB\-fprofile\-use\fR.
  10875. .IP "\fB\-fvpt\fR" 4
  10876. .IX Item "-fvpt"
  10877. If combined with \fB\-fprofile\-arcs\fR, this option instructs the compiler
  10878. to add code to gather information about values of expressions.
  10879. .Sp
  10880. With \fB\-fbranch\-probabilities\fR, it reads back the data gathered
  10881. and actually performs the optimizations based on them.
  10882. Currently the optimizations include specialization of division operations
  10883. using the knowledge about the value of the denominator.
  10884. .Sp
  10885. Enabled with \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  10886. .IP "\fB\-frename\-registers\fR" 4
  10887. .IX Item "-frename-registers"
  10888. Attempt to avoid false dependencies in scheduled code by making use
  10889. of registers left over after register allocation. This optimization
  10890. most benefits processors with lots of registers. Depending on the
  10891. debug information format adopted by the target, however, it can
  10892. make debugging impossible, since variables no longer stay in
  10893. a \*(L"home register\*(R".
  10894. .Sp
  10895. Enabled by default with \fB\-funroll\-loops\fR.
  10896. .IP "\fB\-fschedule\-fusion\fR" 4
  10897. .IX Item "-fschedule-fusion"
  10898. Performs a target dependent pass over the instruction stream to schedule
  10899. instructions of same type together because target machine can execute them
  10900. more efficiently if they are adjacent to each other in the instruction flow.
  10901. .Sp
  10902. Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
  10903. .IP "\fB\-ftracer\fR" 4
  10904. .IX Item "-ftracer"
  10905. Perform tail duplication to enlarge superblock size. This transformation
  10906. simplifies the control flow of the function allowing other optimizations to do
  10907. a better job.
  10908. .Sp
  10909. Enabled by \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  10910. .IP "\fB\-funroll\-loops\fR" 4
  10911. .IX Item "-funroll-loops"
  10912. Unroll loops whose number of iterations can be determined at compile time or
  10913. upon entry to the loop. \fB\-funroll\-loops\fR implies
  10914. \&\fB\-frerun\-cse\-after\-loop\fR, \fB\-fweb\fR and \fB\-frename\-registers\fR.
  10915. It also turns on complete loop peeling (i.e. complete removal of loops with
  10916. a small constant number of iterations). This option makes code larger, and may
  10917. or may not make it run faster.
  10918. .Sp
  10919. Enabled by \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  10920. .IP "\fB\-funroll\-all\-loops\fR" 4
  10921. .IX Item "-funroll-all-loops"
  10922. Unroll all loops, even if their number of iterations is uncertain when
  10923. the loop is entered. This usually makes programs run more slowly.
  10924. \&\fB\-funroll\-all\-loops\fR implies the same options as
  10925. \&\fB\-funroll\-loops\fR.
  10926. .IP "\fB\-fpeel\-loops\fR" 4
  10927. .IX Item "-fpeel-loops"
  10928. Peels loops for which there is enough information that they do not
  10929. roll much (from profile feedback or static analysis). It also turns on
  10930. complete loop peeling (i.e. complete removal of loops with small constant
  10931. number of iterations).
  10932. .Sp
  10933. Enabled by \fB\-O3\fR, \fB\-fprofile\-use\fR, and \fB\-fauto\-profile\fR.
  10934. .IP "\fB\-fmove\-loop\-invariants\fR" 4
  10935. .IX Item "-fmove-loop-invariants"
  10936. Enables the loop invariant motion pass in the \s-1RTL\s0 loop optimizer. Enabled
  10937. at level \fB\-O1\fR and higher, except for \fB\-Og\fR.
  10938. .IP "\fB\-fsplit\-loops\fR" 4
  10939. .IX Item "-fsplit-loops"
  10940. Split a loop into two if it contains a condition that's always true
  10941. for one side of the iteration space and false for the other.
  10942. .Sp
  10943. Enabled by \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  10944. .IP "\fB\-funswitch\-loops\fR" 4
  10945. .IX Item "-funswitch-loops"
  10946. Move branches with loop invariant conditions out of the loop, with duplicates
  10947. of the loop on both branches (modified according to result of the condition).
  10948. .Sp
  10949. Enabled by \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  10950. .IP "\fB\-fversion\-loops\-for\-strides\fR" 4
  10951. .IX Item "-fversion-loops-for-strides"
  10952. If a loop iterates over an array with a variable stride, create another
  10953. version of the loop that assumes the stride is always one. For example:
  10954. .Sp
  10955. .Vb 2
  10956. \& for (int i = 0; i < n; ++i)
  10957. \& x[i * stride] = ...;
  10958. .Ve
  10959. .Sp
  10960. becomes:
  10961. .Sp
  10962. .Vb 6
  10963. \& if (stride == 1)
  10964. \& for (int i = 0; i < n; ++i)
  10965. \& x[i] = ...;
  10966. \& else
  10967. \& for (int i = 0; i < n; ++i)
  10968. \& x[i * stride] = ...;
  10969. .Ve
  10970. .Sp
  10971. This is particularly useful for assumed-shape arrays in Fortran where
  10972. (for example) it allows better vectorization assuming contiguous accesses.
  10973. This flag is enabled by default at \fB\-O3\fR.
  10974. It is also enabled by \fB\-fprofile\-use\fR and \fB\-fauto\-profile\fR.
  10975. .IP "\fB\-ffunction\-sections\fR" 4
  10976. .IX Item "-ffunction-sections"
  10977. .PD 0
  10978. .IP "\fB\-fdata\-sections\fR" 4
  10979. .IX Item "-fdata-sections"
  10980. .PD
  10981. Place each function or data item into its own section in the output
  10982. file if the target supports arbitrary sections. The name of the
  10983. function or the name of the data item determines the section's name
  10984. in the output file.
  10985. .Sp
  10986. Use these options on systems where the linker can perform optimizations to
  10987. improve locality of reference in the instruction space. Most systems using the
  10988. \&\s-1ELF\s0 object format have linkers with such optimizations. On \s-1AIX,\s0 the linker
  10989. rearranges sections (CSECTs) based on the call graph. The performance impact
  10990. varies.
  10991. .Sp
  10992. Together with a linker garbage collection (linker \fB\-\-gc\-sections\fR
  10993. option) these options may lead to smaller statically-linked executables (after
  10994. stripping).
  10995. .Sp
  10996. On \s-1ELF/DWARF\s0 systems these options do not degenerate the quality of the debug
  10997. information. There could be issues with other object files/debug info formats.
  10998. .Sp
  10999. Only use these options when there are significant benefits from doing so. When
  11000. you specify these options, the assembler and linker create larger object and
  11001. executable files and are also slower. These options affect code generation.
  11002. They prevent optimizations by the compiler and assembler using relative
  11003. locations inside a translation unit since the locations are unknown until
  11004. link time. An example of such an optimization is relaxing calls to short call
  11005. instructions.
  11006. .IP "\fB\-fstdarg\-opt\fR" 4
  11007. .IX Item "-fstdarg-opt"
  11008. Optimize the prologue of variadic argument functions with respect to usage of
  11009. those arguments.
  11010. .IP "\fB\-fsection\-anchors\fR" 4
  11011. .IX Item "-fsection-anchors"
  11012. Try to reduce the number of symbolic address calculations by using
  11013. shared \*(L"anchor\*(R" symbols to address nearby objects. This transformation
  11014. can help to reduce the number of \s-1GOT\s0 entries and \s-1GOT\s0 accesses on some
  11015. targets.
  11016. .Sp
  11017. For example, the implementation of the following function \f(CW\*(C`foo\*(C'\fR:
  11018. .Sp
  11019. .Vb 2
  11020. \& static int a, b, c;
  11021. \& int foo (void) { return a + b + c; }
  11022. .Ve
  11023. .Sp
  11024. usually calculates the addresses of all three variables, but if you
  11025. compile it with \fB\-fsection\-anchors\fR, it accesses the variables
  11026. from a common anchor point instead. The effect is similar to the
  11027. following pseudocode (which isn't valid C):
  11028. .Sp
  11029. .Vb 5
  11030. \& int foo (void)
  11031. \& {
  11032. \& register int *xr = &x;
  11033. \& return xr[&a \- &x] + xr[&b \- &x] + xr[&c \- &x];
  11034. \& }
  11035. .Ve
  11036. .Sp
  11037. Not all targets support this option.
  11038. .IP "\fB\-\-param\fR \fIname\fR\fB=\fR\fIvalue\fR" 4
  11039. .IX Item "--param name=value"
  11040. In some places, \s-1GCC\s0 uses various constants to control the amount of
  11041. optimization that is done. For example, \s-1GCC\s0 does not inline functions
  11042. that contain more than a certain number of instructions. You can
  11043. control some of these constants on the command line using the
  11044. \&\fB\-\-param\fR option.
  11045. .Sp
  11046. The names of specific parameters, and the meaning of the values, are
  11047. tied to the internals of the compiler, and are subject to change
  11048. without notice in future releases.
  11049. .Sp
  11050. In order to get minimal, maximal and default value of a parameter,
  11051. one can use \fB\-\-help=param \-Q\fR options.
  11052. .Sp
  11053. In each case, the \fIvalue\fR is an integer. The following choices
  11054. of \fIname\fR are recognized for all targets:
  11055. .RS 4
  11056. .IP "\fBpredictable-branch-outcome\fR" 4
  11057. .IX Item "predictable-branch-outcome"
  11058. When branch is predicted to be taken with probability lower than this threshold
  11059. (in percent), then it is considered well predictable.
  11060. .IP "\fBmax-rtl-if-conversion-insns\fR" 4
  11061. .IX Item "max-rtl-if-conversion-insns"
  11062. \&\s-1RTL\s0 if-conversion tries to remove conditional branches around a block and
  11063. replace them with conditionally executed instructions. This parameter
  11064. gives the maximum number of instructions in a block which should be
  11065. considered for if-conversion. The compiler will
  11066. also use other heuristics to decide whether if-conversion is likely to be
  11067. profitable.
  11068. .IP "\fBmax-rtl-if-conversion-predictable-cost\fR" 4
  11069. .IX Item "max-rtl-if-conversion-predictable-cost"
  11070. .PD 0
  11071. .IP "\fBmax-rtl-if-conversion-unpredictable-cost\fR" 4
  11072. .IX Item "max-rtl-if-conversion-unpredictable-cost"
  11073. .PD
  11074. \&\s-1RTL\s0 if-conversion will try to remove conditional branches around a block
  11075. and replace them with conditionally executed instructions. These parameters
  11076. give the maximum permissible cost for the sequence that would be generated
  11077. by if-conversion depending on whether the branch is statically determined
  11078. to be predictable or not. The units for this parameter are the same as
  11079. those for the \s-1GCC\s0 internal seq_cost metric. The compiler will try to
  11080. provide a reasonable default for this parameter using the \s-1BRANCH_COST\s0
  11081. target macro.
  11082. .IP "\fBmax-crossjump-edges\fR" 4
  11083. .IX Item "max-crossjump-edges"
  11084. The maximum number of incoming edges to consider for cross-jumping.
  11085. The algorithm used by \fB\-fcrossjumping\fR is O(N^2) in
  11086. the number of edges incoming to each block. Increasing values mean
  11087. more aggressive optimization, making the compilation time increase with
  11088. probably small improvement in executable size.
  11089. .IP "\fBmin-crossjump-insns\fR" 4
  11090. .IX Item "min-crossjump-insns"
  11091. The minimum number of instructions that must be matched at the end
  11092. of two blocks before cross-jumping is performed on them. This
  11093. value is ignored in the case where all instructions in the block being
  11094. cross-jumped from are matched.
  11095. .IP "\fBmax-grow-copy-bb-insns\fR" 4
  11096. .IX Item "max-grow-copy-bb-insns"
  11097. The maximum code size expansion factor when copying basic blocks
  11098. instead of jumping. The expansion is relative to a jump instruction.
  11099. .IP "\fBmax-goto-duplication-insns\fR" 4
  11100. .IX Item "max-goto-duplication-insns"
  11101. The maximum number of instructions to duplicate to a block that jumps
  11102. to a computed goto. To avoid O(N^2) behavior in a number of
  11103. passes, \s-1GCC\s0 factors computed gotos early in the compilation process,
  11104. and unfactors them as late as possible. Only computed jumps at the
  11105. end of a basic blocks with no more than max-goto-duplication-insns are
  11106. unfactored.
  11107. .IP "\fBmax-delay-slot-insn-search\fR" 4
  11108. .IX Item "max-delay-slot-insn-search"
  11109. The maximum number of instructions to consider when looking for an
  11110. instruction to fill a delay slot. If more than this arbitrary number of
  11111. instructions are searched, the time savings from filling the delay slot
  11112. are minimal, so stop searching. Increasing values mean more
  11113. aggressive optimization, making the compilation time increase with probably
  11114. small improvement in execution time.
  11115. .IP "\fBmax-delay-slot-live-search\fR" 4
  11116. .IX Item "max-delay-slot-live-search"
  11117. When trying to fill delay slots, the maximum number of instructions to
  11118. consider when searching for a block with valid live register
  11119. information. Increasing this arbitrarily chosen value means more
  11120. aggressive optimization, increasing the compilation time. This parameter
  11121. should be removed when the delay slot code is rewritten to maintain the
  11122. control-flow graph.
  11123. .IP "\fBmax-gcse-memory\fR" 4
  11124. .IX Item "max-gcse-memory"
  11125. The approximate maximum amount of memory that can be allocated in
  11126. order to perform the global common subexpression elimination
  11127. optimization. If more memory than specified is required, the
  11128. optimization is not done.
  11129. .IP "\fBmax-gcse-insertion-ratio\fR" 4
  11130. .IX Item "max-gcse-insertion-ratio"
  11131. If the ratio of expression insertions to deletions is larger than this value
  11132. for any expression, then \s-1RTL PRE\s0 inserts or removes the expression and thus
  11133. leaves partially redundant computations in the instruction stream.
  11134. .IP "\fBmax-pending-list-length\fR" 4
  11135. .IX Item "max-pending-list-length"
  11136. The maximum number of pending dependencies scheduling allows
  11137. before flushing the current state and starting over. Large functions
  11138. with few branches or calls can create excessively large lists which
  11139. needlessly consume memory and resources.
  11140. .IP "\fBmax-modulo-backtrack-attempts\fR" 4
  11141. .IX Item "max-modulo-backtrack-attempts"
  11142. The maximum number of backtrack attempts the scheduler should make
  11143. when modulo scheduling a loop. Larger values can exponentially increase
  11144. compilation time.
  11145. .IP "\fBmax-inline-insns-single\fR" 4
  11146. .IX Item "max-inline-insns-single"
  11147. Several parameters control the tree inliner used in \s-1GCC. \s0 This number sets the
  11148. maximum number of instructions (counted in \s-1GCC\s0's internal representation) in a
  11149. single function that the tree inliner considers for inlining. This only
  11150. affects functions declared inline and methods implemented in a class
  11151. declaration (\*(C+).
  11152. .IP "\fBmax-inline-insns-auto\fR" 4
  11153. .IX Item "max-inline-insns-auto"
  11154. When you use \fB\-finline\-functions\fR (included in \fB\-O3\fR),
  11155. a lot of functions that would otherwise not be considered for inlining
  11156. by the compiler are investigated. To those functions, a different
  11157. (more restrictive) limit compared to functions declared inline can
  11158. be applied (\fB\-\-param max-inline-insns-auto\fR).
  11159. .IP "\fBmax-inline-insns-small\fR" 4
  11160. .IX Item "max-inline-insns-small"
  11161. This is bound applied to calls which are considered relevant with
  11162. \&\fB\-finline\-small\-functions\fR.
  11163. .IP "\fBmax-inline-insns-size\fR" 4
  11164. .IX Item "max-inline-insns-size"
  11165. This is bound applied to calls which are optimized for size. Small growth
  11166. may be desirable to anticipate optimization oppurtunities exposed by inlining.
  11167. .IP "\fBuninlined-function-insns\fR" 4
  11168. .IX Item "uninlined-function-insns"
  11169. Number of instructions accounted by inliner for function overhead such as
  11170. function prologue and epilogue.
  11171. .IP "\fBuninlined-function-time\fR" 4
  11172. .IX Item "uninlined-function-time"
  11173. Extra time accounted by inliner for function overhead such as time needed to
  11174. execute function prologue and epilogue
  11175. .IP "\fBinline-heuristics-hint-percent\fR" 4
  11176. .IX Item "inline-heuristics-hint-percent"
  11177. The scale (in percents) applied to \fBinline-insns-single\fR,
  11178. \&\fBinline\-insns\-single\-O2\fR, \fBinline-insns-auto\fR
  11179. when inline heuristics hints that inlining is
  11180. very profitable (will enable later optimizations).
  11181. .IP "\fBuninlined-thunk-insns\fR" 4
  11182. .IX Item "uninlined-thunk-insns"
  11183. .PD 0
  11184. .IP "\fBuninlined-thunk-time\fR" 4
  11185. .IX Item "uninlined-thunk-time"
  11186. .PD
  11187. Same as \fB\-\-param uninlined-function-insns\fR and
  11188. \&\fB\-\-param uninlined-function-time\fR but applied to function thunks
  11189. .IP "\fBinline-min-speedup\fR" 4
  11190. .IX Item "inline-min-speedup"
  11191. When estimated performance improvement of caller + callee runtime exceeds this
  11192. threshold (in percent), the function can be inlined regardless of the limit on
  11193. \&\fB\-\-param max-inline-insns-single\fR and \fB\-\-param
  11194. max-inline-insns-auto\fR.
  11195. .IP "\fBlarge-function-insns\fR" 4
  11196. .IX Item "large-function-insns"
  11197. The limit specifying really large functions. For functions larger than this
  11198. limit after inlining, inlining is constrained by
  11199. \&\fB\-\-param large-function-growth\fR. This parameter is useful primarily
  11200. to avoid extreme compilation time caused by non-linear algorithms used by the
  11201. back end.
  11202. .IP "\fBlarge-function-growth\fR" 4
  11203. .IX Item "large-function-growth"
  11204. Specifies maximal growth of large function caused by inlining in percents.
  11205. For example, parameter value 100 limits large function growth to 2.0 times
  11206. the original size.
  11207. .IP "\fBlarge-unit-insns\fR" 4
  11208. .IX Item "large-unit-insns"
  11209. The limit specifying large translation unit. Growth caused by inlining of
  11210. units larger than this limit is limited by \fB\-\-param inline-unit-growth\fR.
  11211. For small units this might be too tight.
  11212. For example, consider a unit consisting of function A
  11213. that is inline and B that just calls A three times. If B is small relative to
  11214. A, the growth of unit is 300\e% and yet such inlining is very sane. For very
  11215. large units consisting of small inlineable functions, however, the overall unit
  11216. growth limit is needed to avoid exponential explosion of code size. Thus for
  11217. smaller units, the size is increased to \fB\-\-param large-unit-insns\fR
  11218. before applying \fB\-\-param inline-unit-growth\fR.
  11219. .IP "\fBinline-unit-growth\fR" 4
  11220. .IX Item "inline-unit-growth"
  11221. Specifies maximal overall growth of the compilation unit caused by inlining.
  11222. For example, parameter value 20 limits unit growth to 1.2 times the original
  11223. size. Cold functions (either marked cold via an attribute or by profile
  11224. feedback) are not accounted into the unit size.
  11225. .IP "\fBipa-cp-unit-growth\fR" 4
  11226. .IX Item "ipa-cp-unit-growth"
  11227. Specifies maximal overall growth of the compilation unit caused by
  11228. interprocedural constant propagation. For example, parameter value 10 limits
  11229. unit growth to 1.1 times the original size.
  11230. .IP "\fBlarge-stack-frame\fR" 4
  11231. .IX Item "large-stack-frame"
  11232. The limit specifying large stack frames. While inlining the algorithm is trying
  11233. to not grow past this limit too much.
  11234. .IP "\fBlarge-stack-frame-growth\fR" 4
  11235. .IX Item "large-stack-frame-growth"
  11236. Specifies maximal growth of large stack frames caused by inlining in percents.
  11237. For example, parameter value 1000 limits large stack frame growth to 11 times
  11238. the original size.
  11239. .IP "\fBmax-inline-insns-recursive\fR" 4
  11240. .IX Item "max-inline-insns-recursive"
  11241. .PD 0
  11242. .IP "\fBmax-inline-insns-recursive-auto\fR" 4
  11243. .IX Item "max-inline-insns-recursive-auto"
  11244. .PD
  11245. Specifies the maximum number of instructions an out-of-line copy of a
  11246. self-recursive inline
  11247. function can grow into by performing recursive inlining.
  11248. .Sp
  11249. \&\fB\-\-param max-inline-insns-recursive\fR applies to functions
  11250. declared inline.
  11251. For functions not declared inline, recursive inlining
  11252. happens only when \fB\-finline\-functions\fR (included in \fB\-O3\fR) is
  11253. enabled; \fB\-\-param max-inline-insns-recursive-auto\fR applies instead.
  11254. .IP "\fBmax-inline-recursive-depth\fR" 4
  11255. .IX Item "max-inline-recursive-depth"
  11256. .PD 0
  11257. .IP "\fBmax-inline-recursive-depth-auto\fR" 4
  11258. .IX Item "max-inline-recursive-depth-auto"
  11259. .PD
  11260. Specifies the maximum recursion depth used for recursive inlining.
  11261. .Sp
  11262. \&\fB\-\-param max-inline-recursive-depth\fR applies to functions
  11263. declared inline. For functions not declared inline, recursive inlining
  11264. happens only when \fB\-finline\-functions\fR (included in \fB\-O3\fR) is
  11265. enabled; \fB\-\-param max-inline-recursive-depth-auto\fR applies instead.
  11266. .IP "\fBmin-inline-recursive-probability\fR" 4
  11267. .IX Item "min-inline-recursive-probability"
  11268. Recursive inlining is profitable only for function having deep recursion
  11269. in average and can hurt for function having little recursion depth by
  11270. increasing the prologue size or complexity of function body to other
  11271. optimizers.
  11272. .Sp
  11273. When profile feedback is available (see \fB\-fprofile\-generate\fR) the actual
  11274. recursion depth can be guessed from the probability that function recurses
  11275. via a given call expression. This parameter limits inlining only to call
  11276. expressions whose probability exceeds the given threshold (in percents).
  11277. .IP "\fBearly-inlining-insns\fR" 4
  11278. .IX Item "early-inlining-insns"
  11279. Specify growth that the early inliner can make. In effect it increases
  11280. the amount of inlining for code having a large abstraction penalty.
  11281. .IP "\fBmax-early-inliner-iterations\fR" 4
  11282. .IX Item "max-early-inliner-iterations"
  11283. Limit of iterations of the early inliner. This basically bounds
  11284. the number of nested indirect calls the early inliner can resolve.
  11285. Deeper chains are still handled by late inlining.
  11286. .IP "\fBcomdat-sharing-probability\fR" 4
  11287. .IX Item "comdat-sharing-probability"
  11288. Probability (in percent) that \*(C+ inline function with comdat visibility
  11289. are shared across multiple compilation units.
  11290. .IP "\fBprofile-func-internal-id\fR" 4
  11291. .IX Item "profile-func-internal-id"
  11292. A parameter to control whether to use function internal id in profile
  11293. database lookup. If the value is 0, the compiler uses an id that
  11294. is based on function assembler name and filename, which makes old profile
  11295. data more tolerant to source changes such as function reordering etc.
  11296. .IP "\fBmin-vect-loop-bound\fR" 4
  11297. .IX Item "min-vect-loop-bound"
  11298. The minimum number of iterations under which loops are not vectorized
  11299. when \fB\-ftree\-vectorize\fR is used. The number of iterations after
  11300. vectorization needs to be greater than the value specified by this option
  11301. to allow vectorization.
  11302. .IP "\fBgcse-cost-distance-ratio\fR" 4
  11303. .IX Item "gcse-cost-distance-ratio"
  11304. Scaling factor in calculation of maximum distance an expression
  11305. can be moved by \s-1GCSE\s0 optimizations. This is currently supported only in the
  11306. code hoisting pass. The bigger the ratio, the more aggressive code hoisting
  11307. is with simple expressions, i.e., the expressions that have cost
  11308. less than \fBgcse-unrestricted-cost\fR. Specifying 0 disables
  11309. hoisting of simple expressions.
  11310. .IP "\fBgcse-unrestricted-cost\fR" 4
  11311. .IX Item "gcse-unrestricted-cost"
  11312. Cost, roughly measured as the cost of a single typical machine
  11313. instruction, at which \s-1GCSE\s0 optimizations do not constrain
  11314. the distance an expression can travel. This is currently
  11315. supported only in the code hoisting pass. The lesser the cost,
  11316. the more aggressive code hoisting is. Specifying 0
  11317. allows all expressions to travel unrestricted distances.
  11318. .IP "\fBmax-hoist-depth\fR" 4
  11319. .IX Item "max-hoist-depth"
  11320. The depth of search in the dominator tree for expressions to hoist.
  11321. This is used to avoid quadratic behavior in hoisting algorithm.
  11322. The value of 0 does not limit on the search, but may slow down compilation
  11323. of huge functions.
  11324. .IP "\fBmax-tail-merge-comparisons\fR" 4
  11325. .IX Item "max-tail-merge-comparisons"
  11326. The maximum amount of similar bbs to compare a bb with. This is used to
  11327. avoid quadratic behavior in tree tail merging.
  11328. .IP "\fBmax-tail-merge-iterations\fR" 4
  11329. .IX Item "max-tail-merge-iterations"
  11330. The maximum amount of iterations of the pass over the function. This is used to
  11331. limit compilation time in tree tail merging.
  11332. .IP "\fBstore-merging-allow-unaligned\fR" 4
  11333. .IX Item "store-merging-allow-unaligned"
  11334. Allow the store merging pass to introduce unaligned stores if it is legal to
  11335. do so.
  11336. .IP "\fBmax-stores-to-merge\fR" 4
  11337. .IX Item "max-stores-to-merge"
  11338. The maximum number of stores to attempt to merge into wider stores in the store
  11339. merging pass.
  11340. .IP "\fBmax-unrolled-insns\fR" 4
  11341. .IX Item "max-unrolled-insns"
  11342. The maximum number of instructions that a loop may have to be unrolled.
  11343. If a loop is unrolled, this parameter also determines how many times
  11344. the loop code is unrolled.
  11345. .IP "\fBmax-average-unrolled-insns\fR" 4
  11346. .IX Item "max-average-unrolled-insns"
  11347. The maximum number of instructions biased by probabilities of their execution
  11348. that a loop may have to be unrolled. If a loop is unrolled,
  11349. this parameter also determines how many times the loop code is unrolled.
  11350. .IP "\fBmax-unroll-times\fR" 4
  11351. .IX Item "max-unroll-times"
  11352. The maximum number of unrollings of a single loop.
  11353. .IP "\fBmax-peeled-insns\fR" 4
  11354. .IX Item "max-peeled-insns"
  11355. The maximum number of instructions that a loop may have to be peeled.
  11356. If a loop is peeled, this parameter also determines how many times
  11357. the loop code is peeled.
  11358. .IP "\fBmax-peel-times\fR" 4
  11359. .IX Item "max-peel-times"
  11360. The maximum number of peelings of a single loop.
  11361. .IP "\fBmax-peel-branches\fR" 4
  11362. .IX Item "max-peel-branches"
  11363. The maximum number of branches on the hot path through the peeled sequence.
  11364. .IP "\fBmax-completely-peeled-insns\fR" 4
  11365. .IX Item "max-completely-peeled-insns"
  11366. The maximum number of insns of a completely peeled loop.
  11367. .IP "\fBmax-completely-peel-times\fR" 4
  11368. .IX Item "max-completely-peel-times"
  11369. The maximum number of iterations of a loop to be suitable for complete peeling.
  11370. .IP "\fBmax-completely-peel-loop-nest-depth\fR" 4
  11371. .IX Item "max-completely-peel-loop-nest-depth"
  11372. The maximum depth of a loop nest suitable for complete peeling.
  11373. .IP "\fBmax-unswitch-insns\fR" 4
  11374. .IX Item "max-unswitch-insns"
  11375. The maximum number of insns of an unswitched loop.
  11376. .IP "\fBmax-unswitch-level\fR" 4
  11377. .IX Item "max-unswitch-level"
  11378. The maximum number of branches unswitched in a single loop.
  11379. .IP "\fBlim-expensive\fR" 4
  11380. .IX Item "lim-expensive"
  11381. The minimum cost of an expensive expression in the loop invariant motion.
  11382. .IP "\fBmin-loop-cond-split-prob\fR" 4
  11383. .IX Item "min-loop-cond-split-prob"
  11384. When \s-1FDO\s0 profile information is available, \fBmin-loop-cond-split-prob\fR
  11385. specifies minimum threshold for probability of semi-invariant condition
  11386. statement to trigger loop split.
  11387. .IP "\fBiv-consider-all-candidates-bound\fR" 4
  11388. .IX Item "iv-consider-all-candidates-bound"
  11389. Bound on number of candidates for induction variables, below which
  11390. all candidates are considered for each use in induction variable
  11391. optimizations. If there are more candidates than this,
  11392. only the most relevant ones are considered to avoid quadratic time complexity.
  11393. .IP "\fBiv-max-considered-uses\fR" 4
  11394. .IX Item "iv-max-considered-uses"
  11395. The induction variable optimizations give up on loops that contain more
  11396. induction variable uses.
  11397. .IP "\fBiv-always-prune-cand-set-bound\fR" 4
  11398. .IX Item "iv-always-prune-cand-set-bound"
  11399. If the number of candidates in the set is smaller than this value,
  11400. always try to remove unnecessary ivs from the set
  11401. when adding a new one.
  11402. .IP "\fBavg-loop-niter\fR" 4
  11403. .IX Item "avg-loop-niter"
  11404. Average number of iterations of a loop.
  11405. .IP "\fBdse-max-object-size\fR" 4
  11406. .IX Item "dse-max-object-size"
  11407. Maximum size (in bytes) of objects tracked bytewise by dead store elimination.
  11408. Larger values may result in larger compilation times.
  11409. .IP "\fBdse-max-alias-queries-per-store\fR" 4
  11410. .IX Item "dse-max-alias-queries-per-store"
  11411. Maximum number of queries into the alias oracle per store.
  11412. Larger values result in larger compilation times and may result in more
  11413. removed dead stores.
  11414. .IP "\fBscev-max-expr-size\fR" 4
  11415. .IX Item "scev-max-expr-size"
  11416. Bound on size of expressions used in the scalar evolutions analyzer.
  11417. Large expressions slow the analyzer.
  11418. .IP "\fBscev-max-expr-complexity\fR" 4
  11419. .IX Item "scev-max-expr-complexity"
  11420. Bound on the complexity of the expressions in the scalar evolutions analyzer.
  11421. Complex expressions slow the analyzer.
  11422. .IP "\fBmax-tree-if-conversion-phi-args\fR" 4
  11423. .IX Item "max-tree-if-conversion-phi-args"
  11424. Maximum number of arguments in a \s-1PHI\s0 supported by \s-1TREE\s0 if conversion
  11425. unless the loop is marked with simd pragma.
  11426. .IP "\fBvect-max-version-for-alignment-checks\fR" 4
  11427. .IX Item "vect-max-version-for-alignment-checks"
  11428. The maximum number of run-time checks that can be performed when
  11429. doing loop versioning for alignment in the vectorizer.
  11430. .IP "\fBvect-max-version-for-alias-checks\fR" 4
  11431. .IX Item "vect-max-version-for-alias-checks"
  11432. The maximum number of run-time checks that can be performed when
  11433. doing loop versioning for alias in the vectorizer.
  11434. .IP "\fBvect-max-peeling-for-alignment\fR" 4
  11435. .IX Item "vect-max-peeling-for-alignment"
  11436. The maximum number of loop peels to enhance access alignment
  11437. for vectorizer. Value \-1 means no limit.
  11438. .IP "\fBmax-iterations-to-track\fR" 4
  11439. .IX Item "max-iterations-to-track"
  11440. The maximum number of iterations of a loop the brute-force algorithm
  11441. for analysis of the number of iterations of the loop tries to evaluate.
  11442. .IP "\fBhot-bb-count-fraction\fR" 4
  11443. .IX Item "hot-bb-count-fraction"
  11444. The denominator n of fraction 1/n of the maximal execution count of a
  11445. basic block in the entire program that a basic block needs to at least
  11446. have in order to be considered hot. The default is 10000, which means
  11447. that a basic block is considered hot if its execution count is greater
  11448. than 1/10000 of the maximal execution count. 0 means that it is never
  11449. considered hot. Used in non-LTO mode.
  11450. .IP "\fBhot-bb-count-ws-permille\fR" 4
  11451. .IX Item "hot-bb-count-ws-permille"
  11452. The number of most executed permilles, ranging from 0 to 1000, of the
  11453. profiled execution of the entire program to which the execution count
  11454. of a basic block must be part of in order to be considered hot. The
  11455. default is 990, which means that a basic block is considered hot if
  11456. its execution count contributes to the upper 990 permilles, or 99.0%,
  11457. of the profiled execution of the entire program. 0 means that it is
  11458. never considered hot. Used in \s-1LTO\s0 mode.
  11459. .IP "\fBhot-bb-frequency-fraction\fR" 4
  11460. .IX Item "hot-bb-frequency-fraction"
  11461. The denominator n of fraction 1/n of the execution frequency of the
  11462. entry block of a function that a basic block of this function needs
  11463. to at least have in order to be considered hot. The default is 1000,
  11464. which means that a basic block is considered hot in a function if it
  11465. is executed more frequently than 1/1000 of the frequency of the entry
  11466. block of the function. 0 means that it is never considered hot.
  11467. .IP "\fBunlikely-bb-count-fraction\fR" 4
  11468. .IX Item "unlikely-bb-count-fraction"
  11469. The denominator n of fraction 1/n of the number of profiled runs of
  11470. the entire program below which the execution count of a basic block
  11471. must be in order for the basic block to be considered unlikely executed.
  11472. The default is 20, which means that a basic block is considered unlikely
  11473. executed if it is executed in fewer than 1/20, or 5%, of the runs of
  11474. the program. 0 means that it is always considered unlikely executed.
  11475. .IP "\fBmax-predicted-iterations\fR" 4
  11476. .IX Item "max-predicted-iterations"
  11477. The maximum number of loop iterations we predict statically. This is useful
  11478. in cases where a function contains a single loop with known bound and
  11479. another loop with unknown bound.
  11480. The known number of iterations is predicted correctly, while
  11481. the unknown number of iterations average to roughly 10. This means that the
  11482. loop without bounds appears artificially cold relative to the other one.
  11483. .IP "\fBbuiltin-expect-probability\fR" 4
  11484. .IX Item "builtin-expect-probability"
  11485. Control the probability of the expression having the specified value. This
  11486. parameter takes a percentage (i.e. 0 ... 100) as input.
  11487. .IP "\fBbuiltin-string-cmp-inline-length\fR" 4
  11488. .IX Item "builtin-string-cmp-inline-length"
  11489. The maximum length of a constant string for a builtin string cmp call
  11490. eligible for inlining.
  11491. .IP "\fBalign-threshold\fR" 4
  11492. .IX Item "align-threshold"
  11493. Select fraction of the maximal frequency of executions of a basic block in
  11494. a function to align the basic block.
  11495. .IP "\fBalign-loop-iterations\fR" 4
  11496. .IX Item "align-loop-iterations"
  11497. A loop expected to iterate at least the selected number of iterations is
  11498. aligned.
  11499. .IP "\fBtracer-dynamic-coverage\fR" 4
  11500. .IX Item "tracer-dynamic-coverage"
  11501. .PD 0
  11502. .IP "\fBtracer-dynamic-coverage-feedback\fR" 4
  11503. .IX Item "tracer-dynamic-coverage-feedback"
  11504. .PD
  11505. This value is used to limit superblock formation once the given percentage of
  11506. executed instructions is covered. This limits unnecessary code size
  11507. expansion.
  11508. .Sp
  11509. The \fBtracer-dynamic-coverage-feedback\fR parameter
  11510. is used only when profile
  11511. feedback is available. The real profiles (as opposed to statically estimated
  11512. ones) are much less balanced allowing the threshold to be larger value.
  11513. .IP "\fBtracer-max-code-growth\fR" 4
  11514. .IX Item "tracer-max-code-growth"
  11515. Stop tail duplication once code growth has reached given percentage. This is
  11516. a rather artificial limit, as most of the duplicates are eliminated later in
  11517. cross jumping, so it may be set to much higher values than is the desired code
  11518. growth.
  11519. .IP "\fBtracer-min-branch-ratio\fR" 4
  11520. .IX Item "tracer-min-branch-ratio"
  11521. Stop reverse growth when the reverse probability of best edge is less than this
  11522. threshold (in percent).
  11523. .IP "\fBtracer-min-branch-probability\fR" 4
  11524. .IX Item "tracer-min-branch-probability"
  11525. .PD 0
  11526. .IP "\fBtracer-min-branch-probability-feedback\fR" 4
  11527. .IX Item "tracer-min-branch-probability-feedback"
  11528. .PD
  11529. Stop forward growth if the best edge has probability lower than this
  11530. threshold.
  11531. .Sp
  11532. Similarly to \fBtracer-dynamic-coverage\fR two parameters are
  11533. provided. \fBtracer-min-branch-probability-feedback\fR is used for
  11534. compilation with profile feedback and \fBtracer-min-branch-probability\fR
  11535. compilation without. The value for compilation with profile feedback
  11536. needs to be more conservative (higher) in order to make tracer
  11537. effective.
  11538. .IP "\fBstack-clash-protection-guard-size\fR" 4
  11539. .IX Item "stack-clash-protection-guard-size"
  11540. Specify the size of the operating system provided stack guard as
  11541. 2 raised to \fInum\fR bytes. Higher values may reduce the
  11542. number of explicit probes, but a value larger than the operating system
  11543. provided guard will leave code vulnerable to stack clash style attacks.
  11544. .IP "\fBstack-clash-protection-probe-interval\fR" 4
  11545. .IX Item "stack-clash-protection-probe-interval"
  11546. Stack clash protection involves probing stack space as it is allocated. This
  11547. param controls the maximum distance between probes into the stack as 2 raised
  11548. to \fInum\fR bytes. Higher values may reduce the number of explicit probes, but a value
  11549. larger than the operating system provided guard will leave code vulnerable to
  11550. stack clash style attacks.
  11551. .IP "\fBmax-cse-path-length\fR" 4
  11552. .IX Item "max-cse-path-length"
  11553. The maximum number of basic blocks on path that \s-1CSE\s0 considers.
  11554. .IP "\fBmax-cse-insns\fR" 4
  11555. .IX Item "max-cse-insns"
  11556. The maximum number of instructions \s-1CSE\s0 processes before flushing.
  11557. .IP "\fBggc-min-expand\fR" 4
  11558. .IX Item "ggc-min-expand"
  11559. \&\s-1GCC\s0 uses a garbage collector to manage its own memory allocation. This
  11560. parameter specifies the minimum percentage by which the garbage
  11561. collector's heap should be allowed to expand between collections.
  11562. Tuning this may improve compilation speed; it has no effect on code
  11563. generation.
  11564. .Sp
  11565. The default is 30% + 70% * (\s-1RAM/1GB\s0) with an upper bound of 100% when
  11566. \&\s-1RAM \s0>= 1GB. If \f(CW\*(C`getrlimit\*(C'\fR is available, the notion of \*(L"\s-1RAM\*(R"\s0 is
  11567. the smallest of actual \s-1RAM\s0 and \f(CW\*(C`RLIMIT_DATA\*(C'\fR or \f(CW\*(C`RLIMIT_AS\*(C'\fR. If
  11568. \&\s-1GCC\s0 is not able to calculate \s-1RAM\s0 on a particular platform, the lower
  11569. bound of 30% is used. Setting this parameter and
  11570. \&\fBggc-min-heapsize\fR to zero causes a full collection to occur at
  11571. every opportunity. This is extremely slow, but can be useful for
  11572. debugging.
  11573. .IP "\fBggc-min-heapsize\fR" 4
  11574. .IX Item "ggc-min-heapsize"
  11575. Minimum size of the garbage collector's heap before it begins bothering
  11576. to collect garbage. The first collection occurs after the heap expands
  11577. by \fBggc-min-expand\fR% beyond \fBggc-min-heapsize\fR. Again,
  11578. tuning this may improve compilation speed, and has no effect on code
  11579. generation.
  11580. .Sp
  11581. The default is the smaller of \s-1RAM/8, RLIMIT_RSS,\s0 or a limit that
  11582. tries to ensure that \s-1RLIMIT_DATA\s0 or \s-1RLIMIT_AS\s0 are not exceeded, but
  11583. with a lower bound of 4096 (four megabytes) and an upper bound of
  11584. 131072 (128 megabytes). If \s-1GCC\s0 is not able to calculate \s-1RAM\s0 on a
  11585. particular platform, the lower bound is used. Setting this parameter
  11586. very large effectively disables garbage collection. Setting this
  11587. parameter and \fBggc-min-expand\fR to zero causes a full collection
  11588. to occur at every opportunity.
  11589. .IP "\fBmax-reload-search-insns\fR" 4
  11590. .IX Item "max-reload-search-insns"
  11591. The maximum number of instruction reload should look backward for equivalent
  11592. register. Increasing values mean more aggressive optimization, making the
  11593. compilation time increase with probably slightly better performance.
  11594. .IP "\fBmax-cselib-memory-locations\fR" 4
  11595. .IX Item "max-cselib-memory-locations"
  11596. The maximum number of memory locations cselib should take into account.
  11597. Increasing values mean more aggressive optimization, making the compilation time
  11598. increase with probably slightly better performance.
  11599. .IP "\fBmax-sched-ready-insns\fR" 4
  11600. .IX Item "max-sched-ready-insns"
  11601. The maximum number of instructions ready to be issued the scheduler should
  11602. consider at any given time during the first scheduling pass. Increasing
  11603. values mean more thorough searches, making the compilation time increase
  11604. with probably little benefit.
  11605. .IP "\fBmax-sched-region-blocks\fR" 4
  11606. .IX Item "max-sched-region-blocks"
  11607. The maximum number of blocks in a region to be considered for
  11608. interblock scheduling.
  11609. .IP "\fBmax-pipeline-region-blocks\fR" 4
  11610. .IX Item "max-pipeline-region-blocks"
  11611. The maximum number of blocks in a region to be considered for
  11612. pipelining in the selective scheduler.
  11613. .IP "\fBmax-sched-region-insns\fR" 4
  11614. .IX Item "max-sched-region-insns"
  11615. The maximum number of insns in a region to be considered for
  11616. interblock scheduling.
  11617. .IP "\fBmax-pipeline-region-insns\fR" 4
  11618. .IX Item "max-pipeline-region-insns"
  11619. The maximum number of insns in a region to be considered for
  11620. pipelining in the selective scheduler.
  11621. .IP "\fBmin-spec-prob\fR" 4
  11622. .IX Item "min-spec-prob"
  11623. The minimum probability (in percents) of reaching a source block
  11624. for interblock speculative scheduling.
  11625. .IP "\fBmax-sched-extend-regions-iters\fR" 4
  11626. .IX Item "max-sched-extend-regions-iters"
  11627. The maximum number of iterations through \s-1CFG\s0 to extend regions.
  11628. A value of 0 disables region extensions.
  11629. .IP "\fBmax-sched-insn-conflict-delay\fR" 4
  11630. .IX Item "max-sched-insn-conflict-delay"
  11631. The maximum conflict delay for an insn to be considered for speculative motion.
  11632. .IP "\fBsched-spec-prob-cutoff\fR" 4
  11633. .IX Item "sched-spec-prob-cutoff"
  11634. The minimal probability of speculation success (in percents), so that
  11635. speculative insns are scheduled.
  11636. .IP "\fBsched-state-edge-prob-cutoff\fR" 4
  11637. .IX Item "sched-state-edge-prob-cutoff"
  11638. The minimum probability an edge must have for the scheduler to save its
  11639. state across it.
  11640. .IP "\fBsched-mem-true-dep-cost\fR" 4
  11641. .IX Item "sched-mem-true-dep-cost"
  11642. Minimal distance (in \s-1CPU\s0 cycles) between store and load targeting same
  11643. memory locations.
  11644. .IP "\fBselsched-max-lookahead\fR" 4
  11645. .IX Item "selsched-max-lookahead"
  11646. The maximum size of the lookahead window of selective scheduling. It is a
  11647. depth of search for available instructions.
  11648. .IP "\fBselsched-max-sched-times\fR" 4
  11649. .IX Item "selsched-max-sched-times"
  11650. The maximum number of times that an instruction is scheduled during
  11651. selective scheduling. This is the limit on the number of iterations
  11652. through which the instruction may be pipelined.
  11653. .IP "\fBselsched-insns-to-rename\fR" 4
  11654. .IX Item "selsched-insns-to-rename"
  11655. The maximum number of best instructions in the ready list that are considered
  11656. for renaming in the selective scheduler.
  11657. .IP "\fBsms-min-sc\fR" 4
  11658. .IX Item "sms-min-sc"
  11659. The minimum value of stage count that swing modulo scheduler
  11660. generates.
  11661. .IP "\fBmax-last-value-rtl\fR" 4
  11662. .IX Item "max-last-value-rtl"
  11663. The maximum size measured as number of RTLs that can be recorded in an expression
  11664. in combiner for a pseudo register as last known value of that register.
  11665. .IP "\fBmax-combine-insns\fR" 4
  11666. .IX Item "max-combine-insns"
  11667. The maximum number of instructions the \s-1RTL\s0 combiner tries to combine.
  11668. .IP "\fBinteger-share-limit\fR" 4
  11669. .IX Item "integer-share-limit"
  11670. Small integer constants can use a shared data structure, reducing the
  11671. compiler's memory usage and increasing its speed. This sets the maximum
  11672. value of a shared integer constant.
  11673. .IP "\fBssp-buffer-size\fR" 4
  11674. .IX Item "ssp-buffer-size"
  11675. The minimum size of buffers (i.e. arrays) that receive stack smashing
  11676. protection when \fB\-fstack\-protection\fR is used.
  11677. .IP "\fBmin-size-for-stack-sharing\fR" 4
  11678. .IX Item "min-size-for-stack-sharing"
  11679. The minimum size of variables taking part in stack slot sharing when not
  11680. optimizing.
  11681. .IP "\fBmax-jump-thread-duplication-stmts\fR" 4
  11682. .IX Item "max-jump-thread-duplication-stmts"
  11683. Maximum number of statements allowed in a block that needs to be
  11684. duplicated when threading jumps.
  11685. .IP "\fBmax-fields-for-field-sensitive\fR" 4
  11686. .IX Item "max-fields-for-field-sensitive"
  11687. Maximum number of fields in a structure treated in
  11688. a field sensitive manner during pointer analysis.
  11689. .IP "\fBprefetch-latency\fR" 4
  11690. .IX Item "prefetch-latency"
  11691. Estimate on average number of instructions that are executed before
  11692. prefetch finishes. The distance prefetched ahead is proportional
  11693. to this constant. Increasing this number may also lead to less
  11694. streams being prefetched (see \fBsimultaneous-prefetches\fR).
  11695. .IP "\fBsimultaneous-prefetches\fR" 4
  11696. .IX Item "simultaneous-prefetches"
  11697. Maximum number of prefetches that can run at the same time.
  11698. .IP "\fBl1\-cache\-line\-size\fR" 4
  11699. .IX Item "l1-cache-line-size"
  11700. The size of cache line in L1 data cache, in bytes.
  11701. .IP "\fBl1\-cache\-size\fR" 4
  11702. .IX Item "l1-cache-size"
  11703. The size of L1 data cache, in kilobytes.
  11704. .IP "\fBl2\-cache\-size\fR" 4
  11705. .IX Item "l2-cache-size"
  11706. The size of L2 data cache, in kilobytes.
  11707. .IP "\fBprefetch-dynamic-strides\fR" 4
  11708. .IX Item "prefetch-dynamic-strides"
  11709. Whether the loop array prefetch pass should issue software prefetch hints
  11710. for strides that are non-constant. In some cases this may be
  11711. beneficial, though the fact the stride is non-constant may make it
  11712. hard to predict when there is clear benefit to issuing these hints.
  11713. .Sp
  11714. Set to 1 if the prefetch hints should be issued for non-constant
  11715. strides. Set to 0 if prefetch hints should be issued only for strides that
  11716. are known to be constant and below \fBprefetch-minimum-stride\fR.
  11717. .IP "\fBprefetch-minimum-stride\fR" 4
  11718. .IX Item "prefetch-minimum-stride"
  11719. Minimum constant stride, in bytes, to start using prefetch hints for. If
  11720. the stride is less than this threshold, prefetch hints will not be issued.
  11721. .Sp
  11722. This setting is useful for processors that have hardware prefetchers, in
  11723. which case there may be conflicts between the hardware prefetchers and
  11724. the software prefetchers. If the hardware prefetchers have a maximum
  11725. stride they can handle, it should be used here to improve the use of
  11726. software prefetchers.
  11727. .Sp
  11728. A value of \-1 means we don't have a threshold and therefore
  11729. prefetch hints can be issued for any constant stride.
  11730. .Sp
  11731. This setting is only useful for strides that are known and constant.
  11732. .IP "\fBloop-interchange-max-num-stmts\fR" 4
  11733. .IX Item "loop-interchange-max-num-stmts"
  11734. The maximum number of stmts in a loop to be interchanged.
  11735. .IP "\fBloop-interchange-stride-ratio\fR" 4
  11736. .IX Item "loop-interchange-stride-ratio"
  11737. The minimum ratio between stride of two loops for interchange to be profitable.
  11738. .IP "\fBmin-insn-to-prefetch-ratio\fR" 4
  11739. .IX Item "min-insn-to-prefetch-ratio"
  11740. The minimum ratio between the number of instructions and the
  11741. number of prefetches to enable prefetching in a loop.
  11742. .IP "\fBprefetch-min-insn-to-mem-ratio\fR" 4
  11743. .IX Item "prefetch-min-insn-to-mem-ratio"
  11744. The minimum ratio between the number of instructions and the
  11745. number of memory references to enable prefetching in a loop.
  11746. .IP "\fBuse-canonical-types\fR" 4
  11747. .IX Item "use-canonical-types"
  11748. Whether the compiler should use the \*(L"canonical\*(R" type system.
  11749. Should always be 1, which uses a more efficient internal
  11750. mechanism for comparing types in \*(C+ and Objective\-\*(C+. However, if
  11751. bugs in the canonical type system are causing compilation failures,
  11752. set this value to 0 to disable canonical types.
  11753. .IP "\fBswitch-conversion-max-branch-ratio\fR" 4
  11754. .IX Item "switch-conversion-max-branch-ratio"
  11755. Switch initialization conversion refuses to create arrays that are
  11756. bigger than \fBswitch-conversion-max-branch-ratio\fR times the number of
  11757. branches in the switch.
  11758. .IP "\fBmax-partial-antic-length\fR" 4
  11759. .IX Item "max-partial-antic-length"
  11760. Maximum length of the partial antic set computed during the tree
  11761. partial redundancy elimination optimization (\fB\-ftree\-pre\fR) when
  11762. optimizing at \fB\-O3\fR and above. For some sorts of source code
  11763. the enhanced partial redundancy elimination optimization can run away,
  11764. consuming all of the memory available on the host machine. This
  11765. parameter sets a limit on the length of the sets that are computed,
  11766. which prevents the runaway behavior. Setting a value of 0 for
  11767. this parameter allows an unlimited set length.
  11768. .IP "\fBrpo-vn-max-loop-depth\fR" 4
  11769. .IX Item "rpo-vn-max-loop-depth"
  11770. Maximum loop depth that is value-numbered optimistically.
  11771. When the limit hits the innermost
  11772. \&\fIrpo-vn-max-loop-depth\fR loops and the outermost loop in the
  11773. loop nest are value-numbered optimistically and the remaining ones not.
  11774. .IP "\fBsccvn-max-alias-queries-per-access\fR" 4
  11775. .IX Item "sccvn-max-alias-queries-per-access"
  11776. Maximum number of alias-oracle queries we perform when looking for
  11777. redundancies for loads and stores. If this limit is hit the search
  11778. is aborted and the load or store is not considered redundant. The
  11779. number of queries is algorithmically limited to the number of
  11780. stores on all paths from the load to the function entry.
  11781. .IP "\fBira-max-loops-num\fR" 4
  11782. .IX Item "ira-max-loops-num"
  11783. \&\s-1IRA\s0 uses regional register allocation by default. If a function
  11784. contains more loops than the number given by this parameter, only at most
  11785. the given number of the most frequently-executed loops form regions
  11786. for regional register allocation.
  11787. .IP "\fBira-max-conflict-table-size\fR" 4
  11788. .IX Item "ira-max-conflict-table-size"
  11789. Although \s-1IRA\s0 uses a sophisticated algorithm to compress the conflict
  11790. table, the table can still require excessive amounts of memory for
  11791. huge functions. If the conflict table for a function could be more
  11792. than the size in \s-1MB\s0 given by this parameter, the register allocator
  11793. instead uses a faster, simpler, and lower-quality
  11794. algorithm that does not require building a pseudo-register conflict table.
  11795. .IP "\fBira-loop-reserved-regs\fR" 4
  11796. .IX Item "ira-loop-reserved-regs"
  11797. \&\s-1IRA\s0 can be used to evaluate more accurate register pressure in loops
  11798. for decisions to move loop invariants (see \fB\-O3\fR). The number
  11799. of available registers reserved for some other purposes is given
  11800. by this parameter. Default of the parameter
  11801. is the best found from numerous experiments.
  11802. .IP "\fBlra-inheritance-ebb-probability-cutoff\fR" 4
  11803. .IX Item "lra-inheritance-ebb-probability-cutoff"
  11804. \&\s-1LRA\s0 tries to reuse values reloaded in registers in subsequent insns.
  11805. This optimization is called inheritance. \s-1EBB\s0 is used as a region to
  11806. do this optimization. The parameter defines a minimal fall-through
  11807. edge probability in percentage used to add \s-1BB\s0 to inheritance \s-1EBB\s0 in
  11808. \&\s-1LRA. \s0 The default value was chosen
  11809. from numerous runs of \s-1SPEC2000\s0 on x86\-64.
  11810. .IP "\fBloop-invariant-max-bbs-in-loop\fR" 4
  11811. .IX Item "loop-invariant-max-bbs-in-loop"
  11812. Loop invariant motion can be very expensive, both in compilation time and
  11813. in amount of needed compile-time memory, with very large loops. Loops
  11814. with more basic blocks than this parameter won't have loop invariant
  11815. motion optimization performed on them.
  11816. .IP "\fBloop-max-datarefs-for-datadeps\fR" 4
  11817. .IX Item "loop-max-datarefs-for-datadeps"
  11818. Building data dependencies is expensive for very large loops. This
  11819. parameter limits the number of data references in loops that are
  11820. considered for data dependence analysis. These large loops are no
  11821. handled by the optimizations using loop data dependencies.
  11822. .IP "\fBmax-vartrack-size\fR" 4
  11823. .IX Item "max-vartrack-size"
  11824. Sets a maximum number of hash table slots to use during variable
  11825. tracking dataflow analysis of any function. If this limit is exceeded
  11826. with variable tracking at assignments enabled, analysis for that
  11827. function is retried without it, after removing all debug insns from
  11828. the function. If the limit is exceeded even without debug insns, var
  11829. tracking analysis is completely disabled for the function. Setting
  11830. the parameter to zero makes it unlimited.
  11831. .IP "\fBmax-vartrack-expr-depth\fR" 4
  11832. .IX Item "max-vartrack-expr-depth"
  11833. Sets a maximum number of recursion levels when attempting to map
  11834. variable names or debug temporaries to value expressions. This trades
  11835. compilation time for more complete debug information. If this is set too
  11836. low, value expressions that are available and could be represented in
  11837. debug information may end up not being used; setting this higher may
  11838. enable the compiler to find more complex debug expressions, but compile
  11839. time and memory use may grow.
  11840. .IP "\fBmax-debug-marker-count\fR" 4
  11841. .IX Item "max-debug-marker-count"
  11842. Sets a threshold on the number of debug markers (e.g. begin stmt
  11843. markers) to avoid complexity explosion at inlining or expanding to \s-1RTL.\s0
  11844. If a function has more such gimple stmts than the set limit, such stmts
  11845. will be dropped from the inlined copy of a function, and from its \s-1RTL\s0
  11846. expansion.
  11847. .IP "\fBmin-nondebug-insn-uid\fR" 4
  11848. .IX Item "min-nondebug-insn-uid"
  11849. Use uids starting at this parameter for nondebug insns. The range below
  11850. the parameter is reserved exclusively for debug insns created by
  11851. \&\fB\-fvar\-tracking\-assignments\fR, but debug insns may get
  11852. (non-overlapping) uids above it if the reserved range is exhausted.
  11853. .IP "\fBipa-sra-ptr-growth-factor\fR" 4
  11854. .IX Item "ipa-sra-ptr-growth-factor"
  11855. IPA-SRA replaces a pointer to an aggregate with one or more new
  11856. parameters only when their cumulative size is less or equal to
  11857. \&\fBipa-sra-ptr-growth-factor\fR times the size of the original
  11858. pointer parameter.
  11859. .IP "\fBipa-sra-max-replacements\fR" 4
  11860. .IX Item "ipa-sra-max-replacements"
  11861. Maximum pieces of an aggregate that IPA-SRA tracks. As a
  11862. consequence, it is also the maximum number of replacements of a formal
  11863. parameter.
  11864. .IP "\fBsra-max-scalarization-size-Ospeed\fR" 4
  11865. .IX Item "sra-max-scalarization-size-Ospeed"
  11866. .PD 0
  11867. .IP "\fBsra-max-scalarization-size-Osize\fR" 4
  11868. .IX Item "sra-max-scalarization-size-Osize"
  11869. .PD
  11870. The two Scalar Reduction of Aggregates passes (\s-1SRA\s0 and IPA-SRA) aim to
  11871. replace scalar parts of aggregates with uses of independent scalar
  11872. variables. These parameters control the maximum size, in storage units,
  11873. of aggregate which is considered for replacement when compiling for
  11874. speed
  11875. (\fBsra-max-scalarization-size-Ospeed\fR) or size
  11876. (\fBsra-max-scalarization-size-Osize\fR) respectively.
  11877. .IP "\fBsra-max-propagations\fR" 4
  11878. .IX Item "sra-max-propagations"
  11879. The maximum number of artificial accesses that Scalar Replacement of
  11880. Aggregates (\s-1SRA\s0) will track, per one local variable, in order to
  11881. facilitate copy propagation.
  11882. .IP "\fBtm-max-aggregate-size\fR" 4
  11883. .IX Item "tm-max-aggregate-size"
  11884. When making copies of thread-local variables in a transaction, this
  11885. parameter specifies the size in bytes after which variables are
  11886. saved with the logging functions as opposed to save/restore code
  11887. sequence pairs. This option only applies when using
  11888. \&\fB\-fgnu\-tm\fR.
  11889. .IP "\fBgraphite-max-nb-scop-params\fR" 4
  11890. .IX Item "graphite-max-nb-scop-params"
  11891. To avoid exponential effects in the Graphite loop transforms, the
  11892. number of parameters in a Static Control Part (SCoP) is bounded.
  11893. A value of zero can be used to lift
  11894. the bound. A variable whose value is unknown at compilation time and
  11895. defined outside a SCoP is a parameter of the SCoP.
  11896. .IP "\fBloop-block-tile-size\fR" 4
  11897. .IX Item "loop-block-tile-size"
  11898. Loop blocking or strip mining transforms, enabled with
  11899. \&\fB\-floop\-block\fR or \fB\-floop\-strip\-mine\fR, strip mine each
  11900. loop in the loop nest by a given number of iterations. The strip
  11901. length can be changed using the \fBloop-block-tile-size\fR
  11902. parameter.
  11903. .IP "\fBipa-cp-value-list-size\fR" 4
  11904. .IX Item "ipa-cp-value-list-size"
  11905. IPA-CP attempts to track all possible values and types passed to a function's
  11906. parameter in order to propagate them and perform devirtualization.
  11907. \&\fBipa-cp-value-list-size\fR is the maximum number of values and types it
  11908. stores per one formal parameter of a function.
  11909. .IP "\fBipa-cp-eval-threshold\fR" 4
  11910. .IX Item "ipa-cp-eval-threshold"
  11911. IPA-CP calculates its own score of cloning profitability heuristics
  11912. and performs those cloning opportunities with scores that exceed
  11913. \&\fBipa-cp-eval-threshold\fR.
  11914. .IP "\fBipa-cp-max-recursive-depth\fR" 4
  11915. .IX Item "ipa-cp-max-recursive-depth"
  11916. Maximum depth of recursive cloning for self-recursive function.
  11917. .IP "\fBipa-cp-min-recursive-probability\fR" 4
  11918. .IX Item "ipa-cp-min-recursive-probability"
  11919. Recursive cloning only when the probability of call being executed exceeds
  11920. the parameter.
  11921. .IP "\fBipa-cp-recursion-penalty\fR" 4
  11922. .IX Item "ipa-cp-recursion-penalty"
  11923. Percentage penalty the recursive functions will receive when they
  11924. are evaluated for cloning.
  11925. .IP "\fBipa-cp-single-call-penalty\fR" 4
  11926. .IX Item "ipa-cp-single-call-penalty"
  11927. Percentage penalty functions containing a single call to another
  11928. function will receive when they are evaluated for cloning.
  11929. .IP "\fBipa-max-agg-items\fR" 4
  11930. .IX Item "ipa-max-agg-items"
  11931. IPA-CP is also capable to propagate a number of scalar values passed
  11932. in an aggregate. \fBipa-max-agg-items\fR controls the maximum
  11933. number of such values per one parameter.
  11934. .IP "\fBipa-cp-loop-hint-bonus\fR" 4
  11935. .IX Item "ipa-cp-loop-hint-bonus"
  11936. When IPA-CP determines that a cloning candidate would make the number
  11937. of iterations of a loop known, it adds a bonus of
  11938. \&\fBipa-cp-loop-hint-bonus\fR to the profitability score of
  11939. the candidate.
  11940. .IP "\fBipa-max-aa-steps\fR" 4
  11941. .IX Item "ipa-max-aa-steps"
  11942. During its analysis of function bodies, IPA-CP employs alias analysis
  11943. in order to track values pointed to by function parameters. In order
  11944. not spend too much time analyzing huge functions, it gives up and
  11945. consider all memory clobbered after examining
  11946. \&\fBipa-max-aa-steps\fR statements modifying memory.
  11947. .IP "\fBipa-max-switch-predicate-bounds\fR" 4
  11948. .IX Item "ipa-max-switch-predicate-bounds"
  11949. Maximal number of boundary endpoints of case ranges of switch statement.
  11950. For switch exceeding this limit, IPA-CP will not construct cloning cost
  11951. predicate, which is used to estimate cloning benefit, for default case
  11952. of the switch statement.
  11953. .IP "\fBipa-max-param-expr-ops\fR" 4
  11954. .IX Item "ipa-max-param-expr-ops"
  11955. IPA-CP will analyze conditional statement that references some function
  11956. parameter to estimate benefit for cloning upon certain constant value.
  11957. But if number of operations in a parameter expression exceeds
  11958. \&\fBipa-max-param-expr-ops\fR, the expression is treated as complicated
  11959. one, and is not handled by \s-1IPA\s0 analysis.
  11960. .IP "\fBlto-partitions\fR" 4
  11961. .IX Item "lto-partitions"
  11962. Specify desired number of partitions produced during \s-1WHOPR\s0 compilation.
  11963. The number of partitions should exceed the number of CPUs used for compilation.
  11964. .IP "\fBlto-min-partition\fR" 4
  11965. .IX Item "lto-min-partition"
  11966. Size of minimal partition for \s-1WHOPR \s0(in estimated instructions).
  11967. This prevents expenses of splitting very small programs into too many
  11968. partitions.
  11969. .IP "\fBlto-max-partition\fR" 4
  11970. .IX Item "lto-max-partition"
  11971. Size of max partition for \s-1WHOPR \s0(in estimated instructions).
  11972. to provide an upper bound for individual size of partition.
  11973. Meant to be used only with balanced partitioning.
  11974. .IP "\fBlto-max-streaming-parallelism\fR" 4
  11975. .IX Item "lto-max-streaming-parallelism"
  11976. Maximal number of parallel processes used for \s-1LTO\s0 streaming.
  11977. .IP "\fBcxx-max-namespaces-for-diagnostic-help\fR" 4
  11978. .IX Item "cxx-max-namespaces-for-diagnostic-help"
  11979. The maximum number of namespaces to consult for suggestions when \*(C+
  11980. name lookup fails for an identifier.
  11981. .IP "\fBsink-frequency-threshold\fR" 4
  11982. .IX Item "sink-frequency-threshold"
  11983. The maximum relative execution frequency (in percents) of the target block
  11984. relative to a statement's original block to allow statement sinking of a
  11985. statement. Larger numbers result in more aggressive statement sinking.
  11986. A small positive adjustment is applied for
  11987. statements with memory operands as those are even more profitable so sink.
  11988. .IP "\fBmax-stores-to-sink\fR" 4
  11989. .IX Item "max-stores-to-sink"
  11990. The maximum number of conditional store pairs that can be sunk. Set to 0
  11991. if either vectorization (\fB\-ftree\-vectorize\fR) or if-conversion
  11992. (\fB\-ftree\-loop\-if\-convert\fR) is disabled.
  11993. .IP "\fBcase-values-threshold\fR" 4
  11994. .IX Item "case-values-threshold"
  11995. The smallest number of different values for which it is best to use a
  11996. jump-table instead of a tree of conditional branches. If the value is
  11997. 0, use the default for the machine.
  11998. .IP "\fBjump-table-max-growth-ratio-for-size\fR" 4
  11999. .IX Item "jump-table-max-growth-ratio-for-size"
  12000. The maximum code size growth ratio when expanding
  12001. into a jump table (in percent). The parameter is used when
  12002. optimizing for size.
  12003. .IP "\fBjump-table-max-growth-ratio-for-speed\fR" 4
  12004. .IX Item "jump-table-max-growth-ratio-for-speed"
  12005. The maximum code size growth ratio when expanding
  12006. into a jump table (in percent). The parameter is used when
  12007. optimizing for speed.
  12008. .IP "\fBtree-reassoc-width\fR" 4
  12009. .IX Item "tree-reassoc-width"
  12010. Set the maximum number of instructions executed in parallel in
  12011. reassociated tree. This parameter overrides target dependent
  12012. heuristics used by default if has non zero value.
  12013. .IP "\fBsched-pressure-algorithm\fR" 4
  12014. .IX Item "sched-pressure-algorithm"
  12015. Choose between the two available implementations of
  12016. \&\fB\-fsched\-pressure\fR. Algorithm 1 is the original implementation
  12017. and is the more likely to prevent instructions from being reordered.
  12018. Algorithm 2 was designed to be a compromise between the relatively
  12019. conservative approach taken by algorithm 1 and the rather aggressive
  12020. approach taken by the default scheduler. It relies more heavily on
  12021. having a regular register file and accurate register pressure classes.
  12022. See \fIhaifa\-sched.c\fR in the \s-1GCC\s0 sources for more details.
  12023. .Sp
  12024. The default choice depends on the target.
  12025. .IP "\fBmax-slsr-cand-scan\fR" 4
  12026. .IX Item "max-slsr-cand-scan"
  12027. Set the maximum number of existing candidates that are considered when
  12028. seeking a basis for a new straight-line strength reduction candidate.
  12029. .IP "\fBasan-globals\fR" 4
  12030. .IX Item "asan-globals"
  12031. Enable buffer overflow detection for global objects. This kind
  12032. of protection is enabled by default if you are using
  12033. \&\fB\-fsanitize=address\fR option.
  12034. To disable global objects protection use \fB\-\-param asan\-globals=0\fR.
  12035. .IP "\fBasan-stack\fR" 4
  12036. .IX Item "asan-stack"
  12037. Enable buffer overflow detection for stack objects. This kind of
  12038. protection is enabled by default when using \fB\-fsanitize=address\fR.
  12039. To disable stack protection use \fB\-\-param asan\-stack=0\fR option.
  12040. .IP "\fBasan-instrument-reads\fR" 4
  12041. .IX Item "asan-instrument-reads"
  12042. Enable buffer overflow detection for memory reads. This kind of
  12043. protection is enabled by default when using \fB\-fsanitize=address\fR.
  12044. To disable memory reads protection use
  12045. \&\fB\-\-param asan\-instrument\-reads=0\fR.
  12046. .IP "\fBasan-instrument-writes\fR" 4
  12047. .IX Item "asan-instrument-writes"
  12048. Enable buffer overflow detection for memory writes. This kind of
  12049. protection is enabled by default when using \fB\-fsanitize=address\fR.
  12050. To disable memory writes protection use
  12051. \&\fB\-\-param asan\-instrument\-writes=0\fR option.
  12052. .IP "\fBasan-memintrin\fR" 4
  12053. .IX Item "asan-memintrin"
  12054. Enable detection for built-in functions. This kind of protection
  12055. is enabled by default when using \fB\-fsanitize=address\fR.
  12056. To disable built-in functions protection use
  12057. \&\fB\-\-param asan\-memintrin=0\fR.
  12058. .IP "\fBasan-use-after-return\fR" 4
  12059. .IX Item "asan-use-after-return"
  12060. Enable detection of use-after-return. This kind of protection
  12061. is enabled by default when using the \fB\-fsanitize=address\fR option.
  12062. To disable it use \fB\-\-param asan\-use\-after\-return=0\fR.
  12063. .Sp
  12064. Note: By default the check is disabled at run time. To enable it,
  12065. add \f(CW\*(C`detect_stack_use_after_return=1\*(C'\fR to the environment variable
  12066. \&\fB\s-1ASAN_OPTIONS\s0\fR.
  12067. .IP "\fBasan-instrumentation-with-call-threshold\fR" 4
  12068. .IX Item "asan-instrumentation-with-call-threshold"
  12069. If number of memory accesses in function being instrumented
  12070. is greater or equal to this number, use callbacks instead of inline checks.
  12071. E.g. to disable inline code use
  12072. \&\fB\-\-param asan\-instrumentation\-with\-call\-threshold=0\fR.
  12073. .IP "\fBuse-after-scope-direct-emission-threshold\fR" 4
  12074. .IX Item "use-after-scope-direct-emission-threshold"
  12075. If the size of a local variable in bytes is smaller or equal to this
  12076. number, directly poison (or unpoison) shadow memory instead of using
  12077. run-time callbacks.
  12078. .IP "\fBmax-fsm-thread-path-insns\fR" 4
  12079. .IX Item "max-fsm-thread-path-insns"
  12080. Maximum number of instructions to copy when duplicating blocks on a
  12081. finite state automaton jump thread path.
  12082. .IP "\fBmax-fsm-thread-length\fR" 4
  12083. .IX Item "max-fsm-thread-length"
  12084. Maximum number of basic blocks on a finite state automaton jump thread
  12085. path.
  12086. .IP "\fBmax-fsm-thread-paths\fR" 4
  12087. .IX Item "max-fsm-thread-paths"
  12088. Maximum number of new jump thread paths to create for a finite state
  12089. automaton.
  12090. .IP "\fBparloops-chunk-size\fR" 4
  12091. .IX Item "parloops-chunk-size"
  12092. Chunk size of omp schedule for loops parallelized by parloops.
  12093. .IP "\fBparloops-schedule\fR" 4
  12094. .IX Item "parloops-schedule"
  12095. Schedule type of omp schedule for loops parallelized by parloops (static,
  12096. dynamic, guided, auto, runtime).
  12097. .IP "\fBparloops-min-per-thread\fR" 4
  12098. .IX Item "parloops-min-per-thread"
  12099. The minimum number of iterations per thread of an innermost parallelized
  12100. loop for which the parallelized variant is preferred over the single threaded
  12101. one. Note that for a parallelized loop nest the
  12102. minimum number of iterations of the outermost loop per thread is two.
  12103. .IP "\fBmax-ssa-name-query-depth\fR" 4
  12104. .IX Item "max-ssa-name-query-depth"
  12105. Maximum depth of recursion when querying properties of \s-1SSA\s0 names in things
  12106. like fold routines. One level of recursion corresponds to following a
  12107. use-def chain.
  12108. .IP "\fBhsa-gen-debug-stores\fR" 4
  12109. .IX Item "hsa-gen-debug-stores"
  12110. Enable emission of special debug stores within \s-1HSA\s0 kernels which are
  12111. then read and reported by libgomp plugin. Generation of these stores
  12112. is disabled by default, use \fB\-\-param hsa\-gen\-debug\-stores=1\fR to
  12113. enable it.
  12114. .IP "\fBmax-speculative-devirt-maydefs\fR" 4
  12115. .IX Item "max-speculative-devirt-maydefs"
  12116. The maximum number of may-defs we analyze when looking for a must-def
  12117. specifying the dynamic type of an object that invokes a virtual call
  12118. we may be able to devirtualize speculatively.
  12119. .IP "\fBmax-vrp-switch-assertions\fR" 4
  12120. .IX Item "max-vrp-switch-assertions"
  12121. The maximum number of assertions to add along the default edge of a switch
  12122. statement during \s-1VRP.\s0
  12123. .IP "\fBunroll-jam-min-percent\fR" 4
  12124. .IX Item "unroll-jam-min-percent"
  12125. The minimum percentage of memory references that must be optimized
  12126. away for the unroll-and-jam transformation to be considered profitable.
  12127. .IP "\fBunroll-jam-max-unroll\fR" 4
  12128. .IX Item "unroll-jam-max-unroll"
  12129. The maximum number of times the outer loop should be unrolled by
  12130. the unroll-and-jam transformation.
  12131. .IP "\fBmax-rtl-if-conversion-unpredictable-cost\fR" 4
  12132. .IX Item "max-rtl-if-conversion-unpredictable-cost"
  12133. Maximum permissible cost for the sequence that would be generated
  12134. by the \s-1RTL\s0 if-conversion pass for a branch that is considered unpredictable.
  12135. .IP "\fBmax-variable-expansions-in-unroller\fR" 4
  12136. .IX Item "max-variable-expansions-in-unroller"
  12137. If \fB\-fvariable\-expansion\-in\-unroller\fR is used, the maximum number
  12138. of times that an individual variable will be expanded during loop unrolling.
  12139. .IP "\fBtracer-min-branch-probability-feedback\fR" 4
  12140. .IX Item "tracer-min-branch-probability-feedback"
  12141. Stop forward growth if the probability of best edge is less than
  12142. this threshold (in percent). Used when profile feedback is available.
  12143. .IP "\fBpartial-inlining-entry-probability\fR" 4
  12144. .IX Item "partial-inlining-entry-probability"
  12145. Maximum probability of the entry \s-1BB\s0 of split region
  12146. (in percent relative to entry \s-1BB\s0 of the function)
  12147. to make partial inlining happen.
  12148. .IP "\fBmax-tracked-strlens\fR" 4
  12149. .IX Item "max-tracked-strlens"
  12150. Maximum number of strings for which strlen optimization pass will
  12151. track string lengths.
  12152. .IP "\fBgcse-after-reload-partial-fraction\fR" 4
  12153. .IX Item "gcse-after-reload-partial-fraction"
  12154. The threshold ratio for performing partial redundancy
  12155. elimination after reload.
  12156. .IP "\fBgcse-after-reload-critical-fraction\fR" 4
  12157. .IX Item "gcse-after-reload-critical-fraction"
  12158. The threshold ratio of critical edges execution count that
  12159. permit performing redundancy elimination after reload.
  12160. .IP "\fBmax-loop-header-insns\fR" 4
  12161. .IX Item "max-loop-header-insns"
  12162. The maximum number of insns in loop header duplicated
  12163. by the copy loop headers pass.
  12164. .IP "\fBvect-epilogues-nomask\fR" 4
  12165. .IX Item "vect-epilogues-nomask"
  12166. Enable loop epilogue vectorization using smaller vector size.
  12167. .IP "\fBslp-max-insns-in-bb\fR" 4
  12168. .IX Item "slp-max-insns-in-bb"
  12169. Maximum number of instructions in basic block to be
  12170. considered for \s-1SLP\s0 vectorization.
  12171. .IP "\fBavoid-fma-max-bits\fR" 4
  12172. .IX Item "avoid-fma-max-bits"
  12173. Maximum number of bits for which we avoid creating FMAs.
  12174. .IP "\fBsms-loop-average-count-threshold\fR" 4
  12175. .IX Item "sms-loop-average-count-threshold"
  12176. A threshold on the average loop count considered by the swing modulo scheduler.
  12177. .IP "\fBsms-dfa-history\fR" 4
  12178. .IX Item "sms-dfa-history"
  12179. The number of cycles the swing modulo scheduler considers when checking
  12180. conflicts using \s-1DFA.\s0
  12181. .IP "\fBmax-inline-insns-recursive-auto\fR" 4
  12182. .IX Item "max-inline-insns-recursive-auto"
  12183. The maximum number of instructions non-inline function
  12184. can grow to via recursive inlining.
  12185. .IP "\fBgraphite-allow-codegen-errors\fR" 4
  12186. .IX Item "graphite-allow-codegen-errors"
  12187. Whether codegen errors should be ICEs when \fB\-fchecking\fR.
  12188. .IP "\fBsms-max-ii-factor\fR" 4
  12189. .IX Item "sms-max-ii-factor"
  12190. A factor for tuning the upper bound that swing modulo scheduler
  12191. uses for scheduling a loop.
  12192. .IP "\fBlra-max-considered-reload-pseudos\fR" 4
  12193. .IX Item "lra-max-considered-reload-pseudos"
  12194. The max number of reload pseudos which are considered during
  12195. spilling a non-reload pseudo.
  12196. .IP "\fBmax-pow-sqrt-depth\fR" 4
  12197. .IX Item "max-pow-sqrt-depth"
  12198. Maximum depth of sqrt chains to use when synthesizing exponentiation
  12199. by a real constant.
  12200. .IP "\fBmax-dse-active-local-stores\fR" 4
  12201. .IX Item "max-dse-active-local-stores"
  12202. Maximum number of active local stores in \s-1RTL\s0 dead store elimination.
  12203. .IP "\fBasan-instrument-allocas\fR" 4
  12204. .IX Item "asan-instrument-allocas"
  12205. Enable asan allocas/VLAs protection.
  12206. .IP "\fBmax-iterations-computation-cost\fR" 4
  12207. .IX Item "max-iterations-computation-cost"
  12208. Bound on the cost of an expression to compute the number of iterations.
  12209. .IP "\fBmax-isl-operations\fR" 4
  12210. .IX Item "max-isl-operations"
  12211. Maximum number of isl operations, 0 means unlimited.
  12212. .IP "\fBgraphite-max-arrays-per-scop\fR" 4
  12213. .IX Item "graphite-max-arrays-per-scop"
  12214. Maximum number of arrays per scop.
  12215. .IP "\fBmax-vartrack-reverse-op-size\fR" 4
  12216. .IX Item "max-vartrack-reverse-op-size"
  12217. Max. size of loc list for which reverse ops should be added.
  12218. .IP "\fBtracer-dynamic-coverage-feedback\fR" 4
  12219. .IX Item "tracer-dynamic-coverage-feedback"
  12220. The percentage of function, weighted by execution frequency,
  12221. that must be covered by trace formation.
  12222. Used when profile feedback is available.
  12223. .IP "\fBmax-inline-recursive-depth-auto\fR" 4
  12224. .IX Item "max-inline-recursive-depth-auto"
  12225. The maximum depth of recursive inlining for non-inline functions.
  12226. .IP "\fBfsm-scale-path-stmts\fR" 4
  12227. .IX Item "fsm-scale-path-stmts"
  12228. Scale factor to apply to the number of statements in a threading path
  12229. when comparing to the number of (scaled) blocks.
  12230. .IP "\fBfsm-maximum-phi-arguments\fR" 4
  12231. .IX Item "fsm-maximum-phi-arguments"
  12232. Maximum number of arguments a \s-1PHI\s0 may have before the \s-1FSM\s0 threader
  12233. will not try to thread through its block.
  12234. .IP "\fBuninit-control-dep-attempts\fR" 4
  12235. .IX Item "uninit-control-dep-attempts"
  12236. Maximum number of nested calls to search for control dependencies
  12237. during uninitialized variable analysis.
  12238. .IP "\fBsra-max-scalarization-size-Osize\fR" 4
  12239. .IX Item "sra-max-scalarization-size-Osize"
  12240. Maximum size, in storage units, of an aggregate
  12241. which should be considered for scalarization when compiling for size.
  12242. .IP "\fBfsm-scale-path-blocks\fR" 4
  12243. .IX Item "fsm-scale-path-blocks"
  12244. Scale factor to apply to the number of blocks in a threading path
  12245. when comparing to the number of (scaled) statements.
  12246. .IP "\fBsched-autopref-queue-depth\fR" 4
  12247. .IX Item "sched-autopref-queue-depth"
  12248. Hardware autoprefetcher scheduler model control flag.
  12249. Number of lookahead cycles the model looks into; at '
  12250. \&' only enable instruction sorting heuristic.
  12251. .IP "\fBloop-versioning-max-inner-insns\fR" 4
  12252. .IX Item "loop-versioning-max-inner-insns"
  12253. The maximum number of instructions that an inner loop can have
  12254. before the loop versioning pass considers it too big to copy.
  12255. .IP "\fBloop-versioning-max-outer-insns\fR" 4
  12256. .IX Item "loop-versioning-max-outer-insns"
  12257. The maximum number of instructions that an outer loop can have
  12258. before the loop versioning pass considers it too big to copy,
  12259. discounting any instructions in inner loops that directly benefit
  12260. from versioning.
  12261. .IP "\fBssa-name-def-chain-limit\fR" 4
  12262. .IX Item "ssa-name-def-chain-limit"
  12263. The maximum number of \s-1SSA_NAME\s0 assignments to follow in determining
  12264. a property of a variable such as its value. This limits the number
  12265. of iterations or recursive calls \s-1GCC\s0 performs when optimizing certain
  12266. statements or when determining their validity prior to issuing
  12267. diagnostics.
  12268. .IP "\fBstore-merging-max-size\fR" 4
  12269. .IX Item "store-merging-max-size"
  12270. Maximum size of a single store merging region in bytes.
  12271. .IP "\fBhash-table-verification-limit\fR" 4
  12272. .IX Item "hash-table-verification-limit"
  12273. The number of elements for which hash table verification is done
  12274. for each searched element.
  12275. .IP "\fBmax-find-base-term-values\fR" 4
  12276. .IX Item "max-find-base-term-values"
  12277. Maximum number of VALUEs handled during a single find_base_term call.
  12278. .IP "\fBanalyzer-max-enodes-per-program-point\fR" 4
  12279. .IX Item "analyzer-max-enodes-per-program-point"
  12280. The maximum number of exploded nodes per program point within
  12281. the analyzer, before terminating analysis of that point.
  12282. .IP "\fBanalyzer-min-snodes-for-call-summary\fR" 4
  12283. .IX Item "analyzer-min-snodes-for-call-summary"
  12284. The minimum number of supernodes within a function for the
  12285. analyzer to consider summarizing its effects at call sites.
  12286. .IP "\fBanalyzer-max-recursion-depth\fR" 4
  12287. .IX Item "analyzer-max-recursion-depth"
  12288. The maximum number of times a callsite can appear in a call stack
  12289. within the analyzer, before terminating analysis of a call that would
  12290. recurse deeper.
  12291. .IP "\fBgimple-fe-computed-hot-bb-threshold\fR" 4
  12292. .IX Item "gimple-fe-computed-hot-bb-threshold"
  12293. The number of executions of a basic block which is considered hot.
  12294. The parameter is used only in \s-1GIMPLE FE.\s0
  12295. .IP "\fBanalyzer-bb-explosion-factor\fR" 4
  12296. .IX Item "analyzer-bb-explosion-factor"
  12297. The maximum number of 'after supernode' exploded nodes within the analyzer
  12298. per supernode, before terminating analysis.
  12299. .RE
  12300. .RS 4
  12301. .Sp
  12302. The following choices of \fIname\fR are available on AArch64 targets:
  12303. .IP "\fBaarch64\-sve\-compare\-costs\fR" 4
  12304. .IX Item "aarch64-sve-compare-costs"
  12305. When vectorizing for \s-1SVE,\s0 consider using \*(L"unpacked\*(R" vectors for
  12306. smaller elements and use the cost model to pick the cheapest approach.
  12307. Also use the cost model to choose between \s-1SVE\s0 and Advanced \s-1SIMD\s0 vectorization.
  12308. .Sp
  12309. Using unpacked vectors includes storing smaller elements in larger
  12310. containers and accessing elements with extending loads and truncating
  12311. stores.
  12312. .IP "\fBaarch64\-float\-recp\-precision\fR" 4
  12313. .IX Item "aarch64-float-recp-precision"
  12314. The number of Newton iterations for calculating the reciprocal for float type.
  12315. The precision of division is proportional to this param when division
  12316. approximation is enabled. The default value is 1.
  12317. .IP "\fBaarch64\-double\-recp\-precision\fR" 4
  12318. .IX Item "aarch64-double-recp-precision"
  12319. The number of Newton iterations for calculating the reciprocal for double type.
  12320. The precision of division is propotional to this param when division
  12321. approximation is enabled. The default value is 2.
  12322. .RE
  12323. .RS 4
  12324. .RE
  12325. .SS "Program Instrumentation Options"
  12326. .IX Subsection "Program Instrumentation Options"
  12327. \&\s-1GCC\s0 supports a number of command-line options that control adding
  12328. run-time instrumentation to the code it normally generates.
  12329. For example, one purpose of instrumentation is collect profiling
  12330. statistics for use in finding program hot spots, code coverage
  12331. analysis, or profile-guided optimizations.
  12332. Another class of program instrumentation is adding run-time checking
  12333. to detect programming errors like invalid pointer
  12334. dereferences or out-of-bounds array accesses, as well as deliberately
  12335. hostile attacks such as stack smashing or \*(C+ vtable hijacking.
  12336. There is also a general hook which can be used to implement other
  12337. forms of tracing or function-level instrumentation for debug or
  12338. program analysis purposes.
  12339. .IP "\fB\-p\fR" 4
  12340. .IX Item "-p"
  12341. .PD 0
  12342. .IP "\fB\-pg\fR" 4
  12343. .IX Item "-pg"
  12344. .PD
  12345. Generate extra code to write profile information suitable for the
  12346. analysis program \fBprof\fR (for \fB\-p\fR) or \fBgprof\fR
  12347. (for \fB\-pg\fR). You must use this option when compiling
  12348. the source files you want data about, and you must also use it when
  12349. linking.
  12350. .Sp
  12351. You can use the function attribute \f(CW\*(C`no_instrument_function\*(C'\fR to
  12352. suppress profiling of individual functions when compiling with these options.
  12353. .IP "\fB\-fprofile\-arcs\fR" 4
  12354. .IX Item "-fprofile-arcs"
  12355. Add code so that program flow \fIarcs\fR are instrumented. During
  12356. execution the program records how many times each branch and call is
  12357. executed and how many times it is taken or returns. On targets that support
  12358. constructors with priority support, profiling properly handles constructors,
  12359. destructors and \*(C+ constructors (and destructors) of classes which are used
  12360. as a type of a global variable.
  12361. .Sp
  12362. When the compiled
  12363. program exits it saves this data to a file called
  12364. \&\fI\fIauxname\fI.gcda\fR for each source file. The data may be used for
  12365. profile-directed optimizations (\fB\-fbranch\-probabilities\fR), or for
  12366. test coverage analysis (\fB\-ftest\-coverage\fR). Each object file's
  12367. \&\fIauxname\fR is generated from the name of the output file, if
  12368. explicitly specified and it is not the final executable, otherwise it is
  12369. the basename of the source file. In both cases any suffix is removed
  12370. (e.g. \fIfoo.gcda\fR for input file \fIdir/foo.c\fR, or
  12371. \&\fIdir/foo.gcda\fR for output file specified as \fB\-o dir/foo.o\fR).
  12372. .IP "\fB\-\-coverage\fR" 4
  12373. .IX Item "--coverage"
  12374. This option is used to compile and link code instrumented for coverage
  12375. analysis. The option is a synonym for \fB\-fprofile\-arcs\fR
  12376. \&\fB\-ftest\-coverage\fR (when compiling) and \fB\-lgcov\fR (when
  12377. linking). See the documentation for those options for more details.
  12378. .RS 4
  12379. .IP "*" 4
  12380. Compile the source files with \fB\-fprofile\-arcs\fR plus optimization
  12381. and code generation options. For test coverage analysis, use the
  12382. additional \fB\-ftest\-coverage\fR option. You do not need to profile
  12383. every source file in a program.
  12384. .IP "*" 4
  12385. Compile the source files additionally with \fB\-fprofile\-abs\-path\fR
  12386. to create absolute path names in the \fI.gcno\fR files. This allows
  12387. \&\fBgcov\fR to find the correct sources in projects where compilations
  12388. occur with different working directories.
  12389. .IP "*" 4
  12390. Link your object files with \fB\-lgcov\fR or \fB\-fprofile\-arcs\fR
  12391. (the latter implies the former).
  12392. .IP "*" 4
  12393. Run the program on a representative workload to generate the arc profile
  12394. information. This may be repeated any number of times. You can run
  12395. concurrent instances of your program, and provided that the file system
  12396. supports locking, the data files will be correctly updated. Unless
  12397. a strict \s-1ISO C\s0 dialect option is in effect, \f(CW\*(C`fork\*(C'\fR calls are
  12398. detected and correctly handled without double counting.
  12399. .IP "*" 4
  12400. For profile-directed optimizations, compile the source files again with
  12401. the same optimization and code generation options plus
  12402. \&\fB\-fbranch\-probabilities\fR.
  12403. .IP "*" 4
  12404. For test coverage analysis, use \fBgcov\fR to produce human readable
  12405. information from the \fI.gcno\fR and \fI.gcda\fR files. Refer to the
  12406. \&\fBgcov\fR documentation for further information.
  12407. .RE
  12408. .RS 4
  12409. .Sp
  12410. With \fB\-fprofile\-arcs\fR, for each function of your program \s-1GCC\s0
  12411. creates a program flow graph, then finds a spanning tree for the graph.
  12412. Only arcs that are not on the spanning tree have to be instrumented: the
  12413. compiler adds code to count the number of times that these arcs are
  12414. executed. When an arc is the only exit or only entrance to a block, the
  12415. instrumentation code can be added to the block; otherwise, a new basic
  12416. block must be created to hold the instrumentation code.
  12417. .RE
  12418. .IP "\fB\-ftest\-coverage\fR" 4
  12419. .IX Item "-ftest-coverage"
  12420. Produce a notes file that the \fBgcov\fR code-coverage utility can use to
  12421. show program coverage. Each source file's note file is called
  12422. \&\fI\fIauxname\fI.gcno\fR. Refer to the \fB\-fprofile\-arcs\fR option
  12423. above for a description of \fIauxname\fR and instructions on how to
  12424. generate test coverage data. Coverage data matches the source files
  12425. more closely if you do not optimize.
  12426. .IP "\fB\-fprofile\-abs\-path\fR" 4
  12427. .IX Item "-fprofile-abs-path"
  12428. Automatically convert relative source file names to absolute path names
  12429. in the \fI.gcno\fR files. This allows \fBgcov\fR to find the correct
  12430. sources in projects where compilations occur with different working
  12431. directories.
  12432. .IP "\fB\-fprofile\-dir=\fR\fIpath\fR" 4
  12433. .IX Item "-fprofile-dir=path"
  12434. Set the directory to search for the profile data files in to \fIpath\fR.
  12435. This option affects only the profile data generated by
  12436. \&\fB\-fprofile\-generate\fR, \fB\-ftest\-coverage\fR, \fB\-fprofile\-arcs\fR
  12437. and used by \fB\-fprofile\-use\fR and \fB\-fbranch\-probabilities\fR
  12438. and its related options. Both absolute and relative paths can be used.
  12439. By default, \s-1GCC\s0 uses the current directory as \fIpath\fR, thus the
  12440. profile data file appears in the same directory as the object file.
  12441. In order to prevent the file name clashing, if the object file name is
  12442. not an absolute path, we mangle the absolute path of the
  12443. \&\fI\fIsourcename\fI.gcda\fR file and use it as the file name of a
  12444. \&\fI.gcda\fR file. See similar option \fB\-fprofile\-note\fR.
  12445. .Sp
  12446. When an executable is run in a massive parallel environment, it is recommended
  12447. to save profile to different folders. That can be done with variables
  12448. in \fIpath\fR that are exported during run-time:
  12449. .RS 4
  12450. .ie n .IP "\fB\fB%p\fB\fR" 4
  12451. .el .IP "\fB\f(CB%p\fB\fR" 4
  12452. .IX Item "%p"
  12453. process \s-1ID.\s0
  12454. .ie n .IP "\fB\fB%q\fB{\s-1VAR\s0}\fR" 4
  12455. .el .IP "\fB\f(CB%q\fB{\s-1VAR\s0}\fR" 4
  12456. .IX Item "%q{VAR}"
  12457. value of environment variable \fI\s-1VAR\s0\fR
  12458. .RE
  12459. .RS 4
  12460. .RE
  12461. .IP "\fB\-fprofile\-generate\fR" 4
  12462. .IX Item "-fprofile-generate"
  12463. .PD 0
  12464. .IP "\fB\-fprofile\-generate=\fR\fIpath\fR" 4
  12465. .IX Item "-fprofile-generate=path"
  12466. .PD
  12467. Enable options usually used for instrumenting application to produce
  12468. profile useful for later recompilation with profile feedback based
  12469. optimization. You must use \fB\-fprofile\-generate\fR both when
  12470. compiling and when linking your program.
  12471. .Sp
  12472. The following options are enabled:
  12473. \&\fB\-fprofile\-arcs\fR, \fB\-fprofile\-values\fR,
  12474. \&\fB\-finline\-functions\fR, and \fB\-fipa\-bit\-cp\fR.
  12475. .Sp
  12476. If \fIpath\fR is specified, \s-1GCC\s0 looks at the \fIpath\fR to find
  12477. the profile feedback data files. See \fB\-fprofile\-dir\fR.
  12478. .Sp
  12479. To optimize the program based on the collected profile information, use
  12480. \&\fB\-fprofile\-use\fR.
  12481. .IP "\fB\-fprofile\-note=\fR\fIpath\fR" 4
  12482. .IX Item "-fprofile-note=path"
  12483. If \fIpath\fR is specified, \s-1GCC\s0 saves \fI.gcno\fR file into \fIpath\fR
  12484. location. If you combine the option with multiple source files,
  12485. the \fI.gcno\fR file will be overwritten.
  12486. .IP "\fB\-fprofile\-prefix\-path=\fR\fIpath\fR" 4
  12487. .IX Item "-fprofile-prefix-path=path"
  12488. This option can be used in combination with
  12489. \&\fBprofile\-generate=\fR\fIprofile_dir\fR and
  12490. \&\fBprofile\-use=\fR\fIprofile_dir\fR to inform \s-1GCC\s0 where is the base
  12491. directory of built source tree. By default \fIprofile_dir\fR will contain
  12492. files with mangled absolute paths of all object files in the built project.
  12493. This is not desirable when directory used to build the instrumented binary
  12494. differs from the directory used to build the binary optimized with profile
  12495. feedback because the profile data will not be found during the optimized build.
  12496. In such setups \fB\-fprofile\-prefix\-path=\fR\fIpath\fR with \fIpath\fR
  12497. pointing to the base directory of the build can be used to strip the irrelevant
  12498. part of the path and keep all file names relative to the main build directory.
  12499. .IP "\fB\-fprofile\-update=\fR\fImethod\fR" 4
  12500. .IX Item "-fprofile-update=method"
  12501. Alter the update method for an application instrumented for profile
  12502. feedback based optimization. The \fImethod\fR argument should be one of
  12503. \&\fBsingle\fR, \fBatomic\fR or \fBprefer-atomic\fR.
  12504. The first one is useful for single-threaded applications,
  12505. while the second one prevents profile corruption by emitting thread-safe code.
  12506. .Sp
  12507. \&\fBWarning:\fR When an application does not properly join all threads
  12508. (or creates an detached thread), a profile file can be still corrupted.
  12509. .Sp
  12510. Using \fBprefer-atomic\fR would be transformed either to \fBatomic\fR,
  12511. when supported by a target, or to \fBsingle\fR otherwise. The \s-1GCC\s0 driver
  12512. automatically selects \fBprefer-atomic\fR when \fB\-pthread\fR
  12513. is present in the command line.
  12514. .IP "\fB\-fprofile\-filter\-files=\fR\fIregex\fR" 4
  12515. .IX Item "-fprofile-filter-files=regex"
  12516. Instrument only functions from files where names match
  12517. any regular expression (separated by a semi-colon).
  12518. .Sp
  12519. For example, \fB\-fprofile\-filter\-files=main.c;module.*.c\fR will instrument
  12520. only \fImain.c\fR and all C files starting with 'module'.
  12521. .IP "\fB\-fprofile\-exclude\-files=\fR\fIregex\fR" 4
  12522. .IX Item "-fprofile-exclude-files=regex"
  12523. Instrument only functions from files where names do not match
  12524. all the regular expressions (separated by a semi-colon).
  12525. .Sp
  12526. For example, \fB\-fprofile\-exclude\-files=/usr/*\fR will prevent instrumentation
  12527. of all files that are located in \fI/usr/\fR folder.
  12528. .IP "\fB\-fprofile\-reproducible=\fR[\fBmultithreaded\fR|\fBparallel-runs\fR|\fBserial\fR]" 4
  12529. .IX Item "-fprofile-reproducible=[multithreaded|parallel-runs|serial]"
  12530. Control level of reproducibility of profile gathered by
  12531. \&\f(CW\*(C`\-fprofile\-generate\*(C'\fR. This makes it possible to rebuild program
  12532. with same outcome which is useful, for example, for distribution
  12533. packages.
  12534. .Sp
  12535. With \fB\-fprofile\-reproducible=serial\fR the profile gathered by
  12536. \&\fB\-fprofile\-generate\fR is reproducible provided the trained program
  12537. behaves the same at each invocation of the train run, it is not
  12538. multi-threaded and profile data streaming is always done in the same
  12539. order. Note that profile streaming happens at the end of program run but
  12540. also before \f(CW\*(C`fork\*(C'\fR function is invoked.
  12541. .Sp
  12542. Note that it is quite common that execution counts of some part of
  12543. programs depends, for example, on length of temporary file names or
  12544. memory space randomization (that may affect hash-table collision rate).
  12545. Such non-reproducible part of programs may be annotated by
  12546. \&\f(CW\*(C`no_instrument_function\*(C'\fR function attribute. \f(CW\*(C`gcov\-dump\*(C'\fR with
  12547. \&\fB\-l\fR can be used to dump gathered data and verify that they are
  12548. indeed reproducible.
  12549. .Sp
  12550. With \fB\-fprofile\-reproducible=parallel\-runs\fR collected profile
  12551. stays reproducible regardless the order of streaming of the data into
  12552. gcda files. This setting makes it possible to run multiple instances of
  12553. instrumented program in parallel (such as with \f(CW\*(C`make \-j\*(C'\fR). This
  12554. reduces quality of gathered data, in particular of indirect call
  12555. profiling.
  12556. .IP "\fB\-fsanitize=address\fR" 4
  12557. .IX Item "-fsanitize=address"
  12558. Enable AddressSanitizer, a fast memory error detector.
  12559. Memory access instructions are instrumented to detect
  12560. out-of-bounds and use-after-free bugs.
  12561. The option enables \fB\-fsanitize\-address\-use\-after\-scope\fR.
  12562. See <\fBhttps://github.com/google/sanitizers/wiki/AddressSanitizer\fR> for
  12563. more details. The run-time behavior can be influenced using the
  12564. \&\fB\s-1ASAN_OPTIONS\s0\fR environment variable. When set to \f(CW\*(C`help=1\*(C'\fR,
  12565. the available options are shown at startup of the instrumented program. See
  12566. <\fBhttps://github.com/google/sanitizers/wiki/AddressSanitizerFlags#run\-time\-flags\fR>
  12567. for a list of supported options.
  12568. The option cannot be combined with \fB\-fsanitize=thread\fR.
  12569. .IP "\fB\-fsanitize=kernel\-address\fR" 4
  12570. .IX Item "-fsanitize=kernel-address"
  12571. Enable AddressSanitizer for Linux kernel.
  12572. See <\fBhttps://github.com/google/kasan/wiki\fR> for more details.
  12573. .IP "\fB\-fsanitize=pointer\-compare\fR" 4
  12574. .IX Item "-fsanitize=pointer-compare"
  12575. Instrument comparison operation (<, <=, >, >=) with pointer operands.
  12576. The option must be combined with either \fB\-fsanitize=kernel\-address\fR or
  12577. \&\fB\-fsanitize=address\fR
  12578. The option cannot be combined with \fB\-fsanitize=thread\fR.
  12579. Note: By default the check is disabled at run time. To enable it,
  12580. add \f(CW\*(C`detect_invalid_pointer_pairs=2\*(C'\fR to the environment variable
  12581. \&\fB\s-1ASAN_OPTIONS\s0\fR. Using \f(CW\*(C`detect_invalid_pointer_pairs=1\*(C'\fR detects
  12582. invalid operation only when both pointers are non-null.
  12583. .IP "\fB\-fsanitize=pointer\-subtract\fR" 4
  12584. .IX Item "-fsanitize=pointer-subtract"
  12585. Instrument subtraction with pointer operands.
  12586. The option must be combined with either \fB\-fsanitize=kernel\-address\fR or
  12587. \&\fB\-fsanitize=address\fR
  12588. The option cannot be combined with \fB\-fsanitize=thread\fR.
  12589. Note: By default the check is disabled at run time. To enable it,
  12590. add \f(CW\*(C`detect_invalid_pointer_pairs=2\*(C'\fR to the environment variable
  12591. \&\fB\s-1ASAN_OPTIONS\s0\fR. Using \f(CW\*(C`detect_invalid_pointer_pairs=1\*(C'\fR detects
  12592. invalid operation only when both pointers are non-null.
  12593. .IP "\fB\-fsanitize=thread\fR" 4
  12594. .IX Item "-fsanitize=thread"
  12595. Enable ThreadSanitizer, a fast data race detector.
  12596. Memory access instructions are instrumented to detect
  12597. data race bugs. See <\fBhttps://github.com/google/sanitizers/wiki#threadsanitizer\fR> for more
  12598. details. The run-time behavior can be influenced using the \fB\s-1TSAN_OPTIONS\s0\fR
  12599. environment variable; see
  12600. <\fBhttps://github.com/google/sanitizers/wiki/ThreadSanitizerFlags\fR> for a list of
  12601. supported options.
  12602. The option cannot be combined with \fB\-fsanitize=address\fR,
  12603. \&\fB\-fsanitize=leak\fR.
  12604. .Sp
  12605. Note that sanitized atomic builtins cannot throw exceptions when
  12606. operating on invalid memory addresses with non-call exceptions
  12607. (\fB\-fnon\-call\-exceptions\fR).
  12608. .IP "\fB\-fsanitize=leak\fR" 4
  12609. .IX Item "-fsanitize=leak"
  12610. Enable LeakSanitizer, a memory leak detector.
  12611. This option only matters for linking of executables and
  12612. the executable is linked against a library that overrides \f(CW\*(C`malloc\*(C'\fR
  12613. and other allocator functions. See
  12614. <\fBhttps://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer\fR> for more
  12615. details. The run-time behavior can be influenced using the
  12616. \&\fB\s-1LSAN_OPTIONS\s0\fR environment variable.
  12617. The option cannot be combined with \fB\-fsanitize=thread\fR.
  12618. .IP "\fB\-fsanitize=undefined\fR" 4
  12619. .IX Item "-fsanitize=undefined"
  12620. Enable UndefinedBehaviorSanitizer, a fast undefined behavior detector.
  12621. Various computations are instrumented to detect undefined behavior
  12622. at runtime. Current suboptions are:
  12623. .RS 4
  12624. .IP "\fB\-fsanitize=shift\fR" 4
  12625. .IX Item "-fsanitize=shift"
  12626. This option enables checking that the result of a shift operation is
  12627. not undefined. Note that what exactly is considered undefined differs
  12628. slightly between C and \*(C+, as well as between \s-1ISO C90\s0 and C99, etc.
  12629. This option has two suboptions, \fB\-fsanitize=shift\-base\fR and
  12630. \&\fB\-fsanitize=shift\-exponent\fR.
  12631. .IP "\fB\-fsanitize=shift\-exponent\fR" 4
  12632. .IX Item "-fsanitize=shift-exponent"
  12633. This option enables checking that the second argument of a shift operation
  12634. is not negative and is smaller than the precision of the promoted first
  12635. argument.
  12636. .IP "\fB\-fsanitize=shift\-base\fR" 4
  12637. .IX Item "-fsanitize=shift-base"
  12638. If the second argument of a shift operation is within range, check that the
  12639. result of a shift operation is not undefined. Note that what exactly is
  12640. considered undefined differs slightly between C and \*(C+, as well as between
  12641. \&\s-1ISO C90\s0 and C99, etc.
  12642. .IP "\fB\-fsanitize=integer\-divide\-by\-zero\fR" 4
  12643. .IX Item "-fsanitize=integer-divide-by-zero"
  12644. Detect integer division by zero as well as \f(CW\*(C`INT_MIN / \-1\*(C'\fR division.
  12645. .IP "\fB\-fsanitize=unreachable\fR" 4
  12646. .IX Item "-fsanitize=unreachable"
  12647. With this option, the compiler turns the \f(CW\*(C`_\|_builtin_unreachable\*(C'\fR
  12648. call into a diagnostics message call instead. When reaching the
  12649. \&\f(CW\*(C`_\|_builtin_unreachable\*(C'\fR call, the behavior is undefined.
  12650. .IP "\fB\-fsanitize=vla\-bound\fR" 4
  12651. .IX Item "-fsanitize=vla-bound"
  12652. This option instructs the compiler to check that the size of a variable
  12653. length array is positive.
  12654. .IP "\fB\-fsanitize=null\fR" 4
  12655. .IX Item "-fsanitize=null"
  12656. This option enables pointer checking. Particularly, the application
  12657. built with this option turned on will issue an error message when it
  12658. tries to dereference a \s-1NULL\s0 pointer, or if a reference (possibly an
  12659. rvalue reference) is bound to a \s-1NULL\s0 pointer, or if a method is invoked
  12660. on an object pointed by a \s-1NULL\s0 pointer.
  12661. .IP "\fB\-fsanitize=return\fR" 4
  12662. .IX Item "-fsanitize=return"
  12663. This option enables return statement checking. Programs
  12664. built with this option turned on will issue an error message
  12665. when the end of a non-void function is reached without actually
  12666. returning a value. This option works in \*(C+ only.
  12667. .IP "\fB\-fsanitize=signed\-integer\-overflow\fR" 4
  12668. .IX Item "-fsanitize=signed-integer-overflow"
  12669. This option enables signed integer overflow checking. We check that
  12670. the result of \f(CW\*(C`+\*(C'\fR, \f(CW\*(C`*\*(C'\fR, and both unary and binary \f(CW\*(C`\-\*(C'\fR
  12671. does not overflow in the signed arithmetics. Note, integer promotion
  12672. rules must be taken into account. That is, the following is not an
  12673. overflow:
  12674. .Sp
  12675. .Vb 2
  12676. \& signed char a = SCHAR_MAX;
  12677. \& a++;
  12678. .Ve
  12679. .IP "\fB\-fsanitize=bounds\fR" 4
  12680. .IX Item "-fsanitize=bounds"
  12681. This option enables instrumentation of array bounds. Various out of bounds
  12682. accesses are detected. Flexible array members, flexible array member-like
  12683. arrays, and initializers of variables with static storage are not instrumented.
  12684. .IP "\fB\-fsanitize=bounds\-strict\fR" 4
  12685. .IX Item "-fsanitize=bounds-strict"
  12686. This option enables strict instrumentation of array bounds. Most out of bounds
  12687. accesses are detected, including flexible array members and flexible array
  12688. member-like arrays. Initializers of variables with static storage are not
  12689. instrumented.
  12690. .IP "\fB\-fsanitize=alignment\fR" 4
  12691. .IX Item "-fsanitize=alignment"
  12692. This option enables checking of alignment of pointers when they are
  12693. dereferenced, or when a reference is bound to insufficiently aligned target,
  12694. or when a method or constructor is invoked on insufficiently aligned object.
  12695. .IP "\fB\-fsanitize=object\-size\fR" 4
  12696. .IX Item "-fsanitize=object-size"
  12697. This option enables instrumentation of memory references using the
  12698. \&\f(CW\*(C`_\|_builtin_object_size\*(C'\fR function. Various out of bounds pointer
  12699. accesses are detected.
  12700. .IP "\fB\-fsanitize=float\-divide\-by\-zero\fR" 4
  12701. .IX Item "-fsanitize=float-divide-by-zero"
  12702. Detect floating-point division by zero. Unlike other similar options,
  12703. \&\fB\-fsanitize=float\-divide\-by\-zero\fR is not enabled by
  12704. \&\fB\-fsanitize=undefined\fR, since floating-point division by zero can
  12705. be a legitimate way of obtaining infinities and NaNs.
  12706. .IP "\fB\-fsanitize=float\-cast\-overflow\fR" 4
  12707. .IX Item "-fsanitize=float-cast-overflow"
  12708. This option enables floating-point type to integer conversion checking.
  12709. We check that the result of the conversion does not overflow.
  12710. Unlike other similar options, \fB\-fsanitize=float\-cast\-overflow\fR is
  12711. not enabled by \fB\-fsanitize=undefined\fR.
  12712. This option does not work well with \f(CW\*(C`FE_INVALID\*(C'\fR exceptions enabled.
  12713. .IP "\fB\-fsanitize=nonnull\-attribute\fR" 4
  12714. .IX Item "-fsanitize=nonnull-attribute"
  12715. This option enables instrumentation of calls, checking whether null values
  12716. are not passed to arguments marked as requiring a non-null value by the
  12717. \&\f(CW\*(C`nonnull\*(C'\fR function attribute.
  12718. .IP "\fB\-fsanitize=returns\-nonnull\-attribute\fR" 4
  12719. .IX Item "-fsanitize=returns-nonnull-attribute"
  12720. This option enables instrumentation of return statements in functions
  12721. marked with \f(CW\*(C`returns_nonnull\*(C'\fR function attribute, to detect returning
  12722. of null values from such functions.
  12723. .IP "\fB\-fsanitize=bool\fR" 4
  12724. .IX Item "-fsanitize=bool"
  12725. This option enables instrumentation of loads from bool. If a value other
  12726. than 0/1 is loaded, a run-time error is issued.
  12727. .IP "\fB\-fsanitize=enum\fR" 4
  12728. .IX Item "-fsanitize=enum"
  12729. This option enables instrumentation of loads from an enum type. If
  12730. a value outside the range of values for the enum type is loaded,
  12731. a run-time error is issued.
  12732. .IP "\fB\-fsanitize=vptr\fR" 4
  12733. .IX Item "-fsanitize=vptr"
  12734. This option enables instrumentation of \*(C+ member function calls, member
  12735. accesses and some conversions between pointers to base and derived classes,
  12736. to verify the referenced object has the correct dynamic type.
  12737. .IP "\fB\-fsanitize=pointer\-overflow\fR" 4
  12738. .IX Item "-fsanitize=pointer-overflow"
  12739. This option enables instrumentation of pointer arithmetics. If the pointer
  12740. arithmetics overflows, a run-time error is issued.
  12741. .IP "\fB\-fsanitize=builtin\fR" 4
  12742. .IX Item "-fsanitize=builtin"
  12743. This option enables instrumentation of arguments to selected builtin
  12744. functions. If an invalid value is passed to such arguments, a run-time
  12745. error is issued. E.g. passing 0 as the argument to \f(CW\*(C`_\|_builtin_ctz\*(C'\fR
  12746. or \f(CW\*(C`_\|_builtin_clz\*(C'\fR invokes undefined behavior and is diagnosed
  12747. by this option.
  12748. .RE
  12749. .RS 4
  12750. .Sp
  12751. While \fB\-ftrapv\fR causes traps for signed overflows to be emitted,
  12752. \&\fB\-fsanitize=undefined\fR gives a diagnostic message.
  12753. This currently works only for the C family of languages.
  12754. .RE
  12755. .IP "\fB\-fno\-sanitize=all\fR" 4
  12756. .IX Item "-fno-sanitize=all"
  12757. This option disables all previously enabled sanitizers.
  12758. \&\fB\-fsanitize=all\fR is not allowed, as some sanitizers cannot be used
  12759. together.
  12760. .IP "\fB\-fasan\-shadow\-offset=\fR\fInumber\fR" 4
  12761. .IX Item "-fasan-shadow-offset=number"
  12762. This option forces \s-1GCC\s0 to use custom shadow offset in AddressSanitizer checks.
  12763. It is useful for experimenting with different shadow memory layouts in
  12764. Kernel AddressSanitizer.
  12765. .IP "\fB\-fsanitize\-sections=\fR\fIs1\fR\fB,\fR\fIs2\fR\fB,...\fR" 4
  12766. .IX Item "-fsanitize-sections=s1,s2,..."
  12767. Sanitize global variables in selected user-defined sections. \fIsi\fR may
  12768. contain wildcards.
  12769. .IP "\fB\-fsanitize\-recover\fR[\fB=\fR\fIopts\fR]" 4
  12770. .IX Item "-fsanitize-recover[=opts]"
  12771. \&\fB\-fsanitize\-recover=\fR controls error recovery mode for sanitizers
  12772. mentioned in comma-separated list of \fIopts\fR. Enabling this option
  12773. for a sanitizer component causes it to attempt to continue
  12774. running the program as if no error happened. This means multiple
  12775. runtime errors can be reported in a single program run, and the exit
  12776. code of the program may indicate success even when errors
  12777. have been reported. The \fB\-fno\-sanitize\-recover=\fR option
  12778. can be used to alter
  12779. this behavior: only the first detected error is reported
  12780. and program then exits with a non-zero exit code.
  12781. .Sp
  12782. Currently this feature only works for \fB\-fsanitize=undefined\fR (and its suboptions
  12783. except for \fB\-fsanitize=unreachable\fR and \fB\-fsanitize=return\fR),
  12784. \&\fB\-fsanitize=float\-cast\-overflow\fR, \fB\-fsanitize=float\-divide\-by\-zero\fR,
  12785. \&\fB\-fsanitize=bounds\-strict\fR,
  12786. \&\fB\-fsanitize=kernel\-address\fR and \fB\-fsanitize=address\fR.
  12787. For these sanitizers error recovery is turned on by default,
  12788. except \fB\-fsanitize=address\fR, for which this feature is experimental.
  12789. \&\fB\-fsanitize\-recover=all\fR and \fB\-fno\-sanitize\-recover=all\fR is also
  12790. accepted, the former enables recovery for all sanitizers that support it,
  12791. the latter disables recovery for all sanitizers that support it.
  12792. .Sp
  12793. Even if a recovery mode is turned on the compiler side, it needs to be also
  12794. enabled on the runtime library side, otherwise the failures are still fatal.
  12795. The runtime library defaults to \f(CW\*(C`halt_on_error=0\*(C'\fR for
  12796. ThreadSanitizer and UndefinedBehaviorSanitizer, while default value for
  12797. AddressSanitizer is \f(CW\*(C`halt_on_error=1\*(C'\fR. This can be overridden through
  12798. setting the \f(CW\*(C`halt_on_error\*(C'\fR flag in the corresponding environment variable.
  12799. .Sp
  12800. Syntax without an explicit \fIopts\fR parameter is deprecated. It is
  12801. equivalent to specifying an \fIopts\fR list of:
  12802. .Sp
  12803. .Vb 1
  12804. \& undefined,float\-cast\-overflow,float\-divide\-by\-zero,bounds\-strict
  12805. .Ve
  12806. .IP "\fB\-fsanitize\-address\-use\-after\-scope\fR" 4
  12807. .IX Item "-fsanitize-address-use-after-scope"
  12808. Enable sanitization of local variables to detect use-after-scope bugs.
  12809. The option sets \fB\-fstack\-reuse\fR to \fBnone\fR.
  12810. .IP "\fB\-fsanitize\-undefined\-trap\-on\-error\fR" 4
  12811. .IX Item "-fsanitize-undefined-trap-on-error"
  12812. The \fB\-fsanitize\-undefined\-trap\-on\-error\fR option instructs the compiler to
  12813. report undefined behavior using \f(CW\*(C`_\|_builtin_trap\*(C'\fR rather than
  12814. a \f(CW\*(C`libubsan\*(C'\fR library routine. The advantage of this is that the
  12815. \&\f(CW\*(C`libubsan\*(C'\fR library is not needed and is not linked in, so this
  12816. is usable even in freestanding environments.
  12817. .IP "\fB\-fsanitize\-coverage=trace\-pc\fR" 4
  12818. .IX Item "-fsanitize-coverage=trace-pc"
  12819. Enable coverage-guided fuzzing code instrumentation.
  12820. Inserts a call to \f(CW\*(C`_\|_sanitizer_cov_trace_pc\*(C'\fR into every basic block.
  12821. .IP "\fB\-fsanitize\-coverage=trace\-cmp\fR" 4
  12822. .IX Item "-fsanitize-coverage=trace-cmp"
  12823. Enable dataflow guided fuzzing code instrumentation.
  12824. Inserts a call to \f(CW\*(C`_\|_sanitizer_cov_trace_cmp1\*(C'\fR,
  12825. \&\f(CW\*(C`_\|_sanitizer_cov_trace_cmp2\*(C'\fR, \f(CW\*(C`_\|_sanitizer_cov_trace_cmp4\*(C'\fR or
  12826. \&\f(CW\*(C`_\|_sanitizer_cov_trace_cmp8\*(C'\fR for integral comparison with both operands
  12827. variable or \f(CW\*(C`_\|_sanitizer_cov_trace_const_cmp1\*(C'\fR,
  12828. \&\f(CW\*(C`_\|_sanitizer_cov_trace_const_cmp2\*(C'\fR,
  12829. \&\f(CW\*(C`_\|_sanitizer_cov_trace_const_cmp4\*(C'\fR or
  12830. \&\f(CW\*(C`_\|_sanitizer_cov_trace_const_cmp8\*(C'\fR for integral comparison with one
  12831. operand constant, \f(CW\*(C`_\|_sanitizer_cov_trace_cmpf\*(C'\fR or
  12832. \&\f(CW\*(C`_\|_sanitizer_cov_trace_cmpd\*(C'\fR for float or double comparisons and
  12833. \&\f(CW\*(C`_\|_sanitizer_cov_trace_switch\*(C'\fR for switch statements.
  12834. .IP "\fB\-fcf\-protection=\fR[\fBfull\fR|\fBbranch\fR|\fBreturn\fR|\fBnone\fR|\fBcheck\fR]" 4
  12835. .IX Item "-fcf-protection=[full|branch|return|none|check]"
  12836. Enable code instrumentation of control-flow transfers to increase
  12837. program security by checking that target addresses of control-flow
  12838. transfer instructions (such as indirect function call, function return,
  12839. indirect jump) are valid. This prevents diverting the flow of control
  12840. to an unexpected target. This is intended to protect against such
  12841. threats as Return-oriented Programming (\s-1ROP\s0), and similarly
  12842. call/jmp\-oriented programming (\s-1COP/JOP\s0).
  12843. .Sp
  12844. The value \f(CW\*(C`branch\*(C'\fR tells the compiler to implement checking of
  12845. validity of control-flow transfer at the point of indirect branch
  12846. instructions, i.e. call/jmp instructions. The value \f(CW\*(C`return\*(C'\fR
  12847. implements checking of validity at the point of returning from a
  12848. function. The value \f(CW\*(C`full\*(C'\fR is an alias for specifying both
  12849. \&\f(CW\*(C`branch\*(C'\fR and \f(CW\*(C`return\*(C'\fR. The value \f(CW\*(C`none\*(C'\fR turns off
  12850. instrumentation.
  12851. .Sp
  12852. The value \f(CW\*(C`check\*(C'\fR is used for the final link with link-time
  12853. optimization (\s-1LTO\s0). An error is issued if \s-1LTO\s0 object files are
  12854. compiled with different \fB\-fcf\-protection\fR values. The
  12855. value \f(CW\*(C`check\*(C'\fR is ignored at the compile time.
  12856. .Sp
  12857. The macro \f(CW\*(C`_\|_CET_\|_\*(C'\fR is defined when \fB\-fcf\-protection\fR is
  12858. used. The first bit of \f(CW\*(C`_\|_CET_\|_\*(C'\fR is set to 1 for the value
  12859. \&\f(CW\*(C`branch\*(C'\fR and the second bit of \f(CW\*(C`_\|_CET_\|_\*(C'\fR is set to 1 for
  12860. the \f(CW\*(C`return\*(C'\fR.
  12861. .Sp
  12862. You can also use the \f(CW\*(C`nocf_check\*(C'\fR attribute to identify
  12863. which functions and calls should be skipped from instrumentation.
  12864. .Sp
  12865. Currently the x86 GNU/Linux target provides an implementation based
  12866. on Intel Control-flow Enforcement Technology (\s-1CET\s0).
  12867. .IP "\fB\-fstack\-protector\fR" 4
  12868. .IX Item "-fstack-protector"
  12869. Emit extra code to check for buffer overflows, such as stack smashing
  12870. attacks. This is done by adding a guard variable to functions with
  12871. vulnerable objects. This includes functions that call \f(CW\*(C`alloca\*(C'\fR, and
  12872. functions with buffers larger than or equal to 8 bytes. The guards are
  12873. initialized when a function is entered and then checked when the function
  12874. exits. If a guard check fails, an error message is printed and the program
  12875. exits. Only variables that are actually allocated on the stack are
  12876. considered, optimized away variables or variables allocated in registers
  12877. don't count.
  12878. .IP "\fB\-fstack\-protector\-all\fR" 4
  12879. .IX Item "-fstack-protector-all"
  12880. Like \fB\-fstack\-protector\fR except that all functions are protected.
  12881. .IP "\fB\-fstack\-protector\-strong\fR" 4
  12882. .IX Item "-fstack-protector-strong"
  12883. Like \fB\-fstack\-protector\fR but includes additional functions to
  12884. be protected \-\-\- those that have local array definitions, or have
  12885. references to local frame addresses. Only variables that are actually
  12886. allocated on the stack are considered, optimized away variables or variables
  12887. allocated in registers don't count.
  12888. .IP "\fB\-fstack\-protector\-explicit\fR" 4
  12889. .IX Item "-fstack-protector-explicit"
  12890. Like \fB\-fstack\-protector\fR but only protects those functions which
  12891. have the \f(CW\*(C`stack_protect\*(C'\fR attribute.
  12892. .IP "\fB\-fstack\-check\fR" 4
  12893. .IX Item "-fstack-check"
  12894. Generate code to verify that you do not go beyond the boundary of the
  12895. stack. You should specify this flag if you are running in an
  12896. environment with multiple threads, but you only rarely need to specify it in
  12897. a single-threaded environment since stack overflow is automatically
  12898. detected on nearly all systems if there is only one stack.
  12899. .Sp
  12900. Note that this switch does not actually cause checking to be done; the
  12901. operating system or the language runtime must do that. The switch causes
  12902. generation of code to ensure that they see the stack being extended.
  12903. .Sp
  12904. You can additionally specify a string parameter: \fBno\fR means no
  12905. checking, \fBgeneric\fR means force the use of old-style checking,
  12906. \&\fBspecific\fR means use the best checking method and is equivalent
  12907. to bare \fB\-fstack\-check\fR.
  12908. .Sp
  12909. Old-style checking is a generic mechanism that requires no specific
  12910. target support in the compiler but comes with the following drawbacks:
  12911. .RS 4
  12912. .IP "1." 4
  12913. .IX Item "1."
  12914. Modified allocation strategy for large objects: they are always
  12915. allocated dynamically if their size exceeds a fixed threshold. Note this
  12916. may change the semantics of some code.
  12917. .IP "2." 4
  12918. .IX Item "2."
  12919. Fixed limit on the size of the static frame of functions: when it is
  12920. topped by a particular function, stack checking is not reliable and
  12921. a warning is issued by the compiler.
  12922. .IP "3." 4
  12923. .IX Item "3."
  12924. Inefficiency: because of both the modified allocation strategy and the
  12925. generic implementation, code performance is hampered.
  12926. .RE
  12927. .RS 4
  12928. .Sp
  12929. Note that old-style stack checking is also the fallback method for
  12930. \&\fBspecific\fR if no target support has been added in the compiler.
  12931. .Sp
  12932. \&\fB\-fstack\-check=\fR is designed for Ada's needs to detect infinite recursion
  12933. and stack overflows. \fBspecific\fR is an excellent choice when compiling
  12934. Ada code. It is not generally sufficient to protect against stack-clash
  12935. attacks. To protect against those you want \fB\-fstack\-clash\-protection\fR.
  12936. .RE
  12937. .IP "\fB\-fstack\-clash\-protection\fR" 4
  12938. .IX Item "-fstack-clash-protection"
  12939. Generate code to prevent stack clash style attacks. When this option is
  12940. enabled, the compiler will only allocate one page of stack space at a time
  12941. and each page is accessed immediately after allocation. Thus, it prevents
  12942. allocations from jumping over any stack guard page provided by the
  12943. operating system.
  12944. .Sp
  12945. Most targets do not fully support stack clash protection. However, on
  12946. those targets \fB\-fstack\-clash\-protection\fR will protect dynamic stack
  12947. allocations. \fB\-fstack\-clash\-protection\fR may also provide limited
  12948. protection for static stack allocations if the target supports
  12949. \&\fB\-fstack\-check=specific\fR.
  12950. .IP "\fB\-fstack\-limit\-register=\fR\fIreg\fR" 4
  12951. .IX Item "-fstack-limit-register=reg"
  12952. .PD 0
  12953. .IP "\fB\-fstack\-limit\-symbol=\fR\fIsym\fR" 4
  12954. .IX Item "-fstack-limit-symbol=sym"
  12955. .IP "\fB\-fno\-stack\-limit\fR" 4
  12956. .IX Item "-fno-stack-limit"
  12957. .PD
  12958. Generate code to ensure that the stack does not grow beyond a certain value,
  12959. either the value of a register or the address of a symbol. If a larger
  12960. stack is required, a signal is raised at run time. For most targets,
  12961. the signal is raised before the stack overruns the boundary, so
  12962. it is possible to catch the signal without taking special precautions.
  12963. .Sp
  12964. For instance, if the stack starts at absolute address \fB0x80000000\fR
  12965. and grows downwards, you can use the flags
  12966. \&\fB\-fstack\-limit\-symbol=_\|_stack_limit\fR and
  12967. \&\fB\-Wl,\-\-defsym,_\|_stack_limit=0x7ffe0000\fR to enforce a stack limit
  12968. of 128KB. Note that this may only work with the \s-1GNU\s0 linker.
  12969. .Sp
  12970. You can locally override stack limit checking by using the
  12971. \&\f(CW\*(C`no_stack_limit\*(C'\fR function attribute.
  12972. .IP "\fB\-fsplit\-stack\fR" 4
  12973. .IX Item "-fsplit-stack"
  12974. Generate code to automatically split the stack before it overflows.
  12975. The resulting program has a discontiguous stack which can only
  12976. overflow if the program is unable to allocate any more memory. This
  12977. is most useful when running threaded programs, as it is no longer
  12978. necessary to calculate a good stack size to use for each thread. This
  12979. is currently only implemented for the x86 targets running
  12980. GNU/Linux.
  12981. .Sp
  12982. When code compiled with \fB\-fsplit\-stack\fR calls code compiled
  12983. without \fB\-fsplit\-stack\fR, there may not be much stack space
  12984. available for the latter code to run. If compiling all code,
  12985. including library code, with \fB\-fsplit\-stack\fR is not an option,
  12986. then the linker can fix up these calls so that the code compiled
  12987. without \fB\-fsplit\-stack\fR always has a large stack. Support for
  12988. this is implemented in the gold linker in \s-1GNU\s0 binutils release 2.21
  12989. and later.
  12990. .IP "\fB\-fvtable\-verify=\fR[\fBstd\fR|\fBpreinit\fR|\fBnone\fR]" 4
  12991. .IX Item "-fvtable-verify=[std|preinit|none]"
  12992. This option is only available when compiling \*(C+ code.
  12993. It turns on (or off, if using \fB\-fvtable\-verify=none\fR) the security
  12994. feature that verifies at run time, for every virtual call, that
  12995. the vtable pointer through which the call is made is valid for the type of
  12996. the object, and has not been corrupted or overwritten. If an invalid vtable
  12997. pointer is detected at run time, an error is reported and execution of the
  12998. program is immediately halted.
  12999. .Sp
  13000. This option causes run-time data structures to be built at program startup,
  13001. which are used for verifying the vtable pointers.
  13002. The options \fBstd\fR and \fBpreinit\fR
  13003. control the timing of when these data structures are built. In both cases the
  13004. data structures are built before execution reaches \f(CW\*(C`main\*(C'\fR. Using
  13005. \&\fB\-fvtable\-verify=std\fR causes the data structures to be built after
  13006. shared libraries have been loaded and initialized.
  13007. \&\fB\-fvtable\-verify=preinit\fR causes them to be built before shared
  13008. libraries have been loaded and initialized.
  13009. .Sp
  13010. If this option appears multiple times in the command line with different
  13011. values specified, \fBnone\fR takes highest priority over both \fBstd\fR and
  13012. \&\fBpreinit\fR; \fBpreinit\fR takes priority over \fBstd\fR.
  13013. .IP "\fB\-fvtv\-debug\fR" 4
  13014. .IX Item "-fvtv-debug"
  13015. When used in conjunction with \fB\-fvtable\-verify=std\fR or
  13016. \&\fB\-fvtable\-verify=preinit\fR, causes debug versions of the
  13017. runtime functions for the vtable verification feature to be called.
  13018. This flag also causes the compiler to log information about which
  13019. vtable pointers it finds for each class.
  13020. This information is written to a file named \fIvtv_set_ptr_data.log\fR
  13021. in the directory named by the environment variable \fB\s-1VTV_LOGS_DIR\s0\fR
  13022. if that is defined or the current working directory otherwise.
  13023. .Sp
  13024. Note: This feature \fIappends\fR data to the log file. If you want a fresh log
  13025. file, be sure to delete any existing one.
  13026. .IP "\fB\-fvtv\-counts\fR" 4
  13027. .IX Item "-fvtv-counts"
  13028. This is a debugging flag. When used in conjunction with
  13029. \&\fB\-fvtable\-verify=std\fR or \fB\-fvtable\-verify=preinit\fR, this
  13030. causes the compiler to keep track of the total number of virtual calls
  13031. it encounters and the number of verifications it inserts. It also
  13032. counts the number of calls to certain run-time library functions
  13033. that it inserts and logs this information for each compilation unit.
  13034. The compiler writes this information to a file named
  13035. \&\fIvtv_count_data.log\fR in the directory named by the environment
  13036. variable \fB\s-1VTV_LOGS_DIR\s0\fR if that is defined or the current working
  13037. directory otherwise. It also counts the size of the vtable pointer sets
  13038. for each class, and writes this information to \fIvtv_class_set_sizes.log\fR
  13039. in the same directory.
  13040. .Sp
  13041. Note: This feature \fIappends\fR data to the log files. To get fresh log
  13042. files, be sure to delete any existing ones.
  13043. .IP "\fB\-finstrument\-functions\fR" 4
  13044. .IX Item "-finstrument-functions"
  13045. Generate instrumentation calls for entry and exit to functions. Just
  13046. after function entry and just before function exit, the following
  13047. profiling functions are called with the address of the current
  13048. function and its call site. (On some platforms,
  13049. \&\f(CW\*(C`_\|_builtin_return_address\*(C'\fR does not work beyond the current
  13050. function, so the call site information may not be available to the
  13051. profiling functions otherwise.)
  13052. .Sp
  13053. .Vb 4
  13054. \& void _\|_cyg_profile_func_enter (void *this_fn,
  13055. \& void *call_site);
  13056. \& void _\|_cyg_profile_func_exit (void *this_fn,
  13057. \& void *call_site);
  13058. .Ve
  13059. .Sp
  13060. The first argument is the address of the start of the current function,
  13061. which may be looked up exactly in the symbol table.
  13062. .Sp
  13063. This instrumentation is also done for functions expanded inline in other
  13064. functions. The profiling calls indicate where, conceptually, the
  13065. inline function is entered and exited. This means that addressable
  13066. versions of such functions must be available. If all your uses of a
  13067. function are expanded inline, this may mean an additional expansion of
  13068. code size. If you use \f(CW\*(C`extern inline\*(C'\fR in your C code, an
  13069. addressable version of such functions must be provided. (This is
  13070. normally the case anyway, but if you get lucky and the optimizer always
  13071. expands the functions inline, you might have gotten away without
  13072. providing static copies.)
  13073. .Sp
  13074. A function may be given the attribute \f(CW\*(C`no_instrument_function\*(C'\fR, in
  13075. which case this instrumentation is not done. This can be used, for
  13076. example, for the profiling functions listed above, high-priority
  13077. interrupt routines, and any functions from which the profiling functions
  13078. cannot safely be called (perhaps signal handlers, if the profiling
  13079. routines generate output or allocate memory).
  13080. .IP "\fB\-finstrument\-functions\-exclude\-file\-list=\fR\fIfile\fR\fB,\fR\fIfile\fR\fB,...\fR" 4
  13081. .IX Item "-finstrument-functions-exclude-file-list=file,file,..."
  13082. Set the list of functions that are excluded from instrumentation (see
  13083. the description of \fB\-finstrument\-functions\fR). If the file that
  13084. contains a function definition matches with one of \fIfile\fR, then
  13085. that function is not instrumented. The match is done on substrings:
  13086. if the \fIfile\fR parameter is a substring of the file name, it is
  13087. considered to be a match.
  13088. .Sp
  13089. For example:
  13090. .Sp
  13091. .Vb 1
  13092. \& \-finstrument\-functions\-exclude\-file\-list=/bits/stl,include/sys
  13093. .Ve
  13094. .Sp
  13095. excludes any inline function defined in files whose pathnames
  13096. contain \fI/bits/stl\fR or \fIinclude/sys\fR.
  13097. .Sp
  13098. If, for some reason, you want to include letter \fB,\fR in one of
  13099. \&\fIsym\fR, write \fB,\fR. For example,
  13100. \&\fB\-finstrument\-functions\-exclude\-file\-list=',,tmp'\fR
  13101. (note the single quote surrounding the option).
  13102. .IP "\fB\-finstrument\-functions\-exclude\-function\-list=\fR\fIsym\fR\fB,\fR\fIsym\fR\fB,...\fR" 4
  13103. .IX Item "-finstrument-functions-exclude-function-list=sym,sym,..."
  13104. This is similar to \fB\-finstrument\-functions\-exclude\-file\-list\fR,
  13105. but this option sets the list of function names to be excluded from
  13106. instrumentation. The function name to be matched is its user-visible
  13107. name, such as \f(CW\*(C`vector<int> blah(const vector<int> &)\*(C'\fR, not the
  13108. internal mangled name (e.g., \f(CW\*(C`_Z4blahRSt6vectorIiSaIiEE\*(C'\fR). The
  13109. match is done on substrings: if the \fIsym\fR parameter is a substring
  13110. of the function name, it is considered to be a match. For C99 and \*(C+
  13111. extended identifiers, the function name must be given in \s-1UTF\-8,\s0 not
  13112. using universal character names.
  13113. .IP "\fB\-fpatchable\-function\-entry=\fR\fIN\fR\fB[,\fR\fIM\fR\fB]\fR" 4
  13114. .IX Item "-fpatchable-function-entry=N[,M]"
  13115. Generate \fIN\fR NOPs right at the beginning
  13116. of each function, with the function entry point before the \fIM\fRth \s-1NOP.\s0
  13117. If \fIM\fR is omitted, it defaults to \f(CW0\fR so the
  13118. function entry points to the address just at the first \s-1NOP.\s0
  13119. The \s-1NOP\s0 instructions reserve extra space which can be used to patch in
  13120. any desired instrumentation at run time, provided that the code segment
  13121. is writable. The amount of space is controllable indirectly via
  13122. the number of NOPs; the \s-1NOP\s0 instruction used corresponds to the instruction
  13123. emitted by the internal \s-1GCC\s0 back-end interface \f(CW\*(C`gen_nop\*(C'\fR. This behavior
  13124. is target-specific and may also depend on the architecture variant and/or
  13125. other compilation options.
  13126. .Sp
  13127. For run-time identification, the starting addresses of these areas,
  13128. which correspond to their respective function entries minus \fIM\fR,
  13129. are additionally collected in the \f(CW\*(C`_\|_patchable_function_entries\*(C'\fR
  13130. section of the resulting binary.
  13131. .Sp
  13132. Note that the value of \f(CW\*(C`_\|_attribute_\|_ ((patchable_function_entry
  13133. (N,M)))\*(C'\fR takes precedence over command-line option
  13134. \&\fB\-fpatchable\-function\-entry=N,M\fR. This can be used to increase
  13135. the area size or to remove it completely on a single function.
  13136. If \f(CW\*(C`N=0\*(C'\fR, no pad location is recorded.
  13137. .Sp
  13138. The \s-1NOP\s0 instructions are inserted at\-\-\-and maybe before, depending on
  13139. \&\fIM\fR\-\-\-the function entry address, even before the prologue.
  13140. .SS "Options Controlling the Preprocessor"
  13141. .IX Subsection "Options Controlling the Preprocessor"
  13142. These options control the C preprocessor, which is run on each C source
  13143. file before actual compilation.
  13144. .PP
  13145. If you use the \fB\-E\fR option, nothing is done except preprocessing.
  13146. Some of these options make sense only together with \fB\-E\fR because
  13147. they cause the preprocessor output to be unsuitable for actual
  13148. compilation.
  13149. .PP
  13150. In addition to the options listed here, there are a number of options
  13151. to control search paths for include files documented in
  13152. \&\fBDirectory Options\fR.
  13153. Options to control preprocessor diagnostics are listed in
  13154. \&\fBWarning Options\fR.
  13155. .IP "\fB\-D\fR \fIname\fR" 4
  13156. .IX Item "-D name"
  13157. Predefine \fIname\fR as a macro, with definition \f(CW1\fR.
  13158. .IP "\fB\-D\fR \fIname\fR\fB=\fR\fIdefinition\fR" 4
  13159. .IX Item "-D name=definition"
  13160. The contents of \fIdefinition\fR are tokenized and processed as if
  13161. they appeared during translation phase three in a \fB#define\fR
  13162. directive. In particular, the definition is truncated by
  13163. embedded newline characters.
  13164. .Sp
  13165. If you are invoking the preprocessor from a shell or shell-like
  13166. program you may need to use the shell's quoting syntax to protect
  13167. characters such as spaces that have a meaning in the shell syntax.
  13168. .Sp
  13169. If you wish to define a function-like macro on the command line, write
  13170. its argument list with surrounding parentheses before the equals sign
  13171. (if any). Parentheses are meaningful to most shells, so you should
  13172. quote the option. With \fBsh\fR and \fBcsh\fR,
  13173. \&\fB\-D'\fR\fIname\fR\fB(\fR\fIargs...\fR\fB)=\fR\fIdefinition\fR\fB'\fR works.
  13174. .Sp
  13175. \&\fB\-D\fR and \fB\-U\fR options are processed in the order they
  13176. are given on the command line. All \fB\-imacros\fR \fIfile\fR and
  13177. \&\fB\-include\fR \fIfile\fR options are processed after all
  13178. \&\fB\-D\fR and \fB\-U\fR options.
  13179. .IP "\fB\-U\fR \fIname\fR" 4
  13180. .IX Item "-U name"
  13181. Cancel any previous definition of \fIname\fR, either built in or
  13182. provided with a \fB\-D\fR option.
  13183. .IP "\fB\-include\fR \fIfile\fR" 4
  13184. .IX Item "-include file"
  13185. Process \fIfile\fR as if \f(CW\*(C`#include "file"\*(C'\fR appeared as the first
  13186. line of the primary source file. However, the first directory searched
  13187. for \fIfile\fR is the preprocessor's working directory \fIinstead of\fR
  13188. the directory containing the main source file. If not found there, it
  13189. is searched for in the remainder of the \f(CW\*(C`#include "..."\*(C'\fR search
  13190. chain as normal.
  13191. .Sp
  13192. If multiple \fB\-include\fR options are given, the files are included
  13193. in the order they appear on the command line.
  13194. .IP "\fB\-imacros\fR \fIfile\fR" 4
  13195. .IX Item "-imacros file"
  13196. Exactly like \fB\-include\fR, except that any output produced by
  13197. scanning \fIfile\fR is thrown away. Macros it defines remain defined.
  13198. This allows you to acquire all the macros from a header without also
  13199. processing its declarations.
  13200. .Sp
  13201. All files specified by \fB\-imacros\fR are processed before all files
  13202. specified by \fB\-include\fR.
  13203. .IP "\fB\-undef\fR" 4
  13204. .IX Item "-undef"
  13205. Do not predefine any system-specific or GCC-specific macros. The
  13206. standard predefined macros remain defined.
  13207. .IP "\fB\-pthread\fR" 4
  13208. .IX Item "-pthread"
  13209. Define additional macros required for using the \s-1POSIX\s0 threads library.
  13210. You should use this option consistently for both compilation and linking.
  13211. This option is supported on GNU/Linux targets, most other Unix derivatives,
  13212. and also on x86 Cygwin and MinGW targets.
  13213. .IP "\fB\-M\fR" 4
  13214. .IX Item "-M"
  13215. Instead of outputting the result of preprocessing, output a rule
  13216. suitable for \fBmake\fR describing the dependencies of the main
  13217. source file. The preprocessor outputs one \fBmake\fR rule containing
  13218. the object file name for that source file, a colon, and the names of all
  13219. the included files, including those coming from \fB\-include\fR or
  13220. \&\fB\-imacros\fR command-line options.
  13221. .Sp
  13222. Unless specified explicitly (with \fB\-MT\fR or \fB\-MQ\fR), the
  13223. object file name consists of the name of the source file with any
  13224. suffix replaced with object file suffix and with any leading directory
  13225. parts removed. If there are many included files then the rule is
  13226. split into several lines using \fB\e\fR\-newline. The rule has no
  13227. commands.
  13228. .Sp
  13229. This option does not suppress the preprocessor's debug output, such as
  13230. \&\fB\-dM\fR. To avoid mixing such debug output with the dependency
  13231. rules you should explicitly specify the dependency output file with
  13232. \&\fB\-MF\fR, or use an environment variable like
  13233. \&\fB\s-1DEPENDENCIES_OUTPUT\s0\fR. Debug output
  13234. is still sent to the regular output stream as normal.
  13235. .Sp
  13236. Passing \fB\-M\fR to the driver implies \fB\-E\fR, and suppresses
  13237. warnings with an implicit \fB\-w\fR.
  13238. .IP "\fB\-MM\fR" 4
  13239. .IX Item "-MM"
  13240. Like \fB\-M\fR but do not mention header files that are found in
  13241. system header directories, nor header files that are included,
  13242. directly or indirectly, from such a header.
  13243. .Sp
  13244. This implies that the choice of angle brackets or double quotes in an
  13245. \&\fB#include\fR directive does not in itself determine whether that
  13246. header appears in \fB\-MM\fR dependency output.
  13247. .IP "\fB\-MF\fR \fIfile\fR" 4
  13248. .IX Item "-MF file"
  13249. When used with \fB\-M\fR or \fB\-MM\fR, specifies a
  13250. file to write the dependencies to. If no \fB\-MF\fR switch is given
  13251. the preprocessor sends the rules to the same place it would send
  13252. preprocessed output.
  13253. .Sp
  13254. When used with the driver options \fB\-MD\fR or \fB\-MMD\fR,
  13255. \&\fB\-MF\fR overrides the default dependency output file.
  13256. .Sp
  13257. If \fIfile\fR is \fI\-\fR, then the dependencies are written to \fIstdout\fR.
  13258. .IP "\fB\-MG\fR" 4
  13259. .IX Item "-MG"
  13260. In conjunction with an option such as \fB\-M\fR requesting
  13261. dependency generation, \fB\-MG\fR assumes missing header files are
  13262. generated files and adds them to the dependency list without raising
  13263. an error. The dependency filename is taken directly from the
  13264. \&\f(CW\*(C`#include\*(C'\fR directive without prepending any path. \fB\-MG\fR
  13265. also suppresses preprocessed output, as a missing header file renders
  13266. this useless.
  13267. .Sp
  13268. This feature is used in automatic updating of makefiles.
  13269. .IP "\fB\-MP\fR" 4
  13270. .IX Item "-MP"
  13271. This option instructs \s-1CPP\s0 to add a phony target for each dependency
  13272. other than the main file, causing each to depend on nothing. These
  13273. dummy rules work around errors \fBmake\fR gives if you remove header
  13274. files without updating the \fIMakefile\fR to match.
  13275. .Sp
  13276. This is typical output:
  13277. .Sp
  13278. .Vb 1
  13279. \& test.o: test.c test.h
  13280. \&
  13281. \& test.h:
  13282. .Ve
  13283. .IP "\fB\-MT\fR \fItarget\fR" 4
  13284. .IX Item "-MT target"
  13285. Change the target of the rule emitted by dependency generation. By
  13286. default \s-1CPP\s0 takes the name of the main input file, deletes any
  13287. directory components and any file suffix such as \fB.c\fR, and
  13288. appends the platform's usual object suffix. The result is the target.
  13289. .Sp
  13290. An \fB\-MT\fR option sets the target to be exactly the string you
  13291. specify. If you want multiple targets, you can specify them as a single
  13292. argument to \fB\-MT\fR, or use multiple \fB\-MT\fR options.
  13293. .Sp
  13294. For example, \fB\-MT\ '$(objpfx)foo.o'\fR might give
  13295. .Sp
  13296. .Vb 1
  13297. \& $(objpfx)foo.o: foo.c
  13298. .Ve
  13299. .IP "\fB\-MQ\fR \fItarget\fR" 4
  13300. .IX Item "-MQ target"
  13301. Same as \fB\-MT\fR, but it quotes any characters which are special to
  13302. Make. \fB\-MQ\ '$(objpfx)foo.o'\fR gives
  13303. .Sp
  13304. .Vb 1
  13305. \& $$(objpfx)foo.o: foo.c
  13306. .Ve
  13307. .Sp
  13308. The default target is automatically quoted, as if it were given with
  13309. \&\fB\-MQ\fR.
  13310. .IP "\fB\-MD\fR" 4
  13311. .IX Item "-MD"
  13312. \&\fB\-MD\fR is equivalent to \fB\-M \-MF\fR \fIfile\fR, except that
  13313. \&\fB\-E\fR is not implied. The driver determines \fIfile\fR based on
  13314. whether an \fB\-o\fR option is given. If it is, the driver uses its
  13315. argument but with a suffix of \fI.d\fR, otherwise it takes the name
  13316. of the input file, removes any directory components and suffix, and
  13317. applies a \fI.d\fR suffix.
  13318. .Sp
  13319. If \fB\-MD\fR is used in conjunction with \fB\-E\fR, any
  13320. \&\fB\-o\fR switch is understood to specify the dependency output file, but if used without \fB\-E\fR, each \fB\-o\fR
  13321. is understood to specify a target object file.
  13322. .Sp
  13323. Since \fB\-E\fR is not implied, \fB\-MD\fR can be used to generate
  13324. a dependency output file as a side effect of the compilation process.
  13325. .IP "\fB\-MMD\fR" 4
  13326. .IX Item "-MMD"
  13327. Like \fB\-MD\fR except mention only user header files, not system
  13328. header files.
  13329. .IP "\fB\-fpreprocessed\fR" 4
  13330. .IX Item "-fpreprocessed"
  13331. Indicate to the preprocessor that the input file has already been
  13332. preprocessed. This suppresses things like macro expansion, trigraph
  13333. conversion, escaped newline splicing, and processing of most directives.
  13334. The preprocessor still recognizes and removes comments, so that you can
  13335. pass a file preprocessed with \fB\-C\fR to the compiler without
  13336. problems. In this mode the integrated preprocessor is little more than
  13337. a tokenizer for the front ends.
  13338. .Sp
  13339. \&\fB\-fpreprocessed\fR is implicit if the input file has one of the
  13340. extensions \fB.i\fR, \fB.ii\fR or \fB.mi\fR. These are the
  13341. extensions that \s-1GCC\s0 uses for preprocessed files created by
  13342. \&\fB\-save\-temps\fR.
  13343. .IP "\fB\-fdirectives\-only\fR" 4
  13344. .IX Item "-fdirectives-only"
  13345. When preprocessing, handle directives, but do not expand macros.
  13346. .Sp
  13347. The option's behavior depends on the \fB\-E\fR and \fB\-fpreprocessed\fR
  13348. options.
  13349. .Sp
  13350. With \fB\-E\fR, preprocessing is limited to the handling of directives
  13351. such as \f(CW\*(C`#define\*(C'\fR, \f(CW\*(C`#ifdef\*(C'\fR, and \f(CW\*(C`#error\*(C'\fR. Other
  13352. preprocessor operations, such as macro expansion and trigraph
  13353. conversion are not performed. In addition, the \fB\-dD\fR option is
  13354. implicitly enabled.
  13355. .Sp
  13356. With \fB\-fpreprocessed\fR, predefinition of command line and most
  13357. builtin macros is disabled. Macros such as \f(CW\*(C`_\|_LINE_\|_\*(C'\fR, which are
  13358. contextually dependent, are handled normally. This enables compilation of
  13359. files previously preprocessed with \f(CW\*(C`\-E \-fdirectives\-only\*(C'\fR.
  13360. .Sp
  13361. With both \fB\-E\fR and \fB\-fpreprocessed\fR, the rules for
  13362. \&\fB\-fpreprocessed\fR take precedence. This enables full preprocessing of
  13363. files previously preprocessed with \f(CW\*(C`\-E \-fdirectives\-only\*(C'\fR.
  13364. .IP "\fB\-fdollars\-in\-identifiers\fR" 4
  13365. .IX Item "-fdollars-in-identifiers"
  13366. Accept \fB$\fR in identifiers.
  13367. .IP "\fB\-fextended\-identifiers\fR" 4
  13368. .IX Item "-fextended-identifiers"
  13369. Accept universal character names and extended characters in
  13370. identifiers. This option is enabled by default for C99 (and later C
  13371. standard versions) and \*(C+.
  13372. .IP "\fB\-fno\-canonical\-system\-headers\fR" 4
  13373. .IX Item "-fno-canonical-system-headers"
  13374. When preprocessing, do not shorten system header paths with canonicalization.
  13375. .IP "\fB\-fmax\-include\-depth=\fR\fIdepth\fR" 4
  13376. .IX Item "-fmax-include-depth=depth"
  13377. Set the maximum depth of the nested #include. The default is 200.
  13378. .IP "\fB\-ftabstop=\fR\fIwidth\fR" 4
  13379. .IX Item "-ftabstop=width"
  13380. Set the distance between tab stops. This helps the preprocessor report
  13381. correct column numbers in warnings or errors, even if tabs appear on the
  13382. line. If the value is less than 1 or greater than 100, the option is
  13383. ignored. The default is 8.
  13384. .IP "\fB\-ftrack\-macro\-expansion\fR[\fB=\fR\fIlevel\fR]" 4
  13385. .IX Item "-ftrack-macro-expansion[=level]"
  13386. Track locations of tokens across macro expansions. This allows the
  13387. compiler to emit diagnostic about the current macro expansion stack
  13388. when a compilation error occurs in a macro expansion. Using this
  13389. option makes the preprocessor and the compiler consume more
  13390. memory. The \fIlevel\fR parameter can be used to choose the level of
  13391. precision of token location tracking thus decreasing the memory
  13392. consumption if necessary. Value \fB0\fR of \fIlevel\fR de-activates
  13393. this option. Value \fB1\fR tracks tokens locations in a
  13394. degraded mode for the sake of minimal memory overhead. In this mode
  13395. all tokens resulting from the expansion of an argument of a
  13396. function-like macro have the same location. Value \fB2\fR tracks
  13397. tokens locations completely. This value is the most memory hungry.
  13398. When this option is given no argument, the default parameter value is
  13399. \&\fB2\fR.
  13400. .Sp
  13401. Note that \f(CW\*(C`\-ftrack\-macro\-expansion=2\*(C'\fR is activated by default.
  13402. .IP "\fB\-fmacro\-prefix\-map=\fR\fIold\fR\fB=\fR\fInew\fR" 4
  13403. .IX Item "-fmacro-prefix-map=old=new"
  13404. When preprocessing files residing in directory \fI\fIold\fI\fR,
  13405. expand the \f(CW\*(C`_\|_FILE_\|_\*(C'\fR and \f(CW\*(C`_\|_BASE_FILE_\|_\*(C'\fR macros as if the
  13406. files resided in directory \fI\fInew\fI\fR instead. This can be used
  13407. to change an absolute path to a relative path by using \fI.\fR for
  13408. \&\fInew\fR which can result in more reproducible builds that are
  13409. location independent. This option also affects
  13410. \&\f(CW\*(C`_\|_builtin_FILE()\*(C'\fR during compilation. See also
  13411. \&\fB\-ffile\-prefix\-map\fR.
  13412. .IP "\fB\-fexec\-charset=\fR\fIcharset\fR" 4
  13413. .IX Item "-fexec-charset=charset"
  13414. Set the execution character set, used for string and character
  13415. constants. The default is \s-1UTF\-8. \s0\fIcharset\fR can be any encoding
  13416. supported by the system's \f(CW\*(C`iconv\*(C'\fR library routine.
  13417. .IP "\fB\-fwide\-exec\-charset=\fR\fIcharset\fR" 4
  13418. .IX Item "-fwide-exec-charset=charset"
  13419. Set the wide execution character set, used for wide string and
  13420. character constants. The default is \s-1UTF\-32\s0 or \s-1UTF\-16,\s0 whichever
  13421. corresponds to the width of \f(CW\*(C`wchar_t\*(C'\fR. As with
  13422. \&\fB\-fexec\-charset\fR, \fIcharset\fR can be any encoding supported
  13423. by the system's \f(CW\*(C`iconv\*(C'\fR library routine; however, you will have
  13424. problems with encodings that do not fit exactly in \f(CW\*(C`wchar_t\*(C'\fR.
  13425. .IP "\fB\-finput\-charset=\fR\fIcharset\fR" 4
  13426. .IX Item "-finput-charset=charset"
  13427. Set the input character set, used for translation from the character
  13428. set of the input file to the source character set used by \s-1GCC. \s0 If the
  13429. locale does not specify, or \s-1GCC\s0 cannot get this information from the
  13430. locale, the default is \s-1UTF\-8. \s0 This can be overridden by either the locale
  13431. or this command-line option. Currently the command-line option takes
  13432. precedence if there's a conflict. \fIcharset\fR can be any encoding
  13433. supported by the system's \f(CW\*(C`iconv\*(C'\fR library routine.
  13434. .IP "\fB\-fpch\-deps\fR" 4
  13435. .IX Item "-fpch-deps"
  13436. When using precompiled headers, this flag
  13437. causes the dependency-output flags to also list the files from the
  13438. precompiled header's dependencies. If not specified, only the
  13439. precompiled header are listed and not the files that were used to
  13440. create it, because those files are not consulted when a precompiled
  13441. header is used.
  13442. .IP "\fB\-fpch\-preprocess\fR" 4
  13443. .IX Item "-fpch-preprocess"
  13444. This option allows use of a precompiled header together with \fB\-E\fR. It inserts a special \f(CW\*(C`#pragma\*(C'\fR,
  13445. \&\f(CW\*(C`#pragma GCC pch_preprocess "\f(CIfilename\f(CW"\*(C'\fR in the output to mark
  13446. the place where the precompiled header was found, and its \fIfilename\fR.
  13447. When \fB\-fpreprocessed\fR is in use, \s-1GCC\s0 recognizes this \f(CW\*(C`#pragma\*(C'\fR
  13448. and loads the \s-1PCH.\s0
  13449. .Sp
  13450. This option is off by default, because the resulting preprocessed output
  13451. is only really suitable as input to \s-1GCC. \s0 It is switched on by
  13452. \&\fB\-save\-temps\fR.
  13453. .Sp
  13454. You should not write this \f(CW\*(C`#pragma\*(C'\fR in your own code, but it is
  13455. safe to edit the filename if the \s-1PCH\s0 file is available in a different
  13456. location. The filename may be absolute or it may be relative to \s-1GCC\s0's
  13457. current directory.
  13458. .IP "\fB\-fworking\-directory\fR" 4
  13459. .IX Item "-fworking-directory"
  13460. Enable generation of linemarkers in the preprocessor output that
  13461. let the compiler know the current working directory at the time of
  13462. preprocessing. When this option is enabled, the preprocessor
  13463. emits, after the initial linemarker, a second linemarker with the
  13464. current working directory followed by two slashes. \s-1GCC\s0 uses this
  13465. directory, when it's present in the preprocessed input, as the
  13466. directory emitted as the current working directory in some debugging
  13467. information formats. This option is implicitly enabled if debugging
  13468. information is enabled, but this can be inhibited with the negated
  13469. form \fB\-fno\-working\-directory\fR. If the \fB\-P\fR flag is
  13470. present in the command line, this option has no effect, since no
  13471. \&\f(CW\*(C`#line\*(C'\fR directives are emitted whatsoever.
  13472. .IP "\fB\-A\fR \fIpredicate\fR\fB=\fR\fIanswer\fR" 4
  13473. .IX Item "-A predicate=answer"
  13474. Make an assertion with the predicate \fIpredicate\fR and answer
  13475. \&\fIanswer\fR. This form is preferred to the older form \fB\-A\fR
  13476. \&\fIpredicate\fR\fB(\fR\fIanswer\fR\fB)\fR, which is still supported, because
  13477. it does not use shell special characters.
  13478. .IP "\fB\-A \-\fR\fIpredicate\fR\fB=\fR\fIanswer\fR" 4
  13479. .IX Item "-A -predicate=answer"
  13480. Cancel an assertion with the predicate \fIpredicate\fR and answer
  13481. \&\fIanswer\fR.
  13482. .IP "\fB\-C\fR" 4
  13483. .IX Item "-C"
  13484. Do not discard comments. All comments are passed through to the output
  13485. file, except for comments in processed directives, which are deleted
  13486. along with the directive.
  13487. .Sp
  13488. You should be prepared for side effects when using \fB\-C\fR; it
  13489. causes the preprocessor to treat comments as tokens in their own right.
  13490. For example, comments appearing at the start of what would be a
  13491. directive line have the effect of turning that line into an ordinary
  13492. source line, since the first token on the line is no longer a \fB#\fR.
  13493. .IP "\fB\-CC\fR" 4
  13494. .IX Item "-CC"
  13495. Do not discard comments, including during macro expansion. This is
  13496. like \fB\-C\fR, except that comments contained within macros are
  13497. also passed through to the output file where the macro is expanded.
  13498. .Sp
  13499. In addition to the side effects of the \fB\-C\fR option, the
  13500. \&\fB\-CC\fR option causes all \*(C+\-style comments inside a macro
  13501. to be converted to C\-style comments. This is to prevent later use
  13502. of that macro from inadvertently commenting out the remainder of
  13503. the source line.
  13504. .Sp
  13505. The \fB\-CC\fR option is generally used to support lint comments.
  13506. .IP "\fB\-P\fR" 4
  13507. .IX Item "-P"
  13508. Inhibit generation of linemarkers in the output from the preprocessor.
  13509. This might be useful when running the preprocessor on something that is
  13510. not C code, and will be sent to a program which might be confused by the
  13511. linemarkers.
  13512. .IP "\fB\-traditional\fR" 4
  13513. .IX Item "-traditional"
  13514. .PD 0
  13515. .IP "\fB\-traditional\-cpp\fR" 4
  13516. .IX Item "-traditional-cpp"
  13517. .PD
  13518. Try to imitate the behavior of pre-standard C preprocessors, as
  13519. opposed to \s-1ISO C\s0 preprocessors.
  13520. See the \s-1GNU CPP\s0 manual for details.
  13521. .Sp
  13522. Note that \s-1GCC\s0 does not otherwise attempt to emulate a pre-standard
  13523. C compiler, and these options are only supported with the \fB\-E\fR
  13524. switch, or when invoking \s-1CPP\s0 explicitly.
  13525. .IP "\fB\-trigraphs\fR" 4
  13526. .IX Item "-trigraphs"
  13527. Support \s-1ISO C\s0 trigraphs.
  13528. These are three-character sequences, all starting with \fB??\fR, that
  13529. are defined by \s-1ISO C\s0 to stand for single characters. For example,
  13530. \&\fB??/\fR stands for \fB\e\fR, so \fB'??/n'\fR is a character
  13531. constant for a newline.
  13532. .Sp
  13533. The nine trigraphs and their replacements are
  13534. .Sp
  13535. .Vb 2
  13536. \& Trigraph: ??( ??) ??< ??> ??= ??/ ??\*(Aq ??! ??\-
  13537. \& Replacement: [ ] { } # \e ^ | ~
  13538. .Ve
  13539. .Sp
  13540. By default, \s-1GCC\s0 ignores trigraphs, but in
  13541. standard-conforming modes it converts them. See the \fB\-std\fR and
  13542. \&\fB\-ansi\fR options.
  13543. .IP "\fB\-remap\fR" 4
  13544. .IX Item "-remap"
  13545. Enable special code to work around file systems which only permit very
  13546. short file names, such as MS-DOS.
  13547. .IP "\fB\-H\fR" 4
  13548. .IX Item "-H"
  13549. Print the name of each header file used, in addition to other normal
  13550. activities. Each name is indented to show how deep in the
  13551. \&\fB#include\fR stack it is. Precompiled header files are also
  13552. printed, even if they are found to be invalid; an invalid precompiled
  13553. header file is printed with \fB...x\fR and a valid one with \fB...!\fR .
  13554. .IP "\fB\-d\fR\fIletters\fR" 4
  13555. .IX Item "-dletters"
  13556. Says to make debugging dumps during compilation as specified by
  13557. \&\fIletters\fR. The flags documented here are those relevant to the
  13558. preprocessor. Other \fIletters\fR are interpreted
  13559. by the compiler proper, or reserved for future versions of \s-1GCC,\s0 and so
  13560. are silently ignored. If you specify \fIletters\fR whose behavior
  13561. conflicts, the result is undefined.
  13562. .RS 4
  13563. .IP "\fB\-dM\fR" 4
  13564. .IX Item "-dM"
  13565. Instead of the normal output, generate a list of \fB#define\fR
  13566. directives for all the macros defined during the execution of the
  13567. preprocessor, including predefined macros. This gives you a way of
  13568. finding out what is predefined in your version of the preprocessor.
  13569. Assuming you have no file \fIfoo.h\fR, the command
  13570. .Sp
  13571. .Vb 1
  13572. \& touch foo.h; cpp \-dM foo.h
  13573. .Ve
  13574. .Sp
  13575. shows all the predefined macros.
  13576. .Sp
  13577. If you use \fB\-dM\fR without the \fB\-E\fR option, \fB\-dM\fR is
  13578. interpreted as a synonym for \fB\-fdump\-rtl\-mach\fR.
  13579. .IP "\fB\-dD\fR" 4
  13580. .IX Item "-dD"
  13581. Like \fB\-dM\fR except in two respects: it does \fInot\fR include the
  13582. predefined macros, and it outputs \fIboth\fR the \fB#define\fR
  13583. directives and the result of preprocessing. Both kinds of output go to
  13584. the standard output file.
  13585. .IP "\fB\-dN\fR" 4
  13586. .IX Item "-dN"
  13587. Like \fB\-dD\fR, but emit only the macro names, not their expansions.
  13588. .IP "\fB\-dI\fR" 4
  13589. .IX Item "-dI"
  13590. Output \fB#include\fR directives in addition to the result of
  13591. preprocessing.
  13592. .IP "\fB\-dU\fR" 4
  13593. .IX Item "-dU"
  13594. Like \fB\-dD\fR except that only macros that are expanded, or whose
  13595. definedness is tested in preprocessor directives, are output; the
  13596. output is delayed until the use or test of the macro; and
  13597. \&\fB#undef\fR directives are also output for macros tested but
  13598. undefined at the time.
  13599. .RE
  13600. .RS 4
  13601. .RE
  13602. .IP "\fB\-fdebug\-cpp\fR" 4
  13603. .IX Item "-fdebug-cpp"
  13604. This option is only useful for debugging \s-1GCC. \s0 When used from \s-1CPP\s0 or with
  13605. \&\fB\-E\fR, it dumps debugging information about location maps. Every
  13606. token in the output is preceded by the dump of the map its location
  13607. belongs to.
  13608. .Sp
  13609. When used from \s-1GCC\s0 without \fB\-E\fR, this option has no effect.
  13610. .IP "\fB\-Wp,\fR\fIoption\fR" 4
  13611. .IX Item "-Wp,option"
  13612. You can use \fB\-Wp,\fR\fIoption\fR to bypass the compiler driver
  13613. and pass \fIoption\fR directly through to the preprocessor. If
  13614. \&\fIoption\fR contains commas, it is split into multiple options at the
  13615. commas. However, many options are modified, translated or interpreted
  13616. by the compiler driver before being passed to the preprocessor, and
  13617. \&\fB\-Wp\fR forcibly bypasses this phase. The preprocessor's direct
  13618. interface is undocumented and subject to change, so whenever possible
  13619. you should avoid using \fB\-Wp\fR and let the driver handle the
  13620. options instead.
  13621. .IP "\fB\-Xpreprocessor\fR \fIoption\fR" 4
  13622. .IX Item "-Xpreprocessor option"
  13623. Pass \fIoption\fR as an option to the preprocessor. You can use this to
  13624. supply system-specific preprocessor options that \s-1GCC\s0 does not
  13625. recognize.
  13626. .Sp
  13627. If you want to pass an option that takes an argument, you must use
  13628. \&\fB\-Xpreprocessor\fR twice, once for the option and once for the argument.
  13629. .IP "\fB\-no\-integrated\-cpp\fR" 4
  13630. .IX Item "-no-integrated-cpp"
  13631. Perform preprocessing as a separate pass before compilation.
  13632. By default, \s-1GCC\s0 performs preprocessing as an integrated part of
  13633. input tokenization and parsing.
  13634. If this option is provided, the appropriate language front end
  13635. (\fBcc1\fR, \fBcc1plus\fR, or \fBcc1obj\fR for C, \*(C+,
  13636. and Objective-C, respectively) is instead invoked twice,
  13637. once for preprocessing only and once for actual compilation
  13638. of the preprocessed input.
  13639. This option may be useful in conjunction with the \fB\-B\fR or
  13640. \&\fB\-wrapper\fR options to specify an alternate preprocessor or
  13641. perform additional processing of the program source between
  13642. normal preprocessing and compilation.
  13643. .SS "Passing Options to the Assembler"
  13644. .IX Subsection "Passing Options to the Assembler"
  13645. You can pass options to the assembler.
  13646. .IP "\fB\-Wa,\fR\fIoption\fR" 4
  13647. .IX Item "-Wa,option"
  13648. Pass \fIoption\fR as an option to the assembler. If \fIoption\fR
  13649. contains commas, it is split into multiple options at the commas.
  13650. .IP "\fB\-Xassembler\fR \fIoption\fR" 4
  13651. .IX Item "-Xassembler option"
  13652. Pass \fIoption\fR as an option to the assembler. You can use this to
  13653. supply system-specific assembler options that \s-1GCC\s0 does not
  13654. recognize.
  13655. .Sp
  13656. If you want to pass an option that takes an argument, you must use
  13657. \&\fB\-Xassembler\fR twice, once for the option and once for the argument.
  13658. .SS "Options for Linking"
  13659. .IX Subsection "Options for Linking"
  13660. These options come into play when the compiler links object files into
  13661. an executable output file. They are meaningless if the compiler is
  13662. not doing a link step.
  13663. .IP "\fIobject-file-name\fR" 4
  13664. .IX Item "object-file-name"
  13665. A file name that does not end in a special recognized suffix is
  13666. considered to name an object file or library. (Object files are
  13667. distinguished from libraries by the linker according to the file
  13668. contents.) If linking is done, these object files are used as input
  13669. to the linker.
  13670. .IP "\fB\-c\fR" 4
  13671. .IX Item "-c"
  13672. .PD 0
  13673. .IP "\fB\-S\fR" 4
  13674. .IX Item "-S"
  13675. .IP "\fB\-E\fR" 4
  13676. .IX Item "-E"
  13677. .PD
  13678. If any of these options is used, then the linker is not run, and
  13679. object file names should not be used as arguments.
  13680. .IP "\fB\-flinker\-output=\fR\fItype\fR" 4
  13681. .IX Item "-flinker-output=type"
  13682. This option controls code generation of the link-time optimizer. By
  13683. default the linker output is automatically determined by the linker
  13684. plugin. For debugging the compiler and if incremental linking with a
  13685. non-LTO object file is desired, it may be useful to control the type
  13686. manually.
  13687. .Sp
  13688. If \fItype\fR is \fBexec\fR, code generation produces a static
  13689. binary. In this case \fB\-fpic\fR and \fB\-fpie\fR are both
  13690. disabled.
  13691. .Sp
  13692. If \fItype\fR is \fBdyn\fR, code generation produces a shared
  13693. library. In this case \fB\-fpic\fR or \fB\-fPIC\fR is preserved,
  13694. but not enabled automatically. This allows to build shared libraries
  13695. without position-independent code on architectures where this is
  13696. possible, i.e. on x86.
  13697. .Sp
  13698. If \fItype\fR is \fBpie\fR, code generation produces an \fB\-fpie\fR
  13699. executable. This results in similar optimizations as \fBexec\fR
  13700. except that \fB\-fpie\fR is not disabled if specified at compilation
  13701. time.
  13702. .Sp
  13703. If \fItype\fR is \fBrel\fR, the compiler assumes that incremental linking is
  13704. done. The sections containing intermediate code for link-time optimization are
  13705. merged, pre-optimized, and output to the resulting object file. In addition, if
  13706. \&\fB\-ffat\-lto\-objects\fR is specified, binary code is produced for future
  13707. non-LTO linking. The object file produced by incremental linking is smaller
  13708. than a static library produced from the same object files. At link time the
  13709. result of incremental linking also loads faster than a static
  13710. library assuming that the majority of objects in the library are used.
  13711. .Sp
  13712. Finally \fBnolto-rel\fR configures the compiler for incremental linking where
  13713. code generation is forced, a final binary is produced, and the intermediate
  13714. code for later link-time optimization is stripped. When multiple object files
  13715. are linked together the resulting code is better optimized than with
  13716. link-time optimizations disabled (for example, cross-module inlining
  13717. happens), but most of benefits of whole program optimizations are lost.
  13718. .Sp
  13719. During the incremental link (by \fB\-r\fR) the linker plugin defaults to
  13720. \&\fBrel\fR. With current interfaces to \s-1GNU\s0 Binutils it is however not
  13721. possible to incrementally link \s-1LTO\s0 objects and non-LTO objects into a single
  13722. mixed object file. If any of object files in incremental link cannot
  13723. be used for link-time optimization, the linker plugin issues a warning and
  13724. uses \fBnolto-rel\fR. To maintain whole program optimization, it is
  13725. recommended to link such objects into static library instead. Alternatively it
  13726. is possible to use H.J. Lu's binutils with support for mixed objects.
  13727. .IP "\fB\-fuse\-ld=bfd\fR" 4
  13728. .IX Item "-fuse-ld=bfd"
  13729. Use the \fBbfd\fR linker instead of the default linker.
  13730. .IP "\fB\-fuse\-ld=gold\fR" 4
  13731. .IX Item "-fuse-ld=gold"
  13732. Use the \fBgold\fR linker instead of the default linker.
  13733. .IP "\fB\-fuse\-ld=lld\fR" 4
  13734. .IX Item "-fuse-ld=lld"
  13735. Use the \s-1LLVM \s0\fBlld\fR linker instead of the default linker.
  13736. .IP "\fB\-l\fR\fIlibrary\fR" 4
  13737. .IX Item "-llibrary"
  13738. .PD 0
  13739. .IP "\fB\-l\fR \fIlibrary\fR" 4
  13740. .IX Item "-l library"
  13741. .PD
  13742. Search the library named \fIlibrary\fR when linking. (The second
  13743. alternative with the library as a separate argument is only for
  13744. \&\s-1POSIX\s0 compliance and is not recommended.)
  13745. .Sp
  13746. The \fB\-l\fR option is passed directly to the linker by \s-1GCC. \s0 Refer
  13747. to your linker documentation for exact details. The general
  13748. description below applies to the \s-1GNU\s0 linker.
  13749. .Sp
  13750. The linker searches a standard list of directories for the library.
  13751. The directories searched include several standard system directories
  13752. plus any that you specify with \fB\-L\fR.
  13753. .Sp
  13754. Static libraries are archives of object files, and have file names
  13755. like \fIlib\fIlibrary\fI.a\fR. Some targets also support shared
  13756. libraries, which typically have names like \fIlib\fIlibrary\fI.so\fR.
  13757. If both static and shared libraries are found, the linker gives
  13758. preference to linking with the shared library unless the
  13759. \&\fB\-static\fR option is used.
  13760. .Sp
  13761. It makes a difference where in the command you write this option; the
  13762. linker searches and processes libraries and object files in the order they
  13763. are specified. Thus, \fBfoo.o \-lz bar.o\fR searches library \fBz\fR
  13764. after file \fIfoo.o\fR but before \fIbar.o\fR. If \fIbar.o\fR refers
  13765. to functions in \fBz\fR, those functions may not be loaded.
  13766. .IP "\fB\-lobjc\fR" 4
  13767. .IX Item "-lobjc"
  13768. You need this special case of the \fB\-l\fR option in order to
  13769. link an Objective-C or Objective\-\*(C+ program.
  13770. .IP "\fB\-nostartfiles\fR" 4
  13771. .IX Item "-nostartfiles"
  13772. Do not use the standard system startup files when linking.
  13773. The standard system libraries are used normally, unless \fB\-nostdlib\fR,
  13774. \&\fB\-nolibc\fR, or \fB\-nodefaultlibs\fR is used.
  13775. .IP "\fB\-nodefaultlibs\fR" 4
  13776. .IX Item "-nodefaultlibs"
  13777. Do not use the standard system libraries when linking.
  13778. Only the libraries you specify are passed to the linker, and options
  13779. specifying linkage of the system libraries, such as \fB\-static\-libgcc\fR
  13780. or \fB\-shared\-libgcc\fR, are ignored.
  13781. The standard startup files are used normally, unless \fB\-nostartfiles\fR
  13782. is used.
  13783. .Sp
  13784. The compiler may generate calls to \f(CW\*(C`memcmp\*(C'\fR,
  13785. \&\f(CW\*(C`memset\*(C'\fR, \f(CW\*(C`memcpy\*(C'\fR and \f(CW\*(C`memmove\*(C'\fR.
  13786. These entries are usually resolved by entries in
  13787. libc. These entry points should be supplied through some other
  13788. mechanism when this option is specified.
  13789. .IP "\fB\-nolibc\fR" 4
  13790. .IX Item "-nolibc"
  13791. Do not use the C library or system libraries tightly coupled with it when
  13792. linking. Still link with the startup files, \fIlibgcc\fR or toolchain
  13793. provided language support libraries such as \fIlibgnat\fR, \fIlibgfortran\fR
  13794. or \fIlibstdc++\fR unless options preventing their inclusion are used as
  13795. well. This typically removes \fB\-lc\fR from the link command line, as well
  13796. as system libraries that normally go with it and become meaningless when
  13797. absence of a C library is assumed, for example \fB\-lpthread\fR or
  13798. \&\fB\-lm\fR in some configurations. This is intended for bare-board
  13799. targets when there is indeed no C library available.
  13800. .IP "\fB\-nostdlib\fR" 4
  13801. .IX Item "-nostdlib"
  13802. Do not use the standard system startup files or libraries when linking.
  13803. No startup files and only the libraries you specify are passed to
  13804. the linker, and options specifying linkage of the system libraries, such as
  13805. \&\fB\-static\-libgcc\fR or \fB\-shared\-libgcc\fR, are ignored.
  13806. .Sp
  13807. The compiler may generate calls to \f(CW\*(C`memcmp\*(C'\fR, \f(CW\*(C`memset\*(C'\fR,
  13808. \&\f(CW\*(C`memcpy\*(C'\fR and \f(CW\*(C`memmove\*(C'\fR.
  13809. These entries are usually resolved by entries in
  13810. libc. These entry points should be supplied through some other
  13811. mechanism when this option is specified.
  13812. .Sp
  13813. One of the standard libraries bypassed by \fB\-nostdlib\fR and
  13814. \&\fB\-nodefaultlibs\fR is \fIlibgcc.a\fR, a library of internal subroutines
  13815. which \s-1GCC\s0 uses to overcome shortcomings of particular machines, or special
  13816. needs for some languages.
  13817. .Sp
  13818. In most cases, you need \fIlibgcc.a\fR even when you want to avoid
  13819. other standard libraries. In other words, when you specify \fB\-nostdlib\fR
  13820. or \fB\-nodefaultlibs\fR you should usually specify \fB\-lgcc\fR as well.
  13821. This ensures that you have no unresolved references to internal \s-1GCC\s0
  13822. library subroutines.
  13823. (An example of such an internal subroutine is \f(CW\*(C`_\|_main\*(C'\fR, used to ensure \*(C+
  13824. constructors are called.)
  13825. .IP "\fB\-e\fR \fIentry\fR" 4
  13826. .IX Item "-e entry"
  13827. .PD 0
  13828. .IP "\fB\-\-entry=\fR\fIentry\fR" 4
  13829. .IX Item "--entry=entry"
  13830. .PD
  13831. Specify that the program entry point is \fIentry\fR. The argument is
  13832. interpreted by the linker; the \s-1GNU\s0 linker accepts either a symbol name
  13833. or an address.
  13834. .IP "\fB\-pie\fR" 4
  13835. .IX Item "-pie"
  13836. Produce a dynamically linked position independent executable on targets
  13837. that support it. For predictable results, you must also specify the same
  13838. set of options used for compilation (\fB\-fpie\fR, \fB\-fPIE\fR,
  13839. or model suboptions) when you specify this linker option.
  13840. .IP "\fB\-no\-pie\fR" 4
  13841. .IX Item "-no-pie"
  13842. Don't produce a dynamically linked position independent executable.
  13843. .IP "\fB\-static\-pie\fR" 4
  13844. .IX Item "-static-pie"
  13845. Produce a static position independent executable on targets that support
  13846. it. A static position independent executable is similar to a static
  13847. executable, but can be loaded at any address without a dynamic linker.
  13848. For predictable results, you must also specify the same set of options
  13849. used for compilation (\fB\-fpie\fR, \fB\-fPIE\fR, or model
  13850. suboptions) when you specify this linker option.
  13851. .IP "\fB\-pthread\fR" 4
  13852. .IX Item "-pthread"
  13853. Link with the \s-1POSIX\s0 threads library. This option is supported on
  13854. GNU/Linux targets, most other Unix derivatives, and also on
  13855. x86 Cygwin and MinGW targets. On some targets this option also sets
  13856. flags for the preprocessor, so it should be used consistently for both
  13857. compilation and linking.
  13858. .IP "\fB\-r\fR" 4
  13859. .IX Item "-r"
  13860. Produce a relocatable object as output. This is also known as partial
  13861. linking.
  13862. .IP "\fB\-rdynamic\fR" 4
  13863. .IX Item "-rdynamic"
  13864. Pass the flag \fB\-export\-dynamic\fR to the \s-1ELF\s0 linker, on targets
  13865. that support it. This instructs the linker to add all symbols, not
  13866. only used ones, to the dynamic symbol table. This option is needed
  13867. for some uses of \f(CW\*(C`dlopen\*(C'\fR or to allow obtaining backtraces
  13868. from within a program.
  13869. .IP "\fB\-s\fR" 4
  13870. .IX Item "-s"
  13871. Remove all symbol table and relocation information from the executable.
  13872. .IP "\fB\-static\fR" 4
  13873. .IX Item "-static"
  13874. On systems that support dynamic linking, this overrides \fB\-pie\fR
  13875. and prevents linking with the shared libraries. On other systems, this
  13876. option has no effect.
  13877. .IP "\fB\-shared\fR" 4
  13878. .IX Item "-shared"
  13879. Produce a shared object which can then be linked with other objects to
  13880. form an executable. Not all systems support this option. For predictable
  13881. results, you must also specify the same set of options used for compilation
  13882. (\fB\-fpic\fR, \fB\-fPIC\fR, or model suboptions) when
  13883. you specify this linker option.[1]
  13884. .IP "\fB\-shared\-libgcc\fR" 4
  13885. .IX Item "-shared-libgcc"
  13886. .PD 0
  13887. .IP "\fB\-static\-libgcc\fR" 4
  13888. .IX Item "-static-libgcc"
  13889. .PD
  13890. On systems that provide \fIlibgcc\fR as a shared library, these options
  13891. force the use of either the shared or static version, respectively.
  13892. If no shared version of \fIlibgcc\fR was built when the compiler was
  13893. configured, these options have no effect.
  13894. .Sp
  13895. There are several situations in which an application should use the
  13896. shared \fIlibgcc\fR instead of the static version. The most common
  13897. of these is when the application wishes to throw and catch exceptions
  13898. across different shared libraries. In that case, each of the libraries
  13899. as well as the application itself should use the shared \fIlibgcc\fR.
  13900. .Sp
  13901. Therefore, the G++ driver automatically adds \fB\-shared\-libgcc\fR
  13902. whenever you build a shared library or a main executable, because \*(C+
  13903. programs typically use exceptions, so this is the right thing to do.
  13904. .Sp
  13905. If, instead, you use the \s-1GCC\s0 driver to create shared libraries, you may
  13906. find that they are not always linked with the shared \fIlibgcc\fR.
  13907. If \s-1GCC\s0 finds, at its configuration time, that you have a non-GNU linker
  13908. or a \s-1GNU\s0 linker that does not support option \fB\-\-eh\-frame\-hdr\fR,
  13909. it links the shared version of \fIlibgcc\fR into shared libraries
  13910. by default. Otherwise, it takes advantage of the linker and optimizes
  13911. away the linking with the shared version of \fIlibgcc\fR, linking with
  13912. the static version of libgcc by default. This allows exceptions to
  13913. propagate through such shared libraries, without incurring relocation
  13914. costs at library load time.
  13915. .Sp
  13916. However, if a library or main executable is supposed to throw or catch
  13917. exceptions, you must link it using the G++ driver, or using the option
  13918. \&\fB\-shared\-libgcc\fR, such that it is linked with the shared
  13919. \&\fIlibgcc\fR.
  13920. .IP "\fB\-static\-libasan\fR" 4
  13921. .IX Item "-static-libasan"
  13922. When the \fB\-fsanitize=address\fR option is used to link a program,
  13923. the \s-1GCC\s0 driver automatically links against \fBlibasan\fR. If
  13924. \&\fIlibasan\fR is available as a shared library, and the \fB\-static\fR
  13925. option is not used, then this links against the shared version of
  13926. \&\fIlibasan\fR. The \fB\-static\-libasan\fR option directs the \s-1GCC\s0
  13927. driver to link \fIlibasan\fR statically, without necessarily linking
  13928. other libraries statically.
  13929. .IP "\fB\-static\-libtsan\fR" 4
  13930. .IX Item "-static-libtsan"
  13931. When the \fB\-fsanitize=thread\fR option is used to link a program,
  13932. the \s-1GCC\s0 driver automatically links against \fBlibtsan\fR. If
  13933. \&\fIlibtsan\fR is available as a shared library, and the \fB\-static\fR
  13934. option is not used, then this links against the shared version of
  13935. \&\fIlibtsan\fR. The \fB\-static\-libtsan\fR option directs the \s-1GCC\s0
  13936. driver to link \fIlibtsan\fR statically, without necessarily linking
  13937. other libraries statically.
  13938. .IP "\fB\-static\-liblsan\fR" 4
  13939. .IX Item "-static-liblsan"
  13940. When the \fB\-fsanitize=leak\fR option is used to link a program,
  13941. the \s-1GCC\s0 driver automatically links against \fBliblsan\fR. If
  13942. \&\fIliblsan\fR is available as a shared library, and the \fB\-static\fR
  13943. option is not used, then this links against the shared version of
  13944. \&\fIliblsan\fR. The \fB\-static\-liblsan\fR option directs the \s-1GCC\s0
  13945. driver to link \fIliblsan\fR statically, without necessarily linking
  13946. other libraries statically.
  13947. .IP "\fB\-static\-libubsan\fR" 4
  13948. .IX Item "-static-libubsan"
  13949. When the \fB\-fsanitize=undefined\fR option is used to link a program,
  13950. the \s-1GCC\s0 driver automatically links against \fBlibubsan\fR. If
  13951. \&\fIlibubsan\fR is available as a shared library, and the \fB\-static\fR
  13952. option is not used, then this links against the shared version of
  13953. \&\fIlibubsan\fR. The \fB\-static\-libubsan\fR option directs the \s-1GCC\s0
  13954. driver to link \fIlibubsan\fR statically, without necessarily linking
  13955. other libraries statically.
  13956. .IP "\fB\-static\-libstdc++\fR" 4
  13957. .IX Item "-static-libstdc++"
  13958. When the \fBg++\fR program is used to link a \*(C+ program, it
  13959. normally automatically links against \fBlibstdc++\fR. If
  13960. \&\fIlibstdc++\fR is available as a shared library, and the
  13961. \&\fB\-static\fR option is not used, then this links against the
  13962. shared version of \fIlibstdc++\fR. That is normally fine. However, it
  13963. is sometimes useful to freeze the version of \fIlibstdc++\fR used by
  13964. the program without going all the way to a fully static link. The
  13965. \&\fB\-static\-libstdc++\fR option directs the \fBg++\fR driver to
  13966. link \fIlibstdc++\fR statically, without necessarily linking other
  13967. libraries statically.
  13968. .IP "\fB\-symbolic\fR" 4
  13969. .IX Item "-symbolic"
  13970. Bind references to global symbols when building a shared object. Warn
  13971. about any unresolved references (unless overridden by the link editor
  13972. option \fB\-Xlinker \-z \-Xlinker defs\fR). Only a few systems support
  13973. this option.
  13974. .IP "\fB\-T\fR \fIscript\fR" 4
  13975. .IX Item "-T script"
  13976. Use \fIscript\fR as the linker script. This option is supported by most
  13977. systems using the \s-1GNU\s0 linker. On some targets, such as bare-board
  13978. targets without an operating system, the \fB\-T\fR option may be required
  13979. when linking to avoid references to undefined symbols.
  13980. .IP "\fB\-Xlinker\fR \fIoption\fR" 4
  13981. .IX Item "-Xlinker option"
  13982. Pass \fIoption\fR as an option to the linker. You can use this to
  13983. supply system-specific linker options that \s-1GCC\s0 does not recognize.
  13984. .Sp
  13985. If you want to pass an option that takes a separate argument, you must use
  13986. \&\fB\-Xlinker\fR twice, once for the option and once for the argument.
  13987. For example, to pass \fB\-assert definitions\fR, you must write
  13988. \&\fB\-Xlinker \-assert \-Xlinker definitions\fR. It does not work to write
  13989. \&\fB\-Xlinker \*(L"\-assert definitions\*(R"\fR, because this passes the entire
  13990. string as a single argument, which is not what the linker expects.
  13991. .Sp
  13992. When using the \s-1GNU\s0 linker, it is usually more convenient to pass
  13993. arguments to linker options using the \fIoption\fR\fB=\fR\fIvalue\fR
  13994. syntax than as separate arguments. For example, you can specify
  13995. \&\fB\-Xlinker \-Map=output.map\fR rather than
  13996. \&\fB\-Xlinker \-Map \-Xlinker output.map\fR. Other linkers may not support
  13997. this syntax for command-line options.
  13998. .IP "\fB\-Wl,\fR\fIoption\fR" 4
  13999. .IX Item "-Wl,option"
  14000. Pass \fIoption\fR as an option to the linker. If \fIoption\fR contains
  14001. commas, it is split into multiple options at the commas. You can use this
  14002. syntax to pass an argument to the option.
  14003. For example, \fB\-Wl,\-Map,output.map\fR passes \fB\-Map output.map\fR to the
  14004. linker. When using the \s-1GNU\s0 linker, you can also get the same effect with
  14005. \&\fB\-Wl,\-Map=output.map\fR.
  14006. .IP "\fB\-u\fR \fIsymbol\fR" 4
  14007. .IX Item "-u symbol"
  14008. Pretend the symbol \fIsymbol\fR is undefined, to force linking of
  14009. library modules to define it. You can use \fB\-u\fR multiple times with
  14010. different symbols to force loading of additional library modules.
  14011. .IP "\fB\-z\fR \fIkeyword\fR" 4
  14012. .IX Item "-z keyword"
  14013. \&\fB\-z\fR is passed directly on to the linker along with the keyword
  14014. \&\fIkeyword\fR. See the section in the documentation of your linker for
  14015. permitted values and their meanings.
  14016. .SS "Options for Directory Search"
  14017. .IX Subsection "Options for Directory Search"
  14018. These options specify directories to search for header files, for
  14019. libraries and for parts of the compiler:
  14020. .IP "\fB\-I\fR \fIdir\fR" 4
  14021. .IX Item "-I dir"
  14022. .PD 0
  14023. .IP "\fB\-iquote\fR \fIdir\fR" 4
  14024. .IX Item "-iquote dir"
  14025. .IP "\fB\-isystem\fR \fIdir\fR" 4
  14026. .IX Item "-isystem dir"
  14027. .IP "\fB\-idirafter\fR \fIdir\fR" 4
  14028. .IX Item "-idirafter dir"
  14029. .PD
  14030. Add the directory \fIdir\fR to the list of directories to be searched
  14031. for header files during preprocessing.
  14032. If \fIdir\fR begins with \fB=\fR or \f(CW$SYSROOT\fR, then the \fB=\fR
  14033. or \f(CW$SYSROOT\fR is replaced by the sysroot prefix; see
  14034. \&\fB\-\-sysroot\fR and \fB\-isysroot\fR.
  14035. .Sp
  14036. Directories specified with \fB\-iquote\fR apply only to the quote
  14037. form of the directive, \f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR.
  14038. Directories specified with \fB\-I\fR, \fB\-isystem\fR,
  14039. or \fB\-idirafter\fR apply to lookup for both the
  14040. \&\f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR and
  14041. \&\f(CW\*(C`#include\ <\f(CIfile\f(CW>\*(C'\fR directives.
  14042. .Sp
  14043. You can specify any number or combination of these options on the
  14044. command line to search for header files in several directories.
  14045. The lookup order is as follows:
  14046. .RS 4
  14047. .IP "1." 4
  14048. .IX Item "1."
  14049. For the quote form of the include directive, the directory of the current
  14050. file is searched first.
  14051. .IP "2." 4
  14052. .IX Item "2."
  14053. For the quote form of the include directive, the directories specified
  14054. by \fB\-iquote\fR options are searched in left-to-right order,
  14055. as they appear on the command line.
  14056. .IP "3." 4
  14057. .IX Item "3."
  14058. Directories specified with \fB\-I\fR options are scanned in
  14059. left-to-right order.
  14060. .IP "4." 4
  14061. .IX Item "4."
  14062. Directories specified with \fB\-isystem\fR options are scanned in
  14063. left-to-right order.
  14064. .IP "5." 4
  14065. .IX Item "5."
  14066. Standard system directories are scanned.
  14067. .IP "6." 4
  14068. .IX Item "6."
  14069. Directories specified with \fB\-idirafter\fR options are scanned in
  14070. left-to-right order.
  14071. .RE
  14072. .RS 4
  14073. .Sp
  14074. You can use \fB\-I\fR to override a system header
  14075. file, substituting your own version, since these directories are
  14076. searched before the standard system header file directories.
  14077. However, you should
  14078. not use this option to add directories that contain vendor-supplied
  14079. system header files; use \fB\-isystem\fR for that.
  14080. .Sp
  14081. The \fB\-isystem\fR and \fB\-idirafter\fR options also mark the directory
  14082. as a system directory, so that it gets the same special treatment that
  14083. is applied to the standard system directories.
  14084. .Sp
  14085. If a standard system include directory, or a directory specified with
  14086. \&\fB\-isystem\fR, is also specified with \fB\-I\fR, the \fB\-I\fR
  14087. option is ignored. The directory is still searched but as a
  14088. system directory at its normal position in the system include chain.
  14089. This is to ensure that \s-1GCC\s0's procedure to fix buggy system headers and
  14090. the ordering for the \f(CW\*(C`#include_next\*(C'\fR directive are not inadvertently
  14091. changed.
  14092. If you really need to change the search order for system directories,
  14093. use the \fB\-nostdinc\fR and/or \fB\-isystem\fR options.
  14094. .RE
  14095. .IP "\fB\-I\-\fR" 4
  14096. .IX Item "-I-"
  14097. Split the include path.
  14098. This option has been deprecated. Please use \fB\-iquote\fR instead for
  14099. \&\fB\-I\fR directories before the \fB\-I\-\fR and remove the \fB\-I\-\fR
  14100. option.
  14101. .Sp
  14102. Any directories specified with \fB\-I\fR
  14103. options before \fB\-I\-\fR are searched only for headers requested with
  14104. \&\f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR; they are not searched for
  14105. \&\f(CW\*(C`#include\ <\f(CIfile\f(CW>\*(C'\fR. If additional directories are
  14106. specified with \fB\-I\fR options after the \fB\-I\-\fR, those
  14107. directories are searched for all \fB#include\fR directives.
  14108. .Sp
  14109. In addition, \fB\-I\-\fR inhibits the use of the directory of the current
  14110. file directory as the first search directory for \f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR. There is no way to override this effect of \fB\-I\-\fR.
  14111. .IP "\fB\-iprefix\fR \fIprefix\fR" 4
  14112. .IX Item "-iprefix prefix"
  14113. Specify \fIprefix\fR as the prefix for subsequent \fB\-iwithprefix\fR
  14114. options. If the prefix represents a directory, you should include the
  14115. final \fB/\fR.
  14116. .IP "\fB\-iwithprefix\fR \fIdir\fR" 4
  14117. .IX Item "-iwithprefix dir"
  14118. .PD 0
  14119. .IP "\fB\-iwithprefixbefore\fR \fIdir\fR" 4
  14120. .IX Item "-iwithprefixbefore dir"
  14121. .PD
  14122. Append \fIdir\fR to the prefix specified previously with
  14123. \&\fB\-iprefix\fR, and add the resulting directory to the include search
  14124. path. \fB\-iwithprefixbefore\fR puts it in the same place \fB\-I\fR
  14125. would; \fB\-iwithprefix\fR puts it where \fB\-idirafter\fR would.
  14126. .IP "\fB\-isysroot\fR \fIdir\fR" 4
  14127. .IX Item "-isysroot dir"
  14128. This option is like the \fB\-\-sysroot\fR option, but applies only to
  14129. header files (except for Darwin targets, where it applies to both header
  14130. files and libraries). See the \fB\-\-sysroot\fR option for more
  14131. information.
  14132. .IP "\fB\-imultilib\fR \fIdir\fR" 4
  14133. .IX Item "-imultilib dir"
  14134. Use \fIdir\fR as a subdirectory of the directory containing
  14135. target-specific \*(C+ headers.
  14136. .IP "\fB\-nostdinc\fR" 4
  14137. .IX Item "-nostdinc"
  14138. Do not search the standard system directories for header files.
  14139. Only the directories explicitly specified with \fB\-I\fR,
  14140. \&\fB\-iquote\fR, \fB\-isystem\fR, and/or \fB\-idirafter\fR
  14141. options (and the directory of the current file, if appropriate)
  14142. are searched.
  14143. .IP "\fB\-nostdinc++\fR" 4
  14144. .IX Item "-nostdinc++"
  14145. Do not search for header files in the \*(C+\-specific standard directories,
  14146. but do still search the other standard directories. (This option is
  14147. used when building the \*(C+ library.)
  14148. .IP "\fB\-iplugindir=\fR\fIdir\fR" 4
  14149. .IX Item "-iplugindir=dir"
  14150. Set the directory to search for plugins that are passed
  14151. by \fB\-fplugin=\fR\fIname\fR instead of
  14152. \&\fB\-fplugin=\fR\fIpath\fR\fB/\fR\fIname\fR\fB.so\fR. This option is not meant
  14153. to be used by the user, but only passed by the driver.
  14154. .IP "\fB\-L\fR\fIdir\fR" 4
  14155. .IX Item "-Ldir"
  14156. Add directory \fIdir\fR to the list of directories to be searched
  14157. for \fB\-l\fR.
  14158. .IP "\fB\-B\fR\fIprefix\fR" 4
  14159. .IX Item "-Bprefix"
  14160. This option specifies where to find the executables, libraries,
  14161. include files, and data files of the compiler itself.
  14162. .Sp
  14163. The compiler driver program runs one or more of the subprograms
  14164. \&\fBcpp\fR, \fBcc1\fR, \fBas\fR and \fBld\fR. It tries
  14165. \&\fIprefix\fR as a prefix for each program it tries to run, both with and
  14166. without \fImachine\fR\fB/\fR\fIversion\fR\fB/\fR for the corresponding target
  14167. machine and compiler version.
  14168. .Sp
  14169. For each subprogram to be run, the compiler driver first tries the
  14170. \&\fB\-B\fR prefix, if any. If that name is not found, or if \fB\-B\fR
  14171. is not specified, the driver tries two standard prefixes,
  14172. \&\fI/usr/lib/gcc/\fR and \fI/usr/local/lib/gcc/\fR. If neither of
  14173. those results in a file name that is found, the unmodified program
  14174. name is searched for using the directories specified in your
  14175. \&\fB\s-1PATH\s0\fR environment variable.
  14176. .Sp
  14177. The compiler checks to see if the path provided by \fB\-B\fR
  14178. refers to a directory, and if necessary it adds a directory
  14179. separator character at the end of the path.
  14180. .Sp
  14181. \&\fB\-B\fR prefixes that effectively specify directory names also apply
  14182. to libraries in the linker, because the compiler translates these
  14183. options into \fB\-L\fR options for the linker. They also apply to
  14184. include files in the preprocessor, because the compiler translates these
  14185. options into \fB\-isystem\fR options for the preprocessor. In this case,
  14186. the compiler appends \fBinclude\fR to the prefix.
  14187. .Sp
  14188. The runtime support file \fIlibgcc.a\fR can also be searched for using
  14189. the \fB\-B\fR prefix, if needed. If it is not found there, the two
  14190. standard prefixes above are tried, and that is all. The file is left
  14191. out of the link if it is not found by those means.
  14192. .Sp
  14193. Another way to specify a prefix much like the \fB\-B\fR prefix is to use
  14194. the environment variable \fB\s-1GCC_EXEC_PREFIX\s0\fR.
  14195. .Sp
  14196. As a special kludge, if the path provided by \fB\-B\fR is
  14197. \&\fI[dir/]stage\fIN\fI/\fR, where \fIN\fR is a number in the range 0 to
  14198. 9, then it is replaced by \fI[dir/]include\fR. This is to help
  14199. with boot-strapping the compiler.
  14200. .IP "\fB\-no\-canonical\-prefixes\fR" 4
  14201. .IX Item "-no-canonical-prefixes"
  14202. Do not expand any symbolic links, resolve references to \fB/../\fR
  14203. or \fB/./\fR, or make the path absolute when generating a relative
  14204. prefix.
  14205. .IP "\fB\-\-sysroot=\fR\fIdir\fR" 4
  14206. .IX Item "--sysroot=dir"
  14207. Use \fIdir\fR as the logical root directory for headers and libraries.
  14208. For example, if the compiler normally searches for headers in
  14209. \&\fI/usr/include\fR and libraries in \fI/usr/lib\fR, it instead
  14210. searches \fI\fIdir\fI/usr/include\fR and \fI\fIdir\fI/usr/lib\fR.
  14211. .Sp
  14212. If you use both this option and the \fB\-isysroot\fR option, then
  14213. the \fB\-\-sysroot\fR option applies to libraries, but the
  14214. \&\fB\-isysroot\fR option applies to header files.
  14215. .Sp
  14216. The \s-1GNU\s0 linker (beginning with version 2.16) has the necessary support
  14217. for this option. If your linker does not support this option, the
  14218. header file aspect of \fB\-\-sysroot\fR still works, but the
  14219. library aspect does not.
  14220. .IP "\fB\-\-no\-sysroot\-suffix\fR" 4
  14221. .IX Item "--no-sysroot-suffix"
  14222. For some targets, a suffix is added to the root directory specified
  14223. with \fB\-\-sysroot\fR, depending on the other options used, so that
  14224. headers may for example be found in
  14225. \&\fI\fIdir\fI/\fIsuffix\fI/usr/include\fR instead of
  14226. \&\fI\fIdir\fI/usr/include\fR. This option disables the addition of
  14227. such a suffix.
  14228. .SS "Options for Code Generation Conventions"
  14229. .IX Subsection "Options for Code Generation Conventions"
  14230. These machine-independent options control the interface conventions
  14231. used in code generation.
  14232. .PP
  14233. Most of them have both positive and negative forms; the negative form
  14234. of \fB\-ffoo\fR is \fB\-fno\-foo\fR. In the table below, only
  14235. one of the forms is listed\-\-\-the one that is not the default. You
  14236. can figure out the other form by either removing \fBno\-\fR or adding
  14237. it.
  14238. .IP "\fB\-fstack\-reuse=\fR\fIreuse-level\fR" 4
  14239. .IX Item "-fstack-reuse=reuse-level"
  14240. This option controls stack space reuse for user declared local/auto variables
  14241. and compiler generated temporaries. \fIreuse_level\fR can be \fBall\fR,
  14242. \&\fBnamed_vars\fR, or \fBnone\fR. \fBall\fR enables stack reuse for all
  14243. local variables and temporaries, \fBnamed_vars\fR enables the reuse only for
  14244. user defined local variables with names, and \fBnone\fR disables stack reuse
  14245. completely. The default value is \fBall\fR. The option is needed when the
  14246. program extends the lifetime of a scoped local variable or a compiler generated
  14247. temporary beyond the end point defined by the language. When a lifetime of
  14248. a variable ends, and if the variable lives in memory, the optimizing compiler
  14249. has the freedom to reuse its stack space with other temporaries or scoped
  14250. local variables whose live range does not overlap with it. Legacy code extending
  14251. local lifetime is likely to break with the stack reuse optimization.
  14252. .Sp
  14253. For example,
  14254. .Sp
  14255. .Vb 3
  14256. \& int *p;
  14257. \& {
  14258. \& int local1;
  14259. \&
  14260. \& p = &local1;
  14261. \& local1 = 10;
  14262. \& ....
  14263. \& }
  14264. \& {
  14265. \& int local2;
  14266. \& local2 = 20;
  14267. \& ...
  14268. \& }
  14269. \&
  14270. \& if (*p == 10) // out of scope use of local1
  14271. \& {
  14272. \&
  14273. \& }
  14274. .Ve
  14275. .Sp
  14276. Another example:
  14277. .Sp
  14278. .Vb 6
  14279. \& struct A
  14280. \& {
  14281. \& A(int k) : i(k), j(k) { }
  14282. \& int i;
  14283. \& int j;
  14284. \& };
  14285. \&
  14286. \& A *ap;
  14287. \&
  14288. \& void foo(const A& ar)
  14289. \& {
  14290. \& ap = &ar;
  14291. \& }
  14292. \&
  14293. \& void bar()
  14294. \& {
  14295. \& foo(A(10)); // temp object\*(Aqs lifetime ends when foo returns
  14296. \&
  14297. \& {
  14298. \& A a(20);
  14299. \& ....
  14300. \& }
  14301. \& ap\->i+= 10; // ap references out of scope temp whose space
  14302. \& // is reused with a. What is the value of ap\->i?
  14303. \& }
  14304. .Ve
  14305. .Sp
  14306. The lifetime of a compiler generated temporary is well defined by the \*(C+
  14307. standard. When a lifetime of a temporary ends, and if the temporary lives
  14308. in memory, the optimizing compiler has the freedom to reuse its stack
  14309. space with other temporaries or scoped local variables whose live range
  14310. does not overlap with it. However some of the legacy code relies on
  14311. the behavior of older compilers in which temporaries' stack space is
  14312. not reused, the aggressive stack reuse can lead to runtime errors. This
  14313. option is used to control the temporary stack reuse optimization.
  14314. .IP "\fB\-ftrapv\fR" 4
  14315. .IX Item "-ftrapv"
  14316. This option generates traps for signed overflow on addition, subtraction,
  14317. multiplication operations.
  14318. The options \fB\-ftrapv\fR and \fB\-fwrapv\fR override each other, so using
  14319. \&\fB\-ftrapv\fR \fB\-fwrapv\fR on the command-line results in
  14320. \&\fB\-fwrapv\fR being effective. Note that only active options override, so
  14321. using \fB\-ftrapv\fR \fB\-fwrapv\fR \fB\-fno\-wrapv\fR on the command-line
  14322. results in \fB\-ftrapv\fR being effective.
  14323. .IP "\fB\-fwrapv\fR" 4
  14324. .IX Item "-fwrapv"
  14325. This option instructs the compiler to assume that signed arithmetic
  14326. overflow of addition, subtraction and multiplication wraps around
  14327. using twos-complement representation. This flag enables some optimizations
  14328. and disables others.
  14329. The options \fB\-ftrapv\fR and \fB\-fwrapv\fR override each other, so using
  14330. \&\fB\-ftrapv\fR \fB\-fwrapv\fR on the command-line results in
  14331. \&\fB\-fwrapv\fR being effective. Note that only active options override, so
  14332. using \fB\-ftrapv\fR \fB\-fwrapv\fR \fB\-fno\-wrapv\fR on the command-line
  14333. results in \fB\-ftrapv\fR being effective.
  14334. .IP "\fB\-fwrapv\-pointer\fR" 4
  14335. .IX Item "-fwrapv-pointer"
  14336. This option instructs the compiler to assume that pointer arithmetic
  14337. overflow on addition and subtraction wraps around using twos-complement
  14338. representation. This flag disables some optimizations which assume
  14339. pointer overflow is invalid.
  14340. .IP "\fB\-fstrict\-overflow\fR" 4
  14341. .IX Item "-fstrict-overflow"
  14342. This option implies \fB\-fno\-wrapv\fR \fB\-fno\-wrapv\-pointer\fR and when
  14343. negated implies \fB\-fwrapv\fR \fB\-fwrapv\-pointer\fR.
  14344. .IP "\fB\-fexceptions\fR" 4
  14345. .IX Item "-fexceptions"
  14346. Enable exception handling. Generates extra code needed to propagate
  14347. exceptions. For some targets, this implies \s-1GCC\s0 generates frame
  14348. unwind information for all functions, which can produce significant data
  14349. size overhead, although it does not affect execution. If you do not
  14350. specify this option, \s-1GCC\s0 enables it by default for languages like
  14351. \&\*(C+ that normally require exception handling, and disables it for
  14352. languages like C that do not normally require it. However, you may need
  14353. to enable this option when compiling C code that needs to interoperate
  14354. properly with exception handlers written in \*(C+. You may also wish to
  14355. disable this option if you are compiling older \*(C+ programs that don't
  14356. use exception handling.
  14357. .IP "\fB\-fnon\-call\-exceptions\fR" 4
  14358. .IX Item "-fnon-call-exceptions"
  14359. Generate code that allows trapping instructions to throw exceptions.
  14360. Note that this requires platform-specific runtime support that does
  14361. not exist everywhere. Moreover, it only allows \fItrapping\fR
  14362. instructions to throw exceptions, i.e. memory references or floating-point
  14363. instructions. It does not allow exceptions to be thrown from
  14364. arbitrary signal handlers such as \f(CW\*(C`SIGALRM\*(C'\fR.
  14365. .IP "\fB\-fdelete\-dead\-exceptions\fR" 4
  14366. .IX Item "-fdelete-dead-exceptions"
  14367. Consider that instructions that may throw exceptions but don't otherwise
  14368. contribute to the execution of the program can be optimized away.
  14369. This option is enabled by default for the Ada front end, as permitted by
  14370. the Ada language specification.
  14371. Optimization passes that cause dead exceptions to be removed are enabled independently at different optimization levels.
  14372. .IP "\fB\-funwind\-tables\fR" 4
  14373. .IX Item "-funwind-tables"
  14374. Similar to \fB\-fexceptions\fR, except that it just generates any needed
  14375. static data, but does not affect the generated code in any other way.
  14376. You normally do not need to enable this option; instead, a language processor
  14377. that needs this handling enables it on your behalf.
  14378. .IP "\fB\-fasynchronous\-unwind\-tables\fR" 4
  14379. .IX Item "-fasynchronous-unwind-tables"
  14380. Generate unwind table in \s-1DWARF\s0 format, if supported by target machine. The
  14381. table is exact at each instruction boundary, so it can be used for stack
  14382. unwinding from asynchronous events (such as debugger or garbage collector).
  14383. .IP "\fB\-fno\-gnu\-unique\fR" 4
  14384. .IX Item "-fno-gnu-unique"
  14385. On systems with recent \s-1GNU\s0 assembler and C library, the \*(C+ compiler
  14386. uses the \f(CW\*(C`STB_GNU_UNIQUE\*(C'\fR binding to make sure that definitions
  14387. of template static data members and static local variables in inline
  14388. functions are unique even in the presence of \f(CW\*(C`RTLD_LOCAL\*(C'\fR; this
  14389. is necessary to avoid problems with a library used by two different
  14390. \&\f(CW\*(C`RTLD_LOCAL\*(C'\fR plugins depending on a definition in one of them and
  14391. therefore disagreeing with the other one about the binding of the
  14392. symbol. But this causes \f(CW\*(C`dlclose\*(C'\fR to be ignored for affected
  14393. DSOs; if your program relies on reinitialization of a \s-1DSO\s0 via
  14394. \&\f(CW\*(C`dlclose\*(C'\fR and \f(CW\*(C`dlopen\*(C'\fR, you can use
  14395. \&\fB\-fno\-gnu\-unique\fR.
  14396. .IP "\fB\-fpcc\-struct\-return\fR" 4
  14397. .IX Item "-fpcc-struct-return"
  14398. Return \*(L"short\*(R" \f(CW\*(C`struct\*(C'\fR and \f(CW\*(C`union\*(C'\fR values in memory like
  14399. longer ones, rather than in registers. This convention is less
  14400. efficient, but it has the advantage of allowing intercallability between
  14401. GCC-compiled files and files compiled with other compilers, particularly
  14402. the Portable C Compiler (pcc).
  14403. .Sp
  14404. The precise convention for returning structures in memory depends
  14405. on the target configuration macros.
  14406. .Sp
  14407. Short structures and unions are those whose size and alignment match
  14408. that of some integer type.
  14409. .Sp
  14410. \&\fBWarning:\fR code compiled with the \fB\-fpcc\-struct\-return\fR
  14411. switch is not binary compatible with code compiled with the
  14412. \&\fB\-freg\-struct\-return\fR switch.
  14413. Use it to conform to a non-default application binary interface.
  14414. .IP "\fB\-freg\-struct\-return\fR" 4
  14415. .IX Item "-freg-struct-return"
  14416. Return \f(CW\*(C`struct\*(C'\fR and \f(CW\*(C`union\*(C'\fR values in registers when possible.
  14417. This is more efficient for small structures than
  14418. \&\fB\-fpcc\-struct\-return\fR.
  14419. .Sp
  14420. If you specify neither \fB\-fpcc\-struct\-return\fR nor
  14421. \&\fB\-freg\-struct\-return\fR, \s-1GCC\s0 defaults to whichever convention is
  14422. standard for the target. If there is no standard convention, \s-1GCC\s0
  14423. defaults to \fB\-fpcc\-struct\-return\fR, except on targets where \s-1GCC\s0 is
  14424. the principal compiler. In those cases, we can choose the standard, and
  14425. we chose the more efficient register return alternative.
  14426. .Sp
  14427. \&\fBWarning:\fR code compiled with the \fB\-freg\-struct\-return\fR
  14428. switch is not binary compatible with code compiled with the
  14429. \&\fB\-fpcc\-struct\-return\fR switch.
  14430. Use it to conform to a non-default application binary interface.
  14431. .IP "\fB\-fshort\-enums\fR" 4
  14432. .IX Item "-fshort-enums"
  14433. Allocate to an \f(CW\*(C`enum\*(C'\fR type only as many bytes as it needs for the
  14434. declared range of possible values. Specifically, the \f(CW\*(C`enum\*(C'\fR type
  14435. is equivalent to the smallest integer type that has enough room.
  14436. .Sp
  14437. \&\fBWarning:\fR the \fB\-fshort\-enums\fR switch causes \s-1GCC\s0 to generate
  14438. code that is not binary compatible with code generated without that switch.
  14439. Use it to conform to a non-default application binary interface.
  14440. .IP "\fB\-fshort\-wchar\fR" 4
  14441. .IX Item "-fshort-wchar"
  14442. Override the underlying type for \f(CW\*(C`wchar_t\*(C'\fR to be \f(CW\*(C`short
  14443. unsigned int\*(C'\fR instead of the default for the target. This option is
  14444. useful for building programs to run under \s-1WINE.\s0
  14445. .Sp
  14446. \&\fBWarning:\fR the \fB\-fshort\-wchar\fR switch causes \s-1GCC\s0 to generate
  14447. code that is not binary compatible with code generated without that switch.
  14448. Use it to conform to a non-default application binary interface.
  14449. .IP "\fB\-fcommon\fR" 4
  14450. .IX Item "-fcommon"
  14451. In C code, this option controls the placement of global variables
  14452. defined without an initializer, known as \fItentative definitions\fR
  14453. in the C standard. Tentative definitions are distinct from declarations
  14454. of a variable with the \f(CW\*(C`extern\*(C'\fR keyword, which do not allocate storage.
  14455. .Sp
  14456. The default is \fB\-fno\-common\fR, which specifies that the compiler places
  14457. uninitialized global variables in the \s-1BSS\s0 section of the object file.
  14458. This inhibits the merging of tentative definitions by the linker so you get a
  14459. multiple-definition error if the same variable is accidentally defined in more
  14460. than one compilation unit.
  14461. .Sp
  14462. The \fB\-fcommon\fR places uninitialized global variables in a common block.
  14463. This allows the linker to resolve all tentative definitions of the same variable
  14464. in different compilation units to the same object, or to a non-tentative
  14465. definition. This behavior is inconsistent with \*(C+, and on many targets implies
  14466. a speed and code size penalty on global variable references. It is mainly
  14467. useful to enable legacy code to link without errors.
  14468. .IP "\fB\-fno\-ident\fR" 4
  14469. .IX Item "-fno-ident"
  14470. Ignore the \f(CW\*(C`#ident\*(C'\fR directive.
  14471. .IP "\fB\-finhibit\-size\-directive\fR" 4
  14472. .IX Item "-finhibit-size-directive"
  14473. Don't output a \f(CW\*(C`.size\*(C'\fR assembler directive, or anything else that
  14474. would cause trouble if the function is split in the middle, and the
  14475. two halves are placed at locations far apart in memory. This option is
  14476. used when compiling \fIcrtstuff.c\fR; you should not need to use it
  14477. for anything else.
  14478. .IP "\fB\-fverbose\-asm\fR" 4
  14479. .IX Item "-fverbose-asm"
  14480. Put extra commentary information in the generated assembly code to
  14481. make it more readable. This option is generally only of use to those
  14482. who actually need to read the generated assembly code (perhaps while
  14483. debugging the compiler itself).
  14484. .Sp
  14485. \&\fB\-fno\-verbose\-asm\fR, the default, causes the
  14486. extra information to be omitted and is useful when comparing two assembler
  14487. files.
  14488. .Sp
  14489. The added comments include:
  14490. .RS 4
  14491. .IP "*" 4
  14492. information on the compiler version and command-line options,
  14493. .IP "*" 4
  14494. the source code lines associated with the assembly instructions,
  14495. in the form \s-1FILENAME:LINENUMBER:CONTENT OF LINE,\s0
  14496. .IP "*" 4
  14497. hints on which high-level expressions correspond to
  14498. the various assembly instruction operands.
  14499. .RE
  14500. .RS 4
  14501. .Sp
  14502. For example, given this C source file:
  14503. .Sp
  14504. .Vb 4
  14505. \& int test (int n)
  14506. \& {
  14507. \& int i;
  14508. \& int total = 0;
  14509. \&
  14510. \& for (i = 0; i < n; i++)
  14511. \& total += i * i;
  14512. \&
  14513. \& return total;
  14514. \& }
  14515. .Ve
  14516. .Sp
  14517. compiling to (x86_64) assembly via \fB\-S\fR and emitting the result
  14518. direct to stdout via \fB\-o\fR \fB\-\fR
  14519. .Sp
  14520. .Vb 1
  14521. \& gcc \-S test.c \-fverbose\-asm \-Os \-o \-
  14522. .Ve
  14523. .Sp
  14524. gives output similar to this:
  14525. .Sp
  14526. .Vb 5
  14527. \& .file "test.c"
  14528. \& # GNU C11 (GCC) version 7.0.0 20160809 (experimental) (x86_64\-pc\-linux\-gnu)
  14529. \& [...snip...]
  14530. \& # options passed:
  14531. \& [...snip...]
  14532. \&
  14533. \& .text
  14534. \& .globl test
  14535. \& .type test, @function
  14536. \& test:
  14537. \& .LFB0:
  14538. \& .cfi_startproc
  14539. \& # test.c:4: int total = 0;
  14540. \& xorl %eax, %eax # <retval>
  14541. \& # test.c:6: for (i = 0; i < n; i++)
  14542. \& xorl %edx, %edx # i
  14543. \& .L2:
  14544. \& # test.c:6: for (i = 0; i < n; i++)
  14545. \& cmpl %edi, %edx # n, i
  14546. \& jge .L5 #,
  14547. \& # test.c:7: total += i * i;
  14548. \& movl %edx, %ecx # i, tmp92
  14549. \& imull %edx, %ecx # i, tmp92
  14550. \& # test.c:6: for (i = 0; i < n; i++)
  14551. \& incl %edx # i
  14552. \& # test.c:7: total += i * i;
  14553. \& addl %ecx, %eax # tmp92, <retval>
  14554. \& jmp .L2 #
  14555. \& .L5:
  14556. \& # test.c:10: }
  14557. \& ret
  14558. \& .cfi_endproc
  14559. \& .LFE0:
  14560. \& .size test, .\-test
  14561. \& .ident "GCC: (GNU) 7.0.0 20160809 (experimental)"
  14562. \& .section .note.GNU\-stack,"",@progbits
  14563. .Ve
  14564. .Sp
  14565. The comments are intended for humans rather than machines and hence the
  14566. precise format of the comments is subject to change.
  14567. .RE
  14568. .IP "\fB\-frecord\-gcc\-switches\fR" 4
  14569. .IX Item "-frecord-gcc-switches"
  14570. This switch causes the command line used to invoke the
  14571. compiler to be recorded into the object file that is being created.
  14572. This switch is only implemented on some targets and the exact format
  14573. of the recording is target and binary file format dependent, but it
  14574. usually takes the form of a section containing \s-1ASCII\s0 text. This
  14575. switch is related to the \fB\-fverbose\-asm\fR switch, but that
  14576. switch only records information in the assembler output file as
  14577. comments, so it never reaches the object file.
  14578. See also \fB\-grecord\-gcc\-switches\fR for another
  14579. way of storing compiler options into the object file.
  14580. .IP "\fB\-fpic\fR" 4
  14581. .IX Item "-fpic"
  14582. Generate position-independent code (\s-1PIC\s0) suitable for use in a shared
  14583. library, if supported for the target machine. Such code accesses all
  14584. constant addresses through a global offset table (\s-1GOT\s0). The dynamic
  14585. loader resolves the \s-1GOT\s0 entries when the program starts (the dynamic
  14586. loader is not part of \s-1GCC\s0; it is part of the operating system). If
  14587. the \s-1GOT\s0 size for the linked executable exceeds a machine-specific
  14588. maximum size, you get an error message from the linker indicating that
  14589. \&\fB\-fpic\fR does not work; in that case, recompile with \fB\-fPIC\fR
  14590. instead. (These maximums are 8k on the \s-1SPARC,\s0 28k on AArch64 and 32k
  14591. on the m68k and \s-1RS/6000. \s0 The x86 has no such limit.)
  14592. .Sp
  14593. Position-independent code requires special support, and therefore works
  14594. only on certain machines. For the x86, \s-1GCC\s0 supports \s-1PIC\s0 for System V
  14595. but not for the Sun 386i. Code generated for the \s-1IBM RS/6000\s0 is always
  14596. position-independent.
  14597. .Sp
  14598. When this flag is set, the macros \f(CW\*(C`_\|_pic_\|_\*(C'\fR and \f(CW\*(C`_\|_PIC_\|_\*(C'\fR
  14599. are defined to 1.
  14600. .IP "\fB\-fPIC\fR" 4
  14601. .IX Item "-fPIC"
  14602. If supported for the target machine, emit position-independent code,
  14603. suitable for dynamic linking and avoiding any limit on the size of the
  14604. global offset table. This option makes a difference on AArch64, m68k,
  14605. PowerPC and \s-1SPARC.\s0
  14606. .Sp
  14607. Position-independent code requires special support, and therefore works
  14608. only on certain machines.
  14609. .Sp
  14610. When this flag is set, the macros \f(CW\*(C`_\|_pic_\|_\*(C'\fR and \f(CW\*(C`_\|_PIC_\|_\*(C'\fR
  14611. are defined to 2.
  14612. .IP "\fB\-fpie\fR" 4
  14613. .IX Item "-fpie"
  14614. .PD 0
  14615. .IP "\fB\-fPIE\fR" 4
  14616. .IX Item "-fPIE"
  14617. .PD
  14618. These options are similar to \fB\-fpic\fR and \fB\-fPIC\fR, but the
  14619. generated position-independent code can be only linked into executables.
  14620. Usually these options are used to compile code that will be linked using
  14621. the \fB\-pie\fR \s-1GCC\s0 option.
  14622. .Sp
  14623. \&\fB\-fpie\fR and \fB\-fPIE\fR both define the macros
  14624. \&\f(CW\*(C`_\|_pie_\|_\*(C'\fR and \f(CW\*(C`_\|_PIE_\|_\*(C'\fR. The macros have the value 1
  14625. for \fB\-fpie\fR and 2 for \fB\-fPIE\fR.
  14626. .IP "\fB\-fno\-plt\fR" 4
  14627. .IX Item "-fno-plt"
  14628. Do not use the \s-1PLT\s0 for external function calls in position-independent code.
  14629. Instead, load the callee address at call sites from the \s-1GOT\s0 and branch to it.
  14630. This leads to more efficient code by eliminating \s-1PLT\s0 stubs and exposing
  14631. \&\s-1GOT\s0 loads to optimizations. On architectures such as 32\-bit x86 where
  14632. \&\s-1PLT\s0 stubs expect the \s-1GOT\s0 pointer in a specific register, this gives more
  14633. register allocation freedom to the compiler.
  14634. Lazy binding requires use of the \s-1PLT\s0;
  14635. with \fB\-fno\-plt\fR all external symbols are resolved at load time.
  14636. .Sp
  14637. Alternatively, the function attribute \f(CW\*(C`noplt\*(C'\fR can be used to avoid calls
  14638. through the \s-1PLT\s0 for specific external functions.
  14639. .Sp
  14640. In position-dependent code, a few targets also convert calls to
  14641. functions that are marked to not use the \s-1PLT\s0 to use the \s-1GOT\s0 instead.
  14642. .IP "\fB\-fno\-jump\-tables\fR" 4
  14643. .IX Item "-fno-jump-tables"
  14644. Do not use jump tables for switch statements even where it would be
  14645. more efficient than other code generation strategies. This option is
  14646. of use in conjunction with \fB\-fpic\fR or \fB\-fPIC\fR for
  14647. building code that forms part of a dynamic linker and cannot
  14648. reference the address of a jump table. On some targets, jump tables
  14649. do not require a \s-1GOT\s0 and this option is not needed.
  14650. .IP "\fB\-ffixed\-\fR\fIreg\fR" 4
  14651. .IX Item "-ffixed-reg"
  14652. Treat the register named \fIreg\fR as a fixed register; generated code
  14653. should never refer to it (except perhaps as a stack pointer, frame
  14654. pointer or in some other fixed role).
  14655. .Sp
  14656. \&\fIreg\fR must be the name of a register. The register names accepted
  14657. are machine-specific and are defined in the \f(CW\*(C`REGISTER_NAMES\*(C'\fR
  14658. macro in the machine description macro file.
  14659. .Sp
  14660. This flag does not have a negative form, because it specifies a
  14661. three-way choice.
  14662. .IP "\fB\-fcall\-used\-\fR\fIreg\fR" 4
  14663. .IX Item "-fcall-used-reg"
  14664. Treat the register named \fIreg\fR as an allocable register that is
  14665. clobbered by function calls. It may be allocated for temporaries or
  14666. variables that do not live across a call. Functions compiled this way
  14667. do not save and restore the register \fIreg\fR.
  14668. .Sp
  14669. It is an error to use this flag with the frame pointer or stack pointer.
  14670. Use of this flag for other registers that have fixed pervasive roles in
  14671. the machine's execution model produces disastrous results.
  14672. .Sp
  14673. This flag does not have a negative form, because it specifies a
  14674. three-way choice.
  14675. .IP "\fB\-fcall\-saved\-\fR\fIreg\fR" 4
  14676. .IX Item "-fcall-saved-reg"
  14677. Treat the register named \fIreg\fR as an allocable register saved by
  14678. functions. It may be allocated even for temporaries or variables that
  14679. live across a call. Functions compiled this way save and restore
  14680. the register \fIreg\fR if they use it.
  14681. .Sp
  14682. It is an error to use this flag with the frame pointer or stack pointer.
  14683. Use of this flag for other registers that have fixed pervasive roles in
  14684. the machine's execution model produces disastrous results.
  14685. .Sp
  14686. A different sort of disaster results from the use of this flag for
  14687. a register in which function values may be returned.
  14688. .Sp
  14689. This flag does not have a negative form, because it specifies a
  14690. three-way choice.
  14691. .IP "\fB\-fpack\-struct[=\fR\fIn\fR\fB]\fR" 4
  14692. .IX Item "-fpack-struct[=n]"
  14693. Without a value specified, pack all structure members together without
  14694. holes. When a value is specified (which must be a small power of two), pack
  14695. structure members according to this value, representing the maximum
  14696. alignment (that is, objects with default alignment requirements larger than
  14697. this are output potentially unaligned at the next fitting location.
  14698. .Sp
  14699. \&\fBWarning:\fR the \fB\-fpack\-struct\fR switch causes \s-1GCC\s0 to generate
  14700. code that is not binary compatible with code generated without that switch.
  14701. Additionally, it makes the code suboptimal.
  14702. Use it to conform to a non-default application binary interface.
  14703. .IP "\fB\-fleading\-underscore\fR" 4
  14704. .IX Item "-fleading-underscore"
  14705. This option and its counterpart, \fB\-fno\-leading\-underscore\fR, forcibly
  14706. change the way C symbols are represented in the object file. One use
  14707. is to help link with legacy assembly code.
  14708. .Sp
  14709. \&\fBWarning:\fR the \fB\-fleading\-underscore\fR switch causes \s-1GCC\s0 to
  14710. generate code that is not binary compatible with code generated without that
  14711. switch. Use it to conform to a non-default application binary interface.
  14712. Not all targets provide complete support for this switch.
  14713. .IP "\fB\-ftls\-model=\fR\fImodel\fR" 4
  14714. .IX Item "-ftls-model=model"
  14715. Alter the thread-local storage model to be used.
  14716. The \fImodel\fR argument should be one of \fBglobal-dynamic\fR,
  14717. \&\fBlocal-dynamic\fR, \fBinitial-exec\fR or \fBlocal-exec\fR.
  14718. Note that the choice is subject to optimization: the compiler may use
  14719. a more efficient model for symbols not visible outside of the translation
  14720. unit, or if \fB\-fpic\fR is not given on the command line.
  14721. .Sp
  14722. The default without \fB\-fpic\fR is \fBinitial-exec\fR; with
  14723. \&\fB\-fpic\fR the default is \fBglobal-dynamic\fR.
  14724. .IP "\fB\-ftrampolines\fR" 4
  14725. .IX Item "-ftrampolines"
  14726. For targets that normally need trampolines for nested functions, always
  14727. generate them instead of using descriptors. Otherwise, for targets that
  14728. do not need them, like for example HP-PA or \s-1IA\-64,\s0 do nothing.
  14729. .Sp
  14730. A trampoline is a small piece of code that is created at run time on the
  14731. stack when the address of a nested function is taken, and is used to call
  14732. the nested function indirectly. Therefore, it requires the stack to be
  14733. made executable in order for the program to work properly.
  14734. .Sp
  14735. \&\fB\-fno\-trampolines\fR is enabled by default on a language by language
  14736. basis to let the compiler avoid generating them, if it computes that this
  14737. is safe, and replace them with descriptors. Descriptors are made up of data
  14738. only, but the generated code must be prepared to deal with them. As of this
  14739. writing, \fB\-fno\-trampolines\fR is enabled by default only for Ada.
  14740. .Sp
  14741. Moreover, code compiled with \fB\-ftrampolines\fR and code compiled with
  14742. \&\fB\-fno\-trampolines\fR are not binary compatible if nested functions are
  14743. present. This option must therefore be used on a program-wide basis and be
  14744. manipulated with extreme care.
  14745. .IP "\fB\-fvisibility=\fR[\fBdefault\fR|\fBinternal\fR|\fBhidden\fR|\fBprotected\fR]" 4
  14746. .IX Item "-fvisibility=[default|internal|hidden|protected]"
  14747. Set the default \s-1ELF\s0 image symbol visibility to the specified option\-\-\-all
  14748. symbols are marked with this unless overridden within the code.
  14749. Using this feature can very substantially improve linking and
  14750. load times of shared object libraries, produce more optimized
  14751. code, provide near-perfect \s-1API\s0 export and prevent symbol clashes.
  14752. It is \fBstrongly\fR recommended that you use this in any shared objects
  14753. you distribute.
  14754. .Sp
  14755. Despite the nomenclature, \fBdefault\fR always means public; i.e.,
  14756. available to be linked against from outside the shared object.
  14757. \&\fBprotected\fR and \fBinternal\fR are pretty useless in real-world
  14758. usage so the only other commonly used option is \fBhidden\fR.
  14759. The default if \fB\-fvisibility\fR isn't specified is
  14760. \&\fBdefault\fR, i.e., make every symbol public.
  14761. .Sp
  14762. A good explanation of the benefits offered by ensuring \s-1ELF\s0
  14763. symbols have the correct visibility is given by \*(L"How To Write
  14764. Shared Libraries\*(R" by Ulrich Drepper (which can be found at
  14765. <\fBhttps://www.akkadia.org/drepper/\fR>)\-\-\-however a superior
  14766. solution made possible by this option to marking things hidden when
  14767. the default is public is to make the default hidden and mark things
  14768. public. This is the norm with DLLs on Windows and with \fB\-fvisibility=hidden\fR
  14769. and \f(CW\*(C`_\|_attribute_\|_ ((visibility("default")))\*(C'\fR instead of
  14770. \&\f(CW\*(C`_\|_declspec(dllexport)\*(C'\fR you get almost identical semantics with
  14771. identical syntax. This is a great boon to those working with
  14772. cross-platform projects.
  14773. .Sp
  14774. For those adding visibility support to existing code, you may find
  14775. \&\f(CW\*(C`#pragma GCC visibility\*(C'\fR of use. This works by you enclosing
  14776. the declarations you wish to set visibility for with (for example)
  14777. \&\f(CW\*(C`#pragma GCC visibility push(hidden)\*(C'\fR and
  14778. \&\f(CW\*(C`#pragma GCC visibility pop\*(C'\fR.
  14779. Bear in mind that symbol visibility should be viewed \fBas
  14780. part of the \s-1API\s0 interface contract\fR and thus all new code should
  14781. always specify visibility when it is not the default; i.e., declarations
  14782. only for use within the local \s-1DSO\s0 should \fBalways\fR be marked explicitly
  14783. as hidden as so to avoid \s-1PLT\s0 indirection overheads\-\-\-making this
  14784. abundantly clear also aids readability and self-documentation of the code.
  14785. Note that due to \s-1ISO \*(C+\s0 specification requirements, \f(CW\*(C`operator new\*(C'\fR and
  14786. \&\f(CW\*(C`operator delete\*(C'\fR must always be of default visibility.
  14787. .Sp
  14788. Be aware that headers from outside your project, in particular system
  14789. headers and headers from any other library you use, may not be
  14790. expecting to be compiled with visibility other than the default. You
  14791. may need to explicitly say \f(CW\*(C`#pragma GCC visibility push(default)\*(C'\fR
  14792. before including any such headers.
  14793. .Sp
  14794. \&\f(CW\*(C`extern\*(C'\fR declarations are not affected by \fB\-fvisibility\fR, so
  14795. a lot of code can be recompiled with \fB\-fvisibility=hidden\fR with
  14796. no modifications. However, this means that calls to \f(CW\*(C`extern\*(C'\fR
  14797. functions with no explicit visibility use the \s-1PLT,\s0 so it is more
  14798. effective to use \f(CW\*(C`_\|_attribute ((visibility))\*(C'\fR and/or
  14799. \&\f(CW\*(C`#pragma GCC visibility\*(C'\fR to tell the compiler which \f(CW\*(C`extern\*(C'\fR
  14800. declarations should be treated as hidden.
  14801. .Sp
  14802. Note that \fB\-fvisibility\fR does affect \*(C+ vague linkage
  14803. entities. This means that, for instance, an exception class that is
  14804. be thrown between DSOs must be explicitly marked with default
  14805. visibility so that the \fBtype_info\fR nodes are unified between
  14806. the DSOs.
  14807. .Sp
  14808. An overview of these techniques, their benefits and how to use them
  14809. is at <\fBhttp://gcc.gnu.org/wiki/Visibility\fR>.
  14810. .IP "\fB\-fstrict\-volatile\-bitfields\fR" 4
  14811. .IX Item "-fstrict-volatile-bitfields"
  14812. This option should be used if accesses to volatile bit-fields (or other
  14813. structure fields, although the compiler usually honors those types
  14814. anyway) should use a single access of the width of the
  14815. field's type, aligned to a natural alignment if possible. For
  14816. example, targets with memory-mapped peripheral registers might require
  14817. all such accesses to be 16 bits wide; with this flag you can
  14818. declare all peripheral bit-fields as \f(CW\*(C`unsigned short\*(C'\fR (assuming short
  14819. is 16 bits on these targets) to force \s-1GCC\s0 to use 16\-bit accesses
  14820. instead of, perhaps, a more efficient 32\-bit access.
  14821. .Sp
  14822. If this option is disabled, the compiler uses the most efficient
  14823. instruction. In the previous example, that might be a 32\-bit load
  14824. instruction, even though that accesses bytes that do not contain
  14825. any portion of the bit-field, or memory-mapped registers unrelated to
  14826. the one being updated.
  14827. .Sp
  14828. In some cases, such as when the \f(CW\*(C`packed\*(C'\fR attribute is applied to a
  14829. structure field, it may not be possible to access the field with a single
  14830. read or write that is correctly aligned for the target machine. In this
  14831. case \s-1GCC\s0 falls back to generating multiple accesses rather than code that
  14832. will fault or truncate the result at run time.
  14833. .Sp
  14834. Note: Due to restrictions of the C/\*(C+11 memory model, write accesses are
  14835. not allowed to touch non bit-field members. It is therefore recommended
  14836. to define all bits of the field's type as bit-field members.
  14837. .Sp
  14838. The default value of this option is determined by the application binary
  14839. interface for the target processor.
  14840. .IP "\fB\-fsync\-libcalls\fR" 4
  14841. .IX Item "-fsync-libcalls"
  14842. This option controls whether any out-of-line instance of the \f(CW\*(C`_\|_sync\*(C'\fR
  14843. family of functions may be used to implement the \*(C+11 \f(CW\*(C`_\|_atomic\*(C'\fR
  14844. family of functions.
  14845. .Sp
  14846. The default value of this option is enabled, thus the only useful form
  14847. of the option is \fB\-fno\-sync\-libcalls\fR. This option is used in
  14848. the implementation of the \fIlibatomic\fR runtime library.
  14849. .SS "\s-1GCC\s0 Developer Options"
  14850. .IX Subsection "GCC Developer Options"
  14851. This section describes command-line options that are primarily of
  14852. interest to \s-1GCC\s0 developers, including options to support compiler
  14853. testing and investigation of compiler bugs and compile-time
  14854. performance problems. This includes options that produce debug dumps
  14855. at various points in the compilation; that print statistics such as
  14856. memory use and execution time; and that print information about \s-1GCC\s0's
  14857. configuration, such as where it searches for libraries. You should
  14858. rarely need to use any of these options for ordinary compilation and
  14859. linking tasks.
  14860. .PP
  14861. Many developer options that cause \s-1GCC\s0 to dump output to a file take an
  14862. optional \fB=\fR\fIfilename\fR suffix. You can specify \fBstdout\fR
  14863. or \fB\-\fR to dump to standard output, and \fBstderr\fR for standard
  14864. error.
  14865. .PP
  14866. If \fB=\fR\fIfilename\fR is omitted, a default dump file name is
  14867. constructed by concatenating the base dump file name, a pass number,
  14868. phase letter, and pass name. The base dump file name is the name of
  14869. output file produced by the compiler if explicitly specified and not
  14870. an executable; otherwise it is the source file name.
  14871. The pass number is determined by the order passes are registered with
  14872. the compiler's pass manager.
  14873. This is generally the same as the order of execution, but passes
  14874. registered by plugins, target-specific passes, or passes that are
  14875. otherwise registered late are numbered higher than the pass named
  14876. \&\fBfinal\fR, even if they are executed earlier. The phase letter is
  14877. one of \fBi\fR (inter-procedural analysis), \fBl\fR
  14878. (language-specific), \fBr\fR (\s-1RTL\s0), or \fBt\fR (tree).
  14879. The files are created in the directory of the output file.
  14880. .IP "\fB\-fcallgraph\-info\fR" 4
  14881. .IX Item "-fcallgraph-info"
  14882. .PD 0
  14883. .IP "\fB\-fcallgraph\-info=\fR\fI\s-1MARKERS\s0\fR" 4
  14884. .IX Item "-fcallgraph-info=MARKERS"
  14885. .PD
  14886. Makes the compiler output callgraph information for the program, on a
  14887. per-object-file basis. The information is generated in the common \s-1VCG\s0
  14888. format. It can be decorated with additional, per-node and/or per-edge
  14889. information, if a list of comma-separated markers is additionally
  14890. specified. When the \f(CW\*(C`su\*(C'\fR marker is specified, the callgraph is
  14891. decorated with stack usage information; it is equivalent to
  14892. \&\fB\-fstack\-usage\fR. When the \f(CW\*(C`da\*(C'\fR marker is specified, the
  14893. callgraph is decorated with information about dynamically allocated
  14894. objects.
  14895. .Sp
  14896. When compiling with \fB\-flto\fR, no callgraph information is output
  14897. along with the object file. At \s-1LTO\s0 link time, \fB\-fcallgraph\-info\fR
  14898. may generate multiple callgraph information files next to intermediate
  14899. \&\s-1LTO\s0 output files.
  14900. .IP "\fB\-d\fR\fIletters\fR" 4
  14901. .IX Item "-dletters"
  14902. .PD 0
  14903. .IP "\fB\-fdump\-rtl\-\fR\fIpass\fR" 4
  14904. .IX Item "-fdump-rtl-pass"
  14905. .IP "\fB\-fdump\-rtl\-\fR\fIpass\fR\fB=\fR\fIfilename\fR" 4
  14906. .IX Item "-fdump-rtl-pass=filename"
  14907. .PD
  14908. Says to make debugging dumps during compilation at times specified by
  14909. \&\fIletters\fR. This is used for debugging the RTL-based passes of the
  14910. compiler.
  14911. .Sp
  14912. Some \fB\-d\fR\fIletters\fR switches have different meaning when
  14913. \&\fB\-E\fR is used for preprocessing.
  14914. .Sp
  14915. Debug dumps can be enabled with a \fB\-fdump\-rtl\fR switch or some
  14916. \&\fB\-d\fR option \fIletters\fR. Here are the possible
  14917. letters for use in \fIpass\fR and \fIletters\fR, and their meanings:
  14918. .RS 4
  14919. .IP "\fB\-fdump\-rtl\-alignments\fR" 4
  14920. .IX Item "-fdump-rtl-alignments"
  14921. Dump after branch alignments have been computed.
  14922. .IP "\fB\-fdump\-rtl\-asmcons\fR" 4
  14923. .IX Item "-fdump-rtl-asmcons"
  14924. Dump after fixing rtl statements that have unsatisfied in/out constraints.
  14925. .IP "\fB\-fdump\-rtl\-auto_inc_dec\fR" 4
  14926. .IX Item "-fdump-rtl-auto_inc_dec"
  14927. Dump after auto-inc-dec discovery. This pass is only run on
  14928. architectures that have auto inc or auto dec instructions.
  14929. .IP "\fB\-fdump\-rtl\-barriers\fR" 4
  14930. .IX Item "-fdump-rtl-barriers"
  14931. Dump after cleaning up the barrier instructions.
  14932. .IP "\fB\-fdump\-rtl\-bbpart\fR" 4
  14933. .IX Item "-fdump-rtl-bbpart"
  14934. Dump after partitioning hot and cold basic blocks.
  14935. .IP "\fB\-fdump\-rtl\-bbro\fR" 4
  14936. .IX Item "-fdump-rtl-bbro"
  14937. Dump after block reordering.
  14938. .IP "\fB\-fdump\-rtl\-btl1\fR" 4
  14939. .IX Item "-fdump-rtl-btl1"
  14940. .PD 0
  14941. .IP "\fB\-fdump\-rtl\-btl2\fR" 4
  14942. .IX Item "-fdump-rtl-btl2"
  14943. .PD
  14944. \&\fB\-fdump\-rtl\-btl1\fR and \fB\-fdump\-rtl\-btl2\fR enable dumping
  14945. after the two branch
  14946. target load optimization passes.
  14947. .IP "\fB\-fdump\-rtl\-bypass\fR" 4
  14948. .IX Item "-fdump-rtl-bypass"
  14949. Dump after jump bypassing and control flow optimizations.
  14950. .IP "\fB\-fdump\-rtl\-combine\fR" 4
  14951. .IX Item "-fdump-rtl-combine"
  14952. Dump after the \s-1RTL\s0 instruction combination pass.
  14953. .IP "\fB\-fdump\-rtl\-compgotos\fR" 4
  14954. .IX Item "-fdump-rtl-compgotos"
  14955. Dump after duplicating the computed gotos.
  14956. .IP "\fB\-fdump\-rtl\-ce1\fR" 4
  14957. .IX Item "-fdump-rtl-ce1"
  14958. .PD 0
  14959. .IP "\fB\-fdump\-rtl\-ce2\fR" 4
  14960. .IX Item "-fdump-rtl-ce2"
  14961. .IP "\fB\-fdump\-rtl\-ce3\fR" 4
  14962. .IX Item "-fdump-rtl-ce3"
  14963. .PD
  14964. \&\fB\-fdump\-rtl\-ce1\fR, \fB\-fdump\-rtl\-ce2\fR, and
  14965. \&\fB\-fdump\-rtl\-ce3\fR enable dumping after the three
  14966. if conversion passes.
  14967. .IP "\fB\-fdump\-rtl\-cprop_hardreg\fR" 4
  14968. .IX Item "-fdump-rtl-cprop_hardreg"
  14969. Dump after hard register copy propagation.
  14970. .IP "\fB\-fdump\-rtl\-csa\fR" 4
  14971. .IX Item "-fdump-rtl-csa"
  14972. Dump after combining stack adjustments.
  14973. .IP "\fB\-fdump\-rtl\-cse1\fR" 4
  14974. .IX Item "-fdump-rtl-cse1"
  14975. .PD 0
  14976. .IP "\fB\-fdump\-rtl\-cse2\fR" 4
  14977. .IX Item "-fdump-rtl-cse2"
  14978. .PD
  14979. \&\fB\-fdump\-rtl\-cse1\fR and \fB\-fdump\-rtl\-cse2\fR enable dumping after
  14980. the two common subexpression elimination passes.
  14981. .IP "\fB\-fdump\-rtl\-dce\fR" 4
  14982. .IX Item "-fdump-rtl-dce"
  14983. Dump after the standalone dead code elimination passes.
  14984. .IP "\fB\-fdump\-rtl\-dbr\fR" 4
  14985. .IX Item "-fdump-rtl-dbr"
  14986. Dump after delayed branch scheduling.
  14987. .IP "\fB\-fdump\-rtl\-dce1\fR" 4
  14988. .IX Item "-fdump-rtl-dce1"
  14989. .PD 0
  14990. .IP "\fB\-fdump\-rtl\-dce2\fR" 4
  14991. .IX Item "-fdump-rtl-dce2"
  14992. .PD
  14993. \&\fB\-fdump\-rtl\-dce1\fR and \fB\-fdump\-rtl\-dce2\fR enable dumping after
  14994. the two dead store elimination passes.
  14995. .IP "\fB\-fdump\-rtl\-eh\fR" 4
  14996. .IX Item "-fdump-rtl-eh"
  14997. Dump after finalization of \s-1EH\s0 handling code.
  14998. .IP "\fB\-fdump\-rtl\-eh_ranges\fR" 4
  14999. .IX Item "-fdump-rtl-eh_ranges"
  15000. Dump after conversion of \s-1EH\s0 handling range regions.
  15001. .IP "\fB\-fdump\-rtl\-expand\fR" 4
  15002. .IX Item "-fdump-rtl-expand"
  15003. Dump after \s-1RTL\s0 generation.
  15004. .IP "\fB\-fdump\-rtl\-fwprop1\fR" 4
  15005. .IX Item "-fdump-rtl-fwprop1"
  15006. .PD 0
  15007. .IP "\fB\-fdump\-rtl\-fwprop2\fR" 4
  15008. .IX Item "-fdump-rtl-fwprop2"
  15009. .PD
  15010. \&\fB\-fdump\-rtl\-fwprop1\fR and \fB\-fdump\-rtl\-fwprop2\fR enable
  15011. dumping after the two forward propagation passes.
  15012. .IP "\fB\-fdump\-rtl\-gcse1\fR" 4
  15013. .IX Item "-fdump-rtl-gcse1"
  15014. .PD 0
  15015. .IP "\fB\-fdump\-rtl\-gcse2\fR" 4
  15016. .IX Item "-fdump-rtl-gcse2"
  15017. .PD
  15018. \&\fB\-fdump\-rtl\-gcse1\fR and \fB\-fdump\-rtl\-gcse2\fR enable dumping
  15019. after global common subexpression elimination.
  15020. .IP "\fB\-fdump\-rtl\-init\-regs\fR" 4
  15021. .IX Item "-fdump-rtl-init-regs"
  15022. Dump after the initialization of the registers.
  15023. .IP "\fB\-fdump\-rtl\-initvals\fR" 4
  15024. .IX Item "-fdump-rtl-initvals"
  15025. Dump after the computation of the initial value sets.
  15026. .IP "\fB\-fdump\-rtl\-into_cfglayout\fR" 4
  15027. .IX Item "-fdump-rtl-into_cfglayout"
  15028. Dump after converting to cfglayout mode.
  15029. .IP "\fB\-fdump\-rtl\-ira\fR" 4
  15030. .IX Item "-fdump-rtl-ira"
  15031. Dump after iterated register allocation.
  15032. .IP "\fB\-fdump\-rtl\-jump\fR" 4
  15033. .IX Item "-fdump-rtl-jump"
  15034. Dump after the second jump optimization.
  15035. .IP "\fB\-fdump\-rtl\-loop2\fR" 4
  15036. .IX Item "-fdump-rtl-loop2"
  15037. \&\fB\-fdump\-rtl\-loop2\fR enables dumping after the rtl
  15038. loop optimization passes.
  15039. .IP "\fB\-fdump\-rtl\-mach\fR" 4
  15040. .IX Item "-fdump-rtl-mach"
  15041. Dump after performing the machine dependent reorganization pass, if that
  15042. pass exists.
  15043. .IP "\fB\-fdump\-rtl\-mode_sw\fR" 4
  15044. .IX Item "-fdump-rtl-mode_sw"
  15045. Dump after removing redundant mode switches.
  15046. .IP "\fB\-fdump\-rtl\-rnreg\fR" 4
  15047. .IX Item "-fdump-rtl-rnreg"
  15048. Dump after register renumbering.
  15049. .IP "\fB\-fdump\-rtl\-outof_cfglayout\fR" 4
  15050. .IX Item "-fdump-rtl-outof_cfglayout"
  15051. Dump after converting from cfglayout mode.
  15052. .IP "\fB\-fdump\-rtl\-peephole2\fR" 4
  15053. .IX Item "-fdump-rtl-peephole2"
  15054. Dump after the peephole pass.
  15055. .IP "\fB\-fdump\-rtl\-postreload\fR" 4
  15056. .IX Item "-fdump-rtl-postreload"
  15057. Dump after post-reload optimizations.
  15058. .IP "\fB\-fdump\-rtl\-pro_and_epilogue\fR" 4
  15059. .IX Item "-fdump-rtl-pro_and_epilogue"
  15060. Dump after generating the function prologues and epilogues.
  15061. .IP "\fB\-fdump\-rtl\-sched1\fR" 4
  15062. .IX Item "-fdump-rtl-sched1"
  15063. .PD 0
  15064. .IP "\fB\-fdump\-rtl\-sched2\fR" 4
  15065. .IX Item "-fdump-rtl-sched2"
  15066. .PD
  15067. \&\fB\-fdump\-rtl\-sched1\fR and \fB\-fdump\-rtl\-sched2\fR enable dumping
  15068. after the basic block scheduling passes.
  15069. .IP "\fB\-fdump\-rtl\-ree\fR" 4
  15070. .IX Item "-fdump-rtl-ree"
  15071. Dump after sign/zero extension elimination.
  15072. .IP "\fB\-fdump\-rtl\-seqabstr\fR" 4
  15073. .IX Item "-fdump-rtl-seqabstr"
  15074. Dump after common sequence discovery.
  15075. .IP "\fB\-fdump\-rtl\-shorten\fR" 4
  15076. .IX Item "-fdump-rtl-shorten"
  15077. Dump after shortening branches.
  15078. .IP "\fB\-fdump\-rtl\-sibling\fR" 4
  15079. .IX Item "-fdump-rtl-sibling"
  15080. Dump after sibling call optimizations.
  15081. .IP "\fB\-fdump\-rtl\-split1\fR" 4
  15082. .IX Item "-fdump-rtl-split1"
  15083. .PD 0
  15084. .IP "\fB\-fdump\-rtl\-split2\fR" 4
  15085. .IX Item "-fdump-rtl-split2"
  15086. .IP "\fB\-fdump\-rtl\-split3\fR" 4
  15087. .IX Item "-fdump-rtl-split3"
  15088. .IP "\fB\-fdump\-rtl\-split4\fR" 4
  15089. .IX Item "-fdump-rtl-split4"
  15090. .IP "\fB\-fdump\-rtl\-split5\fR" 4
  15091. .IX Item "-fdump-rtl-split5"
  15092. .PD
  15093. These options enable dumping after five rounds of
  15094. instruction splitting.
  15095. .IP "\fB\-fdump\-rtl\-sms\fR" 4
  15096. .IX Item "-fdump-rtl-sms"
  15097. Dump after modulo scheduling. This pass is only run on some
  15098. architectures.
  15099. .IP "\fB\-fdump\-rtl\-stack\fR" 4
  15100. .IX Item "-fdump-rtl-stack"
  15101. Dump after conversion from \s-1GCC\s0's \*(L"flat register file\*(R" registers to the
  15102. x87's stack-like registers. This pass is only run on x86 variants.
  15103. .IP "\fB\-fdump\-rtl\-subreg1\fR" 4
  15104. .IX Item "-fdump-rtl-subreg1"
  15105. .PD 0
  15106. .IP "\fB\-fdump\-rtl\-subreg2\fR" 4
  15107. .IX Item "-fdump-rtl-subreg2"
  15108. .PD
  15109. \&\fB\-fdump\-rtl\-subreg1\fR and \fB\-fdump\-rtl\-subreg2\fR enable dumping after
  15110. the two subreg expansion passes.
  15111. .IP "\fB\-fdump\-rtl\-unshare\fR" 4
  15112. .IX Item "-fdump-rtl-unshare"
  15113. Dump after all rtl has been unshared.
  15114. .IP "\fB\-fdump\-rtl\-vartrack\fR" 4
  15115. .IX Item "-fdump-rtl-vartrack"
  15116. Dump after variable tracking.
  15117. .IP "\fB\-fdump\-rtl\-vregs\fR" 4
  15118. .IX Item "-fdump-rtl-vregs"
  15119. Dump after converting virtual registers to hard registers.
  15120. .IP "\fB\-fdump\-rtl\-web\fR" 4
  15121. .IX Item "-fdump-rtl-web"
  15122. Dump after live range splitting.
  15123. .IP "\fB\-fdump\-rtl\-regclass\fR" 4
  15124. .IX Item "-fdump-rtl-regclass"
  15125. .PD 0
  15126. .IP "\fB\-fdump\-rtl\-subregs_of_mode_init\fR" 4
  15127. .IX Item "-fdump-rtl-subregs_of_mode_init"
  15128. .IP "\fB\-fdump\-rtl\-subregs_of_mode_finish\fR" 4
  15129. .IX Item "-fdump-rtl-subregs_of_mode_finish"
  15130. .IP "\fB\-fdump\-rtl\-dfinit\fR" 4
  15131. .IX Item "-fdump-rtl-dfinit"
  15132. .IP "\fB\-fdump\-rtl\-dfinish\fR" 4
  15133. .IX Item "-fdump-rtl-dfinish"
  15134. .PD
  15135. These dumps are defined but always produce empty files.
  15136. .IP "\fB\-da\fR" 4
  15137. .IX Item "-da"
  15138. .PD 0
  15139. .IP "\fB\-fdump\-rtl\-all\fR" 4
  15140. .IX Item "-fdump-rtl-all"
  15141. .PD
  15142. Produce all the dumps listed above.
  15143. .IP "\fB\-dA\fR" 4
  15144. .IX Item "-dA"
  15145. Annotate the assembler output with miscellaneous debugging information.
  15146. .IP "\fB\-dD\fR" 4
  15147. .IX Item "-dD"
  15148. Dump all macro definitions, at the end of preprocessing, in addition to
  15149. normal output.
  15150. .IP "\fB\-dH\fR" 4
  15151. .IX Item "-dH"
  15152. Produce a core dump whenever an error occurs.
  15153. .IP "\fB\-dp\fR" 4
  15154. .IX Item "-dp"
  15155. Annotate the assembler output with a comment indicating which
  15156. pattern and alternative is used. The length and cost of each instruction are
  15157. also printed.
  15158. .IP "\fB\-dP\fR" 4
  15159. .IX Item "-dP"
  15160. Dump the \s-1RTL\s0 in the assembler output as a comment before each instruction.
  15161. Also turns on \fB\-dp\fR annotation.
  15162. .IP "\fB\-dx\fR" 4
  15163. .IX Item "-dx"
  15164. Just generate \s-1RTL\s0 for a function instead of compiling it. Usually used
  15165. with \fB\-fdump\-rtl\-expand\fR.
  15166. .RE
  15167. .RS 4
  15168. .RE
  15169. .IP "\fB\-fdump\-debug\fR" 4
  15170. .IX Item "-fdump-debug"
  15171. Dump debugging information generated during the debug
  15172. generation phase.
  15173. .IP "\fB\-fdump\-earlydebug\fR" 4
  15174. .IX Item "-fdump-earlydebug"
  15175. Dump debugging information generated during the early debug
  15176. generation phase.
  15177. .IP "\fB\-fdump\-noaddr\fR" 4
  15178. .IX Item "-fdump-noaddr"
  15179. When doing debugging dumps, suppress address output. This makes it more
  15180. feasible to use diff on debugging dumps for compiler invocations with
  15181. different compiler binaries and/or different
  15182. text / bss / data / heap / stack / dso start locations.
  15183. .IP "\fB\-freport\-bug\fR" 4
  15184. .IX Item "-freport-bug"
  15185. Collect and dump debug information into a temporary file if an
  15186. internal compiler error (\s-1ICE\s0) occurs.
  15187. .IP "\fB\-fdump\-unnumbered\fR" 4
  15188. .IX Item "-fdump-unnumbered"
  15189. When doing debugging dumps, suppress instruction numbers and address output.
  15190. This makes it more feasible to use diff on debugging dumps for compiler
  15191. invocations with different options, in particular with and without
  15192. \&\fB\-g\fR.
  15193. .IP "\fB\-fdump\-unnumbered\-links\fR" 4
  15194. .IX Item "-fdump-unnumbered-links"
  15195. When doing debugging dumps (see \fB\-d\fR option above), suppress
  15196. instruction numbers for the links to the previous and next instructions
  15197. in a sequence.
  15198. .IP "\fB\-fdump\-ipa\-\fR\fIswitch\fR" 4
  15199. .IX Item "-fdump-ipa-switch"
  15200. .PD 0
  15201. .IP "\fB\-fdump\-ipa\-\fR\fIswitch\fR\fB\-\fR\fIoptions\fR" 4
  15202. .IX Item "-fdump-ipa-switch-options"
  15203. .PD
  15204. Control the dumping at various stages of inter-procedural analysis
  15205. language tree to a file. The file name is generated by appending a
  15206. switch specific suffix to the source file name, and the file is created
  15207. in the same directory as the output file. The following dumps are
  15208. possible:
  15209. .RS 4
  15210. .IP "\fBall\fR" 4
  15211. .IX Item "all"
  15212. Enables all inter-procedural analysis dumps.
  15213. .IP "\fBcgraph\fR" 4
  15214. .IX Item "cgraph"
  15215. Dumps information about call-graph optimization, unused function removal,
  15216. and inlining decisions.
  15217. .IP "\fBinline\fR" 4
  15218. .IX Item "inline"
  15219. Dump after function inlining.
  15220. .RE
  15221. .RS 4
  15222. .Sp
  15223. Additionally, the options \fB\-optimized\fR, \fB\-missed\fR,
  15224. \&\fB\-note\fR, and \fB\-all\fR can be provided, with the same meaning
  15225. as for \fB\-fopt\-info\fR, defaulting to \fB\-optimized\fR.
  15226. .Sp
  15227. For example, \fB\-fdump\-ipa\-inline\-optimized\-missed\fR will emit
  15228. information on callsites that were inlined, along with callsites
  15229. that were not inlined.
  15230. .Sp
  15231. By default, the dump will contain messages about successful
  15232. optimizations (equivalent to \fB\-optimized\fR) together with
  15233. low-level details about the analysis.
  15234. .RE
  15235. .IP "\fB\-fdump\-lang\-all\fR" 4
  15236. .IX Item "-fdump-lang-all"
  15237. .PD 0
  15238. .IP "\fB\-fdump\-lang\-\fR\fIswitch\fR" 4
  15239. .IX Item "-fdump-lang-switch"
  15240. .IP "\fB\-fdump\-lang\-\fR\fIswitch\fR\fB\-\fR\fIoptions\fR" 4
  15241. .IX Item "-fdump-lang-switch-options"
  15242. .IP "\fB\-fdump\-lang\-\fR\fIswitch\fR\fB\-\fR\fIoptions\fR\fB=\fR\fIfilename\fR" 4
  15243. .IX Item "-fdump-lang-switch-options=filename"
  15244. .PD
  15245. Control the dumping of language-specific information. The \fIoptions\fR
  15246. and \fIfilename\fR portions behave as described in the
  15247. \&\fB\-fdump\-tree\fR option. The following \fIswitch\fR values are
  15248. accepted:
  15249. .RS 4
  15250. .IP "\fBall\fR" 4
  15251. .IX Item "all"
  15252. Enable all language-specific dumps.
  15253. .IP "\fBclass\fR" 4
  15254. .IX Item "class"
  15255. Dump class hierarchy information. Virtual table information is emitted
  15256. unless '\fBslim\fR' is specified. This option is applicable to \*(C+ only.
  15257. .IP "\fBraw\fR" 4
  15258. .IX Item "raw"
  15259. Dump the raw internal tree data. This option is applicable to \*(C+ only.
  15260. .RE
  15261. .RS 4
  15262. .RE
  15263. .IP "\fB\-fdump\-passes\fR" 4
  15264. .IX Item "-fdump-passes"
  15265. Print on \fIstderr\fR the list of optimization passes that are turned
  15266. on and off by the current command-line options.
  15267. .IP "\fB\-fdump\-statistics\-\fR\fIoption\fR" 4
  15268. .IX Item "-fdump-statistics-option"
  15269. Enable and control dumping of pass statistics in a separate file. The
  15270. file name is generated by appending a suffix ending in
  15271. \&\fB.statistics\fR to the source file name, and the file is created in
  15272. the same directory as the output file. If the \fB\-\fR\fIoption\fR
  15273. form is used, \fB\-stats\fR causes counters to be summed over the
  15274. whole compilation unit while \fB\-details\fR dumps every event as
  15275. the passes generate them. The default with no option is to sum
  15276. counters for each function compiled.
  15277. .IP "\fB\-fdump\-tree\-all\fR" 4
  15278. .IX Item "-fdump-tree-all"
  15279. .PD 0
  15280. .IP "\fB\-fdump\-tree\-\fR\fIswitch\fR" 4
  15281. .IX Item "-fdump-tree-switch"
  15282. .IP "\fB\-fdump\-tree\-\fR\fIswitch\fR\fB\-\fR\fIoptions\fR" 4
  15283. .IX Item "-fdump-tree-switch-options"
  15284. .IP "\fB\-fdump\-tree\-\fR\fIswitch\fR\fB\-\fR\fIoptions\fR\fB=\fR\fIfilename\fR" 4
  15285. .IX Item "-fdump-tree-switch-options=filename"
  15286. .PD
  15287. Control the dumping at various stages of processing the intermediate
  15288. language tree to a file. If the \fB\-\fR\fIoptions\fR
  15289. form is used, \fIoptions\fR is a list of \fB\-\fR separated options
  15290. which control the details of the dump. Not all options are applicable
  15291. to all dumps; those that are not meaningful are ignored. The
  15292. following options are available
  15293. .RS 4
  15294. .IP "\fBaddress\fR" 4
  15295. .IX Item "address"
  15296. Print the address of each node. Usually this is not meaningful as it
  15297. changes according to the environment and source file. Its primary use
  15298. is for tying up a dump file with a debug environment.
  15299. .IP "\fBasmname\fR" 4
  15300. .IX Item "asmname"
  15301. If \f(CW\*(C`DECL_ASSEMBLER_NAME\*(C'\fR has been set for a given decl, use that
  15302. in the dump instead of \f(CW\*(C`DECL_NAME\*(C'\fR. Its primary use is ease of
  15303. use working backward from mangled names in the assembly file.
  15304. .IP "\fBslim\fR" 4
  15305. .IX Item "slim"
  15306. When dumping front-end intermediate representations, inhibit dumping
  15307. of members of a scope or body of a function merely because that scope
  15308. has been reached. Only dump such items when they are directly reachable
  15309. by some other path.
  15310. .Sp
  15311. When dumping pretty-printed trees, this option inhibits dumping the
  15312. bodies of control structures.
  15313. .Sp
  15314. When dumping \s-1RTL,\s0 print the \s-1RTL\s0 in slim (condensed) form instead of
  15315. the default LISP-like representation.
  15316. .IP "\fBraw\fR" 4
  15317. .IX Item "raw"
  15318. Print a raw representation of the tree. By default, trees are
  15319. pretty-printed into a C\-like representation.
  15320. .IP "\fBdetails\fR" 4
  15321. .IX Item "details"
  15322. Enable more detailed dumps (not honored by every dump option). Also
  15323. include information from the optimization passes.
  15324. .IP "\fBstats\fR" 4
  15325. .IX Item "stats"
  15326. Enable dumping various statistics about the pass (not honored by every dump
  15327. option).
  15328. .IP "\fBblocks\fR" 4
  15329. .IX Item "blocks"
  15330. Enable showing basic block boundaries (disabled in raw dumps).
  15331. .IP "\fBgraph\fR" 4
  15332. .IX Item "graph"
  15333. For each of the other indicated dump files (\fB\-fdump\-rtl\-\fR\fIpass\fR),
  15334. dump a representation of the control flow graph suitable for viewing with
  15335. GraphViz to \fI\fIfile\fI.\fIpassid\fI.\fIpass\fI.dot\fR. Each function in
  15336. the file is pretty-printed as a subgraph, so that GraphViz can render them
  15337. all in a single plot.
  15338. .Sp
  15339. This option currently only works for \s-1RTL\s0 dumps, and the \s-1RTL\s0 is always
  15340. dumped in slim form.
  15341. .IP "\fBvops\fR" 4
  15342. .IX Item "vops"
  15343. Enable showing virtual operands for every statement.
  15344. .IP "\fBlineno\fR" 4
  15345. .IX Item "lineno"
  15346. Enable showing line numbers for statements.
  15347. .IP "\fBuid\fR" 4
  15348. .IX Item "uid"
  15349. Enable showing the unique \s-1ID \s0(\f(CW\*(C`DECL_UID\*(C'\fR) for each variable.
  15350. .IP "\fBverbose\fR" 4
  15351. .IX Item "verbose"
  15352. Enable showing the tree dump for each statement.
  15353. .IP "\fBeh\fR" 4
  15354. .IX Item "eh"
  15355. Enable showing the \s-1EH\s0 region number holding each statement.
  15356. .IP "\fBscev\fR" 4
  15357. .IX Item "scev"
  15358. Enable showing scalar evolution analysis details.
  15359. .IP "\fBoptimized\fR" 4
  15360. .IX Item "optimized"
  15361. Enable showing optimization information (only available in certain
  15362. passes).
  15363. .IP "\fBmissed\fR" 4
  15364. .IX Item "missed"
  15365. Enable showing missed optimization information (only available in certain
  15366. passes).
  15367. .IP "\fBnote\fR" 4
  15368. .IX Item "note"
  15369. Enable other detailed optimization information (only available in
  15370. certain passes).
  15371. .IP "\fBall\fR" 4
  15372. .IX Item "all"
  15373. Turn on all options, except \fBraw\fR, \fBslim\fR, \fBverbose\fR
  15374. and \fBlineno\fR.
  15375. .IP "\fBoptall\fR" 4
  15376. .IX Item "optall"
  15377. Turn on all optimization options, i.e., \fBoptimized\fR,
  15378. \&\fBmissed\fR, and \fBnote\fR.
  15379. .RE
  15380. .RS 4
  15381. .Sp
  15382. To determine what tree dumps are available or find the dump for a pass
  15383. of interest follow the steps below.
  15384. .IP "1." 4
  15385. .IX Item "1."
  15386. Invoke \s-1GCC\s0 with \fB\-fdump\-passes\fR and in the \fIstderr\fR output
  15387. look for a code that corresponds to the pass you are interested in.
  15388. For example, the codes \f(CW\*(C`tree\-evrp\*(C'\fR, \f(CW\*(C`tree\-vrp1\*(C'\fR, and
  15389. \&\f(CW\*(C`tree\-vrp2\*(C'\fR correspond to the three Value Range Propagation passes.
  15390. The number at the end distinguishes distinct invocations of the same pass.
  15391. .IP "2." 4
  15392. .IX Item "2."
  15393. To enable the creation of the dump file, append the pass code to
  15394. the \fB\-fdump\-\fR option prefix and invoke \s-1GCC\s0 with it. For example,
  15395. to enable the dump from the Early Value Range Propagation pass, invoke
  15396. \&\s-1GCC\s0 with the \fB\-fdump\-tree\-evrp\fR option. Optionally, you may
  15397. specify the name of the dump file. If you don't specify one, \s-1GCC\s0
  15398. creates as described below.
  15399. .IP "3." 4
  15400. .IX Item "3."
  15401. Find the pass dump in a file whose name is composed of three components
  15402. separated by a period: the name of the source file \s-1GCC\s0 was invoked to
  15403. compile, a numeric suffix indicating the pass number followed by the
  15404. letter \fBt\fR for tree passes (and the letter \fBr\fR for \s-1RTL\s0 passes),
  15405. and finally the pass code. For example, the Early \s-1VRP\s0 pass dump might
  15406. be in a file named \fImyfile.c.038t.evrp\fR in the current working
  15407. directory. Note that the numeric codes are not stable and may change
  15408. from one version of \s-1GCC\s0 to another.
  15409. .RE
  15410. .RS 4
  15411. .RE
  15412. .IP "\fB\-fopt\-info\fR" 4
  15413. .IX Item "-fopt-info"
  15414. .PD 0
  15415. .IP "\fB\-fopt\-info\-\fR\fIoptions\fR" 4
  15416. .IX Item "-fopt-info-options"
  15417. .IP "\fB\-fopt\-info\-\fR\fIoptions\fR\fB=\fR\fIfilename\fR" 4
  15418. .IX Item "-fopt-info-options=filename"
  15419. .PD
  15420. Controls optimization dumps from various optimization passes. If the
  15421. \&\fB\-\fR\fIoptions\fR form is used, \fIoptions\fR is a list of
  15422. \&\fB\-\fR separated option keywords to select the dump details and
  15423. optimizations.
  15424. .Sp
  15425. The \fIoptions\fR can be divided into three groups:
  15426. .RS 4
  15427. .IP "1." 4
  15428. .IX Item "1."
  15429. options describing what kinds of messages should be emitted,
  15430. .IP "2." 4
  15431. .IX Item "2."
  15432. options describing the verbosity of the dump, and
  15433. .IP "3." 4
  15434. .IX Item "3."
  15435. options describing which optimizations should be included.
  15436. .RE
  15437. .RS 4
  15438. .Sp
  15439. The options from each group can be freely mixed as they are
  15440. non-overlapping. However, in case of any conflicts,
  15441. the later options override the earlier options on the command
  15442. line.
  15443. .Sp
  15444. The following options control which kinds of messages should be emitted:
  15445. .IP "\fBoptimized\fR" 4
  15446. .IX Item "optimized"
  15447. Print information when an optimization is successfully applied. It is
  15448. up to a pass to decide which information is relevant. For example, the
  15449. vectorizer passes print the source location of loops which are
  15450. successfully vectorized.
  15451. .IP "\fBmissed\fR" 4
  15452. .IX Item "missed"
  15453. Print information about missed optimizations. Individual passes
  15454. control which information to include in the output.
  15455. .IP "\fBnote\fR" 4
  15456. .IX Item "note"
  15457. Print verbose information about optimizations, such as certain
  15458. transformations, more detailed messages about decisions etc.
  15459. .IP "\fBall\fR" 4
  15460. .IX Item "all"
  15461. Print detailed optimization information. This includes
  15462. \&\fBoptimized\fR, \fBmissed\fR, and \fBnote\fR.
  15463. .RE
  15464. .RS 4
  15465. .Sp
  15466. The following option controls the dump verbosity:
  15467. .IP "\fBinternals\fR" 4
  15468. .IX Item "internals"
  15469. By default, only \*(L"high-level\*(R" messages are emitted. This option enables
  15470. additional, more detailed, messages, which are likely to only be of interest
  15471. to \s-1GCC\s0 developers.
  15472. .RE
  15473. .RS 4
  15474. .Sp
  15475. One or more of the following option keywords can be used to describe a
  15476. group of optimizations:
  15477. .IP "\fBipa\fR" 4
  15478. .IX Item "ipa"
  15479. Enable dumps from all interprocedural optimizations.
  15480. .IP "\fBloop\fR" 4
  15481. .IX Item "loop"
  15482. Enable dumps from all loop optimizations.
  15483. .IP "\fBinline\fR" 4
  15484. .IX Item "inline"
  15485. Enable dumps from all inlining optimizations.
  15486. .IP "\fBomp\fR" 4
  15487. .IX Item "omp"
  15488. Enable dumps from all \s-1OMP \s0(Offloading and Multi Processing) optimizations.
  15489. .IP "\fBvec\fR" 4
  15490. .IX Item "vec"
  15491. Enable dumps from all vectorization optimizations.
  15492. .IP "\fBoptall\fR" 4
  15493. .IX Item "optall"
  15494. Enable dumps from all optimizations. This is a superset of
  15495. the optimization groups listed above.
  15496. .RE
  15497. .RS 4
  15498. .Sp
  15499. If \fIoptions\fR is
  15500. omitted, it defaults to \fBoptimized-optall\fR, which means to dump messages
  15501. about successful optimizations from all the passes, omitting messages
  15502. that are treated as \*(L"internals\*(R".
  15503. .Sp
  15504. If the \fIfilename\fR is provided, then the dumps from all the
  15505. applicable optimizations are concatenated into the \fIfilename\fR.
  15506. Otherwise the dump is output onto \fIstderr\fR. Though multiple
  15507. \&\fB\-fopt\-info\fR options are accepted, only one of them can include
  15508. a \fIfilename\fR. If other filenames are provided then all but the
  15509. first such option are ignored.
  15510. .Sp
  15511. Note that the output \fIfilename\fR is overwritten
  15512. in case of multiple translation units. If a combined output from
  15513. multiple translation units is desired, \fIstderr\fR should be used
  15514. instead.
  15515. .Sp
  15516. In the following example, the optimization info is output to
  15517. \&\fIstderr\fR:
  15518. .Sp
  15519. .Vb 1
  15520. \& gcc \-O3 \-fopt\-info
  15521. .Ve
  15522. .Sp
  15523. This example:
  15524. .Sp
  15525. .Vb 1
  15526. \& gcc \-O3 \-fopt\-info\-missed=missed.all
  15527. .Ve
  15528. .Sp
  15529. outputs missed optimization report from all the passes into
  15530. \&\fImissed.all\fR, and this one:
  15531. .Sp
  15532. .Vb 1
  15533. \& gcc \-O2 \-ftree\-vectorize \-fopt\-info\-vec\-missed
  15534. .Ve
  15535. .Sp
  15536. prints information about missed optimization opportunities from
  15537. vectorization passes on \fIstderr\fR.
  15538. Note that \fB\-fopt\-info\-vec\-missed\fR is equivalent to
  15539. \&\fB\-fopt\-info\-missed\-vec\fR. The order of the optimization group
  15540. names and message types listed after \fB\-fopt\-info\fR does not matter.
  15541. .Sp
  15542. As another example,
  15543. .Sp
  15544. .Vb 1
  15545. \& gcc \-O3 \-fopt\-info\-inline\-optimized\-missed=inline.txt
  15546. .Ve
  15547. .Sp
  15548. outputs information about missed optimizations as well as
  15549. optimized locations from all the inlining passes into
  15550. \&\fIinline.txt\fR.
  15551. .Sp
  15552. Finally, consider:
  15553. .Sp
  15554. .Vb 1
  15555. \& gcc \-fopt\-info\-vec\-missed=vec.miss \-fopt\-info\-loop\-optimized=loop.opt
  15556. .Ve
  15557. .Sp
  15558. Here the two output filenames \fIvec.miss\fR and \fIloop.opt\fR are
  15559. in conflict since only one output file is allowed. In this case, only
  15560. the first option takes effect and the subsequent options are
  15561. ignored. Thus only \fIvec.miss\fR is produced which contains
  15562. dumps from the vectorizer about missed opportunities.
  15563. .RE
  15564. .IP "\fB\-fsave\-optimization\-record\fR" 4
  15565. .IX Item "-fsave-optimization-record"
  15566. Write a \s-1SRCFILE\s0.opt\-record.json.gz file detailing what optimizations
  15567. were performed, for those optimizations that support \fB\-fopt\-info\fR.
  15568. .Sp
  15569. This option is experimental and the format of the data within the
  15570. compressed \s-1JSON\s0 file is subject to change.
  15571. .Sp
  15572. It is roughly equivalent to a machine-readable version of
  15573. \&\fB\-fopt\-info\-all\fR, as a collection of messages with source file,
  15574. line number and column number, with the following additional data for
  15575. each message:
  15576. .RS 4
  15577. .IP "*" 4
  15578. the execution count of the code being optimized, along with metadata about
  15579. whether this was from actual profile data, or just an estimate, allowing
  15580. consumers to prioritize messages by code hotness,
  15581. .IP "*" 4
  15582. the function name of the code being optimized, where applicable,
  15583. .IP "*" 4
  15584. the \*(L"inlining chain\*(R" for the code being optimized, so that when
  15585. a function is inlined into several different places (which might
  15586. themselves be inlined), the reader can distinguish between the copies,
  15587. .IP "*" 4
  15588. objects identifying those parts of the message that refer to expressions,
  15589. statements or symbol-table nodes, which of these categories they are, and,
  15590. when available, their source code location,
  15591. .IP "*" 4
  15592. the \s-1GCC\s0 pass that emitted the message, and
  15593. .IP "*" 4
  15594. the location in \s-1GCC\s0's own code from which the message was emitted
  15595. .RE
  15596. .RS 4
  15597. .Sp
  15598. Additionally, some messages are logically nested within other
  15599. messages, reflecting implementation details of the optimization
  15600. passes.
  15601. .RE
  15602. .IP "\fB\-fsched\-verbose=\fR\fIn\fR" 4
  15603. .IX Item "-fsched-verbose=n"
  15604. On targets that use instruction scheduling, this option controls the
  15605. amount of debugging output the scheduler prints to the dump files.
  15606. .Sp
  15607. For \fIn\fR greater than zero, \fB\-fsched\-verbose\fR outputs the
  15608. same information as \fB\-fdump\-rtl\-sched1\fR and \fB\-fdump\-rtl\-sched2\fR.
  15609. For \fIn\fR greater than one, it also output basic block probabilities,
  15610. detailed ready list information and unit/insn info. For \fIn\fR greater
  15611. than two, it includes \s-1RTL\s0 at abort point, control-flow and regions info.
  15612. And for \fIn\fR over four, \fB\-fsched\-verbose\fR also includes
  15613. dependence info.
  15614. .IP "\fB\-fenable\-\fR\fIkind\fR\fB\-\fR\fIpass\fR" 4
  15615. .IX Item "-fenable-kind-pass"
  15616. .PD 0
  15617. .IP "\fB\-fdisable\-\fR\fIkind\fR\fB\-\fR\fIpass\fR\fB=\fR\fIrange-list\fR" 4
  15618. .IX Item "-fdisable-kind-pass=range-list"
  15619. .PD
  15620. This is a set of options that are used to explicitly disable/enable
  15621. optimization passes. These options are intended for use for debugging \s-1GCC.\s0
  15622. Compiler users should use regular options for enabling/disabling
  15623. passes instead.
  15624. .RS 4
  15625. .IP "\fB\-fdisable\-ipa\-\fR\fIpass\fR" 4
  15626. .IX Item "-fdisable-ipa-pass"
  15627. Disable \s-1IPA\s0 pass \fIpass\fR. \fIpass\fR is the pass name. If the same pass is
  15628. statically invoked in the compiler multiple times, the pass name should be
  15629. appended with a sequential number starting from 1.
  15630. .IP "\fB\-fdisable\-rtl\-\fR\fIpass\fR" 4
  15631. .IX Item "-fdisable-rtl-pass"
  15632. .PD 0
  15633. .IP "\fB\-fdisable\-rtl\-\fR\fIpass\fR\fB=\fR\fIrange-list\fR" 4
  15634. .IX Item "-fdisable-rtl-pass=range-list"
  15635. .PD
  15636. Disable \s-1RTL\s0 pass \fIpass\fR. \fIpass\fR is the pass name. If the same pass is
  15637. statically invoked in the compiler multiple times, the pass name should be
  15638. appended with a sequential number starting from 1. \fIrange-list\fR is a
  15639. comma-separated list of function ranges or assembler names. Each range is a number
  15640. pair separated by a colon. The range is inclusive in both ends. If the range
  15641. is trivial, the number pair can be simplified as a single number. If the
  15642. function's call graph node's \fIuid\fR falls within one of the specified ranges,
  15643. the \fIpass\fR is disabled for that function. The \fIuid\fR is shown in the
  15644. function header of a dump file, and the pass names can be dumped by using
  15645. option \fB\-fdump\-passes\fR.
  15646. .IP "\fB\-fdisable\-tree\-\fR\fIpass\fR" 4
  15647. .IX Item "-fdisable-tree-pass"
  15648. .PD 0
  15649. .IP "\fB\-fdisable\-tree\-\fR\fIpass\fR\fB=\fR\fIrange-list\fR" 4
  15650. .IX Item "-fdisable-tree-pass=range-list"
  15651. .PD
  15652. Disable tree pass \fIpass\fR. See \fB\-fdisable\-rtl\fR for the description of
  15653. option arguments.
  15654. .IP "\fB\-fenable\-ipa\-\fR\fIpass\fR" 4
  15655. .IX Item "-fenable-ipa-pass"
  15656. Enable \s-1IPA\s0 pass \fIpass\fR. \fIpass\fR is the pass name. If the same pass is
  15657. statically invoked in the compiler multiple times, the pass name should be
  15658. appended with a sequential number starting from 1.
  15659. .IP "\fB\-fenable\-rtl\-\fR\fIpass\fR" 4
  15660. .IX Item "-fenable-rtl-pass"
  15661. .PD 0
  15662. .IP "\fB\-fenable\-rtl\-\fR\fIpass\fR\fB=\fR\fIrange-list\fR" 4
  15663. .IX Item "-fenable-rtl-pass=range-list"
  15664. .PD
  15665. Enable \s-1RTL\s0 pass \fIpass\fR. See \fB\-fdisable\-rtl\fR for option argument
  15666. description and examples.
  15667. .IP "\fB\-fenable\-tree\-\fR\fIpass\fR" 4
  15668. .IX Item "-fenable-tree-pass"
  15669. .PD 0
  15670. .IP "\fB\-fenable\-tree\-\fR\fIpass\fR\fB=\fR\fIrange-list\fR" 4
  15671. .IX Item "-fenable-tree-pass=range-list"
  15672. .PD
  15673. Enable tree pass \fIpass\fR. See \fB\-fdisable\-rtl\fR for the description
  15674. of option arguments.
  15675. .RE
  15676. .RS 4
  15677. .Sp
  15678. Here are some examples showing uses of these options.
  15679. .Sp
  15680. .Vb 10
  15681. \& # disable ccp1 for all functions
  15682. \& \-fdisable\-tree\-ccp1
  15683. \& # disable complete unroll for function whose cgraph node uid is 1
  15684. \& \-fenable\-tree\-cunroll=1
  15685. \& # disable gcse2 for functions at the following ranges [1,1],
  15686. \& # [300,400], and [400,1000]
  15687. \& # disable gcse2 for functions foo and foo2
  15688. \& \-fdisable\-rtl\-gcse2=foo,foo2
  15689. \& # disable early inlining
  15690. \& \-fdisable\-tree\-einline
  15691. \& # disable ipa inlining
  15692. \& \-fdisable\-ipa\-inline
  15693. \& # enable tree full unroll
  15694. \& \-fenable\-tree\-unroll
  15695. .Ve
  15696. .RE
  15697. .IP "\fB\-fchecking\fR" 4
  15698. .IX Item "-fchecking"
  15699. .PD 0
  15700. .IP "\fB\-fchecking=\fR\fIn\fR" 4
  15701. .IX Item "-fchecking=n"
  15702. .PD
  15703. Enable internal consistency checking. The default depends on
  15704. the compiler configuration. \fB\-fchecking=2\fR enables further
  15705. internal consistency checking that might affect code generation.
  15706. .IP "\fB\-frandom\-seed=\fR\fIstring\fR" 4
  15707. .IX Item "-frandom-seed=string"
  15708. This option provides a seed that \s-1GCC\s0 uses in place of
  15709. random numbers in generating certain symbol names
  15710. that have to be different in every compiled file. It is also used to
  15711. place unique stamps in coverage data files and the object files that
  15712. produce them. You can use the \fB\-frandom\-seed\fR option to produce
  15713. reproducibly identical object files.
  15714. .Sp
  15715. The \fIstring\fR can either be a number (decimal, octal or hex) or an
  15716. arbitrary string (in which case it's converted to a number by
  15717. computing \s-1CRC32\s0).
  15718. .Sp
  15719. The \fIstring\fR should be different for every file you compile.
  15720. .IP "\fB\-save\-temps\fR" 4
  15721. .IX Item "-save-temps"
  15722. .PD 0
  15723. .IP "\fB\-save\-temps=cwd\fR" 4
  15724. .IX Item "-save-temps=cwd"
  15725. .PD
  15726. Store the usual \*(L"temporary\*(R" intermediate files permanently; place them
  15727. in the current directory and name them based on the source file. Thus,
  15728. compiling \fIfoo.c\fR with \fB\-c \-save\-temps\fR produces files
  15729. \&\fIfoo.i\fR and \fIfoo.s\fR, as well as \fIfoo.o\fR. This creates a
  15730. preprocessed \fIfoo.i\fR output file even though the compiler now
  15731. normally uses an integrated preprocessor.
  15732. .Sp
  15733. When used in combination with the \fB\-x\fR command-line option,
  15734. \&\fB\-save\-temps\fR is sensible enough to avoid over writing an
  15735. input source file with the same extension as an intermediate file.
  15736. The corresponding intermediate file may be obtained by renaming the
  15737. source file before using \fB\-save\-temps\fR.
  15738. .Sp
  15739. If you invoke \s-1GCC\s0 in parallel, compiling several different source
  15740. files that share a common base name in different subdirectories or the
  15741. same source file compiled for multiple output destinations, it is
  15742. likely that the different parallel compilers will interfere with each
  15743. other, and overwrite the temporary files. For instance:
  15744. .Sp
  15745. .Vb 2
  15746. \& gcc \-save\-temps \-o outdir1/foo.o indir1/foo.c&
  15747. \& gcc \-save\-temps \-o outdir2/foo.o indir2/foo.c&
  15748. .Ve
  15749. .Sp
  15750. may result in \fIfoo.i\fR and \fIfoo.o\fR being written to
  15751. simultaneously by both compilers.
  15752. .IP "\fB\-save\-temps=obj\fR" 4
  15753. .IX Item "-save-temps=obj"
  15754. Store the usual \*(L"temporary\*(R" intermediate files permanently. If the
  15755. \&\fB\-o\fR option is used, the temporary files are based on the
  15756. object file. If the \fB\-o\fR option is not used, the
  15757. \&\fB\-save\-temps=obj\fR switch behaves like \fB\-save\-temps\fR.
  15758. .Sp
  15759. For example:
  15760. .Sp
  15761. .Vb 3
  15762. \& gcc \-save\-temps=obj \-c foo.c
  15763. \& gcc \-save\-temps=obj \-c bar.c \-o dir/xbar.o
  15764. \& gcc \-save\-temps=obj foobar.c \-o dir2/yfoobar
  15765. .Ve
  15766. .Sp
  15767. creates \fIfoo.i\fR, \fIfoo.s\fR, \fIdir/xbar.i\fR,
  15768. \&\fIdir/xbar.s\fR, \fIdir2/yfoobar.i\fR, \fIdir2/yfoobar.s\fR, and
  15769. \&\fIdir2/yfoobar.o\fR.
  15770. .IP "\fB\-time\fR[\fB=\fR\fIfile\fR]" 4
  15771. .IX Item "-time[=file]"
  15772. Report the \s-1CPU\s0 time taken by each subprocess in the compilation
  15773. sequence. For C source files, this is the compiler proper and assembler
  15774. (plus the linker if linking is done).
  15775. .Sp
  15776. Without the specification of an output file, the output looks like this:
  15777. .Sp
  15778. .Vb 2
  15779. \& # cc1 0.12 0.01
  15780. \& # as 0.00 0.01
  15781. .Ve
  15782. .Sp
  15783. The first number on each line is the \*(L"user time\*(R", that is time spent
  15784. executing the program itself. The second number is \*(L"system time\*(R",
  15785. time spent executing operating system routines on behalf of the program.
  15786. Both numbers are in seconds.
  15787. .Sp
  15788. With the specification of an output file, the output is appended to the
  15789. named file, and it looks like this:
  15790. .Sp
  15791. .Vb 2
  15792. \& 0.12 0.01 cc1 <options>
  15793. \& 0.00 0.01 as <options>
  15794. .Ve
  15795. .Sp
  15796. The \*(L"user time\*(R" and the \*(L"system time\*(R" are moved before the program
  15797. name, and the options passed to the program are displayed, so that one
  15798. can later tell what file was being compiled, and with which options.
  15799. .IP "\fB\-fdump\-final\-insns\fR[\fB=\fR\fIfile\fR]" 4
  15800. .IX Item "-fdump-final-insns[=file]"
  15801. Dump the final internal representation (\s-1RTL\s0) to \fIfile\fR. If the
  15802. optional argument is omitted (or if \fIfile\fR is \f(CW\*(C`.\*(C'\fR), the name
  15803. of the dump file is determined by appending \f(CW\*(C`.gkd\*(C'\fR to the
  15804. compilation output file name.
  15805. .IP "\fB\-fcompare\-debug\fR[\fB=\fR\fIopts\fR]" 4
  15806. .IX Item "-fcompare-debug[=opts]"
  15807. If no error occurs during compilation, run the compiler a second time,
  15808. adding \fIopts\fR and \fB\-fcompare\-debug\-second\fR to the arguments
  15809. passed to the second compilation. Dump the final internal
  15810. representation in both compilations, and print an error if they differ.
  15811. .Sp
  15812. If the equal sign is omitted, the default \fB\-gtoggle\fR is used.
  15813. .Sp
  15814. The environment variable \fB\s-1GCC_COMPARE_DEBUG\s0\fR, if defined, non-empty
  15815. and nonzero, implicitly enables \fB\-fcompare\-debug\fR. If
  15816. \&\fB\s-1GCC_COMPARE_DEBUG\s0\fR is defined to a string starting with a dash,
  15817. then it is used for \fIopts\fR, otherwise the default \fB\-gtoggle\fR
  15818. is used.
  15819. .Sp
  15820. \&\fB\-fcompare\-debug=\fR, with the equal sign but without \fIopts\fR,
  15821. is equivalent to \fB\-fno\-compare\-debug\fR, which disables the dumping
  15822. of the final representation and the second compilation, preventing even
  15823. \&\fB\s-1GCC_COMPARE_DEBUG\s0\fR from taking effect.
  15824. .Sp
  15825. To verify full coverage during \fB\-fcompare\-debug\fR testing, set
  15826. \&\fB\s-1GCC_COMPARE_DEBUG\s0\fR to say \fB\-fcompare\-debug\-not\-overridden\fR,
  15827. which \s-1GCC\s0 rejects as an invalid option in any actual compilation
  15828. (rather than preprocessing, assembly or linking). To get just a
  15829. warning, setting \fB\s-1GCC_COMPARE_DEBUG\s0\fR to \fB\-w%n\-fcompare\-debug
  15830. not overridden\fR will do.
  15831. .IP "\fB\-fcompare\-debug\-second\fR" 4
  15832. .IX Item "-fcompare-debug-second"
  15833. This option is implicitly passed to the compiler for the second
  15834. compilation requested by \fB\-fcompare\-debug\fR, along with options to
  15835. silence warnings, and omitting other options that would cause the compiler
  15836. to produce output to files or to standard output as a side effect. Dump
  15837. files and preserved temporary files are renamed so as to contain the
  15838. \&\f(CW\*(C`.gk\*(C'\fR additional extension during the second compilation, to avoid
  15839. overwriting those generated by the first.
  15840. .Sp
  15841. When this option is passed to the compiler driver, it causes the
  15842. \&\fIfirst\fR compilation to be skipped, which makes it useful for little
  15843. other than debugging the compiler proper.
  15844. .IP "\fB\-gtoggle\fR" 4
  15845. .IX Item "-gtoggle"
  15846. Turn off generation of debug info, if leaving out this option
  15847. generates it, or turn it on at level 2 otherwise. The position of this
  15848. argument in the command line does not matter; it takes effect after all
  15849. other options are processed, and it does so only once, no matter how
  15850. many times it is given. This is mainly intended to be used with
  15851. \&\fB\-fcompare\-debug\fR.
  15852. .IP "\fB\-fvar\-tracking\-assignments\-toggle\fR" 4
  15853. .IX Item "-fvar-tracking-assignments-toggle"
  15854. Toggle \fB\-fvar\-tracking\-assignments\fR, in the same way that
  15855. \&\fB\-gtoggle\fR toggles \fB\-g\fR.
  15856. .IP "\fB\-Q\fR" 4
  15857. .IX Item "-Q"
  15858. Makes the compiler print out each function name as it is compiled, and
  15859. print some statistics about each pass when it finishes.
  15860. .IP "\fB\-ftime\-report\fR" 4
  15861. .IX Item "-ftime-report"
  15862. Makes the compiler print some statistics about the time consumed by each
  15863. pass when it finishes.
  15864. .IP "\fB\-ftime\-report\-details\fR" 4
  15865. .IX Item "-ftime-report-details"
  15866. Record the time consumed by infrastructure parts separately for each pass.
  15867. .IP "\fB\-fira\-verbose=\fR\fIn\fR" 4
  15868. .IX Item "-fira-verbose=n"
  15869. Control the verbosity of the dump file for the integrated register allocator.
  15870. The default value is 5. If the value \fIn\fR is greater or equal to 10,
  15871. the dump output is sent to stderr using the same format as \fIn\fR minus 10.
  15872. .IP "\fB\-flto\-report\fR" 4
  15873. .IX Item "-flto-report"
  15874. Prints a report with internal details on the workings of the link-time
  15875. optimizer. The contents of this report vary from version to version.
  15876. It is meant to be useful to \s-1GCC\s0 developers when processing object
  15877. files in \s-1LTO\s0 mode (via \fB\-flto\fR).
  15878. .Sp
  15879. Disabled by default.
  15880. .IP "\fB\-flto\-report\-wpa\fR" 4
  15881. .IX Item "-flto-report-wpa"
  15882. Like \fB\-flto\-report\fR, but only print for the \s-1WPA\s0 phase of link-time
  15883. optimization.
  15884. .IP "\fB\-fmem\-report\fR" 4
  15885. .IX Item "-fmem-report"
  15886. Makes the compiler print some statistics about permanent memory
  15887. allocation when it finishes.
  15888. .IP "\fB\-fmem\-report\-wpa\fR" 4
  15889. .IX Item "-fmem-report-wpa"
  15890. Makes the compiler print some statistics about permanent memory
  15891. allocation for the \s-1WPA\s0 phase only.
  15892. .IP "\fB\-fpre\-ipa\-mem\-report\fR" 4
  15893. .IX Item "-fpre-ipa-mem-report"
  15894. .PD 0
  15895. .IP "\fB\-fpost\-ipa\-mem\-report\fR" 4
  15896. .IX Item "-fpost-ipa-mem-report"
  15897. .PD
  15898. Makes the compiler print some statistics about permanent memory
  15899. allocation before or after interprocedural optimization.
  15900. .IP "\fB\-fprofile\-report\fR" 4
  15901. .IX Item "-fprofile-report"
  15902. Makes the compiler print some statistics about consistency of the
  15903. (estimated) profile and effect of individual passes.
  15904. .IP "\fB\-fstack\-usage\fR" 4
  15905. .IX Item "-fstack-usage"
  15906. Makes the compiler output stack usage information for the program, on a
  15907. per-function basis. The filename for the dump is made by appending
  15908. \&\fI.su\fR to the \fIauxname\fR. \fIauxname\fR is generated from the name of
  15909. the output file, if explicitly specified and it is not an executable,
  15910. otherwise it is the basename of the source file. An entry is made up
  15911. of three fields:
  15912. .RS 4
  15913. .IP "*" 4
  15914. The name of the function.
  15915. .IP "*" 4
  15916. A number of bytes.
  15917. .IP "*" 4
  15918. One or more qualifiers: \f(CW\*(C`static\*(C'\fR, \f(CW\*(C`dynamic\*(C'\fR, \f(CW\*(C`bounded\*(C'\fR.
  15919. .RE
  15920. .RS 4
  15921. .Sp
  15922. The qualifier \f(CW\*(C`static\*(C'\fR means that the function manipulates the stack
  15923. statically: a fixed number of bytes are allocated for the frame on function
  15924. entry and released on function exit; no stack adjustments are otherwise made
  15925. in the function. The second field is this fixed number of bytes.
  15926. .Sp
  15927. The qualifier \f(CW\*(C`dynamic\*(C'\fR means that the function manipulates the stack
  15928. dynamically: in addition to the static allocation described above, stack
  15929. adjustments are made in the body of the function, for example to push/pop
  15930. arguments around function calls. If the qualifier \f(CW\*(C`bounded\*(C'\fR is also
  15931. present, the amount of these adjustments is bounded at compile time and
  15932. the second field is an upper bound of the total amount of stack used by
  15933. the function. If it is not present, the amount of these adjustments is
  15934. not bounded at compile time and the second field only represents the
  15935. bounded part.
  15936. .RE
  15937. .IP "\fB\-fstats\fR" 4
  15938. .IX Item "-fstats"
  15939. Emit statistics about front-end processing at the end of the compilation.
  15940. This option is supported only by the \*(C+ front end, and
  15941. the information is generally only useful to the G++ development team.
  15942. .IP "\fB\-fdbg\-cnt\-list\fR" 4
  15943. .IX Item "-fdbg-cnt-list"
  15944. Print the name and the counter upper bound for all debug counters.
  15945. .IP "\fB\-fdbg\-cnt=\fR\fIcounter-value-list\fR" 4
  15946. .IX Item "-fdbg-cnt=counter-value-list"
  15947. Set the internal debug counter lower and upper bound. \fIcounter-value-list\fR
  15948. is a comma-separated list of \fIname\fR:\fIlower_bound1\fR\-\fIupper_bound1\fR
  15949. [:\fIlower_bound2\fR\-\fIupper_bound2\fR...] tuples which sets
  15950. the name of the counter and list of closed intervals.
  15951. The \fIlower_bound\fR is optional and is zero
  15952. initialized if not set.
  15953. For example, with \fB\-fdbg\-cnt=dce:2\-4:10\-11,tail_call:10\fR,
  15954. \&\f(CW\*(C`dbg_cnt(dce)\*(C'\fR returns true only for second, third, fourth, tenth and
  15955. eleventh invocation.
  15956. For \f(CW\*(C`dbg_cnt(tail_call)\*(C'\fR true is returned for first 10 invocations.
  15957. .IP "\fB\-print\-file\-name=\fR\fIlibrary\fR" 4
  15958. .IX Item "-print-file-name=library"
  15959. Print the full absolute name of the library file \fIlibrary\fR that
  15960. would be used when linking\-\-\-and don't do anything else. With this
  15961. option, \s-1GCC\s0 does not compile or link anything; it just prints the
  15962. file name.
  15963. .IP "\fB\-print\-multi\-directory\fR" 4
  15964. .IX Item "-print-multi-directory"
  15965. Print the directory name corresponding to the multilib selected by any
  15966. other switches present in the command line. This directory is supposed
  15967. to exist in \fB\s-1GCC_EXEC_PREFIX\s0\fR.
  15968. .IP "\fB\-print\-multi\-lib\fR" 4
  15969. .IX Item "-print-multi-lib"
  15970. Print the mapping from multilib directory names to compiler switches
  15971. that enable them. The directory name is separated from the switches by
  15972. \&\fB;\fR, and each switch starts with an \fB@\fR instead of the
  15973. \&\fB\-\fR, without spaces between multiple switches. This is supposed to
  15974. ease shell processing.
  15975. .IP "\fB\-print\-multi\-os\-directory\fR" 4
  15976. .IX Item "-print-multi-os-directory"
  15977. Print the path to \s-1OS\s0 libraries for the selected
  15978. multilib, relative to some \fIlib\fR subdirectory. If \s-1OS\s0 libraries are
  15979. present in the \fIlib\fR subdirectory and no multilibs are used, this is
  15980. usually just \fI.\fR, if \s-1OS\s0 libraries are present in \fIlib\fIsuffix\fI\fR
  15981. sibling directories this prints e.g. \fI../lib64\fR, \fI../lib\fR or
  15982. \&\fI../lib32\fR, or if \s-1OS\s0 libraries are present in \fIlib/\fIsubdir\fI\fR
  15983. subdirectories it prints e.g. \fIamd64\fR, \fIsparcv9\fR or \fIev6\fR.
  15984. .IP "\fB\-print\-multiarch\fR" 4
  15985. .IX Item "-print-multiarch"
  15986. Print the path to \s-1OS\s0 libraries for the selected multiarch,
  15987. relative to some \fIlib\fR subdirectory.
  15988. .IP "\fB\-print\-prog\-name=\fR\fIprogram\fR" 4
  15989. .IX Item "-print-prog-name=program"
  15990. Like \fB\-print\-file\-name\fR, but searches for a program such as \fBcpp\fR.
  15991. .IP "\fB\-print\-libgcc\-file\-name\fR" 4
  15992. .IX Item "-print-libgcc-file-name"
  15993. Same as \fB\-print\-file\-name=libgcc.a\fR.
  15994. .Sp
  15995. This is useful when you use \fB\-nostdlib\fR or \fB\-nodefaultlibs\fR
  15996. but you do want to link with \fIlibgcc.a\fR. You can do:
  15997. .Sp
  15998. .Vb 1
  15999. \& gcc \-nostdlib <files>... \`gcc \-print\-libgcc\-file\-name\`
  16000. .Ve
  16001. .IP "\fB\-print\-search\-dirs\fR" 4
  16002. .IX Item "-print-search-dirs"
  16003. Print the name of the configured installation directory and a list of
  16004. program and library directories \fBgcc\fR searches\-\-\-and don't do anything else.
  16005. .Sp
  16006. This is useful when \fBgcc\fR prints the error message
  16007. \&\fBinstallation problem, cannot exec cpp0: No such file or directory\fR.
  16008. To resolve this you either need to put \fIcpp0\fR and the other compiler
  16009. components where \fBgcc\fR expects to find them, or you can set the environment
  16010. variable \fB\s-1GCC_EXEC_PREFIX\s0\fR to the directory where you installed them.
  16011. Don't forget the trailing \fB/\fR.
  16012. .IP "\fB\-print\-sysroot\fR" 4
  16013. .IX Item "-print-sysroot"
  16014. Print the target sysroot directory that is used during
  16015. compilation. This is the target sysroot specified either at configure
  16016. time or using the \fB\-\-sysroot\fR option, possibly with an extra
  16017. suffix that depends on compilation options. If no target sysroot is
  16018. specified, the option prints nothing.
  16019. .IP "\fB\-print\-sysroot\-headers\-suffix\fR" 4
  16020. .IX Item "-print-sysroot-headers-suffix"
  16021. Print the suffix added to the target sysroot when searching for
  16022. headers, or give an error if the compiler is not configured with such
  16023. a suffix\-\-\-and don't do anything else.
  16024. .IP "\fB\-dumpmachine\fR" 4
  16025. .IX Item "-dumpmachine"
  16026. Print the compiler's target machine (for example,
  16027. \&\fBi686\-pc\-linux\-gnu\fR)\-\-\-and don't do anything else.
  16028. .IP "\fB\-dumpversion\fR" 4
  16029. .IX Item "-dumpversion"
  16030. Print the compiler version (for example, \f(CW3.0\fR, \f(CW6.3.0\fR or \f(CW7\fR)\-\-\-and don't do
  16031. anything else. This is the compiler version used in filesystem paths and
  16032. specs. Depending on how the compiler has been configured it can be just
  16033. a single number (major version), two numbers separated by a dot (major and
  16034. minor version) or three numbers separated by dots (major, minor and patchlevel
  16035. version).
  16036. .IP "\fB\-dumpfullversion\fR" 4
  16037. .IX Item "-dumpfullversion"
  16038. Print the full compiler version\-\-\-and don't do anything else. The output is
  16039. always three numbers separated by dots, major, minor and patchlevel version.
  16040. .IP "\fB\-dumpspecs\fR" 4
  16041. .IX Item "-dumpspecs"
  16042. Print the compiler's built-in specs\-\-\-and don't do anything else. (This
  16043. is used when \s-1GCC\s0 itself is being built.)
  16044. .SS "Machine-Dependent Options"
  16045. .IX Subsection "Machine-Dependent Options"
  16046. Each target machine supported by \s-1GCC\s0 can have its own options\-\-\-for
  16047. example, to allow you to compile for a particular processor variant or
  16048. \&\s-1ABI,\s0 or to control optimizations specific to that machine. By
  16049. convention, the names of machine-specific options start with
  16050. \&\fB\-m\fR.
  16051. .PP
  16052. Some configurations of the compiler also support additional target-specific
  16053. options, usually for compatibility with other compilers on the same
  16054. platform.
  16055. .PP
  16056. \fIAArch64 Options\fR
  16057. .IX Subsection "AArch64 Options"
  16058. .PP
  16059. These options are defined for AArch64 implementations:
  16060. .IP "\fB\-mabi=\fR\fIname\fR" 4
  16061. .IX Item "-mabi=name"
  16062. Generate code for the specified data model. Permissible values
  16063. are \fBilp32\fR for SysV-like data model where int, long int and pointers
  16064. are 32 bits, and \fBlp64\fR for SysV-like data model where int is 32 bits,
  16065. but long int and pointers are 64 bits.
  16066. .Sp
  16067. The default depends on the specific target configuration. Note that
  16068. the \s-1LP64\s0 and \s-1ILP32\s0 ABIs are not link-compatible; you must compile your
  16069. entire program with the same \s-1ABI,\s0 and link with a compatible set of libraries.
  16070. .IP "\fB\-mbig\-endian\fR" 4
  16071. .IX Item "-mbig-endian"
  16072. Generate big-endian code. This is the default when \s-1GCC\s0 is configured for an
  16073. \&\fBaarch64_be\-*\-*\fR target.
  16074. .IP "\fB\-mgeneral\-regs\-only\fR" 4
  16075. .IX Item "-mgeneral-regs-only"
  16076. Generate code which uses only the general-purpose registers. This will prevent
  16077. the compiler from using floating-point and Advanced \s-1SIMD\s0 registers but will not
  16078. impose any restrictions on the assembler.
  16079. .IP "\fB\-mlittle\-endian\fR" 4
  16080. .IX Item "-mlittle-endian"
  16081. Generate little-endian code. This is the default when \s-1GCC\s0 is configured for an
  16082. \&\fBaarch64\-*\-*\fR but not an \fBaarch64_be\-*\-*\fR target.
  16083. .IP "\fB\-mcmodel=tiny\fR" 4
  16084. .IX Item "-mcmodel=tiny"
  16085. Generate code for the tiny code model. The program and its statically defined
  16086. symbols must be within 1MB of each other. Programs can be statically or
  16087. dynamically linked.
  16088. .IP "\fB\-mcmodel=small\fR" 4
  16089. .IX Item "-mcmodel=small"
  16090. Generate code for the small code model. The program and its statically defined
  16091. symbols must be within 4GB of each other. Programs can be statically or
  16092. dynamically linked. This is the default code model.
  16093. .IP "\fB\-mcmodel=large\fR" 4
  16094. .IX Item "-mcmodel=large"
  16095. Generate code for the large code model. This makes no assumptions about
  16096. addresses and sizes of sections. Programs can be statically linked only. The
  16097. \&\fB\-mcmodel=large\fR option is incompatible with \fB\-mabi=ilp32\fR,
  16098. \&\fB\-fpic\fR and \fB\-fPIC\fR.
  16099. .IP "\fB\-mstrict\-align\fR" 4
  16100. .IX Item "-mstrict-align"
  16101. .PD 0
  16102. .IP "\fB\-mno\-strict\-align\fR" 4
  16103. .IX Item "-mno-strict-align"
  16104. .PD
  16105. Avoid or allow generating memory accesses that may not be aligned on a natural
  16106. object boundary as described in the architecture specification.
  16107. .IP "\fB\-momit\-leaf\-frame\-pointer\fR" 4
  16108. .IX Item "-momit-leaf-frame-pointer"
  16109. .PD 0
  16110. .IP "\fB\-mno\-omit\-leaf\-frame\-pointer\fR" 4
  16111. .IX Item "-mno-omit-leaf-frame-pointer"
  16112. .PD
  16113. Omit or keep the frame pointer in leaf functions. The former behavior is the
  16114. default.
  16115. .IP "\fB\-mstack\-protector\-guard=\fR\fIguard\fR" 4
  16116. .IX Item "-mstack-protector-guard=guard"
  16117. .PD 0
  16118. .IP "\fB\-mstack\-protector\-guard\-reg=\fR\fIreg\fR" 4
  16119. .IX Item "-mstack-protector-guard-reg=reg"
  16120. .IP "\fB\-mstack\-protector\-guard\-offset=\fR\fIoffset\fR" 4
  16121. .IX Item "-mstack-protector-guard-offset=offset"
  16122. .PD
  16123. Generate stack protection code using canary at \fIguard\fR. Supported
  16124. locations are \fBglobal\fR for a global canary or \fBsysreg\fR for a
  16125. canary in an appropriate system register.
  16126. .Sp
  16127. With the latter choice the options
  16128. \&\fB\-mstack\-protector\-guard\-reg=\fR\fIreg\fR and
  16129. \&\fB\-mstack\-protector\-guard\-offset=\fR\fIoffset\fR furthermore specify
  16130. which system register to use as base register for reading the canary,
  16131. and from what offset from that base register. There is no default
  16132. register or offset as this is entirely for use within the Linux
  16133. kernel.
  16134. .IP "\fB\-mstack\-protector\-guard=\fR\fIguard\fR" 4
  16135. .IX Item "-mstack-protector-guard=guard"
  16136. .PD 0
  16137. .IP "\fB\-mstack\-protector\-guard\-reg=\fR\fIreg\fR" 4
  16138. .IX Item "-mstack-protector-guard-reg=reg"
  16139. .IP "\fB\-mstack\-protector\-guard\-offset=\fR\fIoffset\fR" 4
  16140. .IX Item "-mstack-protector-guard-offset=offset"
  16141. .PD
  16142. Generate stack protection code using canary at \fIguard\fR. Supported
  16143. locations are \fBglobal\fR for a global canary or \fBsysreg\fR for a
  16144. canary in an appropriate system register.
  16145. .Sp
  16146. With the latter choice the options
  16147. \&\fB\-mstack\-protector\-guard\-reg=\fR\fIreg\fR and
  16148. \&\fB\-mstack\-protector\-guard\-offset=\fR\fIoffset\fR furthermore specify
  16149. which system register to use as base register for reading the canary,
  16150. and from what offset from that base register. There is no default
  16151. register or offset as this is entirely for use within the Linux
  16152. kernel.
  16153. .IP "\fB\-mtls\-dialect=desc\fR" 4
  16154. .IX Item "-mtls-dialect=desc"
  16155. Use \s-1TLS\s0 descriptors as the thread-local storage mechanism for dynamic accesses
  16156. of \s-1TLS\s0 variables. This is the default.
  16157. .IP "\fB\-mtls\-dialect=traditional\fR" 4
  16158. .IX Item "-mtls-dialect=traditional"
  16159. Use traditional \s-1TLS\s0 as the thread-local storage mechanism for dynamic accesses
  16160. of \s-1TLS\s0 variables.
  16161. .IP "\fB\-mtls\-size=\fR\fIsize\fR" 4
  16162. .IX Item "-mtls-size=size"
  16163. Specify bit size of immediate \s-1TLS\s0 offsets. Valid values are 12, 24, 32, 48.
  16164. This option requires binutils 2.26 or newer.
  16165. .IP "\fB\-mfix\-cortex\-a53\-835769\fR" 4
  16166. .IX Item "-mfix-cortex-a53-835769"
  16167. .PD 0
  16168. .IP "\fB\-mno\-fix\-cortex\-a53\-835769\fR" 4
  16169. .IX Item "-mno-fix-cortex-a53-835769"
  16170. .PD
  16171. Enable or disable the workaround for the \s-1ARM\s0 Cortex\-A53 erratum number 835769.
  16172. This involves inserting a \s-1NOP\s0 instruction between memory instructions and
  16173. 64\-bit integer multiply-accumulate instructions.
  16174. .IP "\fB\-mfix\-cortex\-a53\-843419\fR" 4
  16175. .IX Item "-mfix-cortex-a53-843419"
  16176. .PD 0
  16177. .IP "\fB\-mno\-fix\-cortex\-a53\-843419\fR" 4
  16178. .IX Item "-mno-fix-cortex-a53-843419"
  16179. .PD
  16180. Enable or disable the workaround for the \s-1ARM\s0 Cortex\-A53 erratum number 843419.
  16181. This erratum workaround is made at link time and this will only pass the
  16182. corresponding flag to the linker.
  16183. .IP "\fB\-mlow\-precision\-recip\-sqrt\fR" 4
  16184. .IX Item "-mlow-precision-recip-sqrt"
  16185. .PD 0
  16186. .IP "\fB\-mno\-low\-precision\-recip\-sqrt\fR" 4
  16187. .IX Item "-mno-low-precision-recip-sqrt"
  16188. .PD
  16189. Enable or disable the reciprocal square root approximation.
  16190. This option only has an effect if \fB\-ffast\-math\fR or
  16191. \&\fB\-funsafe\-math\-optimizations\fR is used as well. Enabling this reduces
  16192. precision of reciprocal square root results to about 16 bits for
  16193. single precision and to 32 bits for double precision.
  16194. .IP "\fB\-mlow\-precision\-sqrt\fR" 4
  16195. .IX Item "-mlow-precision-sqrt"
  16196. .PD 0
  16197. .IP "\fB\-mno\-low\-precision\-sqrt\fR" 4
  16198. .IX Item "-mno-low-precision-sqrt"
  16199. .PD
  16200. Enable or disable the square root approximation.
  16201. This option only has an effect if \fB\-ffast\-math\fR or
  16202. \&\fB\-funsafe\-math\-optimizations\fR is used as well. Enabling this reduces
  16203. precision of square root results to about 16 bits for
  16204. single precision and to 32 bits for double precision.
  16205. If enabled, it implies \fB\-mlow\-precision\-recip\-sqrt\fR.
  16206. .IP "\fB\-mlow\-precision\-div\fR" 4
  16207. .IX Item "-mlow-precision-div"
  16208. .PD 0
  16209. .IP "\fB\-mno\-low\-precision\-div\fR" 4
  16210. .IX Item "-mno-low-precision-div"
  16211. .PD
  16212. Enable or disable the division approximation.
  16213. This option only has an effect if \fB\-ffast\-math\fR or
  16214. \&\fB\-funsafe\-math\-optimizations\fR is used as well. Enabling this reduces
  16215. precision of division results to about 16 bits for
  16216. single precision and to 32 bits for double precision.
  16217. .IP "\fB\-mtrack\-speculation\fR" 4
  16218. .IX Item "-mtrack-speculation"
  16219. .PD 0
  16220. .IP "\fB\-mno\-track\-speculation\fR" 4
  16221. .IX Item "-mno-track-speculation"
  16222. .PD
  16223. Enable or disable generation of additional code to track speculative
  16224. execution through conditional branches. The tracking state can then
  16225. be used by the compiler when expanding calls to
  16226. \&\f(CW\*(C`_\|_builtin_speculation_safe_copy\*(C'\fR to permit a more efficient code
  16227. sequence to be generated.
  16228. .IP "\fB\-moutline\-atomics\fR" 4
  16229. .IX Item "-moutline-atomics"
  16230. .PD 0
  16231. .IP "\fB\-mno\-outline\-atomics\fR" 4
  16232. .IX Item "-mno-outline-atomics"
  16233. .PD
  16234. Enable or disable calls to out-of-line helpers to implement atomic operations.
  16235. These helpers will, at runtime, determine if the \s-1LSE\s0 instructions from
  16236. ARMv8.1\-A can be used; if not, they will use the load/store\-exclusive
  16237. instructions that are present in the base ARMv8.0 \s-1ISA.\s0
  16238. .Sp
  16239. This option is only applicable when compiling for the base ARMv8.0
  16240. instruction set. If using a later revision, e.g. \fB\-march=armv8.1\-a\fR
  16241. or \fB\-march=armv8\-a+lse\fR, the ARMv8.1\-Atomics instructions will be
  16242. used directly. The same applies when using \fB\-mcpu=\fR when the
  16243. selected cpu supports the \fBlse\fR feature.
  16244. This option is on by default.
  16245. .IP "\fB\-march=\fR\fIname\fR" 4
  16246. .IX Item "-march=name"
  16247. Specify the name of the target architecture and, optionally, one or
  16248. more feature modifiers. This option has the form
  16249. \&\fB\-march=\fR\fIarch\fR{\fB+\fR[\fBno\fR]\fIfeature\fR}*.
  16250. .Sp
  16251. The table below summarizes the permissible values for \fIarch\fR
  16252. and the features that they enable by default:
  16253. .RS 4
  16254. .IP "\fIarch\fR \fIvalue\fR : \fIArchitecture\fR : \fIIncludes by default\fR" 4
  16255. .IX Item "arch value : Architecture : Includes by default"
  16256. .PD 0
  16257. .IP "\fBarmv8\-a\fR : Armv8\-A : \fB+fp\fR, \fB+simd\fR" 4
  16258. .IX Item "armv8-a : Armv8-A : +fp, +simd"
  16259. .IP "\fBarmv8.1\-a\fR : Armv8.1\-A : \fBarmv8\-a\fR, \fB+crc\fR, \fB+lse\fR, \fB+rdma\fR" 4
  16260. .IX Item "armv8.1-a : Armv8.1-A : armv8-a, +crc, +lse, +rdma"
  16261. .IP "\fBarmv8.2\-a\fR : Armv8.2\-A : \fBarmv8.1\-a\fR" 4
  16262. .IX Item "armv8.2-a : Armv8.2-A : armv8.1-a"
  16263. .IP "\fBarmv8.3\-a\fR : Armv8.3\-A : \fBarmv8.2\-a\fR" 4
  16264. .IX Item "armv8.3-a : Armv8.3-A : armv8.2-a"
  16265. .IP "\fBarmv8.4\-a\fR : Armv8.4\-A : \fBarmv8.3\-a\fR, \fB+fp16fml\fR, \fB+dotprod\fR" 4
  16266. .IX Item "armv8.4-a : Armv8.4-A : armv8.3-a, +fp16fml, +dotprod"
  16267. .IP "\fBarmv8.5\-a\fR : Armv8.5\-A : \fBarmv8.4\-a\fR, \fB+sb\fR, \fB+ssbs\fR, \fB+predres\fR" 4
  16268. .IX Item "armv8.5-a : Armv8.5-A : armv8.4-a, +sb, +ssbs, +predres"
  16269. .IP "\fBarmv8.6\-a\fR : Armv8.6\-A : \fBarmv8.5\-a\fR, \fB+bf16\fR, \fB+i8mm\fR" 4
  16270. .IX Item "armv8.6-a : Armv8.6-A : armv8.5-a, +bf16, +i8mm"
  16271. .RE
  16272. .RS 4
  16273. .PD
  16274. .Sp
  16275. The value \fBnative\fR is available on native AArch64 GNU/Linux and
  16276. causes the compiler to pick the architecture of the host system. This
  16277. option has no effect if the compiler is unable to recognize the
  16278. architecture of the host system,
  16279. .Sp
  16280. The permissible values for \fIfeature\fR are listed in the sub-section
  16281. on \fBaarch64\-feature\-modifiers,,\fR\fB\-march\fR \fBand\fR \fB\-mcpu\fR
  16282. \&\fBFeature Modifiers\fR. Where conflicting feature modifiers are
  16283. specified, the right-most feature is used.
  16284. .Sp
  16285. \&\s-1GCC\s0 uses \fIname\fR to determine what kind of instructions it can emit
  16286. when generating assembly code. If \fB\-march\fR is specified
  16287. without either of \fB\-mtune\fR or \fB\-mcpu\fR also being
  16288. specified, the code is tuned to perform well across a range of target
  16289. processors implementing the target architecture.
  16290. .RE
  16291. .IP "\fB\-mtune=\fR\fIname\fR" 4
  16292. .IX Item "-mtune=name"
  16293. Specify the name of the target processor for which \s-1GCC\s0 should tune the
  16294. performance of the code. Permissible values for this option are:
  16295. \&\fBgeneric\fR, \fBcortex\-a35\fR, \fBcortex\-a53\fR, \fBcortex\-a55\fR,
  16296. \&\fBcortex\-a57\fR, \fBcortex\-a72\fR, \fBcortex\-a73\fR, \fBcortex\-a75\fR,
  16297. \&\fBcortex\-a76\fR, \fBcortex\-a76ae\fR, \fBcortex\-a77\fR,
  16298. \&\fBcortex\-a65\fR, \fBcortex\-a65ae\fR, \fBcortex\-a34\fR,
  16299. \&\fBares\fR, \fBexynos\-m1\fR, \fBemag\fR, \fBfalkor\fR, \fBneoverse\-e1\fR,
  16300. \&\fBneoverse\-n1\fR, \fBneoverse\-n2\fR, \fBneoverse\-v1\fR, \fBqdf24xx\fR,
  16301. \&\fBsaphira\fR, \fBphecda\fR, \fBxgene1\fR, \fBvulcan\fR, \fBocteontx\fR,
  16302. \&\fBocteontx81\fR, \fBocteontx83\fR,
  16303. \&\fBocteontx2\fR, \fBocteontx2t98\fR, \fBocteontx2t96\fR
  16304. \&\fBocteontx2t93\fR, \fBocteontx2f95\fR, \fBocteontx2f95n\fR,
  16305. \&\fBocteontx2f95mm\fR,
  16306. \&\fBa64fx\fR,
  16307. \&\fBthunderx\fR, \fBthunderxt88\fR,
  16308. \&\fBthunderxt88p1\fR, \fBthunderxt81\fR, \fBtsv110\fR,
  16309. \&\fBthunderxt83\fR, \fBthunderx2t99\fR, \fBthunderx3t110\fR, \fBzeus\fR,
  16310. \&\fBcortex\-a57.cortex\-a53\fR, \fBcortex\-a72.cortex\-a53\fR,
  16311. \&\fBcortex\-a73.cortex\-a35\fR, \fBcortex\-a73.cortex\-a53\fR,
  16312. \&\fBcortex\-a75.cortex\-a55\fR, \fBcortex\-a76.cortex\-a55\fR
  16313. \&\fBnative\fR.
  16314. .Sp
  16315. The values \fBcortex\-a57.cortex\-a53\fR, \fBcortex\-a72.cortex\-a53\fR,
  16316. \&\fBcortex\-a73.cortex\-a35\fR, \fBcortex\-a73.cortex\-a53\fR,
  16317. \&\fBcortex\-a75.cortex\-a55\fR, \fBcortex\-a76.cortex\-a55\fR specify that \s-1GCC\s0
  16318. should tune for a big.LITTLE system.
  16319. .Sp
  16320. Additionally on native AArch64 GNU/Linux systems the value
  16321. \&\fBnative\fR tunes performance to the host system. This option has no effect
  16322. if the compiler is unable to recognize the processor of the host system.
  16323. .Sp
  16324. Where none of \fB\-mtune=\fR, \fB\-mcpu=\fR or \fB\-march=\fR
  16325. are specified, the code is tuned to perform well across a range
  16326. of target processors.
  16327. .Sp
  16328. This option cannot be suffixed by feature modifiers.
  16329. .IP "\fB\-mcpu=\fR\fIname\fR" 4
  16330. .IX Item "-mcpu=name"
  16331. Specify the name of the target processor, optionally suffixed by one
  16332. or more feature modifiers. This option has the form
  16333. \&\fB\-mcpu=\fR\fIcpu\fR{\fB+\fR[\fBno\fR]\fIfeature\fR}*, where
  16334. the permissible values for \fIcpu\fR are the same as those available
  16335. for \fB\-mtune\fR. The permissible values for \fIfeature\fR are
  16336. documented in the sub-section on
  16337. \&\fBaarch64\-feature\-modifiers,,\fR\fB\-march\fR \fBand\fR \fB\-mcpu\fR
  16338. \&\fBFeature Modifiers\fR. Where conflicting feature modifiers are
  16339. specified, the right-most feature is used.
  16340. .Sp
  16341. \&\s-1GCC\s0 uses \fIname\fR to determine what kind of instructions it can emit when
  16342. generating assembly code (as if by \fB\-march\fR) and to determine
  16343. the target processor for which to tune for performance (as if
  16344. by \fB\-mtune\fR). Where this option is used in conjunction
  16345. with \fB\-march\fR or \fB\-mtune\fR, those options take precedence
  16346. over the appropriate part of this option.
  16347. .IP "\fB\-moverride=\fR\fIstring\fR" 4
  16348. .IX Item "-moverride=string"
  16349. Override tuning decisions made by the back-end in response to a
  16350. \&\fB\-mtune=\fR switch. The syntax, semantics, and accepted values
  16351. for \fIstring\fR in this option are not guaranteed to be consistent
  16352. across releases.
  16353. .Sp
  16354. This option is only intended to be useful when developing \s-1GCC.\s0
  16355. .IP "\fB\-mverbose\-cost\-dump\fR" 4
  16356. .IX Item "-mverbose-cost-dump"
  16357. Enable verbose cost model dumping in the debug dump files. This option is
  16358. provided for use in debugging the compiler.
  16359. .IP "\fB\-mpc\-relative\-literal\-loads\fR" 4
  16360. .IX Item "-mpc-relative-literal-loads"
  16361. .PD 0
  16362. .IP "\fB\-mno\-pc\-relative\-literal\-loads\fR" 4
  16363. .IX Item "-mno-pc-relative-literal-loads"
  16364. .PD
  16365. Enable or disable PC-relative literal loads. With this option literal pools are
  16366. accessed using a single instruction and emitted after each function. This
  16367. limits the maximum size of functions to 1MB. This is enabled by default for
  16368. \&\fB\-mcmodel=tiny\fR.
  16369. .IP "\fB\-msign\-return\-address=\fR\fIscope\fR" 4
  16370. .IX Item "-msign-return-address=scope"
  16371. Select the function scope on which return address signing will be applied.
  16372. Permissible values are \fBnone\fR, which disables return address signing,
  16373. \&\fBnon-leaf\fR, which enables pointer signing for functions which are not leaf
  16374. functions, and \fBall\fR, which enables pointer signing for all functions. The
  16375. default value is \fBnone\fR. This option has been deprecated by
  16376. \&\-mbranch\-protection.
  16377. .IP "\fB\-mbranch\-protection=\fR\fInone\fR\fB|\fR\fIstandard\fR\fB|\fR\fIpac-ret\fR\fB[+\fR\fIleaf\fR\fB+\fR\fIb\-key\fR\fB]|\fR\fIbti\fR" 4
  16378. .IX Item "-mbranch-protection=none|standard|pac-ret[+leaf+b-key]|bti"
  16379. Select the branch protection features to use.
  16380. \&\fBnone\fR is the default and turns off all types of branch protection.
  16381. \&\fBstandard\fR turns on all types of branch protection features. If a feature
  16382. has additional tuning options, then \fBstandard\fR sets it to its standard
  16383. level.
  16384. \&\fBpac\-ret[+\fR\fIleaf\fR\fB]\fR turns on return address signing to its standard
  16385. level: signing functions that save the return address to memory (non-leaf
  16386. functions will practically always do this) using the a\-key. The optional
  16387. argument \fBleaf\fR can be used to extend the signing to include leaf
  16388. functions. The optional argument \fBb\-key\fR can be used to sign the functions
  16389. with the B\-key instead of the A\-key.
  16390. \&\fBbti\fR turns on branch target identification mechanism.
  16391. .IP "\fB\-mharden\-sls=\fR\fIopts\fR" 4
  16392. .IX Item "-mharden-sls=opts"
  16393. Enable compiler hardening against straight line speculation (\s-1SLS\s0).
  16394. \&\fIopts\fR is a comma-separated list of the following options:
  16395. .RS 4
  16396. .IP "\fBretbr\fR" 4
  16397. .IX Item "retbr"
  16398. .PD 0
  16399. .IP "\fBblr\fR" 4
  16400. .IX Item "blr"
  16401. .RE
  16402. .RS 4
  16403. .PD
  16404. .Sp
  16405. In addition, \fB\-mharden\-sls=all\fR enables all \s-1SLS\s0 hardening while
  16406. \&\fB\-mharden\-sls=none\fR disables all \s-1SLS\s0 hardening.
  16407. .RE
  16408. .IP "\fB\-msve\-vector\-bits=\fR\fIbits\fR" 4
  16409. .IX Item "-msve-vector-bits=bits"
  16410. Specify the number of bits in an \s-1SVE\s0 vector register. This option only has
  16411. an effect when \s-1SVE\s0 is enabled.
  16412. .Sp
  16413. \&\s-1GCC\s0 supports two forms of \s-1SVE\s0 code generation: \*(L"vector-length
  16414. agnostic\*(R" output that works with any size of vector register and
  16415. \&\*(L"vector-length specific\*(R" output that allows \s-1GCC\s0 to make assumptions
  16416. about the vector length when it is useful for optimization reasons.
  16417. The possible values of \fBbits\fR are: \fBscalable\fR, \fB128\fR,
  16418. \&\fB256\fR, \fB512\fR, \fB1024\fR and \fB2048\fR.
  16419. Specifying \fBscalable\fR selects vector-length agnostic
  16420. output. At present \fB\-msve\-vector\-bits=128\fR also generates vector-length
  16421. agnostic output for big-endian targets. All other values generate
  16422. vector-length specific code. The behavior of these values may change
  16423. in future releases and no value except \fBscalable\fR should be
  16424. relied on for producing code that is portable across different
  16425. hardware \s-1SVE\s0 vector lengths.
  16426. .Sp
  16427. The default is \fB\-msve\-vector\-bits=scalable\fR, which produces
  16428. vector-length agnostic code.
  16429. .PP
  16430. \fB\-march\fR and \fB\-mcpu\fR Feature Modifiers
  16431. .IX Subsection "-march and -mcpu Feature Modifiers"
  16432. .PP
  16433. Feature modifiers used with \fB\-march\fR and \fB\-mcpu\fR can be any of
  16434. the following and their inverses \fBno\fR\fIfeature\fR:
  16435. .IP "\fBcrc\fR" 4
  16436. .IX Item "crc"
  16437. Enable \s-1CRC\s0 extension. This is on by default for
  16438. \&\fB\-march=armv8.1\-a\fR.
  16439. .IP "\fBcrypto\fR" 4
  16440. .IX Item "crypto"
  16441. Enable Crypto extension. This also enables Advanced \s-1SIMD\s0 and floating-point
  16442. instructions.
  16443. .IP "\fBfp\fR" 4
  16444. .IX Item "fp"
  16445. Enable floating-point instructions. This is on by default for all possible
  16446. values for options \fB\-march\fR and \fB\-mcpu\fR.
  16447. .IP "\fBsimd\fR" 4
  16448. .IX Item "simd"
  16449. Enable Advanced \s-1SIMD\s0 instructions. This also enables floating-point
  16450. instructions. This is on by default for all possible values for options
  16451. \&\fB\-march\fR and \fB\-mcpu\fR.
  16452. .IP "\fBsve\fR" 4
  16453. .IX Item "sve"
  16454. Enable Scalable Vector Extension instructions. This also enables Advanced
  16455. \&\s-1SIMD\s0 and floating-point instructions.
  16456. .IP "\fBlse\fR" 4
  16457. .IX Item "lse"
  16458. Enable Large System Extension instructions. This is on by default for
  16459. \&\fB\-march=armv8.1\-a\fR.
  16460. .IP "\fBrdma\fR" 4
  16461. .IX Item "rdma"
  16462. Enable Round Double Multiply Accumulate instructions. This is on by default
  16463. for \fB\-march=armv8.1\-a\fR.
  16464. .IP "\fBfp16\fR" 4
  16465. .IX Item "fp16"
  16466. Enable \s-1FP16\s0 extension. This also enables floating-point instructions.
  16467. .IP "\fBfp16fml\fR" 4
  16468. .IX Item "fp16fml"
  16469. Enable \s-1FP16\s0 fmla extension. This also enables \s-1FP16\s0 extensions and
  16470. floating-point instructions. This option is enabled by default for \fB\-march=armv8.4\-a\fR. Use of this option with architectures prior to Armv8.2\-A is not supported.
  16471. .IP "\fBrcpc\fR" 4
  16472. .IX Item "rcpc"
  16473. Enable the RcPc extension. This does not change code generation from \s-1GCC,\s0
  16474. but is passed on to the assembler, enabling inline asm statements to use
  16475. instructions from the RcPc extension.
  16476. .IP "\fBdotprod\fR" 4
  16477. .IX Item "dotprod"
  16478. Enable the Dot Product extension. This also enables Advanced \s-1SIMD\s0 instructions.
  16479. .IP "\fBaes\fR" 4
  16480. .IX Item "aes"
  16481. Enable the Armv8\-a aes and pmull crypto extension. This also enables Advanced
  16482. \&\s-1SIMD\s0 instructions.
  16483. .IP "\fBsha2\fR" 4
  16484. .IX Item "sha2"
  16485. Enable the Armv8\-a sha2 crypto extension. This also enables Advanced \s-1SIMD\s0 instructions.
  16486. .IP "\fBsha3\fR" 4
  16487. .IX Item "sha3"
  16488. Enable the sha512 and sha3 crypto extension. This also enables Advanced \s-1SIMD\s0
  16489. instructions. Use of this option with architectures prior to Armv8.2\-A is not supported.
  16490. .IP "\fBsm4\fR" 4
  16491. .IX Item "sm4"
  16492. Enable the sm3 and sm4 crypto extension. This also enables Advanced \s-1SIMD\s0 instructions.
  16493. Use of this option with architectures prior to Armv8.2\-A is not supported.
  16494. .IP "\fBprofile\fR" 4
  16495. .IX Item "profile"
  16496. Enable the Statistical Profiling extension. This option is only to enable the
  16497. extension at the assembler level and does not affect code generation.
  16498. .IP "\fBrng\fR" 4
  16499. .IX Item "rng"
  16500. Enable the Armv8.5\-a Random Number instructions. This option is only to
  16501. enable the extension at the assembler level and does not affect code
  16502. generation.
  16503. .IP "\fBmemtag\fR" 4
  16504. .IX Item "memtag"
  16505. Enable the Armv8.5\-a Memory Tagging Extensions.
  16506. Use of this option with architectures prior to Armv8.5\-A is not supported.
  16507. .IP "\fBsb\fR" 4
  16508. .IX Item "sb"
  16509. Enable the Armv8\-a Speculation Barrier instruction. This option is only to
  16510. enable the extension at the assembler level and does not affect code
  16511. generation. This option is enabled by default for \fB\-march=armv8.5\-a\fR.
  16512. .IP "\fBssbs\fR" 4
  16513. .IX Item "ssbs"
  16514. Enable the Armv8\-a Speculative Store Bypass Safe instruction. This option
  16515. is only to enable the extension at the assembler level and does not affect code
  16516. generation. This option is enabled by default for \fB\-march=armv8.5\-a\fR.
  16517. .IP "\fBpredres\fR" 4
  16518. .IX Item "predres"
  16519. Enable the Armv8\-a Execution and Data Prediction Restriction instructions.
  16520. This option is only to enable the extension at the assembler level and does
  16521. not affect code generation. This option is enabled by default for
  16522. \&\fB\-march=armv8.5\-a\fR.
  16523. .IP "\fBsve2\fR" 4
  16524. .IX Item "sve2"
  16525. Enable the Armv8\-a Scalable Vector Extension 2. This also enables \s-1SVE\s0
  16526. instructions.
  16527. .IP "\fBsve2\-bitperm\fR" 4
  16528. .IX Item "sve2-bitperm"
  16529. Enable \s-1SVE2\s0 bitperm instructions. This also enables \s-1SVE2\s0 instructions.
  16530. .IP "\fBsve2\-sm4\fR" 4
  16531. .IX Item "sve2-sm4"
  16532. Enable \s-1SVE2\s0 sm4 instructions. This also enables \s-1SVE2\s0 instructions.
  16533. .IP "\fBsve2\-aes\fR" 4
  16534. .IX Item "sve2-aes"
  16535. Enable \s-1SVE2\s0 aes instructions. This also enables \s-1SVE2\s0 instructions.
  16536. .IP "\fBsve2\-sha3\fR" 4
  16537. .IX Item "sve2-sha3"
  16538. Enable \s-1SVE2\s0 sha3 instructions. This also enables \s-1SVE2\s0 instructions.
  16539. .IP "\fBtme\fR" 4
  16540. .IX Item "tme"
  16541. Enable the Transactional Memory Extension.
  16542. .IP "\fBi8mm\fR" 4
  16543. .IX Item "i8mm"
  16544. Enable 8\-bit Integer Matrix Multiply instructions. This also enables
  16545. Advanced \s-1SIMD\s0 and floating-point instructions. This option is enabled by
  16546. default for \fB\-march=armv8.6\-a\fR. Use of this option with architectures
  16547. prior to Armv8.2\-A is not supported.
  16548. .IP "\fBf32mm\fR" 4
  16549. .IX Item "f32mm"
  16550. Enable 32\-bit Floating point Matrix Multiply instructions. This also enables
  16551. \&\s-1SVE\s0 instructions. Use of this option with architectures prior to Armv8.2\-A is
  16552. not supported.
  16553. .IP "\fBf64mm\fR" 4
  16554. .IX Item "f64mm"
  16555. Enable 64\-bit Floating point Matrix Multiply instructions. This also enables
  16556. \&\s-1SVE\s0 instructions. Use of this option with architectures prior to Armv8.2\-A is
  16557. not supported.
  16558. .IP "\fBbf16\fR" 4
  16559. .IX Item "bf16"
  16560. Enable brain half-precision floating-point instructions. This also enables
  16561. Advanced \s-1SIMD\s0 and floating-point instructions. This option is enabled by
  16562. default for \fB\-march=armv8.6\-a\fR. Use of this option with architectures
  16563. prior to Armv8.2\-A is not supported.
  16564. .PP
  16565. Feature \fBcrypto\fR implies \fBaes\fR, \fBsha2\fR, and \fBsimd\fR,
  16566. which implies \fBfp\fR.
  16567. Conversely, \fBnofp\fR implies \fBnosimd\fR, which implies
  16568. \&\fBnocrypto\fR, \fBnoaes\fR and \fBnosha2\fR.
  16569. .PP
  16570. \fIAdapteva Epiphany Options\fR
  16571. .IX Subsection "Adapteva Epiphany Options"
  16572. .PP
  16573. These \fB\-m\fR options are defined for Adapteva Epiphany:
  16574. .IP "\fB\-mhalf\-reg\-file\fR" 4
  16575. .IX Item "-mhalf-reg-file"
  16576. Don't allocate any register in the range \f(CW\*(C`r32\*(C'\fR...\f(CW\*(C`r63\*(C'\fR.
  16577. That allows code to run on hardware variants that lack these registers.
  16578. .IP "\fB\-mprefer\-short\-insn\-regs\fR" 4
  16579. .IX Item "-mprefer-short-insn-regs"
  16580. Preferentially allocate registers that allow short instruction generation.
  16581. This can result in increased instruction count, so this may either reduce or
  16582. increase overall code size.
  16583. .IP "\fB\-mbranch\-cost=\fR\fInum\fR" 4
  16584. .IX Item "-mbranch-cost=num"
  16585. Set the cost of branches to roughly \fInum\fR \*(L"simple\*(R" instructions.
  16586. This cost is only a heuristic and is not guaranteed to produce
  16587. consistent results across releases.
  16588. .IP "\fB\-mcmove\fR" 4
  16589. .IX Item "-mcmove"
  16590. Enable the generation of conditional moves.
  16591. .IP "\fB\-mnops=\fR\fInum\fR" 4
  16592. .IX Item "-mnops=num"
  16593. Emit \fInum\fR NOPs before every other generated instruction.
  16594. .IP "\fB\-mno\-soft\-cmpsf\fR" 4
  16595. .IX Item "-mno-soft-cmpsf"
  16596. For single-precision floating-point comparisons, emit an \f(CW\*(C`fsub\*(C'\fR instruction
  16597. and test the flags. This is faster than a software comparison, but can
  16598. get incorrect results in the presence of NaNs, or when two different small
  16599. numbers are compared such that their difference is calculated as zero.
  16600. The default is \fB\-msoft\-cmpsf\fR, which uses slower, but IEEE-compliant,
  16601. software comparisons.
  16602. .IP "\fB\-mstack\-offset=\fR\fInum\fR" 4
  16603. .IX Item "-mstack-offset=num"
  16604. Set the offset between the top of the stack and the stack pointer.
  16605. E.g., a value of 8 means that the eight bytes in the range \f(CW\*(C`sp+0...sp+7\*(C'\fR
  16606. can be used by leaf functions without stack allocation.
  16607. Values other than \fB8\fR or \fB16\fR are untested and unlikely to work.
  16608. Note also that this option changes the \s-1ABI\s0; compiling a program with a
  16609. different stack offset than the libraries have been compiled with
  16610. generally does not work.
  16611. This option can be useful if you want to evaluate if a different stack
  16612. offset would give you better code, but to actually use a different stack
  16613. offset to build working programs, it is recommended to configure the
  16614. toolchain with the appropriate \fB\-\-with\-stack\-offset=\fR\fInum\fR option.
  16615. .IP "\fB\-mno\-round\-nearest\fR" 4
  16616. .IX Item "-mno-round-nearest"
  16617. Make the scheduler assume that the rounding mode has been set to
  16618. truncating. The default is \fB\-mround\-nearest\fR.
  16619. .IP "\fB\-mlong\-calls\fR" 4
  16620. .IX Item "-mlong-calls"
  16621. If not otherwise specified by an attribute, assume all calls might be beyond
  16622. the offset range of the \f(CW\*(C`b\*(C'\fR / \f(CW\*(C`bl\*(C'\fR instructions, and therefore load the
  16623. function address into a register before performing a (otherwise direct) call.
  16624. This is the default.
  16625. .IP "\fB\-mshort\-calls\fR" 4
  16626. .IX Item "-mshort-calls"
  16627. If not otherwise specified by an attribute, assume all direct calls are
  16628. in the range of the \f(CW\*(C`b\*(C'\fR / \f(CW\*(C`bl\*(C'\fR instructions, so use these instructions
  16629. for direct calls. The default is \fB\-mlong\-calls\fR.
  16630. .IP "\fB\-msmall16\fR" 4
  16631. .IX Item "-msmall16"
  16632. Assume addresses can be loaded as 16\-bit unsigned values. This does not
  16633. apply to function addresses for which \fB\-mlong\-calls\fR semantics
  16634. are in effect.
  16635. .IP "\fB\-mfp\-mode=\fR\fImode\fR" 4
  16636. .IX Item "-mfp-mode=mode"
  16637. Set the prevailing mode of the floating-point unit.
  16638. This determines the floating-point mode that is provided and expected
  16639. at function call and return time. Making this mode match the mode you
  16640. predominantly need at function start can make your programs smaller and
  16641. faster by avoiding unnecessary mode switches.
  16642. .Sp
  16643. \&\fImode\fR can be set to one the following values:
  16644. .RS 4
  16645. .IP "\fBcaller\fR" 4
  16646. .IX Item "caller"
  16647. Any mode at function entry is valid, and retained or restored when
  16648. the function returns, and when it calls other functions.
  16649. This mode is useful for compiling libraries or other compilation units
  16650. you might want to incorporate into different programs with different
  16651. prevailing \s-1FPU\s0 modes, and the convenience of being able to use a single
  16652. object file outweighs the size and speed overhead for any extra
  16653. mode switching that might be needed, compared with what would be needed
  16654. with a more specific choice of prevailing \s-1FPU\s0 mode.
  16655. .IP "\fBtruncate\fR" 4
  16656. .IX Item "truncate"
  16657. This is the mode used for floating-point calculations with
  16658. truncating (i.e. round towards zero) rounding mode. That includes
  16659. conversion from floating point to integer.
  16660. .IP "\fBround-nearest\fR" 4
  16661. .IX Item "round-nearest"
  16662. This is the mode used for floating-point calculations with
  16663. round-to-nearest-or-even rounding mode.
  16664. .IP "\fBint\fR" 4
  16665. .IX Item "int"
  16666. This is the mode used to perform integer calculations in the \s-1FPU,\s0 e.g.
  16667. integer multiply, or integer multiply-and-accumulate.
  16668. .RE
  16669. .RS 4
  16670. .Sp
  16671. The default is \fB\-mfp\-mode=caller\fR
  16672. .RE
  16673. .IP "\fB\-mno\-split\-lohi\fR" 4
  16674. .IX Item "-mno-split-lohi"
  16675. .PD 0
  16676. .IP "\fB\-mno\-postinc\fR" 4
  16677. .IX Item "-mno-postinc"
  16678. .IP "\fB\-mno\-postmodify\fR" 4
  16679. .IX Item "-mno-postmodify"
  16680. .PD
  16681. Code generation tweaks that disable, respectively, splitting of 32\-bit
  16682. loads, generation of post-increment addresses, and generation of
  16683. post-modify addresses. The defaults are \fBmsplit-lohi\fR,
  16684. \&\fB\-mpost\-inc\fR, and \fB\-mpost\-modify\fR.
  16685. .IP "\fB\-mnovect\-double\fR" 4
  16686. .IX Item "-mnovect-double"
  16687. Change the preferred \s-1SIMD\s0 mode to SImode. The default is
  16688. \&\fB\-mvect\-double\fR, which uses DImode as preferred \s-1SIMD\s0 mode.
  16689. .IP "\fB\-max\-vect\-align=\fR\fInum\fR" 4
  16690. .IX Item "-max-vect-align=num"
  16691. The maximum alignment for \s-1SIMD\s0 vector mode types.
  16692. \&\fInum\fR may be 4 or 8. The default is 8.
  16693. Note that this is an \s-1ABI\s0 change, even though many library function
  16694. interfaces are unaffected if they don't use \s-1SIMD\s0 vector modes
  16695. in places that affect size and/or alignment of relevant types.
  16696. .IP "\fB\-msplit\-vecmove\-early\fR" 4
  16697. .IX Item "-msplit-vecmove-early"
  16698. Split vector moves into single word moves before reload. In theory this
  16699. can give better register allocation, but so far the reverse seems to be
  16700. generally the case.
  16701. .IP "\fB\-m1reg\-\fR\fIreg\fR" 4
  16702. .IX Item "-m1reg-reg"
  16703. Specify a register to hold the constant \-1, which makes loading small negative
  16704. constants and certain bitmasks faster.
  16705. Allowable values for \fIreg\fR are \fBr43\fR and \fBr63\fR,
  16706. which specify use of that register as a fixed register,
  16707. and \fBnone\fR, which means that no register is used for this
  16708. purpose. The default is \fB\-m1reg\-none\fR.
  16709. .PP
  16710. \fI\s-1AMD GCN\s0 Options\fR
  16711. .IX Subsection "AMD GCN Options"
  16712. .PP
  16713. These options are defined specifically for the \s-1AMD GCN\s0 port.
  16714. .IP "\fB\-march=\fR\fIgpu\fR" 4
  16715. .IX Item "-march=gpu"
  16716. .PD 0
  16717. .IP "\fB\-mtune=\fR\fIgpu\fR" 4
  16718. .IX Item "-mtune=gpu"
  16719. .PD
  16720. Set architecture type or tuning for \fIgpu\fR. Supported values for \fIgpu\fR
  16721. are
  16722. .RS 4
  16723. .IP "\fBfiji\fR" 4
  16724. .IX Item "fiji"
  16725. Compile for \s-1GCN3\s0 Fiji devices (gfx803).
  16726. .IP "\fBgfx900\fR" 4
  16727. .IX Item "gfx900"
  16728. Compile for \s-1GCN5\s0 Vega 10 devices (gfx900).
  16729. .IP "\fBgfx906\fR" 4
  16730. .IX Item "gfx906"
  16731. Compile for \s-1GCN5\s0 Vega 20 devices (gfx906).
  16732. .RE
  16733. .RS 4
  16734. .RE
  16735. .IP "\fB\-mstack\-size=\fR\fIbytes\fR" 4
  16736. .IX Item "-mstack-size=bytes"
  16737. Specify how many \fIbytes\fR of stack space will be requested for each \s-1GPU\s0
  16738. thread (wave-front). Beware that there may be many threads and limited memory
  16739. available. The size of the stack allocation may also have an impact on
  16740. run-time performance. The default is 32KB when using OpenACC or OpenMP, and
  16741. 1MB otherwise.
  16742. .PP
  16743. \fI\s-1ARC\s0 Options\fR
  16744. .IX Subsection "ARC Options"
  16745. .PP
  16746. The following options control the architecture variant for which code
  16747. is being compiled:
  16748. .IP "\fB\-mbarrel\-shifter\fR" 4
  16749. .IX Item "-mbarrel-shifter"
  16750. Generate instructions supported by barrel shifter. This is the default
  16751. unless \fB\-mcpu=ARC601\fR or \fB\-mcpu=ARCEM\fR is in effect.
  16752. .IP "\fB\-mjli\-always\fR" 4
  16753. .IX Item "-mjli-always"
  16754. Force to call a function using jli_s instruction. This option is
  16755. valid only for ARCv2 architecture.
  16756. .IP "\fB\-mcpu=\fR\fIcpu\fR" 4
  16757. .IX Item "-mcpu=cpu"
  16758. Set architecture type, register usage, and instruction scheduling
  16759. parameters for \fIcpu\fR. There are also shortcut alias options
  16760. available for backward compatibility and convenience. Supported
  16761. values for \fIcpu\fR are
  16762. .RS 4
  16763. .IP "\fBarc600\fR" 4
  16764. .IX Item "arc600"
  16765. Compile for \s-1ARC600. \s0 Aliases: \fB\-mA6\fR, \fB\-mARC600\fR.
  16766. .IP "\fBarc601\fR" 4
  16767. .IX Item "arc601"
  16768. Compile for \s-1ARC601. \s0 Alias: \fB\-mARC601\fR.
  16769. .IP "\fBarc700\fR" 4
  16770. .IX Item "arc700"
  16771. Compile for \s-1ARC700. \s0 Aliases: \fB\-mA7\fR, \fB\-mARC700\fR.
  16772. This is the default when configured with \fB\-\-with\-cpu=arc700\fR.
  16773. .IP "\fBarcem\fR" 4
  16774. .IX Item "arcem"
  16775. Compile for \s-1ARC EM.\s0
  16776. .IP "\fBarchs\fR" 4
  16777. .IX Item "archs"
  16778. Compile for \s-1ARC HS.\s0
  16779. .IP "\fBem\fR" 4
  16780. .IX Item "em"
  16781. Compile for \s-1ARC EM CPU\s0 with no hardware extensions.
  16782. .IP "\fBem4\fR" 4
  16783. .IX Item "em4"
  16784. Compile for \s-1ARC EM4 CPU.\s0
  16785. .IP "\fBem4_dmips\fR" 4
  16786. .IX Item "em4_dmips"
  16787. Compile for \s-1ARC EM4 DMIPS CPU.\s0
  16788. .IP "\fBem4_fpus\fR" 4
  16789. .IX Item "em4_fpus"
  16790. Compile for \s-1ARC EM4 DMIPS CPU\s0 with the single-precision floating-point
  16791. extension.
  16792. .IP "\fBem4_fpuda\fR" 4
  16793. .IX Item "em4_fpuda"
  16794. Compile for \s-1ARC EM4 DMIPS CPU\s0 with single-precision floating-point and
  16795. double assist instructions.
  16796. .IP "\fBhs\fR" 4
  16797. .IX Item "hs"
  16798. Compile for \s-1ARC HS CPU\s0 with no hardware extensions except the atomic
  16799. instructions.
  16800. .IP "\fBhs34\fR" 4
  16801. .IX Item "hs34"
  16802. Compile for \s-1ARC HS34 CPU.\s0
  16803. .IP "\fBhs38\fR" 4
  16804. .IX Item "hs38"
  16805. Compile for \s-1ARC HS38 CPU.\s0
  16806. .IP "\fBhs38_linux\fR" 4
  16807. .IX Item "hs38_linux"
  16808. Compile for \s-1ARC HS38 CPU\s0 with all hardware extensions on.
  16809. .IP "\fBarc600_norm\fR" 4
  16810. .IX Item "arc600_norm"
  16811. Compile for \s-1ARC 600 CPU\s0 with \f(CW\*(C`norm\*(C'\fR instructions enabled.
  16812. .IP "\fBarc600_mul32x16\fR" 4
  16813. .IX Item "arc600_mul32x16"
  16814. Compile for \s-1ARC 600 CPU\s0 with \f(CW\*(C`norm\*(C'\fR and 32x16\-bit multiply
  16815. instructions enabled.
  16816. .IP "\fBarc600_mul64\fR" 4
  16817. .IX Item "arc600_mul64"
  16818. Compile for \s-1ARC 600 CPU\s0 with \f(CW\*(C`norm\*(C'\fR and \f(CW\*(C`mul64\*(C'\fR\-family
  16819. instructions enabled.
  16820. .IP "\fBarc601_norm\fR" 4
  16821. .IX Item "arc601_norm"
  16822. Compile for \s-1ARC 601 CPU\s0 with \f(CW\*(C`norm\*(C'\fR instructions enabled.
  16823. .IP "\fBarc601_mul32x16\fR" 4
  16824. .IX Item "arc601_mul32x16"
  16825. Compile for \s-1ARC 601 CPU\s0 with \f(CW\*(C`norm\*(C'\fR and 32x16\-bit multiply
  16826. instructions enabled.
  16827. .IP "\fBarc601_mul64\fR" 4
  16828. .IX Item "arc601_mul64"
  16829. Compile for \s-1ARC 601 CPU\s0 with \f(CW\*(C`norm\*(C'\fR and \f(CW\*(C`mul64\*(C'\fR\-family
  16830. instructions enabled.
  16831. .IP "\fBnps400\fR" 4
  16832. .IX Item "nps400"
  16833. Compile for \s-1ARC 700\s0 on \s-1NPS400\s0 chip.
  16834. .IP "\fBem_mini\fR" 4
  16835. .IX Item "em_mini"
  16836. Compile for \s-1ARC EM\s0 minimalist configuration featuring reduced register
  16837. set.
  16838. .RE
  16839. .RS 4
  16840. .RE
  16841. .IP "\fB\-mdpfp\fR" 4
  16842. .IX Item "-mdpfp"
  16843. .PD 0
  16844. .IP "\fB\-mdpfp\-compact\fR" 4
  16845. .IX Item "-mdpfp-compact"
  16846. .PD
  16847. Generate double-precision \s-1FPX\s0 instructions, tuned for the compact
  16848. implementation.
  16849. .IP "\fB\-mdpfp\-fast\fR" 4
  16850. .IX Item "-mdpfp-fast"
  16851. Generate double-precision \s-1FPX\s0 instructions, tuned for the fast
  16852. implementation.
  16853. .IP "\fB\-mno\-dpfp\-lrsr\fR" 4
  16854. .IX Item "-mno-dpfp-lrsr"
  16855. Disable \f(CW\*(C`lr\*(C'\fR and \f(CW\*(C`sr\*(C'\fR instructions from using \s-1FPX\s0 extension
  16856. aux registers.
  16857. .IP "\fB\-mea\fR" 4
  16858. .IX Item "-mea"
  16859. Generate extended arithmetic instructions. Currently only
  16860. \&\f(CW\*(C`divaw\*(C'\fR, \f(CW\*(C`adds\*(C'\fR, \f(CW\*(C`subs\*(C'\fR, and \f(CW\*(C`sat16\*(C'\fR are
  16861. supported. Only valid for \fB\-mcpu=ARC700\fR.
  16862. .IP "\fB\-mno\-mpy\fR" 4
  16863. .IX Item "-mno-mpy"
  16864. Do not generate \f(CW\*(C`mpy\*(C'\fR\-family instructions for \s-1ARC700. \s0 This option is
  16865. deprecated.
  16866. .IP "\fB\-mmul32x16\fR" 4
  16867. .IX Item "-mmul32x16"
  16868. Generate 32x16\-bit multiply and multiply-accumulate instructions.
  16869. .IP "\fB\-mmul64\fR" 4
  16870. .IX Item "-mmul64"
  16871. Generate \f(CW\*(C`mul64\*(C'\fR and \f(CW\*(C`mulu64\*(C'\fR instructions.
  16872. Only valid for \fB\-mcpu=ARC600\fR.
  16873. .IP "\fB\-mnorm\fR" 4
  16874. .IX Item "-mnorm"
  16875. Generate \f(CW\*(C`norm\*(C'\fR instructions. This is the default if \fB\-mcpu=ARC700\fR
  16876. is in effect.
  16877. .IP "\fB\-mspfp\fR" 4
  16878. .IX Item "-mspfp"
  16879. .PD 0
  16880. .IP "\fB\-mspfp\-compact\fR" 4
  16881. .IX Item "-mspfp-compact"
  16882. .PD
  16883. Generate single-precision \s-1FPX\s0 instructions, tuned for the compact
  16884. implementation.
  16885. .IP "\fB\-mspfp\-fast\fR" 4
  16886. .IX Item "-mspfp-fast"
  16887. Generate single-precision \s-1FPX\s0 instructions, tuned for the fast
  16888. implementation.
  16889. .IP "\fB\-msimd\fR" 4
  16890. .IX Item "-msimd"
  16891. Enable generation of \s-1ARC SIMD\s0 instructions via target-specific
  16892. builtins. Only valid for \fB\-mcpu=ARC700\fR.
  16893. .IP "\fB\-msoft\-float\fR" 4
  16894. .IX Item "-msoft-float"
  16895. This option ignored; it is provided for compatibility purposes only.
  16896. Software floating-point code is emitted by default, and this default
  16897. can overridden by \s-1FPX\s0 options; \fB\-mspfp\fR, \fB\-mspfp\-compact\fR, or
  16898. \&\fB\-mspfp\-fast\fR for single precision, and \fB\-mdpfp\fR,
  16899. \&\fB\-mdpfp\-compact\fR, or \fB\-mdpfp\-fast\fR for double precision.
  16900. .IP "\fB\-mswap\fR" 4
  16901. .IX Item "-mswap"
  16902. Generate \f(CW\*(C`swap\*(C'\fR instructions.
  16903. .IP "\fB\-matomic\fR" 4
  16904. .IX Item "-matomic"
  16905. This enables use of the locked load/store conditional extension to implement
  16906. atomic memory built-in functions. Not available for \s-1ARC\s0 6xx or \s-1ARC
  16907. EM\s0 cores.
  16908. .IP "\fB\-mdiv\-rem\fR" 4
  16909. .IX Item "-mdiv-rem"
  16910. Enable \f(CW\*(C`div\*(C'\fR and \f(CW\*(C`rem\*(C'\fR instructions for ARCv2 cores.
  16911. .IP "\fB\-mcode\-density\fR" 4
  16912. .IX Item "-mcode-density"
  16913. Enable code density instructions for \s-1ARC EM. \s0
  16914. This option is on by default for \s-1ARC HS.\s0
  16915. .IP "\fB\-mll64\fR" 4
  16916. .IX Item "-mll64"
  16917. Enable double load/store operations for \s-1ARC HS\s0 cores.
  16918. .IP "\fB\-mtp\-regno=\fR\fIregno\fR" 4
  16919. .IX Item "-mtp-regno=regno"
  16920. Specify thread pointer register number.
  16921. .IP "\fB\-mmpy\-option=\fR\fImulto\fR" 4
  16922. .IX Item "-mmpy-option=multo"
  16923. Compile ARCv2 code with a multiplier design option. You can specify
  16924. the option using either a string or numeric value for \fImulto\fR.
  16925. \&\fBwlh1\fR is the default value. The recognized values are:
  16926. .RS 4
  16927. .IP "\fB0\fR" 4
  16928. .IX Item "0"
  16929. .PD 0
  16930. .IP "\fBnone\fR" 4
  16931. .IX Item "none"
  16932. .PD
  16933. No multiplier available.
  16934. .IP "\fB1\fR" 4
  16935. .IX Item "1"
  16936. .PD 0
  16937. .IP "\fBw\fR" 4
  16938. .IX Item "w"
  16939. .PD
  16940. 16x16 multiplier, fully pipelined.
  16941. The following instructions are enabled: \f(CW\*(C`mpyw\*(C'\fR and \f(CW\*(C`mpyuw\*(C'\fR.
  16942. .IP "\fB2\fR" 4
  16943. .IX Item "2"
  16944. .PD 0
  16945. .IP "\fBwlh1\fR" 4
  16946. .IX Item "wlh1"
  16947. .PD
  16948. 32x32 multiplier, fully
  16949. pipelined (1 stage). The following instructions are additionally
  16950. enabled: \f(CW\*(C`mpy\*(C'\fR, \f(CW\*(C`mpyu\*(C'\fR, \f(CW\*(C`mpym\*(C'\fR, \f(CW\*(C`mpymu\*(C'\fR, and \f(CW\*(C`mpy_s\*(C'\fR.
  16951. .IP "\fB3\fR" 4
  16952. .IX Item "3"
  16953. .PD 0
  16954. .IP "\fBwlh2\fR" 4
  16955. .IX Item "wlh2"
  16956. .PD
  16957. 32x32 multiplier, fully pipelined
  16958. (2 stages). The following instructions are additionally enabled: \f(CW\*(C`mpy\*(C'\fR,
  16959. \&\f(CW\*(C`mpyu\*(C'\fR, \f(CW\*(C`mpym\*(C'\fR, \f(CW\*(C`mpymu\*(C'\fR, and \f(CW\*(C`mpy_s\*(C'\fR.
  16960. .IP "\fB4\fR" 4
  16961. .IX Item "4"
  16962. .PD 0
  16963. .IP "\fBwlh3\fR" 4
  16964. .IX Item "wlh3"
  16965. .PD
  16966. Two 16x16 multipliers, blocking,
  16967. sequential. The following instructions are additionally enabled: \f(CW\*(C`mpy\*(C'\fR,
  16968. \&\f(CW\*(C`mpyu\*(C'\fR, \f(CW\*(C`mpym\*(C'\fR, \f(CW\*(C`mpymu\*(C'\fR, and \f(CW\*(C`mpy_s\*(C'\fR.
  16969. .IP "\fB5\fR" 4
  16970. .IX Item "5"
  16971. .PD 0
  16972. .IP "\fBwlh4\fR" 4
  16973. .IX Item "wlh4"
  16974. .PD
  16975. One 16x16 multiplier, blocking,
  16976. sequential. The following instructions are additionally enabled: \f(CW\*(C`mpy\*(C'\fR,
  16977. \&\f(CW\*(C`mpyu\*(C'\fR, \f(CW\*(C`mpym\*(C'\fR, \f(CW\*(C`mpymu\*(C'\fR, and \f(CW\*(C`mpy_s\*(C'\fR.
  16978. .IP "\fB6\fR" 4
  16979. .IX Item "6"
  16980. .PD 0
  16981. .IP "\fBwlh5\fR" 4
  16982. .IX Item "wlh5"
  16983. .PD
  16984. One 32x4 multiplier, blocking,
  16985. sequential. The following instructions are additionally enabled: \f(CW\*(C`mpy\*(C'\fR,
  16986. \&\f(CW\*(C`mpyu\*(C'\fR, \f(CW\*(C`mpym\*(C'\fR, \f(CW\*(C`mpymu\*(C'\fR, and \f(CW\*(C`mpy_s\*(C'\fR.
  16987. .IP "\fB7\fR" 4
  16988. .IX Item "7"
  16989. .PD 0
  16990. .IP "\fBplus_dmpy\fR" 4
  16991. .IX Item "plus_dmpy"
  16992. .PD
  16993. \&\s-1ARC HS SIMD\s0 support.
  16994. .IP "\fB8\fR" 4
  16995. .IX Item "8"
  16996. .PD 0
  16997. .IP "\fBplus_macd\fR" 4
  16998. .IX Item "plus_macd"
  16999. .PD
  17000. \&\s-1ARC HS SIMD\s0 support.
  17001. .IP "\fB9\fR" 4
  17002. .IX Item "9"
  17003. .PD 0
  17004. .IP "\fBplus_qmacw\fR" 4
  17005. .IX Item "plus_qmacw"
  17006. .PD
  17007. \&\s-1ARC HS SIMD\s0 support.
  17008. .RE
  17009. .RS 4
  17010. .Sp
  17011. This option is only available for ARCv2 cores.
  17012. .RE
  17013. .IP "\fB\-mfpu=\fR\fIfpu\fR" 4
  17014. .IX Item "-mfpu=fpu"
  17015. Enables support for specific floating-point hardware extensions for ARCv2
  17016. cores. Supported values for \fIfpu\fR are:
  17017. .RS 4
  17018. .IP "\fBfpus\fR" 4
  17019. .IX Item "fpus"
  17020. Enables support for single-precision floating-point hardware
  17021. extensions.
  17022. .IP "\fBfpud\fR" 4
  17023. .IX Item "fpud"
  17024. Enables support for double-precision floating-point hardware
  17025. extensions. The single-precision floating-point extension is also
  17026. enabled. Not available for \s-1ARC EM.\s0
  17027. .IP "\fBfpuda\fR" 4
  17028. .IX Item "fpuda"
  17029. Enables support for double-precision floating-point hardware
  17030. extensions using double-precision assist instructions. The single-precision
  17031. floating-point extension is also enabled. This option is
  17032. only available for \s-1ARC EM.\s0
  17033. .IP "\fBfpuda_div\fR" 4
  17034. .IX Item "fpuda_div"
  17035. Enables support for double-precision floating-point hardware
  17036. extensions using double-precision assist instructions.
  17037. The single-precision floating-point, square-root, and divide
  17038. extensions are also enabled. This option is
  17039. only available for \s-1ARC EM.\s0
  17040. .IP "\fBfpuda_fma\fR" 4
  17041. .IX Item "fpuda_fma"
  17042. Enables support for double-precision floating-point hardware
  17043. extensions using double-precision assist instructions.
  17044. The single-precision floating-point and fused multiply and add
  17045. hardware extensions are also enabled. This option is
  17046. only available for \s-1ARC EM.\s0
  17047. .IP "\fBfpuda_all\fR" 4
  17048. .IX Item "fpuda_all"
  17049. Enables support for double-precision floating-point hardware
  17050. extensions using double-precision assist instructions.
  17051. All single-precision floating-point hardware extensions are also
  17052. enabled. This option is only available for \s-1ARC EM.\s0
  17053. .IP "\fBfpus_div\fR" 4
  17054. .IX Item "fpus_div"
  17055. Enables support for single-precision floating-point, square-root and divide
  17056. hardware extensions.
  17057. .IP "\fBfpud_div\fR" 4
  17058. .IX Item "fpud_div"
  17059. Enables support for double-precision floating-point, square-root and divide
  17060. hardware extensions. This option
  17061. includes option \fBfpus_div\fR. Not available for \s-1ARC EM.\s0
  17062. .IP "\fBfpus_fma\fR" 4
  17063. .IX Item "fpus_fma"
  17064. Enables support for single-precision floating-point and
  17065. fused multiply and add hardware extensions.
  17066. .IP "\fBfpud_fma\fR" 4
  17067. .IX Item "fpud_fma"
  17068. Enables support for double-precision floating-point and
  17069. fused multiply and add hardware extensions. This option
  17070. includes option \fBfpus_fma\fR. Not available for \s-1ARC EM.\s0
  17071. .IP "\fBfpus_all\fR" 4
  17072. .IX Item "fpus_all"
  17073. Enables support for all single-precision floating-point hardware
  17074. extensions.
  17075. .IP "\fBfpud_all\fR" 4
  17076. .IX Item "fpud_all"
  17077. Enables support for all single\- and double-precision floating-point
  17078. hardware extensions. Not available for \s-1ARC EM.\s0
  17079. .RE
  17080. .RS 4
  17081. .RE
  17082. .IP "\fB\-mirq\-ctrl\-saved=\fR\fIregister-range\fR\fB,\fR \fIblink\fR\fB,\fR \fIlp_count\fR" 4
  17083. .IX Item "-mirq-ctrl-saved=register-range, blink, lp_count"
  17084. Specifies general-purposes registers that the processor automatically
  17085. saves/restores on interrupt entry and exit. \fIregister-range\fR is
  17086. specified as two registers separated by a dash. The register range
  17087. always starts with \f(CW\*(C`r0\*(C'\fR, the upper limit is \f(CW\*(C`fp\*(C'\fR register.
  17088. \&\fIblink\fR and \fIlp_count\fR are optional. This option is only
  17089. valid for \s-1ARC EM\s0 and \s-1ARC HS\s0 cores.
  17090. .IP "\fB\-mrgf\-banked\-regs=\fR\fInumber\fR" 4
  17091. .IX Item "-mrgf-banked-regs=number"
  17092. Specifies the number of registers replicated in second register bank
  17093. on entry to fast interrupt. Fast interrupts are interrupts with the
  17094. highest priority level P0. These interrupts save only \s-1PC\s0 and \s-1STATUS32\s0
  17095. registers to avoid memory transactions during interrupt entry and exit
  17096. sequences. Use this option when you are using fast interrupts in an
  17097. \&\s-1ARC V2\s0 family processor. Permitted values are 4, 8, 16, and 32.
  17098. .IP "\fB\-mlpc\-width=\fR\fIwidth\fR" 4
  17099. .IX Item "-mlpc-width=width"
  17100. Specify the width of the \f(CW\*(C`lp_count\*(C'\fR register. Valid values for
  17101. \&\fIwidth\fR are 8, 16, 20, 24, 28 and 32 bits. The default width is
  17102. fixed to 32 bits. If the width is less than 32, the compiler does not
  17103. attempt to transform loops in your program to use the zero-delay loop
  17104. mechanism unless it is known that the \f(CW\*(C`lp_count\*(C'\fR register can
  17105. hold the required loop-counter value. Depending on the width
  17106. specified, the compiler and run-time library might continue to use the
  17107. loop mechanism for various needs. This option defines macro
  17108. \&\f(CW\*(C`_\|_ARC_LPC_WIDTH_\|_\*(C'\fR with the value of \fIwidth\fR.
  17109. .IP "\fB\-mrf16\fR" 4
  17110. .IX Item "-mrf16"
  17111. This option instructs the compiler to generate code for a 16\-entry
  17112. register file. This option defines the \f(CW\*(C`_\|_ARC_RF16_\|_\*(C'\fR
  17113. preprocessor macro.
  17114. .IP "\fB\-mbranch\-index\fR" 4
  17115. .IX Item "-mbranch-index"
  17116. Enable use of \f(CW\*(C`bi\*(C'\fR or \f(CW\*(C`bih\*(C'\fR instructions to implement jump
  17117. tables.
  17118. .PP
  17119. The following options are passed through to the assembler, and also
  17120. define preprocessor macro symbols.
  17121. .IP "\fB\-mdsp\-packa\fR" 4
  17122. .IX Item "-mdsp-packa"
  17123. Passed down to the assembler to enable the \s-1DSP\s0 Pack A extensions.
  17124. Also sets the preprocessor symbol \f(CW\*(C`_\|_Xdsp_packa\*(C'\fR. This option is
  17125. deprecated.
  17126. .IP "\fB\-mdvbf\fR" 4
  17127. .IX Item "-mdvbf"
  17128. Passed down to the assembler to enable the dual Viterbi butterfly
  17129. extension. Also sets the preprocessor symbol \f(CW\*(C`_\|_Xdvbf\*(C'\fR. This
  17130. option is deprecated.
  17131. .IP "\fB\-mlock\fR" 4
  17132. .IX Item "-mlock"
  17133. Passed down to the assembler to enable the locked load/store
  17134. conditional extension. Also sets the preprocessor symbol
  17135. \&\f(CW\*(C`_\|_Xlock\*(C'\fR.
  17136. .IP "\fB\-mmac\-d16\fR" 4
  17137. .IX Item "-mmac-d16"
  17138. Passed down to the assembler. Also sets the preprocessor symbol
  17139. \&\f(CW\*(C`_\|_Xxmac_d16\*(C'\fR. This option is deprecated.
  17140. .IP "\fB\-mmac\-24\fR" 4
  17141. .IX Item "-mmac-24"
  17142. Passed down to the assembler. Also sets the preprocessor symbol
  17143. \&\f(CW\*(C`_\|_Xxmac_24\*(C'\fR. This option is deprecated.
  17144. .IP "\fB\-mrtsc\fR" 4
  17145. .IX Item "-mrtsc"
  17146. Passed down to the assembler to enable the 64\-bit time-stamp counter
  17147. extension instruction. Also sets the preprocessor symbol
  17148. \&\f(CW\*(C`_\|_Xrtsc\*(C'\fR. This option is deprecated.
  17149. .IP "\fB\-mswape\fR" 4
  17150. .IX Item "-mswape"
  17151. Passed down to the assembler to enable the swap byte ordering
  17152. extension instruction. Also sets the preprocessor symbol
  17153. \&\f(CW\*(C`_\|_Xswape\*(C'\fR.
  17154. .IP "\fB\-mtelephony\fR" 4
  17155. .IX Item "-mtelephony"
  17156. Passed down to the assembler to enable dual\- and single-operand
  17157. instructions for telephony. Also sets the preprocessor symbol
  17158. \&\f(CW\*(C`_\|_Xtelephony\*(C'\fR. This option is deprecated.
  17159. .IP "\fB\-mxy\fR" 4
  17160. .IX Item "-mxy"
  17161. Passed down to the assembler to enable the \s-1XY\s0 memory extension. Also
  17162. sets the preprocessor symbol \f(CW\*(C`_\|_Xxy\*(C'\fR.
  17163. .PP
  17164. The following options control how the assembly code is annotated:
  17165. .IP "\fB\-misize\fR" 4
  17166. .IX Item "-misize"
  17167. Annotate assembler instructions with estimated addresses.
  17168. .IP "\fB\-mannotate\-align\fR" 4
  17169. .IX Item "-mannotate-align"
  17170. Explain what alignment considerations lead to the decision to make an
  17171. instruction short or long.
  17172. .PP
  17173. The following options are passed through to the linker:
  17174. .IP "\fB\-marclinux\fR" 4
  17175. .IX Item "-marclinux"
  17176. Passed through to the linker, to specify use of the \f(CW\*(C`arclinux\*(C'\fR emulation.
  17177. This option is enabled by default in tool chains built for
  17178. \&\f(CW\*(C`arc\-linux\-uclibc\*(C'\fR and \f(CW\*(C`arceb\-linux\-uclibc\*(C'\fR targets
  17179. when profiling is not requested.
  17180. .IP "\fB\-marclinux_prof\fR" 4
  17181. .IX Item "-marclinux_prof"
  17182. Passed through to the linker, to specify use of the
  17183. \&\f(CW\*(C`arclinux_prof\*(C'\fR emulation. This option is enabled by default in
  17184. tool chains built for \f(CW\*(C`arc\-linux\-uclibc\*(C'\fR and
  17185. \&\f(CW\*(C`arceb\-linux\-uclibc\*(C'\fR targets when profiling is requested.
  17186. .PP
  17187. The following options control the semantics of generated code:
  17188. .IP "\fB\-mlong\-calls\fR" 4
  17189. .IX Item "-mlong-calls"
  17190. Generate calls as register indirect calls, thus providing access
  17191. to the full 32\-bit address range.
  17192. .IP "\fB\-mmedium\-calls\fR" 4
  17193. .IX Item "-mmedium-calls"
  17194. Don't use less than 25\-bit addressing range for calls, which is the
  17195. offset available for an unconditional branch-and-link
  17196. instruction. Conditional execution of function calls is suppressed, to
  17197. allow use of the 25\-bit range, rather than the 21\-bit range with
  17198. conditional branch-and-link. This is the default for tool chains built
  17199. for \f(CW\*(C`arc\-linux\-uclibc\*(C'\fR and \f(CW\*(C`arceb\-linux\-uclibc\*(C'\fR targets.
  17200. .IP "\fB\-G\fR \fInum\fR" 4
  17201. .IX Item "-G num"
  17202. Put definitions of externally-visible data in a small data section if
  17203. that data is no bigger than \fInum\fR bytes. The default value of
  17204. \&\fInum\fR is 4 for any \s-1ARC\s0 configuration, or 8 when we have double
  17205. load/store operations.
  17206. .IP "\fB\-mno\-sdata\fR" 4
  17207. .IX Item "-mno-sdata"
  17208. Do not generate sdata references. This is the default for tool chains
  17209. built for \f(CW\*(C`arc\-linux\-uclibc\*(C'\fR and \f(CW\*(C`arceb\-linux\-uclibc\*(C'\fR
  17210. targets.
  17211. .IP "\fB\-mvolatile\-cache\fR" 4
  17212. .IX Item "-mvolatile-cache"
  17213. Use ordinarily cached memory accesses for volatile references. This is the
  17214. default.
  17215. .IP "\fB\-mno\-volatile\-cache\fR" 4
  17216. .IX Item "-mno-volatile-cache"
  17217. Enable cache bypass for volatile references.
  17218. .PP
  17219. The following options fine tune code generation:
  17220. .IP "\fB\-malign\-call\fR" 4
  17221. .IX Item "-malign-call"
  17222. Do alignment optimizations for call instructions.
  17223. .IP "\fB\-mauto\-modify\-reg\fR" 4
  17224. .IX Item "-mauto-modify-reg"
  17225. Enable the use of pre/post modify with register displacement.
  17226. .IP "\fB\-mbbit\-peephole\fR" 4
  17227. .IX Item "-mbbit-peephole"
  17228. Enable bbit peephole2.
  17229. .IP "\fB\-mno\-brcc\fR" 4
  17230. .IX Item "-mno-brcc"
  17231. This option disables a target-specific pass in \fIarc_reorg\fR to
  17232. generate compare-and-branch (\f(CW\*(C`br\f(CIcc\f(CW\*(C'\fR) instructions.
  17233. It has no effect on
  17234. generation of these instructions driven by the combiner pass.
  17235. .IP "\fB\-mcase\-vector\-pcrel\fR" 4
  17236. .IX Item "-mcase-vector-pcrel"
  17237. Use PC-relative switch case tables to enable case table shortening.
  17238. This is the default for \fB\-Os\fR.
  17239. .IP "\fB\-mcompact\-casesi\fR" 4
  17240. .IX Item "-mcompact-casesi"
  17241. Enable compact \f(CW\*(C`casesi\*(C'\fR pattern. This is the default for \fB\-Os\fR,
  17242. and only available for ARCv1 cores. This option is deprecated.
  17243. .IP "\fB\-mno\-cond\-exec\fR" 4
  17244. .IX Item "-mno-cond-exec"
  17245. Disable the ARCompact-specific pass to generate conditional
  17246. execution instructions.
  17247. .Sp
  17248. Due to delay slot scheduling and interactions between operand numbers,
  17249. literal sizes, instruction lengths, and the support for conditional execution,
  17250. the target-independent pass to generate conditional execution is often lacking,
  17251. so the \s-1ARC\s0 port has kept a special pass around that tries to find more
  17252. conditional execution generation opportunities after register allocation,
  17253. branch shortening, and delay slot scheduling have been done. This pass
  17254. generally, but not always, improves performance and code size, at the cost of
  17255. extra compilation time, which is why there is an option to switch it off.
  17256. If you have a problem with call instructions exceeding their allowable
  17257. offset range because they are conditionalized, you should consider using
  17258. \&\fB\-mmedium\-calls\fR instead.
  17259. .IP "\fB\-mearly\-cbranchsi\fR" 4
  17260. .IX Item "-mearly-cbranchsi"
  17261. Enable pre-reload use of the \f(CW\*(C`cbranchsi\*(C'\fR pattern.
  17262. .IP "\fB\-mexpand\-adddi\fR" 4
  17263. .IX Item "-mexpand-adddi"
  17264. Expand \f(CW\*(C`adddi3\*(C'\fR and \f(CW\*(C`subdi3\*(C'\fR at \s-1RTL\s0 generation time into
  17265. \&\f(CW\*(C`add.f\*(C'\fR, \f(CW\*(C`adc\*(C'\fR etc. This option is deprecated.
  17266. .IP "\fB\-mindexed\-loads\fR" 4
  17267. .IX Item "-mindexed-loads"
  17268. Enable the use of indexed loads. This can be problematic because some
  17269. optimizers then assume that indexed stores exist, which is not
  17270. the case.
  17271. .IP "\fB\-mlra\fR" 4
  17272. .IX Item "-mlra"
  17273. Enable Local Register Allocation. This is still experimental for \s-1ARC,\s0
  17274. so by default the compiler uses standard reload
  17275. (i.e. \fB\-mno\-lra\fR).
  17276. .IP "\fB\-mlra\-priority\-none\fR" 4
  17277. .IX Item "-mlra-priority-none"
  17278. Don't indicate any priority for target registers.
  17279. .IP "\fB\-mlra\-priority\-compact\fR" 4
  17280. .IX Item "-mlra-priority-compact"
  17281. Indicate target register priority for r0..r3 / r12..r15.
  17282. .IP "\fB\-mlra\-priority\-noncompact\fR" 4
  17283. .IX Item "-mlra-priority-noncompact"
  17284. Reduce target register priority for r0..r3 / r12..r15.
  17285. .IP "\fB\-mmillicode\fR" 4
  17286. .IX Item "-mmillicode"
  17287. When optimizing for size (using \fB\-Os\fR), prologues and epilogues
  17288. that have to save or restore a large number of registers are often
  17289. shortened by using call to a special function in libgcc; this is
  17290. referred to as a \fImillicode\fR call. As these calls can pose
  17291. performance issues, and/or cause linking issues when linking in a
  17292. nonstandard way, this option is provided to turn on or off millicode
  17293. call generation.
  17294. .IP "\fB\-mcode\-density\-frame\fR" 4
  17295. .IX Item "-mcode-density-frame"
  17296. This option enable the compiler to emit \f(CW\*(C`enter\*(C'\fR and \f(CW\*(C`leave\*(C'\fR
  17297. instructions. These instructions are only valid for CPUs with
  17298. code-density feature.
  17299. .IP "\fB\-mmixed\-code\fR" 4
  17300. .IX Item "-mmixed-code"
  17301. Tweak register allocation to help 16\-bit instruction generation.
  17302. This generally has the effect of decreasing the average instruction size
  17303. while increasing the instruction count.
  17304. .IP "\fB\-mq\-class\fR" 4
  17305. .IX Item "-mq-class"
  17306. Ths option is deprecated. Enable \fBq\fR instruction alternatives.
  17307. This is the default for \fB\-Os\fR.
  17308. .IP "\fB\-mRcq\fR" 4
  17309. .IX Item "-mRcq"
  17310. Enable \fBRcq\fR constraint handling.
  17311. Most short code generation depends on this.
  17312. This is the default.
  17313. .IP "\fB\-mRcw\fR" 4
  17314. .IX Item "-mRcw"
  17315. Enable \fBRcw\fR constraint handling.
  17316. Most ccfsm condexec mostly depends on this.
  17317. This is the default.
  17318. .IP "\fB\-msize\-level=\fR\fIlevel\fR" 4
  17319. .IX Item "-msize-level=level"
  17320. Fine-tune size optimization with regards to instruction lengths and alignment.
  17321. The recognized values for \fIlevel\fR are:
  17322. .RS 4
  17323. .IP "\fB0\fR" 4
  17324. .IX Item "0"
  17325. No size optimization. This level is deprecated and treated like \fB1\fR.
  17326. .IP "\fB1\fR" 4
  17327. .IX Item "1"
  17328. Short instructions are used opportunistically.
  17329. .IP "\fB2\fR" 4
  17330. .IX Item "2"
  17331. In addition, alignment of loops and of code after barriers are dropped.
  17332. .IP "\fB3\fR" 4
  17333. .IX Item "3"
  17334. In addition, optional data alignment is dropped, and the option \fBOs\fR is enabled.
  17335. .RE
  17336. .RS 4
  17337. .Sp
  17338. This defaults to \fB3\fR when \fB\-Os\fR is in effect. Otherwise,
  17339. the behavior when this is not set is equivalent to level \fB1\fR.
  17340. .RE
  17341. .IP "\fB\-mtune=\fR\fIcpu\fR" 4
  17342. .IX Item "-mtune=cpu"
  17343. Set instruction scheduling parameters for \fIcpu\fR, overriding any implied
  17344. by \fB\-mcpu=\fR.
  17345. .Sp
  17346. Supported values for \fIcpu\fR are
  17347. .RS 4
  17348. .IP "\fB\s-1ARC600\s0\fR" 4
  17349. .IX Item "ARC600"
  17350. Tune for \s-1ARC600 CPU.\s0
  17351. .IP "\fB\s-1ARC601\s0\fR" 4
  17352. .IX Item "ARC601"
  17353. Tune for \s-1ARC601 CPU.\s0
  17354. .IP "\fB\s-1ARC700\s0\fR" 4
  17355. .IX Item "ARC700"
  17356. Tune for \s-1ARC700 CPU\s0 with standard multiplier block.
  17357. .IP "\fBARC700\-xmac\fR" 4
  17358. .IX Item "ARC700-xmac"
  17359. Tune for \s-1ARC700 CPU\s0 with \s-1XMAC\s0 block.
  17360. .IP "\fB\s-1ARC725D\s0\fR" 4
  17361. .IX Item "ARC725D"
  17362. Tune for \s-1ARC725D CPU.\s0
  17363. .IP "\fB\s-1ARC750D\s0\fR" 4
  17364. .IX Item "ARC750D"
  17365. Tune for \s-1ARC750D CPU.\s0
  17366. .RE
  17367. .RS 4
  17368. .RE
  17369. .IP "\fB\-mmultcost=\fR\fInum\fR" 4
  17370. .IX Item "-mmultcost=num"
  17371. Cost to assume for a multiply instruction, with \fB4\fR being equal to a
  17372. normal instruction.
  17373. .IP "\fB\-munalign\-prob\-threshold=\fR\fIprobability\fR" 4
  17374. .IX Item "-munalign-prob-threshold=probability"
  17375. Set probability threshold for unaligning branches.
  17376. When tuning for \fB\s-1ARC700\s0\fR and optimizing for speed, branches without
  17377. filled delay slot are preferably emitted unaligned and long, unless
  17378. profiling indicates that the probability for the branch to be taken
  17379. is below \fIprobability\fR.
  17380. The default is (\s-1REG_BR_PROB_BASE/2\s0), i.e. 5000.
  17381. .PP
  17382. The following options are maintained for backward compatibility, but
  17383. are now deprecated and will be removed in a future release:
  17384. .IP "\fB\-margonaut\fR" 4
  17385. .IX Item "-margonaut"
  17386. Obsolete \s-1FPX.\s0
  17387. .IP "\fB\-mbig\-endian\fR" 4
  17388. .IX Item "-mbig-endian"
  17389. .PD 0
  17390. .IP "\fB\-EB\fR" 4
  17391. .IX Item "-EB"
  17392. .PD
  17393. Compile code for big-endian targets. Use of these options is now
  17394. deprecated. Big-endian code is supported by configuring \s-1GCC\s0 to build
  17395. \&\f(CW\*(C`arceb\-elf32\*(C'\fR and \f(CW\*(C`arceb\-linux\-uclibc\*(C'\fR targets,
  17396. for which big endian is the default.
  17397. .IP "\fB\-mlittle\-endian\fR" 4
  17398. .IX Item "-mlittle-endian"
  17399. .PD 0
  17400. .IP "\fB\-EL\fR" 4
  17401. .IX Item "-EL"
  17402. .PD
  17403. Compile code for little-endian targets. Use of these options is now
  17404. deprecated. Little-endian code is supported by configuring \s-1GCC\s0 to build
  17405. \&\f(CW\*(C`arc\-elf32\*(C'\fR and \f(CW\*(C`arc\-linux\-uclibc\*(C'\fR targets,
  17406. for which little endian is the default.
  17407. .IP "\fB\-mbarrel_shifter\fR" 4
  17408. .IX Item "-mbarrel_shifter"
  17409. Replaced by \fB\-mbarrel\-shifter\fR.
  17410. .IP "\fB\-mdpfp_compact\fR" 4
  17411. .IX Item "-mdpfp_compact"
  17412. Replaced by \fB\-mdpfp\-compact\fR.
  17413. .IP "\fB\-mdpfp_fast\fR" 4
  17414. .IX Item "-mdpfp_fast"
  17415. Replaced by \fB\-mdpfp\-fast\fR.
  17416. .IP "\fB\-mdsp_packa\fR" 4
  17417. .IX Item "-mdsp_packa"
  17418. Replaced by \fB\-mdsp\-packa\fR.
  17419. .IP "\fB\-mEA\fR" 4
  17420. .IX Item "-mEA"
  17421. Replaced by \fB\-mea\fR.
  17422. .IP "\fB\-mmac_24\fR" 4
  17423. .IX Item "-mmac_24"
  17424. Replaced by \fB\-mmac\-24\fR.
  17425. .IP "\fB\-mmac_d16\fR" 4
  17426. .IX Item "-mmac_d16"
  17427. Replaced by \fB\-mmac\-d16\fR.
  17428. .IP "\fB\-mspfp_compact\fR" 4
  17429. .IX Item "-mspfp_compact"
  17430. Replaced by \fB\-mspfp\-compact\fR.
  17431. .IP "\fB\-mspfp_fast\fR" 4
  17432. .IX Item "-mspfp_fast"
  17433. Replaced by \fB\-mspfp\-fast\fR.
  17434. .IP "\fB\-mtune=\fR\fIcpu\fR" 4
  17435. .IX Item "-mtune=cpu"
  17436. Values \fBarc600\fR, \fBarc601\fR, \fBarc700\fR and
  17437. \&\fBarc700\-xmac\fR for \fIcpu\fR are replaced by \fB\s-1ARC600\s0\fR,
  17438. \&\fB\s-1ARC601\s0\fR, \fB\s-1ARC700\s0\fR and \fBARC700\-xmac\fR respectively.
  17439. .IP "\fB\-multcost=\fR\fInum\fR" 4
  17440. .IX Item "-multcost=num"
  17441. Replaced by \fB\-mmultcost\fR.
  17442. .PP
  17443. \fI\s-1ARM\s0 Options\fR
  17444. .IX Subsection "ARM Options"
  17445. .PP
  17446. These \fB\-m\fR options are defined for the \s-1ARM\s0 port:
  17447. .IP "\fB\-mabi=\fR\fIname\fR" 4
  17448. .IX Item "-mabi=name"
  17449. Generate code for the specified \s-1ABI. \s0 Permissible values are: \fBapcs-gnu\fR,
  17450. \&\fBatpcs\fR, \fBaapcs\fR, \fBaapcs-linux\fR and \fBiwmmxt\fR.
  17451. .IP "\fB\-mapcs\-frame\fR" 4
  17452. .IX Item "-mapcs-frame"
  17453. Generate a stack frame that is compliant with the \s-1ARM\s0 Procedure Call
  17454. Standard for all functions, even if this is not strictly necessary for
  17455. correct execution of the code. Specifying \fB\-fomit\-frame\-pointer\fR
  17456. with this option causes the stack frames not to be generated for
  17457. leaf functions. The default is \fB\-mno\-apcs\-frame\fR.
  17458. This option is deprecated.
  17459. .IP "\fB\-mapcs\fR" 4
  17460. .IX Item "-mapcs"
  17461. This is a synonym for \fB\-mapcs\-frame\fR and is deprecated.
  17462. .IP "\fB\-mthumb\-interwork\fR" 4
  17463. .IX Item "-mthumb-interwork"
  17464. Generate code that supports calling between the \s-1ARM\s0 and Thumb
  17465. instruction sets. Without this option, on pre\-v5 architectures, the
  17466. two instruction sets cannot be reliably used inside one program. The
  17467. default is \fB\-mno\-thumb\-interwork\fR, since slightly larger code
  17468. is generated when \fB\-mthumb\-interwork\fR is specified. In \s-1AAPCS\s0
  17469. configurations this option is meaningless.
  17470. .IP "\fB\-mno\-sched\-prolog\fR" 4
  17471. .IX Item "-mno-sched-prolog"
  17472. Prevent the reordering of instructions in the function prologue, or the
  17473. merging of those instruction with the instructions in the function's
  17474. body. This means that all functions start with a recognizable set
  17475. of instructions (or in fact one of a choice from a small set of
  17476. different function prologues), and this information can be used to
  17477. locate the start of functions inside an executable piece of code. The
  17478. default is \fB\-msched\-prolog\fR.
  17479. .IP "\fB\-mfloat\-abi=\fR\fIname\fR" 4
  17480. .IX Item "-mfloat-abi=name"
  17481. Specifies which floating-point \s-1ABI\s0 to use. Permissible values
  17482. are: \fBsoft\fR, \fBsoftfp\fR and \fBhard\fR.
  17483. .Sp
  17484. Specifying \fBsoft\fR causes \s-1GCC\s0 to generate output containing
  17485. library calls for floating-point operations.
  17486. \&\fBsoftfp\fR allows the generation of code using hardware floating-point
  17487. instructions, but still uses the soft-float calling conventions.
  17488. \&\fBhard\fR allows generation of floating-point instructions
  17489. and uses FPU-specific calling conventions.
  17490. .Sp
  17491. The default depends on the specific target configuration. Note that
  17492. the hard-float and soft-float ABIs are not link-compatible; you must
  17493. compile your entire program with the same \s-1ABI,\s0 and link with a
  17494. compatible set of libraries.
  17495. .IP "\fB\-mgeneral\-regs\-only\fR" 4
  17496. .IX Item "-mgeneral-regs-only"
  17497. Generate code which uses only the general-purpose registers. This will prevent
  17498. the compiler from using floating-point and Advanced \s-1SIMD\s0 registers but will not
  17499. impose any restrictions on the assembler.
  17500. .IP "\fB\-mlittle\-endian\fR" 4
  17501. .IX Item "-mlittle-endian"
  17502. Generate code for a processor running in little-endian mode. This is
  17503. the default for all standard configurations.
  17504. .IP "\fB\-mbig\-endian\fR" 4
  17505. .IX Item "-mbig-endian"
  17506. Generate code for a processor running in big-endian mode; the default is
  17507. to compile code for a little-endian processor.
  17508. .IP "\fB\-mbe8\fR" 4
  17509. .IX Item "-mbe8"
  17510. .PD 0
  17511. .IP "\fB\-mbe32\fR" 4
  17512. .IX Item "-mbe32"
  17513. .PD
  17514. When linking a big-endian image select between \s-1BE8\s0 and \s-1BE32\s0 formats.
  17515. The option has no effect for little-endian images and is ignored. The
  17516. default is dependent on the selected target architecture. For ARMv6
  17517. and later architectures the default is \s-1BE8,\s0 for older architectures
  17518. the default is \s-1BE32. BE32\s0 format has been deprecated by \s-1ARM.\s0
  17519. .IP "\fB\-march=\fR\fIname\fR[\fB+extension...\fR]" 4
  17520. .IX Item "-march=name[+extension...]"
  17521. This specifies the name of the target \s-1ARM\s0 architecture. \s-1GCC\s0 uses this
  17522. name to determine what kind of instructions it can emit when generating
  17523. assembly code. This option can be used in conjunction with or instead
  17524. of the \fB\-mcpu=\fR option.
  17525. .Sp
  17526. Permissible names are:
  17527. \&\fBarmv4t\fR,
  17528. \&\fBarmv5t\fR, \fBarmv5te\fR,
  17529. \&\fBarmv6\fR, \fBarmv6j\fR, \fBarmv6k\fR, \fBarmv6kz\fR, \fBarmv6t2\fR,
  17530. \&\fBarmv6z\fR, \fBarmv6zk\fR,
  17531. \&\fBarmv7\fR, \fBarmv7\-a\fR, \fBarmv7ve\fR,
  17532. \&\fBarmv8\-a\fR, \fBarmv8.1\-a\fR, \fBarmv8.2\-a\fR, \fBarmv8.3\-a\fR,
  17533. \&\fBarmv8.4\-a\fR,
  17534. \&\fBarmv8.5\-a\fR,
  17535. \&\fBarmv8.6\-a\fR,
  17536. \&\fBarmv7\-r\fR,
  17537. \&\fBarmv8\-r\fR,
  17538. \&\fBarmv6\-m\fR, \fBarmv6s\-m\fR,
  17539. \&\fBarmv7\-m\fR, \fBarmv7e\-m\fR,
  17540. \&\fBarmv8\-m.base\fR, \fBarmv8\-m.main\fR,
  17541. \&\fBarmv8.1\-m.main\fR,
  17542. \&\fBiwmmxt\fR and \fBiwmmxt2\fR.
  17543. .Sp
  17544. Additionally, the following architectures, which lack support for the
  17545. Thumb execution state, are recognized but support is deprecated: \fBarmv4\fR.
  17546. .Sp
  17547. Many of the architectures support extensions. These can be added by
  17548. appending \fB+\fR\fIextension\fR to the architecture name. Extension
  17549. options are processed in order and capabilities accumulate. An extension
  17550. will also enable any necessary base extensions
  17551. upon which it depends. For example, the \fB+crypto\fR extension
  17552. will always enable the \fB+simd\fR extension. The exception to the
  17553. additive construction is for extensions that are prefixed with
  17554. \&\fB+no...\fR: these extensions disable the specified option and
  17555. any other extensions that may depend on the presence of that
  17556. extension.
  17557. .Sp
  17558. For example, \fB\-march=armv7\-a+simd+nofp+vfpv4\fR is equivalent to
  17559. writing \fB\-march=armv7\-a+vfpv4\fR since the \fB+simd\fR option is
  17560. entirely disabled by the \fB+nofp\fR option that follows it.
  17561. .Sp
  17562. Most extension names are generically named, but have an effect that is
  17563. dependent upon the architecture to which it is applied. For example,
  17564. the \fB+simd\fR option can be applied to both \fBarmv7\-a\fR and
  17565. \&\fBarmv8\-a\fR architectures, but will enable the original ARMv7\-A
  17566. Advanced \s-1SIMD \s0(Neon) extensions for \fBarmv7\-a\fR and the ARMv8\-A
  17567. variant for \fBarmv8\-a\fR.
  17568. .Sp
  17569. The table below lists the supported extensions for each architecture.
  17570. Architectures not mentioned do not support any extensions.
  17571. .RS 4
  17572. .IP "\fBarmv5te\fR" 4
  17573. .IX Item "armv5te"
  17574. .PD 0
  17575. .IP "\fBarmv6\fR" 4
  17576. .IX Item "armv6"
  17577. .IP "\fBarmv6j\fR" 4
  17578. .IX Item "armv6j"
  17579. .IP "\fBarmv6k\fR" 4
  17580. .IX Item "armv6k"
  17581. .IP "\fBarmv6kz\fR" 4
  17582. .IX Item "armv6kz"
  17583. .IP "\fBarmv6t2\fR" 4
  17584. .IX Item "armv6t2"
  17585. .IP "\fBarmv6z\fR" 4
  17586. .IX Item "armv6z"
  17587. .IP "\fBarmv6zk\fR" 4
  17588. .IX Item "armv6zk"
  17589. .RS 4
  17590. .IP "\fB+fp\fR" 4
  17591. .IX Item "+fp"
  17592. .PD
  17593. The VFPv2 floating-point instructions. The extension \fB+vfpv2\fR can be
  17594. used as an alias for this extension.
  17595. .IP "\fB+nofp\fR" 4
  17596. .IX Item "+nofp"
  17597. Disable the floating-point instructions.
  17598. .RE
  17599. .RS 4
  17600. .RE
  17601. .IP "\fBarmv7\fR" 4
  17602. .IX Item "armv7"
  17603. The common subset of the ARMv7\-A, ARMv7\-R and ARMv7\-M architectures.
  17604. .RS 4
  17605. .IP "\fB+fp\fR" 4
  17606. .IX Item "+fp"
  17607. The VFPv3 floating-point instructions, with 16 double-precision
  17608. registers. The extension \fB+vfpv3\-d16\fR can be used as an alias
  17609. for this extension. Note that floating-point is not supported by the
  17610. base ARMv7\-M architecture, but is compatible with both the ARMv7\-A and
  17611. ARMv7\-R architectures.
  17612. .IP "\fB+nofp\fR" 4
  17613. .IX Item "+nofp"
  17614. Disable the floating-point instructions.
  17615. .RE
  17616. .RS 4
  17617. .RE
  17618. .IP "\fBarmv7\-a\fR" 4
  17619. .IX Item "armv7-a"
  17620. .RS 4
  17621. .PD 0
  17622. .IP "\fB+mp\fR" 4
  17623. .IX Item "+mp"
  17624. .PD
  17625. The multiprocessing extension.
  17626. .IP "\fB+sec\fR" 4
  17627. .IX Item "+sec"
  17628. The security extension.
  17629. .IP "\fB+fp\fR" 4
  17630. .IX Item "+fp"
  17631. The VFPv3 floating-point instructions, with 16 double-precision
  17632. registers. The extension \fB+vfpv3\-d16\fR can be used as an alias
  17633. for this extension.
  17634. .IP "\fB+simd\fR" 4
  17635. .IX Item "+simd"
  17636. The Advanced \s-1SIMD \s0(Neon) v1 and the VFPv3 floating-point instructions.
  17637. The extensions \fB+neon\fR and \fB+neon\-vfpv3\fR can be used as aliases
  17638. for this extension.
  17639. .IP "\fB+vfpv3\fR" 4
  17640. .IX Item "+vfpv3"
  17641. The VFPv3 floating-point instructions, with 32 double-precision
  17642. registers.
  17643. .IP "\fB+vfpv3\-d16\-fp16\fR" 4
  17644. .IX Item "+vfpv3-d16-fp16"
  17645. The VFPv3 floating-point instructions, with 16 double-precision
  17646. registers and the half-precision floating-point conversion operations.
  17647. .IP "\fB+vfpv3\-fp16\fR" 4
  17648. .IX Item "+vfpv3-fp16"
  17649. The VFPv3 floating-point instructions, with 32 double-precision
  17650. registers and the half-precision floating-point conversion operations.
  17651. .IP "\fB+vfpv4\-d16\fR" 4
  17652. .IX Item "+vfpv4-d16"
  17653. The VFPv4 floating-point instructions, with 16 double-precision
  17654. registers.
  17655. .IP "\fB+vfpv4\fR" 4
  17656. .IX Item "+vfpv4"
  17657. The VFPv4 floating-point instructions, with 32 double-precision
  17658. registers.
  17659. .IP "\fB+neon\-fp16\fR" 4
  17660. .IX Item "+neon-fp16"
  17661. The Advanced \s-1SIMD \s0(Neon) v1 and the VFPv3 floating-point instructions, with
  17662. the half-precision floating-point conversion operations.
  17663. .IP "\fB+neon\-vfpv4\fR" 4
  17664. .IX Item "+neon-vfpv4"
  17665. The Advanced \s-1SIMD \s0(Neon) v2 and the VFPv4 floating-point instructions.
  17666. .IP "\fB+nosimd\fR" 4
  17667. .IX Item "+nosimd"
  17668. Disable the Advanced \s-1SIMD\s0 instructions (does not disable floating point).
  17669. .IP "\fB+nofp\fR" 4
  17670. .IX Item "+nofp"
  17671. Disable the floating-point and Advanced \s-1SIMD\s0 instructions.
  17672. .RE
  17673. .RS 4
  17674. .RE
  17675. .IP "\fBarmv7ve\fR" 4
  17676. .IX Item "armv7ve"
  17677. The extended version of the ARMv7\-A architecture with support for
  17678. virtualization.
  17679. .RS 4
  17680. .IP "\fB+fp\fR" 4
  17681. .IX Item "+fp"
  17682. The VFPv4 floating-point instructions, with 16 double-precision registers.
  17683. The extension \fB+vfpv4\-d16\fR can be used as an alias for this extension.
  17684. .IP "\fB+simd\fR" 4
  17685. .IX Item "+simd"
  17686. The Advanced \s-1SIMD \s0(Neon) v2 and the VFPv4 floating-point instructions. The
  17687. extension \fB+neon\-vfpv4\fR can be used as an alias for this extension.
  17688. .IP "\fB+vfpv3\-d16\fR" 4
  17689. .IX Item "+vfpv3-d16"
  17690. The VFPv3 floating-point instructions, with 16 double-precision
  17691. registers.
  17692. .IP "\fB+vfpv3\fR" 4
  17693. .IX Item "+vfpv3"
  17694. The VFPv3 floating-point instructions, with 32 double-precision
  17695. registers.
  17696. .IP "\fB+vfpv3\-d16\-fp16\fR" 4
  17697. .IX Item "+vfpv3-d16-fp16"
  17698. The VFPv3 floating-point instructions, with 16 double-precision
  17699. registers and the half-precision floating-point conversion operations.
  17700. .IP "\fB+vfpv3\-fp16\fR" 4
  17701. .IX Item "+vfpv3-fp16"
  17702. The VFPv3 floating-point instructions, with 32 double-precision
  17703. registers and the half-precision floating-point conversion operations.
  17704. .IP "\fB+vfpv4\-d16\fR" 4
  17705. .IX Item "+vfpv4-d16"
  17706. The VFPv4 floating-point instructions, with 16 double-precision
  17707. registers.
  17708. .IP "\fB+vfpv4\fR" 4
  17709. .IX Item "+vfpv4"
  17710. The VFPv4 floating-point instructions, with 32 double-precision
  17711. registers.
  17712. .IP "\fB+neon\fR" 4
  17713. .IX Item "+neon"
  17714. The Advanced \s-1SIMD \s0(Neon) v1 and the VFPv3 floating-point instructions.
  17715. The extension \fB+neon\-vfpv3\fR can be used as an alias for this extension.
  17716. .IP "\fB+neon\-fp16\fR" 4
  17717. .IX Item "+neon-fp16"
  17718. The Advanced \s-1SIMD \s0(Neon) v1 and the VFPv3 floating-point instructions, with
  17719. the half-precision floating-point conversion operations.
  17720. .IP "\fB+nosimd\fR" 4
  17721. .IX Item "+nosimd"
  17722. Disable the Advanced \s-1SIMD\s0 instructions (does not disable floating point).
  17723. .IP "\fB+nofp\fR" 4
  17724. .IX Item "+nofp"
  17725. Disable the floating-point and Advanced \s-1SIMD\s0 instructions.
  17726. .RE
  17727. .RS 4
  17728. .RE
  17729. .IP "\fBarmv8\-a\fR" 4
  17730. .IX Item "armv8-a"
  17731. .RS 4
  17732. .PD 0
  17733. .IP "\fB+crc\fR" 4
  17734. .IX Item "+crc"
  17735. .PD
  17736. The Cyclic Redundancy Check (\s-1CRC\s0) instructions.
  17737. .IP "\fB+simd\fR" 4
  17738. .IX Item "+simd"
  17739. The ARMv8\-A Advanced \s-1SIMD\s0 and floating-point instructions.
  17740. .IP "\fB+crypto\fR" 4
  17741. .IX Item "+crypto"
  17742. The cryptographic instructions.
  17743. .IP "\fB+nocrypto\fR" 4
  17744. .IX Item "+nocrypto"
  17745. Disable the cryptographic instructions.
  17746. .IP "\fB+nofp\fR" 4
  17747. .IX Item "+nofp"
  17748. Disable the floating-point, Advanced \s-1SIMD\s0 and cryptographic instructions.
  17749. .IP "\fB+sb\fR" 4
  17750. .IX Item "+sb"
  17751. Speculation Barrier Instruction.
  17752. .IP "\fB+predres\fR" 4
  17753. .IX Item "+predres"
  17754. Execution and Data Prediction Restriction Instructions.
  17755. .RE
  17756. .RS 4
  17757. .RE
  17758. .IP "\fBarmv8.1\-a\fR" 4
  17759. .IX Item "armv8.1-a"
  17760. .RS 4
  17761. .PD 0
  17762. .IP "\fB+simd\fR" 4
  17763. .IX Item "+simd"
  17764. .PD
  17765. The ARMv8.1\-A Advanced \s-1SIMD\s0 and floating-point instructions.
  17766. .IP "\fB+crypto\fR" 4
  17767. .IX Item "+crypto"
  17768. The cryptographic instructions. This also enables the Advanced \s-1SIMD\s0 and
  17769. floating-point instructions.
  17770. .IP "\fB+nocrypto\fR" 4
  17771. .IX Item "+nocrypto"
  17772. Disable the cryptographic instructions.
  17773. .IP "\fB+nofp\fR" 4
  17774. .IX Item "+nofp"
  17775. Disable the floating-point, Advanced \s-1SIMD\s0 and cryptographic instructions.
  17776. .IP "\fB+sb\fR" 4
  17777. .IX Item "+sb"
  17778. Speculation Barrier Instruction.
  17779. .IP "\fB+predres\fR" 4
  17780. .IX Item "+predres"
  17781. Execution and Data Prediction Restriction Instructions.
  17782. .RE
  17783. .RS 4
  17784. .RE
  17785. .IP "\fBarmv8.2\-a\fR" 4
  17786. .IX Item "armv8.2-a"
  17787. .PD 0
  17788. .IP "\fBarmv8.3\-a\fR" 4
  17789. .IX Item "armv8.3-a"
  17790. .RS 4
  17791. .IP "\fB+fp16\fR" 4
  17792. .IX Item "+fp16"
  17793. .PD
  17794. The half-precision floating-point data processing instructions.
  17795. This also enables the Advanced \s-1SIMD\s0 and floating-point instructions.
  17796. .IP "\fB+fp16fml\fR" 4
  17797. .IX Item "+fp16fml"
  17798. The half-precision floating-point fmla extension. This also enables
  17799. the half-precision floating-point extension and Advanced \s-1SIMD\s0 and
  17800. floating-point instructions.
  17801. .IP "\fB+simd\fR" 4
  17802. .IX Item "+simd"
  17803. The ARMv8.1\-A Advanced \s-1SIMD\s0 and floating-point instructions.
  17804. .IP "\fB+crypto\fR" 4
  17805. .IX Item "+crypto"
  17806. The cryptographic instructions. This also enables the Advanced \s-1SIMD\s0 and
  17807. floating-point instructions.
  17808. .IP "\fB+dotprod\fR" 4
  17809. .IX Item "+dotprod"
  17810. Enable the Dot Product extension. This also enables Advanced \s-1SIMD\s0 instructions.
  17811. .IP "\fB+nocrypto\fR" 4
  17812. .IX Item "+nocrypto"
  17813. Disable the cryptographic extension.
  17814. .IP "\fB+nofp\fR" 4
  17815. .IX Item "+nofp"
  17816. Disable the floating-point, Advanced \s-1SIMD\s0 and cryptographic instructions.
  17817. .IP "\fB+sb\fR" 4
  17818. .IX Item "+sb"
  17819. Speculation Barrier Instruction.
  17820. .IP "\fB+predres\fR" 4
  17821. .IX Item "+predres"
  17822. Execution and Data Prediction Restriction Instructions.
  17823. .IP "\fB+i8mm\fR" 4
  17824. .IX Item "+i8mm"
  17825. 8\-bit Integer Matrix Multiply instructions.
  17826. This also enables Advanced \s-1SIMD\s0 and floating-point instructions.
  17827. .IP "\fB+bf16\fR" 4
  17828. .IX Item "+bf16"
  17829. Brain half-precision floating-point instructions.
  17830. This also enables Advanced \s-1SIMD\s0 and floating-point instructions.
  17831. .RE
  17832. .RS 4
  17833. .RE
  17834. .IP "\fBarmv8.4\-a\fR" 4
  17835. .IX Item "armv8.4-a"
  17836. .RS 4
  17837. .PD 0
  17838. .IP "\fB+fp16\fR" 4
  17839. .IX Item "+fp16"
  17840. .PD
  17841. The half-precision floating-point data processing instructions.
  17842. This also enables the Advanced \s-1SIMD\s0 and floating-point instructions as well
  17843. as the Dot Product extension and the half-precision floating-point fmla
  17844. extension.
  17845. .IP "\fB+simd\fR" 4
  17846. .IX Item "+simd"
  17847. The ARMv8.3\-A Advanced \s-1SIMD\s0 and floating-point instructions as well as the
  17848. Dot Product extension.
  17849. .IP "\fB+crypto\fR" 4
  17850. .IX Item "+crypto"
  17851. The cryptographic instructions. This also enables the Advanced \s-1SIMD\s0 and
  17852. floating-point instructions as well as the Dot Product extension.
  17853. .IP "\fB+nocrypto\fR" 4
  17854. .IX Item "+nocrypto"
  17855. Disable the cryptographic extension.
  17856. .IP "\fB+nofp\fR" 4
  17857. .IX Item "+nofp"
  17858. Disable the floating-point, Advanced \s-1SIMD\s0 and cryptographic instructions.
  17859. .IP "\fB+sb\fR" 4
  17860. .IX Item "+sb"
  17861. Speculation Barrier Instruction.
  17862. .IP "\fB+predres\fR" 4
  17863. .IX Item "+predres"
  17864. Execution and Data Prediction Restriction Instructions.
  17865. .IP "\fB+i8mm\fR" 4
  17866. .IX Item "+i8mm"
  17867. 8\-bit Integer Matrix Multiply instructions.
  17868. This also enables Advanced \s-1SIMD\s0 and floating-point instructions.
  17869. .IP "\fB+bf16\fR" 4
  17870. .IX Item "+bf16"
  17871. Brain half-precision floating-point instructions.
  17872. This also enables Advanced \s-1SIMD\s0 and floating-point instructions.
  17873. .RE
  17874. .RS 4
  17875. .RE
  17876. .IP "\fBarmv8.5\-a\fR" 4
  17877. .IX Item "armv8.5-a"
  17878. .RS 4
  17879. .PD 0
  17880. .IP "\fB+fp16\fR" 4
  17881. .IX Item "+fp16"
  17882. .PD
  17883. The half-precision floating-point data processing instructions.
  17884. This also enables the Advanced \s-1SIMD\s0 and floating-point instructions as well
  17885. as the Dot Product extension and the half-precision floating-point fmla
  17886. extension.
  17887. .IP "\fB+simd\fR" 4
  17888. .IX Item "+simd"
  17889. The ARMv8.3\-A Advanced \s-1SIMD\s0 and floating-point instructions as well as the
  17890. Dot Product extension.
  17891. .IP "\fB+crypto\fR" 4
  17892. .IX Item "+crypto"
  17893. The cryptographic instructions. This also enables the Advanced \s-1SIMD\s0 and
  17894. floating-point instructions as well as the Dot Product extension.
  17895. .IP "\fB+nocrypto\fR" 4
  17896. .IX Item "+nocrypto"
  17897. Disable the cryptographic extension.
  17898. .IP "\fB+nofp\fR" 4
  17899. .IX Item "+nofp"
  17900. Disable the floating-point, Advanced \s-1SIMD\s0 and cryptographic instructions.
  17901. .IP "\fB+i8mm\fR" 4
  17902. .IX Item "+i8mm"
  17903. 8\-bit Integer Matrix Multiply instructions.
  17904. This also enables Advanced \s-1SIMD\s0 and floating-point instructions.
  17905. .IP "\fB+bf16\fR" 4
  17906. .IX Item "+bf16"
  17907. Brain half-precision floating-point instructions.
  17908. This also enables Advanced \s-1SIMD\s0 and floating-point instructions.
  17909. .RE
  17910. .RS 4
  17911. .RE
  17912. .IP "\fBarmv8.6\-a\fR" 4
  17913. .IX Item "armv8.6-a"
  17914. .RS 4
  17915. .PD 0
  17916. .IP "\fB+fp16\fR" 4
  17917. .IX Item "+fp16"
  17918. .PD
  17919. The half-precision floating-point data processing instructions.
  17920. This also enables the Advanced \s-1SIMD\s0 and floating-point instructions as well
  17921. as the Dot Product extension and the half-precision floating-point fmla
  17922. extension.
  17923. .IP "\fB+simd\fR" 4
  17924. .IX Item "+simd"
  17925. The ARMv8.3\-A Advanced \s-1SIMD\s0 and floating-point instructions as well as the
  17926. Dot Product extension.
  17927. .IP "\fB+crypto\fR" 4
  17928. .IX Item "+crypto"
  17929. The cryptographic instructions. This also enables the Advanced \s-1SIMD\s0 and
  17930. floating-point instructions as well as the Dot Product extension.
  17931. .IP "\fB+nocrypto\fR" 4
  17932. .IX Item "+nocrypto"
  17933. Disable the cryptographic extension.
  17934. .IP "\fB+nofp\fR" 4
  17935. .IX Item "+nofp"
  17936. Disable the floating-point, Advanced \s-1SIMD\s0 and cryptographic instructions.
  17937. .IP "\fB+i8mm\fR" 4
  17938. .IX Item "+i8mm"
  17939. 8\-bit Integer Matrix Multiply instructions.
  17940. This also enables Advanced \s-1SIMD\s0 and floating-point instructions.
  17941. .IP "\fB+bf16\fR" 4
  17942. .IX Item "+bf16"
  17943. Brain half-precision floating-point instructions.
  17944. This also enables Advanced \s-1SIMD\s0 and floating-point instructions.
  17945. .RE
  17946. .RS 4
  17947. .RE
  17948. .IP "\fBarmv7\-r\fR" 4
  17949. .IX Item "armv7-r"
  17950. .RS 4
  17951. .PD 0
  17952. .IP "\fB+fp.sp\fR" 4
  17953. .IX Item "+fp.sp"
  17954. .PD
  17955. The single-precision VFPv3 floating-point instructions. The extension
  17956. \&\fB+vfpv3xd\fR can be used as an alias for this extension.
  17957. .IP "\fB+fp\fR" 4
  17958. .IX Item "+fp"
  17959. The VFPv3 floating-point instructions with 16 double-precision registers.
  17960. The extension +vfpv3\-d16 can be used as an alias for this extension.
  17961. .IP "\fB+vfpv3xd\-d16\-fp16\fR" 4
  17962. .IX Item "+vfpv3xd-d16-fp16"
  17963. The single-precision VFPv3 floating-point instructions with 16 double-precision
  17964. registers and the half-precision floating-point conversion operations.
  17965. .IP "\fB+vfpv3\-d16\-fp16\fR" 4
  17966. .IX Item "+vfpv3-d16-fp16"
  17967. The VFPv3 floating-point instructions with 16 double-precision
  17968. registers and the half-precision floating-point conversion operations.
  17969. .IP "\fB+nofp\fR" 4
  17970. .IX Item "+nofp"
  17971. Disable the floating-point extension.
  17972. .IP "\fB+idiv\fR" 4
  17973. .IX Item "+idiv"
  17974. The ARM-state integer division instructions.
  17975. .IP "\fB+noidiv\fR" 4
  17976. .IX Item "+noidiv"
  17977. Disable the ARM-state integer division extension.
  17978. .RE
  17979. .RS 4
  17980. .RE
  17981. .IP "\fBarmv7e\-m\fR" 4
  17982. .IX Item "armv7e-m"
  17983. .RS 4
  17984. .PD 0
  17985. .IP "\fB+fp\fR" 4
  17986. .IX Item "+fp"
  17987. .PD
  17988. The single-precision VFPv4 floating-point instructions.
  17989. .IP "\fB+fpv5\fR" 4
  17990. .IX Item "+fpv5"
  17991. The single-precision FPv5 floating-point instructions.
  17992. .IP "\fB+fp.dp\fR" 4
  17993. .IX Item "+fp.dp"
  17994. The single\- and double-precision FPv5 floating-point instructions.
  17995. .IP "\fB+nofp\fR" 4
  17996. .IX Item "+nofp"
  17997. Disable the floating-point extensions.
  17998. .RE
  17999. .RS 4
  18000. .RE
  18001. .IP "\fBarmv8.1\-m.main\fR" 4
  18002. .IX Item "armv8.1-m.main"
  18003. .RS 4
  18004. .PD 0
  18005. .IP "\fB+dsp\fR" 4
  18006. .IX Item "+dsp"
  18007. .PD
  18008. The \s-1DSP\s0 instructions.
  18009. .IP "\fB+mve\fR" 4
  18010. .IX Item "+mve"
  18011. The M\-Profile Vector Extension (\s-1MVE\s0) integer instructions.
  18012. .IP "\fB+mve.fp\fR" 4
  18013. .IX Item "+mve.fp"
  18014. The M\-Profile Vector Extension (\s-1MVE\s0) integer and single precision
  18015. floating-point instructions.
  18016. .IP "\fB+fp\fR" 4
  18017. .IX Item "+fp"
  18018. The single-precision floating-point instructions.
  18019. .IP "\fB+fp.dp\fR" 4
  18020. .IX Item "+fp.dp"
  18021. The single\- and double-precision floating-point instructions.
  18022. .IP "\fB+nofp\fR" 4
  18023. .IX Item "+nofp"
  18024. Disable the floating-point extension.
  18025. .IP "\fB+cdecp0, +cdecp1, ... , +cdecp7\fR" 4
  18026. .IX Item "+cdecp0, +cdecp1, ... , +cdecp7"
  18027. Enable the Custom Datapath Extension (\s-1CDE\s0) on selected coprocessors according
  18028. to the numbers given in the options in the range 0 to 7.
  18029. .RE
  18030. .RS 4
  18031. .RE
  18032. .IP "\fBarmv8\-m.main\fR" 4
  18033. .IX Item "armv8-m.main"
  18034. .RS 4
  18035. .PD 0
  18036. .IP "\fB+dsp\fR" 4
  18037. .IX Item "+dsp"
  18038. .PD
  18039. The \s-1DSP\s0 instructions.
  18040. .IP "\fB+nodsp\fR" 4
  18041. .IX Item "+nodsp"
  18042. Disable the \s-1DSP\s0 extension.
  18043. .IP "\fB+fp\fR" 4
  18044. .IX Item "+fp"
  18045. The single-precision floating-point instructions.
  18046. .IP "\fB+fp.dp\fR" 4
  18047. .IX Item "+fp.dp"
  18048. The single\- and double-precision floating-point instructions.
  18049. .IP "\fB+nofp\fR" 4
  18050. .IX Item "+nofp"
  18051. Disable the floating-point extension.
  18052. .IP "\fB+cdecp0, +cdecp1, ... , +cdecp7\fR" 4
  18053. .IX Item "+cdecp0, +cdecp1, ... , +cdecp7"
  18054. Enable the Custom Datapath Extension (\s-1CDE\s0) on selected coprocessors according
  18055. to the numbers given in the options in the range 0 to 7.
  18056. .RE
  18057. .RS 4
  18058. .RE
  18059. .IP "\fBarmv8\-r\fR" 4
  18060. .IX Item "armv8-r"
  18061. .RS 4
  18062. .PD 0
  18063. .IP "\fB+crc\fR" 4
  18064. .IX Item "+crc"
  18065. .PD
  18066. The Cyclic Redundancy Check (\s-1CRC\s0) instructions.
  18067. .IP "\fB+fp.sp\fR" 4
  18068. .IX Item "+fp.sp"
  18069. The single-precision FPv5 floating-point instructions.
  18070. .IP "\fB+simd\fR" 4
  18071. .IX Item "+simd"
  18072. The ARMv8\-A Advanced \s-1SIMD\s0 and floating-point instructions.
  18073. .IP "\fB+crypto\fR" 4
  18074. .IX Item "+crypto"
  18075. The cryptographic instructions.
  18076. .IP "\fB+nocrypto\fR" 4
  18077. .IX Item "+nocrypto"
  18078. Disable the cryptographic instructions.
  18079. .IP "\fB+nofp\fR" 4
  18080. .IX Item "+nofp"
  18081. Disable the floating-point, Advanced \s-1SIMD\s0 and cryptographic instructions.
  18082. .RE
  18083. .RS 4
  18084. .RE
  18085. .RE
  18086. .RS 4
  18087. .Sp
  18088. \&\fB\-march=native\fR causes the compiler to auto-detect the architecture
  18089. of the build computer. At present, this feature is only supported on
  18090. GNU/Linux, and not all architectures are recognized. If the auto-detect
  18091. is unsuccessful the option has no effect.
  18092. .RE
  18093. .IP "\fB\-mtune=\fR\fIname\fR" 4
  18094. .IX Item "-mtune=name"
  18095. This option specifies the name of the target \s-1ARM\s0 processor for
  18096. which \s-1GCC\s0 should tune the performance of the code.
  18097. For some \s-1ARM\s0 implementations better performance can be obtained by using
  18098. this option.
  18099. Permissible names are: \fBarm7tdmi\fR, \fBarm7tdmi\-s\fR, \fBarm710t\fR,
  18100. \&\fBarm720t\fR, \fBarm740t\fR, \fBstrongarm\fR, \fBstrongarm110\fR,
  18101. \&\fBstrongarm1100\fR, 0\fBstrongarm1110\fR, \fBarm8\fR, \fBarm810\fR,
  18102. \&\fBarm9\fR, \fBarm9e\fR, \fBarm920\fR, \fBarm920t\fR, \fBarm922t\fR,
  18103. \&\fBarm946e\-s\fR, \fBarm966e\-s\fR, \fBarm968e\-s\fR, \fBarm926ej\-s\fR,
  18104. \&\fBarm940t\fR, \fBarm9tdmi\fR, \fBarm10tdmi\fR, \fBarm1020t\fR,
  18105. \&\fBarm1026ej\-s\fR, \fBarm10e\fR, \fBarm1020e\fR, \fBarm1022e\fR,
  18106. \&\fBarm1136j\-s\fR, \fBarm1136jf\-s\fR, \fBmpcore\fR, \fBmpcorenovfp\fR,
  18107. \&\fBarm1156t2\-s\fR, \fBarm1156t2f\-s\fR, \fBarm1176jz\-s\fR, \fBarm1176jzf\-s\fR,
  18108. \&\fBgeneric\-armv7\-a\fR, \fBcortex\-a5\fR, \fBcortex\-a7\fR, \fBcortex\-a8\fR,
  18109. \&\fBcortex\-a9\fR, \fBcortex\-a12\fR, \fBcortex\-a15\fR, \fBcortex\-a17\fR,
  18110. \&\fBcortex\-a32\fR, \fBcortex\-a35\fR, \fBcortex\-a53\fR, \fBcortex\-a55\fR,
  18111. \&\fBcortex\-a57\fR, \fBcortex\-a72\fR, \fBcortex\-a73\fR, \fBcortex\-a75\fR,
  18112. \&\fBcortex\-a76\fR, \fBcortex\-a76ae\fR, \fBcortex\-a77\fR,
  18113. \&\fBares\fR, \fBcortex\-r4\fR, \fBcortex\-r4f\fR,
  18114. \&\fBcortex\-r5\fR, \fBcortex\-r7\fR, \fBcortex\-r8\fR, \fBcortex\-r52\fR,
  18115. \&\fBcortex\-m0\fR, \fBcortex\-m0plus\fR, \fBcortex\-m1\fR, \fBcortex\-m3\fR,
  18116. \&\fBcortex\-m4\fR, \fBcortex\-m7\fR, \fBcortex\-m23\fR, \fBcortex\-m33\fR,
  18117. \&\fBcortex\-m35p\fR, \fBcortex\-m55\fR,
  18118. \&\fBcortex\-m1.small\-multiply\fR, \fBcortex\-m0.small\-multiply\fR,
  18119. \&\fBcortex\-m0plus.small\-multiply\fR, \fBexynos\-m1\fR, \fBmarvell\-pj4\fR,
  18120. \&\fBneoverse\-n1\fR, \fBneoverse\-n2\fR, \fBneoverse\-v1\fR, \fBxscale\fR,
  18121. \&\fBiwmmxt\fR, \fBiwmmxt2\fR, \fBep9312\fR, \fBfa526\fR, \fBfa626\fR,
  18122. \&\fBfa606te\fR, \fBfa626te\fR, \fBfmp626\fR, \fBfa726te\fR, \fBxgene1\fR.
  18123. .Sp
  18124. Additionally, this option can specify that \s-1GCC\s0 should tune the performance
  18125. of the code for a big.LITTLE system. Permissible names are:
  18126. \&\fBcortex\-a15.cortex\-a7\fR, \fBcortex\-a17.cortex\-a7\fR,
  18127. \&\fBcortex\-a57.cortex\-a53\fR, \fBcortex\-a72.cortex\-a53\fR,
  18128. \&\fBcortex\-a72.cortex\-a35\fR, \fBcortex\-a73.cortex\-a53\fR,
  18129. \&\fBcortex\-a75.cortex\-a55\fR, \fBcortex\-a76.cortex\-a55\fR.
  18130. .Sp
  18131. \&\fB\-mtune=generic\-\fR\fIarch\fR specifies that \s-1GCC\s0 should tune the
  18132. performance for a blend of processors within architecture \fIarch\fR.
  18133. The aim is to generate code that run well on the current most popular
  18134. processors, balancing between optimizations that benefit some CPUs in the
  18135. range, and avoiding performance pitfalls of other CPUs. The effects of
  18136. this option may change in future \s-1GCC\s0 versions as \s-1CPU\s0 models come and go.
  18137. .Sp
  18138. \&\fB\-mtune\fR permits the same extension options as \fB\-mcpu\fR, but
  18139. the extension options do not affect the tuning of the generated code.
  18140. .Sp
  18141. \&\fB\-mtune=native\fR causes the compiler to auto-detect the \s-1CPU\s0
  18142. of the build computer. At present, this feature is only supported on
  18143. GNU/Linux, and not all architectures are recognized. If the auto-detect is
  18144. unsuccessful the option has no effect.
  18145. .IP "\fB\-mcpu=\fR\fIname\fR[\fB+extension...\fR]" 4
  18146. .IX Item "-mcpu=name[+extension...]"
  18147. This specifies the name of the target \s-1ARM\s0 processor. \s-1GCC\s0 uses this name
  18148. to derive the name of the target \s-1ARM\s0 architecture (as if specified
  18149. by \fB\-march\fR) and the \s-1ARM\s0 processor type for which to tune for
  18150. performance (as if specified by \fB\-mtune\fR). Where this option
  18151. is used in conjunction with \fB\-march\fR or \fB\-mtune\fR,
  18152. those options take precedence over the appropriate part of this option.
  18153. .Sp
  18154. Many of the supported CPUs implement optional architectural
  18155. extensions. Where this is so the architectural extensions are
  18156. normally enabled by default. If implementations that lack the
  18157. extension exist, then the extension syntax can be used to disable
  18158. those extensions that have been omitted. For floating-point and
  18159. Advanced \s-1SIMD \s0(Neon) instructions, the settings of the options
  18160. \&\fB\-mfloat\-abi\fR and \fB\-mfpu\fR must also be considered:
  18161. floating-point and Advanced \s-1SIMD\s0 instructions will only be used if
  18162. \&\fB\-mfloat\-abi\fR is not set to \fBsoft\fR; and any setting of
  18163. \&\fB\-mfpu\fR other than \fBauto\fR will override the available
  18164. floating-point and \s-1SIMD\s0 extension instructions.
  18165. .Sp
  18166. For example, \fBcortex\-a9\fR can be found in three major
  18167. configurations: integer only, with just a floating-point unit or with
  18168. floating-point and Advanced \s-1SIMD. \s0 The default is to enable all the
  18169. instructions, but the extensions \fB+nosimd\fR and \fB+nofp\fR can
  18170. be used to disable just the \s-1SIMD\s0 or both the \s-1SIMD\s0 and floating-point
  18171. instructions respectively.
  18172. .Sp
  18173. Permissible names for this option are the same as those for
  18174. \&\fB\-mtune\fR.
  18175. .Sp
  18176. The following extension options are common to the listed CPUs:
  18177. .RS 4
  18178. .IP "\fB+nodsp\fR" 4
  18179. .IX Item "+nodsp"
  18180. Disable the \s-1DSP\s0 instructions on \fBcortex\-m33\fR, \fBcortex\-m35p\fR.
  18181. .IP "\fB+nofp\fR" 4
  18182. .IX Item "+nofp"
  18183. Disables the floating-point instructions on \fBarm9e\fR,
  18184. \&\fBarm946e\-s\fR, \fBarm966e\-s\fR, \fBarm968e\-s\fR, \fBarm10e\fR,
  18185. \&\fBarm1020e\fR, \fBarm1022e\fR, \fBarm926ej\-s\fR,
  18186. \&\fBarm1026ej\-s\fR, \fBcortex\-r5\fR, \fBcortex\-r7\fR, \fBcortex\-r8\fR,
  18187. \&\fBcortex\-m4\fR, \fBcortex\-m7\fR, \fBcortex\-m33\fR and \fBcortex\-m35p\fR.
  18188. Disables the floating-point and \s-1SIMD\s0 instructions on
  18189. \&\fBgeneric\-armv7\-a\fR, \fBcortex\-a5\fR, \fBcortex\-a7\fR,
  18190. \&\fBcortex\-a8\fR, \fBcortex\-a9\fR, \fBcortex\-a12\fR,
  18191. \&\fBcortex\-a15\fR, \fBcortex\-a17\fR, \fBcortex\-a15.cortex\-a7\fR,
  18192. \&\fBcortex\-a17.cortex\-a7\fR, \fBcortex\-a32\fR, \fBcortex\-a35\fR,
  18193. \&\fBcortex\-a53\fR and \fBcortex\-a55\fR.
  18194. .IP "\fB+nofp.dp\fR" 4
  18195. .IX Item "+nofp.dp"
  18196. Disables the double-precision component of the floating-point instructions
  18197. on \fBcortex\-r5\fR, \fBcortex\-r7\fR, \fBcortex\-r8\fR, \fBcortex\-r52\fR and
  18198. \&\fBcortex\-m7\fR.
  18199. .IP "\fB+nosimd\fR" 4
  18200. .IX Item "+nosimd"
  18201. Disables the \s-1SIMD \s0(but not floating-point) instructions on
  18202. \&\fBgeneric\-armv7\-a\fR, \fBcortex\-a5\fR, \fBcortex\-a7\fR
  18203. and \fBcortex\-a9\fR.
  18204. .IP "\fB+crypto\fR" 4
  18205. .IX Item "+crypto"
  18206. Enables the cryptographic instructions on \fBcortex\-a32\fR,
  18207. \&\fBcortex\-a35\fR, \fBcortex\-a53\fR, \fBcortex\-a55\fR, \fBcortex\-a57\fR,
  18208. \&\fBcortex\-a72\fR, \fBcortex\-a73\fR, \fBcortex\-a75\fR, \fBexynos\-m1\fR,
  18209. \&\fBxgene1\fR, \fBcortex\-a57.cortex\-a53\fR, \fBcortex\-a72.cortex\-a53\fR,
  18210. \&\fBcortex\-a73.cortex\-a35\fR, \fBcortex\-a73.cortex\-a53\fR and
  18211. \&\fBcortex\-a75.cortex\-a55\fR.
  18212. .RE
  18213. .RS 4
  18214. .Sp
  18215. Additionally the \fBgeneric\-armv7\-a\fR pseudo target defaults to
  18216. VFPv3 with 16 double-precision registers. It supports the following
  18217. extension options: \fBmp\fR, \fBsec\fR, \fBvfpv3\-d16\fR,
  18218. \&\fBvfpv3\fR, \fBvfpv3\-d16\-fp16\fR, \fBvfpv3\-fp16\fR,
  18219. \&\fBvfpv4\-d16\fR, \fBvfpv4\fR, \fBneon\fR, \fBneon\-vfpv3\fR,
  18220. \&\fBneon\-fp16\fR, \fBneon\-vfpv4\fR. The meanings are the same as for
  18221. the extensions to \fB\-march=armv7\-a\fR.
  18222. .Sp
  18223. \&\fB\-mcpu=generic\-\fR\fIarch\fR is also permissible, and is
  18224. equivalent to \fB\-march=\fR\fIarch\fR \fB\-mtune=generic\-\fR\fIarch\fR.
  18225. See \fB\-mtune\fR for more information.
  18226. .Sp
  18227. \&\fB\-mcpu=native\fR causes the compiler to auto-detect the \s-1CPU\s0
  18228. of the build computer. At present, this feature is only supported on
  18229. GNU/Linux, and not all architectures are recognized. If the auto-detect
  18230. is unsuccessful the option has no effect.
  18231. .RE
  18232. .IP "\fB\-mfpu=\fR\fIname\fR" 4
  18233. .IX Item "-mfpu=name"
  18234. This specifies what floating-point hardware (or hardware emulation) is
  18235. available on the target. Permissible names are: \fBauto\fR, \fBvfpv2\fR,
  18236. \&\fBvfpv3\fR,
  18237. \&\fBvfpv3\-fp16\fR, \fBvfpv3\-d16\fR, \fBvfpv3\-d16\-fp16\fR, \fBvfpv3xd\fR,
  18238. \&\fBvfpv3xd\-fp16\fR, \fBneon\-vfpv3\fR, \fBneon\-fp16\fR, \fBvfpv4\fR,
  18239. \&\fBvfpv4\-d16\fR, \fBfpv4\-sp\-d16\fR, \fBneon\-vfpv4\fR,
  18240. \&\fBfpv5\-d16\fR, \fBfpv5\-sp\-d16\fR,
  18241. \&\fBfp\-armv8\fR, \fBneon\-fp\-armv8\fR and \fBcrypto\-neon\-fp\-armv8\fR.
  18242. Note that \fBneon\fR is an alias for \fBneon\-vfpv3\fR and \fBvfp\fR
  18243. is an alias for \fBvfpv2\fR.
  18244. .Sp
  18245. The setting \fBauto\fR is the default and is special. It causes the
  18246. compiler to select the floating-point and Advanced \s-1SIMD\s0 instructions
  18247. based on the settings of \fB\-mcpu\fR and \fB\-march\fR.
  18248. .Sp
  18249. If the selected floating-point hardware includes the \s-1NEON\s0 extension
  18250. (e.g. \fB\-mfpu=neon\fR), note that floating-point
  18251. operations are not generated by \s-1GCC\s0's auto-vectorization pass unless
  18252. \&\fB\-funsafe\-math\-optimizations\fR is also specified. This is
  18253. because \s-1NEON\s0 hardware does not fully implement the \s-1IEEE 754\s0 standard for
  18254. floating-point arithmetic (in particular denormal values are treated as
  18255. zero), so the use of \s-1NEON\s0 instructions may lead to a loss of precision.
  18256. .Sp
  18257. You can also set the fpu name at function level by using the \f(CW\*(C`target("fpu=")\*(C'\fR function attributes or pragmas.
  18258. .IP "\fB\-mfp16\-format=\fR\fIname\fR" 4
  18259. .IX Item "-mfp16-format=name"
  18260. Specify the format of the \f(CW\*(C`_\|_fp16\*(C'\fR half-precision floating-point type.
  18261. Permissible names are \fBnone\fR, \fBieee\fR, and \fBalternative\fR;
  18262. the default is \fBnone\fR, in which case the \f(CW\*(C`_\|_fp16\*(C'\fR type is not
  18263. defined.
  18264. .IP "\fB\-mstructure\-size\-boundary=\fR\fIn\fR" 4
  18265. .IX Item "-mstructure-size-boundary=n"
  18266. The sizes of all structures and unions are rounded up to a multiple
  18267. of the number of bits set by this option. Permissible values are 8, 32
  18268. and 64. The default value varies for different toolchains. For the \s-1COFF\s0
  18269. targeted toolchain the default value is 8. A value of 64 is only allowed
  18270. if the underlying \s-1ABI\s0 supports it.
  18271. .Sp
  18272. Specifying a larger number can produce faster, more efficient code, but
  18273. can also increase the size of the program. Different values are potentially
  18274. incompatible. Code compiled with one value cannot necessarily expect to
  18275. work with code or libraries compiled with another value, if they exchange
  18276. information using structures or unions.
  18277. .Sp
  18278. This option is deprecated.
  18279. .IP "\fB\-mabort\-on\-noreturn\fR" 4
  18280. .IX Item "-mabort-on-noreturn"
  18281. Generate a call to the function \f(CW\*(C`abort\*(C'\fR at the end of a
  18282. \&\f(CW\*(C`noreturn\*(C'\fR function. It is executed if the function tries to
  18283. return.
  18284. .IP "\fB\-mlong\-calls\fR" 4
  18285. .IX Item "-mlong-calls"
  18286. .PD 0
  18287. .IP "\fB\-mno\-long\-calls\fR" 4
  18288. .IX Item "-mno-long-calls"
  18289. .PD
  18290. Tells the compiler to perform function calls by first loading the
  18291. address of the function into a register and then performing a subroutine
  18292. call on this register. This switch is needed if the target function
  18293. lies outside of the 64\-megabyte addressing range of the offset-based
  18294. version of subroutine call instruction.
  18295. .Sp
  18296. Even if this switch is enabled, not all function calls are turned
  18297. into long calls. The heuristic is that static functions, functions
  18298. that have the \f(CW\*(C`short_call\*(C'\fR attribute, functions that are inside
  18299. the scope of a \f(CW\*(C`#pragma no_long_calls\*(C'\fR directive, and functions whose
  18300. definitions have already been compiled within the current compilation
  18301. unit are not turned into long calls. The exceptions to this rule are
  18302. that weak function definitions, functions with the \f(CW\*(C`long_call\*(C'\fR
  18303. attribute or the \f(CW\*(C`section\*(C'\fR attribute, and functions that are within
  18304. the scope of a \f(CW\*(C`#pragma long_calls\*(C'\fR directive are always
  18305. turned into long calls.
  18306. .Sp
  18307. This feature is not enabled by default. Specifying
  18308. \&\fB\-mno\-long\-calls\fR restores the default behavior, as does
  18309. placing the function calls within the scope of a \f(CW\*(C`#pragma
  18310. long_calls_off\*(C'\fR directive. Note these switches have no effect on how
  18311. the compiler generates code to handle function calls via function
  18312. pointers.
  18313. .IP "\fB\-msingle\-pic\-base\fR" 4
  18314. .IX Item "-msingle-pic-base"
  18315. Treat the register used for \s-1PIC\s0 addressing as read-only, rather than
  18316. loading it in the prologue for each function. The runtime system is
  18317. responsible for initializing this register with an appropriate value
  18318. before execution begins.
  18319. .IP "\fB\-mpic\-register=\fR\fIreg\fR" 4
  18320. .IX Item "-mpic-register=reg"
  18321. Specify the register to be used for \s-1PIC\s0 addressing.
  18322. For standard \s-1PIC\s0 base case, the default is any suitable register
  18323. determined by compiler. For single \s-1PIC\s0 base case, the default is
  18324. \&\fBR9\fR if target is \s-1EABI\s0 based or stack-checking is enabled,
  18325. otherwise the default is \fBR10\fR.
  18326. .IP "\fB\-mpic\-data\-is\-text\-relative\fR" 4
  18327. .IX Item "-mpic-data-is-text-relative"
  18328. Assume that the displacement between the text and data segments is fixed
  18329. at static link time. This permits using PC-relative addressing
  18330. operations to access data known to be in the data segment. For
  18331. non-VxWorks \s-1RTP\s0 targets, this option is enabled by default. When
  18332. disabled on such targets, it will enable \fB\-msingle\-pic\-base\fR by
  18333. default.
  18334. .IP "\fB\-mpoke\-function\-name\fR" 4
  18335. .IX Item "-mpoke-function-name"
  18336. Write the name of each function into the text section, directly
  18337. preceding the function prologue. The generated code is similar to this:
  18338. .Sp
  18339. .Vb 9
  18340. \& t0
  18341. \& .ascii "arm_poke_function_name", 0
  18342. \& .align
  18343. \& t1
  18344. \& .word 0xff000000 + (t1 \- t0)
  18345. \& arm_poke_function_name
  18346. \& mov ip, sp
  18347. \& stmfd sp!, {fp, ip, lr, pc}
  18348. \& sub fp, ip, #4
  18349. .Ve
  18350. .Sp
  18351. When performing a stack backtrace, code can inspect the value of
  18352. \&\f(CW\*(C`pc\*(C'\fR stored at \f(CW\*(C`fp + 0\*(C'\fR. If the trace function then looks at
  18353. location \f(CW\*(C`pc \- 12\*(C'\fR and the top 8 bits are set, then we know that
  18354. there is a function name embedded immediately preceding this location
  18355. and has length \f(CW\*(C`((pc[\-3]) & 0xff000000)\*(C'\fR.
  18356. .IP "\fB\-mthumb\fR" 4
  18357. .IX Item "-mthumb"
  18358. .PD 0
  18359. .IP "\fB\-marm\fR" 4
  18360. .IX Item "-marm"
  18361. .PD
  18362. Select between generating code that executes in \s-1ARM\s0 and Thumb
  18363. states. The default for most configurations is to generate code
  18364. that executes in \s-1ARM\s0 state, but the default can be changed by
  18365. configuring \s-1GCC\s0 with the \fB\-\-with\-mode=\fR\fIstate\fR
  18366. configure option.
  18367. .Sp
  18368. You can also override the \s-1ARM\s0 and Thumb mode for each function
  18369. by using the \f(CW\*(C`target("thumb")\*(C'\fR and \f(CW\*(C`target("arm")\*(C'\fR function attributes or pragmas.
  18370. .IP "\fB\-mflip\-thumb\fR" 4
  18371. .IX Item "-mflip-thumb"
  18372. Switch ARM/Thumb modes on alternating functions.
  18373. This option is provided for regression testing of mixed Thumb/ARM code
  18374. generation, and is not intended for ordinary use in compiling code.
  18375. .IP "\fB\-mtpcs\-frame\fR" 4
  18376. .IX Item "-mtpcs-frame"
  18377. Generate a stack frame that is compliant with the Thumb Procedure Call
  18378. Standard for all non-leaf functions. (A leaf function is one that does
  18379. not call any other functions.) The default is \fB\-mno\-tpcs\-frame\fR.
  18380. .IP "\fB\-mtpcs\-leaf\-frame\fR" 4
  18381. .IX Item "-mtpcs-leaf-frame"
  18382. Generate a stack frame that is compliant with the Thumb Procedure Call
  18383. Standard for all leaf functions. (A leaf function is one that does
  18384. not call any other functions.) The default is \fB\-mno\-apcs\-leaf\-frame\fR.
  18385. .IP "\fB\-mcallee\-super\-interworking\fR" 4
  18386. .IX Item "-mcallee-super-interworking"
  18387. Gives all externally visible functions in the file being compiled an \s-1ARM\s0
  18388. instruction set header which switches to Thumb mode before executing the
  18389. rest of the function. This allows these functions to be called from
  18390. non-interworking code. This option is not valid in \s-1AAPCS\s0 configurations
  18391. because interworking is enabled by default.
  18392. .IP "\fB\-mcaller\-super\-interworking\fR" 4
  18393. .IX Item "-mcaller-super-interworking"
  18394. Allows calls via function pointers (including virtual functions) to
  18395. execute correctly regardless of whether the target code has been
  18396. compiled for interworking or not. There is a small overhead in the cost
  18397. of executing a function pointer if this option is enabled. This option
  18398. is not valid in \s-1AAPCS\s0 configurations because interworking is enabled
  18399. by default.
  18400. .IP "\fB\-mtp=\fR\fIname\fR" 4
  18401. .IX Item "-mtp=name"
  18402. Specify the access model for the thread local storage pointer. The valid
  18403. models are \fBsoft\fR, which generates calls to \f(CW\*(C`_\|_aeabi_read_tp\*(C'\fR,
  18404. \&\fBcp15\fR, which fetches the thread pointer from \f(CW\*(C`cp15\*(C'\fR directly
  18405. (supported in the arm6k architecture), and \fBauto\fR, which uses the
  18406. best available method for the selected processor. The default setting is
  18407. \&\fBauto\fR.
  18408. .IP "\fB\-mtls\-dialect=\fR\fIdialect\fR" 4
  18409. .IX Item "-mtls-dialect=dialect"
  18410. Specify the dialect to use for accessing thread local storage. Two
  18411. \&\fIdialect\fRs are supported\-\-\-\fBgnu\fR and \fBgnu2\fR. The
  18412. \&\fBgnu\fR dialect selects the original \s-1GNU\s0 scheme for supporting
  18413. local and global dynamic \s-1TLS\s0 models. The \fBgnu2\fR dialect
  18414. selects the \s-1GNU\s0 descriptor scheme, which provides better performance
  18415. for shared libraries. The \s-1GNU\s0 descriptor scheme is compatible with
  18416. the original scheme, but does require new assembler, linker and
  18417. library support. Initial and local exec \s-1TLS\s0 models are unaffected by
  18418. this option and always use the original scheme.
  18419. .IP "\fB\-mword\-relocations\fR" 4
  18420. .IX Item "-mword-relocations"
  18421. Only generate absolute relocations on word-sized values (i.e. R_ARM_ABS32).
  18422. This is enabled by default on targets (uClinux, SymbianOS) where the runtime
  18423. loader imposes this restriction, and when \fB\-fpic\fR or \fB\-fPIC\fR
  18424. is specified. This option conflicts with \fB\-mslow\-flash\-data\fR.
  18425. .IP "\fB\-mfix\-cortex\-m3\-ldrd\fR" 4
  18426. .IX Item "-mfix-cortex-m3-ldrd"
  18427. Some Cortex\-M3 cores can cause data corruption when \f(CW\*(C`ldrd\*(C'\fR instructions
  18428. with overlapping destination and base registers are used. This option avoids
  18429. generating these instructions. This option is enabled by default when
  18430. \&\fB\-mcpu=cortex\-m3\fR is specified.
  18431. .IP "\fB\-munaligned\-access\fR" 4
  18432. .IX Item "-munaligned-access"
  18433. .PD 0
  18434. .IP "\fB\-mno\-unaligned\-access\fR" 4
  18435. .IX Item "-mno-unaligned-access"
  18436. .PD
  18437. Enables (or disables) reading and writing of 16\- and 32\- bit values
  18438. from addresses that are not 16\- or 32\- bit aligned. By default
  18439. unaligned access is disabled for all pre\-ARMv6, all ARMv6\-M and for
  18440. ARMv8\-M Baseline architectures, and enabled for all other
  18441. architectures. If unaligned access is not enabled then words in packed
  18442. data structures are accessed a byte at a time.
  18443. .Sp
  18444. The \s-1ARM\s0 attribute \f(CW\*(C`Tag_CPU_unaligned_access\*(C'\fR is set in the
  18445. generated object file to either true or false, depending upon the
  18446. setting of this option. If unaligned access is enabled then the
  18447. preprocessor symbol \f(CW\*(C`_\|_ARM_FEATURE_UNALIGNED\*(C'\fR is also
  18448. defined.
  18449. .IP "\fB\-mneon\-for\-64bits\fR" 4
  18450. .IX Item "-mneon-for-64bits"
  18451. This option is deprecated and has no effect.
  18452. .IP "\fB\-mslow\-flash\-data\fR" 4
  18453. .IX Item "-mslow-flash-data"
  18454. Assume loading data from flash is slower than fetching instruction.
  18455. Therefore literal load is minimized for better performance.
  18456. This option is only supported when compiling for ARMv7 M\-profile and
  18457. off by default. It conflicts with \fB\-mword\-relocations\fR.
  18458. .IP "\fB\-masm\-syntax\-unified\fR" 4
  18459. .IX Item "-masm-syntax-unified"
  18460. Assume inline assembler is using unified asm syntax. The default is
  18461. currently off which implies divided syntax. This option has no impact
  18462. on Thumb2. However, this may change in future releases of \s-1GCC.\s0
  18463. Divided syntax should be considered deprecated.
  18464. .IP "\fB\-mrestrict\-it\fR" 4
  18465. .IX Item "-mrestrict-it"
  18466. Restricts generation of \s-1IT\s0 blocks to conform to the rules of ARMv8\-A.
  18467. \&\s-1IT\s0 blocks can only contain a single 16\-bit instruction from a select
  18468. set of instructions. This option is on by default for ARMv8\-A Thumb mode.
  18469. .IP "\fB\-mprint\-tune\-info\fR" 4
  18470. .IX Item "-mprint-tune-info"
  18471. Print \s-1CPU\s0 tuning information as comment in assembler file. This is
  18472. an option used only for regression testing of the compiler and not
  18473. intended for ordinary use in compiling code. This option is disabled
  18474. by default.
  18475. .IP "\fB\-mverbose\-cost\-dump\fR" 4
  18476. .IX Item "-mverbose-cost-dump"
  18477. Enable verbose cost model dumping in the debug dump files. This option is
  18478. provided for use in debugging the compiler.
  18479. .IP "\fB\-mpure\-code\fR" 4
  18480. .IX Item "-mpure-code"
  18481. Do not allow constant data to be placed in code sections.
  18482. Additionally, when compiling for \s-1ELF\s0 object format give all text sections the
  18483. \&\s-1ELF\s0 processor-specific section attribute \f(CW\*(C`SHF_ARM_PURECODE\*(C'\fR. This option
  18484. is only available when generating non-pic code for M\-profile targets.
  18485. .IP "\fB\-mcmse\fR" 4
  18486. .IX Item "-mcmse"
  18487. Generate secure code as per the \*(L"ARMv8\-M Security Extensions: Requirements on
  18488. Development Tools Engineering Specification\*(R", which can be found on
  18489. <\fBhttps://developer.arm.com/documentation/ecm0359818/latest/\fR>.
  18490. .IP "\fB\-mfdpic\fR" 4
  18491. .IX Item "-mfdpic"
  18492. .PD 0
  18493. .IP "\fB\-mno\-fdpic\fR" 4
  18494. .IX Item "-mno-fdpic"
  18495. .PD
  18496. Select the \s-1FDPIC ABI,\s0 which uses 64\-bit function descriptors to
  18497. represent pointers to functions. When the compiler is configured for
  18498. \&\f(CW\*(C`arm\-*\-uclinuxfdpiceabi\*(C'\fR targets, this option is on by default
  18499. and implies \fB\-fPIE\fR if none of the PIC/PIE\-related options is
  18500. provided. On other targets, it only enables the FDPIC-specific code
  18501. generation features, and the user should explicitly provide the
  18502. PIC/PIE\-related options as needed.
  18503. .Sp
  18504. Note that static linking is not supported because it would still
  18505. involve the dynamic linker when the program self-relocates. If such
  18506. behavior is acceptable, use \-static and \-Wl,\-dynamic\-linker options.
  18507. .Sp
  18508. The opposite \fB\-mno\-fdpic\fR option is useful (and required) to
  18509. build the Linux kernel using the same (\f(CW\*(C`arm\-*\-uclinuxfdpiceabi\*(C'\fR)
  18510. toolchain as the one used to build the userland programs.
  18511. .PP
  18512. \fI\s-1AVR\s0 Options\fR
  18513. .IX Subsection "AVR Options"
  18514. .PP
  18515. These options are defined for \s-1AVR\s0 implementations:
  18516. .IP "\fB\-mmcu=\fR\fImcu\fR" 4
  18517. .IX Item "-mmcu=mcu"
  18518. Specify Atmel \s-1AVR\s0 instruction set architectures (\s-1ISA\s0) or \s-1MCU\s0 type.
  18519. .Sp
  18520. The default for this option is@tie{}\fBavr2\fR.
  18521. .Sp
  18522. \&\s-1GCC\s0 supports the following \s-1AVR\s0 devices and ISAs:
  18523. .RS 4
  18524. .ie n .IP """avr2""" 4
  18525. .el .IP "\f(CWavr2\fR" 4
  18526. .IX Item "avr2"
  18527. \&\*(L"Classic\*(R" devices with up to 8@tie{}KiB of program memory.
  18528. \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`attiny22\*(C'\fR, \f(CW\*(C`attiny26\*(C'\fR, \f(CW\*(C`at90s2313\*(C'\fR, \f(CW\*(C`at90s2323\*(C'\fR, \f(CW\*(C`at90s2333\*(C'\fR, \f(CW\*(C`at90s2343\*(C'\fR, \f(CW\*(C`at90s4414\*(C'\fR, \f(CW\*(C`at90s4433\*(C'\fR, \f(CW\*(C`at90s4434\*(C'\fR, \f(CW\*(C`at90c8534\*(C'\fR, \f(CW\*(C`at90s8515\*(C'\fR, \f(CW\*(C`at90s8535\*(C'\fR.
  18529. .ie n .IP """avr25""" 4
  18530. .el .IP "\f(CWavr25\fR" 4
  18531. .IX Item "avr25"
  18532. \&\*(L"Classic\*(R" devices with up to 8@tie{}KiB of program memory and with the \f(CW\*(C`MOVW\*(C'\fR instruction.
  18533. \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`attiny13\*(C'\fR, \f(CW\*(C`attiny13a\*(C'\fR, \f(CW\*(C`attiny24\*(C'\fR, \f(CW\*(C`attiny24a\*(C'\fR, \f(CW\*(C`attiny25\*(C'\fR, \f(CW\*(C`attiny261\*(C'\fR, \f(CW\*(C`attiny261a\*(C'\fR, \f(CW\*(C`attiny2313\*(C'\fR, \f(CW\*(C`attiny2313a\*(C'\fR, \f(CW\*(C`attiny43u\*(C'\fR, \f(CW\*(C`attiny44\*(C'\fR, \f(CW\*(C`attiny44a\*(C'\fR, \f(CW\*(C`attiny45\*(C'\fR, \f(CW\*(C`attiny48\*(C'\fR, \f(CW\*(C`attiny441\*(C'\fR, \f(CW\*(C`attiny461\*(C'\fR, \f(CW\*(C`attiny461a\*(C'\fR, \f(CW\*(C`attiny4313\*(C'\fR, \f(CW\*(C`attiny84\*(C'\fR, \f(CW\*(C`attiny84a\*(C'\fR, \f(CW\*(C`attiny85\*(C'\fR, \f(CW\*(C`attiny87\*(C'\fR, \f(CW\*(C`attiny88\*(C'\fR, \f(CW\*(C`attiny828\*(C'\fR, \f(CW\*(C`attiny841\*(C'\fR, \f(CW\*(C`attiny861\*(C'\fR, \f(CW\*(C`attiny861a\*(C'\fR, \f(CW\*(C`ata5272\*(C'\fR, \f(CW\*(C`ata6616c\*(C'\fR, \f(CW\*(C`at86rf401\*(C'\fR.
  18534. .ie n .IP """avr3""" 4
  18535. .el .IP "\f(CWavr3\fR" 4
  18536. .IX Item "avr3"
  18537. \&\*(L"Classic\*(R" devices with 16@tie{}KiB up to 64@tie{}KiB of program memory.
  18538. \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`at76c711\*(C'\fR, \f(CW\*(C`at43usb355\*(C'\fR.
  18539. .ie n .IP """avr31""" 4
  18540. .el .IP "\f(CWavr31\fR" 4
  18541. .IX Item "avr31"
  18542. \&\*(L"Classic\*(R" devices with 128@tie{}KiB of program memory.
  18543. \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`atmega103\*(C'\fR, \f(CW\*(C`at43usb320\*(C'\fR.
  18544. .ie n .IP """avr35""" 4
  18545. .el .IP "\f(CWavr35\fR" 4
  18546. .IX Item "avr35"
  18547. \&\*(L"Classic\*(R" devices with 16@tie{}KiB up to 64@tie{}KiB of program memory and with the \f(CW\*(C`MOVW\*(C'\fR instruction.
  18548. \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`attiny167\*(C'\fR, \f(CW\*(C`attiny1634\*(C'\fR, \f(CW\*(C`atmega8u2\*(C'\fR, \f(CW\*(C`atmega16u2\*(C'\fR, \f(CW\*(C`atmega32u2\*(C'\fR, \f(CW\*(C`ata5505\*(C'\fR, \f(CW\*(C`ata6617c\*(C'\fR, \f(CW\*(C`ata664251\*(C'\fR, \f(CW\*(C`at90usb82\*(C'\fR, \f(CW\*(C`at90usb162\*(C'\fR.
  18549. .ie n .IP """avr4""" 4
  18550. .el .IP "\f(CWavr4\fR" 4
  18551. .IX Item "avr4"
  18552. \&\*(L"Enhanced\*(R" devices with up to 8@tie{}KiB of program memory.
  18553. \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`atmega48\*(C'\fR, \f(CW\*(C`atmega48a\*(C'\fR, \f(CW\*(C`atmega48p\*(C'\fR, \f(CW\*(C`atmega48pa\*(C'\fR, \f(CW\*(C`atmega48pb\*(C'\fR, \f(CW\*(C`atmega8\*(C'\fR, \f(CW\*(C`atmega8a\*(C'\fR, \f(CW\*(C`atmega8hva\*(C'\fR, \f(CW\*(C`atmega88\*(C'\fR, \f(CW\*(C`atmega88a\*(C'\fR, \f(CW\*(C`atmega88p\*(C'\fR, \f(CW\*(C`atmega88pa\*(C'\fR, \f(CW\*(C`atmega88pb\*(C'\fR, \f(CW\*(C`atmega8515\*(C'\fR, \f(CW\*(C`atmega8535\*(C'\fR, \f(CW\*(C`ata6285\*(C'\fR, \f(CW\*(C`ata6286\*(C'\fR, \f(CW\*(C`ata6289\*(C'\fR, \f(CW\*(C`ata6612c\*(C'\fR, \f(CW\*(C`at90pwm1\*(C'\fR, \f(CW\*(C`at90pwm2\*(C'\fR, \f(CW\*(C`at90pwm2b\*(C'\fR, \f(CW\*(C`at90pwm3\*(C'\fR, \f(CW\*(C`at90pwm3b\*(C'\fR, \f(CW\*(C`at90pwm81\*(C'\fR.
  18554. .ie n .IP """avr5""" 4
  18555. .el .IP "\f(CWavr5\fR" 4
  18556. .IX Item "avr5"
  18557. \&\*(L"Enhanced\*(R" devices with 16@tie{}KiB up to 64@tie{}KiB of program memory.
  18558. \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`atmega16\*(C'\fR, \f(CW\*(C`atmega16a\*(C'\fR, \f(CW\*(C`atmega16hva\*(C'\fR, \f(CW\*(C`atmega16hva2\*(C'\fR, \f(CW\*(C`atmega16hvb\*(C'\fR, \f(CW\*(C`atmega16hvbrevb\*(C'\fR, \f(CW\*(C`atmega16m1\*(C'\fR, \f(CW\*(C`atmega16u4\*(C'\fR, \f(CW\*(C`atmega161\*(C'\fR, \f(CW\*(C`atmega162\*(C'\fR, \f(CW\*(C`atmega163\*(C'\fR, \f(CW\*(C`atmega164a\*(C'\fR, \f(CW\*(C`atmega164p\*(C'\fR, \f(CW\*(C`atmega164pa\*(C'\fR, \f(CW\*(C`atmega165\*(C'\fR, \f(CW\*(C`atmega165a\*(C'\fR, \f(CW\*(C`atmega165p\*(C'\fR, \f(CW\*(C`atmega165pa\*(C'\fR, \f(CW\*(C`atmega168\*(C'\fR, \f(CW\*(C`atmega168a\*(C'\fR, \f(CW\*(C`atmega168p\*(C'\fR, \f(CW\*(C`atmega168pa\*(C'\fR, \f(CW\*(C`atmega168pb\*(C'\fR, \f(CW\*(C`atmega169\*(C'\fR, \f(CW\*(C`atmega169a\*(C'\fR, \f(CW\*(C`atmega169p\*(C'\fR, \f(CW\*(C`atmega169pa\*(C'\fR, \f(CW\*(C`atmega32\*(C'\fR, \f(CW\*(C`atmega32a\*(C'\fR, \f(CW\*(C`atmega32c1\*(C'\fR, \f(CW\*(C`atmega32hvb\*(C'\fR, \f(CW\*(C`atmega32hvbrevb\*(C'\fR, \f(CW\*(C`atmega32m1\*(C'\fR, \f(CW\*(C`atmega32u4\*(C'\fR, \f(CW\*(C`atmega32u6\*(C'\fR, \f(CW\*(C`atmega323\*(C'\fR, \f(CW\*(C`atmega324a\*(C'\fR, \f(CW\*(C`atmega324p\*(C'\fR, \f(CW\*(C`atmega324pa\*(C'\fR, \f(CW\*(C`atmega325\*(C'\fR, \f(CW\*(C`atmega325a\*(C'\fR, \f(CW\*(C`atmega325p\*(C'\fR, \f(CW\*(C`atmega325pa\*(C'\fR, \f(CW\*(C`atmega328\*(C'\fR, \f(CW\*(C`atmega328p\*(C'\fR, \f(CW\*(C`atmega328pb\*(C'\fR, \f(CW\*(C`atmega329\*(C'\fR, \f(CW\*(C`atmega329a\*(C'\fR, \f(CW\*(C`atmega329p\*(C'\fR, \f(CW\*(C`atmega329pa\*(C'\fR, \f(CW\*(C`atmega3250\*(C'\fR, \f(CW\*(C`atmega3250a\*(C'\fR, \f(CW\*(C`atmega3250p\*(C'\fR, \f(CW\*(C`atmega3250pa\*(C'\fR, \f(CW\*(C`atmega3290\*(C'\fR, \f(CW\*(C`atmega3290a\*(C'\fR, \f(CW\*(C`atmega3290p\*(C'\fR, \f(CW\*(C`atmega3290pa\*(C'\fR, \f(CW\*(C`atmega406\*(C'\fR, \f(CW\*(C`atmega64\*(C'\fR, \f(CW\*(C`atmega64a\*(C'\fR, \f(CW\*(C`atmega64c1\*(C'\fR, \f(CW\*(C`atmega64hve\*(C'\fR, \f(CW\*(C`atmega64hve2\*(C'\fR, \f(CW\*(C`atmega64m1\*(C'\fR, \f(CW\*(C`atmega64rfr2\*(C'\fR, \f(CW\*(C`atmega640\*(C'\fR, \f(CW\*(C`atmega644\*(C'\fR, \f(CW\*(C`atmega644a\*(C'\fR, \f(CW\*(C`atmega644p\*(C'\fR, \f(CW\*(C`atmega644pa\*(C'\fR, \f(CW\*(C`atmega644rfr2\*(C'\fR, \f(CW\*(C`atmega645\*(C'\fR, \f(CW\*(C`atmega645a\*(C'\fR, \f(CW\*(C`atmega645p\*(C'\fR, \f(CW\*(C`atmega649\*(C'\fR, \f(CW\*(C`atmega649a\*(C'\fR, \f(CW\*(C`atmega649p\*(C'\fR, \f(CW\*(C`atmega6450\*(C'\fR, \f(CW\*(C`atmega6450a\*(C'\fR, \f(CW\*(C`atmega6450p\*(C'\fR, \f(CW\*(C`atmega6490\*(C'\fR, \f(CW\*(C`atmega6490a\*(C'\fR, \f(CW\*(C`atmega6490p\*(C'\fR, \f(CW\*(C`ata5795\*(C'\fR, \f(CW\*(C`ata5790\*(C'\fR, \f(CW\*(C`ata5790n\*(C'\fR, \f(CW\*(C`ata5791\*(C'\fR, \f(CW\*(C`ata6613c\*(C'\fR, \f(CW\*(C`ata6614q\*(C'\fR, \f(CW\*(C`ata5782\*(C'\fR, \f(CW\*(C`ata5831\*(C'\fR, \f(CW\*(C`ata8210\*(C'\fR, \f(CW\*(C`ata8510\*(C'\fR, \f(CW\*(C`ata5702m322\*(C'\fR, \f(CW\*(C`at90pwm161\*(C'\fR, \f(CW\*(C`at90pwm216\*(C'\fR, \f(CW\*(C`at90pwm316\*(C'\fR, \f(CW\*(C`at90can32\*(C'\fR, \f(CW\*(C`at90can64\*(C'\fR, \f(CW\*(C`at90scr100\*(C'\fR, \f(CW\*(C`at90usb646\*(C'\fR, \f(CW\*(C`at90usb647\*(C'\fR, \f(CW\*(C`at94k\*(C'\fR, \f(CW\*(C`m3000\*(C'\fR.
  18559. .ie n .IP """avr51""" 4
  18560. .el .IP "\f(CWavr51\fR" 4
  18561. .IX Item "avr51"
  18562. \&\*(L"Enhanced\*(R" devices with 128@tie{}KiB of program memory.
  18563. \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`atmega128\*(C'\fR, \f(CW\*(C`atmega128a\*(C'\fR, \f(CW\*(C`atmega128rfa1\*(C'\fR, \f(CW\*(C`atmega128rfr2\*(C'\fR, \f(CW\*(C`atmega1280\*(C'\fR, \f(CW\*(C`atmega1281\*(C'\fR, \f(CW\*(C`atmega1284\*(C'\fR, \f(CW\*(C`atmega1284p\*(C'\fR, \f(CW\*(C`atmega1284rfr2\*(C'\fR, \f(CW\*(C`at90can128\*(C'\fR, \f(CW\*(C`at90usb1286\*(C'\fR, \f(CW\*(C`at90usb1287\*(C'\fR.
  18564. .ie n .IP """avr6""" 4
  18565. .el .IP "\f(CWavr6\fR" 4
  18566. .IX Item "avr6"
  18567. \&\*(L"Enhanced\*(R" devices with 3\-byte \s-1PC,\s0 i.e. with more than 128@tie{}KiB of program memory.
  18568. \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`atmega256rfr2\*(C'\fR, \f(CW\*(C`atmega2560\*(C'\fR, \f(CW\*(C`atmega2561\*(C'\fR, \f(CW\*(C`atmega2564rfr2\*(C'\fR.
  18569. .ie n .IP """avrxmega2""" 4
  18570. .el .IP "\f(CWavrxmega2\fR" 4
  18571. .IX Item "avrxmega2"
  18572. \&\*(L"\s-1XMEGA\*(R"\s0 devices with more than 8@tie{}KiB and up to 64@tie{}KiB of program memory.
  18573. \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`atxmega8e5\*(C'\fR, \f(CW\*(C`atxmega16a4\*(C'\fR, \f(CW\*(C`atxmega16a4u\*(C'\fR, \f(CW\*(C`atxmega16c4\*(C'\fR, \f(CW\*(C`atxmega16d4\*(C'\fR, \f(CW\*(C`atxmega16e5\*(C'\fR, \f(CW\*(C`atxmega32a4\*(C'\fR, \f(CW\*(C`atxmega32a4u\*(C'\fR, \f(CW\*(C`atxmega32c3\*(C'\fR, \f(CW\*(C`atxmega32c4\*(C'\fR, \f(CW\*(C`atxmega32d3\*(C'\fR, \f(CW\*(C`atxmega32d4\*(C'\fR, \f(CW\*(C`atxmega32e5\*(C'\fR.
  18574. .ie n .IP """avrxmega3""" 4
  18575. .el .IP "\f(CWavrxmega3\fR" 4
  18576. .IX Item "avrxmega3"
  18577. \&\*(L"\s-1XMEGA\*(R"\s0 devices with up to 64@tie{}KiB of combined program memory and \s-1RAM,\s0 and with program memory visible in the \s-1RAM\s0 address space.
  18578. \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`attiny202\*(C'\fR, \f(CW\*(C`attiny204\*(C'\fR, \f(CW\*(C`attiny212\*(C'\fR, \f(CW\*(C`attiny214\*(C'\fR, \f(CW\*(C`attiny402\*(C'\fR, \f(CW\*(C`attiny404\*(C'\fR, \f(CW\*(C`attiny406\*(C'\fR, \f(CW\*(C`attiny412\*(C'\fR, \f(CW\*(C`attiny414\*(C'\fR, \f(CW\*(C`attiny416\*(C'\fR, \f(CW\*(C`attiny417\*(C'\fR, \f(CW\*(C`attiny804\*(C'\fR, \f(CW\*(C`attiny806\*(C'\fR, \f(CW\*(C`attiny807\*(C'\fR, \f(CW\*(C`attiny814\*(C'\fR, \f(CW\*(C`attiny816\*(C'\fR, \f(CW\*(C`attiny817\*(C'\fR, \f(CW\*(C`attiny1604\*(C'\fR, \f(CW\*(C`attiny1606\*(C'\fR, \f(CW\*(C`attiny1607\*(C'\fR, \f(CW\*(C`attiny1614\*(C'\fR, \f(CW\*(C`attiny1616\*(C'\fR, \f(CW\*(C`attiny1617\*(C'\fR, \f(CW\*(C`attiny3214\*(C'\fR, \f(CW\*(C`attiny3216\*(C'\fR, \f(CW\*(C`attiny3217\*(C'\fR, \f(CW\*(C`atmega808\*(C'\fR, \f(CW\*(C`atmega809\*(C'\fR, \f(CW\*(C`atmega1608\*(C'\fR, \f(CW\*(C`atmega1609\*(C'\fR, \f(CW\*(C`atmega3208\*(C'\fR, \f(CW\*(C`atmega3209\*(C'\fR, \f(CW\*(C`atmega4808\*(C'\fR, \f(CW\*(C`atmega4809\*(C'\fR.
  18579. .ie n .IP """avrxmega4""" 4
  18580. .el .IP "\f(CWavrxmega4\fR" 4
  18581. .IX Item "avrxmega4"
  18582. \&\*(L"\s-1XMEGA\*(R"\s0 devices with more than 64@tie{}KiB and up to 128@tie{}KiB of program memory.
  18583. \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`atxmega64a3\*(C'\fR, \f(CW\*(C`atxmega64a3u\*(C'\fR, \f(CW\*(C`atxmega64a4u\*(C'\fR, \f(CW\*(C`atxmega64b1\*(C'\fR, \f(CW\*(C`atxmega64b3\*(C'\fR, \f(CW\*(C`atxmega64c3\*(C'\fR, \f(CW\*(C`atxmega64d3\*(C'\fR, \f(CW\*(C`atxmega64d4\*(C'\fR.
  18584. .ie n .IP """avrxmega5""" 4
  18585. .el .IP "\f(CWavrxmega5\fR" 4
  18586. .IX Item "avrxmega5"
  18587. \&\*(L"\s-1XMEGA\*(R"\s0 devices with more than 64@tie{}KiB and up to 128@tie{}KiB of program memory and more than 64@tie{}KiB of \s-1RAM.
  18588. \&\s0\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`atxmega64a1\*(C'\fR, \f(CW\*(C`atxmega64a1u\*(C'\fR.
  18589. .ie n .IP """avrxmega6""" 4
  18590. .el .IP "\f(CWavrxmega6\fR" 4
  18591. .IX Item "avrxmega6"
  18592. \&\*(L"\s-1XMEGA\*(R"\s0 devices with more than 128@tie{}KiB of program memory.
  18593. \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`atxmega128a3\*(C'\fR, \f(CW\*(C`atxmega128a3u\*(C'\fR, \f(CW\*(C`atxmega128b1\*(C'\fR, \f(CW\*(C`atxmega128b3\*(C'\fR, \f(CW\*(C`atxmega128c3\*(C'\fR, \f(CW\*(C`atxmega128d3\*(C'\fR, \f(CW\*(C`atxmega128d4\*(C'\fR, \f(CW\*(C`atxmega192a3\*(C'\fR, \f(CW\*(C`atxmega192a3u\*(C'\fR, \f(CW\*(C`atxmega192c3\*(C'\fR, \f(CW\*(C`atxmega192d3\*(C'\fR, \f(CW\*(C`atxmega256a3\*(C'\fR, \f(CW\*(C`atxmega256a3b\*(C'\fR, \f(CW\*(C`atxmega256a3bu\*(C'\fR, \f(CW\*(C`atxmega256a3u\*(C'\fR, \f(CW\*(C`atxmega256c3\*(C'\fR, \f(CW\*(C`atxmega256d3\*(C'\fR, \f(CW\*(C`atxmega384c3\*(C'\fR, \f(CW\*(C`atxmega384d3\*(C'\fR.
  18594. .ie n .IP """avrxmega7""" 4
  18595. .el .IP "\f(CWavrxmega7\fR" 4
  18596. .IX Item "avrxmega7"
  18597. \&\*(L"\s-1XMEGA\*(R"\s0 devices with more than 128@tie{}KiB of program memory and more than 64@tie{}KiB of \s-1RAM.
  18598. \&\s0\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`atxmega128a1\*(C'\fR, \f(CW\*(C`atxmega128a1u\*(C'\fR, \f(CW\*(C`atxmega128a4u\*(C'\fR.
  18599. .ie n .IP """avrtiny""" 4
  18600. .el .IP "\f(CWavrtiny\fR" 4
  18601. .IX Item "avrtiny"
  18602. \&\*(L"\s-1TINY\*(R"\s0 Tiny core devices with 512@tie{}B up to 4@tie{}KiB of program memory.
  18603. \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`attiny4\*(C'\fR, \f(CW\*(C`attiny5\*(C'\fR, \f(CW\*(C`attiny9\*(C'\fR, \f(CW\*(C`attiny10\*(C'\fR, \f(CW\*(C`attiny20\*(C'\fR, \f(CW\*(C`attiny40\*(C'\fR.
  18604. .ie n .IP """avr1""" 4
  18605. .el .IP "\f(CWavr1\fR" 4
  18606. .IX Item "avr1"
  18607. This \s-1ISA\s0 is implemented by the minimal \s-1AVR\s0 core and supported for assembler only.
  18608. \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`attiny11\*(C'\fR, \f(CW\*(C`attiny12\*(C'\fR, \f(CW\*(C`attiny15\*(C'\fR, \f(CW\*(C`attiny28\*(C'\fR, \f(CW\*(C`at90s1200\*(C'\fR.
  18609. .RE
  18610. .RS 4
  18611. .RE
  18612. .IP "\fB\-mabsdata\fR" 4
  18613. .IX Item "-mabsdata"
  18614. Assume that all data in static storage can be accessed by \s-1LDS / STS\s0
  18615. instructions. This option has only an effect on reduced Tiny devices like
  18616. ATtiny40. See also the \f(CW\*(C`absdata\*(C'\fR
  18617. \&\fB\s-1AVR\s0 Variable Attributes,variable attribute\fR.
  18618. .IP "\fB\-maccumulate\-args\fR" 4
  18619. .IX Item "-maccumulate-args"
  18620. Accumulate outgoing function arguments and acquire/release the needed
  18621. stack space for outgoing function arguments once in function
  18622. prologue/epilogue. Without this option, outgoing arguments are pushed
  18623. before calling a function and popped afterwards.
  18624. .Sp
  18625. Popping the arguments after the function call can be expensive on
  18626. \&\s-1AVR\s0 so that accumulating the stack space might lead to smaller
  18627. executables because arguments need not be removed from the
  18628. stack after such a function call.
  18629. .Sp
  18630. This option can lead to reduced code size for functions that perform
  18631. several calls to functions that get their arguments on the stack like
  18632. calls to printf-like functions.
  18633. .IP "\fB\-mbranch\-cost=\fR\fIcost\fR" 4
  18634. .IX Item "-mbranch-cost=cost"
  18635. Set the branch costs for conditional branch instructions to
  18636. \&\fIcost\fR. Reasonable values for \fIcost\fR are small, non-negative
  18637. integers. The default branch cost is 0.
  18638. .IP "\fB\-mcall\-prologues\fR" 4
  18639. .IX Item "-mcall-prologues"
  18640. Functions prologues/epilogues are expanded as calls to appropriate
  18641. subroutines. Code size is smaller.
  18642. .IP "\fB\-mdouble=\fR\fIbits\fR" 4
  18643. .IX Item "-mdouble=bits"
  18644. .PD 0
  18645. .IP "\fB\-mlong\-double=\fR\fIbits\fR" 4
  18646. .IX Item "-mlong-double=bits"
  18647. .PD
  18648. Set the size (in bits) of the \f(CW\*(C`double\*(C'\fR or \f(CW\*(C`long double\*(C'\fR type,
  18649. respectively. Possible values for \fIbits\fR are 32 and 64.
  18650. Whether or not a specific value for \fIbits\fR is allowed depends on
  18651. the \f(CW\*(C`\-\-with\-double=\*(C'\fR and \f(CW\*(C`\-\-with\-long\-double=\*(C'\fR
  18652. configure\ options (\f(CW\*(C`https://gcc.gnu.org/install/configure.html#avr\*(C'\fR),
  18653. and the same applies for the default values of the options.
  18654. .IP "\fB\-mgas\-isr\-prologues\fR" 4
  18655. .IX Item "-mgas-isr-prologues"
  18656. Interrupt service routines (ISRs) may use the \f(CW\*(C`_\|_gcc_isr\*(C'\fR pseudo
  18657. instruction supported by \s-1GNU\s0 Binutils.
  18658. If this option is on, the feature can still be disabled for individual
  18659. ISRs by means of the \fB\s-1AVR\s0 Function Attributes,,\f(CB\*(C`no_gccisr\*(C'\fB\fR
  18660. function attribute. This feature is activated per default
  18661. if optimization is on (but not with \fB\-Og\fR, \f(CW@pxref\fR{Optimize Options}),
  18662. and if \s-1GNU\s0 Binutils support \s-1PR21683 \s0(\f(CW\*(C`https://sourceware.org/PR21683\*(C'\fR).
  18663. .IP "\fB\-mint8\fR" 4
  18664. .IX Item "-mint8"
  18665. Assume \f(CW\*(C`int\*(C'\fR to be 8\-bit integer. This affects the sizes of all types: a
  18666. \&\f(CW\*(C`char\*(C'\fR is 1 byte, an \f(CW\*(C`int\*(C'\fR is 1 byte, a \f(CW\*(C`long\*(C'\fR is 2 bytes,
  18667. and \f(CW\*(C`long long\*(C'\fR is 4 bytes. Please note that this option does not
  18668. conform to the C standards, but it results in smaller code
  18669. size.
  18670. .IP "\fB\-mmain\-is\-OS_task\fR" 4
  18671. .IX Item "-mmain-is-OS_task"
  18672. Do not save registers in \f(CW\*(C`main\*(C'\fR. The effect is the same like
  18673. attaching attribute \fB\s-1AVR\s0 Function Attributes,,\f(CB\*(C`OS_task\*(C'\fB\fR
  18674. to \f(CW\*(C`main\*(C'\fR. It is activated per default if optimization is on.
  18675. .IP "\fB\-mn\-flash=\fR\fInum\fR" 4
  18676. .IX Item "-mn-flash=num"
  18677. Assume that the flash memory has a size of
  18678. \&\fInum\fR times 64@tie{}KiB.
  18679. .IP "\fB\-mno\-interrupts\fR" 4
  18680. .IX Item "-mno-interrupts"
  18681. Generated code is not compatible with hardware interrupts.
  18682. Code size is smaller.
  18683. .IP "\fB\-mrelax\fR" 4
  18684. .IX Item "-mrelax"
  18685. Try to replace \f(CW\*(C`CALL\*(C'\fR resp. \f(CW\*(C`JMP\*(C'\fR instruction by the shorter
  18686. \&\f(CW\*(C`RCALL\*(C'\fR resp. \f(CW\*(C`RJMP\*(C'\fR instruction if applicable.
  18687. Setting \fB\-mrelax\fR just adds the \fB\-\-mlink\-relax\fR option to
  18688. the assembler's command line and the \fB\-\-relax\fR option to the
  18689. linker's command line.
  18690. .Sp
  18691. Jump relaxing is performed by the linker because jump offsets are not
  18692. known before code is located. Therefore, the assembler code generated by the
  18693. compiler is the same, but the instructions in the executable may
  18694. differ from instructions in the assembler code.
  18695. .Sp
  18696. Relaxing must be turned on if linker stubs are needed, see the
  18697. section on \f(CW\*(C`EIND\*(C'\fR and linker stubs below.
  18698. .IP "\fB\-mrmw\fR" 4
  18699. .IX Item "-mrmw"
  18700. Assume that the device supports the Read-Modify-Write
  18701. instructions \f(CW\*(C`XCH\*(C'\fR, \f(CW\*(C`LAC\*(C'\fR, \f(CW\*(C`LAS\*(C'\fR and \f(CW\*(C`LAT\*(C'\fR.
  18702. .IP "\fB\-mshort\-calls\fR" 4
  18703. .IX Item "-mshort-calls"
  18704. Assume that \f(CW\*(C`RJMP\*(C'\fR and \f(CW\*(C`RCALL\*(C'\fR can target the whole
  18705. program memory.
  18706. .Sp
  18707. This option is used internally for multilib selection. It is
  18708. not an optimization option, and you don't need to set it by hand.
  18709. .IP "\fB\-msp8\fR" 4
  18710. .IX Item "-msp8"
  18711. Treat the stack pointer register as an 8\-bit register,
  18712. i.e. assume the high byte of the stack pointer is zero.
  18713. In general, you don't need to set this option by hand.
  18714. .Sp
  18715. This option is used internally by the compiler to select and
  18716. build multilibs for architectures \f(CW\*(C`avr2\*(C'\fR and \f(CW\*(C`avr25\*(C'\fR.
  18717. These architectures mix devices with and without \f(CW\*(C`SPH\*(C'\fR.
  18718. For any setting other than \fB\-mmcu=avr2\fR or \fB\-mmcu=avr25\fR
  18719. the compiler driver adds or removes this option from the compiler
  18720. proper's command line, because the compiler then knows if the device
  18721. or architecture has an 8\-bit stack pointer and thus no \f(CW\*(C`SPH\*(C'\fR
  18722. register or not.
  18723. .IP "\fB\-mstrict\-X\fR" 4
  18724. .IX Item "-mstrict-X"
  18725. Use address register \f(CW\*(C`X\*(C'\fR in a way proposed by the hardware. This means
  18726. that \f(CW\*(C`X\*(C'\fR is only used in indirect, post-increment or
  18727. pre-decrement addressing.
  18728. .Sp
  18729. Without this option, the \f(CW\*(C`X\*(C'\fR register may be used in the same way
  18730. as \f(CW\*(C`Y\*(C'\fR or \f(CW\*(C`Z\*(C'\fR which then is emulated by additional
  18731. instructions.
  18732. For example, loading a value with \f(CW\*(C`X+const\*(C'\fR addressing with a
  18733. small non-negative \f(CW\*(C`const < 64\*(C'\fR to a register \fIRn\fR is
  18734. performed as
  18735. .Sp
  18736. .Vb 3
  18737. \& adiw r26, const ; X += const
  18738. \& ld <Rn>, X ; <Rn> = *X
  18739. \& sbiw r26, const ; X \-= const
  18740. .Ve
  18741. .IP "\fB\-mtiny\-stack\fR" 4
  18742. .IX Item "-mtiny-stack"
  18743. Only change the lower 8@tie{}bits of the stack pointer.
  18744. .IP "\fB\-mfract\-convert\-truncate\fR" 4
  18745. .IX Item "-mfract-convert-truncate"
  18746. Allow to use truncation instead of rounding towards zero for fractional fixed-point types.
  18747. .IP "\fB\-nodevicelib\fR" 4
  18748. .IX Item "-nodevicelib"
  18749. Don't link against AVR-LibC's device specific library \f(CW\*(C`lib<mcu>.a\*(C'\fR.
  18750. .IP "\fB\-nodevicespecs\fR" 4
  18751. .IX Item "-nodevicespecs"
  18752. Don't add \fB\-specs=device\-specs/specs\-\fR\fImcu\fR to the compiler driver's
  18753. command line. The user takes responsibility for supplying the sub-processes
  18754. like compiler proper, assembler and linker with appropriate command line
  18755. options. This means that the user has to supply her private device specs
  18756. file by means of \fB\-specs=\fR\fIpath-to-specs-file\fR. There is no
  18757. more need for option \fB\-mmcu=\fR\fImcu\fR.
  18758. .Sp
  18759. This option can also serve as a replacement for the older way of
  18760. specifying custom device-specs files that needed \fB\-B\fR \fIsome-path\fR to point to a directory
  18761. which contains a folder named \f(CW\*(C`device\-specs\*(C'\fR which contains a specs file named
  18762. \&\f(CW\*(C`specs\-\f(CImcu\f(CW\*(C'\fR, where \fImcu\fR was specified by \fB\-mmcu=\fR\fImcu\fR.
  18763. .IP "\fB\-Waddr\-space\-convert\fR" 4
  18764. .IX Item "-Waddr-space-convert"
  18765. Warn about conversions between address spaces in the case where the
  18766. resulting address space is not contained in the incoming address space.
  18767. .IP "\fB\-Wmisspelled\-isr\fR" 4
  18768. .IX Item "-Wmisspelled-isr"
  18769. Warn if the \s-1ISR\s0 is misspelled, i.e. without _\|_vector prefix.
  18770. Enabled by default.
  18771. .PP
  18772. \f(CW\*(C`EIND\*(C'\fR and Devices with More Than 128 Ki Bytes of Flash
  18773. .IX Subsection "EIND and Devices with More Than 128 Ki Bytes of Flash"
  18774. .PP
  18775. Pointers in the implementation are 16@tie{}bits wide.
  18776. The address of a function or label is represented as word address so
  18777. that indirect jumps and calls can target any code address in the
  18778. range of 64@tie{}Ki words.
  18779. .PP
  18780. In order to facilitate indirect jump on devices with more than 128@tie{}Ki
  18781. bytes of program memory space, there is a special function register called
  18782. \&\f(CW\*(C`EIND\*(C'\fR that serves as most significant part of the target address
  18783. when \f(CW\*(C`EICALL\*(C'\fR or \f(CW\*(C`EIJMP\*(C'\fR instructions are used.
  18784. .PP
  18785. Indirect jumps and calls on these devices are handled as follows by
  18786. the compiler and are subject to some limitations:
  18787. .IP "*" 4
  18788. The compiler never sets \f(CW\*(C`EIND\*(C'\fR.
  18789. .IP "*" 4
  18790. The compiler uses \f(CW\*(C`EIND\*(C'\fR implicitly in \f(CW\*(C`EICALL\*(C'\fR/\f(CW\*(C`EIJMP\*(C'\fR
  18791. instructions or might read \f(CW\*(C`EIND\*(C'\fR directly in order to emulate an
  18792. indirect call/jump by means of a \f(CW\*(C`RET\*(C'\fR instruction.
  18793. .IP "*" 4
  18794. The compiler assumes that \f(CW\*(C`EIND\*(C'\fR never changes during the startup
  18795. code or during the application. In particular, \f(CW\*(C`EIND\*(C'\fR is not
  18796. saved/restored in function or interrupt service routine
  18797. prologue/epilogue.
  18798. .IP "*" 4
  18799. For indirect calls to functions and computed goto, the linker
  18800. generates \fIstubs\fR. Stubs are jump pads sometimes also called
  18801. \&\fItrampolines\fR. Thus, the indirect call/jump jumps to such a stub.
  18802. The stub contains a direct jump to the desired address.
  18803. .IP "*" 4
  18804. Linker relaxation must be turned on so that the linker generates
  18805. the stubs correctly in all situations. See the compiler option
  18806. \&\fB\-mrelax\fR and the linker option \fB\-\-relax\fR.
  18807. There are corner cases where the linker is supposed to generate stubs
  18808. but aborts without relaxation and without a helpful error message.
  18809. .IP "*" 4
  18810. The default linker script is arranged for code with \f(CW\*(C`EIND = 0\*(C'\fR.
  18811. If code is supposed to work for a setup with \f(CW\*(C`EIND != 0\*(C'\fR, a custom
  18812. linker script has to be used in order to place the sections whose
  18813. name start with \f(CW\*(C`.trampolines\*(C'\fR into the segment where \f(CW\*(C`EIND\*(C'\fR
  18814. points to.
  18815. .IP "*" 4
  18816. The startup code from libgcc never sets \f(CW\*(C`EIND\*(C'\fR.
  18817. Notice that startup code is a blend of code from libgcc and AVR-LibC.
  18818. For the impact of AVR-LibC on \f(CW\*(C`EIND\*(C'\fR, see the
  18819. AVR-LibC\ user\ manual (\f(CW\*(C`http://nongnu.org/avr\-libc/user\-manual/\*(C'\fR).
  18820. .IP "*" 4
  18821. It is legitimate for user-specific startup code to set up \f(CW\*(C`EIND\*(C'\fR
  18822. early, for example by means of initialization code located in
  18823. section \f(CW\*(C`.init3\*(C'\fR. Such code runs prior to general startup code
  18824. that initializes \s-1RAM\s0 and calls constructors, but after the bit
  18825. of startup code from AVR-LibC that sets \f(CW\*(C`EIND\*(C'\fR to the segment
  18826. where the vector table is located.
  18827. .Sp
  18828. .Vb 1
  18829. \& #include <avr/io.h>
  18830. \&
  18831. \& static void
  18832. \& _\|_attribute_\|_((section(".init3"),naked,used,no_instrument_function))
  18833. \& init3_set_eind (void)
  18834. \& {
  18835. \& _\|_asm volatile ("ldi r24,pm_hh8(_\|_trampolines_start)\en\et"
  18836. \& "out %i0,r24" :: "n" (&EIND) : "r24","memory");
  18837. \& }
  18838. .Ve
  18839. .Sp
  18840. The \f(CW\*(C`_\|_trampolines_start\*(C'\fR symbol is defined in the linker script.
  18841. .IP "*" 4
  18842. Stubs are generated automatically by the linker if
  18843. the following two conditions are met:
  18844. .RS 4
  18845. .ie n .IP "\-<The address of a label is taken by means of the ""gs"" modifier>" 4
  18846. .el .IP "\-<The address of a label is taken by means of the \f(CWgs\fR modifier>" 4
  18847. .IX Item "-<The address of a label is taken by means of the gs modifier>"
  18848. (short for \fIgenerate stubs\fR) like so:
  18849. .Sp
  18850. .Vb 2
  18851. \& LDI r24, lo8(gs(<func>))
  18852. \& LDI r25, hi8(gs(<func>))
  18853. .Ve
  18854. .IP "\-<The final location of that label is in a code segment>" 4
  18855. .IX Item "-<The final location of that label is in a code segment>"
  18856. \&\fIoutside\fR the segment where the stubs are located.
  18857. .RE
  18858. .RS 4
  18859. .RE
  18860. .IP "*" 4
  18861. The compiler emits such \f(CW\*(C`gs\*(C'\fR modifiers for code labels in the
  18862. following situations:
  18863. .RS 4
  18864. .IP "\-<Taking address of a function or code label.>" 4
  18865. .IX Item "-<Taking address of a function or code label.>"
  18866. .PD 0
  18867. .IP "\-<Computed goto.>" 4
  18868. .IX Item "-<Computed goto.>"
  18869. .IP "\-<If prologue-save function is used, see \fB\-mcall\-prologues\fR>" 4
  18870. .IX Item "-<If prologue-save function is used, see -mcall-prologues>"
  18871. .PD
  18872. command-line option.
  18873. .IP "\-<Switch/case dispatch tables. If you do not want such dispatch>" 4
  18874. .IX Item "-<Switch/case dispatch tables. If you do not want such dispatch>"
  18875. tables you can specify the \fB\-fno\-jump\-tables\fR command-line option.
  18876. .IP "\-<C and \*(C+ constructors/destructors called during startup/shutdown.>" 4
  18877. .IX Item "-<C and constructors/destructors called during startup/shutdown.>"
  18878. .PD 0
  18879. .ie n .IP "\-<If the tools hit a ""gs()"" modifier explained above.>" 4
  18880. .el .IP "\-<If the tools hit a \f(CWgs()\fR modifier explained above.>" 4
  18881. .IX Item "-<If the tools hit a gs() modifier explained above.>"
  18882. .RE
  18883. .RS 4
  18884. .RE
  18885. .IP "*" 4
  18886. .PD
  18887. Jumping to non-symbolic addresses like so is \fInot\fR supported:
  18888. .Sp
  18889. .Vb 5
  18890. \& int main (void)
  18891. \& {
  18892. \& /* Call function at word address 0x2 */
  18893. \& return ((int(*)(void)) 0x2)();
  18894. \& }
  18895. .Ve
  18896. .Sp
  18897. Instead, a stub has to be set up, i.e. the function has to be called
  18898. through a symbol (\f(CW\*(C`func_4\*(C'\fR in the example):
  18899. .Sp
  18900. .Vb 3
  18901. \& int main (void)
  18902. \& {
  18903. \& extern int func_4 (void);
  18904. \&
  18905. \& /* Call function at byte address 0x4 */
  18906. \& return func_4();
  18907. \& }
  18908. .Ve
  18909. .Sp
  18910. and the application be linked with \fB\-Wl,\-\-defsym,func_4=0x4\fR.
  18911. Alternatively, \f(CW\*(C`func_4\*(C'\fR can be defined in the linker script.
  18912. .PP
  18913. Handling of the \f(CW\*(C`RAMPD\*(C'\fR, \f(CW\*(C`RAMPX\*(C'\fR, \f(CW\*(C`RAMPY\*(C'\fR and \f(CW\*(C`RAMPZ\*(C'\fR Special Function Registers
  18914. .IX Subsection "Handling of the RAMPD, RAMPX, RAMPY and RAMPZ Special Function Registers"
  18915. .PP
  18916. Some \s-1AVR\s0 devices support memories larger than the 64@tie{}KiB range
  18917. that can be accessed with 16\-bit pointers. To access memory locations
  18918. outside this 64@tie{}KiB range, the content of a \f(CW\*(C`RAMP\*(C'\fR
  18919. register is used as high part of the address:
  18920. The \f(CW\*(C`X\*(C'\fR, \f(CW\*(C`Y\*(C'\fR, \f(CW\*(C`Z\*(C'\fR address register is concatenated
  18921. with the \f(CW\*(C`RAMPX\*(C'\fR, \f(CW\*(C`RAMPY\*(C'\fR, \f(CW\*(C`RAMPZ\*(C'\fR special function
  18922. register, respectively, to get a wide address. Similarly,
  18923. \&\f(CW\*(C`RAMPD\*(C'\fR is used together with direct addressing.
  18924. .IP "*" 4
  18925. The startup code initializes the \f(CW\*(C`RAMP\*(C'\fR special function
  18926. registers with zero.
  18927. .IP "*" 4
  18928. If a \fB\s-1AVR\s0 Named Address Spaces,named address space\fR other than
  18929. generic or \f(CW\*(C`_\|_flash\*(C'\fR is used, then \f(CW\*(C`RAMPZ\*(C'\fR is set
  18930. as needed before the operation.
  18931. .IP "*" 4
  18932. If the device supports \s-1RAM\s0 larger than 64@tie{}KiB and the compiler
  18933. needs to change \f(CW\*(C`RAMPZ\*(C'\fR to accomplish an operation, \f(CW\*(C`RAMPZ\*(C'\fR
  18934. is reset to zero after the operation.
  18935. .IP "*" 4
  18936. If the device comes with a specific \f(CW\*(C`RAMP\*(C'\fR register, the \s-1ISR\s0
  18937. prologue/epilogue saves/restores that \s-1SFR\s0 and initializes it with
  18938. zero in case the \s-1ISR\s0 code might (implicitly) use it.
  18939. .IP "*" 4
  18940. \&\s-1RAM\s0 larger than 64@tie{}KiB is not supported by \s-1GCC\s0 for \s-1AVR\s0 targets.
  18941. If you use inline assembler to read from locations outside the
  18942. 16\-bit address range and change one of the \f(CW\*(C`RAMP\*(C'\fR registers,
  18943. you must reset it to zero after the access.
  18944. .PP
  18945. \s-1AVR\s0 Built-in Macros
  18946. .IX Subsection "AVR Built-in Macros"
  18947. .PP
  18948. \&\s-1GCC\s0 defines several built-in macros so that the user code can test
  18949. for the presence or absence of features. Almost any of the following
  18950. built-in macros are deduced from device capabilities and thus
  18951. triggered by the \fB\-mmcu=\fR command-line option.
  18952. .PP
  18953. For even more AVR-specific built-in macros see
  18954. \&\fB\s-1AVR\s0 Named Address Spaces\fR and \fB\s-1AVR\s0 Built-in Functions\fR.
  18955. .ie n .IP """_\|_AVR_ARCH_\|_""" 4
  18956. .el .IP "\f(CW_\|_AVR_ARCH_\|_\fR" 4
  18957. .IX Item "__AVR_ARCH__"
  18958. Build-in macro that resolves to a decimal number that identifies the
  18959. architecture and depends on the \fB\-mmcu=\fR\fImcu\fR option.
  18960. Possible values are:
  18961. .Sp
  18962. \&\f(CW2\fR, \f(CW25\fR, \f(CW3\fR, \f(CW31\fR, \f(CW35\fR,
  18963. \&\f(CW4\fR, \f(CW5\fR, \f(CW51\fR, \f(CW6\fR
  18964. .Sp
  18965. for \fImcu\fR=\f(CW\*(C`avr2\*(C'\fR, \f(CW\*(C`avr25\*(C'\fR, \f(CW\*(C`avr3\*(C'\fR, \f(CW\*(C`avr31\*(C'\fR,
  18966. \&\f(CW\*(C`avr35\*(C'\fR, \f(CW\*(C`avr4\*(C'\fR, \f(CW\*(C`avr5\*(C'\fR, \f(CW\*(C`avr51\*(C'\fR, \f(CW\*(C`avr6\*(C'\fR,
  18967. .Sp
  18968. respectively and
  18969. .Sp
  18970. \&\f(CW100\fR,
  18971. \&\f(CW102\fR, \f(CW103\fR, \f(CW104\fR,
  18972. \&\f(CW105\fR, \f(CW106\fR, \f(CW107\fR
  18973. .Sp
  18974. for \fImcu\fR=\f(CW\*(C`avrtiny\*(C'\fR,
  18975. \&\f(CW\*(C`avrxmega2\*(C'\fR, \f(CW\*(C`avrxmega3\*(C'\fR, \f(CW\*(C`avrxmega4\*(C'\fR,
  18976. \&\f(CW\*(C`avrxmega5\*(C'\fR, \f(CW\*(C`avrxmega6\*(C'\fR, \f(CW\*(C`avrxmega7\*(C'\fR, respectively.
  18977. If \fImcu\fR specifies a device, this built-in macro is set
  18978. accordingly. For example, with \fB\-mmcu=atmega8\fR the macro is
  18979. defined to \f(CW4\fR.
  18980. .ie n .IP """_\|_AVR_\f(CIDevice\f(CW_\|_""" 4
  18981. .el .IP "\f(CW_\|_AVR_\f(CIDevice\f(CW_\|_\fR" 4
  18982. .IX Item "__AVR_Device__"
  18983. Setting \fB\-mmcu=\fR\fIdevice\fR defines this built-in macro which reflects
  18984. the device's name. For example, \fB\-mmcu=atmega8\fR defines the
  18985. built-in macro \f(CW\*(C`_\|_AVR_ATmega8_\|_\*(C'\fR, \fB\-mmcu=attiny261a\fR defines
  18986. \&\f(CW\*(C`_\|_AVR_ATtiny261A_\|_\*(C'\fR, etc.
  18987. .Sp
  18988. The built-in macros' names follow
  18989. the scheme \f(CW\*(C`_\|_AVR_\f(CIDevice\f(CW_\|_\*(C'\fR where \fIDevice\fR is
  18990. the device name as from the \s-1AVR\s0 user manual. The difference between
  18991. \&\fIDevice\fR in the built-in macro and \fIdevice\fR in
  18992. \&\fB\-mmcu=\fR\fIdevice\fR is that the latter is always lowercase.
  18993. .Sp
  18994. If \fIdevice\fR is not a device but only a core architecture like
  18995. \&\fBavr51\fR, this macro is not defined.
  18996. .ie n .IP """_\|_AVR_DEVICE_NAME_\|_""" 4
  18997. .el .IP "\f(CW_\|_AVR_DEVICE_NAME_\|_\fR" 4
  18998. .IX Item "__AVR_DEVICE_NAME__"
  18999. Setting \fB\-mmcu=\fR\fIdevice\fR defines this built-in macro to
  19000. the device's name. For example, with \fB\-mmcu=atmega8\fR the macro
  19001. is defined to \f(CW\*(C`atmega8\*(C'\fR.
  19002. .Sp
  19003. If \fIdevice\fR is not a device but only a core architecture like
  19004. \&\fBavr51\fR, this macro is not defined.
  19005. .ie n .IP """_\|_AVR_XMEGA_\|_""" 4
  19006. .el .IP "\f(CW_\|_AVR_XMEGA_\|_\fR" 4
  19007. .IX Item "__AVR_XMEGA__"
  19008. The device / architecture belongs to the \s-1XMEGA\s0 family of devices.
  19009. .ie n .IP """_\|_AVR_HAVE_ELPM_\|_""" 4
  19010. .el .IP "\f(CW_\|_AVR_HAVE_ELPM_\|_\fR" 4
  19011. .IX Item "__AVR_HAVE_ELPM__"
  19012. The device has the \f(CW\*(C`ELPM\*(C'\fR instruction.
  19013. .ie n .IP """_\|_AVR_HAVE_ELPMX_\|_""" 4
  19014. .el .IP "\f(CW_\|_AVR_HAVE_ELPMX_\|_\fR" 4
  19015. .IX Item "__AVR_HAVE_ELPMX__"
  19016. The device has the \f(CW\*(C`ELPM R\f(CIn\f(CW,Z\*(C'\fR and \f(CW\*(C`ELPM
  19017. R\f(CIn\f(CW,Z+\*(C'\fR instructions.
  19018. .ie n .IP """_\|_AVR_HAVE_MOVW_\|_""" 4
  19019. .el .IP "\f(CW_\|_AVR_HAVE_MOVW_\|_\fR" 4
  19020. .IX Item "__AVR_HAVE_MOVW__"
  19021. The device has the \f(CW\*(C`MOVW\*(C'\fR instruction to perform 16\-bit
  19022. register-register moves.
  19023. .ie n .IP """_\|_AVR_HAVE_LPMX_\|_""" 4
  19024. .el .IP "\f(CW_\|_AVR_HAVE_LPMX_\|_\fR" 4
  19025. .IX Item "__AVR_HAVE_LPMX__"
  19026. The device has the \f(CW\*(C`LPM R\f(CIn\f(CW,Z\*(C'\fR and
  19027. \&\f(CW\*(C`LPM R\f(CIn\f(CW,Z+\*(C'\fR instructions.
  19028. .ie n .IP """_\|_AVR_HAVE_MUL_\|_""" 4
  19029. .el .IP "\f(CW_\|_AVR_HAVE_MUL_\|_\fR" 4
  19030. .IX Item "__AVR_HAVE_MUL__"
  19031. The device has a hardware multiplier.
  19032. .ie n .IP """_\|_AVR_HAVE_JMP_CALL_\|_""" 4
  19033. .el .IP "\f(CW_\|_AVR_HAVE_JMP_CALL_\|_\fR" 4
  19034. .IX Item "__AVR_HAVE_JMP_CALL__"
  19035. The device has the \f(CW\*(C`JMP\*(C'\fR and \f(CW\*(C`CALL\*(C'\fR instructions.
  19036. This is the case for devices with more than 8@tie{}KiB of program
  19037. memory.
  19038. .ie n .IP """_\|_AVR_HAVE_EIJMP_EICALL_\|_""" 4
  19039. .el .IP "\f(CW_\|_AVR_HAVE_EIJMP_EICALL_\|_\fR" 4
  19040. .IX Item "__AVR_HAVE_EIJMP_EICALL__"
  19041. .PD 0
  19042. .ie n .IP """_\|_AVR_3_BYTE_PC_\|_""" 4
  19043. .el .IP "\f(CW_\|_AVR_3_BYTE_PC_\|_\fR" 4
  19044. .IX Item "__AVR_3_BYTE_PC__"
  19045. .PD
  19046. The device has the \f(CW\*(C`EIJMP\*(C'\fR and \f(CW\*(C`EICALL\*(C'\fR instructions.
  19047. This is the case for devices with more than 128@tie{}KiB of program memory.
  19048. This also means that the program counter
  19049. (\s-1PC\s0) is 3@tie{}bytes wide.
  19050. .ie n .IP """_\|_AVR_2_BYTE_PC_\|_""" 4
  19051. .el .IP "\f(CW_\|_AVR_2_BYTE_PC_\|_\fR" 4
  19052. .IX Item "__AVR_2_BYTE_PC__"
  19053. The program counter (\s-1PC\s0) is 2@tie{}bytes wide. This is the case for devices
  19054. with up to 128@tie{}KiB of program memory.
  19055. .ie n .IP """_\|_AVR_HAVE_8BIT_SP_\|_""" 4
  19056. .el .IP "\f(CW_\|_AVR_HAVE_8BIT_SP_\|_\fR" 4
  19057. .IX Item "__AVR_HAVE_8BIT_SP__"
  19058. .PD 0
  19059. .ie n .IP """_\|_AVR_HAVE_16BIT_SP_\|_""" 4
  19060. .el .IP "\f(CW_\|_AVR_HAVE_16BIT_SP_\|_\fR" 4
  19061. .IX Item "__AVR_HAVE_16BIT_SP__"
  19062. .PD
  19063. The stack pointer (\s-1SP\s0) register is treated as 8\-bit respectively
  19064. 16\-bit register by the compiler.
  19065. The definition of these macros is affected by \fB\-mtiny\-stack\fR.
  19066. .ie n .IP """_\|_AVR_HAVE_SPH_\|_""" 4
  19067. .el .IP "\f(CW_\|_AVR_HAVE_SPH_\|_\fR" 4
  19068. .IX Item "__AVR_HAVE_SPH__"
  19069. .PD 0
  19070. .ie n .IP """_\|_AVR_SP8_\|_""" 4
  19071. .el .IP "\f(CW_\|_AVR_SP8_\|_\fR" 4
  19072. .IX Item "__AVR_SP8__"
  19073. .PD
  19074. The device has the \s-1SPH \s0(high part of stack pointer) special function
  19075. register or has an 8\-bit stack pointer, respectively.
  19076. The definition of these macros is affected by \fB\-mmcu=\fR and
  19077. in the cases of \fB\-mmcu=avr2\fR and \fB\-mmcu=avr25\fR also
  19078. by \fB\-msp8\fR.
  19079. .ie n .IP """_\|_AVR_HAVE_RAMPD_\|_""" 4
  19080. .el .IP "\f(CW_\|_AVR_HAVE_RAMPD_\|_\fR" 4
  19081. .IX Item "__AVR_HAVE_RAMPD__"
  19082. .PD 0
  19083. .ie n .IP """_\|_AVR_HAVE_RAMPX_\|_""" 4
  19084. .el .IP "\f(CW_\|_AVR_HAVE_RAMPX_\|_\fR" 4
  19085. .IX Item "__AVR_HAVE_RAMPX__"
  19086. .ie n .IP """_\|_AVR_HAVE_RAMPY_\|_""" 4
  19087. .el .IP "\f(CW_\|_AVR_HAVE_RAMPY_\|_\fR" 4
  19088. .IX Item "__AVR_HAVE_RAMPY__"
  19089. .ie n .IP """_\|_AVR_HAVE_RAMPZ_\|_""" 4
  19090. .el .IP "\f(CW_\|_AVR_HAVE_RAMPZ_\|_\fR" 4
  19091. .IX Item "__AVR_HAVE_RAMPZ__"
  19092. .PD
  19093. The device has the \f(CW\*(C`RAMPD\*(C'\fR, \f(CW\*(C`RAMPX\*(C'\fR, \f(CW\*(C`RAMPY\*(C'\fR,
  19094. \&\f(CW\*(C`RAMPZ\*(C'\fR special function register, respectively.
  19095. .ie n .IP """_\|_NO_INTERRUPTS_\|_""" 4
  19096. .el .IP "\f(CW_\|_NO_INTERRUPTS_\|_\fR" 4
  19097. .IX Item "__NO_INTERRUPTS__"
  19098. This macro reflects the \fB\-mno\-interrupts\fR command-line option.
  19099. .ie n .IP """_\|_AVR_ERRATA_SKIP_\|_""" 4
  19100. .el .IP "\f(CW_\|_AVR_ERRATA_SKIP_\|_\fR" 4
  19101. .IX Item "__AVR_ERRATA_SKIP__"
  19102. .PD 0
  19103. .ie n .IP """_\|_AVR_ERRATA_SKIP_JMP_CALL_\|_""" 4
  19104. .el .IP "\f(CW_\|_AVR_ERRATA_SKIP_JMP_CALL_\|_\fR" 4
  19105. .IX Item "__AVR_ERRATA_SKIP_JMP_CALL__"
  19106. .PD
  19107. Some \s-1AVR\s0 devices (\s-1AT90S8515,\s0 ATmega103) must not skip 32\-bit
  19108. instructions because of a hardware erratum. Skip instructions are
  19109. \&\f(CW\*(C`SBRS\*(C'\fR, \f(CW\*(C`SBRC\*(C'\fR, \f(CW\*(C`SBIS\*(C'\fR, \f(CW\*(C`SBIC\*(C'\fR and \f(CW\*(C`CPSE\*(C'\fR.
  19110. The second macro is only defined if \f(CW\*(C`_\|_AVR_HAVE_JMP_CALL_\|_\*(C'\fR is also
  19111. set.
  19112. .ie n .IP """_\|_AVR_ISA_RMW_\|_""" 4
  19113. .el .IP "\f(CW_\|_AVR_ISA_RMW_\|_\fR" 4
  19114. .IX Item "__AVR_ISA_RMW__"
  19115. The device has Read-Modify-Write instructions (\s-1XCH, LAC, LAS\s0 and \s-1LAT\s0).
  19116. .ie n .IP """_\|_AVR_SFR_OFFSET_\|_=\f(CIoffset\f(CW""" 4
  19117. .el .IP "\f(CW_\|_AVR_SFR_OFFSET_\|_=\f(CIoffset\f(CW\fR" 4
  19118. .IX Item "__AVR_SFR_OFFSET__=offset"
  19119. Instructions that can address I/O special function registers directly
  19120. like \f(CW\*(C`IN\*(C'\fR, \f(CW\*(C`OUT\*(C'\fR, \f(CW\*(C`SBI\*(C'\fR, etc. may use a different
  19121. address as if addressed by an instruction to access \s-1RAM\s0 like \f(CW\*(C`LD\*(C'\fR
  19122. or \f(CW\*(C`STS\*(C'\fR. This offset depends on the device architecture and has
  19123. to be subtracted from the \s-1RAM\s0 address in order to get the
  19124. respective I/O@tie{}address.
  19125. .ie n .IP """_\|_AVR_SHORT_CALLS_\|_""" 4
  19126. .el .IP "\f(CW_\|_AVR_SHORT_CALLS_\|_\fR" 4
  19127. .IX Item "__AVR_SHORT_CALLS__"
  19128. The \fB\-mshort\-calls\fR command line option is set.
  19129. .ie n .IP """_\|_AVR_PM_BASE_ADDRESS_\|_=\f(CIaddr\f(CW""" 4
  19130. .el .IP "\f(CW_\|_AVR_PM_BASE_ADDRESS_\|_=\f(CIaddr\f(CW\fR" 4
  19131. .IX Item "__AVR_PM_BASE_ADDRESS__=addr"
  19132. Some devices support reading from flash memory by means of \f(CW\*(C`LD*\*(C'\fR
  19133. instructions. The flash memory is seen in the data address space
  19134. at an offset of \f(CW\*(C`_\|_AVR_PM_BASE_ADDRESS_\|_\*(C'\fR. If this macro
  19135. is not defined, this feature is not available. If defined,
  19136. the address space is linear and there is no need to put
  19137. \&\f(CW\*(C`.rodata\*(C'\fR into \s-1RAM. \s0 This is handled by the default linker
  19138. description file, and is currently available for
  19139. \&\f(CW\*(C`avrtiny\*(C'\fR and \f(CW\*(C`avrxmega3\*(C'\fR. Even more convenient,
  19140. there is no need to use address spaces like \f(CW\*(C`_\|_flash\*(C'\fR or
  19141. features like attribute \f(CW\*(C`progmem\*(C'\fR and \f(CW\*(C`pgm_read_*\*(C'\fR.
  19142. .ie n .IP """_\|_WITH_AVRLIBC_\|_""" 4
  19143. .el .IP "\f(CW_\|_WITH_AVRLIBC_\|_\fR" 4
  19144. .IX Item "__WITH_AVRLIBC__"
  19145. The compiler is configured to be used together with AVR-Libc.
  19146. See the \fB\-\-with\-avrlibc\fR configure option.
  19147. .ie n .IP """_\|_HAVE_DOUBLE_MULTILIB_\|_""" 4
  19148. .el .IP "\f(CW_\|_HAVE_DOUBLE_MULTILIB_\|_\fR" 4
  19149. .IX Item "__HAVE_DOUBLE_MULTILIB__"
  19150. Defined if \fB\-mdouble=\fR acts as a multilib option.
  19151. .ie n .IP """_\|_HAVE_DOUBLE32_\|_""" 4
  19152. .el .IP "\f(CW_\|_HAVE_DOUBLE32_\|_\fR" 4
  19153. .IX Item "__HAVE_DOUBLE32__"
  19154. .PD 0
  19155. .ie n .IP """_\|_HAVE_DOUBLE64_\|_""" 4
  19156. .el .IP "\f(CW_\|_HAVE_DOUBLE64_\|_\fR" 4
  19157. .IX Item "__HAVE_DOUBLE64__"
  19158. .PD
  19159. Defined if the compiler supports 32\-bit double resp. 64\-bit double.
  19160. The actual layout is specified by option \fB\-mdouble=\fR.
  19161. .ie n .IP """_\|_DEFAULT_DOUBLE_\|_""" 4
  19162. .el .IP "\f(CW_\|_DEFAULT_DOUBLE_\|_\fR" 4
  19163. .IX Item "__DEFAULT_DOUBLE__"
  19164. The size in bits of \f(CW\*(C`double\*(C'\fR if \fB\-mdouble=\fR is not set.
  19165. To test the layout of \f(CW\*(C`double\*(C'\fR in a program, use the built-in
  19166. macro \f(CW\*(C`_\|_SIZEOF_DOUBLE_\|_\*(C'\fR.
  19167. .ie n .IP """_\|_HAVE_LONG_DOUBLE32_\|_""" 4
  19168. .el .IP "\f(CW_\|_HAVE_LONG_DOUBLE32_\|_\fR" 4
  19169. .IX Item "__HAVE_LONG_DOUBLE32__"
  19170. .PD 0
  19171. .ie n .IP """_\|_HAVE_LONG_DOUBLE64_\|_""" 4
  19172. .el .IP "\f(CW_\|_HAVE_LONG_DOUBLE64_\|_\fR" 4
  19173. .IX Item "__HAVE_LONG_DOUBLE64__"
  19174. .ie n .IP """_\|_HAVE_LONG_DOUBLE_MULTILIB_\|_""" 4
  19175. .el .IP "\f(CW_\|_HAVE_LONG_DOUBLE_MULTILIB_\|_\fR" 4
  19176. .IX Item "__HAVE_LONG_DOUBLE_MULTILIB__"
  19177. .ie n .IP """_\|_DEFAULT_LONG_DOUBLE_\|_""" 4
  19178. .el .IP "\f(CW_\|_DEFAULT_LONG_DOUBLE_\|_\fR" 4
  19179. .IX Item "__DEFAULT_LONG_DOUBLE__"
  19180. .PD
  19181. Same as above, but for \f(CW\*(C`long double\*(C'\fR instead of \f(CW\*(C`double\*(C'\fR.
  19182. .ie n .IP """_\|_WITH_DOUBLE_COMPARISON_\|_""" 4
  19183. .el .IP "\f(CW_\|_WITH_DOUBLE_COMPARISON_\|_\fR" 4
  19184. .IX Item "__WITH_DOUBLE_COMPARISON__"
  19185. Reflects the \f(CW\*(C`\-\-with\-double\-comparison={tristate|bool|libf7}\*(C'\fR
  19186. configure\ option (\f(CW\*(C`https://gcc.gnu.org/install/configure.html#avr\*(C'\fR)
  19187. and is defined to \f(CW2\fR or \f(CW3\fR.
  19188. .ie n .IP """_\|_WITH_LIBF7_LIBGCC_\|_""" 4
  19189. .el .IP "\f(CW_\|_WITH_LIBF7_LIBGCC_\|_\fR" 4
  19190. .IX Item "__WITH_LIBF7_LIBGCC__"
  19191. .PD 0
  19192. .ie n .IP """_\|_WITH_LIBF7_MATH_\|_""" 4
  19193. .el .IP "\f(CW_\|_WITH_LIBF7_MATH_\|_\fR" 4
  19194. .IX Item "__WITH_LIBF7_MATH__"
  19195. .ie n .IP """_\|_WITH_LIBF7_MATH_SYMBOLS_\|_""" 4
  19196. .el .IP "\f(CW_\|_WITH_LIBF7_MATH_SYMBOLS_\|_\fR" 4
  19197. .IX Item "__WITH_LIBF7_MATH_SYMBOLS__"
  19198. .PD
  19199. Reflects the \f(CW\*(C`\-\-with\-libf7={libgcc|math|math\-symbols}\*(C'\fR
  19200. configure\ option (\f(CW\*(C`https://gcc.gnu.org/install/configure.html#avr\*(C'\fR).
  19201. .PP
  19202. \fIBlackfin Options\fR
  19203. .IX Subsection "Blackfin Options"
  19204. .IP "\fB\-mcpu=\fR\fIcpu\fR[\fB\-\fR\fIsirevision\fR]" 4
  19205. .IX Item "-mcpu=cpu[-sirevision]"
  19206. Specifies the name of the target Blackfin processor. Currently, \fIcpu\fR
  19207. can be one of \fBbf512\fR, \fBbf514\fR, \fBbf516\fR, \fBbf518\fR,
  19208. \&\fBbf522\fR, \fBbf523\fR, \fBbf524\fR, \fBbf525\fR, \fBbf526\fR,
  19209. \&\fBbf527\fR, \fBbf531\fR, \fBbf532\fR, \fBbf533\fR,
  19210. \&\fBbf534\fR, \fBbf536\fR, \fBbf537\fR, \fBbf538\fR, \fBbf539\fR,
  19211. \&\fBbf542\fR, \fBbf544\fR, \fBbf547\fR, \fBbf548\fR, \fBbf549\fR,
  19212. \&\fBbf542m\fR, \fBbf544m\fR, \fBbf547m\fR, \fBbf548m\fR, \fBbf549m\fR,
  19213. \&\fBbf561\fR, \fBbf592\fR.
  19214. .Sp
  19215. The optional \fIsirevision\fR specifies the silicon revision of the target
  19216. Blackfin processor. Any workarounds available for the targeted silicon revision
  19217. are enabled. If \fIsirevision\fR is \fBnone\fR, no workarounds are enabled.
  19218. If \fIsirevision\fR is \fBany\fR, all workarounds for the targeted processor
  19219. are enabled. The \f(CW\*(C`_\|_SILICON_REVISION_\|_\*(C'\fR macro is defined to two
  19220. hexadecimal digits representing the major and minor numbers in the silicon
  19221. revision. If \fIsirevision\fR is \fBnone\fR, the \f(CW\*(C`_\|_SILICON_REVISION_\|_\*(C'\fR
  19222. is not defined. If \fIsirevision\fR is \fBany\fR, the
  19223. \&\f(CW\*(C`_\|_SILICON_REVISION_\|_\*(C'\fR is defined to be \f(CW0xffff\fR.
  19224. If this optional \fIsirevision\fR is not used, \s-1GCC\s0 assumes the latest known
  19225. silicon revision of the targeted Blackfin processor.
  19226. .Sp
  19227. \&\s-1GCC\s0 defines a preprocessor macro for the specified \fIcpu\fR.
  19228. For the \fBbfin-elf\fR toolchain, this option causes the hardware \s-1BSP\s0
  19229. provided by libgloss to be linked in if \fB\-msim\fR is not given.
  19230. .Sp
  19231. Without this option, \fBbf532\fR is used as the processor by default.
  19232. .Sp
  19233. Note that support for \fBbf561\fR is incomplete. For \fBbf561\fR,
  19234. only the preprocessor macro is defined.
  19235. .IP "\fB\-msim\fR" 4
  19236. .IX Item "-msim"
  19237. Specifies that the program will be run on the simulator. This causes
  19238. the simulator \s-1BSP\s0 provided by libgloss to be linked in. This option
  19239. has effect only for \fBbfin-elf\fR toolchain.
  19240. Certain other options, such as \fB\-mid\-shared\-library\fR and
  19241. \&\fB\-mfdpic\fR, imply \fB\-msim\fR.
  19242. .IP "\fB\-momit\-leaf\-frame\-pointer\fR" 4
  19243. .IX Item "-momit-leaf-frame-pointer"
  19244. Don't keep the frame pointer in a register for leaf functions. This
  19245. avoids the instructions to save, set up and restore frame pointers and
  19246. makes an extra register available in leaf functions.
  19247. .IP "\fB\-mspecld\-anomaly\fR" 4
  19248. .IX Item "-mspecld-anomaly"
  19249. When enabled, the compiler ensures that the generated code does not
  19250. contain speculative loads after jump instructions. If this option is used,
  19251. \&\f(CW\*(C`_\|_WORKAROUND_SPECULATIVE_LOADS\*(C'\fR is defined.
  19252. .IP "\fB\-mno\-specld\-anomaly\fR" 4
  19253. .IX Item "-mno-specld-anomaly"
  19254. Don't generate extra code to prevent speculative loads from occurring.
  19255. .IP "\fB\-mcsync\-anomaly\fR" 4
  19256. .IX Item "-mcsync-anomaly"
  19257. When enabled, the compiler ensures that the generated code does not
  19258. contain \s-1CSYNC\s0 or \s-1SSYNC\s0 instructions too soon after conditional branches.
  19259. If this option is used, \f(CW\*(C`_\|_WORKAROUND_SPECULATIVE_SYNCS\*(C'\fR is defined.
  19260. .IP "\fB\-mno\-csync\-anomaly\fR" 4
  19261. .IX Item "-mno-csync-anomaly"
  19262. Don't generate extra code to prevent \s-1CSYNC\s0 or \s-1SSYNC\s0 instructions from
  19263. occurring too soon after a conditional branch.
  19264. .IP "\fB\-mlow64k\fR" 4
  19265. .IX Item "-mlow64k"
  19266. When enabled, the compiler is free to take advantage of the knowledge that
  19267. the entire program fits into the low 64k of memory.
  19268. .IP "\fB\-mno\-low64k\fR" 4
  19269. .IX Item "-mno-low64k"
  19270. Assume that the program is arbitrarily large. This is the default.
  19271. .IP "\fB\-mstack\-check\-l1\fR" 4
  19272. .IX Item "-mstack-check-l1"
  19273. Do stack checking using information placed into L1 scratchpad memory by the
  19274. uClinux kernel.
  19275. .IP "\fB\-mid\-shared\-library\fR" 4
  19276. .IX Item "-mid-shared-library"
  19277. Generate code that supports shared libraries via the library \s-1ID\s0 method.
  19278. This allows for execute in place and shared libraries in an environment
  19279. without virtual memory management. This option implies \fB\-fPIC\fR.
  19280. With a \fBbfin-elf\fR target, this option implies \fB\-msim\fR.
  19281. .IP "\fB\-mno\-id\-shared\-library\fR" 4
  19282. .IX Item "-mno-id-shared-library"
  19283. Generate code that doesn't assume ID-based shared libraries are being used.
  19284. This is the default.
  19285. .IP "\fB\-mleaf\-id\-shared\-library\fR" 4
  19286. .IX Item "-mleaf-id-shared-library"
  19287. Generate code that supports shared libraries via the library \s-1ID\s0 method,
  19288. but assumes that this library or executable won't link against any other
  19289. \&\s-1ID\s0 shared libraries. That allows the compiler to use faster code for jumps
  19290. and calls.
  19291. .IP "\fB\-mno\-leaf\-id\-shared\-library\fR" 4
  19292. .IX Item "-mno-leaf-id-shared-library"
  19293. Do not assume that the code being compiled won't link against any \s-1ID\s0 shared
  19294. libraries. Slower code is generated for jump and call insns.
  19295. .IP "\fB\-mshared\-library\-id=n\fR" 4
  19296. .IX Item "-mshared-library-id=n"
  19297. Specifies the identification number of the ID-based shared library being
  19298. compiled. Specifying a value of 0 generates more compact code; specifying
  19299. other values forces the allocation of that number to the current
  19300. library but is no more space\- or time-efficient than omitting this option.
  19301. .IP "\fB\-msep\-data\fR" 4
  19302. .IX Item "-msep-data"
  19303. Generate code that allows the data segment to be located in a different
  19304. area of memory from the text segment. This allows for execute in place in
  19305. an environment without virtual memory management by eliminating relocations
  19306. against the text section.
  19307. .IP "\fB\-mno\-sep\-data\fR" 4
  19308. .IX Item "-mno-sep-data"
  19309. Generate code that assumes that the data segment follows the text segment.
  19310. This is the default.
  19311. .IP "\fB\-mlong\-calls\fR" 4
  19312. .IX Item "-mlong-calls"
  19313. .PD 0
  19314. .IP "\fB\-mno\-long\-calls\fR" 4
  19315. .IX Item "-mno-long-calls"
  19316. .PD
  19317. Tells the compiler to perform function calls by first loading the
  19318. address of the function into a register and then performing a subroutine
  19319. call on this register. This switch is needed if the target function
  19320. lies outside of the 24\-bit addressing range of the offset-based
  19321. version of subroutine call instruction.
  19322. .Sp
  19323. This feature is not enabled by default. Specifying
  19324. \&\fB\-mno\-long\-calls\fR restores the default behavior. Note these
  19325. switches have no effect on how the compiler generates code to handle
  19326. function calls via function pointers.
  19327. .IP "\fB\-mfast\-fp\fR" 4
  19328. .IX Item "-mfast-fp"
  19329. Link with the fast floating-point library. This library relaxes some of
  19330. the \s-1IEEE\s0 floating-point standard's rules for checking inputs against
  19331. Not-a-Number (\s-1NAN\s0), in the interest of performance.
  19332. .IP "\fB\-minline\-plt\fR" 4
  19333. .IX Item "-minline-plt"
  19334. Enable inlining of \s-1PLT\s0 entries in function calls to functions that are
  19335. not known to bind locally. It has no effect without \fB\-mfdpic\fR.
  19336. .IP "\fB\-mmulticore\fR" 4
  19337. .IX Item "-mmulticore"
  19338. Build a standalone application for multicore Blackfin processors.
  19339. This option causes proper start files and link scripts supporting
  19340. multicore to be used, and defines the macro \f(CW\*(C`_\|_BFIN_MULTICORE\*(C'\fR.
  19341. It can only be used with \fB\-mcpu=bf561\fR[\fB\-\fR\fIsirevision\fR].
  19342. .Sp
  19343. This option can be used with \fB\-mcorea\fR or \fB\-mcoreb\fR, which
  19344. selects the one-application-per-core programming model. Without
  19345. \&\fB\-mcorea\fR or \fB\-mcoreb\fR, the single\-application/dual\-core
  19346. programming model is used. In this model, the main function of Core B
  19347. should be named as \f(CW\*(C`coreb_main\*(C'\fR.
  19348. .Sp
  19349. If this option is not used, the single-core application programming
  19350. model is used.
  19351. .IP "\fB\-mcorea\fR" 4
  19352. .IX Item "-mcorea"
  19353. Build a standalone application for Core A of \s-1BF561\s0 when using
  19354. the one-application-per-core programming model. Proper start files
  19355. and link scripts are used to support Core A, and the macro
  19356. \&\f(CW\*(C`_\|_BFIN_COREA\*(C'\fR is defined.
  19357. This option can only be used in conjunction with \fB\-mmulticore\fR.
  19358. .IP "\fB\-mcoreb\fR" 4
  19359. .IX Item "-mcoreb"
  19360. Build a standalone application for Core B of \s-1BF561\s0 when using
  19361. the one-application-per-core programming model. Proper start files
  19362. and link scripts are used to support Core B, and the macro
  19363. \&\f(CW\*(C`_\|_BFIN_COREB\*(C'\fR is defined. When this option is used, \f(CW\*(C`coreb_main\*(C'\fR
  19364. should be used instead of \f(CW\*(C`main\*(C'\fR.
  19365. This option can only be used in conjunction with \fB\-mmulticore\fR.
  19366. .IP "\fB\-msdram\fR" 4
  19367. .IX Item "-msdram"
  19368. Build a standalone application for \s-1SDRAM.\s0 Proper start files and
  19369. link scripts are used to put the application into \s-1SDRAM,\s0 and the macro
  19370. \&\f(CW\*(C`_\|_BFIN_SDRAM\*(C'\fR is defined.
  19371. The loader should initialize \s-1SDRAM\s0 before loading the application.
  19372. .IP "\fB\-micplb\fR" 4
  19373. .IX Item "-micplb"
  19374. Assume that ICPLBs are enabled at run time. This has an effect on certain
  19375. anomaly workarounds. For Linux targets, the default is to assume ICPLBs
  19376. are enabled; for standalone applications the default is off.
  19377. .PP
  19378. \fIC6X Options\fR
  19379. .IX Subsection "C6X Options"
  19380. .IP "\fB\-march=\fR\fIname\fR" 4
  19381. .IX Item "-march=name"
  19382. This specifies the name of the target architecture. \s-1GCC\s0 uses this
  19383. name to determine what kind of instructions it can emit when generating
  19384. assembly code. Permissible names are: \fBc62x\fR,
  19385. \&\fBc64x\fR, \fBc64x+\fR, \fBc67x\fR, \fBc67x+\fR, \fBc674x\fR.
  19386. .IP "\fB\-mbig\-endian\fR" 4
  19387. .IX Item "-mbig-endian"
  19388. Generate code for a big-endian target.
  19389. .IP "\fB\-mlittle\-endian\fR" 4
  19390. .IX Item "-mlittle-endian"
  19391. Generate code for a little-endian target. This is the default.
  19392. .IP "\fB\-msim\fR" 4
  19393. .IX Item "-msim"
  19394. Choose startup files and linker script suitable for the simulator.
  19395. .IP "\fB\-msdata=default\fR" 4
  19396. .IX Item "-msdata=default"
  19397. Put small global and static data in the \f(CW\*(C`.neardata\*(C'\fR section,
  19398. which is pointed to by register \f(CW\*(C`B14\*(C'\fR. Put small uninitialized
  19399. global and static data in the \f(CW\*(C`.bss\*(C'\fR section, which is adjacent
  19400. to the \f(CW\*(C`.neardata\*(C'\fR section. Put small read-only data into the
  19401. \&\f(CW\*(C`.rodata\*(C'\fR section. The corresponding sections used for large
  19402. pieces of data are \f(CW\*(C`.fardata\*(C'\fR, \f(CW\*(C`.far\*(C'\fR and \f(CW\*(C`.const\*(C'\fR.
  19403. .IP "\fB\-msdata=all\fR" 4
  19404. .IX Item "-msdata=all"
  19405. Put all data, not just small objects, into the sections reserved for
  19406. small data, and use addressing relative to the \f(CW\*(C`B14\*(C'\fR register to
  19407. access them.
  19408. .IP "\fB\-msdata=none\fR" 4
  19409. .IX Item "-msdata=none"
  19410. Make no use of the sections reserved for small data, and use absolute
  19411. addresses to access all data. Put all initialized global and static
  19412. data in the \f(CW\*(C`.fardata\*(C'\fR section, and all uninitialized data in the
  19413. \&\f(CW\*(C`.far\*(C'\fR section. Put all constant data into the \f(CW\*(C`.const\*(C'\fR
  19414. section.
  19415. .PP
  19416. \fI\s-1CRIS\s0 Options\fR
  19417. .IX Subsection "CRIS Options"
  19418. .PP
  19419. These options are defined specifically for the \s-1CRIS\s0 ports.
  19420. .IP "\fB\-march=\fR\fIarchitecture-type\fR" 4
  19421. .IX Item "-march=architecture-type"
  19422. .PD 0
  19423. .IP "\fB\-mcpu=\fR\fIarchitecture-type\fR" 4
  19424. .IX Item "-mcpu=architecture-type"
  19425. .PD
  19426. Generate code for the specified architecture. The choices for
  19427. \&\fIarchitecture-type\fR are \fBv3\fR, \fBv8\fR and \fBv10\fR for
  19428. respectively \s-1ETRAX\s0\ 4, \s-1ETRAX\s0\ 100, and \s-1ETRAX\s0\ 100\ \s-1LX.\s0
  19429. Default is \fBv0\fR except for cris-axis-linux-gnu, where the default is
  19430. \&\fBv10\fR.
  19431. .IP "\fB\-mtune=\fR\fIarchitecture-type\fR" 4
  19432. .IX Item "-mtune=architecture-type"
  19433. Tune to \fIarchitecture-type\fR everything applicable about the generated
  19434. code, except for the \s-1ABI\s0 and the set of available instructions. The
  19435. choices for \fIarchitecture-type\fR are the same as for
  19436. \&\fB\-march=\fR\fIarchitecture-type\fR.
  19437. .IP "\fB\-mmax\-stack\-frame=\fR\fIn\fR" 4
  19438. .IX Item "-mmax-stack-frame=n"
  19439. Warn when the stack frame of a function exceeds \fIn\fR bytes.
  19440. .IP "\fB\-metrax4\fR" 4
  19441. .IX Item "-metrax4"
  19442. .PD 0
  19443. .IP "\fB\-metrax100\fR" 4
  19444. .IX Item "-metrax100"
  19445. .PD
  19446. The options \fB\-metrax4\fR and \fB\-metrax100\fR are synonyms for
  19447. \&\fB\-march=v3\fR and \fB\-march=v8\fR respectively.
  19448. .IP "\fB\-mmul\-bug\-workaround\fR" 4
  19449. .IX Item "-mmul-bug-workaround"
  19450. .PD 0
  19451. .IP "\fB\-mno\-mul\-bug\-workaround\fR" 4
  19452. .IX Item "-mno-mul-bug-workaround"
  19453. .PD
  19454. Work around a bug in the \f(CW\*(C`muls\*(C'\fR and \f(CW\*(C`mulu\*(C'\fR instructions for \s-1CPU\s0
  19455. models where it applies. This option is active by default.
  19456. .IP "\fB\-mpdebug\fR" 4
  19457. .IX Item "-mpdebug"
  19458. Enable CRIS-specific verbose debug-related information in the assembly
  19459. code. This option also has the effect of turning off the \fB#NO_APP\fR
  19460. formatted-code indicator to the assembler at the beginning of the
  19461. assembly file.
  19462. .IP "\fB\-mcc\-init\fR" 4
  19463. .IX Item "-mcc-init"
  19464. Do not use condition-code results from previous instruction; always emit
  19465. compare and test instructions before use of condition codes.
  19466. .IP "\fB\-mno\-side\-effects\fR" 4
  19467. .IX Item "-mno-side-effects"
  19468. Do not emit instructions with side effects in addressing modes other than
  19469. post-increment.
  19470. .IP "\fB\-mstack\-align\fR" 4
  19471. .IX Item "-mstack-align"
  19472. .PD 0
  19473. .IP "\fB\-mno\-stack\-align\fR" 4
  19474. .IX Item "-mno-stack-align"
  19475. .IP "\fB\-mdata\-align\fR" 4
  19476. .IX Item "-mdata-align"
  19477. .IP "\fB\-mno\-data\-align\fR" 4
  19478. .IX Item "-mno-data-align"
  19479. .IP "\fB\-mconst\-align\fR" 4
  19480. .IX Item "-mconst-align"
  19481. .IP "\fB\-mno\-const\-align\fR" 4
  19482. .IX Item "-mno-const-align"
  19483. .PD
  19484. These options (\fBno\-\fR options) arrange (eliminate arrangements) for the
  19485. stack frame, individual data and constants to be aligned for the maximum
  19486. single data access size for the chosen \s-1CPU\s0 model. The default is to
  19487. arrange for 32\-bit alignment. \s-1ABI\s0 details such as structure layout are
  19488. not affected by these options.
  19489. .IP "\fB\-m32\-bit\fR" 4
  19490. .IX Item "-m32-bit"
  19491. .PD 0
  19492. .IP "\fB\-m16\-bit\fR" 4
  19493. .IX Item "-m16-bit"
  19494. .IP "\fB\-m8\-bit\fR" 4
  19495. .IX Item "-m8-bit"
  19496. .PD
  19497. Similar to the stack\- data\- and const-align options above, these options
  19498. arrange for stack frame, writable data and constants to all be 32\-bit,
  19499. 16\-bit or 8\-bit aligned. The default is 32\-bit alignment.
  19500. .IP "\fB\-mno\-prologue\-epilogue\fR" 4
  19501. .IX Item "-mno-prologue-epilogue"
  19502. .PD 0
  19503. .IP "\fB\-mprologue\-epilogue\fR" 4
  19504. .IX Item "-mprologue-epilogue"
  19505. .PD
  19506. With \fB\-mno\-prologue\-epilogue\fR, the normal function prologue and
  19507. epilogue which set up the stack frame are omitted and no return
  19508. instructions or return sequences are generated in the code. Use this
  19509. option only together with visual inspection of the compiled code: no
  19510. warnings or errors are generated when call-saved registers must be saved,
  19511. or storage for local variables needs to be allocated.
  19512. .IP "\fB\-mno\-gotplt\fR" 4
  19513. .IX Item "-mno-gotplt"
  19514. .PD 0
  19515. .IP "\fB\-mgotplt\fR" 4
  19516. .IX Item "-mgotplt"
  19517. .PD
  19518. With \fB\-fpic\fR and \fB\-fPIC\fR, don't generate (do generate)
  19519. instruction sequences that load addresses for functions from the \s-1PLT\s0 part
  19520. of the \s-1GOT\s0 rather than (traditional on other architectures) calls to the
  19521. \&\s-1PLT. \s0 The default is \fB\-mgotplt\fR.
  19522. .IP "\fB\-melf\fR" 4
  19523. .IX Item "-melf"
  19524. Legacy no-op option only recognized with the cris-axis-elf and
  19525. cris-axis-linux-gnu targets.
  19526. .IP "\fB\-mlinux\fR" 4
  19527. .IX Item "-mlinux"
  19528. Legacy no-op option only recognized with the cris-axis-linux-gnu target.
  19529. .IP "\fB\-sim\fR" 4
  19530. .IX Item "-sim"
  19531. This option, recognized for the cris-axis-elf, arranges
  19532. to link with input-output functions from a simulator library. Code,
  19533. initialized data and zero-initialized data are allocated consecutively.
  19534. .IP "\fB\-sim2\fR" 4
  19535. .IX Item "-sim2"
  19536. Like \fB\-sim\fR, but pass linker options to locate initialized data at
  19537. 0x40000000 and zero-initialized data at 0x80000000.
  19538. .PP
  19539. \fI\s-1CR16\s0 Options\fR
  19540. .IX Subsection "CR16 Options"
  19541. .PP
  19542. These options are defined specifically for the \s-1CR16\s0 ports.
  19543. .IP "\fB\-mmac\fR" 4
  19544. .IX Item "-mmac"
  19545. Enable the use of multiply-accumulate instructions. Disabled by default.
  19546. .IP "\fB\-mcr16cplus\fR" 4
  19547. .IX Item "-mcr16cplus"
  19548. .PD 0
  19549. .IP "\fB\-mcr16c\fR" 4
  19550. .IX Item "-mcr16c"
  19551. .PD
  19552. Generate code for \s-1CR16C\s0 or \s-1CR16C+\s0 architecture. \s-1CR16C+\s0 architecture
  19553. is default.
  19554. .IP "\fB\-msim\fR" 4
  19555. .IX Item "-msim"
  19556. Links the library libsim.a which is in compatible with simulator. Applicable
  19557. to \s-1ELF\s0 compiler only.
  19558. .IP "\fB\-mint32\fR" 4
  19559. .IX Item "-mint32"
  19560. Choose integer type as 32\-bit wide.
  19561. .IP "\fB\-mbit\-ops\fR" 4
  19562. .IX Item "-mbit-ops"
  19563. Generates \f(CW\*(C`sbit\*(C'\fR/\f(CW\*(C`cbit\*(C'\fR instructions for bit manipulations.
  19564. .IP "\fB\-mdata\-model=\fR\fImodel\fR" 4
  19565. .IX Item "-mdata-model=model"
  19566. Choose a data model. The choices for \fImodel\fR are \fBnear\fR,
  19567. \&\fBfar\fR or \fBmedium\fR. \fBmedium\fR is default.
  19568. However, \fBfar\fR is not valid with \fB\-mcr16c\fR, as the
  19569. \&\s-1CR16C\s0 architecture does not support the far data model.
  19570. .PP
  19571. \fIC\-SKY Options\fR
  19572. .IX Subsection "C-SKY Options"
  19573. .PP
  19574. \&\s-1GCC\s0 supports these options when compiling for C\-SKY V2 processors.
  19575. .IP "\fB\-march=\fR\fIarch\fR" 4
  19576. .IX Item "-march=arch"
  19577. Specify the C\-SKY target architecture. Valid values for \fIarch\fR are:
  19578. \&\fBck801\fR, \fBck802\fR, \fBck803\fR, \fBck807\fR, and \fBck810\fR.
  19579. The default is \fBck810\fR.
  19580. .IP "\fB\-mcpu=\fR\fIcpu\fR" 4
  19581. .IX Item "-mcpu=cpu"
  19582. Specify the C\-SKY target processor. Valid values for \fIcpu\fR are:
  19583. \&\fBck801\fR, \fBck801t\fR,
  19584. \&\fBck802\fR, \fBck802t\fR, \fBck802j\fR,
  19585. \&\fBck803\fR, \fBck803h\fR, \fBck803t\fR, \fBck803ht\fR,
  19586. \&\fBck803f\fR, \fBck803fh\fR, \fBck803e\fR, \fBck803eh\fR,
  19587. \&\fBck803et\fR, \fBck803eht\fR, \fBck803ef\fR, \fBck803efh\fR,
  19588. \&\fBck803ft\fR, \fBck803eft\fR, \fBck803efht\fR, \fBck803r1\fR,
  19589. \&\fBck803hr1\fR, \fBck803tr1\fR, \fBck803htr1\fR, \fBck803fr1\fR,
  19590. \&\fBck803fhr1\fR, \fBck803er1\fR, \fBck803ehr1\fR, \fBck803etr1\fR,
  19591. \&\fBck803ehtr1\fR, \fBck803efr1\fR, \fBck803efhr1\fR, \fBck803ftr1\fR,
  19592. \&\fBck803eftr1\fR, \fBck803efhtr1\fR,
  19593. \&\fBck803s\fR, \fBck803st\fR, \fBck803se\fR, \fBck803sf\fR,
  19594. \&\fBck803sef\fR, \fBck803seft\fR,
  19595. \&\fBck807e\fR, \fBck807ef\fR, \fBck807\fR, \fBck807f\fR,
  19596. \&\fBck810e\fR, \fBck810et\fR, \fBck810ef\fR, \fBck810eft\fR,
  19597. \&\fBck810\fR, \fBck810v\fR, \fBck810f\fR, \fBck810t\fR, \fBck810fv\fR,
  19598. \&\fBck810tv\fR, \fBck810ft\fR, and \fBck810ftv\fR.
  19599. .IP "\fB\-mbig\-endian\fR" 4
  19600. .IX Item "-mbig-endian"
  19601. .PD 0
  19602. .IP "\fB\-EB\fR" 4
  19603. .IX Item "-EB"
  19604. .IP "\fB\-mlittle\-endian\fR" 4
  19605. .IX Item "-mlittle-endian"
  19606. .IP "\fB\-EL\fR" 4
  19607. .IX Item "-EL"
  19608. .PD
  19609. Select big\- or little-endian code. The default is little-endian.
  19610. .IP "\fB\-mhard\-float\fR" 4
  19611. .IX Item "-mhard-float"
  19612. .PD 0
  19613. .IP "\fB\-msoft\-float\fR" 4
  19614. .IX Item "-msoft-float"
  19615. .PD
  19616. Select hardware or software floating-point implementations.
  19617. The default is soft float.
  19618. .IP "\fB\-mdouble\-float\fR" 4
  19619. .IX Item "-mdouble-float"
  19620. .PD 0
  19621. .IP "\fB\-mno\-double\-float\fR" 4
  19622. .IX Item "-mno-double-float"
  19623. .PD
  19624. When \fB\-mhard\-float\fR is in effect, enable generation of
  19625. double-precision float instructions. This is the default except
  19626. when compiling for \s-1CK803.\s0
  19627. .IP "\fB\-mfdivdu\fR" 4
  19628. .IX Item "-mfdivdu"
  19629. .PD 0
  19630. .IP "\fB\-mno\-fdivdu\fR" 4
  19631. .IX Item "-mno-fdivdu"
  19632. .PD
  19633. When \fB\-mhard\-float\fR is in effect, enable generation of
  19634. \&\f(CW\*(C`frecipd\*(C'\fR, \f(CW\*(C`fsqrtd\*(C'\fR, and \f(CW\*(C`fdivd\*(C'\fR instructions.
  19635. This is the default except when compiling for \s-1CK803.\s0
  19636. .IP "\fB\-mfpu=\fR\fIfpu\fR" 4
  19637. .IX Item "-mfpu=fpu"
  19638. Select the floating-point processor. This option can only be used with
  19639. \&\fB\-mhard\-float\fR.
  19640. Values for \fIfpu\fR are
  19641. \&\fBfpv2_sf\fR (equivalent to \fB\-mno\-double\-float \-mno\-fdivdu\fR),
  19642. \&\fBfpv2\fR (\fB\-mdouble\-float \-mno\-divdu\fR), and
  19643. \&\fBfpv2_divd\fR (\fB\-mdouble\-float \-mdivdu\fR).
  19644. .IP "\fB\-melrw\fR" 4
  19645. .IX Item "-melrw"
  19646. .PD 0
  19647. .IP "\fB\-mno\-elrw\fR" 4
  19648. .IX Item "-mno-elrw"
  19649. .PD
  19650. Enable the extended \f(CW\*(C`lrw\*(C'\fR instruction. This option defaults to on
  19651. for \s-1CK801\s0 and off otherwise.
  19652. .IP "\fB\-mistack\fR" 4
  19653. .IX Item "-mistack"
  19654. .PD 0
  19655. .IP "\fB\-mno\-istack\fR" 4
  19656. .IX Item "-mno-istack"
  19657. .PD
  19658. Enable interrupt stack instructions; the default is off.
  19659. .Sp
  19660. The \fB\-mistack\fR option is required to handle the
  19661. \&\f(CW\*(C`interrupt\*(C'\fR and \f(CW\*(C`isr\*(C'\fR function attributes.
  19662. .IP "\fB\-mmp\fR" 4
  19663. .IX Item "-mmp"
  19664. Enable multiprocessor instructions; the default is off.
  19665. .IP "\fB\-mcp\fR" 4
  19666. .IX Item "-mcp"
  19667. Enable coprocessor instructions; the default is off.
  19668. .IP "\fB\-mcache\fR" 4
  19669. .IX Item "-mcache"
  19670. Enable coprocessor instructions; the default is off.
  19671. .IP "\fB\-msecurity\fR" 4
  19672. .IX Item "-msecurity"
  19673. Enable C\-SKY security instructions; the default is off.
  19674. .IP "\fB\-mtrust\fR" 4
  19675. .IX Item "-mtrust"
  19676. Enable C\-SKY trust instructions; the default is off.
  19677. .IP "\fB\-mdsp\fR" 4
  19678. .IX Item "-mdsp"
  19679. .PD 0
  19680. .IP "\fB\-medsp\fR" 4
  19681. .IX Item "-medsp"
  19682. .IP "\fB\-mvdsp\fR" 4
  19683. .IX Item "-mvdsp"
  19684. .PD
  19685. Enable C\-SKY \s-1DSP,\s0 Enhanced \s-1DSP,\s0 or Vector \s-1DSP\s0 instructions, respectively.
  19686. All of these options default to off.
  19687. .IP "\fB\-mdiv\fR" 4
  19688. .IX Item "-mdiv"
  19689. .PD 0
  19690. .IP "\fB\-mno\-div\fR" 4
  19691. .IX Item "-mno-div"
  19692. .PD
  19693. Generate divide instructions. Default is off.
  19694. .IP "\fB\-msmart\fR" 4
  19695. .IX Item "-msmart"
  19696. .PD 0
  19697. .IP "\fB\-mno\-smart\fR" 4
  19698. .IX Item "-mno-smart"
  19699. .PD
  19700. Generate code for Smart Mode, using only registers numbered 0\-7 to allow
  19701. use of 16\-bit instructions. This option is ignored for \s-1CK801\s0 where this
  19702. is the required behavior, and it defaults to on for \s-1CK802.\s0
  19703. For other targets, the default is off.
  19704. .IP "\fB\-mhigh\-registers\fR" 4
  19705. .IX Item "-mhigh-registers"
  19706. .PD 0
  19707. .IP "\fB\-mno\-high\-registers\fR" 4
  19708. .IX Item "-mno-high-registers"
  19709. .PD
  19710. Generate code using the high registers numbered 16\-31. This option
  19711. is not supported on \s-1CK801, CK802,\s0 or \s-1CK803,\s0 and is enabled by default
  19712. for other processors.
  19713. .IP "\fB\-manchor\fR" 4
  19714. .IX Item "-manchor"
  19715. .PD 0
  19716. .IP "\fB\-mno\-anchor\fR" 4
  19717. .IX Item "-mno-anchor"
  19718. .PD
  19719. Generate code using global anchor symbol addresses.
  19720. .IP "\fB\-mpushpop\fR" 4
  19721. .IX Item "-mpushpop"
  19722. .PD 0
  19723. .IP "\fB\-mno\-pushpop\fR" 4
  19724. .IX Item "-mno-pushpop"
  19725. .PD
  19726. Generate code using \f(CW\*(C`push\*(C'\fR and \f(CW\*(C`pop\*(C'\fR instructions. This option
  19727. defaults to on.
  19728. .IP "\fB\-mmultiple\-stld\fR" 4
  19729. .IX Item "-mmultiple-stld"
  19730. .PD 0
  19731. .IP "\fB\-mstm\fR" 4
  19732. .IX Item "-mstm"
  19733. .IP "\fB\-mno\-multiple\-stld\fR" 4
  19734. .IX Item "-mno-multiple-stld"
  19735. .IP "\fB\-mno\-stm\fR" 4
  19736. .IX Item "-mno-stm"
  19737. .PD
  19738. Generate code using \f(CW\*(C`stm\*(C'\fR and \f(CW\*(C`ldm\*(C'\fR instructions. This option
  19739. isn't supported on \s-1CK801\s0 but is enabled by default on other processors.
  19740. .IP "\fB\-mconstpool\fR" 4
  19741. .IX Item "-mconstpool"
  19742. .PD 0
  19743. .IP "\fB\-mno\-constpool\fR" 4
  19744. .IX Item "-mno-constpool"
  19745. .PD
  19746. Create constant pools in the compiler instead of deferring it to the
  19747. assembler. This option is the default and required for correct code
  19748. generation on \s-1CK801\s0 and \s-1CK802,\s0 and is optional on other processors.
  19749. .IP "\fB\-mstack\-size\fR" 4
  19750. .IX Item "-mstack-size"
  19751. .PD 0
  19752. .IP "\fB\-mno\-stack\-size\fR" 4
  19753. .IX Item "-mno-stack-size"
  19754. .PD
  19755. Emit \f(CW\*(C`.stack_size\*(C'\fR directives for each function in the assembly
  19756. output. This option defaults to off.
  19757. .IP "\fB\-mccrt\fR" 4
  19758. .IX Item "-mccrt"
  19759. .PD 0
  19760. .IP "\fB\-mno\-ccrt\fR" 4
  19761. .IX Item "-mno-ccrt"
  19762. .PD
  19763. Generate code for the C\-SKY compiler runtime instead of libgcc. This
  19764. option defaults to off.
  19765. .IP "\fB\-mbranch\-cost=\fR\fIn\fR" 4
  19766. .IX Item "-mbranch-cost=n"
  19767. Set the branch costs to roughly \f(CW\*(C`n\*(C'\fR instructions. The default is 1.
  19768. .IP "\fB\-msched\-prolog\fR" 4
  19769. .IX Item "-msched-prolog"
  19770. .PD 0
  19771. .IP "\fB\-mno\-sched\-prolog\fR" 4
  19772. .IX Item "-mno-sched-prolog"
  19773. .PD
  19774. Permit scheduling of function prologue and epilogue sequences. Using
  19775. this option can result in code that is not compliant with the C\-SKY V2 \s-1ABI\s0
  19776. prologue requirements and that cannot be debugged or backtraced.
  19777. It is disabled by default.
  19778. .PP
  19779. \fIDarwin Options\fR
  19780. .IX Subsection "Darwin Options"
  19781. .PP
  19782. These options are defined for all architectures running the Darwin operating
  19783. system.
  19784. .PP
  19785. \&\s-1FSF GCC\s0 on Darwin does not create \*(L"fat\*(R" object files; it creates
  19786. an object file for the single architecture that \s-1GCC\s0 was built to
  19787. target. Apple's \s-1GCC\s0 on Darwin does create \*(L"fat\*(R" files if multiple
  19788. \&\fB\-arch\fR options are used; it does so by running the compiler or
  19789. linker multiple times and joining the results together with
  19790. \&\fIlipo\fR.
  19791. .PP
  19792. The subtype of the file created (like \fBppc7400\fR or \fBppc970\fR or
  19793. \&\fBi686\fR) is determined by the flags that specify the \s-1ISA\s0
  19794. that \s-1GCC\s0 is targeting, like \fB\-mcpu\fR or \fB\-march\fR. The
  19795. \&\fB\-force_cpusubtype_ALL\fR option can be used to override this.
  19796. .PP
  19797. The Darwin tools vary in their behavior when presented with an \s-1ISA\s0
  19798. mismatch. The assembler, \fIas\fR, only permits instructions to
  19799. be used that are valid for the subtype of the file it is generating,
  19800. so you cannot put 64\-bit instructions in a \fBppc750\fR object file.
  19801. The linker for shared libraries, \fI/usr/bin/libtool\fR, fails
  19802. and prints an error if asked to create a shared library with a less
  19803. restrictive subtype than its input files (for instance, trying to put
  19804. a \fBppc970\fR object file in a \fBppc7400\fR library). The linker
  19805. for executables, \fBld\fR, quietly gives the executable the most
  19806. restrictive subtype of any of its input files.
  19807. .IP "\fB\-F\fR\fIdir\fR" 4
  19808. .IX Item "-Fdir"
  19809. Add the framework directory \fIdir\fR to the head of the list of
  19810. directories to be searched for header files. These directories are
  19811. interleaved with those specified by \fB\-I\fR options and are
  19812. scanned in a left-to-right order.
  19813. .Sp
  19814. A framework directory is a directory with frameworks in it. A
  19815. framework is a directory with a \fIHeaders\fR and/or
  19816. \&\fIPrivateHeaders\fR directory contained directly in it that ends
  19817. in \fI.framework\fR. The name of a framework is the name of this
  19818. directory excluding the \fI.framework\fR. Headers associated with
  19819. the framework are found in one of those two directories, with
  19820. \&\fIHeaders\fR being searched first. A subframework is a framework
  19821. directory that is in a framework's \fIFrameworks\fR directory.
  19822. Includes of subframework headers can only appear in a header of a
  19823. framework that contains the subframework, or in a sibling subframework
  19824. header. Two subframeworks are siblings if they occur in the same
  19825. framework. A subframework should not have the same name as a
  19826. framework; a warning is issued if this is violated. Currently a
  19827. subframework cannot have subframeworks; in the future, the mechanism
  19828. may be extended to support this. The standard frameworks can be found
  19829. in \fI/System/Library/Frameworks\fR and
  19830. \&\fI/Library/Frameworks\fR. An example include looks like
  19831. \&\f(CW\*(C`#include <Framework/header.h>\*(C'\fR, where \fIFramework\fR denotes
  19832. the name of the framework and \fIheader.h\fR is found in the
  19833. \&\fIPrivateHeaders\fR or \fIHeaders\fR directory.
  19834. .IP "\fB\-iframework\fR\fIdir\fR" 4
  19835. .IX Item "-iframeworkdir"
  19836. Like \fB\-F\fR except the directory is a treated as a system
  19837. directory. The main difference between this \fB\-iframework\fR and
  19838. \&\fB\-F\fR is that with \fB\-iframework\fR the compiler does not
  19839. warn about constructs contained within header files found via
  19840. \&\fIdir\fR. This option is valid only for the C family of languages.
  19841. .IP "\fB\-gused\fR" 4
  19842. .IX Item "-gused"
  19843. Emit debugging information for symbols that are used. For stabs
  19844. debugging format, this enables \fB\-feliminate\-unused\-debug\-symbols\fR.
  19845. This is by default \s-1ON.\s0
  19846. .IP "\fB\-gfull\fR" 4
  19847. .IX Item "-gfull"
  19848. Emit debugging information for all symbols and types.
  19849. .IP "\fB\-mmacosx\-version\-min=\fR\fIversion\fR" 4
  19850. .IX Item "-mmacosx-version-min=version"
  19851. The earliest version of MacOS X that this executable will run on
  19852. is \fIversion\fR. Typical values of \fIversion\fR include \f(CW10.1\fR,
  19853. \&\f(CW10.2\fR, and \f(CW10.3.9\fR.
  19854. .Sp
  19855. If the compiler was built to use the system's headers by default,
  19856. then the default for this option is the system version on which the
  19857. compiler is running, otherwise the default is to make choices that
  19858. are compatible with as many systems and code bases as possible.
  19859. .IP "\fB\-mkernel\fR" 4
  19860. .IX Item "-mkernel"
  19861. Enable kernel development mode. The \fB\-mkernel\fR option sets
  19862. \&\fB\-static\fR, \fB\-fno\-common\fR, \fB\-fno\-use\-cxa\-atexit\fR,
  19863. \&\fB\-fno\-exceptions\fR, \fB\-fno\-non\-call\-exceptions\fR,
  19864. \&\fB\-fapple\-kext\fR, \fB\-fno\-weak\fR and \fB\-fno\-rtti\fR where
  19865. applicable. This mode also sets \fB\-mno\-altivec\fR,
  19866. \&\fB\-msoft\-float\fR, \fB\-fno\-builtin\fR and
  19867. \&\fB\-mlong\-branch\fR for PowerPC targets.
  19868. .IP "\fB\-mone\-byte\-bool\fR" 4
  19869. .IX Item "-mone-byte-bool"
  19870. Override the defaults for \f(CW\*(C`bool\*(C'\fR so that \f(CW\*(C`sizeof(bool)==1\*(C'\fR.
  19871. By default \f(CW\*(C`sizeof(bool)\*(C'\fR is \f(CW4\fR when compiling for
  19872. Darwin/PowerPC and \f(CW1\fR when compiling for Darwin/x86, so this
  19873. option has no effect on x86.
  19874. .Sp
  19875. \&\fBWarning:\fR The \fB\-mone\-byte\-bool\fR switch causes \s-1GCC\s0
  19876. to generate code that is not binary compatible with code generated
  19877. without that switch. Using this switch may require recompiling all
  19878. other modules in a program, including system libraries. Use this
  19879. switch to conform to a non-default data model.
  19880. .IP "\fB\-mfix\-and\-continue\fR" 4
  19881. .IX Item "-mfix-and-continue"
  19882. .PD 0
  19883. .IP "\fB\-ffix\-and\-continue\fR" 4
  19884. .IX Item "-ffix-and-continue"
  19885. .IP "\fB\-findirect\-data\fR" 4
  19886. .IX Item "-findirect-data"
  19887. .PD
  19888. Generate code suitable for fast turnaround development, such as to
  19889. allow \s-1GDB\s0 to dynamically load \fI.o\fR files into already-running
  19890. programs. \fB\-findirect\-data\fR and \fB\-ffix\-and\-continue\fR
  19891. are provided for backwards compatibility.
  19892. .IP "\fB\-all_load\fR" 4
  19893. .IX Item "-all_load"
  19894. Loads all members of static archive libraries.
  19895. See man \fIld\fR\|(1) for more information.
  19896. .IP "\fB\-arch_errors_fatal\fR" 4
  19897. .IX Item "-arch_errors_fatal"
  19898. Cause the errors having to do with files that have the wrong architecture
  19899. to be fatal.
  19900. .IP "\fB\-bind_at_load\fR" 4
  19901. .IX Item "-bind_at_load"
  19902. Causes the output file to be marked such that the dynamic linker will
  19903. bind all undefined references when the file is loaded or launched.
  19904. .IP "\fB\-bundle\fR" 4
  19905. .IX Item "-bundle"
  19906. Produce a Mach-o bundle format file.
  19907. See man \fIld\fR\|(1) for more information.
  19908. .IP "\fB\-bundle_loader\fR \fIexecutable\fR" 4
  19909. .IX Item "-bundle_loader executable"
  19910. This option specifies the \fIexecutable\fR that will load the build
  19911. output file being linked. See man \fIld\fR\|(1) for more information.
  19912. .IP "\fB\-dynamiclib\fR" 4
  19913. .IX Item "-dynamiclib"
  19914. When passed this option, \s-1GCC\s0 produces a dynamic library instead of
  19915. an executable when linking, using the Darwin \fIlibtool\fR command.
  19916. .IP "\fB\-force_cpusubtype_ALL\fR" 4
  19917. .IX Item "-force_cpusubtype_ALL"
  19918. This causes \s-1GCC\s0's output file to have the \fB\s-1ALL\s0\fR subtype, instead of
  19919. one controlled by the \fB\-mcpu\fR or \fB\-march\fR option.
  19920. .IP "\fB\-allowable_client\fR \fIclient_name\fR" 4
  19921. .IX Item "-allowable_client client_name"
  19922. .PD 0
  19923. .IP "\fB\-client_name\fR" 4
  19924. .IX Item "-client_name"
  19925. .IP "\fB\-compatibility_version\fR" 4
  19926. .IX Item "-compatibility_version"
  19927. .IP "\fB\-current_version\fR" 4
  19928. .IX Item "-current_version"
  19929. .IP "\fB\-dead_strip\fR" 4
  19930. .IX Item "-dead_strip"
  19931. .IP "\fB\-dependency\-file\fR" 4
  19932. .IX Item "-dependency-file"
  19933. .IP "\fB\-dylib_file\fR" 4
  19934. .IX Item "-dylib_file"
  19935. .IP "\fB\-dylinker_install_name\fR" 4
  19936. .IX Item "-dylinker_install_name"
  19937. .IP "\fB\-dynamic\fR" 4
  19938. .IX Item "-dynamic"
  19939. .IP "\fB\-exported_symbols_list\fR" 4
  19940. .IX Item "-exported_symbols_list"
  19941. .IP "\fB\-filelist\fR" 4
  19942. .IX Item "-filelist"
  19943. .IP "\fB\-flat_namespace\fR" 4
  19944. .IX Item "-flat_namespace"
  19945. .IP "\fB\-force_flat_namespace\fR" 4
  19946. .IX Item "-force_flat_namespace"
  19947. .IP "\fB\-headerpad_max_install_names\fR" 4
  19948. .IX Item "-headerpad_max_install_names"
  19949. .IP "\fB\-image_base\fR" 4
  19950. .IX Item "-image_base"
  19951. .IP "\fB\-init\fR" 4
  19952. .IX Item "-init"
  19953. .IP "\fB\-install_name\fR" 4
  19954. .IX Item "-install_name"
  19955. .IP "\fB\-keep_private_externs\fR" 4
  19956. .IX Item "-keep_private_externs"
  19957. .IP "\fB\-multi_module\fR" 4
  19958. .IX Item "-multi_module"
  19959. .IP "\fB\-multiply_defined\fR" 4
  19960. .IX Item "-multiply_defined"
  19961. .IP "\fB\-multiply_defined_unused\fR" 4
  19962. .IX Item "-multiply_defined_unused"
  19963. .IP "\fB\-noall_load\fR" 4
  19964. .IX Item "-noall_load"
  19965. .IP "\fB\-no_dead_strip_inits_and_terms\fR" 4
  19966. .IX Item "-no_dead_strip_inits_and_terms"
  19967. .IP "\fB\-nofixprebinding\fR" 4
  19968. .IX Item "-nofixprebinding"
  19969. .IP "\fB\-nomultidefs\fR" 4
  19970. .IX Item "-nomultidefs"
  19971. .IP "\fB\-noprebind\fR" 4
  19972. .IX Item "-noprebind"
  19973. .IP "\fB\-noseglinkedit\fR" 4
  19974. .IX Item "-noseglinkedit"
  19975. .IP "\fB\-pagezero_size\fR" 4
  19976. .IX Item "-pagezero_size"
  19977. .IP "\fB\-prebind\fR" 4
  19978. .IX Item "-prebind"
  19979. .IP "\fB\-prebind_all_twolevel_modules\fR" 4
  19980. .IX Item "-prebind_all_twolevel_modules"
  19981. .IP "\fB\-private_bundle\fR" 4
  19982. .IX Item "-private_bundle"
  19983. .IP "\fB\-read_only_relocs\fR" 4
  19984. .IX Item "-read_only_relocs"
  19985. .IP "\fB\-sectalign\fR" 4
  19986. .IX Item "-sectalign"
  19987. .IP "\fB\-sectobjectsymbols\fR" 4
  19988. .IX Item "-sectobjectsymbols"
  19989. .IP "\fB\-whyload\fR" 4
  19990. .IX Item "-whyload"
  19991. .IP "\fB\-seg1addr\fR" 4
  19992. .IX Item "-seg1addr"
  19993. .IP "\fB\-sectcreate\fR" 4
  19994. .IX Item "-sectcreate"
  19995. .IP "\fB\-sectobjectsymbols\fR" 4
  19996. .IX Item "-sectobjectsymbols"
  19997. .IP "\fB\-sectorder\fR" 4
  19998. .IX Item "-sectorder"
  19999. .IP "\fB\-segaddr\fR" 4
  20000. .IX Item "-segaddr"
  20001. .IP "\fB\-segs_read_only_addr\fR" 4
  20002. .IX Item "-segs_read_only_addr"
  20003. .IP "\fB\-segs_read_write_addr\fR" 4
  20004. .IX Item "-segs_read_write_addr"
  20005. .IP "\fB\-seg_addr_table\fR" 4
  20006. .IX Item "-seg_addr_table"
  20007. .IP "\fB\-seg_addr_table_filename\fR" 4
  20008. .IX Item "-seg_addr_table_filename"
  20009. .IP "\fB\-seglinkedit\fR" 4
  20010. .IX Item "-seglinkedit"
  20011. .IP "\fB\-segprot\fR" 4
  20012. .IX Item "-segprot"
  20013. .IP "\fB\-segs_read_only_addr\fR" 4
  20014. .IX Item "-segs_read_only_addr"
  20015. .IP "\fB\-segs_read_write_addr\fR" 4
  20016. .IX Item "-segs_read_write_addr"
  20017. .IP "\fB\-single_module\fR" 4
  20018. .IX Item "-single_module"
  20019. .IP "\fB\-static\fR" 4
  20020. .IX Item "-static"
  20021. .IP "\fB\-sub_library\fR" 4
  20022. .IX Item "-sub_library"
  20023. .IP "\fB\-sub_umbrella\fR" 4
  20024. .IX Item "-sub_umbrella"
  20025. .IP "\fB\-twolevel_namespace\fR" 4
  20026. .IX Item "-twolevel_namespace"
  20027. .IP "\fB\-umbrella\fR" 4
  20028. .IX Item "-umbrella"
  20029. .IP "\fB\-undefined\fR" 4
  20030. .IX Item "-undefined"
  20031. .IP "\fB\-unexported_symbols_list\fR" 4
  20032. .IX Item "-unexported_symbols_list"
  20033. .IP "\fB\-weak_reference_mismatches\fR" 4
  20034. .IX Item "-weak_reference_mismatches"
  20035. .IP "\fB\-whatsloaded\fR" 4
  20036. .IX Item "-whatsloaded"
  20037. .PD
  20038. These options are passed to the Darwin linker. The Darwin linker man page
  20039. describes them in detail.
  20040. .PP
  20041. \fI\s-1DEC\s0 Alpha Options\fR
  20042. .IX Subsection "DEC Alpha Options"
  20043. .PP
  20044. These \fB\-m\fR options are defined for the \s-1DEC\s0 Alpha implementations:
  20045. .IP "\fB\-mno\-soft\-float\fR" 4
  20046. .IX Item "-mno-soft-float"
  20047. .PD 0
  20048. .IP "\fB\-msoft\-float\fR" 4
  20049. .IX Item "-msoft-float"
  20050. .PD
  20051. Use (do not use) the hardware floating-point instructions for
  20052. floating-point operations. When \fB\-msoft\-float\fR is specified,
  20053. functions in \fIlibgcc.a\fR are used to perform floating-point
  20054. operations. Unless they are replaced by routines that emulate the
  20055. floating-point operations, or compiled in such a way as to call such
  20056. emulations routines, these routines issue floating-point
  20057. operations. If you are compiling for an Alpha without floating-point
  20058. operations, you must ensure that the library is built so as not to call
  20059. them.
  20060. .Sp
  20061. Note that Alpha implementations without floating-point operations are
  20062. required to have floating-point registers.
  20063. .IP "\fB\-mfp\-reg\fR" 4
  20064. .IX Item "-mfp-reg"
  20065. .PD 0
  20066. .IP "\fB\-mno\-fp\-regs\fR" 4
  20067. .IX Item "-mno-fp-regs"
  20068. .PD
  20069. Generate code that uses (does not use) the floating-point register set.
  20070. \&\fB\-mno\-fp\-regs\fR implies \fB\-msoft\-float\fR. If the floating-point
  20071. register set is not used, floating-point operands are passed in integer
  20072. registers as if they were integers and floating-point results are passed
  20073. in \f(CW$0\fR instead of \f(CW$f0\fR. This is a non-standard calling sequence,
  20074. so any function with a floating-point argument or return value called by code
  20075. compiled with \fB\-mno\-fp\-regs\fR must also be compiled with that
  20076. option.
  20077. .Sp
  20078. A typical use of this option is building a kernel that does not use,
  20079. and hence need not save and restore, any floating-point registers.
  20080. .IP "\fB\-mieee\fR" 4
  20081. .IX Item "-mieee"
  20082. The Alpha architecture implements floating-point hardware optimized for
  20083. maximum performance. It is mostly compliant with the \s-1IEEE\s0 floating-point
  20084. standard. However, for full compliance, software assistance is
  20085. required. This option generates code fully IEEE-compliant code
  20086. \&\fIexcept\fR that the \fIinexact-flag\fR is not maintained (see below).
  20087. If this option is turned on, the preprocessor macro \f(CW\*(C`_IEEE_FP\*(C'\fR is
  20088. defined during compilation. The resulting code is less efficient but is
  20089. able to correctly support denormalized numbers and exceptional \s-1IEEE\s0
  20090. values such as not-a-number and plus/minus infinity. Other Alpha
  20091. compilers call this option \fB\-ieee_with_no_inexact\fR.
  20092. .IP "\fB\-mieee\-with\-inexact\fR" 4
  20093. .IX Item "-mieee-with-inexact"
  20094. This is like \fB\-mieee\fR except the generated code also maintains
  20095. the \s-1IEEE \s0\fIinexact-flag\fR. Turning on this option causes the
  20096. generated code to implement fully-compliant \s-1IEEE\s0 math. In addition to
  20097. \&\f(CW\*(C`_IEEE_FP\*(C'\fR, \f(CW\*(C`_IEEE_FP_EXACT\*(C'\fR is defined as a preprocessor
  20098. macro. On some Alpha implementations the resulting code may execute
  20099. significantly slower than the code generated by default. Since there is
  20100. very little code that depends on the \fIinexact-flag\fR, you should
  20101. normally not specify this option. Other Alpha compilers call this
  20102. option \fB\-ieee_with_inexact\fR.
  20103. .IP "\fB\-mfp\-trap\-mode=\fR\fItrap-mode\fR" 4
  20104. .IX Item "-mfp-trap-mode=trap-mode"
  20105. This option controls what floating-point related traps are enabled.
  20106. Other Alpha compilers call this option \fB\-fptm\fR \fItrap-mode\fR.
  20107. The trap mode can be set to one of four values:
  20108. .RS 4
  20109. .IP "\fBn\fR" 4
  20110. .IX Item "n"
  20111. This is the default (normal) setting. The only traps that are enabled
  20112. are the ones that cannot be disabled in software (e.g., division by zero
  20113. trap).
  20114. .IP "\fBu\fR" 4
  20115. .IX Item "u"
  20116. In addition to the traps enabled by \fBn\fR, underflow traps are enabled
  20117. as well.
  20118. .IP "\fBsu\fR" 4
  20119. .IX Item "su"
  20120. Like \fBu\fR, but the instructions are marked to be safe for software
  20121. completion (see Alpha architecture manual for details).
  20122. .IP "\fBsui\fR" 4
  20123. .IX Item "sui"
  20124. Like \fBsu\fR, but inexact traps are enabled as well.
  20125. .RE
  20126. .RS 4
  20127. .RE
  20128. .IP "\fB\-mfp\-rounding\-mode=\fR\fIrounding-mode\fR" 4
  20129. .IX Item "-mfp-rounding-mode=rounding-mode"
  20130. Selects the \s-1IEEE\s0 rounding mode. Other Alpha compilers call this option
  20131. \&\fB\-fprm\fR \fIrounding-mode\fR. The \fIrounding-mode\fR can be one
  20132. of:
  20133. .RS 4
  20134. .IP "\fBn\fR" 4
  20135. .IX Item "n"
  20136. Normal \s-1IEEE\s0 rounding mode. Floating-point numbers are rounded towards
  20137. the nearest machine number or towards the even machine number in case
  20138. of a tie.
  20139. .IP "\fBm\fR" 4
  20140. .IX Item "m"
  20141. Round towards minus infinity.
  20142. .IP "\fBc\fR" 4
  20143. .IX Item "c"
  20144. Chopped rounding mode. Floating-point numbers are rounded towards zero.
  20145. .IP "\fBd\fR" 4
  20146. .IX Item "d"
  20147. Dynamic rounding mode. A field in the floating-point control register
  20148. (\fIfpcr\fR, see Alpha architecture reference manual) controls the
  20149. rounding mode in effect. The C library initializes this register for
  20150. rounding towards plus infinity. Thus, unless your program modifies the
  20151. \&\fIfpcr\fR, \fBd\fR corresponds to round towards plus infinity.
  20152. .RE
  20153. .RS 4
  20154. .RE
  20155. .IP "\fB\-mtrap\-precision=\fR\fItrap-precision\fR" 4
  20156. .IX Item "-mtrap-precision=trap-precision"
  20157. In the Alpha architecture, floating-point traps are imprecise. This
  20158. means without software assistance it is impossible to recover from a
  20159. floating trap and program execution normally needs to be terminated.
  20160. \&\s-1GCC\s0 can generate code that can assist operating system trap handlers
  20161. in determining the exact location that caused a floating-point trap.
  20162. Depending on the requirements of an application, different levels of
  20163. precisions can be selected:
  20164. .RS 4
  20165. .IP "\fBp\fR" 4
  20166. .IX Item "p"
  20167. Program precision. This option is the default and means a trap handler
  20168. can only identify which program caused a floating-point exception.
  20169. .IP "\fBf\fR" 4
  20170. .IX Item "f"
  20171. Function precision. The trap handler can determine the function that
  20172. caused a floating-point exception.
  20173. .IP "\fBi\fR" 4
  20174. .IX Item "i"
  20175. Instruction precision. The trap handler can determine the exact
  20176. instruction that caused a floating-point exception.
  20177. .RE
  20178. .RS 4
  20179. .Sp
  20180. Other Alpha compilers provide the equivalent options called
  20181. \&\fB\-scope_safe\fR and \fB\-resumption_safe\fR.
  20182. .RE
  20183. .IP "\fB\-mieee\-conformant\fR" 4
  20184. .IX Item "-mieee-conformant"
  20185. This option marks the generated code as \s-1IEEE\s0 conformant. You must not
  20186. use this option unless you also specify \fB\-mtrap\-precision=i\fR and either
  20187. \&\fB\-mfp\-trap\-mode=su\fR or \fB\-mfp\-trap\-mode=sui\fR. Its only effect
  20188. is to emit the line \fB.eflag 48\fR in the function prologue of the
  20189. generated assembly file.
  20190. .IP "\fB\-mbuild\-constants\fR" 4
  20191. .IX Item "-mbuild-constants"
  20192. Normally \s-1GCC\s0 examines a 32\- or 64\-bit integer constant to
  20193. see if it can construct it from smaller constants in two or three
  20194. instructions. If it cannot, it outputs the constant as a literal and
  20195. generates code to load it from the data segment at run time.
  20196. .Sp
  20197. Use this option to require \s-1GCC\s0 to construct \fIall\fR integer constants
  20198. using code, even if it takes more instructions (the maximum is six).
  20199. .Sp
  20200. You typically use this option to build a shared library dynamic
  20201. loader. Itself a shared library, it must relocate itself in memory
  20202. before it can find the variables and constants in its own data segment.
  20203. .IP "\fB\-mbwx\fR" 4
  20204. .IX Item "-mbwx"
  20205. .PD 0
  20206. .IP "\fB\-mno\-bwx\fR" 4
  20207. .IX Item "-mno-bwx"
  20208. .IP "\fB\-mcix\fR" 4
  20209. .IX Item "-mcix"
  20210. .IP "\fB\-mno\-cix\fR" 4
  20211. .IX Item "-mno-cix"
  20212. .IP "\fB\-mfix\fR" 4
  20213. .IX Item "-mfix"
  20214. .IP "\fB\-mno\-fix\fR" 4
  20215. .IX Item "-mno-fix"
  20216. .IP "\fB\-mmax\fR" 4
  20217. .IX Item "-mmax"
  20218. .IP "\fB\-mno\-max\fR" 4
  20219. .IX Item "-mno-max"
  20220. .PD
  20221. Indicate whether \s-1GCC\s0 should generate code to use the optional \s-1BWX,
  20222. CIX, FIX\s0 and \s-1MAX\s0 instruction sets. The default is to use the instruction
  20223. sets supported by the \s-1CPU\s0 type specified via \fB\-mcpu=\fR option or that
  20224. of the \s-1CPU\s0 on which \s-1GCC\s0 was built if none is specified.
  20225. .IP "\fB\-mfloat\-vax\fR" 4
  20226. .IX Item "-mfloat-vax"
  20227. .PD 0
  20228. .IP "\fB\-mfloat\-ieee\fR" 4
  20229. .IX Item "-mfloat-ieee"
  20230. .PD
  20231. Generate code that uses (does not use) \s-1VAX F\s0 and G floating-point
  20232. arithmetic instead of \s-1IEEE\s0 single and double precision.
  20233. .IP "\fB\-mexplicit\-relocs\fR" 4
  20234. .IX Item "-mexplicit-relocs"
  20235. .PD 0
  20236. .IP "\fB\-mno\-explicit\-relocs\fR" 4
  20237. .IX Item "-mno-explicit-relocs"
  20238. .PD
  20239. Older Alpha assemblers provided no way to generate symbol relocations
  20240. except via assembler macros. Use of these macros does not allow
  20241. optimal instruction scheduling. \s-1GNU\s0 binutils as of version 2.12
  20242. supports a new syntax that allows the compiler to explicitly mark
  20243. which relocations should apply to which instructions. This option
  20244. is mostly useful for debugging, as \s-1GCC\s0 detects the capabilities of
  20245. the assembler when it is built and sets the default accordingly.
  20246. .IP "\fB\-msmall\-data\fR" 4
  20247. .IX Item "-msmall-data"
  20248. .PD 0
  20249. .IP "\fB\-mlarge\-data\fR" 4
  20250. .IX Item "-mlarge-data"
  20251. .PD
  20252. When \fB\-mexplicit\-relocs\fR is in effect, static data is
  20253. accessed via \fIgp-relative\fR relocations. When \fB\-msmall\-data\fR
  20254. is used, objects 8 bytes long or smaller are placed in a \fIsmall data area\fR
  20255. (the \f(CW\*(C`.sdata\*(C'\fR and \f(CW\*(C`.sbss\*(C'\fR sections) and are accessed via
  20256. 16\-bit relocations off of the \f(CW$gp\fR register. This limits the
  20257. size of the small data area to 64KB, but allows the variables to be
  20258. directly accessed via a single instruction.
  20259. .Sp
  20260. The default is \fB\-mlarge\-data\fR. With this option the data area
  20261. is limited to just below 2GB. Programs that require more than 2GB of
  20262. data must use \f(CW\*(C`malloc\*(C'\fR or \f(CW\*(C`mmap\*(C'\fR to allocate the data in the
  20263. heap instead of in the program's data segment.
  20264. .Sp
  20265. When generating code for shared libraries, \fB\-fpic\fR implies
  20266. \&\fB\-msmall\-data\fR and \fB\-fPIC\fR implies \fB\-mlarge\-data\fR.
  20267. .IP "\fB\-msmall\-text\fR" 4
  20268. .IX Item "-msmall-text"
  20269. .PD 0
  20270. .IP "\fB\-mlarge\-text\fR" 4
  20271. .IX Item "-mlarge-text"
  20272. .PD
  20273. When \fB\-msmall\-text\fR is used, the compiler assumes that the
  20274. code of the entire program (or shared library) fits in 4MB, and is
  20275. thus reachable with a branch instruction. When \fB\-msmall\-data\fR
  20276. is used, the compiler can assume that all local symbols share the
  20277. same \f(CW$gp\fR value, and thus reduce the number of instructions
  20278. required for a function call from 4 to 1.
  20279. .Sp
  20280. The default is \fB\-mlarge\-text\fR.
  20281. .IP "\fB\-mcpu=\fR\fIcpu_type\fR" 4
  20282. .IX Item "-mcpu=cpu_type"
  20283. Set the instruction set and instruction scheduling parameters for
  20284. machine type \fIcpu_type\fR. You can specify either the \fB\s-1EV\s0\fR
  20285. style name or the corresponding chip number. \s-1GCC\s0 supports scheduling
  20286. parameters for the \s-1EV4, EV5\s0 and \s-1EV6\s0 family of processors and
  20287. chooses the default values for the instruction set from the processor
  20288. you specify. If you do not specify a processor type, \s-1GCC\s0 defaults
  20289. to the processor on which the compiler was built.
  20290. .Sp
  20291. Supported values for \fIcpu_type\fR are
  20292. .RS 4
  20293. .IP "\fBev4\fR" 4
  20294. .IX Item "ev4"
  20295. .PD 0
  20296. .IP "\fBev45\fR" 4
  20297. .IX Item "ev45"
  20298. .IP "\fB21064\fR" 4
  20299. .IX Item "21064"
  20300. .PD
  20301. Schedules as an \s-1EV4\s0 and has no instruction set extensions.
  20302. .IP "\fBev5\fR" 4
  20303. .IX Item "ev5"
  20304. .PD 0
  20305. .IP "\fB21164\fR" 4
  20306. .IX Item "21164"
  20307. .PD
  20308. Schedules as an \s-1EV5\s0 and has no instruction set extensions.
  20309. .IP "\fBev56\fR" 4
  20310. .IX Item "ev56"
  20311. .PD 0
  20312. .IP "\fB21164a\fR" 4
  20313. .IX Item "21164a"
  20314. .PD
  20315. Schedules as an \s-1EV5\s0 and supports the \s-1BWX\s0 extension.
  20316. .IP "\fBpca56\fR" 4
  20317. .IX Item "pca56"
  20318. .PD 0
  20319. .IP "\fB21164pc\fR" 4
  20320. .IX Item "21164pc"
  20321. .IP "\fB21164PC\fR" 4
  20322. .IX Item "21164PC"
  20323. .PD
  20324. Schedules as an \s-1EV5\s0 and supports the \s-1BWX\s0 and \s-1MAX\s0 extensions.
  20325. .IP "\fBev6\fR" 4
  20326. .IX Item "ev6"
  20327. .PD 0
  20328. .IP "\fB21264\fR" 4
  20329. .IX Item "21264"
  20330. .PD
  20331. Schedules as an \s-1EV6\s0 and supports the \s-1BWX, FIX,\s0 and \s-1MAX\s0 extensions.
  20332. .IP "\fBev67\fR" 4
  20333. .IX Item "ev67"
  20334. .PD 0
  20335. .IP "\fB21264a\fR" 4
  20336. .IX Item "21264a"
  20337. .PD
  20338. Schedules as an \s-1EV6\s0 and supports the \s-1BWX, CIX, FIX,\s0 and \s-1MAX\s0 extensions.
  20339. .RE
  20340. .RS 4
  20341. .Sp
  20342. Native toolchains also support the value \fBnative\fR,
  20343. which selects the best architecture option for the host processor.
  20344. \&\fB\-mcpu=native\fR has no effect if \s-1GCC\s0 does not recognize
  20345. the processor.
  20346. .RE
  20347. .IP "\fB\-mtune=\fR\fIcpu_type\fR" 4
  20348. .IX Item "-mtune=cpu_type"
  20349. Set only the instruction scheduling parameters for machine type
  20350. \&\fIcpu_type\fR. The instruction set is not changed.
  20351. .Sp
  20352. Native toolchains also support the value \fBnative\fR,
  20353. which selects the best architecture option for the host processor.
  20354. \&\fB\-mtune=native\fR has no effect if \s-1GCC\s0 does not recognize
  20355. the processor.
  20356. .IP "\fB\-mmemory\-latency=\fR\fItime\fR" 4
  20357. .IX Item "-mmemory-latency=time"
  20358. Sets the latency the scheduler should assume for typical memory
  20359. references as seen by the application. This number is highly
  20360. dependent on the memory access patterns used by the application
  20361. and the size of the external cache on the machine.
  20362. .Sp
  20363. Valid options for \fItime\fR are
  20364. .RS 4
  20365. .IP "\fInumber\fR" 4
  20366. .IX Item "number"
  20367. A decimal number representing clock cycles.
  20368. .IP "\fBL1\fR" 4
  20369. .IX Item "L1"
  20370. .PD 0
  20371. .IP "\fBL2\fR" 4
  20372. .IX Item "L2"
  20373. .IP "\fBL3\fR" 4
  20374. .IX Item "L3"
  20375. .IP "\fBmain\fR" 4
  20376. .IX Item "main"
  20377. .PD
  20378. The compiler contains estimates of the number of clock cycles for
  20379. \&\*(L"typical\*(R" \s-1EV4 & EV5\s0 hardware for the Level 1, 2 & 3 caches
  20380. (also called Dcache, Scache, and Bcache), as well as to main memory.
  20381. Note that L3 is only valid for \s-1EV5.\s0
  20382. .RE
  20383. .RS 4
  20384. .RE
  20385. .PP
  20386. \fIeBPF Options\fR
  20387. .IX Subsection "eBPF Options"
  20388. .IP "\fB\-mframe\-limit=\fR\fIbytes\fR" 4
  20389. .IX Item "-mframe-limit=bytes"
  20390. This specifies the hard limit for frame sizes, in bytes. Currently,
  20391. the value that can be specified should be less than or equal to
  20392. \&\fB32767\fR. Defaults to whatever limit is imposed by the version of
  20393. the Linux kernel targeted.
  20394. .IP "\fB\-mkernel=\fR\fIversion\fR" 4
  20395. .IX Item "-mkernel=version"
  20396. This specifies the minimum version of the kernel that will run the
  20397. compiled program. \s-1GCC\s0 uses this version to determine which
  20398. instructions to use, what kernel helpers to allow, etc. Currently,
  20399. \&\fIversion\fR can be one of \fB4.0\fR, \fB4.1\fR, \fB4.2\fR,
  20400. \&\fB4.3\fR, \fB4.4\fR, \fB4.5\fR, \fB4.6\fR, \fB4.7\fR,
  20401. \&\fB4.8\fR, \fB4.9\fR, \fB4.10\fR, \fB4.11\fR, \fB4.12\fR,
  20402. \&\fB4.13\fR, \fB4.14\fR, \fB4.15\fR, \fB4.16\fR, \fB4.17\fR,
  20403. \&\fB4.18\fR, \fB4.19\fR, \fB4.20\fR, \fB5.0\fR, \fB5.1\fR,
  20404. \&\fB5.2\fR, \fBlatest\fR and \fBnative\fR.
  20405. .IP "\fB\-mbig\-endian\fR" 4
  20406. .IX Item "-mbig-endian"
  20407. Generate code for a big-endian target.
  20408. .IP "\fB\-mlittle\-endian\fR" 4
  20409. .IX Item "-mlittle-endian"
  20410. Generate code for a little-endian target. This is the default.
  20411. .IP "\fB\-mxbpf\fR" 4
  20412. .IX Item "-mxbpf"
  20413. Generate code for an expanded version of \s-1BPF,\s0 which relaxes some of
  20414. the restrictions imposed by the \s-1BPF\s0 architecture:
  20415. .RS 4
  20416. .IP "\-<Save and restore callee-saved registers at function entry and>" 4
  20417. .IX Item "-<Save and restore callee-saved registers at function entry and>"
  20418. exit, respectively.
  20419. .RE
  20420. .RS 4
  20421. .RE
  20422. .PP
  20423. \fI\s-1FR30\s0 Options\fR
  20424. .IX Subsection "FR30 Options"
  20425. .PP
  20426. These options are defined specifically for the \s-1FR30\s0 port.
  20427. .IP "\fB\-msmall\-model\fR" 4
  20428. .IX Item "-msmall-model"
  20429. Use the small address space model. This can produce smaller code, but
  20430. it does assume that all symbolic values and addresses fit into a
  20431. 20\-bit range.
  20432. .IP "\fB\-mno\-lsim\fR" 4
  20433. .IX Item "-mno-lsim"
  20434. Assume that runtime support has been provided and so there is no need
  20435. to include the simulator library (\fIlibsim.a\fR) on the linker
  20436. command line.
  20437. .PP
  20438. \fI\s-1FT32\s0 Options\fR
  20439. .IX Subsection "FT32 Options"
  20440. .PP
  20441. These options are defined specifically for the \s-1FT32\s0 port.
  20442. .IP "\fB\-msim\fR" 4
  20443. .IX Item "-msim"
  20444. Specifies that the program will be run on the simulator. This causes
  20445. an alternate runtime startup and library to be linked.
  20446. You must not use this option when generating programs that will run on
  20447. real hardware; you must provide your own runtime library for whatever
  20448. I/O functions are needed.
  20449. .IP "\fB\-mlra\fR" 4
  20450. .IX Item "-mlra"
  20451. Enable Local Register Allocation. This is still experimental for \s-1FT32,\s0
  20452. so by default the compiler uses standard reload.
  20453. .IP "\fB\-mnodiv\fR" 4
  20454. .IX Item "-mnodiv"
  20455. Do not use div and mod instructions.
  20456. .IP "\fB\-mft32b\fR" 4
  20457. .IX Item "-mft32b"
  20458. Enable use of the extended instructions of the \s-1FT32B\s0 processor.
  20459. .IP "\fB\-mcompress\fR" 4
  20460. .IX Item "-mcompress"
  20461. Compress all code using the Ft32B code compression scheme.
  20462. .IP "\fB\-mnopm\fR" 4
  20463. .IX Item "-mnopm"
  20464. Do not generate code that reads program memory.
  20465. .PP
  20466. \fI\s-1FRV\s0 Options\fR
  20467. .IX Subsection "FRV Options"
  20468. .IP "\fB\-mgpr\-32\fR" 4
  20469. .IX Item "-mgpr-32"
  20470. Only use the first 32 general-purpose registers.
  20471. .IP "\fB\-mgpr\-64\fR" 4
  20472. .IX Item "-mgpr-64"
  20473. Use all 64 general-purpose registers.
  20474. .IP "\fB\-mfpr\-32\fR" 4
  20475. .IX Item "-mfpr-32"
  20476. Use only the first 32 floating-point registers.
  20477. .IP "\fB\-mfpr\-64\fR" 4
  20478. .IX Item "-mfpr-64"
  20479. Use all 64 floating-point registers.
  20480. .IP "\fB\-mhard\-float\fR" 4
  20481. .IX Item "-mhard-float"
  20482. Use hardware instructions for floating-point operations.
  20483. .IP "\fB\-msoft\-float\fR" 4
  20484. .IX Item "-msoft-float"
  20485. Use library routines for floating-point operations.
  20486. .IP "\fB\-malloc\-cc\fR" 4
  20487. .IX Item "-malloc-cc"
  20488. Dynamically allocate condition code registers.
  20489. .IP "\fB\-mfixed\-cc\fR" 4
  20490. .IX Item "-mfixed-cc"
  20491. Do not try to dynamically allocate condition code registers, only
  20492. use \f(CW\*(C`icc0\*(C'\fR and \f(CW\*(C`fcc0\*(C'\fR.
  20493. .IP "\fB\-mdword\fR" 4
  20494. .IX Item "-mdword"
  20495. Change \s-1ABI\s0 to use double word insns.
  20496. .IP "\fB\-mno\-dword\fR" 4
  20497. .IX Item "-mno-dword"
  20498. Do not use double word instructions.
  20499. .IP "\fB\-mdouble\fR" 4
  20500. .IX Item "-mdouble"
  20501. Use floating-point double instructions.
  20502. .IP "\fB\-mno\-double\fR" 4
  20503. .IX Item "-mno-double"
  20504. Do not use floating-point double instructions.
  20505. .IP "\fB\-mmedia\fR" 4
  20506. .IX Item "-mmedia"
  20507. Use media instructions.
  20508. .IP "\fB\-mno\-media\fR" 4
  20509. .IX Item "-mno-media"
  20510. Do not use media instructions.
  20511. .IP "\fB\-mmuladd\fR" 4
  20512. .IX Item "-mmuladd"
  20513. Use multiply and add/subtract instructions.
  20514. .IP "\fB\-mno\-muladd\fR" 4
  20515. .IX Item "-mno-muladd"
  20516. Do not use multiply and add/subtract instructions.
  20517. .IP "\fB\-mfdpic\fR" 4
  20518. .IX Item "-mfdpic"
  20519. Select the \s-1FDPIC ABI,\s0 which uses function descriptors to represent
  20520. pointers to functions. Without any PIC/PIE\-related options, it
  20521. implies \fB\-fPIE\fR. With \fB\-fpic\fR or \fB\-fpie\fR, it
  20522. assumes \s-1GOT\s0 entries and small data are within a 12\-bit range from the
  20523. \&\s-1GOT\s0 base address; with \fB\-fPIC\fR or \fB\-fPIE\fR, \s-1GOT\s0 offsets
  20524. are computed with 32 bits.
  20525. With a \fBbfin-elf\fR target, this option implies \fB\-msim\fR.
  20526. .IP "\fB\-minline\-plt\fR" 4
  20527. .IX Item "-minline-plt"
  20528. Enable inlining of \s-1PLT\s0 entries in function calls to functions that are
  20529. not known to bind locally. It has no effect without \fB\-mfdpic\fR.
  20530. It's enabled by default if optimizing for speed and compiling for
  20531. shared libraries (i.e., \fB\-fPIC\fR or \fB\-fpic\fR), or when an
  20532. optimization option such as \fB\-O3\fR or above is present in the
  20533. command line.
  20534. .IP "\fB\-mTLS\fR" 4
  20535. .IX Item "-mTLS"
  20536. Assume a large \s-1TLS\s0 segment when generating thread-local code.
  20537. .IP "\fB\-mtls\fR" 4
  20538. .IX Item "-mtls"
  20539. Do not assume a large \s-1TLS\s0 segment when generating thread-local code.
  20540. .IP "\fB\-mgprel\-ro\fR" 4
  20541. .IX Item "-mgprel-ro"
  20542. Enable the use of \f(CW\*(C`GPREL\*(C'\fR relocations in the \s-1FDPIC ABI\s0 for data
  20543. that is known to be in read-only sections. It's enabled by default,
  20544. except for \fB\-fpic\fR or \fB\-fpie\fR: even though it may help
  20545. make the global offset table smaller, it trades 1 instruction for 4.
  20546. With \fB\-fPIC\fR or \fB\-fPIE\fR, it trades 3 instructions for 4,
  20547. one of which may be shared by multiple symbols, and it avoids the need
  20548. for a \s-1GOT\s0 entry for the referenced symbol, so it's more likely to be a
  20549. win. If it is not, \fB\-mno\-gprel\-ro\fR can be used to disable it.
  20550. .IP "\fB\-multilib\-library\-pic\fR" 4
  20551. .IX Item "-multilib-library-pic"
  20552. Link with the (library, not \s-1FD\s0) pic libraries. It's implied by
  20553. \&\fB\-mlibrary\-pic\fR, as well as by \fB\-fPIC\fR and
  20554. \&\fB\-fpic\fR without \fB\-mfdpic\fR. You should never have to use
  20555. it explicitly.
  20556. .IP "\fB\-mlinked\-fp\fR" 4
  20557. .IX Item "-mlinked-fp"
  20558. Follow the \s-1EABI\s0 requirement of always creating a frame pointer whenever
  20559. a stack frame is allocated. This option is enabled by default and can
  20560. be disabled with \fB\-mno\-linked\-fp\fR.
  20561. .IP "\fB\-mlong\-calls\fR" 4
  20562. .IX Item "-mlong-calls"
  20563. Use indirect addressing to call functions outside the current
  20564. compilation unit. This allows the functions to be placed anywhere
  20565. within the 32\-bit address space.
  20566. .IP "\fB\-malign\-labels\fR" 4
  20567. .IX Item "-malign-labels"
  20568. Try to align labels to an 8\-byte boundary by inserting NOPs into the
  20569. previous packet. This option only has an effect when \s-1VLIW\s0 packing
  20570. is enabled. It doesn't create new packets; it merely adds NOPs to
  20571. existing ones.
  20572. .IP "\fB\-mlibrary\-pic\fR" 4
  20573. .IX Item "-mlibrary-pic"
  20574. Generate position-independent \s-1EABI\s0 code.
  20575. .IP "\fB\-macc\-4\fR" 4
  20576. .IX Item "-macc-4"
  20577. Use only the first four media accumulator registers.
  20578. .IP "\fB\-macc\-8\fR" 4
  20579. .IX Item "-macc-8"
  20580. Use all eight media accumulator registers.
  20581. .IP "\fB\-mpack\fR" 4
  20582. .IX Item "-mpack"
  20583. Pack \s-1VLIW\s0 instructions.
  20584. .IP "\fB\-mno\-pack\fR" 4
  20585. .IX Item "-mno-pack"
  20586. Do not pack \s-1VLIW\s0 instructions.
  20587. .IP "\fB\-mno\-eflags\fR" 4
  20588. .IX Item "-mno-eflags"
  20589. Do not mark \s-1ABI\s0 switches in e_flags.
  20590. .IP "\fB\-mcond\-move\fR" 4
  20591. .IX Item "-mcond-move"
  20592. Enable the use of conditional-move instructions (default).
  20593. .Sp
  20594. This switch is mainly for debugging the compiler and will likely be removed
  20595. in a future version.
  20596. .IP "\fB\-mno\-cond\-move\fR" 4
  20597. .IX Item "-mno-cond-move"
  20598. Disable the use of conditional-move instructions.
  20599. .Sp
  20600. This switch is mainly for debugging the compiler and will likely be removed
  20601. in a future version.
  20602. .IP "\fB\-mscc\fR" 4
  20603. .IX Item "-mscc"
  20604. Enable the use of conditional set instructions (default).
  20605. .Sp
  20606. This switch is mainly for debugging the compiler and will likely be removed
  20607. in a future version.
  20608. .IP "\fB\-mno\-scc\fR" 4
  20609. .IX Item "-mno-scc"
  20610. Disable the use of conditional set instructions.
  20611. .Sp
  20612. This switch is mainly for debugging the compiler and will likely be removed
  20613. in a future version.
  20614. .IP "\fB\-mcond\-exec\fR" 4
  20615. .IX Item "-mcond-exec"
  20616. Enable the use of conditional execution (default).
  20617. .Sp
  20618. This switch is mainly for debugging the compiler and will likely be removed
  20619. in a future version.
  20620. .IP "\fB\-mno\-cond\-exec\fR" 4
  20621. .IX Item "-mno-cond-exec"
  20622. Disable the use of conditional execution.
  20623. .Sp
  20624. This switch is mainly for debugging the compiler and will likely be removed
  20625. in a future version.
  20626. .IP "\fB\-mvliw\-branch\fR" 4
  20627. .IX Item "-mvliw-branch"
  20628. Run a pass to pack branches into \s-1VLIW\s0 instructions (default).
  20629. .Sp
  20630. This switch is mainly for debugging the compiler and will likely be removed
  20631. in a future version.
  20632. .IP "\fB\-mno\-vliw\-branch\fR" 4
  20633. .IX Item "-mno-vliw-branch"
  20634. Do not run a pass to pack branches into \s-1VLIW\s0 instructions.
  20635. .Sp
  20636. This switch is mainly for debugging the compiler and will likely be removed
  20637. in a future version.
  20638. .IP "\fB\-mmulti\-cond\-exec\fR" 4
  20639. .IX Item "-mmulti-cond-exec"
  20640. Enable optimization of \f(CW\*(C`&&\*(C'\fR and \f(CW\*(C`||\*(C'\fR in conditional execution
  20641. (default).
  20642. .Sp
  20643. This switch is mainly for debugging the compiler and will likely be removed
  20644. in a future version.
  20645. .IP "\fB\-mno\-multi\-cond\-exec\fR" 4
  20646. .IX Item "-mno-multi-cond-exec"
  20647. Disable optimization of \f(CW\*(C`&&\*(C'\fR and \f(CW\*(C`||\*(C'\fR in conditional execution.
  20648. .Sp
  20649. This switch is mainly for debugging the compiler and will likely be removed
  20650. in a future version.
  20651. .IP "\fB\-mnested\-cond\-exec\fR" 4
  20652. .IX Item "-mnested-cond-exec"
  20653. Enable nested conditional execution optimizations (default).
  20654. .Sp
  20655. This switch is mainly for debugging the compiler and will likely be removed
  20656. in a future version.
  20657. .IP "\fB\-mno\-nested\-cond\-exec\fR" 4
  20658. .IX Item "-mno-nested-cond-exec"
  20659. Disable nested conditional execution optimizations.
  20660. .Sp
  20661. This switch is mainly for debugging the compiler and will likely be removed
  20662. in a future version.
  20663. .IP "\fB\-moptimize\-membar\fR" 4
  20664. .IX Item "-moptimize-membar"
  20665. This switch removes redundant \f(CW\*(C`membar\*(C'\fR instructions from the
  20666. compiler-generated code. It is enabled by default.
  20667. .IP "\fB\-mno\-optimize\-membar\fR" 4
  20668. .IX Item "-mno-optimize-membar"
  20669. This switch disables the automatic removal of redundant \f(CW\*(C`membar\*(C'\fR
  20670. instructions from the generated code.
  20671. .IP "\fB\-mtomcat\-stats\fR" 4
  20672. .IX Item "-mtomcat-stats"
  20673. Cause gas to print out tomcat statistics.
  20674. .IP "\fB\-mcpu=\fR\fIcpu\fR" 4
  20675. .IX Item "-mcpu=cpu"
  20676. Select the processor type for which to generate code. Possible values are
  20677. \&\fBfrv\fR, \fBfr550\fR, \fBtomcat\fR, \fBfr500\fR, \fBfr450\fR,
  20678. \&\fBfr405\fR, \fBfr400\fR, \fBfr300\fR and \fBsimple\fR.
  20679. .PP
  20680. \fIGNU/Linux Options\fR
  20681. .IX Subsection "GNU/Linux Options"
  20682. .PP
  20683. These \fB\-m\fR options are defined for GNU/Linux targets:
  20684. .IP "\fB\-mglibc\fR" 4
  20685. .IX Item "-mglibc"
  20686. Use the \s-1GNU C\s0 library. This is the default except
  20687. on \fB*\-*\-linux\-*uclibc*\fR, \fB*\-*\-linux\-*musl*\fR and
  20688. \&\fB*\-*\-linux\-*android*\fR targets.
  20689. .IP "\fB\-muclibc\fR" 4
  20690. .IX Item "-muclibc"
  20691. Use uClibc C library. This is the default on
  20692. \&\fB*\-*\-linux\-*uclibc*\fR targets.
  20693. .IP "\fB\-mmusl\fR" 4
  20694. .IX Item "-mmusl"
  20695. Use the musl C library. This is the default on
  20696. \&\fB*\-*\-linux\-*musl*\fR targets.
  20697. .IP "\fB\-mbionic\fR" 4
  20698. .IX Item "-mbionic"
  20699. Use Bionic C library. This is the default on
  20700. \&\fB*\-*\-linux\-*android*\fR targets.
  20701. .IP "\fB\-mandroid\fR" 4
  20702. .IX Item "-mandroid"
  20703. Compile code compatible with Android platform. This is the default on
  20704. \&\fB*\-*\-linux\-*android*\fR targets.
  20705. .Sp
  20706. When compiling, this option enables \fB\-mbionic\fR, \fB\-fPIC\fR,
  20707. \&\fB\-fno\-exceptions\fR and \fB\-fno\-rtti\fR by default. When linking,
  20708. this option makes the \s-1GCC\s0 driver pass Android-specific options to the linker.
  20709. Finally, this option causes the preprocessor macro \f(CW\*(C`_\|_ANDROID_\|_\*(C'\fR
  20710. to be defined.
  20711. .IP "\fB\-tno\-android\-cc\fR" 4
  20712. .IX Item "-tno-android-cc"
  20713. Disable compilation effects of \fB\-mandroid\fR, i.e., do not enable
  20714. \&\fB\-mbionic\fR, \fB\-fPIC\fR, \fB\-fno\-exceptions\fR and
  20715. \&\fB\-fno\-rtti\fR by default.
  20716. .IP "\fB\-tno\-android\-ld\fR" 4
  20717. .IX Item "-tno-android-ld"
  20718. Disable linking effects of \fB\-mandroid\fR, i.e., pass standard Linux
  20719. linking options to the linker.
  20720. .PP
  20721. \fIH8/300 Options\fR
  20722. .IX Subsection "H8/300 Options"
  20723. .PP
  20724. These \fB\-m\fR options are defined for the H8/300 implementations:
  20725. .IP "\fB\-mrelax\fR" 4
  20726. .IX Item "-mrelax"
  20727. Shorten some address references at link time, when possible; uses the
  20728. linker option \fB\-relax\fR.
  20729. .IP "\fB\-mh\fR" 4
  20730. .IX Item "-mh"
  20731. Generate code for the H8/300H.
  20732. .IP "\fB\-ms\fR" 4
  20733. .IX Item "-ms"
  20734. Generate code for the H8S.
  20735. .IP "\fB\-mn\fR" 4
  20736. .IX Item "-mn"
  20737. Generate code for the H8S and H8/300H in the normal mode. This switch
  20738. must be used either with \fB\-mh\fR or \fB\-ms\fR.
  20739. .IP "\fB\-ms2600\fR" 4
  20740. .IX Item "-ms2600"
  20741. Generate code for the H8S/2600. This switch must be used with \fB\-ms\fR.
  20742. .IP "\fB\-mexr\fR" 4
  20743. .IX Item "-mexr"
  20744. Extended registers are stored on stack before execution of function
  20745. with monitor attribute. Default option is \fB\-mexr\fR.
  20746. This option is valid only for H8S targets.
  20747. .IP "\fB\-mno\-exr\fR" 4
  20748. .IX Item "-mno-exr"
  20749. Extended registers are not stored on stack before execution of function
  20750. with monitor attribute. Default option is \fB\-mno\-exr\fR.
  20751. This option is valid only for H8S targets.
  20752. .IP "\fB\-mint32\fR" 4
  20753. .IX Item "-mint32"
  20754. Make \f(CW\*(C`int\*(C'\fR data 32 bits by default.
  20755. .IP "\fB\-malign\-300\fR" 4
  20756. .IX Item "-malign-300"
  20757. On the H8/300H and H8S, use the same alignment rules as for the H8/300.
  20758. The default for the H8/300H and H8S is to align longs and floats on
  20759. 4\-byte boundaries.
  20760. \&\fB\-malign\-300\fR causes them to be aligned on 2\-byte boundaries.
  20761. This option has no effect on the H8/300.
  20762. .PP
  20763. \fI\s-1HPPA\s0 Options\fR
  20764. .IX Subsection "HPPA Options"
  20765. .PP
  20766. These \fB\-m\fR options are defined for the \s-1HPPA\s0 family of computers:
  20767. .IP "\fB\-march=\fR\fIarchitecture-type\fR" 4
  20768. .IX Item "-march=architecture-type"
  20769. Generate code for the specified architecture. The choices for
  20770. \&\fIarchitecture-type\fR are \fB1.0\fR for \s-1PA 1.0, \s0\fB1.1\fR for \s-1PA
  20771. 1.1,\s0 and \fB2.0\fR for \s-1PA 2.0\s0 processors. Refer to
  20772. \&\fI/usr/lib/sched.models\fR on an HP-UX system to determine the proper
  20773. architecture option for your machine. Code compiled for lower numbered
  20774. architectures runs on higher numbered architectures, but not the
  20775. other way around.
  20776. .IP "\fB\-mpa\-risc\-1\-0\fR" 4
  20777. .IX Item "-mpa-risc-1-0"
  20778. .PD 0
  20779. .IP "\fB\-mpa\-risc\-1\-1\fR" 4
  20780. .IX Item "-mpa-risc-1-1"
  20781. .IP "\fB\-mpa\-risc\-2\-0\fR" 4
  20782. .IX Item "-mpa-risc-2-0"
  20783. .PD
  20784. Synonyms for \fB\-march=1.0\fR, \fB\-march=1.1\fR, and \fB\-march=2.0\fR respectively.
  20785. .IP "\fB\-mcaller\-copies\fR" 4
  20786. .IX Item "-mcaller-copies"
  20787. The caller copies function arguments passed by hidden reference. This
  20788. option should be used with care as it is not compatible with the default
  20789. 32\-bit runtime. However, only aggregates larger than eight bytes are
  20790. passed by hidden reference and the option provides better compatibility
  20791. with OpenMP.
  20792. .IP "\fB\-mjump\-in\-delay\fR" 4
  20793. .IX Item "-mjump-in-delay"
  20794. This option is ignored and provided for compatibility purposes only.
  20795. .IP "\fB\-mdisable\-fpregs\fR" 4
  20796. .IX Item "-mdisable-fpregs"
  20797. Prevent floating-point registers from being used in any manner. This is
  20798. necessary for compiling kernels that perform lazy context switching of
  20799. floating-point registers. If you use this option and attempt to perform
  20800. floating-point operations, the compiler aborts.
  20801. .IP "\fB\-mdisable\-indexing\fR" 4
  20802. .IX Item "-mdisable-indexing"
  20803. Prevent the compiler from using indexing address modes. This avoids some
  20804. rather obscure problems when compiling \s-1MIG\s0 generated code under \s-1MACH.\s0
  20805. .IP "\fB\-mno\-space\-regs\fR" 4
  20806. .IX Item "-mno-space-regs"
  20807. Generate code that assumes the target has no space registers. This allows
  20808. \&\s-1GCC\s0 to generate faster indirect calls and use unscaled index address modes.
  20809. .Sp
  20810. Such code is suitable for level 0 \s-1PA\s0 systems and kernels.
  20811. .IP "\fB\-mfast\-indirect\-calls\fR" 4
  20812. .IX Item "-mfast-indirect-calls"
  20813. Generate code that assumes calls never cross space boundaries. This
  20814. allows \s-1GCC\s0 to emit code that performs faster indirect calls.
  20815. .Sp
  20816. This option does not work in the presence of shared libraries or nested
  20817. functions.
  20818. .IP "\fB\-mfixed\-range=\fR\fIregister-range\fR" 4
  20819. .IX Item "-mfixed-range=register-range"
  20820. Generate code treating the given register range as fixed registers.
  20821. A fixed register is one that the register allocator cannot use. This is
  20822. useful when compiling kernel code. A register range is specified as
  20823. two registers separated by a dash. Multiple register ranges can be
  20824. specified separated by a comma.
  20825. .IP "\fB\-mlong\-load\-store\fR" 4
  20826. .IX Item "-mlong-load-store"
  20827. Generate 3\-instruction load and store sequences as sometimes required by
  20828. the HP-UX 10 linker. This is equivalent to the \fB+k\fR option to
  20829. the \s-1HP\s0 compilers.
  20830. .IP "\fB\-mportable\-runtime\fR" 4
  20831. .IX Item "-mportable-runtime"
  20832. Use the portable calling conventions proposed by \s-1HP\s0 for \s-1ELF\s0 systems.
  20833. .IP "\fB\-mgas\fR" 4
  20834. .IX Item "-mgas"
  20835. Enable the use of assembler directives only \s-1GAS\s0 understands.
  20836. .IP "\fB\-mschedule=\fR\fIcpu-type\fR" 4
  20837. .IX Item "-mschedule=cpu-type"
  20838. Schedule code according to the constraints for the machine type
  20839. \&\fIcpu-type\fR. The choices for \fIcpu-type\fR are \fB700\fR
  20840. \&\fB7100\fR, \fB7100LC\fR, \fB7200\fR, \fB7300\fR and \fB8000\fR. Refer
  20841. to \fI/usr/lib/sched.models\fR on an HP-UX system to determine the
  20842. proper scheduling option for your machine. The default scheduling is
  20843. \&\fB8000\fR.
  20844. .IP "\fB\-mlinker\-opt\fR" 4
  20845. .IX Item "-mlinker-opt"
  20846. Enable the optimization pass in the HP-UX linker. Note this makes symbolic
  20847. debugging impossible. It also triggers a bug in the HP-UX 8 and HP-UX 9
  20848. linkers in which they give bogus error messages when linking some programs.
  20849. .IP "\fB\-msoft\-float\fR" 4
  20850. .IX Item "-msoft-float"
  20851. Generate output containing library calls for floating point.
  20852. \&\fBWarning:\fR the requisite libraries are not available for all \s-1HPPA\s0
  20853. targets. Normally the facilities of the machine's usual C compiler are
  20854. used, but this cannot be done directly in cross-compilation. You must make
  20855. your own arrangements to provide suitable library functions for
  20856. cross-compilation.
  20857. .Sp
  20858. \&\fB\-msoft\-float\fR changes the calling convention in the output file;
  20859. therefore, it is only useful if you compile \fIall\fR of a program with
  20860. this option. In particular, you need to compile \fIlibgcc.a\fR, the
  20861. library that comes with \s-1GCC,\s0 with \fB\-msoft\-float\fR in order for
  20862. this to work.
  20863. .IP "\fB\-msio\fR" 4
  20864. .IX Item "-msio"
  20865. Generate the predefine, \f(CW\*(C`_SIO\*(C'\fR, for server \s-1IO. \s0 The default is
  20866. \&\fB\-mwsio\fR. This generates the predefines, \f(CW\*(C`_\|_hp9000s700\*(C'\fR,
  20867. \&\f(CW\*(C`_\|_hp9000s700_\|_\*(C'\fR and \f(CW\*(C`_WSIO\*(C'\fR, for workstation \s-1IO. \s0 These
  20868. options are available under HP-UX and HI-UX.
  20869. .IP "\fB\-mgnu\-ld\fR" 4
  20870. .IX Item "-mgnu-ld"
  20871. Use options specific to \s-1GNU \s0\fBld\fR.
  20872. This passes \fB\-shared\fR to \fBld\fR when
  20873. building a shared library. It is the default when \s-1GCC\s0 is configured,
  20874. explicitly or implicitly, with the \s-1GNU\s0 linker. This option does not
  20875. affect which \fBld\fR is called; it only changes what parameters
  20876. are passed to that \fBld\fR.
  20877. The \fBld\fR that is called is determined by the
  20878. \&\fB\-\-with\-ld\fR configure option, \s-1GCC\s0's program search path, and
  20879. finally by the user's \fB\s-1PATH\s0\fR. The linker used by \s-1GCC\s0 can be printed
  20880. using \fBwhich `gcc \-print\-prog\-name=ld`\fR. This option is only available
  20881. on the 64\-bit HP-UX \s-1GCC,\s0 i.e. configured with \fBhppa*64*\-*\-hpux*\fR.
  20882. .IP "\fB\-mhp\-ld\fR" 4
  20883. .IX Item "-mhp-ld"
  20884. Use options specific to \s-1HP \s0\fBld\fR.
  20885. This passes \fB\-b\fR to \fBld\fR when building
  20886. a shared library and passes \fB+Accept TypeMismatch\fR to \fBld\fR on all
  20887. links. It is the default when \s-1GCC\s0 is configured, explicitly or
  20888. implicitly, with the \s-1HP\s0 linker. This option does not affect
  20889. which \fBld\fR is called; it only changes what parameters are passed to that
  20890. \&\fBld\fR.
  20891. The \fBld\fR that is called is determined by the \fB\-\-with\-ld\fR
  20892. configure option, \s-1GCC\s0's program search path, and finally by the user's
  20893. \&\fB\s-1PATH\s0\fR. The linker used by \s-1GCC\s0 can be printed using \fBwhich
  20894. `gcc \-print\-prog\-name=ld`\fR. This option is only available on the 64\-bit
  20895. HP-UX \s-1GCC,\s0 i.e. configured with \fBhppa*64*\-*\-hpux*\fR.
  20896. .IP "\fB\-mlong\-calls\fR" 4
  20897. .IX Item "-mlong-calls"
  20898. Generate code that uses long call sequences. This ensures that a call
  20899. is always able to reach linker generated stubs. The default is to generate
  20900. long calls only when the distance from the call site to the beginning
  20901. of the function or translation unit, as the case may be, exceeds a
  20902. predefined limit set by the branch type being used. The limits for
  20903. normal calls are 7,600,000 and 240,000 bytes, respectively for the
  20904. \&\s-1PA 2.0\s0 and \s-1PA 1.X\s0 architectures. Sibcalls are always limited at
  20905. 240,000 bytes.
  20906. .Sp
  20907. Distances are measured from the beginning of functions when using the
  20908. \&\fB\-ffunction\-sections\fR option, or when using the \fB\-mgas\fR
  20909. and \fB\-mno\-portable\-runtime\fR options together under HP-UX with
  20910. the \s-1SOM\s0 linker.
  20911. .Sp
  20912. It is normally not desirable to use this option as it degrades
  20913. performance. However, it may be useful in large applications,
  20914. particularly when partial linking is used to build the application.
  20915. .Sp
  20916. The types of long calls used depends on the capabilities of the
  20917. assembler and linker, and the type of code being generated. The
  20918. impact on systems that support long absolute calls, and long pic
  20919. symbol-difference or pc-relative calls should be relatively small.
  20920. However, an indirect call is used on 32\-bit \s-1ELF\s0 systems in pic code
  20921. and it is quite long.
  20922. .IP "\fB\-munix=\fR\fIunix-std\fR" 4
  20923. .IX Item "-munix=unix-std"
  20924. Generate compiler predefines and select a startfile for the specified
  20925. \&\s-1UNIX\s0 standard. The choices for \fIunix-std\fR are \fB93\fR, \fB95\fR
  20926. and \fB98\fR. \fB93\fR is supported on all HP-UX versions. \fB95\fR
  20927. is available on HP-UX 10.10 and later. \fB98\fR is available on HP-UX
  20928. 11.11 and later. The default values are \fB93\fR for HP-UX 10.00,
  20929. \&\fB95\fR for HP-UX 10.10 though to 11.00, and \fB98\fR for HP-UX 11.11
  20930. and later.
  20931. .Sp
  20932. \&\fB\-munix=93\fR provides the same predefines as \s-1GCC 3.3\s0 and 3.4.
  20933. \&\fB\-munix=95\fR provides additional predefines for \f(CW\*(C`XOPEN_UNIX\*(C'\fR
  20934. and \f(CW\*(C`_XOPEN_SOURCE_EXTENDED\*(C'\fR, and the startfile \fIunix95.o\fR.
  20935. \&\fB\-munix=98\fR provides additional predefines for \f(CW\*(C`_XOPEN_UNIX\*(C'\fR,
  20936. \&\f(CW\*(C`_XOPEN_SOURCE_EXTENDED\*(C'\fR, \f(CW\*(C`_INCLUDE_\|_STDC_A1_SOURCE\*(C'\fR and
  20937. \&\f(CW\*(C`_INCLUDE_XOPEN_SOURCE_500\*(C'\fR, and the startfile \fIunix98.o\fR.
  20938. .Sp
  20939. It is \fIimportant\fR to note that this option changes the interfaces
  20940. for various library routines. It also affects the operational behavior
  20941. of the C library. Thus, \fIextreme\fR care is needed in using this
  20942. option.
  20943. .Sp
  20944. Library code that is intended to operate with more than one \s-1UNIX\s0
  20945. standard must test, set and restore the variable \f(CW\*(C`_\|_xpg4_extended_mask\*(C'\fR
  20946. as appropriate. Most \s-1GNU\s0 software doesn't provide this capability.
  20947. .IP "\fB\-nolibdld\fR" 4
  20948. .IX Item "-nolibdld"
  20949. Suppress the generation of link options to search libdld.sl when the
  20950. \&\fB\-static\fR option is specified on HP-UX 10 and later.
  20951. .IP "\fB\-static\fR" 4
  20952. .IX Item "-static"
  20953. The HP-UX implementation of setlocale in libc has a dependency on
  20954. libdld.sl. There isn't an archive version of libdld.sl. Thus,
  20955. when the \fB\-static\fR option is specified, special link options
  20956. are needed to resolve this dependency.
  20957. .Sp
  20958. On HP-UX 10 and later, the \s-1GCC\s0 driver adds the necessary options to
  20959. link with libdld.sl when the \fB\-static\fR option is specified.
  20960. This causes the resulting binary to be dynamic. On the 64\-bit port,
  20961. the linkers generate dynamic binaries by default in any case. The
  20962. \&\fB\-nolibdld\fR option can be used to prevent the \s-1GCC\s0 driver from
  20963. adding these link options.
  20964. .IP "\fB\-threads\fR" 4
  20965. .IX Item "-threads"
  20966. Add support for multithreading with the \fIdce thread\fR library
  20967. under HP-UX. This option sets flags for both the preprocessor and
  20968. linker.
  20969. .PP
  20970. \fI\s-1IA\-64\s0 Options\fR
  20971. .IX Subsection "IA-64 Options"
  20972. .PP
  20973. These are the \fB\-m\fR options defined for the Intel \s-1IA\-64\s0 architecture.
  20974. .IP "\fB\-mbig\-endian\fR" 4
  20975. .IX Item "-mbig-endian"
  20976. Generate code for a big-endian target. This is the default for HP-UX.
  20977. .IP "\fB\-mlittle\-endian\fR" 4
  20978. .IX Item "-mlittle-endian"
  20979. Generate code for a little-endian target. This is the default for \s-1AIX5\s0
  20980. and GNU/Linux.
  20981. .IP "\fB\-mgnu\-as\fR" 4
  20982. .IX Item "-mgnu-as"
  20983. .PD 0
  20984. .IP "\fB\-mno\-gnu\-as\fR" 4
  20985. .IX Item "-mno-gnu-as"
  20986. .PD
  20987. Generate (or don't) code for the \s-1GNU\s0 assembler. This is the default.
  20988. .IP "\fB\-mgnu\-ld\fR" 4
  20989. .IX Item "-mgnu-ld"
  20990. .PD 0
  20991. .IP "\fB\-mno\-gnu\-ld\fR" 4
  20992. .IX Item "-mno-gnu-ld"
  20993. .PD
  20994. Generate (or don't) code for the \s-1GNU\s0 linker. This is the default.
  20995. .IP "\fB\-mno\-pic\fR" 4
  20996. .IX Item "-mno-pic"
  20997. Generate code that does not use a global pointer register. The result
  20998. is not position independent code, and violates the \s-1IA\-64 ABI.\s0
  20999. .IP "\fB\-mvolatile\-asm\-stop\fR" 4
  21000. .IX Item "-mvolatile-asm-stop"
  21001. .PD 0
  21002. .IP "\fB\-mno\-volatile\-asm\-stop\fR" 4
  21003. .IX Item "-mno-volatile-asm-stop"
  21004. .PD
  21005. Generate (or don't) a stop bit immediately before and after volatile asm
  21006. statements.
  21007. .IP "\fB\-mregister\-names\fR" 4
  21008. .IX Item "-mregister-names"
  21009. .PD 0
  21010. .IP "\fB\-mno\-register\-names\fR" 4
  21011. .IX Item "-mno-register-names"
  21012. .PD
  21013. Generate (or don't) \fBin\fR, \fBloc\fR, and \fBout\fR register names for
  21014. the stacked registers. This may make assembler output more readable.
  21015. .IP "\fB\-mno\-sdata\fR" 4
  21016. .IX Item "-mno-sdata"
  21017. .PD 0
  21018. .IP "\fB\-msdata\fR" 4
  21019. .IX Item "-msdata"
  21020. .PD
  21021. Disable (or enable) optimizations that use the small data section. This may
  21022. be useful for working around optimizer bugs.
  21023. .IP "\fB\-mconstant\-gp\fR" 4
  21024. .IX Item "-mconstant-gp"
  21025. Generate code that uses a single constant global pointer value. This is
  21026. useful when compiling kernel code.
  21027. .IP "\fB\-mauto\-pic\fR" 4
  21028. .IX Item "-mauto-pic"
  21029. Generate code that is self-relocatable. This implies \fB\-mconstant\-gp\fR.
  21030. This is useful when compiling firmware code.
  21031. .IP "\fB\-minline\-float\-divide\-min\-latency\fR" 4
  21032. .IX Item "-minline-float-divide-min-latency"
  21033. Generate code for inline divides of floating-point values
  21034. using the minimum latency algorithm.
  21035. .IP "\fB\-minline\-float\-divide\-max\-throughput\fR" 4
  21036. .IX Item "-minline-float-divide-max-throughput"
  21037. Generate code for inline divides of floating-point values
  21038. using the maximum throughput algorithm.
  21039. .IP "\fB\-mno\-inline\-float\-divide\fR" 4
  21040. .IX Item "-mno-inline-float-divide"
  21041. Do not generate inline code for divides of floating-point values.
  21042. .IP "\fB\-minline\-int\-divide\-min\-latency\fR" 4
  21043. .IX Item "-minline-int-divide-min-latency"
  21044. Generate code for inline divides of integer values
  21045. using the minimum latency algorithm.
  21046. .IP "\fB\-minline\-int\-divide\-max\-throughput\fR" 4
  21047. .IX Item "-minline-int-divide-max-throughput"
  21048. Generate code for inline divides of integer values
  21049. using the maximum throughput algorithm.
  21050. .IP "\fB\-mno\-inline\-int\-divide\fR" 4
  21051. .IX Item "-mno-inline-int-divide"
  21052. Do not generate inline code for divides of integer values.
  21053. .IP "\fB\-minline\-sqrt\-min\-latency\fR" 4
  21054. .IX Item "-minline-sqrt-min-latency"
  21055. Generate code for inline square roots
  21056. using the minimum latency algorithm.
  21057. .IP "\fB\-minline\-sqrt\-max\-throughput\fR" 4
  21058. .IX Item "-minline-sqrt-max-throughput"
  21059. Generate code for inline square roots
  21060. using the maximum throughput algorithm.
  21061. .IP "\fB\-mno\-inline\-sqrt\fR" 4
  21062. .IX Item "-mno-inline-sqrt"
  21063. Do not generate inline code for \f(CW\*(C`sqrt\*(C'\fR.
  21064. .IP "\fB\-mfused\-madd\fR" 4
  21065. .IX Item "-mfused-madd"
  21066. .PD 0
  21067. .IP "\fB\-mno\-fused\-madd\fR" 4
  21068. .IX Item "-mno-fused-madd"
  21069. .PD
  21070. Do (don't) generate code that uses the fused multiply/add or multiply/subtract
  21071. instructions. The default is to use these instructions.
  21072. .IP "\fB\-mno\-dwarf2\-asm\fR" 4
  21073. .IX Item "-mno-dwarf2-asm"
  21074. .PD 0
  21075. .IP "\fB\-mdwarf2\-asm\fR" 4
  21076. .IX Item "-mdwarf2-asm"
  21077. .PD
  21078. Don't (or do) generate assembler code for the \s-1DWARF\s0 line number debugging
  21079. info. This may be useful when not using the \s-1GNU\s0 assembler.
  21080. .IP "\fB\-mearly\-stop\-bits\fR" 4
  21081. .IX Item "-mearly-stop-bits"
  21082. .PD 0
  21083. .IP "\fB\-mno\-early\-stop\-bits\fR" 4
  21084. .IX Item "-mno-early-stop-bits"
  21085. .PD
  21086. Allow stop bits to be placed earlier than immediately preceding the
  21087. instruction that triggered the stop bit. This can improve instruction
  21088. scheduling, but does not always do so.
  21089. .IP "\fB\-mfixed\-range=\fR\fIregister-range\fR" 4
  21090. .IX Item "-mfixed-range=register-range"
  21091. Generate code treating the given register range as fixed registers.
  21092. A fixed register is one that the register allocator cannot use. This is
  21093. useful when compiling kernel code. A register range is specified as
  21094. two registers separated by a dash. Multiple register ranges can be
  21095. specified separated by a comma.
  21096. .IP "\fB\-mtls\-size=\fR\fItls-size\fR" 4
  21097. .IX Item "-mtls-size=tls-size"
  21098. Specify bit size of immediate \s-1TLS\s0 offsets. Valid values are 14, 22, and
  21099. 64.
  21100. .IP "\fB\-mtune=\fR\fIcpu-type\fR" 4
  21101. .IX Item "-mtune=cpu-type"
  21102. Tune the instruction scheduling for a particular \s-1CPU,\s0 Valid values are
  21103. \&\fBitanium\fR, \fBitanium1\fR, \fBmerced\fR, \fBitanium2\fR,
  21104. and \fBmckinley\fR.
  21105. .IP "\fB\-milp32\fR" 4
  21106. .IX Item "-milp32"
  21107. .PD 0
  21108. .IP "\fB\-mlp64\fR" 4
  21109. .IX Item "-mlp64"
  21110. .PD
  21111. Generate code for a 32\-bit or 64\-bit environment.
  21112. The 32\-bit environment sets int, long and pointer to 32 bits.
  21113. The 64\-bit environment sets int to 32 bits and long and pointer
  21114. to 64 bits. These are HP-UX specific flags.
  21115. .IP "\fB\-mno\-sched\-br\-data\-spec\fR" 4
  21116. .IX Item "-mno-sched-br-data-spec"
  21117. .PD 0
  21118. .IP "\fB\-msched\-br\-data\-spec\fR" 4
  21119. .IX Item "-msched-br-data-spec"
  21120. .PD
  21121. (Dis/En)able data speculative scheduling before reload.
  21122. This results in generation of \f(CW\*(C`ld.a\*(C'\fR instructions and
  21123. the corresponding check instructions (\f(CW\*(C`ld.c\*(C'\fR / \f(CW\*(C`chk.a\*(C'\fR).
  21124. The default setting is disabled.
  21125. .IP "\fB\-msched\-ar\-data\-spec\fR" 4
  21126. .IX Item "-msched-ar-data-spec"
  21127. .PD 0
  21128. .IP "\fB\-mno\-sched\-ar\-data\-spec\fR" 4
  21129. .IX Item "-mno-sched-ar-data-spec"
  21130. .PD
  21131. (En/Dis)able data speculative scheduling after reload.
  21132. This results in generation of \f(CW\*(C`ld.a\*(C'\fR instructions and
  21133. the corresponding check instructions (\f(CW\*(C`ld.c\*(C'\fR / \f(CW\*(C`chk.a\*(C'\fR).
  21134. The default setting is enabled.
  21135. .IP "\fB\-mno\-sched\-control\-spec\fR" 4
  21136. .IX Item "-mno-sched-control-spec"
  21137. .PD 0
  21138. .IP "\fB\-msched\-control\-spec\fR" 4
  21139. .IX Item "-msched-control-spec"
  21140. .PD
  21141. (Dis/En)able control speculative scheduling. This feature is
  21142. available only during region scheduling (i.e. before reload).
  21143. This results in generation of the \f(CW\*(C`ld.s\*(C'\fR instructions and
  21144. the corresponding check instructions \f(CW\*(C`chk.s\*(C'\fR.
  21145. The default setting is disabled.
  21146. .IP "\fB\-msched\-br\-in\-data\-spec\fR" 4
  21147. .IX Item "-msched-br-in-data-spec"
  21148. .PD 0
  21149. .IP "\fB\-mno\-sched\-br\-in\-data\-spec\fR" 4
  21150. .IX Item "-mno-sched-br-in-data-spec"
  21151. .PD
  21152. (En/Dis)able speculative scheduling of the instructions that
  21153. are dependent on the data speculative loads before reload.
  21154. This is effective only with \fB\-msched\-br\-data\-spec\fR enabled.
  21155. The default setting is enabled.
  21156. .IP "\fB\-msched\-ar\-in\-data\-spec\fR" 4
  21157. .IX Item "-msched-ar-in-data-spec"
  21158. .PD 0
  21159. .IP "\fB\-mno\-sched\-ar\-in\-data\-spec\fR" 4
  21160. .IX Item "-mno-sched-ar-in-data-spec"
  21161. .PD
  21162. (En/Dis)able speculative scheduling of the instructions that
  21163. are dependent on the data speculative loads after reload.
  21164. This is effective only with \fB\-msched\-ar\-data\-spec\fR enabled.
  21165. The default setting is enabled.
  21166. .IP "\fB\-msched\-in\-control\-spec\fR" 4
  21167. .IX Item "-msched-in-control-spec"
  21168. .PD 0
  21169. .IP "\fB\-mno\-sched\-in\-control\-spec\fR" 4
  21170. .IX Item "-mno-sched-in-control-spec"
  21171. .PD
  21172. (En/Dis)able speculative scheduling of the instructions that
  21173. are dependent on the control speculative loads.
  21174. This is effective only with \fB\-msched\-control\-spec\fR enabled.
  21175. The default setting is enabled.
  21176. .IP "\fB\-mno\-sched\-prefer\-non\-data\-spec\-insns\fR" 4
  21177. .IX Item "-mno-sched-prefer-non-data-spec-insns"
  21178. .PD 0
  21179. .IP "\fB\-msched\-prefer\-non\-data\-spec\-insns\fR" 4
  21180. .IX Item "-msched-prefer-non-data-spec-insns"
  21181. .PD
  21182. If enabled, data-speculative instructions are chosen for schedule
  21183. only if there are no other choices at the moment. This makes
  21184. the use of the data speculation much more conservative.
  21185. The default setting is disabled.
  21186. .IP "\fB\-mno\-sched\-prefer\-non\-control\-spec\-insns\fR" 4
  21187. .IX Item "-mno-sched-prefer-non-control-spec-insns"
  21188. .PD 0
  21189. .IP "\fB\-msched\-prefer\-non\-control\-spec\-insns\fR" 4
  21190. .IX Item "-msched-prefer-non-control-spec-insns"
  21191. .PD
  21192. If enabled, control-speculative instructions are chosen for schedule
  21193. only if there are no other choices at the moment. This makes
  21194. the use of the control speculation much more conservative.
  21195. The default setting is disabled.
  21196. .IP "\fB\-mno\-sched\-count\-spec\-in\-critical\-path\fR" 4
  21197. .IX Item "-mno-sched-count-spec-in-critical-path"
  21198. .PD 0
  21199. .IP "\fB\-msched\-count\-spec\-in\-critical\-path\fR" 4
  21200. .IX Item "-msched-count-spec-in-critical-path"
  21201. .PD
  21202. If enabled, speculative dependencies are considered during
  21203. computation of the instructions priorities. This makes the use of the
  21204. speculation a bit more conservative.
  21205. The default setting is disabled.
  21206. .IP "\fB\-msched\-spec\-ldc\fR" 4
  21207. .IX Item "-msched-spec-ldc"
  21208. Use a simple data speculation check. This option is on by default.
  21209. .IP "\fB\-msched\-control\-spec\-ldc\fR" 4
  21210. .IX Item "-msched-control-spec-ldc"
  21211. Use a simple check for control speculation. This option is on by default.
  21212. .IP "\fB\-msched\-stop\-bits\-after\-every\-cycle\fR" 4
  21213. .IX Item "-msched-stop-bits-after-every-cycle"
  21214. Place a stop bit after every cycle when scheduling. This option is on
  21215. by default.
  21216. .IP "\fB\-msched\-fp\-mem\-deps\-zero\-cost\fR" 4
  21217. .IX Item "-msched-fp-mem-deps-zero-cost"
  21218. Assume that floating-point stores and loads are not likely to cause a conflict
  21219. when placed into the same instruction group. This option is disabled by
  21220. default.
  21221. .IP "\fB\-msel\-sched\-dont\-check\-control\-spec\fR" 4
  21222. .IX Item "-msel-sched-dont-check-control-spec"
  21223. Generate checks for control speculation in selective scheduling.
  21224. This flag is disabled by default.
  21225. .IP "\fB\-msched\-max\-memory\-insns=\fR\fImax-insns\fR" 4
  21226. .IX Item "-msched-max-memory-insns=max-insns"
  21227. Limit on the number of memory insns per instruction group, giving lower
  21228. priority to subsequent memory insns attempting to schedule in the same
  21229. instruction group. Frequently useful to prevent cache bank conflicts.
  21230. The default value is 1.
  21231. .IP "\fB\-msched\-max\-memory\-insns\-hard\-limit\fR" 4
  21232. .IX Item "-msched-max-memory-insns-hard-limit"
  21233. Makes the limit specified by \fBmsched-max-memory-insns\fR a hard limit,
  21234. disallowing more than that number in an instruction group.
  21235. Otherwise, the limit is \*(L"soft\*(R", meaning that non-memory operations
  21236. are preferred when the limit is reached, but memory operations may still
  21237. be scheduled.
  21238. .PP
  21239. \fI\s-1LM32\s0 Options\fR
  21240. .IX Subsection "LM32 Options"
  21241. .PP
  21242. These \fB\-m\fR options are defined for the LatticeMico32 architecture:
  21243. .IP "\fB\-mbarrel\-shift\-enabled\fR" 4
  21244. .IX Item "-mbarrel-shift-enabled"
  21245. Enable barrel-shift instructions.
  21246. .IP "\fB\-mdivide\-enabled\fR" 4
  21247. .IX Item "-mdivide-enabled"
  21248. Enable divide and modulus instructions.
  21249. .IP "\fB\-mmultiply\-enabled\fR" 4
  21250. .IX Item "-mmultiply-enabled"
  21251. Enable multiply instructions.
  21252. .IP "\fB\-msign\-extend\-enabled\fR" 4
  21253. .IX Item "-msign-extend-enabled"
  21254. Enable sign extend instructions.
  21255. .IP "\fB\-muser\-enabled\fR" 4
  21256. .IX Item "-muser-enabled"
  21257. Enable user-defined instructions.
  21258. .PP
  21259. \fIM32C Options\fR
  21260. .IX Subsection "M32C Options"
  21261. .IP "\fB\-mcpu=\fR\fIname\fR" 4
  21262. .IX Item "-mcpu=name"
  21263. Select the \s-1CPU\s0 for which code is generated. \fIname\fR may be one of
  21264. \&\fBr8c\fR for the R8C/Tiny series, \fBm16c\fR for the M16C (up to
  21265. /60) series, \fBm32cm\fR for the M16C/80 series, or \fBm32c\fR for
  21266. the M32C/80 series.
  21267. .IP "\fB\-msim\fR" 4
  21268. .IX Item "-msim"
  21269. Specifies that the program will be run on the simulator. This causes
  21270. an alternate runtime library to be linked in which supports, for
  21271. example, file I/O. You must not use this option when generating
  21272. programs that will run on real hardware; you must provide your own
  21273. runtime library for whatever I/O functions are needed.
  21274. .IP "\fB\-memregs=\fR\fInumber\fR" 4
  21275. .IX Item "-memregs=number"
  21276. Specifies the number of memory-based pseudo-registers \s-1GCC\s0 uses
  21277. during code generation. These pseudo-registers are used like real
  21278. registers, so there is a tradeoff between \s-1GCC\s0's ability to fit the
  21279. code into available registers, and the performance penalty of using
  21280. memory instead of registers. Note that all modules in a program must
  21281. be compiled with the same value for this option. Because of that, you
  21282. must not use this option with \s-1GCC\s0's default runtime libraries.
  21283. .PP
  21284. \fIM32R/D Options\fR
  21285. .IX Subsection "M32R/D Options"
  21286. .PP
  21287. These \fB\-m\fR options are defined for Renesas M32R/D architectures:
  21288. .IP "\fB\-m32r2\fR" 4
  21289. .IX Item "-m32r2"
  21290. Generate code for the M32R/2.
  21291. .IP "\fB\-m32rx\fR" 4
  21292. .IX Item "-m32rx"
  21293. Generate code for the M32R/X.
  21294. .IP "\fB\-m32r\fR" 4
  21295. .IX Item "-m32r"
  21296. Generate code for the M32R. This is the default.
  21297. .IP "\fB\-mmodel=small\fR" 4
  21298. .IX Item "-mmodel=small"
  21299. Assume all objects live in the lower 16MB of memory (so that their addresses
  21300. can be loaded with the \f(CW\*(C`ld24\*(C'\fR instruction), and assume all subroutines
  21301. are reachable with the \f(CW\*(C`bl\*(C'\fR instruction.
  21302. This is the default.
  21303. .Sp
  21304. The addressability of a particular object can be set with the
  21305. \&\f(CW\*(C`model\*(C'\fR attribute.
  21306. .IP "\fB\-mmodel=medium\fR" 4
  21307. .IX Item "-mmodel=medium"
  21308. Assume objects may be anywhere in the 32\-bit address space (the compiler
  21309. generates \f(CW\*(C`seth/add3\*(C'\fR instructions to load their addresses), and
  21310. assume all subroutines are reachable with the \f(CW\*(C`bl\*(C'\fR instruction.
  21311. .IP "\fB\-mmodel=large\fR" 4
  21312. .IX Item "-mmodel=large"
  21313. Assume objects may be anywhere in the 32\-bit address space (the compiler
  21314. generates \f(CW\*(C`seth/add3\*(C'\fR instructions to load their addresses), and
  21315. assume subroutines may not be reachable with the \f(CW\*(C`bl\*(C'\fR instruction
  21316. (the compiler generates the much slower \f(CW\*(C`seth/add3/jl\*(C'\fR
  21317. instruction sequence).
  21318. .IP "\fB\-msdata=none\fR" 4
  21319. .IX Item "-msdata=none"
  21320. Disable use of the small data area. Variables are put into
  21321. one of \f(CW\*(C`.data\*(C'\fR, \f(CW\*(C`.bss\*(C'\fR, or \f(CW\*(C`.rodata\*(C'\fR (unless the
  21322. \&\f(CW\*(C`section\*(C'\fR attribute has been specified).
  21323. This is the default.
  21324. .Sp
  21325. The small data area consists of sections \f(CW\*(C`.sdata\*(C'\fR and \f(CW\*(C`.sbss\*(C'\fR.
  21326. Objects may be explicitly put in the small data area with the
  21327. \&\f(CW\*(C`section\*(C'\fR attribute using one of these sections.
  21328. .IP "\fB\-msdata=sdata\fR" 4
  21329. .IX Item "-msdata=sdata"
  21330. Put small global and static data in the small data area, but do not
  21331. generate special code to reference them.
  21332. .IP "\fB\-msdata=use\fR" 4
  21333. .IX Item "-msdata=use"
  21334. Put small global and static data in the small data area, and generate
  21335. special instructions to reference them.
  21336. .IP "\fB\-G\fR \fInum\fR" 4
  21337. .IX Item "-G num"
  21338. Put global and static objects less than or equal to \fInum\fR bytes
  21339. into the small data or \s-1BSS\s0 sections instead of the normal data or \s-1BSS\s0
  21340. sections. The default value of \fInum\fR is 8.
  21341. The \fB\-msdata\fR option must be set to one of \fBsdata\fR or \fBuse\fR
  21342. for this option to have any effect.
  21343. .Sp
  21344. All modules should be compiled with the same \fB\-G\fR \fInum\fR value.
  21345. Compiling with different values of \fInum\fR may or may not work; if it
  21346. doesn't the linker gives an error message\-\-\-incorrect code is not
  21347. generated.
  21348. .IP "\fB\-mdebug\fR" 4
  21349. .IX Item "-mdebug"
  21350. Makes the M32R\-specific code in the compiler display some statistics
  21351. that might help in debugging programs.
  21352. .IP "\fB\-malign\-loops\fR" 4
  21353. .IX Item "-malign-loops"
  21354. Align all loops to a 32\-byte boundary.
  21355. .IP "\fB\-mno\-align\-loops\fR" 4
  21356. .IX Item "-mno-align-loops"
  21357. Do not enforce a 32\-byte alignment for loops. This is the default.
  21358. .IP "\fB\-missue\-rate=\fR\fInumber\fR" 4
  21359. .IX Item "-missue-rate=number"
  21360. Issue \fInumber\fR instructions per cycle. \fInumber\fR can only be 1
  21361. or 2.
  21362. .IP "\fB\-mbranch\-cost=\fR\fInumber\fR" 4
  21363. .IX Item "-mbranch-cost=number"
  21364. \&\fInumber\fR can only be 1 or 2. If it is 1 then branches are
  21365. preferred over conditional code, if it is 2, then the opposite applies.
  21366. .IP "\fB\-mflush\-trap=\fR\fInumber\fR" 4
  21367. .IX Item "-mflush-trap=number"
  21368. Specifies the trap number to use to flush the cache. The default is
  21369. 12. Valid numbers are between 0 and 15 inclusive.
  21370. .IP "\fB\-mno\-flush\-trap\fR" 4
  21371. .IX Item "-mno-flush-trap"
  21372. Specifies that the cache cannot be flushed by using a trap.
  21373. .IP "\fB\-mflush\-func=\fR\fIname\fR" 4
  21374. .IX Item "-mflush-func=name"
  21375. Specifies the name of the operating system function to call to flush
  21376. the cache. The default is \fB_flush_cache\fR, but a function call
  21377. is only used if a trap is not available.
  21378. .IP "\fB\-mno\-flush\-func\fR" 4
  21379. .IX Item "-mno-flush-func"
  21380. Indicates that there is no \s-1OS\s0 function for flushing the cache.
  21381. .PP
  21382. \fIM680x0 Options\fR
  21383. .IX Subsection "M680x0 Options"
  21384. .PP
  21385. These are the \fB\-m\fR options defined for M680x0 and ColdFire processors.
  21386. The default settings depend on which architecture was selected when
  21387. the compiler was configured; the defaults for the most common choices
  21388. are given below.
  21389. .IP "\fB\-march=\fR\fIarch\fR" 4
  21390. .IX Item "-march=arch"
  21391. Generate code for a specific M680x0 or ColdFire instruction set
  21392. architecture. Permissible values of \fIarch\fR for M680x0
  21393. architectures are: \fB68000\fR, \fB68010\fR, \fB68020\fR,
  21394. \&\fB68030\fR, \fB68040\fR, \fB68060\fR and \fBcpu32\fR. ColdFire
  21395. architectures are selected according to Freescale's \s-1ISA\s0 classification
  21396. and the permissible values are: \fBisaa\fR, \fBisaaplus\fR,
  21397. \&\fBisab\fR and \fBisac\fR.
  21398. .Sp
  21399. \&\s-1GCC\s0 defines a macro \f(CW\*(C`_\|_mcf\f(CIarch\f(CW_\|_\*(C'\fR whenever it is generating
  21400. code for a ColdFire target. The \fIarch\fR in this macro is one of the
  21401. \&\fB\-march\fR arguments given above.
  21402. .Sp
  21403. When used together, \fB\-march\fR and \fB\-mtune\fR select code
  21404. that runs on a family of similar processors but that is optimized
  21405. for a particular microarchitecture.
  21406. .IP "\fB\-mcpu=\fR\fIcpu\fR" 4
  21407. .IX Item "-mcpu=cpu"
  21408. Generate code for a specific M680x0 or ColdFire processor.
  21409. The M680x0 \fIcpu\fRs are: \fB68000\fR, \fB68010\fR, \fB68020\fR,
  21410. \&\fB68030\fR, \fB68040\fR, \fB68060\fR, \fB68302\fR, \fB68332\fR
  21411. and \fBcpu32\fR. The ColdFire \fIcpu\fRs are given by the table
  21412. below, which also classifies the CPUs into families:
  21413. .RS 4
  21414. .IP "Family : \fB\-mcpu\fR arguments" 4
  21415. .IX Item "Family : -mcpu arguments"
  21416. .PD 0
  21417. .IP "\fB51\fR : \fB51\fR \fB51ac\fR \fB51ag\fR \fB51cn\fR \fB51em\fR \fB51je\fR \fB51jf\fR \fB51jg\fR \fB51jm\fR \fB51mm\fR \fB51qe\fR \fB51qm\fR" 4
  21418. .IX Item "51 : 51 51ac 51ag 51cn 51em 51je 51jf 51jg 51jm 51mm 51qe 51qm"
  21419. .IP "\fB5206\fR : \fB5202\fR \fB5204\fR \fB5206\fR" 4
  21420. .IX Item "5206 : 5202 5204 5206"
  21421. .IP "\fB5206e\fR : \fB5206e\fR" 4
  21422. .IX Item "5206e : 5206e"
  21423. .IP "\fB5208\fR : \fB5207\fR \fB5208\fR" 4
  21424. .IX Item "5208 : 5207 5208"
  21425. .IP "\fB5211a\fR : \fB5210a\fR \fB5211a\fR" 4
  21426. .IX Item "5211a : 5210a 5211a"
  21427. .IP "\fB5213\fR : \fB5211\fR \fB5212\fR \fB5213\fR" 4
  21428. .IX Item "5213 : 5211 5212 5213"
  21429. .IP "\fB5216\fR : \fB5214\fR \fB5216\fR" 4
  21430. .IX Item "5216 : 5214 5216"
  21431. .IP "\fB52235\fR : \fB52230\fR \fB52231\fR \fB52232\fR \fB52233\fR \fB52234\fR \fB52235\fR" 4
  21432. .IX Item "52235 : 52230 52231 52232 52233 52234 52235"
  21433. .IP "\fB5225\fR : \fB5224\fR \fB5225\fR" 4
  21434. .IX Item "5225 : 5224 5225"
  21435. .IP "\fB52259\fR : \fB52252\fR \fB52254\fR \fB52255\fR \fB52256\fR \fB52258\fR \fB52259\fR" 4
  21436. .IX Item "52259 : 52252 52254 52255 52256 52258 52259"
  21437. .IP "\fB5235\fR : \fB5232\fR \fB5233\fR \fB5234\fR \fB5235\fR \fB523x\fR" 4
  21438. .IX Item "5235 : 5232 5233 5234 5235 523x"
  21439. .IP "\fB5249\fR : \fB5249\fR" 4
  21440. .IX Item "5249 : 5249"
  21441. .IP "\fB5250\fR : \fB5250\fR" 4
  21442. .IX Item "5250 : 5250"
  21443. .IP "\fB5271\fR : \fB5270\fR \fB5271\fR" 4
  21444. .IX Item "5271 : 5270 5271"
  21445. .IP "\fB5272\fR : \fB5272\fR" 4
  21446. .IX Item "5272 : 5272"
  21447. .IP "\fB5275\fR : \fB5274\fR \fB5275\fR" 4
  21448. .IX Item "5275 : 5274 5275"
  21449. .IP "\fB5282\fR : \fB5280\fR \fB5281\fR \fB5282\fR \fB528x\fR" 4
  21450. .IX Item "5282 : 5280 5281 5282 528x"
  21451. .IP "\fB53017\fR : \fB53011\fR \fB53012\fR \fB53013\fR \fB53014\fR \fB53015\fR \fB53016\fR \fB53017\fR" 4
  21452. .IX Item "53017 : 53011 53012 53013 53014 53015 53016 53017"
  21453. .IP "\fB5307\fR : \fB5307\fR" 4
  21454. .IX Item "5307 : 5307"
  21455. .IP "\fB5329\fR : \fB5327\fR \fB5328\fR \fB5329\fR \fB532x\fR" 4
  21456. .IX Item "5329 : 5327 5328 5329 532x"
  21457. .IP "\fB5373\fR : \fB5372\fR \fB5373\fR \fB537x\fR" 4
  21458. .IX Item "5373 : 5372 5373 537x"
  21459. .IP "\fB5407\fR : \fB5407\fR" 4
  21460. .IX Item "5407 : 5407"
  21461. .IP "\fB5475\fR : \fB5470\fR \fB5471\fR \fB5472\fR \fB5473\fR \fB5474\fR \fB5475\fR \fB547x\fR \fB5480\fR \fB5481\fR \fB5482\fR \fB5483\fR \fB5484\fR \fB5485\fR" 4
  21462. .IX Item "5475 : 5470 5471 5472 5473 5474 5475 547x 5480 5481 5482 5483 5484 5485"
  21463. .RE
  21464. .RS 4
  21465. .PD
  21466. .Sp
  21467. \&\fB\-mcpu=\fR\fIcpu\fR overrides \fB\-march=\fR\fIarch\fR if
  21468. \&\fIarch\fR is compatible with \fIcpu\fR. Other combinations of
  21469. \&\fB\-mcpu\fR and \fB\-march\fR are rejected.
  21470. .Sp
  21471. \&\s-1GCC\s0 defines the macro \f(CW\*(C`_\|_mcf_cpu_\f(CIcpu\f(CW\*(C'\fR when ColdFire target
  21472. \&\fIcpu\fR is selected. It also defines \f(CW\*(C`_\|_mcf_family_\f(CIfamily\f(CW\*(C'\fR,
  21473. where the value of \fIfamily\fR is given by the table above.
  21474. .RE
  21475. .IP "\fB\-mtune=\fR\fItune\fR" 4
  21476. .IX Item "-mtune=tune"
  21477. Tune the code for a particular microarchitecture within the
  21478. constraints set by \fB\-march\fR and \fB\-mcpu\fR.
  21479. The M680x0 microarchitectures are: \fB68000\fR, \fB68010\fR,
  21480. \&\fB68020\fR, \fB68030\fR, \fB68040\fR, \fB68060\fR
  21481. and \fBcpu32\fR. The ColdFire microarchitectures
  21482. are: \fBcfv1\fR, \fBcfv2\fR, \fBcfv3\fR, \fBcfv4\fR and \fBcfv4e\fR.
  21483. .Sp
  21484. You can also use \fB\-mtune=68020\-40\fR for code that needs
  21485. to run relatively well on 68020, 68030 and 68040 targets.
  21486. \&\fB\-mtune=68020\-60\fR is similar but includes 68060 targets
  21487. as well. These two options select the same tuning decisions as
  21488. \&\fB\-m68020\-40\fR and \fB\-m68020\-60\fR respectively.
  21489. .Sp
  21490. \&\s-1GCC\s0 defines the macros \f(CW\*(C`_\|_mc\f(CIarch\f(CW\*(C'\fR and \f(CW\*(C`_\|_mc\f(CIarch\f(CW_\|_\*(C'\fR
  21491. when tuning for 680x0 architecture \fIarch\fR. It also defines
  21492. \&\f(CW\*(C`mc\f(CIarch\f(CW\*(C'\fR unless either \fB\-ansi\fR or a non-GNU \fB\-std\fR
  21493. option is used. If \s-1GCC\s0 is tuning for a range of architectures,
  21494. as selected by \fB\-mtune=68020\-40\fR or \fB\-mtune=68020\-60\fR,
  21495. it defines the macros for every architecture in the range.
  21496. .Sp
  21497. \&\s-1GCC\s0 also defines the macro \f(CW\*(C`_\|_m\f(CIuarch\f(CW_\|_\*(C'\fR when tuning for
  21498. ColdFire microarchitecture \fIuarch\fR, where \fIuarch\fR is one
  21499. of the arguments given above.
  21500. .IP "\fB\-m68000\fR" 4
  21501. .IX Item "-m68000"
  21502. .PD 0
  21503. .IP "\fB\-mc68000\fR" 4
  21504. .IX Item "-mc68000"
  21505. .PD
  21506. Generate output for a 68000. This is the default
  21507. when the compiler is configured for 68000\-based systems.
  21508. It is equivalent to \fB\-march=68000\fR.
  21509. .Sp
  21510. Use this option for microcontrollers with a 68000 or \s-1EC000\s0 core,
  21511. including the 68008, 68302, 68306, 68307, 68322, 68328 and 68356.
  21512. .IP "\fB\-m68010\fR" 4
  21513. .IX Item "-m68010"
  21514. Generate output for a 68010. This is the default
  21515. when the compiler is configured for 68010\-based systems.
  21516. It is equivalent to \fB\-march=68010\fR.
  21517. .IP "\fB\-m68020\fR" 4
  21518. .IX Item "-m68020"
  21519. .PD 0
  21520. .IP "\fB\-mc68020\fR" 4
  21521. .IX Item "-mc68020"
  21522. .PD
  21523. Generate output for a 68020. This is the default
  21524. when the compiler is configured for 68020\-based systems.
  21525. It is equivalent to \fB\-march=68020\fR.
  21526. .IP "\fB\-m68030\fR" 4
  21527. .IX Item "-m68030"
  21528. Generate output for a 68030. This is the default when the compiler is
  21529. configured for 68030\-based systems. It is equivalent to
  21530. \&\fB\-march=68030\fR.
  21531. .IP "\fB\-m68040\fR" 4
  21532. .IX Item "-m68040"
  21533. Generate output for a 68040. This is the default when the compiler is
  21534. configured for 68040\-based systems. It is equivalent to
  21535. \&\fB\-march=68040\fR.
  21536. .Sp
  21537. This option inhibits the use of 68881/68882 instructions that have to be
  21538. emulated by software on the 68040. Use this option if your 68040 does not
  21539. have code to emulate those instructions.
  21540. .IP "\fB\-m68060\fR" 4
  21541. .IX Item "-m68060"
  21542. Generate output for a 68060. This is the default when the compiler is
  21543. configured for 68060\-based systems. It is equivalent to
  21544. \&\fB\-march=68060\fR.
  21545. .Sp
  21546. This option inhibits the use of 68020 and 68881/68882 instructions that
  21547. have to be emulated by software on the 68060. Use this option if your 68060
  21548. does not have code to emulate those instructions.
  21549. .IP "\fB\-mcpu32\fR" 4
  21550. .IX Item "-mcpu32"
  21551. Generate output for a \s-1CPU32. \s0 This is the default
  21552. when the compiler is configured for CPU32\-based systems.
  21553. It is equivalent to \fB\-march=cpu32\fR.
  21554. .Sp
  21555. Use this option for microcontrollers with a
  21556. \&\s-1CPU32\s0 or \s-1CPU32+\s0 core, including the 68330, 68331, 68332, 68333, 68334,
  21557. 68336, 68340, 68341, 68349 and 68360.
  21558. .IP "\fB\-m5200\fR" 4
  21559. .IX Item "-m5200"
  21560. Generate output for a 520X ColdFire \s-1CPU. \s0 This is the default
  21561. when the compiler is configured for 520X\-based systems.
  21562. It is equivalent to \fB\-mcpu=5206\fR, and is now deprecated
  21563. in favor of that option.
  21564. .Sp
  21565. Use this option for microcontroller with a 5200 core, including
  21566. the \s-1MCF5202, MCF5203, MCF5204\s0 and \s-1MCF5206.\s0
  21567. .IP "\fB\-m5206e\fR" 4
  21568. .IX Item "-m5206e"
  21569. Generate output for a 5206e ColdFire \s-1CPU. \s0 The option is now
  21570. deprecated in favor of the equivalent \fB\-mcpu=5206e\fR.
  21571. .IP "\fB\-m528x\fR" 4
  21572. .IX Item "-m528x"
  21573. Generate output for a member of the ColdFire 528X family.
  21574. The option is now deprecated in favor of the equivalent
  21575. \&\fB\-mcpu=528x\fR.
  21576. .IP "\fB\-m5307\fR" 4
  21577. .IX Item "-m5307"
  21578. Generate output for a ColdFire 5307 \s-1CPU. \s0 The option is now deprecated
  21579. in favor of the equivalent \fB\-mcpu=5307\fR.
  21580. .IP "\fB\-m5407\fR" 4
  21581. .IX Item "-m5407"
  21582. Generate output for a ColdFire 5407 \s-1CPU. \s0 The option is now deprecated
  21583. in favor of the equivalent \fB\-mcpu=5407\fR.
  21584. .IP "\fB\-mcfv4e\fR" 4
  21585. .IX Item "-mcfv4e"
  21586. Generate output for a ColdFire V4e family \s-1CPU \s0(e.g. 547x/548x).
  21587. This includes use of hardware floating-point instructions.
  21588. The option is equivalent to \fB\-mcpu=547x\fR, and is now
  21589. deprecated in favor of that option.
  21590. .IP "\fB\-m68020\-40\fR" 4
  21591. .IX Item "-m68020-40"
  21592. Generate output for a 68040, without using any of the new instructions.
  21593. This results in code that can run relatively efficiently on either a
  21594. 68020/68881 or a 68030 or a 68040. The generated code does use the
  21595. 68881 instructions that are emulated on the 68040.
  21596. .Sp
  21597. The option is equivalent to \fB\-march=68020\fR \fB\-mtune=68020\-40\fR.
  21598. .IP "\fB\-m68020\-60\fR" 4
  21599. .IX Item "-m68020-60"
  21600. Generate output for a 68060, without using any of the new instructions.
  21601. This results in code that can run relatively efficiently on either a
  21602. 68020/68881 or a 68030 or a 68040. The generated code does use the
  21603. 68881 instructions that are emulated on the 68060.
  21604. .Sp
  21605. The option is equivalent to \fB\-march=68020\fR \fB\-mtune=68020\-60\fR.
  21606. .IP "\fB\-mhard\-float\fR" 4
  21607. .IX Item "-mhard-float"
  21608. .PD 0
  21609. .IP "\fB\-m68881\fR" 4
  21610. .IX Item "-m68881"
  21611. .PD
  21612. Generate floating-point instructions. This is the default for 68020
  21613. and above, and for ColdFire devices that have an \s-1FPU. \s0 It defines the
  21614. macro \f(CW\*(C`_\|_HAVE_68881_\|_\*(C'\fR on M680x0 targets and \f(CW\*(C`_\|_mcffpu_\|_\*(C'\fR
  21615. on ColdFire targets.
  21616. .IP "\fB\-msoft\-float\fR" 4
  21617. .IX Item "-msoft-float"
  21618. Do not generate floating-point instructions; use library calls instead.
  21619. This is the default for 68000, 68010, and 68832 targets. It is also
  21620. the default for ColdFire devices that have no \s-1FPU.\s0
  21621. .IP "\fB\-mdiv\fR" 4
  21622. .IX Item "-mdiv"
  21623. .PD 0
  21624. .IP "\fB\-mno\-div\fR" 4
  21625. .IX Item "-mno-div"
  21626. .PD
  21627. Generate (do not generate) ColdFire hardware divide and remainder
  21628. instructions. If \fB\-march\fR is used without \fB\-mcpu\fR,
  21629. the default is \*(L"on\*(R" for ColdFire architectures and \*(L"off\*(R" for M680x0
  21630. architectures. Otherwise, the default is taken from the target \s-1CPU
  21631. \&\s0(either the default \s-1CPU,\s0 or the one specified by \fB\-mcpu\fR). For
  21632. example, the default is \*(L"off\*(R" for \fB\-mcpu=5206\fR and \*(L"on\*(R" for
  21633. \&\fB\-mcpu=5206e\fR.
  21634. .Sp
  21635. \&\s-1GCC\s0 defines the macro \f(CW\*(C`_\|_mcfhwdiv_\|_\*(C'\fR when this option is enabled.
  21636. .IP "\fB\-mshort\fR" 4
  21637. .IX Item "-mshort"
  21638. Consider type \f(CW\*(C`int\*(C'\fR to be 16 bits wide, like \f(CW\*(C`short int\*(C'\fR.
  21639. Additionally, parameters passed on the stack are also aligned to a
  21640. 16\-bit boundary even on targets whose \s-1API\s0 mandates promotion to 32\-bit.
  21641. .IP "\fB\-mno\-short\fR" 4
  21642. .IX Item "-mno-short"
  21643. Do not consider type \f(CW\*(C`int\*(C'\fR to be 16 bits wide. This is the default.
  21644. .IP "\fB\-mnobitfield\fR" 4
  21645. .IX Item "-mnobitfield"
  21646. .PD 0
  21647. .IP "\fB\-mno\-bitfield\fR" 4
  21648. .IX Item "-mno-bitfield"
  21649. .PD
  21650. Do not use the bit-field instructions. The \fB\-m68000\fR, \fB\-mcpu32\fR
  21651. and \fB\-m5200\fR options imply \fB\-mnobitfield\fR.
  21652. .IP "\fB\-mbitfield\fR" 4
  21653. .IX Item "-mbitfield"
  21654. Do use the bit-field instructions. The \fB\-m68020\fR option implies
  21655. \&\fB\-mbitfield\fR. This is the default if you use a configuration
  21656. designed for a 68020.
  21657. .IP "\fB\-mrtd\fR" 4
  21658. .IX Item "-mrtd"
  21659. Use a different function-calling convention, in which functions
  21660. that take a fixed number of arguments return with the \f(CW\*(C`rtd\*(C'\fR
  21661. instruction, which pops their arguments while returning. This
  21662. saves one instruction in the caller since there is no need to pop
  21663. the arguments there.
  21664. .Sp
  21665. This calling convention is incompatible with the one normally
  21666. used on Unix, so you cannot use it if you need to call libraries
  21667. compiled with the Unix compiler.
  21668. .Sp
  21669. Also, you must provide function prototypes for all functions that
  21670. take variable numbers of arguments (including \f(CW\*(C`printf\*(C'\fR);
  21671. otherwise incorrect code is generated for calls to those
  21672. functions.
  21673. .Sp
  21674. In addition, seriously incorrect code results if you call a
  21675. function with too many arguments. (Normally, extra arguments are
  21676. harmlessly ignored.)
  21677. .Sp
  21678. The \f(CW\*(C`rtd\*(C'\fR instruction is supported by the 68010, 68020, 68030,
  21679. 68040, 68060 and \s-1CPU32\s0 processors, but not by the 68000 or 5200.
  21680. .Sp
  21681. The default is \fB\-mno\-rtd\fR.
  21682. .IP "\fB\-malign\-int\fR" 4
  21683. .IX Item "-malign-int"
  21684. .PD 0
  21685. .IP "\fB\-mno\-align\-int\fR" 4
  21686. .IX Item "-mno-align-int"
  21687. .PD
  21688. Control whether \s-1GCC\s0 aligns \f(CW\*(C`int\*(C'\fR, \f(CW\*(C`long\*(C'\fR, \f(CW\*(C`long long\*(C'\fR,
  21689. \&\f(CW\*(C`float\*(C'\fR, \f(CW\*(C`double\*(C'\fR, and \f(CW\*(C`long double\*(C'\fR variables on a 32\-bit
  21690. boundary (\fB\-malign\-int\fR) or a 16\-bit boundary (\fB\-mno\-align\-int\fR).
  21691. Aligning variables on 32\-bit boundaries produces code that runs somewhat
  21692. faster on processors with 32\-bit busses at the expense of more memory.
  21693. .Sp
  21694. \&\fBWarning:\fR if you use the \fB\-malign\-int\fR switch, \s-1GCC\s0
  21695. aligns structures containing the above types differently than
  21696. most published application binary interface specifications for the m68k.
  21697. .Sp
  21698. Use the pc-relative addressing mode of the 68000 directly, instead of
  21699. using a global offset table. At present, this option implies \fB\-fpic\fR,
  21700. allowing at most a 16\-bit offset for pc-relative addressing. \fB\-fPIC\fR is
  21701. not presently supported with \fB\-mpcrel\fR, though this could be supported for
  21702. 68020 and higher processors.
  21703. .IP "\fB\-mno\-strict\-align\fR" 4
  21704. .IX Item "-mno-strict-align"
  21705. .PD 0
  21706. .IP "\fB\-mstrict\-align\fR" 4
  21707. .IX Item "-mstrict-align"
  21708. .PD
  21709. Do not (do) assume that unaligned memory references are handled by
  21710. the system.
  21711. .IP "\fB\-msep\-data\fR" 4
  21712. .IX Item "-msep-data"
  21713. Generate code that allows the data segment to be located in a different
  21714. area of memory from the text segment. This allows for execute-in-place in
  21715. an environment without virtual memory management. This option implies
  21716. \&\fB\-fPIC\fR.
  21717. .IP "\fB\-mno\-sep\-data\fR" 4
  21718. .IX Item "-mno-sep-data"
  21719. Generate code that assumes that the data segment follows the text segment.
  21720. This is the default.
  21721. .IP "\fB\-mid\-shared\-library\fR" 4
  21722. .IX Item "-mid-shared-library"
  21723. Generate code that supports shared libraries via the library \s-1ID\s0 method.
  21724. This allows for execute-in-place and shared libraries in an environment
  21725. without virtual memory management. This option implies \fB\-fPIC\fR.
  21726. .IP "\fB\-mno\-id\-shared\-library\fR" 4
  21727. .IX Item "-mno-id-shared-library"
  21728. Generate code that doesn't assume ID-based shared libraries are being used.
  21729. This is the default.
  21730. .IP "\fB\-mshared\-library\-id=n\fR" 4
  21731. .IX Item "-mshared-library-id=n"
  21732. Specifies the identification number of the ID-based shared library being
  21733. compiled. Specifying a value of 0 generates more compact code; specifying
  21734. other values forces the allocation of that number to the current
  21735. library, but is no more space\- or time-efficient than omitting this option.
  21736. .IP "\fB\-mxgot\fR" 4
  21737. .IX Item "-mxgot"
  21738. .PD 0
  21739. .IP "\fB\-mno\-xgot\fR" 4
  21740. .IX Item "-mno-xgot"
  21741. .PD
  21742. When generating position-independent code for ColdFire, generate code
  21743. that works if the \s-1GOT\s0 has more than 8192 entries. This code is
  21744. larger and slower than code generated without this option. On M680x0
  21745. processors, this option is not needed; \fB\-fPIC\fR suffices.
  21746. .Sp
  21747. \&\s-1GCC\s0 normally uses a single instruction to load values from the \s-1GOT.\s0
  21748. While this is relatively efficient, it only works if the \s-1GOT\s0
  21749. is smaller than about 64k. Anything larger causes the linker
  21750. to report an error such as:
  21751. .Sp
  21752. .Vb 1
  21753. \& relocation truncated to fit: R_68K_GOT16O foobar
  21754. .Ve
  21755. .Sp
  21756. If this happens, you should recompile your code with \fB\-mxgot\fR.
  21757. It should then work with very large GOTs. However, code generated with
  21758. \&\fB\-mxgot\fR is less efficient, since it takes 4 instructions to fetch
  21759. the value of a global symbol.
  21760. .Sp
  21761. Note that some linkers, including newer versions of the \s-1GNU\s0 linker,
  21762. can create multiple GOTs and sort \s-1GOT\s0 entries. If you have such a linker,
  21763. you should only need to use \fB\-mxgot\fR when compiling a single
  21764. object file that accesses more than 8192 \s-1GOT\s0 entries. Very few do.
  21765. .Sp
  21766. These options have no effect unless \s-1GCC\s0 is generating
  21767. position-independent code.
  21768. .IP "\fB\-mlong\-jump\-table\-offsets\fR" 4
  21769. .IX Item "-mlong-jump-table-offsets"
  21770. Use 32\-bit offsets in \f(CW\*(C`switch\*(C'\fR tables. The default is to use
  21771. 16\-bit offsets.
  21772. .PP
  21773. \fIMCore Options\fR
  21774. .IX Subsection "MCore Options"
  21775. .PP
  21776. These are the \fB\-m\fR options defined for the Motorola M*Core
  21777. processors.
  21778. .IP "\fB\-mhardlit\fR" 4
  21779. .IX Item "-mhardlit"
  21780. .PD 0
  21781. .IP "\fB\-mno\-hardlit\fR" 4
  21782. .IX Item "-mno-hardlit"
  21783. .PD
  21784. Inline constants into the code stream if it can be done in two
  21785. instructions or less.
  21786. .IP "\fB\-mdiv\fR" 4
  21787. .IX Item "-mdiv"
  21788. .PD 0
  21789. .IP "\fB\-mno\-div\fR" 4
  21790. .IX Item "-mno-div"
  21791. .PD
  21792. Use the divide instruction. (Enabled by default).
  21793. .IP "\fB\-mrelax\-immediate\fR" 4
  21794. .IX Item "-mrelax-immediate"
  21795. .PD 0
  21796. .IP "\fB\-mno\-relax\-immediate\fR" 4
  21797. .IX Item "-mno-relax-immediate"
  21798. .PD
  21799. Allow arbitrary-sized immediates in bit operations.
  21800. .IP "\fB\-mwide\-bitfields\fR" 4
  21801. .IX Item "-mwide-bitfields"
  21802. .PD 0
  21803. .IP "\fB\-mno\-wide\-bitfields\fR" 4
  21804. .IX Item "-mno-wide-bitfields"
  21805. .PD
  21806. Always treat bit-fields as \f(CW\*(C`int\*(C'\fR\-sized.
  21807. .IP "\fB\-m4byte\-functions\fR" 4
  21808. .IX Item "-m4byte-functions"
  21809. .PD 0
  21810. .IP "\fB\-mno\-4byte\-functions\fR" 4
  21811. .IX Item "-mno-4byte-functions"
  21812. .PD
  21813. Force all functions to be aligned to a 4\-byte boundary.
  21814. .IP "\fB\-mcallgraph\-data\fR" 4
  21815. .IX Item "-mcallgraph-data"
  21816. .PD 0
  21817. .IP "\fB\-mno\-callgraph\-data\fR" 4
  21818. .IX Item "-mno-callgraph-data"
  21819. .PD
  21820. Emit callgraph information.
  21821. .IP "\fB\-mslow\-bytes\fR" 4
  21822. .IX Item "-mslow-bytes"
  21823. .PD 0
  21824. .IP "\fB\-mno\-slow\-bytes\fR" 4
  21825. .IX Item "-mno-slow-bytes"
  21826. .PD
  21827. Prefer word access when reading byte quantities.
  21828. .IP "\fB\-mlittle\-endian\fR" 4
  21829. .IX Item "-mlittle-endian"
  21830. .PD 0
  21831. .IP "\fB\-mbig\-endian\fR" 4
  21832. .IX Item "-mbig-endian"
  21833. .PD
  21834. Generate code for a little-endian target.
  21835. .IP "\fB\-m210\fR" 4
  21836. .IX Item "-m210"
  21837. .PD 0
  21838. .IP "\fB\-m340\fR" 4
  21839. .IX Item "-m340"
  21840. .PD
  21841. Generate code for the 210 processor.
  21842. .IP "\fB\-mno\-lsim\fR" 4
  21843. .IX Item "-mno-lsim"
  21844. Assume that runtime support has been provided and so omit the
  21845. simulator library (\fIlibsim.a)\fR from the linker command line.
  21846. .IP "\fB\-mstack\-increment=\fR\fIsize\fR" 4
  21847. .IX Item "-mstack-increment=size"
  21848. Set the maximum amount for a single stack increment operation. Large
  21849. values can increase the speed of programs that contain functions
  21850. that need a large amount of stack space, but they can also trigger a
  21851. segmentation fault if the stack is extended too much. The default
  21852. value is 0x1000.
  21853. .PP
  21854. \fIMeP Options\fR
  21855. .IX Subsection "MeP Options"
  21856. .IP "\fB\-mabsdiff\fR" 4
  21857. .IX Item "-mabsdiff"
  21858. Enables the \f(CW\*(C`abs\*(C'\fR instruction, which is the absolute difference
  21859. between two registers.
  21860. .IP "\fB\-mall\-opts\fR" 4
  21861. .IX Item "-mall-opts"
  21862. Enables all the optional instructions\-\-\-average, multiply, divide, bit
  21863. operations, leading zero, absolute difference, min/max, clip, and
  21864. saturation.
  21865. .IP "\fB\-maverage\fR" 4
  21866. .IX Item "-maverage"
  21867. Enables the \f(CW\*(C`ave\*(C'\fR instruction, which computes the average of two
  21868. registers.
  21869. .IP "\fB\-mbased=\fR\fIn\fR" 4
  21870. .IX Item "-mbased=n"
  21871. Variables of size \fIn\fR bytes or smaller are placed in the
  21872. \&\f(CW\*(C`.based\*(C'\fR section by default. Based variables use the \f(CW$tp\fR
  21873. register as a base register, and there is a 128\-byte limit to the
  21874. \&\f(CW\*(C`.based\*(C'\fR section.
  21875. .IP "\fB\-mbitops\fR" 4
  21876. .IX Item "-mbitops"
  21877. Enables the bit operation instructions\-\-\-bit test (\f(CW\*(C`btstm\*(C'\fR), set
  21878. (\f(CW\*(C`bsetm\*(C'\fR), clear (\f(CW\*(C`bclrm\*(C'\fR), invert (\f(CW\*(C`bnotm\*(C'\fR), and
  21879. test-and-set (\f(CW\*(C`tas\*(C'\fR).
  21880. .IP "\fB\-mc=\fR\fIname\fR" 4
  21881. .IX Item "-mc=name"
  21882. Selects which section constant data is placed in. \fIname\fR may
  21883. be \fBtiny\fR, \fBnear\fR, or \fBfar\fR.
  21884. .IP "\fB\-mclip\fR" 4
  21885. .IX Item "-mclip"
  21886. Enables the \f(CW\*(C`clip\*(C'\fR instruction. Note that \fB\-mclip\fR is not
  21887. useful unless you also provide \fB\-mminmax\fR.
  21888. .IP "\fB\-mconfig=\fR\fIname\fR" 4
  21889. .IX Item "-mconfig=name"
  21890. Selects one of the built-in core configurations. Each MeP chip has
  21891. one or more modules in it; each module has a core \s-1CPU\s0 and a variety of
  21892. coprocessors, optional instructions, and peripherals. The
  21893. \&\f(CW\*(C`MeP\-Integrator\*(C'\fR tool, not part of \s-1GCC,\s0 provides these
  21894. configurations through this option; using this option is the same as
  21895. using all the corresponding command-line options. The default
  21896. configuration is \fBdefault\fR.
  21897. .IP "\fB\-mcop\fR" 4
  21898. .IX Item "-mcop"
  21899. Enables the coprocessor instructions. By default, this is a 32\-bit
  21900. coprocessor. Note that the coprocessor is normally enabled via the
  21901. \&\fB\-mconfig=\fR option.
  21902. .IP "\fB\-mcop32\fR" 4
  21903. .IX Item "-mcop32"
  21904. Enables the 32\-bit coprocessor's instructions.
  21905. .IP "\fB\-mcop64\fR" 4
  21906. .IX Item "-mcop64"
  21907. Enables the 64\-bit coprocessor's instructions.
  21908. .IP "\fB\-mivc2\fR" 4
  21909. .IX Item "-mivc2"
  21910. Enables \s-1IVC2\s0 scheduling. \s-1IVC2\s0 is a 64\-bit \s-1VLIW\s0 coprocessor.
  21911. .IP "\fB\-mdc\fR" 4
  21912. .IX Item "-mdc"
  21913. Causes constant variables to be placed in the \f(CW\*(C`.near\*(C'\fR section.
  21914. .IP "\fB\-mdiv\fR" 4
  21915. .IX Item "-mdiv"
  21916. Enables the \f(CW\*(C`div\*(C'\fR and \f(CW\*(C`divu\*(C'\fR instructions.
  21917. .IP "\fB\-meb\fR" 4
  21918. .IX Item "-meb"
  21919. Generate big-endian code.
  21920. .IP "\fB\-mel\fR" 4
  21921. .IX Item "-mel"
  21922. Generate little-endian code.
  21923. .IP "\fB\-mio\-volatile\fR" 4
  21924. .IX Item "-mio-volatile"
  21925. Tells the compiler that any variable marked with the \f(CW\*(C`io\*(C'\fR
  21926. attribute is to be considered volatile.
  21927. .IP "\fB\-ml\fR" 4
  21928. .IX Item "-ml"
  21929. Causes variables to be assigned to the \f(CW\*(C`.far\*(C'\fR section by default.
  21930. .IP "\fB\-mleadz\fR" 4
  21931. .IX Item "-mleadz"
  21932. Enables the \f(CW\*(C`leadz\*(C'\fR (leading zero) instruction.
  21933. .IP "\fB\-mm\fR" 4
  21934. .IX Item "-mm"
  21935. Causes variables to be assigned to the \f(CW\*(C`.near\*(C'\fR section by default.
  21936. .IP "\fB\-mminmax\fR" 4
  21937. .IX Item "-mminmax"
  21938. Enables the \f(CW\*(C`min\*(C'\fR and \f(CW\*(C`max\*(C'\fR instructions.
  21939. .IP "\fB\-mmult\fR" 4
  21940. .IX Item "-mmult"
  21941. Enables the multiplication and multiply-accumulate instructions.
  21942. .IP "\fB\-mno\-opts\fR" 4
  21943. .IX Item "-mno-opts"
  21944. Disables all the optional instructions enabled by \fB\-mall\-opts\fR.
  21945. .IP "\fB\-mrepeat\fR" 4
  21946. .IX Item "-mrepeat"
  21947. Enables the \f(CW\*(C`repeat\*(C'\fR and \f(CW\*(C`erepeat\*(C'\fR instructions, used for
  21948. low-overhead looping.
  21949. .IP "\fB\-ms\fR" 4
  21950. .IX Item "-ms"
  21951. Causes all variables to default to the \f(CW\*(C`.tiny\*(C'\fR section. Note
  21952. that there is a 65536\-byte limit to this section. Accesses to these
  21953. variables use the \f(CW%gp\fR base register.
  21954. .IP "\fB\-msatur\fR" 4
  21955. .IX Item "-msatur"
  21956. Enables the saturation instructions. Note that the compiler does not
  21957. currently generate these itself, but this option is included for
  21958. compatibility with other tools, like \f(CW\*(C`as\*(C'\fR.
  21959. .IP "\fB\-msdram\fR" 4
  21960. .IX Item "-msdram"
  21961. Link the SDRAM-based runtime instead of the default ROM-based runtime.
  21962. .IP "\fB\-msim\fR" 4
  21963. .IX Item "-msim"
  21964. Link the simulator run-time libraries.
  21965. .IP "\fB\-msimnovec\fR" 4
  21966. .IX Item "-msimnovec"
  21967. Link the simulator runtime libraries, excluding built-in support
  21968. for reset and exception vectors and tables.
  21969. .IP "\fB\-mtf\fR" 4
  21970. .IX Item "-mtf"
  21971. Causes all functions to default to the \f(CW\*(C`.far\*(C'\fR section. Without
  21972. this option, functions default to the \f(CW\*(C`.near\*(C'\fR section.
  21973. .IP "\fB\-mtiny=\fR\fIn\fR" 4
  21974. .IX Item "-mtiny=n"
  21975. Variables that are \fIn\fR bytes or smaller are allocated to the
  21976. \&\f(CW\*(C`.tiny\*(C'\fR section. These variables use the \f(CW$gp\fR base
  21977. register. The default for this option is 4, but note that there's a
  21978. 65536\-byte limit to the \f(CW\*(C`.tiny\*(C'\fR section.
  21979. .PP
  21980. \fIMicroBlaze Options\fR
  21981. .IX Subsection "MicroBlaze Options"
  21982. .IP "\fB\-msoft\-float\fR" 4
  21983. .IX Item "-msoft-float"
  21984. Use software emulation for floating point (default).
  21985. .IP "\fB\-mhard\-float\fR" 4
  21986. .IX Item "-mhard-float"
  21987. Use hardware floating-point instructions.
  21988. .IP "\fB\-mmemcpy\fR" 4
  21989. .IX Item "-mmemcpy"
  21990. Do not optimize block moves, use \f(CW\*(C`memcpy\*(C'\fR.
  21991. .IP "\fB\-mno\-clearbss\fR" 4
  21992. .IX Item "-mno-clearbss"
  21993. This option is deprecated. Use \fB\-fno\-zero\-initialized\-in\-bss\fR instead.
  21994. .IP "\fB\-mcpu=\fR\fIcpu-type\fR" 4
  21995. .IX Item "-mcpu=cpu-type"
  21996. Use features of, and schedule code for, the given \s-1CPU.\s0
  21997. Supported values are in the format \fBv\fR\fIX\fR\fB.\fR\fI\s-1YY\s0\fR\fB.\fR\fIZ\fR,
  21998. where \fIX\fR is a major version, \fI\s-1YY\s0\fR is the minor version, and
  21999. \&\fIZ\fR is compatibility code. Example values are \fBv3.00.a\fR,
  22000. \&\fBv4.00.b\fR, \fBv5.00.a\fR, \fBv5.00.b\fR, \fBv6.00.a\fR.
  22001. .IP "\fB\-mxl\-soft\-mul\fR" 4
  22002. .IX Item "-mxl-soft-mul"
  22003. Use software multiply emulation (default).
  22004. .IP "\fB\-mxl\-soft\-div\fR" 4
  22005. .IX Item "-mxl-soft-div"
  22006. Use software emulation for divides (default).
  22007. .IP "\fB\-mxl\-barrel\-shift\fR" 4
  22008. .IX Item "-mxl-barrel-shift"
  22009. Use the hardware barrel shifter.
  22010. .IP "\fB\-mxl\-pattern\-compare\fR" 4
  22011. .IX Item "-mxl-pattern-compare"
  22012. Use pattern compare instructions.
  22013. .IP "\fB\-msmall\-divides\fR" 4
  22014. .IX Item "-msmall-divides"
  22015. Use table lookup optimization for small signed integer divisions.
  22016. .IP "\fB\-mxl\-stack\-check\fR" 4
  22017. .IX Item "-mxl-stack-check"
  22018. This option is deprecated. Use \fB\-fstack\-check\fR instead.
  22019. .IP "\fB\-mxl\-gp\-opt\fR" 4
  22020. .IX Item "-mxl-gp-opt"
  22021. Use GP-relative \f(CW\*(C`.sdata\*(C'\fR/\f(CW\*(C`.sbss\*(C'\fR sections.
  22022. .IP "\fB\-mxl\-multiply\-high\fR" 4
  22023. .IX Item "-mxl-multiply-high"
  22024. Use multiply high instructions for high part of 32x32 multiply.
  22025. .IP "\fB\-mxl\-float\-convert\fR" 4
  22026. .IX Item "-mxl-float-convert"
  22027. Use hardware floating-point conversion instructions.
  22028. .IP "\fB\-mxl\-float\-sqrt\fR" 4
  22029. .IX Item "-mxl-float-sqrt"
  22030. Use hardware floating-point square root instruction.
  22031. .IP "\fB\-mbig\-endian\fR" 4
  22032. .IX Item "-mbig-endian"
  22033. Generate code for a big-endian target.
  22034. .IP "\fB\-mlittle\-endian\fR" 4
  22035. .IX Item "-mlittle-endian"
  22036. Generate code for a little-endian target.
  22037. .IP "\fB\-mxl\-reorder\fR" 4
  22038. .IX Item "-mxl-reorder"
  22039. Use reorder instructions (swap and byte reversed load/store).
  22040. .IP "\fB\-mxl\-mode\-\fR\fIapp-model\fR" 4
  22041. .IX Item "-mxl-mode-app-model"
  22042. Select application model \fIapp-model\fR. Valid models are
  22043. .RS 4
  22044. .IP "\fBexecutable\fR" 4
  22045. .IX Item "executable"
  22046. normal executable (default), uses startup code \fIcrt0.o\fR.
  22047. .IP "\fB\-mpic\-data\-is\-text\-relative\fR" 4
  22048. .IX Item "-mpic-data-is-text-relative"
  22049. Assume that the displacement between the text and data segments is fixed
  22050. at static link time. This allows data to be referenced by offset from start of
  22051. text address instead of \s-1GOT\s0 since PC-relative addressing is not supported.
  22052. .IP "\fBxmdstub\fR" 4
  22053. .IX Item "xmdstub"
  22054. for use with Xilinx Microprocessor Debugger (\s-1XMD\s0) based
  22055. software intrusive debug agent called xmdstub. This uses startup file
  22056. \&\fIcrt1.o\fR and sets the start address of the program to 0x800.
  22057. .IP "\fBbootstrap\fR" 4
  22058. .IX Item "bootstrap"
  22059. for applications that are loaded using a bootloader.
  22060. This model uses startup file \fIcrt2.o\fR which does not contain a processor
  22061. reset vector handler. This is suitable for transferring control on a
  22062. processor reset to the bootloader rather than the application.
  22063. .IP "\fBnovectors\fR" 4
  22064. .IX Item "novectors"
  22065. for applications that do not require any of the
  22066. MicroBlaze vectors. This option may be useful for applications running
  22067. within a monitoring application. This model uses \fIcrt3.o\fR as a startup file.
  22068. .RE
  22069. .RS 4
  22070. .Sp
  22071. Option \fB\-xl\-mode\-\fR\fIapp-model\fR is a deprecated alias for
  22072. \&\fB\-mxl\-mode\-\fR\fIapp-model\fR.
  22073. .RE
  22074. .PP
  22075. \fI\s-1MIPS\s0 Options\fR
  22076. .IX Subsection "MIPS Options"
  22077. .IP "\fB\-EB\fR" 4
  22078. .IX Item "-EB"
  22079. Generate big-endian code.
  22080. .IP "\fB\-EL\fR" 4
  22081. .IX Item "-EL"
  22082. Generate little-endian code. This is the default for \fBmips*el\-*\-*\fR
  22083. configurations.
  22084. .IP "\fB\-march=\fR\fIarch\fR" 4
  22085. .IX Item "-march=arch"
  22086. Generate code that runs on \fIarch\fR, which can be the name of a
  22087. generic \s-1MIPS ISA,\s0 or the name of a particular processor.
  22088. The \s-1ISA\s0 names are:
  22089. \&\fBmips1\fR, \fBmips2\fR, \fBmips3\fR, \fBmips4\fR,
  22090. \&\fBmips32\fR, \fBmips32r2\fR, \fBmips32r3\fR, \fBmips32r5\fR,
  22091. \&\fBmips32r6\fR, \fBmips64\fR, \fBmips64r2\fR, \fBmips64r3\fR,
  22092. \&\fBmips64r5\fR and \fBmips64r6\fR.
  22093. The processor names are:
  22094. \&\fB4kc\fR, \fB4km\fR, \fB4kp\fR, \fB4ksc\fR,
  22095. \&\fB4kec\fR, \fB4kem\fR, \fB4kep\fR, \fB4ksd\fR,
  22096. \&\fB5kc\fR, \fB5kf\fR,
  22097. \&\fB20kc\fR,
  22098. \&\fB24kc\fR, \fB24kf2_1\fR, \fB24kf1_1\fR,
  22099. \&\fB24kec\fR, \fB24kef2_1\fR, \fB24kef1_1\fR,
  22100. \&\fB34kc\fR, \fB34kf2_1\fR, \fB34kf1_1\fR, \fB34kn\fR,
  22101. \&\fB74kc\fR, \fB74kf2_1\fR, \fB74kf1_1\fR, \fB74kf3_2\fR,
  22102. \&\fB1004kc\fR, \fB1004kf2_1\fR, \fB1004kf1_1\fR,
  22103. \&\fBi6400\fR, \fBi6500\fR,
  22104. \&\fBinteraptiv\fR,
  22105. \&\fBloongson2e\fR, \fBloongson2f\fR, \fBloongson3a\fR, \fBgs464\fR,
  22106. \&\fBgs464e\fR, \fBgs264e\fR,
  22107. \&\fBm4k\fR,
  22108. \&\fBm14k\fR, \fBm14kc\fR, \fBm14ke\fR, \fBm14kec\fR,
  22109. \&\fBm5100\fR, \fBm5101\fR,
  22110. \&\fBocteon\fR, \fBocteon+\fR, \fBocteon2\fR, \fBocteon3\fR,
  22111. \&\fBorion\fR,
  22112. \&\fBp5600\fR, \fBp6600\fR,
  22113. \&\fBr2000\fR, \fBr3000\fR, \fBr3900\fR, \fBr4000\fR, \fBr4400\fR,
  22114. \&\fBr4600\fR, \fBr4650\fR, \fBr4700\fR, \fBr5900\fR,
  22115. \&\fBr6000\fR, \fBr8000\fR,
  22116. \&\fBrm7000\fR, \fBrm9000\fR,
  22117. \&\fBr10000\fR, \fBr12000\fR, \fBr14000\fR, \fBr16000\fR,
  22118. \&\fBsb1\fR,
  22119. \&\fBsr71000\fR,
  22120. \&\fBvr4100\fR, \fBvr4111\fR, \fBvr4120\fR, \fBvr4130\fR, \fBvr4300\fR,
  22121. \&\fBvr5000\fR, \fBvr5400\fR, \fBvr5500\fR,
  22122. \&\fBxlr\fR and \fBxlp\fR.
  22123. The special value \fBfrom-abi\fR selects the
  22124. most compatible architecture for the selected \s-1ABI \s0(that is,
  22125. \&\fBmips1\fR for 32\-bit ABIs and \fBmips3\fR for 64\-bit ABIs).
  22126. .Sp
  22127. The native Linux/GNU toolchain also supports the value \fBnative\fR,
  22128. which selects the best architecture option for the host processor.
  22129. \&\fB\-march=native\fR has no effect if \s-1GCC\s0 does not recognize
  22130. the processor.
  22131. .Sp
  22132. In processor names, a final \fB000\fR can be abbreviated as \fBk\fR
  22133. (for example, \fB\-march=r2k\fR). Prefixes are optional, and
  22134. \&\fBvr\fR may be written \fBr\fR.
  22135. .Sp
  22136. Names of the form \fIn\fR\fBf2_1\fR refer to processors with
  22137. FPUs clocked at half the rate of the core, names of the form
  22138. \&\fIn\fR\fBf1_1\fR refer to processors with FPUs clocked at the same
  22139. rate as the core, and names of the form \fIn\fR\fBf3_2\fR refer to
  22140. processors with FPUs clocked a ratio of 3:2 with respect to the core.
  22141. For compatibility reasons, \fIn\fR\fBf\fR is accepted as a synonym
  22142. for \fIn\fR\fBf2_1\fR while \fIn\fR\fBx\fR and \fIb\fR\fBfx\fR are
  22143. accepted as synonyms for \fIn\fR\fBf1_1\fR.
  22144. .Sp
  22145. \&\s-1GCC\s0 defines two macros based on the value of this option. The first
  22146. is \f(CW\*(C`_MIPS_ARCH\*(C'\fR, which gives the name of target architecture, as
  22147. a string. The second has the form \f(CW\*(C`_MIPS_ARCH_\f(CIfoo\f(CW\*(C'\fR,
  22148. where \fIfoo\fR is the capitalized value of \f(CW\*(C`_MIPS_ARCH\*(C'\fR.
  22149. For example, \fB\-march=r2000\fR sets \f(CW\*(C`_MIPS_ARCH\*(C'\fR
  22150. to \f(CW"r2000"\fR and defines the macro \f(CW\*(C`_MIPS_ARCH_R2000\*(C'\fR.
  22151. .Sp
  22152. Note that the \f(CW\*(C`_MIPS_ARCH\*(C'\fR macro uses the processor names given
  22153. above. In other words, it has the full prefix and does not
  22154. abbreviate \fB000\fR as \fBk\fR. In the case of \fBfrom-abi\fR,
  22155. the macro names the resolved architecture (either \f(CW"mips1"\fR or
  22156. \&\f(CW"mips3"\fR). It names the default architecture when no
  22157. \&\fB\-march\fR option is given.
  22158. .IP "\fB\-mtune=\fR\fIarch\fR" 4
  22159. .IX Item "-mtune=arch"
  22160. Optimize for \fIarch\fR. Among other things, this option controls
  22161. the way instructions are scheduled, and the perceived cost of arithmetic
  22162. operations. The list of \fIarch\fR values is the same as for
  22163. \&\fB\-march\fR.
  22164. .Sp
  22165. When this option is not used, \s-1GCC\s0 optimizes for the processor
  22166. specified by \fB\-march\fR. By using \fB\-march\fR and
  22167. \&\fB\-mtune\fR together, it is possible to generate code that
  22168. runs on a family of processors, but optimize the code for one
  22169. particular member of that family.
  22170. .Sp
  22171. \&\fB\-mtune\fR defines the macros \f(CW\*(C`_MIPS_TUNE\*(C'\fR and
  22172. \&\f(CW\*(C`_MIPS_TUNE_\f(CIfoo\f(CW\*(C'\fR, which work in the same way as the
  22173. \&\fB\-march\fR ones described above.
  22174. .IP "\fB\-mips1\fR" 4
  22175. .IX Item "-mips1"
  22176. Equivalent to \fB\-march=mips1\fR.
  22177. .IP "\fB\-mips2\fR" 4
  22178. .IX Item "-mips2"
  22179. Equivalent to \fB\-march=mips2\fR.
  22180. .IP "\fB\-mips3\fR" 4
  22181. .IX Item "-mips3"
  22182. Equivalent to \fB\-march=mips3\fR.
  22183. .IP "\fB\-mips4\fR" 4
  22184. .IX Item "-mips4"
  22185. Equivalent to \fB\-march=mips4\fR.
  22186. .IP "\fB\-mips32\fR" 4
  22187. .IX Item "-mips32"
  22188. Equivalent to \fB\-march=mips32\fR.
  22189. .IP "\fB\-mips32r3\fR" 4
  22190. .IX Item "-mips32r3"
  22191. Equivalent to \fB\-march=mips32r3\fR.
  22192. .IP "\fB\-mips32r5\fR" 4
  22193. .IX Item "-mips32r5"
  22194. Equivalent to \fB\-march=mips32r5\fR.
  22195. .IP "\fB\-mips32r6\fR" 4
  22196. .IX Item "-mips32r6"
  22197. Equivalent to \fB\-march=mips32r6\fR.
  22198. .IP "\fB\-mips64\fR" 4
  22199. .IX Item "-mips64"
  22200. Equivalent to \fB\-march=mips64\fR.
  22201. .IP "\fB\-mips64r2\fR" 4
  22202. .IX Item "-mips64r2"
  22203. Equivalent to \fB\-march=mips64r2\fR.
  22204. .IP "\fB\-mips64r3\fR" 4
  22205. .IX Item "-mips64r3"
  22206. Equivalent to \fB\-march=mips64r3\fR.
  22207. .IP "\fB\-mips64r5\fR" 4
  22208. .IX Item "-mips64r5"
  22209. Equivalent to \fB\-march=mips64r5\fR.
  22210. .IP "\fB\-mips64r6\fR" 4
  22211. .IX Item "-mips64r6"
  22212. Equivalent to \fB\-march=mips64r6\fR.
  22213. .IP "\fB\-mips16\fR" 4
  22214. .IX Item "-mips16"
  22215. .PD 0
  22216. .IP "\fB\-mno\-mips16\fR" 4
  22217. .IX Item "-mno-mips16"
  22218. .PD
  22219. Generate (do not generate) \s-1MIPS16\s0 code. If \s-1GCC\s0 is targeting a
  22220. \&\s-1MIPS32\s0 or \s-1MIPS64\s0 architecture, it makes use of the MIPS16e \s-1ASE.\s0
  22221. .Sp
  22222. \&\s-1MIPS16\s0 code generation can also be controlled on a per-function basis
  22223. by means of \f(CW\*(C`mips16\*(C'\fR and \f(CW\*(C`nomips16\*(C'\fR attributes.
  22224. .IP "\fB\-mflip\-mips16\fR" 4
  22225. .IX Item "-mflip-mips16"
  22226. Generate \s-1MIPS16\s0 code on alternating functions. This option is provided
  22227. for regression testing of mixed MIPS16/non\-MIPS16 code generation, and is
  22228. not intended for ordinary use in compiling user code.
  22229. .IP "\fB\-minterlink\-compressed\fR" 4
  22230. .IX Item "-minterlink-compressed"
  22231. .PD 0
  22232. .IP "\fB\-mno\-interlink\-compressed\fR" 4
  22233. .IX Item "-mno-interlink-compressed"
  22234. .PD
  22235. Require (do not require) that code using the standard (uncompressed) \s-1MIPS ISA\s0
  22236. be link-compatible with \s-1MIPS16\s0 and microMIPS code, and vice versa.
  22237. .Sp
  22238. For example, code using the standard \s-1ISA\s0 encoding cannot jump directly
  22239. to \s-1MIPS16\s0 or microMIPS code; it must either use a call or an indirect jump.
  22240. \&\fB\-minterlink\-compressed\fR therefore disables direct jumps unless \s-1GCC\s0
  22241. knows that the target of the jump is not compressed.
  22242. .IP "\fB\-minterlink\-mips16\fR" 4
  22243. .IX Item "-minterlink-mips16"
  22244. .PD 0
  22245. .IP "\fB\-mno\-interlink\-mips16\fR" 4
  22246. .IX Item "-mno-interlink-mips16"
  22247. .PD
  22248. Aliases of \fB\-minterlink\-compressed\fR and
  22249. \&\fB\-mno\-interlink\-compressed\fR. These options predate the microMIPS \s-1ASE\s0
  22250. and are retained for backwards compatibility.
  22251. .IP "\fB\-mabi=32\fR" 4
  22252. .IX Item "-mabi=32"
  22253. .PD 0
  22254. .IP "\fB\-mabi=o64\fR" 4
  22255. .IX Item "-mabi=o64"
  22256. .IP "\fB\-mabi=n32\fR" 4
  22257. .IX Item "-mabi=n32"
  22258. .IP "\fB\-mabi=64\fR" 4
  22259. .IX Item "-mabi=64"
  22260. .IP "\fB\-mabi=eabi\fR" 4
  22261. .IX Item "-mabi=eabi"
  22262. .PD
  22263. Generate code for the given \s-1ABI.\s0
  22264. .Sp
  22265. Note that the \s-1EABI\s0 has a 32\-bit and a 64\-bit variant. \s-1GCC\s0 normally
  22266. generates 64\-bit code when you select a 64\-bit architecture, but you
  22267. can use \fB\-mgp32\fR to get 32\-bit code instead.
  22268. .Sp
  22269. For information about the O64 \s-1ABI,\s0 see
  22270. <\fBhttp://gcc.gnu.org/projects/mipso64\-abi.html\fR>.
  22271. .Sp
  22272. \&\s-1GCC\s0 supports a variant of the o32 \s-1ABI\s0 in which floating-point registers
  22273. are 64 rather than 32 bits wide. You can select this combination with
  22274. \&\fB\-mabi=32\fR \fB\-mfp64\fR. This \s-1ABI\s0 relies on the \f(CW\*(C`mthc1\*(C'\fR
  22275. and \f(CW\*(C`mfhc1\*(C'\fR instructions and is therefore only supported for
  22276. \&\s-1MIPS32R2, MIPS32R3\s0 and \s-1MIPS32R5\s0 processors.
  22277. .Sp
  22278. The register assignments for arguments and return values remain the
  22279. same, but each scalar value is passed in a single 64\-bit register
  22280. rather than a pair of 32\-bit registers. For example, scalar
  22281. floating-point values are returned in \fB\f(CB$f0\fB\fR only, not a
  22282. \&\fB\f(CB$f0\fB\fR/\fB\f(CB$f1\fB\fR pair. The set of call-saved registers also
  22283. remains the same in that the even-numbered double-precision registers
  22284. are saved.
  22285. .Sp
  22286. Two additional variants of the o32 \s-1ABI\s0 are supported to enable
  22287. a transition from 32\-bit to 64\-bit registers. These are \s-1FPXX
  22288. \&\s0(\fB\-mfpxx\fR) and \s-1FP64A \s0(\fB\-mfp64\fR \fB\-mno\-odd\-spreg\fR).
  22289. The \s-1FPXX\s0 extension mandates that all code must execute correctly
  22290. when run using 32\-bit or 64\-bit registers. The code can be interlinked
  22291. with either \s-1FP32\s0 or \s-1FP64,\s0 but not both.
  22292. The \s-1FP64A\s0 extension is similar to the \s-1FP64\s0 extension but forbids the
  22293. use of odd-numbered single-precision registers. This can be used
  22294. in conjunction with the \f(CW\*(C`FRE\*(C'\fR mode of FPUs in \s-1MIPS32R5\s0
  22295. processors and allows both \s-1FP32\s0 and \s-1FP64A\s0 code to interlink and
  22296. run in the same process without changing \s-1FPU\s0 modes.
  22297. .IP "\fB\-mabicalls\fR" 4
  22298. .IX Item "-mabicalls"
  22299. .PD 0
  22300. .IP "\fB\-mno\-abicalls\fR" 4
  22301. .IX Item "-mno-abicalls"
  22302. .PD
  22303. Generate (do not generate) code that is suitable for SVR4\-style
  22304. dynamic objects. \fB\-mabicalls\fR is the default for SVR4\-based
  22305. systems.
  22306. .IP "\fB\-mshared\fR" 4
  22307. .IX Item "-mshared"
  22308. .PD 0
  22309. .IP "\fB\-mno\-shared\fR" 4
  22310. .IX Item "-mno-shared"
  22311. .PD
  22312. Generate (do not generate) code that is fully position-independent,
  22313. and that can therefore be linked into shared libraries. This option
  22314. only affects \fB\-mabicalls\fR.
  22315. .Sp
  22316. All \fB\-mabicalls\fR code has traditionally been position-independent,
  22317. regardless of options like \fB\-fPIC\fR and \fB\-fpic\fR. However,
  22318. as an extension, the \s-1GNU\s0 toolchain allows executables to use absolute
  22319. accesses for locally-binding symbols. It can also use shorter \s-1GP\s0
  22320. initialization sequences and generate direct calls to locally-defined
  22321. functions. This mode is selected by \fB\-mno\-shared\fR.
  22322. .Sp
  22323. \&\fB\-mno\-shared\fR depends on binutils 2.16 or higher and generates
  22324. objects that can only be linked by the \s-1GNU\s0 linker. However, the option
  22325. does not affect the \s-1ABI\s0 of the final executable; it only affects the \s-1ABI\s0
  22326. of relocatable objects. Using \fB\-mno\-shared\fR generally makes
  22327. executables both smaller and quicker.
  22328. .Sp
  22329. \&\fB\-mshared\fR is the default.
  22330. .IP "\fB\-mplt\fR" 4
  22331. .IX Item "-mplt"
  22332. .PD 0
  22333. .IP "\fB\-mno\-plt\fR" 4
  22334. .IX Item "-mno-plt"
  22335. .PD
  22336. Assume (do not assume) that the static and dynamic linkers
  22337. support PLTs and copy relocations. This option only affects
  22338. \&\fB\-mno\-shared \-mabicalls\fR. For the n64 \s-1ABI,\s0 this option
  22339. has no effect without \fB\-msym32\fR.
  22340. .Sp
  22341. You can make \fB\-mplt\fR the default by configuring
  22342. \&\s-1GCC\s0 with \fB\-\-with\-mips\-plt\fR. The default is
  22343. \&\fB\-mno\-plt\fR otherwise.
  22344. .IP "\fB\-mxgot\fR" 4
  22345. .IX Item "-mxgot"
  22346. .PD 0
  22347. .IP "\fB\-mno\-xgot\fR" 4
  22348. .IX Item "-mno-xgot"
  22349. .PD
  22350. Lift (do not lift) the usual restrictions on the size of the global
  22351. offset table.
  22352. .Sp
  22353. \&\s-1GCC\s0 normally uses a single instruction to load values from the \s-1GOT.\s0
  22354. While this is relatively efficient, it only works if the \s-1GOT\s0
  22355. is smaller than about 64k. Anything larger causes the linker
  22356. to report an error such as:
  22357. .Sp
  22358. .Vb 1
  22359. \& relocation truncated to fit: R_MIPS_GOT16 foobar
  22360. .Ve
  22361. .Sp
  22362. If this happens, you should recompile your code with \fB\-mxgot\fR.
  22363. This works with very large GOTs, although the code is also
  22364. less efficient, since it takes three instructions to fetch the
  22365. value of a global symbol.
  22366. .Sp
  22367. Note that some linkers can create multiple GOTs. If you have such a
  22368. linker, you should only need to use \fB\-mxgot\fR when a single object
  22369. file accesses more than 64k's worth of \s-1GOT\s0 entries. Very few do.
  22370. .Sp
  22371. These options have no effect unless \s-1GCC\s0 is generating position
  22372. independent code.
  22373. .IP "\fB\-mgp32\fR" 4
  22374. .IX Item "-mgp32"
  22375. Assume that general-purpose registers are 32 bits wide.
  22376. .IP "\fB\-mgp64\fR" 4
  22377. .IX Item "-mgp64"
  22378. Assume that general-purpose registers are 64 bits wide.
  22379. .IP "\fB\-mfp32\fR" 4
  22380. .IX Item "-mfp32"
  22381. Assume that floating-point registers are 32 bits wide.
  22382. .IP "\fB\-mfp64\fR" 4
  22383. .IX Item "-mfp64"
  22384. Assume that floating-point registers are 64 bits wide.
  22385. .IP "\fB\-mfpxx\fR" 4
  22386. .IX Item "-mfpxx"
  22387. Do not assume the width of floating-point registers.
  22388. .IP "\fB\-mhard\-float\fR" 4
  22389. .IX Item "-mhard-float"
  22390. Use floating-point coprocessor instructions.
  22391. .IP "\fB\-msoft\-float\fR" 4
  22392. .IX Item "-msoft-float"
  22393. Do not use floating-point coprocessor instructions. Implement
  22394. floating-point calculations using library calls instead.
  22395. .IP "\fB\-mno\-float\fR" 4
  22396. .IX Item "-mno-float"
  22397. Equivalent to \fB\-msoft\-float\fR, but additionally asserts that the
  22398. program being compiled does not perform any floating-point operations.
  22399. This option is presently supported only by some bare-metal \s-1MIPS\s0
  22400. configurations, where it may select a special set of libraries
  22401. that lack all floating-point support (including, for example, the
  22402. floating-point \f(CW\*(C`printf\*(C'\fR formats).
  22403. If code compiled with \fB\-mno\-float\fR accidentally contains
  22404. floating-point operations, it is likely to suffer a link-time
  22405. or run-time failure.
  22406. .IP "\fB\-msingle\-float\fR" 4
  22407. .IX Item "-msingle-float"
  22408. Assume that the floating-point coprocessor only supports single-precision
  22409. operations.
  22410. .IP "\fB\-mdouble\-float\fR" 4
  22411. .IX Item "-mdouble-float"
  22412. Assume that the floating-point coprocessor supports double-precision
  22413. operations. This is the default.
  22414. .IP "\fB\-modd\-spreg\fR" 4
  22415. .IX Item "-modd-spreg"
  22416. .PD 0
  22417. .IP "\fB\-mno\-odd\-spreg\fR" 4
  22418. .IX Item "-mno-odd-spreg"
  22419. .PD
  22420. Enable the use of odd-numbered single-precision floating-point registers
  22421. for the o32 \s-1ABI. \s0 This is the default for processors that are known to
  22422. support these registers. When using the o32 \s-1FPXX ABI, \s0\fB\-mno\-odd\-spreg\fR
  22423. is set by default.
  22424. .IP "\fB\-mabs=2008\fR" 4
  22425. .IX Item "-mabs=2008"
  22426. .PD 0
  22427. .IP "\fB\-mabs=legacy\fR" 4
  22428. .IX Item "-mabs=legacy"
  22429. .PD
  22430. These options control the treatment of the special not-a-number (NaN)
  22431. \&\s-1IEEE 754\s0 floating-point data with the \f(CW\*(C`abs.\f(CIfmt\f(CW\*(C'\fR and
  22432. \&\f(CW\*(C`neg.\f(CIfmt\f(CW\*(C'\fR machine instructions.
  22433. .Sp
  22434. By default or when \fB\-mabs=legacy\fR is used the legacy
  22435. treatment is selected. In this case these instructions are considered
  22436. arithmetic and avoided where correct operation is required and the
  22437. input operand might be a NaN. A longer sequence of instructions that
  22438. manipulate the sign bit of floating-point datum manually is used
  22439. instead unless the \fB\-ffinite\-math\-only\fR option has also been
  22440. specified.
  22441. .Sp
  22442. The \fB\-mabs=2008\fR option selects the \s-1IEEE 754\-2008\s0 treatment. In
  22443. this case these instructions are considered non-arithmetic and therefore
  22444. operating correctly in all cases, including in particular where the
  22445. input operand is a NaN. These instructions are therefore always used
  22446. for the respective operations.
  22447. .IP "\fB\-mnan=2008\fR" 4
  22448. .IX Item "-mnan=2008"
  22449. .PD 0
  22450. .IP "\fB\-mnan=legacy\fR" 4
  22451. .IX Item "-mnan=legacy"
  22452. .PD
  22453. These options control the encoding of the special not-a-number (NaN)
  22454. \&\s-1IEEE 754\s0 floating-point data.
  22455. .Sp
  22456. The \fB\-mnan=legacy\fR option selects the legacy encoding. In this
  22457. case quiet NaNs (qNaNs) are denoted by the first bit of their trailing
  22458. significand field being 0, whereas signaling NaNs (sNaNs) are denoted
  22459. by the first bit of their trailing significand field being 1.
  22460. .Sp
  22461. The \fB\-mnan=2008\fR option selects the \s-1IEEE 754\-2008\s0 encoding. In
  22462. this case qNaNs are denoted by the first bit of their trailing
  22463. significand field being 1, whereas sNaNs are denoted by the first bit of
  22464. their trailing significand field being 0.
  22465. .Sp
  22466. The default is \fB\-mnan=legacy\fR unless \s-1GCC\s0 has been configured with
  22467. \&\fB\-\-with\-nan=2008\fR.
  22468. .IP "\fB\-mllsc\fR" 4
  22469. .IX Item "-mllsc"
  22470. .PD 0
  22471. .IP "\fB\-mno\-llsc\fR" 4
  22472. .IX Item "-mno-llsc"
  22473. .PD
  22474. Use (do not use) \fBll\fR, \fBsc\fR, and \fBsync\fR instructions to
  22475. implement atomic memory built-in functions. When neither option is
  22476. specified, \s-1GCC\s0 uses the instructions if the target architecture
  22477. supports them.
  22478. .Sp
  22479. \&\fB\-mllsc\fR is useful if the runtime environment can emulate the
  22480. instructions and \fB\-mno\-llsc\fR can be useful when compiling for
  22481. nonstandard ISAs. You can make either option the default by
  22482. configuring \s-1GCC\s0 with \fB\-\-with\-llsc\fR and \fB\-\-without\-llsc\fR
  22483. respectively. \fB\-\-with\-llsc\fR is the default for some
  22484. configurations; see the installation documentation for details.
  22485. .IP "\fB\-mdsp\fR" 4
  22486. .IX Item "-mdsp"
  22487. .PD 0
  22488. .IP "\fB\-mno\-dsp\fR" 4
  22489. .IX Item "-mno-dsp"
  22490. .PD
  22491. Use (do not use) revision 1 of the \s-1MIPS DSP ASE.
  22492. \s0 This option defines the
  22493. preprocessor macro \f(CW\*(C`_\|_mips_dsp\*(C'\fR. It also defines
  22494. \&\f(CW\*(C`_\|_mips_dsp_rev\*(C'\fR to 1.
  22495. .IP "\fB\-mdspr2\fR" 4
  22496. .IX Item "-mdspr2"
  22497. .PD 0
  22498. .IP "\fB\-mno\-dspr2\fR" 4
  22499. .IX Item "-mno-dspr2"
  22500. .PD
  22501. Use (do not use) revision 2 of the \s-1MIPS DSP ASE.
  22502. \s0 This option defines the
  22503. preprocessor macros \f(CW\*(C`_\|_mips_dsp\*(C'\fR and \f(CW\*(C`_\|_mips_dspr2\*(C'\fR.
  22504. It also defines \f(CW\*(C`_\|_mips_dsp_rev\*(C'\fR to 2.
  22505. .IP "\fB\-msmartmips\fR" 4
  22506. .IX Item "-msmartmips"
  22507. .PD 0
  22508. .IP "\fB\-mno\-smartmips\fR" 4
  22509. .IX Item "-mno-smartmips"
  22510. .PD
  22511. Use (do not use) the \s-1MIPS\s0 SmartMIPS \s-1ASE.\s0
  22512. .IP "\fB\-mpaired\-single\fR" 4
  22513. .IX Item "-mpaired-single"
  22514. .PD 0
  22515. .IP "\fB\-mno\-paired\-single\fR" 4
  22516. .IX Item "-mno-paired-single"
  22517. .PD
  22518. Use (do not use) paired-single floating-point instructions.
  22519. This option requires
  22520. hardware floating-point support to be enabled.
  22521. .IP "\fB\-mdmx\fR" 4
  22522. .IX Item "-mdmx"
  22523. .PD 0
  22524. .IP "\fB\-mno\-mdmx\fR" 4
  22525. .IX Item "-mno-mdmx"
  22526. .PD
  22527. Use (do not use) \s-1MIPS\s0 Digital Media Extension instructions.
  22528. This option can only be used when generating 64\-bit code and requires
  22529. hardware floating-point support to be enabled.
  22530. .IP "\fB\-mips3d\fR" 4
  22531. .IX Item "-mips3d"
  22532. .PD 0
  22533. .IP "\fB\-mno\-mips3d\fR" 4
  22534. .IX Item "-mno-mips3d"
  22535. .PD
  22536. Use (do not use) the \s-1MIPS\-3D ASE. \s0
  22537. The option \fB\-mips3d\fR implies \fB\-mpaired\-single\fR.
  22538. .IP "\fB\-mmicromips\fR" 4
  22539. .IX Item "-mmicromips"
  22540. .PD 0
  22541. .IP "\fB\-mno\-micromips\fR" 4
  22542. .IX Item "-mno-micromips"
  22543. .PD
  22544. Generate (do not generate) microMIPS code.
  22545. .Sp
  22546. MicroMIPS code generation can also be controlled on a per-function basis
  22547. by means of \f(CW\*(C`micromips\*(C'\fR and \f(CW\*(C`nomicromips\*(C'\fR attributes.
  22548. .IP "\fB\-mmt\fR" 4
  22549. .IX Item "-mmt"
  22550. .PD 0
  22551. .IP "\fB\-mno\-mt\fR" 4
  22552. .IX Item "-mno-mt"
  22553. .PD
  22554. Use (do not use) \s-1MT\s0 Multithreading instructions.
  22555. .IP "\fB\-mmcu\fR" 4
  22556. .IX Item "-mmcu"
  22557. .PD 0
  22558. .IP "\fB\-mno\-mcu\fR" 4
  22559. .IX Item "-mno-mcu"
  22560. .PD
  22561. Use (do not use) the \s-1MIPS MCU ASE\s0 instructions.
  22562. .IP "\fB\-meva\fR" 4
  22563. .IX Item "-meva"
  22564. .PD 0
  22565. .IP "\fB\-mno\-eva\fR" 4
  22566. .IX Item "-mno-eva"
  22567. .PD
  22568. Use (do not use) the \s-1MIPS\s0 Enhanced Virtual Addressing instructions.
  22569. .IP "\fB\-mvirt\fR" 4
  22570. .IX Item "-mvirt"
  22571. .PD 0
  22572. .IP "\fB\-mno\-virt\fR" 4
  22573. .IX Item "-mno-virt"
  22574. .PD
  22575. Use (do not use) the \s-1MIPS\s0 Virtualization (\s-1VZ\s0) instructions.
  22576. .IP "\fB\-mxpa\fR" 4
  22577. .IX Item "-mxpa"
  22578. .PD 0
  22579. .IP "\fB\-mno\-xpa\fR" 4
  22580. .IX Item "-mno-xpa"
  22581. .PD
  22582. Use (do not use) the \s-1MIPS\s0 eXtended Physical Address (\s-1XPA\s0) instructions.
  22583. .IP "\fB\-mcrc\fR" 4
  22584. .IX Item "-mcrc"
  22585. .PD 0
  22586. .IP "\fB\-mno\-crc\fR" 4
  22587. .IX Item "-mno-crc"
  22588. .PD
  22589. Use (do not use) the \s-1MIPS\s0 Cyclic Redundancy Check (\s-1CRC\s0) instructions.
  22590. .IP "\fB\-mginv\fR" 4
  22591. .IX Item "-mginv"
  22592. .PD 0
  22593. .IP "\fB\-mno\-ginv\fR" 4
  22594. .IX Item "-mno-ginv"
  22595. .PD
  22596. Use (do not use) the \s-1MIPS\s0 Global INValidate (\s-1GINV\s0) instructions.
  22597. .IP "\fB\-mloongson\-mmi\fR" 4
  22598. .IX Item "-mloongson-mmi"
  22599. .PD 0
  22600. .IP "\fB\-mno\-loongson\-mmi\fR" 4
  22601. .IX Item "-mno-loongson-mmi"
  22602. .PD
  22603. Use (do not use) the \s-1MIPS\s0 Loongson MultiMedia extensions Instructions (\s-1MMI\s0).
  22604. .IP "\fB\-mloongson\-ext\fR" 4
  22605. .IX Item "-mloongson-ext"
  22606. .PD 0
  22607. .IP "\fB\-mno\-loongson\-ext\fR" 4
  22608. .IX Item "-mno-loongson-ext"
  22609. .PD
  22610. Use (do not use) the \s-1MIPS\s0 Loongson EXTensions (\s-1EXT\s0) instructions.
  22611. .IP "\fB\-mloongson\-ext2\fR" 4
  22612. .IX Item "-mloongson-ext2"
  22613. .PD 0
  22614. .IP "\fB\-mno\-loongson\-ext2\fR" 4
  22615. .IX Item "-mno-loongson-ext2"
  22616. .PD
  22617. Use (do not use) the \s-1MIPS\s0 Loongson EXTensions r2 (\s-1EXT2\s0) instructions.
  22618. .IP "\fB\-mlong64\fR" 4
  22619. .IX Item "-mlong64"
  22620. Force \f(CW\*(C`long\*(C'\fR types to be 64 bits wide. See \fB\-mlong32\fR for
  22621. an explanation of the default and the way that the pointer size is
  22622. determined.
  22623. .IP "\fB\-mlong32\fR" 4
  22624. .IX Item "-mlong32"
  22625. Force \f(CW\*(C`long\*(C'\fR, \f(CW\*(C`int\*(C'\fR, and pointer types to be 32 bits wide.
  22626. .Sp
  22627. The default size of \f(CW\*(C`int\*(C'\fRs, \f(CW\*(C`long\*(C'\fRs and pointers depends on
  22628. the \s-1ABI. \s0 All the supported ABIs use 32\-bit \f(CW\*(C`int\*(C'\fRs. The n64 \s-1ABI\s0
  22629. uses 64\-bit \f(CW\*(C`long\*(C'\fRs, as does the 64\-bit \s-1EABI\s0; the others use
  22630. 32\-bit \f(CW\*(C`long\*(C'\fRs. Pointers are the same size as \f(CW\*(C`long\*(C'\fRs,
  22631. or the same size as integer registers, whichever is smaller.
  22632. .IP "\fB\-msym32\fR" 4
  22633. .IX Item "-msym32"
  22634. .PD 0
  22635. .IP "\fB\-mno\-sym32\fR" 4
  22636. .IX Item "-mno-sym32"
  22637. .PD
  22638. Assume (do not assume) that all symbols have 32\-bit values, regardless
  22639. of the selected \s-1ABI. \s0 This option is useful in combination with
  22640. \&\fB\-mabi=64\fR and \fB\-mno\-abicalls\fR because it allows \s-1GCC\s0
  22641. to generate shorter and faster references to symbolic addresses.
  22642. .IP "\fB\-G\fR \fInum\fR" 4
  22643. .IX Item "-G num"
  22644. Put definitions of externally-visible data in a small data section
  22645. if that data is no bigger than \fInum\fR bytes. \s-1GCC\s0 can then generate
  22646. more efficient accesses to the data; see \fB\-mgpopt\fR for details.
  22647. .Sp
  22648. The default \fB\-G\fR option depends on the configuration.
  22649. .IP "\fB\-mlocal\-sdata\fR" 4
  22650. .IX Item "-mlocal-sdata"
  22651. .PD 0
  22652. .IP "\fB\-mno\-local\-sdata\fR" 4
  22653. .IX Item "-mno-local-sdata"
  22654. .PD
  22655. Extend (do not extend) the \fB\-G\fR behavior to local data too,
  22656. such as to static variables in C. \fB\-mlocal\-sdata\fR is the
  22657. default for all configurations.
  22658. .Sp
  22659. If the linker complains that an application is using too much small data,
  22660. you might want to try rebuilding the less performance-critical parts with
  22661. \&\fB\-mno\-local\-sdata\fR. You might also want to build large
  22662. libraries with \fB\-mno\-local\-sdata\fR, so that the libraries leave
  22663. more room for the main program.
  22664. .IP "\fB\-mextern\-sdata\fR" 4
  22665. .IX Item "-mextern-sdata"
  22666. .PD 0
  22667. .IP "\fB\-mno\-extern\-sdata\fR" 4
  22668. .IX Item "-mno-extern-sdata"
  22669. .PD
  22670. Assume (do not assume) that externally-defined data is in
  22671. a small data section if the size of that data is within the \fB\-G\fR limit.
  22672. \&\fB\-mextern\-sdata\fR is the default for all configurations.
  22673. .Sp
  22674. If you compile a module \fIMod\fR with \fB\-mextern\-sdata\fR \fB\-G\fR
  22675. \&\fInum\fR \fB\-mgpopt\fR, and \fIMod\fR references a variable \fIVar\fR
  22676. that is no bigger than \fInum\fR bytes, you must make sure that \fIVar\fR
  22677. is placed in a small data section. If \fIVar\fR is defined by another
  22678. module, you must either compile that module with a high-enough
  22679. \&\fB\-G\fR setting or attach a \f(CW\*(C`section\*(C'\fR attribute to \fIVar\fR's
  22680. definition. If \fIVar\fR is common, you must link the application
  22681. with a high-enough \fB\-G\fR setting.
  22682. .Sp
  22683. The easiest way of satisfying these restrictions is to compile
  22684. and link every module with the same \fB\-G\fR option. However,
  22685. you may wish to build a library that supports several different
  22686. small data limits. You can do this by compiling the library with
  22687. the highest supported \fB\-G\fR setting and additionally using
  22688. \&\fB\-mno\-extern\-sdata\fR to stop the library from making assumptions
  22689. about externally-defined data.
  22690. .IP "\fB\-mgpopt\fR" 4
  22691. .IX Item "-mgpopt"
  22692. .PD 0
  22693. .IP "\fB\-mno\-gpopt\fR" 4
  22694. .IX Item "-mno-gpopt"
  22695. .PD
  22696. Use (do not use) GP-relative accesses for symbols that are known to be
  22697. in a small data section; see \fB\-G\fR, \fB\-mlocal\-sdata\fR and
  22698. \&\fB\-mextern\-sdata\fR. \fB\-mgpopt\fR is the default for all
  22699. configurations.
  22700. .Sp
  22701. \&\fB\-mno\-gpopt\fR is useful for cases where the \f(CW$gp\fR register
  22702. might not hold the value of \f(CW\*(C`_gp\*(C'\fR. For example, if the code is
  22703. part of a library that might be used in a boot monitor, programs that
  22704. call boot monitor routines pass an unknown value in \f(CW$gp\fR.
  22705. (In such situations, the boot monitor itself is usually compiled
  22706. with \fB\-G0\fR.)
  22707. .Sp
  22708. \&\fB\-mno\-gpopt\fR implies \fB\-mno\-local\-sdata\fR and
  22709. \&\fB\-mno\-extern\-sdata\fR.
  22710. .IP "\fB\-membedded\-data\fR" 4
  22711. .IX Item "-membedded-data"
  22712. .PD 0
  22713. .IP "\fB\-mno\-embedded\-data\fR" 4
  22714. .IX Item "-mno-embedded-data"
  22715. .PD
  22716. Allocate variables to the read-only data section first if possible, then
  22717. next in the small data section if possible, otherwise in data. This gives
  22718. slightly slower code than the default, but reduces the amount of \s-1RAM\s0 required
  22719. when executing, and thus may be preferred for some embedded systems.
  22720. .IP "\fB\-muninit\-const\-in\-rodata\fR" 4
  22721. .IX Item "-muninit-const-in-rodata"
  22722. .PD 0
  22723. .IP "\fB\-mno\-uninit\-const\-in\-rodata\fR" 4
  22724. .IX Item "-mno-uninit-const-in-rodata"
  22725. .PD
  22726. Put uninitialized \f(CW\*(C`const\*(C'\fR variables in the read-only data section.
  22727. This option is only meaningful in conjunction with \fB\-membedded\-data\fR.
  22728. .IP "\fB\-mcode\-readable=\fR\fIsetting\fR" 4
  22729. .IX Item "-mcode-readable=setting"
  22730. Specify whether \s-1GCC\s0 may generate code that reads from executable sections.
  22731. There are three possible settings:
  22732. .RS 4
  22733. .IP "\fB\-mcode\-readable=yes\fR" 4
  22734. .IX Item "-mcode-readable=yes"
  22735. Instructions may freely access executable sections. This is the
  22736. default setting.
  22737. .IP "\fB\-mcode\-readable=pcrel\fR" 4
  22738. .IX Item "-mcode-readable=pcrel"
  22739. \&\s-1MIPS16\s0 PC-relative load instructions can access executable sections,
  22740. but other instructions must not do so. This option is useful on 4KSc
  22741. and 4KSd processors when the code TLBs have the Read Inhibit bit set.
  22742. It is also useful on processors that can be configured to have a dual
  22743. instruction/data \s-1SRAM\s0 interface and that, like the M4K, automatically
  22744. redirect PC-relative loads to the instruction \s-1RAM.\s0
  22745. .IP "\fB\-mcode\-readable=no\fR" 4
  22746. .IX Item "-mcode-readable=no"
  22747. Instructions must not access executable sections. This option can be
  22748. useful on targets that are configured to have a dual instruction/data
  22749. \&\s-1SRAM\s0 interface but that (unlike the M4K) do not automatically redirect
  22750. PC-relative loads to the instruction \s-1RAM.\s0
  22751. .RE
  22752. .RS 4
  22753. .RE
  22754. .IP "\fB\-msplit\-addresses\fR" 4
  22755. .IX Item "-msplit-addresses"
  22756. .PD 0
  22757. .IP "\fB\-mno\-split\-addresses\fR" 4
  22758. .IX Item "-mno-split-addresses"
  22759. .PD
  22760. Enable (disable) use of the \f(CW\*(C`%hi()\*(C'\fR and \f(CW\*(C`%lo()\*(C'\fR assembler
  22761. relocation operators. This option has been superseded by
  22762. \&\fB\-mexplicit\-relocs\fR but is retained for backwards compatibility.
  22763. .IP "\fB\-mexplicit\-relocs\fR" 4
  22764. .IX Item "-mexplicit-relocs"
  22765. .PD 0
  22766. .IP "\fB\-mno\-explicit\-relocs\fR" 4
  22767. .IX Item "-mno-explicit-relocs"
  22768. .PD
  22769. Use (do not use) assembler relocation operators when dealing with symbolic
  22770. addresses. The alternative, selected by \fB\-mno\-explicit\-relocs\fR,
  22771. is to use assembler macros instead.
  22772. .Sp
  22773. \&\fB\-mexplicit\-relocs\fR is the default if \s-1GCC\s0 was configured
  22774. to use an assembler that supports relocation operators.
  22775. .IP "\fB\-mcheck\-zero\-division\fR" 4
  22776. .IX Item "-mcheck-zero-division"
  22777. .PD 0
  22778. .IP "\fB\-mno\-check\-zero\-division\fR" 4
  22779. .IX Item "-mno-check-zero-division"
  22780. .PD
  22781. Trap (do not trap) on integer division by zero.
  22782. .Sp
  22783. The default is \fB\-mcheck\-zero\-division\fR.
  22784. .IP "\fB\-mdivide\-traps\fR" 4
  22785. .IX Item "-mdivide-traps"
  22786. .PD 0
  22787. .IP "\fB\-mdivide\-breaks\fR" 4
  22788. .IX Item "-mdivide-breaks"
  22789. .PD
  22790. \&\s-1MIPS\s0 systems check for division by zero by generating either a
  22791. conditional trap or a break instruction. Using traps results in
  22792. smaller code, but is only supported on \s-1MIPS II\s0 and later. Also, some
  22793. versions of the Linux kernel have a bug that prevents trap from
  22794. generating the proper signal (\f(CW\*(C`SIGFPE\*(C'\fR). Use \fB\-mdivide\-traps\fR to
  22795. allow conditional traps on architectures that support them and
  22796. \&\fB\-mdivide\-breaks\fR to force the use of breaks.
  22797. .Sp
  22798. The default is usually \fB\-mdivide\-traps\fR, but this can be
  22799. overridden at configure time using \fB\-\-with\-divide=breaks\fR.
  22800. Divide-by-zero checks can be completely disabled using
  22801. \&\fB\-mno\-check\-zero\-division\fR.
  22802. .IP "\fB\-mload\-store\-pairs\fR" 4
  22803. .IX Item "-mload-store-pairs"
  22804. .PD 0
  22805. .IP "\fB\-mno\-load\-store\-pairs\fR" 4
  22806. .IX Item "-mno-load-store-pairs"
  22807. .PD
  22808. Enable (disable) an optimization that pairs consecutive load or store
  22809. instructions to enable load/store bonding. This option is enabled by
  22810. default but only takes effect when the selected architecture is known
  22811. to support bonding.
  22812. .IP "\fB\-mmemcpy\fR" 4
  22813. .IX Item "-mmemcpy"
  22814. .PD 0
  22815. .IP "\fB\-mno\-memcpy\fR" 4
  22816. .IX Item "-mno-memcpy"
  22817. .PD
  22818. Force (do not force) the use of \f(CW\*(C`memcpy\*(C'\fR for non-trivial block
  22819. moves. The default is \fB\-mno\-memcpy\fR, which allows \s-1GCC\s0 to inline
  22820. most constant-sized copies.
  22821. .IP "\fB\-mlong\-calls\fR" 4
  22822. .IX Item "-mlong-calls"
  22823. .PD 0
  22824. .IP "\fB\-mno\-long\-calls\fR" 4
  22825. .IX Item "-mno-long-calls"
  22826. .PD
  22827. Disable (do not disable) use of the \f(CW\*(C`jal\*(C'\fR instruction. Calling
  22828. functions using \f(CW\*(C`jal\*(C'\fR is more efficient but requires the caller
  22829. and callee to be in the same 256 megabyte segment.
  22830. .Sp
  22831. This option has no effect on abicalls code. The default is
  22832. \&\fB\-mno\-long\-calls\fR.
  22833. .IP "\fB\-mmad\fR" 4
  22834. .IX Item "-mmad"
  22835. .PD 0
  22836. .IP "\fB\-mno\-mad\fR" 4
  22837. .IX Item "-mno-mad"
  22838. .PD
  22839. Enable (disable) use of the \f(CW\*(C`mad\*(C'\fR, \f(CW\*(C`madu\*(C'\fR and \f(CW\*(C`mul\*(C'\fR
  22840. instructions, as provided by the R4650 \s-1ISA.\s0
  22841. .IP "\fB\-mimadd\fR" 4
  22842. .IX Item "-mimadd"
  22843. .PD 0
  22844. .IP "\fB\-mno\-imadd\fR" 4
  22845. .IX Item "-mno-imadd"
  22846. .PD
  22847. Enable (disable) use of the \f(CW\*(C`madd\*(C'\fR and \f(CW\*(C`msub\*(C'\fR integer
  22848. instructions. The default is \fB\-mimadd\fR on architectures
  22849. that support \f(CW\*(C`madd\*(C'\fR and \f(CW\*(C`msub\*(C'\fR except for the 74k
  22850. architecture where it was found to generate slower code.
  22851. .IP "\fB\-mfused\-madd\fR" 4
  22852. .IX Item "-mfused-madd"
  22853. .PD 0
  22854. .IP "\fB\-mno\-fused\-madd\fR" 4
  22855. .IX Item "-mno-fused-madd"
  22856. .PD
  22857. Enable (disable) use of the floating-point multiply-accumulate
  22858. instructions, when they are available. The default is
  22859. \&\fB\-mfused\-madd\fR.
  22860. .Sp
  22861. On the R8000 \s-1CPU\s0 when multiply-accumulate instructions are used,
  22862. the intermediate product is calculated to infinite precision
  22863. and is not subject to the \s-1FCSR\s0 Flush to Zero bit. This may be
  22864. undesirable in some circumstances. On other processors the result
  22865. is numerically identical to the equivalent computation using
  22866. separate multiply, add, subtract and negate instructions.
  22867. .IP "\fB\-nocpp\fR" 4
  22868. .IX Item "-nocpp"
  22869. Tell the \s-1MIPS\s0 assembler to not run its preprocessor over user
  22870. assembler files (with a \fB.s\fR suffix) when assembling them.
  22871. .IP "\fB\-mfix\-24k\fR" 4
  22872. .IX Item "-mfix-24k"
  22873. .PD 0
  22874. .IP "\fB\-mno\-fix\-24k\fR" 4
  22875. .IX Item "-mno-fix-24k"
  22876. .PD
  22877. Work around the 24K E48 (lost data on stores during refill) errata.
  22878. The workarounds are implemented by the assembler rather than by \s-1GCC.\s0
  22879. .IP "\fB\-mfix\-r4000\fR" 4
  22880. .IX Item "-mfix-r4000"
  22881. .PD 0
  22882. .IP "\fB\-mno\-fix\-r4000\fR" 4
  22883. .IX Item "-mno-fix-r4000"
  22884. .PD
  22885. Work around certain R4000 \s-1CPU\s0 errata:
  22886. .RS 4
  22887. .IP "\-" 4
  22888. A double-word or a variable shift may give an incorrect result if executed
  22889. immediately after starting an integer division.
  22890. .IP "\-" 4
  22891. A double-word or a variable shift may give an incorrect result if executed
  22892. while an integer multiplication is in progress.
  22893. .IP "\-" 4
  22894. An integer division may give an incorrect result if started in a delay slot
  22895. of a taken branch or a jump.
  22896. .RE
  22897. .RS 4
  22898. .RE
  22899. .IP "\fB\-mfix\-r4400\fR" 4
  22900. .IX Item "-mfix-r4400"
  22901. .PD 0
  22902. .IP "\fB\-mno\-fix\-r4400\fR" 4
  22903. .IX Item "-mno-fix-r4400"
  22904. .PD
  22905. Work around certain R4400 \s-1CPU\s0 errata:
  22906. .RS 4
  22907. .IP "\-" 4
  22908. A double-word or a variable shift may give an incorrect result if executed
  22909. immediately after starting an integer division.
  22910. .RE
  22911. .RS 4
  22912. .RE
  22913. .IP "\fB\-mfix\-r10000\fR" 4
  22914. .IX Item "-mfix-r10000"
  22915. .PD 0
  22916. .IP "\fB\-mno\-fix\-r10000\fR" 4
  22917. .IX Item "-mno-fix-r10000"
  22918. .PD
  22919. Work around certain R10000 errata:
  22920. .RS 4
  22921. .IP "\-" 4
  22922. \&\f(CW\*(C`ll\*(C'\fR/\f(CW\*(C`sc\*(C'\fR sequences may not behave atomically on revisions
  22923. prior to 3.0. They may deadlock on revisions 2.6 and earlier.
  22924. .RE
  22925. .RS 4
  22926. .Sp
  22927. This option can only be used if the target architecture supports
  22928. branch-likely instructions. \fB\-mfix\-r10000\fR is the default when
  22929. \&\fB\-march=r10000\fR is used; \fB\-mno\-fix\-r10000\fR is the default
  22930. otherwise.
  22931. .RE
  22932. .IP "\fB\-mfix\-r5900\fR" 4
  22933. .IX Item "-mfix-r5900"
  22934. .PD 0
  22935. .IP "\fB\-mno\-fix\-r5900\fR" 4
  22936. .IX Item "-mno-fix-r5900"
  22937. .PD
  22938. Do not attempt to schedule the preceding instruction into the delay slot
  22939. of a branch instruction placed at the end of a short loop of six
  22940. instructions or fewer and always schedule a \f(CW\*(C`nop\*(C'\fR instruction there
  22941. instead. The short loop bug under certain conditions causes loops to
  22942. execute only once or twice, due to a hardware bug in the R5900 chip. The
  22943. workaround is implemented by the assembler rather than by \s-1GCC.\s0
  22944. .IP "\fB\-mfix\-rm7000\fR" 4
  22945. .IX Item "-mfix-rm7000"
  22946. .PD 0
  22947. .IP "\fB\-mno\-fix\-rm7000\fR" 4
  22948. .IX Item "-mno-fix-rm7000"
  22949. .PD
  22950. Work around the \s-1RM7000 \s0\f(CW\*(C`dmult\*(C'\fR/\f(CW\*(C`dmultu\*(C'\fR errata. The
  22951. workarounds are implemented by the assembler rather than by \s-1GCC.\s0
  22952. .IP "\fB\-mfix\-vr4120\fR" 4
  22953. .IX Item "-mfix-vr4120"
  22954. .PD 0
  22955. .IP "\fB\-mno\-fix\-vr4120\fR" 4
  22956. .IX Item "-mno-fix-vr4120"
  22957. .PD
  22958. Work around certain \s-1VR4120\s0 errata:
  22959. .RS 4
  22960. .IP "\-" 4
  22961. \&\f(CW\*(C`dmultu\*(C'\fR does not always produce the correct result.
  22962. .IP "\-" 4
  22963. \&\f(CW\*(C`div\*(C'\fR and \f(CW\*(C`ddiv\*(C'\fR do not always produce the correct result if one
  22964. of the operands is negative.
  22965. .RE
  22966. .RS 4
  22967. .Sp
  22968. The workarounds for the division errata rely on special functions in
  22969. \&\fIlibgcc.a\fR. At present, these functions are only provided by
  22970. the \f(CW\*(C`mips64vr*\-elf\*(C'\fR configurations.
  22971. .Sp
  22972. Other \s-1VR4120\s0 errata require a \s-1NOP\s0 to be inserted between certain pairs of
  22973. instructions. These errata are handled by the assembler, not by \s-1GCC\s0 itself.
  22974. .RE
  22975. .IP "\fB\-mfix\-vr4130\fR" 4
  22976. .IX Item "-mfix-vr4130"
  22977. Work around the \s-1VR4130 \s0\f(CW\*(C`mflo\*(C'\fR/\f(CW\*(C`mfhi\*(C'\fR errata. The
  22978. workarounds are implemented by the assembler rather than by \s-1GCC,\s0
  22979. although \s-1GCC\s0 avoids using \f(CW\*(C`mflo\*(C'\fR and \f(CW\*(C`mfhi\*(C'\fR if the
  22980. \&\s-1VR4130 \s0\f(CW\*(C`macc\*(C'\fR, \f(CW\*(C`macchi\*(C'\fR, \f(CW\*(C`dmacc\*(C'\fR and \f(CW\*(C`dmacchi\*(C'\fR
  22981. instructions are available instead.
  22982. .IP "\fB\-mfix\-sb1\fR" 4
  22983. .IX Item "-mfix-sb1"
  22984. .PD 0
  22985. .IP "\fB\-mno\-fix\-sb1\fR" 4
  22986. .IX Item "-mno-fix-sb1"
  22987. .PD
  22988. Work around certain \s-1SB\-1 CPU\s0 core errata.
  22989. (This flag currently works around the \s-1SB\-1\s0 revision 2
  22990. \&\*(L"F1\*(R" and \*(L"F2\*(R" floating-point errata.)
  22991. .IP "\fB\-mr10k\-cache\-barrier=\fR\fIsetting\fR" 4
  22992. .IX Item "-mr10k-cache-barrier=setting"
  22993. Specify whether \s-1GCC\s0 should insert cache barriers to avoid the
  22994. side effects of speculation on R10K processors.
  22995. .Sp
  22996. In common with many processors, the R10K tries to predict the outcome
  22997. of a conditional branch and speculatively executes instructions from
  22998. the \*(L"taken\*(R" branch. It later aborts these instructions if the
  22999. predicted outcome is wrong. However, on the R10K, even aborted
  23000. instructions can have side effects.
  23001. .Sp
  23002. This problem only affects kernel stores and, depending on the system,
  23003. kernel loads. As an example, a speculatively-executed store may load
  23004. the target memory into cache and mark the cache line as dirty, even if
  23005. the store itself is later aborted. If a \s-1DMA\s0 operation writes to the
  23006. same area of memory before the \*(L"dirty\*(R" line is flushed, the cached
  23007. data overwrites the DMA-ed data. See the R10K processor manual
  23008. for a full description, including other potential problems.
  23009. .Sp
  23010. One workaround is to insert cache barrier instructions before every memory
  23011. access that might be speculatively executed and that might have side
  23012. effects even if aborted. \fB\-mr10k\-cache\-barrier=\fR\fIsetting\fR
  23013. controls \s-1GCC\s0's implementation of this workaround. It assumes that
  23014. aborted accesses to any byte in the following regions does not have
  23015. side effects:
  23016. .RS 4
  23017. .IP "1." 4
  23018. .IX Item "1."
  23019. the memory occupied by the current function's stack frame;
  23020. .IP "2." 4
  23021. .IX Item "2."
  23022. the memory occupied by an incoming stack argument;
  23023. .IP "3." 4
  23024. .IX Item "3."
  23025. the memory occupied by an object with a link-time-constant address.
  23026. .RE
  23027. .RS 4
  23028. .Sp
  23029. It is the kernel's responsibility to ensure that speculative
  23030. accesses to these regions are indeed safe.
  23031. .Sp
  23032. If the input program contains a function declaration such as:
  23033. .Sp
  23034. .Vb 1
  23035. \& void foo (void);
  23036. .Ve
  23037. .Sp
  23038. then the implementation of \f(CW\*(C`foo\*(C'\fR must allow \f(CW\*(C`j foo\*(C'\fR and
  23039. \&\f(CW\*(C`jal foo\*(C'\fR to be executed speculatively. \s-1GCC\s0 honors this
  23040. restriction for functions it compiles itself. It expects non-GCC
  23041. functions (such as hand-written assembly code) to do the same.
  23042. .Sp
  23043. The option has three forms:
  23044. .IP "\fB\-mr10k\-cache\-barrier=load\-store\fR" 4
  23045. .IX Item "-mr10k-cache-barrier=load-store"
  23046. Insert a cache barrier before a load or store that might be
  23047. speculatively executed and that might have side effects even
  23048. if aborted.
  23049. .IP "\fB\-mr10k\-cache\-barrier=store\fR" 4
  23050. .IX Item "-mr10k-cache-barrier=store"
  23051. Insert a cache barrier before a store that might be speculatively
  23052. executed and that might have side effects even if aborted.
  23053. .IP "\fB\-mr10k\-cache\-barrier=none\fR" 4
  23054. .IX Item "-mr10k-cache-barrier=none"
  23055. Disable the insertion of cache barriers. This is the default setting.
  23056. .RE
  23057. .RS 4
  23058. .RE
  23059. .IP "\fB\-mflush\-func=\fR\fIfunc\fR" 4
  23060. .IX Item "-mflush-func=func"
  23061. .PD 0
  23062. .IP "\fB\-mno\-flush\-func\fR" 4
  23063. .IX Item "-mno-flush-func"
  23064. .PD
  23065. Specifies the function to call to flush the I and D caches, or to not
  23066. call any such function. If called, the function must take the same
  23067. arguments as the common \f(CW\*(C`_flush_func\*(C'\fR, that is, the address of the
  23068. memory range for which the cache is being flushed, the size of the
  23069. memory range, and the number 3 (to flush both caches). The default
  23070. depends on the target \s-1GCC\s0 was configured for, but commonly is either
  23071. \&\f(CW\*(C`_flush_func\*(C'\fR or \f(CW\*(C`_\|_cpu_flush\*(C'\fR.
  23072. .IP "\fBmbranch\-cost=\fR\fInum\fR" 4
  23073. .IX Item "mbranch-cost=num"
  23074. Set the cost of branches to roughly \fInum\fR \*(L"simple\*(R" instructions.
  23075. This cost is only a heuristic and is not guaranteed to produce
  23076. consistent results across releases. A zero cost redundantly selects
  23077. the default, which is based on the \fB\-mtune\fR setting.
  23078. .IP "\fB\-mbranch\-likely\fR" 4
  23079. .IX Item "-mbranch-likely"
  23080. .PD 0
  23081. .IP "\fB\-mno\-branch\-likely\fR" 4
  23082. .IX Item "-mno-branch-likely"
  23083. .PD
  23084. Enable or disable use of Branch Likely instructions, regardless of the
  23085. default for the selected architecture. By default, Branch Likely
  23086. instructions may be generated if they are supported by the selected
  23087. architecture. An exception is for the \s-1MIPS32\s0 and \s-1MIPS64\s0 architectures
  23088. and processors that implement those architectures; for those, Branch
  23089. Likely instructions are not be generated by default because the \s-1MIPS32\s0
  23090. and \s-1MIPS64\s0 architectures specifically deprecate their use.
  23091. .IP "\fB\-mcompact\-branches=never\fR" 4
  23092. .IX Item "-mcompact-branches=never"
  23093. .PD 0
  23094. .IP "\fB\-mcompact\-branches=optimal\fR" 4
  23095. .IX Item "-mcompact-branches=optimal"
  23096. .IP "\fB\-mcompact\-branches=always\fR" 4
  23097. .IX Item "-mcompact-branches=always"
  23098. .PD
  23099. These options control which form of branches will be generated. The
  23100. default is \fB\-mcompact\-branches=optimal\fR.
  23101. .Sp
  23102. The \fB\-mcompact\-branches=never\fR option ensures that compact branch
  23103. instructions will never be generated.
  23104. .Sp
  23105. The \fB\-mcompact\-branches=always\fR option ensures that a compact
  23106. branch instruction will be generated if available. If a compact branch
  23107. instruction is not available, a delay slot form of the branch will be
  23108. used instead.
  23109. .Sp
  23110. This option is supported from \s-1MIPS\s0 Release 6 onwards.
  23111. .Sp
  23112. The \fB\-mcompact\-branches=optimal\fR option will cause a delay slot
  23113. branch to be used if one is available in the current \s-1ISA\s0 and the delay
  23114. slot is successfully filled. If the delay slot is not filled, a compact
  23115. branch will be chosen if one is available.
  23116. .IP "\fB\-mfp\-exceptions\fR" 4
  23117. .IX Item "-mfp-exceptions"
  23118. .PD 0
  23119. .IP "\fB\-mno\-fp\-exceptions\fR" 4
  23120. .IX Item "-mno-fp-exceptions"
  23121. .PD
  23122. Specifies whether \s-1FP\s0 exceptions are enabled. This affects how
  23123. \&\s-1FP\s0 instructions are scheduled for some processors.
  23124. The default is that \s-1FP\s0 exceptions are
  23125. enabled.
  23126. .Sp
  23127. For instance, on the \s-1SB\-1,\s0 if \s-1FP\s0 exceptions are disabled, and we are emitting
  23128. 64\-bit code, then we can use both \s-1FP\s0 pipes. Otherwise, we can only use one
  23129. \&\s-1FP\s0 pipe.
  23130. .IP "\fB\-mvr4130\-align\fR" 4
  23131. .IX Item "-mvr4130-align"
  23132. .PD 0
  23133. .IP "\fB\-mno\-vr4130\-align\fR" 4
  23134. .IX Item "-mno-vr4130-align"
  23135. .PD
  23136. The \s-1VR4130\s0 pipeline is two-way superscalar, but can only issue two
  23137. instructions together if the first one is 8\-byte aligned. When this
  23138. option is enabled, \s-1GCC\s0 aligns pairs of instructions that it
  23139. thinks should execute in parallel.
  23140. .Sp
  23141. This option only has an effect when optimizing for the \s-1VR4130.\s0
  23142. It normally makes code faster, but at the expense of making it bigger.
  23143. It is enabled by default at optimization level \fB\-O3\fR.
  23144. .IP "\fB\-msynci\fR" 4
  23145. .IX Item "-msynci"
  23146. .PD 0
  23147. .IP "\fB\-mno\-synci\fR" 4
  23148. .IX Item "-mno-synci"
  23149. .PD
  23150. Enable (disable) generation of \f(CW\*(C`synci\*(C'\fR instructions on
  23151. architectures that support it. The \f(CW\*(C`synci\*(C'\fR instructions (if
  23152. enabled) are generated when \f(CW\*(C`_\|_builtin_\|_\|_clear_cache\*(C'\fR is
  23153. compiled.
  23154. .Sp
  23155. This option defaults to \fB\-mno\-synci\fR, but the default can be
  23156. overridden by configuring \s-1GCC\s0 with \fB\-\-with\-synci\fR.
  23157. .Sp
  23158. When compiling code for single processor systems, it is generally safe
  23159. to use \f(CW\*(C`synci\*(C'\fR. However, on many multi-core (\s-1SMP\s0) systems, it
  23160. does not invalidate the instruction caches on all cores and may lead
  23161. to undefined behavior.
  23162. .IP "\fB\-mrelax\-pic\-calls\fR" 4
  23163. .IX Item "-mrelax-pic-calls"
  23164. .PD 0
  23165. .IP "\fB\-mno\-relax\-pic\-calls\fR" 4
  23166. .IX Item "-mno-relax-pic-calls"
  23167. .PD
  23168. Try to turn \s-1PIC\s0 calls that are normally dispatched via register
  23169. \&\f(CW$25\fR into direct calls. This is only possible if the linker can
  23170. resolve the destination at link time and if the destination is within
  23171. range for a direct call.
  23172. .Sp
  23173. \&\fB\-mrelax\-pic\-calls\fR is the default if \s-1GCC\s0 was configured to use
  23174. an assembler and a linker that support the \f(CW\*(C`.reloc\*(C'\fR assembly
  23175. directive and \fB\-mexplicit\-relocs\fR is in effect. With
  23176. \&\fB\-mno\-explicit\-relocs\fR, this optimization can be performed by the
  23177. assembler and the linker alone without help from the compiler.
  23178. .IP "\fB\-mmcount\-ra\-address\fR" 4
  23179. .IX Item "-mmcount-ra-address"
  23180. .PD 0
  23181. .IP "\fB\-mno\-mcount\-ra\-address\fR" 4
  23182. .IX Item "-mno-mcount-ra-address"
  23183. .PD
  23184. Emit (do not emit) code that allows \f(CW\*(C`_mcount\*(C'\fR to modify the
  23185. calling function's return address. When enabled, this option extends
  23186. the usual \f(CW\*(C`_mcount\*(C'\fR interface with a new \fIra-address\fR
  23187. parameter, which has type \f(CW\*(C`intptr_t *\*(C'\fR and is passed in register
  23188. \&\f(CW$12\fR. \f(CW\*(C`_mcount\*(C'\fR can then modify the return address by
  23189. doing both of the following:
  23190. .RS 4
  23191. .IP "*" 4
  23192. Returning the new address in register \f(CW$31\fR.
  23193. .IP "*" 4
  23194. Storing the new address in \f(CW\*(C`*\f(CIra\-address\f(CW\*(C'\fR,
  23195. if \fIra-address\fR is nonnull.
  23196. .RE
  23197. .RS 4
  23198. .Sp
  23199. The default is \fB\-mno\-mcount\-ra\-address\fR.
  23200. .RE
  23201. .IP "\fB\-mframe\-header\-opt\fR" 4
  23202. .IX Item "-mframe-header-opt"
  23203. .PD 0
  23204. .IP "\fB\-mno\-frame\-header\-opt\fR" 4
  23205. .IX Item "-mno-frame-header-opt"
  23206. .PD
  23207. Enable (disable) frame header optimization in the o32 \s-1ABI. \s0 When using the
  23208. o32 \s-1ABI,\s0 calling functions will allocate 16 bytes on the stack for the called
  23209. function to write out register arguments. When enabled, this optimization
  23210. will suppress the allocation of the frame header if it can be determined that
  23211. it is unused.
  23212. .Sp
  23213. This optimization is off by default at all optimization levels.
  23214. .IP "\fB\-mlxc1\-sxc1\fR" 4
  23215. .IX Item "-mlxc1-sxc1"
  23216. .PD 0
  23217. .IP "\fB\-mno\-lxc1\-sxc1\fR" 4
  23218. .IX Item "-mno-lxc1-sxc1"
  23219. .PD
  23220. When applicable, enable (disable) the generation of \f(CW\*(C`lwxc1\*(C'\fR,
  23221. \&\f(CW\*(C`swxc1\*(C'\fR, \f(CW\*(C`ldxc1\*(C'\fR, \f(CW\*(C`sdxc1\*(C'\fR instructions. Enabled by default.
  23222. .IP "\fB\-mmadd4\fR" 4
  23223. .IX Item "-mmadd4"
  23224. .PD 0
  23225. .IP "\fB\-mno\-madd4\fR" 4
  23226. .IX Item "-mno-madd4"
  23227. .PD
  23228. When applicable, enable (disable) the generation of 4\-operand \f(CW\*(C`madd.s\*(C'\fR,
  23229. \&\f(CW\*(C`madd.d\*(C'\fR and related instructions. Enabled by default.
  23230. .PP
  23231. \fI\s-1MMIX\s0 Options\fR
  23232. .IX Subsection "MMIX Options"
  23233. .PP
  23234. These options are defined for the \s-1MMIX:\s0
  23235. .IP "\fB\-mlibfuncs\fR" 4
  23236. .IX Item "-mlibfuncs"
  23237. .PD 0
  23238. .IP "\fB\-mno\-libfuncs\fR" 4
  23239. .IX Item "-mno-libfuncs"
  23240. .PD
  23241. Specify that intrinsic library functions are being compiled, passing all
  23242. values in registers, no matter the size.
  23243. .IP "\fB\-mepsilon\fR" 4
  23244. .IX Item "-mepsilon"
  23245. .PD 0
  23246. .IP "\fB\-mno\-epsilon\fR" 4
  23247. .IX Item "-mno-epsilon"
  23248. .PD
  23249. Generate floating-point comparison instructions that compare with respect
  23250. to the \f(CW\*(C`rE\*(C'\fR epsilon register.
  23251. .IP "\fB\-mabi=mmixware\fR" 4
  23252. .IX Item "-mabi=mmixware"
  23253. .PD 0
  23254. .IP "\fB\-mabi=gnu\fR" 4
  23255. .IX Item "-mabi=gnu"
  23256. .PD
  23257. Generate code that passes function parameters and return values that (in
  23258. the called function) are seen as registers \f(CW$0\fR and up, as opposed to
  23259. the \s-1GNU ABI\s0 which uses global registers \f(CW$231\fR and up.
  23260. .IP "\fB\-mzero\-extend\fR" 4
  23261. .IX Item "-mzero-extend"
  23262. .PD 0
  23263. .IP "\fB\-mno\-zero\-extend\fR" 4
  23264. .IX Item "-mno-zero-extend"
  23265. .PD
  23266. When reading data from memory in sizes shorter than 64 bits, use (do not
  23267. use) zero-extending load instructions by default, rather than
  23268. sign-extending ones.
  23269. .IP "\fB\-mknuthdiv\fR" 4
  23270. .IX Item "-mknuthdiv"
  23271. .PD 0
  23272. .IP "\fB\-mno\-knuthdiv\fR" 4
  23273. .IX Item "-mno-knuthdiv"
  23274. .PD
  23275. Make the result of a division yielding a remainder have the same sign as
  23276. the divisor. With the default, \fB\-mno\-knuthdiv\fR, the sign of the
  23277. remainder follows the sign of the dividend. Both methods are
  23278. arithmetically valid, the latter being almost exclusively used.
  23279. .IP "\fB\-mtoplevel\-symbols\fR" 4
  23280. .IX Item "-mtoplevel-symbols"
  23281. .PD 0
  23282. .IP "\fB\-mno\-toplevel\-symbols\fR" 4
  23283. .IX Item "-mno-toplevel-symbols"
  23284. .PD
  23285. Prepend (do not prepend) a \fB:\fR to all global symbols, so the assembly
  23286. code can be used with the \f(CW\*(C`PREFIX\*(C'\fR assembly directive.
  23287. .IP "\fB\-melf\fR" 4
  23288. .IX Item "-melf"
  23289. Generate an executable in the \s-1ELF\s0 format, rather than the default
  23290. \&\fBmmo\fR format used by the \fBmmix\fR simulator.
  23291. .IP "\fB\-mbranch\-predict\fR" 4
  23292. .IX Item "-mbranch-predict"
  23293. .PD 0
  23294. .IP "\fB\-mno\-branch\-predict\fR" 4
  23295. .IX Item "-mno-branch-predict"
  23296. .PD
  23297. Use (do not use) the probable-branch instructions, when static branch
  23298. prediction indicates a probable branch.
  23299. .IP "\fB\-mbase\-addresses\fR" 4
  23300. .IX Item "-mbase-addresses"
  23301. .PD 0
  23302. .IP "\fB\-mno\-base\-addresses\fR" 4
  23303. .IX Item "-mno-base-addresses"
  23304. .PD
  23305. Generate (do not generate) code that uses \fIbase addresses\fR. Using a
  23306. base address automatically generates a request (handled by the assembler
  23307. and the linker) for a constant to be set up in a global register. The
  23308. register is used for one or more base address requests within the range 0
  23309. to 255 from the value held in the register. The generally leads to short
  23310. and fast code, but the number of different data items that can be
  23311. addressed is limited. This means that a program that uses lots of static
  23312. data may require \fB\-mno\-base\-addresses\fR.
  23313. .IP "\fB\-msingle\-exit\fR" 4
  23314. .IX Item "-msingle-exit"
  23315. .PD 0
  23316. .IP "\fB\-mno\-single\-exit\fR" 4
  23317. .IX Item "-mno-single-exit"
  23318. .PD
  23319. Force (do not force) generated code to have a single exit point in each
  23320. function.
  23321. .PP
  23322. \fI\s-1MN10300\s0 Options\fR
  23323. .IX Subsection "MN10300 Options"
  23324. .PP
  23325. These \fB\-m\fR options are defined for Matsushita \s-1MN10300\s0 architectures:
  23326. .IP "\fB\-mmult\-bug\fR" 4
  23327. .IX Item "-mmult-bug"
  23328. Generate code to avoid bugs in the multiply instructions for the \s-1MN10300\s0
  23329. processors. This is the default.
  23330. .IP "\fB\-mno\-mult\-bug\fR" 4
  23331. .IX Item "-mno-mult-bug"
  23332. Do not generate code to avoid bugs in the multiply instructions for the
  23333. \&\s-1MN10300\s0 processors.
  23334. .IP "\fB\-mam33\fR" 4
  23335. .IX Item "-mam33"
  23336. Generate code using features specific to the \s-1AM33\s0 processor.
  23337. .IP "\fB\-mno\-am33\fR" 4
  23338. .IX Item "-mno-am33"
  23339. Do not generate code using features specific to the \s-1AM33\s0 processor. This
  23340. is the default.
  23341. .IP "\fB\-mam33\-2\fR" 4
  23342. .IX Item "-mam33-2"
  23343. Generate code using features specific to the \s-1AM33/2.0\s0 processor.
  23344. .IP "\fB\-mam34\fR" 4
  23345. .IX Item "-mam34"
  23346. Generate code using features specific to the \s-1AM34\s0 processor.
  23347. .IP "\fB\-mtune=\fR\fIcpu-type\fR" 4
  23348. .IX Item "-mtune=cpu-type"
  23349. Use the timing characteristics of the indicated \s-1CPU\s0 type when
  23350. scheduling instructions. This does not change the targeted processor
  23351. type. The \s-1CPU\s0 type must be one of \fBmn10300\fR, \fBam33\fR,
  23352. \&\fBam33\-2\fR or \fBam34\fR.
  23353. .IP "\fB\-mreturn\-pointer\-on\-d0\fR" 4
  23354. .IX Item "-mreturn-pointer-on-d0"
  23355. When generating a function that returns a pointer, return the pointer
  23356. in both \f(CW\*(C`a0\*(C'\fR and \f(CW\*(C`d0\*(C'\fR. Otherwise, the pointer is returned
  23357. only in \f(CW\*(C`a0\*(C'\fR, and attempts to call such functions without a prototype
  23358. result in errors. Note that this option is on by default; use
  23359. \&\fB\-mno\-return\-pointer\-on\-d0\fR to disable it.
  23360. .IP "\fB\-mno\-crt0\fR" 4
  23361. .IX Item "-mno-crt0"
  23362. Do not link in the C run-time initialization object file.
  23363. .IP "\fB\-mrelax\fR" 4
  23364. .IX Item "-mrelax"
  23365. Indicate to the linker that it should perform a relaxation optimization pass
  23366. to shorten branches, calls and absolute memory addresses. This option only
  23367. has an effect when used on the command line for the final link step.
  23368. .Sp
  23369. This option makes symbolic debugging impossible.
  23370. .IP "\fB\-mliw\fR" 4
  23371. .IX Item "-mliw"
  23372. Allow the compiler to generate \fILong Instruction Word\fR
  23373. instructions if the target is the \fB\s-1AM33\s0\fR or later. This is the
  23374. default. This option defines the preprocessor macro \f(CW\*(C`_\|_LIW_\|_\*(C'\fR.
  23375. .IP "\fB\-mno\-liw\fR" 4
  23376. .IX Item "-mno-liw"
  23377. Do not allow the compiler to generate \fILong Instruction Word\fR
  23378. instructions. This option defines the preprocessor macro
  23379. \&\f(CW\*(C`_\|_NO_LIW_\|_\*(C'\fR.
  23380. .IP "\fB\-msetlb\fR" 4
  23381. .IX Item "-msetlb"
  23382. Allow the compiler to generate the \fI\s-1SETLB\s0\fR and \fILcc\fR
  23383. instructions if the target is the \fB\s-1AM33\s0\fR or later. This is the
  23384. default. This option defines the preprocessor macro \f(CW\*(C`_\|_SETLB_\|_\*(C'\fR.
  23385. .IP "\fB\-mno\-setlb\fR" 4
  23386. .IX Item "-mno-setlb"
  23387. Do not allow the compiler to generate \fI\s-1SETLB\s0\fR or \fILcc\fR
  23388. instructions. This option defines the preprocessor macro
  23389. \&\f(CW\*(C`_\|_NO_SETLB_\|_\*(C'\fR.
  23390. .PP
  23391. \fIMoxie Options\fR
  23392. .IX Subsection "Moxie Options"
  23393. .IP "\fB\-meb\fR" 4
  23394. .IX Item "-meb"
  23395. Generate big-endian code. This is the default for \fBmoxie\-*\-*\fR
  23396. configurations.
  23397. .IP "\fB\-mel\fR" 4
  23398. .IX Item "-mel"
  23399. Generate little-endian code.
  23400. .IP "\fB\-mmul.x\fR" 4
  23401. .IX Item "-mmul.x"
  23402. Generate mul.x and umul.x instructions. This is the default for
  23403. \&\fBmoxiebox\-*\-*\fR configurations.
  23404. .IP "\fB\-mno\-crt0\fR" 4
  23405. .IX Item "-mno-crt0"
  23406. Do not link in the C run-time initialization object file.
  23407. .PP
  23408. \fI\s-1MSP430\s0 Options\fR
  23409. .IX Subsection "MSP430 Options"
  23410. .PP
  23411. These options are defined for the \s-1MSP430:\s0
  23412. .IP "\fB\-masm\-hex\fR" 4
  23413. .IX Item "-masm-hex"
  23414. Force assembly output to always use hex constants. Normally such
  23415. constants are signed decimals, but this option is available for
  23416. testsuite and/or aesthetic purposes.
  23417. .IP "\fB\-mmcu=\fR" 4
  23418. .IX Item "-mmcu="
  23419. Select the \s-1MCU\s0 to target. This is used to create a C preprocessor
  23420. symbol based upon the \s-1MCU\s0 name, converted to upper case and pre\- and
  23421. post-fixed with \fB_\|_\fR. This in turn is used by the
  23422. \&\fImsp430.h\fR header file to select an MCU-specific supplementary
  23423. header file.
  23424. .Sp
  23425. The option also sets the \s-1ISA\s0 to use. If the \s-1MCU\s0 name is one that is
  23426. known to only support the 430 \s-1ISA\s0 then that is selected, otherwise the
  23427. 430X \s-1ISA\s0 is selected. A generic \s-1MCU\s0 name of \fBmsp430\fR can also be
  23428. used to select the 430 \s-1ISA. \s0 Similarly the generic \fBmsp430x\fR \s-1MCU\s0
  23429. name selects the 430X \s-1ISA.\s0
  23430. .Sp
  23431. In addition an MCU-specific linker script is added to the linker
  23432. command line. The script's name is the name of the \s-1MCU\s0 with
  23433. \&\fI.ld\fR appended. Thus specifying \fB\-mmcu=xxx\fR on the \fBgcc\fR
  23434. command line defines the C preprocessor symbol \f(CW\*(C`_\|_XXX_\|_\*(C'\fR and
  23435. cause the linker to search for a script called \fIxxx.ld\fR.
  23436. .Sp
  23437. The \s-1ISA\s0 and hardware multiply supported for the different MCUs is hard-coded
  23438. into \s-1GCC. \s0 However, an external \fBdevices.csv\fR file can be used to
  23439. extend device support beyond those that have been hard-coded.
  23440. .Sp
  23441. \&\s-1GCC\s0 searches for the \fBdevices.csv\fR file using the following methods in the
  23442. given precedence order, where the first method takes precendence over the
  23443. second which takes precedence over the third.
  23444. .RS 4
  23445. .ie n .IP "Include path specified with ""\-I"" and ""\-L""" 4
  23446. .el .IP "Include path specified with \f(CW\-I\fR and \f(CW\-L\fR" 4
  23447. .IX Item "Include path specified with -I and -L"
  23448. \&\fBdevices.csv\fR will be searched for in each of the directories specified by
  23449. include paths and linker library search paths.
  23450. .IP "Path specified by the environment variable \fB\s-1MSP430_GCC_INCLUDE_DIR\s0\fR" 4
  23451. .IX Item "Path specified by the environment variable MSP430_GCC_INCLUDE_DIR"
  23452. Define the value of the global environment variable
  23453. \&\fB\s-1MSP430_GCC_INCLUDE_DIR\s0\fR
  23454. to the full path to the directory containing devices.csv, and \s-1GCC\s0 will search
  23455. this directory for devices.csv. If devices.csv is found, this directory will
  23456. also be registered as an include path, and linker library path. Header files
  23457. and linker scripts in this directory can therefore be used without manually
  23458. specifying \f(CW\*(C`\-I\*(C'\fR and \f(CW\*(C`\-L\*(C'\fR on the command line.
  23459. .IP "The \fBmsp430\-elf{,bare}/include/devices\fR directory" 4
  23460. .IX Item "The msp430-elf{,bare}/include/devices directory"
  23461. Finally, \s-1GCC\s0 will examine \fBmsp430\-elf{,bare}/include/devices\fR from the
  23462. toolchain root directory. This directory does not exist in a default
  23463. installation, but if the user has created it and copied \fBdevices.csv\fR
  23464. there, then the \s-1MCU\s0 data will be read. As above, this directory will
  23465. also be registered as an include path, and linker library path.
  23466. .RE
  23467. .RS 4
  23468. .Sp
  23469. If none of the above search methods find \fBdevices.csv\fR, then the
  23470. hard-coded \s-1MCU\s0 data is used.
  23471. .RE
  23472. .IP "\fB\-mwarn\-mcu\fR" 4
  23473. .IX Item "-mwarn-mcu"
  23474. .PD 0
  23475. .IP "\fB\-mno\-warn\-mcu\fR" 4
  23476. .IX Item "-mno-warn-mcu"
  23477. .PD
  23478. This option enables or disables warnings about conflicts between the
  23479. \&\s-1MCU\s0 name specified by the \fB\-mmcu\fR option and the \s-1ISA\s0 set by the
  23480. \&\fB\-mcpu\fR option and/or the hardware multiply support set by the
  23481. \&\fB\-mhwmult\fR option. It also toggles warnings about unrecognized
  23482. \&\s-1MCU\s0 names. This option is on by default.
  23483. .IP "\fB\-mcpu=\fR" 4
  23484. .IX Item "-mcpu="
  23485. Specifies the \s-1ISA\s0 to use. Accepted values are \fBmsp430\fR,
  23486. \&\fBmsp430x\fR and \fBmsp430xv2\fR. This option is deprecated. The
  23487. \&\fB\-mmcu=\fR option should be used to select the \s-1ISA.\s0
  23488. .IP "\fB\-msim\fR" 4
  23489. .IX Item "-msim"
  23490. Link to the simulator runtime libraries and linker script. Overrides
  23491. any scripts that would be selected by the \fB\-mmcu=\fR option.
  23492. .IP "\fB\-mlarge\fR" 4
  23493. .IX Item "-mlarge"
  23494. Use large-model addressing (20\-bit pointers, 32\-bit \f(CW\*(C`size_t\*(C'\fR).
  23495. .IP "\fB\-msmall\fR" 4
  23496. .IX Item "-msmall"
  23497. Use small-model addressing (16\-bit pointers, 16\-bit \f(CW\*(C`size_t\*(C'\fR).
  23498. .IP "\fB\-mrelax\fR" 4
  23499. .IX Item "-mrelax"
  23500. This option is passed to the assembler and linker, and allows the
  23501. linker to perform certain optimizations that cannot be done until
  23502. the final link.
  23503. .IP "\fBmhwmult=\fR" 4
  23504. .IX Item "mhwmult="
  23505. Describes the type of hardware multiply supported by the target.
  23506. Accepted values are \fBnone\fR for no hardware multiply, \fB16bit\fR
  23507. for the original 16\-bit\-only multiply supported by early MCUs.
  23508. \&\fB32bit\fR for the 16/32\-bit multiply supported by later MCUs and
  23509. \&\fBf5series\fR for the 16/32\-bit multiply supported by F5\-series MCUs.
  23510. A value of \fBauto\fR can also be given. This tells \s-1GCC\s0 to deduce
  23511. the hardware multiply support based upon the \s-1MCU\s0 name provided by the
  23512. \&\fB\-mmcu\fR option. If no \fB\-mmcu\fR option is specified or if
  23513. the \s-1MCU\s0 name is not recognized then no hardware multiply support is
  23514. assumed. \f(CW\*(C`auto\*(C'\fR is the default setting.
  23515. .Sp
  23516. Hardware multiplies are normally performed by calling a library
  23517. routine. This saves space in the generated code. When compiling at
  23518. \&\fB\-O3\fR or higher however the hardware multiplier is invoked
  23519. inline. This makes for bigger, but faster code.
  23520. .Sp
  23521. The hardware multiply routines disable interrupts whilst running and
  23522. restore the previous interrupt state when they finish. This makes
  23523. them safe to use inside interrupt handlers as well as in normal code.
  23524. .IP "\fB\-minrt\fR" 4
  23525. .IX Item "-minrt"
  23526. Enable the use of a minimum runtime environment \- no static
  23527. initializers or constructors. This is intended for memory-constrained
  23528. devices. The compiler includes special symbols in some objects
  23529. that tell the linker and runtime which code fragments are required.
  23530. .IP "\fB\-mtiny\-printf\fR" 4
  23531. .IX Item "-mtiny-printf"
  23532. Enable reduced code size \f(CW\*(C`printf\*(C'\fR and \f(CW\*(C`puts\*(C'\fR library functions.
  23533. The \fBtiny\fR implementations of these functions are not reentrant, so
  23534. must be used with caution in multi-threaded applications.
  23535. .Sp
  23536. Support for streams has been removed and the string to be printed will
  23537. always be sent to stdout via the \f(CW\*(C`write\*(C'\fR syscall. The string is not
  23538. buffered before it is sent to write.
  23539. .Sp
  23540. This option requires Newlib Nano \s-1IO,\s0 so \s-1GCC\s0 must be configured with
  23541. \&\fB\-\-enable\-newlib\-nano\-formatted\-io\fR.
  23542. .IP "\fB\-mcode\-region=\fR" 4
  23543. .IX Item "-mcode-region="
  23544. .PD 0
  23545. .IP "\fB\-mdata\-region=\fR" 4
  23546. .IX Item "-mdata-region="
  23547. .PD
  23548. These options tell the compiler where to place functions and data that
  23549. do not have one of the \f(CW\*(C`lower\*(C'\fR, \f(CW\*(C`upper\*(C'\fR, \f(CW\*(C`either\*(C'\fR or
  23550. \&\f(CW\*(C`section\*(C'\fR attributes. Possible values are \f(CW\*(C`lower\*(C'\fR,
  23551. \&\f(CW\*(C`upper\*(C'\fR, \f(CW\*(C`either\*(C'\fR or \f(CW\*(C`any\*(C'\fR. The first three behave
  23552. like the corresponding attribute. The fourth possible value \-
  23553. \&\f(CW\*(C`any\*(C'\fR \- is the default. It leaves placement entirely up to the
  23554. linker script and how it assigns the standard sections
  23555. (\f(CW\*(C`.text\*(C'\fR, \f(CW\*(C`.data\*(C'\fR, etc) to the memory regions.
  23556. .IP "\fB\-msilicon\-errata=\fR" 4
  23557. .IX Item "-msilicon-errata="
  23558. This option passes on a request to assembler to enable the fixes for
  23559. the named silicon errata.
  23560. .IP "\fB\-msilicon\-errata\-warn=\fR" 4
  23561. .IX Item "-msilicon-errata-warn="
  23562. This option passes on a request to the assembler to enable warning
  23563. messages when a silicon errata might need to be applied.
  23564. .IP "\fB\-mwarn\-devices\-csv\fR" 4
  23565. .IX Item "-mwarn-devices-csv"
  23566. .PD 0
  23567. .IP "\fB\-mno\-warn\-devices\-csv\fR" 4
  23568. .IX Item "-mno-warn-devices-csv"
  23569. .PD
  23570. Warn if \fBdevices.csv\fR is not found or there are problem parsing it
  23571. (default: on).
  23572. .PP
  23573. \fI\s-1NDS32\s0 Options\fR
  23574. .IX Subsection "NDS32 Options"
  23575. .PP
  23576. These options are defined for \s-1NDS32\s0 implementations:
  23577. .IP "\fB\-mbig\-endian\fR" 4
  23578. .IX Item "-mbig-endian"
  23579. Generate code in big-endian mode.
  23580. .IP "\fB\-mlittle\-endian\fR" 4
  23581. .IX Item "-mlittle-endian"
  23582. Generate code in little-endian mode.
  23583. .IP "\fB\-mreduced\-regs\fR" 4
  23584. .IX Item "-mreduced-regs"
  23585. Use reduced-set registers for register allocation.
  23586. .IP "\fB\-mfull\-regs\fR" 4
  23587. .IX Item "-mfull-regs"
  23588. Use full-set registers for register allocation.
  23589. .IP "\fB\-mcmov\fR" 4
  23590. .IX Item "-mcmov"
  23591. Generate conditional move instructions.
  23592. .IP "\fB\-mno\-cmov\fR" 4
  23593. .IX Item "-mno-cmov"
  23594. Do not generate conditional move instructions.
  23595. .IP "\fB\-mext\-perf\fR" 4
  23596. .IX Item "-mext-perf"
  23597. Generate performance extension instructions.
  23598. .IP "\fB\-mno\-ext\-perf\fR" 4
  23599. .IX Item "-mno-ext-perf"
  23600. Do not generate performance extension instructions.
  23601. .IP "\fB\-mext\-perf2\fR" 4
  23602. .IX Item "-mext-perf2"
  23603. Generate performance extension 2 instructions.
  23604. .IP "\fB\-mno\-ext\-perf2\fR" 4
  23605. .IX Item "-mno-ext-perf2"
  23606. Do not generate performance extension 2 instructions.
  23607. .IP "\fB\-mext\-string\fR" 4
  23608. .IX Item "-mext-string"
  23609. Generate string extension instructions.
  23610. .IP "\fB\-mno\-ext\-string\fR" 4
  23611. .IX Item "-mno-ext-string"
  23612. Do not generate string extension instructions.
  23613. .IP "\fB\-mv3push\fR" 4
  23614. .IX Item "-mv3push"
  23615. Generate v3 push25/pop25 instructions.
  23616. .IP "\fB\-mno\-v3push\fR" 4
  23617. .IX Item "-mno-v3push"
  23618. Do not generate v3 push25/pop25 instructions.
  23619. .IP "\fB\-m16\-bit\fR" 4
  23620. .IX Item "-m16-bit"
  23621. Generate 16\-bit instructions.
  23622. .IP "\fB\-mno\-16\-bit\fR" 4
  23623. .IX Item "-mno-16-bit"
  23624. Do not generate 16\-bit instructions.
  23625. .IP "\fB\-misr\-vector\-size=\fR\fInum\fR" 4
  23626. .IX Item "-misr-vector-size=num"
  23627. Specify the size of each interrupt vector, which must be 4 or 16.
  23628. .IP "\fB\-mcache\-block\-size=\fR\fInum\fR" 4
  23629. .IX Item "-mcache-block-size=num"
  23630. Specify the size of each cache block,
  23631. which must be a power of 2 between 4 and 512.
  23632. .IP "\fB\-march=\fR\fIarch\fR" 4
  23633. .IX Item "-march=arch"
  23634. Specify the name of the target architecture.
  23635. .IP "\fB\-mcmodel=\fR\fIcode-model\fR" 4
  23636. .IX Item "-mcmodel=code-model"
  23637. Set the code model to one of
  23638. .RS 4
  23639. .IP "\fBsmall\fR" 4
  23640. .IX Item "small"
  23641. All the data and read-only data segments must be within 512KB addressing space.
  23642. The text segment must be within 16MB addressing space.
  23643. .IP "\fBmedium\fR" 4
  23644. .IX Item "medium"
  23645. The data segment must be within 512KB while the read-only data segment can be
  23646. within 4GB addressing space. The text segment should be still within 16MB
  23647. addressing space.
  23648. .IP "\fBlarge\fR" 4
  23649. .IX Item "large"
  23650. All the text and data segments can be within 4GB addressing space.
  23651. .RE
  23652. .RS 4
  23653. .RE
  23654. .IP "\fB\-mctor\-dtor\fR" 4
  23655. .IX Item "-mctor-dtor"
  23656. Enable constructor/destructor feature.
  23657. .IP "\fB\-mrelax\fR" 4
  23658. .IX Item "-mrelax"
  23659. Guide linker to relax instructions.
  23660. .PP
  23661. \fINios \s-1II\s0 Options\fR
  23662. .IX Subsection "Nios II Options"
  23663. .PP
  23664. These are the options defined for the Altera Nios \s-1II\s0 processor.
  23665. .IP "\fB\-G\fR \fInum\fR" 4
  23666. .IX Item "-G num"
  23667. Put global and static objects less than or equal to \fInum\fR bytes
  23668. into the small data or \s-1BSS\s0 sections instead of the normal data or \s-1BSS\s0
  23669. sections. The default value of \fInum\fR is 8.
  23670. .IP "\fB\-mgpopt=\fR\fIoption\fR" 4
  23671. .IX Item "-mgpopt=option"
  23672. .PD 0
  23673. .IP "\fB\-mgpopt\fR" 4
  23674. .IX Item "-mgpopt"
  23675. .IP "\fB\-mno\-gpopt\fR" 4
  23676. .IX Item "-mno-gpopt"
  23677. .PD
  23678. Generate (do not generate) GP-relative accesses. The following
  23679. \&\fIoption\fR names are recognized:
  23680. .RS 4
  23681. .IP "\fBnone\fR" 4
  23682. .IX Item "none"
  23683. Do not generate GP-relative accesses.
  23684. .IP "\fBlocal\fR" 4
  23685. .IX Item "local"
  23686. Generate GP-relative accesses for small data objects that are not
  23687. external, weak, or uninitialized common symbols.
  23688. Also use GP-relative addressing for objects that
  23689. have been explicitly placed in a small data section via a \f(CW\*(C`section\*(C'\fR
  23690. attribute.
  23691. .IP "\fBglobal\fR" 4
  23692. .IX Item "global"
  23693. As for \fBlocal\fR, but also generate GP-relative accesses for
  23694. small data objects that are external, weak, or common. If you use this option,
  23695. you must ensure that all parts of your program (including libraries) are
  23696. compiled with the same \fB\-G\fR setting.
  23697. .IP "\fBdata\fR" 4
  23698. .IX Item "data"
  23699. Generate GP-relative accesses for all data objects in the program. If you
  23700. use this option, the entire data and \s-1BSS\s0 segments
  23701. of your program must fit in 64K of memory and you must use an appropriate
  23702. linker script to allocate them within the addressable range of the
  23703. global pointer.
  23704. .IP "\fBall\fR" 4
  23705. .IX Item "all"
  23706. Generate GP-relative addresses for function pointers as well as data
  23707. pointers. If you use this option, the entire text, data, and \s-1BSS\s0 segments
  23708. of your program must fit in 64K of memory and you must use an appropriate
  23709. linker script to allocate them within the addressable range of the
  23710. global pointer.
  23711. .RE
  23712. .RS 4
  23713. .Sp
  23714. \&\fB\-mgpopt\fR is equivalent to \fB\-mgpopt=local\fR, and
  23715. \&\fB\-mno\-gpopt\fR is equivalent to \fB\-mgpopt=none\fR.
  23716. .Sp
  23717. The default is \fB\-mgpopt\fR except when \fB\-fpic\fR or
  23718. \&\fB\-fPIC\fR is specified to generate position-independent code.
  23719. Note that the Nios \s-1II ABI\s0 does not permit GP-relative accesses from
  23720. shared libraries.
  23721. .Sp
  23722. You may need to specify \fB\-mno\-gpopt\fR explicitly when building
  23723. programs that include large amounts of small data, including large
  23724. \&\s-1GOT\s0 data sections. In this case, the 16\-bit offset for GP-relative
  23725. addressing may not be large enough to allow access to the entire
  23726. small data section.
  23727. .RE
  23728. .IP "\fB\-mgprel\-sec=\fR\fIregexp\fR" 4
  23729. .IX Item "-mgprel-sec=regexp"
  23730. This option specifies additional section names that can be accessed via
  23731. GP-relative addressing. It is most useful in conjunction with
  23732. \&\f(CW\*(C`section\*(C'\fR attributes on variable declarations and a custom linker script.
  23733. The \fIregexp\fR is a \s-1POSIX\s0 Extended Regular Expression.
  23734. .Sp
  23735. This option does not affect the behavior of the \fB\-G\fR option, and
  23736. the specified sections are in addition to the standard \f(CW\*(C`.sdata\*(C'\fR
  23737. and \f(CW\*(C`.sbss\*(C'\fR small-data sections that are recognized by \fB\-mgpopt\fR.
  23738. .IP "\fB\-mr0rel\-sec=\fR\fIregexp\fR" 4
  23739. .IX Item "-mr0rel-sec=regexp"
  23740. This option specifies names of sections that can be accessed via a
  23741. 16\-bit offset from \f(CW\*(C`r0\*(C'\fR; that is, in the low 32K or high 32K
  23742. of the 32\-bit address space. It is most useful in conjunction with
  23743. \&\f(CW\*(C`section\*(C'\fR attributes on variable declarations and a custom linker script.
  23744. The \fIregexp\fR is a \s-1POSIX\s0 Extended Regular Expression.
  23745. .Sp
  23746. In contrast to the use of GP-relative addressing for small data,
  23747. zero-based addressing is never generated by default and there are no
  23748. conventional section names used in standard linker scripts for sections
  23749. in the low or high areas of memory.
  23750. .IP "\fB\-mel\fR" 4
  23751. .IX Item "-mel"
  23752. .PD 0
  23753. .IP "\fB\-meb\fR" 4
  23754. .IX Item "-meb"
  23755. .PD
  23756. Generate little-endian (default) or big-endian (experimental) code,
  23757. respectively.
  23758. .IP "\fB\-march=\fR\fIarch\fR" 4
  23759. .IX Item "-march=arch"
  23760. This specifies the name of the target Nios \s-1II\s0 architecture. \s-1GCC\s0 uses this
  23761. name to determine what kind of instructions it can emit when generating
  23762. assembly code. Permissible names are: \fBr1\fR, \fBr2\fR.
  23763. .Sp
  23764. The preprocessor macro \f(CW\*(C`_\|_nios2_arch_\|_\*(C'\fR is available to programs,
  23765. with value 1 or 2, indicating the targeted \s-1ISA\s0 level.
  23766. .IP "\fB\-mbypass\-cache\fR" 4
  23767. .IX Item "-mbypass-cache"
  23768. .PD 0
  23769. .IP "\fB\-mno\-bypass\-cache\fR" 4
  23770. .IX Item "-mno-bypass-cache"
  23771. .PD
  23772. Force all load and store instructions to always bypass cache by
  23773. using I/O variants of the instructions. The default is not to
  23774. bypass the cache.
  23775. .IP "\fB\-mno\-cache\-volatile\fR" 4
  23776. .IX Item "-mno-cache-volatile"
  23777. .PD 0
  23778. .IP "\fB\-mcache\-volatile\fR" 4
  23779. .IX Item "-mcache-volatile"
  23780. .PD
  23781. Volatile memory access bypass the cache using the I/O variants of
  23782. the load and store instructions. The default is not to bypass the cache.
  23783. .IP "\fB\-mno\-fast\-sw\-div\fR" 4
  23784. .IX Item "-mno-fast-sw-div"
  23785. .PD 0
  23786. .IP "\fB\-mfast\-sw\-div\fR" 4
  23787. .IX Item "-mfast-sw-div"
  23788. .PD
  23789. Do not use table-based fast divide for small numbers. The default
  23790. is to use the fast divide at \fB\-O3\fR and above.
  23791. .IP "\fB\-mno\-hw\-mul\fR" 4
  23792. .IX Item "-mno-hw-mul"
  23793. .PD 0
  23794. .IP "\fB\-mhw\-mul\fR" 4
  23795. .IX Item "-mhw-mul"
  23796. .IP "\fB\-mno\-hw\-mulx\fR" 4
  23797. .IX Item "-mno-hw-mulx"
  23798. .IP "\fB\-mhw\-mulx\fR" 4
  23799. .IX Item "-mhw-mulx"
  23800. .IP "\fB\-mno\-hw\-div\fR" 4
  23801. .IX Item "-mno-hw-div"
  23802. .IP "\fB\-mhw\-div\fR" 4
  23803. .IX Item "-mhw-div"
  23804. .PD
  23805. Enable or disable emitting \f(CW\*(C`mul\*(C'\fR, \f(CW\*(C`mulx\*(C'\fR and \f(CW\*(C`div\*(C'\fR family of
  23806. instructions by the compiler. The default is to emit \f(CW\*(C`mul\*(C'\fR
  23807. and not emit \f(CW\*(C`div\*(C'\fR and \f(CW\*(C`mulx\*(C'\fR.
  23808. .IP "\fB\-mbmx\fR" 4
  23809. .IX Item "-mbmx"
  23810. .PD 0
  23811. .IP "\fB\-mno\-bmx\fR" 4
  23812. .IX Item "-mno-bmx"
  23813. .IP "\fB\-mcdx\fR" 4
  23814. .IX Item "-mcdx"
  23815. .IP "\fB\-mno\-cdx\fR" 4
  23816. .IX Item "-mno-cdx"
  23817. .PD
  23818. Enable or disable generation of Nios \s-1II R2 BMX \s0(bit manipulation) and
  23819. \&\s-1CDX \s0(code density) instructions. Enabling these instructions also
  23820. requires \fB\-march=r2\fR. Since these instructions are optional
  23821. extensions to the R2 architecture, the default is not to emit them.
  23822. .IP "\fB\-mcustom\-\fR\fIinsn\fR\fB=\fR\fIN\fR" 4
  23823. .IX Item "-mcustom-insn=N"
  23824. .PD 0
  23825. .IP "\fB\-mno\-custom\-\fR\fIinsn\fR" 4
  23826. .IX Item "-mno-custom-insn"
  23827. .PD
  23828. Each \fB\-mcustom\-\fR\fIinsn\fR\fB=\fR\fIN\fR option enables use of a
  23829. custom instruction with encoding \fIN\fR when generating code that uses
  23830. \&\fIinsn\fR. For example, \fB\-mcustom\-fadds=253\fR generates custom
  23831. instruction 253 for single-precision floating-point add operations instead
  23832. of the default behavior of using a library call.
  23833. .Sp
  23834. The following values of \fIinsn\fR are supported. Except as otherwise
  23835. noted, floating-point operations are expected to be implemented with
  23836. normal \s-1IEEE 754\s0 semantics and correspond directly to the C operators or the
  23837. equivalent \s-1GCC\s0 built-in functions.
  23838. .Sp
  23839. Single-precision floating point:
  23840. .RS 4
  23841. .IP "\fBfadds\fR, \fBfsubs\fR, \fBfdivs\fR, \fBfmuls\fR" 4
  23842. .IX Item "fadds, fsubs, fdivs, fmuls"
  23843. Binary arithmetic operations.
  23844. .IP "\fBfnegs\fR" 4
  23845. .IX Item "fnegs"
  23846. Unary negation.
  23847. .IP "\fBfabss\fR" 4
  23848. .IX Item "fabss"
  23849. Unary absolute value.
  23850. .IP "\fBfcmpeqs\fR, \fBfcmpges\fR, \fBfcmpgts\fR, \fBfcmples\fR, \fBfcmplts\fR, \fBfcmpnes\fR" 4
  23851. .IX Item "fcmpeqs, fcmpges, fcmpgts, fcmples, fcmplts, fcmpnes"
  23852. Comparison operations.
  23853. .IP "\fBfmins\fR, \fBfmaxs\fR" 4
  23854. .IX Item "fmins, fmaxs"
  23855. Floating-point minimum and maximum. These instructions are only
  23856. generated if \fB\-ffinite\-math\-only\fR is specified.
  23857. .IP "\fBfsqrts\fR" 4
  23858. .IX Item "fsqrts"
  23859. Unary square root operation.
  23860. .IP "\fBfcoss\fR, \fBfsins\fR, \fBftans\fR, \fBfatans\fR, \fBfexps\fR, \fBflogs\fR" 4
  23861. .IX Item "fcoss, fsins, ftans, fatans, fexps, flogs"
  23862. Floating-point trigonometric and exponential functions. These instructions
  23863. are only generated if \fB\-funsafe\-math\-optimizations\fR is also specified.
  23864. .RE
  23865. .RS 4
  23866. .Sp
  23867. Double-precision floating point:
  23868. .IP "\fBfaddd\fR, \fBfsubd\fR, \fBfdivd\fR, \fBfmuld\fR" 4
  23869. .IX Item "faddd, fsubd, fdivd, fmuld"
  23870. Binary arithmetic operations.
  23871. .IP "\fBfnegd\fR" 4
  23872. .IX Item "fnegd"
  23873. Unary negation.
  23874. .IP "\fBfabsd\fR" 4
  23875. .IX Item "fabsd"
  23876. Unary absolute value.
  23877. .IP "\fBfcmpeqd\fR, \fBfcmpged\fR, \fBfcmpgtd\fR, \fBfcmpled\fR, \fBfcmpltd\fR, \fBfcmpned\fR" 4
  23878. .IX Item "fcmpeqd, fcmpged, fcmpgtd, fcmpled, fcmpltd, fcmpned"
  23879. Comparison operations.
  23880. .IP "\fBfmind\fR, \fBfmaxd\fR" 4
  23881. .IX Item "fmind, fmaxd"
  23882. Double-precision minimum and maximum. These instructions are only
  23883. generated if \fB\-ffinite\-math\-only\fR is specified.
  23884. .IP "\fBfsqrtd\fR" 4
  23885. .IX Item "fsqrtd"
  23886. Unary square root operation.
  23887. .IP "\fBfcosd\fR, \fBfsind\fR, \fBftand\fR, \fBfatand\fR, \fBfexpd\fR, \fBflogd\fR" 4
  23888. .IX Item "fcosd, fsind, ftand, fatand, fexpd, flogd"
  23889. Double-precision trigonometric and exponential functions. These instructions
  23890. are only generated if \fB\-funsafe\-math\-optimizations\fR is also specified.
  23891. .RE
  23892. .RS 4
  23893. .Sp
  23894. Conversions:
  23895. .IP "\fBfextsd\fR" 4
  23896. .IX Item "fextsd"
  23897. Conversion from single precision to double precision.
  23898. .IP "\fBftruncds\fR" 4
  23899. .IX Item "ftruncds"
  23900. Conversion from double precision to single precision.
  23901. .IP "\fBfixsi\fR, \fBfixsu\fR, \fBfixdi\fR, \fBfixdu\fR" 4
  23902. .IX Item "fixsi, fixsu, fixdi, fixdu"
  23903. Conversion from floating point to signed or unsigned integer types, with
  23904. truncation towards zero.
  23905. .IP "\fBround\fR" 4
  23906. .IX Item "round"
  23907. Conversion from single-precision floating point to signed integer,
  23908. rounding to the nearest integer and ties away from zero.
  23909. This corresponds to the \f(CW\*(C`_\|_builtin_lroundf\*(C'\fR function when
  23910. \&\fB\-fno\-math\-errno\fR is used.
  23911. .IP "\fBfloatis\fR, \fBfloatus\fR, \fBfloatid\fR, \fBfloatud\fR" 4
  23912. .IX Item "floatis, floatus, floatid, floatud"
  23913. Conversion from signed or unsigned integer types to floating-point types.
  23914. .RE
  23915. .RS 4
  23916. .Sp
  23917. In addition, all of the following transfer instructions for internal
  23918. registers X and Y must be provided to use any of the double-precision
  23919. floating-point instructions. Custom instructions taking two
  23920. double-precision source operands expect the first operand in the
  23921. 64\-bit register X. The other operand (or only operand of a unary
  23922. operation) is given to the custom arithmetic instruction with the
  23923. least significant half in source register \fIsrc1\fR and the most
  23924. significant half in \fIsrc2\fR. A custom instruction that returns a
  23925. double-precision result returns the most significant 32 bits in the
  23926. destination register and the other half in 32\-bit register Y.
  23927. \&\s-1GCC\s0 automatically generates the necessary code sequences to write
  23928. register X and/or read register Y when double-precision floating-point
  23929. instructions are used.
  23930. .IP "\fBfwrx\fR" 4
  23931. .IX Item "fwrx"
  23932. Write \fIsrc1\fR into the least significant half of X and \fIsrc2\fR into
  23933. the most significant half of X.
  23934. .IP "\fBfwry\fR" 4
  23935. .IX Item "fwry"
  23936. Write \fIsrc1\fR into Y.
  23937. .IP "\fBfrdxhi\fR, \fBfrdxlo\fR" 4
  23938. .IX Item "frdxhi, frdxlo"
  23939. Read the most or least (respectively) significant half of X and store it in
  23940. \&\fIdest\fR.
  23941. .IP "\fBfrdy\fR" 4
  23942. .IX Item "frdy"
  23943. Read the value of Y and store it into \fIdest\fR.
  23944. .RE
  23945. .RS 4
  23946. .Sp
  23947. Note that you can gain more local control over generation of Nios \s-1II\s0 custom
  23948. instructions by using the \f(CW\*(C`target("custom\-\f(CIinsn\f(CW=\f(CIN\f(CW")\*(C'\fR
  23949. and \f(CW\*(C`target("no\-custom\-\f(CIinsn\f(CW")\*(C'\fR function attributes
  23950. or pragmas.
  23951. .RE
  23952. .IP "\fB\-mcustom\-fpu\-cfg=\fR\fIname\fR" 4
  23953. .IX Item "-mcustom-fpu-cfg=name"
  23954. This option enables a predefined, named set of custom instruction encodings
  23955. (see \fB\-mcustom\-\fR\fIinsn\fR above).
  23956. Currently, the following sets are defined:
  23957. .Sp
  23958. \&\fB\-mcustom\-fpu\-cfg=60\-1\fR is equivalent to:
  23959. \&\fB\-mcustom\-fmuls=252
  23960. \&\-mcustom\-fadds=253
  23961. \&\-mcustom\-fsubs=254
  23962. \&\-fsingle\-precision\-constant\fR
  23963. .Sp
  23964. \&\fB\-mcustom\-fpu\-cfg=60\-2\fR is equivalent to:
  23965. \&\fB\-mcustom\-fmuls=252
  23966. \&\-mcustom\-fadds=253
  23967. \&\-mcustom\-fsubs=254
  23968. \&\-mcustom\-fdivs=255
  23969. \&\-fsingle\-precision\-constant\fR
  23970. .Sp
  23971. \&\fB\-mcustom\-fpu\-cfg=72\-3\fR is equivalent to:
  23972. \&\fB\-mcustom\-floatus=243
  23973. \&\-mcustom\-fixsi=244
  23974. \&\-mcustom\-floatis=245
  23975. \&\-mcustom\-fcmpgts=246
  23976. \&\-mcustom\-fcmples=249
  23977. \&\-mcustom\-fcmpeqs=250
  23978. \&\-mcustom\-fcmpnes=251
  23979. \&\-mcustom\-fmuls=252
  23980. \&\-mcustom\-fadds=253
  23981. \&\-mcustom\-fsubs=254
  23982. \&\-mcustom\-fdivs=255
  23983. \&\-fsingle\-precision\-constant\fR
  23984. .Sp
  23985. Custom instruction assignments given by individual
  23986. \&\fB\-mcustom\-\fR\fIinsn\fR\fB=\fR options override those given by
  23987. \&\fB\-mcustom\-fpu\-cfg=\fR, regardless of the
  23988. order of the options on the command line.
  23989. .Sp
  23990. Note that you can gain more local control over selection of a \s-1FPU\s0
  23991. configuration by using the \f(CW\*(C`target("custom\-fpu\-cfg=\f(CIname\f(CW")\*(C'\fR
  23992. function attribute
  23993. or pragma.
  23994. .PP
  23995. These additional \fB\-m\fR options are available for the Altera Nios \s-1II
  23996. ELF \s0(bare-metal) target:
  23997. .IP "\fB\-mhal\fR" 4
  23998. .IX Item "-mhal"
  23999. Link with \s-1HAL BSP. \s0 This suppresses linking with the GCC-provided C runtime
  24000. startup and termination code, and is typically used in conjunction with
  24001. \&\fB\-msys\-crt0=\fR to specify the location of the alternate startup code
  24002. provided by the \s-1HAL BSP.\s0
  24003. .IP "\fB\-msmallc\fR" 4
  24004. .IX Item "-msmallc"
  24005. Link with a limited version of the C library, \fB\-lsmallc\fR, rather than
  24006. Newlib.
  24007. .IP "\fB\-msys\-crt0=\fR\fIstartfile\fR" 4
  24008. .IX Item "-msys-crt0=startfile"
  24009. \&\fIstartfile\fR is the file name of the startfile (crt0) to use
  24010. when linking. This option is only useful in conjunction with \fB\-mhal\fR.
  24011. .IP "\fB\-msys\-lib=\fR\fIsystemlib\fR" 4
  24012. .IX Item "-msys-lib=systemlib"
  24013. \&\fIsystemlib\fR is the library name of the library that provides
  24014. low-level system calls required by the C library,
  24015. e.g. \f(CW\*(C`read\*(C'\fR and \f(CW\*(C`write\*(C'\fR.
  24016. This option is typically used to link with a library provided by a \s-1HAL BSP.\s0
  24017. .PP
  24018. \fINvidia \s-1PTX\s0 Options\fR
  24019. .IX Subsection "Nvidia PTX Options"
  24020. .PP
  24021. These options are defined for Nvidia \s-1PTX:\s0
  24022. .IP "\fB\-m32\fR" 4
  24023. .IX Item "-m32"
  24024. .PD 0
  24025. .IP "\fB\-m64\fR" 4
  24026. .IX Item "-m64"
  24027. .PD
  24028. Generate code for 32\-bit or 64\-bit \s-1ABI.\s0
  24029. .IP "\fB\-misa=\fR\fIISA-string\fR" 4
  24030. .IX Item "-misa=ISA-string"
  24031. Generate code for given the specified \s-1PTX ISA \s0(e.g. \fBsm_35\fR). \s-1ISA\s0
  24032. strings must be lower-case. Valid \s-1ISA\s0 strings include \fBsm_30\fR and
  24033. \&\fBsm_35\fR. The default \s-1ISA\s0 is sm_30.
  24034. .IP "\fB\-mmainkernel\fR" 4
  24035. .IX Item "-mmainkernel"
  24036. Link in code for a _\|_main kernel. This is for stand-alone instead of
  24037. offloading execution.
  24038. .IP "\fB\-moptimize\fR" 4
  24039. .IX Item "-moptimize"
  24040. Apply partitioned execution optimizations. This is the default when any
  24041. level of optimization is selected.
  24042. .IP "\fB\-msoft\-stack\fR" 4
  24043. .IX Item "-msoft-stack"
  24044. Generate code that does not use \f(CW\*(C`.local\*(C'\fR memory
  24045. directly for stack storage. Instead, a per-warp stack pointer is
  24046. maintained explicitly. This enables variable-length stack allocation (with
  24047. variable-length arrays or \f(CW\*(C`alloca\*(C'\fR), and when global memory is used for
  24048. underlying storage, makes it possible to access automatic variables from other
  24049. threads, or with atomic instructions. This code generation variant is used
  24050. for OpenMP offloading, but the option is exposed on its own for the purpose
  24051. of testing the compiler; to generate code suitable for linking into programs
  24052. using OpenMP offloading, use option \fB\-mgomp\fR.
  24053. .IP "\fB\-muniform\-simt\fR" 4
  24054. .IX Item "-muniform-simt"
  24055. Switch to code generation variant that allows to execute all threads in each
  24056. warp, while maintaining memory state and side effects as if only one thread
  24057. in each warp was active outside of OpenMP \s-1SIMD\s0 regions. All atomic operations
  24058. and calls to runtime (malloc, free, vprintf) are conditionally executed (iff
  24059. current lane index equals the master lane index), and the register being
  24060. assigned is copied via a shuffle instruction from the master lane. Outside of
  24061. \&\s-1SIMD\s0 regions lane 0 is the master; inside, each thread sees itself as the
  24062. master. Shared memory array \f(CW\*(C`int _\|_nvptx_uni[]\*(C'\fR stores all-zeros or
  24063. all-ones bitmasks for each warp, indicating current mode (0 outside of \s-1SIMD\s0
  24064. regions). Each thread can bitwise-and the bitmask at position \f(CW\*(C`tid.y\*(C'\fR
  24065. with current lane index to compute the master lane index.
  24066. .IP "\fB\-mgomp\fR" 4
  24067. .IX Item "-mgomp"
  24068. Generate code for use in OpenMP offloading: enables \fB\-msoft\-stack\fR and
  24069. \&\fB\-muniform\-simt\fR options, and selects corresponding multilib variant.
  24070. .PP
  24071. \fIOpenRISC Options\fR
  24072. .IX Subsection "OpenRISC Options"
  24073. .PP
  24074. These options are defined for OpenRISC:
  24075. .IP "\fB\-mboard=\fR\fIname\fR" 4
  24076. .IX Item "-mboard=name"
  24077. Configure a board specific runtime. This will be passed to the linker for
  24078. newlib board library linking. The default is \f(CW\*(C`or1ksim\*(C'\fR.
  24079. .IP "\fB\-mnewlib\fR" 4
  24080. .IX Item "-mnewlib"
  24081. This option is ignored; it is for compatibility purposes only. This used to
  24082. select linker and preprocessor options for use with newlib.
  24083. .IP "\fB\-msoft\-div\fR" 4
  24084. .IX Item "-msoft-div"
  24085. .PD 0
  24086. .IP "\fB\-mhard\-div\fR" 4
  24087. .IX Item "-mhard-div"
  24088. .PD
  24089. Select software or hardware divide (\f(CW\*(C`l.div\*(C'\fR, \f(CW\*(C`l.divu\*(C'\fR) instructions.
  24090. This default is hardware divide.
  24091. .IP "\fB\-msoft\-mul\fR" 4
  24092. .IX Item "-msoft-mul"
  24093. .PD 0
  24094. .IP "\fB\-mhard\-mul\fR" 4
  24095. .IX Item "-mhard-mul"
  24096. .PD
  24097. Select software or hardware multiply (\f(CW\*(C`l.mul\*(C'\fR, \f(CW\*(C`l.muli\*(C'\fR) instructions.
  24098. This default is hardware multiply.
  24099. .IP "\fB\-msoft\-float\fR" 4
  24100. .IX Item "-msoft-float"
  24101. .PD 0
  24102. .IP "\fB\-mhard\-float\fR" 4
  24103. .IX Item "-mhard-float"
  24104. .PD
  24105. Select software or hardware for floating point operations.
  24106. The default is software.
  24107. .IP "\fB\-mdouble\-float\fR" 4
  24108. .IX Item "-mdouble-float"
  24109. When \fB\-mhard\-float\fR is selected, enables generation of double-precision
  24110. floating point instructions. By default functions from \fIlibgcc\fR are used
  24111. to perform double-precision floating point operations.
  24112. .IP "\fB\-munordered\-float\fR" 4
  24113. .IX Item "-munordered-float"
  24114. When \fB\-mhard\-float\fR is selected, enables generation of unordered
  24115. floating point compare and set flag (\f(CW\*(C`lf.sfun*\*(C'\fR) instructions. By default
  24116. functions from \fIlibgcc\fR are used to perform unordered floating point
  24117. compare and set flag operations.
  24118. .IP "\fB\-mcmov\fR" 4
  24119. .IX Item "-mcmov"
  24120. Enable generation of conditional move (\f(CW\*(C`l.cmov\*(C'\fR) instructions. By
  24121. default the equivalent will be generated using set and branch.
  24122. .IP "\fB\-mror\fR" 4
  24123. .IX Item "-mror"
  24124. Enable generation of rotate right (\f(CW\*(C`l.ror\*(C'\fR) instructions. By default
  24125. functions from \fIlibgcc\fR are used to perform rotate right operations.
  24126. .IP "\fB\-mrori\fR" 4
  24127. .IX Item "-mrori"
  24128. Enable generation of rotate right with immediate (\f(CW\*(C`l.rori\*(C'\fR) instructions.
  24129. By default functions from \fIlibgcc\fR are used to perform rotate right with
  24130. immediate operations.
  24131. .IP "\fB\-msext\fR" 4
  24132. .IX Item "-msext"
  24133. Enable generation of sign extension (\f(CW\*(C`l.ext*\*(C'\fR) instructions. By default
  24134. memory loads are used to perform sign extension.
  24135. .IP "\fB\-msfimm\fR" 4
  24136. .IX Item "-msfimm"
  24137. Enable generation of compare and set flag with immediate (\f(CW\*(C`l.sf*i\*(C'\fR)
  24138. instructions. By default extra instructions will be generated to store the
  24139. immediate to a register first.
  24140. .IP "\fB\-mshftimm\fR" 4
  24141. .IX Item "-mshftimm"
  24142. Enable generation of shift with immediate (\f(CW\*(C`l.srai\*(C'\fR, \f(CW\*(C`l.srli\*(C'\fR,
  24143. \&\f(CW\*(C`l.slli\*(C'\fR) instructions. By default extra instructions will be generated
  24144. to store the immediate to a register first.
  24145. .PP
  24146. \fI\s-1PDP\-11\s0 Options\fR
  24147. .IX Subsection "PDP-11 Options"
  24148. .PP
  24149. These options are defined for the \s-1PDP\-11:\s0
  24150. .IP "\fB\-mfpu\fR" 4
  24151. .IX Item "-mfpu"
  24152. Use hardware \s-1FPP\s0 floating point. This is the default. (\s-1FIS\s0 floating
  24153. point on the \s-1PDP\-11/40\s0 is not supported.) Implies \-m45.
  24154. .IP "\fB\-msoft\-float\fR" 4
  24155. .IX Item "-msoft-float"
  24156. Do not use hardware floating point.
  24157. .IP "\fB\-mac0\fR" 4
  24158. .IX Item "-mac0"
  24159. Return floating-point results in ac0 (fr0 in Unix assembler syntax).
  24160. .IP "\fB\-mno\-ac0\fR" 4
  24161. .IX Item "-mno-ac0"
  24162. Return floating-point results in memory. This is the default.
  24163. .IP "\fB\-m40\fR" 4
  24164. .IX Item "-m40"
  24165. Generate code for a \s-1PDP\-11/40. \s0 Implies \-msoft\-float \-mno\-split.
  24166. .IP "\fB\-m45\fR" 4
  24167. .IX Item "-m45"
  24168. Generate code for a \s-1PDP\-11/45. \s0 This is the default.
  24169. .IP "\fB\-m10\fR" 4
  24170. .IX Item "-m10"
  24171. Generate code for a \s-1PDP\-11/10. \s0 Implies \-msoft\-float \-mno\-split.
  24172. .IP "\fB\-mint16\fR" 4
  24173. .IX Item "-mint16"
  24174. .PD 0
  24175. .IP "\fB\-mno\-int32\fR" 4
  24176. .IX Item "-mno-int32"
  24177. .PD
  24178. Use 16\-bit \f(CW\*(C`int\*(C'\fR. This is the default.
  24179. .IP "\fB\-mint32\fR" 4
  24180. .IX Item "-mint32"
  24181. .PD 0
  24182. .IP "\fB\-mno\-int16\fR" 4
  24183. .IX Item "-mno-int16"
  24184. .PD
  24185. Use 32\-bit \f(CW\*(C`int\*(C'\fR.
  24186. .IP "\fB\-msplit\fR" 4
  24187. .IX Item "-msplit"
  24188. Target has split instruction and data space. Implies \-m45.
  24189. .IP "\fB\-munix\-asm\fR" 4
  24190. .IX Item "-munix-asm"
  24191. Use Unix assembler syntax.
  24192. .IP "\fB\-mdec\-asm\fR" 4
  24193. .IX Item "-mdec-asm"
  24194. Use \s-1DEC\s0 assembler syntax.
  24195. .IP "\fB\-mgnu\-asm\fR" 4
  24196. .IX Item "-mgnu-asm"
  24197. Use \s-1GNU\s0 assembler syntax. This is the default.
  24198. .IP "\fB\-mlra\fR" 4
  24199. .IX Item "-mlra"
  24200. Use the new \s-1LRA\s0 register allocator. By default, the old \*(L"reload\*(R"
  24201. allocator is used.
  24202. .PP
  24203. \fIpicoChip Options\fR
  24204. .IX Subsection "picoChip Options"
  24205. .PP
  24206. These \fB\-m\fR options are defined for picoChip implementations:
  24207. .IP "\fB\-mae=\fR\fIae_type\fR" 4
  24208. .IX Item "-mae=ae_type"
  24209. Set the instruction set, register set, and instruction scheduling
  24210. parameters for array element type \fIae_type\fR. Supported values
  24211. for \fIae_type\fR are \fB\s-1ANY\s0\fR, \fB\s-1MUL\s0\fR, and \fB\s-1MAC\s0\fR.
  24212. .Sp
  24213. \&\fB\-mae=ANY\fR selects a completely generic \s-1AE\s0 type. Code
  24214. generated with this option runs on any of the other \s-1AE\s0 types. The
  24215. code is not as efficient as it would be if compiled for a specific
  24216. \&\s-1AE\s0 type, and some types of operation (e.g., multiplication) do not
  24217. work properly on all types of \s-1AE.\s0
  24218. .Sp
  24219. \&\fB\-mae=MUL\fR selects a \s-1MUL AE\s0 type. This is the most useful \s-1AE\s0 type
  24220. for compiled code, and is the default.
  24221. .Sp
  24222. \&\fB\-mae=MAC\fR selects a DSP-style \s-1MAC AE. \s0 Code compiled with this
  24223. option may suffer from poor performance of byte (char) manipulation,
  24224. since the \s-1DSP AE\s0 does not provide hardware support for byte load/stores.
  24225. .IP "\fB\-msymbol\-as\-address\fR" 4
  24226. .IX Item "-msymbol-as-address"
  24227. Enable the compiler to directly use a symbol name as an address in a
  24228. load/store instruction, without first loading it into a
  24229. register. Typically, the use of this option generates larger
  24230. programs, which run faster than when the option isn't used. However, the
  24231. results vary from program to program, so it is left as a user option,
  24232. rather than being permanently enabled.
  24233. .IP "\fB\-mno\-inefficient\-warnings\fR" 4
  24234. .IX Item "-mno-inefficient-warnings"
  24235. Disables warnings about the generation of inefficient code. These
  24236. warnings can be generated, for example, when compiling code that
  24237. performs byte-level memory operations on the \s-1MAC AE\s0 type. The \s-1MAC AE\s0 has
  24238. no hardware support for byte-level memory operations, so all byte
  24239. load/stores must be synthesized from word load/store operations. This is
  24240. inefficient and a warning is generated to indicate
  24241. that you should rewrite the code to avoid byte operations, or to target
  24242. an \s-1AE\s0 type that has the necessary hardware support. This option disables
  24243. these warnings.
  24244. .PP
  24245. \fIPowerPC Options\fR
  24246. .IX Subsection "PowerPC Options"
  24247. .PP
  24248. These are listed under
  24249. .PP
  24250. \fI\s-1PRU\s0 Options\fR
  24251. .IX Subsection "PRU Options"
  24252. .PP
  24253. These command-line options are defined for \s-1PRU\s0 target:
  24254. .IP "\fB\-minrt\fR" 4
  24255. .IX Item "-minrt"
  24256. Link with a minimum runtime environment, with no support for static
  24257. initializers and constructors. Using this option can significantly reduce
  24258. the size of the final \s-1ELF\s0 binary. Beware that the compiler could still
  24259. generate code with static initializers and constructors. It is up to the
  24260. programmer to ensure that the source program will not use those features.
  24261. .IP "\fB\-mmcu=\fR\fImcu\fR" 4
  24262. .IX Item "-mmcu=mcu"
  24263. Specify the \s-1PRU MCU\s0 variant to use. Check Newlib for the exact list of
  24264. supported MCUs.
  24265. .IP "\fB\-mno\-relax\fR" 4
  24266. .IX Item "-mno-relax"
  24267. Make \s-1GCC\s0 pass the \fB\-\-no\-relax\fR command-line option to the linker
  24268. instead of the \fB\-\-relax\fR option.
  24269. .IP "\fB\-mloop\fR" 4
  24270. .IX Item "-mloop"
  24271. Allow (or do not allow) \s-1GCC\s0 to use the \s-1LOOP\s0 instruction.
  24272. .IP "\fB\-mabi=\fR\fIvariant\fR" 4
  24273. .IX Item "-mabi=variant"
  24274. Specify the \s-1ABI\s0 variant to output code for. \fB\-mabi=ti\fR selects the
  24275. unmodified \s-1TI ABI\s0 while \fB\-mabi=gnu\fR selects a \s-1GNU\s0 variant that copes
  24276. more naturally with certain \s-1GCC\s0 assumptions. These are the differences:
  24277. .RS 4
  24278. .IP "\fBFunction Pointer Size\fR" 4
  24279. .IX Item "Function Pointer Size"
  24280. \&\s-1TI ABI\s0 specifies that function (code) pointers are 16\-bit, whereas \s-1GNU\s0
  24281. supports only 32\-bit data and code pointers.
  24282. .IP "\fBOptional Return Value Pointer\fR" 4
  24283. .IX Item "Optional Return Value Pointer"
  24284. Function return values larger than 64 bits are passed by using a hidden
  24285. pointer as the first argument of the function. \s-1TI ABI,\s0 though, mandates that
  24286. the pointer can be \s-1NULL\s0 in case the caller is not using the returned value.
  24287. \&\s-1GNU\s0 always passes and expects a valid return value pointer.
  24288. .RE
  24289. .RS 4
  24290. .Sp
  24291. The current \fB\-mabi=ti\fR implementation simply raises a compile error
  24292. when any of the above code constructs is detected. As a consequence
  24293. the standard C library cannot be built and it is omitted when linking with
  24294. \&\fB\-mabi=ti\fR.
  24295. .Sp
  24296. Relaxation is a \s-1GNU\s0 feature and for safety reasons is disabled when using
  24297. \&\fB\-mabi=ti\fR. The \s-1TI\s0 toolchain does not emit relocations for QBBx
  24298. instructions, so the \s-1GNU\s0 linker cannot adjust them when shortening adjacent
  24299. \&\s-1LDI32\s0 pseudo instructions.
  24300. .RE
  24301. .PP
  24302. \fIRISC-V Options\fR
  24303. .IX Subsection "RISC-V Options"
  24304. .PP
  24305. These command-line options are defined for RISC-V targets:
  24306. .IP "\fB\-mbranch\-cost=\fR\fIn\fR" 4
  24307. .IX Item "-mbranch-cost=n"
  24308. Set the cost of branches to roughly \fIn\fR instructions.
  24309. .IP "\fB\-mplt\fR" 4
  24310. .IX Item "-mplt"
  24311. .PD 0
  24312. .IP "\fB\-mno\-plt\fR" 4
  24313. .IX Item "-mno-plt"
  24314. .PD
  24315. When generating \s-1PIC\s0 code, do or don't allow the use of PLTs. Ignored for
  24316. non-PIC. The default is \fB\-mplt\fR.
  24317. .IP "\fB\-mabi=\fR\fIABI-string\fR" 4
  24318. .IX Item "-mabi=ABI-string"
  24319. Specify integer and floating-point calling convention. \fIABI-string\fR
  24320. contains two parts: the size of integer types and the registers used for
  24321. floating-point types. For example \fB\-march=rv64ifd \-mabi=lp64d\fR means that
  24322. \&\fBlong\fR and pointers are 64\-bit (implicitly defining \fBint\fR to be
  24323. 32\-bit), and that floating-point values up to 64 bits wide are passed in F
  24324. registers. Contrast this with \fB\-march=rv64ifd \-mabi=lp64f\fR, which still
  24325. allows the compiler to generate code that uses the F and D extensions but only
  24326. allows floating-point values up to 32 bits long to be passed in registers; or
  24327. \&\fB\-march=rv64ifd \-mabi=lp64\fR, in which no floating-point arguments will be
  24328. passed in registers.
  24329. .Sp
  24330. The default for this argument is system dependent, users who want a specific
  24331. calling convention should specify one explicitly. The valid calling
  24332. conventions are: \fBilp32\fR, \fBilp32f\fR, \fBilp32d\fR, \fBlp64\fR,
  24333. \&\fBlp64f\fR, and \fBlp64d\fR. Some calling conventions are impossible to
  24334. implement on some ISAs: for example, \fB\-march=rv32if \-mabi=ilp32d\fR is
  24335. invalid because the \s-1ABI\s0 requires 64\-bit values be passed in F registers, but F
  24336. registers are only 32 bits wide. There is also the \fBilp32e\fR \s-1ABI\s0 that can
  24337. only be used with the \fBrv32e\fR architecture. This \s-1ABI\s0 is not well
  24338. specified at present, and is subject to change.
  24339. .IP "\fB\-mfdiv\fR" 4
  24340. .IX Item "-mfdiv"
  24341. .PD 0
  24342. .IP "\fB\-mno\-fdiv\fR" 4
  24343. .IX Item "-mno-fdiv"
  24344. .PD
  24345. Do or don't use hardware floating-point divide and square root instructions.
  24346. This requires the F or D extensions for floating-point registers. The default
  24347. is to use them if the specified architecture has these instructions.
  24348. .IP "\fB\-mdiv\fR" 4
  24349. .IX Item "-mdiv"
  24350. .PD 0
  24351. .IP "\fB\-mno\-div\fR" 4
  24352. .IX Item "-mno-div"
  24353. .PD
  24354. Do or don't use hardware instructions for integer division. This requires the
  24355. M extension. The default is to use them if the specified architecture has
  24356. these instructions.
  24357. .IP "\fB\-march=\fR\fIISA-string\fR" 4
  24358. .IX Item "-march=ISA-string"
  24359. Generate code for given RISC-V \s-1ISA \s0(e.g. \fBrv64im\fR). \s-1ISA\s0 strings must be
  24360. lower-case. Examples include \fBrv64i\fR, \fBrv32g\fR, \fBrv32e\fR, and
  24361. \&\fBrv32imaf\fR.
  24362. .IP "\fB\-mtune=\fR\fIprocessor-string\fR" 4
  24363. .IX Item "-mtune=processor-string"
  24364. Optimize the output for the given processor, specified by microarchitecture
  24365. name. Permissible values for this option are: \fBrocket\fR,
  24366. \&\fBsifive\-3\-series\fR, \fBsifive\-5\-series\fR, \fBsifive\-7\-series\fR,
  24367. and \fBsize\fR.
  24368. .Sp
  24369. When \fB\-mtune=\fR is not specified, the default is \fBrocket\fR.
  24370. .Sp
  24371. The \fBsize\fR choice is not intended for use by end-users. This is used
  24372. when \fB\-Os\fR is specified. It overrides the instruction cost info
  24373. provided by \fB\-mtune=\fR, but does not override the pipeline info. This
  24374. helps reduce code size while still giving good performance.
  24375. .IP "\fB\-mpreferred\-stack\-boundary=\fR\fInum\fR" 4
  24376. .IX Item "-mpreferred-stack-boundary=num"
  24377. Attempt to keep the stack boundary aligned to a 2 raised to \fInum\fR
  24378. byte boundary. If \fB\-mpreferred\-stack\-boundary\fR is not specified,
  24379. the default is 4 (16 bytes or 128\-bits).
  24380. .Sp
  24381. \&\fBWarning:\fR If you use this switch, then you must build all modules with
  24382. the same value, including any libraries. This includes the system libraries
  24383. and startup modules.
  24384. .IP "\fB\-msmall\-data\-limit=\fR\fIn\fR" 4
  24385. .IX Item "-msmall-data-limit=n"
  24386. Put global and static data smaller than \fIn\fR bytes into a special section
  24387. (on some targets).
  24388. .IP "\fB\-msave\-restore\fR" 4
  24389. .IX Item "-msave-restore"
  24390. .PD 0
  24391. .IP "\fB\-mno\-save\-restore\fR" 4
  24392. .IX Item "-mno-save-restore"
  24393. .PD
  24394. Do or don't use smaller but slower prologue and epilogue code that uses
  24395. library function calls. The default is to use fast inline prologues and
  24396. epilogues.
  24397. .IP "\fB\-mstrict\-align\fR" 4
  24398. .IX Item "-mstrict-align"
  24399. .PD 0
  24400. .IP "\fB\-mno\-strict\-align\fR" 4
  24401. .IX Item "-mno-strict-align"
  24402. .PD
  24403. Do not or do generate unaligned memory accesses. The default is set depending
  24404. on whether the processor we are optimizing for supports fast unaligned access
  24405. or not.
  24406. .IP "\fB\-mcmodel=medlow\fR" 4
  24407. .IX Item "-mcmodel=medlow"
  24408. Generate code for the medium-low code model. The program and its statically
  24409. defined symbols must lie within a single 2 GiB address range and must lie
  24410. between absolute addresses \-2 GiB and +2 GiB. Programs can be
  24411. statically or dynamically linked. This is the default code model.
  24412. .IP "\fB\-mcmodel=medany\fR" 4
  24413. .IX Item "-mcmodel=medany"
  24414. Generate code for the medium-any code model. The program and its statically
  24415. defined symbols must be within any single 2 GiB address range. Programs can be
  24416. statically or dynamically linked.
  24417. .IP "\fB\-mexplicit\-relocs\fR" 4
  24418. .IX Item "-mexplicit-relocs"
  24419. .PD 0
  24420. .IP "\fB\-mno\-exlicit\-relocs\fR" 4
  24421. .IX Item "-mno-exlicit-relocs"
  24422. .PD
  24423. Use or do not use assembler relocation operators when dealing with symbolic
  24424. addresses. The alternative is to use assembler macros instead, which may
  24425. limit optimization.
  24426. .IP "\fB\-mrelax\fR" 4
  24427. .IX Item "-mrelax"
  24428. .PD 0
  24429. .IP "\fB\-mno\-relax\fR" 4
  24430. .IX Item "-mno-relax"
  24431. .PD
  24432. Take advantage of linker relaxations to reduce the number of instructions
  24433. required to materialize symbol addresses. The default is to take advantage of
  24434. linker relaxations.
  24435. .IP "\fB\-memit\-attribute\fR" 4
  24436. .IX Item "-memit-attribute"
  24437. .PD 0
  24438. .IP "\fB\-mno\-emit\-attribute\fR" 4
  24439. .IX Item "-mno-emit-attribute"
  24440. .PD
  24441. Emit (do not emit) RISC-V attribute to record extra information into \s-1ELF\s0
  24442. objects. This feature requires at least binutils 2.32.
  24443. .IP "\fB\-malign\-data=\fR\fItype\fR" 4
  24444. .IX Item "-malign-data=type"
  24445. Control how \s-1GCC\s0 aligns variables and constants of array, structure, or union
  24446. types. Supported values for \fItype\fR are \fBxlen\fR which uses x register
  24447. width as the alignment value, and \fBnatural\fR which uses natural alignment.
  24448. \&\fBxlen\fR is the default.
  24449. .PP
  24450. \fI\s-1RL78\s0 Options\fR
  24451. .IX Subsection "RL78 Options"
  24452. .IP "\fB\-msim\fR" 4
  24453. .IX Item "-msim"
  24454. Links in additional target libraries to support operation within a
  24455. simulator.
  24456. .IP "\fB\-mmul=none\fR" 4
  24457. .IX Item "-mmul=none"
  24458. .PD 0
  24459. .IP "\fB\-mmul=g10\fR" 4
  24460. .IX Item "-mmul=g10"
  24461. .IP "\fB\-mmul=g13\fR" 4
  24462. .IX Item "-mmul=g13"
  24463. .IP "\fB\-mmul=g14\fR" 4
  24464. .IX Item "-mmul=g14"
  24465. .IP "\fB\-mmul=rl78\fR" 4
  24466. .IX Item "-mmul=rl78"
  24467. .PD
  24468. Specifies the type of hardware multiplication and division support to
  24469. be used. The simplest is \f(CW\*(C`none\*(C'\fR, which uses software for both
  24470. multiplication and division. This is the default. The \f(CW\*(C`g13\*(C'\fR
  24471. value is for the hardware multiply/divide peripheral found on the
  24472. \&\s-1RL78/G13 \s0(S2 core) targets. The \f(CW\*(C`g14\*(C'\fR value selects the use of
  24473. the multiplication and division instructions supported by the \s-1RL78/G14
  24474. \&\s0(S3 core) parts. The value \f(CW\*(C`rl78\*(C'\fR is an alias for \f(CW\*(C`g14\*(C'\fR and
  24475. the value \f(CW\*(C`mg10\*(C'\fR is an alias for \f(CW\*(C`none\*(C'\fR.
  24476. .Sp
  24477. In addition a C preprocessor macro is defined, based upon the setting
  24478. of this option. Possible values are: \f(CW\*(C`_\|_RL78_MUL_NONE_\|_\*(C'\fR,
  24479. \&\f(CW\*(C`_\|_RL78_MUL_G13_\|_\*(C'\fR or \f(CW\*(C`_\|_RL78_MUL_G14_\|_\*(C'\fR.
  24480. .IP "\fB\-mcpu=g10\fR" 4
  24481. .IX Item "-mcpu=g10"
  24482. .PD 0
  24483. .IP "\fB\-mcpu=g13\fR" 4
  24484. .IX Item "-mcpu=g13"
  24485. .IP "\fB\-mcpu=g14\fR" 4
  24486. .IX Item "-mcpu=g14"
  24487. .IP "\fB\-mcpu=rl78\fR" 4
  24488. .IX Item "-mcpu=rl78"
  24489. .PD
  24490. Specifies the \s-1RL78\s0 core to target. The default is the G14 core, also
  24491. known as an S3 core or just \s-1RL78. \s0 The G13 or S2 core does not have
  24492. multiply or divide instructions, instead it uses a hardware peripheral
  24493. for these operations. The G10 or S1 core does not have register
  24494. banks, so it uses a different calling convention.
  24495. .Sp
  24496. If this option is set it also selects the type of hardware multiply
  24497. support to use, unless this is overridden by an explicit
  24498. \&\fB\-mmul=none\fR option on the command line. Thus specifying
  24499. \&\fB\-mcpu=g13\fR enables the use of the G13 hardware multiply
  24500. peripheral and specifying \fB\-mcpu=g10\fR disables the use of
  24501. hardware multiplications altogether.
  24502. .Sp
  24503. Note, although the \s-1RL78/G14\s0 core is the default target, specifying
  24504. \&\fB\-mcpu=g14\fR or \fB\-mcpu=rl78\fR on the command line does
  24505. change the behavior of the toolchain since it also enables G14
  24506. hardware multiply support. If these options are not specified on the
  24507. command line then software multiplication routines will be used even
  24508. though the code targets the \s-1RL78\s0 core. This is for backwards
  24509. compatibility with older toolchains which did not have hardware
  24510. multiply and divide support.
  24511. .Sp
  24512. In addition a C preprocessor macro is defined, based upon the setting
  24513. of this option. Possible values are: \f(CW\*(C`_\|_RL78_G10_\|_\*(C'\fR,
  24514. \&\f(CW\*(C`_\|_RL78_G13_\|_\*(C'\fR or \f(CW\*(C`_\|_RL78_G14_\|_\*(C'\fR.
  24515. .IP "\fB\-mg10\fR" 4
  24516. .IX Item "-mg10"
  24517. .PD 0
  24518. .IP "\fB\-mg13\fR" 4
  24519. .IX Item "-mg13"
  24520. .IP "\fB\-mg14\fR" 4
  24521. .IX Item "-mg14"
  24522. .IP "\fB\-mrl78\fR" 4
  24523. .IX Item "-mrl78"
  24524. .PD
  24525. These are aliases for the corresponding \fB\-mcpu=\fR option. They
  24526. are provided for backwards compatibility.
  24527. .IP "\fB\-mallregs\fR" 4
  24528. .IX Item "-mallregs"
  24529. Allow the compiler to use all of the available registers. By default
  24530. registers \f(CW\*(C`r24..r31\*(C'\fR are reserved for use in interrupt handlers.
  24531. With this option enabled these registers can be used in ordinary
  24532. functions as well.
  24533. .IP "\fB\-m64bit\-doubles\fR" 4
  24534. .IX Item "-m64bit-doubles"
  24535. .PD 0
  24536. .IP "\fB\-m32bit\-doubles\fR" 4
  24537. .IX Item "-m32bit-doubles"
  24538. .PD
  24539. Make the \f(CW\*(C`double\*(C'\fR data type be 64 bits (\fB\-m64bit\-doubles\fR)
  24540. or 32 bits (\fB\-m32bit\-doubles\fR) in size. The default is
  24541. \&\fB\-m32bit\-doubles\fR.
  24542. .IP "\fB\-msave\-mduc\-in\-interrupts\fR" 4
  24543. .IX Item "-msave-mduc-in-interrupts"
  24544. .PD 0
  24545. .IP "\fB\-mno\-save\-mduc\-in\-interrupts\fR" 4
  24546. .IX Item "-mno-save-mduc-in-interrupts"
  24547. .PD
  24548. Specifies that interrupt handler functions should preserve the
  24549. \&\s-1MDUC\s0 registers. This is only necessary if normal code might use
  24550. the \s-1MDUC\s0 registers, for example because it performs multiplication
  24551. and division operations. The default is to ignore the \s-1MDUC\s0 registers
  24552. as this makes the interrupt handlers faster. The target option \-mg13
  24553. needs to be passed for this to work as this feature is only available
  24554. on the G13 target (S2 core). The \s-1MDUC\s0 registers will only be saved
  24555. if the interrupt handler performs a multiplication or division
  24556. operation or it calls another function.
  24557. .PP
  24558. \fI\s-1IBM RS/6000\s0 and PowerPC Options\fR
  24559. .IX Subsection "IBM RS/6000 and PowerPC Options"
  24560. .PP
  24561. These \fB\-m\fR options are defined for the \s-1IBM RS/6000\s0 and PowerPC:
  24562. .IP "\fB\-mpowerpc\-gpopt\fR" 4
  24563. .IX Item "-mpowerpc-gpopt"
  24564. .PD 0
  24565. .IP "\fB\-mno\-powerpc\-gpopt\fR" 4
  24566. .IX Item "-mno-powerpc-gpopt"
  24567. .IP "\fB\-mpowerpc\-gfxopt\fR" 4
  24568. .IX Item "-mpowerpc-gfxopt"
  24569. .IP "\fB\-mno\-powerpc\-gfxopt\fR" 4
  24570. .IX Item "-mno-powerpc-gfxopt"
  24571. .IP "\fB\-mpowerpc64\fR" 4
  24572. .IX Item "-mpowerpc64"
  24573. .IP "\fB\-mno\-powerpc64\fR" 4
  24574. .IX Item "-mno-powerpc64"
  24575. .IP "\fB\-mmfcrf\fR" 4
  24576. .IX Item "-mmfcrf"
  24577. .IP "\fB\-mno\-mfcrf\fR" 4
  24578. .IX Item "-mno-mfcrf"
  24579. .IP "\fB\-mpopcntb\fR" 4
  24580. .IX Item "-mpopcntb"
  24581. .IP "\fB\-mno\-popcntb\fR" 4
  24582. .IX Item "-mno-popcntb"
  24583. .IP "\fB\-mpopcntd\fR" 4
  24584. .IX Item "-mpopcntd"
  24585. .IP "\fB\-mno\-popcntd\fR" 4
  24586. .IX Item "-mno-popcntd"
  24587. .IP "\fB\-mfprnd\fR" 4
  24588. .IX Item "-mfprnd"
  24589. .IP "\fB\-mno\-fprnd\fR" 4
  24590. .IX Item "-mno-fprnd"
  24591. .IP "\fB\-mcmpb\fR" 4
  24592. .IX Item "-mcmpb"
  24593. .IP "\fB\-mno\-cmpb\fR" 4
  24594. .IX Item "-mno-cmpb"
  24595. .IP "\fB\-mhard\-dfp\fR" 4
  24596. .IX Item "-mhard-dfp"
  24597. .IP "\fB\-mno\-hard\-dfp\fR" 4
  24598. .IX Item "-mno-hard-dfp"
  24599. .PD
  24600. You use these options to specify which instructions are available on the
  24601. processor you are using. The default value of these options is
  24602. determined when configuring \s-1GCC. \s0 Specifying the
  24603. \&\fB\-mcpu=\fR\fIcpu_type\fR overrides the specification of these
  24604. options. We recommend you use the \fB\-mcpu=\fR\fIcpu_type\fR option
  24605. rather than the options listed above.
  24606. .Sp
  24607. Specifying \fB\-mpowerpc\-gpopt\fR allows
  24608. \&\s-1GCC\s0 to use the optional PowerPC architecture instructions in the
  24609. General Purpose group, including floating-point square root. Specifying
  24610. \&\fB\-mpowerpc\-gfxopt\fR allows \s-1GCC\s0 to
  24611. use the optional PowerPC architecture instructions in the Graphics
  24612. group, including floating-point select.
  24613. .Sp
  24614. The \fB\-mmfcrf\fR option allows \s-1GCC\s0 to generate the move from
  24615. condition register field instruction implemented on the \s-1POWER4\s0
  24616. processor and other processors that support the PowerPC V2.01
  24617. architecture.
  24618. The \fB\-mpopcntb\fR option allows \s-1GCC\s0 to generate the popcount and
  24619. double-precision \s-1FP\s0 reciprocal estimate instruction implemented on the
  24620. \&\s-1POWER5\s0 processor and other processors that support the PowerPC V2.02
  24621. architecture.
  24622. The \fB\-mpopcntd\fR option allows \s-1GCC\s0 to generate the popcount
  24623. instruction implemented on the \s-1POWER7\s0 processor and other processors
  24624. that support the PowerPC V2.06 architecture.
  24625. The \fB\-mfprnd\fR option allows \s-1GCC\s0 to generate the \s-1FP\s0 round to
  24626. integer instructions implemented on the \s-1POWER5+\s0 processor and other
  24627. processors that support the PowerPC V2.03 architecture.
  24628. The \fB\-mcmpb\fR option allows \s-1GCC\s0 to generate the compare bytes
  24629. instruction implemented on the \s-1POWER6\s0 processor and other processors
  24630. that support the PowerPC V2.05 architecture.
  24631. The \fB\-mhard\-dfp\fR option allows \s-1GCC\s0 to generate the decimal
  24632. floating-point instructions implemented on some \s-1POWER\s0 processors.
  24633. .Sp
  24634. The \fB\-mpowerpc64\fR option allows \s-1GCC\s0 to generate the additional
  24635. 64\-bit instructions that are found in the full PowerPC64 architecture
  24636. and to treat GPRs as 64\-bit, doubleword quantities. \s-1GCC\s0 defaults to
  24637. \&\fB\-mno\-powerpc64\fR.
  24638. .IP "\fB\-mcpu=\fR\fIcpu_type\fR" 4
  24639. .IX Item "-mcpu=cpu_type"
  24640. Set architecture type, register usage, and
  24641. instruction scheduling parameters for machine type \fIcpu_type\fR.
  24642. Supported values for \fIcpu_type\fR are \fB401\fR, \fB403\fR,
  24643. \&\fB405\fR, \fB405fp\fR, \fB440\fR, \fB440fp\fR, \fB464\fR, \fB464fp\fR,
  24644. \&\fB476\fR, \fB476fp\fR, \fB505\fR, \fB601\fR, \fB602\fR, \fB603\fR,
  24645. \&\fB603e\fR, \fB604\fR, \fB604e\fR, \fB620\fR, \fB630\fR, \fB740\fR,
  24646. \&\fB7400\fR, \fB7450\fR, \fB750\fR, \fB801\fR, \fB821\fR, \fB823\fR,
  24647. \&\fB860\fR, \fB970\fR, \fB8540\fR, \fBa2\fR, \fBe300c2\fR,
  24648. \&\fBe300c3\fR, \fBe500mc\fR, \fBe500mc64\fR, \fBe5500\fR,
  24649. \&\fBe6500\fR, \fBec603e\fR, \fBG3\fR, \fBG4\fR, \fBG5\fR,
  24650. \&\fBtitan\fR, \fBpower3\fR, \fBpower4\fR, \fBpower5\fR, \fBpower5+\fR,
  24651. \&\fBpower6\fR, \fBpower6x\fR, \fBpower7\fR, \fBpower8\fR,
  24652. \&\fBpower9\fR, \fBfuture\fR, \fBpowerpc\fR, \fBpowerpc64\fR,
  24653. \&\fBpowerpc64le\fR, \fBrs64\fR, and \fBnative\fR.
  24654. .Sp
  24655. \&\fB\-mcpu=powerpc\fR, \fB\-mcpu=powerpc64\fR, and
  24656. \&\fB\-mcpu=powerpc64le\fR specify pure 32\-bit PowerPC (either
  24657. endian), 64\-bit big endian PowerPC and 64\-bit little endian PowerPC
  24658. architecture machine types, with an appropriate, generic processor
  24659. model assumed for scheduling purposes.
  24660. .Sp
  24661. Specifying \fBnative\fR as cpu type detects and selects the
  24662. architecture option that corresponds to the host processor of the
  24663. system performing the compilation.
  24664. \&\fB\-mcpu=native\fR has no effect if \s-1GCC\s0 does not recognize the
  24665. processor.
  24666. .Sp
  24667. The other options specify a specific processor. Code generated under
  24668. those options runs best on that processor, and may not run at all on
  24669. others.
  24670. .Sp
  24671. The \fB\-mcpu\fR options automatically enable or disable the
  24672. following options:
  24673. .Sp
  24674. \&\fB\-maltivec \-mfprnd \-mhard\-float \-mmfcrf \-mmultiple
  24675. \&\-mpopcntb \-mpopcntd \-mpowerpc64
  24676. \&\-mpowerpc\-gpopt \-mpowerpc\-gfxopt
  24677. \&\-mmulhw \-mdlmzb \-mmfpgpr \-mvsx
  24678. \&\-mcrypto \-mhtm \-mpower8\-fusion \-mpower8\-vector
  24679. \&\-mquad\-memory \-mquad\-memory\-atomic \-mfloat128
  24680. \&\-mfloat128\-hardware \-mprefixed \-mpcrel \-mmma\fR
  24681. .Sp
  24682. The particular options set for any particular \s-1CPU\s0 varies between
  24683. compiler versions, depending on what setting seems to produce optimal
  24684. code for that \s-1CPU\s0; it doesn't necessarily reflect the actual hardware's
  24685. capabilities. If you wish to set an individual option to a particular
  24686. value, you may specify it after the \fB\-mcpu\fR option, like
  24687. \&\fB\-mcpu=970 \-mno\-altivec\fR.
  24688. .Sp
  24689. On \s-1AIX,\s0 the \fB\-maltivec\fR and \fB\-mpowerpc64\fR options are
  24690. not enabled or disabled by the \fB\-mcpu\fR option at present because
  24691. \&\s-1AIX\s0 does not have full support for these options. You may still
  24692. enable or disable them individually if you're sure it'll work in your
  24693. environment.
  24694. .IP "\fB\-mtune=\fR\fIcpu_type\fR" 4
  24695. .IX Item "-mtune=cpu_type"
  24696. Set the instruction scheduling parameters for machine type
  24697. \&\fIcpu_type\fR, but do not set the architecture type or register usage,
  24698. as \fB\-mcpu=\fR\fIcpu_type\fR does. The same
  24699. values for \fIcpu_type\fR are used for \fB\-mtune\fR as for
  24700. \&\fB\-mcpu\fR. If both are specified, the code generated uses the
  24701. architecture and registers set by \fB\-mcpu\fR, but the
  24702. scheduling parameters set by \fB\-mtune\fR.
  24703. .IP "\fB\-mcmodel=small\fR" 4
  24704. .IX Item "-mcmodel=small"
  24705. Generate PowerPC64 code for the small model: The \s-1TOC\s0 is limited to
  24706. 64k.
  24707. .IP "\fB\-mcmodel=medium\fR" 4
  24708. .IX Item "-mcmodel=medium"
  24709. Generate PowerPC64 code for the medium model: The \s-1TOC\s0 and other static
  24710. data may be up to a total of 4G in size. This is the default for 64\-bit
  24711. Linux.
  24712. .IP "\fB\-mcmodel=large\fR" 4
  24713. .IX Item "-mcmodel=large"
  24714. Generate PowerPC64 code for the large model: The \s-1TOC\s0 may be up to 4G
  24715. in size. Other data and code is only limited by the 64\-bit address
  24716. space.
  24717. .IP "\fB\-maltivec\fR" 4
  24718. .IX Item "-maltivec"
  24719. .PD 0
  24720. .IP "\fB\-mno\-altivec\fR" 4
  24721. .IX Item "-mno-altivec"
  24722. .PD
  24723. Generate code that uses (does not use) AltiVec instructions, and also
  24724. enable the use of built-in functions that allow more direct access to
  24725. the AltiVec instruction set. You may also need to set
  24726. \&\fB\-mabi=altivec\fR to adjust the current \s-1ABI\s0 with AltiVec \s-1ABI\s0
  24727. enhancements.
  24728. .Sp
  24729. When \fB\-maltivec\fR is used, the element order for AltiVec intrinsics
  24730. such as \f(CW\*(C`vec_splat\*(C'\fR, \f(CW\*(C`vec_extract\*(C'\fR, and \f(CW\*(C`vec_insert\*(C'\fR
  24731. match array element order corresponding to the endianness of the
  24732. target. That is, element zero identifies the leftmost element in a
  24733. vector register when targeting a big-endian platform, and identifies
  24734. the rightmost element in a vector register when targeting a
  24735. little-endian platform.
  24736. .IP "\fB\-mvrsave\fR" 4
  24737. .IX Item "-mvrsave"
  24738. .PD 0
  24739. .IP "\fB\-mno\-vrsave\fR" 4
  24740. .IX Item "-mno-vrsave"
  24741. .PD
  24742. Generate \s-1VRSAVE\s0 instructions when generating AltiVec code.
  24743. .IP "\fB\-msecure\-plt\fR" 4
  24744. .IX Item "-msecure-plt"
  24745. Generate code that allows \fBld\fR and \fBld.so\fR
  24746. to build executables and shared
  24747. libraries with non-executable \f(CW\*(C`.plt\*(C'\fR and \f(CW\*(C`.got\*(C'\fR sections.
  24748. This is a PowerPC
  24749. 32\-bit \s-1SYSV ABI\s0 option.
  24750. .IP "\fB\-mbss\-plt\fR" 4
  24751. .IX Item "-mbss-plt"
  24752. Generate code that uses a \s-1BSS \s0\f(CW\*(C`.plt\*(C'\fR section that \fBld.so\fR
  24753. fills in, and
  24754. requires \f(CW\*(C`.plt\*(C'\fR and \f(CW\*(C`.got\*(C'\fR
  24755. sections that are both writable and executable.
  24756. This is a PowerPC 32\-bit \s-1SYSV ABI\s0 option.
  24757. .IP "\fB\-misel\fR" 4
  24758. .IX Item "-misel"
  24759. .PD 0
  24760. .IP "\fB\-mno\-isel\fR" 4
  24761. .IX Item "-mno-isel"
  24762. .PD
  24763. This switch enables or disables the generation of \s-1ISEL\s0 instructions.
  24764. .IP "\fB\-mvsx\fR" 4
  24765. .IX Item "-mvsx"
  24766. .PD 0
  24767. .IP "\fB\-mno\-vsx\fR" 4
  24768. .IX Item "-mno-vsx"
  24769. .PD
  24770. Generate code that uses (does not use) vector/scalar (\s-1VSX\s0)
  24771. instructions, and also enable the use of built-in functions that allow
  24772. more direct access to the \s-1VSX\s0 instruction set.
  24773. .IP "\fB\-mcrypto\fR" 4
  24774. .IX Item "-mcrypto"
  24775. .PD 0
  24776. .IP "\fB\-mno\-crypto\fR" 4
  24777. .IX Item "-mno-crypto"
  24778. .PD
  24779. Enable the use (disable) of the built-in functions that allow direct
  24780. access to the cryptographic instructions that were added in version
  24781. 2.07 of the PowerPC \s-1ISA.\s0
  24782. .IP "\fB\-mhtm\fR" 4
  24783. .IX Item "-mhtm"
  24784. .PD 0
  24785. .IP "\fB\-mno\-htm\fR" 4
  24786. .IX Item "-mno-htm"
  24787. .PD
  24788. Enable (disable) the use of the built-in functions that allow direct
  24789. access to the Hardware Transactional Memory (\s-1HTM\s0) instructions that
  24790. were added in version 2.07 of the PowerPC \s-1ISA.\s0
  24791. .IP "\fB\-mpower8\-fusion\fR" 4
  24792. .IX Item "-mpower8-fusion"
  24793. .PD 0
  24794. .IP "\fB\-mno\-power8\-fusion\fR" 4
  24795. .IX Item "-mno-power8-fusion"
  24796. .PD
  24797. Generate code that keeps (does not keeps) some integer operations
  24798. adjacent so that the instructions can be fused together on power8 and
  24799. later processors.
  24800. .IP "\fB\-mpower8\-vector\fR" 4
  24801. .IX Item "-mpower8-vector"
  24802. .PD 0
  24803. .IP "\fB\-mno\-power8\-vector\fR" 4
  24804. .IX Item "-mno-power8-vector"
  24805. .PD
  24806. Generate code that uses (does not use) the vector and scalar
  24807. instructions that were added in version 2.07 of the PowerPC \s-1ISA. \s0 Also
  24808. enable the use of built-in functions that allow more direct access to
  24809. the vector instructions.
  24810. .IP "\fB\-mquad\-memory\fR" 4
  24811. .IX Item "-mquad-memory"
  24812. .PD 0
  24813. .IP "\fB\-mno\-quad\-memory\fR" 4
  24814. .IX Item "-mno-quad-memory"
  24815. .PD
  24816. Generate code that uses (does not use) the non-atomic quad word memory
  24817. instructions. The \fB\-mquad\-memory\fR option requires use of
  24818. 64\-bit mode.
  24819. .IP "\fB\-mquad\-memory\-atomic\fR" 4
  24820. .IX Item "-mquad-memory-atomic"
  24821. .PD 0
  24822. .IP "\fB\-mno\-quad\-memory\-atomic\fR" 4
  24823. .IX Item "-mno-quad-memory-atomic"
  24824. .PD
  24825. Generate code that uses (does not use) the atomic quad word memory
  24826. instructions. The \fB\-mquad\-memory\-atomic\fR option requires use of
  24827. 64\-bit mode.
  24828. .IP "\fB\-mfloat128\fR" 4
  24829. .IX Item "-mfloat128"
  24830. .PD 0
  24831. .IP "\fB\-mno\-float128\fR" 4
  24832. .IX Item "-mno-float128"
  24833. .PD
  24834. Enable/disable the \fI_\|_float128\fR keyword for \s-1IEEE\s0 128\-bit floating point
  24835. and use either software emulation for \s-1IEEE\s0 128\-bit floating point or
  24836. hardware instructions.
  24837. .Sp
  24838. The \s-1VSX\s0 instruction set (\fB\-mvsx\fR, \fB\-mcpu=power7\fR,
  24839. \&\fB\-mcpu=power8\fR), or \fB\-mcpu=power9\fR must be enabled to
  24840. use the \s-1IEEE\s0 128\-bit floating point support. The \s-1IEEE\s0 128\-bit
  24841. floating point support only works on PowerPC Linux systems.
  24842. .Sp
  24843. The default for \fB\-mfloat128\fR is enabled on PowerPC Linux
  24844. systems using the \s-1VSX\s0 instruction set, and disabled on other systems.
  24845. .Sp
  24846. If you use the \s-1ISA 3.0\s0 instruction set (\fB\-mpower9\-vector\fR or
  24847. \&\fB\-mcpu=power9\fR) on a 64\-bit system, the \s-1IEEE\s0 128\-bit floating
  24848. point support will also enable the generation of \s-1ISA 3.0 IEEE\s0 128\-bit
  24849. floating point instructions. Otherwise, if you do not specify to
  24850. generate \s-1ISA 3.0\s0 instructions or you are targeting a 32\-bit big endian
  24851. system, \s-1IEEE\s0 128\-bit floating point will be done with software
  24852. emulation.
  24853. .IP "\fB\-mfloat128\-hardware\fR" 4
  24854. .IX Item "-mfloat128-hardware"
  24855. .PD 0
  24856. .IP "\fB\-mno\-float128\-hardware\fR" 4
  24857. .IX Item "-mno-float128-hardware"
  24858. .PD
  24859. Enable/disable using \s-1ISA 3.0\s0 hardware instructions to support the
  24860. \&\fI_\|_float128\fR data type.
  24861. .Sp
  24862. The default for \fB\-mfloat128\-hardware\fR is enabled on PowerPC
  24863. Linux systems using the \s-1ISA 3.0\s0 instruction set, and disabled on other
  24864. systems.
  24865. .IP "\fB\-m32\fR" 4
  24866. .IX Item "-m32"
  24867. .PD 0
  24868. .IP "\fB\-m64\fR" 4
  24869. .IX Item "-m64"
  24870. .PD
  24871. Generate code for 32\-bit or 64\-bit environments of Darwin and \s-1SVR4\s0
  24872. targets (including GNU/Linux). The 32\-bit environment sets int, long
  24873. and pointer to 32 bits and generates code that runs on any PowerPC
  24874. variant. The 64\-bit environment sets int to 32 bits and long and
  24875. pointer to 64 bits, and generates code for PowerPC64, as for
  24876. \&\fB\-mpowerpc64\fR.
  24877. .IP "\fB\-mfull\-toc\fR" 4
  24878. .IX Item "-mfull-toc"
  24879. .PD 0
  24880. .IP "\fB\-mno\-fp\-in\-toc\fR" 4
  24881. .IX Item "-mno-fp-in-toc"
  24882. .IP "\fB\-mno\-sum\-in\-toc\fR" 4
  24883. .IX Item "-mno-sum-in-toc"
  24884. .IP "\fB\-mminimal\-toc\fR" 4
  24885. .IX Item "-mminimal-toc"
  24886. .PD
  24887. Modify generation of the \s-1TOC \s0(Table Of Contents), which is created for
  24888. every executable file. The \fB\-mfull\-toc\fR option is selected by
  24889. default. In that case, \s-1GCC\s0 allocates at least one \s-1TOC\s0 entry for
  24890. each unique non-automatic variable reference in your program. \s-1GCC\s0
  24891. also places floating-point constants in the \s-1TOC. \s0 However, only
  24892. 16,384 entries are available in the \s-1TOC.\s0
  24893. .Sp
  24894. If you receive a linker error message that saying you have overflowed
  24895. the available \s-1TOC\s0 space, you can reduce the amount of \s-1TOC\s0 space used
  24896. with the \fB\-mno\-fp\-in\-toc\fR and \fB\-mno\-sum\-in\-toc\fR options.
  24897. \&\fB\-mno\-fp\-in\-toc\fR prevents \s-1GCC\s0 from putting floating-point
  24898. constants in the \s-1TOC\s0 and \fB\-mno\-sum\-in\-toc\fR forces \s-1GCC\s0 to
  24899. generate code to calculate the sum of an address and a constant at
  24900. run time instead of putting that sum into the \s-1TOC. \s0 You may specify one
  24901. or both of these options. Each causes \s-1GCC\s0 to produce very slightly
  24902. slower and larger code at the expense of conserving \s-1TOC\s0 space.
  24903. .Sp
  24904. If you still run out of space in the \s-1TOC\s0 even when you specify both of
  24905. these options, specify \fB\-mminimal\-toc\fR instead. This option causes
  24906. \&\s-1GCC\s0 to make only one \s-1TOC\s0 entry for every file. When you specify this
  24907. option, \s-1GCC\s0 produces code that is slower and larger but which
  24908. uses extremely little \s-1TOC\s0 space. You may wish to use this option
  24909. only on files that contain less frequently-executed code.
  24910. .IP "\fB\-maix64\fR" 4
  24911. .IX Item "-maix64"
  24912. .PD 0
  24913. .IP "\fB\-maix32\fR" 4
  24914. .IX Item "-maix32"
  24915. .PD
  24916. Enable 64\-bit \s-1AIX ABI\s0 and calling convention: 64\-bit pointers, 64\-bit
  24917. \&\f(CW\*(C`long\*(C'\fR type, and the infrastructure needed to support them.
  24918. Specifying \fB\-maix64\fR implies \fB\-mpowerpc64\fR,
  24919. while \fB\-maix32\fR disables the 64\-bit \s-1ABI\s0 and
  24920. implies \fB\-mno\-powerpc64\fR. \s-1GCC\s0 defaults to \fB\-maix32\fR.
  24921. .IP "\fB\-mxl\-compat\fR" 4
  24922. .IX Item "-mxl-compat"
  24923. .PD 0
  24924. .IP "\fB\-mno\-xl\-compat\fR" 4
  24925. .IX Item "-mno-xl-compat"
  24926. .PD
  24927. Produce code that conforms more closely to \s-1IBM XL\s0 compiler semantics
  24928. when using AIX-compatible \s-1ABI. \s0 Pass floating-point arguments to
  24929. prototyped functions beyond the register save area (\s-1RSA\s0) on the stack
  24930. in addition to argument FPRs. Do not assume that most significant
  24931. double in 128\-bit long double value is properly rounded when comparing
  24932. values and converting to double. Use \s-1XL\s0 symbol names for long double
  24933. support routines.
  24934. .Sp
  24935. The \s-1AIX\s0 calling convention was extended but not initially documented to
  24936. handle an obscure K&R C case of calling a function that takes the
  24937. address of its arguments with fewer arguments than declared. \s-1IBM XL\s0
  24938. compilers access floating-point arguments that do not fit in the
  24939. \&\s-1RSA\s0 from the stack when a subroutine is compiled without
  24940. optimization. Because always storing floating-point arguments on the
  24941. stack is inefficient and rarely needed, this option is not enabled by
  24942. default and only is necessary when calling subroutines compiled by \s-1IBM
  24943. XL\s0 compilers without optimization.
  24944. .IP "\fB\-mpe\fR" 4
  24945. .IX Item "-mpe"
  24946. Support \fI\s-1IBM RS/6000 SP\s0\fR \fIParallel Environment\fR (\s-1PE\s0). Link an
  24947. application written to use message passing with special startup code to
  24948. enable the application to run. The system must have \s-1PE\s0 installed in the
  24949. standard location (\fI/usr/lpp/ppe.poe/\fR), or the \fIspecs\fR file
  24950. must be overridden with the \fB\-specs=\fR option to specify the
  24951. appropriate directory location. The Parallel Environment does not
  24952. support threads, so the \fB\-mpe\fR option and the \fB\-pthread\fR
  24953. option are incompatible.
  24954. .IP "\fB\-malign\-natural\fR" 4
  24955. .IX Item "-malign-natural"
  24956. .PD 0
  24957. .IP "\fB\-malign\-power\fR" 4
  24958. .IX Item "-malign-power"
  24959. .PD
  24960. On \s-1AIX,\s0 32\-bit Darwin, and 64\-bit PowerPC GNU/Linux, the option
  24961. \&\fB\-malign\-natural\fR overrides the ABI-defined alignment of larger
  24962. types, such as floating-point doubles, on their natural size-based boundary.
  24963. The option \fB\-malign\-power\fR instructs \s-1GCC\s0 to follow the ABI-specified
  24964. alignment rules. \s-1GCC\s0 defaults to the standard alignment defined in the \s-1ABI.\s0
  24965. .Sp
  24966. On 64\-bit Darwin, natural alignment is the default, and \fB\-malign\-power\fR
  24967. is not supported.
  24968. .IP "\fB\-msoft\-float\fR" 4
  24969. .IX Item "-msoft-float"
  24970. .PD 0
  24971. .IP "\fB\-mhard\-float\fR" 4
  24972. .IX Item "-mhard-float"
  24973. .PD
  24974. Generate code that does not use (uses) the floating-point register set.
  24975. Software floating-point emulation is provided if you use the
  24976. \&\fB\-msoft\-float\fR option, and pass the option to \s-1GCC\s0 when linking.
  24977. .IP "\fB\-mmultiple\fR" 4
  24978. .IX Item "-mmultiple"
  24979. .PD 0
  24980. .IP "\fB\-mno\-multiple\fR" 4
  24981. .IX Item "-mno-multiple"
  24982. .PD
  24983. Generate code that uses (does not use) the load multiple word
  24984. instructions and the store multiple word instructions. These
  24985. instructions are generated by default on \s-1POWER\s0 systems, and not
  24986. generated on PowerPC systems. Do not use \fB\-mmultiple\fR on little-endian
  24987. PowerPC systems, since those instructions do not work when the
  24988. processor is in little-endian mode. The exceptions are \s-1PPC740\s0 and
  24989. \&\s-1PPC750\s0 which permit these instructions in little-endian mode.
  24990. .IP "\fB\-mupdate\fR" 4
  24991. .IX Item "-mupdate"
  24992. .PD 0
  24993. .IP "\fB\-mno\-update\fR" 4
  24994. .IX Item "-mno-update"
  24995. .PD
  24996. Generate code that uses (does not use) the load or store instructions
  24997. that update the base register to the address of the calculated memory
  24998. location. These instructions are generated by default. If you use
  24999. \&\fB\-mno\-update\fR, there is a small window between the time that the
  25000. stack pointer is updated and the address of the previous frame is
  25001. stored, which means code that walks the stack frame across interrupts or
  25002. signals may get corrupted data.
  25003. .IP "\fB\-mavoid\-indexed\-addresses\fR" 4
  25004. .IX Item "-mavoid-indexed-addresses"
  25005. .PD 0
  25006. .IP "\fB\-mno\-avoid\-indexed\-addresses\fR" 4
  25007. .IX Item "-mno-avoid-indexed-addresses"
  25008. .PD
  25009. Generate code that tries to avoid (not avoid) the use of indexed load
  25010. or store instructions. These instructions can incur a performance
  25011. penalty on Power6 processors in certain situations, such as when
  25012. stepping through large arrays that cross a 16M boundary. This option
  25013. is enabled by default when targeting Power6 and disabled otherwise.
  25014. .IP "\fB\-mfused\-madd\fR" 4
  25015. .IX Item "-mfused-madd"
  25016. .PD 0
  25017. .IP "\fB\-mno\-fused\-madd\fR" 4
  25018. .IX Item "-mno-fused-madd"
  25019. .PD
  25020. Generate code that uses (does not use) the floating-point multiply and
  25021. accumulate instructions. These instructions are generated by default
  25022. if hardware floating point is used. The machine-dependent
  25023. \&\fB\-mfused\-madd\fR option is now mapped to the machine-independent
  25024. \&\fB\-ffp\-contract=fast\fR option, and \fB\-mno\-fused\-madd\fR is
  25025. mapped to \fB\-ffp\-contract=off\fR.
  25026. .IP "\fB\-mmulhw\fR" 4
  25027. .IX Item "-mmulhw"
  25028. .PD 0
  25029. .IP "\fB\-mno\-mulhw\fR" 4
  25030. .IX Item "-mno-mulhw"
  25031. .PD
  25032. Generate code that uses (does not use) the half-word multiply and
  25033. multiply-accumulate instructions on the \s-1IBM 405, 440, 464\s0 and 476 processors.
  25034. These instructions are generated by default when targeting those
  25035. processors.
  25036. .IP "\fB\-mdlmzb\fR" 4
  25037. .IX Item "-mdlmzb"
  25038. .PD 0
  25039. .IP "\fB\-mno\-dlmzb\fR" 4
  25040. .IX Item "-mno-dlmzb"
  25041. .PD
  25042. Generate code that uses (does not use) the string-search \fBdlmzb\fR
  25043. instruction on the \s-1IBM 405, 440, 464\s0 and 476 processors. This instruction is
  25044. generated by default when targeting those processors.
  25045. .IP "\fB\-mno\-bit\-align\fR" 4
  25046. .IX Item "-mno-bit-align"
  25047. .PD 0
  25048. .IP "\fB\-mbit\-align\fR" 4
  25049. .IX Item "-mbit-align"
  25050. .PD
  25051. On System V.4 and embedded PowerPC systems do not (do) force structures
  25052. and unions that contain bit-fields to be aligned to the base type of the
  25053. bit-field.
  25054. .Sp
  25055. For example, by default a structure containing nothing but 8
  25056. \&\f(CW\*(C`unsigned\*(C'\fR bit-fields of length 1 is aligned to a 4\-byte
  25057. boundary and has a size of 4 bytes. By using \fB\-mno\-bit\-align\fR,
  25058. the structure is aligned to a 1\-byte boundary and is 1 byte in
  25059. size.
  25060. .IP "\fB\-mno\-strict\-align\fR" 4
  25061. .IX Item "-mno-strict-align"
  25062. .PD 0
  25063. .IP "\fB\-mstrict\-align\fR" 4
  25064. .IX Item "-mstrict-align"
  25065. .PD
  25066. On System V.4 and embedded PowerPC systems do not (do) assume that
  25067. unaligned memory references are handled by the system.
  25068. .IP "\fB\-mrelocatable\fR" 4
  25069. .IX Item "-mrelocatable"
  25070. .PD 0
  25071. .IP "\fB\-mno\-relocatable\fR" 4
  25072. .IX Item "-mno-relocatable"
  25073. .PD
  25074. Generate code that allows (does not allow) a static executable to be
  25075. relocated to a different address at run time. A simple embedded
  25076. PowerPC system loader should relocate the entire contents of
  25077. \&\f(CW\*(C`.got2\*(C'\fR and 4\-byte locations listed in the \f(CW\*(C`.fixup\*(C'\fR section,
  25078. a table of 32\-bit addresses generated by this option. For this to
  25079. work, all objects linked together must be compiled with
  25080. \&\fB\-mrelocatable\fR or \fB\-mrelocatable\-lib\fR.
  25081. \&\fB\-mrelocatable\fR code aligns the stack to an 8\-byte boundary.
  25082. .IP "\fB\-mrelocatable\-lib\fR" 4
  25083. .IX Item "-mrelocatable-lib"
  25084. .PD 0
  25085. .IP "\fB\-mno\-relocatable\-lib\fR" 4
  25086. .IX Item "-mno-relocatable-lib"
  25087. .PD
  25088. Like \fB\-mrelocatable\fR, \fB\-mrelocatable\-lib\fR generates a
  25089. \&\f(CW\*(C`.fixup\*(C'\fR section to allow static executables to be relocated at
  25090. run time, but \fB\-mrelocatable\-lib\fR does not use the smaller stack
  25091. alignment of \fB\-mrelocatable\fR. Objects compiled with
  25092. \&\fB\-mrelocatable\-lib\fR may be linked with objects compiled with
  25093. any combination of the \fB\-mrelocatable\fR options.
  25094. .IP "\fB\-mno\-toc\fR" 4
  25095. .IX Item "-mno-toc"
  25096. .PD 0
  25097. .IP "\fB\-mtoc\fR" 4
  25098. .IX Item "-mtoc"
  25099. .PD
  25100. On System V.4 and embedded PowerPC systems do not (do) assume that
  25101. register 2 contains a pointer to a global area pointing to the addresses
  25102. used in the program.
  25103. .IP "\fB\-mlittle\fR" 4
  25104. .IX Item "-mlittle"
  25105. .PD 0
  25106. .IP "\fB\-mlittle\-endian\fR" 4
  25107. .IX Item "-mlittle-endian"
  25108. .PD
  25109. On System V.4 and embedded PowerPC systems compile code for the
  25110. processor in little-endian mode. The \fB\-mlittle\-endian\fR option is
  25111. the same as \fB\-mlittle\fR.
  25112. .IP "\fB\-mbig\fR" 4
  25113. .IX Item "-mbig"
  25114. .PD 0
  25115. .IP "\fB\-mbig\-endian\fR" 4
  25116. .IX Item "-mbig-endian"
  25117. .PD
  25118. On System V.4 and embedded PowerPC systems compile code for the
  25119. processor in big-endian mode. The \fB\-mbig\-endian\fR option is
  25120. the same as \fB\-mbig\fR.
  25121. .IP "\fB\-mdynamic\-no\-pic\fR" 4
  25122. .IX Item "-mdynamic-no-pic"
  25123. On Darwin and Mac \s-1OS X\s0 systems, compile code so that it is not
  25124. relocatable, but that its external references are relocatable. The
  25125. resulting code is suitable for applications, but not shared
  25126. libraries.
  25127. .IP "\fB\-msingle\-pic\-base\fR" 4
  25128. .IX Item "-msingle-pic-base"
  25129. Treat the register used for \s-1PIC\s0 addressing as read-only, rather than
  25130. loading it in the prologue for each function. The runtime system is
  25131. responsible for initializing this register with an appropriate value
  25132. before execution begins.
  25133. .IP "\fB\-mprioritize\-restricted\-insns=\fR\fIpriority\fR" 4
  25134. .IX Item "-mprioritize-restricted-insns=priority"
  25135. This option controls the priority that is assigned to
  25136. dispatch-slot restricted instructions during the second scheduling
  25137. pass. The argument \fIpriority\fR takes the value \fB0\fR, \fB1\fR,
  25138. or \fB2\fR to assign no, highest, or second-highest (respectively)
  25139. priority to dispatch-slot restricted
  25140. instructions.
  25141. .IP "\fB\-msched\-costly\-dep=\fR\fIdependence_type\fR" 4
  25142. .IX Item "-msched-costly-dep=dependence_type"
  25143. This option controls which dependences are considered costly
  25144. by the target during instruction scheduling. The argument
  25145. \&\fIdependence_type\fR takes one of the following values:
  25146. .RS 4
  25147. .IP "\fBno\fR" 4
  25148. .IX Item "no"
  25149. No dependence is costly.
  25150. .IP "\fBall\fR" 4
  25151. .IX Item "all"
  25152. All dependences are costly.
  25153. .IP "\fBtrue_store_to_load\fR" 4
  25154. .IX Item "true_store_to_load"
  25155. A true dependence from store to load is costly.
  25156. .IP "\fBstore_to_load\fR" 4
  25157. .IX Item "store_to_load"
  25158. Any dependence from store to load is costly.
  25159. .IP "\fInumber\fR" 4
  25160. .IX Item "number"
  25161. Any dependence for which the latency is greater than or equal to
  25162. \&\fInumber\fR is costly.
  25163. .RE
  25164. .RS 4
  25165. .RE
  25166. .IP "\fB\-minsert\-sched\-nops=\fR\fIscheme\fR" 4
  25167. .IX Item "-minsert-sched-nops=scheme"
  25168. This option controls which \s-1NOP\s0 insertion scheme is used during
  25169. the second scheduling pass. The argument \fIscheme\fR takes one of the
  25170. following values:
  25171. .RS 4
  25172. .IP "\fBno\fR" 4
  25173. .IX Item "no"
  25174. Don't insert NOPs.
  25175. .IP "\fBpad\fR" 4
  25176. .IX Item "pad"
  25177. Pad with NOPs any dispatch group that has vacant issue slots,
  25178. according to the scheduler's grouping.
  25179. .IP "\fBregroup_exact\fR" 4
  25180. .IX Item "regroup_exact"
  25181. Insert NOPs to force costly dependent insns into
  25182. separate groups. Insert exactly as many NOPs as needed to force an insn
  25183. to a new group, according to the estimated processor grouping.
  25184. .IP "\fInumber\fR" 4
  25185. .IX Item "number"
  25186. Insert NOPs to force costly dependent insns into
  25187. separate groups. Insert \fInumber\fR NOPs to force an insn to a new group.
  25188. .RE
  25189. .RS 4
  25190. .RE
  25191. .IP "\fB\-mcall\-sysv\fR" 4
  25192. .IX Item "-mcall-sysv"
  25193. On System V.4 and embedded PowerPC systems compile code using calling
  25194. conventions that adhere to the March 1995 draft of the System V
  25195. Application Binary Interface, PowerPC processor supplement. This is the
  25196. default unless you configured \s-1GCC\s0 using \fBpowerpc\-*\-eabiaix\fR.
  25197. .IP "\fB\-mcall\-sysv\-eabi\fR" 4
  25198. .IX Item "-mcall-sysv-eabi"
  25199. .PD 0
  25200. .IP "\fB\-mcall\-eabi\fR" 4
  25201. .IX Item "-mcall-eabi"
  25202. .PD
  25203. Specify both \fB\-mcall\-sysv\fR and \fB\-meabi\fR options.
  25204. .IP "\fB\-mcall\-sysv\-noeabi\fR" 4
  25205. .IX Item "-mcall-sysv-noeabi"
  25206. Specify both \fB\-mcall\-sysv\fR and \fB\-mno\-eabi\fR options.
  25207. .IP "\fB\-mcall\-aixdesc\fR" 4
  25208. .IX Item "-mcall-aixdesc"
  25209. On System V.4 and embedded PowerPC systems compile code for the \s-1AIX\s0
  25210. operating system.
  25211. .IP "\fB\-mcall\-linux\fR" 4
  25212. .IX Item "-mcall-linux"
  25213. On System V.4 and embedded PowerPC systems compile code for the
  25214. Linux-based \s-1GNU\s0 system.
  25215. .IP "\fB\-mcall\-freebsd\fR" 4
  25216. .IX Item "-mcall-freebsd"
  25217. On System V.4 and embedded PowerPC systems compile code for the
  25218. FreeBSD operating system.
  25219. .IP "\fB\-mcall\-netbsd\fR" 4
  25220. .IX Item "-mcall-netbsd"
  25221. On System V.4 and embedded PowerPC systems compile code for the
  25222. NetBSD operating system.
  25223. .IP "\fB\-mcall\-openbsd\fR" 4
  25224. .IX Item "-mcall-openbsd"
  25225. On System V.4 and embedded PowerPC systems compile code for the
  25226. OpenBSD operating system.
  25227. .IP "\fB\-mtraceback=\fR\fItraceback_type\fR" 4
  25228. .IX Item "-mtraceback=traceback_type"
  25229. Select the type of traceback table. Valid values for \fItraceback_type\fR
  25230. are \fBfull\fR, \fBpart\fR, and \fBno\fR.
  25231. .IP "\fB\-maix\-struct\-return\fR" 4
  25232. .IX Item "-maix-struct-return"
  25233. Return all structures in memory (as specified by the \s-1AIX ABI\s0).
  25234. .IP "\fB\-msvr4\-struct\-return\fR" 4
  25235. .IX Item "-msvr4-struct-return"
  25236. Return structures smaller than 8 bytes in registers (as specified by the
  25237. \&\s-1SVR4 ABI\s0).
  25238. .IP "\fB\-mabi=\fR\fIabi-type\fR" 4
  25239. .IX Item "-mabi=abi-type"
  25240. Extend the current \s-1ABI\s0 with a particular extension, or remove such extension.
  25241. Valid values are \fBaltivec\fR, \fBno-altivec\fR,
  25242. \&\fBibmlongdouble\fR, \fBieeelongdouble\fR,
  25243. \&\fBelfv1\fR, \fBelfv2\fR.
  25244. .IP "\fB\-mabi=ibmlongdouble\fR" 4
  25245. .IX Item "-mabi=ibmlongdouble"
  25246. Change the current \s-1ABI\s0 to use \s-1IBM\s0 extended-precision long double.
  25247. This is not likely to work if your system defaults to using \s-1IEEE\s0
  25248. extended-precision long double. If you change the long double type
  25249. from \s-1IEEE\s0 extended-precision, the compiler will issue a warning unless
  25250. you use the \fB\-Wno\-psabi\fR option. Requires \fB\-mlong\-double\-128\fR
  25251. to be enabled.
  25252. .IP "\fB\-mabi=ieeelongdouble\fR" 4
  25253. .IX Item "-mabi=ieeelongdouble"
  25254. Change the current \s-1ABI\s0 to use \s-1IEEE\s0 extended-precision long double.
  25255. This is not likely to work if your system defaults to using \s-1IBM\s0
  25256. extended-precision long double. If you change the long double type
  25257. from \s-1IBM\s0 extended-precision, the compiler will issue a warning unless
  25258. you use the \fB\-Wno\-psabi\fR option. Requires \fB\-mlong\-double\-128\fR
  25259. to be enabled.
  25260. .IP "\fB\-mabi=elfv1\fR" 4
  25261. .IX Item "-mabi=elfv1"
  25262. Change the current \s-1ABI\s0 to use the ELFv1 \s-1ABI.\s0
  25263. This is the default \s-1ABI\s0 for big-endian PowerPC 64\-bit Linux.
  25264. Overriding the default \s-1ABI\s0 requires special system support and is
  25265. likely to fail in spectacular ways.
  25266. .IP "\fB\-mabi=elfv2\fR" 4
  25267. .IX Item "-mabi=elfv2"
  25268. Change the current \s-1ABI\s0 to use the ELFv2 \s-1ABI.\s0
  25269. This is the default \s-1ABI\s0 for little-endian PowerPC 64\-bit Linux.
  25270. Overriding the default \s-1ABI\s0 requires special system support and is
  25271. likely to fail in spectacular ways.
  25272. .IP "\fB\-mgnu\-attribute\fR" 4
  25273. .IX Item "-mgnu-attribute"
  25274. .PD 0
  25275. .IP "\fB\-mno\-gnu\-attribute\fR" 4
  25276. .IX Item "-mno-gnu-attribute"
  25277. .PD
  25278. Emit .gnu_attribute assembly directives to set tag/value pairs in a
  25279. \&.gnu.attributes section that specify \s-1ABI\s0 variations in function
  25280. parameters or return values.
  25281. .IP "\fB\-mprototype\fR" 4
  25282. .IX Item "-mprototype"
  25283. .PD 0
  25284. .IP "\fB\-mno\-prototype\fR" 4
  25285. .IX Item "-mno-prototype"
  25286. .PD
  25287. On System V.4 and embedded PowerPC systems assume that all calls to
  25288. variable argument functions are properly prototyped. Otherwise, the
  25289. compiler must insert an instruction before every non-prototyped call to
  25290. set or clear bit 6 of the condition code register (\f(CW\*(C`CR\*(C'\fR) to
  25291. indicate whether floating-point values are passed in the floating-point
  25292. registers in case the function takes variable arguments. With
  25293. \&\fB\-mprototype\fR, only calls to prototyped variable argument functions
  25294. set or clear the bit.
  25295. .IP "\fB\-msim\fR" 4
  25296. .IX Item "-msim"
  25297. On embedded PowerPC systems, assume that the startup module is called
  25298. \&\fIsim\-crt0.o\fR and that the standard C libraries are \fIlibsim.a\fR and
  25299. \&\fIlibc.a\fR. This is the default for \fBpowerpc\-*\-eabisim\fR
  25300. configurations.
  25301. .IP "\fB\-mmvme\fR" 4
  25302. .IX Item "-mmvme"
  25303. On embedded PowerPC systems, assume that the startup module is called
  25304. \&\fIcrt0.o\fR and the standard C libraries are \fIlibmvme.a\fR and
  25305. \&\fIlibc.a\fR.
  25306. .IP "\fB\-mads\fR" 4
  25307. .IX Item "-mads"
  25308. On embedded PowerPC systems, assume that the startup module is called
  25309. \&\fIcrt0.o\fR and the standard C libraries are \fIlibads.a\fR and
  25310. \&\fIlibc.a\fR.
  25311. .IP "\fB\-myellowknife\fR" 4
  25312. .IX Item "-myellowknife"
  25313. On embedded PowerPC systems, assume that the startup module is called
  25314. \&\fIcrt0.o\fR and the standard C libraries are \fIlibyk.a\fR and
  25315. \&\fIlibc.a\fR.
  25316. .IP "\fB\-mvxworks\fR" 4
  25317. .IX Item "-mvxworks"
  25318. On System V.4 and embedded PowerPC systems, specify that you are
  25319. compiling for a VxWorks system.
  25320. .IP "\fB\-memb\fR" 4
  25321. .IX Item "-memb"
  25322. On embedded PowerPC systems, set the \f(CW\*(C`PPC_EMB\*(C'\fR bit in the \s-1ELF\s0 flags
  25323. header to indicate that \fBeabi\fR extended relocations are used.
  25324. .IP "\fB\-meabi\fR" 4
  25325. .IX Item "-meabi"
  25326. .PD 0
  25327. .IP "\fB\-mno\-eabi\fR" 4
  25328. .IX Item "-mno-eabi"
  25329. .PD
  25330. On System V.4 and embedded PowerPC systems do (do not) adhere to the
  25331. Embedded Applications Binary Interface (\s-1EABI\s0), which is a set of
  25332. modifications to the System V.4 specifications. Selecting \fB\-meabi\fR
  25333. means that the stack is aligned to an 8\-byte boundary, a function
  25334. \&\f(CW\*(C`_\|_eabi\*(C'\fR is called from \f(CW\*(C`main\*(C'\fR to set up the \s-1EABI\s0
  25335. environment, and the \fB\-msdata\fR option can use both \f(CW\*(C`r2\*(C'\fR and
  25336. \&\f(CW\*(C`r13\*(C'\fR to point to two separate small data areas. Selecting
  25337. \&\fB\-mno\-eabi\fR means that the stack is aligned to a 16\-byte boundary,
  25338. no \s-1EABI\s0 initialization function is called from \f(CW\*(C`main\*(C'\fR, and the
  25339. \&\fB\-msdata\fR option only uses \f(CW\*(C`r13\*(C'\fR to point to a single
  25340. small data area. The \fB\-meabi\fR option is on by default if you
  25341. configured \s-1GCC\s0 using one of the \fBpowerpc*\-*\-eabi*\fR options.
  25342. .IP "\fB\-msdata=eabi\fR" 4
  25343. .IX Item "-msdata=eabi"
  25344. On System V.4 and embedded PowerPC systems, put small initialized
  25345. \&\f(CW\*(C`const\*(C'\fR global and static data in the \f(CW\*(C`.sdata2\*(C'\fR section, which
  25346. is pointed to by register \f(CW\*(C`r2\*(C'\fR. Put small initialized
  25347. non\-\f(CW\*(C`const\*(C'\fR global and static data in the \f(CW\*(C`.sdata\*(C'\fR section,
  25348. which is pointed to by register \f(CW\*(C`r13\*(C'\fR. Put small uninitialized
  25349. global and static data in the \f(CW\*(C`.sbss\*(C'\fR section, which is adjacent to
  25350. the \f(CW\*(C`.sdata\*(C'\fR section. The \fB\-msdata=eabi\fR option is
  25351. incompatible with the \fB\-mrelocatable\fR option. The
  25352. \&\fB\-msdata=eabi\fR option also sets the \fB\-memb\fR option.
  25353. .IP "\fB\-msdata=sysv\fR" 4
  25354. .IX Item "-msdata=sysv"
  25355. On System V.4 and embedded PowerPC systems, put small global and static
  25356. data in the \f(CW\*(C`.sdata\*(C'\fR section, which is pointed to by register
  25357. \&\f(CW\*(C`r13\*(C'\fR. Put small uninitialized global and static data in the
  25358. \&\f(CW\*(C`.sbss\*(C'\fR section, which is adjacent to the \f(CW\*(C`.sdata\*(C'\fR section.
  25359. The \fB\-msdata=sysv\fR option is incompatible with the
  25360. \&\fB\-mrelocatable\fR option.
  25361. .IP "\fB\-msdata=default\fR" 4
  25362. .IX Item "-msdata=default"
  25363. .PD 0
  25364. .IP "\fB\-msdata\fR" 4
  25365. .IX Item "-msdata"
  25366. .PD
  25367. On System V.4 and embedded PowerPC systems, if \fB\-meabi\fR is used,
  25368. compile code the same as \fB\-msdata=eabi\fR, otherwise compile code the
  25369. same as \fB\-msdata=sysv\fR.
  25370. .IP "\fB\-msdata=data\fR" 4
  25371. .IX Item "-msdata=data"
  25372. On System V.4 and embedded PowerPC systems, put small global
  25373. data in the \f(CW\*(C`.sdata\*(C'\fR section. Put small uninitialized global
  25374. data in the \f(CW\*(C`.sbss\*(C'\fR section. Do not use register \f(CW\*(C`r13\*(C'\fR
  25375. to address small data however. This is the default behavior unless
  25376. other \fB\-msdata\fR options are used.
  25377. .IP "\fB\-msdata=none\fR" 4
  25378. .IX Item "-msdata=none"
  25379. .PD 0
  25380. .IP "\fB\-mno\-sdata\fR" 4
  25381. .IX Item "-mno-sdata"
  25382. .PD
  25383. On embedded PowerPC systems, put all initialized global and static data
  25384. in the \f(CW\*(C`.data\*(C'\fR section, and all uninitialized data in the
  25385. \&\f(CW\*(C`.bss\*(C'\fR section.
  25386. .IP "\fB\-mreadonly\-in\-sdata\fR" 4
  25387. .IX Item "-mreadonly-in-sdata"
  25388. Put read-only objects in the \f(CW\*(C`.sdata\*(C'\fR section as well. This is the
  25389. default.
  25390. .IP "\fB\-mblock\-move\-inline\-limit=\fR\fInum\fR" 4
  25391. .IX Item "-mblock-move-inline-limit=num"
  25392. Inline all block moves (such as calls to \f(CW\*(C`memcpy\*(C'\fR or structure
  25393. copies) less than or equal to \fInum\fR bytes. The minimum value for
  25394. \&\fInum\fR is 32 bytes on 32\-bit targets and 64 bytes on 64\-bit
  25395. targets. The default value is target-specific.
  25396. .IP "\fB\-mblock\-compare\-inline\-limit=\fR\fInum\fR" 4
  25397. .IX Item "-mblock-compare-inline-limit=num"
  25398. Generate non-looping inline code for all block compares (such as calls
  25399. to \f(CW\*(C`memcmp\*(C'\fR or structure compares) less than or equal to \fInum\fR
  25400. bytes. If \fInum\fR is 0, all inline expansion (non-loop and loop) of
  25401. block compare is disabled. The default value is target-specific.
  25402. .IP "\fB\-mblock\-compare\-inline\-loop\-limit=\fR\fInum\fR" 4
  25403. .IX Item "-mblock-compare-inline-loop-limit=num"
  25404. Generate an inline expansion using loop code for all block compares that
  25405. are less than or equal to \fInum\fR bytes, but greater than the limit
  25406. for non-loop inline block compare expansion. If the block length is not
  25407. constant, at most \fInum\fR bytes will be compared before \f(CW\*(C`memcmp\*(C'\fR
  25408. is called to compare the remainder of the block. The default value is
  25409. target-specific.
  25410. .IP "\fB\-mstring\-compare\-inline\-limit=\fR\fInum\fR" 4
  25411. .IX Item "-mstring-compare-inline-limit=num"
  25412. Compare at most \fInum\fR string bytes with inline code.
  25413. If the difference or end of string is not found at the
  25414. end of the inline compare a call to \f(CW\*(C`strcmp\*(C'\fR or \f(CW\*(C`strncmp\*(C'\fR will
  25415. take care of the rest of the comparison. The default is 64 bytes.
  25416. .IP "\fB\-G\fR \fInum\fR" 4
  25417. .IX Item "-G num"
  25418. On embedded PowerPC systems, put global and static items less than or
  25419. equal to \fInum\fR bytes into the small data or \s-1BSS\s0 sections instead of
  25420. the normal data or \s-1BSS\s0 section. By default, \fInum\fR is 8. The
  25421. \&\fB\-G\fR \fInum\fR switch is also passed to the linker.
  25422. All modules should be compiled with the same \fB\-G\fR \fInum\fR value.
  25423. .IP "\fB\-mregnames\fR" 4
  25424. .IX Item "-mregnames"
  25425. .PD 0
  25426. .IP "\fB\-mno\-regnames\fR" 4
  25427. .IX Item "-mno-regnames"
  25428. .PD
  25429. On System V.4 and embedded PowerPC systems do (do not) emit register
  25430. names in the assembly language output using symbolic forms.
  25431. .IP "\fB\-mlongcall\fR" 4
  25432. .IX Item "-mlongcall"
  25433. .PD 0
  25434. .IP "\fB\-mno\-longcall\fR" 4
  25435. .IX Item "-mno-longcall"
  25436. .PD
  25437. By default assume that all calls are far away so that a longer and more
  25438. expensive calling sequence is required. This is required for calls
  25439. farther than 32 megabytes (33,554,432 bytes) from the current location.
  25440. A short call is generated if the compiler knows
  25441. the call cannot be that far away. This setting can be overridden by
  25442. the \f(CW\*(C`shortcall\*(C'\fR function attribute, or by \f(CW\*(C`#pragma
  25443. longcall(0)\*(C'\fR.
  25444. .Sp
  25445. Some linkers are capable of detecting out-of-range calls and generating
  25446. glue code on the fly. On these systems, long calls are unnecessary and
  25447. generate slower code. As of this writing, the \s-1AIX\s0 linker can do this,
  25448. as can the \s-1GNU\s0 linker for PowerPC/64. It is planned to add this feature
  25449. to the \s-1GNU\s0 linker for 32\-bit PowerPC systems as well.
  25450. .Sp
  25451. On PowerPC64 ELFv2 and 32\-bit PowerPC systems with newer \s-1GNU\s0 linkers,
  25452. \&\s-1GCC\s0 can generate long calls using an inline \s-1PLT\s0 call sequence (see
  25453. \&\fB\-mpltseq\fR). PowerPC with \fB\-mbss\-plt\fR and PowerPC64
  25454. ELFv1 (big-endian) do not support inline \s-1PLT\s0 calls.
  25455. .Sp
  25456. On Darwin/PPC systems, \f(CW\*(C`#pragma longcall\*(C'\fR generates \f(CW\*(C`jbsr
  25457. callee, L42\*(C'\fR, plus a \fIbranch island\fR (glue code). The two target
  25458. addresses represent the callee and the branch island. The
  25459. Darwin/PPC linker prefers the first address and generates a \f(CW\*(C`bl
  25460. callee\*(C'\fR if the \s-1PPC \s0\f(CW\*(C`bl\*(C'\fR instruction reaches the callee directly;
  25461. otherwise, the linker generates \f(CW\*(C`bl L42\*(C'\fR to call the branch
  25462. island. The branch island is appended to the body of the
  25463. calling function; it computes the full 32\-bit address of the callee
  25464. and jumps to it.
  25465. .Sp
  25466. On Mach-O (Darwin) systems, this option directs the compiler emit to
  25467. the glue for every direct call, and the Darwin linker decides whether
  25468. to use or discard it.
  25469. .Sp
  25470. In the future, \s-1GCC\s0 may ignore all longcall specifications
  25471. when the linker is known to generate glue.
  25472. .IP "\fB\-mpltseq\fR" 4
  25473. .IX Item "-mpltseq"
  25474. .PD 0
  25475. .IP "\fB\-mno\-pltseq\fR" 4
  25476. .IX Item "-mno-pltseq"
  25477. .PD
  25478. Implement (do not implement) \-fno\-plt and long calls using an inline
  25479. \&\s-1PLT\s0 call sequence that supports lazy linking and long calls to
  25480. functions in dlopen'd shared libraries. Inline \s-1PLT\s0 calls are only
  25481. supported on PowerPC64 ELFv2 and 32\-bit PowerPC systems with newer \s-1GNU\s0
  25482. linkers, and are enabled by default if the support is detected when
  25483. configuring \s-1GCC,\s0 and, in the case of 32\-bit PowerPC, if \s-1GCC\s0 is
  25484. configured with \fB\-\-enable\-secureplt\fR. \fB\-mpltseq\fR code
  25485. and \fB\-mbss\-plt\fR 32\-bit PowerPC relocatable objects may not be
  25486. linked together.
  25487. .IP "\fB\-mtls\-markers\fR" 4
  25488. .IX Item "-mtls-markers"
  25489. .PD 0
  25490. .IP "\fB\-mno\-tls\-markers\fR" 4
  25491. .IX Item "-mno-tls-markers"
  25492. .PD
  25493. Mark (do not mark) calls to \f(CW\*(C`_\|_tls_get_addr\*(C'\fR with a relocation
  25494. specifying the function argument. The relocation allows the linker to
  25495. reliably associate function call with argument setup instructions for
  25496. \&\s-1TLS\s0 optimization, which in turn allows \s-1GCC\s0 to better schedule the
  25497. sequence.
  25498. .IP "\fB\-mrecip\fR" 4
  25499. .IX Item "-mrecip"
  25500. .PD 0
  25501. .IP "\fB\-mno\-recip\fR" 4
  25502. .IX Item "-mno-recip"
  25503. .PD
  25504. This option enables use of the reciprocal estimate and
  25505. reciprocal square root estimate instructions with additional
  25506. Newton-Raphson steps to increase precision instead of doing a divide or
  25507. square root and divide for floating-point arguments. You should use
  25508. the \fB\-ffast\-math\fR option when using \fB\-mrecip\fR (or at
  25509. least \fB\-funsafe\-math\-optimizations\fR,
  25510. \&\fB\-ffinite\-math\-only\fR, \fB\-freciprocal\-math\fR and
  25511. \&\fB\-fno\-trapping\-math\fR). Note that while the throughput of the
  25512. sequence is generally higher than the throughput of the non-reciprocal
  25513. instruction, the precision of the sequence can be decreased by up to 2
  25514. ulp (i.e. the inverse of 1.0 equals 0.99999994) for reciprocal square
  25515. roots.
  25516. .IP "\fB\-mrecip=\fR\fIopt\fR" 4
  25517. .IX Item "-mrecip=opt"
  25518. This option controls which reciprocal estimate instructions
  25519. may be used. \fIopt\fR is a comma-separated list of options, which may
  25520. be preceded by a \f(CW\*(C`!\*(C'\fR to invert the option:
  25521. .RS 4
  25522. .IP "\fBall\fR" 4
  25523. .IX Item "all"
  25524. Enable all estimate instructions.
  25525. .IP "\fBdefault\fR" 4
  25526. .IX Item "default"
  25527. Enable the default instructions, equivalent to \fB\-mrecip\fR.
  25528. .IP "\fBnone\fR" 4
  25529. .IX Item "none"
  25530. Disable all estimate instructions, equivalent to \fB\-mno\-recip\fR.
  25531. .IP "\fBdiv\fR" 4
  25532. .IX Item "div"
  25533. Enable the reciprocal approximation instructions for both
  25534. single and double precision.
  25535. .IP "\fBdivf\fR" 4
  25536. .IX Item "divf"
  25537. Enable the single-precision reciprocal approximation instructions.
  25538. .IP "\fBdivd\fR" 4
  25539. .IX Item "divd"
  25540. Enable the double-precision reciprocal approximation instructions.
  25541. .IP "\fBrsqrt\fR" 4
  25542. .IX Item "rsqrt"
  25543. Enable the reciprocal square root approximation instructions for both
  25544. single and double precision.
  25545. .IP "\fBrsqrtf\fR" 4
  25546. .IX Item "rsqrtf"
  25547. Enable the single-precision reciprocal square root approximation instructions.
  25548. .IP "\fBrsqrtd\fR" 4
  25549. .IX Item "rsqrtd"
  25550. Enable the double-precision reciprocal square root approximation instructions.
  25551. .RE
  25552. .RS 4
  25553. .Sp
  25554. So, for example, \fB\-mrecip=all,!rsqrtd\fR enables
  25555. all of the reciprocal estimate instructions, except for the
  25556. \&\f(CW\*(C`FRSQRTE\*(C'\fR, \f(CW\*(C`XSRSQRTEDP\*(C'\fR, and \f(CW\*(C`XVRSQRTEDP\*(C'\fR instructions
  25557. which handle the double-precision reciprocal square root calculations.
  25558. .RE
  25559. .IP "\fB\-mrecip\-precision\fR" 4
  25560. .IX Item "-mrecip-precision"
  25561. .PD 0
  25562. .IP "\fB\-mno\-recip\-precision\fR" 4
  25563. .IX Item "-mno-recip-precision"
  25564. .PD
  25565. Assume (do not assume) that the reciprocal estimate instructions
  25566. provide higher-precision estimates than is mandated by the PowerPC
  25567. \&\s-1ABI. \s0 Selecting \fB\-mcpu=power6\fR, \fB\-mcpu=power7\fR or
  25568. \&\fB\-mcpu=power8\fR automatically selects \fB\-mrecip\-precision\fR.
  25569. The double-precision square root estimate instructions are not generated by
  25570. default on low-precision machines, since they do not provide an
  25571. estimate that converges after three steps.
  25572. .IP "\fB\-mveclibabi=\fR\fItype\fR" 4
  25573. .IX Item "-mveclibabi=type"
  25574. Specifies the \s-1ABI\s0 type to use for vectorizing intrinsics using an
  25575. external library. The only type supported at present is \fBmass\fR,
  25576. which specifies to use \s-1IBM\s0's Mathematical Acceleration Subsystem
  25577. (\s-1MASS\s0) libraries for vectorizing intrinsics using external libraries.
  25578. \&\s-1GCC\s0 currently emits calls to \f(CW\*(C`acosd2\*(C'\fR, \f(CW\*(C`acosf4\*(C'\fR,
  25579. \&\f(CW\*(C`acoshd2\*(C'\fR, \f(CW\*(C`acoshf4\*(C'\fR, \f(CW\*(C`asind2\*(C'\fR, \f(CW\*(C`asinf4\*(C'\fR,
  25580. \&\f(CW\*(C`asinhd2\*(C'\fR, \f(CW\*(C`asinhf4\*(C'\fR, \f(CW\*(C`atan2d2\*(C'\fR, \f(CW\*(C`atan2f4\*(C'\fR,
  25581. \&\f(CW\*(C`atand2\*(C'\fR, \f(CW\*(C`atanf4\*(C'\fR, \f(CW\*(C`atanhd2\*(C'\fR, \f(CW\*(C`atanhf4\*(C'\fR,
  25582. \&\f(CW\*(C`cbrtd2\*(C'\fR, \f(CW\*(C`cbrtf4\*(C'\fR, \f(CW\*(C`cosd2\*(C'\fR, \f(CW\*(C`cosf4\*(C'\fR,
  25583. \&\f(CW\*(C`coshd2\*(C'\fR, \f(CW\*(C`coshf4\*(C'\fR, \f(CW\*(C`erfcd2\*(C'\fR, \f(CW\*(C`erfcf4\*(C'\fR,
  25584. \&\f(CW\*(C`erfd2\*(C'\fR, \f(CW\*(C`erff4\*(C'\fR, \f(CW\*(C`exp2d2\*(C'\fR, \f(CW\*(C`exp2f4\*(C'\fR,
  25585. \&\f(CW\*(C`expd2\*(C'\fR, \f(CW\*(C`expf4\*(C'\fR, \f(CW\*(C`expm1d2\*(C'\fR, \f(CW\*(C`expm1f4\*(C'\fR,
  25586. \&\f(CW\*(C`hypotd2\*(C'\fR, \f(CW\*(C`hypotf4\*(C'\fR, \f(CW\*(C`lgammad2\*(C'\fR, \f(CW\*(C`lgammaf4\*(C'\fR,
  25587. \&\f(CW\*(C`log10d2\*(C'\fR, \f(CW\*(C`log10f4\*(C'\fR, \f(CW\*(C`log1pd2\*(C'\fR, \f(CW\*(C`log1pf4\*(C'\fR,
  25588. \&\f(CW\*(C`log2d2\*(C'\fR, \f(CW\*(C`log2f4\*(C'\fR, \f(CW\*(C`logd2\*(C'\fR, \f(CW\*(C`logf4\*(C'\fR,
  25589. \&\f(CW\*(C`powd2\*(C'\fR, \f(CW\*(C`powf4\*(C'\fR, \f(CW\*(C`sind2\*(C'\fR, \f(CW\*(C`sinf4\*(C'\fR, \f(CW\*(C`sinhd2\*(C'\fR,
  25590. \&\f(CW\*(C`sinhf4\*(C'\fR, \f(CW\*(C`sqrtd2\*(C'\fR, \f(CW\*(C`sqrtf4\*(C'\fR, \f(CW\*(C`tand2\*(C'\fR,
  25591. \&\f(CW\*(C`tanf4\*(C'\fR, \f(CW\*(C`tanhd2\*(C'\fR, and \f(CW\*(C`tanhf4\*(C'\fR when generating code
  25592. for power7. Both \fB\-ftree\-vectorize\fR and
  25593. \&\fB\-funsafe\-math\-optimizations\fR must also be enabled. The \s-1MASS\s0
  25594. libraries must be specified at link time.
  25595. .IP "\fB\-mfriz\fR" 4
  25596. .IX Item "-mfriz"
  25597. .PD 0
  25598. .IP "\fB\-mno\-friz\fR" 4
  25599. .IX Item "-mno-friz"
  25600. .PD
  25601. Generate (do not generate) the \f(CW\*(C`friz\*(C'\fR instruction when the
  25602. \&\fB\-funsafe\-math\-optimizations\fR option is used to optimize
  25603. rounding of floating-point values to 64\-bit integer and back to floating
  25604. point. The \f(CW\*(C`friz\*(C'\fR instruction does not return the same value if
  25605. the floating-point number is too large to fit in an integer.
  25606. .IP "\fB\-mpointers\-to\-nested\-functions\fR" 4
  25607. .IX Item "-mpointers-to-nested-functions"
  25608. .PD 0
  25609. .IP "\fB\-mno\-pointers\-to\-nested\-functions\fR" 4
  25610. .IX Item "-mno-pointers-to-nested-functions"
  25611. .PD
  25612. Generate (do not generate) code to load up the static chain register
  25613. (\f(CW\*(C`r11\*(C'\fR) when calling through a pointer on \s-1AIX\s0 and 64\-bit Linux
  25614. systems where a function pointer points to a 3\-word descriptor giving
  25615. the function address, \s-1TOC\s0 value to be loaded in register \f(CW\*(C`r2\*(C'\fR, and
  25616. static chain value to be loaded in register \f(CW\*(C`r11\*(C'\fR. The
  25617. \&\fB\-mpointers\-to\-nested\-functions\fR is on by default. You cannot
  25618. call through pointers to nested functions or pointers
  25619. to functions compiled in other languages that use the static chain if
  25620. you use \fB\-mno\-pointers\-to\-nested\-functions\fR.
  25621. .IP "\fB\-msave\-toc\-indirect\fR" 4
  25622. .IX Item "-msave-toc-indirect"
  25623. .PD 0
  25624. .IP "\fB\-mno\-save\-toc\-indirect\fR" 4
  25625. .IX Item "-mno-save-toc-indirect"
  25626. .PD
  25627. Generate (do not generate) code to save the \s-1TOC\s0 value in the reserved
  25628. stack location in the function prologue if the function calls through
  25629. a pointer on \s-1AIX\s0 and 64\-bit Linux systems. If the \s-1TOC\s0 value is not
  25630. saved in the prologue, it is saved just before the call through the
  25631. pointer. The \fB\-mno\-save\-toc\-indirect\fR option is the default.
  25632. .IP "\fB\-mcompat\-align\-parm\fR" 4
  25633. .IX Item "-mcompat-align-parm"
  25634. .PD 0
  25635. .IP "\fB\-mno\-compat\-align\-parm\fR" 4
  25636. .IX Item "-mno-compat-align-parm"
  25637. .PD
  25638. Generate (do not generate) code to pass structure parameters with a
  25639. maximum alignment of 64 bits, for compatibility with older versions
  25640. of \s-1GCC.\s0
  25641. .Sp
  25642. Older versions of \s-1GCC \s0(prior to 4.9.0) incorrectly did not align a
  25643. structure parameter on a 128\-bit boundary when that structure contained
  25644. a member requiring 128\-bit alignment. This is corrected in more
  25645. recent versions of \s-1GCC. \s0 This option may be used to generate code
  25646. that is compatible with functions compiled with older versions of
  25647. \&\s-1GCC.\s0
  25648. .Sp
  25649. The \fB\-mno\-compat\-align\-parm\fR option is the default.
  25650. .IP "\fB\-mstack\-protector\-guard=\fR\fIguard\fR" 4
  25651. .IX Item "-mstack-protector-guard=guard"
  25652. .PD 0
  25653. .IP "\fB\-mstack\-protector\-guard\-reg=\fR\fIreg\fR" 4
  25654. .IX Item "-mstack-protector-guard-reg=reg"
  25655. .IP "\fB\-mstack\-protector\-guard\-offset=\fR\fIoffset\fR" 4
  25656. .IX Item "-mstack-protector-guard-offset=offset"
  25657. .IP "\fB\-mstack\-protector\-guard\-symbol=\fR\fIsymbol\fR" 4
  25658. .IX Item "-mstack-protector-guard-symbol=symbol"
  25659. .PD
  25660. Generate stack protection code using canary at \fIguard\fR. Supported
  25661. locations are \fBglobal\fR for global canary or \fBtls\fR for per-thread
  25662. canary in the \s-1TLS\s0 block (the default with \s-1GNU\s0 libc version 2.4 or later).
  25663. .Sp
  25664. With the latter choice the options
  25665. \&\fB\-mstack\-protector\-guard\-reg=\fR\fIreg\fR and
  25666. \&\fB\-mstack\-protector\-guard\-offset=\fR\fIoffset\fR furthermore specify
  25667. which register to use as base register for reading the canary, and from what
  25668. offset from that base register. The default for those is as specified in the
  25669. relevant \s-1ABI. \s0\fB\-mstack\-protector\-guard\-symbol=\fR\fIsymbol\fR overrides
  25670. the offset with a symbol reference to a canary in the \s-1TLS\s0 block.
  25671. .IP "\fB\-mpcrel\fR" 4
  25672. .IX Item "-mpcrel"
  25673. .PD 0
  25674. .IP "\fB\-mno\-pcrel\fR" 4
  25675. .IX Item "-mno-pcrel"
  25676. .PD
  25677. Generate (do not generate) pc-relative addressing when the option
  25678. \&\fB\-mcpu=future\fR is used. The \fB\-mpcrel\fR option requires
  25679. that the medium code model (\fB\-mcmodel=medium\fR) and prefixed
  25680. addressing (\fB\-mprefixed\fR) options are enabled.
  25681. .IP "\fB\-mprefixed\fR" 4
  25682. .IX Item "-mprefixed"
  25683. .PD 0
  25684. .IP "\fB\-mno\-prefixed\fR" 4
  25685. .IX Item "-mno-prefixed"
  25686. .PD
  25687. Generate (do not generate) addressing modes using prefixed load and
  25688. store instructions when the option \fB\-mcpu=future\fR is used.
  25689. .IP "\fB\-mmma\fR" 4
  25690. .IX Item "-mmma"
  25691. .PD 0
  25692. .IP "\fB\-mno\-mma\fR" 4
  25693. .IX Item "-mno-mma"
  25694. .PD
  25695. Generate (do not generate) the \s-1MMA\s0 instructions when the option
  25696. \&\fB\-mcpu=future\fR is used.
  25697. .PP
  25698. \fI\s-1RX\s0 Options\fR
  25699. .IX Subsection "RX Options"
  25700. .PP
  25701. These command-line options are defined for \s-1RX\s0 targets:
  25702. .IP "\fB\-m64bit\-doubles\fR" 4
  25703. .IX Item "-m64bit-doubles"
  25704. .PD 0
  25705. .IP "\fB\-m32bit\-doubles\fR" 4
  25706. .IX Item "-m32bit-doubles"
  25707. .PD
  25708. Make the \f(CW\*(C`double\*(C'\fR data type be 64 bits (\fB\-m64bit\-doubles\fR)
  25709. or 32 bits (\fB\-m32bit\-doubles\fR) in size. The default is
  25710. \&\fB\-m32bit\-doubles\fR. \fINote\fR \s-1RX\s0 floating-point hardware only
  25711. works on 32\-bit values, which is why the default is
  25712. \&\fB\-m32bit\-doubles\fR.
  25713. .IP "\fB\-fpu\fR" 4
  25714. .IX Item "-fpu"
  25715. .PD 0
  25716. .IP "\fB\-nofpu\fR" 4
  25717. .IX Item "-nofpu"
  25718. .PD
  25719. Enables (\fB\-fpu\fR) or disables (\fB\-nofpu\fR) the use of \s-1RX\s0
  25720. floating-point hardware. The default is enabled for the \s-1RX600\s0
  25721. series and disabled for the \s-1RX200\s0 series.
  25722. .Sp
  25723. Floating-point instructions are only generated for 32\-bit floating-point
  25724. values, however, so the \s-1FPU\s0 hardware is not used for doubles if the
  25725. \&\fB\-m64bit\-doubles\fR option is used.
  25726. .Sp
  25727. \&\fINote\fR If the \fB\-fpu\fR option is enabled then
  25728. \&\fB\-funsafe\-math\-optimizations\fR is also enabled automatically.
  25729. This is because the \s-1RX FPU\s0 instructions are themselves unsafe.
  25730. .IP "\fB\-mcpu=\fR\fIname\fR" 4
  25731. .IX Item "-mcpu=name"
  25732. Selects the type of \s-1RX CPU\s0 to be targeted. Currently three types are
  25733. supported, the generic \fB\s-1RX600\s0\fR and \fB\s-1RX200\s0\fR series hardware and
  25734. the specific \fB\s-1RX610\s0\fR \s-1CPU. \s0 The default is \fB\s-1RX600\s0\fR.
  25735. .Sp
  25736. The only difference between \fB\s-1RX600\s0\fR and \fB\s-1RX610\s0\fR is that the
  25737. \&\fB\s-1RX610\s0\fR does not support the \f(CW\*(C`MVTIPL\*(C'\fR instruction.
  25738. .Sp
  25739. The \fB\s-1RX200\s0\fR series does not have a hardware floating-point unit
  25740. and so \fB\-nofpu\fR is enabled by default when this type is
  25741. selected.
  25742. .IP "\fB\-mbig\-endian\-data\fR" 4
  25743. .IX Item "-mbig-endian-data"
  25744. .PD 0
  25745. .IP "\fB\-mlittle\-endian\-data\fR" 4
  25746. .IX Item "-mlittle-endian-data"
  25747. .PD
  25748. Store data (but not code) in the big-endian format. The default is
  25749. \&\fB\-mlittle\-endian\-data\fR, i.e. to store data in the little-endian
  25750. format.
  25751. .IP "\fB\-msmall\-data\-limit=\fR\fIN\fR" 4
  25752. .IX Item "-msmall-data-limit=N"
  25753. Specifies the maximum size in bytes of global and static variables
  25754. which can be placed into the small data area. Using the small data
  25755. area can lead to smaller and faster code, but the size of area is
  25756. limited and it is up to the programmer to ensure that the area does
  25757. not overflow. Also when the small data area is used one of the \s-1RX\s0's
  25758. registers (usually \f(CW\*(C`r13\*(C'\fR) is reserved for use pointing to this
  25759. area, so it is no longer available for use by the compiler. This
  25760. could result in slower and/or larger code if variables are pushed onto
  25761. the stack instead of being held in this register.
  25762. .Sp
  25763. Note, common variables (variables that have not been initialized) and
  25764. constants are not placed into the small data area as they are assigned
  25765. to other sections in the output executable.
  25766. .Sp
  25767. The default value is zero, which disables this feature. Note, this
  25768. feature is not enabled by default with higher optimization levels
  25769. (\fB\-O2\fR etc) because of the potentially detrimental effects of
  25770. reserving a register. It is up to the programmer to experiment and
  25771. discover whether this feature is of benefit to their program. See the
  25772. description of the \fB\-mpid\fR option for a description of how the
  25773. actual register to hold the small data area pointer is chosen.
  25774. .IP "\fB\-msim\fR" 4
  25775. .IX Item "-msim"
  25776. .PD 0
  25777. .IP "\fB\-mno\-sim\fR" 4
  25778. .IX Item "-mno-sim"
  25779. .PD
  25780. Use the simulator runtime. The default is to use the libgloss
  25781. board-specific runtime.
  25782. .IP "\fB\-mas100\-syntax\fR" 4
  25783. .IX Item "-mas100-syntax"
  25784. .PD 0
  25785. .IP "\fB\-mno\-as100\-syntax\fR" 4
  25786. .IX Item "-mno-as100-syntax"
  25787. .PD
  25788. When generating assembler output use a syntax that is compatible with
  25789. Renesas's \s-1AS100\s0 assembler. This syntax can also be handled by the \s-1GAS\s0
  25790. assembler, but it has some restrictions so it is not generated by default.
  25791. .IP "\fB\-mmax\-constant\-size=\fR\fIN\fR" 4
  25792. .IX Item "-mmax-constant-size=N"
  25793. Specifies the maximum size, in bytes, of a constant that can be used as
  25794. an operand in a \s-1RX\s0 instruction. Although the \s-1RX\s0 instruction set does
  25795. allow constants of up to 4 bytes in length to be used in instructions,
  25796. a longer value equates to a longer instruction. Thus in some
  25797. circumstances it can be beneficial to restrict the size of constants
  25798. that are used in instructions. Constants that are too big are instead
  25799. placed into a constant pool and referenced via register indirection.
  25800. .Sp
  25801. The value \fIN\fR can be between 0 and 4. A value of 0 (the default)
  25802. or 4 means that constants of any size are allowed.
  25803. .IP "\fB\-mrelax\fR" 4
  25804. .IX Item "-mrelax"
  25805. Enable linker relaxation. Linker relaxation is a process whereby the
  25806. linker attempts to reduce the size of a program by finding shorter
  25807. versions of various instructions. Disabled by default.
  25808. .IP "\fB\-mint\-register=\fR\fIN\fR" 4
  25809. .IX Item "-mint-register=N"
  25810. Specify the number of registers to reserve for fast interrupt handler
  25811. functions. The value \fIN\fR can be between 0 and 4. A value of 1
  25812. means that register \f(CW\*(C`r13\*(C'\fR is reserved for the exclusive use
  25813. of fast interrupt handlers. A value of 2 reserves \f(CW\*(C`r13\*(C'\fR and
  25814. \&\f(CW\*(C`r12\*(C'\fR. A value of 3 reserves \f(CW\*(C`r13\*(C'\fR, \f(CW\*(C`r12\*(C'\fR and
  25815. \&\f(CW\*(C`r11\*(C'\fR, and a value of 4 reserves \f(CW\*(C`r13\*(C'\fR through \f(CW\*(C`r10\*(C'\fR.
  25816. A value of 0, the default, does not reserve any registers.
  25817. .IP "\fB\-msave\-acc\-in\-interrupts\fR" 4
  25818. .IX Item "-msave-acc-in-interrupts"
  25819. Specifies that interrupt handler functions should preserve the
  25820. accumulator register. This is only necessary if normal code might use
  25821. the accumulator register, for example because it performs 64\-bit
  25822. multiplications. The default is to ignore the accumulator as this
  25823. makes the interrupt handlers faster.
  25824. .IP "\fB\-mpid\fR" 4
  25825. .IX Item "-mpid"
  25826. .PD 0
  25827. .IP "\fB\-mno\-pid\fR" 4
  25828. .IX Item "-mno-pid"
  25829. .PD
  25830. Enables the generation of position independent data. When enabled any
  25831. access to constant data is done via an offset from a base address
  25832. held in a register. This allows the location of constant data to be
  25833. determined at run time without requiring the executable to be
  25834. relocated, which is a benefit to embedded applications with tight
  25835. memory constraints. Data that can be modified is not affected by this
  25836. option.
  25837. .Sp
  25838. Note, using this feature reserves a register, usually \f(CW\*(C`r13\*(C'\fR, for
  25839. the constant data base address. This can result in slower and/or
  25840. larger code, especially in complicated functions.
  25841. .Sp
  25842. The actual register chosen to hold the constant data base address
  25843. depends upon whether the \fB\-msmall\-data\-limit\fR and/or the
  25844. \&\fB\-mint\-register\fR command-line options are enabled. Starting
  25845. with register \f(CW\*(C`r13\*(C'\fR and proceeding downwards, registers are
  25846. allocated first to satisfy the requirements of \fB\-mint\-register\fR,
  25847. then \fB\-mpid\fR and finally \fB\-msmall\-data\-limit\fR. Thus it
  25848. is possible for the small data area register to be \f(CW\*(C`r8\*(C'\fR if both
  25849. \&\fB\-mint\-register=4\fR and \fB\-mpid\fR are specified on the
  25850. command line.
  25851. .Sp
  25852. By default this feature is not enabled. The default can be restored
  25853. via the \fB\-mno\-pid\fR command-line option.
  25854. .IP "\fB\-mno\-warn\-multiple\-fast\-interrupts\fR" 4
  25855. .IX Item "-mno-warn-multiple-fast-interrupts"
  25856. .PD 0
  25857. .IP "\fB\-mwarn\-multiple\-fast\-interrupts\fR" 4
  25858. .IX Item "-mwarn-multiple-fast-interrupts"
  25859. .PD
  25860. Prevents \s-1GCC\s0 from issuing a warning message if it finds more than one
  25861. fast interrupt handler when it is compiling a file. The default is to
  25862. issue a warning for each extra fast interrupt handler found, as the \s-1RX\s0
  25863. only supports one such interrupt.
  25864. .IP "\fB\-mallow\-string\-insns\fR" 4
  25865. .IX Item "-mallow-string-insns"
  25866. .PD 0
  25867. .IP "\fB\-mno\-allow\-string\-insns\fR" 4
  25868. .IX Item "-mno-allow-string-insns"
  25869. .PD
  25870. Enables or disables the use of the string manipulation instructions
  25871. \&\f(CW\*(C`SMOVF\*(C'\fR, \f(CW\*(C`SCMPU\*(C'\fR, \f(CW\*(C`SMOVB\*(C'\fR, \f(CW\*(C`SMOVU\*(C'\fR, \f(CW\*(C`SUNTIL\*(C'\fR
  25872. \&\f(CW\*(C`SWHILE\*(C'\fR and also the \f(CW\*(C`RMPA\*(C'\fR instruction. These
  25873. instructions may prefetch data, which is not safe to do if accessing
  25874. an I/O register. (See section 12.2.7 of the \s-1RX62N\s0 Group User's Manual
  25875. for more information).
  25876. .Sp
  25877. The default is to allow these instructions, but it is not possible for
  25878. \&\s-1GCC\s0 to reliably detect all circumstances where a string instruction
  25879. might be used to access an I/O register, so their use cannot be
  25880. disabled automatically. Instead it is reliant upon the programmer to
  25881. use the \fB\-mno\-allow\-string\-insns\fR option if their program
  25882. accesses I/O space.
  25883. .Sp
  25884. When the instructions are enabled \s-1GCC\s0 defines the C preprocessor
  25885. symbol \f(CW\*(C`_\|_RX_ALLOW_STRING_INSNS_\|_\*(C'\fR, otherwise it defines the
  25886. symbol \f(CW\*(C`_\|_RX_DISALLOW_STRING_INSNS_\|_\*(C'\fR.
  25887. .IP "\fB\-mjsr\fR" 4
  25888. .IX Item "-mjsr"
  25889. .PD 0
  25890. .IP "\fB\-mno\-jsr\fR" 4
  25891. .IX Item "-mno-jsr"
  25892. .PD
  25893. Use only (or not only) \f(CW\*(C`JSR\*(C'\fR instructions to access functions.
  25894. This option can be used when code size exceeds the range of \f(CW\*(C`BSR\*(C'\fR
  25895. instructions. Note that \fB\-mno\-jsr\fR does not mean to not use
  25896. \&\f(CW\*(C`JSR\*(C'\fR but instead means that any type of branch may be used.
  25897. .PP
  25898. \&\fINote:\fR The generic \s-1GCC\s0 command-line option \fB\-ffixed\-\fR\fIreg\fR
  25899. has special significance to the \s-1RX\s0 port when used with the
  25900. \&\f(CW\*(C`interrupt\*(C'\fR function attribute. This attribute indicates a
  25901. function intended to process fast interrupts. \s-1GCC\s0 ensures
  25902. that it only uses the registers \f(CW\*(C`r10\*(C'\fR, \f(CW\*(C`r11\*(C'\fR, \f(CW\*(C`r12\*(C'\fR
  25903. and/or \f(CW\*(C`r13\*(C'\fR and only provided that the normal use of the
  25904. corresponding registers have been restricted via the
  25905. \&\fB\-ffixed\-\fR\fIreg\fR or \fB\-mint\-register\fR command-line
  25906. options.
  25907. .PP
  25908. \fIS/390 and zSeries Options\fR
  25909. .IX Subsection "S/390 and zSeries Options"
  25910. .PP
  25911. These are the \fB\-m\fR options defined for the S/390 and zSeries architecture.
  25912. .IP "\fB\-mhard\-float\fR" 4
  25913. .IX Item "-mhard-float"
  25914. .PD 0
  25915. .IP "\fB\-msoft\-float\fR" 4
  25916. .IX Item "-msoft-float"
  25917. .PD
  25918. Use (do not use) the hardware floating-point instructions and registers
  25919. for floating-point operations. When \fB\-msoft\-float\fR is specified,
  25920. functions in \fIlibgcc.a\fR are used to perform floating-point
  25921. operations. When \fB\-mhard\-float\fR is specified, the compiler
  25922. generates \s-1IEEE\s0 floating-point instructions. This is the default.
  25923. .IP "\fB\-mhard\-dfp\fR" 4
  25924. .IX Item "-mhard-dfp"
  25925. .PD 0
  25926. .IP "\fB\-mno\-hard\-dfp\fR" 4
  25927. .IX Item "-mno-hard-dfp"
  25928. .PD
  25929. Use (do not use) the hardware decimal-floating-point instructions for
  25930. decimal-floating-point operations. When \fB\-mno\-hard\-dfp\fR is
  25931. specified, functions in \fIlibgcc.a\fR are used to perform
  25932. decimal-floating-point operations. When \fB\-mhard\-dfp\fR is
  25933. specified, the compiler generates decimal-floating-point hardware
  25934. instructions. This is the default for \fB\-march=z9\-ec\fR or higher.
  25935. .IP "\fB\-mlong\-double\-64\fR" 4
  25936. .IX Item "-mlong-double-64"
  25937. .PD 0
  25938. .IP "\fB\-mlong\-double\-128\fR" 4
  25939. .IX Item "-mlong-double-128"
  25940. .PD
  25941. These switches control the size of \f(CW\*(C`long double\*(C'\fR type. A size
  25942. of 64 bits makes the \f(CW\*(C`long double\*(C'\fR type equivalent to the \f(CW\*(C`double\*(C'\fR
  25943. type. This is the default.
  25944. .IP "\fB\-mbackchain\fR" 4
  25945. .IX Item "-mbackchain"
  25946. .PD 0
  25947. .IP "\fB\-mno\-backchain\fR" 4
  25948. .IX Item "-mno-backchain"
  25949. .PD
  25950. Store (do not store) the address of the caller's frame as backchain pointer
  25951. into the callee's stack frame.
  25952. A backchain may be needed to allow debugging using tools that do not understand
  25953. \&\s-1DWARF\s0 call frame information.
  25954. When \fB\-mno\-packed\-stack\fR is in effect, the backchain pointer is stored
  25955. at the bottom of the stack frame; when \fB\-mpacked\-stack\fR is in effect,
  25956. the backchain is placed into the topmost word of the 96/160 byte register
  25957. save area.
  25958. .Sp
  25959. In general, code compiled with \fB\-mbackchain\fR is call-compatible with
  25960. code compiled with \fB\-mmo\-backchain\fR; however, use of the backchain
  25961. for debugging purposes usually requires that the whole binary is built with
  25962. \&\fB\-mbackchain\fR. Note that the combination of \fB\-mbackchain\fR,
  25963. \&\fB\-mpacked\-stack\fR and \fB\-mhard\-float\fR is not supported. In order
  25964. to build a linux kernel use \fB\-msoft\-float\fR.
  25965. .Sp
  25966. The default is to not maintain the backchain.
  25967. .IP "\fB\-mpacked\-stack\fR" 4
  25968. .IX Item "-mpacked-stack"
  25969. .PD 0
  25970. .IP "\fB\-mno\-packed\-stack\fR" 4
  25971. .IX Item "-mno-packed-stack"
  25972. .PD
  25973. Use (do not use) the packed stack layout. When \fB\-mno\-packed\-stack\fR is
  25974. specified, the compiler uses the all fields of the 96/160 byte register save
  25975. area only for their default purpose; unused fields still take up stack space.
  25976. When \fB\-mpacked\-stack\fR is specified, register save slots are densely
  25977. packed at the top of the register save area; unused space is reused for other
  25978. purposes, allowing for more efficient use of the available stack space.
  25979. However, when \fB\-mbackchain\fR is also in effect, the topmost word of
  25980. the save area is always used to store the backchain, and the return address
  25981. register is always saved two words below the backchain.
  25982. .Sp
  25983. As long as the stack frame backchain is not used, code generated with
  25984. \&\fB\-mpacked\-stack\fR is call-compatible with code generated with
  25985. \&\fB\-mno\-packed\-stack\fR. Note that some non-FSF releases of \s-1GCC 2.95\s0 for
  25986. S/390 or zSeries generated code that uses the stack frame backchain at run
  25987. time, not just for debugging purposes. Such code is not call-compatible
  25988. with code compiled with \fB\-mpacked\-stack\fR. Also, note that the
  25989. combination of \fB\-mbackchain\fR,
  25990. \&\fB\-mpacked\-stack\fR and \fB\-mhard\-float\fR is not supported. In order
  25991. to build a linux kernel use \fB\-msoft\-float\fR.
  25992. .Sp
  25993. The default is to not use the packed stack layout.
  25994. .IP "\fB\-msmall\-exec\fR" 4
  25995. .IX Item "-msmall-exec"
  25996. .PD 0
  25997. .IP "\fB\-mno\-small\-exec\fR" 4
  25998. .IX Item "-mno-small-exec"
  25999. .PD
  26000. Generate (or do not generate) code using the \f(CW\*(C`bras\*(C'\fR instruction
  26001. to do subroutine calls.
  26002. This only works reliably if the total executable size does not
  26003. exceed 64k. The default is to use the \f(CW\*(C`basr\*(C'\fR instruction instead,
  26004. which does not have this limitation.
  26005. .IP "\fB\-m64\fR" 4
  26006. .IX Item "-m64"
  26007. .PD 0
  26008. .IP "\fB\-m31\fR" 4
  26009. .IX Item "-m31"
  26010. .PD
  26011. When \fB\-m31\fR is specified, generate code compliant to the
  26012. GNU/Linux for S/390 \s-1ABI. \s0 When \fB\-m64\fR is specified, generate
  26013. code compliant to the GNU/Linux for zSeries \s-1ABI. \s0 This allows \s-1GCC\s0 in
  26014. particular to generate 64\-bit instructions. For the \fBs390\fR
  26015. targets, the default is \fB\-m31\fR, while the \fBs390x\fR
  26016. targets default to \fB\-m64\fR.
  26017. .IP "\fB\-mzarch\fR" 4
  26018. .IX Item "-mzarch"
  26019. .PD 0
  26020. .IP "\fB\-mesa\fR" 4
  26021. .IX Item "-mesa"
  26022. .PD
  26023. When \fB\-mzarch\fR is specified, generate code using the
  26024. instructions available on z/Architecture.
  26025. When \fB\-mesa\fR is specified, generate code using the
  26026. instructions available on \s-1ESA/390. \s0 Note that \fB\-mesa\fR is
  26027. not possible with \fB\-m64\fR.
  26028. When generating code compliant to the GNU/Linux for S/390 \s-1ABI,\s0
  26029. the default is \fB\-mesa\fR. When generating code compliant
  26030. to the GNU/Linux for zSeries \s-1ABI,\s0 the default is \fB\-mzarch\fR.
  26031. .IP "\fB\-mhtm\fR" 4
  26032. .IX Item "-mhtm"
  26033. .PD 0
  26034. .IP "\fB\-mno\-htm\fR" 4
  26035. .IX Item "-mno-htm"
  26036. .PD
  26037. The \fB\-mhtm\fR option enables a set of builtins making use of
  26038. instructions available with the transactional execution facility
  26039. introduced with the \s-1IBM\s0 zEnterprise \s-1EC12\s0 machine generation
  26040. \&\fBS/390 System z Built-in Functions\fR.
  26041. \&\fB\-mhtm\fR is enabled by default when using \fB\-march=zEC12\fR.
  26042. .IP "\fB\-mvx\fR" 4
  26043. .IX Item "-mvx"
  26044. .PD 0
  26045. .IP "\fB\-mno\-vx\fR" 4
  26046. .IX Item "-mno-vx"
  26047. .PD
  26048. When \fB\-mvx\fR is specified, generate code using the instructions
  26049. available with the vector extension facility introduced with the \s-1IBM\s0
  26050. z13 machine generation.
  26051. This option changes the \s-1ABI\s0 for some vector type values with regard to
  26052. alignment and calling conventions. In case vector type values are
  26053. being used in an ABI-relevant context a \s-1GAS \s0\fB.gnu_attribute\fR
  26054. command will be added to mark the resulting binary with the \s-1ABI\s0 used.
  26055. \&\fB\-mvx\fR is enabled by default when using \fB\-march=z13\fR.
  26056. .IP "\fB\-mzvector\fR" 4
  26057. .IX Item "-mzvector"
  26058. .PD 0
  26059. .IP "\fB\-mno\-zvector\fR" 4
  26060. .IX Item "-mno-zvector"
  26061. .PD
  26062. The \fB\-mzvector\fR option enables vector language extensions and
  26063. builtins using instructions available with the vector extension
  26064. facility introduced with the \s-1IBM\s0 z13 machine generation.
  26065. This option adds support for \fBvector\fR to be used as a keyword to
  26066. define vector type variables and arguments. \fBvector\fR is only
  26067. available when \s-1GNU\s0 extensions are enabled. It will not be expanded
  26068. when requesting strict standard compliance e.g. with \fB\-std=c99\fR.
  26069. In addition to the \s-1GCC\s0 low-level builtins \fB\-mzvector\fR enables
  26070. a set of builtins added for compatibility with AltiVec-style
  26071. implementations like Power and Cell. In order to make use of these
  26072. builtins the header file \fIvecintrin.h\fR needs to be included.
  26073. \&\fB\-mzvector\fR is disabled by default.
  26074. .IP "\fB\-mmvcle\fR" 4
  26075. .IX Item "-mmvcle"
  26076. .PD 0
  26077. .IP "\fB\-mno\-mvcle\fR" 4
  26078. .IX Item "-mno-mvcle"
  26079. .PD
  26080. Generate (or do not generate) code using the \f(CW\*(C`mvcle\*(C'\fR instruction
  26081. to perform block moves. When \fB\-mno\-mvcle\fR is specified,
  26082. use a \f(CW\*(C`mvc\*(C'\fR loop instead. This is the default unless optimizing for
  26083. size.
  26084. .IP "\fB\-mdebug\fR" 4
  26085. .IX Item "-mdebug"
  26086. .PD 0
  26087. .IP "\fB\-mno\-debug\fR" 4
  26088. .IX Item "-mno-debug"
  26089. .PD
  26090. Print (or do not print) additional debug information when compiling.
  26091. The default is to not print debug information.
  26092. .IP "\fB\-march=\fR\fIcpu-type\fR" 4
  26093. .IX Item "-march=cpu-type"
  26094. Generate code that runs on \fIcpu-type\fR, which is the name of a
  26095. system representing a certain processor type. Possible values for
  26096. \&\fIcpu-type\fR are \fBz900\fR/\fBarch5\fR, \fBz990\fR/\fBarch6\fR,
  26097. \&\fBz9\-109\fR, \fBz9\-ec\fR/\fBarch7\fR, \fBz10\fR/\fBarch8\fR,
  26098. \&\fBz196\fR/\fBarch9\fR, \fBzEC12\fR, \fBz13\fR/\fBarch11\fR,
  26099. \&\fBz14\fR/\fBarch12\fR, \fBz15\fR/\fBarch13\fR, and \fBnative\fR.
  26100. .Sp
  26101. The default is \fB\-march=z900\fR.
  26102. .Sp
  26103. Specifying \fBnative\fR as cpu type can be used to select the best
  26104. architecture option for the host processor.
  26105. \&\fB\-march=native\fR has no effect if \s-1GCC\s0 does not recognize the
  26106. processor.
  26107. .IP "\fB\-mtune=\fR\fIcpu-type\fR" 4
  26108. .IX Item "-mtune=cpu-type"
  26109. Tune to \fIcpu-type\fR everything applicable about the generated code,
  26110. except for the \s-1ABI\s0 and the set of available instructions.
  26111. The list of \fIcpu-type\fR values is the same as for \fB\-march\fR.
  26112. The default is the value used for \fB\-march\fR.
  26113. .IP "\fB\-mtpf\-trace\fR" 4
  26114. .IX Item "-mtpf-trace"
  26115. .PD 0
  26116. .IP "\fB\-mno\-tpf\-trace\fR" 4
  26117. .IX Item "-mno-tpf-trace"
  26118. .PD
  26119. Generate code that adds (does not add) in \s-1TPF OS\s0 specific branches to trace
  26120. routines in the operating system. This option is off by default, even
  26121. when compiling for the \s-1TPF OS.\s0
  26122. .IP "\fB\-mtpf\-trace\-skip\fR" 4
  26123. .IX Item "-mtpf-trace-skip"
  26124. .PD 0
  26125. .IP "\fB\-mno\-tpf\-trace\-skip\fR" 4
  26126. .IX Item "-mno-tpf-trace-skip"
  26127. .PD
  26128. Generate code that changes (does not change) the default branch
  26129. targets enabled by \fB\-mtpf\-trace\fR to point to specialized trace
  26130. routines providing the ability of selectively skipping function trace
  26131. entries for the \s-1TPF OS. \s0 This option is off by default, even when
  26132. compiling for the \s-1TPF OS\s0 and specifying \fB\-mtpf\-trace\fR.
  26133. .IP "\fB\-mfused\-madd\fR" 4
  26134. .IX Item "-mfused-madd"
  26135. .PD 0
  26136. .IP "\fB\-mno\-fused\-madd\fR" 4
  26137. .IX Item "-mno-fused-madd"
  26138. .PD
  26139. Generate code that uses (does not use) the floating-point multiply and
  26140. accumulate instructions. These instructions are generated by default if
  26141. hardware floating point is used.
  26142. .IP "\fB\-mwarn\-framesize=\fR\fIframesize\fR" 4
  26143. .IX Item "-mwarn-framesize=framesize"
  26144. Emit a warning if the current function exceeds the given frame size. Because
  26145. this is a compile-time check it doesn't need to be a real problem when the program
  26146. runs. It is intended to identify functions that most probably cause
  26147. a stack overflow. It is useful to be used in an environment with limited stack
  26148. size e.g. the linux kernel.
  26149. .IP "\fB\-mwarn\-dynamicstack\fR" 4
  26150. .IX Item "-mwarn-dynamicstack"
  26151. Emit a warning if the function calls \f(CW\*(C`alloca\*(C'\fR or uses dynamically-sized
  26152. arrays. This is generally a bad idea with a limited stack size.
  26153. .IP "\fB\-mstack\-guard=\fR\fIstack-guard\fR" 4
  26154. .IX Item "-mstack-guard=stack-guard"
  26155. .PD 0
  26156. .IP "\fB\-mstack\-size=\fR\fIstack-size\fR" 4
  26157. .IX Item "-mstack-size=stack-size"
  26158. .PD
  26159. If these options are provided the S/390 back end emits additional instructions in
  26160. the function prologue that trigger a trap if the stack size is \fIstack-guard\fR
  26161. bytes above the \fIstack-size\fR (remember that the stack on S/390 grows downward).
  26162. If the \fIstack-guard\fR option is omitted the smallest power of 2 larger than
  26163. the frame size of the compiled function is chosen.
  26164. These options are intended to be used to help debugging stack overflow problems.
  26165. The additionally emitted code causes only little overhead and hence can also be
  26166. used in production-like systems without greater performance degradation. The given
  26167. values have to be exact powers of 2 and \fIstack-size\fR has to be greater than
  26168. \&\fIstack-guard\fR without exceeding 64k.
  26169. In order to be efficient the extra code makes the assumption that the stack starts
  26170. at an address aligned to the value given by \fIstack-size\fR.
  26171. The \fIstack-guard\fR option can only be used in conjunction with \fIstack-size\fR.
  26172. .IP "\fB\-mhotpatch=\fR\fIpre-halfwords\fR\fB,\fR\fIpost-halfwords\fR" 4
  26173. .IX Item "-mhotpatch=pre-halfwords,post-halfwords"
  26174. If the hotpatch option is enabled, a \*(L"hot-patching\*(R" function
  26175. prologue is generated for all functions in the compilation unit.
  26176. The funtion label is prepended with the given number of two-byte
  26177. \&\s-1NOP\s0 instructions (\fIpre-halfwords\fR, maximum 1000000). After
  26178. the label, 2 * \fIpost-halfwords\fR bytes are appended, using the
  26179. largest \s-1NOP\s0 like instructions the architecture allows (maximum
  26180. 1000000).
  26181. .Sp
  26182. If both arguments are zero, hotpatching is disabled.
  26183. .Sp
  26184. This option can be overridden for individual functions with the
  26185. \&\f(CW\*(C`hotpatch\*(C'\fR attribute.
  26186. .PP
  26187. \fIScore Options\fR
  26188. .IX Subsection "Score Options"
  26189. .PP
  26190. These options are defined for Score implementations:
  26191. .IP "\fB\-meb\fR" 4
  26192. .IX Item "-meb"
  26193. Compile code for big-endian mode. This is the default.
  26194. .IP "\fB\-mel\fR" 4
  26195. .IX Item "-mel"
  26196. Compile code for little-endian mode.
  26197. .IP "\fB\-mnhwloop\fR" 4
  26198. .IX Item "-mnhwloop"
  26199. Disable generation of \f(CW\*(C`bcnz\*(C'\fR instructions.
  26200. .IP "\fB\-muls\fR" 4
  26201. .IX Item "-muls"
  26202. Enable generation of unaligned load and store instructions.
  26203. .IP "\fB\-mmac\fR" 4
  26204. .IX Item "-mmac"
  26205. Enable the use of multiply-accumulate instructions. Disabled by default.
  26206. .IP "\fB\-mscore5\fR" 4
  26207. .IX Item "-mscore5"
  26208. Specify the \s-1SCORE5\s0 as the target architecture.
  26209. .IP "\fB\-mscore5u\fR" 4
  26210. .IX Item "-mscore5u"
  26211. Specify the \s-1SCORE5U\s0 of the target architecture.
  26212. .IP "\fB\-mscore7\fR" 4
  26213. .IX Item "-mscore7"
  26214. Specify the \s-1SCORE7\s0 as the target architecture. This is the default.
  26215. .IP "\fB\-mscore7d\fR" 4
  26216. .IX Item "-mscore7d"
  26217. Specify the \s-1SCORE7D\s0 as the target architecture.
  26218. .PP
  26219. \fI\s-1SH\s0 Options\fR
  26220. .IX Subsection "SH Options"
  26221. .PP
  26222. These \fB\-m\fR options are defined for the \s-1SH\s0 implementations:
  26223. .IP "\fB\-m1\fR" 4
  26224. .IX Item "-m1"
  26225. Generate code for the \s-1SH1.\s0
  26226. .IP "\fB\-m2\fR" 4
  26227. .IX Item "-m2"
  26228. Generate code for the \s-1SH2.\s0
  26229. .IP "\fB\-m2e\fR" 4
  26230. .IX Item "-m2e"
  26231. Generate code for the SH2e.
  26232. .IP "\fB\-m2a\-nofpu\fR" 4
  26233. .IX Item "-m2a-nofpu"
  26234. Generate code for the SH2a without \s-1FPU,\s0 or for a SH2a\-FPU in such a way
  26235. that the floating-point unit is not used.
  26236. .IP "\fB\-m2a\-single\-only\fR" 4
  26237. .IX Item "-m2a-single-only"
  26238. Generate code for the SH2a\-FPU, in such a way that no double-precision
  26239. floating-point operations are used.
  26240. .IP "\fB\-m2a\-single\fR" 4
  26241. .IX Item "-m2a-single"
  26242. Generate code for the SH2a\-FPU assuming the floating-point unit is in
  26243. single-precision mode by default.
  26244. .IP "\fB\-m2a\fR" 4
  26245. .IX Item "-m2a"
  26246. Generate code for the SH2a\-FPU assuming the floating-point unit is in
  26247. double-precision mode by default.
  26248. .IP "\fB\-m3\fR" 4
  26249. .IX Item "-m3"
  26250. Generate code for the \s-1SH3.\s0
  26251. .IP "\fB\-m3e\fR" 4
  26252. .IX Item "-m3e"
  26253. Generate code for the SH3e.
  26254. .IP "\fB\-m4\-nofpu\fR" 4
  26255. .IX Item "-m4-nofpu"
  26256. Generate code for the \s-1SH4\s0 without a floating-point unit.
  26257. .IP "\fB\-m4\-single\-only\fR" 4
  26258. .IX Item "-m4-single-only"
  26259. Generate code for the \s-1SH4\s0 with a floating-point unit that only
  26260. supports single-precision arithmetic.
  26261. .IP "\fB\-m4\-single\fR" 4
  26262. .IX Item "-m4-single"
  26263. Generate code for the \s-1SH4\s0 assuming the floating-point unit is in
  26264. single-precision mode by default.
  26265. .IP "\fB\-m4\fR" 4
  26266. .IX Item "-m4"
  26267. Generate code for the \s-1SH4.\s0
  26268. .IP "\fB\-m4\-100\fR" 4
  26269. .IX Item "-m4-100"
  26270. Generate code for \s-1SH4\-100.\s0
  26271. .IP "\fB\-m4\-100\-nofpu\fR" 4
  26272. .IX Item "-m4-100-nofpu"
  26273. Generate code for \s-1SH4\-100\s0 in such a way that the
  26274. floating-point unit is not used.
  26275. .IP "\fB\-m4\-100\-single\fR" 4
  26276. .IX Item "-m4-100-single"
  26277. Generate code for \s-1SH4\-100\s0 assuming the floating-point unit is in
  26278. single-precision mode by default.
  26279. .IP "\fB\-m4\-100\-single\-only\fR" 4
  26280. .IX Item "-m4-100-single-only"
  26281. Generate code for \s-1SH4\-100\s0 in such a way that no double-precision
  26282. floating-point operations are used.
  26283. .IP "\fB\-m4\-200\fR" 4
  26284. .IX Item "-m4-200"
  26285. Generate code for \s-1SH4\-200.\s0
  26286. .IP "\fB\-m4\-200\-nofpu\fR" 4
  26287. .IX Item "-m4-200-nofpu"
  26288. Generate code for \s-1SH4\-200\s0 without in such a way that the
  26289. floating-point unit is not used.
  26290. .IP "\fB\-m4\-200\-single\fR" 4
  26291. .IX Item "-m4-200-single"
  26292. Generate code for \s-1SH4\-200\s0 assuming the floating-point unit is in
  26293. single-precision mode by default.
  26294. .IP "\fB\-m4\-200\-single\-only\fR" 4
  26295. .IX Item "-m4-200-single-only"
  26296. Generate code for \s-1SH4\-200\s0 in such a way that no double-precision
  26297. floating-point operations are used.
  26298. .IP "\fB\-m4\-300\fR" 4
  26299. .IX Item "-m4-300"
  26300. Generate code for \s-1SH4\-300.\s0
  26301. .IP "\fB\-m4\-300\-nofpu\fR" 4
  26302. .IX Item "-m4-300-nofpu"
  26303. Generate code for \s-1SH4\-300\s0 without in such a way that the
  26304. floating-point unit is not used.
  26305. .IP "\fB\-m4\-300\-single\fR" 4
  26306. .IX Item "-m4-300-single"
  26307. Generate code for \s-1SH4\-300\s0 in such a way that no double-precision
  26308. floating-point operations are used.
  26309. .IP "\fB\-m4\-300\-single\-only\fR" 4
  26310. .IX Item "-m4-300-single-only"
  26311. Generate code for \s-1SH4\-300\s0 in such a way that no double-precision
  26312. floating-point operations are used.
  26313. .IP "\fB\-m4\-340\fR" 4
  26314. .IX Item "-m4-340"
  26315. Generate code for \s-1SH4\-340 \s0(no \s-1MMU,\s0 no \s-1FPU\s0).
  26316. .IP "\fB\-m4\-500\fR" 4
  26317. .IX Item "-m4-500"
  26318. Generate code for \s-1SH4\-500 \s0(no \s-1FPU\s0). Passes \fB\-isa=sh4\-nofpu\fR to the
  26319. assembler.
  26320. .IP "\fB\-m4a\-nofpu\fR" 4
  26321. .IX Item "-m4a-nofpu"
  26322. Generate code for the SH4al\-dsp, or for a SH4a in such a way that the
  26323. floating-point unit is not used.
  26324. .IP "\fB\-m4a\-single\-only\fR" 4
  26325. .IX Item "-m4a-single-only"
  26326. Generate code for the SH4a, in such a way that no double-precision
  26327. floating-point operations are used.
  26328. .IP "\fB\-m4a\-single\fR" 4
  26329. .IX Item "-m4a-single"
  26330. Generate code for the SH4a assuming the floating-point unit is in
  26331. single-precision mode by default.
  26332. .IP "\fB\-m4a\fR" 4
  26333. .IX Item "-m4a"
  26334. Generate code for the SH4a.
  26335. .IP "\fB\-m4al\fR" 4
  26336. .IX Item "-m4al"
  26337. Same as \fB\-m4a\-nofpu\fR, except that it implicitly passes
  26338. \&\fB\-dsp\fR to the assembler. \s-1GCC\s0 doesn't generate any \s-1DSP\s0
  26339. instructions at the moment.
  26340. .IP "\fB\-mb\fR" 4
  26341. .IX Item "-mb"
  26342. Compile code for the processor in big-endian mode.
  26343. .IP "\fB\-ml\fR" 4
  26344. .IX Item "-ml"
  26345. Compile code for the processor in little-endian mode.
  26346. .IP "\fB\-mdalign\fR" 4
  26347. .IX Item "-mdalign"
  26348. Align doubles at 64\-bit boundaries. Note that this changes the calling
  26349. conventions, and thus some functions from the standard C library do
  26350. not work unless you recompile it first with \fB\-mdalign\fR.
  26351. .IP "\fB\-mrelax\fR" 4
  26352. .IX Item "-mrelax"
  26353. Shorten some address references at link time, when possible; uses the
  26354. linker option \fB\-relax\fR.
  26355. .IP "\fB\-mbigtable\fR" 4
  26356. .IX Item "-mbigtable"
  26357. Use 32\-bit offsets in \f(CW\*(C`switch\*(C'\fR tables. The default is to use
  26358. 16\-bit offsets.
  26359. .IP "\fB\-mbitops\fR" 4
  26360. .IX Item "-mbitops"
  26361. Enable the use of bit manipulation instructions on \s-1SH2A.\s0
  26362. .IP "\fB\-mfmovd\fR" 4
  26363. .IX Item "-mfmovd"
  26364. Enable the use of the instruction \f(CW\*(C`fmovd\*(C'\fR. Check \fB\-mdalign\fR for
  26365. alignment constraints.
  26366. .IP "\fB\-mrenesas\fR" 4
  26367. .IX Item "-mrenesas"
  26368. Comply with the calling conventions defined by Renesas.
  26369. .IP "\fB\-mno\-renesas\fR" 4
  26370. .IX Item "-mno-renesas"
  26371. Comply with the calling conventions defined for \s-1GCC\s0 before the Renesas
  26372. conventions were available. This option is the default for all
  26373. targets of the \s-1SH\s0 toolchain.
  26374. .IP "\fB\-mnomacsave\fR" 4
  26375. .IX Item "-mnomacsave"
  26376. Mark the \f(CW\*(C`MAC\*(C'\fR register as call-clobbered, even if
  26377. \&\fB\-mrenesas\fR is given.
  26378. .IP "\fB\-mieee\fR" 4
  26379. .IX Item "-mieee"
  26380. .PD 0
  26381. .IP "\fB\-mno\-ieee\fR" 4
  26382. .IX Item "-mno-ieee"
  26383. .PD
  26384. Control the \s-1IEEE\s0 compliance of floating-point comparisons, which affects the
  26385. handling of cases where the result of a comparison is unordered. By default
  26386. \&\fB\-mieee\fR is implicitly enabled. If \fB\-ffinite\-math\-only\fR is
  26387. enabled \fB\-mno\-ieee\fR is implicitly set, which results in faster
  26388. floating-point greater-equal and less-equal comparisons. The implicit settings
  26389. can be overridden by specifying either \fB\-mieee\fR or \fB\-mno\-ieee\fR.
  26390. .IP "\fB\-minline\-ic_invalidate\fR" 4
  26391. .IX Item "-minline-ic_invalidate"
  26392. Inline code to invalidate instruction cache entries after setting up
  26393. nested function trampolines.
  26394. This option has no effect if \fB\-musermode\fR is in effect and the selected
  26395. code generation option (e.g. \fB\-m4\fR) does not allow the use of the \f(CW\*(C`icbi\*(C'\fR
  26396. instruction.
  26397. If the selected code generation option does not allow the use of the \f(CW\*(C`icbi\*(C'\fR
  26398. instruction, and \fB\-musermode\fR is not in effect, the inlined code
  26399. manipulates the instruction cache address array directly with an associative
  26400. write. This not only requires privileged mode at run time, but it also
  26401. fails if the cache line had been mapped via the \s-1TLB\s0 and has become unmapped.
  26402. .IP "\fB\-misize\fR" 4
  26403. .IX Item "-misize"
  26404. Dump instruction size and location in the assembly code.
  26405. .IP "\fB\-mpadstruct\fR" 4
  26406. .IX Item "-mpadstruct"
  26407. This option is deprecated. It pads structures to multiple of 4 bytes,
  26408. which is incompatible with the \s-1SH ABI.\s0
  26409. .IP "\fB\-matomic\-model=\fR\fImodel\fR" 4
  26410. .IX Item "-matomic-model=model"
  26411. Sets the model of atomic operations and additional parameters as a comma
  26412. separated list. For details on the atomic built-in functions see
  26413. \&\fB_\|_atomic Builtins\fR. The following models and parameters are supported:
  26414. .RS 4
  26415. .IP "\fBnone\fR" 4
  26416. .IX Item "none"
  26417. Disable compiler generated atomic sequences and emit library calls for atomic
  26418. operations. This is the default if the target is not \f(CW\*(C`sh*\-*\-linux*\*(C'\fR.
  26419. .IP "\fBsoft-gusa\fR" 4
  26420. .IX Item "soft-gusa"
  26421. Generate GNU/Linux compatible gUSA software atomic sequences for the atomic
  26422. built-in functions. The generated atomic sequences require additional support
  26423. from the interrupt/exception handling code of the system and are only suitable
  26424. for SH3* and SH4* single-core systems. This option is enabled by default when
  26425. the target is \f(CW\*(C`sh*\-*\-linux*\*(C'\fR and SH3* or SH4*. When the target is \s-1SH4A,\s0
  26426. this option also partially utilizes the hardware atomic instructions
  26427. \&\f(CW\*(C`movli.l\*(C'\fR and \f(CW\*(C`movco.l\*(C'\fR to create more efficient code, unless
  26428. \&\fBstrict\fR is specified.
  26429. .IP "\fBsoft-tcb\fR" 4
  26430. .IX Item "soft-tcb"
  26431. Generate software atomic sequences that use a variable in the thread control
  26432. block. This is a variation of the gUSA sequences which can also be used on
  26433. SH1* and SH2* targets. The generated atomic sequences require additional
  26434. support from the interrupt/exception handling code of the system and are only
  26435. suitable for single-core systems. When using this model, the \fBgbr\-offset=\fR
  26436. parameter has to be specified as well.
  26437. .IP "\fBsoft-imask\fR" 4
  26438. .IX Item "soft-imask"
  26439. Generate software atomic sequences that temporarily disable interrupts by
  26440. setting \f(CW\*(C`SR.IMASK = 1111\*(C'\fR. This model works only when the program runs
  26441. in privileged mode and is only suitable for single-core systems. Additional
  26442. support from the interrupt/exception handling code of the system is not
  26443. required. This model is enabled by default when the target is
  26444. \&\f(CW\*(C`sh*\-*\-linux*\*(C'\fR and SH1* or SH2*.
  26445. .IP "\fBhard-llcs\fR" 4
  26446. .IX Item "hard-llcs"
  26447. Generate hardware atomic sequences using the \f(CW\*(C`movli.l\*(C'\fR and \f(CW\*(C`movco.l\*(C'\fR
  26448. instructions only. This is only available on \s-1SH4A\s0 and is suitable for
  26449. multi-core systems. Since the hardware instructions support only 32 bit atomic
  26450. variables access to 8 or 16 bit variables is emulated with 32 bit accesses.
  26451. Code compiled with this option is also compatible with other software
  26452. atomic model interrupt/exception handling systems if executed on an \s-1SH4A\s0
  26453. system. Additional support from the interrupt/exception handling code of the
  26454. system is not required for this model.
  26455. .IP "\fBgbr\-offset=\fR" 4
  26456. .IX Item "gbr-offset="
  26457. This parameter specifies the offset in bytes of the variable in the thread
  26458. control block structure that should be used by the generated atomic sequences
  26459. when the \fBsoft-tcb\fR model has been selected. For other models this
  26460. parameter is ignored. The specified value must be an integer multiple of four
  26461. and in the range 0\-1020.
  26462. .IP "\fBstrict\fR" 4
  26463. .IX Item "strict"
  26464. This parameter prevents mixed usage of multiple atomic models, even if they
  26465. are compatible, and makes the compiler generate atomic sequences of the
  26466. specified model only.
  26467. .RE
  26468. .RS 4
  26469. .RE
  26470. .IP "\fB\-mtas\fR" 4
  26471. .IX Item "-mtas"
  26472. Generate the \f(CW\*(C`tas.b\*(C'\fR opcode for \f(CW\*(C`_\|_atomic_test_and_set\*(C'\fR.
  26473. Notice that depending on the particular hardware and software configuration
  26474. this can degrade overall performance due to the operand cache line flushes
  26475. that are implied by the \f(CW\*(C`tas.b\*(C'\fR instruction. On multi-core \s-1SH4A\s0
  26476. processors the \f(CW\*(C`tas.b\*(C'\fR instruction must be used with caution since it
  26477. can result in data corruption for certain cache configurations.
  26478. .IP "\fB\-mprefergot\fR" 4
  26479. .IX Item "-mprefergot"
  26480. When generating position-independent code, emit function calls using
  26481. the Global Offset Table instead of the Procedure Linkage Table.
  26482. .IP "\fB\-musermode\fR" 4
  26483. .IX Item "-musermode"
  26484. .PD 0
  26485. .IP "\fB\-mno\-usermode\fR" 4
  26486. .IX Item "-mno-usermode"
  26487. .PD
  26488. Don't allow (allow) the compiler generating privileged mode code. Specifying
  26489. \&\fB\-musermode\fR also implies \fB\-mno\-inline\-ic_invalidate\fR if the
  26490. inlined code would not work in user mode. \fB\-musermode\fR is the default
  26491. when the target is \f(CW\*(C`sh*\-*\-linux*\*(C'\fR. If the target is SH1* or SH2*
  26492. \&\fB\-musermode\fR has no effect, since there is no user mode.
  26493. .IP "\fB\-multcost=\fR\fInumber\fR" 4
  26494. .IX Item "-multcost=number"
  26495. Set the cost to assume for a multiply insn.
  26496. .IP "\fB\-mdiv=\fR\fIstrategy\fR" 4
  26497. .IX Item "-mdiv=strategy"
  26498. Set the division strategy to be used for integer division operations.
  26499. \&\fIstrategy\fR can be one of:
  26500. .RS 4
  26501. .IP "\fBcall\-div1\fR" 4
  26502. .IX Item "call-div1"
  26503. Calls a library function that uses the single-step division instruction
  26504. \&\f(CW\*(C`div1\*(C'\fR to perform the operation. Division by zero calculates an
  26505. unspecified result and does not trap. This is the default except for \s-1SH4,
  26506. SH2A\s0 and SHcompact.
  26507. .IP "\fBcall-fp\fR" 4
  26508. .IX Item "call-fp"
  26509. Calls a library function that performs the operation in double precision
  26510. floating point. Division by zero causes a floating-point exception. This is
  26511. the default for SHcompact with \s-1FPU. \s0 Specifying this for targets that do not
  26512. have a double precision \s-1FPU\s0 defaults to \f(CW\*(C`call\-div1\*(C'\fR.
  26513. .IP "\fBcall-table\fR" 4
  26514. .IX Item "call-table"
  26515. Calls a library function that uses a lookup table for small divisors and
  26516. the \f(CW\*(C`div1\*(C'\fR instruction with case distinction for larger divisors. Division
  26517. by zero calculates an unspecified result and does not trap. This is the default
  26518. for \s-1SH4. \s0 Specifying this for targets that do not have dynamic shift
  26519. instructions defaults to \f(CW\*(C`call\-div1\*(C'\fR.
  26520. .RE
  26521. .RS 4
  26522. .Sp
  26523. When a division strategy has not been specified the default strategy is
  26524. selected based on the current target. For \s-1SH2A\s0 the default strategy is to
  26525. use the \f(CW\*(C`divs\*(C'\fR and \f(CW\*(C`divu\*(C'\fR instructions instead of library function
  26526. calls.
  26527. .RE
  26528. .IP "\fB\-maccumulate\-outgoing\-args\fR" 4
  26529. .IX Item "-maccumulate-outgoing-args"
  26530. Reserve space once for outgoing arguments in the function prologue rather
  26531. than around each call. Generally beneficial for performance and size. Also
  26532. needed for unwinding to avoid changing the stack frame around conditional code.
  26533. .IP "\fB\-mdivsi3_libfunc=\fR\fIname\fR" 4
  26534. .IX Item "-mdivsi3_libfunc=name"
  26535. Set the name of the library function used for 32\-bit signed division to
  26536. \&\fIname\fR.
  26537. This only affects the name used in the \fBcall\fR division strategies, and
  26538. the compiler still expects the same sets of input/output/clobbered registers as
  26539. if this option were not present.
  26540. .IP "\fB\-mfixed\-range=\fR\fIregister-range\fR" 4
  26541. .IX Item "-mfixed-range=register-range"
  26542. Generate code treating the given register range as fixed registers.
  26543. A fixed register is one that the register allocator cannot use. This is
  26544. useful when compiling kernel code. A register range is specified as
  26545. two registers separated by a dash. Multiple register ranges can be
  26546. specified separated by a comma.
  26547. .IP "\fB\-mbranch\-cost=\fR\fInum\fR" 4
  26548. .IX Item "-mbranch-cost=num"
  26549. Assume \fInum\fR to be the cost for a branch instruction. Higher numbers
  26550. make the compiler try to generate more branch-free code if possible.
  26551. If not specified the value is selected depending on the processor type that
  26552. is being compiled for.
  26553. .IP "\fB\-mzdcbranch\fR" 4
  26554. .IX Item "-mzdcbranch"
  26555. .PD 0
  26556. .IP "\fB\-mno\-zdcbranch\fR" 4
  26557. .IX Item "-mno-zdcbranch"
  26558. .PD
  26559. Assume (do not assume) that zero displacement conditional branch instructions
  26560. \&\f(CW\*(C`bt\*(C'\fR and \f(CW\*(C`bf\*(C'\fR are fast. If \fB\-mzdcbranch\fR is specified, the
  26561. compiler prefers zero displacement branch code sequences. This is
  26562. enabled by default when generating code for \s-1SH4\s0 and \s-1SH4A. \s0 It can be explicitly
  26563. disabled by specifying \fB\-mno\-zdcbranch\fR.
  26564. .IP "\fB\-mcbranch\-force\-delay\-slot\fR" 4
  26565. .IX Item "-mcbranch-force-delay-slot"
  26566. Force the usage of delay slots for conditional branches, which stuffs the delay
  26567. slot with a \f(CW\*(C`nop\*(C'\fR if a suitable instruction cannot be found. By default
  26568. this option is disabled. It can be enabled to work around hardware bugs as
  26569. found in the original \s-1SH7055.\s0
  26570. .IP "\fB\-mfused\-madd\fR" 4
  26571. .IX Item "-mfused-madd"
  26572. .PD 0
  26573. .IP "\fB\-mno\-fused\-madd\fR" 4
  26574. .IX Item "-mno-fused-madd"
  26575. .PD
  26576. Generate code that uses (does not use) the floating-point multiply and
  26577. accumulate instructions. These instructions are generated by default
  26578. if hardware floating point is used. The machine-dependent
  26579. \&\fB\-mfused\-madd\fR option is now mapped to the machine-independent
  26580. \&\fB\-ffp\-contract=fast\fR option, and \fB\-mno\-fused\-madd\fR is
  26581. mapped to \fB\-ffp\-contract=off\fR.
  26582. .IP "\fB\-mfsca\fR" 4
  26583. .IX Item "-mfsca"
  26584. .PD 0
  26585. .IP "\fB\-mno\-fsca\fR" 4
  26586. .IX Item "-mno-fsca"
  26587. .PD
  26588. Allow or disallow the compiler to emit the \f(CW\*(C`fsca\*(C'\fR instruction for sine
  26589. and cosine approximations. The option \fB\-mfsca\fR must be used in
  26590. combination with \fB\-funsafe\-math\-optimizations\fR. It is enabled by default
  26591. when generating code for \s-1SH4A. \s0 Using \fB\-mno\-fsca\fR disables sine and cosine
  26592. approximations even if \fB\-funsafe\-math\-optimizations\fR is in effect.
  26593. .IP "\fB\-mfsrra\fR" 4
  26594. .IX Item "-mfsrra"
  26595. .PD 0
  26596. .IP "\fB\-mno\-fsrra\fR" 4
  26597. .IX Item "-mno-fsrra"
  26598. .PD
  26599. Allow or disallow the compiler to emit the \f(CW\*(C`fsrra\*(C'\fR instruction for
  26600. reciprocal square root approximations. The option \fB\-mfsrra\fR must be used
  26601. in combination with \fB\-funsafe\-math\-optimizations\fR and
  26602. \&\fB\-ffinite\-math\-only\fR. It is enabled by default when generating code for
  26603. \&\s-1SH4A. \s0 Using \fB\-mno\-fsrra\fR disables reciprocal square root approximations
  26604. even if \fB\-funsafe\-math\-optimizations\fR and \fB\-ffinite\-math\-only\fR are
  26605. in effect.
  26606. .IP "\fB\-mpretend\-cmove\fR" 4
  26607. .IX Item "-mpretend-cmove"
  26608. Prefer zero-displacement conditional branches for conditional move instruction
  26609. patterns. This can result in faster code on the \s-1SH4\s0 processor.
  26610. .IP "\fB\-mfdpic\fR" 4
  26611. .IX Item "-mfdpic"
  26612. Generate code using the \s-1FDPIC ABI.\s0
  26613. .PP
  26614. \fISolaris 2 Options\fR
  26615. .IX Subsection "Solaris 2 Options"
  26616. .PP
  26617. These \fB\-m\fR options are supported on Solaris 2:
  26618. .IP "\fB\-mclear\-hwcap\fR" 4
  26619. .IX Item "-mclear-hwcap"
  26620. \&\fB\-mclear\-hwcap\fR tells the compiler to remove the hardware
  26621. capabilities generated by the Solaris assembler. This is only necessary
  26622. when object files use \s-1ISA\s0 extensions not supported by the current
  26623. machine, but check at runtime whether or not to use them.
  26624. .IP "\fB\-mimpure\-text\fR" 4
  26625. .IX Item "-mimpure-text"
  26626. \&\fB\-mimpure\-text\fR, used in addition to \fB\-shared\fR, tells
  26627. the compiler to not pass \fB\-z text\fR to the linker when linking a
  26628. shared object. Using this option, you can link position-dependent
  26629. code into a shared object.
  26630. .Sp
  26631. \&\fB\-mimpure\-text\fR suppresses the \*(L"relocations remain against
  26632. allocatable but non-writable sections\*(R" linker error message.
  26633. However, the necessary relocations trigger copy-on-write, and the
  26634. shared object is not actually shared across processes. Instead of
  26635. using \fB\-mimpure\-text\fR, you should compile all source code with
  26636. \&\fB\-fpic\fR or \fB\-fPIC\fR.
  26637. .PP
  26638. These switches are supported in addition to the above on Solaris 2:
  26639. .IP "\fB\-pthreads\fR" 4
  26640. .IX Item "-pthreads"
  26641. This is a synonym for \fB\-pthread\fR.
  26642. .PP
  26643. \fI\s-1SPARC\s0 Options\fR
  26644. .IX Subsection "SPARC Options"
  26645. .PP
  26646. These \fB\-m\fR options are supported on the \s-1SPARC:\s0
  26647. .IP "\fB\-mno\-app\-regs\fR" 4
  26648. .IX Item "-mno-app-regs"
  26649. .PD 0
  26650. .IP "\fB\-mapp\-regs\fR" 4
  26651. .IX Item "-mapp-regs"
  26652. .PD
  26653. Specify \fB\-mapp\-regs\fR to generate output using the global registers
  26654. 2 through 4, which the \s-1SPARC SVR4 ABI\s0 reserves for applications. Like the
  26655. global register 1, each global register 2 through 4 is then treated as an
  26656. allocable register that is clobbered by function calls. This is the default.
  26657. .Sp
  26658. To be fully \s-1SVR4\s0 ABI-compliant at the cost of some performance loss,
  26659. specify \fB\-mno\-app\-regs\fR. You should compile libraries and system
  26660. software with this option.
  26661. .IP "\fB\-mflat\fR" 4
  26662. .IX Item "-mflat"
  26663. .PD 0
  26664. .IP "\fB\-mno\-flat\fR" 4
  26665. .IX Item "-mno-flat"
  26666. .PD
  26667. With \fB\-mflat\fR, the compiler does not generate save/restore instructions
  26668. and uses a \*(L"flat\*(R" or single register window model. This model is compatible
  26669. with the regular register window model. The local registers and the input
  26670. registers (0\-\-5) are still treated as \*(L"call-saved\*(R" registers and are
  26671. saved on the stack as needed.
  26672. .Sp
  26673. With \fB\-mno\-flat\fR (the default), the compiler generates save/restore
  26674. instructions (except for leaf functions). This is the normal operating mode.
  26675. .IP "\fB\-mfpu\fR" 4
  26676. .IX Item "-mfpu"
  26677. .PD 0
  26678. .IP "\fB\-mhard\-float\fR" 4
  26679. .IX Item "-mhard-float"
  26680. .PD
  26681. Generate output containing floating-point instructions. This is the
  26682. default.
  26683. .IP "\fB\-mno\-fpu\fR" 4
  26684. .IX Item "-mno-fpu"
  26685. .PD 0
  26686. .IP "\fB\-msoft\-float\fR" 4
  26687. .IX Item "-msoft-float"
  26688. .PD
  26689. Generate output containing library calls for floating point.
  26690. \&\fBWarning:\fR the requisite libraries are not available for all \s-1SPARC\s0
  26691. targets. Normally the facilities of the machine's usual C compiler are
  26692. used, but this cannot be done directly in cross-compilation. You must make
  26693. your own arrangements to provide suitable library functions for
  26694. cross-compilation. The embedded targets \fBsparc\-*\-aout\fR and
  26695. \&\fBsparclite\-*\-*\fR do provide software floating-point support.
  26696. .Sp
  26697. \&\fB\-msoft\-float\fR changes the calling convention in the output file;
  26698. therefore, it is only useful if you compile \fIall\fR of a program with
  26699. this option. In particular, you need to compile \fIlibgcc.a\fR, the
  26700. library that comes with \s-1GCC,\s0 with \fB\-msoft\-float\fR in order for
  26701. this to work.
  26702. .IP "\fB\-mhard\-quad\-float\fR" 4
  26703. .IX Item "-mhard-quad-float"
  26704. Generate output containing quad-word (long double) floating-point
  26705. instructions.
  26706. .IP "\fB\-msoft\-quad\-float\fR" 4
  26707. .IX Item "-msoft-quad-float"
  26708. Generate output containing library calls for quad-word (long double)
  26709. floating-point instructions. The functions called are those specified
  26710. in the \s-1SPARC ABI. \s0 This is the default.
  26711. .Sp
  26712. As of this writing, there are no \s-1SPARC\s0 implementations that have hardware
  26713. support for the quad-word floating-point instructions. They all invoke
  26714. a trap handler for one of these instructions, and then the trap handler
  26715. emulates the effect of the instruction. Because of the trap handler overhead,
  26716. this is much slower than calling the \s-1ABI\s0 library routines. Thus the
  26717. \&\fB\-msoft\-quad\-float\fR option is the default.
  26718. .IP "\fB\-mno\-unaligned\-doubles\fR" 4
  26719. .IX Item "-mno-unaligned-doubles"
  26720. .PD 0
  26721. .IP "\fB\-munaligned\-doubles\fR" 4
  26722. .IX Item "-munaligned-doubles"
  26723. .PD
  26724. Assume that doubles have 8\-byte alignment. This is the default.
  26725. .Sp
  26726. With \fB\-munaligned\-doubles\fR, \s-1GCC\s0 assumes that doubles have 8\-byte
  26727. alignment only if they are contained in another type, or if they have an
  26728. absolute address. Otherwise, it assumes they have 4\-byte alignment.
  26729. Specifying this option avoids some rare compatibility problems with code
  26730. generated by other compilers. It is not the default because it results
  26731. in a performance loss, especially for floating-point code.
  26732. .IP "\fB\-muser\-mode\fR" 4
  26733. .IX Item "-muser-mode"
  26734. .PD 0
  26735. .IP "\fB\-mno\-user\-mode\fR" 4
  26736. .IX Item "-mno-user-mode"
  26737. .PD
  26738. Do not generate code that can only run in supervisor mode. This is relevant
  26739. only for the \f(CW\*(C`casa\*(C'\fR instruction emitted for the \s-1LEON3\s0 processor. This
  26740. is the default.
  26741. .IP "\fB\-mfaster\-structs\fR" 4
  26742. .IX Item "-mfaster-structs"
  26743. .PD 0
  26744. .IP "\fB\-mno\-faster\-structs\fR" 4
  26745. .IX Item "-mno-faster-structs"
  26746. .PD
  26747. With \fB\-mfaster\-structs\fR, the compiler assumes that structures
  26748. should have 8\-byte alignment. This enables the use of pairs of
  26749. \&\f(CW\*(C`ldd\*(C'\fR and \f(CW\*(C`std\*(C'\fR instructions for copies in structure
  26750. assignment, in place of twice as many \f(CW\*(C`ld\*(C'\fR and \f(CW\*(C`st\*(C'\fR pairs.
  26751. However, the use of this changed alignment directly violates the \s-1SPARC
  26752. ABI. \s0 Thus, it's intended only for use on targets where the developer
  26753. acknowledges that their resulting code is not directly in line with
  26754. the rules of the \s-1ABI.\s0
  26755. .IP "\fB\-mstd\-struct\-return\fR" 4
  26756. .IX Item "-mstd-struct-return"
  26757. .PD 0
  26758. .IP "\fB\-mno\-std\-struct\-return\fR" 4
  26759. .IX Item "-mno-std-struct-return"
  26760. .PD
  26761. With \fB\-mstd\-struct\-return\fR, the compiler generates checking code
  26762. in functions returning structures or unions to detect size mismatches
  26763. between the two sides of function calls, as per the 32\-bit \s-1ABI.\s0
  26764. .Sp
  26765. The default is \fB\-mno\-std\-struct\-return\fR. This option has no effect
  26766. in 64\-bit mode.
  26767. .IP "\fB\-mlra\fR" 4
  26768. .IX Item "-mlra"
  26769. .PD 0
  26770. .IP "\fB\-mno\-lra\fR" 4
  26771. .IX Item "-mno-lra"
  26772. .PD
  26773. Enable Local Register Allocation. This is the default for \s-1SPARC\s0 since \s-1GCC 7\s0
  26774. so \fB\-mno\-lra\fR needs to be passed to get old Reload.
  26775. .IP "\fB\-mcpu=\fR\fIcpu_type\fR" 4
  26776. .IX Item "-mcpu=cpu_type"
  26777. Set the instruction set, register set, and instruction scheduling parameters
  26778. for machine type \fIcpu_type\fR. Supported values for \fIcpu_type\fR are
  26779. \&\fBv7\fR, \fBcypress\fR, \fBv8\fR, \fBsupersparc\fR, \fBhypersparc\fR,
  26780. \&\fBleon\fR, \fBleon3\fR, \fBleon3v7\fR, \fBsparclite\fR, \fBf930\fR,
  26781. \&\fBf934\fR, \fBsparclite86x\fR, \fBsparclet\fR, \fBtsc701\fR, \fBv9\fR,
  26782. \&\fBultrasparc\fR, \fBultrasparc3\fR, \fBniagara\fR, \fBniagara2\fR,
  26783. \&\fBniagara3\fR, \fBniagara4\fR, \fBniagara7\fR and \fBm8\fR.
  26784. .Sp
  26785. Native Solaris and GNU/Linux toolchains also support the value \fBnative\fR,
  26786. which selects the best architecture option for the host processor.
  26787. \&\fB\-mcpu=native\fR has no effect if \s-1GCC\s0 does not recognize
  26788. the processor.
  26789. .Sp
  26790. Default instruction scheduling parameters are used for values that select
  26791. an architecture and not an implementation. These are \fBv7\fR, \fBv8\fR,
  26792. \&\fBsparclite\fR, \fBsparclet\fR, \fBv9\fR.
  26793. .Sp
  26794. Here is a list of each supported architecture and their supported
  26795. implementations.
  26796. .RS 4
  26797. .IP "v7" 4
  26798. .IX Item "v7"
  26799. cypress, leon3v7
  26800. .IP "v8" 4
  26801. .IX Item "v8"
  26802. supersparc, hypersparc, leon, leon3
  26803. .IP "sparclite" 4
  26804. .IX Item "sparclite"
  26805. f930, f934, sparclite86x
  26806. .IP "sparclet" 4
  26807. .IX Item "sparclet"
  26808. tsc701
  26809. .IP "v9" 4
  26810. .IX Item "v9"
  26811. ultrasparc, ultrasparc3, niagara, niagara2, niagara3, niagara4,
  26812. niagara7, m8
  26813. .RE
  26814. .RS 4
  26815. .Sp
  26816. By default (unless configured otherwise), \s-1GCC\s0 generates code for the V7
  26817. variant of the \s-1SPARC\s0 architecture. With \fB\-mcpu=cypress\fR, the compiler
  26818. additionally optimizes it for the Cypress \s-1CY7C602\s0 chip, as used in the
  26819. SPARCStation/SPARCServer 3xx series. This is also appropriate for the older
  26820. SPARCStation 1, 2, \s-1IPX\s0 etc.
  26821. .Sp
  26822. With \fB\-mcpu=v8\fR, \s-1GCC\s0 generates code for the V8 variant of the \s-1SPARC\s0
  26823. architecture. The only difference from V7 code is that the compiler emits
  26824. the integer multiply and integer divide instructions which exist in \s-1SPARC\-V8\s0
  26825. but not in \s-1SPARC\-V7. \s0 With \fB\-mcpu=supersparc\fR, the compiler additionally
  26826. optimizes it for the SuperSPARC chip, as used in the SPARCStation 10, 1000 and
  26827. 2000 series.
  26828. .Sp
  26829. With \fB\-mcpu=sparclite\fR, \s-1GCC\s0 generates code for the SPARClite variant of
  26830. the \s-1SPARC\s0 architecture. This adds the integer multiply, integer divide step
  26831. and scan (\f(CW\*(C`ffs\*(C'\fR) instructions which exist in SPARClite but not in \s-1SPARC\-V7.\s0
  26832. With \fB\-mcpu=f930\fR, the compiler additionally optimizes it for the
  26833. Fujitsu \s-1MB86930\s0 chip, which is the original SPARClite, with no \s-1FPU. \s0 With
  26834. \&\fB\-mcpu=f934\fR, the compiler additionally optimizes it for the Fujitsu
  26835. \&\s-1MB86934\s0 chip, which is the more recent SPARClite with \s-1FPU.\s0
  26836. .Sp
  26837. With \fB\-mcpu=sparclet\fR, \s-1GCC\s0 generates code for the SPARClet variant of
  26838. the \s-1SPARC\s0 architecture. This adds the integer multiply, multiply/accumulate,
  26839. integer divide step and scan (\f(CW\*(C`ffs\*(C'\fR) instructions which exist in SPARClet
  26840. but not in \s-1SPARC\-V7. \s0 With \fB\-mcpu=tsc701\fR, the compiler additionally
  26841. optimizes it for the \s-1TEMIC\s0 SPARClet chip.
  26842. .Sp
  26843. With \fB\-mcpu=v9\fR, \s-1GCC\s0 generates code for the V9 variant of the \s-1SPARC\s0
  26844. architecture. This adds 64\-bit integer and floating-point move instructions,
  26845. 3 additional floating-point condition code registers and conditional move
  26846. instructions. With \fB\-mcpu=ultrasparc\fR, the compiler additionally
  26847. optimizes it for the Sun UltraSPARC I/II/IIi chips. With
  26848. \&\fB\-mcpu=ultrasparc3\fR, the compiler additionally optimizes it for the
  26849. Sun UltraSPARC III/III+/IIIi/IIIi+/IV/IV+ chips. With
  26850. \&\fB\-mcpu=niagara\fR, the compiler additionally optimizes it for
  26851. Sun UltraSPARC T1 chips. With \fB\-mcpu=niagara2\fR, the compiler
  26852. additionally optimizes it for Sun UltraSPARC T2 chips. With
  26853. \&\fB\-mcpu=niagara3\fR, the compiler additionally optimizes it for Sun
  26854. UltraSPARC T3 chips. With \fB\-mcpu=niagara4\fR, the compiler
  26855. additionally optimizes it for Sun UltraSPARC T4 chips. With
  26856. \&\fB\-mcpu=niagara7\fR, the compiler additionally optimizes it for
  26857. Oracle \s-1SPARC M7\s0 chips. With \fB\-mcpu=m8\fR, the compiler
  26858. additionally optimizes it for Oracle M8 chips.
  26859. .RE
  26860. .IP "\fB\-mtune=\fR\fIcpu_type\fR" 4
  26861. .IX Item "-mtune=cpu_type"
  26862. Set the instruction scheduling parameters for machine type
  26863. \&\fIcpu_type\fR, but do not set the instruction set or register set that the
  26864. option \fB\-mcpu=\fR\fIcpu_type\fR does.
  26865. .Sp
  26866. The same values for \fB\-mcpu=\fR\fIcpu_type\fR can be used for
  26867. \&\fB\-mtune=\fR\fIcpu_type\fR, but the only useful values are those
  26868. that select a particular \s-1CPU\s0 implementation. Those are
  26869. \&\fBcypress\fR, \fBsupersparc\fR, \fBhypersparc\fR, \fBleon\fR,
  26870. \&\fBleon3\fR, \fBleon3v7\fR, \fBf930\fR, \fBf934\fR,
  26871. \&\fBsparclite86x\fR, \fBtsc701\fR, \fBultrasparc\fR,
  26872. \&\fBultrasparc3\fR, \fBniagara\fR, \fBniagara2\fR, \fBniagara3\fR,
  26873. \&\fBniagara4\fR, \fBniagara7\fR and \fBm8\fR. With native Solaris
  26874. and GNU/Linux toolchains, \fBnative\fR can also be used.
  26875. .IP "\fB\-mv8plus\fR" 4
  26876. .IX Item "-mv8plus"
  26877. .PD 0
  26878. .IP "\fB\-mno\-v8plus\fR" 4
  26879. .IX Item "-mno-v8plus"
  26880. .PD
  26881. With \fB\-mv8plus\fR, \s-1GCC\s0 generates code for the \s-1SPARC\-V8+ ABI. \s0 The
  26882. difference from the V8 \s-1ABI\s0 is that the global and out registers are
  26883. considered 64 bits wide. This is enabled by default on Solaris in 32\-bit
  26884. mode for all \s-1SPARC\-V9\s0 processors.
  26885. .IP "\fB\-mvis\fR" 4
  26886. .IX Item "-mvis"
  26887. .PD 0
  26888. .IP "\fB\-mno\-vis\fR" 4
  26889. .IX Item "-mno-vis"
  26890. .PD
  26891. With \fB\-mvis\fR, \s-1GCC\s0 generates code that takes advantage of the UltraSPARC
  26892. Visual Instruction Set extensions. The default is \fB\-mno\-vis\fR.
  26893. .IP "\fB\-mvis2\fR" 4
  26894. .IX Item "-mvis2"
  26895. .PD 0
  26896. .IP "\fB\-mno\-vis2\fR" 4
  26897. .IX Item "-mno-vis2"
  26898. .PD
  26899. With \fB\-mvis2\fR, \s-1GCC\s0 generates code that takes advantage of
  26900. version 2.0 of the UltraSPARC Visual Instruction Set extensions. The
  26901. default is \fB\-mvis2\fR when targeting a cpu that supports such
  26902. instructions, such as UltraSPARC-III and later. Setting \fB\-mvis2\fR
  26903. also sets \fB\-mvis\fR.
  26904. .IP "\fB\-mvis3\fR" 4
  26905. .IX Item "-mvis3"
  26906. .PD 0
  26907. .IP "\fB\-mno\-vis3\fR" 4
  26908. .IX Item "-mno-vis3"
  26909. .PD
  26910. With \fB\-mvis3\fR, \s-1GCC\s0 generates code that takes advantage of
  26911. version 3.0 of the UltraSPARC Visual Instruction Set extensions. The
  26912. default is \fB\-mvis3\fR when targeting a cpu that supports such
  26913. instructions, such as niagara\-3 and later. Setting \fB\-mvis3\fR
  26914. also sets \fB\-mvis2\fR and \fB\-mvis\fR.
  26915. .IP "\fB\-mvis4\fR" 4
  26916. .IX Item "-mvis4"
  26917. .PD 0
  26918. .IP "\fB\-mno\-vis4\fR" 4
  26919. .IX Item "-mno-vis4"
  26920. .PD
  26921. With \fB\-mvis4\fR, \s-1GCC\s0 generates code that takes advantage of
  26922. version 4.0 of the UltraSPARC Visual Instruction Set extensions. The
  26923. default is \fB\-mvis4\fR when targeting a cpu that supports such
  26924. instructions, such as niagara\-7 and later. Setting \fB\-mvis4\fR
  26925. also sets \fB\-mvis3\fR, \fB\-mvis2\fR and \fB\-mvis\fR.
  26926. .IP "\fB\-mvis4b\fR" 4
  26927. .IX Item "-mvis4b"
  26928. .PD 0
  26929. .IP "\fB\-mno\-vis4b\fR" 4
  26930. .IX Item "-mno-vis4b"
  26931. .PD
  26932. With \fB\-mvis4b\fR, \s-1GCC\s0 generates code that takes advantage of
  26933. version 4.0 of the UltraSPARC Visual Instruction Set extensions, plus
  26934. the additional \s-1VIS\s0 instructions introduced in the Oracle \s-1SPARC\s0
  26935. Architecture 2017. The default is \fB\-mvis4b\fR when targeting a
  26936. cpu that supports such instructions, such as m8 and later. Setting
  26937. \&\fB\-mvis4b\fR also sets \fB\-mvis4\fR, \fB\-mvis3\fR,
  26938. \&\fB\-mvis2\fR and \fB\-mvis\fR.
  26939. .IP "\fB\-mcbcond\fR" 4
  26940. .IX Item "-mcbcond"
  26941. .PD 0
  26942. .IP "\fB\-mno\-cbcond\fR" 4
  26943. .IX Item "-mno-cbcond"
  26944. .PD
  26945. With \fB\-mcbcond\fR, \s-1GCC\s0 generates code that takes advantage of the UltraSPARC
  26946. Compare-and-Branch-on-Condition instructions. The default is \fB\-mcbcond\fR
  26947. when targeting a \s-1CPU\s0 that supports such instructions, such as Niagara\-4 and
  26948. later.
  26949. .IP "\fB\-mfmaf\fR" 4
  26950. .IX Item "-mfmaf"
  26951. .PD 0
  26952. .IP "\fB\-mno\-fmaf\fR" 4
  26953. .IX Item "-mno-fmaf"
  26954. .PD
  26955. With \fB\-mfmaf\fR, \s-1GCC\s0 generates code that takes advantage of the UltraSPARC
  26956. Fused Multiply-Add Floating-point instructions. The default is \fB\-mfmaf\fR
  26957. when targeting a \s-1CPU\s0 that supports such instructions, such as Niagara\-3 and
  26958. later.
  26959. .IP "\fB\-mfsmuld\fR" 4
  26960. .IX Item "-mfsmuld"
  26961. .PD 0
  26962. .IP "\fB\-mno\-fsmuld\fR" 4
  26963. .IX Item "-mno-fsmuld"
  26964. .PD
  26965. With \fB\-mfsmuld\fR, \s-1GCC\s0 generates code that takes advantage of the
  26966. Floating-point Multiply Single to Double (FsMULd) instruction. The default is
  26967. \&\fB\-mfsmuld\fR when targeting a \s-1CPU\s0 supporting the architecture versions V8
  26968. or V9 with \s-1FPU\s0 except \fB\-mcpu=leon\fR.
  26969. .IP "\fB\-mpopc\fR" 4
  26970. .IX Item "-mpopc"
  26971. .PD 0
  26972. .IP "\fB\-mno\-popc\fR" 4
  26973. .IX Item "-mno-popc"
  26974. .PD
  26975. With \fB\-mpopc\fR, \s-1GCC\s0 generates code that takes advantage of the UltraSPARC
  26976. Population Count instruction. The default is \fB\-mpopc\fR
  26977. when targeting a \s-1CPU\s0 that supports such an instruction, such as Niagara\-2 and
  26978. later.
  26979. .IP "\fB\-msubxc\fR" 4
  26980. .IX Item "-msubxc"
  26981. .PD 0
  26982. .IP "\fB\-mno\-subxc\fR" 4
  26983. .IX Item "-mno-subxc"
  26984. .PD
  26985. With \fB\-msubxc\fR, \s-1GCC\s0 generates code that takes advantage of the UltraSPARC
  26986. Subtract-Extended-with-Carry instruction. The default is \fB\-msubxc\fR
  26987. when targeting a \s-1CPU\s0 that supports such an instruction, such as Niagara\-7 and
  26988. later.
  26989. .IP "\fB\-mfix\-at697f\fR" 4
  26990. .IX Item "-mfix-at697f"
  26991. Enable the documented workaround for the single erratum of the Atmel \s-1AT697F\s0
  26992. processor (which corresponds to erratum #13 of the \s-1AT697E\s0 processor).
  26993. .IP "\fB\-mfix\-ut699\fR" 4
  26994. .IX Item "-mfix-ut699"
  26995. Enable the documented workarounds for the floating-point errata and the data
  26996. cache nullify errata of the \s-1UT699\s0 processor.
  26997. .IP "\fB\-mfix\-ut700\fR" 4
  26998. .IX Item "-mfix-ut700"
  26999. Enable the documented workaround for the back-to-back store errata of
  27000. the \s-1UT699E/UT700\s0 processor.
  27001. .IP "\fB\-mfix\-gr712rc\fR" 4
  27002. .IX Item "-mfix-gr712rc"
  27003. Enable the documented workaround for the back-to-back store errata of
  27004. the \s-1GR712RC\s0 processor.
  27005. .PP
  27006. These \fB\-m\fR options are supported in addition to the above
  27007. on \s-1SPARC\-V9\s0 processors in 64\-bit environments:
  27008. .IP "\fB\-m32\fR" 4
  27009. .IX Item "-m32"
  27010. .PD 0
  27011. .IP "\fB\-m64\fR" 4
  27012. .IX Item "-m64"
  27013. .PD
  27014. Generate code for a 32\-bit or 64\-bit environment.
  27015. The 32\-bit environment sets int, long and pointer to 32 bits.
  27016. The 64\-bit environment sets int to 32 bits and long and pointer
  27017. to 64 bits.
  27018. .IP "\fB\-mcmodel=\fR\fIwhich\fR" 4
  27019. .IX Item "-mcmodel=which"
  27020. Set the code model to one of
  27021. .RS 4
  27022. .IP "\fBmedlow\fR" 4
  27023. .IX Item "medlow"
  27024. The Medium/Low code model: 64\-bit addresses, programs
  27025. must be linked in the low 32 bits of memory. Programs can be statically
  27026. or dynamically linked.
  27027. .IP "\fBmedmid\fR" 4
  27028. .IX Item "medmid"
  27029. The Medium/Middle code model: 64\-bit addresses, programs
  27030. must be linked in the low 44 bits of memory, the text and data segments must
  27031. be less than 2GB in size and the data segment must be located within 2GB of
  27032. the text segment.
  27033. .IP "\fBmedany\fR" 4
  27034. .IX Item "medany"
  27035. The Medium/Anywhere code model: 64\-bit addresses, programs
  27036. may be linked anywhere in memory, the text and data segments must be less
  27037. than 2GB in size and the data segment must be located within 2GB of the
  27038. text segment.
  27039. .IP "\fBembmedany\fR" 4
  27040. .IX Item "embmedany"
  27041. The Medium/Anywhere code model for embedded systems:
  27042. 64\-bit addresses, the text and data segments must be less than 2GB in
  27043. size, both starting anywhere in memory (determined at link time). The
  27044. global register \f(CW%g4\fR points to the base of the data segment. Programs
  27045. are statically linked and \s-1PIC\s0 is not supported.
  27046. .RE
  27047. .RS 4
  27048. .RE
  27049. .IP "\fB\-mmemory\-model=\fR\fImem-model\fR" 4
  27050. .IX Item "-mmemory-model=mem-model"
  27051. Set the memory model in force on the processor to one of
  27052. .RS 4
  27053. .IP "\fBdefault\fR" 4
  27054. .IX Item "default"
  27055. The default memory model for the processor and operating system.
  27056. .IP "\fBrmo\fR" 4
  27057. .IX Item "rmo"
  27058. Relaxed Memory Order
  27059. .IP "\fBpso\fR" 4
  27060. .IX Item "pso"
  27061. Partial Store Order
  27062. .IP "\fBtso\fR" 4
  27063. .IX Item "tso"
  27064. Total Store Order
  27065. .IP "\fBsc\fR" 4
  27066. .IX Item "sc"
  27067. Sequential Consistency
  27068. .RE
  27069. .RS 4
  27070. .Sp
  27071. These memory models are formally defined in Appendix D of the \s-1SPARC\-V9\s0
  27072. architecture manual, as set in the processor's \f(CW\*(C`PSTATE.MM\*(C'\fR field.
  27073. .RE
  27074. .IP "\fB\-mstack\-bias\fR" 4
  27075. .IX Item "-mstack-bias"
  27076. .PD 0
  27077. .IP "\fB\-mno\-stack\-bias\fR" 4
  27078. .IX Item "-mno-stack-bias"
  27079. .PD
  27080. With \fB\-mstack\-bias\fR, \s-1GCC\s0 assumes that the stack pointer, and
  27081. frame pointer if present, are offset by \-2047 which must be added back
  27082. when making stack frame references. This is the default in 64\-bit mode.
  27083. Otherwise, assume no such offset is present.
  27084. .PP
  27085. \fIOptions for System V\fR
  27086. .IX Subsection "Options for System V"
  27087. .PP
  27088. These additional options are available on System V Release 4 for
  27089. compatibility with other compilers on those systems:
  27090. .IP "\fB\-G\fR" 4
  27091. .IX Item "-G"
  27092. Create a shared object.
  27093. It is recommended that \fB\-symbolic\fR or \fB\-shared\fR be used instead.
  27094. .IP "\fB\-Qy\fR" 4
  27095. .IX Item "-Qy"
  27096. Identify the versions of each tool used by the compiler, in a
  27097. \&\f(CW\*(C`.ident\*(C'\fR assembler directive in the output.
  27098. .IP "\fB\-Qn\fR" 4
  27099. .IX Item "-Qn"
  27100. Refrain from adding \f(CW\*(C`.ident\*(C'\fR directives to the output file (this is
  27101. the default).
  27102. .IP "\fB\-YP,\fR\fIdirs\fR" 4
  27103. .IX Item "-YP,dirs"
  27104. Search the directories \fIdirs\fR, and no others, for libraries
  27105. specified with \fB\-l\fR.
  27106. .IP "\fB\-Ym,\fR\fIdir\fR" 4
  27107. .IX Item "-Ym,dir"
  27108. Look in the directory \fIdir\fR to find the M4 preprocessor.
  27109. The assembler uses this option.
  27110. .PP
  27111. \fITILE-Gx Options\fR
  27112. .IX Subsection "TILE-Gx Options"
  27113. .PP
  27114. These \fB\-m\fR options are supported on the TILE-Gx:
  27115. .IP "\fB\-mcmodel=small\fR" 4
  27116. .IX Item "-mcmodel=small"
  27117. Generate code for the small model. The distance for direct calls is
  27118. limited to 500M in either direction. PC-relative addresses are 32
  27119. bits. Absolute addresses support the full address range.
  27120. .IP "\fB\-mcmodel=large\fR" 4
  27121. .IX Item "-mcmodel=large"
  27122. Generate code for the large model. There is no limitation on call
  27123. distance, pc-relative addresses, or absolute addresses.
  27124. .IP "\fB\-mcpu=\fR\fIname\fR" 4
  27125. .IX Item "-mcpu=name"
  27126. Selects the type of \s-1CPU\s0 to be targeted. Currently the only supported
  27127. type is \fBtilegx\fR.
  27128. .IP "\fB\-m32\fR" 4
  27129. .IX Item "-m32"
  27130. .PD 0
  27131. .IP "\fB\-m64\fR" 4
  27132. .IX Item "-m64"
  27133. .PD
  27134. Generate code for a 32\-bit or 64\-bit environment. The 32\-bit
  27135. environment sets int, long, and pointer to 32 bits. The 64\-bit
  27136. environment sets int to 32 bits and long and pointer to 64 bits.
  27137. .IP "\fB\-mbig\-endian\fR" 4
  27138. .IX Item "-mbig-endian"
  27139. .PD 0
  27140. .IP "\fB\-mlittle\-endian\fR" 4
  27141. .IX Item "-mlittle-endian"
  27142. .PD
  27143. Generate code in big/little endian mode, respectively.
  27144. .PP
  27145. \fITILEPro Options\fR
  27146. .IX Subsection "TILEPro Options"
  27147. .PP
  27148. These \fB\-m\fR options are supported on the TILEPro:
  27149. .IP "\fB\-mcpu=\fR\fIname\fR" 4
  27150. .IX Item "-mcpu=name"
  27151. Selects the type of \s-1CPU\s0 to be targeted. Currently the only supported
  27152. type is \fBtilepro\fR.
  27153. .IP "\fB\-m32\fR" 4
  27154. .IX Item "-m32"
  27155. Generate code for a 32\-bit environment, which sets int, long, and
  27156. pointer to 32 bits. This is the only supported behavior so the flag
  27157. is essentially ignored.
  27158. .PP
  27159. \fIV850 Options\fR
  27160. .IX Subsection "V850 Options"
  27161. .PP
  27162. These \fB\-m\fR options are defined for V850 implementations:
  27163. .IP "\fB\-mlong\-calls\fR" 4
  27164. .IX Item "-mlong-calls"
  27165. .PD 0
  27166. .IP "\fB\-mno\-long\-calls\fR" 4
  27167. .IX Item "-mno-long-calls"
  27168. .PD
  27169. Treat all calls as being far away (near). If calls are assumed to be
  27170. far away, the compiler always loads the function's address into a
  27171. register, and calls indirect through the pointer.
  27172. .IP "\fB\-mno\-ep\fR" 4
  27173. .IX Item "-mno-ep"
  27174. .PD 0
  27175. .IP "\fB\-mep\fR" 4
  27176. .IX Item "-mep"
  27177. .PD
  27178. Do not optimize (do optimize) basic blocks that use the same index
  27179. pointer 4 or more times to copy pointer into the \f(CW\*(C`ep\*(C'\fR register, and
  27180. use the shorter \f(CW\*(C`sld\*(C'\fR and \f(CW\*(C`sst\*(C'\fR instructions. The \fB\-mep\fR
  27181. option is on by default if you optimize.
  27182. .IP "\fB\-mno\-prolog\-function\fR" 4
  27183. .IX Item "-mno-prolog-function"
  27184. .PD 0
  27185. .IP "\fB\-mprolog\-function\fR" 4
  27186. .IX Item "-mprolog-function"
  27187. .PD
  27188. Do not use (do use) external functions to save and restore registers
  27189. at the prologue and epilogue of a function. The external functions
  27190. are slower, but use less code space if more than one function saves
  27191. the same number of registers. The \fB\-mprolog\-function\fR option
  27192. is on by default if you optimize.
  27193. .IP "\fB\-mspace\fR" 4
  27194. .IX Item "-mspace"
  27195. Try to make the code as small as possible. At present, this just turns
  27196. on the \fB\-mep\fR and \fB\-mprolog\-function\fR options.
  27197. .IP "\fB\-mtda=\fR\fIn\fR" 4
  27198. .IX Item "-mtda=n"
  27199. Put static or global variables whose size is \fIn\fR bytes or less into
  27200. the tiny data area that register \f(CW\*(C`ep\*(C'\fR points to. The tiny data
  27201. area can hold up to 256 bytes in total (128 bytes for byte references).
  27202. .IP "\fB\-msda=\fR\fIn\fR" 4
  27203. .IX Item "-msda=n"
  27204. Put static or global variables whose size is \fIn\fR bytes or less into
  27205. the small data area that register \f(CW\*(C`gp\*(C'\fR points to. The small data
  27206. area can hold up to 64 kilobytes.
  27207. .IP "\fB\-mzda=\fR\fIn\fR" 4
  27208. .IX Item "-mzda=n"
  27209. Put static or global variables whose size is \fIn\fR bytes or less into
  27210. the first 32 kilobytes of memory.
  27211. .IP "\fB\-mv850\fR" 4
  27212. .IX Item "-mv850"
  27213. Specify that the target processor is the V850.
  27214. .IP "\fB\-mv850e3v5\fR" 4
  27215. .IX Item "-mv850e3v5"
  27216. Specify that the target processor is the V850E3V5. The preprocessor
  27217. constant \f(CW\*(C`_\|_v850e3v5_\|_\*(C'\fR is defined if this option is used.
  27218. .IP "\fB\-mv850e2v4\fR" 4
  27219. .IX Item "-mv850e2v4"
  27220. Specify that the target processor is the V850E3V5. This is an alias for
  27221. the \fB\-mv850e3v5\fR option.
  27222. .IP "\fB\-mv850e2v3\fR" 4
  27223. .IX Item "-mv850e2v3"
  27224. Specify that the target processor is the V850E2V3. The preprocessor
  27225. constant \f(CW\*(C`_\|_v850e2v3_\|_\*(C'\fR is defined if this option is used.
  27226. .IP "\fB\-mv850e2\fR" 4
  27227. .IX Item "-mv850e2"
  27228. Specify that the target processor is the V850E2. The preprocessor
  27229. constant \f(CW\*(C`_\|_v850e2_\|_\*(C'\fR is defined if this option is used.
  27230. .IP "\fB\-mv850e1\fR" 4
  27231. .IX Item "-mv850e1"
  27232. Specify that the target processor is the V850E1. The preprocessor
  27233. constants \f(CW\*(C`_\|_v850e1_\|_\*(C'\fR and \f(CW\*(C`_\|_v850e_\|_\*(C'\fR are defined if
  27234. this option is used.
  27235. .IP "\fB\-mv850es\fR" 4
  27236. .IX Item "-mv850es"
  27237. Specify that the target processor is the V850ES. This is an alias for
  27238. the \fB\-mv850e1\fR option.
  27239. .IP "\fB\-mv850e\fR" 4
  27240. .IX Item "-mv850e"
  27241. Specify that the target processor is the V850E. The preprocessor
  27242. constant \f(CW\*(C`_\|_v850e_\|_\*(C'\fR is defined if this option is used.
  27243. .Sp
  27244. If neither \fB\-mv850\fR nor \fB\-mv850e\fR nor \fB\-mv850e1\fR
  27245. nor \fB\-mv850e2\fR nor \fB\-mv850e2v3\fR nor \fB\-mv850e3v5\fR
  27246. are defined then a default target processor is chosen and the
  27247. relevant \fB_\|_v850*_\|_\fR preprocessor constant is defined.
  27248. .Sp
  27249. The preprocessor constants \f(CW\*(C`_\|_v850\*(C'\fR and \f(CW\*(C`_\|_v851_\|_\*(C'\fR are always
  27250. defined, regardless of which processor variant is the target.
  27251. .IP "\fB\-mdisable\-callt\fR" 4
  27252. .IX Item "-mdisable-callt"
  27253. .PD 0
  27254. .IP "\fB\-mno\-disable\-callt\fR" 4
  27255. .IX Item "-mno-disable-callt"
  27256. .PD
  27257. This option suppresses generation of the \f(CW\*(C`CALLT\*(C'\fR instruction for the
  27258. v850e, v850e1, v850e2, v850e2v3 and v850e3v5 flavors of the v850
  27259. architecture.
  27260. .Sp
  27261. This option is enabled by default when the \s-1RH850 ABI\s0 is
  27262. in use (see \fB\-mrh850\-abi\fR), and disabled by default when the
  27263. \&\s-1GCC ABI\s0 is in use. If \f(CW\*(C`CALLT\*(C'\fR instructions are being generated
  27264. then the C preprocessor symbol \f(CW\*(C`_\|_V850_CALLT_\|_\*(C'\fR is defined.
  27265. .IP "\fB\-mrelax\fR" 4
  27266. .IX Item "-mrelax"
  27267. .PD 0
  27268. .IP "\fB\-mno\-relax\fR" 4
  27269. .IX Item "-mno-relax"
  27270. .PD
  27271. Pass on (or do not pass on) the \fB\-mrelax\fR command-line option
  27272. to the assembler.
  27273. .IP "\fB\-mlong\-jumps\fR" 4
  27274. .IX Item "-mlong-jumps"
  27275. .PD 0
  27276. .IP "\fB\-mno\-long\-jumps\fR" 4
  27277. .IX Item "-mno-long-jumps"
  27278. .PD
  27279. Disable (or re-enable) the generation of PC-relative jump instructions.
  27280. .IP "\fB\-msoft\-float\fR" 4
  27281. .IX Item "-msoft-float"
  27282. .PD 0
  27283. .IP "\fB\-mhard\-float\fR" 4
  27284. .IX Item "-mhard-float"
  27285. .PD
  27286. Disable (or re-enable) the generation of hardware floating point
  27287. instructions. This option is only significant when the target
  27288. architecture is \fBV850E2V3\fR or higher. If hardware floating point
  27289. instructions are being generated then the C preprocessor symbol
  27290. \&\f(CW\*(C`_\|_FPU_OK_\|_\*(C'\fR is defined, otherwise the symbol
  27291. \&\f(CW\*(C`_\|_NO_FPU_\|_\*(C'\fR is defined.
  27292. .IP "\fB\-mloop\fR" 4
  27293. .IX Item "-mloop"
  27294. Enables the use of the e3v5 \s-1LOOP\s0 instruction. The use of this
  27295. instruction is not enabled by default when the e3v5 architecture is
  27296. selected because its use is still experimental.
  27297. .IP "\fB\-mrh850\-abi\fR" 4
  27298. .IX Item "-mrh850-abi"
  27299. .PD 0
  27300. .IP "\fB\-mghs\fR" 4
  27301. .IX Item "-mghs"
  27302. .PD
  27303. Enables support for the \s-1RH850\s0 version of the V850 \s-1ABI. \s0 This is the
  27304. default. With this version of the \s-1ABI\s0 the following rules apply:
  27305. .RS 4
  27306. .IP "*" 4
  27307. Integer sized structures and unions are returned via a memory pointer
  27308. rather than a register.
  27309. .IP "*" 4
  27310. Large structures and unions (more than 8 bytes in size) are passed by
  27311. value.
  27312. .IP "*" 4
  27313. Functions are aligned to 16\-bit boundaries.
  27314. .IP "*" 4
  27315. The \fB\-m8byte\-align\fR command-line option is supported.
  27316. .IP "*" 4
  27317. The \fB\-mdisable\-callt\fR command-line option is enabled by
  27318. default. The \fB\-mno\-disable\-callt\fR command-line option is not
  27319. supported.
  27320. .RE
  27321. .RS 4
  27322. .Sp
  27323. When this version of the \s-1ABI\s0 is enabled the C preprocessor symbol
  27324. \&\f(CW\*(C`_\|_V850_RH850_ABI_\|_\*(C'\fR is defined.
  27325. .RE
  27326. .IP "\fB\-mgcc\-abi\fR" 4
  27327. .IX Item "-mgcc-abi"
  27328. Enables support for the old \s-1GCC\s0 version of the V850 \s-1ABI. \s0 With this
  27329. version of the \s-1ABI\s0 the following rules apply:
  27330. .RS 4
  27331. .IP "*" 4
  27332. Integer sized structures and unions are returned in register \f(CW\*(C`r10\*(C'\fR.
  27333. .IP "*" 4
  27334. Large structures and unions (more than 8 bytes in size) are passed by
  27335. reference.
  27336. .IP "*" 4
  27337. Functions are aligned to 32\-bit boundaries, unless optimizing for
  27338. size.
  27339. .IP "*" 4
  27340. The \fB\-m8byte\-align\fR command-line option is not supported.
  27341. .IP "*" 4
  27342. The \fB\-mdisable\-callt\fR command-line option is supported but not
  27343. enabled by default.
  27344. .RE
  27345. .RS 4
  27346. .Sp
  27347. When this version of the \s-1ABI\s0 is enabled the C preprocessor symbol
  27348. \&\f(CW\*(C`_\|_V850_GCC_ABI_\|_\*(C'\fR is defined.
  27349. .RE
  27350. .IP "\fB\-m8byte\-align\fR" 4
  27351. .IX Item "-m8byte-align"
  27352. .PD 0
  27353. .IP "\fB\-mno\-8byte\-align\fR" 4
  27354. .IX Item "-mno-8byte-align"
  27355. .PD
  27356. Enables support for \f(CW\*(C`double\*(C'\fR and \f(CW\*(C`long long\*(C'\fR types to be
  27357. aligned on 8\-byte boundaries. The default is to restrict the
  27358. alignment of all objects to at most 4\-bytes. When
  27359. \&\fB\-m8byte\-align\fR is in effect the C preprocessor symbol
  27360. \&\f(CW\*(C`_\|_V850_8BYTE_ALIGN_\|_\*(C'\fR is defined.
  27361. .IP "\fB\-mbig\-switch\fR" 4
  27362. .IX Item "-mbig-switch"
  27363. Generate code suitable for big switch tables. Use this option only if
  27364. the assembler/linker complain about out of range branches within a switch
  27365. table.
  27366. .IP "\fB\-mapp\-regs\fR" 4
  27367. .IX Item "-mapp-regs"
  27368. This option causes r2 and r5 to be used in the code generated by
  27369. the compiler. This setting is the default.
  27370. .IP "\fB\-mno\-app\-regs\fR" 4
  27371. .IX Item "-mno-app-regs"
  27372. This option causes r2 and r5 to be treated as fixed registers.
  27373. .PP
  27374. \fI\s-1VAX\s0 Options\fR
  27375. .IX Subsection "VAX Options"
  27376. .PP
  27377. These \fB\-m\fR options are defined for the \s-1VAX:\s0
  27378. .IP "\fB\-munix\fR" 4
  27379. .IX Item "-munix"
  27380. Do not output certain jump instructions (\f(CW\*(C`aobleq\*(C'\fR and so on)
  27381. that the Unix assembler for the \s-1VAX\s0 cannot handle across long
  27382. ranges.
  27383. .IP "\fB\-mgnu\fR" 4
  27384. .IX Item "-mgnu"
  27385. Do output those jump instructions, on the assumption that the
  27386. \&\s-1GNU\s0 assembler is being used.
  27387. .IP "\fB\-mg\fR" 4
  27388. .IX Item "-mg"
  27389. Output code for G\-format floating-point numbers instead of D\-format.
  27390. .PP
  27391. \fIVisium Options\fR
  27392. .IX Subsection "Visium Options"
  27393. .IP "\fB\-mdebug\fR" 4
  27394. .IX Item "-mdebug"
  27395. A program which performs file I/O and is destined to run on an \s-1MCM\s0 target
  27396. should be linked with this option. It causes the libraries libc.a and
  27397. libdebug.a to be linked. The program should be run on the target under
  27398. the control of the \s-1GDB\s0 remote debugging stub.
  27399. .IP "\fB\-msim\fR" 4
  27400. .IX Item "-msim"
  27401. A program which performs file I/O and is destined to run on the simulator
  27402. should be linked with option. This causes libraries libc.a and libsim.a to
  27403. be linked.
  27404. .IP "\fB\-mfpu\fR" 4
  27405. .IX Item "-mfpu"
  27406. .PD 0
  27407. .IP "\fB\-mhard\-float\fR" 4
  27408. .IX Item "-mhard-float"
  27409. .PD
  27410. Generate code containing floating-point instructions. This is the
  27411. default.
  27412. .IP "\fB\-mno\-fpu\fR" 4
  27413. .IX Item "-mno-fpu"
  27414. .PD 0
  27415. .IP "\fB\-msoft\-float\fR" 4
  27416. .IX Item "-msoft-float"
  27417. .PD
  27418. Generate code containing library calls for floating-point.
  27419. .Sp
  27420. \&\fB\-msoft\-float\fR changes the calling convention in the output file;
  27421. therefore, it is only useful if you compile \fIall\fR of a program with
  27422. this option. In particular, you need to compile \fIlibgcc.a\fR, the
  27423. library that comes with \s-1GCC,\s0 with \fB\-msoft\-float\fR in order for
  27424. this to work.
  27425. .IP "\fB\-mcpu=\fR\fIcpu_type\fR" 4
  27426. .IX Item "-mcpu=cpu_type"
  27427. Set the instruction set, register set, and instruction scheduling parameters
  27428. for machine type \fIcpu_type\fR. Supported values for \fIcpu_type\fR are
  27429. \&\fBmcm\fR, \fBgr5\fR and \fBgr6\fR.
  27430. .Sp
  27431. \&\fBmcm\fR is a synonym of \fBgr5\fR present for backward compatibility.
  27432. .Sp
  27433. By default (unless configured otherwise), \s-1GCC\s0 generates code for the \s-1GR5\s0
  27434. variant of the Visium architecture.
  27435. .Sp
  27436. With \fB\-mcpu=gr6\fR, \s-1GCC\s0 generates code for the \s-1GR6\s0 variant of the Visium
  27437. architecture. The only difference from \s-1GR5\s0 code is that the compiler will
  27438. generate block move instructions.
  27439. .IP "\fB\-mtune=\fR\fIcpu_type\fR" 4
  27440. .IX Item "-mtune=cpu_type"
  27441. Set the instruction scheduling parameters for machine type \fIcpu_type\fR,
  27442. but do not set the instruction set or register set that the option
  27443. \&\fB\-mcpu=\fR\fIcpu_type\fR would.
  27444. .IP "\fB\-msv\-mode\fR" 4
  27445. .IX Item "-msv-mode"
  27446. Generate code for the supervisor mode, where there are no restrictions on
  27447. the access to general registers. This is the default.
  27448. .IP "\fB\-muser\-mode\fR" 4
  27449. .IX Item "-muser-mode"
  27450. Generate code for the user mode, where the access to some general registers
  27451. is forbidden: on the \s-1GR5,\s0 registers r24 to r31 cannot be accessed in this
  27452. mode; on the \s-1GR6,\s0 only registers r29 to r31 are affected.
  27453. .PP
  27454. \fI\s-1VMS\s0 Options\fR
  27455. .IX Subsection "VMS Options"
  27456. .PP
  27457. These \fB\-m\fR options are defined for the \s-1VMS\s0 implementations:
  27458. .IP "\fB\-mvms\-return\-codes\fR" 4
  27459. .IX Item "-mvms-return-codes"
  27460. Return \s-1VMS\s0 condition codes from \f(CW\*(C`main\*(C'\fR. The default is to return POSIX-style
  27461. condition (e.g. error) codes.
  27462. .IP "\fB\-mdebug\-main=\fR\fIprefix\fR" 4
  27463. .IX Item "-mdebug-main=prefix"
  27464. Flag the first routine whose name starts with \fIprefix\fR as the main
  27465. routine for the debugger.
  27466. .IP "\fB\-mmalloc64\fR" 4
  27467. .IX Item "-mmalloc64"
  27468. Default to 64\-bit memory allocation routines.
  27469. .IP "\fB\-mpointer\-size=\fR\fIsize\fR" 4
  27470. .IX Item "-mpointer-size=size"
  27471. Set the default size of pointers. Possible options for \fIsize\fR are
  27472. \&\fB32\fR or \fBshort\fR for 32 bit pointers, \fB64\fR or \fBlong\fR
  27473. for 64 bit pointers, and \fBno\fR for supporting only 32 bit pointers.
  27474. The later option disables \f(CW\*(C`pragma pointer_size\*(C'\fR.
  27475. .PP
  27476. \fIVxWorks Options\fR
  27477. .IX Subsection "VxWorks Options"
  27478. .PP
  27479. The options in this section are defined for all VxWorks targets.
  27480. Options specific to the target hardware are listed with the other
  27481. options for that target.
  27482. .IP "\fB\-mrtp\fR" 4
  27483. .IX Item "-mrtp"
  27484. \&\s-1GCC\s0 can generate code for both VxWorks kernels and real time processes
  27485. (RTPs). This option switches from the former to the latter. It also
  27486. defines the preprocessor macro \f(CW\*(C`_\|_RTP_\|_\*(C'\fR.
  27487. .IP "\fB\-non\-static\fR" 4
  27488. .IX Item "-non-static"
  27489. Link an \s-1RTP\s0 executable against shared libraries rather than static
  27490. libraries. The options \fB\-static\fR and \fB\-shared\fR can
  27491. also be used for RTPs; \fB\-static\fR
  27492. is the default.
  27493. .IP "\fB\-Bstatic\fR" 4
  27494. .IX Item "-Bstatic"
  27495. .PD 0
  27496. .IP "\fB\-Bdynamic\fR" 4
  27497. .IX Item "-Bdynamic"
  27498. .PD
  27499. These options are passed down to the linker. They are defined for
  27500. compatibility with Diab.
  27501. .IP "\fB\-Xbind\-lazy\fR" 4
  27502. .IX Item "-Xbind-lazy"
  27503. Enable lazy binding of function calls. This option is equivalent to
  27504. \&\fB\-Wl,\-z,now\fR and is defined for compatibility with Diab.
  27505. .IP "\fB\-Xbind\-now\fR" 4
  27506. .IX Item "-Xbind-now"
  27507. Disable lazy binding of function calls. This option is the default and
  27508. is defined for compatibility with Diab.
  27509. .PP
  27510. \fIx86 Options\fR
  27511. .IX Subsection "x86 Options"
  27512. .PP
  27513. These \fB\-m\fR options are defined for the x86 family of computers.
  27514. .IP "\fB\-march=\fR\fIcpu-type\fR" 4
  27515. .IX Item "-march=cpu-type"
  27516. Generate instructions for the machine type \fIcpu-type\fR. In contrast to
  27517. \&\fB\-mtune=\fR\fIcpu-type\fR, which merely tunes the generated code
  27518. for the specified \fIcpu-type\fR, \fB\-march=\fR\fIcpu-type\fR allows \s-1GCC\s0
  27519. to generate code that may not run at all on processors other than the one
  27520. indicated. Specifying \fB\-march=\fR\fIcpu-type\fR implies
  27521. \&\fB\-mtune=\fR\fIcpu-type\fR.
  27522. .Sp
  27523. The choices for \fIcpu-type\fR are:
  27524. .RS 4
  27525. .IP "\fBnative\fR" 4
  27526. .IX Item "native"
  27527. This selects the \s-1CPU\s0 to generate code for at compilation time by determining
  27528. the processor type of the compiling machine. Using \fB\-march=native\fR
  27529. enables all instruction subsets supported by the local machine (hence
  27530. the result might not run on different machines). Using \fB\-mtune=native\fR
  27531. produces code optimized for the local machine under the constraints
  27532. of the selected instruction set.
  27533. .IP "\fBx86\-64\fR" 4
  27534. .IX Item "x86-64"
  27535. A generic \s-1CPU\s0 with 64\-bit extensions.
  27536. .IP "\fBi386\fR" 4
  27537. .IX Item "i386"
  27538. Original Intel i386 \s-1CPU.\s0
  27539. .IP "\fBi486\fR" 4
  27540. .IX Item "i486"
  27541. Intel i486 \s-1CPU. \s0(No scheduling is implemented for this chip.)
  27542. .IP "\fBi586\fR" 4
  27543. .IX Item "i586"
  27544. .PD 0
  27545. .IP "\fBpentium\fR" 4
  27546. .IX Item "pentium"
  27547. .PD
  27548. Intel Pentium \s-1CPU\s0 with no \s-1MMX\s0 support.
  27549. .IP "\fBlakemont\fR" 4
  27550. .IX Item "lakemont"
  27551. Intel Lakemont \s-1MCU,\s0 based on Intel Pentium \s-1CPU.\s0
  27552. .IP "\fBpentium-mmx\fR" 4
  27553. .IX Item "pentium-mmx"
  27554. Intel Pentium \s-1MMX CPU,\s0 based on Pentium core with \s-1MMX\s0 instruction set support.
  27555. .IP "\fBpentiumpro\fR" 4
  27556. .IX Item "pentiumpro"
  27557. Intel Pentium Pro \s-1CPU.\s0
  27558. .IP "\fBi686\fR" 4
  27559. .IX Item "i686"
  27560. When used with \fB\-march\fR, the Pentium Pro
  27561. instruction set is used, so the code runs on all i686 family chips.
  27562. When used with \fB\-mtune\fR, it has the same meaning as \fBgeneric\fR.
  27563. .IP "\fBpentium2\fR" 4
  27564. .IX Item "pentium2"
  27565. Intel Pentium \s-1II CPU,\s0 based on Pentium Pro core with \s-1MMX\s0 instruction set
  27566. support.
  27567. .IP "\fBpentium3\fR" 4
  27568. .IX Item "pentium3"
  27569. .PD 0
  27570. .IP "\fBpentium3m\fR" 4
  27571. .IX Item "pentium3m"
  27572. .PD
  27573. Intel Pentium \s-1III CPU,\s0 based on Pentium Pro core with \s-1MMX\s0 and \s-1SSE\s0 instruction
  27574. set support.
  27575. .IP "\fBpentium-m\fR" 4
  27576. .IX Item "pentium-m"
  27577. Intel Pentium M; low-power version of Intel Pentium \s-1III CPU\s0
  27578. with \s-1MMX, SSE\s0 and \s-1SSE2\s0 instruction set support. Used by Centrino notebooks.
  27579. .IP "\fBpentium4\fR" 4
  27580. .IX Item "pentium4"
  27581. .PD 0
  27582. .IP "\fBpentium4m\fR" 4
  27583. .IX Item "pentium4m"
  27584. .PD
  27585. Intel Pentium 4 \s-1CPU\s0 with \s-1MMX, SSE\s0 and \s-1SSE2\s0 instruction set support.
  27586. .IP "\fBprescott\fR" 4
  27587. .IX Item "prescott"
  27588. Improved version of Intel Pentium 4 \s-1CPU\s0 with \s-1MMX, SSE, SSE2\s0 and \s-1SSE3\s0 instruction
  27589. set support.
  27590. .IP "\fBnocona\fR" 4
  27591. .IX Item "nocona"
  27592. Improved version of Intel Pentium 4 \s-1CPU\s0 with 64\-bit extensions, \s-1MMX, SSE,
  27593. SSE2\s0 and \s-1SSE3\s0 instruction set support.
  27594. .IP "\fBcore2\fR" 4
  27595. .IX Item "core2"
  27596. Intel Core 2 \s-1CPU\s0 with 64\-bit extensions, \s-1MMX, SSE, SSE2, SSE3\s0 and \s-1SSSE3\s0
  27597. instruction set support.
  27598. .IP "\fBnehalem\fR" 4
  27599. .IX Item "nehalem"
  27600. Intel Nehalem \s-1CPU\s0 with 64\-bit extensions, \s-1MMX, SSE, SSE2, SSE3, SSSE3,
  27601. SSE4.1, SSE4.2\s0 and \s-1POPCNT\s0 instruction set support.
  27602. .IP "\fBwestmere\fR" 4
  27603. .IX Item "westmere"
  27604. Intel Westmere \s-1CPU\s0 with 64\-bit extensions, \s-1MMX, SSE, SSE2, SSE3, SSSE3,
  27605. SSE4.1, SSE4.2, POPCNT, AES\s0 and \s-1PCLMUL\s0 instruction set support.
  27606. .IP "\fBsandybridge\fR" 4
  27607. .IX Item "sandybridge"
  27608. Intel Sandy Bridge \s-1CPU\s0 with 64\-bit extensions, \s-1MMX, SSE, SSE2, SSE3, SSSE3,
  27609. SSE4.1, SSE4.2, POPCNT, AVX, AES\s0 and \s-1PCLMUL\s0 instruction set support.
  27610. .IP "\fBivybridge\fR" 4
  27611. .IX Item "ivybridge"
  27612. Intel Ivy Bridge \s-1CPU\s0 with 64\-bit extensions, \s-1MMX, SSE, SSE2, SSE3, SSSE3,
  27613. SSE4.1, SSE4.2, POPCNT, AVX, AES, PCLMUL, FSGSBASE, RDRND\s0 and F16C
  27614. instruction set support.
  27615. .IP "\fBhaswell\fR" 4
  27616. .IX Item "haswell"
  27617. Intel Haswell \s-1CPU\s0 with 64\-bit extensions, \s-1MOVBE, MMX, SSE, SSE2, SSE3, SSSE3,
  27618. SSE4.1, SSE4.2, POPCNT, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA,
  27619. BMI, BMI2\s0 and F16C instruction set support.
  27620. .IP "\fBbroadwell\fR" 4
  27621. .IX Item "broadwell"
  27622. Intel Broadwell \s-1CPU\s0 with 64\-bit extensions, \s-1MOVBE, MMX, SSE, SSE2, SSE3, SSSE3,
  27623. SSE4.1, SSE4.2, POPCNT, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA,
  27624. BMI, BMI2, F16C, RDSEED, ADCX\s0 and \s-1PREFETCHW\s0 instruction set support.
  27625. .IP "\fBskylake\fR" 4
  27626. .IX Item "skylake"
  27627. Intel Skylake \s-1CPU\s0 with 64\-bit extensions, \s-1MOVBE, MMX, SSE, SSE2, SSE3, SSSE3,
  27628. SSE4.1, SSE4.2, POPCNT, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA,
  27629. BMI, BMI2, F16C, RDSEED, ADCX, PREFETCHW, CLFLUSHOPT, XSAVEC\s0 and
  27630. \&\s-1XSAVES\s0 instruction set support.
  27631. .IP "\fBbonnell\fR" 4
  27632. .IX Item "bonnell"
  27633. Intel Bonnell \s-1CPU\s0 with 64\-bit extensions, \s-1MOVBE, MMX, SSE, SSE2, SSE3\s0 and \s-1SSSE3\s0
  27634. instruction set support.
  27635. .IP "\fBsilvermont\fR" 4
  27636. .IX Item "silvermont"
  27637. Intel Silvermont \s-1CPU\s0 with 64\-bit extensions, \s-1MOVBE, MMX, SSE, SSE2, SSE3, SSSE3,
  27638. SSE4.1, SSE4.2, POPCNT, AES, PCLMUL\s0 and \s-1RDRND\s0 instruction set support.
  27639. .IP "\fBgoldmont\fR" 4
  27640. .IX Item "goldmont"
  27641. Intel Goldmont \s-1CPU\s0 with 64\-bit extensions, \s-1MOVBE, MMX, SSE, SSE2, SSE3, SSSE3,
  27642. SSE4.1, SSE4.2, POPCNT, AES, PCLMUL, RDRND, XSAVE, XSAVEOPT\s0 and \s-1FSGSBASE\s0
  27643. instruction set support.
  27644. .IP "\fBgoldmont-plus\fR" 4
  27645. .IX Item "goldmont-plus"
  27646. Intel Goldmont Plus \s-1CPU\s0 with 64\-bit extensions, \s-1MOVBE, MMX, SSE, SSE2, SSE3,
  27647. SSSE3, SSE4.1, SSE4.2, POPCNT, AES, PCLMUL, RDRND, XSAVE, XSAVEOPT, FSGSBASE,
  27648. PTWRITE, RDPID, SGX\s0 and \s-1UMIP\s0 instruction set support.
  27649. .IP "\fBtremont\fR" 4
  27650. .IX Item "tremont"
  27651. Intel Tremont \s-1CPU\s0 with 64\-bit extensions, \s-1MOVBE, MMX, SSE, SSE2, SSE3, SSSE3,
  27652. SSE4.1, SSE4.2, POPCNT, AES, PCLMUL, RDRND, XSAVE, XSAVEOPT, FSGSBASE, PTWRITE,
  27653. RDPID, SGX, UMIP,\s0 GFNI-SSE, \s-1CLWB\s0 and \s-1ENCLV\s0 instruction set support.
  27654. .IP "\fBknl\fR" 4
  27655. .IX Item "knl"
  27656. Intel Knight's Landing \s-1CPU\s0 with 64\-bit extensions, \s-1MOVBE, MMX, SSE, SSE2, SSE3,
  27657. SSSE3, SSE4.1, SSE4.2, POPCNT, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA,
  27658. BMI, BMI2, F16C, RDSEED, ADCX, PREFETCHW, AVX512F, AVX512PF, AVX512ER\s0 and
  27659. \&\s-1AVX512CD\s0 instruction set support.
  27660. .IP "\fBknm\fR" 4
  27661. .IX Item "knm"
  27662. Intel Knights Mill \s-1CPU\s0 with 64\-bit extensions, \s-1MOVBE, MMX, SSE, SSE2, SSE3,
  27663. SSSE3, SSE4.1, SSE4.2, POPCNT, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA,
  27664. BMI, BMI2, F16C, RDSEED, ADCX, PREFETCHW, AVX512F, AVX512PF, AVX512ER, AVX512CD,
  27665. AVX5124VNNIW, AVX5124FMAPS\s0 and \s-1AVX512VPOPCNTDQ\s0 instruction set support.
  27666. .IP "\fBskylake\-avx512\fR" 4
  27667. .IX Item "skylake-avx512"
  27668. Intel Skylake Server \s-1CPU\s0 with 64\-bit extensions, \s-1MOVBE, MMX, SSE, SSE2, SSE3,
  27669. SSSE3, SSE4.1, SSE4.2, POPCNT, PKU, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA,
  27670. BMI, BMI2, F16C, RDSEED, ADCX, PREFETCHW, CLFLUSHOPT, XSAVEC, XSAVES, AVX512F,
  27671. CLWB, AVX512VL, AVX512BW, AVX512DQ\s0 and \s-1AVX512CD\s0 instruction set support.
  27672. .IP "\fBcannonlake\fR" 4
  27673. .IX Item "cannonlake"
  27674. Intel Cannonlake Server \s-1CPU\s0 with 64\-bit extensions, \s-1MOVBE, MMX, SSE, SSE2,
  27675. SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, PKU, AVX, AVX2, AES, PCLMUL, FSGSBASE,
  27676. RDRND, FMA, BMI, BMI2, F16C, RDSEED, ADCX, PREFETCHW, CLFLUSHOPT, XSAVEC,
  27677. XSAVES, AVX512F, AVX512VL, AVX512BW, AVX512DQ, AVX512CD, AVX512VBMI,
  27678. AVX512IFMA, SHA\s0 and \s-1UMIP\s0 instruction set support.
  27679. .IP "\fBicelake-client\fR" 4
  27680. .IX Item "icelake-client"
  27681. Intel Icelake Client \s-1CPU\s0 with 64\-bit extensions, \s-1MOVBE, MMX, SSE, SSE2,
  27682. SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, PKU, AVX, AVX2, AES, PCLMUL, FSGSBASE,
  27683. RDRND, FMA, BMI, BMI2, F16C, RDSEED, ADCX, PREFETCHW, CLFLUSHOPT, XSAVEC,
  27684. XSAVES, AVX512F, AVX512VL, AVX512BW, AVX512DQ, AVX512CD, AVX512VBMI,
  27685. AVX512IFMA, SHA, CLWB, UMIP, RDPID, GFNI, AVX512VBMI2, AVX512VPOPCNTDQ,
  27686. AVX512BITALG, AVX512VNNI, VPCLMULQDQ, VAES\s0 instruction set support.
  27687. .IP "\fBicelake-server\fR" 4
  27688. .IX Item "icelake-server"
  27689. Intel Icelake Server \s-1CPU\s0 with 64\-bit extensions, \s-1MOVBE, MMX, SSE, SSE2,
  27690. SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, PKU, AVX, AVX2, AES, PCLMUL, FSGSBASE,
  27691. RDRND, FMA, BMI, BMI2, F16C, RDSEED, ADCX, PREFETCHW, CLFLUSHOPT, XSAVEC,
  27692. XSAVES, AVX512F, AVX512VL, AVX512BW, AVX512DQ, AVX512CD, AVX512VBMI,
  27693. AVX512IFMA, SHA, CLWB, UMIP, RDPID, GFNI, AVX512VBMI2, AVX512VPOPCNTDQ,
  27694. AVX512BITALG, AVX512VNNI, VPCLMULQDQ, VAES, PCONFIG\s0 and \s-1WBNOINVD\s0 instruction
  27695. set support.
  27696. .IP "\fBcascadelake\fR" 4
  27697. .IX Item "cascadelake"
  27698. Intel Cascadelake \s-1CPU\s0 with 64\-bit extensions, \s-1MOVBE, MMX, SSE, SSE2, SSE3, SSSE3,
  27699. SSE4.1, SSE4.2, POPCNT, PKU, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA, BMI,
  27700. BMI2, F16C, RDSEED, ADCX, PREFETCHW, CLFLUSHOPT, XSAVEC, XSAVES, AVX512F, CLWB,
  27701. AVX512VL, AVX512BW, AVX512DQ, AVX512CD\s0 and \s-1AVX512VNNI\s0 instruction set support.
  27702. .IP "\fBcooperlake\fR" 4
  27703. .IX Item "cooperlake"
  27704. Intel cooperlake \s-1CPU\s0 with 64\-bit extensions, \s-1MOVBE, MMX, SSE, SSE2, SSE3, SSSE3,
  27705. SSE4.1, SSE4.2, POPCNT, PKU, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA, BMI,
  27706. BMI2, F16C, RDSEED, ADCX, PREFETCHW, CLFLUSHOPT, XSAVEC, XSAVES, AVX512F, CLWB,
  27707. AVX512VL, AVX512BW, AVX512DQ, AVX512CD, AVX512VNNI\s0 and \s-1AVX512BF16\s0 instruction
  27708. set support.
  27709. .IP "\fBtigerlake\fR" 4
  27710. .IX Item "tigerlake"
  27711. Intel Tigerlake \s-1CPU\s0 with 64\-bit extensions, \s-1MOVBE, MMX, SSE, SSE2, SSE3, SSSE3,
  27712. SSE4.1, SSE4.2, POPCNT, PKU, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA, BMI,
  27713. BMI2, F16C, RDSEED, ADCX, PREFETCHW, CLFLUSHOPT, XSAVEC, XSAVES, AVX512F,
  27714. AVX512VL, AVX512BW, AVX512DQ, AVX512CD, AVX512VBMI, AVX512IFMA, SHA, CLWB, UMIP,
  27715. RDPID, GFNI, AVX512VBMI2, AVX512VPOPCNTDQ, AVX512BITALG, AVX512VNNI, VPCLMULQDQ,
  27716. VAES, PCONFIG, WBNOINVD, MOVDIRI, MOVDIR64B\s0 and \s-1AVX512VP2INTERSECT\s0 instruction
  27717. set support.
  27718. .IP "\fBk6\fR" 4
  27719. .IX Item "k6"
  27720. \&\s-1AMD K6 CPU\s0 with \s-1MMX\s0 instruction set support.
  27721. .IP "\fBk6\-2\fR" 4
  27722. .IX Item "k6-2"
  27723. .PD 0
  27724. .IP "\fBk6\-3\fR" 4
  27725. .IX Item "k6-3"
  27726. .PD
  27727. Improved versions of \s-1AMD K6 CPU\s0 with \s-1MMX\s0 and 3DNow! instruction set support.
  27728. .IP "\fBathlon\fR" 4
  27729. .IX Item "athlon"
  27730. .PD 0
  27731. .IP "\fBathlon-tbird\fR" 4
  27732. .IX Item "athlon-tbird"
  27733. .PD
  27734. \&\s-1AMD\s0 Athlon \s-1CPU\s0 with \s-1MMX,\s0 3dNOW!, enhanced 3DNow! and \s-1SSE\s0 prefetch instructions
  27735. support.
  27736. .IP "\fBathlon\-4\fR" 4
  27737. .IX Item "athlon-4"
  27738. .PD 0
  27739. .IP "\fBathlon-xp\fR" 4
  27740. .IX Item "athlon-xp"
  27741. .IP "\fBathlon-mp\fR" 4
  27742. .IX Item "athlon-mp"
  27743. .PD
  27744. Improved \s-1AMD\s0 Athlon \s-1CPU\s0 with \s-1MMX,\s0 3DNow!, enhanced 3DNow! and full \s-1SSE\s0
  27745. instruction set support.
  27746. .IP "\fBk8\fR" 4
  27747. .IX Item "k8"
  27748. .PD 0
  27749. .IP "\fBopteron\fR" 4
  27750. .IX Item "opteron"
  27751. .IP "\fBathlon64\fR" 4
  27752. .IX Item "athlon64"
  27753. .IP "\fBathlon-fx\fR" 4
  27754. .IX Item "athlon-fx"
  27755. .PD
  27756. Processors based on the \s-1AMD K8\s0 core with x86\-64 instruction set support,
  27757. including the \s-1AMD\s0 Opteron, Athlon 64, and Athlon 64 \s-1FX\s0 processors.
  27758. (This supersets \s-1MMX, SSE, SSE2,\s0 3DNow!, enhanced 3DNow! and 64\-bit
  27759. instruction set extensions.)
  27760. .IP "\fBk8\-sse3\fR" 4
  27761. .IX Item "k8-sse3"
  27762. .PD 0
  27763. .IP "\fBopteron\-sse3\fR" 4
  27764. .IX Item "opteron-sse3"
  27765. .IP "\fBathlon64\-sse3\fR" 4
  27766. .IX Item "athlon64-sse3"
  27767. .PD
  27768. Improved versions of \s-1AMD K8\s0 cores with \s-1SSE3\s0 instruction set support.
  27769. .IP "\fBamdfam10\fR" 4
  27770. .IX Item "amdfam10"
  27771. .PD 0
  27772. .IP "\fBbarcelona\fR" 4
  27773. .IX Item "barcelona"
  27774. .PD
  27775. CPUs based on \s-1AMD\s0 Family 10h cores with x86\-64 instruction set support. (This
  27776. supersets \s-1MMX, SSE, SSE2, SSE3, SSE4A,\s0 3DNow!, enhanced 3DNow!, \s-1ABM\s0 and 64\-bit
  27777. instruction set extensions.)
  27778. .IP "\fBbdver1\fR" 4
  27779. .IX Item "bdver1"
  27780. CPUs based on \s-1AMD\s0 Family 15h cores with x86\-64 instruction set support. (This
  27781. supersets \s-1FMA4, AVX, XOP, LWP, AES, PCLMUL, CX16, MMX, SSE, SSE2, SSE3, SSE4A,
  27782. SSSE3, SSE4.1, SSE4.2, ABM\s0 and 64\-bit instruction set extensions.)
  27783. .IP "\fBbdver2\fR" 4
  27784. .IX Item "bdver2"
  27785. \&\s-1AMD\s0 Family 15h core based CPUs with x86\-64 instruction set support. (This
  27786. supersets \s-1BMI, TBM, F16C, FMA, FMA4, AVX, XOP, LWP, AES, PCLMUL, CX16, MMX,
  27787. SSE, SSE2, SSE3, SSE4A, SSSE3, SSE4.1, SSE4.2, ABM\s0 and 64\-bit instruction set
  27788. extensions.)
  27789. .IP "\fBbdver3\fR" 4
  27790. .IX Item "bdver3"
  27791. \&\s-1AMD\s0 Family 15h core based CPUs with x86\-64 instruction set support. (This
  27792. supersets \s-1BMI, TBM, F16C, FMA, FMA4, FSGSBASE, AVX, XOP, LWP, AES,
  27793. PCLMUL, CX16, MMX, SSE, SSE2, SSE3, SSE4A, SSSE3, SSE4.1, SSE4.2, ABM\s0 and
  27794. 64\-bit instruction set extensions.)
  27795. .IP "\fBbdver4\fR" 4
  27796. .IX Item "bdver4"
  27797. \&\s-1AMD\s0 Family 15h core based CPUs with x86\-64 instruction set support. (This
  27798. supersets \s-1BMI, BMI2, TBM, F16C, FMA, FMA4, FSGSBASE, AVX, AVX2, XOP, LWP,
  27799. AES, PCLMUL, CX16, MOVBE, MMX, SSE, SSE2, SSE3, SSE4A, SSSE3, SSE4.1,
  27800. SSE4.2, ABM\s0 and 64\-bit instruction set extensions.)
  27801. .IP "\fBznver1\fR" 4
  27802. .IX Item "znver1"
  27803. \&\s-1AMD\s0 Family 17h core based CPUs with x86\-64 instruction set support. (This
  27804. supersets \s-1BMI, BMI2, F16C, FMA, FSGSBASE, AVX, AVX2, ADCX, RDSEED, MWAITX,
  27805. SHA, CLZERO, AES, PCLMUL, CX16, MOVBE, MMX, SSE, SSE2, SSE3, SSE4A, SSSE3,
  27806. SSE4.1, SSE4.2, ABM, XSAVEC, XSAVES, CLFLUSHOPT, POPCNT,\s0 and 64\-bit
  27807. instruction set extensions.)
  27808. .IP "\fBznver2\fR" 4
  27809. .IX Item "znver2"
  27810. \&\s-1AMD\s0 Family 17h core based CPUs with x86\-64 instruction set support. (This
  27811. supersets \s-1BMI, BMI2, CLWB, F16C, FMA, FSGSBASE, AVX, AVX2, ADCX, RDSEED,
  27812. MWAITX, SHA, CLZERO, AES, PCLMUL, CX16, MOVBE, MMX, SSE, SSE2, SSE3, SSE4A,
  27813. SSSE3, SSE4.1, SSE4.2, ABM, XSAVEC, XSAVES, CLFLUSHOPT, POPCNT, RDPID,
  27814. WBNOINVD,\s0 and 64\-bit instruction set extensions.)
  27815. .IP "\fBbtver1\fR" 4
  27816. .IX Item "btver1"
  27817. CPUs based on \s-1AMD\s0 Family 14h cores with x86\-64 instruction set support. (This
  27818. supersets \s-1MMX, SSE, SSE2, SSE3, SSSE3, SSE4A, CX16, ABM\s0 and 64\-bit
  27819. instruction set extensions.)
  27820. .IP "\fBbtver2\fR" 4
  27821. .IX Item "btver2"
  27822. CPUs based on \s-1AMD\s0 Family 16h cores with x86\-64 instruction set support. This
  27823. includes \s-1MOVBE, F16C, BMI, AVX, PCLMUL, AES, SSE4.2, SSE4.1, CX16, ABM,
  27824. SSE4A, SSSE3, SSE3, SSE2, SSE, MMX\s0 and 64\-bit instruction set extensions.
  27825. .IP "\fBwinchip\-c6\fR" 4
  27826. .IX Item "winchip-c6"
  27827. \&\s-1IDT\s0 WinChip C6 \s-1CPU,\s0 dealt in same way as i486 with additional \s-1MMX\s0 instruction
  27828. set support.
  27829. .IP "\fBwinchip2\fR" 4
  27830. .IX Item "winchip2"
  27831. \&\s-1IDT\s0 WinChip 2 \s-1CPU,\s0 dealt in same way as i486 with additional \s-1MMX\s0 and 3DNow!
  27832. instruction set support.
  27833. .IP "\fBc3\fR" 4
  27834. .IX Item "c3"
  27835. \&\s-1VIA C3 CPU\s0 with \s-1MMX\s0 and 3DNow! instruction set support.
  27836. (No scheduling is implemented for this chip.)
  27837. .IP "\fBc3\-2\fR" 4
  27838. .IX Item "c3-2"
  27839. \&\s-1VIA C3\-2 \s0(Nehemiah/C5XL) \s-1CPU\s0 with \s-1MMX\s0 and \s-1SSE\s0 instruction set support.
  27840. (No scheduling is implemented for this chip.)
  27841. .IP "\fBc7\fR" 4
  27842. .IX Item "c7"
  27843. \&\s-1VIA C7 \s0(Esther) \s-1CPU\s0 with \s-1MMX, SSE, SSE2\s0 and \s-1SSE3\s0 instruction set support.
  27844. (No scheduling is implemented for this chip.)
  27845. .IP "\fBsamuel\-2\fR" 4
  27846. .IX Item "samuel-2"
  27847. \&\s-1VIA\s0 Eden Samuel 2 \s-1CPU\s0 with \s-1MMX\s0 and 3DNow! instruction set support.
  27848. (No scheduling is implemented for this chip.)
  27849. .IP "\fBnehemiah\fR" 4
  27850. .IX Item "nehemiah"
  27851. \&\s-1VIA\s0 Eden Nehemiah \s-1CPU\s0 with \s-1MMX\s0 and \s-1SSE\s0 instruction set support.
  27852. (No scheduling is implemented for this chip.)
  27853. .IP "\fBesther\fR" 4
  27854. .IX Item "esther"
  27855. \&\s-1VIA\s0 Eden Esther \s-1CPU\s0 with \s-1MMX, SSE, SSE2\s0 and \s-1SSE3\s0 instruction set support.
  27856. (No scheduling is implemented for this chip.)
  27857. .IP "\fBeden\-x2\fR" 4
  27858. .IX Item "eden-x2"
  27859. \&\s-1VIA\s0 Eden X2 \s-1CPU\s0 with x86\-64, \s-1MMX, SSE, SSE2\s0 and \s-1SSE3\s0 instruction set support.
  27860. (No scheduling is implemented for this chip.)
  27861. .IP "\fBeden\-x4\fR" 4
  27862. .IX Item "eden-x4"
  27863. \&\s-1VIA\s0 Eden X4 \s-1CPU\s0 with x86\-64, \s-1MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2,
  27864. AVX\s0 and \s-1AVX2\s0 instruction set support.
  27865. (No scheduling is implemented for this chip.)
  27866. .IP "\fBnano\fR" 4
  27867. .IX Item "nano"
  27868. Generic \s-1VIA\s0 Nano \s-1CPU\s0 with x86\-64, \s-1MMX, SSE, SSE2, SSE3\s0 and \s-1SSSE3\s0
  27869. instruction set support.
  27870. (No scheduling is implemented for this chip.)
  27871. .IP "\fBnano\-1000\fR" 4
  27872. .IX Item "nano-1000"
  27873. \&\s-1VIA\s0 Nano 1xxx \s-1CPU\s0 with x86\-64, \s-1MMX, SSE, SSE2, SSE3\s0 and \s-1SSSE3\s0
  27874. instruction set support.
  27875. (No scheduling is implemented for this chip.)
  27876. .IP "\fBnano\-2000\fR" 4
  27877. .IX Item "nano-2000"
  27878. \&\s-1VIA\s0 Nano 2xxx \s-1CPU\s0 with x86\-64, \s-1MMX, SSE, SSE2, SSE3\s0 and \s-1SSSE3\s0
  27879. instruction set support.
  27880. (No scheduling is implemented for this chip.)
  27881. .IP "\fBnano\-3000\fR" 4
  27882. .IX Item "nano-3000"
  27883. \&\s-1VIA\s0 Nano 3xxx \s-1CPU\s0 with x86\-64, \s-1MMX, SSE, SSE2, SSE3, SSSE3\s0 and \s-1SSE4.1\s0
  27884. instruction set support.
  27885. (No scheduling is implemented for this chip.)
  27886. .IP "\fBnano\-x2\fR" 4
  27887. .IX Item "nano-x2"
  27888. \&\s-1VIA\s0 Nano Dual Core \s-1CPU\s0 with x86\-64, \s-1MMX, SSE, SSE2, SSE3, SSSE3\s0 and \s-1SSE4.1\s0
  27889. instruction set support.
  27890. (No scheduling is implemented for this chip.)
  27891. .IP "\fBnano\-x4\fR" 4
  27892. .IX Item "nano-x4"
  27893. \&\s-1VIA\s0 Nano Quad Core \s-1CPU\s0 with x86\-64, \s-1MMX, SSE, SSE2, SSE3, SSSE3\s0 and \s-1SSE4.1\s0
  27894. instruction set support.
  27895. (No scheduling is implemented for this chip.)
  27896. .IP "\fBgeode\fR" 4
  27897. .IX Item "geode"
  27898. \&\s-1AMD\s0 Geode embedded processor with \s-1MMX\s0 and 3DNow! instruction set support.
  27899. .RE
  27900. .RS 4
  27901. .RE
  27902. .IP "\fB\-mtune=\fR\fIcpu-type\fR" 4
  27903. .IX Item "-mtune=cpu-type"
  27904. Tune to \fIcpu-type\fR everything applicable about the generated code, except
  27905. for the \s-1ABI\s0 and the set of available instructions.
  27906. While picking a specific \fIcpu-type\fR schedules things appropriately
  27907. for that particular chip, the compiler does not generate any code that
  27908. cannot run on the default machine type unless you use a
  27909. \&\fB\-march=\fR\fIcpu-type\fR option.
  27910. For example, if \s-1GCC\s0 is configured for i686\-pc\-linux\-gnu
  27911. then \fB\-mtune=pentium4\fR generates code that is tuned for Pentium 4
  27912. but still runs on i686 machines.
  27913. .Sp
  27914. The choices for \fIcpu-type\fR are the same as for \fB\-march\fR.
  27915. In addition, \fB\-mtune\fR supports 2 extra choices for \fIcpu-type\fR:
  27916. .RS 4
  27917. .IP "\fBgeneric\fR" 4
  27918. .IX Item "generic"
  27919. Produce code optimized for the most common \s-1IA32/AMD64/EM64T\s0 processors.
  27920. If you know the \s-1CPU\s0 on which your code will run, then you should use
  27921. the corresponding \fB\-mtune\fR or \fB\-march\fR option instead of
  27922. \&\fB\-mtune=generic\fR. But, if you do not know exactly what \s-1CPU\s0 users
  27923. of your application will have, then you should use this option.
  27924. .Sp
  27925. As new processors are deployed in the marketplace, the behavior of this
  27926. option will change. Therefore, if you upgrade to a newer version of
  27927. \&\s-1GCC,\s0 code generation controlled by this option will change to reflect
  27928. the processors
  27929. that are most common at the time that version of \s-1GCC\s0 is released.
  27930. .Sp
  27931. There is no \fB\-march=generic\fR option because \fB\-march\fR
  27932. indicates the instruction set the compiler can use, and there is no
  27933. generic instruction set applicable to all processors. In contrast,
  27934. \&\fB\-mtune\fR indicates the processor (or, in this case, collection of
  27935. processors) for which the code is optimized.
  27936. .IP "\fBintel\fR" 4
  27937. .IX Item "intel"
  27938. Produce code optimized for the most current Intel processors, which are
  27939. Haswell and Silvermont for this version of \s-1GCC. \s0 If you know the \s-1CPU\s0
  27940. on which your code will run, then you should use the corresponding
  27941. \&\fB\-mtune\fR or \fB\-march\fR option instead of \fB\-mtune=intel\fR.
  27942. But, if you want your application performs better on both Haswell and
  27943. Silvermont, then you should use this option.
  27944. .Sp
  27945. As new Intel processors are deployed in the marketplace, the behavior of
  27946. this option will change. Therefore, if you upgrade to a newer version of
  27947. \&\s-1GCC,\s0 code generation controlled by this option will change to reflect
  27948. the most current Intel processors at the time that version of \s-1GCC\s0 is
  27949. released.
  27950. .Sp
  27951. There is no \fB\-march=intel\fR option because \fB\-march\fR indicates
  27952. the instruction set the compiler can use, and there is no common
  27953. instruction set applicable to all processors. In contrast,
  27954. \&\fB\-mtune\fR indicates the processor (or, in this case, collection of
  27955. processors) for which the code is optimized.
  27956. .RE
  27957. .RS 4
  27958. .RE
  27959. .IP "\fB\-mcpu=\fR\fIcpu-type\fR" 4
  27960. .IX Item "-mcpu=cpu-type"
  27961. A deprecated synonym for \fB\-mtune\fR.
  27962. .IP "\fB\-mfpmath=\fR\fIunit\fR" 4
  27963. .IX Item "-mfpmath=unit"
  27964. Generate floating-point arithmetic for selected unit \fIunit\fR. The choices
  27965. for \fIunit\fR are:
  27966. .RS 4
  27967. .IP "\fB387\fR" 4
  27968. .IX Item "387"
  27969. Use the standard 387 floating-point coprocessor present on the majority of chips and
  27970. emulated otherwise. Code compiled with this option runs almost everywhere.
  27971. The temporary results are computed in 80\-bit precision instead of the precision
  27972. specified by the type, resulting in slightly different results compared to most
  27973. of other chips. See \fB\-ffloat\-store\fR for more detailed description.
  27974. .Sp
  27975. This is the default choice for non-Darwin x86\-32 targets.
  27976. .IP "\fBsse\fR" 4
  27977. .IX Item "sse"
  27978. Use scalar floating-point instructions present in the \s-1SSE\s0 instruction set.
  27979. This instruction set is supported by Pentium \s-1III\s0 and newer chips,
  27980. and in the \s-1AMD\s0 line
  27981. by Athlon\-4, Athlon \s-1XP\s0 and Athlon \s-1MP\s0 chips. The earlier version of the \s-1SSE\s0
  27982. instruction set supports only single-precision arithmetic, thus the double and
  27983. extended-precision arithmetic are still done using 387. A later version, present
  27984. only in Pentium 4 and \s-1AMD\s0 x86\-64 chips, supports double-precision
  27985. arithmetic too.
  27986. .Sp
  27987. For the x86\-32 compiler, you must use \fB\-march=\fR\fIcpu-type\fR, \fB\-msse\fR
  27988. or \fB\-msse2\fR switches to enable \s-1SSE\s0 extensions and make this option
  27989. effective. For the x86\-64 compiler, these extensions are enabled by default.
  27990. .Sp
  27991. The resulting code should be considerably faster in the majority of cases and avoid
  27992. the numerical instability problems of 387 code, but may break some existing
  27993. code that expects temporaries to be 80 bits.
  27994. .Sp
  27995. This is the default choice for the x86\-64 compiler, Darwin x86\-32 targets,
  27996. and the default choice for x86\-32 targets with the \s-1SSE2\s0 instruction set
  27997. when \fB\-ffast\-math\fR is enabled.
  27998. .IP "\fBsse,387\fR" 4
  27999. .IX Item "sse,387"
  28000. .PD 0
  28001. .IP "\fBsse+387\fR" 4
  28002. .IX Item "sse+387"
  28003. .IP "\fBboth\fR" 4
  28004. .IX Item "both"
  28005. .PD
  28006. Attempt to utilize both instruction sets at once. This effectively doubles the
  28007. amount of available registers, and on chips with separate execution units for
  28008. 387 and \s-1SSE\s0 the execution resources too. Use this option with care, as it is
  28009. still experimental, because the \s-1GCC\s0 register allocator does not model separate
  28010. functional units well, resulting in unstable performance.
  28011. .RE
  28012. .RS 4
  28013. .RE
  28014. .IP "\fB\-masm=\fR\fIdialect\fR" 4
  28015. .IX Item "-masm=dialect"
  28016. Output assembly instructions using selected \fIdialect\fR. Also affects
  28017. which dialect is used for basic \f(CW\*(C`asm\*(C'\fR and
  28018. extended \f(CW\*(C`asm\*(C'\fR. Supported choices (in dialect
  28019. order) are \fBatt\fR or \fBintel\fR. The default is \fBatt\fR. Darwin does
  28020. not support \fBintel\fR.
  28021. .IP "\fB\-mieee\-fp\fR" 4
  28022. .IX Item "-mieee-fp"
  28023. .PD 0
  28024. .IP "\fB\-mno\-ieee\-fp\fR" 4
  28025. .IX Item "-mno-ieee-fp"
  28026. .PD
  28027. Control whether or not the compiler uses \s-1IEEE\s0 floating-point
  28028. comparisons. These correctly handle the case where the result of a
  28029. comparison is unordered.
  28030. .IP "\fB\-m80387\fR" 4
  28031. .IX Item "-m80387"
  28032. .PD 0
  28033. .IP "\fB\-mhard\-float\fR" 4
  28034. .IX Item "-mhard-float"
  28035. .PD
  28036. Generate output containing 80387 instructions for floating point.
  28037. .IP "\fB\-mno\-80387\fR" 4
  28038. .IX Item "-mno-80387"
  28039. .PD 0
  28040. .IP "\fB\-msoft\-float\fR" 4
  28041. .IX Item "-msoft-float"
  28042. .PD
  28043. Generate output containing library calls for floating point.
  28044. .Sp
  28045. \&\fBWarning:\fR the requisite libraries are not part of \s-1GCC.\s0
  28046. Normally the facilities of the machine's usual C compiler are used, but
  28047. this cannot be done directly in cross-compilation. You must make your
  28048. own arrangements to provide suitable library functions for
  28049. cross-compilation.
  28050. .Sp
  28051. On machines where a function returns floating-point results in the 80387
  28052. register stack, some floating-point opcodes may be emitted even if
  28053. \&\fB\-msoft\-float\fR is used.
  28054. .IP "\fB\-mno\-fp\-ret\-in\-387\fR" 4
  28055. .IX Item "-mno-fp-ret-in-387"
  28056. Do not use the \s-1FPU\s0 registers for return values of functions.
  28057. .Sp
  28058. The usual calling convention has functions return values of types
  28059. \&\f(CW\*(C`float\*(C'\fR and \f(CW\*(C`double\*(C'\fR in an \s-1FPU\s0 register, even if there
  28060. is no \s-1FPU. \s0 The idea is that the operating system should emulate
  28061. an \s-1FPU.\s0
  28062. .Sp
  28063. The option \fB\-mno\-fp\-ret\-in\-387\fR causes such values to be returned
  28064. in ordinary \s-1CPU\s0 registers instead.
  28065. .IP "\fB\-mno\-fancy\-math\-387\fR" 4
  28066. .IX Item "-mno-fancy-math-387"
  28067. Some 387 emulators do not support the \f(CW\*(C`sin\*(C'\fR, \f(CW\*(C`cos\*(C'\fR and
  28068. \&\f(CW\*(C`sqrt\*(C'\fR instructions for the 387. Specify this option to avoid
  28069. generating those instructions.
  28070. This option is overridden when \fB\-march\fR
  28071. indicates that the target \s-1CPU\s0 always has an \s-1FPU\s0 and so the
  28072. instruction does not need emulation. These
  28073. instructions are not generated unless you also use the
  28074. \&\fB\-funsafe\-math\-optimizations\fR switch.
  28075. .IP "\fB\-malign\-double\fR" 4
  28076. .IX Item "-malign-double"
  28077. .PD 0
  28078. .IP "\fB\-mno\-align\-double\fR" 4
  28079. .IX Item "-mno-align-double"
  28080. .PD
  28081. Control whether \s-1GCC\s0 aligns \f(CW\*(C`double\*(C'\fR, \f(CW\*(C`long double\*(C'\fR, and
  28082. \&\f(CW\*(C`long long\*(C'\fR variables on a two-word boundary or a one-word
  28083. boundary. Aligning \f(CW\*(C`double\*(C'\fR variables on a two-word boundary
  28084. produces code that runs somewhat faster on a Pentium at the
  28085. expense of more memory.
  28086. .Sp
  28087. On x86\-64, \fB\-malign\-double\fR is enabled by default.
  28088. .Sp
  28089. \&\fBWarning:\fR if you use the \fB\-malign\-double\fR switch,
  28090. structures containing the above types are aligned differently than
  28091. the published application binary interface specifications for the x86\-32
  28092. and are not binary compatible with structures in code compiled
  28093. without that switch.
  28094. .IP "\fB\-m96bit\-long\-double\fR" 4
  28095. .IX Item "-m96bit-long-double"
  28096. .PD 0
  28097. .IP "\fB\-m128bit\-long\-double\fR" 4
  28098. .IX Item "-m128bit-long-double"
  28099. .PD
  28100. These switches control the size of \f(CW\*(C`long double\*(C'\fR type. The x86\-32
  28101. application binary interface specifies the size to be 96 bits,
  28102. so \fB\-m96bit\-long\-double\fR is the default in 32\-bit mode.
  28103. .Sp
  28104. Modern architectures (Pentium and newer) prefer \f(CW\*(C`long double\*(C'\fR
  28105. to be aligned to an 8\- or 16\-byte boundary. In arrays or structures
  28106. conforming to the \s-1ABI,\s0 this is not possible. So specifying
  28107. \&\fB\-m128bit\-long\-double\fR aligns \f(CW\*(C`long double\*(C'\fR
  28108. to a 16\-byte boundary by padding the \f(CW\*(C`long double\*(C'\fR with an additional
  28109. 32\-bit zero.
  28110. .Sp
  28111. In the x86\-64 compiler, \fB\-m128bit\-long\-double\fR is the default choice as
  28112. its \s-1ABI\s0 specifies that \f(CW\*(C`long double\*(C'\fR is aligned on 16\-byte boundary.
  28113. .Sp
  28114. Notice that neither of these options enable any extra precision over the x87
  28115. standard of 80 bits for a \f(CW\*(C`long double\*(C'\fR.
  28116. .Sp
  28117. \&\fBWarning:\fR if you override the default value for your target \s-1ABI,\s0 this
  28118. changes the size of
  28119. structures and arrays containing \f(CW\*(C`long double\*(C'\fR variables,
  28120. as well as modifying the function calling convention for functions taking
  28121. \&\f(CW\*(C`long double\*(C'\fR. Hence they are not binary-compatible
  28122. with code compiled without that switch.
  28123. .IP "\fB\-mlong\-double\-64\fR" 4
  28124. .IX Item "-mlong-double-64"
  28125. .PD 0
  28126. .IP "\fB\-mlong\-double\-80\fR" 4
  28127. .IX Item "-mlong-double-80"
  28128. .IP "\fB\-mlong\-double\-128\fR" 4
  28129. .IX Item "-mlong-double-128"
  28130. .PD
  28131. These switches control the size of \f(CW\*(C`long double\*(C'\fR type. A size
  28132. of 64 bits makes the \f(CW\*(C`long double\*(C'\fR type equivalent to the \f(CW\*(C`double\*(C'\fR
  28133. type. This is the default for 32\-bit Bionic C library. A size
  28134. of 128 bits makes the \f(CW\*(C`long double\*(C'\fR type equivalent to the
  28135. \&\f(CW\*(C`_\|_float128\*(C'\fR type. This is the default for 64\-bit Bionic C library.
  28136. .Sp
  28137. \&\fBWarning:\fR if you override the default value for your target \s-1ABI,\s0 this
  28138. changes the size of
  28139. structures and arrays containing \f(CW\*(C`long double\*(C'\fR variables,
  28140. as well as modifying the function calling convention for functions taking
  28141. \&\f(CW\*(C`long double\*(C'\fR. Hence they are not binary-compatible
  28142. with code compiled without that switch.
  28143. .IP "\fB\-malign\-data=\fR\fItype\fR" 4
  28144. .IX Item "-malign-data=type"
  28145. Control how \s-1GCC\s0 aligns variables. Supported values for \fItype\fR are
  28146. \&\fBcompat\fR uses increased alignment value compatible uses \s-1GCC 4.8\s0
  28147. and earlier, \fBabi\fR uses alignment value as specified by the
  28148. psABI, and \fBcacheline\fR uses increased alignment value to match
  28149. the cache line size. \fBcompat\fR is the default.
  28150. .IP "\fB\-mlarge\-data\-threshold=\fR\fIthreshold\fR" 4
  28151. .IX Item "-mlarge-data-threshold=threshold"
  28152. When \fB\-mcmodel=medium\fR is specified, data objects larger than
  28153. \&\fIthreshold\fR are placed in the large data section. This value must be the
  28154. same across all objects linked into the binary, and defaults to 65535.
  28155. .IP "\fB\-mrtd\fR" 4
  28156. .IX Item "-mrtd"
  28157. Use a different function-calling convention, in which functions that
  28158. take a fixed number of arguments return with the \f(CW\*(C`ret \f(CInum\f(CW\*(C'\fR
  28159. instruction, which pops their arguments while returning. This saves one
  28160. instruction in the caller since there is no need to pop the arguments
  28161. there.
  28162. .Sp
  28163. You can specify that an individual function is called with this calling
  28164. sequence with the function attribute \f(CW\*(C`stdcall\*(C'\fR. You can also
  28165. override the \fB\-mrtd\fR option by using the function attribute
  28166. \&\f(CW\*(C`cdecl\*(C'\fR.
  28167. .Sp
  28168. \&\fBWarning:\fR this calling convention is incompatible with the one
  28169. normally used on Unix, so you cannot use it if you need to call
  28170. libraries compiled with the Unix compiler.
  28171. .Sp
  28172. Also, you must provide function prototypes for all functions that
  28173. take variable numbers of arguments (including \f(CW\*(C`printf\*(C'\fR);
  28174. otherwise incorrect code is generated for calls to those
  28175. functions.
  28176. .Sp
  28177. In addition, seriously incorrect code results if you call a
  28178. function with too many arguments. (Normally, extra arguments are
  28179. harmlessly ignored.)
  28180. .IP "\fB\-mregparm=\fR\fInum\fR" 4
  28181. .IX Item "-mregparm=num"
  28182. Control how many registers are used to pass integer arguments. By
  28183. default, no registers are used to pass arguments, and at most 3
  28184. registers can be used. You can control this behavior for a specific
  28185. function by using the function attribute \f(CW\*(C`regparm\*(C'\fR.
  28186. .Sp
  28187. \&\fBWarning:\fR if you use this switch, and
  28188. \&\fInum\fR is nonzero, then you must build all modules with the same
  28189. value, including any libraries. This includes the system libraries and
  28190. startup modules.
  28191. .IP "\fB\-msseregparm\fR" 4
  28192. .IX Item "-msseregparm"
  28193. Use \s-1SSE\s0 register passing conventions for float and double arguments
  28194. and return values. You can control this behavior for a specific
  28195. function by using the function attribute \f(CW\*(C`sseregparm\*(C'\fR.
  28196. .Sp
  28197. \&\fBWarning:\fR if you use this switch then you must build all
  28198. modules with the same value, including any libraries. This includes
  28199. the system libraries and startup modules.
  28200. .IP "\fB\-mvect8\-ret\-in\-mem\fR" 4
  28201. .IX Item "-mvect8-ret-in-mem"
  28202. Return 8\-byte vectors in memory instead of \s-1MMX\s0 registers. This is the
  28203. default on VxWorks to match the \s-1ABI\s0 of the Sun Studio compilers until
  28204. version 12. \fIOnly\fR use this option if you need to remain
  28205. compatible with existing code produced by those previous compiler
  28206. versions or older versions of \s-1GCC.\s0
  28207. .IP "\fB\-mpc32\fR" 4
  28208. .IX Item "-mpc32"
  28209. .PD 0
  28210. .IP "\fB\-mpc64\fR" 4
  28211. .IX Item "-mpc64"
  28212. .IP "\fB\-mpc80\fR" 4
  28213. .IX Item "-mpc80"
  28214. .PD
  28215. Set 80387 floating-point precision to 32, 64 or 80 bits. When \fB\-mpc32\fR
  28216. is specified, the significands of results of floating-point operations are
  28217. rounded to 24 bits (single precision); \fB\-mpc64\fR rounds the
  28218. significands of results of floating-point operations to 53 bits (double
  28219. precision) and \fB\-mpc80\fR rounds the significands of results of
  28220. floating-point operations to 64 bits (extended double precision), which is
  28221. the default. When this option is used, floating-point operations in higher
  28222. precisions are not available to the programmer without setting the \s-1FPU\s0
  28223. control word explicitly.
  28224. .Sp
  28225. Setting the rounding of floating-point operations to less than the default
  28226. 80 bits can speed some programs by 2% or more. Note that some mathematical
  28227. libraries assume that extended-precision (80\-bit) floating-point operations
  28228. are enabled by default; routines in such libraries could suffer significant
  28229. loss of accuracy, typically through so-called \*(L"catastrophic cancellation\*(R",
  28230. when this option is used to set the precision to less than extended precision.
  28231. .IP "\fB\-mstackrealign\fR" 4
  28232. .IX Item "-mstackrealign"
  28233. Realign the stack at entry. On the x86, the \fB\-mstackrealign\fR
  28234. option generates an alternate prologue and epilogue that realigns the
  28235. run-time stack if necessary. This supports mixing legacy codes that keep
  28236. 4\-byte stack alignment with modern codes that keep 16\-byte stack alignment for
  28237. \&\s-1SSE\s0 compatibility. See also the attribute \f(CW\*(C`force_align_arg_pointer\*(C'\fR,
  28238. applicable to individual functions.
  28239. .IP "\fB\-mpreferred\-stack\-boundary=\fR\fInum\fR" 4
  28240. .IX Item "-mpreferred-stack-boundary=num"
  28241. Attempt to keep the stack boundary aligned to a 2 raised to \fInum\fR
  28242. byte boundary. If \fB\-mpreferred\-stack\-boundary\fR is not specified,
  28243. the default is 4 (16 bytes or 128 bits).
  28244. .Sp
  28245. \&\fBWarning:\fR When generating code for the x86\-64 architecture with
  28246. \&\s-1SSE\s0 extensions disabled, \fB\-mpreferred\-stack\-boundary=3\fR can be
  28247. used to keep the stack boundary aligned to 8 byte boundary. Since
  28248. x86\-64 \s-1ABI\s0 require 16 byte stack alignment, this is \s-1ABI\s0 incompatible and
  28249. intended to be used in controlled environment where stack space is
  28250. important limitation. This option leads to wrong code when functions
  28251. compiled with 16 byte stack alignment (such as functions from a standard
  28252. library) are called with misaligned stack. In this case, \s-1SSE\s0
  28253. instructions may lead to misaligned memory access traps. In addition,
  28254. variable arguments are handled incorrectly for 16 byte aligned
  28255. objects (including x87 long double and _\|_int128), leading to wrong
  28256. results. You must build all modules with
  28257. \&\fB\-mpreferred\-stack\-boundary=3\fR, including any libraries. This
  28258. includes the system libraries and startup modules.
  28259. .IP "\fB\-mincoming\-stack\-boundary=\fR\fInum\fR" 4
  28260. .IX Item "-mincoming-stack-boundary=num"
  28261. Assume the incoming stack is aligned to a 2 raised to \fInum\fR byte
  28262. boundary. If \fB\-mincoming\-stack\-boundary\fR is not specified,
  28263. the one specified by \fB\-mpreferred\-stack\-boundary\fR is used.
  28264. .Sp
  28265. On Pentium and Pentium Pro, \f(CW\*(C`double\*(C'\fR and \f(CW\*(C`long double\*(C'\fR values
  28266. should be aligned to an 8\-byte boundary (see \fB\-malign\-double\fR) or
  28267. suffer significant run time performance penalties. On Pentium \s-1III,\s0 the
  28268. Streaming \s-1SIMD\s0 Extension (\s-1SSE\s0) data type \f(CW\*(C`_\|_m128\*(C'\fR may not work
  28269. properly if it is not 16\-byte aligned.
  28270. .Sp
  28271. To ensure proper alignment of this values on the stack, the stack boundary
  28272. must be as aligned as that required by any value stored on the stack.
  28273. Further, every function must be generated such that it keeps the stack
  28274. aligned. Thus calling a function compiled with a higher preferred
  28275. stack boundary from a function compiled with a lower preferred stack
  28276. boundary most likely misaligns the stack. It is recommended that
  28277. libraries that use callbacks always use the default setting.
  28278. .Sp
  28279. This extra alignment does consume extra stack space, and generally
  28280. increases code size. Code that is sensitive to stack space usage, such
  28281. as embedded systems and operating system kernels, may want to reduce the
  28282. preferred alignment to \fB\-mpreferred\-stack\-boundary=2\fR.
  28283. .IP "\fB\-mmmx\fR" 4
  28284. .IX Item "-mmmx"
  28285. .PD 0
  28286. .IP "\fB\-msse\fR" 4
  28287. .IX Item "-msse"
  28288. .IP "\fB\-msse2\fR" 4
  28289. .IX Item "-msse2"
  28290. .IP "\fB\-msse3\fR" 4
  28291. .IX Item "-msse3"
  28292. .IP "\fB\-mssse3\fR" 4
  28293. .IX Item "-mssse3"
  28294. .IP "\fB\-msse4\fR" 4
  28295. .IX Item "-msse4"
  28296. .IP "\fB\-msse4a\fR" 4
  28297. .IX Item "-msse4a"
  28298. .IP "\fB\-msse4.1\fR" 4
  28299. .IX Item "-msse4.1"
  28300. .IP "\fB\-msse4.2\fR" 4
  28301. .IX Item "-msse4.2"
  28302. .IP "\fB\-mavx\fR" 4
  28303. .IX Item "-mavx"
  28304. .IP "\fB\-mavx2\fR" 4
  28305. .IX Item "-mavx2"
  28306. .IP "\fB\-mavx512f\fR" 4
  28307. .IX Item "-mavx512f"
  28308. .IP "\fB\-mavx512pf\fR" 4
  28309. .IX Item "-mavx512pf"
  28310. .IP "\fB\-mavx512er\fR" 4
  28311. .IX Item "-mavx512er"
  28312. .IP "\fB\-mavx512cd\fR" 4
  28313. .IX Item "-mavx512cd"
  28314. .IP "\fB\-mavx512vl\fR" 4
  28315. .IX Item "-mavx512vl"
  28316. .IP "\fB\-mavx512bw\fR" 4
  28317. .IX Item "-mavx512bw"
  28318. .IP "\fB\-mavx512dq\fR" 4
  28319. .IX Item "-mavx512dq"
  28320. .IP "\fB\-mavx512ifma\fR" 4
  28321. .IX Item "-mavx512ifma"
  28322. .IP "\fB\-mavx512vbmi\fR" 4
  28323. .IX Item "-mavx512vbmi"
  28324. .IP "\fB\-msha\fR" 4
  28325. .IX Item "-msha"
  28326. .IP "\fB\-maes\fR" 4
  28327. .IX Item "-maes"
  28328. .IP "\fB\-mpclmul\fR" 4
  28329. .IX Item "-mpclmul"
  28330. .IP "\fB\-mclflushopt\fR" 4
  28331. .IX Item "-mclflushopt"
  28332. .IP "\fB\-mclwb\fR" 4
  28333. .IX Item "-mclwb"
  28334. .IP "\fB\-mfsgsbase\fR" 4
  28335. .IX Item "-mfsgsbase"
  28336. .IP "\fB\-mptwrite\fR" 4
  28337. .IX Item "-mptwrite"
  28338. .IP "\fB\-mrdrnd\fR" 4
  28339. .IX Item "-mrdrnd"
  28340. .IP "\fB\-mf16c\fR" 4
  28341. .IX Item "-mf16c"
  28342. .IP "\fB\-mfma\fR" 4
  28343. .IX Item "-mfma"
  28344. .IP "\fB\-mpconfig\fR" 4
  28345. .IX Item "-mpconfig"
  28346. .IP "\fB\-mwbnoinvd\fR" 4
  28347. .IX Item "-mwbnoinvd"
  28348. .IP "\fB\-mfma4\fR" 4
  28349. .IX Item "-mfma4"
  28350. .IP "\fB\-mprfchw\fR" 4
  28351. .IX Item "-mprfchw"
  28352. .IP "\fB\-mrdpid\fR" 4
  28353. .IX Item "-mrdpid"
  28354. .IP "\fB\-mprefetchwt1\fR" 4
  28355. .IX Item "-mprefetchwt1"
  28356. .IP "\fB\-mrdseed\fR" 4
  28357. .IX Item "-mrdseed"
  28358. .IP "\fB\-msgx\fR" 4
  28359. .IX Item "-msgx"
  28360. .IP "\fB\-mxop\fR" 4
  28361. .IX Item "-mxop"
  28362. .IP "\fB\-mlwp\fR" 4
  28363. .IX Item "-mlwp"
  28364. .IP "\fB\-m3dnow\fR" 4
  28365. .IX Item "-m3dnow"
  28366. .IP "\fB\-m3dnowa\fR" 4
  28367. .IX Item "-m3dnowa"
  28368. .IP "\fB\-mpopcnt\fR" 4
  28369. .IX Item "-mpopcnt"
  28370. .IP "\fB\-mabm\fR" 4
  28371. .IX Item "-mabm"
  28372. .IP "\fB\-madx\fR" 4
  28373. .IX Item "-madx"
  28374. .IP "\fB\-mbmi\fR" 4
  28375. .IX Item "-mbmi"
  28376. .IP "\fB\-mbmi2\fR" 4
  28377. .IX Item "-mbmi2"
  28378. .IP "\fB\-mlzcnt\fR" 4
  28379. .IX Item "-mlzcnt"
  28380. .IP "\fB\-mfxsr\fR" 4
  28381. .IX Item "-mfxsr"
  28382. .IP "\fB\-mxsave\fR" 4
  28383. .IX Item "-mxsave"
  28384. .IP "\fB\-mxsaveopt\fR" 4
  28385. .IX Item "-mxsaveopt"
  28386. .IP "\fB\-mxsavec\fR" 4
  28387. .IX Item "-mxsavec"
  28388. .IP "\fB\-mxsaves\fR" 4
  28389. .IX Item "-mxsaves"
  28390. .IP "\fB\-mrtm\fR" 4
  28391. .IX Item "-mrtm"
  28392. .IP "\fB\-mhle\fR" 4
  28393. .IX Item "-mhle"
  28394. .IP "\fB\-mtbm\fR" 4
  28395. .IX Item "-mtbm"
  28396. .IP "\fB\-mmwaitx\fR" 4
  28397. .IX Item "-mmwaitx"
  28398. .IP "\fB\-mclzero\fR" 4
  28399. .IX Item "-mclzero"
  28400. .IP "\fB\-mpku\fR" 4
  28401. .IX Item "-mpku"
  28402. .IP "\fB\-mavx512vbmi2\fR" 4
  28403. .IX Item "-mavx512vbmi2"
  28404. .IP "\fB\-mavx512bf16\fR" 4
  28405. .IX Item "-mavx512bf16"
  28406. .IP "\fB\-mgfni\fR" 4
  28407. .IX Item "-mgfni"
  28408. .IP "\fB\-mvaes\fR" 4
  28409. .IX Item "-mvaes"
  28410. .IP "\fB\-mwaitpkg\fR" 4
  28411. .IX Item "-mwaitpkg"
  28412. .IP "\fB\-mvpclmulqdq\fR" 4
  28413. .IX Item "-mvpclmulqdq"
  28414. .IP "\fB\-mavx512bitalg\fR" 4
  28415. .IX Item "-mavx512bitalg"
  28416. .IP "\fB\-mmovdiri\fR" 4
  28417. .IX Item "-mmovdiri"
  28418. .IP "\fB\-mmovdir64b\fR" 4
  28419. .IX Item "-mmovdir64b"
  28420. .IP "\fB\-menqcmd\fR" 4
  28421. .IX Item "-menqcmd"
  28422. .IP "\fB\-mavx512vpopcntdq\fR" 4
  28423. .IX Item "-mavx512vpopcntdq"
  28424. .IP "\fB\-mavx512vp2intersect\fR" 4
  28425. .IX Item "-mavx512vp2intersect"
  28426. .IP "\fB\-mavx5124fmaps\fR" 4
  28427. .IX Item "-mavx5124fmaps"
  28428. .IP "\fB\-mavx512vnni\fR" 4
  28429. .IX Item "-mavx512vnni"
  28430. .IP "\fB\-mavx5124vnniw\fR" 4
  28431. .IX Item "-mavx5124vnniw"
  28432. .IP "\fB\-mcldemote\fR" 4
  28433. .IX Item "-mcldemote"
  28434. .PD
  28435. These switches enable the use of instructions in the \s-1MMX, SSE,
  28436. SSE2, SSE3, SSSE3, SSE4, SSE4A, SSE4.1, SSE4.2, AVX, AVX2, AVX512F, AVX512PF,
  28437. AVX512ER, AVX512CD, AVX512VL, AVX512BW, AVX512DQ, AVX512IFMA, AVX512VBMI, SHA,
  28438. AES, PCLMUL, CLFLUSHOPT, CLWB, FSGSBASE, PTWRITE, RDRND, F16C, FMA, PCONFIG,
  28439. WBNOINVD, FMA4, PREFETCHW, RDPID, PREFETCHWT1, RDSEED, SGX, XOP, LWP,\s0
  28440. 3DNow!, enhanced 3DNow!, \s-1POPCNT, ABM, ADX, BMI, BMI2, LZCNT, FXSR, XSAVE,
  28441. XSAVEOPT, XSAVEC, XSAVES, RTM, HLE, TBM, MWAITX, CLZERO, PKU, AVX512VBMI2,
  28442. GFNI, VAES, WAITPKG, VPCLMULQDQ, AVX512BITALG, MOVDIRI, MOVDIR64B, AVX512BF16,
  28443. ENQCMD, AVX512VPOPCNTDQ, AVX5124FMAPS, AVX512VNNI, AVX5124VNNIW,\s0 or \s-1CLDEMOTE\s0
  28444. extended instruction sets. Each has a corresponding \fB\-mno\-\fR option to
  28445. disable use of these instructions.
  28446. .Sp
  28447. These extensions are also available as built-in functions: see
  28448. \&\fBx86 Built-in Functions\fR, for details of the functions enabled and
  28449. disabled by these switches.
  28450. .Sp
  28451. To generate \s-1SSE/SSE2\s0 instructions automatically from floating-point
  28452. code (as opposed to 387 instructions), see \fB\-mfpmath=sse\fR.
  28453. .Sp
  28454. \&\s-1GCC\s0 depresses SSEx instructions when \fB\-mavx\fR is used. Instead, it
  28455. generates new \s-1AVX\s0 instructions or \s-1AVX\s0 equivalence for all SSEx instructions
  28456. when needed.
  28457. .Sp
  28458. These options enable \s-1GCC\s0 to use these extended instructions in
  28459. generated code, even without \fB\-mfpmath=sse\fR. Applications that
  28460. perform run-time \s-1CPU\s0 detection must compile separate files for each
  28461. supported architecture, using the appropriate flags. In particular,
  28462. the file containing the \s-1CPU\s0 detection code should be compiled without
  28463. these options.
  28464. .IP "\fB\-mdump\-tune\-features\fR" 4
  28465. .IX Item "-mdump-tune-features"
  28466. This option instructs \s-1GCC\s0 to dump the names of the x86 performance
  28467. tuning features and default settings. The names can be used in
  28468. \&\fB\-mtune\-ctrl=\fR\fIfeature-list\fR.
  28469. .IP "\fB\-mtune\-ctrl=\fR\fIfeature-list\fR" 4
  28470. .IX Item "-mtune-ctrl=feature-list"
  28471. This option is used to do fine grain control of x86 code generation features.
  28472. \&\fIfeature-list\fR is a comma separated list of \fIfeature\fR names. See also
  28473. \&\fB\-mdump\-tune\-features\fR. When specified, the \fIfeature\fR is turned
  28474. on if it is not preceded with \fB^\fR, otherwise, it is turned off.
  28475. \&\fB\-mtune\-ctrl=\fR\fIfeature-list\fR is intended to be used by \s-1GCC\s0
  28476. developers. Using it may lead to code paths not covered by testing and can
  28477. potentially result in compiler ICEs or runtime errors.
  28478. .IP "\fB\-mno\-default\fR" 4
  28479. .IX Item "-mno-default"
  28480. This option instructs \s-1GCC\s0 to turn off all tunable features. See also
  28481. \&\fB\-mtune\-ctrl=\fR\fIfeature-list\fR and \fB\-mdump\-tune\-features\fR.
  28482. .IP "\fB\-mcld\fR" 4
  28483. .IX Item "-mcld"
  28484. This option instructs \s-1GCC\s0 to emit a \f(CW\*(C`cld\*(C'\fR instruction in the prologue
  28485. of functions that use string instructions. String instructions depend on
  28486. the \s-1DF\s0 flag to select between autoincrement or autodecrement mode. While the
  28487. \&\s-1ABI\s0 specifies the \s-1DF\s0 flag to be cleared on function entry, some operating
  28488. systems violate this specification by not clearing the \s-1DF\s0 flag in their
  28489. exception dispatchers. The exception handler can be invoked with the \s-1DF\s0 flag
  28490. set, which leads to wrong direction mode when string instructions are used.
  28491. This option can be enabled by default on 32\-bit x86 targets by configuring
  28492. \&\s-1GCC\s0 with the \fB\-\-enable\-cld\fR configure option. Generation of \f(CW\*(C`cld\*(C'\fR
  28493. instructions can be suppressed with the \fB\-mno\-cld\fR compiler option
  28494. in this case.
  28495. .IP "\fB\-mvzeroupper\fR" 4
  28496. .IX Item "-mvzeroupper"
  28497. This option instructs \s-1GCC\s0 to emit a \f(CW\*(C`vzeroupper\*(C'\fR instruction
  28498. before a transfer of control flow out of the function to minimize
  28499. the \s-1AVX\s0 to \s-1SSE\s0 transition penalty as well as remove unnecessary \f(CW\*(C`zeroupper\*(C'\fR
  28500. intrinsics.
  28501. .IP "\fB\-mprefer\-avx128\fR" 4
  28502. .IX Item "-mprefer-avx128"
  28503. This option instructs \s-1GCC\s0 to use 128\-bit \s-1AVX\s0 instructions instead of
  28504. 256\-bit \s-1AVX\s0 instructions in the auto-vectorizer.
  28505. .IP "\fB\-mprefer\-vector\-width=\fR\fIopt\fR" 4
  28506. .IX Item "-mprefer-vector-width=opt"
  28507. This option instructs \s-1GCC\s0 to use \fIopt\fR\-bit vector width in instructions
  28508. instead of default on the selected platform.
  28509. .RS 4
  28510. .IP "\fBnone\fR" 4
  28511. .IX Item "none"
  28512. No extra limitations applied to \s-1GCC\s0 other than defined by the selected platform.
  28513. .IP "\fB128\fR" 4
  28514. .IX Item "128"
  28515. Prefer 128\-bit vector width for instructions.
  28516. .IP "\fB256\fR" 4
  28517. .IX Item "256"
  28518. Prefer 256\-bit vector width for instructions.
  28519. .IP "\fB512\fR" 4
  28520. .IX Item "512"
  28521. Prefer 512\-bit vector width for instructions.
  28522. .RE
  28523. .RS 4
  28524. .RE
  28525. .IP "\fB\-mcx16\fR" 4
  28526. .IX Item "-mcx16"
  28527. This option enables \s-1GCC\s0 to generate \f(CW\*(C`CMPXCHG16B\*(C'\fR instructions in 64\-bit
  28528. code to implement compare-and-exchange operations on 16\-byte aligned 128\-bit
  28529. objects. This is useful for atomic updates of data structures exceeding one
  28530. machine word in size. The compiler uses this instruction to implement
  28531. \&\fB_\|_sync Builtins\fR. However, for \fB_\|_atomic Builtins\fR operating on
  28532. 128\-bit integers, a library call is always used.
  28533. .IP "\fB\-msahf\fR" 4
  28534. .IX Item "-msahf"
  28535. This option enables generation of \f(CW\*(C`SAHF\*(C'\fR instructions in 64\-bit code.
  28536. Early Intel Pentium 4 CPUs with Intel 64 support,
  28537. prior to the introduction of Pentium 4 G1 step in December 2005,
  28538. lacked the \f(CW\*(C`LAHF\*(C'\fR and \f(CW\*(C`SAHF\*(C'\fR instructions
  28539. which are supported by \s-1AMD64.\s0
  28540. These are load and store instructions, respectively, for certain status flags.
  28541. In 64\-bit mode, the \f(CW\*(C`SAHF\*(C'\fR instruction is used to optimize \f(CW\*(C`fmod\*(C'\fR,
  28542. \&\f(CW\*(C`drem\*(C'\fR, and \f(CW\*(C`remainder\*(C'\fR built-in functions;
  28543. see \fBOther Builtins\fR for details.
  28544. .IP "\fB\-mmovbe\fR" 4
  28545. .IX Item "-mmovbe"
  28546. This option enables use of the \f(CW\*(C`movbe\*(C'\fR instruction to implement
  28547. \&\f(CW\*(C`_\|_builtin_bswap32\*(C'\fR and \f(CW\*(C`_\|_builtin_bswap64\*(C'\fR.
  28548. .IP "\fB\-mshstk\fR" 4
  28549. .IX Item "-mshstk"
  28550. The \fB\-mshstk\fR option enables shadow stack built-in functions
  28551. from x86 Control-flow Enforcement Technology (\s-1CET\s0).
  28552. .IP "\fB\-mcrc32\fR" 4
  28553. .IX Item "-mcrc32"
  28554. This option enables built-in functions \f(CW\*(C`_\|_builtin_ia32_crc32qi\*(C'\fR,
  28555. \&\f(CW\*(C`_\|_builtin_ia32_crc32hi\*(C'\fR, \f(CW\*(C`_\|_builtin_ia32_crc32si\*(C'\fR and
  28556. \&\f(CW\*(C`_\|_builtin_ia32_crc32di\*(C'\fR to generate the \f(CW\*(C`crc32\*(C'\fR machine instruction.
  28557. .IP "\fB\-mrecip\fR" 4
  28558. .IX Item "-mrecip"
  28559. This option enables use of \f(CW\*(C`RCPSS\*(C'\fR and \f(CW\*(C`RSQRTSS\*(C'\fR instructions
  28560. (and their vectorized variants \f(CW\*(C`RCPPS\*(C'\fR and \f(CW\*(C`RSQRTPS\*(C'\fR)
  28561. with an additional Newton-Raphson step
  28562. to increase precision instead of \f(CW\*(C`DIVSS\*(C'\fR and \f(CW\*(C`SQRTSS\*(C'\fR
  28563. (and their vectorized
  28564. variants) for single-precision floating-point arguments. These instructions
  28565. are generated only when \fB\-funsafe\-math\-optimizations\fR is enabled
  28566. together with \fB\-ffinite\-math\-only\fR and \fB\-fno\-trapping\-math\fR.
  28567. Note that while the throughput of the sequence is higher than the throughput
  28568. of the non-reciprocal instruction, the precision of the sequence can be
  28569. decreased by up to 2 ulp (i.e. the inverse of 1.0 equals 0.99999994).
  28570. .Sp
  28571. Note that \s-1GCC\s0 implements \f(CW\*(C`1.0f/sqrtf(\f(CIx\f(CW)\*(C'\fR in terms of \f(CW\*(C`RSQRTSS\*(C'\fR
  28572. (or \f(CW\*(C`RSQRTPS\*(C'\fR) already with \fB\-ffast\-math\fR (or the above option
  28573. combination), and doesn't need \fB\-mrecip\fR.
  28574. .Sp
  28575. Also note that \s-1GCC\s0 emits the above sequence with additional Newton-Raphson step
  28576. for vectorized single-float division and vectorized \f(CW\*(C`sqrtf(\f(CIx\f(CW)\*(C'\fR
  28577. already with \fB\-ffast\-math\fR (or the above option combination), and
  28578. doesn't need \fB\-mrecip\fR.
  28579. .IP "\fB\-mrecip=\fR\fIopt\fR" 4
  28580. .IX Item "-mrecip=opt"
  28581. This option controls which reciprocal estimate instructions
  28582. may be used. \fIopt\fR is a comma-separated list of options, which may
  28583. be preceded by a \fB!\fR to invert the option:
  28584. .RS 4
  28585. .IP "\fBall\fR" 4
  28586. .IX Item "all"
  28587. Enable all estimate instructions.
  28588. .IP "\fBdefault\fR" 4
  28589. .IX Item "default"
  28590. Enable the default instructions, equivalent to \fB\-mrecip\fR.
  28591. .IP "\fBnone\fR" 4
  28592. .IX Item "none"
  28593. Disable all estimate instructions, equivalent to \fB\-mno\-recip\fR.
  28594. .IP "\fBdiv\fR" 4
  28595. .IX Item "div"
  28596. Enable the approximation for scalar division.
  28597. .IP "\fBvec-div\fR" 4
  28598. .IX Item "vec-div"
  28599. Enable the approximation for vectorized division.
  28600. .IP "\fBsqrt\fR" 4
  28601. .IX Item "sqrt"
  28602. Enable the approximation for scalar square root.
  28603. .IP "\fBvec-sqrt\fR" 4
  28604. .IX Item "vec-sqrt"
  28605. Enable the approximation for vectorized square root.
  28606. .RE
  28607. .RS 4
  28608. .Sp
  28609. So, for example, \fB\-mrecip=all,!sqrt\fR enables
  28610. all of the reciprocal approximations, except for square root.
  28611. .RE
  28612. .IP "\fB\-mveclibabi=\fR\fItype\fR" 4
  28613. .IX Item "-mveclibabi=type"
  28614. Specifies the \s-1ABI\s0 type to use for vectorizing intrinsics using an
  28615. external library. Supported values for \fItype\fR are \fBsvml\fR
  28616. for the Intel short
  28617. vector math library and \fBacml\fR for the \s-1AMD\s0 math core library.
  28618. To use this option, both \fB\-ftree\-vectorize\fR and
  28619. \&\fB\-funsafe\-math\-optimizations\fR have to be enabled, and an \s-1SVML\s0 or \s-1ACML \s0
  28620. ABI-compatible library must be specified at link time.
  28621. .Sp
  28622. \&\s-1GCC\s0 currently emits calls to \f(CW\*(C`vmldExp2\*(C'\fR,
  28623. \&\f(CW\*(C`vmldLn2\*(C'\fR, \f(CW\*(C`vmldLog102\*(C'\fR, \f(CW\*(C`vmldPow2\*(C'\fR,
  28624. \&\f(CW\*(C`vmldTanh2\*(C'\fR, \f(CW\*(C`vmldTan2\*(C'\fR, \f(CW\*(C`vmldAtan2\*(C'\fR, \f(CW\*(C`vmldAtanh2\*(C'\fR,
  28625. \&\f(CW\*(C`vmldCbrt2\*(C'\fR, \f(CW\*(C`vmldSinh2\*(C'\fR, \f(CW\*(C`vmldSin2\*(C'\fR, \f(CW\*(C`vmldAsinh2\*(C'\fR,
  28626. \&\f(CW\*(C`vmldAsin2\*(C'\fR, \f(CW\*(C`vmldCosh2\*(C'\fR, \f(CW\*(C`vmldCos2\*(C'\fR, \f(CW\*(C`vmldAcosh2\*(C'\fR,
  28627. \&\f(CW\*(C`vmldAcos2\*(C'\fR, \f(CW\*(C`vmlsExp4\*(C'\fR, \f(CW\*(C`vmlsLn4\*(C'\fR,
  28628. \&\f(CW\*(C`vmlsLog104\*(C'\fR, \f(CW\*(C`vmlsPow4\*(C'\fR, \f(CW\*(C`vmlsTanh4\*(C'\fR, \f(CW\*(C`vmlsTan4\*(C'\fR,
  28629. \&\f(CW\*(C`vmlsAtan4\*(C'\fR, \f(CW\*(C`vmlsAtanh4\*(C'\fR, \f(CW\*(C`vmlsCbrt4\*(C'\fR, \f(CW\*(C`vmlsSinh4\*(C'\fR,
  28630. \&\f(CW\*(C`vmlsSin4\*(C'\fR, \f(CW\*(C`vmlsAsinh4\*(C'\fR, \f(CW\*(C`vmlsAsin4\*(C'\fR, \f(CW\*(C`vmlsCosh4\*(C'\fR,
  28631. \&\f(CW\*(C`vmlsCos4\*(C'\fR, \f(CW\*(C`vmlsAcosh4\*(C'\fR and \f(CW\*(C`vmlsAcos4\*(C'\fR for corresponding
  28632. function type when \fB\-mveclibabi=svml\fR is used, and \f(CW\*(C`_\|_vrd2_sin\*(C'\fR,
  28633. \&\f(CW\*(C`_\|_vrd2_cos\*(C'\fR, \f(CW\*(C`_\|_vrd2_exp\*(C'\fR, \f(CW\*(C`_\|_vrd2_log\*(C'\fR, \f(CW\*(C`_\|_vrd2_log2\*(C'\fR,
  28634. \&\f(CW\*(C`_\|_vrd2_log10\*(C'\fR, \f(CW\*(C`_\|_vrs4_sinf\*(C'\fR, \f(CW\*(C`_\|_vrs4_cosf\*(C'\fR,
  28635. \&\f(CW\*(C`_\|_vrs4_expf\*(C'\fR, \f(CW\*(C`_\|_vrs4_logf\*(C'\fR, \f(CW\*(C`_\|_vrs4_log2f\*(C'\fR,
  28636. \&\f(CW\*(C`_\|_vrs4_log10f\*(C'\fR and \f(CW\*(C`_\|_vrs4_powf\*(C'\fR for the corresponding function type
  28637. when \fB\-mveclibabi=acml\fR is used.
  28638. .IP "\fB\-mabi=\fR\fIname\fR" 4
  28639. .IX Item "-mabi=name"
  28640. Generate code for the specified calling convention. Permissible values
  28641. are \fBsysv\fR for the \s-1ABI\s0 used on GNU/Linux and other systems, and
  28642. \&\fBms\fR for the Microsoft \s-1ABI. \s0 The default is to use the Microsoft
  28643. \&\s-1ABI\s0 when targeting Microsoft Windows and the SysV \s-1ABI\s0 on all other systems.
  28644. You can control this behavior for specific functions by
  28645. using the function attributes \f(CW\*(C`ms_abi\*(C'\fR and \f(CW\*(C`sysv_abi\*(C'\fR.
  28646. .IP "\fB\-mforce\-indirect\-call\fR" 4
  28647. .IX Item "-mforce-indirect-call"
  28648. Force all calls to functions to be indirect. This is useful
  28649. when using Intel Processor Trace where it generates more precise timing
  28650. information for function calls.
  28651. .IP "\fB\-mmanual\-endbr\fR" 4
  28652. .IX Item "-mmanual-endbr"
  28653. Insert \s-1ENDBR\s0 instruction at function entry only via the \f(CW\*(C`cf_check\*(C'\fR
  28654. function attribute. This is useful when used with the option
  28655. \&\fB\-fcf\-protection=branch\fR to control \s-1ENDBR\s0 insertion at the
  28656. function entry.
  28657. .IP "\fB\-mcall\-ms2sysv\-xlogues\fR" 4
  28658. .IX Item "-mcall-ms2sysv-xlogues"
  28659. Due to differences in 64\-bit ABIs, any Microsoft \s-1ABI\s0 function that calls a
  28660. System V \s-1ABI\s0 function must consider \s-1RSI, RDI\s0 and \s-1XMM6\-15\s0 as clobbered. By
  28661. default, the code for saving and restoring these registers is emitted inline,
  28662. resulting in fairly lengthy prologues and epilogues. Using
  28663. \&\fB\-mcall\-ms2sysv\-xlogues\fR emits prologues and epilogues that
  28664. use stubs in the static portion of libgcc to perform these saves and restores,
  28665. thus reducing function size at the cost of a few extra instructions.
  28666. .IP "\fB\-mtls\-dialect=\fR\fItype\fR" 4
  28667. .IX Item "-mtls-dialect=type"
  28668. Generate code to access thread-local storage using the \fBgnu\fR or
  28669. \&\fBgnu2\fR conventions. \fBgnu\fR is the conservative default;
  28670. \&\fBgnu2\fR is more efficient, but it may add compile\- and run-time
  28671. requirements that cannot be satisfied on all systems.
  28672. .IP "\fB\-mpush\-args\fR" 4
  28673. .IX Item "-mpush-args"
  28674. .PD 0
  28675. .IP "\fB\-mno\-push\-args\fR" 4
  28676. .IX Item "-mno-push-args"
  28677. .PD
  28678. Use \s-1PUSH\s0 operations to store outgoing parameters. This method is shorter
  28679. and usually equally fast as method using \s-1SUB/MOV\s0 operations and is enabled
  28680. by default. In some cases disabling it may improve performance because of
  28681. improved scheduling and reduced dependencies.
  28682. .IP "\fB\-maccumulate\-outgoing\-args\fR" 4
  28683. .IX Item "-maccumulate-outgoing-args"
  28684. If enabled, the maximum amount of space required for outgoing arguments is
  28685. computed in the function prologue. This is faster on most modern CPUs
  28686. because of reduced dependencies, improved scheduling and reduced stack usage
  28687. when the preferred stack boundary is not equal to 2. The drawback is a notable
  28688. increase in code size. This switch implies \fB\-mno\-push\-args\fR.
  28689. .IP "\fB\-mthreads\fR" 4
  28690. .IX Item "-mthreads"
  28691. Support thread-safe exception handling on MinGW. Programs that rely
  28692. on thread-safe exception handling must compile and link all code with the
  28693. \&\fB\-mthreads\fR option. When compiling, \fB\-mthreads\fR defines
  28694. \&\fB\-D_MT\fR; when linking, it links in a special thread helper library
  28695. \&\fB\-lmingwthrd\fR which cleans up per-thread exception-handling data.
  28696. .IP "\fB\-mms\-bitfields\fR" 4
  28697. .IX Item "-mms-bitfields"
  28698. .PD 0
  28699. .IP "\fB\-mno\-ms\-bitfields\fR" 4
  28700. .IX Item "-mno-ms-bitfields"
  28701. .PD
  28702. Enable/disable bit-field layout compatible with the native Microsoft
  28703. Windows compiler.
  28704. .Sp
  28705. If \f(CW\*(C`packed\*(C'\fR is used on a structure, or if bit-fields are used,
  28706. it may be that the Microsoft \s-1ABI\s0 lays out the structure differently
  28707. than the way \s-1GCC\s0 normally does. Particularly when moving packed
  28708. data between functions compiled with \s-1GCC\s0 and the native Microsoft compiler
  28709. (either via function call or as data in a file), it may be necessary to access
  28710. either format.
  28711. .Sp
  28712. This option is enabled by default for Microsoft Windows
  28713. targets. This behavior can also be controlled locally by use of variable
  28714. or type attributes. For more information, see \fBx86 Variable Attributes\fR
  28715. and \fBx86 Type Attributes\fR.
  28716. .Sp
  28717. The Microsoft structure layout algorithm is fairly simple with the exception
  28718. of the bit-field packing.
  28719. The padding and alignment of members of structures and whether a bit-field
  28720. can straddle a storage-unit boundary are determine by these rules:
  28721. .RS 4
  28722. .IP "1. Structure members are stored sequentially in the order in which they are" 4
  28723. .IX Item "1. Structure members are stored sequentially in the order in which they are"
  28724. declared: the first member has the lowest memory address and the last member
  28725. the highest.
  28726. .IP "2. Every data object has an alignment requirement. The alignment requirement" 4
  28727. .IX Item "2. Every data object has an alignment requirement. The alignment requirement"
  28728. for all data except structures, unions, and arrays is either the size of the
  28729. object or the current packing size (specified with either the
  28730. \&\f(CW\*(C`aligned\*(C'\fR attribute or the \f(CW\*(C`pack\*(C'\fR pragma),
  28731. whichever is less. For structures, unions, and arrays,
  28732. the alignment requirement is the largest alignment requirement of its members.
  28733. Every object is allocated an offset so that:
  28734. .Sp
  28735. .Vb 1
  28736. \& offset % alignment_requirement == 0
  28737. .Ve
  28738. .IP "3. Adjacent bit-fields are packed into the same 1\-, 2\-, or 4\-byte allocation" 4
  28739. .IX Item "3. Adjacent bit-fields are packed into the same 1-, 2-, or 4-byte allocation"
  28740. unit if the integral types are the same size and if the next bit-field fits
  28741. into the current allocation unit without crossing the boundary imposed by the
  28742. common alignment requirements of the bit-fields.
  28743. .RE
  28744. .RS 4
  28745. .Sp
  28746. \&\s-1MSVC\s0 interprets zero-length bit-fields in the following ways:
  28747. .IP "1. If a zero-length bit-field is inserted between two bit-fields that" 4
  28748. .IX Item "1. If a zero-length bit-field is inserted between two bit-fields that"
  28749. are normally coalesced, the bit-fields are not coalesced.
  28750. .Sp
  28751. For example:
  28752. .Sp
  28753. .Vb 6
  28754. \& struct
  28755. \& {
  28756. \& unsigned long bf_1 : 12;
  28757. \& unsigned long : 0;
  28758. \& unsigned long bf_2 : 12;
  28759. \& } t1;
  28760. .Ve
  28761. .Sp
  28762. The size of \f(CW\*(C`t1\*(C'\fR is 8 bytes with the zero-length bit-field. If the
  28763. zero-length bit-field were removed, \f(CW\*(C`t1\*(C'\fR's size would be 4 bytes.
  28764. .ie n .IP "2. If a zero-length bit-field is inserted after a bit-field, ""foo"", and the" 4
  28765. .el .IP "2. If a zero-length bit-field is inserted after a bit-field, \f(CWfoo\fR, and the" 4
  28766. .IX Item "2. If a zero-length bit-field is inserted after a bit-field, foo, and the"
  28767. alignment of the zero-length bit-field is greater than the member that follows it,
  28768. \&\f(CW\*(C`bar\*(C'\fR, \f(CW\*(C`bar\*(C'\fR is aligned as the type of the zero-length bit-field.
  28769. .Sp
  28770. For example:
  28771. .Sp
  28772. .Vb 6
  28773. \& struct
  28774. \& {
  28775. \& char foo : 4;
  28776. \& short : 0;
  28777. \& char bar;
  28778. \& } t2;
  28779. \&
  28780. \& struct
  28781. \& {
  28782. \& char foo : 4;
  28783. \& short : 0;
  28784. \& double bar;
  28785. \& } t3;
  28786. .Ve
  28787. .Sp
  28788. For \f(CW\*(C`t2\*(C'\fR, \f(CW\*(C`bar\*(C'\fR is placed at offset 2, rather than offset 1.
  28789. Accordingly, the size of \f(CW\*(C`t2\*(C'\fR is 4. For \f(CW\*(C`t3\*(C'\fR, the zero-length
  28790. bit-field does not affect the alignment of \f(CW\*(C`bar\*(C'\fR or, as a result, the size
  28791. of the structure.
  28792. .Sp
  28793. Taking this into account, it is important to note the following:
  28794. .RS 4
  28795. .IP "1. If a zero-length bit-field follows a normal bit-field, the type of the" 4
  28796. .IX Item "1. If a zero-length bit-field follows a normal bit-field, the type of the"
  28797. zero-length bit-field may affect the alignment of the structure as whole. For
  28798. example, \f(CW\*(C`t2\*(C'\fR has a size of 4 bytes, since the zero-length bit-field follows a
  28799. normal bit-field, and is of type short.
  28800. .IP "2. Even if a zero-length bit-field is not followed by a normal bit-field, it may" 4
  28801. .IX Item "2. Even if a zero-length bit-field is not followed by a normal bit-field, it may"
  28802. still affect the alignment of the structure:
  28803. .Sp
  28804. .Vb 5
  28805. \& struct
  28806. \& {
  28807. \& char foo : 6;
  28808. \& long : 0;
  28809. \& } t4;
  28810. .Ve
  28811. .Sp
  28812. Here, \f(CW\*(C`t4\*(C'\fR takes up 4 bytes.
  28813. .RE
  28814. .RS 4
  28815. .RE
  28816. .IP "3. Zero-length bit-fields following non-bit-field members are ignored:" 4
  28817. .IX Item "3. Zero-length bit-fields following non-bit-field members are ignored:"
  28818. .Vb 6
  28819. \& struct
  28820. \& {
  28821. \& char foo;
  28822. \& long : 0;
  28823. \& char bar;
  28824. \& } t5;
  28825. .Ve
  28826. .Sp
  28827. Here, \f(CW\*(C`t5\*(C'\fR takes up 2 bytes.
  28828. .RE
  28829. .RS 4
  28830. .RE
  28831. .IP "\fB\-mno\-align\-stringops\fR" 4
  28832. .IX Item "-mno-align-stringops"
  28833. Do not align the destination of inlined string operations. This switch reduces
  28834. code size and improves performance in case the destination is already aligned,
  28835. but \s-1GCC\s0 doesn't know about it.
  28836. .IP "\fB\-minline\-all\-stringops\fR" 4
  28837. .IX Item "-minline-all-stringops"
  28838. By default \s-1GCC\s0 inlines string operations only when the destination is
  28839. known to be aligned to least a 4\-byte boundary.
  28840. This enables more inlining and increases code
  28841. size, but may improve performance of code that depends on fast
  28842. \&\f(CW\*(C`memcpy\*(C'\fR and \f(CW\*(C`memset\*(C'\fR for short lengths.
  28843. The option enables inline expansion of \f(CW\*(C`strlen\*(C'\fR for all
  28844. pointer alignments.
  28845. .IP "\fB\-minline\-stringops\-dynamically\fR" 4
  28846. .IX Item "-minline-stringops-dynamically"
  28847. For string operations of unknown size, use run-time checks with
  28848. inline code for small blocks and a library call for large blocks.
  28849. .IP "\fB\-mstringop\-strategy=\fR\fIalg\fR" 4
  28850. .IX Item "-mstringop-strategy=alg"
  28851. Override the internal decision heuristic for the particular algorithm to use
  28852. for inlining string operations. The allowed values for \fIalg\fR are:
  28853. .RS 4
  28854. .IP "\fBrep_byte\fR" 4
  28855. .IX Item "rep_byte"
  28856. .PD 0
  28857. .IP "\fBrep_4byte\fR" 4
  28858. .IX Item "rep_4byte"
  28859. .IP "\fBrep_8byte\fR" 4
  28860. .IX Item "rep_8byte"
  28861. .PD
  28862. Expand using i386 \f(CW\*(C`rep\*(C'\fR prefix of the specified size.
  28863. .IP "\fBbyte_loop\fR" 4
  28864. .IX Item "byte_loop"
  28865. .PD 0
  28866. .IP "\fBloop\fR" 4
  28867. .IX Item "loop"
  28868. .IP "\fBunrolled_loop\fR" 4
  28869. .IX Item "unrolled_loop"
  28870. .PD
  28871. Expand into an inline loop.
  28872. .IP "\fBlibcall\fR" 4
  28873. .IX Item "libcall"
  28874. Always use a library call.
  28875. .RE
  28876. .RS 4
  28877. .RE
  28878. .IP "\fB\-mmemcpy\-strategy=\fR\fIstrategy\fR" 4
  28879. .IX Item "-mmemcpy-strategy=strategy"
  28880. Override the internal decision heuristic to decide if \f(CW\*(C`_\|_builtin_memcpy\*(C'\fR
  28881. should be inlined and what inline algorithm to use when the expected size
  28882. of the copy operation is known. \fIstrategy\fR
  28883. is a comma-separated list of \fIalg\fR:\fImax_size\fR:\fIdest_align\fR triplets.
  28884. \&\fIalg\fR is specified in \fB\-mstringop\-strategy\fR, \fImax_size\fR specifies
  28885. the max byte size with which inline algorithm \fIalg\fR is allowed. For the last
  28886. triplet, the \fImax_size\fR must be \f(CW\*(C`\-1\*(C'\fR. The \fImax_size\fR of the triplets
  28887. in the list must be specified in increasing order. The minimal byte size for
  28888. \&\fIalg\fR is \f(CW0\fR for the first triplet and \f(CW\*(C`\f(CImax_size\f(CW + 1\*(C'\fR of the
  28889. preceding range.
  28890. .IP "\fB\-mmemset\-strategy=\fR\fIstrategy\fR" 4
  28891. .IX Item "-mmemset-strategy=strategy"
  28892. The option is similar to \fB\-mmemcpy\-strategy=\fR except that it is to control
  28893. \&\f(CW\*(C`_\|_builtin_memset\*(C'\fR expansion.
  28894. .IP "\fB\-momit\-leaf\-frame\-pointer\fR" 4
  28895. .IX Item "-momit-leaf-frame-pointer"
  28896. Don't keep the frame pointer in a register for leaf functions. This
  28897. avoids the instructions to save, set up, and restore frame pointers and
  28898. makes an extra register available in leaf functions. The option
  28899. \&\fB\-fomit\-leaf\-frame\-pointer\fR removes the frame pointer for leaf functions,
  28900. which might make debugging harder.
  28901. .IP "\fB\-mtls\-direct\-seg\-refs\fR" 4
  28902. .IX Item "-mtls-direct-seg-refs"
  28903. .PD 0
  28904. .IP "\fB\-mno\-tls\-direct\-seg\-refs\fR" 4
  28905. .IX Item "-mno-tls-direct-seg-refs"
  28906. .PD
  28907. Controls whether \s-1TLS\s0 variables may be accessed with offsets from the
  28908. \&\s-1TLS\s0 segment register (\f(CW%gs\fR for 32\-bit, \f(CW%fs\fR for 64\-bit),
  28909. or whether the thread base pointer must be added. Whether or not this
  28910. is valid depends on the operating system, and whether it maps the
  28911. segment to cover the entire \s-1TLS\s0 area.
  28912. .Sp
  28913. For systems that use the \s-1GNU C\s0 Library, the default is on.
  28914. .IP "\fB\-msse2avx\fR" 4
  28915. .IX Item "-msse2avx"
  28916. .PD 0
  28917. .IP "\fB\-mno\-sse2avx\fR" 4
  28918. .IX Item "-mno-sse2avx"
  28919. .PD
  28920. Specify that the assembler should encode \s-1SSE\s0 instructions with \s-1VEX\s0
  28921. prefix. The option \fB\-mavx\fR turns this on by default.
  28922. .IP "\fB\-mfentry\fR" 4
  28923. .IX Item "-mfentry"
  28924. .PD 0
  28925. .IP "\fB\-mno\-fentry\fR" 4
  28926. .IX Item "-mno-fentry"
  28927. .PD
  28928. If profiling is active (\fB\-pg\fR), put the profiling
  28929. counter call before the prologue.
  28930. Note: On x86 architectures the attribute \f(CW\*(C`ms_hook_prologue\*(C'\fR
  28931. isn't possible at the moment for \fB\-mfentry\fR and \fB\-pg\fR.
  28932. .IP "\fB\-mrecord\-mcount\fR" 4
  28933. .IX Item "-mrecord-mcount"
  28934. .PD 0
  28935. .IP "\fB\-mno\-record\-mcount\fR" 4
  28936. .IX Item "-mno-record-mcount"
  28937. .PD
  28938. If profiling is active (\fB\-pg\fR), generate a _\|_mcount_loc section
  28939. that contains pointers to each profiling call. This is useful for
  28940. automatically patching and out calls.
  28941. .IP "\fB\-mnop\-mcount\fR" 4
  28942. .IX Item "-mnop-mcount"
  28943. .PD 0
  28944. .IP "\fB\-mno\-nop\-mcount\fR" 4
  28945. .IX Item "-mno-nop-mcount"
  28946. .PD
  28947. If profiling is active (\fB\-pg\fR), generate the calls to
  28948. the profiling functions as NOPs. This is useful when they
  28949. should be patched in later dynamically. This is likely only
  28950. useful together with \fB\-mrecord\-mcount\fR.
  28951. .IP "\fB\-minstrument\-return=\fR\fItype\fR" 4
  28952. .IX Item "-minstrument-return=type"
  28953. Instrument function exit in \-pg \-mfentry instrumented functions with
  28954. call to specified function. This only instruments true returns ending
  28955. with ret, but not sibling calls ending with jump. Valid types
  28956. are \fInone\fR to not instrument, \fIcall\fR to generate a call to _\|_return_\|_,
  28957. or \fInop5\fR to generate a 5 byte nop.
  28958. .IP "\fB\-mrecord\-return\fR" 4
  28959. .IX Item "-mrecord-return"
  28960. .PD 0
  28961. .IP "\fB\-mno\-record\-return\fR" 4
  28962. .IX Item "-mno-record-return"
  28963. .PD
  28964. Generate a _\|_return_loc section pointing to all return instrumentation code.
  28965. .IP "\fB\-mfentry\-name=\fR\fIname\fR" 4
  28966. .IX Item "-mfentry-name=name"
  28967. Set name of _\|_fentry_\|_ symbol called at function entry for \-pg \-mfentry functions.
  28968. .IP "\fB\-mfentry\-section=\fR\fIname\fR" 4
  28969. .IX Item "-mfentry-section=name"
  28970. Set name of section to record \-mrecord\-mcount calls (default _\|_mcount_loc).
  28971. .IP "\fB\-mskip\-rax\-setup\fR" 4
  28972. .IX Item "-mskip-rax-setup"
  28973. .PD 0
  28974. .IP "\fB\-mno\-skip\-rax\-setup\fR" 4
  28975. .IX Item "-mno-skip-rax-setup"
  28976. .PD
  28977. When generating code for the x86\-64 architecture with \s-1SSE\s0 extensions
  28978. disabled, \fB\-mskip\-rax\-setup\fR can be used to skip setting up \s-1RAX\s0
  28979. register when there are no variable arguments passed in vector registers.
  28980. .Sp
  28981. \&\fBWarning:\fR Since \s-1RAX\s0 register is used to avoid unnecessarily
  28982. saving vector registers on stack when passing variable arguments, the
  28983. impacts of this option are callees may waste some stack space,
  28984. misbehave or jump to a random location. \s-1GCC 4.4\s0 or newer don't have
  28985. those issues, regardless the \s-1RAX\s0 register value.
  28986. .IP "\fB\-m8bit\-idiv\fR" 4
  28987. .IX Item "-m8bit-idiv"
  28988. .PD 0
  28989. .IP "\fB\-mno\-8bit\-idiv\fR" 4
  28990. .IX Item "-mno-8bit-idiv"
  28991. .PD
  28992. On some processors, like Intel Atom, 8\-bit unsigned integer divide is
  28993. much faster than 32\-bit/64\-bit integer divide. This option generates a
  28994. run-time check. If both dividend and divisor are within range of 0
  28995. to 255, 8\-bit unsigned integer divide is used instead of
  28996. 32\-bit/64\-bit integer divide.
  28997. .IP "\fB\-mavx256\-split\-unaligned\-load\fR" 4
  28998. .IX Item "-mavx256-split-unaligned-load"
  28999. .PD 0
  29000. .IP "\fB\-mavx256\-split\-unaligned\-store\fR" 4
  29001. .IX Item "-mavx256-split-unaligned-store"
  29002. .PD
  29003. Split 32\-byte \s-1AVX\s0 unaligned load and store.
  29004. .IP "\fB\-mstack\-protector\-guard=\fR\fIguard\fR" 4
  29005. .IX Item "-mstack-protector-guard=guard"
  29006. .PD 0
  29007. .IP "\fB\-mstack\-protector\-guard\-reg=\fR\fIreg\fR" 4
  29008. .IX Item "-mstack-protector-guard-reg=reg"
  29009. .IP "\fB\-mstack\-protector\-guard\-offset=\fR\fIoffset\fR" 4
  29010. .IX Item "-mstack-protector-guard-offset=offset"
  29011. .PD
  29012. Generate stack protection code using canary at \fIguard\fR. Supported
  29013. locations are \fBglobal\fR for global canary or \fBtls\fR for per-thread
  29014. canary in the \s-1TLS\s0 block (the default). This option has effect only when
  29015. \&\fB\-fstack\-protector\fR or \fB\-fstack\-protector\-all\fR is specified.
  29016. .Sp
  29017. With the latter choice the options
  29018. \&\fB\-mstack\-protector\-guard\-reg=\fR\fIreg\fR and
  29019. \&\fB\-mstack\-protector\-guard\-offset=\fR\fIoffset\fR furthermore specify
  29020. which segment register (\f(CW%fs\fR or \f(CW%gs\fR) to use as base register
  29021. for reading the canary, and from what offset from that base register.
  29022. The default for those is as specified in the relevant \s-1ABI.\s0
  29023. .IP "\fB\-mgeneral\-regs\-only\fR" 4
  29024. .IX Item "-mgeneral-regs-only"
  29025. Generate code that uses only the general-purpose registers. This
  29026. prevents the compiler from using floating-point, vector, mask and bound
  29027. registers.
  29028. .IP "\fB\-mindirect\-branch=\fR\fIchoice\fR" 4
  29029. .IX Item "-mindirect-branch=choice"
  29030. Convert indirect call and jump with \fIchoice\fR. The default is
  29031. \&\fBkeep\fR, which keeps indirect call and jump unmodified.
  29032. \&\fBthunk\fR converts indirect call and jump to call and return thunk.
  29033. \&\fBthunk-inline\fR converts indirect call and jump to inlined call
  29034. and return thunk. \fBthunk-extern\fR converts indirect call and jump
  29035. to external call and return thunk provided in a separate object file.
  29036. You can control this behavior for a specific function by using the
  29037. function attribute \f(CW\*(C`indirect_branch\*(C'\fR.
  29038. .Sp
  29039. Note that \fB\-mcmodel=large\fR is incompatible with
  29040. \&\fB\-mindirect\-branch=thunk\fR and
  29041. \&\fB\-mindirect\-branch=thunk\-extern\fR since the thunk function may
  29042. not be reachable in the large code model.
  29043. .Sp
  29044. Note that \fB\-mindirect\-branch=thunk\-extern\fR is compatible with
  29045. \&\fB\-fcf\-protection=branch\fR since the external thunk can be made
  29046. to enable control-flow check.
  29047. .IP "\fB\-mfunction\-return=\fR\fIchoice\fR" 4
  29048. .IX Item "-mfunction-return=choice"
  29049. Convert function return with \fIchoice\fR. The default is \fBkeep\fR,
  29050. which keeps function return unmodified. \fBthunk\fR converts function
  29051. return to call and return thunk. \fBthunk-inline\fR converts function
  29052. return to inlined call and return thunk. \fBthunk-extern\fR converts
  29053. function return to external call and return thunk provided in a separate
  29054. object file. You can control this behavior for a specific function by
  29055. using the function attribute \f(CW\*(C`function_return\*(C'\fR.
  29056. .Sp
  29057. Note that \fB\-mindirect\-return=thunk\-extern\fR is compatible with
  29058. \&\fB\-fcf\-protection=branch\fR since the external thunk can be made
  29059. to enable control-flow check.
  29060. .Sp
  29061. Note that \fB\-mcmodel=large\fR is incompatible with
  29062. \&\fB\-mfunction\-return=thunk\fR and
  29063. \&\fB\-mfunction\-return=thunk\-extern\fR since the thunk function may
  29064. not be reachable in the large code model.
  29065. .IP "\fB\-mindirect\-branch\-register\fR" 4
  29066. .IX Item "-mindirect-branch-register"
  29067. Force indirect call and jump via register.
  29068. .PP
  29069. These \fB\-m\fR switches are supported in addition to the above
  29070. on x86\-64 processors in 64\-bit environments.
  29071. .IP "\fB\-m32\fR" 4
  29072. .IX Item "-m32"
  29073. .PD 0
  29074. .IP "\fB\-m64\fR" 4
  29075. .IX Item "-m64"
  29076. .IP "\fB\-mx32\fR" 4
  29077. .IX Item "-mx32"
  29078. .IP "\fB\-m16\fR" 4
  29079. .IX Item "-m16"
  29080. .IP "\fB\-miamcu\fR" 4
  29081. .IX Item "-miamcu"
  29082. .PD
  29083. Generate code for a 16\-bit, 32\-bit or 64\-bit environment.
  29084. The \fB\-m32\fR option sets \f(CW\*(C`int\*(C'\fR, \f(CW\*(C`long\*(C'\fR, and pointer types
  29085. to 32 bits, and
  29086. generates code that runs on any i386 system.
  29087. .Sp
  29088. The \fB\-m64\fR option sets \f(CW\*(C`int\*(C'\fR to 32 bits and \f(CW\*(C`long\*(C'\fR and pointer
  29089. types to 64 bits, and generates code for the x86\-64 architecture.
  29090. For Darwin only the \fB\-m64\fR option also turns off the \fB\-fno\-pic\fR
  29091. and \fB\-mdynamic\-no\-pic\fR options.
  29092. .Sp
  29093. The \fB\-mx32\fR option sets \f(CW\*(C`int\*(C'\fR, \f(CW\*(C`long\*(C'\fR, and pointer types
  29094. to 32 bits, and
  29095. generates code for the x86\-64 architecture.
  29096. .Sp
  29097. The \fB\-m16\fR option is the same as \fB\-m32\fR, except for that
  29098. it outputs the \f(CW\*(C`.code16gcc\*(C'\fR assembly directive at the beginning of
  29099. the assembly output so that the binary can run in 16\-bit mode.
  29100. .Sp
  29101. The \fB\-miamcu\fR option generates code which conforms to Intel \s-1MCU\s0
  29102. psABI. It requires the \fB\-m32\fR option to be turned on.
  29103. .IP "\fB\-mno\-red\-zone\fR" 4
  29104. .IX Item "-mno-red-zone"
  29105. Do not use a so-called \*(L"red zone\*(R" for x86\-64 code. The red zone is mandated
  29106. by the x86\-64 \s-1ABI\s0; it is a 128\-byte area beyond the location of the
  29107. stack pointer that is not modified by signal or interrupt handlers
  29108. and therefore can be used for temporary data without adjusting the stack
  29109. pointer. The flag \fB\-mno\-red\-zone\fR disables this red zone.
  29110. .IP "\fB\-mcmodel=small\fR" 4
  29111. .IX Item "-mcmodel=small"
  29112. Generate code for the small code model: the program and its symbols must
  29113. be linked in the lower 2 \s-1GB\s0 of the address space. Pointers are 64 bits.
  29114. Programs can be statically or dynamically linked. This is the default
  29115. code model.
  29116. .IP "\fB\-mcmodel=kernel\fR" 4
  29117. .IX Item "-mcmodel=kernel"
  29118. Generate code for the kernel code model. The kernel runs in the
  29119. negative 2 \s-1GB\s0 of the address space.
  29120. This model has to be used for Linux kernel code.
  29121. .IP "\fB\-mcmodel=medium\fR" 4
  29122. .IX Item "-mcmodel=medium"
  29123. Generate code for the medium model: the program is linked in the lower 2
  29124. \&\s-1GB\s0 of the address space. Small symbols are also placed there. Symbols
  29125. with sizes larger than \fB\-mlarge\-data\-threshold\fR are put into
  29126. large data or \s-1BSS\s0 sections and can be located above 2GB. Programs can
  29127. be statically or dynamically linked.
  29128. .IP "\fB\-mcmodel=large\fR" 4
  29129. .IX Item "-mcmodel=large"
  29130. Generate code for the large model. This model makes no assumptions
  29131. about addresses and sizes of sections.
  29132. .IP "\fB\-maddress\-mode=long\fR" 4
  29133. .IX Item "-maddress-mode=long"
  29134. Generate code for long address mode. This is only supported for 64\-bit
  29135. and x32 environments. It is the default address mode for 64\-bit
  29136. environments.
  29137. .IP "\fB\-maddress\-mode=short\fR" 4
  29138. .IX Item "-maddress-mode=short"
  29139. Generate code for short address mode. This is only supported for 32\-bit
  29140. and x32 environments. It is the default address mode for 32\-bit and
  29141. x32 environments.
  29142. .PP
  29143. \fIx86 Windows Options\fR
  29144. .IX Subsection "x86 Windows Options"
  29145. .PP
  29146. These additional options are available for Microsoft Windows targets:
  29147. .IP "\fB\-mconsole\fR" 4
  29148. .IX Item "-mconsole"
  29149. This option
  29150. specifies that a console application is to be generated, by
  29151. instructing the linker to set the \s-1PE\s0 header subsystem type
  29152. required for console applications.
  29153. This option is available for Cygwin and MinGW targets and is
  29154. enabled by default on those targets.
  29155. .IP "\fB\-mdll\fR" 4
  29156. .IX Item "-mdll"
  29157. This option is available for Cygwin and MinGW targets. It
  29158. specifies that a DLL\-\-\-a dynamic link library\-\-\-is to be
  29159. generated, enabling the selection of the required runtime
  29160. startup object and entry point.
  29161. .IP "\fB\-mnop\-fun\-dllimport\fR" 4
  29162. .IX Item "-mnop-fun-dllimport"
  29163. This option is available for Cygwin and MinGW targets. It
  29164. specifies that the \f(CW\*(C`dllimport\*(C'\fR attribute should be ignored.
  29165. .IP "\fB\-mthread\fR" 4
  29166. .IX Item "-mthread"
  29167. This option is available for MinGW targets. It specifies
  29168. that MinGW-specific thread support is to be used.
  29169. .IP "\fB\-municode\fR" 4
  29170. .IX Item "-municode"
  29171. This option is available for MinGW\-w64 targets. It causes
  29172. the \f(CW\*(C`UNICODE\*(C'\fR preprocessor macro to be predefined, and
  29173. chooses Unicode-capable runtime startup code.
  29174. .IP "\fB\-mwin32\fR" 4
  29175. .IX Item "-mwin32"
  29176. This option is available for Cygwin and MinGW targets. It
  29177. specifies that the typical Microsoft Windows predefined macros are to
  29178. be set in the pre-processor, but does not influence the choice
  29179. of runtime library/startup code.
  29180. .IP "\fB\-mwindows\fR" 4
  29181. .IX Item "-mwindows"
  29182. This option is available for Cygwin and MinGW targets. It
  29183. specifies that a \s-1GUI\s0 application is to be generated by
  29184. instructing the linker to set the \s-1PE\s0 header subsystem type
  29185. appropriately.
  29186. .IP "\fB\-fno\-set\-stack\-executable\fR" 4
  29187. .IX Item "-fno-set-stack-executable"
  29188. This option is available for MinGW targets. It specifies that
  29189. the executable flag for the stack used by nested functions isn't
  29190. set. This is necessary for binaries running in kernel mode of
  29191. Microsoft Windows, as there the User32 \s-1API,\s0 which is used to set executable
  29192. privileges, isn't available.
  29193. .IP "\fB\-fwritable\-relocated\-rdata\fR" 4
  29194. .IX Item "-fwritable-relocated-rdata"
  29195. This option is available for MinGW and Cygwin targets. It specifies
  29196. that relocated-data in read-only section is put into the \f(CW\*(C`.data\*(C'\fR
  29197. section. This is a necessary for older runtimes not supporting
  29198. modification of \f(CW\*(C`.rdata\*(C'\fR sections for pseudo-relocation.
  29199. .IP "\fB\-mpe\-aligned\-commons\fR" 4
  29200. .IX Item "-mpe-aligned-commons"
  29201. This option is available for Cygwin and MinGW targets. It
  29202. specifies that the \s-1GNU\s0 extension to the \s-1PE\s0 file format that
  29203. permits the correct alignment of \s-1COMMON\s0 variables should be
  29204. used when generating code. It is enabled by default if
  29205. \&\s-1GCC\s0 detects that the target assembler found during configuration
  29206. supports the feature.
  29207. .PP
  29208. See also under \fBx86 Options\fR for standard options.
  29209. .PP
  29210. \fIXstormy16 Options\fR
  29211. .IX Subsection "Xstormy16 Options"
  29212. .PP
  29213. These options are defined for Xstormy16:
  29214. .IP "\fB\-msim\fR" 4
  29215. .IX Item "-msim"
  29216. Choose startup files and linker script suitable for the simulator.
  29217. .PP
  29218. \fIXtensa Options\fR
  29219. .IX Subsection "Xtensa Options"
  29220. .PP
  29221. These options are supported for Xtensa targets:
  29222. .IP "\fB\-mconst16\fR" 4
  29223. .IX Item "-mconst16"
  29224. .PD 0
  29225. .IP "\fB\-mno\-const16\fR" 4
  29226. .IX Item "-mno-const16"
  29227. .PD
  29228. Enable or disable use of \f(CW\*(C`CONST16\*(C'\fR instructions for loading
  29229. constant values. The \f(CW\*(C`CONST16\*(C'\fR instruction is currently not a
  29230. standard option from Tensilica. When enabled, \f(CW\*(C`CONST16\*(C'\fR
  29231. instructions are always used in place of the standard \f(CW\*(C`L32R\*(C'\fR
  29232. instructions. The use of \f(CW\*(C`CONST16\*(C'\fR is enabled by default only if
  29233. the \f(CW\*(C`L32R\*(C'\fR instruction is not available.
  29234. .IP "\fB\-mfused\-madd\fR" 4
  29235. .IX Item "-mfused-madd"
  29236. .PD 0
  29237. .IP "\fB\-mno\-fused\-madd\fR" 4
  29238. .IX Item "-mno-fused-madd"
  29239. .PD
  29240. Enable or disable use of fused multiply/add and multiply/subtract
  29241. instructions in the floating-point option. This has no effect if the
  29242. floating-point option is not also enabled. Disabling fused multiply/add
  29243. and multiply/subtract instructions forces the compiler to use separate
  29244. instructions for the multiply and add/subtract operations. This may be
  29245. desirable in some cases where strict \s-1IEEE\s0 754\-compliant results are
  29246. required: the fused multiply add/subtract instructions do not round the
  29247. intermediate result, thereby producing results with \fImore\fR bits of
  29248. precision than specified by the \s-1IEEE\s0 standard. Disabling fused multiply
  29249. add/subtract instructions also ensures that the program output is not
  29250. sensitive to the compiler's ability to combine multiply and add/subtract
  29251. operations.
  29252. .IP "\fB\-mserialize\-volatile\fR" 4
  29253. .IX Item "-mserialize-volatile"
  29254. .PD 0
  29255. .IP "\fB\-mno\-serialize\-volatile\fR" 4
  29256. .IX Item "-mno-serialize-volatile"
  29257. .PD
  29258. When this option is enabled, \s-1GCC\s0 inserts \f(CW\*(C`MEMW\*(C'\fR instructions before
  29259. \&\f(CW\*(C`volatile\*(C'\fR memory references to guarantee sequential consistency.
  29260. The default is \fB\-mserialize\-volatile\fR. Use
  29261. \&\fB\-mno\-serialize\-volatile\fR to omit the \f(CW\*(C`MEMW\*(C'\fR instructions.
  29262. .IP "\fB\-mforce\-no\-pic\fR" 4
  29263. .IX Item "-mforce-no-pic"
  29264. For targets, like GNU/Linux, where all user-mode Xtensa code must be
  29265. position-independent code (\s-1PIC\s0), this option disables \s-1PIC\s0 for compiling
  29266. kernel code.
  29267. .IP "\fB\-mtext\-section\-literals\fR" 4
  29268. .IX Item "-mtext-section-literals"
  29269. .PD 0
  29270. .IP "\fB\-mno\-text\-section\-literals\fR" 4
  29271. .IX Item "-mno-text-section-literals"
  29272. .PD
  29273. These options control the treatment of literal pools. The default is
  29274. \&\fB\-mno\-text\-section\-literals\fR, which places literals in a separate
  29275. section in the output file. This allows the literal pool to be placed
  29276. in a data \s-1RAM/ROM,\s0 and it also allows the linker to combine literal
  29277. pools from separate object files to remove redundant literals and
  29278. improve code size. With \fB\-mtext\-section\-literals\fR, the literals
  29279. are interspersed in the text section in order to keep them as close as
  29280. possible to their references. This may be necessary for large assembly
  29281. files. Literals for each function are placed right before that function.
  29282. .IP "\fB\-mauto\-litpools\fR" 4
  29283. .IX Item "-mauto-litpools"
  29284. .PD 0
  29285. .IP "\fB\-mno\-auto\-litpools\fR" 4
  29286. .IX Item "-mno-auto-litpools"
  29287. .PD
  29288. These options control the treatment of literal pools. The default is
  29289. \&\fB\-mno\-auto\-litpools\fR, which places literals in a separate
  29290. section in the output file unless \fB\-mtext\-section\-literals\fR is
  29291. used. With \fB\-mauto\-litpools\fR the literals are interspersed in
  29292. the text section by the assembler. Compiler does not produce explicit
  29293. \&\f(CW\*(C`.literal\*(C'\fR directives and loads literals into registers with
  29294. \&\f(CW\*(C`MOVI\*(C'\fR instructions instead of \f(CW\*(C`L32R\*(C'\fR to let the assembler
  29295. do relaxation and place literals as necessary. This option allows
  29296. assembler to create several literal pools per function and assemble
  29297. very big functions, which may not be possible with
  29298. \&\fB\-mtext\-section\-literals\fR.
  29299. .IP "\fB\-mtarget\-align\fR" 4
  29300. .IX Item "-mtarget-align"
  29301. .PD 0
  29302. .IP "\fB\-mno\-target\-align\fR" 4
  29303. .IX Item "-mno-target-align"
  29304. .PD
  29305. When this option is enabled, \s-1GCC\s0 instructs the assembler to
  29306. automatically align instructions to reduce branch penalties at the
  29307. expense of some code density. The assembler attempts to widen density
  29308. instructions to align branch targets and the instructions following call
  29309. instructions. If there are not enough preceding safe density
  29310. instructions to align a target, no widening is performed. The
  29311. default is \fB\-mtarget\-align\fR. These options do not affect the
  29312. treatment of auto-aligned instructions like \f(CW\*(C`LOOP\*(C'\fR, which the
  29313. assembler always aligns, either by widening density instructions or
  29314. by inserting \s-1NOP\s0 instructions.
  29315. .IP "\fB\-mlongcalls\fR" 4
  29316. .IX Item "-mlongcalls"
  29317. .PD 0
  29318. .IP "\fB\-mno\-longcalls\fR" 4
  29319. .IX Item "-mno-longcalls"
  29320. .PD
  29321. When this option is enabled, \s-1GCC\s0 instructs the assembler to translate
  29322. direct calls to indirect calls unless it can determine that the target
  29323. of a direct call is in the range allowed by the call instruction. This
  29324. translation typically occurs for calls to functions in other source
  29325. files. Specifically, the assembler translates a direct \f(CW\*(C`CALL\*(C'\fR
  29326. instruction into an \f(CW\*(C`L32R\*(C'\fR followed by a \f(CW\*(C`CALLX\*(C'\fR instruction.
  29327. The default is \fB\-mno\-longcalls\fR. This option should be used in
  29328. programs where the call target can potentially be out of range. This
  29329. option is implemented in the assembler, not the compiler, so the
  29330. assembly code generated by \s-1GCC\s0 still shows direct call
  29331. instructions\-\-\-look at the disassembled object code to see the actual
  29332. instructions. Note that the assembler uses an indirect call for
  29333. every cross-file call, not just those that really are out of range.
  29334. .PP
  29335. \fIzSeries Options\fR
  29336. .IX Subsection "zSeries Options"
  29337. .PP
  29338. These are listed under
  29339. .SH "ENVIRONMENT"
  29340. .IX Header "ENVIRONMENT"
  29341. This section describes several environment variables that affect how \s-1GCC\s0
  29342. operates. Some of them work by specifying directories or prefixes to use
  29343. when searching for various kinds of files. Some are used to specify other
  29344. aspects of the compilation environment.
  29345. .PP
  29346. Note that you can also specify places to search using options such as
  29347. \&\fB\-B\fR, \fB\-I\fR and \fB\-L\fR. These
  29348. take precedence over places specified using environment variables, which
  29349. in turn take precedence over those specified by the configuration of \s-1GCC.\s0
  29350. .IP "\fB\s-1LANG\s0\fR" 4
  29351. .IX Item "LANG"
  29352. .PD 0
  29353. .IP "\fB\s-1LC_CTYPE\s0\fR" 4
  29354. .IX Item "LC_CTYPE"
  29355. .IP "\fB\s-1LC_MESSAGES\s0\fR" 4
  29356. .IX Item "LC_MESSAGES"
  29357. .IP "\fB\s-1LC_ALL\s0\fR" 4
  29358. .IX Item "LC_ALL"
  29359. .PD
  29360. These environment variables control the way that \s-1GCC\s0 uses
  29361. localization information which allows \s-1GCC\s0 to work with different
  29362. national conventions. \s-1GCC\s0 inspects the locale categories
  29363. \&\fB\s-1LC_CTYPE\s0\fR and \fB\s-1LC_MESSAGES\s0\fR if it has been configured to do
  29364. so. These locale categories can be set to any value supported by your
  29365. installation. A typical value is \fBen_GB.UTF\-8\fR for English in the United
  29366. Kingdom encoded in \s-1UTF\-8.\s0
  29367. .Sp
  29368. The \fB\s-1LC_CTYPE\s0\fR environment variable specifies character
  29369. classification. \s-1GCC\s0 uses it to determine the character boundaries in
  29370. a string; this is needed for some multibyte encodings that contain quote
  29371. and escape characters that are otherwise interpreted as a string
  29372. end or escape.
  29373. .Sp
  29374. The \fB\s-1LC_MESSAGES\s0\fR environment variable specifies the language to
  29375. use in diagnostic messages.
  29376. .Sp
  29377. If the \fB\s-1LC_ALL\s0\fR environment variable is set, it overrides the value
  29378. of \fB\s-1LC_CTYPE\s0\fR and \fB\s-1LC_MESSAGES\s0\fR; otherwise, \fB\s-1LC_CTYPE\s0\fR
  29379. and \fB\s-1LC_MESSAGES\s0\fR default to the value of the \fB\s-1LANG\s0\fR
  29380. environment variable. If none of these variables are set, \s-1GCC\s0
  29381. defaults to traditional C English behavior.
  29382. .IP "\fB\s-1TMPDIR\s0\fR" 4
  29383. .IX Item "TMPDIR"
  29384. If \fB\s-1TMPDIR\s0\fR is set, it specifies the directory to use for temporary
  29385. files. \s-1GCC\s0 uses temporary files to hold the output of one stage of
  29386. compilation which is to be used as input to the next stage: for example,
  29387. the output of the preprocessor, which is the input to the compiler
  29388. proper.
  29389. .IP "\fB\s-1GCC_COMPARE_DEBUG\s0\fR" 4
  29390. .IX Item "GCC_COMPARE_DEBUG"
  29391. Setting \fB\s-1GCC_COMPARE_DEBUG\s0\fR is nearly equivalent to passing
  29392. \&\fB\-fcompare\-debug\fR to the compiler driver. See the documentation
  29393. of this option for more details.
  29394. .IP "\fB\s-1GCC_EXEC_PREFIX\s0\fR" 4
  29395. .IX Item "GCC_EXEC_PREFIX"
  29396. If \fB\s-1GCC_EXEC_PREFIX\s0\fR is set, it specifies a prefix to use in the
  29397. names of the subprograms executed by the compiler. No slash is added
  29398. when this prefix is combined with the name of a subprogram, but you can
  29399. specify a prefix that ends with a slash if you wish.
  29400. .Sp
  29401. If \fB\s-1GCC_EXEC_PREFIX\s0\fR is not set, \s-1GCC\s0 attempts to figure out
  29402. an appropriate prefix to use based on the pathname it is invoked with.
  29403. .Sp
  29404. If \s-1GCC\s0 cannot find the subprogram using the specified prefix, it
  29405. tries looking in the usual places for the subprogram.
  29406. .Sp
  29407. The default value of \fB\s-1GCC_EXEC_PREFIX\s0\fR is
  29408. \&\fI\fIprefix\fI/lib/gcc/\fR where \fIprefix\fR is the prefix to
  29409. the installed compiler. In many cases \fIprefix\fR is the value
  29410. of \f(CW\*(C`prefix\*(C'\fR when you ran the \fIconfigure\fR script.
  29411. .Sp
  29412. Other prefixes specified with \fB\-B\fR take precedence over this prefix.
  29413. .Sp
  29414. This prefix is also used for finding files such as \fIcrt0.o\fR that are
  29415. used for linking.
  29416. .Sp
  29417. In addition, the prefix is used in an unusual way in finding the
  29418. directories to search for header files. For each of the standard
  29419. directories whose name normally begins with \fB/usr/local/lib/gcc\fR
  29420. (more precisely, with the value of \fB\s-1GCC_INCLUDE_DIR\s0\fR), \s-1GCC\s0 tries
  29421. replacing that beginning with the specified prefix to produce an
  29422. alternate directory name. Thus, with \fB\-Bfoo/\fR, \s-1GCC\s0 searches
  29423. \&\fIfoo/bar\fR just before it searches the standard directory
  29424. \&\fI/usr/local/lib/bar\fR.
  29425. If a standard directory begins with the configured
  29426. \&\fIprefix\fR then the value of \fIprefix\fR is replaced by
  29427. \&\fB\s-1GCC_EXEC_PREFIX\s0\fR when looking for header files.
  29428. .IP "\fB\s-1COMPILER_PATH\s0\fR" 4
  29429. .IX Item "COMPILER_PATH"
  29430. The value of \fB\s-1COMPILER_PATH\s0\fR is a colon-separated list of
  29431. directories, much like \fB\s-1PATH\s0\fR. \s-1GCC\s0 tries the directories thus
  29432. specified when searching for subprograms, if it cannot find the
  29433. subprograms using \fB\s-1GCC_EXEC_PREFIX\s0\fR.
  29434. .IP "\fB\s-1LIBRARY_PATH\s0\fR" 4
  29435. .IX Item "LIBRARY_PATH"
  29436. The value of \fB\s-1LIBRARY_PATH\s0\fR is a colon-separated list of
  29437. directories, much like \fB\s-1PATH\s0\fR. When configured as a native compiler,
  29438. \&\s-1GCC\s0 tries the directories thus specified when searching for special
  29439. linker files, if it cannot find them using \fB\s-1GCC_EXEC_PREFIX\s0\fR. Linking
  29440. using \s-1GCC\s0 also uses these directories when searching for ordinary
  29441. libraries for the \fB\-l\fR option (but directories specified with
  29442. \&\fB\-L\fR come first).
  29443. .IP "\fB\s-1LANG\s0\fR" 4
  29444. .IX Item "LANG"
  29445. This variable is used to pass locale information to the compiler. One way in
  29446. which this information is used is to determine the character set to be used
  29447. when character literals, string literals and comments are parsed in C and \*(C+.
  29448. When the compiler is configured to allow multibyte characters,
  29449. the following values for \fB\s-1LANG\s0\fR are recognized:
  29450. .RS 4
  29451. .IP "\fBC\-JIS\fR" 4
  29452. .IX Item "C-JIS"
  29453. Recognize \s-1JIS\s0 characters.
  29454. .IP "\fBC\-SJIS\fR" 4
  29455. .IX Item "C-SJIS"
  29456. Recognize \s-1SJIS\s0 characters.
  29457. .IP "\fBC\-EUCJP\fR" 4
  29458. .IX Item "C-EUCJP"
  29459. Recognize \s-1EUCJP\s0 characters.
  29460. .RE
  29461. .RS 4
  29462. .Sp
  29463. If \fB\s-1LANG\s0\fR is not defined, or if it has some other value, then the
  29464. compiler uses \f(CW\*(C`mblen\*(C'\fR and \f(CW\*(C`mbtowc\*(C'\fR as defined by the default locale to
  29465. recognize and translate multibyte characters.
  29466. .RE
  29467. .PP
  29468. Some additional environment variables affect the behavior of the
  29469. preprocessor.
  29470. .IP "\fB\s-1CPATH\s0\fR" 4
  29471. .IX Item "CPATH"
  29472. .PD 0
  29473. .IP "\fBC_INCLUDE_PATH\fR" 4
  29474. .IX Item "C_INCLUDE_PATH"
  29475. .IP "\fB\s-1CPLUS_INCLUDE_PATH\s0\fR" 4
  29476. .IX Item "CPLUS_INCLUDE_PATH"
  29477. .IP "\fB\s-1OBJC_INCLUDE_PATH\s0\fR" 4
  29478. .IX Item "OBJC_INCLUDE_PATH"
  29479. .PD
  29480. Each variable's value is a list of directories separated by a special
  29481. character, much like \fB\s-1PATH\s0\fR, in which to look for header files.
  29482. The special character, \f(CW\*(C`PATH_SEPARATOR\*(C'\fR, is target-dependent and
  29483. determined at \s-1GCC\s0 build time. For Microsoft Windows-based targets it is a
  29484. semicolon, and for almost all other targets it is a colon.
  29485. .Sp
  29486. \&\fB\s-1CPATH\s0\fR specifies a list of directories to be searched as if
  29487. specified with \fB\-I\fR, but after any paths given with \fB\-I\fR
  29488. options on the command line. This environment variable is used
  29489. regardless of which language is being preprocessed.
  29490. .Sp
  29491. The remaining environment variables apply only when preprocessing the
  29492. particular language indicated. Each specifies a list of directories
  29493. to be searched as if specified with \fB\-isystem\fR, but after any
  29494. paths given with \fB\-isystem\fR options on the command line.
  29495. .Sp
  29496. In all these variables, an empty element instructs the compiler to
  29497. search its current working directory. Empty elements can appear at the
  29498. beginning or end of a path. For instance, if the value of
  29499. \&\fB\s-1CPATH\s0\fR is \f(CW\*(C`:/special/include\*(C'\fR, that has the same
  29500. effect as \fB\-I.\ \-I/special/include\fR.
  29501. .IP "\fB\s-1DEPENDENCIES_OUTPUT\s0\fR" 4
  29502. .IX Item "DEPENDENCIES_OUTPUT"
  29503. If this variable is set, its value specifies how to output
  29504. dependencies for Make based on the non-system header files processed
  29505. by the compiler. System header files are ignored in the dependency
  29506. output.
  29507. .Sp
  29508. The value of \fB\s-1DEPENDENCIES_OUTPUT\s0\fR can be just a file name, in
  29509. which case the Make rules are written to that file, guessing the target
  29510. name from the source file name. Or the value can have the form
  29511. \&\fIfile\fR\fB \fR\fItarget\fR, in which case the rules are written to
  29512. file \fIfile\fR using \fItarget\fR as the target name.
  29513. .Sp
  29514. In other words, this environment variable is equivalent to combining
  29515. the options \fB\-MM\fR and \fB\-MF\fR,
  29516. with an optional \fB\-MT\fR switch too.
  29517. .IP "\fB\s-1SUNPRO_DEPENDENCIES\s0\fR" 4
  29518. .IX Item "SUNPRO_DEPENDENCIES"
  29519. This variable is the same as \fB\s-1DEPENDENCIES_OUTPUT\s0\fR (see above),
  29520. except that system header files are not ignored, so it implies
  29521. \&\fB\-M\fR rather than \fB\-MM\fR. However, the dependence on the
  29522. main input file is omitted.
  29523. .IP "\fB\s-1SOURCE_DATE_EPOCH\s0\fR" 4
  29524. .IX Item "SOURCE_DATE_EPOCH"
  29525. If this variable is set, its value specifies a \s-1UNIX\s0 timestamp to be
  29526. used in replacement of the current date and time in the \f(CW\*(C`_\|_DATE_\|_\*(C'\fR
  29527. and \f(CW\*(C`_\|_TIME_\|_\*(C'\fR macros, so that the embedded timestamps become
  29528. reproducible.
  29529. .Sp
  29530. The value of \fB\s-1SOURCE_DATE_EPOCH\s0\fR must be a \s-1UNIX\s0 timestamp,
  29531. defined as the number of seconds (excluding leap seconds) since
  29532. 01 Jan 1970 00:00:00 represented in \s-1ASCII\s0; identical to the output of
  29533. \&\fB\f(CB@command\fB{date +%s\fR} on GNU/Linux and other systems that support the
  29534. \&\f(CW%s\fR extension in the \f(CW\*(C`date\*(C'\fR command.
  29535. .Sp
  29536. The value should be a known timestamp such as the last modification
  29537. time of the source or package and it should be set by the build
  29538. process.
  29539. .SH "BUGS"
  29540. .IX Header "BUGS"
  29541. For instructions on reporting bugs, see
  29542. <\fBhttps://gcc.gnu.org/bugs/\fR>.
  29543. .SH "FOOTNOTES"
  29544. .IX Header "FOOTNOTES"
  29545. .IP "1." 4
  29546. On some systems, \fBgcc \-shared\fR
  29547. needs to build supplementary stub code for constructors to work. On
  29548. multi-libbed systems, \fBgcc \-shared\fR must select the correct support
  29549. libraries to link against. Failing to supply the correct flags may lead
  29550. to subtle defects. Supplying them in cases where they are not necessary
  29551. is innocuous.
  29552. .SH "SEE ALSO"
  29553. .IX Header "SEE ALSO"
  29554. \&\fIgpl\fR\|(7), \fIgfdl\fR\|(7), \fIfsf\-funding\fR\|(7),
  29555. \&\fIcpp\fR\|(1), \fIgcov\fR\|(1), \fIas\fR\|(1), \fIld\fR\|(1), \fIgdb\fR\|(1), \fIdbx\fR\|(1)
  29556. and the Info entries for \fIgcc\fR, \fIcpp\fR, \fIas\fR,
  29557. \&\fIld\fR, \fIbinutils\fR and \fIgdb\fR.
  29558. .SH "AUTHOR"
  29559. .IX Header "AUTHOR"
  29560. See the Info entry for \fBgcc\fR, or
  29561. <\fBhttp://gcc.gnu.org/onlinedocs/gcc/Contributors.html\fR>,
  29562. for contributors to \s-1GCC.\s0
  29563. .SH "COPYRIGHT"
  29564. .IX Header "COPYRIGHT"
  29565. Copyright (c) 1988\-2020 Free Software Foundation, Inc.
  29566. .PP
  29567. Permission is granted to copy, distribute and/or modify this document
  29568. under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or
  29569. any later version published by the Free Software Foundation; with the
  29570. Invariant Sections being \*(L"\s-1GNU\s0 General Public License\*(R" and \*(L"Funding
  29571. Free Software\*(R", the Front-Cover texts being (a) (see below), and with
  29572. the Back-Cover Texts being (b) (see below). A copy of the license is
  29573. included in the \fIgfdl\fR\|(7) man page.
  29574. .PP
  29575. (a) The \s-1FSF\s0's Front-Cover Text is:
  29576. .PP
  29577. .Vb 1
  29578. \& A GNU Manual
  29579. .Ve
  29580. .PP
  29581. (b) The \s-1FSF\s0's Back-Cover Text is:
  29582. .PP
  29583. .Vb 3
  29584. \& You have freedom to copy and modify this GNU Manual, like GNU
  29585. \& software. Copies published by the Free Software Foundation raise
  29586. \& funds for GNU development.
  29587. .Ve