David 'Digit' Turner | 3523514 | 2014-06-03 15:18:04 +0200 | [diff] [blame] | 1 | .\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) |
| 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 | 'br\} |
| 42 | .\" |
| 43 | .\" Escape single quotes in literal strings from groff's Unicode transform. |
| 44 | .ie \n(.g .ds Aq \(aq |
| 45 | .el .ds Aq ' |
| 46 | .\" |
| 47 | .\" If the F register is turned on, we'll generate index entries on stderr for |
| 48 | .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 49 | .\" entries marked with X<> in POD. Of course, you'll have to process the |
| 50 | .\" output yourself in some meaningful fashion. |
| 51 | .ie \nF \{\ |
| 52 | . de IX |
| 53 | . tm Index:\\$1\t\\n%\t"\\$2" |
| 54 | .. |
| 55 | . nr % 0 |
| 56 | . rr F |
| 57 | .\} |
| 58 | .el \{\ |
| 59 | . de IX |
| 60 | .. |
| 61 | .\} |
| 62 | .\" |
| 63 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). |
| 64 | .\" Fear. Run. Save yourself. No user-serviceable parts. |
| 65 | . \" fudge factors for nroff and troff |
| 66 | .if n \{\ |
| 67 | . ds #H 0 |
| 68 | . ds #V .8m |
| 69 | . ds #F .3m |
| 70 | . ds #[ \f1 |
| 71 | . ds #] \fP |
| 72 | .\} |
| 73 | .if t \{\ |
| 74 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) |
| 75 | . ds #V .6m |
| 76 | . ds #F 0 |
| 77 | . ds #[ \& |
| 78 | . ds #] \& |
| 79 | .\} |
| 80 | . \" simple accents for nroff and troff |
| 81 | .if n \{\ |
| 82 | . ds ' \& |
| 83 | . ds ` \& |
| 84 | . ds ^ \& |
| 85 | . ds , \& |
| 86 | . ds ~ ~ |
| 87 | . ds / |
| 88 | .\} |
| 89 | .if t \{\ |
| 90 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" |
| 91 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' |
| 92 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' |
| 93 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' |
| 94 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' |
| 95 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' |
| 96 | .\} |
| 97 | . \" troff and (daisy-wheel) nroff accents |
| 98 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' |
| 99 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' |
| 100 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] |
| 101 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' |
| 102 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' |
| 103 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] |
| 104 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] |
| 105 | .ds ae a\h'-(\w'a'u*4/10)'e |
| 106 | .ds Ae A\h'-(\w'A'u*4/10)'E |
| 107 | . \" corrections for vroff |
| 108 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' |
| 109 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' |
| 110 | . \" for low resolution devices (crt and lpr) |
| 111 | .if \n(.H>23 .if \n(.V>19 \ |
| 112 | \{\ |
| 113 | . ds : e |
| 114 | . ds 8 ss |
| 115 | . ds o a |
| 116 | . ds d- d\h'-1'\(ga |
| 117 | . ds D- D\h'-1'\(hy |
| 118 | . ds th \o'bp' |
| 119 | . ds Th \o'LP' |
| 120 | . ds ae ae |
| 121 | . ds Ae AE |
| 122 | .\} |
| 123 | .rm #[ #] #H #V #F C |
| 124 | .\" ======================================================================== |
| 125 | .\" |
| 126 | .IX Title "GCC 1" |
| 127 | .TH GCC 1 "2013-05-31" "gcc-4.8.1" "GNU" |
| 128 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 129 | .\" way too many mistakes in technical documents. |
| 130 | .if n .ad l |
| 131 | .nh |
| 132 | .SH "NAME" |
| 133 | gcc \- GNU project C and C++ compiler |
| 134 | .SH "SYNOPSIS" |
| 135 | .IX Header "SYNOPSIS" |
| 136 | gcc [\fB\-c\fR|\fB\-S\fR|\fB\-E\fR] [\fB\-std=\fR\fIstandard\fR] |
| 137 | [\fB\-g\fR] [\fB\-pg\fR] [\fB\-O\fR\fIlevel\fR] |
| 138 | [\fB\-W\fR\fIwarn\fR...] [\fB\-Wpedantic\fR] |
| 139 | [\fB\-I\fR\fIdir\fR...] [\fB\-L\fR\fIdir\fR...] |
| 140 | [\fB\-D\fR\fImacro\fR[=\fIdefn\fR]...] [\fB\-U\fR\fImacro\fR] |
| 141 | [\fB\-f\fR\fIoption\fR...] [\fB\-m\fR\fImachine-option\fR...] |
| 142 | [\fB\-o\fR \fIoutfile\fR] [@\fIfile\fR] \fIinfile\fR... |
| 143 | .PP |
| 144 | Only the most useful options are listed here; see below for the |
| 145 | remainder. \fBg++\fR accepts mostly the same options as \fBgcc\fR. |
| 146 | .SH "DESCRIPTION" |
| 147 | .IX Header "DESCRIPTION" |
| 148 | When you invoke \s-1GCC\s0, it normally does preprocessing, compilation, |
| 149 | assembly and linking. The \*(L"overall options\*(R" allow you to stop this |
| 150 | process at an intermediate stage. For example, the \fB\-c\fR option |
| 151 | says not to run the linker. Then the output consists of object files |
| 152 | output by the assembler. |
| 153 | .PP |
| 154 | Other options are passed on to one stage of processing. Some options |
| 155 | control the preprocessor and others the compiler itself. Yet other |
| 156 | options control the assembler and linker; most of these are not |
| 157 | documented here, since you rarely need to use any of them. |
| 158 | .PP |
| 159 | Most of the command-line options that you can use with \s-1GCC\s0 are useful |
| 160 | for C programs; when an option is only useful with another language |
| 161 | (usually \*(C+), the explanation says so explicitly. If the description |
| 162 | for a particular option does not mention a source language, you can use |
| 163 | that option with all supported languages. |
| 164 | .PP |
| 165 | The \fBgcc\fR program accepts options and file names as operands. Many |
| 166 | options have multi-letter names; therefore multiple single-letter options |
| 167 | may \fInot\fR be grouped: \fB\-dv\fR is very different from \fB\-d\ \-v\fR. |
| 168 | .PP |
| 169 | You can mix options and other arguments. For the most part, the order |
| 170 | you use doesn't matter. Order does matter when you use several |
| 171 | options of the same kind; for example, if you specify \fB\-L\fR more |
| 172 | than once, the directories are searched in the order specified. Also, |
| 173 | the placement of the \fB\-l\fR option is significant. |
| 174 | .PP |
| 175 | Many options have long names starting with \fB\-f\fR or with |
| 176 | \&\fB\-W\fR\-\-\-for example, |
| 177 | \&\fB\-fmove\-loop\-invariants\fR, \fB\-Wformat\fR and so on. Most of |
| 178 | these have both positive and negative forms; the negative form of |
| 179 | \&\fB\-ffoo\fR is \fB\-fno\-foo\fR. This manual documents |
| 180 | only one of these two forms, whichever one is not the default. |
| 181 | .SH "OPTIONS" |
| 182 | .IX Header "OPTIONS" |
| 183 | .SS "Option Summary" |
| 184 | .IX Subsection "Option Summary" |
| 185 | Here is a summary of all the options, grouped by type. Explanations are |
| 186 | in the following sections. |
| 187 | .IP "\fIOverall Options\fR" 4 |
| 188 | .IX Item "Overall Options" |
| 189 | \&\fB\-c \-S \-E \-o\fR \fIfile\fR \fB\-no\-canonical\-prefixes |
| 190 | \&\-pipe \-pass\-exit\-codes |
| 191 | \&\-x\fR \fIlanguage\fR \fB\-v \-### \-\-help\fR[\fB=\fR\fIclass\fR[\fB,...\fR]] \fB\-\-target\-help |
| 192 | \&\-\-version \-wrapper @\fR\fIfile\fR \fB\-fplugin=\fR\fIfile\fR \fB\-fplugin\-arg\-\fR\fIname\fR\fB=\fR\fIarg\fR |
| 193 | \&\fB\-fdump\-ada\-spec\fR[\fB\-slim\fR] \fB\-fada\-spec\-parent=\fR\fIarg\fR \fB\-fdump\-go\-spec=\fR\fIfile\fR |
| 194 | .IP "\fIC Language Options\fR" 4 |
| 195 | .IX Item "C Language Options" |
| 196 | \&\fB\-ansi \-std=\fR\fIstandard\fR \fB\-fgnu89\-inline |
| 197 | \&\-aux\-info\fR \fIfilename\fR \fB\-fallow\-parameterless\-variadic\-functions |
| 198 | \&\-fno\-asm \-fno\-builtin \-fno\-builtin\-\fR\fIfunction\fR |
| 199 | \&\fB\-fhosted \-ffreestanding \-fopenmp \-fms\-extensions \-fplan9\-extensions |
| 200 | \&\-trigraphs \-traditional \-traditional\-cpp |
| 201 | \&\-fallow\-single\-precision \-fcond\-mismatch \-flax\-vector\-conversions |
| 202 | \&\-fsigned\-bitfields \-fsigned\-char |
| 203 | \&\-funsigned\-bitfields \-funsigned\-char\fR |
| 204 | .IP "\fI\*(C+ Language Options\fR" 4 |
| 205 | .IX Item " Language Options" |
| 206 | \&\fB\-fabi\-version=\fR\fIn\fR \fB\-fno\-access\-control \-fcheck\-new |
| 207 | \&\-fconstexpr\-depth=\fR\fIn\fR \fB\-ffriend\-injection |
| 208 | \&\-fno\-elide\-constructors |
| 209 | \&\-fno\-enforce\-eh\-specs |
| 210 | \&\-ffor\-scope \-fno\-for\-scope \-fno\-gnu\-keywords |
| 211 | \&\-fno\-implicit\-templates |
| 212 | \&\-fno\-implicit\-inline\-templates |
| 213 | \&\-fno\-implement\-inlines \-fms\-extensions |
| 214 | \&\-fno\-nonansi\-builtins \-fnothrow\-opt \-fno\-operator\-names |
| 215 | \&\-fno\-optional\-diags \-fpermissive |
| 216 | \&\-fno\-pretty\-templates |
| 217 | \&\-frepo \-fno\-rtti \-fstats \-ftemplate\-backtrace\-limit=\fR\fIn\fR |
| 218 | \&\fB\-ftemplate\-depth=\fR\fIn\fR |
| 219 | \&\fB\-fno\-threadsafe\-statics \-fuse\-cxa\-atexit \-fno\-weak \-nostdinc++ |
| 220 | \&\-fno\-default\-inline \-fvisibility\-inlines\-hidden |
| 221 | \&\-fvisibility\-ms\-compat |
| 222 | \&\-fext\-numeric\-literals |
| 223 | \&\-Wabi \-Wconversion\-null \-Wctor\-dtor\-privacy |
| 224 | \&\-Wdelete\-non\-virtual\-dtor \-Wliteral\-suffix \-Wnarrowing |
| 225 | \&\-Wnoexcept \-Wnon\-virtual\-dtor \-Wreorder |
| 226 | \&\-Weffc++ \-Wstrict\-null\-sentinel |
| 227 | \&\-Wno\-non\-template\-friend \-Wold\-style\-cast |
| 228 | \&\-Woverloaded\-virtual \-Wno\-pmf\-conversions |
| 229 | \&\-Wsign\-promo\fR |
| 230 | .IP "\fIObjective-C and Objective\-\*(C+ Language Options\fR" 4 |
| 231 | .IX Item "Objective-C and Objective- Language Options" |
| 232 | \&\fB\-fconstant\-string\-class=\fR\fIclass-name\fR |
| 233 | \&\fB\-fgnu\-runtime \-fnext\-runtime |
| 234 | \&\-fno\-nil\-receivers |
| 235 | \&\-fobjc\-abi\-version=\fR\fIn\fR |
| 236 | \&\fB\-fobjc\-call\-cxx\-cdtors |
| 237 | \&\-fobjc\-direct\-dispatch |
| 238 | \&\-fobjc\-exceptions |
| 239 | \&\-fobjc\-gc |
| 240 | \&\-fobjc\-nilcheck |
| 241 | \&\-fobjc\-std=objc1 |
| 242 | \&\-freplace\-objc\-classes |
| 243 | \&\-fzero\-link |
| 244 | \&\-gen\-decls |
| 245 | \&\-Wassign\-intercept |
| 246 | \&\-Wno\-protocol \-Wselector |
| 247 | \&\-Wstrict\-selector\-match |
| 248 | \&\-Wundeclared\-selector\fR |
| 249 | .IP "\fILanguage Independent Options\fR" 4 |
| 250 | .IX Item "Language Independent Options" |
| 251 | \&\fB\-fmessage\-length=\fR\fIn\fR |
| 252 | \&\fB\-fdiagnostics\-show\-location=\fR[\fBonce\fR|\fBevery-line\fR] |
| 253 | \&\fB\-fno\-diagnostics\-show\-option \-fno\-diagnostics\-show\-caret\fR |
| 254 | .IP "\fIWarning Options\fR" 4 |
| 255 | .IX Item "Warning Options" |
| 256 | \&\fB\-fsyntax\-only \-fmax\-errors=\fR\fIn\fR \fB\-Wpedantic |
| 257 | \&\-pedantic\-errors |
| 258 | \&\-w \-Wextra \-Wall \-Waddress \-Waggregate\-return |
| 259 | \&\-Waggressive\-loop\-optimizations \-Warray\-bounds |
| 260 | \&\-Wno\-attributes \-Wno\-builtin\-macro\-redefined |
| 261 | \&\-Wc++\-compat \-Wc++11\-compat \-Wcast\-align \-Wcast\-qual |
| 262 | \&\-Wchar\-subscripts \-Wclobbered \-Wcomment |
| 263 | \&\-Wconversion \-Wcoverage\-mismatch \-Wno\-cpp \-Wno\-deprecated |
| 264 | \&\-Wno\-deprecated\-declarations \-Wdisabled\-optimization |
| 265 | \&\-Wno\-div\-by\-zero \-Wdouble\-promotion \-Wempty\-body \-Wenum\-compare |
| 266 | \&\-Wno\-endif\-labels \-Werror \-Werror=* |
| 267 | \&\-Wfatal\-errors \-Wfloat\-equal \-Wformat \-Wformat=2 |
| 268 | \&\-Wno\-format\-contains\-nul \-Wno\-format\-extra\-args \-Wformat\-nonliteral |
| 269 | \&\-Wformat\-security \-Wformat\-y2k |
| 270 | \&\-Wframe\-larger\-than=\fR\fIlen\fR \fB\-Wno\-free\-nonheap\-object \-Wjump\-misses\-init |
| 271 | \&\-Wignored\-qualifiers |
| 272 | \&\-Wimplicit \-Wimplicit\-function\-declaration \-Wimplicit\-int |
| 273 | \&\-Winit\-self \-Winline \-Wmaybe\-uninitialized |
| 274 | \&\-Wno\-int\-to\-pointer\-cast \-Wno\-invalid\-offsetof |
| 275 | \&\-Winvalid\-pch \-Wlarger\-than=\fR\fIlen\fR \fB\-Wunsafe\-loop\-optimizations |
| 276 | \&\-Wlogical\-op \-Wlong\-long |
| 277 | \&\-Wmain \-Wmaybe\-uninitialized \-Wmissing\-braces \-Wmissing\-field\-initializers |
| 278 | \&\-Wmissing\-include\-dirs |
| 279 | \&\-Wno\-mudflap |
| 280 | \&\-Wno\-multichar \-Wnonnull \-Wno\-overflow |
| 281 | \&\-Woverlength\-strings \-Wpacked \-Wpacked\-bitfield\-compat \-Wpadded |
| 282 | \&\-Wparentheses \-Wpedantic\-ms\-format \-Wno\-pedantic\-ms\-format |
| 283 | \&\-Wpointer\-arith \-Wno\-pointer\-to\-int\-cast |
| 284 | \&\-Wredundant\-decls \-Wno\-return\-local\-addr |
| 285 | \&\-Wreturn\-type \-Wsequence\-point \-Wshadow |
| 286 | \&\-Wsign\-compare \-Wsign\-conversion \-Wsizeof\-pointer\-memaccess |
| 287 | \&\-Wstack\-protector \-Wstack\-usage=\fR\fIlen\fR \fB\-Wstrict\-aliasing |
| 288 | \&\-Wstrict\-aliasing=n \-Wstrict\-overflow \-Wstrict\-overflow=\fR\fIn\fR |
| 289 | \&\fB\-Wsuggest\-attribute=\fR[\fBpure\fR|\fBconst\fR|\fBnoreturn\fR|\fBformat\fR] |
| 290 | \&\fB\-Wmissing\-format\-attribute |
| 291 | \&\-Wswitch \-Wswitch\-default \-Wswitch\-enum \-Wsync\-nand |
| 292 | \&\-Wsystem\-headers \-Wtrampolines \-Wtrigraphs \-Wtype\-limits \-Wundef |
| 293 | \&\-Wuninitialized \-Wunknown\-pragmas \-Wno\-pragmas |
| 294 | \&\-Wunsuffixed\-float\-constants \-Wunused \-Wunused\-function |
| 295 | \&\-Wunused\-label \-Wunused\-local\-typedefs \-Wunused\-parameter |
| 296 | \&\-Wno\-unused\-result \-Wunused\-value \-Wunused\-variable |
| 297 | \&\-Wunused\-but\-set\-parameter \-Wunused\-but\-set\-variable |
| 298 | \&\-Wuseless\-cast \-Wvariadic\-macros \-Wvector\-operation\-performance |
| 299 | \&\-Wvla \-Wvolatile\-register\-var \-Wwrite\-strings \-Wzero\-as\-null\-pointer\-constant\fR |
| 300 | .IP "\fIC and Objective-C-only Warning Options\fR" 4 |
| 301 | .IX Item "C and Objective-C-only Warning Options" |
| 302 | \&\fB\-Wbad\-function\-cast \-Wmissing\-declarations |
| 303 | \&\-Wmissing\-parameter\-type \-Wmissing\-prototypes \-Wnested\-externs |
| 304 | \&\-Wold\-style\-declaration \-Wold\-style\-definition |
| 305 | \&\-Wstrict\-prototypes \-Wtraditional \-Wtraditional\-conversion |
| 306 | \&\-Wdeclaration\-after\-statement \-Wpointer\-sign\fR |
| 307 | .IP "\fIDebugging Options\fR" 4 |
| 308 | .IX Item "Debugging Options" |
| 309 | \&\fB\-d\fR\fIletters\fR \fB\-dumpspecs \-dumpmachine \-dumpversion |
| 310 | \&\-fsanitize=\fR\fIstyle\fR |
| 311 | \&\fB\-fdbg\-cnt\-list \-fdbg\-cnt=\fR\fIcounter-value-list\fR |
| 312 | \&\fB\-fdisable\-ipa\-\fR\fIpass_name\fR |
| 313 | \&\fB\-fdisable\-rtl\-\fR\fIpass_name\fR |
| 314 | \&\fB\-fdisable\-rtl\-\fR\fIpass-name\fR\fB=\fR\fIrange-list\fR |
| 315 | \&\fB\-fdisable\-tree\-\fR\fIpass_name\fR |
| 316 | \&\fB\-fdisable\-tree\-\fR\fIpass-name\fR\fB=\fR\fIrange-list\fR |
| 317 | \&\fB\-fdump\-noaddr \-fdump\-unnumbered \-fdump\-unnumbered\-links |
| 318 | \&\-fdump\-translation\-unit\fR[\fB\-\fR\fIn\fR] |
| 319 | \&\fB\-fdump\-class\-hierarchy\fR[\fB\-\fR\fIn\fR] |
| 320 | \&\fB\-fdump\-ipa\-all \-fdump\-ipa\-cgraph \-fdump\-ipa\-inline |
| 321 | \&\-fdump\-passes |
| 322 | \&\-fdump\-statistics |
| 323 | \&\-fdump\-tree\-all |
| 324 | \&\-fdump\-tree\-original\fR[\fB\-\fR\fIn\fR] |
| 325 | \&\fB\-fdump\-tree\-optimized\fR[\fB\-\fR\fIn\fR] |
| 326 | \&\fB\-fdump\-tree\-cfg \-fdump\-tree\-alias |
| 327 | \&\-fdump\-tree\-ch |
| 328 | \&\-fdump\-tree\-ssa\fR[\fB\-\fR\fIn\fR] \fB\-fdump\-tree\-pre\fR[\fB\-\fR\fIn\fR] |
| 329 | \&\fB\-fdump\-tree\-ccp\fR[\fB\-\fR\fIn\fR] \fB\-fdump\-tree\-dce\fR[\fB\-\fR\fIn\fR] |
| 330 | \&\fB\-fdump\-tree\-gimple\fR[\fB\-raw\fR] \fB\-fdump\-tree\-mudflap\fR[\fB\-\fR\fIn\fR] |
| 331 | \&\fB\-fdump\-tree\-dom\fR[\fB\-\fR\fIn\fR] |
| 332 | \&\fB\-fdump\-tree\-dse\fR[\fB\-\fR\fIn\fR] |
| 333 | \&\fB\-fdump\-tree\-phiprop\fR[\fB\-\fR\fIn\fR] |
| 334 | \&\fB\-fdump\-tree\-phiopt\fR[\fB\-\fR\fIn\fR] |
| 335 | \&\fB\-fdump\-tree\-forwprop\fR[\fB\-\fR\fIn\fR] |
| 336 | \&\fB\-fdump\-tree\-copyrename\fR[\fB\-\fR\fIn\fR] |
| 337 | \&\fB\-fdump\-tree\-nrv \-fdump\-tree\-vect |
| 338 | \&\-fdump\-tree\-sink |
| 339 | \&\-fdump\-tree\-sra\fR[\fB\-\fR\fIn\fR] |
| 340 | \&\fB\-fdump\-tree\-forwprop\fR[\fB\-\fR\fIn\fR] |
| 341 | \&\fB\-fdump\-tree\-fre\fR[\fB\-\fR\fIn\fR] |
| 342 | \&\fB\-fdump\-tree\-vrp\fR[\fB\-\fR\fIn\fR] |
| 343 | \&\fB\-ftree\-vectorizer\-verbose=\fR\fIn\fR |
| 344 | \&\fB\-fdump\-tree\-storeccp\fR[\fB\-\fR\fIn\fR] |
| 345 | \&\fB\-fdump\-final\-insns=\fR\fIfile\fR |
| 346 | \&\fB\-fcompare\-debug\fR[\fB=\fR\fIopts\fR] \fB\-fcompare\-debug\-second |
| 347 | \&\-feliminate\-dwarf2\-dups \-fno\-eliminate\-unused\-debug\-types |
| 348 | \&\-feliminate\-unused\-debug\-symbols \-femit\-class\-debug\-always |
| 349 | \&\-fenable\-\fR\fIkind\fR\fB\-\fR\fIpass\fR |
| 350 | \&\fB\-fenable\-\fR\fIkind\fR\fB\-\fR\fIpass\fR\fB=\fR\fIrange-list\fR |
| 351 | \&\fB\-fdebug\-types\-section \-fmem\-report\-wpa |
| 352 | \&\-fmem\-report \-fpre\-ipa\-mem\-report \-fpost\-ipa\-mem\-report \-fprofile\-arcs |
| 353 | \&\-fopt\-info |
| 354 | \&\-fopt\-info\-\fR\fIoptions\fR[\fB=\fR\fIfile\fR] |
| 355 | \&\fB\-frandom\-seed=\fR\fIstring\fR \fB\-fsched\-verbose=\fR\fIn\fR |
| 356 | \&\fB\-fsel\-sched\-verbose \-fsel\-sched\-dump\-cfg \-fsel\-sched\-pipelining\-verbose |
| 357 | \&\-fstack\-usage \-ftest\-coverage \-ftime\-report \-fvar\-tracking |
| 358 | \&\-fvar\-tracking\-assignments \-fvar\-tracking\-assignments\-toggle |
| 359 | \&\-g \-g\fR\fIlevel\fR \fB\-gtoggle \-gcoff \-gdwarf\-\fR\fIversion\fR |
| 360 | \&\fB\-ggdb \-grecord\-gcc\-switches \-gno\-record\-gcc\-switches |
| 361 | \&\-gstabs \-gstabs+ \-gstrict\-dwarf \-gno\-strict\-dwarf |
| 362 | \&\-gvms \-gxcoff \-gxcoff+ |
| 363 | \&\-fno\-merge\-debug\-strings \-fno\-dwarf2\-cfi\-asm |
| 364 | \&\-fdebug\-prefix\-map=\fR\fIold\fR\fB=\fR\fInew\fR |
| 365 | \&\fB\-femit\-struct\-debug\-baseonly \-femit\-struct\-debug\-reduced |
| 366 | \&\-femit\-struct\-debug\-detailed\fR[\fB=\fR\fIspec-list\fR] |
| 367 | \&\fB\-p \-pg \-print\-file\-name=\fR\fIlibrary\fR \fB\-print\-libgcc\-file\-name |
| 368 | \&\-print\-multi\-directory \-print\-multi\-lib \-print\-multi\-os\-directory |
| 369 | \&\-print\-prog\-name=\fR\fIprogram\fR \fB\-print\-search\-dirs \-Q |
| 370 | \&\-print\-sysroot \-print\-sysroot\-headers\-suffix |
| 371 | \&\-save\-temps \-save\-temps=cwd \-save\-temps=obj \-time\fR[\fB=\fR\fIfile\fR] |
| 372 | .IP "\fIOptimization Options\fR" 4 |
| 373 | .IX Item "Optimization Options" |
| 374 | \&\fB\-faggressive\-loop\-optimizations \-falign\-functions[=\fR\fIn\fR\fB] |
| 375 | \&\-falign\-jumps[=\fR\fIn\fR\fB] |
| 376 | \&\-falign\-labels[=\fR\fIn\fR\fB] \-falign\-loops[=\fR\fIn\fR\fB] |
| 377 | \&\-fassociative\-math \-fauto\-inc\-dec \-fbranch\-probabilities |
| 378 | \&\-fbranch\-target\-load\-optimize \-fbranch\-target\-load\-optimize2 |
| 379 | \&\-fbtr\-bb\-exclusive \-fcaller\-saves |
| 380 | \&\-fcheck\-data\-deps \-fcombine\-stack\-adjustments \-fconserve\-stack |
| 381 | \&\-fcompare\-elim \-fcprop\-registers \-fcrossjumping |
| 382 | \&\-fcse\-follow\-jumps \-fcse\-skip\-blocks \-fcx\-fortran\-rules |
| 383 | \&\-fcx\-limited\-range |
| 384 | \&\-fdata\-sections \-fdce \-fdelayed\-branch |
| 385 | \&\-fdelete\-null\-pointer\-checks \-fdevirtualize \-fdse |
| 386 | \&\-fearly\-inlining \-fipa\-sra \-fexpensive\-optimizations \-ffat\-lto\-objects |
| 387 | \&\-ffast\-math \-ffinite\-math\-only \-ffloat\-store \-fexcess\-precision=\fR\fIstyle\fR |
| 388 | \&\fB\-fforward\-propagate \-ffp\-contract=\fR\fIstyle\fR \fB\-ffunction\-sections |
| 389 | \&\-fgcse \-fgcse\-after\-reload \-fgcse\-las \-fgcse\-lm \-fgraphite\-identity |
| 390 | \&\-fgcse\-sm \-fhoist\-adjacent\-loads \-fif\-conversion |
| 391 | \&\-fif\-conversion2 \-findirect\-inlining |
| 392 | \&\-finline\-functions \-finline\-functions\-called\-once \-finline\-limit=\fR\fIn\fR |
| 393 | \&\fB\-finline\-small\-functions \-fipa\-cp \-fipa\-cp\-clone |
| 394 | \&\-fipa\-pta \-fipa\-profile \-fipa\-pure\-const \-fipa\-reference |
| 395 | \&\-fira\-algorithm=\fR\fIalgorithm\fR |
| 396 | \&\fB\-fira\-region=\fR\fIregion\fR \fB\-fira\-hoist\-pressure |
| 397 | \&\-fira\-loop\-pressure \-fno\-ira\-share\-save\-slots |
| 398 | \&\-fno\-ira\-share\-spill\-slots \-fira\-verbose=\fR\fIn\fR |
| 399 | \&\fB\-fivopts \-fkeep\-inline\-functions \-fkeep\-static\-consts |
| 400 | \&\-floop\-block \-floop\-interchange \-floop\-strip\-mine \-floop\-nest\-optimize |
| 401 | \&\-floop\-parallelize\-all \-flto \-flto\-compression\-level |
| 402 | \&\-flto\-partition=\fR\fIalg\fR \fB\-flto\-report \-fmerge\-all\-constants |
| 403 | \&\-fmerge\-constants \-fmodulo\-sched \-fmodulo\-sched\-allow\-regmoves |
| 404 | \&\-fmove\-loop\-invariants fmudflap \-fmudflapir \-fmudflapth \-fno\-branch\-count\-reg |
| 405 | \&\-fno\-default\-inline |
| 406 | \&\-fno\-defer\-pop \-fno\-function\-cse \-fno\-guess\-branch\-probability |
| 407 | \&\-fno\-inline \-fno\-math\-errno \-fno\-peephole \-fno\-peephole2 |
| 408 | \&\-fno\-sched\-interblock \-fno\-sched\-spec \-fno\-signed\-zeros |
| 409 | \&\-fno\-toplevel\-reorder \-fno\-trapping\-math \-fno\-zero\-initialized\-in\-bss |
| 410 | \&\-fomit\-frame\-pointer \-foptimize\-register\-move \-foptimize\-sibling\-calls |
| 411 | \&\-fpartial\-inlining \-fpeel\-loops \-fpredictive\-commoning |
| 412 | \&\-fprefetch\-loop\-arrays \-fprofile\-report |
| 413 | \&\-fprofile\-correction \-fprofile\-dir=\fR\fIpath\fR \fB\-fprofile\-generate |
| 414 | \&\-fprofile\-generate=\fR\fIpath\fR |
| 415 | \&\fB\-fprofile\-use \-fprofile\-use=\fR\fIpath\fR \fB\-fprofile\-values |
| 416 | \&\-freciprocal\-math \-free \-fregmove \-frename\-registers \-freorder\-blocks |
| 417 | \&\-freorder\-blocks\-and\-partition \-freorder\-functions |
| 418 | \&\-frerun\-cse\-after\-loop \-freschedule\-modulo\-scheduled\-loops |
| 419 | \&\-frounding\-math \-fsched2\-use\-superblocks \-fsched\-pressure |
| 420 | \&\-fsched\-spec\-load \-fsched\-spec\-load\-dangerous |
| 421 | \&\-fsched\-stalled\-insns\-dep[=\fR\fIn\fR\fB] \-fsched\-stalled\-insns[=\fR\fIn\fR\fB] |
| 422 | \&\-fsched\-group\-heuristic \-fsched\-critical\-path\-heuristic |
| 423 | \&\-fsched\-spec\-insn\-heuristic \-fsched\-rank\-heuristic |
| 424 | \&\-fsched\-last\-insn\-heuristic \-fsched\-dep\-count\-heuristic |
| 425 | \&\-fschedule\-insns \-fschedule\-insns2 \-fsection\-anchors |
| 426 | \&\-fselective\-scheduling \-fselective\-scheduling2 |
| 427 | \&\-fsel\-sched\-pipelining \-fsel\-sched\-pipelining\-outer\-loops |
| 428 | \&\-fshrink\-wrap \-fsignaling\-nans \-fsingle\-precision\-constant |
| 429 | \&\-fsplit\-ivs\-in\-unroller \-fsplit\-wide\-types \-fstack\-protector |
| 430 | \&\-fstack\-protector\-all \-fstrict\-aliasing \-fstrict\-overflow |
| 431 | \&\-fthread\-jumps \-ftracer \-ftree\-bit\-ccp |
| 432 | \&\-ftree\-builtin\-call\-dce \-ftree\-ccp \-ftree\-ch |
| 433 | \&\-ftree\-coalesce\-inline\-vars \-ftree\-coalesce\-vars \-ftree\-copy\-prop |
| 434 | \&\-ftree\-copyrename \-ftree\-dce \-ftree\-dominator\-opts \-ftree\-dse |
| 435 | \&\-ftree\-forwprop \-ftree\-fre \-ftree\-loop\-if\-convert |
| 436 | \&\-ftree\-loop\-if\-convert\-stores \-ftree\-loop\-im |
| 437 | \&\-ftree\-phiprop \-ftree\-loop\-distribution \-ftree\-loop\-distribute\-patterns |
| 438 | \&\-ftree\-loop\-ivcanon \-ftree\-loop\-linear \-ftree\-loop\-optimize |
| 439 | \&\-ftree\-parallelize\-loops=\fR\fIn\fR \fB\-ftree\-pre \-ftree\-partial\-pre \-ftree\-pta |
| 440 | \&\-ftree\-reassoc \-ftree\-sink \-ftree\-slsr \-ftree\-sra |
| 441 | \&\-ftree\-switch\-conversion \-ftree\-tail\-merge |
| 442 | \&\-ftree\-ter \-ftree\-vect\-loop\-version \-ftree\-vectorize \-ftree\-vrp |
| 443 | \&\-funit\-at\-a\-time \-funroll\-all\-loops \-funroll\-loops |
| 444 | \&\-funsafe\-loop\-optimizations \-funsafe\-math\-optimizations \-funswitch\-loops |
| 445 | \&\-fvariable\-expansion\-in\-unroller \-fvect\-cost\-model \-fvpt \-fweb |
| 446 | \&\-fwhole\-program \-fwpa \-fuse\-ld=\fR\fIlinker\fR \fB\-fuse\-linker\-plugin |
| 447 | \&\-\-param\fR \fIname\fR\fB=\fR\fIvalue\fR |
| 448 | \&\fB\-O \-O0 \-O1 \-O2 \-O3 \-Os \-Ofast \-Og\fR |
| 449 | .IP "\fIPreprocessor Options\fR" 4 |
| 450 | .IX Item "Preprocessor Options" |
| 451 | \&\fB\-A\fR\fIquestion\fR\fB=\fR\fIanswer\fR |
| 452 | \&\fB\-A\-\fR\fIquestion\fR[\fB=\fR\fIanswer\fR] |
| 453 | \&\fB\-C \-dD \-dI \-dM \-dN |
| 454 | \&\-D\fR\fImacro\fR[\fB=\fR\fIdefn\fR] \fB\-E \-H |
| 455 | \&\-idirafter\fR \fIdir\fR |
| 456 | \&\fB\-include\fR \fIfile\fR \fB\-imacros\fR \fIfile\fR |
| 457 | \&\fB\-iprefix\fR \fIfile\fR \fB\-iwithprefix\fR \fIdir\fR |
| 458 | \&\fB\-iwithprefixbefore\fR \fIdir\fR \fB\-isystem\fR \fIdir\fR |
| 459 | \&\fB\-imultilib\fR \fIdir\fR \fB\-isysroot\fR \fIdir\fR |
| 460 | \&\fB\-M \-MM \-MF \-MG \-MP \-MQ \-MT \-nostdinc |
| 461 | \&\-P \-fdebug\-cpp \-ftrack\-macro\-expansion \-fworking\-directory |
| 462 | \&\-remap \-trigraphs \-undef \-U\fR\fImacro\fR |
| 463 | \&\fB\-Wp,\fR\fIoption\fR \fB\-Xpreprocessor\fR \fIoption\fR \fB\-no\-integrated\-cpp\fR |
| 464 | .IP "\fIAssembler Option\fR" 4 |
| 465 | .IX Item "Assembler Option" |
| 466 | \&\fB\-Wa,\fR\fIoption\fR \fB\-Xassembler\fR \fIoption\fR |
| 467 | .IP "\fILinker Options\fR" 4 |
| 468 | .IX Item "Linker Options" |
| 469 | \&\fIobject-file-name\fR \fB\-l\fR\fIlibrary\fR |
| 470 | \&\fB\-nostartfiles \-nodefaultlibs \-nostdlib \-pie \-rdynamic |
| 471 | \&\-s \-static \-static\-libgcc \-static\-libstdc++ |
| 472 | \&\-static\-libasan \-static\-libtsan |
| 473 | \&\-shared \-shared\-libgcc \-symbolic |
| 474 | \&\-T\fR \fIscript\fR \fB\-Wl,\fR\fIoption\fR \fB\-Xlinker\fR \fIoption\fR |
| 475 | \&\fB\-u\fR \fIsymbol\fR |
| 476 | .IP "\fIDirectory Options\fR" 4 |
| 477 | .IX Item "Directory Options" |
| 478 | \&\fB\-B\fR\fIprefix\fR \fB\-I\fR\fIdir\fR \fB\-iplugindir=\fR\fIdir\fR |
| 479 | \&\fB\-iquote\fR\fIdir\fR \fB\-L\fR\fIdir\fR \fB\-specs=\fR\fIfile\fR \fB\-I\- |
| 480 | \&\-\-sysroot=\fR\fIdir\fR \fB\-\-no\-sysroot\-suffix\fR |
| 481 | .IP "\fIMachine Dependent Options\fR" 4 |
| 482 | .IX Item "Machine Dependent Options" |
| 483 | \&\fIAArch64 Options\fR |
| 484 | \&\fB\-mbig\-endian \-mlittle\-endian |
| 485 | \&\-mgeneral\-regs\-only |
| 486 | \&\-mcmodel=tiny \-mcmodel=small \-mcmodel=large |
| 487 | \&\-mstrict\-align |
| 488 | \&\-momit\-leaf\-frame\-pointer \-mno\-omit\-leaf\-frame\-pointer |
| 489 | \&\-mtls\-dialect=desc \-mtls\-dialect=traditional |
| 490 | \&\-march=\fR\fIname\fR \fB\-mcpu=\fR\fIname\fR \fB\-mtune=\fR\fIname\fR |
| 491 | .Sp |
| 492 | \&\fIAdapteva Epiphany Options\fR |
| 493 | \&\fB\-mhalf\-reg\-file \-mprefer\-short\-insn\-regs |
| 494 | \&\-mbranch\-cost=\fR\fInum\fR \fB\-mcmove \-mnops=\fR\fInum\fR \fB\-msoft\-cmpsf |
| 495 | \&\-msplit\-lohi \-mpost\-inc \-mpost\-modify \-mstack\-offset=\fR\fInum\fR |
| 496 | \&\fB\-mround\-nearest \-mlong\-calls \-mshort\-calls \-msmall16 |
| 497 | \&\-mfp\-mode=\fR\fImode\fR \fB\-mvect\-double \-max\-vect\-align=\fR\fInum\fR |
| 498 | \&\fB\-msplit\-vecmove\-early \-m1reg\-\fR\fIreg\fR |
| 499 | .Sp |
| 500 | \&\fI\s-1ARM\s0 Options\fR |
| 501 | \&\fB\-mapcs\-frame \-mno\-apcs\-frame |
| 502 | \&\-mabi=\fR\fIname\fR |
| 503 | \&\fB\-mapcs\-stack\-check \-mno\-apcs\-stack\-check |
| 504 | \&\-mapcs\-float \-mno\-apcs\-float |
| 505 | \&\-mapcs\-reentrant \-mno\-apcs\-reentrant |
| 506 | \&\-msched\-prolog \-mno\-sched\-prolog |
| 507 | \&\-mlittle\-endian \-mbig\-endian \-mwords\-little\-endian |
| 508 | \&\-mfloat\-abi=\fR\fIname\fR |
| 509 | \&\fB\-mfp16\-format=\fR\fIname\fR |
| 510 | \&\fB\-mthumb\-interwork \-mno\-thumb\-interwork |
| 511 | \&\-mcpu=\fR\fIname\fR \fB\-march=\fR\fIname\fR \fB\-mfpu=\fR\fIname\fR |
| 512 | \&\fB\-mstructure\-size\-boundary=\fR\fIn\fR |
| 513 | \&\fB\-mabort\-on\-noreturn |
| 514 | \&\-mlong\-calls \-mno\-long\-calls |
| 515 | \&\-msingle\-pic\-base \-mno\-single\-pic\-base |
| 516 | \&\-mpic\-register=\fR\fIreg\fR |
| 517 | \&\fB\-mnop\-fun\-dllimport |
| 518 | \&\-mpoke\-function\-name |
| 519 | \&\-mthumb \-marm |
| 520 | \&\-mtpcs\-frame \-mtpcs\-leaf\-frame |
| 521 | \&\-mcaller\-super\-interworking \-mcallee\-super\-interworking |
| 522 | \&\-mtp=\fR\fIname\fR \fB\-mtls\-dialect=\fR\fIdialect\fR |
| 523 | \&\fB\-mword\-relocations |
| 524 | \&\-mfix\-cortex\-m3\-ldrd |
| 525 | \&\-munaligned\-access\fR |
| 526 | .Sp |
| 527 | \&\fI\s-1AVR\s0 Options\fR |
| 528 | \&\fB\-mmcu=\fR\fImcu\fR \fB\-maccumulate\-args \-mbranch\-cost=\fR\fIcost\fR |
| 529 | \&\fB\-mcall\-prologues \-mint8 \-mno\-interrupts \-mrelax |
| 530 | \&\-mstrict\-X \-mtiny\-stack \-Waddr\-space\-convert\fR |
| 531 | .Sp |
| 532 | \&\fIBlackfin Options\fR |
| 533 | \&\fB\-mcpu=\fR\fIcpu\fR[\fB\-\fR\fIsirevision\fR] |
| 534 | \&\fB\-msim \-momit\-leaf\-frame\-pointer \-mno\-omit\-leaf\-frame\-pointer |
| 535 | \&\-mspecld\-anomaly \-mno\-specld\-anomaly \-mcsync\-anomaly \-mno\-csync\-anomaly |
| 536 | \&\-mlow\-64k \-mno\-low64k \-mstack\-check\-l1 \-mid\-shared\-library |
| 537 | \&\-mno\-id\-shared\-library \-mshared\-library\-id=\fR\fIn\fR |
| 538 | \&\fB\-mleaf\-id\-shared\-library \-mno\-leaf\-id\-shared\-library |
| 539 | \&\-msep\-data \-mno\-sep\-data \-mlong\-calls \-mno\-long\-calls |
| 540 | \&\-mfast\-fp \-minline\-plt \-mmulticore \-mcorea \-mcoreb \-msdram |
| 541 | \&\-micplb\fR |
| 542 | .Sp |
| 543 | \&\fIC6X Options\fR |
| 544 | \&\fB\-mbig\-endian \-mlittle\-endian \-march=\fR\fIcpu\fR |
| 545 | \&\fB\-msim \-msdata=\fR\fIsdata-type\fR |
| 546 | .Sp |
| 547 | \&\fI\s-1CRIS\s0 Options\fR |
| 548 | \&\fB\-mcpu=\fR\fIcpu\fR \fB\-march=\fR\fIcpu\fR \fB\-mtune=\fR\fIcpu\fR |
| 549 | \&\fB\-mmax\-stack\-frame=\fR\fIn\fR \fB\-melinux\-stacksize=\fR\fIn\fR |
| 550 | \&\fB\-metrax4 \-metrax100 \-mpdebug \-mcc\-init \-mno\-side\-effects |
| 551 | \&\-mstack\-align \-mdata\-align \-mconst\-align |
| 552 | \&\-m32\-bit \-m16\-bit \-m8\-bit \-mno\-prologue\-epilogue \-mno\-gotplt |
| 553 | \&\-melf \-maout \-melinux \-mlinux \-sim \-sim2 |
| 554 | \&\-mmul\-bug\-workaround \-mno\-mul\-bug\-workaround\fR |
| 555 | .Sp |
| 556 | \&\fI\s-1CR16\s0 Options\fR |
| 557 | \&\fB\-mmac |
| 558 | \&\-mcr16cplus \-mcr16c |
| 559 | \&\-msim \-mint32 \-mbit\-ops |
| 560 | \&\-mdata\-model=\fR\fImodel\fR |
| 561 | .Sp |
| 562 | \&\fIDarwin Options\fR |
| 563 | \&\fB\-all_load \-allowable_client \-arch \-arch_errors_fatal |
| 564 | \&\-arch_only \-bind_at_load \-bundle \-bundle_loader |
| 565 | \&\-client_name \-compatibility_version \-current_version |
| 566 | \&\-dead_strip |
| 567 | \&\-dependency\-file \-dylib_file \-dylinker_install_name |
| 568 | \&\-dynamic \-dynamiclib \-exported_symbols_list |
| 569 | \&\-filelist \-flat_namespace \-force_cpusubtype_ALL |
| 570 | \&\-force_flat_namespace \-headerpad_max_install_names |
| 571 | \&\-iframework |
| 572 | \&\-image_base \-init \-install_name \-keep_private_externs |
| 573 | \&\-multi_module \-multiply_defined \-multiply_defined_unused |
| 574 | \&\-noall_load \-no_dead_strip_inits_and_terms |
| 575 | \&\-nofixprebinding \-nomultidefs \-noprebind \-noseglinkedit |
| 576 | \&\-pagezero_size \-prebind \-prebind_all_twolevel_modules |
| 577 | \&\-private_bundle \-read_only_relocs \-sectalign |
| 578 | \&\-sectobjectsymbols \-whyload \-seg1addr |
| 579 | \&\-sectcreate \-sectobjectsymbols \-sectorder |
| 580 | \&\-segaddr \-segs_read_only_addr \-segs_read_write_addr |
| 581 | \&\-seg_addr_table \-seg_addr_table_filename \-seglinkedit |
| 582 | \&\-segprot \-segs_read_only_addr \-segs_read_write_addr |
| 583 | \&\-single_module \-static \-sub_library \-sub_umbrella |
| 584 | \&\-twolevel_namespace \-umbrella \-undefined |
| 585 | \&\-unexported_symbols_list \-weak_reference_mismatches |
| 586 | \&\-whatsloaded \-F \-gused \-gfull \-mmacosx\-version\-min=\fR\fIversion\fR |
| 587 | \&\fB\-mkernel \-mone\-byte\-bool\fR |
| 588 | .Sp |
| 589 | \&\fI\s-1DEC\s0 Alpha Options\fR |
| 590 | \&\fB\-mno\-fp\-regs \-msoft\-float |
| 591 | \&\-mieee \-mieee\-with\-inexact \-mieee\-conformant |
| 592 | \&\-mfp\-trap\-mode=\fR\fImode\fR \fB\-mfp\-rounding\-mode=\fR\fImode\fR |
| 593 | \&\fB\-mtrap\-precision=\fR\fImode\fR \fB\-mbuild\-constants |
| 594 | \&\-mcpu=\fR\fIcpu-type\fR \fB\-mtune=\fR\fIcpu-type\fR |
| 595 | \&\fB\-mbwx \-mmax \-mfix \-mcix |
| 596 | \&\-mfloat\-vax \-mfloat\-ieee |
| 597 | \&\-mexplicit\-relocs \-msmall\-data \-mlarge\-data |
| 598 | \&\-msmall\-text \-mlarge\-text |
| 599 | \&\-mmemory\-latency=\fR\fItime\fR |
| 600 | .Sp |
| 601 | \&\fI\s-1FR30\s0 Options\fR |
| 602 | \&\fB\-msmall\-model \-mno\-lsim\fR |
| 603 | .Sp |
| 604 | \&\fI\s-1FRV\s0 Options\fR |
| 605 | \&\fB\-mgpr\-32 \-mgpr\-64 \-mfpr\-32 \-mfpr\-64 |
| 606 | \&\-mhard\-float \-msoft\-float |
| 607 | \&\-malloc\-cc \-mfixed\-cc \-mdword \-mno\-dword |
| 608 | \&\-mdouble \-mno\-double |
| 609 | \&\-mmedia \-mno\-media \-mmuladd \-mno\-muladd |
| 610 | \&\-mfdpic \-minline\-plt \-mgprel\-ro \-multilib\-library\-pic |
| 611 | \&\-mlinked\-fp \-mlong\-calls \-malign\-labels |
| 612 | \&\-mlibrary\-pic \-macc\-4 \-macc\-8 |
| 613 | \&\-mpack \-mno\-pack \-mno\-eflags \-mcond\-move \-mno\-cond\-move |
| 614 | \&\-moptimize\-membar \-mno\-optimize\-membar |
| 615 | \&\-mscc \-mno\-scc \-mcond\-exec \-mno\-cond\-exec |
| 616 | \&\-mvliw\-branch \-mno\-vliw\-branch |
| 617 | \&\-mmulti\-cond\-exec \-mno\-multi\-cond\-exec \-mnested\-cond\-exec |
| 618 | \&\-mno\-nested\-cond\-exec \-mtomcat\-stats |
| 619 | \&\-mTLS \-mtls |
| 620 | \&\-mcpu=\fR\fIcpu\fR |
| 621 | .Sp |
| 622 | \&\fIGNU/Linux Options\fR |
| 623 | \&\fB\-mglibc \-muclibc \-mbionic \-mandroid |
| 624 | \&\-tno\-android\-cc \-tno\-android\-ld\fR |
| 625 | .Sp |
| 626 | \&\fIH8/300 Options\fR |
| 627 | \&\fB\-mrelax \-mh \-ms \-mn \-mexr \-mno\-exr \-mint32 \-malign\-300\fR |
| 628 | .Sp |
| 629 | \&\fI\s-1HPPA\s0 Options\fR |
| 630 | \&\fB\-march=\fR\fIarchitecture-type\fR |
| 631 | \&\fB\-mbig\-switch \-mdisable\-fpregs \-mdisable\-indexing |
| 632 | \&\-mfast\-indirect\-calls \-mgas \-mgnu\-ld \-mhp\-ld |
| 633 | \&\-mfixed\-range=\fR\fIregister-range\fR |
| 634 | \&\fB\-mjump\-in\-delay \-mlinker\-opt \-mlong\-calls |
| 635 | \&\-mlong\-load\-store \-mno\-big\-switch \-mno\-disable\-fpregs |
| 636 | \&\-mno\-disable\-indexing \-mno\-fast\-indirect\-calls \-mno\-gas |
| 637 | \&\-mno\-jump\-in\-delay \-mno\-long\-load\-store |
| 638 | \&\-mno\-portable\-runtime \-mno\-soft\-float |
| 639 | \&\-mno\-space\-regs \-msoft\-float \-mpa\-risc\-1\-0 |
| 640 | \&\-mpa\-risc\-1\-1 \-mpa\-risc\-2\-0 \-mportable\-runtime |
| 641 | \&\-mschedule=\fR\fIcpu-type\fR \fB\-mspace\-regs \-msio \-mwsio |
| 642 | \&\-munix=\fR\fIunix-std\fR \fB\-nolibdld \-static \-threads\fR |
| 643 | .Sp |
| 644 | \&\fIi386 and x86\-64 Options\fR |
| 645 | \&\fB\-mtune=\fR\fIcpu-type\fR \fB\-march=\fR\fIcpu-type\fR |
| 646 | \&\fB\-mfpmath=\fR\fIunit\fR |
| 647 | \&\fB\-masm=\fR\fIdialect\fR \fB\-mno\-fancy\-math\-387 |
| 648 | \&\-mno\-fp\-ret\-in\-387 \-msoft\-float |
| 649 | \&\-mno\-wide\-multiply \-mrtd \-malign\-double |
| 650 | \&\-mpreferred\-stack\-boundary=\fR\fInum\fR |
| 651 | \&\fB\-mincoming\-stack\-boundary=\fR\fInum\fR |
| 652 | \&\fB\-mcld \-mcx16 \-msahf \-mmovbe \-mcrc32 |
| 653 | \&\-mrecip \-mrecip=\fR\fIopt\fR |
| 654 | \&\fB\-mvzeroupper \-mprefer\-avx128 |
| 655 | \&\-mmmx \-msse \-msse2 \-msse3 \-mssse3 \-msse4.1 \-msse4.2 \-msse4 \-mavx |
| 656 | \&\-mavx2 \-maes \-mpclmul \-mfsgsbase \-mrdrnd \-mf16c \-mfma |
| 657 | \&\-msse4a \-m3dnow \-mpopcnt \-mabm \-mbmi \-mtbm \-mfma4 \-mxop \-mlzcnt |
| 658 | \&\-mbmi2 \-mrtm \-mlwp \-mthreads |
| 659 | \&\-mno\-align\-stringops \-minline\-all\-stringops |
| 660 | \&\-minline\-stringops\-dynamically \-mstringop\-strategy=\fR\fIalg\fR |
| 661 | \&\fB\-mpush\-args \-maccumulate\-outgoing\-args \-m128bit\-long\-double |
| 662 | \&\-m96bit\-long\-double \-mlong\-double\-64 \-mlong\-double\-80 |
| 663 | \&\-mregparm=\fR\fInum\fR \fB\-msseregparm |
| 664 | \&\-mveclibabi=\fR\fItype\fR \fB\-mvect8\-ret\-in\-mem |
| 665 | \&\-mpc32 \-mpc64 \-mpc80 \-mstackrealign |
| 666 | \&\-momit\-leaf\-frame\-pointer \-mno\-red\-zone \-mno\-tls\-direct\-seg\-refs |
| 667 | \&\-mcmodel=\fR\fIcode-model\fR \fB\-mabi=\fR\fIname\fR \fB\-maddress\-mode=\fR\fImode\fR |
| 668 | \&\fB\-m32 \-m64 \-mx32 \-mlarge\-data\-threshold=\fR\fInum\fR |
| 669 | \&\fB\-msse2avx \-mfentry \-m8bit\-idiv |
| 670 | \&\-mavx256\-split\-unaligned\-load \-mavx256\-split\-unaligned\-store\fR |
| 671 | .Sp |
| 672 | \&\fIi386 and x86\-64 Windows Options\fR |
| 673 | \&\fB\-mconsole \-mcygwin \-mno\-cygwin \-mdll |
| 674 | \&\-mnop\-fun\-dllimport \-mthread |
| 675 | \&\-municode \-mwin32 \-mwindows \-fno\-set\-stack\-executable\fR |
| 676 | .Sp |
| 677 | \&\fI\s-1IA\-64\s0 Options\fR |
| 678 | \&\fB\-mbig\-endian \-mlittle\-endian \-mgnu\-as \-mgnu\-ld \-mno\-pic |
| 679 | \&\-mvolatile\-asm\-stop \-mregister\-names \-msdata \-mno\-sdata |
| 680 | \&\-mconstant\-gp \-mauto\-pic \-mfused\-madd |
| 681 | \&\-minline\-float\-divide\-min\-latency |
| 682 | \&\-minline\-float\-divide\-max\-throughput |
| 683 | \&\-mno\-inline\-float\-divide |
| 684 | \&\-minline\-int\-divide\-min\-latency |
| 685 | \&\-minline\-int\-divide\-max\-throughput |
| 686 | \&\-mno\-inline\-int\-divide |
| 687 | \&\-minline\-sqrt\-min\-latency \-minline\-sqrt\-max\-throughput |
| 688 | \&\-mno\-inline\-sqrt |
| 689 | \&\-mdwarf2\-asm \-mearly\-stop\-bits |
| 690 | \&\-mfixed\-range=\fR\fIregister-range\fR \fB\-mtls\-size=\fR\fItls-size\fR |
| 691 | \&\fB\-mtune=\fR\fIcpu-type\fR \fB\-milp32 \-mlp64 |
| 692 | \&\-msched\-br\-data\-spec \-msched\-ar\-data\-spec \-msched\-control\-spec |
| 693 | \&\-msched\-br\-in\-data\-spec \-msched\-ar\-in\-data\-spec \-msched\-in\-control\-spec |
| 694 | \&\-msched\-spec\-ldc \-msched\-spec\-control\-ldc |
| 695 | \&\-msched\-prefer\-non\-data\-spec\-insns \-msched\-prefer\-non\-control\-spec\-insns |
| 696 | \&\-msched\-stop\-bits\-after\-every\-cycle \-msched\-count\-spec\-in\-critical\-path |
| 697 | \&\-msel\-sched\-dont\-check\-control\-spec \-msched\-fp\-mem\-deps\-zero\-cost |
| 698 | \&\-msched\-max\-memory\-insns\-hard\-limit \-msched\-max\-memory\-insns=\fR\fImax-insns\fR |
| 699 | .Sp |
| 700 | \&\fI\s-1LM32\s0 Options\fR |
| 701 | \&\fB\-mbarrel\-shift\-enabled \-mdivide\-enabled \-mmultiply\-enabled |
| 702 | \&\-msign\-extend\-enabled \-muser\-enabled\fR |
| 703 | .Sp |
| 704 | \&\fIM32R/D Options\fR |
| 705 | \&\fB\-m32r2 \-m32rx \-m32r |
| 706 | \&\-mdebug |
| 707 | \&\-malign\-loops \-mno\-align\-loops |
| 708 | \&\-missue\-rate=\fR\fInumber\fR |
| 709 | \&\fB\-mbranch\-cost=\fR\fInumber\fR |
| 710 | \&\fB\-mmodel=\fR\fIcode-size-model-type\fR |
| 711 | \&\fB\-msdata=\fR\fIsdata-type\fR |
| 712 | \&\fB\-mno\-flush\-func \-mflush\-func=\fR\fIname\fR |
| 713 | \&\fB\-mno\-flush\-trap \-mflush\-trap=\fR\fInumber\fR |
| 714 | \&\fB\-G\fR \fInum\fR |
| 715 | .Sp |
| 716 | \&\fIM32C Options\fR |
| 717 | \&\fB\-mcpu=\fR\fIcpu\fR \fB\-msim \-memregs=\fR\fInumber\fR |
| 718 | .Sp |
| 719 | \&\fIM680x0 Options\fR |
| 720 | \&\fB\-march=\fR\fIarch\fR \fB\-mcpu=\fR\fIcpu\fR \fB\-mtune=\fR\fItune\fR |
| 721 | \&\fB\-m68000 \-m68020 \-m68020\-40 \-m68020\-60 \-m68030 \-m68040 |
| 722 | \&\-m68060 \-mcpu32 \-m5200 \-m5206e \-m528x \-m5307 \-m5407 |
| 723 | \&\-mcfv4e \-mbitfield \-mno\-bitfield \-mc68000 \-mc68020 |
| 724 | \&\-mnobitfield \-mrtd \-mno\-rtd \-mdiv \-mno\-div \-mshort |
| 725 | \&\-mno\-short \-mhard\-float \-m68881 \-msoft\-float \-mpcrel |
| 726 | \&\-malign\-int \-mstrict\-align \-msep\-data \-mno\-sep\-data |
| 727 | \&\-mshared\-library\-id=n \-mid\-shared\-library \-mno\-id\-shared\-library |
| 728 | \&\-mxgot \-mno\-xgot\fR |
| 729 | .Sp |
| 730 | \&\fIMCore Options\fR |
| 731 | \&\fB\-mhardlit \-mno\-hardlit \-mdiv \-mno\-div \-mrelax\-immediates |
| 732 | \&\-mno\-relax\-immediates \-mwide\-bitfields \-mno\-wide\-bitfields |
| 733 | \&\-m4byte\-functions \-mno\-4byte\-functions \-mcallgraph\-data |
| 734 | \&\-mno\-callgraph\-data \-mslow\-bytes \-mno\-slow\-bytes \-mno\-lsim |
| 735 | \&\-mlittle\-endian \-mbig\-endian \-m210 \-m340 \-mstack\-increment\fR |
| 736 | .Sp |
| 737 | \&\fIMeP Options\fR |
| 738 | \&\fB\-mabsdiff \-mall\-opts \-maverage \-mbased=\fR\fIn\fR \fB\-mbitops |
| 739 | \&\-mc=\fR\fIn\fR \fB\-mclip \-mconfig=\fR\fIname\fR \fB\-mcop \-mcop32 \-mcop64 \-mivc2 |
| 740 | \&\-mdc \-mdiv \-meb \-mel \-mio\-volatile \-ml \-mleadz \-mm \-mminmax |
| 741 | \&\-mmult \-mno\-opts \-mrepeat \-ms \-msatur \-msdram \-msim \-msimnovec \-mtf |
| 742 | \&\-mtiny=\fR\fIn\fR |
| 743 | .Sp |
| 744 | \&\fIMicroBlaze Options\fR |
| 745 | \&\fB\-msoft\-float \-mhard\-float \-msmall\-divides \-mcpu=\fR\fIcpu\fR |
| 746 | \&\fB\-mmemcpy \-mxl\-soft\-mul \-mxl\-soft\-div \-mxl\-barrel\-shift |
| 747 | \&\-mxl\-pattern\-compare \-mxl\-stack\-check \-mxl\-gp\-opt \-mno\-clearbss |
| 748 | \&\-mxl\-multiply\-high \-mxl\-float\-convert \-mxl\-float\-sqrt |
| 749 | \&\-mbig\-endian \-mlittle\-endian \-mxl\-reorder \-mxl\-mode\-\fR\fIapp-model\fR |
| 750 | .Sp |
| 751 | \&\fI\s-1MIPS\s0 Options\fR |
| 752 | \&\fB\-EL \-EB \-march=\fR\fIarch\fR \fB\-mtune=\fR\fIarch\fR |
| 753 | \&\fB\-mips1 \-mips2 \-mips3 \-mips4 \-mips32 \-mips32r2 |
| 754 | \&\-mips64 \-mips64r2 |
| 755 | \&\-mips16 \-mno\-mips16 \-mflip\-mips16 |
| 756 | \&\-minterlink\-mips16 \-mno\-interlink\-mips16 |
| 757 | \&\-mabi=\fR\fIabi\fR \fB\-mabicalls \-mno\-abicalls |
| 758 | \&\-mshared \-mno\-shared \-mplt \-mno\-plt \-mxgot \-mno\-xgot |
| 759 | \&\-mgp32 \-mgp64 \-mfp32 \-mfp64 \-mhard\-float \-msoft\-float |
| 760 | \&\-mno\-float \-msingle\-float \-mdouble\-float |
| 761 | \&\-mdsp \-mno\-dsp \-mdspr2 \-mno\-dspr2 |
| 762 | \&\-mmcu \-mmno\-mcu |
| 763 | \&\-mfpu=\fR\fIfpu-type\fR |
| 764 | \&\fB\-msmartmips \-mno\-smartmips |
| 765 | \&\-mpaired\-single \-mno\-paired\-single \-mdmx \-mno\-mdmx |
| 766 | \&\-mips3d \-mno\-mips3d \-mmt \-mno\-mt \-mllsc \-mno\-llsc |
| 767 | \&\-mlong64 \-mlong32 \-msym32 \-mno\-sym32 |
| 768 | \&\-G\fR\fInum\fR \fB\-mlocal\-sdata \-mno\-local\-sdata |
| 769 | \&\-mextern\-sdata \-mno\-extern\-sdata \-mgpopt \-mno\-gopt |
| 770 | \&\-membedded\-data \-mno\-embedded\-data |
| 771 | \&\-muninit\-const\-in\-rodata \-mno\-uninit\-const\-in\-rodata |
| 772 | \&\-mcode\-readable=\fR\fIsetting\fR |
| 773 | \&\fB\-msplit\-addresses \-mno\-split\-addresses |
| 774 | \&\-mexplicit\-relocs \-mno\-explicit\-relocs |
| 775 | \&\-mcheck\-zero\-division \-mno\-check\-zero\-division |
| 776 | \&\-mdivide\-traps \-mdivide\-breaks |
| 777 | \&\-mmemcpy \-mno\-memcpy \-mlong\-calls \-mno\-long\-calls |
| 778 | \&\-mmad \-mno\-mad \-mfused\-madd \-mno\-fused\-madd \-nocpp |
| 779 | \&\-mfix\-24k \-mno\-fix\-24k |
| 780 | \&\-mfix\-r4000 \-mno\-fix\-r4000 \-mfix\-r4400 \-mno\-fix\-r4400 |
| 781 | \&\-mfix\-r10000 \-mno\-fix\-r10000 \-mfix\-vr4120 \-mno\-fix\-vr4120 |
| 782 | \&\-mfix\-vr4130 \-mno\-fix\-vr4130 \-mfix\-sb1 \-mno\-fix\-sb1 |
| 783 | \&\-mflush\-func=\fR\fIfunc\fR \fB\-mno\-flush\-func |
| 784 | \&\-mbranch\-cost=\fR\fInum\fR \fB\-mbranch\-likely \-mno\-branch\-likely |
| 785 | \&\-mfp\-exceptions \-mno\-fp\-exceptions |
| 786 | \&\-mvr4130\-align \-mno\-vr4130\-align \-msynci \-mno\-synci |
| 787 | \&\-mrelax\-pic\-calls \-mno\-relax\-pic\-calls \-mmcount\-ra\-address\fR |
| 788 | .Sp |
| 789 | \&\fI\s-1MMIX\s0 Options\fR |
| 790 | \&\fB\-mlibfuncs \-mno\-libfuncs \-mepsilon \-mno\-epsilon \-mabi=gnu |
| 791 | \&\-mabi=mmixware \-mzero\-extend \-mknuthdiv \-mtoplevel\-symbols |
| 792 | \&\-melf \-mbranch\-predict \-mno\-branch\-predict \-mbase\-addresses |
| 793 | \&\-mno\-base\-addresses \-msingle\-exit \-mno\-single\-exit\fR |
| 794 | .Sp |
| 795 | \&\fI\s-1MN10300\s0 Options\fR |
| 796 | \&\fB\-mmult\-bug \-mno\-mult\-bug |
| 797 | \&\-mno\-am33 \-mam33 \-mam33\-2 \-mam34 |
| 798 | \&\-mtune=\fR\fIcpu-type\fR |
| 799 | \&\fB\-mreturn\-pointer\-on\-d0 |
| 800 | \&\-mno\-crt0 \-mrelax \-mliw \-msetlb\fR |
| 801 | .Sp |
| 802 | \&\fIMoxie Options\fR |
| 803 | \&\fB\-meb \-mel \-mno\-crt0\fR |
| 804 | .Sp |
| 805 | \&\fI\s-1PDP\-11\s0 Options\fR |
| 806 | \&\fB\-mfpu \-msoft\-float \-mac0 \-mno\-ac0 \-m40 \-m45 \-m10 |
| 807 | \&\-mbcopy \-mbcopy\-builtin \-mint32 \-mno\-int16 |
| 808 | \&\-mint16 \-mno\-int32 \-mfloat32 \-mno\-float64 |
| 809 | \&\-mfloat64 \-mno\-float32 \-mabshi \-mno\-abshi |
| 810 | \&\-mbranch\-expensive \-mbranch\-cheap |
| 811 | \&\-munix\-asm \-mdec\-asm\fR |
| 812 | .Sp |
| 813 | \&\fIpicoChip Options\fR |
| 814 | \&\fB\-mae=\fR\fIae_type\fR \fB\-mvliw\-lookahead=\fR\fIN\fR |
| 815 | \&\fB\-msymbol\-as\-address \-mno\-inefficient\-warnings\fR |
| 816 | .Sp |
| 817 | \&\fIPowerPC Options\fR |
| 818 | See \s-1RS/6000\s0 and PowerPC Options. |
| 819 | .Sp |
| 820 | \&\fI\s-1RL78\s0 Options\fR |
| 821 | \&\fB\-msim \-mmul=none \-mmul=g13 \-mmul=rl78\fR |
| 822 | .Sp |
| 823 | \&\fI\s-1RS/6000\s0 and PowerPC Options\fR |
| 824 | \&\fB\-mcpu=\fR\fIcpu-type\fR |
| 825 | \&\fB\-mtune=\fR\fIcpu-type\fR |
| 826 | \&\fB\-mcmodel=\fR\fIcode-model\fR |
| 827 | \&\fB\-mpowerpc64 |
| 828 | \&\-maltivec \-mno\-altivec |
| 829 | \&\-mpowerpc\-gpopt \-mno\-powerpc\-gpopt |
| 830 | \&\-mpowerpc\-gfxopt \-mno\-powerpc\-gfxopt |
| 831 | \&\-mmfcrf \-mno\-mfcrf \-mpopcntb \-mno\-popcntb \-mpopcntd \-mno\-popcntd |
| 832 | \&\-mfprnd \-mno\-fprnd |
| 833 | \&\-mcmpb \-mno\-cmpb \-mmfpgpr \-mno\-mfpgpr \-mhard\-dfp \-mno\-hard\-dfp |
| 834 | \&\-mfull\-toc \-mminimal\-toc \-mno\-fp\-in\-toc \-mno\-sum\-in\-toc |
| 835 | \&\-m64 \-m32 \-mxl\-compat \-mno\-xl\-compat \-mpe |
| 836 | \&\-malign\-power \-malign\-natural |
| 837 | \&\-msoft\-float \-mhard\-float \-mmultiple \-mno\-multiple |
| 838 | \&\-msingle\-float \-mdouble\-float \-msimple\-fpu |
| 839 | \&\-mstring \-mno\-string \-mupdate \-mno\-update |
| 840 | \&\-mavoid\-indexed\-addresses \-mno\-avoid\-indexed\-addresses |
| 841 | \&\-mfused\-madd \-mno\-fused\-madd \-mbit\-align \-mno\-bit\-align |
| 842 | \&\-mstrict\-align \-mno\-strict\-align \-mrelocatable |
| 843 | \&\-mno\-relocatable \-mrelocatable\-lib \-mno\-relocatable\-lib |
| 844 | \&\-mtoc \-mno\-toc \-mlittle \-mlittle\-endian \-mbig \-mbig\-endian |
| 845 | \&\-mdynamic\-no\-pic \-maltivec \-mswdiv \-msingle\-pic\-base |
| 846 | \&\-mprioritize\-restricted\-insns=\fR\fIpriority\fR |
| 847 | \&\fB\-msched\-costly\-dep=\fR\fIdependence_type\fR |
| 848 | \&\fB\-minsert\-sched\-nops=\fR\fIscheme\fR |
| 849 | \&\fB\-mcall\-sysv \-mcall\-netbsd |
| 850 | \&\-maix\-struct\-return \-msvr4\-struct\-return |
| 851 | \&\-mabi=\fR\fIabi-type\fR \fB\-msecure\-plt \-mbss\-plt |
| 852 | \&\-mblock\-move\-inline\-limit=\fR\fInum\fR |
| 853 | \&\fB\-misel \-mno\-isel |
| 854 | \&\-misel=yes \-misel=no |
| 855 | \&\-mspe \-mno\-spe |
| 856 | \&\-mspe=yes \-mspe=no |
| 857 | \&\-mpaired |
| 858 | \&\-mgen\-cell\-microcode \-mwarn\-cell\-microcode |
| 859 | \&\-mvrsave \-mno\-vrsave |
| 860 | \&\-mmulhw \-mno\-mulhw |
| 861 | \&\-mdlmzb \-mno\-dlmzb |
| 862 | \&\-mfloat\-gprs=yes \-mfloat\-gprs=no \-mfloat\-gprs=single \-mfloat\-gprs=double |
| 863 | \&\-mprototype \-mno\-prototype |
| 864 | \&\-msim \-mmvme \-mads \-myellowknife \-memb \-msdata |
| 865 | \&\-msdata=\fR\fIopt\fR \fB\-mvxworks \-G\fR \fInum\fR \fB\-pthread |
| 866 | \&\-mrecip \-mrecip=\fR\fIopt\fR \fB\-mno\-recip \-mrecip\-precision |
| 867 | \&\-mno\-recip\-precision |
| 868 | \&\-mveclibabi=\fR\fItype\fR \fB\-mfriz \-mno\-friz |
| 869 | \&\-mpointers\-to\-nested\-functions \-mno\-pointers\-to\-nested\-functions |
| 870 | \&\-msave\-toc\-indirect \-mno\-save\-toc\-indirect\fR |
| 871 | .Sp |
| 872 | \&\fI\s-1RX\s0 Options\fR |
| 873 | \&\fB\-m64bit\-doubles \-m32bit\-doubles \-fpu \-nofpu |
| 874 | \&\-mcpu= |
| 875 | \&\-mbig\-endian\-data \-mlittle\-endian\-data |
| 876 | \&\-msmall\-data |
| 877 | \&\-msim \-mno\-sim |
| 878 | \&\-mas100\-syntax \-mno\-as100\-syntax |
| 879 | \&\-mrelax |
| 880 | \&\-mmax\-constant\-size= |
| 881 | \&\-mint\-register= |
| 882 | \&\-mpid |
| 883 | \&\-mno\-warn\-multiple\-fast\-interrupts |
| 884 | \&\-msave\-acc\-in\-interrupts\fR |
| 885 | .Sp |
| 886 | \&\fIS/390 and zSeries Options\fR |
| 887 | \&\fB\-mtune=\fR\fIcpu-type\fR \fB\-march=\fR\fIcpu-type\fR |
| 888 | \&\fB\-mhard\-float \-msoft\-float \-mhard\-dfp \-mno\-hard\-dfp |
| 889 | \&\-mlong\-double\-64 \-mlong\-double\-128 |
| 890 | \&\-mbackchain \-mno\-backchain \-mpacked\-stack \-mno\-packed\-stack |
| 891 | \&\-msmall\-exec \-mno\-small\-exec \-mmvcle \-mno\-mvcle |
| 892 | \&\-m64 \-m31 \-mdebug \-mno\-debug \-mesa \-mzarch |
| 893 | \&\-mtpf\-trace \-mno\-tpf\-trace \-mfused\-madd \-mno\-fused\-madd |
| 894 | \&\-mwarn\-framesize \-mwarn\-dynamicstack \-mstack\-size \-mstack\-guard\fR |
| 895 | .Sp |
| 896 | \&\fIScore Options\fR |
| 897 | \&\fB\-meb \-mel |
| 898 | \&\-mnhwloop |
| 899 | \&\-muls |
| 900 | \&\-mmac |
| 901 | \&\-mscore5 \-mscore5u \-mscore7 \-mscore7d\fR |
| 902 | .Sp |
| 903 | \&\fI\s-1SH\s0 Options\fR |
| 904 | \&\fB\-m1 \-m2 \-m2e |
| 905 | \&\-m2a\-nofpu \-m2a\-single\-only \-m2a\-single \-m2a |
| 906 | \&\-m3 \-m3e |
| 907 | \&\-m4\-nofpu \-m4\-single\-only \-m4\-single \-m4 |
| 908 | \&\-m4a\-nofpu \-m4a\-single\-only \-m4a\-single \-m4a \-m4al |
| 909 | \&\-m5\-64media \-m5\-64media\-nofpu |
| 910 | \&\-m5\-32media \-m5\-32media\-nofpu |
| 911 | \&\-m5\-compact \-m5\-compact\-nofpu |
| 912 | \&\-mb \-ml \-mdalign \-mrelax |
| 913 | \&\-mbigtable \-mfmovd \-mhitachi \-mrenesas \-mno\-renesas \-mnomacsave |
| 914 | \&\-mieee \-mno\-ieee \-mbitops \-misize \-minline\-ic_invalidate \-mpadstruct |
| 915 | \&\-mspace \-mprefergot \-musermode \-multcost=\fR\fInumber\fR \fB\-mdiv=\fR\fIstrategy\fR |
| 916 | \&\fB\-mdivsi3_libfunc=\fR\fIname\fR \fB\-mfixed\-range=\fR\fIregister-range\fR |
| 917 | \&\fB\-mindexed\-addressing \-mgettrcost=\fR\fInumber\fR \fB\-mpt\-fixed |
| 918 | \&\-maccumulate\-outgoing\-args \-minvalid\-symbols |
| 919 | \&\-matomic\-model=\fR\fIatomic-model\fR |
| 920 | \&\fB\-mbranch\-cost=\fR\fInum\fR \fB\-mzdcbranch \-mno\-zdcbranch \-mcbranchdi \-mcmpeqdi |
| 921 | \&\-mfused\-madd \-mno\-fused\-madd \-mfsca \-mno\-fsca \-mfsrra \-mno\-fsrra |
| 922 | \&\-mpretend\-cmove \-mtas\fR |
| 923 | .Sp |
| 924 | \&\fISolaris 2 Options\fR |
| 925 | \&\fB\-mimpure\-text \-mno\-impure\-text |
| 926 | \&\-pthreads \-pthread\fR |
| 927 | .Sp |
| 928 | \&\fI\s-1SPARC\s0 Options\fR |
| 929 | \&\fB\-mcpu=\fR\fIcpu-type\fR |
| 930 | \&\fB\-mtune=\fR\fIcpu-type\fR |
| 931 | \&\fB\-mcmodel=\fR\fIcode-model\fR |
| 932 | \&\fB\-mmemory\-model=\fR\fImem-model\fR |
| 933 | \&\fB\-m32 \-m64 \-mapp\-regs \-mno\-app\-regs |
| 934 | \&\-mfaster\-structs \-mno\-faster\-structs \-mflat \-mno\-flat |
| 935 | \&\-mfpu \-mno\-fpu \-mhard\-float \-msoft\-float |
| 936 | \&\-mhard\-quad\-float \-msoft\-quad\-float |
| 937 | \&\-mstack\-bias \-mno\-stack\-bias |
| 938 | \&\-munaligned\-doubles \-mno\-unaligned\-doubles |
| 939 | \&\-mv8plus \-mno\-v8plus \-mvis \-mno\-vis |
| 940 | \&\-mvis2 \-mno\-vis2 \-mvis3 \-mno\-vis3 |
| 941 | \&\-mcbcond \-mno\-cbcond |
| 942 | \&\-mfmaf \-mno\-fmaf \-mpopc \-mno\-popc |
| 943 | \&\-mfix\-at697f\fR |
| 944 | .Sp |
| 945 | \&\fI\s-1SPU\s0 Options\fR |
| 946 | \&\fB\-mwarn\-reloc \-merror\-reloc |
| 947 | \&\-msafe\-dma \-munsafe\-dma |
| 948 | \&\-mbranch\-hints |
| 949 | \&\-msmall\-mem \-mlarge\-mem \-mstdmain |
| 950 | \&\-mfixed\-range=\fR\fIregister-range\fR |
| 951 | \&\fB\-mea32 \-mea64 |
| 952 | \&\-maddress\-space\-conversion \-mno\-address\-space\-conversion |
| 953 | \&\-mcache\-size=\fR\fIcache-size\fR |
| 954 | \&\fB\-matomic\-updates \-mno\-atomic\-updates\fR |
| 955 | .Sp |
| 956 | \&\fISystem V Options\fR |
| 957 | \&\fB\-Qy \-Qn \-YP,\fR\fIpaths\fR \fB\-Ym,\fR\fIdir\fR |
| 958 | .Sp |
| 959 | \&\fITILE-Gx Options\fR |
| 960 | \&\fB\-mcpu=\fR\fIcpu\fR \fB\-m32 \-m64 \-mcmodel=\fR\fIcode-model\fR |
| 961 | .Sp |
| 962 | \&\fITILEPro Options\fR |
| 963 | \&\fB\-mcpu=\fR\fIcpu\fR \fB\-m32\fR |
| 964 | .Sp |
| 965 | \&\fIV850 Options\fR |
| 966 | \&\fB\-mlong\-calls \-mno\-long\-calls \-mep \-mno\-ep |
| 967 | \&\-mprolog\-function \-mno\-prolog\-function \-mspace |
| 968 | \&\-mtda=\fR\fIn\fR \fB\-msda=\fR\fIn\fR \fB\-mzda=\fR\fIn\fR |
| 969 | \&\fB\-mapp\-regs \-mno\-app\-regs |
| 970 | \&\-mdisable\-callt \-mno\-disable\-callt |
| 971 | \&\-mv850e2v3 \-mv850e2 \-mv850e1 \-mv850es |
| 972 | \&\-mv850e \-mv850 \-mv850e3v5 |
| 973 | \&\-mloop |
| 974 | \&\-mrelax |
| 975 | \&\-mlong\-jumps |
| 976 | \&\-msoft\-float |
| 977 | \&\-mhard\-float |
| 978 | \&\-mgcc\-abi |
| 979 | \&\-mrh850\-abi |
| 980 | \&\-mbig\-switch\fR |
| 981 | .Sp |
| 982 | \&\fI\s-1VAX\s0 Options\fR |
| 983 | \&\fB\-mg \-mgnu \-munix\fR |
| 984 | .Sp |
| 985 | \&\fI\s-1VMS\s0 Options\fR |
| 986 | \&\fB\-mvms\-return\-codes \-mdebug\-main=\fR\fIprefix\fR \fB\-mmalloc64 |
| 987 | \&\-mpointer\-size=\fR\fIsize\fR |
| 988 | .Sp |
| 989 | \&\fIVxWorks Options\fR |
| 990 | \&\fB\-mrtp \-non\-static \-Bstatic \-Bdynamic |
| 991 | \&\-Xbind\-lazy \-Xbind\-now\fR |
| 992 | .Sp |
| 993 | \&\fIx86\-64 Options\fR |
| 994 | See i386 and x86\-64 Options. |
| 995 | .Sp |
| 996 | \&\fIXstormy16 Options\fR |
| 997 | \&\fB\-msim\fR |
| 998 | .Sp |
| 999 | \&\fIXtensa Options\fR |
| 1000 | \&\fB\-mconst16 \-mno\-const16 |
| 1001 | \&\-mfused\-madd \-mno\-fused\-madd |
| 1002 | \&\-mforce\-no\-pic |
| 1003 | \&\-mserialize\-volatile \-mno\-serialize\-volatile |
| 1004 | \&\-mtext\-section\-literals \-mno\-text\-section\-literals |
| 1005 | \&\-mtarget\-align \-mno\-target\-align |
| 1006 | \&\-mlongcalls \-mno\-longcalls\fR |
| 1007 | .Sp |
| 1008 | \&\fIzSeries Options\fR |
| 1009 | See S/390 and zSeries Options. |
| 1010 | .IP "\fICode Generation Options\fR" 4 |
| 1011 | .IX Item "Code Generation Options" |
| 1012 | \&\fB\-fcall\-saved\-\fR\fIreg\fR \fB\-fcall\-used\-\fR\fIreg\fR |
| 1013 | \&\fB\-ffixed\-\fR\fIreg\fR \fB\-fexceptions |
| 1014 | \&\-fnon\-call\-exceptions \-fdelete\-dead\-exceptions \-funwind\-tables |
| 1015 | \&\-fasynchronous\-unwind\-tables |
| 1016 | \&\-finhibit\-size\-directive \-finstrument\-functions |
| 1017 | \&\-finstrument\-functions\-exclude\-function\-list=\fR\fIsym\fR\fB,\fR\fIsym\fR\fB,... |
| 1018 | \&\-finstrument\-functions\-exclude\-file\-list=\fR\fIfile\fR\fB,\fR\fIfile\fR\fB,... |
| 1019 | \&\-fno\-common \-fno\-ident |
| 1020 | \&\-fpcc\-struct\-return \-fpic \-fPIC \-fpie \-fPIE |
| 1021 | \&\-fno\-jump\-tables |
| 1022 | \&\-frecord\-gcc\-switches |
| 1023 | \&\-freg\-struct\-return \-fshort\-enums |
| 1024 | \&\-fshort\-double \-fshort\-wchar |
| 1025 | \&\-fverbose\-asm \-fpack\-struct[=\fR\fIn\fR\fB] \-fstack\-check |
| 1026 | \&\-fstack\-limit\-register=\fR\fIreg\fR \fB\-fstack\-limit\-symbol=\fR\fIsym\fR |
| 1027 | \&\fB\-fno\-stack\-limit \-fsplit\-stack |
| 1028 | \&\-fleading\-underscore \-ftls\-model=\fR\fImodel\fR |
| 1029 | \&\fB\-fstack\-reuse=\fR\fIreuse_level\fR |
| 1030 | \&\fB\-ftrapv \-fwrapv \-fbounds\-check |
| 1031 | \&\-fvisibility \-fstrict\-volatile\-bitfields \-fsync\-libcalls\fR |
| 1032 | .SS "Options Controlling the Kind of Output" |
| 1033 | .IX Subsection "Options Controlling the Kind of Output" |
| 1034 | Compilation can involve up to four stages: preprocessing, compilation |
| 1035 | proper, assembly and linking, always in that order. \s-1GCC\s0 is capable of |
| 1036 | preprocessing and compiling several files either into several |
| 1037 | assembler input files, or into one assembler input file; then each |
| 1038 | assembler input file produces an object file, and linking combines all |
| 1039 | the object files (those newly compiled, and those specified as input) |
| 1040 | into an executable file. |
| 1041 | .PP |
| 1042 | For any given input file, the file name suffix determines what kind of |
| 1043 | compilation is done: |
| 1044 | .IP "\fIfile\fR\fB.c\fR" 4 |
| 1045 | .IX Item "file.c" |
| 1046 | C source code that must be preprocessed. |
| 1047 | .IP "\fIfile\fR\fB.i\fR" 4 |
| 1048 | .IX Item "file.i" |
| 1049 | C source code that should not be preprocessed. |
| 1050 | .IP "\fIfile\fR\fB.ii\fR" 4 |
| 1051 | .IX Item "file.ii" |
| 1052 | \&\*(C+ source code that should not be preprocessed. |
| 1053 | .IP "\fIfile\fR\fB.m\fR" 4 |
| 1054 | .IX Item "file.m" |
| 1055 | Objective-C source code. Note that you must link with the \fIlibobjc\fR |
| 1056 | library to make an Objective-C program work. |
| 1057 | .IP "\fIfile\fR\fB.mi\fR" 4 |
| 1058 | .IX Item "file.mi" |
| 1059 | Objective-C source code that should not be preprocessed. |
| 1060 | .IP "\fIfile\fR\fB.mm\fR" 4 |
| 1061 | .IX Item "file.mm" |
| 1062 | .PD 0 |
| 1063 | .IP "\fIfile\fR\fB.M\fR" 4 |
| 1064 | .IX Item "file.M" |
| 1065 | .PD |
| 1066 | Objective\-\*(C+ source code. Note that you must link with the \fIlibobjc\fR |
| 1067 | library to make an Objective\-\*(C+ program work. Note that \fB.M\fR refers |
| 1068 | to a literal capital M. |
| 1069 | .IP "\fIfile\fR\fB.mii\fR" 4 |
| 1070 | .IX Item "file.mii" |
| 1071 | Objective\-\*(C+ source code that should not be preprocessed. |
| 1072 | .IP "\fIfile\fR\fB.h\fR" 4 |
| 1073 | .IX Item "file.h" |
| 1074 | C, \*(C+, Objective-C or Objective\-\*(C+ header file to be turned into a |
| 1075 | precompiled header (default), or C, \*(C+ header file to be turned into an |
| 1076 | Ada spec (via the \fB\-fdump\-ada\-spec\fR switch). |
| 1077 | .IP "\fIfile\fR\fB.cc\fR" 4 |
| 1078 | .IX Item "file.cc" |
| 1079 | .PD 0 |
| 1080 | .IP "\fIfile\fR\fB.cp\fR" 4 |
| 1081 | .IX Item "file.cp" |
| 1082 | .IP "\fIfile\fR\fB.cxx\fR" 4 |
| 1083 | .IX Item "file.cxx" |
| 1084 | .IP "\fIfile\fR\fB.cpp\fR" 4 |
| 1085 | .IX Item "file.cpp" |
| 1086 | .IP "\fIfile\fR\fB.CPP\fR" 4 |
| 1087 | .IX Item "file.CPP" |
| 1088 | .IP "\fIfile\fR\fB.c++\fR" 4 |
| 1089 | .IX Item "file.c++" |
| 1090 | .IP "\fIfile\fR\fB.C\fR" 4 |
| 1091 | .IX Item "file.C" |
| 1092 | .PD |
| 1093 | \&\*(C+ source code that must be preprocessed. Note that in \fB.cxx\fR, |
| 1094 | the last two letters must both be literally \fBx\fR. Likewise, |
| 1095 | \&\fB.C\fR refers to a literal capital C. |
| 1096 | .IP "\fIfile\fR\fB.mm\fR" 4 |
| 1097 | .IX Item "file.mm" |
| 1098 | .PD 0 |
| 1099 | .IP "\fIfile\fR\fB.M\fR" 4 |
| 1100 | .IX Item "file.M" |
| 1101 | .PD |
| 1102 | Objective\-\*(C+ source code that must be preprocessed. |
| 1103 | .IP "\fIfile\fR\fB.mii\fR" 4 |
| 1104 | .IX Item "file.mii" |
| 1105 | Objective\-\*(C+ source code that should not be preprocessed. |
| 1106 | .IP "\fIfile\fR\fB.hh\fR" 4 |
| 1107 | .IX Item "file.hh" |
| 1108 | .PD 0 |
| 1109 | .IP "\fIfile\fR\fB.H\fR" 4 |
| 1110 | .IX Item "file.H" |
| 1111 | .IP "\fIfile\fR\fB.hp\fR" 4 |
| 1112 | .IX Item "file.hp" |
| 1113 | .IP "\fIfile\fR\fB.hxx\fR" 4 |
| 1114 | .IX Item "file.hxx" |
| 1115 | .IP "\fIfile\fR\fB.hpp\fR" 4 |
| 1116 | .IX Item "file.hpp" |
| 1117 | .IP "\fIfile\fR\fB.HPP\fR" 4 |
| 1118 | .IX Item "file.HPP" |
| 1119 | .IP "\fIfile\fR\fB.h++\fR" 4 |
| 1120 | .IX Item "file.h++" |
| 1121 | .IP "\fIfile\fR\fB.tcc\fR" 4 |
| 1122 | .IX Item "file.tcc" |
| 1123 | .PD |
| 1124 | \&\*(C+ header file to be turned into a precompiled header or Ada spec. |
| 1125 | .IP "\fIfile\fR\fB.f\fR" 4 |
| 1126 | .IX Item "file.f" |
| 1127 | .PD 0 |
| 1128 | .IP "\fIfile\fR\fB.for\fR" 4 |
| 1129 | .IX Item "file.for" |
| 1130 | .IP "\fIfile\fR\fB.ftn\fR" 4 |
| 1131 | .IX Item "file.ftn" |
| 1132 | .PD |
| 1133 | Fixed form Fortran source code that should not be preprocessed. |
| 1134 | .IP "\fIfile\fR\fB.F\fR" 4 |
| 1135 | .IX Item "file.F" |
| 1136 | .PD 0 |
| 1137 | .IP "\fIfile\fR\fB.FOR\fR" 4 |
| 1138 | .IX Item "file.FOR" |
| 1139 | .IP "\fIfile\fR\fB.fpp\fR" 4 |
| 1140 | .IX Item "file.fpp" |
| 1141 | .IP "\fIfile\fR\fB.FPP\fR" 4 |
| 1142 | .IX Item "file.FPP" |
| 1143 | .IP "\fIfile\fR\fB.FTN\fR" 4 |
| 1144 | .IX Item "file.FTN" |
| 1145 | .PD |
| 1146 | Fixed form Fortran source code that must be preprocessed (with the traditional |
| 1147 | preprocessor). |
| 1148 | .IP "\fIfile\fR\fB.f90\fR" 4 |
| 1149 | .IX Item "file.f90" |
| 1150 | .PD 0 |
| 1151 | .IP "\fIfile\fR\fB.f95\fR" 4 |
| 1152 | .IX Item "file.f95" |
| 1153 | .IP "\fIfile\fR\fB.f03\fR" 4 |
| 1154 | .IX Item "file.f03" |
| 1155 | .IP "\fIfile\fR\fB.f08\fR" 4 |
| 1156 | .IX Item "file.f08" |
| 1157 | .PD |
| 1158 | Free form Fortran source code that should not be preprocessed. |
| 1159 | .IP "\fIfile\fR\fB.F90\fR" 4 |
| 1160 | .IX Item "file.F90" |
| 1161 | .PD 0 |
| 1162 | .IP "\fIfile\fR\fB.F95\fR" 4 |
| 1163 | .IX Item "file.F95" |
| 1164 | .IP "\fIfile\fR\fB.F03\fR" 4 |
| 1165 | .IX Item "file.F03" |
| 1166 | .IP "\fIfile\fR\fB.F08\fR" 4 |
| 1167 | .IX Item "file.F08" |
| 1168 | .PD |
| 1169 | Free form Fortran source code that must be preprocessed (with the |
| 1170 | traditional preprocessor). |
| 1171 | .IP "\fIfile\fR\fB.go\fR" 4 |
| 1172 | .IX Item "file.go" |
| 1173 | Go source code. |
| 1174 | .IP "\fIfile\fR\fB.ads\fR" 4 |
| 1175 | .IX Item "file.ads" |
| 1176 | Ada source code file that contains a library unit declaration (a |
| 1177 | declaration of a package, subprogram, or generic, or a generic |
| 1178 | instantiation), or a library unit renaming declaration (a package, |
| 1179 | generic, or subprogram renaming declaration). Such files are also |
| 1180 | called \fIspecs\fR. |
| 1181 | .IP "\fIfile\fR\fB.adb\fR" 4 |
| 1182 | .IX Item "file.adb" |
| 1183 | Ada source code file containing a library unit body (a subprogram or |
| 1184 | package body). Such files are also called \fIbodies\fR. |
| 1185 | .IP "\fIfile\fR\fB.s\fR" 4 |
| 1186 | .IX Item "file.s" |
| 1187 | Assembler code. |
| 1188 | .IP "\fIfile\fR\fB.S\fR" 4 |
| 1189 | .IX Item "file.S" |
| 1190 | .PD 0 |
| 1191 | .IP "\fIfile\fR\fB.sx\fR" 4 |
| 1192 | .IX Item "file.sx" |
| 1193 | .PD |
| 1194 | Assembler code that must be preprocessed. |
| 1195 | .IP "\fIother\fR" 4 |
| 1196 | .IX Item "other" |
| 1197 | An object file to be fed straight into linking. |
| 1198 | Any file name with no recognized suffix is treated this way. |
| 1199 | .PP |
| 1200 | You can specify the input language explicitly with the \fB\-x\fR option: |
| 1201 | .IP "\fB\-x\fR \fIlanguage\fR" 4 |
| 1202 | .IX Item "-x language" |
| 1203 | Specify explicitly the \fIlanguage\fR for the following input files |
| 1204 | (rather than letting the compiler choose a default based on the file |
| 1205 | name suffix). This option applies to all following input files until |
| 1206 | the next \fB\-x\fR option. Possible values for \fIlanguage\fR are: |
| 1207 | .Sp |
| 1208 | .Vb 9 |
| 1209 | \& c c\-header cpp\-output |
| 1210 | \& c++ c++\-header c++\-cpp\-output |
| 1211 | \& objective\-c objective\-c\-header objective\-c\-cpp\-output |
| 1212 | \& objective\-c++ objective\-c++\-header objective\-c++\-cpp\-output |
| 1213 | \& assembler assembler\-with\-cpp |
| 1214 | \& ada |
| 1215 | \& f77 f77\-cpp\-input f95 f95\-cpp\-input |
| 1216 | \& go |
| 1217 | \& java |
| 1218 | .Ve |
| 1219 | .IP "\fB\-x none\fR" 4 |
| 1220 | .IX Item "-x none" |
| 1221 | Turn off any specification of a language, so that subsequent files are |
| 1222 | handled according to their file name suffixes (as they are if \fB\-x\fR |
| 1223 | has not been used at all). |
| 1224 | .IP "\fB\-pass\-exit\-codes\fR" 4 |
| 1225 | .IX Item "-pass-exit-codes" |
| 1226 | Normally the \fBgcc\fR program exits with the code of 1 if any |
| 1227 | phase of the compiler returns a non-success return code. If you specify |
| 1228 | \&\fB\-pass\-exit\-codes\fR, the \fBgcc\fR program instead returns with |
| 1229 | the numerically highest error produced by any phase returning an error |
| 1230 | indication. The C, \*(C+, and Fortran front ends return 4 if an internal |
| 1231 | compiler error is encountered. |
| 1232 | .PP |
| 1233 | If you only want some of the stages of compilation, you can use |
| 1234 | \&\fB\-x\fR (or filename suffixes) to tell \fBgcc\fR where to start, and |
| 1235 | one of the options \fB\-c\fR, \fB\-S\fR, or \fB\-E\fR to say where |
| 1236 | \&\fBgcc\fR is to stop. Note that some combinations (for example, |
| 1237 | \&\fB\-x cpp-output \-E\fR) instruct \fBgcc\fR to do nothing at all. |
| 1238 | .IP "\fB\-c\fR" 4 |
| 1239 | .IX Item "-c" |
| 1240 | Compile or assemble the source files, but do not link. The linking |
| 1241 | stage simply is not done. The ultimate output is in the form of an |
| 1242 | object file for each source file. |
| 1243 | .Sp |
| 1244 | By default, the object file name for a source file is made by replacing |
| 1245 | the suffix \fB.c\fR, \fB.i\fR, \fB.s\fR, etc., with \fB.o\fR. |
| 1246 | .Sp |
| 1247 | Unrecognized input files, not requiring compilation or assembly, are |
| 1248 | ignored. |
| 1249 | .IP "\fB\-S\fR" 4 |
| 1250 | .IX Item "-S" |
| 1251 | Stop after the stage of compilation proper; do not assemble. The output |
| 1252 | is in the form of an assembler code file for each non-assembler input |
| 1253 | file specified. |
| 1254 | .Sp |
| 1255 | By default, the assembler file name for a source file is made by |
| 1256 | replacing the suffix \fB.c\fR, \fB.i\fR, etc., with \fB.s\fR. |
| 1257 | .Sp |
| 1258 | Input files that don't require compilation are ignored. |
| 1259 | .IP "\fB\-E\fR" 4 |
| 1260 | .IX Item "-E" |
| 1261 | Stop after the preprocessing stage; do not run the compiler proper. The |
| 1262 | output is in the form of preprocessed source code, which is sent to the |
| 1263 | standard output. |
| 1264 | .Sp |
| 1265 | Input files that don't require preprocessing are ignored. |
| 1266 | .IP "\fB\-o\fR \fIfile\fR" 4 |
| 1267 | .IX Item "-o file" |
| 1268 | Place output in file \fIfile\fR. This applies to whatever |
| 1269 | sort of output is being produced, whether it be an executable file, |
| 1270 | an object file, an assembler file or preprocessed C code. |
| 1271 | .Sp |
| 1272 | If \fB\-o\fR is not specified, the default is to put an executable |
| 1273 | file in \fIa.out\fR, the object file for |
| 1274 | \&\fI\fIsource\fI.\fIsuffix\fI\fR in \fI\fIsource\fI.o\fR, its |
| 1275 | assembler file in \fI\fIsource\fI.s\fR, a precompiled header file in |
| 1276 | \&\fI\fIsource\fI.\fIsuffix\fI.gch\fR, and all preprocessed C source on |
| 1277 | standard output. |
| 1278 | .IP "\fB\-v\fR" 4 |
| 1279 | .IX Item "-v" |
| 1280 | Print (on standard error output) the commands executed to run the stages |
| 1281 | of compilation. Also print the version number of the compiler driver |
| 1282 | program and of the preprocessor and the compiler proper. |
| 1283 | .IP "\fB\-###\fR" 4 |
| 1284 | .IX Item "-###" |
| 1285 | Like \fB\-v\fR except the commands are not executed and arguments |
| 1286 | are quoted unless they contain only alphanumeric characters or \f(CW\*(C`./\-_\*(C'\fR. |
| 1287 | This is useful for shell scripts to capture the driver-generated command lines. |
| 1288 | .IP "\fB\-pipe\fR" 4 |
| 1289 | .IX Item "-pipe" |
| 1290 | Use pipes rather than temporary files for communication between the |
| 1291 | various stages of compilation. This fails to work on some systems where |
| 1292 | the assembler is unable to read from a pipe; but the \s-1GNU\s0 assembler has |
| 1293 | no trouble. |
| 1294 | .IP "\fB\-\-help\fR" 4 |
| 1295 | .IX Item "--help" |
| 1296 | Print (on the standard output) a description of the command-line options |
| 1297 | understood by \fBgcc\fR. If the \fB\-v\fR option is also specified |
| 1298 | then \fB\-\-help\fR is also passed on to the various processes |
| 1299 | invoked by \fBgcc\fR, so that they can display the command-line options |
| 1300 | they accept. If the \fB\-Wextra\fR option has also been specified |
| 1301 | (prior to the \fB\-\-help\fR option), then command-line options that |
| 1302 | have no documentation associated with them are also displayed. |
| 1303 | .IP "\fB\-\-target\-help\fR" 4 |
| 1304 | .IX Item "--target-help" |
| 1305 | Print (on the standard output) a description of target-specific command-line |
| 1306 | options for each tool. For some targets extra target-specific |
| 1307 | information may also be printed. |
| 1308 | .IP "\fB\-\-help={\fR\fIclass\fR|[\fB^\fR]\fIqualifier\fR\fB}\fR[\fB,...\fR]" 4 |
| 1309 | .IX Item "--help={class|[^]qualifier}[,...]" |
| 1310 | Print (on the standard output) a description of the command-line |
| 1311 | options understood by the compiler that fit into all specified classes |
| 1312 | and qualifiers. These are the supported classes: |
| 1313 | .RS 4 |
| 1314 | .IP "\fBoptimizers\fR" 4 |
| 1315 | .IX Item "optimizers" |
| 1316 | Display all of the optimization options supported by the |
| 1317 | compiler. |
| 1318 | .IP "\fBwarnings\fR" 4 |
| 1319 | .IX Item "warnings" |
| 1320 | Display all of the options controlling warning messages |
| 1321 | produced by the compiler. |
| 1322 | .IP "\fBtarget\fR" 4 |
| 1323 | .IX Item "target" |
| 1324 | Display target-specific options. Unlike the |
| 1325 | \&\fB\-\-target\-help\fR option however, target-specific options of the |
| 1326 | linker and assembler are not displayed. This is because those |
| 1327 | tools do not currently support the extended \fB\-\-help=\fR syntax. |
| 1328 | .IP "\fBparams\fR" 4 |
| 1329 | .IX Item "params" |
| 1330 | Display the values recognized by the \fB\-\-param\fR |
| 1331 | option. |
| 1332 | .IP "\fIlanguage\fR" 4 |
| 1333 | .IX Item "language" |
| 1334 | Display the options supported for \fIlanguage\fR, where |
| 1335 | \&\fIlanguage\fR is the name of one of the languages supported in this |
| 1336 | version of \s-1GCC\s0. |
| 1337 | .IP "\fBcommon\fR" 4 |
| 1338 | .IX Item "common" |
| 1339 | Display the options that are common to all languages. |
| 1340 | .RE |
| 1341 | .RS 4 |
| 1342 | .Sp |
| 1343 | These are the supported qualifiers: |
| 1344 | .IP "\fBundocumented\fR" 4 |
| 1345 | .IX Item "undocumented" |
| 1346 | Display only those options that are undocumented. |
| 1347 | .IP "\fBjoined\fR" 4 |
| 1348 | .IX Item "joined" |
| 1349 | Display options taking an argument that appears after an equal |
| 1350 | sign in the same continuous piece of text, such as: |
| 1351 | \&\fB\-\-help=target\fR. |
| 1352 | .IP "\fBseparate\fR" 4 |
| 1353 | .IX Item "separate" |
| 1354 | Display options taking an argument that appears as a separate word |
| 1355 | following the original option, such as: \fB\-o output-file\fR. |
| 1356 | .RE |
| 1357 | .RS 4 |
| 1358 | .Sp |
| 1359 | Thus for example to display all the undocumented target-specific |
| 1360 | switches supported by the compiler, use: |
| 1361 | .Sp |
| 1362 | .Vb 1 |
| 1363 | \& \-\-help=target,undocumented |
| 1364 | .Ve |
| 1365 | .Sp |
| 1366 | The sense of a qualifier can be inverted by prefixing it with the |
| 1367 | \&\fB^\fR character, so for example to display all binary warning |
| 1368 | options (i.e., ones that are either on or off and that do not take an |
| 1369 | argument) that have a description, use: |
| 1370 | .Sp |
| 1371 | .Vb 1 |
| 1372 | \& \-\-help=warnings,^joined,^undocumented |
| 1373 | .Ve |
| 1374 | .Sp |
| 1375 | The argument to \fB\-\-help=\fR should not consist solely of inverted |
| 1376 | qualifiers. |
| 1377 | .Sp |
| 1378 | Combining several classes is possible, although this usually |
| 1379 | restricts the output so much that there is nothing to display. One |
| 1380 | case where it does work, however, is when one of the classes is |
| 1381 | \&\fItarget\fR. For example, to display all the target-specific |
| 1382 | optimization options, use: |
| 1383 | .Sp |
| 1384 | .Vb 1 |
| 1385 | \& \-\-help=target,optimizers |
| 1386 | .Ve |
| 1387 | .Sp |
| 1388 | The \fB\-\-help=\fR option can be repeated on the command line. Each |
| 1389 | successive use displays its requested class of options, skipping |
| 1390 | those that have already been displayed. |
| 1391 | .Sp |
| 1392 | If the \fB\-Q\fR option appears on the command line before the |
| 1393 | \&\fB\-\-help=\fR option, then the descriptive text displayed by |
| 1394 | \&\fB\-\-help=\fR is changed. Instead of describing the displayed |
| 1395 | options, an indication is given as to whether the option is enabled, |
| 1396 | disabled or set to a specific value (assuming that the compiler |
| 1397 | knows this at the point where the \fB\-\-help=\fR option is used). |
| 1398 | .Sp |
| 1399 | Here is a truncated example from the \s-1ARM\s0 port of \fBgcc\fR: |
| 1400 | .Sp |
| 1401 | .Vb 5 |
| 1402 | \& % gcc \-Q \-mabi=2 \-\-help=target \-c |
| 1403 | \& The following options are target specific: |
| 1404 | \& \-mabi= 2 |
| 1405 | \& \-mabort\-on\-noreturn [disabled] |
| 1406 | \& \-mapcs [disabled] |
| 1407 | .Ve |
| 1408 | .Sp |
| 1409 | The output is sensitive to the effects of previous command-line |
| 1410 | options, so for example it is possible to find out which optimizations |
| 1411 | are enabled at \fB\-O2\fR by using: |
| 1412 | .Sp |
| 1413 | .Vb 1 |
| 1414 | \& \-Q \-O2 \-\-help=optimizers |
| 1415 | .Ve |
| 1416 | .Sp |
| 1417 | Alternatively you can discover which binary optimizations are enabled |
| 1418 | by \fB\-O3\fR by using: |
| 1419 | .Sp |
| 1420 | .Vb 3 |
| 1421 | \& gcc \-c \-Q \-O3 \-\-help=optimizers > /tmp/O3\-opts |
| 1422 | \& gcc \-c \-Q \-O2 \-\-help=optimizers > /tmp/O2\-opts |
| 1423 | \& diff /tmp/O2\-opts /tmp/O3\-opts | grep enabled |
| 1424 | .Ve |
| 1425 | .RE |
| 1426 | .IP "\fB\-no\-canonical\-prefixes\fR" 4 |
| 1427 | .IX Item "-no-canonical-prefixes" |
| 1428 | Do not expand any symbolic links, resolve references to \fB/../\fR |
| 1429 | or \fB/./\fR, or make the path absolute when generating a relative |
| 1430 | prefix. |
| 1431 | .IP "\fB\-\-version\fR" 4 |
| 1432 | .IX Item "--version" |
| 1433 | Display the version number and copyrights of the invoked \s-1GCC\s0. |
| 1434 | .IP "\fB\-wrapper\fR" 4 |
| 1435 | .IX Item "-wrapper" |
| 1436 | Invoke all subcommands under a wrapper program. The name of the |
| 1437 | wrapper program and its parameters are passed as a comma separated |
| 1438 | list. |
| 1439 | .Sp |
| 1440 | .Vb 1 |
| 1441 | \& gcc \-c t.c \-wrapper gdb,\-\-args |
| 1442 | .Ve |
| 1443 | .Sp |
| 1444 | This invokes all subprograms of \fBgcc\fR under |
| 1445 | \&\fBgdb \-\-args\fR, thus the invocation of \fBcc1\fR is |
| 1446 | \&\fBgdb \-\-args cc1 ...\fR. |
| 1447 | .IP "\fB\-fplugin=\fR\fIname\fR\fB.so\fR" 4 |
| 1448 | .IX Item "-fplugin=name.so" |
| 1449 | Load the plugin code in file \fIname\fR.so, assumed to be a |
| 1450 | shared object to be dlopen'd by the compiler. The base name of |
| 1451 | the shared object file is used to identify the plugin for the |
| 1452 | purposes of argument parsing (See |
| 1453 | \&\fB\-fplugin\-arg\-\fR\fIname\fR\fB\-\fR\fIkey\fR\fB=\fR\fIvalue\fR below). |
| 1454 | Each plugin should define the callback functions specified in the |
| 1455 | Plugins \s-1API\s0. |
| 1456 | .IP "\fB\-fplugin\-arg\-\fR\fIname\fR\fB\-\fR\fIkey\fR\fB=\fR\fIvalue\fR" 4 |
| 1457 | .IX Item "-fplugin-arg-name-key=value" |
| 1458 | Define an argument called \fIkey\fR with a value of \fIvalue\fR |
| 1459 | for the plugin called \fIname\fR. |
| 1460 | .IP "\fB\-fdump\-ada\-spec\fR[\fB\-slim\fR]" 4 |
| 1461 | .IX Item "-fdump-ada-spec[-slim]" |
| 1462 | For C and \*(C+ source and include files, generate corresponding Ada |
| 1463 | specs. |
| 1464 | .IP "\fB\-fdump\-go\-spec=\fR\fIfile\fR" 4 |
| 1465 | .IX Item "-fdump-go-spec=file" |
| 1466 | For input files in any language, generate corresponding Go |
| 1467 | declarations in \fIfile\fR. This generates Go \f(CW\*(C`const\*(C'\fR, |
| 1468 | \&\f(CW\*(C`type\*(C'\fR, \f(CW\*(C`var\*(C'\fR, and \f(CW\*(C`func\*(C'\fR declarations which may be a |
| 1469 | useful way to start writing a Go interface to code written in some |
| 1470 | other language. |
| 1471 | .IP "\fB@\fR\fIfile\fR" 4 |
| 1472 | .IX Item "@file" |
| 1473 | Read command-line options from \fIfile\fR. The options read are |
| 1474 | inserted in place of the original @\fIfile\fR option. If \fIfile\fR |
| 1475 | does not exist, or cannot be read, then the option will be treated |
| 1476 | literally, and not removed. |
| 1477 | .Sp |
| 1478 | Options in \fIfile\fR are separated by whitespace. A whitespace |
| 1479 | character may be included in an option by surrounding the entire |
| 1480 | option in either single or double quotes. Any character (including a |
| 1481 | backslash) may be included by prefixing the character to be included |
| 1482 | with a backslash. The \fIfile\fR may itself contain additional |
| 1483 | @\fIfile\fR options; any such options will be processed recursively. |
| 1484 | .SS "Compiling \*(C+ Programs" |
| 1485 | .IX Subsection "Compiling Programs" |
| 1486 | \&\*(C+ source files conventionally use one of the suffixes \fB.C\fR, |
| 1487 | \&\fB.cc\fR, \fB.cpp\fR, \fB.CPP\fR, \fB.c++\fR, \fB.cp\fR, or |
| 1488 | \&\fB.cxx\fR; \*(C+ header files often use \fB.hh\fR, \fB.hpp\fR, |
| 1489 | \&\fB.H\fR, or (for shared template code) \fB.tcc\fR; and |
| 1490 | preprocessed \*(C+ files use the suffix \fB.ii\fR. \s-1GCC\s0 recognizes |
| 1491 | files with these names and compiles them as \*(C+ programs even if you |
| 1492 | call the compiler the same way as for compiling C programs (usually |
| 1493 | with the name \fBgcc\fR). |
| 1494 | .PP |
| 1495 | However, the use of \fBgcc\fR does not add the \*(C+ library. |
| 1496 | \&\fBg++\fR is a program that calls \s-1GCC\s0 and automatically specifies linking |
| 1497 | against the \*(C+ library. It treats \fB.c\fR, |
| 1498 | \&\fB.h\fR and \fB.i\fR files as \*(C+ source files instead of C source |
| 1499 | files unless \fB\-x\fR is used. This program is also useful when |
| 1500 | precompiling a C header file with a \fB.h\fR extension for use in \*(C+ |
| 1501 | compilations. On many systems, \fBg++\fR is also installed with |
| 1502 | the name \fBc++\fR. |
| 1503 | .PP |
| 1504 | When you compile \*(C+ programs, you may specify many of the same |
| 1505 | command-line options that you use for compiling programs in any |
| 1506 | language; or command-line options meaningful for C and related |
| 1507 | languages; or options that are meaningful only for \*(C+ programs. |
| 1508 | .SS "Options Controlling C Dialect" |
| 1509 | .IX Subsection "Options Controlling C Dialect" |
| 1510 | The following options control the dialect of C (or languages derived |
| 1511 | from C, such as \*(C+, Objective-C and Objective\-\*(C+) that the compiler |
| 1512 | accepts: |
| 1513 | .IP "\fB\-ansi\fR" 4 |
| 1514 | .IX Item "-ansi" |
| 1515 | In C mode, this is equivalent to \fB\-std=c90\fR. In \*(C+ mode, it is |
| 1516 | equivalent to \fB\-std=c++98\fR. |
| 1517 | .Sp |
| 1518 | This turns off certain features of \s-1GCC\s0 that are incompatible with \s-1ISO\s0 |
| 1519 | C90 (when compiling C code), or of standard \*(C+ (when compiling \*(C+ code), |
| 1520 | such as the \f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`typeof\*(C'\fR keywords, and |
| 1521 | predefined macros such as \f(CW\*(C`unix\*(C'\fR and \f(CW\*(C`vax\*(C'\fR that identify the |
| 1522 | type of system you are using. It also enables the undesirable and |
| 1523 | rarely used \s-1ISO\s0 trigraph feature. For the C compiler, |
| 1524 | it disables recognition of \*(C+ style \fB//\fR comments as well as |
| 1525 | the \f(CW\*(C`inline\*(C'\fR keyword. |
| 1526 | .Sp |
| 1527 | The alternate keywords \f(CW\*(C`_\|_asm_\|_\*(C'\fR, \f(CW\*(C`_\|_extension_\|_\*(C'\fR, |
| 1528 | \&\f(CW\*(C`_\|_inline_\|_\*(C'\fR and \f(CW\*(C`_\|_typeof_\|_\*(C'\fR continue to work despite |
| 1529 | \&\fB\-ansi\fR. You would not want to use them in an \s-1ISO\s0 C program, of |
| 1530 | course, but it is useful to put them in header files that might be included |
| 1531 | in compilations done with \fB\-ansi\fR. Alternate predefined macros |
| 1532 | such as \f(CW\*(C`_\|_unix_\|_\*(C'\fR and \f(CW\*(C`_\|_vax_\|_\*(C'\fR are also available, with or |
| 1533 | without \fB\-ansi\fR. |
| 1534 | .Sp |
| 1535 | The \fB\-ansi\fR option does not cause non-ISO programs to be |
| 1536 | rejected gratuitously. For that, \fB\-Wpedantic\fR is required in |
| 1537 | addition to \fB\-ansi\fR. |
| 1538 | .Sp |
| 1539 | The macro \f(CW\*(C`_\|_STRICT_ANSI_\|_\*(C'\fR is predefined when the \fB\-ansi\fR |
| 1540 | option is used. Some header files may notice this macro and refrain |
| 1541 | from declaring certain functions or defining certain macros that the |
| 1542 | \&\s-1ISO\s0 standard doesn't call for; this is to avoid interfering with any |
| 1543 | programs that might use these names for other things. |
| 1544 | .Sp |
| 1545 | Functions that are normally built in but do not have semantics |
| 1546 | defined by \s-1ISO\s0 C (such as \f(CW\*(C`alloca\*(C'\fR and \f(CW\*(C`ffs\*(C'\fR) are not built-in |
| 1547 | functions when \fB\-ansi\fR is used. |
| 1548 | .IP "\fB\-std=\fR" 4 |
| 1549 | .IX Item "-std=" |
| 1550 | Determine the language standard. This option |
| 1551 | is currently only supported when compiling C or \*(C+. |
| 1552 | .Sp |
| 1553 | The compiler can accept several base standards, such as \fBc90\fR or |
| 1554 | \&\fBc++98\fR, and \s-1GNU\s0 dialects of those standards, such as |
| 1555 | \&\fBgnu90\fR or \fBgnu++98\fR. When a base standard is specified, the |
| 1556 | compiler accepts all programs following that standard plus those |
| 1557 | using \s-1GNU\s0 extensions that do not contradict it. For example, |
| 1558 | \&\fB\-std=c90\fR turns off certain features of \s-1GCC\s0 that are |
| 1559 | incompatible with \s-1ISO\s0 C90, such as the \f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`typeof\*(C'\fR |
| 1560 | keywords, but not other \s-1GNU\s0 extensions that do not have a meaning in |
| 1561 | \&\s-1ISO\s0 C90, such as omitting the middle term of a \f(CW\*(C`?:\*(C'\fR |
| 1562 | expression. On the other hand, when a \s-1GNU\s0 dialect of a standard is |
| 1563 | specified, all features supported by the compiler are enabled, even when |
| 1564 | those features change the meaning of the base standard. As a result, some |
| 1565 | strict-conforming programs may be rejected. The particular standard |
| 1566 | is used by \fB\-Wpedantic\fR to identify which features are \s-1GNU\s0 |
| 1567 | extensions given that version of the standard. For example |
| 1568 | \&\fB\-std=gnu90 \-Wpedantic\fR warns about \*(C+ style \fB//\fR |
| 1569 | comments, while \fB\-std=gnu99 \-Wpedantic\fR does not. |
| 1570 | .Sp |
| 1571 | A value for this option must be provided; possible values are |
| 1572 | .RS 4 |
| 1573 | .IP "\fBc90\fR" 4 |
| 1574 | .IX Item "c90" |
| 1575 | .PD 0 |
| 1576 | .IP "\fBc89\fR" 4 |
| 1577 | .IX Item "c89" |
| 1578 | .IP "\fBiso9899:1990\fR" 4 |
| 1579 | .IX Item "iso9899:1990" |
| 1580 | .PD |
| 1581 | Support all \s-1ISO\s0 C90 programs (certain \s-1GNU\s0 extensions that conflict |
| 1582 | with \s-1ISO\s0 C90 are disabled). Same as \fB\-ansi\fR for C code. |
| 1583 | .IP "\fBiso9899:199409\fR" 4 |
| 1584 | .IX Item "iso9899:199409" |
| 1585 | \&\s-1ISO\s0 C90 as modified in amendment 1. |
| 1586 | .IP "\fBc99\fR" 4 |
| 1587 | .IX Item "c99" |
| 1588 | .PD 0 |
| 1589 | .IP "\fBc9x\fR" 4 |
| 1590 | .IX Item "c9x" |
| 1591 | .IP "\fBiso9899:1999\fR" 4 |
| 1592 | .IX Item "iso9899:1999" |
| 1593 | .IP "\fBiso9899:199x\fR" 4 |
| 1594 | .IX Item "iso9899:199x" |
| 1595 | .PD |
| 1596 | \&\s-1ISO\s0 C99. Note that this standard is not yet fully supported; see |
| 1597 | <\fBhttp://gcc.gnu.org/c99status.html\fR> for more information. The |
| 1598 | names \fBc9x\fR and \fBiso9899:199x\fR are deprecated. |
| 1599 | .IP "\fBc11\fR" 4 |
| 1600 | .IX Item "c11" |
| 1601 | .PD 0 |
| 1602 | .IP "\fBc1x\fR" 4 |
| 1603 | .IX Item "c1x" |
| 1604 | .IP "\fBiso9899:2011\fR" 4 |
| 1605 | .IX Item "iso9899:2011" |
| 1606 | .PD |
| 1607 | \&\s-1ISO\s0 C11, the 2011 revision of the \s-1ISO\s0 C standard. |
| 1608 | Support is incomplete and experimental. The name \fBc1x\fR is |
| 1609 | deprecated. |
| 1610 | .IP "\fBgnu90\fR" 4 |
| 1611 | .IX Item "gnu90" |
| 1612 | .PD 0 |
| 1613 | .IP "\fBgnu89\fR" 4 |
| 1614 | .IX Item "gnu89" |
| 1615 | .PD |
| 1616 | \&\s-1GNU\s0 dialect of \s-1ISO\s0 C90 (including some C99 features). This |
| 1617 | is the default for C code. |
| 1618 | .IP "\fBgnu99\fR" 4 |
| 1619 | .IX Item "gnu99" |
| 1620 | .PD 0 |
| 1621 | .IP "\fBgnu9x\fR" 4 |
| 1622 | .IX Item "gnu9x" |
| 1623 | .PD |
| 1624 | \&\s-1GNU\s0 dialect of \s-1ISO\s0 C99. When \s-1ISO\s0 C99 is fully implemented in \s-1GCC\s0, |
| 1625 | this will become the default. The name \fBgnu9x\fR is deprecated. |
| 1626 | .IP "\fBgnu11\fR" 4 |
| 1627 | .IX Item "gnu11" |
| 1628 | .PD 0 |
| 1629 | .IP "\fBgnu1x\fR" 4 |
| 1630 | .IX Item "gnu1x" |
| 1631 | .PD |
| 1632 | \&\s-1GNU\s0 dialect of \s-1ISO\s0 C11. Support is incomplete and experimental. The |
| 1633 | name \fBgnu1x\fR is deprecated. |
| 1634 | .IP "\fBc++98\fR" 4 |
| 1635 | .IX Item "c++98" |
| 1636 | .PD 0 |
| 1637 | .IP "\fBc++03\fR" 4 |
| 1638 | .IX Item "c++03" |
| 1639 | .PD |
| 1640 | The 1998 \s-1ISO\s0 \*(C+ standard plus the 2003 technical corrigendum and some |
| 1641 | additional defect reports. Same as \fB\-ansi\fR for \*(C+ code. |
| 1642 | .IP "\fBgnu++98\fR" 4 |
| 1643 | .IX Item "gnu++98" |
| 1644 | .PD 0 |
| 1645 | .IP "\fBgnu++03\fR" 4 |
| 1646 | .IX Item "gnu++03" |
| 1647 | .PD |
| 1648 | \&\s-1GNU\s0 dialect of \fB\-std=c++98\fR. This is the default for |
| 1649 | \&\*(C+ code. |
| 1650 | .IP "\fBc++11\fR" 4 |
| 1651 | .IX Item "c++11" |
| 1652 | .PD 0 |
| 1653 | .IP "\fBc++0x\fR" 4 |
| 1654 | .IX Item "c++0x" |
| 1655 | .PD |
| 1656 | The 2011 \s-1ISO\s0 \*(C+ standard plus amendments. Support for \*(C+11 is still |
| 1657 | experimental, and may change in incompatible ways in future releases. |
| 1658 | The name \fBc++0x\fR is deprecated. |
| 1659 | .IP "\fBgnu++11\fR" 4 |
| 1660 | .IX Item "gnu++11" |
| 1661 | .PD 0 |
| 1662 | .IP "\fBgnu++0x\fR" 4 |
| 1663 | .IX Item "gnu++0x" |
| 1664 | .PD |
| 1665 | \&\s-1GNU\s0 dialect of \fB\-std=c++11\fR. Support for \*(C+11 is still |
| 1666 | experimental, and may change in incompatible ways in future releases. |
| 1667 | The name \fBgnu++0x\fR is deprecated. |
| 1668 | .IP "\fBc++1y\fR" 4 |
| 1669 | .IX Item "c++1y" |
| 1670 | The next revision of the \s-1ISO\s0 \*(C+ standard, tentatively planned for |
| 1671 | 2017. Support is highly experimental, and will almost certainly |
| 1672 | change in incompatible ways in future releases. |
| 1673 | .IP "\fBgnu++1y\fR" 4 |
| 1674 | .IX Item "gnu++1y" |
| 1675 | \&\s-1GNU\s0 dialect of \fB\-std=c++1y\fR. Support is highly experimental, |
| 1676 | and will almost certainly change in incompatible ways in future |
| 1677 | releases. |
| 1678 | .RE |
| 1679 | .RS 4 |
| 1680 | .RE |
| 1681 | .IP "\fB\-fgnu89\-inline\fR" 4 |
| 1682 | .IX Item "-fgnu89-inline" |
| 1683 | The option \fB\-fgnu89\-inline\fR tells \s-1GCC\s0 to use the traditional |
| 1684 | \&\s-1GNU\s0 semantics for \f(CW\*(C`inline\*(C'\fR functions when in C99 mode. |
| 1685 | This option |
| 1686 | is accepted and ignored by \s-1GCC\s0 versions 4.1.3 up to but not including |
| 1687 | 4.3. In \s-1GCC\s0 versions 4.3 and later it changes the behavior of \s-1GCC\s0 in |
| 1688 | C99 mode. Using this option is roughly equivalent to adding the |
| 1689 | \&\f(CW\*(C`gnu_inline\*(C'\fR function attribute to all inline functions. |
| 1690 | .Sp |
| 1691 | The option \fB\-fno\-gnu89\-inline\fR explicitly tells \s-1GCC\s0 to use the |
| 1692 | C99 semantics for \f(CW\*(C`inline\*(C'\fR when in C99 or gnu99 mode (i.e., it |
| 1693 | specifies the default behavior). This option was first supported in |
| 1694 | \&\s-1GCC\s0 4.3. This option is not supported in \fB\-std=c90\fR or |
| 1695 | \&\fB\-std=gnu90\fR mode. |
| 1696 | .Sp |
| 1697 | The preprocessor macros \f(CW\*(C`_\|_GNUC_GNU_INLINE_\|_\*(C'\fR and |
| 1698 | \&\f(CW\*(C`_\|_GNUC_STDC_INLINE_\|_\*(C'\fR may be used to check which semantics are |
| 1699 | in effect for \f(CW\*(C`inline\*(C'\fR functions. |
| 1700 | .IP "\fB\-aux\-info\fR \fIfilename\fR" 4 |
| 1701 | .IX Item "-aux-info filename" |
| 1702 | Output to the given filename prototyped declarations for all functions |
| 1703 | declared and/or defined in a translation unit, including those in header |
| 1704 | files. This option is silently ignored in any language other than C. |
| 1705 | .Sp |
| 1706 | Besides declarations, the file indicates, in comments, the origin of |
| 1707 | each declaration (source file and line), whether the declaration was |
| 1708 | implicit, prototyped or unprototyped (\fBI\fR, \fBN\fR for new or |
| 1709 | \&\fBO\fR for old, respectively, in the first character after the line |
| 1710 | number and the colon), and whether it came from a declaration or a |
| 1711 | definition (\fBC\fR or \fBF\fR, respectively, in the following |
| 1712 | character). In the case of function definitions, a K&R\-style list of |
| 1713 | arguments followed by their declarations is also provided, inside |
| 1714 | comments, after the declaration. |
| 1715 | .IP "\fB\-fallow\-parameterless\-variadic\-functions\fR" 4 |
| 1716 | .IX Item "-fallow-parameterless-variadic-functions" |
| 1717 | Accept variadic functions without named parameters. |
| 1718 | .Sp |
| 1719 | Although it is possible to define such a function, this is not very |
| 1720 | useful as it is not possible to read the arguments. This is only |
| 1721 | supported for C as this construct is allowed by \*(C+. |
| 1722 | .IP "\fB\-fno\-asm\fR" 4 |
| 1723 | .IX Item "-fno-asm" |
| 1724 | Do not recognize \f(CW\*(C`asm\*(C'\fR, \f(CW\*(C`inline\*(C'\fR or \f(CW\*(C`typeof\*(C'\fR as a |
| 1725 | keyword, so that code can use these words as identifiers. You can use |
| 1726 | the keywords \f(CW\*(C`_\|_asm_\|_\*(C'\fR, \f(CW\*(C`_\|_inline_\|_\*(C'\fR and \f(CW\*(C`_\|_typeof_\|_\*(C'\fR |
| 1727 | instead. \fB\-ansi\fR implies \fB\-fno\-asm\fR. |
| 1728 | .Sp |
| 1729 | In \*(C+, this switch only affects the \f(CW\*(C`typeof\*(C'\fR keyword, since |
| 1730 | \&\f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`inline\*(C'\fR are standard keywords. You may want to |
| 1731 | use the \fB\-fno\-gnu\-keywords\fR flag instead, which has the same |
| 1732 | effect. In C99 mode (\fB\-std=c99\fR or \fB\-std=gnu99\fR), this |
| 1733 | switch only affects the \f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`typeof\*(C'\fR keywords, since |
| 1734 | \&\f(CW\*(C`inline\*(C'\fR is a standard keyword in \s-1ISO\s0 C99. |
| 1735 | .IP "\fB\-fno\-builtin\fR" 4 |
| 1736 | .IX Item "-fno-builtin" |
| 1737 | .PD 0 |
| 1738 | .IP "\fB\-fno\-builtin\-\fR\fIfunction\fR" 4 |
| 1739 | .IX Item "-fno-builtin-function" |
| 1740 | .PD |
| 1741 | Don't recognize built-in functions that do not begin with |
| 1742 | \&\fB_\|_builtin_\fR as prefix. |
| 1743 | .Sp |
| 1744 | \&\s-1GCC\s0 normally generates special code to handle certain built-in functions |
| 1745 | more efficiently; for instance, calls to \f(CW\*(C`alloca\*(C'\fR may become single |
| 1746 | instructions which adjust the stack directly, and calls to \f(CW\*(C`memcpy\*(C'\fR |
| 1747 | may become inline copy loops. The resulting code is often both smaller |
| 1748 | and faster, but since the function calls no longer appear as such, you |
| 1749 | cannot set a breakpoint on those calls, nor can you change the behavior |
| 1750 | of the functions by linking with a different library. In addition, |
| 1751 | when a function is recognized as a built-in function, \s-1GCC\s0 may use |
| 1752 | information about that function to warn about problems with calls to |
| 1753 | that function, or to generate more efficient code, even if the |
| 1754 | resulting code still contains calls to that function. For example, |
| 1755 | warnings are given with \fB\-Wformat\fR for bad calls to |
| 1756 | \&\f(CW\*(C`printf\*(C'\fR when \f(CW\*(C`printf\*(C'\fR is built in and \f(CW\*(C`strlen\*(C'\fR is |
| 1757 | known not to modify global memory. |
| 1758 | .Sp |
| 1759 | With the \fB\-fno\-builtin\-\fR\fIfunction\fR option |
| 1760 | only the built-in function \fIfunction\fR is |
| 1761 | disabled. \fIfunction\fR must not begin with \fB_\|_builtin_\fR. If a |
| 1762 | function is named that is not built-in in this version of \s-1GCC\s0, this |
| 1763 | option is ignored. There is no corresponding |
| 1764 | \&\fB\-fbuiltin\-\fR\fIfunction\fR option; if you wish to enable |
| 1765 | built-in functions selectively when using \fB\-fno\-builtin\fR or |
| 1766 | \&\fB\-ffreestanding\fR, you may define macros such as: |
| 1767 | .Sp |
| 1768 | .Vb 2 |
| 1769 | \& #define abs(n) _\|_builtin_abs ((n)) |
| 1770 | \& #define strcpy(d, s) _\|_builtin_strcpy ((d), (s)) |
| 1771 | .Ve |
| 1772 | .IP "\fB\-fhosted\fR" 4 |
| 1773 | .IX Item "-fhosted" |
| 1774 | Assert that compilation targets a hosted environment. This implies |
| 1775 | \&\fB\-fbuiltin\fR. A hosted environment is one in which the |
| 1776 | entire standard library is available, and in which \f(CW\*(C`main\*(C'\fR has a return |
| 1777 | type of \f(CW\*(C`int\*(C'\fR. Examples are nearly everything except a kernel. |
| 1778 | This is equivalent to \fB\-fno\-freestanding\fR. |
| 1779 | .IP "\fB\-ffreestanding\fR" 4 |
| 1780 | .IX Item "-ffreestanding" |
| 1781 | Assert that compilation targets a freestanding environment. This |
| 1782 | implies \fB\-fno\-builtin\fR. A freestanding environment |
| 1783 | is one in which the standard library may not exist, and program startup may |
| 1784 | not necessarily be at \f(CW\*(C`main\*(C'\fR. The most obvious example is an \s-1OS\s0 kernel. |
| 1785 | This is equivalent to \fB\-fno\-hosted\fR. |
| 1786 | .IP "\fB\-fopenmp\fR" 4 |
| 1787 | .IX Item "-fopenmp" |
| 1788 | Enable handling of OpenMP directives \f(CW\*(C`#pragma omp\*(C'\fR in C/\*(C+ and |
| 1789 | \&\f(CW\*(C`!$omp\*(C'\fR in Fortran. When \fB\-fopenmp\fR is specified, the |
| 1790 | compiler generates parallel code according to the OpenMP Application |
| 1791 | Program Interface v3.0 <\fBhttp://www.openmp.org/\fR>. This option |
| 1792 | implies \fB\-pthread\fR, and thus is only supported on targets that |
| 1793 | have support for \fB\-pthread\fR. |
| 1794 | .IP "\fB\-fgnu\-tm\fR" 4 |
| 1795 | .IX Item "-fgnu-tm" |
| 1796 | When the option \fB\-fgnu\-tm\fR is specified, the compiler |
| 1797 | generates code for the Linux variant of Intel's current Transactional |
| 1798 | Memory \s-1ABI\s0 specification document (Revision 1.1, May 6 2009). This is |
| 1799 | an experimental feature whose interface may change in future versions |
| 1800 | of \s-1GCC\s0, as the official specification changes. Please note that not |
| 1801 | all architectures are supported for this feature. |
| 1802 | .Sp |
| 1803 | For more information on \s-1GCC\s0's support for transactional memory, |
| 1804 | .Sp |
| 1805 | Note that the transactional memory feature is not supported with |
| 1806 | non-call exceptions (\fB\-fnon\-call\-exceptions\fR). |
| 1807 | .IP "\fB\-fms\-extensions\fR" 4 |
| 1808 | .IX Item "-fms-extensions" |
| 1809 | Accept some non-standard constructs used in Microsoft header files. |
| 1810 | .Sp |
| 1811 | In \*(C+ code, this allows member names in structures to be similar |
| 1812 | to previous types declarations. |
| 1813 | .Sp |
| 1814 | .Vb 4 |
| 1815 | \& typedef int UOW; |
| 1816 | \& struct ABC { |
| 1817 | \& UOW UOW; |
| 1818 | \& }; |
| 1819 | .Ve |
| 1820 | .Sp |
| 1821 | Some cases of unnamed fields in structures and unions are only |
| 1822 | accepted with this option. |
| 1823 | .IP "\fB\-fplan9\-extensions\fR" 4 |
| 1824 | .IX Item "-fplan9-extensions" |
| 1825 | Accept some non-standard constructs used in Plan 9 code. |
| 1826 | .Sp |
| 1827 | This enables \fB\-fms\-extensions\fR, permits passing pointers to |
| 1828 | structures with anonymous fields to functions that expect pointers to |
| 1829 | elements of the type of the field, and permits referring to anonymous |
| 1830 | fields declared using a typedef. This is only |
| 1831 | supported for C, not \*(C+. |
| 1832 | .IP "\fB\-trigraphs\fR" 4 |
| 1833 | .IX Item "-trigraphs" |
| 1834 | Support \s-1ISO\s0 C trigraphs. The \fB\-ansi\fR option (and \fB\-std\fR |
| 1835 | options for strict \s-1ISO\s0 C conformance) implies \fB\-trigraphs\fR. |
| 1836 | .IP "\fB\-traditional\fR" 4 |
| 1837 | .IX Item "-traditional" |
| 1838 | .PD 0 |
| 1839 | .IP "\fB\-traditional\-cpp\fR" 4 |
| 1840 | .IX Item "-traditional-cpp" |
| 1841 | .PD |
| 1842 | Formerly, these options caused \s-1GCC\s0 to attempt to emulate a pre-standard |
| 1843 | C compiler. They are now only supported with the \fB\-E\fR switch. |
| 1844 | The preprocessor continues to support a pre-standard mode. See the \s-1GNU\s0 |
| 1845 | \&\s-1CPP\s0 manual for details. |
| 1846 | .IP "\fB\-fcond\-mismatch\fR" 4 |
| 1847 | .IX Item "-fcond-mismatch" |
| 1848 | Allow conditional expressions with mismatched types in the second and |
| 1849 | third arguments. The value of such an expression is void. This option |
| 1850 | is not supported for \*(C+. |
| 1851 | .IP "\fB\-flax\-vector\-conversions\fR" 4 |
| 1852 | .IX Item "-flax-vector-conversions" |
| 1853 | Allow implicit conversions between vectors with differing numbers of |
| 1854 | elements and/or incompatible element types. This option should not be |
| 1855 | used for new code. |
| 1856 | .IP "\fB\-funsigned\-char\fR" 4 |
| 1857 | .IX Item "-funsigned-char" |
| 1858 | Let the type \f(CW\*(C`char\*(C'\fR be unsigned, like \f(CW\*(C`unsigned char\*(C'\fR. |
| 1859 | .Sp |
| 1860 | Each kind of machine has a default for what \f(CW\*(C`char\*(C'\fR should |
| 1861 | be. It is either like \f(CW\*(C`unsigned char\*(C'\fR by default or like |
| 1862 | \&\f(CW\*(C`signed char\*(C'\fR by default. |
| 1863 | .Sp |
| 1864 | Ideally, a portable program should always use \f(CW\*(C`signed char\*(C'\fR or |
| 1865 | \&\f(CW\*(C`unsigned char\*(C'\fR when it depends on the signedness of an object. |
| 1866 | But many programs have been written to use plain \f(CW\*(C`char\*(C'\fR and |
| 1867 | expect it to be signed, or expect it to be unsigned, depending on the |
| 1868 | machines they were written for. This option, and its inverse, let you |
| 1869 | make such a program work with the opposite default. |
| 1870 | .Sp |
| 1871 | The type \f(CW\*(C`char\*(C'\fR is always a distinct type from each of |
| 1872 | \&\f(CW\*(C`signed char\*(C'\fR or \f(CW\*(C`unsigned char\*(C'\fR, even though its behavior |
| 1873 | is always just like one of those two. |
| 1874 | .IP "\fB\-fsigned\-char\fR" 4 |
| 1875 | .IX Item "-fsigned-char" |
| 1876 | Let the type \f(CW\*(C`char\*(C'\fR be signed, like \f(CW\*(C`signed char\*(C'\fR. |
| 1877 | .Sp |
| 1878 | Note that this is equivalent to \fB\-fno\-unsigned\-char\fR, which is |
| 1879 | the negative form of \fB\-funsigned\-char\fR. Likewise, the option |
| 1880 | \&\fB\-fno\-signed\-char\fR is equivalent to \fB\-funsigned\-char\fR. |
| 1881 | .IP "\fB\-fsigned\-bitfields\fR" 4 |
| 1882 | .IX Item "-fsigned-bitfields" |
| 1883 | .PD 0 |
| 1884 | .IP "\fB\-funsigned\-bitfields\fR" 4 |
| 1885 | .IX Item "-funsigned-bitfields" |
| 1886 | .IP "\fB\-fno\-signed\-bitfields\fR" 4 |
| 1887 | .IX Item "-fno-signed-bitfields" |
| 1888 | .IP "\fB\-fno\-unsigned\-bitfields\fR" 4 |
| 1889 | .IX Item "-fno-unsigned-bitfields" |
| 1890 | .PD |
| 1891 | These options control whether a bit-field is signed or unsigned, when the |
| 1892 | declaration does not use either \f(CW\*(C`signed\*(C'\fR or \f(CW\*(C`unsigned\*(C'\fR. By |
| 1893 | default, such a bit-field is signed, because this is consistent: the |
| 1894 | basic integer types such as \f(CW\*(C`int\*(C'\fR are signed types. |
| 1895 | .SS "Options Controlling \*(C+ Dialect" |
| 1896 | .IX Subsection "Options Controlling Dialect" |
| 1897 | This section describes the command-line options that are only meaningful |
| 1898 | for \*(C+ programs. You can also use most of the \s-1GNU\s0 compiler options |
| 1899 | regardless of what language your program is in. For example, you |
| 1900 | might compile a file \f(CW\*(C`firstClass.C\*(C'\fR like this: |
| 1901 | .PP |
| 1902 | .Vb 1 |
| 1903 | \& g++ \-g \-frepo \-O \-c firstClass.C |
| 1904 | .Ve |
| 1905 | .PP |
| 1906 | In this example, only \fB\-frepo\fR is an option meant |
| 1907 | only for \*(C+ programs; you can use the other options with any |
| 1908 | language supported by \s-1GCC\s0. |
| 1909 | .PP |
| 1910 | Here is a list of options that are \fIonly\fR for compiling \*(C+ programs: |
| 1911 | .IP "\fB\-fabi\-version=\fR\fIn\fR" 4 |
| 1912 | .IX Item "-fabi-version=n" |
| 1913 | Use version \fIn\fR of the \*(C+ \s-1ABI\s0. The default is version 2. |
| 1914 | .Sp |
| 1915 | Version 0 refers to the version conforming most closely to |
| 1916 | the \*(C+ \s-1ABI\s0 specification. Therefore, the \s-1ABI\s0 obtained using version 0 |
| 1917 | will change in different versions of G++ as \s-1ABI\s0 bugs are fixed. |
| 1918 | .Sp |
| 1919 | Version 1 is the version of the \*(C+ \s-1ABI\s0 that first appeared in G++ 3.2. |
| 1920 | .Sp |
| 1921 | Version 2 is the version of the \*(C+ \s-1ABI\s0 that first appeared in G++ 3.4. |
| 1922 | .Sp |
| 1923 | Version 3 corrects an error in mangling a constant address as a |
| 1924 | template argument. |
| 1925 | .Sp |
| 1926 | Version 4, which first appeared in G++ 4.5, implements a standard |
| 1927 | mangling for vector types. |
| 1928 | .Sp |
| 1929 | Version 5, which first appeared in G++ 4.6, corrects the mangling of |
| 1930 | attribute const/volatile on function pointer types, decltype of a |
| 1931 | plain decl, and use of a function parameter in the declaration of |
| 1932 | another parameter. |
| 1933 | .Sp |
| 1934 | Version 6, which first appeared in G++ 4.7, corrects the promotion |
| 1935 | behavior of \*(C+11 scoped enums and the mangling of template argument |
| 1936 | packs, const/static_cast, prefix ++ and \-\-, and a class scope function |
| 1937 | used as a template argument. |
| 1938 | .Sp |
| 1939 | See also \fB\-Wabi\fR. |
| 1940 | .IP "\fB\-fno\-access\-control\fR" 4 |
| 1941 | .IX Item "-fno-access-control" |
| 1942 | Turn off all access checking. This switch is mainly useful for working |
| 1943 | around bugs in the access control code. |
| 1944 | .IP "\fB\-fcheck\-new\fR" 4 |
| 1945 | .IX Item "-fcheck-new" |
| 1946 | Check that the pointer returned by \f(CW\*(C`operator new\*(C'\fR is non-null |
| 1947 | before attempting to modify the storage allocated. This check is |
| 1948 | normally unnecessary because the \*(C+ standard specifies that |
| 1949 | \&\f(CW\*(C`operator new\*(C'\fR only returns \f(CW0\fR if it is declared |
| 1950 | \&\fB\f(BIthrow()\fB\fR, in which case the compiler always checks the |
| 1951 | return value even without this option. In all other cases, when |
| 1952 | \&\f(CW\*(C`operator new\*(C'\fR has a non-empty exception specification, memory |
| 1953 | exhaustion is signalled by throwing \f(CW\*(C`std::bad_alloc\*(C'\fR. See also |
| 1954 | \&\fBnew (nothrow)\fR. |
| 1955 | .IP "\fB\-fconstexpr\-depth=\fR\fIn\fR" 4 |
| 1956 | .IX Item "-fconstexpr-depth=n" |
| 1957 | Set the maximum nested evaluation depth for \*(C+11 constexpr functions |
| 1958 | to \fIn\fR. A limit is needed to detect endless recursion during |
| 1959 | constant expression evaluation. The minimum specified by the standard |
| 1960 | is 512. |
| 1961 | .IP "\fB\-fdeduce\-init\-list\fR" 4 |
| 1962 | .IX Item "-fdeduce-init-list" |
| 1963 | Enable deduction of a template type parameter as |
| 1964 | \&\f(CW\*(C`std::initializer_list\*(C'\fR from a brace-enclosed initializer list, i.e. |
| 1965 | .Sp |
| 1966 | .Vb 4 |
| 1967 | \& template <class T> auto forward(T t) \-> decltype (realfn (t)) |
| 1968 | \& { |
| 1969 | \& return realfn (t); |
| 1970 | \& } |
| 1971 | \& |
| 1972 | \& void f() |
| 1973 | \& { |
| 1974 | \& forward({1,2}); // call forward<std::initializer_list<int>> |
| 1975 | \& } |
| 1976 | .Ve |
| 1977 | .Sp |
| 1978 | This deduction was implemented as a possible extension to the |
| 1979 | originally proposed semantics for the \*(C+11 standard, but was not part |
| 1980 | of the final standard, so it is disabled by default. This option is |
| 1981 | deprecated, and may be removed in a future version of G++. |
| 1982 | .IP "\fB\-ffriend\-injection\fR" 4 |
| 1983 | .IX Item "-ffriend-injection" |
| 1984 | Inject friend functions into the enclosing namespace, so that they are |
| 1985 | visible outside the scope of the class in which they are declared. |
| 1986 | Friend functions were documented to work this way in the old Annotated |
| 1987 | \&\*(C+ Reference Manual, and versions of G++ before 4.1 always worked |
| 1988 | that way. However, in \s-1ISO\s0 \*(C+ a friend function that is not declared |
| 1989 | in an enclosing scope can only be found using argument dependent |
| 1990 | lookup. This option causes friends to be injected as they were in |
| 1991 | earlier releases. |
| 1992 | .Sp |
| 1993 | This option is for compatibility, and may be removed in a future |
| 1994 | release of G++. |
| 1995 | .IP "\fB\-fno\-elide\-constructors\fR" 4 |
| 1996 | .IX Item "-fno-elide-constructors" |
| 1997 | The \*(C+ standard allows an implementation to omit creating a temporary |
| 1998 | that is only used to initialize another object of the same type. |
| 1999 | Specifying this option disables that optimization, and forces G++ to |
| 2000 | call the copy constructor in all cases. |
| 2001 | .IP "\fB\-fno\-enforce\-eh\-specs\fR" 4 |
| 2002 | .IX Item "-fno-enforce-eh-specs" |
| 2003 | Don't generate code to check for violation of exception specifications |
| 2004 | at run time. This option violates the \*(C+ standard, but may be useful |
| 2005 | for reducing code size in production builds, much like defining |
| 2006 | \&\fB\s-1NDEBUG\s0\fR. This does not give user code permission to throw |
| 2007 | exceptions in violation of the exception specifications; the compiler |
| 2008 | still optimizes based on the specifications, so throwing an |
| 2009 | unexpected exception results in undefined behavior at run time. |
| 2010 | .IP "\fB\-fextern\-tls\-init\fR" 4 |
| 2011 | .IX Item "-fextern-tls-init" |
| 2012 | .PD 0 |
| 2013 | .IP "\fB\-fno\-extern\-tls\-init\fR" 4 |
| 2014 | .IX Item "-fno-extern-tls-init" |
| 2015 | .PD |
| 2016 | The \*(C+11 and OpenMP standards allow \fBthread_local\fR and |
| 2017 | \&\fBthreadprivate\fR variables to have dynamic (runtime) |
| 2018 | initialization. To support this, any use of such a variable goes |
| 2019 | through a wrapper function that performs any necessary initialization. |
| 2020 | When the use and definition of the variable are in the same |
| 2021 | translation unit, this overhead can be optimized away, but when the |
| 2022 | use is in a different translation unit there is significant overhead |
| 2023 | even if the variable doesn't actually need dynamic initialization. If |
| 2024 | the programmer can be sure that no use of the variable in a |
| 2025 | non-defining \s-1TU\s0 needs to trigger dynamic initialization (either |
| 2026 | because the variable is statically initialized, or a use of the |
| 2027 | variable in the defining \s-1TU\s0 will be executed before any uses in |
| 2028 | another \s-1TU\s0), they can avoid this overhead with the |
| 2029 | \&\fB\-fno\-extern\-tls\-init\fR option. |
| 2030 | .Sp |
| 2031 | On targets that support symbol aliases, the default is |
| 2032 | \&\fB\-fextern\-tls\-init\fR. On targets that do not support symbol |
| 2033 | aliases, the default is \fB\-fno\-extern\-tls\-init\fR. |
| 2034 | .IP "\fB\-ffor\-scope\fR" 4 |
| 2035 | .IX Item "-ffor-scope" |
| 2036 | .PD 0 |
| 2037 | .IP "\fB\-fno\-for\-scope\fR" 4 |
| 2038 | .IX Item "-fno-for-scope" |
| 2039 | .PD |
| 2040 | If \fB\-ffor\-scope\fR is specified, the scope of variables declared in |
| 2041 | a \fIfor-init-statement\fR is limited to the \fBfor\fR loop itself, |
| 2042 | as specified by the \*(C+ standard. |
| 2043 | If \fB\-fno\-for\-scope\fR is specified, the scope of variables declared in |
| 2044 | a \fIfor-init-statement\fR extends to the end of the enclosing scope, |
| 2045 | as was the case in old versions of G++, and other (traditional) |
| 2046 | implementations of \*(C+. |
| 2047 | .Sp |
| 2048 | If neither flag is given, the default is to follow the standard, |
| 2049 | but to allow and give a warning for old-style code that would |
| 2050 | otherwise be invalid, or have different behavior. |
| 2051 | .IP "\fB\-fno\-gnu\-keywords\fR" 4 |
| 2052 | .IX Item "-fno-gnu-keywords" |
| 2053 | Do not recognize \f(CW\*(C`typeof\*(C'\fR as a keyword, so that code can use this |
| 2054 | word as an identifier. You can use the keyword \f(CW\*(C`_\|_typeof_\|_\*(C'\fR instead. |
| 2055 | \&\fB\-ansi\fR implies \fB\-fno\-gnu\-keywords\fR. |
| 2056 | .IP "\fB\-fno\-implicit\-templates\fR" 4 |
| 2057 | .IX Item "-fno-implicit-templates" |
| 2058 | Never emit code for non-inline templates that are instantiated |
| 2059 | implicitly (i.e. by use); only emit code for explicit instantiations. |
| 2060 | .IP "\fB\-fno\-implicit\-inline\-templates\fR" 4 |
| 2061 | .IX Item "-fno-implicit-inline-templates" |
| 2062 | Don't emit code for implicit instantiations of inline templates, either. |
| 2063 | The default is to handle inlines differently so that compiles with and |
| 2064 | without optimization need the same set of explicit instantiations. |
| 2065 | .IP "\fB\-fno\-implement\-inlines\fR" 4 |
| 2066 | .IX Item "-fno-implement-inlines" |
| 2067 | To save space, do not emit out-of-line copies of inline functions |
| 2068 | controlled by \fB#pragma implementation\fR. This causes linker |
| 2069 | errors if these functions are not inlined everywhere they are called. |
| 2070 | .IP "\fB\-fms\-extensions\fR" 4 |
| 2071 | .IX Item "-fms-extensions" |
| 2072 | Disable Wpedantic warnings about constructs used in \s-1MFC\s0, such as implicit |
| 2073 | int and getting a pointer to member function via non-standard syntax. |
| 2074 | .IP "\fB\-fno\-nonansi\-builtins\fR" 4 |
| 2075 | .IX Item "-fno-nonansi-builtins" |
| 2076 | Disable built-in declarations of functions that are not mandated by |
| 2077 | \&\s-1ANSI/ISO\s0 C. These include \f(CW\*(C`ffs\*(C'\fR, \f(CW\*(C`alloca\*(C'\fR, \f(CW\*(C`_exit\*(C'\fR, |
| 2078 | \&\f(CW\*(C`index\*(C'\fR, \f(CW\*(C`bzero\*(C'\fR, \f(CW\*(C`conjf\*(C'\fR, and other related functions. |
| 2079 | .IP "\fB\-fnothrow\-opt\fR" 4 |
| 2080 | .IX Item "-fnothrow-opt" |
| 2081 | Treat a \f(CW\*(C`throw()\*(C'\fR exception specification as if it were a |
| 2082 | \&\f(CW\*(C`noexcept\*(C'\fR specification to reduce or eliminate the text size |
| 2083 | overhead relative to a function with no exception specification. If |
| 2084 | the function has local variables of types with non-trivial |
| 2085 | destructors, the exception specification actually makes the |
| 2086 | function smaller because the \s-1EH\s0 cleanups for those variables can be |
| 2087 | optimized away. The semantic effect is that an exception thrown out of |
| 2088 | a function with such an exception specification results in a call |
| 2089 | to \f(CW\*(C`terminate\*(C'\fR rather than \f(CW\*(C`unexpected\*(C'\fR. |
| 2090 | .IP "\fB\-fno\-operator\-names\fR" 4 |
| 2091 | .IX Item "-fno-operator-names" |
| 2092 | Do not treat the operator name keywords \f(CW\*(C`and\*(C'\fR, \f(CW\*(C`bitand\*(C'\fR, |
| 2093 | \&\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 |
| 2094 | synonyms as keywords. |
| 2095 | .IP "\fB\-fno\-optional\-diags\fR" 4 |
| 2096 | .IX Item "-fno-optional-diags" |
| 2097 | Disable diagnostics that the standard says a compiler does not need to |
| 2098 | issue. Currently, the only such diagnostic issued by G++ is the one for |
| 2099 | a name having multiple meanings within a class. |
| 2100 | .IP "\fB\-fpermissive\fR" 4 |
| 2101 | .IX Item "-fpermissive" |
| 2102 | Downgrade some diagnostics about nonconformant code from errors to |
| 2103 | warnings. Thus, using \fB\-fpermissive\fR allows some |
| 2104 | nonconforming code to compile. |
| 2105 | .IP "\fB\-fno\-pretty\-templates\fR" 4 |
| 2106 | .IX Item "-fno-pretty-templates" |
| 2107 | When an error message refers to a specialization of a function |
| 2108 | template, the compiler normally prints the signature of the |
| 2109 | template followed by the template arguments and any typedefs or |
| 2110 | typenames in the signature (e.g. \f(CW\*(C`void f(T) [with T = int]\*(C'\fR |
| 2111 | rather than \f(CW\*(C`void f(int)\*(C'\fR) so that it's clear which template is |
| 2112 | involved. When an error message refers to a specialization of a class |
| 2113 | template, the compiler omits any template arguments that match |
| 2114 | the default template arguments for that template. If either of these |
| 2115 | behaviors make it harder to understand the error message rather than |
| 2116 | easier, you can use \fB\-fno\-pretty\-templates\fR to disable them. |
| 2117 | .IP "\fB\-frepo\fR" 4 |
| 2118 | .IX Item "-frepo" |
| 2119 | Enable automatic template instantiation at link time. This option also |
| 2120 | implies \fB\-fno\-implicit\-templates\fR. |
| 2121 | .IP "\fB\-fno\-rtti\fR" 4 |
| 2122 | .IX Item "-fno-rtti" |
| 2123 | Disable generation of information about every class with virtual |
| 2124 | functions for use by the \*(C+ run-time type identification features |
| 2125 | (\fBdynamic_cast\fR and \fBtypeid\fR). If you don't use those parts |
| 2126 | of the language, you can save some space by using this flag. Note that |
| 2127 | exception handling uses the same information, but G++ generates it as |
| 2128 | needed. The \fBdynamic_cast\fR operator can still be used for casts that |
| 2129 | do not require run-time type information, i.e. casts to \f(CW\*(C`void *\*(C'\fR or to |
| 2130 | unambiguous base classes. |
| 2131 | .IP "\fB\-fstats\fR" 4 |
| 2132 | .IX Item "-fstats" |
| 2133 | Emit statistics about front-end processing at the end of the compilation. |
| 2134 | This information is generally only useful to the G++ development team. |
| 2135 | .IP "\fB\-fstrict\-enums\fR" 4 |
| 2136 | .IX Item "-fstrict-enums" |
| 2137 | Allow the compiler to optimize using the assumption that a value of |
| 2138 | enumerated type can only be one of the values of the enumeration (as |
| 2139 | defined in the \*(C+ standard; basically, a value that can be |
| 2140 | represented in the minimum number of bits needed to represent all the |
| 2141 | enumerators). This assumption may not be valid if the program uses a |
| 2142 | cast to convert an arbitrary integer value to the enumerated type. |
| 2143 | .IP "\fB\-ftemplate\-backtrace\-limit=\fR\fIn\fR" 4 |
| 2144 | .IX Item "-ftemplate-backtrace-limit=n" |
| 2145 | Set the maximum number of template instantiation notes for a single |
| 2146 | warning or error to \fIn\fR. The default value is 10. |
| 2147 | .IP "\fB\-ftemplate\-depth=\fR\fIn\fR" 4 |
| 2148 | .IX Item "-ftemplate-depth=n" |
| 2149 | Set the maximum instantiation depth for template classes to \fIn\fR. |
| 2150 | A limit on the template instantiation depth is needed to detect |
| 2151 | endless recursions during template class instantiation. \s-1ANSI/ISO\s0 \*(C+ |
| 2152 | conforming programs must not rely on a maximum depth greater than 17 |
| 2153 | (changed to 1024 in \*(C+11). The default value is 900, as the compiler |
| 2154 | can run out of stack space before hitting 1024 in some situations. |
| 2155 | .IP "\fB\-fno\-threadsafe\-statics\fR" 4 |
| 2156 | .IX Item "-fno-threadsafe-statics" |
| 2157 | Do not emit the extra code to use the routines specified in the \*(C+ |
| 2158 | \&\s-1ABI\s0 for thread-safe initialization of local statics. You can use this |
| 2159 | option to reduce code size slightly in code that doesn't need to be |
| 2160 | thread-safe. |
| 2161 | .IP "\fB\-fuse\-cxa\-atexit\fR" 4 |
| 2162 | .IX Item "-fuse-cxa-atexit" |
| 2163 | Register destructors for objects with static storage duration with the |
| 2164 | \&\f(CW\*(C`_\|_cxa_atexit\*(C'\fR function rather than the \f(CW\*(C`atexit\*(C'\fR function. |
| 2165 | This option is required for fully standards-compliant handling of static |
| 2166 | destructors, but only works if your C library supports |
| 2167 | \&\f(CW\*(C`_\|_cxa_atexit\*(C'\fR. |
| 2168 | .IP "\fB\-fno\-use\-cxa\-get\-exception\-ptr\fR" 4 |
| 2169 | .IX Item "-fno-use-cxa-get-exception-ptr" |
| 2170 | Don't use the \f(CW\*(C`_\|_cxa_get_exception_ptr\*(C'\fR runtime routine. This |
| 2171 | causes \f(CW\*(C`std::uncaught_exception\*(C'\fR to be incorrect, but is necessary |
| 2172 | if the runtime routine is not available. |
| 2173 | .IP "\fB\-fvisibility\-inlines\-hidden\fR" 4 |
| 2174 | .IX Item "-fvisibility-inlines-hidden" |
| 2175 | This switch declares that the user does not attempt to compare |
| 2176 | pointers to inline functions or methods where the addresses of the two functions |
| 2177 | are taken in different shared objects. |
| 2178 | .Sp |
| 2179 | The effect of this is that \s-1GCC\s0 may, effectively, mark inline methods with |
| 2180 | \&\f(CW\*(C`_\|_attribute_\|_ ((visibility ("hidden")))\*(C'\fR so that they do not |
| 2181 | appear in the export table of a \s-1DSO\s0 and do not require a \s-1PLT\s0 indirection |
| 2182 | when used within the \s-1DSO\s0. Enabling this option can have a dramatic effect |
| 2183 | on load and link times of a \s-1DSO\s0 as it massively reduces the size of the |
| 2184 | dynamic export table when the library makes heavy use of templates. |
| 2185 | .Sp |
| 2186 | The behavior of this switch is not quite the same as marking the |
| 2187 | methods as hidden directly, because it does not affect static variables |
| 2188 | local to the function or cause the compiler to deduce that |
| 2189 | the function is defined in only one shared object. |
| 2190 | .Sp |
| 2191 | You may mark a method as having a visibility explicitly to negate the |
| 2192 | effect of the switch for that method. For example, if you do want to |
| 2193 | compare pointers to a particular inline method, you might mark it as |
| 2194 | having default visibility. Marking the enclosing class with explicit |
| 2195 | visibility has no effect. |
| 2196 | .Sp |
| 2197 | Explicitly instantiated inline methods are unaffected by this option |
| 2198 | as their linkage might otherwise cross a shared library boundary. |
| 2199 | .IP "\fB\-fvisibility\-ms\-compat\fR" 4 |
| 2200 | .IX Item "-fvisibility-ms-compat" |
| 2201 | This flag attempts to use visibility settings to make \s-1GCC\s0's \*(C+ |
| 2202 | linkage model compatible with that of Microsoft Visual Studio. |
| 2203 | .Sp |
| 2204 | The flag makes these changes to \s-1GCC\s0's linkage model: |
| 2205 | .RS 4 |
| 2206 | .IP "1." 4 |
| 2207 | It sets the default visibility to \f(CW\*(C`hidden\*(C'\fR, like |
| 2208 | \&\fB\-fvisibility=hidden\fR. |
| 2209 | .IP "2." 4 |
| 2210 | Types, but not their members, are not hidden by default. |
| 2211 | .IP "3." 4 |
| 2212 | The One Definition Rule is relaxed for types without explicit |
| 2213 | visibility specifications that are defined in more than one |
| 2214 | shared object: those declarations are permitted if they are |
| 2215 | permitted when this option is not used. |
| 2216 | .RE |
| 2217 | .RS 4 |
| 2218 | .Sp |
| 2219 | In new code it is better to use \fB\-fvisibility=hidden\fR and |
| 2220 | export those classes that are intended to be externally visible. |
| 2221 | Unfortunately it is possible for code to rely, perhaps accidentally, |
| 2222 | on the Visual Studio behavior. |
| 2223 | .Sp |
| 2224 | Among the consequences of these changes are that static data members |
| 2225 | of the same type with the same name but defined in different shared |
| 2226 | objects are different, so changing one does not change the other; |
| 2227 | and that pointers to function members defined in different shared |
| 2228 | objects may not compare equal. When this flag is given, it is a |
| 2229 | violation of the \s-1ODR\s0 to define types with the same name differently. |
| 2230 | .RE |
| 2231 | .IP "\fB\-fno\-weak\fR" 4 |
| 2232 | .IX Item "-fno-weak" |
| 2233 | Do not use weak symbol support, even if it is provided by the linker. |
| 2234 | By default, G++ uses weak symbols if they are available. This |
| 2235 | option exists only for testing, and should not be used by end-users; |
| 2236 | it results in inferior code and has no benefits. This option may |
| 2237 | be removed in a future release of G++. |
| 2238 | .IP "\fB\-nostdinc++\fR" 4 |
| 2239 | .IX Item "-nostdinc++" |
| 2240 | Do not search for header files in the standard directories specific to |
| 2241 | \&\*(C+, but do still search the other standard directories. (This option |
| 2242 | is used when building the \*(C+ library.) |
| 2243 | .PP |
| 2244 | In addition, these optimization, warning, and code generation options |
| 2245 | have meanings only for \*(C+ programs: |
| 2246 | .IP "\fB\-fno\-default\-inline\fR" 4 |
| 2247 | .IX Item "-fno-default-inline" |
| 2248 | Do not assume \fBinline\fR for functions defined inside a class scope. |
| 2249 | Note that these |
| 2250 | functions have linkage like inline functions; they just aren't |
| 2251 | inlined by default. |
| 2252 | .IP "\fB\-Wabi\fR (C, Objective-C, \*(C+ and Objective\-\*(C+ only)" 4 |
| 2253 | .IX Item "-Wabi (C, Objective-C, and Objective- only)" |
| 2254 | Warn when G++ generates code that is probably not compatible with the |
| 2255 | vendor-neutral \*(C+ \s-1ABI\s0. Although an effort has been made to warn about |
| 2256 | all such cases, there are probably some cases that are not warned about, |
| 2257 | even though G++ is generating incompatible code. There may also be |
| 2258 | cases where warnings are emitted even though the code that is generated |
| 2259 | is compatible. |
| 2260 | .Sp |
| 2261 | You should rewrite your code to avoid these warnings if you are |
| 2262 | concerned about the fact that code generated by G++ may not be binary |
| 2263 | compatible with code generated by other compilers. |
| 2264 | .Sp |
| 2265 | The known incompatibilities in \fB\-fabi\-version=2\fR (the default) include: |
| 2266 | .RS 4 |
| 2267 | .IP "\(bu" 4 |
| 2268 | A template with a non-type template parameter of reference type is |
| 2269 | mangled incorrectly: |
| 2270 | .Sp |
| 2271 | .Vb 3 |
| 2272 | \& extern int N; |
| 2273 | \& template <int &> struct S {}; |
| 2274 | \& void n (S<N>) {2} |
| 2275 | .Ve |
| 2276 | .Sp |
| 2277 | This is fixed in \fB\-fabi\-version=3\fR. |
| 2278 | .IP "\(bu" 4 |
| 2279 | \&\s-1SIMD\s0 vector types declared using \f(CW\*(C`_\|_attribute ((vector_size))\*(C'\fR are |
| 2280 | mangled in a non-standard way that does not allow for overloading of |
| 2281 | functions taking vectors of different sizes. |
| 2282 | .Sp |
| 2283 | The mangling is changed in \fB\-fabi\-version=4\fR. |
| 2284 | .RE |
| 2285 | .RS 4 |
| 2286 | .Sp |
| 2287 | The known incompatibilities in \fB\-fabi\-version=1\fR include: |
| 2288 | .IP "\(bu" 4 |
| 2289 | Incorrect handling of tail-padding for bit-fields. G++ may attempt to |
| 2290 | pack data into the same byte as a base class. For example: |
| 2291 | .Sp |
| 2292 | .Vb 2 |
| 2293 | \& struct A { virtual void f(); int f1 : 1; }; |
| 2294 | \& struct B : public A { int f2 : 1; }; |
| 2295 | .Ve |
| 2296 | .Sp |
| 2297 | In this case, G++ places \f(CW\*(C`B::f2\*(C'\fR into the same byte |
| 2298 | as \f(CW\*(C`A::f1\*(C'\fR; other compilers do not. You can avoid this problem |
| 2299 | by explicitly padding \f(CW\*(C`A\*(C'\fR so that its size is a multiple of the |
| 2300 | byte size on your platform; that causes G++ and other compilers to |
| 2301 | lay out \f(CW\*(C`B\*(C'\fR identically. |
| 2302 | .IP "\(bu" 4 |
| 2303 | Incorrect handling of tail-padding for virtual bases. G++ does not use |
| 2304 | tail padding when laying out virtual bases. For example: |
| 2305 | .Sp |
| 2306 | .Vb 3 |
| 2307 | \& struct A { virtual void f(); char c1; }; |
| 2308 | \& struct B { B(); char c2; }; |
| 2309 | \& struct C : public A, public virtual B {}; |
| 2310 | .Ve |
| 2311 | .Sp |
| 2312 | In this case, G++ does not place \f(CW\*(C`B\*(C'\fR into the tail-padding for |
| 2313 | \&\f(CW\*(C`A\*(C'\fR; other compilers do. You can avoid this problem by |
| 2314 | explicitly padding \f(CW\*(C`A\*(C'\fR so that its size is a multiple of its |
| 2315 | alignment (ignoring virtual base classes); that causes G++ and other |
| 2316 | compilers to lay out \f(CW\*(C`C\*(C'\fR identically. |
| 2317 | .IP "\(bu" 4 |
| 2318 | Incorrect handling of bit-fields with declared widths greater than that |
| 2319 | of their underlying types, when the bit-fields appear in a union. For |
| 2320 | example: |
| 2321 | .Sp |
| 2322 | .Vb 1 |
| 2323 | \& union U { int i : 4096; }; |
| 2324 | .Ve |
| 2325 | .Sp |
| 2326 | Assuming that an \f(CW\*(C`int\*(C'\fR does not have 4096 bits, G++ makes the |
| 2327 | union too small by the number of bits in an \f(CW\*(C`int\*(C'\fR. |
| 2328 | .IP "\(bu" 4 |
| 2329 | Empty classes can be placed at incorrect offsets. For example: |
| 2330 | .Sp |
| 2331 | .Vb 1 |
| 2332 | \& struct A {}; |
| 2333 | \& |
| 2334 | \& struct B { |
| 2335 | \& A a; |
| 2336 | \& virtual void f (); |
| 2337 | \& }; |
| 2338 | \& |
| 2339 | \& struct C : public B, public A {}; |
| 2340 | .Ve |
| 2341 | .Sp |
| 2342 | G++ places the \f(CW\*(C`A\*(C'\fR base class of \f(CW\*(C`C\*(C'\fR at a nonzero offset; |
| 2343 | it should be placed at offset zero. G++ mistakenly believes that the |
| 2344 | \&\f(CW\*(C`A\*(C'\fR data member of \f(CW\*(C`B\*(C'\fR is already at offset zero. |
| 2345 | .IP "\(bu" 4 |
| 2346 | Names of template functions whose types involve \f(CW\*(C`typename\*(C'\fR or |
| 2347 | template template parameters can be mangled incorrectly. |
| 2348 | .Sp |
| 2349 | .Vb 2 |
| 2350 | \& template <typename Q> |
| 2351 | \& void f(typename Q::X) {} |
| 2352 | \& |
| 2353 | \& template <template <typename> class Q> |
| 2354 | \& void f(typename Q<int>::X) {} |
| 2355 | .Ve |
| 2356 | .Sp |
| 2357 | Instantiations of these templates may be mangled incorrectly. |
| 2358 | .RE |
| 2359 | .RS 4 |
| 2360 | .Sp |
| 2361 | It also warns about psABI-related changes. The known psABI changes at this |
| 2362 | point include: |
| 2363 | .IP "\(bu" 4 |
| 2364 | For SysV/x86\-64, unions with \f(CW\*(C`long double\*(C'\fR members are |
| 2365 | passed in memory as specified in psABI. For example: |
| 2366 | .Sp |
| 2367 | .Vb 4 |
| 2368 | \& union U { |
| 2369 | \& long double ld; |
| 2370 | \& int i; |
| 2371 | \& }; |
| 2372 | .Ve |
| 2373 | .Sp |
| 2374 | \&\f(CW\*(C`union U\*(C'\fR is always passed in memory. |
| 2375 | .RE |
| 2376 | .RS 4 |
| 2377 | .RE |
| 2378 | .IP "\fB\-Wctor\-dtor\-privacy\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 2379 | .IX Item "-Wctor-dtor-privacy ( and Objective- only)" |
| 2380 | Warn when a class seems unusable because all the constructors or |
| 2381 | destructors in that class are private, and it has neither friends nor |
| 2382 | public static member functions. Also warn if there are no non-private |
| 2383 | methods, and there's at least one private member function that isn't |
| 2384 | a constructor or destructor. |
| 2385 | .IP "\fB\-Wdelete\-non\-virtual\-dtor\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 2386 | .IX Item "-Wdelete-non-virtual-dtor ( and Objective- only)" |
| 2387 | Warn when \fBdelete\fR is used to destroy an instance of a class that |
| 2388 | has virtual functions and non-virtual destructor. It is unsafe to delete |
| 2389 | an instance of a derived class through a pointer to a base class if the |
| 2390 | base class does not have a virtual destructor. This warning is enabled |
| 2391 | by \fB\-Wall\fR. |
| 2392 | .IP "\fB\-Wliteral\-suffix\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 2393 | .IX Item "-Wliteral-suffix ( and Objective- only)" |
| 2394 | Warn when a string or character literal is followed by a ud-suffix which does |
| 2395 | not begin with an underscore. As a conforming extension, \s-1GCC\s0 treats such |
| 2396 | suffixes as separate preprocessing tokens in order to maintain backwards |
| 2397 | compatibility with code that uses formatting macros from \f(CW\*(C`<inttypes.h>\*(C'\fR. |
| 2398 | For example: |
| 2399 | .Sp |
| 2400 | .Vb 3 |
| 2401 | \& #define _\|_STDC_FORMAT_MACROS |
| 2402 | \& #include <inttypes.h> |
| 2403 | \& #include <stdio.h> |
| 2404 | \& |
| 2405 | \& int main() { |
| 2406 | \& int64_t i64 = 123; |
| 2407 | \& printf("My int64: %"PRId64"\en", i64); |
| 2408 | \& } |
| 2409 | .Ve |
| 2410 | .Sp |
| 2411 | In this case, \f(CW\*(C`PRId64\*(C'\fR is treated as a separate preprocessing token. |
| 2412 | .Sp |
| 2413 | This warning is enabled by default. |
| 2414 | .IP "\fB\-Wnarrowing\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 2415 | .IX Item "-Wnarrowing ( and Objective- only)" |
| 2416 | Warn when a narrowing conversion prohibited by \*(C+11 occurs within |
| 2417 | \&\fB{ }\fR, e.g. |
| 2418 | .Sp |
| 2419 | .Vb 1 |
| 2420 | \& int i = { 2.2 }; // error: narrowing from double to int |
| 2421 | .Ve |
| 2422 | .Sp |
| 2423 | This flag is included in \fB\-Wall\fR and \fB\-Wc++11\-compat\fR. |
| 2424 | .Sp |
| 2425 | With \fB\-std=c++11\fR, \fB\-Wno\-narrowing\fR suppresses the diagnostic |
| 2426 | required by the standard. Note that this does not affect the meaning |
| 2427 | of well-formed code; narrowing conversions are still considered |
| 2428 | ill-formed in \s-1SFINAE\s0 context. |
| 2429 | .IP "\fB\-Wnoexcept\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 2430 | .IX Item "-Wnoexcept ( and Objective- only)" |
| 2431 | Warn when a noexcept-expression evaluates to false because of a call |
| 2432 | to a function that does not have a non-throwing exception |
| 2433 | specification (i.e. \fB\f(BIthrow()\fB\fR or \fBnoexcept\fR) but is known by |
| 2434 | the compiler to never throw an exception. |
| 2435 | .IP "\fB\-Wnon\-virtual\-dtor\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 2436 | .IX Item "-Wnon-virtual-dtor ( and Objective- only)" |
| 2437 | Warn when a class has virtual functions and an accessible non-virtual |
| 2438 | destructor, in which case it is possible but unsafe to delete |
| 2439 | an instance of a derived class through a pointer to the base class. |
| 2440 | This warning is also enabled if \fB\-Weffc++\fR is specified. |
| 2441 | .IP "\fB\-Wreorder\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 2442 | .IX Item "-Wreorder ( and Objective- only)" |
| 2443 | Warn when the order of member initializers given in the code does not |
| 2444 | match the order in which they must be executed. For instance: |
| 2445 | .Sp |
| 2446 | .Vb 5 |
| 2447 | \& struct A { |
| 2448 | \& int i; |
| 2449 | \& int j; |
| 2450 | \& A(): j (0), i (1) { } |
| 2451 | \& }; |
| 2452 | .Ve |
| 2453 | .Sp |
| 2454 | The compiler rearranges the member initializers for \fBi\fR |
| 2455 | and \fBj\fR to match the declaration order of the members, emitting |
| 2456 | a warning to that effect. This warning is enabled by \fB\-Wall\fR. |
| 2457 | .IP "\fB\-fext\-numeric\-literals\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 2458 | .IX Item "-fext-numeric-literals ( and Objective- only)" |
| 2459 | Accept imaginary, fixed-point, or machine-defined |
| 2460 | literal number suffixes as \s-1GNU\s0 extensions. |
| 2461 | When this option is turned off these suffixes are treated |
| 2462 | as \*(C+11 user-defined literal numeric suffixes. |
| 2463 | This is on by default for all pre\-\*(C+11 dialects and all \s-1GNU\s0 dialects: |
| 2464 | \&\fB\-std=c++98\fR, \fB\-std=gnu++98\fR, \fB\-std=gnu++11\fR, |
| 2465 | \&\fB\-std=gnu++1y\fR. |
| 2466 | This option is off by default |
| 2467 | for \s-1ISO\s0 \*(C+11 onwards (\fB\-std=c++11\fR, ...). |
| 2468 | .PP |
| 2469 | The following \fB\-W...\fR options are not affected by \fB\-Wall\fR. |
| 2470 | .IP "\fB\-Weffc++\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 2471 | .IX Item "-Weffc++ ( and Objective- only)" |
| 2472 | Warn about violations of the following style guidelines from Scott Meyers' |
| 2473 | \&\fIEffective \*(C+, Second Edition\fR book: |
| 2474 | .RS 4 |
| 2475 | .IP "\(bu" 4 |
| 2476 | Item 11: Define a copy constructor and an assignment operator for classes |
| 2477 | with dynamically-allocated memory. |
| 2478 | .IP "\(bu" 4 |
| 2479 | Item 12: Prefer initialization to assignment in constructors. |
| 2480 | .IP "\(bu" 4 |
| 2481 | Item 14: Make destructors virtual in base classes. |
| 2482 | .IP "\(bu" 4 |
| 2483 | Item 15: Have \f(CW\*(C`operator=\*(C'\fR return a reference to \f(CW*this\fR. |
| 2484 | .IP "\(bu" 4 |
| 2485 | Item 23: Don't try to return a reference when you must return an object. |
| 2486 | .RE |
| 2487 | .RS 4 |
| 2488 | .Sp |
| 2489 | Also warn about violations of the following style guidelines from |
| 2490 | Scott Meyers' \fIMore Effective \*(C+\fR book: |
| 2491 | .IP "\(bu" 4 |
| 2492 | Item 6: Distinguish between prefix and postfix forms of increment and |
| 2493 | decrement operators. |
| 2494 | .IP "\(bu" 4 |
| 2495 | Item 7: Never overload \f(CW\*(C`&&\*(C'\fR, \f(CW\*(C`||\*(C'\fR, or \f(CW\*(C`,\*(C'\fR. |
| 2496 | .RE |
| 2497 | .RS 4 |
| 2498 | .Sp |
| 2499 | When selecting this option, be aware that the standard library |
| 2500 | headers do not obey all of these guidelines; use \fBgrep \-v\fR |
| 2501 | to filter out those warnings. |
| 2502 | .RE |
| 2503 | .IP "\fB\-Wstrict\-null\-sentinel\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 2504 | .IX Item "-Wstrict-null-sentinel ( and Objective- only)" |
| 2505 | Warn about the use of an uncasted \f(CW\*(C`NULL\*(C'\fR as sentinel. When |
| 2506 | compiling only with \s-1GCC\s0 this is a valid sentinel, as \f(CW\*(C`NULL\*(C'\fR is defined |
| 2507 | to \f(CW\*(C`_\|_null\*(C'\fR. Although it is a null pointer constant rather than a |
| 2508 | null pointer, it is guaranteed to be of the same size as a pointer. |
| 2509 | But this use is not portable across different compilers. |
| 2510 | .IP "\fB\-Wno\-non\-template\-friend\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 2511 | .IX Item "-Wno-non-template-friend ( and Objective- only)" |
| 2512 | Disable warnings when non-templatized friend functions are declared |
| 2513 | within a template. Since the advent of explicit template specification |
| 2514 | support in G++, if the name of the friend is an unqualified-id (i.e., |
| 2515 | \&\fBfriend foo(int)\fR), the \*(C+ language specification demands that the |
| 2516 | friend declare or define an ordinary, nontemplate function. (Section |
| 2517 | 14.5.3). Before G++ implemented explicit specification, unqualified-ids |
| 2518 | could be interpreted as a particular specialization of a templatized |
| 2519 | function. Because this non-conforming behavior is no longer the default |
| 2520 | behavior for G++, \fB\-Wnon\-template\-friend\fR allows the compiler to |
| 2521 | check existing code for potential trouble spots and is on by default. |
| 2522 | This new compiler behavior can be turned off with |
| 2523 | \&\fB\-Wno\-non\-template\-friend\fR, which keeps the conformant compiler code |
| 2524 | but disables the helpful warning. |
| 2525 | .IP "\fB\-Wold\-style\-cast\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 2526 | .IX Item "-Wold-style-cast ( and Objective- only)" |
| 2527 | Warn if an old-style (C\-style) cast to a non-void type is used within |
| 2528 | a \*(C+ program. The new-style casts (\fBdynamic_cast\fR, |
| 2529 | \&\fBstatic_cast\fR, \fBreinterpret_cast\fR, and \fBconst_cast\fR) are |
| 2530 | less vulnerable to unintended effects and much easier to search for. |
| 2531 | .IP "\fB\-Woverloaded\-virtual\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 2532 | .IX Item "-Woverloaded-virtual ( and Objective- only)" |
| 2533 | Warn when a function declaration hides virtual functions from a |
| 2534 | base class. For example, in: |
| 2535 | .Sp |
| 2536 | .Vb 3 |
| 2537 | \& struct A { |
| 2538 | \& virtual void f(); |
| 2539 | \& }; |
| 2540 | \& |
| 2541 | \& struct B: public A { |
| 2542 | \& void f(int); |
| 2543 | \& }; |
| 2544 | .Ve |
| 2545 | .Sp |
| 2546 | 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 |
| 2547 | like: |
| 2548 | .Sp |
| 2549 | .Vb 2 |
| 2550 | \& B* b; |
| 2551 | \& b\->f(); |
| 2552 | .Ve |
| 2553 | .Sp |
| 2554 | fails to compile. |
| 2555 | .IP "\fB\-Wno\-pmf\-conversions\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 2556 | .IX Item "-Wno-pmf-conversions ( and Objective- only)" |
| 2557 | Disable the diagnostic for converting a bound pointer to member function |
| 2558 | to a plain pointer. |
| 2559 | .IP "\fB\-Wsign\-promo\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 2560 | .IX Item "-Wsign-promo ( and Objective- only)" |
| 2561 | Warn when overload resolution chooses a promotion from unsigned or |
| 2562 | enumerated type to a signed type, over a conversion to an unsigned type of |
| 2563 | the same size. Previous versions of G++ tried to preserve |
| 2564 | unsignedness, but the standard mandates the current behavior. |
| 2565 | .SS "Options Controlling Objective-C and Objective\-\*(C+ Dialects" |
| 2566 | .IX Subsection "Options Controlling Objective-C and Objective- Dialects" |
| 2567 | (\s-1NOTE:\s0 This manual does not describe the Objective-C and Objective\-\*(C+ |
| 2568 | languages themselves. |
| 2569 | .PP |
| 2570 | This section describes the command-line options that are only meaningful |
| 2571 | for Objective-C and Objective\-\*(C+ programs. You can also use most of |
| 2572 | the language-independent \s-1GNU\s0 compiler options. |
| 2573 | For example, you might compile a file \f(CW\*(C`some_class.m\*(C'\fR like this: |
| 2574 | .PP |
| 2575 | .Vb 1 |
| 2576 | \& gcc \-g \-fgnu\-runtime \-O \-c some_class.m |
| 2577 | .Ve |
| 2578 | .PP |
| 2579 | In this example, \fB\-fgnu\-runtime\fR is an option meant only for |
| 2580 | Objective-C and Objective\-\*(C+ programs; you can use the other options with |
| 2581 | any language supported by \s-1GCC\s0. |
| 2582 | .PP |
| 2583 | Note that since Objective-C is an extension of the C language, Objective-C |
| 2584 | compilations may also use options specific to the C front-end (e.g., |
| 2585 | \&\fB\-Wtraditional\fR). Similarly, Objective\-\*(C+ compilations may use |
| 2586 | \&\*(C+\-specific options (e.g., \fB\-Wabi\fR). |
| 2587 | .PP |
| 2588 | Here is a list of options that are \fIonly\fR for compiling Objective-C |
| 2589 | and Objective\-\*(C+ programs: |
| 2590 | .IP "\fB\-fconstant\-string\-class=\fR\fIclass-name\fR" 4 |
| 2591 | .IX Item "-fconstant-string-class=class-name" |
| 2592 | Use \fIclass-name\fR as the name of the class to instantiate for each |
| 2593 | literal string specified with the syntax \f(CW\*(C`@"..."\*(C'\fR. The default |
| 2594 | class name is \f(CW\*(C`NXConstantString\*(C'\fR if the \s-1GNU\s0 runtime is being used, and |
| 2595 | \&\f(CW\*(C`NSConstantString\*(C'\fR if the NeXT runtime is being used (see below). The |
| 2596 | \&\fB\-fconstant\-cfstrings\fR option, if also present, overrides the |
| 2597 | \&\fB\-fconstant\-string\-class\fR setting and cause \f(CW\*(C`@"..."\*(C'\fR literals |
| 2598 | to be laid out as constant CoreFoundation strings. |
| 2599 | .IP "\fB\-fgnu\-runtime\fR" 4 |
| 2600 | .IX Item "-fgnu-runtime" |
| 2601 | Generate object code compatible with the standard \s-1GNU\s0 Objective-C |
| 2602 | runtime. This is the default for most types of systems. |
| 2603 | .IP "\fB\-fnext\-runtime\fR" 4 |
| 2604 | .IX Item "-fnext-runtime" |
| 2605 | Generate output compatible with the NeXT runtime. This is the default |
| 2606 | for NeXT-based systems, including Darwin and Mac \s-1OS\s0 X. The macro |
| 2607 | \&\f(CW\*(C`_\|_NEXT_RUNTIME_\|_\*(C'\fR is predefined if (and only if) this option is |
| 2608 | used. |
| 2609 | .IP "\fB\-fno\-nil\-receivers\fR" 4 |
| 2610 | .IX Item "-fno-nil-receivers" |
| 2611 | Assume that all Objective-C message dispatches (\f(CW\*(C`[receiver |
| 2612 | message:arg]\*(C'\fR) in this translation unit ensure that the receiver is |
| 2613 | not \f(CW\*(C`nil\*(C'\fR. This allows for more efficient entry points in the |
| 2614 | runtime to be used. This option is only available in conjunction with |
| 2615 | the NeXT runtime and \s-1ABI\s0 version 0 or 1. |
| 2616 | .IP "\fB\-fobjc\-abi\-version=\fR\fIn\fR" 4 |
| 2617 | .IX Item "-fobjc-abi-version=n" |
| 2618 | Use version \fIn\fR of the Objective-C \s-1ABI\s0 for the selected runtime. |
| 2619 | This option is currently supported only for the NeXT runtime. In that |
| 2620 | case, Version 0 is the traditional (32\-bit) \s-1ABI\s0 without support for |
| 2621 | properties and other Objective-C 2.0 additions. Version 1 is the |
| 2622 | traditional (32\-bit) \s-1ABI\s0 with support for properties and other |
| 2623 | Objective-C 2.0 additions. Version 2 is the modern (64\-bit) \s-1ABI\s0. If |
| 2624 | nothing is specified, the default is Version 0 on 32\-bit target |
| 2625 | machines, and Version 2 on 64\-bit target machines. |
| 2626 | .IP "\fB\-fobjc\-call\-cxx\-cdtors\fR" 4 |
| 2627 | .IX Item "-fobjc-call-cxx-cdtors" |
| 2628 | For each Objective-C class, check if any of its instance variables is a |
| 2629 | \&\*(C+ object with a non-trivial default constructor. If so, synthesize a |
| 2630 | special \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR instance method which runs |
| 2631 | non-trivial default constructors on any such instance variables, in order, |
| 2632 | and then return \f(CW\*(C`self\*(C'\fR. Similarly, check if any instance variable |
| 2633 | is a \*(C+ object with a non-trivial destructor, and if so, synthesize a |
| 2634 | special \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR method which runs |
| 2635 | all such default destructors, in reverse order. |
| 2636 | .Sp |
| 2637 | The \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR and \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR |
| 2638 | methods thusly generated only operate on instance variables |
| 2639 | declared in the current Objective-C class, and not those inherited |
| 2640 | from superclasses. It is the responsibility of the Objective-C |
| 2641 | runtime to invoke all such methods in an object's inheritance |
| 2642 | hierarchy. The \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR methods are invoked |
| 2643 | by the runtime immediately after a new object instance is allocated; |
| 2644 | the \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR methods are invoked immediately |
| 2645 | before the runtime deallocates an object instance. |
| 2646 | .Sp |
| 2647 | As of this writing, only the NeXT runtime on Mac \s-1OS\s0 X 10.4 and later has |
| 2648 | support for invoking the \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR and |
| 2649 | \&\f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR methods. |
| 2650 | .IP "\fB\-fobjc\-direct\-dispatch\fR" 4 |
| 2651 | .IX Item "-fobjc-direct-dispatch" |
| 2652 | Allow fast jumps to the message dispatcher. On Darwin this is |
| 2653 | accomplished via the comm page. |
| 2654 | .IP "\fB\-fobjc\-exceptions\fR" 4 |
| 2655 | .IX Item "-fobjc-exceptions" |
| 2656 | Enable syntactic support for structured exception handling in |
| 2657 | Objective-C, similar to what is offered by \*(C+ and Java. This option |
| 2658 | is required to use the Objective-C keywords \f(CW@try\fR, |
| 2659 | \&\f(CW@throw\fR, \f(CW@catch\fR, \f(CW@finally\fR and |
| 2660 | \&\f(CW@synchronized\fR. This option is available with both the \s-1GNU\s0 |
| 2661 | runtime and the NeXT runtime (but not available in conjunction with |
| 2662 | the NeXT runtime on Mac \s-1OS\s0 X 10.2 and earlier). |
| 2663 | .IP "\fB\-fobjc\-gc\fR" 4 |
| 2664 | .IX Item "-fobjc-gc" |
| 2665 | Enable garbage collection (\s-1GC\s0) in Objective-C and Objective\-\*(C+ |
| 2666 | programs. This option is only available with the NeXT runtime; the |
| 2667 | \&\s-1GNU\s0 runtime has a different garbage collection implementation that |
| 2668 | does not require special compiler flags. |
| 2669 | .IP "\fB\-fobjc\-nilcheck\fR" 4 |
| 2670 | .IX Item "-fobjc-nilcheck" |
| 2671 | For the NeXT runtime with version 2 of the \s-1ABI\s0, check for a nil |
| 2672 | receiver in method invocations before doing the actual method call. |
| 2673 | This is the default and can be disabled using |
| 2674 | \&\fB\-fno\-objc\-nilcheck\fR. Class methods and super calls are never |
| 2675 | checked for nil in this way no matter what this flag is set to. |
| 2676 | Currently this flag does nothing when the \s-1GNU\s0 runtime, or an older |
| 2677 | version of the NeXT runtime \s-1ABI\s0, is used. |
| 2678 | .IP "\fB\-fobjc\-std=objc1\fR" 4 |
| 2679 | .IX Item "-fobjc-std=objc1" |
| 2680 | Conform to the language syntax of Objective-C 1.0, the language |
| 2681 | recognized by \s-1GCC\s0 4.0. This only affects the Objective-C additions to |
| 2682 | the C/\*(C+ language; it does not affect conformance to C/\*(C+ standards, |
| 2683 | which is controlled by the separate C/\*(C+ dialect option flags. When |
| 2684 | this option is used with the Objective-C or Objective\-\*(C+ compiler, |
| 2685 | any Objective-C syntax that is not recognized by \s-1GCC\s0 4.0 is rejected. |
| 2686 | This is useful if you need to make sure that your Objective-C code can |
| 2687 | be compiled with older versions of \s-1GCC\s0. |
| 2688 | .IP "\fB\-freplace\-objc\-classes\fR" 4 |
| 2689 | .IX Item "-freplace-objc-classes" |
| 2690 | Emit a special marker instructing \fB\f(BIld\fB\|(1)\fR not to statically link in |
| 2691 | the resulting object file, and allow \fB\f(BIdyld\fB\|(1)\fR to load it in at |
| 2692 | run time instead. This is used in conjunction with the Fix-and-Continue |
| 2693 | debugging mode, where the object file in question may be recompiled and |
| 2694 | dynamically reloaded in the course of program execution, without the need |
| 2695 | to restart the program itself. Currently, Fix-and-Continue functionality |
| 2696 | is only available in conjunction with the NeXT runtime on Mac \s-1OS\s0 X 10.3 |
| 2697 | and later. |
| 2698 | .IP "\fB\-fzero\-link\fR" 4 |
| 2699 | .IX Item "-fzero-link" |
| 2700 | When compiling for the NeXT runtime, the compiler ordinarily replaces calls |
| 2701 | to \f(CW\*(C`objc_getClass("...")\*(C'\fR (when the name of the class is known at |
| 2702 | compile time) with static class references that get initialized at load time, |
| 2703 | which improves run-time performance. Specifying the \fB\-fzero\-link\fR flag |
| 2704 | suppresses this behavior and causes calls to \f(CW\*(C`objc_getClass("...")\*(C'\fR |
| 2705 | to be retained. This is useful in Zero-Link debugging mode, since it allows |
| 2706 | for individual class implementations to be modified during program execution. |
| 2707 | The \s-1GNU\s0 runtime currently always retains calls to \f(CW\*(C`objc_get_class("...")\*(C'\fR |
| 2708 | regardless of command-line options. |
| 2709 | .IP "\fB\-gen\-decls\fR" 4 |
| 2710 | .IX Item "-gen-decls" |
| 2711 | Dump interface declarations for all classes seen in the source file to a |
| 2712 | file named \fI\fIsourcename\fI.decl\fR. |
| 2713 | .IP "\fB\-Wassign\-intercept\fR (Objective-C and Objective\-\*(C+ only)" 4 |
| 2714 | .IX Item "-Wassign-intercept (Objective-C and Objective- only)" |
| 2715 | Warn whenever an Objective-C assignment is being intercepted by the |
| 2716 | garbage collector. |
| 2717 | .IP "\fB\-Wno\-protocol\fR (Objective-C and Objective\-\*(C+ only)" 4 |
| 2718 | .IX Item "-Wno-protocol (Objective-C and Objective- only)" |
| 2719 | If a class is declared to implement a protocol, a warning is issued for |
| 2720 | every method in the protocol that is not implemented by the class. The |
| 2721 | default behavior is to issue a warning for every method not explicitly |
| 2722 | implemented in the class, even if a method implementation is inherited |
| 2723 | from the superclass. If you use the \fB\-Wno\-protocol\fR option, then |
| 2724 | methods inherited from the superclass are considered to be implemented, |
| 2725 | and no warning is issued for them. |
| 2726 | .IP "\fB\-Wselector\fR (Objective-C and Objective\-\*(C+ only)" 4 |
| 2727 | .IX Item "-Wselector (Objective-C and Objective- only)" |
| 2728 | Warn if multiple methods of different types for the same selector are |
| 2729 | found during compilation. The check is performed on the list of methods |
| 2730 | in the final stage of compilation. Additionally, a check is performed |
| 2731 | for each selector appearing in a \f(CW\*(C`@selector(...)\*(C'\fR |
| 2732 | expression, and a corresponding method for that selector has been found |
| 2733 | during compilation. Because these checks scan the method table only at |
| 2734 | the end of compilation, these warnings are not produced if the final |
| 2735 | stage of compilation is not reached, for example because an error is |
| 2736 | found during compilation, or because the \fB\-fsyntax\-only\fR option is |
| 2737 | being used. |
| 2738 | .IP "\fB\-Wstrict\-selector\-match\fR (Objective-C and Objective\-\*(C+ only)" 4 |
| 2739 | .IX Item "-Wstrict-selector-match (Objective-C and Objective- only)" |
| 2740 | Warn if multiple methods with differing argument and/or return types are |
| 2741 | found for a given selector when attempting to send a message using this |
| 2742 | selector to a receiver of type \f(CW\*(C`id\*(C'\fR or \f(CW\*(C`Class\*(C'\fR. When this flag |
| 2743 | is off (which is the default behavior), the compiler omits such warnings |
| 2744 | if any differences found are confined to types that share the same size |
| 2745 | and alignment. |
| 2746 | .IP "\fB\-Wundeclared\-selector\fR (Objective-C and Objective\-\*(C+ only)" 4 |
| 2747 | .IX Item "-Wundeclared-selector (Objective-C and Objective- only)" |
| 2748 | Warn if a \f(CW\*(C`@selector(...)\*(C'\fR expression referring to an |
| 2749 | undeclared selector is found. A selector is considered undeclared if no |
| 2750 | method with that name has been declared before the |
| 2751 | \&\f(CW\*(C`@selector(...)\*(C'\fR expression, either explicitly in an |
| 2752 | \&\f(CW@interface\fR or \f(CW@protocol\fR declaration, or implicitly in |
| 2753 | an \f(CW@implementation\fR section. This option always performs its |
| 2754 | checks as soon as a \f(CW\*(C`@selector(...)\*(C'\fR expression is found, |
| 2755 | while \fB\-Wselector\fR only performs its checks in the final stage of |
| 2756 | compilation. This also enforces the coding style convention |
| 2757 | that methods and selectors must be declared before being used. |
| 2758 | .IP "\fB\-print\-objc\-runtime\-info\fR" 4 |
| 2759 | .IX Item "-print-objc-runtime-info" |
| 2760 | Generate C header describing the largest structure that is passed by |
| 2761 | value, if any. |
| 2762 | .SS "Options to Control Diagnostic Messages Formatting" |
| 2763 | .IX Subsection "Options to Control Diagnostic Messages Formatting" |
| 2764 | Traditionally, diagnostic messages have been formatted irrespective of |
| 2765 | the output device's aspect (e.g. its width, ...). You can use the |
| 2766 | options described below |
| 2767 | to control the formatting algorithm for diagnostic messages, |
| 2768 | e.g. how many characters per line, how often source location |
| 2769 | information should be reported. Note that some language front ends may not |
| 2770 | honor these options. |
| 2771 | .IP "\fB\-fmessage\-length=\fR\fIn\fR" 4 |
| 2772 | .IX Item "-fmessage-length=n" |
| 2773 | Try to format error messages so that they fit on lines of about \fIn\fR |
| 2774 | characters. The default is 72 characters for \fBg++\fR and 0 for the rest of |
| 2775 | the front ends supported by \s-1GCC\s0. If \fIn\fR is zero, then no |
| 2776 | line-wrapping is done; each error message appears on a single |
| 2777 | line. |
| 2778 | .IP "\fB\-fdiagnostics\-show\-location=once\fR" 4 |
| 2779 | .IX Item "-fdiagnostics-show-location=once" |
| 2780 | Only meaningful in line-wrapping mode. Instructs the diagnostic messages |
| 2781 | reporter to emit source location information \fIonce\fR; that is, in |
| 2782 | case the message is too long to fit on a single physical line and has to |
| 2783 | be wrapped, the source location won't be emitted (as prefix) again, |
| 2784 | over and over, in subsequent continuation lines. This is the default |
| 2785 | behavior. |
| 2786 | .IP "\fB\-fdiagnostics\-show\-location=every\-line\fR" 4 |
| 2787 | .IX Item "-fdiagnostics-show-location=every-line" |
| 2788 | Only meaningful in line-wrapping mode. Instructs the diagnostic |
| 2789 | messages reporter to emit the same source location information (as |
| 2790 | prefix) for physical lines that result from the process of breaking |
| 2791 | a message which is too long to fit on a single line. |
| 2792 | .IP "\fB\-fno\-diagnostics\-show\-option\fR" 4 |
| 2793 | .IX Item "-fno-diagnostics-show-option" |
| 2794 | By default, each diagnostic emitted includes text indicating the |
| 2795 | command-line option that directly controls the diagnostic (if such an |
| 2796 | option is known to the diagnostic machinery). Specifying the |
| 2797 | \&\fB\-fno\-diagnostics\-show\-option\fR flag suppresses that behavior. |
| 2798 | .IP "\fB\-fno\-diagnostics\-show\-caret\fR" 4 |
| 2799 | .IX Item "-fno-diagnostics-show-caret" |
| 2800 | By default, each diagnostic emitted includes the original source line |
| 2801 | and a caret '^' indicating the column. This option suppresses this |
| 2802 | information. |
| 2803 | .SS "Options to Request or Suppress Warnings" |
| 2804 | .IX Subsection "Options to Request or Suppress Warnings" |
| 2805 | Warnings are diagnostic messages that report constructions that |
| 2806 | are not inherently erroneous but that are risky or suggest there |
| 2807 | may have been an error. |
| 2808 | .PP |
| 2809 | The following language-independent options do not enable specific |
| 2810 | warnings but control the kinds of diagnostics produced by \s-1GCC\s0. |
| 2811 | .IP "\fB\-fsyntax\-only\fR" 4 |
| 2812 | .IX Item "-fsyntax-only" |
| 2813 | Check the code for syntax errors, but don't do anything beyond that. |
| 2814 | .IP "\fB\-fmax\-errors=\fR\fIn\fR" 4 |
| 2815 | .IX Item "-fmax-errors=n" |
| 2816 | Limits the maximum number of error messages to \fIn\fR, at which point |
| 2817 | \&\s-1GCC\s0 bails out rather than attempting to continue processing the source |
| 2818 | code. If \fIn\fR is 0 (the default), there is no limit on the number |
| 2819 | of error messages produced. If \fB\-Wfatal\-errors\fR is also |
| 2820 | specified, then \fB\-Wfatal\-errors\fR takes precedence over this |
| 2821 | option. |
| 2822 | .IP "\fB\-w\fR" 4 |
| 2823 | .IX Item "-w" |
| 2824 | Inhibit all warning messages. |
| 2825 | .IP "\fB\-Werror\fR" 4 |
| 2826 | .IX Item "-Werror" |
| 2827 | Make all warnings into errors. |
| 2828 | .IP "\fB\-Werror=\fR" 4 |
| 2829 | .IX Item "-Werror=" |
| 2830 | Make the specified warning into an error. The specifier for a warning |
| 2831 | is appended; for example \fB\-Werror=switch\fR turns the warnings |
| 2832 | controlled by \fB\-Wswitch\fR into errors. This switch takes a |
| 2833 | negative form, to be used to negate \fB\-Werror\fR for specific |
| 2834 | warnings; for example \fB\-Wno\-error=switch\fR makes |
| 2835 | \&\fB\-Wswitch\fR warnings not be errors, even when \fB\-Werror\fR |
| 2836 | is in effect. |
| 2837 | .Sp |
| 2838 | The warning message for each controllable warning includes the |
| 2839 | option that controls the warning. That option can then be used with |
| 2840 | \&\fB\-Werror=\fR and \fB\-Wno\-error=\fR as described above. |
| 2841 | (Printing of the option in the warning message can be disabled using the |
| 2842 | \&\fB\-fno\-diagnostics\-show\-option\fR flag.) |
| 2843 | .Sp |
| 2844 | Note that specifying \fB\-Werror=\fR\fIfoo\fR automatically implies |
| 2845 | \&\fB\-W\fR\fIfoo\fR. However, \fB\-Wno\-error=\fR\fIfoo\fR does not |
| 2846 | imply anything. |
| 2847 | .IP "\fB\-Wfatal\-errors\fR" 4 |
| 2848 | .IX Item "-Wfatal-errors" |
| 2849 | This option causes the compiler to abort compilation on the first error |
| 2850 | occurred rather than trying to keep going and printing further error |
| 2851 | messages. |
| 2852 | .PP |
| 2853 | You can request many specific warnings with options beginning with |
| 2854 | \&\fB\-W\fR, for example \fB\-Wimplicit\fR to request warnings on |
| 2855 | implicit declarations. Each of these specific warning options also |
| 2856 | has a negative form beginning \fB\-Wno\-\fR to turn off warnings; for |
| 2857 | example, \fB\-Wno\-implicit\fR. This manual lists only one of the |
| 2858 | two forms, whichever is not the default. For further |
| 2859 | language-specific options also refer to \fB\*(C+ Dialect Options\fR and |
| 2860 | \&\fBObjective-C and Objective\-\*(C+ Dialect Options\fR. |
| 2861 | .PP |
| 2862 | When an unrecognized warning option is requested (e.g., |
| 2863 | \&\fB\-Wunknown\-warning\fR), \s-1GCC\s0 emits a diagnostic stating |
| 2864 | that the option is not recognized. However, if the \fB\-Wno\-\fR form |
| 2865 | is used, the behavior is slightly different: no diagnostic is |
| 2866 | produced for \fB\-Wno\-unknown\-warning\fR unless other diagnostics |
| 2867 | are being produced. This allows the use of new \fB\-Wno\-\fR options |
| 2868 | with old compilers, but if something goes wrong, the compiler |
| 2869 | warns that an unrecognized option is present. |
| 2870 | .IP "\fB\-Wpedantic\fR" 4 |
| 2871 | .IX Item "-Wpedantic" |
| 2872 | .PD 0 |
| 2873 | .IP "\fB\-pedantic\fR" 4 |
| 2874 | .IX Item "-pedantic" |
| 2875 | .PD |
| 2876 | Issue all the warnings demanded by strict \s-1ISO\s0 C and \s-1ISO\s0 \*(C+; |
| 2877 | reject all programs that use forbidden extensions, and some other |
| 2878 | programs that do not follow \s-1ISO\s0 C and \s-1ISO\s0 \*(C+. For \s-1ISO\s0 C, follows the |
| 2879 | version of the \s-1ISO\s0 C standard specified by any \fB\-std\fR option used. |
| 2880 | .Sp |
| 2881 | Valid \s-1ISO\s0 C and \s-1ISO\s0 \*(C+ programs should compile properly with or without |
| 2882 | this option (though a rare few require \fB\-ansi\fR or a |
| 2883 | \&\fB\-std\fR option specifying the required version of \s-1ISO\s0 C). However, |
| 2884 | without this option, certain \s-1GNU\s0 extensions and traditional C and \*(C+ |
| 2885 | features are supported as well. With this option, they are rejected. |
| 2886 | .Sp |
| 2887 | \&\fB\-Wpedantic\fR does not cause warning messages for use of the |
| 2888 | alternate keywords whose names begin and end with \fB_\|_\fR. Pedantic |
| 2889 | warnings are also disabled in the expression that follows |
| 2890 | \&\f(CW\*(C`_\|_extension_\|_\*(C'\fR. However, only system header files should use |
| 2891 | these escape routes; application programs should avoid them. |
| 2892 | .Sp |
| 2893 | Some users try to use \fB\-Wpedantic\fR to check programs for strict \s-1ISO\s0 |
| 2894 | C conformance. They soon find that it does not do quite what they want: |
| 2895 | it finds some non-ISO practices, but not all\-\-\-only those for which |
| 2896 | \&\s-1ISO\s0 C \fIrequires\fR a diagnostic, and some others for which |
| 2897 | diagnostics have been added. |
| 2898 | .Sp |
| 2899 | A feature to report any failure to conform to \s-1ISO\s0 C might be useful in |
| 2900 | some instances, but would require considerable additional work and would |
| 2901 | be quite different from \fB\-Wpedantic\fR. We don't have plans to |
| 2902 | support such a feature in the near future. |
| 2903 | .Sp |
| 2904 | Where the standard specified with \fB\-std\fR represents a \s-1GNU\s0 |
| 2905 | extended dialect of C, such as \fBgnu90\fR or \fBgnu99\fR, there is a |
| 2906 | corresponding \fIbase standard\fR, the version of \s-1ISO\s0 C on which the \s-1GNU\s0 |
| 2907 | extended dialect is based. Warnings from \fB\-Wpedantic\fR are given |
| 2908 | where they are required by the base standard. (It does not make sense |
| 2909 | for such warnings to be given only for features not in the specified \s-1GNU\s0 |
| 2910 | C dialect, since by definition the \s-1GNU\s0 dialects of C include all |
| 2911 | features the compiler supports with the given option, and there would be |
| 2912 | nothing to warn about.) |
| 2913 | .IP "\fB\-pedantic\-errors\fR" 4 |
| 2914 | .IX Item "-pedantic-errors" |
| 2915 | Like \fB\-Wpedantic\fR, except that errors are produced rather than |
| 2916 | warnings. |
| 2917 | .IP "\fB\-Wall\fR" 4 |
| 2918 | .IX Item "-Wall" |
| 2919 | This enables all the warnings about constructions that some users |
| 2920 | consider questionable, and that are easy to avoid (or modify to |
| 2921 | prevent the warning), even in conjunction with macros. This also |
| 2922 | enables some language-specific warnings described in \fB\*(C+ Dialect |
| 2923 | Options\fR and \fBObjective-C and Objective\-\*(C+ Dialect Options\fR. |
| 2924 | .Sp |
| 2925 | \&\fB\-Wall\fR turns on the following warning flags: |
| 2926 | .Sp |
| 2927 | \&\fB\-Waddress |
| 2928 | \&\-Warray\-bounds\fR (only with\fB \fR\fB\-O2\fR) |
| 2929 | \&\fB\-Wc++11\-compat |
| 2930 | \&\-Wchar\-subscripts |
| 2931 | \&\-Wenum\-compare\fR (in C/ObjC; this is on by default in \*(C+) |
| 2932 | \&\fB\-Wimplicit\-int\fR (C and Objective-C only) |
| 2933 | \&\fB\-Wimplicit\-function\-declaration\fR (C and Objective-C only) |
| 2934 | \&\fB\-Wcomment |
| 2935 | \&\-Wformat |
| 2936 | \&\-Wmain\fR (only for C/ObjC and unless\fB \fR\fB\-ffreestanding\fR) |
| 2937 | \&\fB\-Wmaybe\-uninitialized |
| 2938 | \&\-Wmissing\-braces\fR (only for C/ObjC) |
| 2939 | \&\fB\-Wnonnull |
| 2940 | \&\-Wparentheses |
| 2941 | \&\-Wpointer\-sign |
| 2942 | \&\-Wreorder |
| 2943 | \&\-Wreturn\-type |
| 2944 | \&\-Wsequence\-point |
| 2945 | \&\-Wsign\-compare\fR (only in \*(C+) |
| 2946 | \&\fB\-Wstrict\-aliasing |
| 2947 | \&\-Wstrict\-overflow=1 |
| 2948 | \&\-Wswitch |
| 2949 | \&\-Wtrigraphs |
| 2950 | \&\-Wuninitialized |
| 2951 | \&\-Wunknown\-pragmas |
| 2952 | \&\-Wunused\-function |
| 2953 | \&\-Wunused\-label |
| 2954 | \&\-Wunused\-value |
| 2955 | \&\-Wunused\-variable |
| 2956 | \&\-Wvolatile\-register\-var\fR |
| 2957 | .Sp |
| 2958 | Note that some warning flags are not implied by \fB\-Wall\fR. Some of |
| 2959 | them warn about constructions that users generally do not consider |
| 2960 | questionable, but which occasionally you might wish to check for; |
| 2961 | others warn about constructions that are necessary or hard to avoid in |
| 2962 | some cases, and there is no simple way to modify the code to suppress |
| 2963 | the warning. Some of them are enabled by \fB\-Wextra\fR but many of |
| 2964 | them must be enabled individually. |
| 2965 | .IP "\fB\-Wextra\fR" 4 |
| 2966 | .IX Item "-Wextra" |
| 2967 | This enables some extra warning flags that are not enabled by |
| 2968 | \&\fB\-Wall\fR. (This option used to be called \fB\-W\fR. The older |
| 2969 | name is still supported, but the newer name is more descriptive.) |
| 2970 | .Sp |
| 2971 | \&\fB\-Wclobbered |
| 2972 | \&\-Wempty\-body |
| 2973 | \&\-Wignored\-qualifiers |
| 2974 | \&\-Wmissing\-field\-initializers |
| 2975 | \&\-Wmissing\-parameter\-type\fR (C only) |
| 2976 | \&\fB\-Wold\-style\-declaration\fR (C only) |
| 2977 | \&\fB\-Woverride\-init |
| 2978 | \&\-Wsign\-compare |
| 2979 | \&\-Wtype\-limits |
| 2980 | \&\-Wuninitialized |
| 2981 | \&\-Wunused\-parameter\fR (only with\fB \fR\fB\-Wunused\fR\fB \fRor\fB \fR\fB\-Wall\fR) |
| 2982 | \&\fB\-Wunused\-but\-set\-parameter\fR (only with\fB \fR\fB\-Wunused\fR\fB \fRor\fB \fR\fB\-Wall\fR) \fB \fR |
| 2983 | .Sp |
| 2984 | The option \fB\-Wextra\fR also prints warning messages for the |
| 2985 | following cases: |
| 2986 | .RS 4 |
| 2987 | .IP "\(bu" 4 |
| 2988 | A pointer is compared against integer zero with \fB<\fR, \fB<=\fR, |
| 2989 | \&\fB>\fR, or \fB>=\fR. |
| 2990 | .IP "\(bu" 4 |
| 2991 | (\*(C+ only) An enumerator and a non-enumerator both appear in a |
| 2992 | conditional expression. |
| 2993 | .IP "\(bu" 4 |
| 2994 | (\*(C+ only) Ambiguous virtual bases. |
| 2995 | .IP "\(bu" 4 |
| 2996 | (\*(C+ only) Subscripting an array that has been declared \fBregister\fR. |
| 2997 | .IP "\(bu" 4 |
| 2998 | (\*(C+ only) Taking the address of a variable that has been declared |
| 2999 | \&\fBregister\fR. |
| 3000 | .IP "\(bu" 4 |
| 3001 | (\*(C+ only) A base class is not initialized in a derived class's copy |
| 3002 | constructor. |
| 3003 | .RE |
| 3004 | .RS 4 |
| 3005 | .RE |
| 3006 | .IP "\fB\-Wchar\-subscripts\fR" 4 |
| 3007 | .IX Item "-Wchar-subscripts" |
| 3008 | Warn if an array subscript has type \f(CW\*(C`char\*(C'\fR. This is a common cause |
| 3009 | of error, as programmers often forget that this type is signed on some |
| 3010 | machines. |
| 3011 | This warning is enabled by \fB\-Wall\fR. |
| 3012 | .IP "\fB\-Wcomment\fR" 4 |
| 3013 | .IX Item "-Wcomment" |
| 3014 | Warn whenever a comment-start sequence \fB/*\fR appears in a \fB/*\fR |
| 3015 | comment, or whenever a Backslash-Newline appears in a \fB//\fR comment. |
| 3016 | This warning is enabled by \fB\-Wall\fR. |
| 3017 | .IP "\fB\-Wno\-coverage\-mismatch\fR" 4 |
| 3018 | .IX Item "-Wno-coverage-mismatch" |
| 3019 | Warn if feedback profiles do not match when using the |
| 3020 | \&\fB\-fprofile\-use\fR option. |
| 3021 | If a source file is changed between compiling with \fB\-fprofile\-gen\fR and |
| 3022 | with \fB\-fprofile\-use\fR, the files with the profile feedback can fail |
| 3023 | to match the source file and \s-1GCC\s0 cannot use the profile feedback |
| 3024 | information. By default, this warning is enabled and is treated as an |
| 3025 | error. \fB\-Wno\-coverage\-mismatch\fR can be used to disable the |
| 3026 | warning or \fB\-Wno\-error=coverage\-mismatch\fR can be used to |
| 3027 | disable the error. Disabling the error for this warning can result in |
| 3028 | poorly optimized code and is useful only in the |
| 3029 | case of very minor changes such as bug fixes to an existing code-base. |
| 3030 | Completely disabling the warning is not recommended. |
| 3031 | .IP "\fB\-Wno\-cpp\fR" 4 |
| 3032 | .IX Item "-Wno-cpp" |
| 3033 | (C, Objective-C, \*(C+, Objective\-\*(C+ and Fortran only) |
| 3034 | .Sp |
| 3035 | Suppress warning messages emitted by \f(CW\*(C`#warning\*(C'\fR directives. |
| 3036 | .IP "\fB\-Wdouble\-promotion\fR (C, \*(C+, Objective-C and Objective\-\*(C+ only)" 4 |
| 3037 | .IX Item "-Wdouble-promotion (C, , Objective-C and Objective- only)" |
| 3038 | Give a warning when a value of type \f(CW\*(C`float\*(C'\fR is implicitly |
| 3039 | promoted to \f(CW\*(C`double\*(C'\fR. CPUs with a 32\-bit \*(L"single-precision\*(R" |
| 3040 | floating-point unit implement \f(CW\*(C`float\*(C'\fR in hardware, but emulate |
| 3041 | \&\f(CW\*(C`double\*(C'\fR in software. On such a machine, doing computations |
| 3042 | using \f(CW\*(C`double\*(C'\fR values is much more expensive because of the |
| 3043 | overhead required for software emulation. |
| 3044 | .Sp |
| 3045 | It is easy to accidentally do computations with \f(CW\*(C`double\*(C'\fR because |
| 3046 | floating-point literals are implicitly of type \f(CW\*(C`double\*(C'\fR. For |
| 3047 | example, in: |
| 3048 | .Sp |
| 3049 | .Vb 4 |
| 3050 | \& float area(float radius) |
| 3051 | \& { |
| 3052 | \& return 3.14159 * radius * radius; |
| 3053 | \& } |
| 3054 | .Ve |
| 3055 | .Sp |
| 3056 | the compiler performs the entire computation with \f(CW\*(C`double\*(C'\fR |
| 3057 | because the floating-point literal is a \f(CW\*(C`double\*(C'\fR. |
| 3058 | .IP "\fB\-Wformat\fR" 4 |
| 3059 | .IX Item "-Wformat" |
| 3060 | .PD 0 |
| 3061 | .IP "\fB\-Wformat=\fR\fIn\fR" 4 |
| 3062 | .IX Item "-Wformat=n" |
| 3063 | .PD |
| 3064 | Check calls to \f(CW\*(C`printf\*(C'\fR and \f(CW\*(C`scanf\*(C'\fR, etc., to make sure that |
| 3065 | the arguments supplied have types appropriate to the format string |
| 3066 | specified, and that the conversions specified in the format string make |
| 3067 | sense. This includes standard functions, and others specified by format |
| 3068 | attributes, in the \f(CW\*(C`printf\*(C'\fR, |
| 3069 | \&\f(CW\*(C`scanf\*(C'\fR, \f(CW\*(C`strftime\*(C'\fR and \f(CW\*(C`strfmon\*(C'\fR (an X/Open extension, |
| 3070 | not in the C standard) families (or other target-specific families). |
| 3071 | Which functions are checked without format attributes having been |
| 3072 | specified depends on the standard version selected, and such checks of |
| 3073 | functions without the attribute specified are disabled by |
| 3074 | \&\fB\-ffreestanding\fR or \fB\-fno\-builtin\fR. |
| 3075 | .Sp |
| 3076 | The formats are checked against the format features supported by \s-1GNU\s0 |
| 3077 | libc version 2.2. These include all \s-1ISO\s0 C90 and C99 features, as well |
| 3078 | as features from the Single Unix Specification and some \s-1BSD\s0 and \s-1GNU\s0 |
| 3079 | extensions. Other library implementations may not support all these |
| 3080 | features; \s-1GCC\s0 does not support warning about features that go beyond a |
| 3081 | particular library's limitations. However, if \fB\-Wpedantic\fR is used |
| 3082 | with \fB\-Wformat\fR, warnings are given about format features not |
| 3083 | in the selected standard version (but not for \f(CW\*(C`strfmon\*(C'\fR formats, |
| 3084 | since those are not in any version of the C standard). |
| 3085 | .RS 4 |
| 3086 | .IP "\fB\-Wformat=1\fR" 4 |
| 3087 | .IX Item "-Wformat=1" |
| 3088 | .PD 0 |
| 3089 | .IP "\fB\-Wformat\fR" 4 |
| 3090 | .IX Item "-Wformat" |
| 3091 | .PD |
| 3092 | Option \fB\-Wformat\fR is equivalent to \fB\-Wformat=1\fR, and |
| 3093 | \&\fB\-Wno\-format\fR is equivalent to \fB\-Wformat=0\fR. Since |
| 3094 | \&\fB\-Wformat\fR also checks for null format arguments for several |
| 3095 | functions, \fB\-Wformat\fR also implies \fB\-Wnonnull\fR. Some |
| 3096 | aspects of this level of format checking can be disabled by the |
| 3097 | options: \fB\-Wno\-format\-contains\-nul\fR, |
| 3098 | \&\fB\-Wno\-format\-extra\-args\fR, and \fB\-Wno\-format\-zero\-length\fR. |
| 3099 | \&\fB\-Wformat\fR is enabled by \fB\-Wall\fR. |
| 3100 | .IP "\fB\-Wno\-format\-contains\-nul\fR" 4 |
| 3101 | .IX Item "-Wno-format-contains-nul" |
| 3102 | If \fB\-Wformat\fR is specified, do not warn about format strings that |
| 3103 | contain \s-1NUL\s0 bytes. |
| 3104 | .IP "\fB\-Wno\-format\-extra\-args\fR" 4 |
| 3105 | .IX Item "-Wno-format-extra-args" |
| 3106 | If \fB\-Wformat\fR is specified, do not warn about excess arguments to a |
| 3107 | \&\f(CW\*(C`printf\*(C'\fR or \f(CW\*(C`scanf\*(C'\fR format function. The C standard specifies |
| 3108 | that such arguments are ignored. |
| 3109 | .Sp |
| 3110 | Where the unused arguments lie between used arguments that are |
| 3111 | specified with \fB$\fR operand number specifications, normally |
| 3112 | warnings are still given, since the implementation could not know what |
| 3113 | type to pass to \f(CW\*(C`va_arg\*(C'\fR to skip the unused arguments. However, |
| 3114 | in the case of \f(CW\*(C`scanf\*(C'\fR formats, this option suppresses the |
| 3115 | warning if the unused arguments are all pointers, since the Single |
| 3116 | Unix Specification says that such unused arguments are allowed. |
| 3117 | .IP "\fB\-Wno\-format\-zero\-length\fR" 4 |
| 3118 | .IX Item "-Wno-format-zero-length" |
| 3119 | If \fB\-Wformat\fR is specified, do not warn about zero-length formats. |
| 3120 | The C standard specifies that zero-length formats are allowed. |
| 3121 | .IP "\fB\-Wformat=2\fR" 4 |
| 3122 | .IX Item "-Wformat=2" |
| 3123 | Enable \fB\-Wformat\fR plus additional format checks. Currently |
| 3124 | equivalent to \fB\-Wformat \-Wformat\-nonliteral \-Wformat\-security |
| 3125 | \&\-Wformat\-y2k\fR. |
| 3126 | .IP "\fB\-Wformat\-nonliteral\fR" 4 |
| 3127 | .IX Item "-Wformat-nonliteral" |
| 3128 | If \fB\-Wformat\fR is specified, also warn if the format string is not a |
| 3129 | string literal and so cannot be checked, unless the format function |
| 3130 | takes its format arguments as a \f(CW\*(C`va_list\*(C'\fR. |
| 3131 | .IP "\fB\-Wformat\-security\fR" 4 |
| 3132 | .IX Item "-Wformat-security" |
| 3133 | If \fB\-Wformat\fR is specified, also warn about uses of format |
| 3134 | functions that represent possible security problems. At present, this |
| 3135 | warns about calls to \f(CW\*(C`printf\*(C'\fR and \f(CW\*(C`scanf\*(C'\fR functions where the |
| 3136 | format string is not a string literal and there are no format arguments, |
| 3137 | as in \f(CW\*(C`printf (foo);\*(C'\fR. This may be a security hole if the format |
| 3138 | string came from untrusted input and contains \fB\f(CB%n\fB\fR. (This is |
| 3139 | currently a subset of what \fB\-Wformat\-nonliteral\fR warns about, but |
| 3140 | in future warnings may be added to \fB\-Wformat\-security\fR that are not |
| 3141 | included in \fB\-Wformat\-nonliteral\fR.) |
| 3142 | .IP "\fB\-Wformat\-y2k\fR" 4 |
| 3143 | .IX Item "-Wformat-y2k" |
| 3144 | If \fB\-Wformat\fR is specified, also warn about \f(CW\*(C`strftime\*(C'\fR |
| 3145 | formats that may yield only a two-digit year. |
| 3146 | .RE |
| 3147 | .RS 4 |
| 3148 | .RE |
| 3149 | .IP "\fB\-Wnonnull\fR" 4 |
| 3150 | .IX Item "-Wnonnull" |
| 3151 | Warn about passing a null pointer for arguments marked as |
| 3152 | requiring a non-null value by the \f(CW\*(C`nonnull\*(C'\fR function attribute. |
| 3153 | .Sp |
| 3154 | \&\fB\-Wnonnull\fR is included in \fB\-Wall\fR and \fB\-Wformat\fR. It |
| 3155 | can be disabled with the \fB\-Wno\-nonnull\fR option. |
| 3156 | .IP "\fB\-Winit\-self\fR (C, \*(C+, Objective-C and Objective\-\*(C+ only)" 4 |
| 3157 | .IX Item "-Winit-self (C, , Objective-C and Objective- only)" |
| 3158 | Warn about uninitialized variables that are initialized with themselves. |
| 3159 | Note this option can only be used with the \fB\-Wuninitialized\fR option. |
| 3160 | .Sp |
| 3161 | For example, \s-1GCC\s0 warns about \f(CW\*(C`i\*(C'\fR being uninitialized in the |
| 3162 | following snippet only when \fB\-Winit\-self\fR has been specified: |
| 3163 | .Sp |
| 3164 | .Vb 5 |
| 3165 | \& int f() |
| 3166 | \& { |
| 3167 | \& int i = i; |
| 3168 | \& return i; |
| 3169 | \& } |
| 3170 | .Ve |
| 3171 | .Sp |
| 3172 | This warning is enabled by \fB\-Wall\fR in \*(C+. |
| 3173 | .IP "\fB\-Wimplicit\-int\fR (C and Objective-C only)" 4 |
| 3174 | .IX Item "-Wimplicit-int (C and Objective-C only)" |
| 3175 | Warn when a declaration does not specify a type. |
| 3176 | This warning is enabled by \fB\-Wall\fR. |
| 3177 | .IP "\fB\-Wimplicit\-function\-declaration\fR (C and Objective-C only)" 4 |
| 3178 | .IX Item "-Wimplicit-function-declaration (C and Objective-C only)" |
| 3179 | Give a warning whenever a function is used before being declared. In |
| 3180 | C99 mode (\fB\-std=c99\fR or \fB\-std=gnu99\fR), this warning is |
| 3181 | enabled by default and it is made into an error by |
| 3182 | \&\fB\-pedantic\-errors\fR. This warning is also enabled by |
| 3183 | \&\fB\-Wall\fR. |
| 3184 | .IP "\fB\-Wimplicit\fR (C and Objective-C only)" 4 |
| 3185 | .IX Item "-Wimplicit (C and Objective-C only)" |
| 3186 | Same as \fB\-Wimplicit\-int\fR and \fB\-Wimplicit\-function\-declaration\fR. |
| 3187 | This warning is enabled by \fB\-Wall\fR. |
| 3188 | .IP "\fB\-Wignored\-qualifiers\fR (C and \*(C+ only)" 4 |
| 3189 | .IX Item "-Wignored-qualifiers (C and only)" |
| 3190 | Warn if the return type of a function has a type qualifier |
| 3191 | such as \f(CW\*(C`const\*(C'\fR. For \s-1ISO\s0 C such a type qualifier has no effect, |
| 3192 | since the value returned by a function is not an lvalue. |
| 3193 | For \*(C+, the warning is only emitted for scalar types or \f(CW\*(C`void\*(C'\fR. |
| 3194 | \&\s-1ISO\s0 C prohibits qualified \f(CW\*(C`void\*(C'\fR return types on function |
| 3195 | definitions, so such return types always receive a warning |
| 3196 | even without this option. |
| 3197 | .Sp |
| 3198 | This warning is also enabled by \fB\-Wextra\fR. |
| 3199 | .IP "\fB\-Wmain\fR" 4 |
| 3200 | .IX Item "-Wmain" |
| 3201 | Warn if the type of \fBmain\fR is suspicious. \fBmain\fR should be |
| 3202 | a function with external linkage, returning int, taking either zero |
| 3203 | arguments, two, or three arguments of appropriate types. This warning |
| 3204 | is enabled by default in \*(C+ and is enabled by either \fB\-Wall\fR |
| 3205 | or \fB\-Wpedantic\fR. |
| 3206 | .IP "\fB\-Wmissing\-braces\fR" 4 |
| 3207 | .IX Item "-Wmissing-braces" |
| 3208 | Warn if an aggregate or union initializer is not fully bracketed. In |
| 3209 | the following example, the initializer for \fBa\fR is not fully |
| 3210 | bracketed, but that for \fBb\fR is fully bracketed. This warning is |
| 3211 | enabled by \fB\-Wall\fR in C. |
| 3212 | .Sp |
| 3213 | .Vb 2 |
| 3214 | \& int a[2][2] = { 0, 1, 2, 3 }; |
| 3215 | \& int b[2][2] = { { 0, 1 }, { 2, 3 } }; |
| 3216 | .Ve |
| 3217 | .Sp |
| 3218 | This warning is enabled by \fB\-Wall\fR. |
| 3219 | .IP "\fB\-Wmissing\-include\-dirs\fR (C, \*(C+, Objective-C and Objective\-\*(C+ only)" 4 |
| 3220 | .IX Item "-Wmissing-include-dirs (C, , Objective-C and Objective- only)" |
| 3221 | Warn if a user-supplied include directory does not exist. |
| 3222 | .IP "\fB\-Wparentheses\fR" 4 |
| 3223 | .IX Item "-Wparentheses" |
| 3224 | Warn if parentheses are omitted in certain contexts, such |
| 3225 | as when there is an assignment in a context where a truth value |
| 3226 | is expected, or when operators are nested whose precedence people |
| 3227 | often get confused about. |
| 3228 | .Sp |
| 3229 | Also warn if a comparison like \fBx<=y<=z\fR appears; this is |
| 3230 | equivalent to \fB(x<=y ? 1 : 0) <= z\fR, which is a different |
| 3231 | interpretation from that of ordinary mathematical notation. |
| 3232 | .Sp |
| 3233 | Also warn about constructions where there may be confusion to which |
| 3234 | \&\f(CW\*(C`if\*(C'\fR statement an \f(CW\*(C`else\*(C'\fR branch belongs. Here is an example of |
| 3235 | such a case: |
| 3236 | .Sp |
| 3237 | .Vb 7 |
| 3238 | \& { |
| 3239 | \& if (a) |
| 3240 | \& if (b) |
| 3241 | \& foo (); |
| 3242 | \& else |
| 3243 | \& bar (); |
| 3244 | \& } |
| 3245 | .Ve |
| 3246 | .Sp |
| 3247 | In C/\*(C+, every \f(CW\*(C`else\*(C'\fR branch belongs to the innermost possible |
| 3248 | \&\f(CW\*(C`if\*(C'\fR statement, which in this example is \f(CW\*(C`if (b)\*(C'\fR. This is |
| 3249 | often not what the programmer expected, as illustrated in the above |
| 3250 | example by indentation the programmer chose. When there is the |
| 3251 | potential for this confusion, \s-1GCC\s0 issues a warning when this flag |
| 3252 | is specified. To eliminate the warning, add explicit braces around |
| 3253 | the innermost \f(CW\*(C`if\*(C'\fR statement so there is no way the \f(CW\*(C`else\*(C'\fR |
| 3254 | can belong to the enclosing \f(CW\*(C`if\*(C'\fR. The resulting code |
| 3255 | looks like this: |
| 3256 | .Sp |
| 3257 | .Vb 9 |
| 3258 | \& { |
| 3259 | \& if (a) |
| 3260 | \& { |
| 3261 | \& if (b) |
| 3262 | \& foo (); |
| 3263 | \& else |
| 3264 | \& bar (); |
| 3265 | \& } |
| 3266 | \& } |
| 3267 | .Ve |
| 3268 | .Sp |
| 3269 | Also warn for dangerous uses of the \s-1GNU\s0 extension to |
| 3270 | \&\f(CW\*(C`?:\*(C'\fR with omitted middle operand. When the condition |
| 3271 | in the \f(CW\*(C`?\*(C'\fR: operator is a boolean expression, the omitted value is |
| 3272 | always 1. Often programmers expect it to be a value computed |
| 3273 | inside the conditional expression instead. |
| 3274 | .Sp |
| 3275 | This warning is enabled by \fB\-Wall\fR. |
| 3276 | .IP "\fB\-Wsequence\-point\fR" 4 |
| 3277 | .IX Item "-Wsequence-point" |
| 3278 | Warn about code that may have undefined semantics because of violations |
| 3279 | of sequence point rules in the C and \*(C+ standards. |
| 3280 | .Sp |
| 3281 | The C and \*(C+ standards define the order in which expressions in a C/\*(C+ |
| 3282 | program are evaluated in terms of \fIsequence points\fR, which represent |
| 3283 | a partial ordering between the execution of parts of the program: those |
| 3284 | executed before the sequence point, and those executed after it. These |
| 3285 | occur after the evaluation of a full expression (one which is not part |
| 3286 | of a larger expression), after the evaluation of the first operand of a |
| 3287 | \&\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 |
| 3288 | function is called (but after the evaluation of its arguments and the |
| 3289 | expression denoting the called function), and in certain other places. |
| 3290 | Other than as expressed by the sequence point rules, the order of |
| 3291 | evaluation of subexpressions of an expression is not specified. All |
| 3292 | these rules describe only a partial order rather than a total order, |
| 3293 | since, for example, if two functions are called within one expression |
| 3294 | with no sequence point between them, the order in which the functions |
| 3295 | are called is not specified. However, the standards committee have |
| 3296 | ruled that function calls do not overlap. |
| 3297 | .Sp |
| 3298 | It is not specified when between sequence points modifications to the |
| 3299 | values of objects take effect. Programs whose behavior depends on this |
| 3300 | have undefined behavior; the C and \*(C+ standards specify that \*(L"Between |
| 3301 | the previous and next sequence point an object shall have its stored |
| 3302 | value modified at most once by the evaluation of an expression. |
| 3303 | Furthermore, the prior value shall be read only to determine the value |
| 3304 | to be stored.\*(R". If a program breaks these rules, the results on any |
| 3305 | particular implementation are entirely unpredictable. |
| 3306 | .Sp |
| 3307 | Examples of code with undefined behavior are \f(CW\*(C`a = a++;\*(C'\fR, \f(CW\*(C`a[n] |
| 3308 | = b[n++]\*(C'\fR and \f(CW\*(C`a[i++] = i;\*(C'\fR. Some more complicated cases are not |
| 3309 | diagnosed by this option, and it may give an occasional false positive |
| 3310 | result, but in general it has been found fairly effective at detecting |
| 3311 | this sort of problem in programs. |
| 3312 | .Sp |
| 3313 | The standard is worded confusingly, therefore there is some debate |
| 3314 | over the precise meaning of the sequence point rules in subtle cases. |
| 3315 | Links to discussions of the problem, including proposed formal |
| 3316 | definitions, may be found on the \s-1GCC\s0 readings page, at |
| 3317 | <\fBhttp://gcc.gnu.org/readings.html\fR>. |
| 3318 | .Sp |
| 3319 | This warning is enabled by \fB\-Wall\fR for C and \*(C+. |
| 3320 | .IP "\fB\-Wno\-return\-local\-addr\fR" 4 |
| 3321 | .IX Item "-Wno-return-local-addr" |
| 3322 | Do not warn about returning a pointer (or in \*(C+, a reference) to a |
| 3323 | variable that goes out of scope after the function returns. |
| 3324 | .IP "\fB\-Wreturn\-type\fR" 4 |
| 3325 | .IX Item "-Wreturn-type" |
| 3326 | Warn whenever a function is defined with a return type that defaults |
| 3327 | to \f(CW\*(C`int\*(C'\fR. Also warn about any \f(CW\*(C`return\*(C'\fR statement with no |
| 3328 | return value in a function whose return type is not \f(CW\*(C`void\*(C'\fR |
| 3329 | (falling off the end of the function body is considered returning |
| 3330 | without a value), and about a \f(CW\*(C`return\*(C'\fR statement with an |
| 3331 | expression in a function whose return type is \f(CW\*(C`void\*(C'\fR. |
| 3332 | .Sp |
| 3333 | For \*(C+, a function without return type always produces a diagnostic |
| 3334 | message, even when \fB\-Wno\-return\-type\fR is specified. The only |
| 3335 | exceptions are \fBmain\fR and functions defined in system headers. |
| 3336 | .Sp |
| 3337 | This warning is enabled by \fB\-Wall\fR. |
| 3338 | .IP "\fB\-Wswitch\fR" 4 |
| 3339 | .IX Item "-Wswitch" |
| 3340 | Warn whenever a \f(CW\*(C`switch\*(C'\fR statement has an index of enumerated type |
| 3341 | and lacks a \f(CW\*(C`case\*(C'\fR for one or more of the named codes of that |
| 3342 | enumeration. (The presence of a \f(CW\*(C`default\*(C'\fR label prevents this |
| 3343 | warning.) \f(CW\*(C`case\*(C'\fR labels outside the enumeration range also |
| 3344 | provoke warnings when this option is used (even if there is a |
| 3345 | \&\f(CW\*(C`default\*(C'\fR label). |
| 3346 | This warning is enabled by \fB\-Wall\fR. |
| 3347 | .IP "\fB\-Wswitch\-default\fR" 4 |
| 3348 | .IX Item "-Wswitch-default" |
| 3349 | Warn whenever a \f(CW\*(C`switch\*(C'\fR statement does not have a \f(CW\*(C`default\*(C'\fR |
| 3350 | case. |
| 3351 | .IP "\fB\-Wswitch\-enum\fR" 4 |
| 3352 | .IX Item "-Wswitch-enum" |
| 3353 | Warn whenever a \f(CW\*(C`switch\*(C'\fR statement has an index of enumerated type |
| 3354 | and lacks a \f(CW\*(C`case\*(C'\fR for one or more of the named codes of that |
| 3355 | enumeration. \f(CW\*(C`case\*(C'\fR labels outside the enumeration range also |
| 3356 | provoke warnings when this option is used. The only difference |
| 3357 | between \fB\-Wswitch\fR and this option is that this option gives a |
| 3358 | warning about an omitted enumeration code even if there is a |
| 3359 | \&\f(CW\*(C`default\*(C'\fR label. |
| 3360 | .IP "\fB\-Wsync\-nand\fR (C and \*(C+ only)" 4 |
| 3361 | .IX Item "-Wsync-nand (C and only)" |
| 3362 | Warn when \f(CW\*(C`_\|_sync_fetch_and_nand\*(C'\fR and \f(CW\*(C`_\|_sync_nand_and_fetch\*(C'\fR |
| 3363 | built-in functions are used. These functions changed semantics in \s-1GCC\s0 4.4. |
| 3364 | .IP "\fB\-Wtrigraphs\fR" 4 |
| 3365 | .IX Item "-Wtrigraphs" |
| 3366 | Warn if any trigraphs are encountered that might change the meaning of |
| 3367 | the program (trigraphs within comments are not warned about). |
| 3368 | This warning is enabled by \fB\-Wall\fR. |
| 3369 | .IP "\fB\-Wunused\-but\-set\-parameter\fR" 4 |
| 3370 | .IX Item "-Wunused-but-set-parameter" |
| 3371 | Warn whenever a function parameter is assigned to, but otherwise unused |
| 3372 | (aside from its declaration). |
| 3373 | .Sp |
| 3374 | To suppress this warning use the \fBunused\fR attribute. |
| 3375 | .Sp |
| 3376 | This warning is also enabled by \fB\-Wunused\fR together with |
| 3377 | \&\fB\-Wextra\fR. |
| 3378 | .IP "\fB\-Wunused\-but\-set\-variable\fR" 4 |
| 3379 | .IX Item "-Wunused-but-set-variable" |
| 3380 | Warn whenever a local variable is assigned to, but otherwise unused |
| 3381 | (aside from its declaration). |
| 3382 | This warning is enabled by \fB\-Wall\fR. |
| 3383 | .Sp |
| 3384 | To suppress this warning use the \fBunused\fR attribute. |
| 3385 | .Sp |
| 3386 | This warning is also enabled by \fB\-Wunused\fR, which is enabled |
| 3387 | by \fB\-Wall\fR. |
| 3388 | .IP "\fB\-Wunused\-function\fR" 4 |
| 3389 | .IX Item "-Wunused-function" |
| 3390 | Warn whenever a static function is declared but not defined or a |
| 3391 | non-inline static function is unused. |
| 3392 | This warning is enabled by \fB\-Wall\fR. |
| 3393 | .IP "\fB\-Wunused\-label\fR" 4 |
| 3394 | .IX Item "-Wunused-label" |
| 3395 | Warn whenever a label is declared but not used. |
| 3396 | This warning is enabled by \fB\-Wall\fR. |
| 3397 | .Sp |
| 3398 | To suppress this warning use the \fBunused\fR attribute. |
| 3399 | .IP "\fB\-Wunused\-local\-typedefs\fR (C, Objective-C, \*(C+ and Objective\-\*(C+ only)" 4 |
| 3400 | .IX Item "-Wunused-local-typedefs (C, Objective-C, and Objective- only)" |
| 3401 | Warn when a typedef locally defined in a function is not used. |
| 3402 | This warning is enabled by \fB\-Wall\fR. |
| 3403 | .IP "\fB\-Wunused\-parameter\fR" 4 |
| 3404 | .IX Item "-Wunused-parameter" |
| 3405 | Warn whenever a function parameter is unused aside from its declaration. |
| 3406 | .Sp |
| 3407 | To suppress this warning use the \fBunused\fR attribute. |
| 3408 | .IP "\fB\-Wno\-unused\-result\fR" 4 |
| 3409 | .IX Item "-Wno-unused-result" |
| 3410 | Do not warn if a caller of a function marked with attribute |
| 3411 | \&\f(CW\*(C`warn_unused_result\*(C'\fR does not use |
| 3412 | its return value. The default is \fB\-Wunused\-result\fR. |
| 3413 | .IP "\fB\-Wunused\-variable\fR" 4 |
| 3414 | .IX Item "-Wunused-variable" |
| 3415 | Warn whenever a local variable or non-constant static variable is unused |
| 3416 | aside from its declaration. |
| 3417 | This warning is enabled by \fB\-Wall\fR. |
| 3418 | .Sp |
| 3419 | To suppress this warning use the \fBunused\fR attribute. |
| 3420 | .IP "\fB\-Wunused\-value\fR" 4 |
| 3421 | .IX Item "-Wunused-value" |
| 3422 | Warn whenever a statement computes a result that is explicitly not |
| 3423 | used. To suppress this warning cast the unused expression to |
| 3424 | \&\fBvoid\fR. This includes an expression-statement or the left-hand |
| 3425 | side of a comma expression that contains no side effects. For example, |
| 3426 | an expression such as \fBx[i,j]\fR causes a warning, while |
| 3427 | \&\fBx[(void)i,j]\fR does not. |
| 3428 | .Sp |
| 3429 | This warning is enabled by \fB\-Wall\fR. |
| 3430 | .IP "\fB\-Wunused\fR" 4 |
| 3431 | .IX Item "-Wunused" |
| 3432 | All the above \fB\-Wunused\fR options combined. |
| 3433 | .Sp |
| 3434 | In order to get a warning about an unused function parameter, you must |
| 3435 | either specify \fB\-Wextra \-Wunused\fR (note that \fB\-Wall\fR implies |
| 3436 | \&\fB\-Wunused\fR), or separately specify \fB\-Wunused\-parameter\fR. |
| 3437 | .IP "\fB\-Wuninitialized\fR" 4 |
| 3438 | .IX Item "-Wuninitialized" |
| 3439 | Warn if an automatic variable is used without first being initialized |
| 3440 | or if a variable may be clobbered by a \f(CW\*(C`setjmp\*(C'\fR call. In \*(C+, |
| 3441 | warn if a non-static reference or non-static \fBconst\fR member |
| 3442 | appears in a class without constructors. |
| 3443 | .Sp |
| 3444 | If you want to warn about code that uses the uninitialized value of the |
| 3445 | variable in its own initializer, use the \fB\-Winit\-self\fR option. |
| 3446 | .Sp |
| 3447 | These warnings occur for individual uninitialized or clobbered |
| 3448 | elements of structure, union or array variables as well as for |
| 3449 | variables that are uninitialized or clobbered as a whole. They do |
| 3450 | not occur for variables or elements declared \f(CW\*(C`volatile\*(C'\fR. Because |
| 3451 | these warnings depend on optimization, the exact variables or elements |
| 3452 | for which there are warnings depends on the precise optimization |
| 3453 | options and version of \s-1GCC\s0 used. |
| 3454 | .Sp |
| 3455 | Note that there may be no warning about a variable that is used only |
| 3456 | to compute a value that itself is never used, because such |
| 3457 | computations may be deleted by data flow analysis before the warnings |
| 3458 | are printed. |
| 3459 | .IP "\fB\-Wmaybe\-uninitialized\fR" 4 |
| 3460 | .IX Item "-Wmaybe-uninitialized" |
| 3461 | For an automatic variable, if there exists a path from the function |
| 3462 | entry to a use of the variable that is initialized, but there exist |
| 3463 | some other paths for which the variable is not initialized, the compiler |
| 3464 | emits a warning if it cannot prove the uninitialized paths are not |
| 3465 | executed at run time. These warnings are made optional because \s-1GCC\s0 is |
| 3466 | not smart enough to see all the reasons why the code might be correct |
| 3467 | in spite of appearing to have an error. Here is one example of how |
| 3468 | this can happen: |
| 3469 | .Sp |
| 3470 | .Vb 12 |
| 3471 | \& { |
| 3472 | \& int x; |
| 3473 | \& switch (y) |
| 3474 | \& { |
| 3475 | \& case 1: x = 1; |
| 3476 | \& break; |
| 3477 | \& case 2: x = 4; |
| 3478 | \& break; |
| 3479 | \& case 3: x = 5; |
| 3480 | \& } |
| 3481 | \& foo (x); |
| 3482 | \& } |
| 3483 | .Ve |
| 3484 | .Sp |
| 3485 | If the value of \f(CW\*(C`y\*(C'\fR is always 1, 2 or 3, then \f(CW\*(C`x\*(C'\fR is |
| 3486 | always initialized, but \s-1GCC\s0 doesn't know this. To suppress the |
| 3487 | warning, you need to provide a default case with \fIassert\fR\|(0) or |
| 3488 | similar code. |
| 3489 | .Sp |
| 3490 | This option also warns when a non-volatile automatic variable might be |
| 3491 | changed by a call to \f(CW\*(C`longjmp\*(C'\fR. These warnings as well are possible |
| 3492 | only in optimizing compilation. |
| 3493 | .Sp |
| 3494 | The compiler sees only the calls to \f(CW\*(C`setjmp\*(C'\fR. It cannot know |
| 3495 | where \f(CW\*(C`longjmp\*(C'\fR will be called; in fact, a signal handler could |
| 3496 | call it at any point in the code. As a result, you may get a warning |
| 3497 | even when there is in fact no problem because \f(CW\*(C`longjmp\*(C'\fR cannot |
| 3498 | in fact be called at the place that would cause a problem. |
| 3499 | .Sp |
| 3500 | Some spurious warnings can be avoided if you declare all the functions |
| 3501 | you use that never return as \f(CW\*(C`noreturn\*(C'\fR. |
| 3502 | .Sp |
| 3503 | This warning is enabled by \fB\-Wall\fR or \fB\-Wextra\fR. |
| 3504 | .IP "\fB\-Wunknown\-pragmas\fR" 4 |
| 3505 | .IX Item "-Wunknown-pragmas" |
| 3506 | Warn when a \f(CW\*(C`#pragma\*(C'\fR directive is encountered that is not understood by |
| 3507 | \&\s-1GCC\s0. If this command-line option is used, warnings are even issued |
| 3508 | for unknown pragmas in system header files. This is not the case if |
| 3509 | the warnings are only enabled by the \fB\-Wall\fR command-line option. |
| 3510 | .IP "\fB\-Wno\-pragmas\fR" 4 |
| 3511 | .IX Item "-Wno-pragmas" |
| 3512 | Do not warn about misuses of pragmas, such as incorrect parameters, |
| 3513 | invalid syntax, or conflicts between pragmas. See also |
| 3514 | \&\fB\-Wunknown\-pragmas\fR. |
| 3515 | .IP "\fB\-Wstrict\-aliasing\fR" 4 |
| 3516 | .IX Item "-Wstrict-aliasing" |
| 3517 | This option is only active when \fB\-fstrict\-aliasing\fR is active. |
| 3518 | It warns about code that might break the strict aliasing rules that the |
| 3519 | compiler is using for optimization. The warning does not catch all |
| 3520 | cases, but does attempt to catch the more common pitfalls. It is |
| 3521 | included in \fB\-Wall\fR. |
| 3522 | It is equivalent to \fB\-Wstrict\-aliasing=3\fR |
| 3523 | .IP "\fB\-Wstrict\-aliasing=n\fR" 4 |
| 3524 | .IX Item "-Wstrict-aliasing=n" |
| 3525 | This option is only active when \fB\-fstrict\-aliasing\fR is active. |
| 3526 | It warns about code that might break the strict aliasing rules that the |
| 3527 | compiler is using for optimization. |
| 3528 | Higher levels correspond to higher accuracy (fewer false positives). |
| 3529 | Higher levels also correspond to more effort, similar to the way \fB\-O\fR |
| 3530 | works. |
| 3531 | \&\fB\-Wstrict\-aliasing\fR is equivalent to \fB\-Wstrict\-aliasing=3\fR. |
| 3532 | .Sp |
| 3533 | Level 1: Most aggressive, quick, least accurate. |
| 3534 | Possibly useful when higher levels |
| 3535 | do not warn but \fB\-fstrict\-aliasing\fR still breaks the code, as it has very few |
| 3536 | false negatives. However, it has many false positives. |
| 3537 | Warns for all pointer conversions between possibly incompatible types, |
| 3538 | even if never dereferenced. Runs in the front end only. |
| 3539 | .Sp |
| 3540 | Level 2: Aggressive, quick, not too precise. |
| 3541 | May still have many false positives (not as many as level 1 though), |
| 3542 | and few false negatives (but possibly more than level 1). |
| 3543 | Unlike level 1, it only warns when an address is taken. Warns about |
| 3544 | incomplete types. Runs in the front end only. |
| 3545 | .Sp |
| 3546 | Level 3 (default for \fB\-Wstrict\-aliasing\fR): |
| 3547 | Should have very few false positives and few false |
| 3548 | negatives. Slightly slower than levels 1 or 2 when optimization is enabled. |
| 3549 | Takes care of the common pun+dereference pattern in the front end: |
| 3550 | \&\f(CW\*(C`*(int*)&some_float\*(C'\fR. |
| 3551 | If optimization is enabled, it also runs in the back end, where it deals |
| 3552 | with multiple statement cases using flow-sensitive points-to information. |
| 3553 | Only warns when the converted pointer is dereferenced. |
| 3554 | Does not warn about incomplete types. |
| 3555 | .IP "\fB\-Wstrict\-overflow\fR" 4 |
| 3556 | .IX Item "-Wstrict-overflow" |
| 3557 | .PD 0 |
| 3558 | .IP "\fB\-Wstrict\-overflow=\fR\fIn\fR" 4 |
| 3559 | .IX Item "-Wstrict-overflow=n" |
| 3560 | .PD |
| 3561 | This option is only active when \fB\-fstrict\-overflow\fR is active. |
| 3562 | It warns about cases where the compiler optimizes based on the |
| 3563 | assumption that signed overflow does not occur. Note that it does not |
| 3564 | warn about all cases where the code might overflow: it only warns |
| 3565 | about cases where the compiler implements some optimization. Thus |
| 3566 | this warning depends on the optimization level. |
| 3567 | .Sp |
| 3568 | An optimization that assumes that signed overflow does not occur is |
| 3569 | perfectly safe if the values of the variables involved are such that |
| 3570 | overflow never does, in fact, occur. Therefore this warning can |
| 3571 | easily give a false positive: a warning about code that is not |
| 3572 | actually a problem. To help focus on important issues, several |
| 3573 | warning levels are defined. No warnings are issued for the use of |
| 3574 | undefined signed overflow when estimating how many iterations a loop |
| 3575 | requires, in particular when determining whether a loop will be |
| 3576 | executed at all. |
| 3577 | .RS 4 |
| 3578 | .IP "\fB\-Wstrict\-overflow=1\fR" 4 |
| 3579 | .IX Item "-Wstrict-overflow=1" |
| 3580 | Warn about cases that are both questionable and easy to avoid. For |
| 3581 | example, with \fB\-fstrict\-overflow\fR, the compiler simplifies |
| 3582 | \&\f(CW\*(C`x + 1 > x\*(C'\fR to \f(CW1\fR. This level of |
| 3583 | \&\fB\-Wstrict\-overflow\fR is enabled by \fB\-Wall\fR; higher levels |
| 3584 | are not, and must be explicitly requested. |
| 3585 | .IP "\fB\-Wstrict\-overflow=2\fR" 4 |
| 3586 | .IX Item "-Wstrict-overflow=2" |
| 3587 | Also warn about other cases where a comparison is simplified to a |
| 3588 | constant. For example: \f(CW\*(C`abs (x) >= 0\*(C'\fR. This can only be |
| 3589 | simplified when \fB\-fstrict\-overflow\fR is in effect, because |
| 3590 | \&\f(CW\*(C`abs (INT_MIN)\*(C'\fR overflows to \f(CW\*(C`INT_MIN\*(C'\fR, which is less than |
| 3591 | zero. \fB\-Wstrict\-overflow\fR (with no level) is the same as |
| 3592 | \&\fB\-Wstrict\-overflow=2\fR. |
| 3593 | .IP "\fB\-Wstrict\-overflow=3\fR" 4 |
| 3594 | .IX Item "-Wstrict-overflow=3" |
| 3595 | Also warn about other cases where a comparison is simplified. For |
| 3596 | example: \f(CW\*(C`x + 1 > 1\*(C'\fR is simplified to \f(CW\*(C`x > 0\*(C'\fR. |
| 3597 | .IP "\fB\-Wstrict\-overflow=4\fR" 4 |
| 3598 | .IX Item "-Wstrict-overflow=4" |
| 3599 | Also warn about other simplifications not covered by the above cases. |
| 3600 | For example: \f(CW\*(C`(x * 10) / 5\*(C'\fR is simplified to \f(CW\*(C`x * 2\*(C'\fR. |
| 3601 | .IP "\fB\-Wstrict\-overflow=5\fR" 4 |
| 3602 | .IX Item "-Wstrict-overflow=5" |
| 3603 | Also warn about cases where the compiler reduces the magnitude of a |
| 3604 | constant involved in a comparison. For example: \f(CW\*(C`x + 2 > y\*(C'\fR is |
| 3605 | simplified to \f(CW\*(C`x + 1 >= y\*(C'\fR. This is reported only at the |
| 3606 | highest warning level because this simplification applies to many |
| 3607 | comparisons, so this warning level gives a very large number of |
| 3608 | false positives. |
| 3609 | .RE |
| 3610 | .RS 4 |
| 3611 | .RE |
| 3612 | .IP "\fB\-Wsuggest\-attribute=\fR[\fBpure\fR|\fBconst\fR|\fBnoreturn\fR|\fBformat\fR]" 4 |
| 3613 | .IX Item "-Wsuggest-attribute=[pure|const|noreturn|format]" |
| 3614 | Warn for cases where adding an attribute may be beneficial. The |
| 3615 | attributes currently supported are listed below. |
| 3616 | .RS 4 |
| 3617 | .IP "\fB\-Wsuggest\-attribute=pure\fR" 4 |
| 3618 | .IX Item "-Wsuggest-attribute=pure" |
| 3619 | .PD 0 |
| 3620 | .IP "\fB\-Wsuggest\-attribute=const\fR" 4 |
| 3621 | .IX Item "-Wsuggest-attribute=const" |
| 3622 | .IP "\fB\-Wsuggest\-attribute=noreturn\fR" 4 |
| 3623 | .IX Item "-Wsuggest-attribute=noreturn" |
| 3624 | .PD |
| 3625 | Warn about functions that might be candidates for attributes |
| 3626 | \&\f(CW\*(C`pure\*(C'\fR, \f(CW\*(C`const\*(C'\fR or \f(CW\*(C`noreturn\*(C'\fR. The compiler only warns for |
| 3627 | functions visible in other compilation units or (in the case of \f(CW\*(C`pure\*(C'\fR and |
| 3628 | \&\f(CW\*(C`const\*(C'\fR) if it cannot prove that the function returns normally. A function |
| 3629 | returns normally if it doesn't contain an infinite loop or return abnormally |
| 3630 | by throwing, calling \f(CW\*(C`abort()\*(C'\fR or trapping. This analysis requires option |
| 3631 | \&\fB\-fipa\-pure\-const\fR, which is enabled by default at \fB\-O\fR and |
| 3632 | higher. Higher optimization levels improve the accuracy of the analysis. |
| 3633 | .IP "\fB\-Wsuggest\-attribute=format\fR" 4 |
| 3634 | .IX Item "-Wsuggest-attribute=format" |
| 3635 | .PD 0 |
| 3636 | .IP "\fB\-Wmissing\-format\-attribute\fR" 4 |
| 3637 | .IX Item "-Wmissing-format-attribute" |
| 3638 | .PD |
| 3639 | Warn about function pointers that might be candidates for \f(CW\*(C`format\*(C'\fR |
| 3640 | attributes. Note these are only possible candidates, not absolute ones. |
| 3641 | \&\s-1GCC\s0 guesses that function pointers with \f(CW\*(C`format\*(C'\fR attributes that |
| 3642 | are used in assignment, initialization, parameter passing or return |
| 3643 | statements should have a corresponding \f(CW\*(C`format\*(C'\fR attribute in the |
| 3644 | resulting type. I.e. the left-hand side of the assignment or |
| 3645 | initialization, the type of the parameter variable, or the return type |
| 3646 | of the containing function respectively should also have a \f(CW\*(C`format\*(C'\fR |
| 3647 | attribute to avoid the warning. |
| 3648 | .Sp |
| 3649 | \&\s-1GCC\s0 also warns about function definitions that might be |
| 3650 | candidates for \f(CW\*(C`format\*(C'\fR attributes. Again, these are only |
| 3651 | possible candidates. \s-1GCC\s0 guesses that \f(CW\*(C`format\*(C'\fR attributes |
| 3652 | might be appropriate for any function that calls a function like |
| 3653 | \&\f(CW\*(C`vprintf\*(C'\fR or \f(CW\*(C`vscanf\*(C'\fR, but this might not always be the |
| 3654 | case, and some functions for which \f(CW\*(C`format\*(C'\fR attributes are |
| 3655 | appropriate may not be detected. |
| 3656 | .RE |
| 3657 | .RS 4 |
| 3658 | .RE |
| 3659 | .IP "\fB\-Warray\-bounds\fR" 4 |
| 3660 | .IX Item "-Warray-bounds" |
| 3661 | This option is only active when \fB\-ftree\-vrp\fR is active |
| 3662 | (default for \fB\-O2\fR and above). It warns about subscripts to arrays |
| 3663 | that are always out of bounds. This warning is enabled by \fB\-Wall\fR. |
| 3664 | .IP "\fB\-Wno\-div\-by\-zero\fR" 4 |
| 3665 | .IX Item "-Wno-div-by-zero" |
| 3666 | Do not warn about compile-time integer division by zero. Floating-point |
| 3667 | division by zero is not warned about, as it can be a legitimate way of |
| 3668 | obtaining infinities and NaNs. |
| 3669 | .IP "\fB\-Wsystem\-headers\fR" 4 |
| 3670 | .IX Item "-Wsystem-headers" |
| 3671 | Print warning messages for constructs found in system header files. |
| 3672 | Warnings from system headers are normally suppressed, on the assumption |
| 3673 | that they usually do not indicate real problems and would only make the |
| 3674 | compiler output harder to read. Using this command-line option tells |
| 3675 | \&\s-1GCC\s0 to emit warnings from system headers as if they occurred in user |
| 3676 | code. However, note that using \fB\-Wall\fR in conjunction with this |
| 3677 | option does \fInot\fR warn about unknown pragmas in system |
| 3678 | headers\-\-\-for that, \fB\-Wunknown\-pragmas\fR must also be used. |
| 3679 | .IP "\fB\-Wtrampolines\fR" 4 |
| 3680 | .IX Item "-Wtrampolines" |
| 3681 | .Vb 1 |
| 3682 | \& Warn about trampolines generated for pointers to nested functions. |
| 3683 | \& |
| 3684 | \& A trampoline is a small piece of data or code that is created at run |
| 3685 | \& time on the stack when the address of a nested function is taken, and |
| 3686 | \& is used to call the nested function indirectly. For some targets, it |
| 3687 | \& is made up of data only and thus requires no special treatment. But, |
| 3688 | \& for most targets, it is made up of code and thus requires the stack |
| 3689 | \& to be made executable in order for the program to work properly. |
| 3690 | .Ve |
| 3691 | .IP "\fB\-Wfloat\-equal\fR" 4 |
| 3692 | .IX Item "-Wfloat-equal" |
| 3693 | Warn if floating-point values are used in equality comparisons. |
| 3694 | .Sp |
| 3695 | The idea behind this is that sometimes it is convenient (for the |
| 3696 | programmer) to consider floating-point values as approximations to |
| 3697 | infinitely precise real numbers. If you are doing this, then you need |
| 3698 | to compute (by analyzing the code, or in some other way) the maximum or |
| 3699 | likely maximum error that the computation introduces, and allow for it |
| 3700 | when performing comparisons (and when producing output, but that's a |
| 3701 | different problem). In particular, instead of testing for equality, you |
| 3702 | should check to see whether the two values have ranges that overlap; and |
| 3703 | this is done with the relational operators, so equality comparisons are |
| 3704 | probably mistaken. |
| 3705 | .IP "\fB\-Wtraditional\fR (C and Objective-C only)" 4 |
| 3706 | .IX Item "-Wtraditional (C and Objective-C only)" |
| 3707 | Warn about certain constructs that behave differently in traditional and |
| 3708 | \&\s-1ISO\s0 C. Also warn about \s-1ISO\s0 C constructs that have no traditional C |
| 3709 | equivalent, and/or problematic constructs that should be avoided. |
| 3710 | .RS 4 |
| 3711 | .IP "\(bu" 4 |
| 3712 | Macro parameters that appear within string literals in the macro body. |
| 3713 | In traditional C macro replacement takes place within string literals, |
| 3714 | but in \s-1ISO\s0 C it does not. |
| 3715 | .IP "\(bu" 4 |
| 3716 | In traditional C, some preprocessor directives did not exist. |
| 3717 | Traditional preprocessors only considered a line to be a directive |
| 3718 | if the \fB#\fR appeared in column 1 on the line. Therefore |
| 3719 | \&\fB\-Wtraditional\fR warns about directives that traditional C |
| 3720 | understands but ignores because the \fB#\fR does not appear as the |
| 3721 | first character on the line. It also suggests you hide directives like |
| 3722 | \&\fB#pragma\fR not understood by traditional C by indenting them. Some |
| 3723 | traditional implementations do not recognize \fB#elif\fR, so this option |
| 3724 | suggests avoiding it altogether. |
| 3725 | .IP "\(bu" 4 |
| 3726 | A function-like macro that appears without arguments. |
| 3727 | .IP "\(bu" 4 |
| 3728 | The unary plus operator. |
| 3729 | .IP "\(bu" 4 |
| 3730 | The \fBU\fR integer constant suffix, or the \fBF\fR or \fBL\fR floating-point |
| 3731 | constant suffixes. (Traditional C does support the \fBL\fR suffix on integer |
| 3732 | constants.) Note, these suffixes appear in macros defined in the system |
| 3733 | headers of most modern systems, e.g. the \fB_MIN\fR/\fB_MAX\fR macros in \f(CW\*(C`<limits.h>\*(C'\fR. |
| 3734 | Use of these macros in user code might normally lead to spurious |
| 3735 | warnings, however \s-1GCC\s0's integrated preprocessor has enough context to |
| 3736 | avoid warning in these cases. |
| 3737 | .IP "\(bu" 4 |
| 3738 | A function declared external in one block and then used after the end of |
| 3739 | the block. |
| 3740 | .IP "\(bu" 4 |
| 3741 | A \f(CW\*(C`switch\*(C'\fR statement has an operand of type \f(CW\*(C`long\*(C'\fR. |
| 3742 | .IP "\(bu" 4 |
| 3743 | A non\-\f(CW\*(C`static\*(C'\fR function declaration follows a \f(CW\*(C`static\*(C'\fR one. |
| 3744 | This construct is not accepted by some traditional C compilers. |
| 3745 | .IP "\(bu" 4 |
| 3746 | The \s-1ISO\s0 type of an integer constant has a different width or |
| 3747 | signedness from its traditional type. This warning is only issued if |
| 3748 | the base of the constant is ten. I.e. hexadecimal or octal values, which |
| 3749 | typically represent bit patterns, are not warned about. |
| 3750 | .IP "\(bu" 4 |
| 3751 | Usage of \s-1ISO\s0 string concatenation is detected. |
| 3752 | .IP "\(bu" 4 |
| 3753 | Initialization of automatic aggregates. |
| 3754 | .IP "\(bu" 4 |
| 3755 | Identifier conflicts with labels. Traditional C lacks a separate |
| 3756 | namespace for labels. |
| 3757 | .IP "\(bu" 4 |
| 3758 | Initialization of unions. If the initializer is zero, the warning is |
| 3759 | omitted. This is done under the assumption that the zero initializer in |
| 3760 | user code appears conditioned on e.g. \f(CW\*(C`_\|_STDC_\|_\*(C'\fR to avoid missing |
| 3761 | initializer warnings and relies on default initialization to zero in the |
| 3762 | traditional C case. |
| 3763 | .IP "\(bu" 4 |
| 3764 | Conversions by prototypes between fixed/floating\-point values and vice |
| 3765 | versa. The absence of these prototypes when compiling with traditional |
| 3766 | C causes serious problems. This is a subset of the possible |
| 3767 | conversion warnings; for the full set use \fB\-Wtraditional\-conversion\fR. |
| 3768 | .IP "\(bu" 4 |
| 3769 | Use of \s-1ISO\s0 C style function definitions. This warning intentionally is |
| 3770 | \&\fInot\fR issued for prototype declarations or variadic functions |
| 3771 | because these \s-1ISO\s0 C features appear in your code when using |
| 3772 | libiberty's traditional C compatibility macros, \f(CW\*(C`PARAMS\*(C'\fR and |
| 3773 | \&\f(CW\*(C`VPARAMS\*(C'\fR. This warning is also bypassed for nested functions |
| 3774 | because that feature is already a \s-1GCC\s0 extension and thus not relevant to |
| 3775 | traditional C compatibility. |
| 3776 | .RE |
| 3777 | .RS 4 |
| 3778 | .RE |
| 3779 | .IP "\fB\-Wtraditional\-conversion\fR (C and Objective-C only)" 4 |
| 3780 | .IX Item "-Wtraditional-conversion (C and Objective-C only)" |
| 3781 | Warn if a prototype causes a type conversion that is different from what |
| 3782 | would happen to the same argument in the absence of a prototype. This |
| 3783 | includes conversions of fixed point to floating and vice versa, and |
| 3784 | conversions changing the width or signedness of a fixed-point argument |
| 3785 | except when the same as the default promotion. |
| 3786 | .IP "\fB\-Wdeclaration\-after\-statement\fR (C and Objective-C only)" 4 |
| 3787 | .IX Item "-Wdeclaration-after-statement (C and Objective-C only)" |
| 3788 | Warn when a declaration is found after a statement in a block. This |
| 3789 | construct, known from \*(C+, was introduced with \s-1ISO\s0 C99 and is by default |
| 3790 | allowed in \s-1GCC\s0. It is not supported by \s-1ISO\s0 C90 and was not supported by |
| 3791 | \&\s-1GCC\s0 versions before \s-1GCC\s0 3.0. |
| 3792 | .IP "\fB\-Wundef\fR" 4 |
| 3793 | .IX Item "-Wundef" |
| 3794 | Warn if an undefined identifier is evaluated in an \fB#if\fR directive. |
| 3795 | .IP "\fB\-Wno\-endif\-labels\fR" 4 |
| 3796 | .IX Item "-Wno-endif-labels" |
| 3797 | Do not warn whenever an \fB#else\fR or an \fB#endif\fR are followed by text. |
| 3798 | .IP "\fB\-Wshadow\fR" 4 |
| 3799 | .IX Item "-Wshadow" |
| 3800 | Warn whenever a local variable or type declaration shadows another variable, |
| 3801 | parameter, type, or class member (in \*(C+), or whenever a built-in function |
| 3802 | is shadowed. Note that in \*(C+, the compiler warns if a local variable |
| 3803 | shadows an explicit typedef, but not if it shadows a struct/class/enum. |
| 3804 | .IP "\fB\-Wlarger\-than=\fR\fIlen\fR" 4 |
| 3805 | .IX Item "-Wlarger-than=len" |
| 3806 | Warn whenever an object of larger than \fIlen\fR bytes is defined. |
| 3807 | .IP "\fB\-Wframe\-larger\-than=\fR\fIlen\fR" 4 |
| 3808 | .IX Item "-Wframe-larger-than=len" |
| 3809 | Warn if the size of a function frame is larger than \fIlen\fR bytes. |
| 3810 | The computation done to determine the stack frame size is approximate |
| 3811 | and not conservative. |
| 3812 | The actual requirements may be somewhat greater than \fIlen\fR |
| 3813 | even if you do not get a warning. In addition, any space allocated |
| 3814 | via \f(CW\*(C`alloca\*(C'\fR, variable-length arrays, or related constructs |
| 3815 | is not included by the compiler when determining |
| 3816 | whether or not to issue a warning. |
| 3817 | .IP "\fB\-Wno\-free\-nonheap\-object\fR" 4 |
| 3818 | .IX Item "-Wno-free-nonheap-object" |
| 3819 | Do not warn when attempting to free an object that was not allocated |
| 3820 | on the heap. |
| 3821 | .IP "\fB\-Wstack\-usage=\fR\fIlen\fR" 4 |
| 3822 | .IX Item "-Wstack-usage=len" |
| 3823 | Warn if the stack usage of a function might be larger than \fIlen\fR bytes. |
| 3824 | The computation done to determine the stack usage is conservative. |
| 3825 | Any space allocated via \f(CW\*(C`alloca\*(C'\fR, variable-length arrays, or related |
| 3826 | constructs is included by the compiler when determining whether or not to |
| 3827 | issue a warning. |
| 3828 | .Sp |
| 3829 | The message is in keeping with the output of \fB\-fstack\-usage\fR. |
| 3830 | .RS 4 |
| 3831 | .IP "\(bu" 4 |
| 3832 | If the stack usage is fully static but exceeds the specified amount, it's: |
| 3833 | .Sp |
| 3834 | .Vb 1 |
| 3835 | \& warning: stack usage is 1120 bytes |
| 3836 | .Ve |
| 3837 | .IP "\(bu" 4 |
| 3838 | If the stack usage is (partly) dynamic but bounded, it's: |
| 3839 | .Sp |
| 3840 | .Vb 1 |
| 3841 | \& warning: stack usage might be 1648 bytes |
| 3842 | .Ve |
| 3843 | .IP "\(bu" 4 |
| 3844 | If the stack usage is (partly) dynamic and not bounded, it's: |
| 3845 | .Sp |
| 3846 | .Vb 1 |
| 3847 | \& warning: stack usage might be unbounded |
| 3848 | .Ve |
| 3849 | .RE |
| 3850 | .RS 4 |
| 3851 | .RE |
| 3852 | .IP "\fB\-Wunsafe\-loop\-optimizations\fR" 4 |
| 3853 | .IX Item "-Wunsafe-loop-optimizations" |
| 3854 | Warn if the loop cannot be optimized because the compiler cannot |
| 3855 | assume anything on the bounds of the loop indices. With |
| 3856 | \&\fB\-funsafe\-loop\-optimizations\fR warn if the compiler makes |
| 3857 | such assumptions. |
| 3858 | .IP "\fB\-Wno\-pedantic\-ms\-format\fR (MinGW targets only)" 4 |
| 3859 | .IX Item "-Wno-pedantic-ms-format (MinGW targets only)" |
| 3860 | When used in combination with \fB\-Wformat\fR |
| 3861 | and \fB\-pedantic\fR without \s-1GNU\s0 extensions, this option |
| 3862 | disables the warnings about non-ISO \f(CW\*(C`printf\*(C'\fR / \f(CW\*(C`scanf\*(C'\fR format |
| 3863 | 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, |
| 3864 | which depend on the \s-1MS\s0 runtime. |
| 3865 | .IP "\fB\-Wpointer\-arith\fR" 4 |
| 3866 | .IX Item "-Wpointer-arith" |
| 3867 | Warn about anything that depends on the \*(L"size of\*(R" a function type or |
| 3868 | of \f(CW\*(C`void\*(C'\fR. \s-1GNU\s0 C assigns these types a size of 1, for |
| 3869 | convenience in calculations with \f(CW\*(C`void *\*(C'\fR pointers and pointers |
| 3870 | to functions. In \*(C+, warn also when an arithmetic operation involves |
| 3871 | \&\f(CW\*(C`NULL\*(C'\fR. This warning is also enabled by \fB\-Wpedantic\fR. |
| 3872 | .IP "\fB\-Wtype\-limits\fR" 4 |
| 3873 | .IX Item "-Wtype-limits" |
| 3874 | Warn if a comparison is always true or always false due to the limited |
| 3875 | range of the data type, but do not warn for constant expressions. For |
| 3876 | example, warn if an unsigned variable is compared against zero with |
| 3877 | \&\fB<\fR or \fB>=\fR. This warning is also enabled by |
| 3878 | \&\fB\-Wextra\fR. |
| 3879 | .IP "\fB\-Wbad\-function\-cast\fR (C and Objective-C only)" 4 |
| 3880 | .IX Item "-Wbad-function-cast (C and Objective-C only)" |
| 3881 | Warn whenever a function call is cast to a non-matching type. |
| 3882 | For example, warn if \f(CW\*(C`int malloc()\*(C'\fR is cast to \f(CW\*(C`anything *\*(C'\fR. |
| 3883 | .IP "\fB\-Wc++\-compat\fR (C and Objective-C only)" 4 |
| 3884 | .IX Item "-Wc++-compat (C and Objective-C only)" |
| 3885 | Warn about \s-1ISO\s0 C constructs that are outside of the common subset of |
| 3886 | \&\s-1ISO\s0 C and \s-1ISO\s0 \*(C+, e.g. request for implicit conversion from |
| 3887 | \&\f(CW\*(C`void *\*(C'\fR to a pointer to non\-\f(CW\*(C`void\*(C'\fR type. |
| 3888 | .IP "\fB\-Wc++11\-compat\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 3889 | .IX Item "-Wc++11-compat ( and Objective- only)" |
| 3890 | Warn about \*(C+ constructs whose meaning differs between \s-1ISO\s0 \*(C+ 1998 |
| 3891 | and \s-1ISO\s0 \*(C+ 2011, e.g., identifiers in \s-1ISO\s0 \*(C+ 1998 that are keywords |
| 3892 | in \s-1ISO\s0 \*(C+ 2011. This warning turns on \fB\-Wnarrowing\fR and is |
| 3893 | enabled by \fB\-Wall\fR. |
| 3894 | .IP "\fB\-Wcast\-qual\fR" 4 |
| 3895 | .IX Item "-Wcast-qual" |
| 3896 | Warn whenever a pointer is cast so as to remove a type qualifier from |
| 3897 | the target type. For example, warn if a \f(CW\*(C`const char *\*(C'\fR is cast |
| 3898 | to an ordinary \f(CW\*(C`char *\*(C'\fR. |
| 3899 | .Sp |
| 3900 | Also warn when making a cast that introduces a type qualifier in an |
| 3901 | unsafe way. For example, casting \f(CW\*(C`char **\*(C'\fR to \f(CW\*(C`const char **\*(C'\fR |
| 3902 | is unsafe, as in this example: |
| 3903 | .Sp |
| 3904 | .Vb 6 |
| 3905 | \& /* p is char ** value. */ |
| 3906 | \& const char **q = (const char **) p; |
| 3907 | \& /* Assignment of readonly string to const char * is OK. */ |
| 3908 | \& *q = "string"; |
| 3909 | \& /* Now char** pointer points to read\-only memory. */ |
| 3910 | \& **p = \*(Aqb\*(Aq; |
| 3911 | .Ve |
| 3912 | .IP "\fB\-Wcast\-align\fR" 4 |
| 3913 | .IX Item "-Wcast-align" |
| 3914 | Warn whenever a pointer is cast such that the required alignment of the |
| 3915 | target is increased. For example, warn if a \f(CW\*(C`char *\*(C'\fR is cast to |
| 3916 | an \f(CW\*(C`int *\*(C'\fR on machines where integers can only be accessed at |
| 3917 | two\- or four-byte boundaries. |
| 3918 | .IP "\fB\-Wwrite\-strings\fR" 4 |
| 3919 | .IX Item "-Wwrite-strings" |
| 3920 | When compiling C, give string constants the type \f(CW\*(C`const |
| 3921 | char[\f(CIlength\f(CW]\*(C'\fR so that copying the address of one into a |
| 3922 | non\-\f(CW\*(C`const\*(C'\fR \f(CW\*(C`char *\*(C'\fR pointer produces a warning. These |
| 3923 | warnings help you find at compile time code that can try to write |
| 3924 | into a string constant, but only if you have been very careful about |
| 3925 | using \f(CW\*(C`const\*(C'\fR in declarations and prototypes. Otherwise, it is |
| 3926 | just a nuisance. This is why we did not make \fB\-Wall\fR request |
| 3927 | these warnings. |
| 3928 | .Sp |
| 3929 | When compiling \*(C+, warn about the deprecated conversion from string |
| 3930 | literals to \f(CW\*(C`char *\*(C'\fR. This warning is enabled by default for \*(C+ |
| 3931 | programs. |
| 3932 | .IP "\fB\-Wclobbered\fR" 4 |
| 3933 | .IX Item "-Wclobbered" |
| 3934 | Warn for variables that might be changed by \fBlongjmp\fR or |
| 3935 | \&\fBvfork\fR. This warning is also enabled by \fB\-Wextra\fR. |
| 3936 | .IP "\fB\-Wconversion\fR" 4 |
| 3937 | .IX Item "-Wconversion" |
| 3938 | Warn for implicit conversions that may alter a value. This includes |
| 3939 | conversions between real and integer, like \f(CW\*(C`abs (x)\*(C'\fR when |
| 3940 | \&\f(CW\*(C`x\*(C'\fR is \f(CW\*(C`double\*(C'\fR; conversions between signed and unsigned, |
| 3941 | like \f(CW\*(C`unsigned ui = \-1\*(C'\fR; and conversions to smaller types, like |
| 3942 | \&\f(CW\*(C`sqrtf (M_PI)\*(C'\fR. Do not warn for explicit casts like \f(CW\*(C`abs |
| 3943 | ((int) x)\*(C'\fR and \f(CW\*(C`ui = (unsigned) \-1\*(C'\fR, or if the value is not |
| 3944 | changed by the conversion like in \f(CW\*(C`abs (2.0)\*(C'\fR. Warnings about |
| 3945 | conversions between signed and unsigned integers can be disabled by |
| 3946 | using \fB\-Wno\-sign\-conversion\fR. |
| 3947 | .Sp |
| 3948 | For \*(C+, also warn for confusing overload resolution for user-defined |
| 3949 | conversions; and conversions that never use a type conversion |
| 3950 | operator: conversions to \f(CW\*(C`void\*(C'\fR, the same type, a base class or a |
| 3951 | reference to them. Warnings about conversions between signed and |
| 3952 | unsigned integers are disabled by default in \*(C+ unless |
| 3953 | \&\fB\-Wsign\-conversion\fR is explicitly enabled. |
| 3954 | .IP "\fB\-Wno\-conversion\-null\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 3955 | .IX Item "-Wno-conversion-null ( and Objective- only)" |
| 3956 | Do not warn for conversions between \f(CW\*(C`NULL\*(C'\fR and non-pointer |
| 3957 | types. \fB\-Wconversion\-null\fR is enabled by default. |
| 3958 | .IP "\fB\-Wzero\-as\-null\-pointer\-constant\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 3959 | .IX Item "-Wzero-as-null-pointer-constant ( and Objective- only)" |
| 3960 | Warn when a literal '0' is used as null pointer constant. This can |
| 3961 | be useful to facilitate the conversion to \f(CW\*(C`nullptr\*(C'\fR in \*(C+11. |
| 3962 | .IP "\fB\-Wuseless\-cast\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 3963 | .IX Item "-Wuseless-cast ( and Objective- only)" |
| 3964 | Warn when an expression is casted to its own type. |
| 3965 | .IP "\fB\-Wempty\-body\fR" 4 |
| 3966 | .IX Item "-Wempty-body" |
| 3967 | Warn if an empty body occurs in an \fBif\fR, \fBelse\fR or \fBdo |
| 3968 | while\fR statement. This warning is also enabled by \fB\-Wextra\fR. |
| 3969 | .IP "\fB\-Wenum\-compare\fR" 4 |
| 3970 | .IX Item "-Wenum-compare" |
| 3971 | Warn about a comparison between values of different enumerated types. |
| 3972 | In \*(C+ enumeral mismatches in conditional expressions are also |
| 3973 | diagnosed and the warning is enabled by default. In C this warning is |
| 3974 | enabled by \fB\-Wall\fR. |
| 3975 | .IP "\fB\-Wjump\-misses\-init\fR (C, Objective-C only)" 4 |
| 3976 | .IX Item "-Wjump-misses-init (C, Objective-C only)" |
| 3977 | Warn if a \f(CW\*(C`goto\*(C'\fR statement or a \f(CW\*(C`switch\*(C'\fR statement jumps |
| 3978 | forward across the initialization of a variable, or jumps backward to a |
| 3979 | label after the variable has been initialized. This only warns about |
| 3980 | variables that are initialized when they are declared. This warning is |
| 3981 | only supported for C and Objective-C; in \*(C+ this sort of branch is an |
| 3982 | error in any case. |
| 3983 | .Sp |
| 3984 | \&\fB\-Wjump\-misses\-init\fR is included in \fB\-Wc++\-compat\fR. It |
| 3985 | can be disabled with the \fB\-Wno\-jump\-misses\-init\fR option. |
| 3986 | .IP "\fB\-Wsign\-compare\fR" 4 |
| 3987 | .IX Item "-Wsign-compare" |
| 3988 | Warn when a comparison between signed and unsigned values could produce |
| 3989 | an incorrect result when the signed value is converted to unsigned. |
| 3990 | This warning is also enabled by \fB\-Wextra\fR; to get the other warnings |
| 3991 | of \fB\-Wextra\fR without this warning, use \fB\-Wextra \-Wno\-sign\-compare\fR. |
| 3992 | .IP "\fB\-Wsign\-conversion\fR" 4 |
| 3993 | .IX Item "-Wsign-conversion" |
| 3994 | Warn for implicit conversions that may change the sign of an integer |
| 3995 | value, like assigning a signed integer expression to an unsigned |
| 3996 | integer variable. An explicit cast silences the warning. In C, this |
| 3997 | option is enabled also by \fB\-Wconversion\fR. |
| 3998 | .IP "\fB\-Wsizeof\-pointer\-memaccess\fR" 4 |
| 3999 | .IX Item "-Wsizeof-pointer-memaccess" |
| 4000 | Warn for suspicious length parameters to certain string and memory built-in |
| 4001 | functions if the argument uses \f(CW\*(C`sizeof\*(C'\fR. This warning warns e.g. |
| 4002 | about \f(CW\*(C`memset (ptr, 0, sizeof (ptr));\*(C'\fR if \f(CW\*(C`ptr\*(C'\fR is not an array, |
| 4003 | but a pointer, and suggests a possible fix, or about |
| 4004 | \&\f(CW\*(C`memcpy (&foo, ptr, sizeof (&foo));\*(C'\fR. This warning is enabled by |
| 4005 | \&\fB\-Wall\fR. |
| 4006 | .IP "\fB\-Waddress\fR" 4 |
| 4007 | .IX Item "-Waddress" |
| 4008 | Warn about suspicious uses of memory addresses. These include using |
| 4009 | the address of a function in a conditional expression, such as |
| 4010 | \&\f(CW\*(C`void func(void); if (func)\*(C'\fR, and comparisons against the memory |
| 4011 | address of a string literal, such as \f(CW\*(C`if (x == "abc")\*(C'\fR. Such |
| 4012 | uses typically indicate a programmer error: the address of a function |
| 4013 | always evaluates to true, so their use in a conditional usually |
| 4014 | indicate that the programmer forgot the parentheses in a function |
| 4015 | call; and comparisons against string literals result in unspecified |
| 4016 | behavior and are not portable in C, so they usually indicate that the |
| 4017 | programmer intended to use \f(CW\*(C`strcmp\*(C'\fR. This warning is enabled by |
| 4018 | \&\fB\-Wall\fR. |
| 4019 | .IP "\fB\-Wlogical\-op\fR" 4 |
| 4020 | .IX Item "-Wlogical-op" |
| 4021 | Warn about suspicious uses of logical operators in expressions. |
| 4022 | This includes using logical operators in contexts where a |
| 4023 | bit-wise operator is likely to be expected. |
| 4024 | .IP "\fB\-Waggregate\-return\fR" 4 |
| 4025 | .IX Item "-Waggregate-return" |
| 4026 | Warn if any functions that return structures or unions are defined or |
| 4027 | called. (In languages where you can return an array, this also elicits |
| 4028 | a warning.) |
| 4029 | .IP "\fB\-Wno\-aggressive\-loop\-optimizations\fR" 4 |
| 4030 | .IX Item "-Wno-aggressive-loop-optimizations" |
| 4031 | Warn if in a loop with constant number of iterations the compiler detects |
| 4032 | undefined behavior in some statement during one or more of the iterations. |
| 4033 | .IP "\fB\-Wno\-attributes\fR" 4 |
| 4034 | .IX Item "-Wno-attributes" |
| 4035 | Do not warn if an unexpected \f(CW\*(C`_\|_attribute_\|_\*(C'\fR is used, such as |
| 4036 | unrecognized attributes, function attributes applied to variables, |
| 4037 | etc. This does not stop errors for incorrect use of supported |
| 4038 | attributes. |
| 4039 | .IP "\fB\-Wno\-builtin\-macro\-redefined\fR" 4 |
| 4040 | .IX Item "-Wno-builtin-macro-redefined" |
| 4041 | Do not warn if certain built-in macros are redefined. This suppresses |
| 4042 | warnings for redefinition of \f(CW\*(C`_\|_TIMESTAMP_\|_\*(C'\fR, \f(CW\*(C`_\|_TIME_\|_\*(C'\fR, |
| 4043 | \&\f(CW\*(C`_\|_DATE_\|_\*(C'\fR, \f(CW\*(C`_\|_FILE_\|_\*(C'\fR, and \f(CW\*(C`_\|_BASE_FILE_\|_\*(C'\fR. |
| 4044 | .IP "\fB\-Wstrict\-prototypes\fR (C and Objective-C only)" 4 |
| 4045 | .IX Item "-Wstrict-prototypes (C and Objective-C only)" |
| 4046 | Warn if a function is declared or defined without specifying the |
| 4047 | argument types. (An old-style function definition is permitted without |
| 4048 | a warning if preceded by a declaration that specifies the argument |
| 4049 | types.) |
| 4050 | .IP "\fB\-Wold\-style\-declaration\fR (C and Objective-C only)" 4 |
| 4051 | .IX Item "-Wold-style-declaration (C and Objective-C only)" |
| 4052 | Warn for obsolescent usages, according to the C Standard, in a |
| 4053 | declaration. For example, warn if storage-class specifiers like |
| 4054 | \&\f(CW\*(C`static\*(C'\fR are not the first things in a declaration. This warning |
| 4055 | is also enabled by \fB\-Wextra\fR. |
| 4056 | .IP "\fB\-Wold\-style\-definition\fR (C and Objective-C only)" 4 |
| 4057 | .IX Item "-Wold-style-definition (C and Objective-C only)" |
| 4058 | Warn if an old-style function definition is used. A warning is given |
| 4059 | even if there is a previous prototype. |
| 4060 | .IP "\fB\-Wmissing\-parameter\-type\fR (C and Objective-C only)" 4 |
| 4061 | .IX Item "-Wmissing-parameter-type (C and Objective-C only)" |
| 4062 | A function parameter is declared without a type specifier in K&R\-style |
| 4063 | functions: |
| 4064 | .Sp |
| 4065 | .Vb 1 |
| 4066 | \& void foo(bar) { } |
| 4067 | .Ve |
| 4068 | .Sp |
| 4069 | This warning is also enabled by \fB\-Wextra\fR. |
| 4070 | .IP "\fB\-Wmissing\-prototypes\fR (C and Objective-C only)" 4 |
| 4071 | .IX Item "-Wmissing-prototypes (C and Objective-C only)" |
| 4072 | Warn if a global function is defined without a previous prototype |
| 4073 | declaration. This warning is issued even if the definition itself |
| 4074 | provides a prototype. Use this option to detect global functions |
| 4075 | that do not have a matching prototype declaration in a header file. |
| 4076 | This option is not valid for \*(C+ because all function declarations |
| 4077 | provide prototypes and a non-matching declaration will declare an |
| 4078 | overload rather than conflict with an earlier declaration. |
| 4079 | Use \fB\-Wmissing\-declarations\fR to detect missing declarations in \*(C+. |
| 4080 | .IP "\fB\-Wmissing\-declarations\fR" 4 |
| 4081 | .IX Item "-Wmissing-declarations" |
| 4082 | Warn if a global function is defined without a previous declaration. |
| 4083 | Do so even if the definition itself provides a prototype. |
| 4084 | Use this option to detect global functions that are not declared in |
| 4085 | header files. In C, no warnings are issued for functions with previous |
| 4086 | non-prototype declarations; use \fB\-Wmissing\-prototype\fR to detect |
| 4087 | missing prototypes. In \*(C+, no warnings are issued for function templates, |
| 4088 | or for inline functions, or for functions in anonymous namespaces. |
| 4089 | .IP "\fB\-Wmissing\-field\-initializers\fR" 4 |
| 4090 | .IX Item "-Wmissing-field-initializers" |
| 4091 | Warn if a structure's initializer has some fields missing. For |
| 4092 | example, the following code causes such a warning, because |
| 4093 | \&\f(CW\*(C`x.h\*(C'\fR is implicitly zero: |
| 4094 | .Sp |
| 4095 | .Vb 2 |
| 4096 | \& struct s { int f, g, h; }; |
| 4097 | \& struct s x = { 3, 4 }; |
| 4098 | .Ve |
| 4099 | .Sp |
| 4100 | This option does not warn about designated initializers, so the following |
| 4101 | modification does not trigger a warning: |
| 4102 | .Sp |
| 4103 | .Vb 2 |
| 4104 | \& struct s { int f, g, h; }; |
| 4105 | \& struct s x = { .f = 3, .g = 4 }; |
| 4106 | .Ve |
| 4107 | .Sp |
| 4108 | This warning is included in \fB\-Wextra\fR. To get other \fB\-Wextra\fR |
| 4109 | warnings without this one, use \fB\-Wextra \-Wno\-missing\-field\-initializers\fR. |
| 4110 | .IP "\fB\-Wno\-multichar\fR" 4 |
| 4111 | .IX Item "-Wno-multichar" |
| 4112 | Do not warn if a multicharacter constant (\fB'\s-1FOOF\s0'\fR) is used. |
| 4113 | Usually they indicate a typo in the user's code, as they have |
| 4114 | implementation-defined values, and should not be used in portable code. |
| 4115 | .IP "\fB\-Wnormalized=<none|id|nfc|nfkc>\fR" 4 |
| 4116 | .IX Item "-Wnormalized=<none|id|nfc|nfkc>" |
| 4117 | In \s-1ISO\s0 C and \s-1ISO\s0 \*(C+, two identifiers are different if they are |
| 4118 | different sequences of characters. However, sometimes when characters |
| 4119 | outside the basic \s-1ASCII\s0 character set are used, you can have two |
| 4120 | different character sequences that look the same. To avoid confusion, |
| 4121 | the \s-1ISO\s0 10646 standard sets out some \fInormalization rules\fR which |
| 4122 | when applied ensure that two sequences that look the same are turned into |
| 4123 | the same sequence. \s-1GCC\s0 can warn you if you are using identifiers that |
| 4124 | have not been normalized; this option controls that warning. |
| 4125 | .Sp |
| 4126 | There are four levels of warning supported by \s-1GCC\s0. The default is |
| 4127 | \&\fB\-Wnormalized=nfc\fR, which warns about any identifier that is |
| 4128 | not in the \s-1ISO\s0 10646 \*(L"C\*(R" normalized form, \fI\s-1NFC\s0\fR. \s-1NFC\s0 is the |
| 4129 | recommended form for most uses. |
| 4130 | .Sp |
| 4131 | Unfortunately, there are some characters allowed in identifiers by |
| 4132 | \&\s-1ISO\s0 C and \s-1ISO\s0 \*(C+ that, when turned into \s-1NFC\s0, are not allowed in |
| 4133 | identifiers. That is, there's no way to use these symbols in portable |
| 4134 | \&\s-1ISO\s0 C or \*(C+ and have all your identifiers in \s-1NFC\s0. |
| 4135 | \&\fB\-Wnormalized=id\fR suppresses the warning for these characters. |
| 4136 | It is hoped that future versions of the standards involved will correct |
| 4137 | this, which is why this option is not the default. |
| 4138 | .Sp |
| 4139 | You can switch the warning off for all characters by writing |
| 4140 | \&\fB\-Wnormalized=none\fR. You should only do this if you |
| 4141 | are using some other normalization scheme (like \*(L"D\*(R"), because |
| 4142 | otherwise you can easily create bugs that are literally impossible to see. |
| 4143 | .Sp |
| 4144 | Some characters in \s-1ISO\s0 10646 have distinct meanings but look identical |
| 4145 | in some fonts or display methodologies, especially once formatting has |
| 4146 | been applied. For instance \f(CW\*(C`\eu207F\*(C'\fR, \*(L"\s-1SUPERSCRIPT\s0 \s-1LATIN\s0 \s-1SMALL\s0 |
| 4147 | \&\s-1LETTER\s0 N\*(R", displays just like a regular \f(CW\*(C`n\*(C'\fR that has been |
| 4148 | placed in a superscript. \s-1ISO\s0 10646 defines the \fI\s-1NFKC\s0\fR |
| 4149 | normalization scheme to convert all these into a standard form as |
| 4150 | well, and \s-1GCC\s0 warns if your code is not in \s-1NFKC\s0 if you use |
| 4151 | \&\fB\-Wnormalized=nfkc\fR. This warning is comparable to warning |
| 4152 | about every identifier that contains the letter O because it might be |
| 4153 | confused with the digit 0, and so is not the default, but may be |
| 4154 | useful as a local coding convention if the programming environment |
| 4155 | cannot be fixed to display these characters distinctly. |
| 4156 | .IP "\fB\-Wno\-deprecated\fR" 4 |
| 4157 | .IX Item "-Wno-deprecated" |
| 4158 | Do not warn about usage of deprecated features. |
| 4159 | .IP "\fB\-Wno\-deprecated\-declarations\fR" 4 |
| 4160 | .IX Item "-Wno-deprecated-declarations" |
| 4161 | Do not warn about uses of functions, |
| 4162 | variables, and types marked as deprecated by using the \f(CW\*(C`deprecated\*(C'\fR |
| 4163 | attribute. |
| 4164 | .IP "\fB\-Wno\-overflow\fR" 4 |
| 4165 | .IX Item "-Wno-overflow" |
| 4166 | Do not warn about compile-time overflow in constant expressions. |
| 4167 | .IP "\fB\-Woverride\-init\fR (C and Objective-C only)" 4 |
| 4168 | .IX Item "-Woverride-init (C and Objective-C only)" |
| 4169 | Warn if an initialized field without side effects is overridden when |
| 4170 | using designated initializers. |
| 4171 | .Sp |
| 4172 | This warning is included in \fB\-Wextra\fR. To get other |
| 4173 | \&\fB\-Wextra\fR warnings without this one, use \fB\-Wextra |
| 4174 | \&\-Wno\-override\-init\fR. |
| 4175 | .IP "\fB\-Wpacked\fR" 4 |
| 4176 | .IX Item "-Wpacked" |
| 4177 | Warn if a structure is given the packed attribute, but the packed |
| 4178 | attribute has no effect on the layout or size of the structure. |
| 4179 | Such structures may be mis-aligned for little benefit. For |
| 4180 | instance, in this code, the variable \f(CW\*(C`f.x\*(C'\fR in \f(CW\*(C`struct bar\*(C'\fR |
| 4181 | is misaligned even though \f(CW\*(C`struct bar\*(C'\fR does not itself |
| 4182 | have the packed attribute: |
| 4183 | .Sp |
| 4184 | .Vb 8 |
| 4185 | \& struct foo { |
| 4186 | \& int x; |
| 4187 | \& char a, b, c, d; |
| 4188 | \& } _\|_attribute_\|_((packed)); |
| 4189 | \& struct bar { |
| 4190 | \& char z; |
| 4191 | \& struct foo f; |
| 4192 | \& }; |
| 4193 | .Ve |
| 4194 | .IP "\fB\-Wpacked\-bitfield\-compat\fR" 4 |
| 4195 | .IX Item "-Wpacked-bitfield-compat" |
| 4196 | The 4.1, 4.2 and 4.3 series of \s-1GCC\s0 ignore the \f(CW\*(C`packed\*(C'\fR attribute |
| 4197 | on bit-fields of type \f(CW\*(C`char\*(C'\fR. This has been fixed in \s-1GCC\s0 4.4 but |
| 4198 | the change can lead to differences in the structure layout. \s-1GCC\s0 |
| 4199 | informs you when the offset of such a field has changed in \s-1GCC\s0 4.4. |
| 4200 | For example there is no longer a 4\-bit padding between field \f(CW\*(C`a\*(C'\fR |
| 4201 | and \f(CW\*(C`b\*(C'\fR in this structure: |
| 4202 | .Sp |
| 4203 | .Vb 5 |
| 4204 | \& struct foo |
| 4205 | \& { |
| 4206 | \& char a:4; |
| 4207 | \& char b:8; |
| 4208 | \& } _\|_attribute_\|_ ((packed)); |
| 4209 | .Ve |
| 4210 | .Sp |
| 4211 | This warning is enabled by default. Use |
| 4212 | \&\fB\-Wno\-packed\-bitfield\-compat\fR to disable this warning. |
| 4213 | .IP "\fB\-Wpadded\fR" 4 |
| 4214 | .IX Item "-Wpadded" |
| 4215 | Warn if padding is included in a structure, either to align an element |
| 4216 | of the structure or to align the whole structure. Sometimes when this |
| 4217 | happens it is possible to rearrange the fields of the structure to |
| 4218 | reduce the padding and so make the structure smaller. |
| 4219 | .IP "\fB\-Wredundant\-decls\fR" 4 |
| 4220 | .IX Item "-Wredundant-decls" |
| 4221 | Warn if anything is declared more than once in the same scope, even in |
| 4222 | cases where multiple declaration is valid and changes nothing. |
| 4223 | .IP "\fB\-Wnested\-externs\fR (C and Objective-C only)" 4 |
| 4224 | .IX Item "-Wnested-externs (C and Objective-C only)" |
| 4225 | Warn if an \f(CW\*(C`extern\*(C'\fR declaration is encountered within a function. |
| 4226 | .IP "\fB\-Wno\-inherited\-variadic\-ctor\fR" 4 |
| 4227 | .IX Item "-Wno-inherited-variadic-ctor" |
| 4228 | Suppress warnings about use of \*(C+11 inheriting constructors when the |
| 4229 | base class inherited from has a C variadic constructor; the warning is |
| 4230 | on by default because the ellipsis is not inherited. |
| 4231 | .IP "\fB\-Winline\fR" 4 |
| 4232 | .IX Item "-Winline" |
| 4233 | Warn if a function that is declared as inline cannot be inlined. |
| 4234 | Even with this option, the compiler does not warn about failures to |
| 4235 | inline functions declared in system headers. |
| 4236 | .Sp |
| 4237 | The compiler uses a variety of heuristics to determine whether or not |
| 4238 | to inline a function. For example, the compiler takes into account |
| 4239 | the size of the function being inlined and the amount of inlining |
| 4240 | that has already been done in the current function. Therefore, |
| 4241 | seemingly insignificant changes in the source program can cause the |
| 4242 | warnings produced by \fB\-Winline\fR to appear or disappear. |
| 4243 | .IP "\fB\-Wno\-invalid\-offsetof\fR (\*(C+ and Objective\-\*(C+ only)" 4 |
| 4244 | .IX Item "-Wno-invalid-offsetof ( and Objective- only)" |
| 4245 | Suppress warnings from applying the \fBoffsetof\fR macro to a non-POD |
| 4246 | type. According to the 1998 \s-1ISO\s0 \*(C+ standard, applying \fBoffsetof\fR |
| 4247 | to a non-POD type is undefined. In existing \*(C+ implementations, |
| 4248 | however, \fBoffsetof\fR typically gives meaningful results even when |
| 4249 | applied to certain kinds of non-POD types (such as a simple |
| 4250 | \&\fBstruct\fR that fails to be a \s-1POD\s0 type only by virtue of having a |
| 4251 | constructor). This flag is for users who are aware that they are |
| 4252 | writing nonportable code and who have deliberately chosen to ignore the |
| 4253 | warning about it. |
| 4254 | .Sp |
| 4255 | The restrictions on \fBoffsetof\fR may be relaxed in a future version |
| 4256 | of the \*(C+ standard. |
| 4257 | .IP "\fB\-Wno\-int\-to\-pointer\-cast\fR" 4 |
| 4258 | .IX Item "-Wno-int-to-pointer-cast" |
| 4259 | Suppress warnings from casts to pointer type of an integer of a |
| 4260 | different size. In \*(C+, casting to a pointer type of smaller size is |
| 4261 | an error. \fBWint-to-pointer-cast\fR is enabled by default. |
| 4262 | .IP "\fB\-Wno\-pointer\-to\-int\-cast\fR (C and Objective-C only)" 4 |
| 4263 | .IX Item "-Wno-pointer-to-int-cast (C and Objective-C only)" |
| 4264 | Suppress warnings from casts from a pointer to an integer type of a |
| 4265 | different size. |
| 4266 | .IP "\fB\-Winvalid\-pch\fR" 4 |
| 4267 | .IX Item "-Winvalid-pch" |
| 4268 | Warn if a precompiled header is found in |
| 4269 | the search path but can't be used. |
| 4270 | .IP "\fB\-Wlong\-long\fR" 4 |
| 4271 | .IX Item "-Wlong-long" |
| 4272 | Warn if \fBlong long\fR type is used. This is enabled by either |
| 4273 | \&\fB\-Wpedantic\fR or \fB\-Wtraditional\fR in \s-1ISO\s0 C90 and \*(C+98 |
| 4274 | modes. To inhibit the warning messages, use \fB\-Wno\-long\-long\fR. |
| 4275 | .IP "\fB\-Wvariadic\-macros\fR" 4 |
| 4276 | .IX Item "-Wvariadic-macros" |
| 4277 | Warn if variadic macros are used in pedantic \s-1ISO\s0 C90 mode, or the \s-1GNU\s0 |
| 4278 | alternate syntax when in pedantic \s-1ISO\s0 C99 mode. This is default. |
| 4279 | To inhibit the warning messages, use \fB\-Wno\-variadic\-macros\fR. |
| 4280 | .IP "\fB\-Wvarargs\fR" 4 |
| 4281 | .IX Item "-Wvarargs" |
| 4282 | Warn upon questionable usage of the macros used to handle variable |
| 4283 | arguments like \fBva_start\fR. This is default. To inhibit the |
| 4284 | warning messages, use \fB\-Wno\-varargs\fR. |
| 4285 | .IP "\fB\-Wvector\-operation\-performance\fR" 4 |
| 4286 | .IX Item "-Wvector-operation-performance" |
| 4287 | Warn if vector operation is not implemented via \s-1SIMD\s0 capabilities of the |
| 4288 | architecture. Mainly useful for the performance tuning. |
| 4289 | Vector operation can be implemented \f(CW\*(C`piecewise\*(C'\fR, which means that the |
| 4290 | scalar operation is performed on every vector element; |
| 4291 | \&\f(CW\*(C`in parallel\*(C'\fR, which means that the vector operation is implemented |
| 4292 | using scalars of wider type, which normally is more performance efficient; |
| 4293 | and \f(CW\*(C`as a single scalar\*(C'\fR, which means that vector fits into a |
| 4294 | scalar type. |
| 4295 | .IP "\fB\-Wno\-virtual\-move\-assign\fR" 4 |
| 4296 | .IX Item "-Wno-virtual-move-assign" |
| 4297 | Suppress warnings about inheriting from a virtual base with a |
| 4298 | non-trivial \*(C+11 move assignment operator. This is dangerous because |
| 4299 | if the virtual base is reachable along more than one path, it will be |
| 4300 | moved multiple times, which can mean both objects end up in the |
| 4301 | moved-from state. If the move assignment operator is written to avoid |
| 4302 | moving from a moved-from object, this warning can be disabled. |
| 4303 | .IP "\fB\-Wvla\fR" 4 |
| 4304 | .IX Item "-Wvla" |
| 4305 | Warn if variable length array is used in the code. |
| 4306 | \&\fB\-Wno\-vla\fR prevents the \fB\-Wpedantic\fR warning of |
| 4307 | the variable length array. |
| 4308 | .IP "\fB\-Wvolatile\-register\-var\fR" 4 |
| 4309 | .IX Item "-Wvolatile-register-var" |
| 4310 | Warn if a register variable is declared volatile. The volatile |
| 4311 | modifier does not inhibit all optimizations that may eliminate reads |
| 4312 | and/or writes to register variables. This warning is enabled by |
| 4313 | \&\fB\-Wall\fR. |
| 4314 | .IP "\fB\-Wdisabled\-optimization\fR" 4 |
| 4315 | .IX Item "-Wdisabled-optimization" |
| 4316 | Warn if a requested optimization pass is disabled. This warning does |
| 4317 | not generally indicate that there is anything wrong with your code; it |
| 4318 | merely indicates that \s-1GCC\s0's optimizers are unable to handle the code |
| 4319 | effectively. Often, the problem is that your code is too big or too |
| 4320 | complex; \s-1GCC\s0 refuses to optimize programs when the optimization |
| 4321 | itself is likely to take inordinate amounts of time. |
| 4322 | .IP "\fB\-Wpointer\-sign\fR (C and Objective-C only)" 4 |
| 4323 | .IX Item "-Wpointer-sign (C and Objective-C only)" |
| 4324 | Warn for pointer argument passing or assignment with different signedness. |
| 4325 | This option is only supported for C and Objective-C. It is implied by |
| 4326 | \&\fB\-Wall\fR and by \fB\-Wpedantic\fR, which can be disabled with |
| 4327 | \&\fB\-Wno\-pointer\-sign\fR. |
| 4328 | .IP "\fB\-Wstack\-protector\fR" 4 |
| 4329 | .IX Item "-Wstack-protector" |
| 4330 | This option is only active when \fB\-fstack\-protector\fR is active. It |
| 4331 | warns about functions that are not protected against stack smashing. |
| 4332 | .IP "\fB\-Wno\-mudflap\fR" 4 |
| 4333 | .IX Item "-Wno-mudflap" |
| 4334 | Suppress warnings about constructs that cannot be instrumented by |
| 4335 | \&\fB\-fmudflap\fR. |
| 4336 | .IP "\fB\-Woverlength\-strings\fR" 4 |
| 4337 | .IX Item "-Woverlength-strings" |
| 4338 | Warn about string constants that are longer than the \*(L"minimum |
| 4339 | maximum\*(R" length specified in the C standard. Modern compilers |
| 4340 | generally allow string constants that are much longer than the |
| 4341 | standard's minimum limit, but very portable programs should avoid |
| 4342 | using longer strings. |
| 4343 | .Sp |
| 4344 | The limit applies \fIafter\fR string constant concatenation, and does |
| 4345 | not count the trailing \s-1NUL\s0. In C90, the limit was 509 characters; in |
| 4346 | C99, it was raised to 4095. \*(C+98 does not specify a normative |
| 4347 | minimum maximum, so we do not diagnose overlength strings in \*(C+. |
| 4348 | .Sp |
| 4349 | This option is implied by \fB\-Wpedantic\fR, and can be disabled with |
| 4350 | \&\fB\-Wno\-overlength\-strings\fR. |
| 4351 | .IP "\fB\-Wunsuffixed\-float\-constants\fR (C and Objective-C only)" 4 |
| 4352 | .IX Item "-Wunsuffixed-float-constants (C and Objective-C only)" |
| 4353 | Issue a warning for any floating constant that does not have |
| 4354 | a suffix. When used together with \fB\-Wsystem\-headers\fR it |
| 4355 | warns about such constants in system header files. This can be useful |
| 4356 | when preparing code to use with the \f(CW\*(C`FLOAT_CONST_DECIMAL64\*(C'\fR pragma |
| 4357 | from the decimal floating-point extension to C99. |
| 4358 | .SS "Options for Debugging Your Program or \s-1GCC\s0" |
| 4359 | .IX Subsection "Options for Debugging Your Program or GCC" |
| 4360 | \&\s-1GCC\s0 has various special options that are used for debugging |
| 4361 | either your program or \s-1GCC:\s0 |
| 4362 | .IP "\fB\-g\fR" 4 |
| 4363 | .IX Item "-g" |
| 4364 | Produce debugging information in the operating system's native format |
| 4365 | (stabs, \s-1COFF\s0, \s-1XCOFF\s0, or \s-1DWARF\s0 2). \s-1GDB\s0 can work with this debugging |
| 4366 | information. |
| 4367 | .Sp |
| 4368 | On most systems that use stabs format, \fB\-g\fR enables use of extra |
| 4369 | debugging information that only \s-1GDB\s0 can use; this extra information |
| 4370 | makes debugging work better in \s-1GDB\s0 but probably makes other debuggers |
| 4371 | crash or |
| 4372 | refuse to read the program. If you want to control for certain whether |
| 4373 | to generate the extra information, use \fB\-gstabs+\fR, \fB\-gstabs\fR, |
| 4374 | \&\fB\-gxcoff+\fR, \fB\-gxcoff\fR, or \fB\-gvms\fR (see below). |
| 4375 | .Sp |
| 4376 | \&\s-1GCC\s0 allows you to use \fB\-g\fR with |
| 4377 | \&\fB\-O\fR. The shortcuts taken by optimized code may occasionally |
| 4378 | produce surprising results: some variables you declared may not exist |
| 4379 | at all; flow of control may briefly move where you did not expect it; |
| 4380 | some statements may not be executed because they compute constant |
| 4381 | results or their values are already at hand; some statements may |
| 4382 | execute in different places because they have been moved out of loops. |
| 4383 | .Sp |
| 4384 | Nevertheless it proves possible to debug optimized output. This makes |
| 4385 | it reasonable to use the optimizer for programs that might have bugs. |
| 4386 | .Sp |
| 4387 | The following options are useful when \s-1GCC\s0 is generated with the |
| 4388 | capability for more than one debugging format. |
| 4389 | .IP "\fB\-gsplit\-dwarf\fR" 4 |
| 4390 | .IX Item "-gsplit-dwarf" |
| 4391 | Separate as much dwarf debugging information as possible into a |
| 4392 | separate output file with the extension .dwo. This option allows |
| 4393 | the build system to avoid linking files with debug information. To |
| 4394 | be useful, this option requires a debugger capable of reading .dwo |
| 4395 | files. |
| 4396 | .IP "\fB\-ggdb\fR" 4 |
| 4397 | .IX Item "-ggdb" |
| 4398 | Produce debugging information for use by \s-1GDB\s0. This means to use the |
| 4399 | most expressive format available (\s-1DWARF\s0 2, stabs, or the native format |
| 4400 | if neither of those are supported), including \s-1GDB\s0 extensions if at all |
| 4401 | possible. |
| 4402 | .IP "\fB\-gpubnames\fR" 4 |
| 4403 | .IX Item "-gpubnames" |
| 4404 | Generate dwarf .debug_pubnames and .debug_pubtypes sections. |
| 4405 | .IP "\fB\-gstabs\fR" 4 |
| 4406 | .IX Item "-gstabs" |
| 4407 | Produce debugging information in stabs format (if that is supported), |
| 4408 | without \s-1GDB\s0 extensions. This is the format used by \s-1DBX\s0 on most \s-1BSD\s0 |
| 4409 | systems. On \s-1MIPS\s0, Alpha and System V Release 4 systems this option |
| 4410 | produces stabs debugging output that is not understood by \s-1DBX\s0 or \s-1SDB\s0. |
| 4411 | On System V Release 4 systems this option requires the \s-1GNU\s0 assembler. |
| 4412 | .IP "\fB\-feliminate\-unused\-debug\-symbols\fR" 4 |
| 4413 | .IX Item "-feliminate-unused-debug-symbols" |
| 4414 | Produce debugging information in stabs format (if that is supported), |
| 4415 | for only symbols that are actually used. |
| 4416 | .IP "\fB\-femit\-class\-debug\-always\fR" 4 |
| 4417 | .IX Item "-femit-class-debug-always" |
| 4418 | Instead of emitting debugging information for a \*(C+ class in only one |
| 4419 | object file, emit it in all object files using the class. This option |
| 4420 | should be used only with debuggers that are unable to handle the way \s-1GCC\s0 |
| 4421 | normally emits debugging information for classes because using this |
| 4422 | option increases the size of debugging information by as much as a |
| 4423 | factor of two. |
| 4424 | .IP "\fB\-fdebug\-types\-section\fR" 4 |
| 4425 | .IX Item "-fdebug-types-section" |
| 4426 | When using \s-1DWARF\s0 Version 4 or higher, type DIEs can be put into |
| 4427 | their own \f(CW\*(C`.debug_types\*(C'\fR section instead of making them part of the |
| 4428 | \&\f(CW\*(C`.debug_info\*(C'\fR section. It is more efficient to put them in a separate |
| 4429 | comdat sections since the linker can then remove duplicates. |
| 4430 | But not all \s-1DWARF\s0 consumers support \f(CW\*(C`.debug_types\*(C'\fR sections yet |
| 4431 | and on some objects \f(CW\*(C`.debug_types\*(C'\fR produces larger instead of smaller |
| 4432 | debugging information. |
| 4433 | .IP "\fB\-gstabs+\fR" 4 |
| 4434 | .IX Item "-gstabs+" |
| 4435 | Produce debugging information in stabs format (if that is supported), |
| 4436 | using \s-1GNU\s0 extensions understood only by the \s-1GNU\s0 debugger (\s-1GDB\s0). The |
| 4437 | use of these extensions is likely to make other debuggers crash or |
| 4438 | refuse to read the program. |
| 4439 | .IP "\fB\-gcoff\fR" 4 |
| 4440 | .IX Item "-gcoff" |
| 4441 | Produce debugging information in \s-1COFF\s0 format (if that is supported). |
| 4442 | This is the format used by \s-1SDB\s0 on most System V systems prior to |
| 4443 | System V Release 4. |
| 4444 | .IP "\fB\-gxcoff\fR" 4 |
| 4445 | .IX Item "-gxcoff" |
| 4446 | Produce debugging information in \s-1XCOFF\s0 format (if that is supported). |
| 4447 | This is the format used by the \s-1DBX\s0 debugger on \s-1IBM\s0 \s-1RS/6000\s0 systems. |
| 4448 | .IP "\fB\-gxcoff+\fR" 4 |
| 4449 | .IX Item "-gxcoff+" |
| 4450 | Produce debugging information in \s-1XCOFF\s0 format (if that is supported), |
| 4451 | using \s-1GNU\s0 extensions understood only by the \s-1GNU\s0 debugger (\s-1GDB\s0). The |
| 4452 | use of these extensions is likely to make other debuggers crash or |
| 4453 | refuse to read the program, and may cause assemblers other than the \s-1GNU\s0 |
| 4454 | assembler (\s-1GAS\s0) to fail with an error. |
| 4455 | .IP "\fB\-gdwarf\-\fR\fIversion\fR" 4 |
| 4456 | .IX Item "-gdwarf-version" |
| 4457 | Produce debugging information in \s-1DWARF\s0 format (if that is supported). |
| 4458 | The value of \fIversion\fR may be either 2, 3 or 4; the default version |
| 4459 | for most targets is 4. |
| 4460 | .Sp |
| 4461 | Note that with \s-1DWARF\s0 Version 2, some ports require and always |
| 4462 | use some non-conflicting \s-1DWARF\s0 3 extensions in the unwind tables. |
| 4463 | .Sp |
| 4464 | Version 4 may require \s-1GDB\s0 7.0 and \fB\-fvar\-tracking\-assignments\fR |
| 4465 | for maximum benefit. |
| 4466 | .IP "\fB\-grecord\-gcc\-switches\fR" 4 |
| 4467 | .IX Item "-grecord-gcc-switches" |
| 4468 | This switch causes the command-line options used to invoke the |
| 4469 | compiler that may affect code generation to be appended to the |
| 4470 | DW_AT_producer attribute in \s-1DWARF\s0 debugging information. The options |
| 4471 | are concatenated with spaces separating them from each other and from |
| 4472 | the compiler version. See also \fB\-frecord\-gcc\-switches\fR for another |
| 4473 | way of storing compiler options into the object file. This is the default. |
| 4474 | .IP "\fB\-gno\-record\-gcc\-switches\fR" 4 |
| 4475 | .IX Item "-gno-record-gcc-switches" |
| 4476 | Disallow appending command-line options to the DW_AT_producer attribute |
| 4477 | in \s-1DWARF\s0 debugging information. |
| 4478 | .IP "\fB\-gstrict\-dwarf\fR" 4 |
| 4479 | .IX Item "-gstrict-dwarf" |
| 4480 | Disallow using extensions of later \s-1DWARF\s0 standard version than selected |
| 4481 | with \fB\-gdwarf\-\fR\fIversion\fR. On most targets using non-conflicting |
| 4482 | \&\s-1DWARF\s0 extensions from later standard versions is allowed. |
| 4483 | .IP "\fB\-gno\-strict\-dwarf\fR" 4 |
| 4484 | .IX Item "-gno-strict-dwarf" |
| 4485 | Allow using extensions of later \s-1DWARF\s0 standard version than selected with |
| 4486 | \&\fB\-gdwarf\-\fR\fIversion\fR. |
| 4487 | .IP "\fB\-gvms\fR" 4 |
| 4488 | .IX Item "-gvms" |
| 4489 | Produce debugging information in Alpha/VMS debug format (if that is |
| 4490 | supported). This is the format used by \s-1DEBUG\s0 on Alpha/VMS systems. |
| 4491 | .IP "\fB\-g\fR\fIlevel\fR" 4 |
| 4492 | .IX Item "-glevel" |
| 4493 | .PD 0 |
| 4494 | .IP "\fB\-ggdb\fR\fIlevel\fR" 4 |
| 4495 | .IX Item "-ggdblevel" |
| 4496 | .IP "\fB\-gstabs\fR\fIlevel\fR" 4 |
| 4497 | .IX Item "-gstabslevel" |
| 4498 | .IP "\fB\-gcoff\fR\fIlevel\fR" 4 |
| 4499 | .IX Item "-gcofflevel" |
| 4500 | .IP "\fB\-gxcoff\fR\fIlevel\fR" 4 |
| 4501 | .IX Item "-gxcofflevel" |
| 4502 | .IP "\fB\-gvms\fR\fIlevel\fR" 4 |
| 4503 | .IX Item "-gvmslevel" |
| 4504 | .PD |
| 4505 | Request debugging information and also use \fIlevel\fR to specify how |
| 4506 | much information. The default level is 2. |
| 4507 | .Sp |
| 4508 | Level 0 produces no debug information at all. Thus, \fB\-g0\fR negates |
| 4509 | \&\fB\-g\fR. |
| 4510 | .Sp |
| 4511 | Level 1 produces minimal information, enough for making backtraces in |
| 4512 | parts of the program that you don't plan to debug. This includes |
| 4513 | descriptions of functions and external variables, but no information |
| 4514 | about local variables and no line numbers. |
| 4515 | .Sp |
| 4516 | Level 3 includes extra information, such as all the macro definitions |
| 4517 | present in the program. Some debuggers support macro expansion when |
| 4518 | you use \fB\-g3\fR. |
| 4519 | .Sp |
| 4520 | \&\fB\-gdwarf\-2\fR does not accept a concatenated debug level, because |
| 4521 | \&\s-1GCC\s0 used to support an option \fB\-gdwarf\fR that meant to generate |
| 4522 | debug information in version 1 of the \s-1DWARF\s0 format (which is very |
| 4523 | different from version 2), and it would have been too confusing. That |
| 4524 | debug format is long obsolete, but the option cannot be changed now. |
| 4525 | Instead use an additional \fB\-g\fR\fIlevel\fR option to change the |
| 4526 | debug level for \s-1DWARF\s0. |
| 4527 | .IP "\fB\-gtoggle\fR" 4 |
| 4528 | .IX Item "-gtoggle" |
| 4529 | Turn off generation of debug info, if leaving out this option |
| 4530 | generates it, or turn it on at level 2 otherwise. The position of this |
| 4531 | argument in the command line does not matter; it takes effect after all |
| 4532 | other options are processed, and it does so only once, no matter how |
| 4533 | many times it is given. This is mainly intended to be used with |
| 4534 | \&\fB\-fcompare\-debug\fR. |
| 4535 | .IP "\fB\-fsanitize=address\fR" 4 |
| 4536 | .IX Item "-fsanitize=address" |
| 4537 | Enable AddressSanitizer, a fast memory error detector. |
| 4538 | Memory access instructions will be instrumented to detect |
| 4539 | out-of-bounds and use-after-free bugs. |
| 4540 | See <\fBhttp://code.google.com/p/address\-sanitizer/\fR> for more details. |
| 4541 | .IP "\fB\-fsanitize=thread\fR" 4 |
| 4542 | .IX Item "-fsanitize=thread" |
| 4543 | Enable ThreadSanitizer, a fast data race detector. |
| 4544 | Memory access instructions will be instrumented to detect |
| 4545 | data race bugs. |
| 4546 | See <\fBhttp://code.google.com/p/data\-race\-test/wiki/ThreadSanitizer\fR> for more details. |
| 4547 | .IP "\fB\-fdump\-final\-insns\fR[\fB=\fR\fIfile\fR]" 4 |
| 4548 | .IX Item "-fdump-final-insns[=file]" |
| 4549 | Dump the final internal representation (\s-1RTL\s0) to \fIfile\fR. If the |
| 4550 | optional argument is omitted (or if \fIfile\fR is \f(CW\*(C`.\*(C'\fR), the name |
| 4551 | of the dump file is determined by appending \f(CW\*(C`.gkd\*(C'\fR to the |
| 4552 | compilation output file name. |
| 4553 | .IP "\fB\-fcompare\-debug\fR[\fB=\fR\fIopts\fR]" 4 |
| 4554 | .IX Item "-fcompare-debug[=opts]" |
| 4555 | If no error occurs during compilation, run the compiler a second time, |
| 4556 | adding \fIopts\fR and \fB\-fcompare\-debug\-second\fR to the arguments |
| 4557 | passed to the second compilation. Dump the final internal |
| 4558 | representation in both compilations, and print an error if they differ. |
| 4559 | .Sp |
| 4560 | If the equal sign is omitted, the default \fB\-gtoggle\fR is used. |
| 4561 | .Sp |
| 4562 | The environment variable \fB\s-1GCC_COMPARE_DEBUG\s0\fR, if defined, non-empty |
| 4563 | and nonzero, implicitly enables \fB\-fcompare\-debug\fR. If |
| 4564 | \&\fB\s-1GCC_COMPARE_DEBUG\s0\fR is defined to a string starting with a dash, |
| 4565 | then it is used for \fIopts\fR, otherwise the default \fB\-gtoggle\fR |
| 4566 | is used. |
| 4567 | .Sp |
| 4568 | \&\fB\-fcompare\-debug=\fR, with the equal sign but without \fIopts\fR, |
| 4569 | is equivalent to \fB\-fno\-compare\-debug\fR, which disables the dumping |
| 4570 | of the final representation and the second compilation, preventing even |
| 4571 | \&\fB\s-1GCC_COMPARE_DEBUG\s0\fR from taking effect. |
| 4572 | .Sp |
| 4573 | To verify full coverage during \fB\-fcompare\-debug\fR testing, set |
| 4574 | \&\fB\s-1GCC_COMPARE_DEBUG\s0\fR to say \fB\-fcompare\-debug\-not\-overridden\fR, |
| 4575 | which \s-1GCC\s0 rejects as an invalid option in any actual compilation |
| 4576 | (rather than preprocessing, assembly or linking). To get just a |
| 4577 | warning, setting \fB\s-1GCC_COMPARE_DEBUG\s0\fR to \fB\-w%n\-fcompare\-debug |
| 4578 | not overridden\fR will do. |
| 4579 | .IP "\fB\-fcompare\-debug\-second\fR" 4 |
| 4580 | .IX Item "-fcompare-debug-second" |
| 4581 | This option is implicitly passed to the compiler for the second |
| 4582 | compilation requested by \fB\-fcompare\-debug\fR, along with options to |
| 4583 | silence warnings, and omitting other options that would cause |
| 4584 | side-effect compiler outputs to files or to the standard output. Dump |
| 4585 | files and preserved temporary files are renamed so as to contain the |
| 4586 | \&\f(CW\*(C`.gk\*(C'\fR additional extension during the second compilation, to avoid |
| 4587 | overwriting those generated by the first. |
| 4588 | .Sp |
| 4589 | When this option is passed to the compiler driver, it causes the |
| 4590 | \&\fIfirst\fR compilation to be skipped, which makes it useful for little |
| 4591 | other than debugging the compiler proper. |
| 4592 | .IP "\fB\-feliminate\-dwarf2\-dups\fR" 4 |
| 4593 | .IX Item "-feliminate-dwarf2-dups" |
| 4594 | Compress \s-1DWARF\s0 2 debugging information by eliminating duplicated |
| 4595 | information about each symbol. This option only makes sense when |
| 4596 | generating \s-1DWARF\s0 2 debugging information with \fB\-gdwarf\-2\fR. |
| 4597 | .IP "\fB\-femit\-struct\-debug\-baseonly\fR" 4 |
| 4598 | .IX Item "-femit-struct-debug-baseonly" |
| 4599 | Emit debug information for struct-like types |
| 4600 | only when the base name of the compilation source file |
| 4601 | matches the base name of file in which the struct is defined. |
| 4602 | .Sp |
| 4603 | This option substantially reduces the size of debugging information, |
| 4604 | but at significant potential loss in type information to the debugger. |
| 4605 | See \fB\-femit\-struct\-debug\-reduced\fR for a less aggressive option. |
| 4606 | See \fB\-femit\-struct\-debug\-detailed\fR for more detailed control. |
| 4607 | .Sp |
| 4608 | This option works only with \s-1DWARF\s0 2. |
| 4609 | .IP "\fB\-femit\-struct\-debug\-reduced\fR" 4 |
| 4610 | .IX Item "-femit-struct-debug-reduced" |
| 4611 | Emit debug information for struct-like types |
| 4612 | only when the base name of the compilation source file |
| 4613 | matches the base name of file in which the type is defined, |
| 4614 | unless the struct is a template or defined in a system header. |
| 4615 | .Sp |
| 4616 | This option significantly reduces the size of debugging information, |
| 4617 | with some potential loss in type information to the debugger. |
| 4618 | See \fB\-femit\-struct\-debug\-baseonly\fR for a more aggressive option. |
| 4619 | See \fB\-femit\-struct\-debug\-detailed\fR for more detailed control. |
| 4620 | .Sp |
| 4621 | This option works only with \s-1DWARF\s0 2. |
| 4622 | .IP "\fB\-femit\-struct\-debug\-detailed\fR[\fB=\fR\fIspec-list\fR]" 4 |
| 4623 | .IX Item "-femit-struct-debug-detailed[=spec-list]" |
| 4624 | Specify the struct-like types |
| 4625 | for which the compiler generates debug information. |
| 4626 | The intent is to reduce duplicate struct debug information |
| 4627 | between different object files within the same program. |
| 4628 | .Sp |
| 4629 | This option is a detailed version of |
| 4630 | \&\fB\-femit\-struct\-debug\-reduced\fR and \fB\-femit\-struct\-debug\-baseonly\fR, |
| 4631 | which serves for most needs. |
| 4632 | .Sp |
| 4633 | A specification has the syntax[\fBdir:\fR|\fBind:\fR][\fBord:\fR|\fBgen:\fR](\fBany\fR|\fBsys\fR|\fBbase\fR|\fBnone\fR) |
| 4634 | .Sp |
| 4635 | The optional first word limits the specification to |
| 4636 | structs that are used directly (\fBdir:\fR) or used indirectly (\fBind:\fR). |
| 4637 | A struct type is used directly when it is the type of a variable, member. |
| 4638 | Indirect uses arise through pointers to structs. |
| 4639 | That is, when use of an incomplete struct is valid, the use is indirect. |
| 4640 | An example is |
| 4641 | \&\fBstruct one direct; struct two * indirect;\fR. |
| 4642 | .Sp |
| 4643 | The optional second word limits the specification to |
| 4644 | ordinary structs (\fBord:\fR) or generic structs (\fBgen:\fR). |
| 4645 | Generic structs are a bit complicated to explain. |
| 4646 | For \*(C+, these are non-explicit specializations of template classes, |
| 4647 | or non-template classes within the above. |
| 4648 | Other programming languages have generics, |
| 4649 | but \fB\-femit\-struct\-debug\-detailed\fR does not yet implement them. |
| 4650 | .Sp |
| 4651 | The third word specifies the source files for those |
| 4652 | structs for which the compiler should emit debug information. |
| 4653 | The values \fBnone\fR and \fBany\fR have the normal meaning. |
| 4654 | The value \fBbase\fR means that |
| 4655 | the base of name of the file in which the type declaration appears |
| 4656 | must match the base of the name of the main compilation file. |
| 4657 | In practice, this means that when compiling \fIfoo.c\fR, debug information |
| 4658 | is generated for types declared in that file and \fIfoo.h\fR, |
| 4659 | but not other header files. |
| 4660 | The value \fBsys\fR means those types satisfying \fBbase\fR |
| 4661 | or declared in system or compiler headers. |
| 4662 | .Sp |
| 4663 | You may need to experiment to determine the best settings for your application. |
| 4664 | .Sp |
| 4665 | The default is \fB\-femit\-struct\-debug\-detailed=all\fR. |
| 4666 | .Sp |
| 4667 | This option works only with \s-1DWARF\s0 2. |
| 4668 | .IP "\fB\-fno\-merge\-debug\-strings\fR" 4 |
| 4669 | .IX Item "-fno-merge-debug-strings" |
| 4670 | Direct the linker to not merge together strings in the debugging |
| 4671 | information that are identical in different object files. Merging is |
| 4672 | not supported by all assemblers or linkers. Merging decreases the size |
| 4673 | of the debug information in the output file at the cost of increasing |
| 4674 | link processing time. Merging is enabled by default. |
| 4675 | .IP "\fB\-fdebug\-prefix\-map=\fR\fIold\fR\fB=\fR\fInew\fR" 4 |
| 4676 | .IX Item "-fdebug-prefix-map=old=new" |
| 4677 | When compiling files in directory \fI\fIold\fI\fR, record debugging |
| 4678 | information describing them as in \fI\fInew\fI\fR instead. |
| 4679 | .IP "\fB\-fno\-dwarf2\-cfi\-asm\fR" 4 |
| 4680 | .IX Item "-fno-dwarf2-cfi-asm" |
| 4681 | Emit \s-1DWARF\s0 2 unwind info as compiler generated \f(CW\*(C`.eh_frame\*(C'\fR section |
| 4682 | instead of using \s-1GAS\s0 \f(CW\*(C`.cfi_*\*(C'\fR directives. |
| 4683 | .IP "\fB\-p\fR" 4 |
| 4684 | .IX Item "-p" |
| 4685 | Generate extra code to write profile information suitable for the |
| 4686 | analysis program \fBprof\fR. You must use this option when compiling |
| 4687 | the source files you want data about, and you must also use it when |
| 4688 | linking. |
| 4689 | .IP "\fB\-pg\fR" 4 |
| 4690 | .IX Item "-pg" |
| 4691 | Generate extra code to write profile information suitable for the |
| 4692 | analysis program \fBgprof\fR. You must use this option when compiling |
| 4693 | the source files you want data about, and you must also use it when |
| 4694 | linking. |
| 4695 | .IP "\fB\-Q\fR" 4 |
| 4696 | .IX Item "-Q" |
| 4697 | Makes the compiler print out each function name as it is compiled, and |
| 4698 | print some statistics about each pass when it finishes. |
| 4699 | .IP "\fB\-ftime\-report\fR" 4 |
| 4700 | .IX Item "-ftime-report" |
| 4701 | Makes the compiler print some statistics about the time consumed by each |
| 4702 | pass when it finishes. |
| 4703 | .IP "\fB\-fmem\-report\fR" 4 |
| 4704 | .IX Item "-fmem-report" |
| 4705 | Makes the compiler print some statistics about permanent memory |
| 4706 | allocation when it finishes. |
| 4707 | .IP "\fB\-fmem\-report\-wpa\fR" 4 |
| 4708 | .IX Item "-fmem-report-wpa" |
| 4709 | Makes the compiler print some statistics about permanent memory |
| 4710 | allocation for the \s-1WPA\s0 phase only. |
| 4711 | .IP "\fB\-fpre\-ipa\-mem\-report\fR" 4 |
| 4712 | .IX Item "-fpre-ipa-mem-report" |
| 4713 | .PD 0 |
| 4714 | .IP "\fB\-fpost\-ipa\-mem\-report\fR" 4 |
| 4715 | .IX Item "-fpost-ipa-mem-report" |
| 4716 | .PD |
| 4717 | Makes the compiler print some statistics about permanent memory |
| 4718 | allocation before or after interprocedural optimization. |
| 4719 | .IP "\fB\-fprofile\-report\fR" 4 |
| 4720 | .IX Item "-fprofile-report" |
| 4721 | Makes the compiler print some statistics about consistency of the |
| 4722 | (estimated) profile and effect of individual passes. |
| 4723 | .IP "\fB\-fstack\-usage\fR" 4 |
| 4724 | .IX Item "-fstack-usage" |
| 4725 | Makes the compiler output stack usage information for the program, on a |
| 4726 | per-function basis. The filename for the dump is made by appending |
| 4727 | \&\fI.su\fR to the \fIauxname\fR. \fIauxname\fR is generated from the name of |
| 4728 | the output file, if explicitly specified and it is not an executable, |
| 4729 | otherwise it is the basename of the source file. An entry is made up |
| 4730 | of three fields: |
| 4731 | .RS 4 |
| 4732 | .IP "\(bu" 4 |
| 4733 | The name of the function. |
| 4734 | .IP "\(bu" 4 |
| 4735 | A number of bytes. |
| 4736 | .IP "\(bu" 4 |
| 4737 | One or more qualifiers: \f(CW\*(C`static\*(C'\fR, \f(CW\*(C`dynamic\*(C'\fR, \f(CW\*(C`bounded\*(C'\fR. |
| 4738 | .RE |
| 4739 | .RS 4 |
| 4740 | .Sp |
| 4741 | The qualifier \f(CW\*(C`static\*(C'\fR means that the function manipulates the stack |
| 4742 | statically: a fixed number of bytes are allocated for the frame on function |
| 4743 | entry and released on function exit; no stack adjustments are otherwise made |
| 4744 | in the function. The second field is this fixed number of bytes. |
| 4745 | .Sp |
| 4746 | The qualifier \f(CW\*(C`dynamic\*(C'\fR means that the function manipulates the stack |
| 4747 | dynamically: in addition to the static allocation described above, stack |
| 4748 | adjustments are made in the body of the function, for example to push/pop |
| 4749 | arguments around function calls. If the qualifier \f(CW\*(C`bounded\*(C'\fR is also |
| 4750 | present, the amount of these adjustments is bounded at compile time and |
| 4751 | the second field is an upper bound of the total amount of stack used by |
| 4752 | the function. If it is not present, the amount of these adjustments is |
| 4753 | not bounded at compile time and the second field only represents the |
| 4754 | bounded part. |
| 4755 | .RE |
| 4756 | .IP "\fB\-fprofile\-arcs\fR" 4 |
| 4757 | .IX Item "-fprofile-arcs" |
| 4758 | Add code so that program flow \fIarcs\fR are instrumented. During |
| 4759 | execution the program records how many times each branch and call is |
| 4760 | executed and how many times it is taken or returns. When the compiled |
| 4761 | program exits it saves this data to a file called |
| 4762 | \&\fI\fIauxname\fI.gcda\fR for each source file. The data may be used for |
| 4763 | profile-directed optimizations (\fB\-fbranch\-probabilities\fR), or for |
| 4764 | test coverage analysis (\fB\-ftest\-coverage\fR). Each object file's |
| 4765 | \&\fIauxname\fR is generated from the name of the output file, if |
| 4766 | explicitly specified and it is not the final executable, otherwise it is |
| 4767 | the basename of the source file. In both cases any suffix is removed |
| 4768 | (e.g. \fIfoo.gcda\fR for input file \fIdir/foo.c\fR, or |
| 4769 | \&\fIdir/foo.gcda\fR for output file specified as \fB\-o dir/foo.o\fR). |
| 4770 | .IP "\fB\-\-coverage\fR" 4 |
| 4771 | .IX Item "--coverage" |
| 4772 | This option is used to compile and link code instrumented for coverage |
| 4773 | analysis. The option is a synonym for \fB\-fprofile\-arcs\fR |
| 4774 | \&\fB\-ftest\-coverage\fR (when compiling) and \fB\-lgcov\fR (when |
| 4775 | linking). See the documentation for those options for more details. |
| 4776 | .RS 4 |
| 4777 | .IP "\(bu" 4 |
| 4778 | Compile the source files with \fB\-fprofile\-arcs\fR plus optimization |
| 4779 | and code generation options. For test coverage analysis, use the |
| 4780 | additional \fB\-ftest\-coverage\fR option. You do not need to profile |
| 4781 | every source file in a program. |
| 4782 | .IP "\(bu" 4 |
| 4783 | Link your object files with \fB\-lgcov\fR or \fB\-fprofile\-arcs\fR |
| 4784 | (the latter implies the former). |
| 4785 | .IP "\(bu" 4 |
| 4786 | Run the program on a representative workload to generate the arc profile |
| 4787 | information. This may be repeated any number of times. You can run |
| 4788 | concurrent instances of your program, and provided that the file system |
| 4789 | supports locking, the data files will be correctly updated. Also |
| 4790 | \&\f(CW\*(C`fork\*(C'\fR calls are detected and correctly handled (double counting |
| 4791 | will not happen). |
| 4792 | .IP "\(bu" 4 |
| 4793 | For profile-directed optimizations, compile the source files again with |
| 4794 | the same optimization and code generation options plus |
| 4795 | \&\fB\-fbranch\-probabilities\fR. |
| 4796 | .IP "\(bu" 4 |
| 4797 | For test coverage analysis, use \fBgcov\fR to produce human readable |
| 4798 | information from the \fI.gcno\fR and \fI.gcda\fR files. Refer to the |
| 4799 | \&\fBgcov\fR documentation for further information. |
| 4800 | .RE |
| 4801 | .RS 4 |
| 4802 | .Sp |
| 4803 | With \fB\-fprofile\-arcs\fR, for each function of your program \s-1GCC\s0 |
| 4804 | creates a program flow graph, then finds a spanning tree for the graph. |
| 4805 | Only arcs that are not on the spanning tree have to be instrumented: the |
| 4806 | compiler adds code to count the number of times that these arcs are |
| 4807 | executed. When an arc is the only exit or only entrance to a block, the |
| 4808 | instrumentation code can be added to the block; otherwise, a new basic |
| 4809 | block must be created to hold the instrumentation code. |
| 4810 | .RE |
| 4811 | .IP "\fB\-ftest\-coverage\fR" 4 |
| 4812 | .IX Item "-ftest-coverage" |
| 4813 | Produce a notes file that the \fBgcov\fR code-coverage utility can use to |
| 4814 | show program coverage. Each source file's note file is called |
| 4815 | \&\fI\fIauxname\fI.gcno\fR. Refer to the \fB\-fprofile\-arcs\fR option |
| 4816 | above for a description of \fIauxname\fR and instructions on how to |
| 4817 | generate test coverage data. Coverage data matches the source files |
| 4818 | more closely if you do not optimize. |
| 4819 | .IP "\fB\-fdbg\-cnt\-list\fR" 4 |
| 4820 | .IX Item "-fdbg-cnt-list" |
| 4821 | Print the name and the counter upper bound for all debug counters. |
| 4822 | .IP "\fB\-fdbg\-cnt=\fR\fIcounter-value-list\fR" 4 |
| 4823 | .IX Item "-fdbg-cnt=counter-value-list" |
| 4824 | Set the internal debug counter upper bound. \fIcounter-value-list\fR |
| 4825 | is a comma-separated list of \fIname\fR:\fIvalue\fR pairs |
| 4826 | which sets the upper bound of each debug counter \fIname\fR to \fIvalue\fR. |
| 4827 | All debug counters have the initial upper bound of \f(CW\*(C`UINT_MAX\*(C'\fR; |
| 4828 | thus \f(CW\*(C`dbg_cnt()\*(C'\fR returns true always unless the upper bound |
| 4829 | is set by this option. |
| 4830 | For example, with \fB\-fdbg\-cnt=dce:10,tail_call:0\fR, |
| 4831 | \&\f(CW\*(C`dbg_cnt(dce)\*(C'\fR returns true only for first 10 invocations. |
| 4832 | .IP "\fB\-fenable\-\fR\fIkind\fR\fB\-\fR\fIpass\fR" 4 |
| 4833 | .IX Item "-fenable-kind-pass" |
| 4834 | .PD 0 |
| 4835 | .IP "\fB\-fdisable\-\fR\fIkind\fR\fB\-\fR\fIpass\fR\fB=\fR\fIrange-list\fR" 4 |
| 4836 | .IX Item "-fdisable-kind-pass=range-list" |
| 4837 | .PD |
| 4838 | This is a set of options that are used to explicitly disable/enable |
| 4839 | optimization passes. These options are intended for use for debugging \s-1GCC\s0. |
| 4840 | Compiler users should use regular options for enabling/disabling |
| 4841 | passes instead. |
| 4842 | .RS 4 |
| 4843 | .IP "\fB\-fdisable\-ipa\-\fR\fIpass\fR" 4 |
| 4844 | .IX Item "-fdisable-ipa-pass" |
| 4845 | Disable \s-1IPA\s0 pass \fIpass\fR. \fIpass\fR is the pass name. If the same pass is |
| 4846 | statically invoked in the compiler multiple times, the pass name should be |
| 4847 | appended with a sequential number starting from 1. |
| 4848 | .IP "\fB\-fdisable\-rtl\-\fR\fIpass\fR" 4 |
| 4849 | .IX Item "-fdisable-rtl-pass" |
| 4850 | .PD 0 |
| 4851 | .IP "\fB\-fdisable\-rtl\-\fR\fIpass\fR\fB=\fR\fIrange-list\fR" 4 |
| 4852 | .IX Item "-fdisable-rtl-pass=range-list" |
| 4853 | .PD |
| 4854 | Disable \s-1RTL\s0 pass \fIpass\fR. \fIpass\fR is the pass name. If the same pass is |
| 4855 | statically invoked in the compiler multiple times, the pass name should be |
| 4856 | appended with a sequential number starting from 1. \fIrange-list\fR is a |
| 4857 | comma-separated list of function ranges or assembler names. Each range is a number |
| 4858 | pair separated by a colon. The range is inclusive in both ends. If the range |
| 4859 | is trivial, the number pair can be simplified as a single number. If the |
| 4860 | function's call graph node's \fIuid\fR falls within one of the specified ranges, |
| 4861 | the \fIpass\fR is disabled for that function. The \fIuid\fR is shown in the |
| 4862 | function header of a dump file, and the pass names can be dumped by using |
| 4863 | option \fB\-fdump\-passes\fR. |
| 4864 | .IP "\fB\-fdisable\-tree\-\fR\fIpass\fR" 4 |
| 4865 | .IX Item "-fdisable-tree-pass" |
| 4866 | .PD 0 |
| 4867 | .IP "\fB\-fdisable\-tree\-\fR\fIpass\fR\fB=\fR\fIrange-list\fR" 4 |
| 4868 | .IX Item "-fdisable-tree-pass=range-list" |
| 4869 | .PD |
| 4870 | Disable tree pass \fIpass\fR. See \fB\-fdisable\-rtl\fR for the description of |
| 4871 | option arguments. |
| 4872 | .IP "\fB\-fenable\-ipa\-\fR\fIpass\fR" 4 |
| 4873 | .IX Item "-fenable-ipa-pass" |
| 4874 | Enable \s-1IPA\s0 pass \fIpass\fR. \fIpass\fR is the pass name. If the same pass is |
| 4875 | statically invoked in the compiler multiple times, the pass name should be |
| 4876 | appended with a sequential number starting from 1. |
| 4877 | .IP "\fB\-fenable\-rtl\-\fR\fIpass\fR" 4 |
| 4878 | .IX Item "-fenable-rtl-pass" |
| 4879 | .PD 0 |
| 4880 | .IP "\fB\-fenable\-rtl\-\fR\fIpass\fR\fB=\fR\fIrange-list\fR" 4 |
| 4881 | .IX Item "-fenable-rtl-pass=range-list" |
| 4882 | .PD |
| 4883 | Enable \s-1RTL\s0 pass \fIpass\fR. See \fB\-fdisable\-rtl\fR for option argument |
| 4884 | description and examples. |
| 4885 | .IP "\fB\-fenable\-tree\-\fR\fIpass\fR" 4 |
| 4886 | .IX Item "-fenable-tree-pass" |
| 4887 | .PD 0 |
| 4888 | .IP "\fB\-fenable\-tree\-\fR\fIpass\fR\fB=\fR\fIrange-list\fR" 4 |
| 4889 | .IX Item "-fenable-tree-pass=range-list" |
| 4890 | .PD |
| 4891 | Enable tree pass \fIpass\fR. See \fB\-fdisable\-rtl\fR for the description |
| 4892 | of option arguments. |
| 4893 | .RE |
| 4894 | .RS 4 |
| 4895 | .Sp |
| 4896 | Here are some examples showing uses of these options. |
| 4897 | .Sp |
| 4898 | .Vb 10 |
| 4899 | \& # disable ccp1 for all functions |
| 4900 | \& \-fdisable\-tree\-ccp1 |
| 4901 | \& # disable complete unroll for function whose cgraph node uid is 1 |
| 4902 | \& \-fenable\-tree\-cunroll=1 |
| 4903 | \& # disable gcse2 for functions at the following ranges [1,1], |
| 4904 | \& # [300,400], and [400,1000] |
| 4905 | \& # disable gcse2 for functions foo and foo2 |
| 4906 | \& \-fdisable\-rtl\-gcse2=foo,foo2 |
| 4907 | \& # disable early inlining |
| 4908 | \& \-fdisable\-tree\-einline |
| 4909 | \& # disable ipa inlining |
| 4910 | \& \-fdisable\-ipa\-inline |
| 4911 | \& # enable tree full unroll |
| 4912 | \& \-fenable\-tree\-unroll |
| 4913 | .Ve |
| 4914 | .RE |
| 4915 | .IP "\fB\-d\fR\fIletters\fR" 4 |
| 4916 | .IX Item "-dletters" |
| 4917 | .PD 0 |
| 4918 | .IP "\fB\-fdump\-rtl\-\fR\fIpass\fR" 4 |
| 4919 | .IX Item "-fdump-rtl-pass" |
| 4920 | .IP "\fB\-fdump\-rtl\-\fR\fIpass\fR\fB=\fR\fIfilename\fR" 4 |
| 4921 | .IX Item "-fdump-rtl-pass=filename" |
| 4922 | .PD |
| 4923 | Says to make debugging dumps during compilation at times specified by |
| 4924 | \&\fIletters\fR. This is used for debugging the RTL-based passes of the |
| 4925 | compiler. The file names for most of the dumps are made by appending |
| 4926 | a pass number and a word to the \fIdumpname\fR, and the files are |
| 4927 | created in the directory of the output file. In case of |
| 4928 | \&\fB=\fR\fIfilename\fR option, the dump is output on the given file |
| 4929 | instead of the pass numbered dump files. Note that the pass number is |
| 4930 | computed statically as passes get registered into the pass manager. |
| 4931 | Thus the numbering is not related to the dynamic order of execution of |
| 4932 | passes. In particular, a pass installed by a plugin could have a |
| 4933 | number over 200 even if it executed quite early. \fIdumpname\fR is |
| 4934 | generated from the name of the output file, if explicitly specified |
| 4935 | and it is not an executable, otherwise it is the basename of the |
| 4936 | source file. These switches may have different effects when |
| 4937 | \&\fB\-E\fR is used for preprocessing. |
| 4938 | .Sp |
| 4939 | Debug dumps can be enabled with a \fB\-fdump\-rtl\fR switch or some |
| 4940 | \&\fB\-d\fR option \fIletters\fR. Here are the possible |
| 4941 | letters for use in \fIpass\fR and \fIletters\fR, and their meanings: |
| 4942 | .RS 4 |
| 4943 | .IP "\fB\-fdump\-rtl\-alignments\fR" 4 |
| 4944 | .IX Item "-fdump-rtl-alignments" |
| 4945 | Dump after branch alignments have been computed. |
| 4946 | .IP "\fB\-fdump\-rtl\-asmcons\fR" 4 |
| 4947 | .IX Item "-fdump-rtl-asmcons" |
| 4948 | Dump after fixing rtl statements that have unsatisfied in/out constraints. |
| 4949 | .IP "\fB\-fdump\-rtl\-auto_inc_dec\fR" 4 |
| 4950 | .IX Item "-fdump-rtl-auto_inc_dec" |
| 4951 | Dump after auto-inc-dec discovery. This pass is only run on |
| 4952 | architectures that have auto inc or auto dec instructions. |
| 4953 | .IP "\fB\-fdump\-rtl\-barriers\fR" 4 |
| 4954 | .IX Item "-fdump-rtl-barriers" |
| 4955 | Dump after cleaning up the barrier instructions. |
| 4956 | .IP "\fB\-fdump\-rtl\-bbpart\fR" 4 |
| 4957 | .IX Item "-fdump-rtl-bbpart" |
| 4958 | Dump after partitioning hot and cold basic blocks. |
| 4959 | .IP "\fB\-fdump\-rtl\-bbro\fR" 4 |
| 4960 | .IX Item "-fdump-rtl-bbro" |
| 4961 | Dump after block reordering. |
| 4962 | .IP "\fB\-fdump\-rtl\-btl1\fR" 4 |
| 4963 | .IX Item "-fdump-rtl-btl1" |
| 4964 | .PD 0 |
| 4965 | .IP "\fB\-fdump\-rtl\-btl2\fR" 4 |
| 4966 | .IX Item "-fdump-rtl-btl2" |
| 4967 | .PD |
| 4968 | \&\fB\-fdump\-rtl\-btl1\fR and \fB\-fdump\-rtl\-btl2\fR enable dumping |
| 4969 | after the two branch |
| 4970 | target load optimization passes. |
| 4971 | .IP "\fB\-fdump\-rtl\-bypass\fR" 4 |
| 4972 | .IX Item "-fdump-rtl-bypass" |
| 4973 | Dump after jump bypassing and control flow optimizations. |
| 4974 | .IP "\fB\-fdump\-rtl\-combine\fR" 4 |
| 4975 | .IX Item "-fdump-rtl-combine" |
| 4976 | Dump after the \s-1RTL\s0 instruction combination pass. |
| 4977 | .IP "\fB\-fdump\-rtl\-compgotos\fR" 4 |
| 4978 | .IX Item "-fdump-rtl-compgotos" |
| 4979 | Dump after duplicating the computed gotos. |
| 4980 | .IP "\fB\-fdump\-rtl\-ce1\fR" 4 |
| 4981 | .IX Item "-fdump-rtl-ce1" |
| 4982 | .PD 0 |
| 4983 | .IP "\fB\-fdump\-rtl\-ce2\fR" 4 |
| 4984 | .IX Item "-fdump-rtl-ce2" |
| 4985 | .IP "\fB\-fdump\-rtl\-ce3\fR" 4 |
| 4986 | .IX Item "-fdump-rtl-ce3" |
| 4987 | .PD |
| 4988 | \&\fB\-fdump\-rtl\-ce1\fR, \fB\-fdump\-rtl\-ce2\fR, and |
| 4989 | \&\fB\-fdump\-rtl\-ce3\fR enable dumping after the three |
| 4990 | if conversion passes. |
| 4991 | .IP "\fB\-fdump\-rtl\-cprop_hardreg\fR" 4 |
| 4992 | .IX Item "-fdump-rtl-cprop_hardreg" |
| 4993 | Dump after hard register copy propagation. |
| 4994 | .IP "\fB\-fdump\-rtl\-csa\fR" 4 |
| 4995 | .IX Item "-fdump-rtl-csa" |
| 4996 | Dump after combining stack adjustments. |
| 4997 | .IP "\fB\-fdump\-rtl\-cse1\fR" 4 |
| 4998 | .IX Item "-fdump-rtl-cse1" |
| 4999 | .PD 0 |
| 5000 | .IP "\fB\-fdump\-rtl\-cse2\fR" 4 |
| 5001 | .IX Item "-fdump-rtl-cse2" |
| 5002 | .PD |
| 5003 | \&\fB\-fdump\-rtl\-cse1\fR and \fB\-fdump\-rtl\-cse2\fR enable dumping after |
| 5004 | the two common subexpression elimination passes. |
| 5005 | .IP "\fB\-fdump\-rtl\-dce\fR" 4 |
| 5006 | .IX Item "-fdump-rtl-dce" |
| 5007 | Dump after the standalone dead code elimination passes. |
| 5008 | .IP "\fB\-fdump\-rtl\-dbr\fR" 4 |
| 5009 | .IX Item "-fdump-rtl-dbr" |
| 5010 | Dump after delayed branch scheduling. |
| 5011 | .IP "\fB\-fdump\-rtl\-dce1\fR" 4 |
| 5012 | .IX Item "-fdump-rtl-dce1" |
| 5013 | .PD 0 |
| 5014 | .IP "\fB\-fdump\-rtl\-dce2\fR" 4 |
| 5015 | .IX Item "-fdump-rtl-dce2" |
| 5016 | .PD |
| 5017 | \&\fB\-fdump\-rtl\-dce1\fR and \fB\-fdump\-rtl\-dce2\fR enable dumping after |
| 5018 | the two dead store elimination passes. |
| 5019 | .IP "\fB\-fdump\-rtl\-eh\fR" 4 |
| 5020 | .IX Item "-fdump-rtl-eh" |
| 5021 | Dump after finalization of \s-1EH\s0 handling code. |
| 5022 | .IP "\fB\-fdump\-rtl\-eh_ranges\fR" 4 |
| 5023 | .IX Item "-fdump-rtl-eh_ranges" |
| 5024 | Dump after conversion of \s-1EH\s0 handling range regions. |
| 5025 | .IP "\fB\-fdump\-rtl\-expand\fR" 4 |
| 5026 | .IX Item "-fdump-rtl-expand" |
| 5027 | Dump after \s-1RTL\s0 generation. |
| 5028 | .IP "\fB\-fdump\-rtl\-fwprop1\fR" 4 |
| 5029 | .IX Item "-fdump-rtl-fwprop1" |
| 5030 | .PD 0 |
| 5031 | .IP "\fB\-fdump\-rtl\-fwprop2\fR" 4 |
| 5032 | .IX Item "-fdump-rtl-fwprop2" |
| 5033 | .PD |
| 5034 | \&\fB\-fdump\-rtl\-fwprop1\fR and \fB\-fdump\-rtl\-fwprop2\fR enable |
| 5035 | dumping after the two forward propagation passes. |
| 5036 | .IP "\fB\-fdump\-rtl\-gcse1\fR" 4 |
| 5037 | .IX Item "-fdump-rtl-gcse1" |
| 5038 | .PD 0 |
| 5039 | .IP "\fB\-fdump\-rtl\-gcse2\fR" 4 |
| 5040 | .IX Item "-fdump-rtl-gcse2" |
| 5041 | .PD |
| 5042 | \&\fB\-fdump\-rtl\-gcse1\fR and \fB\-fdump\-rtl\-gcse2\fR enable dumping |
| 5043 | after global common subexpression elimination. |
| 5044 | .IP "\fB\-fdump\-rtl\-init\-regs\fR" 4 |
| 5045 | .IX Item "-fdump-rtl-init-regs" |
| 5046 | Dump after the initialization of the registers. |
| 5047 | .IP "\fB\-fdump\-rtl\-initvals\fR" 4 |
| 5048 | .IX Item "-fdump-rtl-initvals" |
| 5049 | Dump after the computation of the initial value sets. |
| 5050 | .IP "\fB\-fdump\-rtl\-into_cfglayout\fR" 4 |
| 5051 | .IX Item "-fdump-rtl-into_cfglayout" |
| 5052 | Dump after converting to cfglayout mode. |
| 5053 | .IP "\fB\-fdump\-rtl\-ira\fR" 4 |
| 5054 | .IX Item "-fdump-rtl-ira" |
| 5055 | Dump after iterated register allocation. |
| 5056 | .IP "\fB\-fdump\-rtl\-jump\fR" 4 |
| 5057 | .IX Item "-fdump-rtl-jump" |
| 5058 | Dump after the second jump optimization. |
| 5059 | .IP "\fB\-fdump\-rtl\-loop2\fR" 4 |
| 5060 | .IX Item "-fdump-rtl-loop2" |
| 5061 | \&\fB\-fdump\-rtl\-loop2\fR enables dumping after the rtl |
| 5062 | loop optimization passes. |
| 5063 | .IP "\fB\-fdump\-rtl\-mach\fR" 4 |
| 5064 | .IX Item "-fdump-rtl-mach" |
| 5065 | Dump after performing the machine dependent reorganization pass, if that |
| 5066 | pass exists. |
| 5067 | .IP "\fB\-fdump\-rtl\-mode_sw\fR" 4 |
| 5068 | .IX Item "-fdump-rtl-mode_sw" |
| 5069 | Dump after removing redundant mode switches. |
| 5070 | .IP "\fB\-fdump\-rtl\-rnreg\fR" 4 |
| 5071 | .IX Item "-fdump-rtl-rnreg" |
| 5072 | Dump after register renumbering. |
| 5073 | .IP "\fB\-fdump\-rtl\-outof_cfglayout\fR" 4 |
| 5074 | .IX Item "-fdump-rtl-outof_cfglayout" |
| 5075 | Dump after converting from cfglayout mode. |
| 5076 | .IP "\fB\-fdump\-rtl\-peephole2\fR" 4 |
| 5077 | .IX Item "-fdump-rtl-peephole2" |
| 5078 | Dump after the peephole pass. |
| 5079 | .IP "\fB\-fdump\-rtl\-postreload\fR" 4 |
| 5080 | .IX Item "-fdump-rtl-postreload" |
| 5081 | Dump after post-reload optimizations. |
| 5082 | .IP "\fB\-fdump\-rtl\-pro_and_epilogue\fR" 4 |
| 5083 | .IX Item "-fdump-rtl-pro_and_epilogue" |
| 5084 | Dump after generating the function prologues and epilogues. |
| 5085 | .IP "\fB\-fdump\-rtl\-regmove\fR" 4 |
| 5086 | .IX Item "-fdump-rtl-regmove" |
| 5087 | Dump after the register move pass. |
| 5088 | .IP "\fB\-fdump\-rtl\-sched1\fR" 4 |
| 5089 | .IX Item "-fdump-rtl-sched1" |
| 5090 | .PD 0 |
| 5091 | .IP "\fB\-fdump\-rtl\-sched2\fR" 4 |
| 5092 | .IX Item "-fdump-rtl-sched2" |
| 5093 | .PD |
| 5094 | \&\fB\-fdump\-rtl\-sched1\fR and \fB\-fdump\-rtl\-sched2\fR enable dumping |
| 5095 | after the basic block scheduling passes. |
| 5096 | .IP "\fB\-fdump\-rtl\-see\fR" 4 |
| 5097 | .IX Item "-fdump-rtl-see" |
| 5098 | Dump after sign extension elimination. |
| 5099 | .IP "\fB\-fdump\-rtl\-seqabstr\fR" 4 |
| 5100 | .IX Item "-fdump-rtl-seqabstr" |
| 5101 | Dump after common sequence discovery. |
| 5102 | .IP "\fB\-fdump\-rtl\-shorten\fR" 4 |
| 5103 | .IX Item "-fdump-rtl-shorten" |
| 5104 | Dump after shortening branches. |
| 5105 | .IP "\fB\-fdump\-rtl\-sibling\fR" 4 |
| 5106 | .IX Item "-fdump-rtl-sibling" |
| 5107 | Dump after sibling call optimizations. |
| 5108 | .IP "\fB\-fdump\-rtl\-split1\fR" 4 |
| 5109 | .IX Item "-fdump-rtl-split1" |
| 5110 | .PD 0 |
| 5111 | .IP "\fB\-fdump\-rtl\-split2\fR" 4 |
| 5112 | .IX Item "-fdump-rtl-split2" |
| 5113 | .IP "\fB\-fdump\-rtl\-split3\fR" 4 |
| 5114 | .IX Item "-fdump-rtl-split3" |
| 5115 | .IP "\fB\-fdump\-rtl\-split4\fR" 4 |
| 5116 | .IX Item "-fdump-rtl-split4" |
| 5117 | .IP "\fB\-fdump\-rtl\-split5\fR" 4 |
| 5118 | .IX Item "-fdump-rtl-split5" |
| 5119 | .PD |
| 5120 | \&\fB\-fdump\-rtl\-split1\fR, \fB\-fdump\-rtl\-split2\fR, |
| 5121 | \&\fB\-fdump\-rtl\-split3\fR, \fB\-fdump\-rtl\-split4\fR and |
| 5122 | \&\fB\-fdump\-rtl\-split5\fR enable dumping after five rounds of |
| 5123 | instruction splitting. |
| 5124 | .IP "\fB\-fdump\-rtl\-sms\fR" 4 |
| 5125 | .IX Item "-fdump-rtl-sms" |
| 5126 | Dump after modulo scheduling. This pass is only run on some |
| 5127 | architectures. |
| 5128 | .IP "\fB\-fdump\-rtl\-stack\fR" 4 |
| 5129 | .IX Item "-fdump-rtl-stack" |
| 5130 | Dump after conversion from \s-1GCC\s0's \*(L"flat register file\*(R" registers to the |
| 5131 | x87's stack-like registers. This pass is only run on x86 variants. |
| 5132 | .IP "\fB\-fdump\-rtl\-subreg1\fR" 4 |
| 5133 | .IX Item "-fdump-rtl-subreg1" |
| 5134 | .PD 0 |
| 5135 | .IP "\fB\-fdump\-rtl\-subreg2\fR" 4 |
| 5136 | .IX Item "-fdump-rtl-subreg2" |
| 5137 | .PD |
| 5138 | \&\fB\-fdump\-rtl\-subreg1\fR and \fB\-fdump\-rtl\-subreg2\fR enable dumping after |
| 5139 | the two subreg expansion passes. |
| 5140 | .IP "\fB\-fdump\-rtl\-unshare\fR" 4 |
| 5141 | .IX Item "-fdump-rtl-unshare" |
| 5142 | Dump after all rtl has been unshared. |
| 5143 | .IP "\fB\-fdump\-rtl\-vartrack\fR" 4 |
| 5144 | .IX Item "-fdump-rtl-vartrack" |
| 5145 | Dump after variable tracking. |
| 5146 | .IP "\fB\-fdump\-rtl\-vregs\fR" 4 |
| 5147 | .IX Item "-fdump-rtl-vregs" |
| 5148 | Dump after converting virtual registers to hard registers. |
| 5149 | .IP "\fB\-fdump\-rtl\-web\fR" 4 |
| 5150 | .IX Item "-fdump-rtl-web" |
| 5151 | Dump after live range splitting. |
| 5152 | .IP "\fB\-fdump\-rtl\-regclass\fR" 4 |
| 5153 | .IX Item "-fdump-rtl-regclass" |
| 5154 | .PD 0 |
| 5155 | .IP "\fB\-fdump\-rtl\-subregs_of_mode_init\fR" 4 |
| 5156 | .IX Item "-fdump-rtl-subregs_of_mode_init" |
| 5157 | .IP "\fB\-fdump\-rtl\-subregs_of_mode_finish\fR" 4 |
| 5158 | .IX Item "-fdump-rtl-subregs_of_mode_finish" |
| 5159 | .IP "\fB\-fdump\-rtl\-dfinit\fR" 4 |
| 5160 | .IX Item "-fdump-rtl-dfinit" |
| 5161 | .IP "\fB\-fdump\-rtl\-dfinish\fR" 4 |
| 5162 | .IX Item "-fdump-rtl-dfinish" |
| 5163 | .PD |
| 5164 | These dumps are defined but always produce empty files. |
| 5165 | .IP "\fB\-da\fR" 4 |
| 5166 | .IX Item "-da" |
| 5167 | .PD 0 |
| 5168 | .IP "\fB\-fdump\-rtl\-all\fR" 4 |
| 5169 | .IX Item "-fdump-rtl-all" |
| 5170 | .PD |
| 5171 | Produce all the dumps listed above. |
| 5172 | .IP "\fB\-dA\fR" 4 |
| 5173 | .IX Item "-dA" |
| 5174 | Annotate the assembler output with miscellaneous debugging information. |
| 5175 | .IP "\fB\-dD\fR" 4 |
| 5176 | .IX Item "-dD" |
| 5177 | Dump all macro definitions, at the end of preprocessing, in addition to |
| 5178 | normal output. |
| 5179 | .IP "\fB\-dH\fR" 4 |
| 5180 | .IX Item "-dH" |
| 5181 | Produce a core dump whenever an error occurs. |
| 5182 | .IP "\fB\-dp\fR" 4 |
| 5183 | .IX Item "-dp" |
| 5184 | Annotate the assembler output with a comment indicating which |
| 5185 | pattern and alternative is used. The length of each instruction is |
| 5186 | also printed. |
| 5187 | .IP "\fB\-dP\fR" 4 |
| 5188 | .IX Item "-dP" |
| 5189 | Dump the \s-1RTL\s0 in the assembler output as a comment before each instruction. |
| 5190 | Also turns on \fB\-dp\fR annotation. |
| 5191 | .IP "\fB\-dx\fR" 4 |
| 5192 | .IX Item "-dx" |
| 5193 | Just generate \s-1RTL\s0 for a function instead of compiling it. Usually used |
| 5194 | with \fB\-fdump\-rtl\-expand\fR. |
| 5195 | .RE |
| 5196 | .RS 4 |
| 5197 | .RE |
| 5198 | .IP "\fB\-fdump\-noaddr\fR" 4 |
| 5199 | .IX Item "-fdump-noaddr" |
| 5200 | When doing debugging dumps, suppress address output. This makes it more |
| 5201 | feasible to use diff on debugging dumps for compiler invocations with |
| 5202 | different compiler binaries and/or different |
| 5203 | text / bss / data / heap / stack / dso start locations. |
| 5204 | .IP "\fB\-fdump\-unnumbered\fR" 4 |
| 5205 | .IX Item "-fdump-unnumbered" |
| 5206 | When doing debugging dumps, suppress instruction numbers and address output. |
| 5207 | This makes it more feasible to use diff on debugging dumps for compiler |
| 5208 | invocations with different options, in particular with and without |
| 5209 | \&\fB\-g\fR. |
| 5210 | .IP "\fB\-fdump\-unnumbered\-links\fR" 4 |
| 5211 | .IX Item "-fdump-unnumbered-links" |
| 5212 | When doing debugging dumps (see \fB\-d\fR option above), suppress |
| 5213 | instruction numbers for the links to the previous and next instructions |
| 5214 | in a sequence. |
| 5215 | .IP "\fB\-fdump\-translation\-unit\fR (\*(C+ only)" 4 |
| 5216 | .IX Item "-fdump-translation-unit ( only)" |
| 5217 | .PD 0 |
| 5218 | .IP "\fB\-fdump\-translation\-unit\-\fR\fIoptions\fR\fB \fR(\*(C+ only)" 4 |
| 5219 | .IX Item "-fdump-translation-unit-options ( only)" |
| 5220 | .PD |
| 5221 | Dump a representation of the tree structure for the entire translation |
| 5222 | unit to a file. The file name is made by appending \fI.tu\fR to the |
| 5223 | source file name, and the file is created in the same directory as the |
| 5224 | output file. If the \fB\-\fR\fIoptions\fR form is used, \fIoptions\fR |
| 5225 | controls the details of the dump as described for the |
| 5226 | \&\fB\-fdump\-tree\fR options. |
| 5227 | .IP "\fB\-fdump\-class\-hierarchy\fR (\*(C+ only)" 4 |
| 5228 | .IX Item "-fdump-class-hierarchy ( only)" |
| 5229 | .PD 0 |
| 5230 | .IP "\fB\-fdump\-class\-hierarchy\-\fR\fIoptions\fR\fB \fR(\*(C+ only)" 4 |
| 5231 | .IX Item "-fdump-class-hierarchy-options ( only)" |
| 5232 | .PD |
| 5233 | Dump a representation of each class's hierarchy and virtual function |
| 5234 | table layout to a file. The file name is made by appending |
| 5235 | \&\fI.class\fR to the source file name, and the file is created in the |
| 5236 | same directory as the output file. If the \fB\-\fR\fIoptions\fR form |
| 5237 | is used, \fIoptions\fR controls the details of the dump as described |
| 5238 | for the \fB\-fdump\-tree\fR options. |
| 5239 | .IP "\fB\-fdump\-ipa\-\fR\fIswitch\fR" 4 |
| 5240 | .IX Item "-fdump-ipa-switch" |
| 5241 | Control the dumping at various stages of inter-procedural analysis |
| 5242 | language tree to a file. The file name is generated by appending a |
| 5243 | switch specific suffix to the source file name, and the file is created |
| 5244 | in the same directory as the output file. The following dumps are |
| 5245 | possible: |
| 5246 | .RS 4 |
| 5247 | .IP "\fBall\fR" 4 |
| 5248 | .IX Item "all" |
| 5249 | Enables all inter-procedural analysis dumps. |
| 5250 | .IP "\fBcgraph\fR" 4 |
| 5251 | .IX Item "cgraph" |
| 5252 | Dumps information about call-graph optimization, unused function removal, |
| 5253 | and inlining decisions. |
| 5254 | .IP "\fBinline\fR" 4 |
| 5255 | .IX Item "inline" |
| 5256 | Dump after function inlining. |
| 5257 | .RE |
| 5258 | .RS 4 |
| 5259 | .RE |
| 5260 | .IP "\fB\-fdump\-passes\fR" 4 |
| 5261 | .IX Item "-fdump-passes" |
| 5262 | Dump the list of optimization passes that are turned on and off by |
| 5263 | the current command-line options. |
| 5264 | .IP "\fB\-fdump\-statistics\-\fR\fIoption\fR" 4 |
| 5265 | .IX Item "-fdump-statistics-option" |
| 5266 | Enable and control dumping of pass statistics in a separate file. The |
| 5267 | file name is generated by appending a suffix ending in |
| 5268 | \&\fB.statistics\fR to the source file name, and the file is created in |
| 5269 | the same directory as the output file. If the \fB\-\fR\fIoption\fR |
| 5270 | form is used, \fB\-stats\fR causes counters to be summed over the |
| 5271 | whole compilation unit while \fB\-details\fR dumps every event as |
| 5272 | the passes generate them. The default with no option is to sum |
| 5273 | counters for each function compiled. |
| 5274 | .IP "\fB\-fdump\-tree\-\fR\fIswitch\fR" 4 |
| 5275 | .IX Item "-fdump-tree-switch" |
| 5276 | .PD 0 |
| 5277 | .IP "\fB\-fdump\-tree\-\fR\fIswitch\fR\fB\-\fR\fIoptions\fR" 4 |
| 5278 | .IX Item "-fdump-tree-switch-options" |
| 5279 | .IP "\fB\-fdump\-tree\-\fR\fIswitch\fR\fB\-\fR\fIoptions\fR\fB=\fR\fIfilename\fR" 4 |
| 5280 | .IX Item "-fdump-tree-switch-options=filename" |
| 5281 | .PD |
| 5282 | Control the dumping at various stages of processing the intermediate |
| 5283 | language tree to a file. The file name is generated by appending a |
| 5284 | switch-specific suffix to the source file name, and the file is |
| 5285 | created in the same directory as the output file. In case of |
| 5286 | \&\fB=\fR\fIfilename\fR option, the dump is output on the given file |
| 5287 | instead of the auto named dump files. If the \fB\-\fR\fIoptions\fR |
| 5288 | form is used, \fIoptions\fR is a list of \fB\-\fR separated options |
| 5289 | which control the details of the dump. Not all options are applicable |
| 5290 | to all dumps; those that are not meaningful are ignored. The |
| 5291 | following options are available |
| 5292 | .RS 4 |
| 5293 | .IP "\fBaddress\fR" 4 |
| 5294 | .IX Item "address" |
| 5295 | Print the address of each node. Usually this is not meaningful as it |
| 5296 | changes according to the environment and source file. Its primary use |
| 5297 | is for tying up a dump file with a debug environment. |
| 5298 | .IP "\fBasmname\fR" 4 |
| 5299 | .IX Item "asmname" |
| 5300 | If \f(CW\*(C`DECL_ASSEMBLER_NAME\*(C'\fR has been set for a given decl, use that |
| 5301 | in the dump instead of \f(CW\*(C`DECL_NAME\*(C'\fR. Its primary use is ease of |
| 5302 | use working backward from mangled names in the assembly file. |
| 5303 | .IP "\fBslim\fR" 4 |
| 5304 | .IX Item "slim" |
| 5305 | When dumping front-end intermediate representations, inhibit dumping |
| 5306 | of members of a scope or body of a function merely because that scope |
| 5307 | has been reached. Only dump such items when they are directly reachable |
| 5308 | by some other path. |
| 5309 | .Sp |
| 5310 | When dumping pretty-printed trees, this option inhibits dumping the |
| 5311 | bodies of control structures. |
| 5312 | .Sp |
| 5313 | When dumping \s-1RTL\s0, print the \s-1RTL\s0 in slim (condensed) form instead of |
| 5314 | the default LISP-like representation. |
| 5315 | .IP "\fBraw\fR" 4 |
| 5316 | .IX Item "raw" |
| 5317 | Print a raw representation of the tree. By default, trees are |
| 5318 | pretty-printed into a C\-like representation. |
| 5319 | .IP "\fBdetails\fR" 4 |
| 5320 | .IX Item "details" |
| 5321 | Enable more detailed dumps (not honored by every dump option). Also |
| 5322 | include information from the optimization passes. |
| 5323 | .IP "\fBstats\fR" 4 |
| 5324 | .IX Item "stats" |
| 5325 | Enable dumping various statistics about the pass (not honored by every dump |
| 5326 | option). |
| 5327 | .IP "\fBblocks\fR" 4 |
| 5328 | .IX Item "blocks" |
| 5329 | Enable showing basic block boundaries (disabled in raw dumps). |
| 5330 | .IP "\fBgraph\fR" 4 |
| 5331 | .IX Item "graph" |
| 5332 | For each of the other indicated dump files (\fB\-fdump\-rtl\-\fR\fIpass\fR), |
| 5333 | dump a representation of the control flow graph suitable for viewing with |
| 5334 | GraphViz to \fI\fIfile\fI.\fIpassid\fI.\fIpass\fI.dot\fR. Each function in |
| 5335 | the file is pretty-printed as a subgraph, so that GraphViz can render them |
| 5336 | all in a single plot. |
| 5337 | .Sp |
| 5338 | This option currently only works for \s-1RTL\s0 dumps, and the \s-1RTL\s0 is always |
| 5339 | dumped in slim form. |
| 5340 | .IP "\fBvops\fR" 4 |
| 5341 | .IX Item "vops" |
| 5342 | Enable showing virtual operands for every statement. |
| 5343 | .IP "\fBlineno\fR" 4 |
| 5344 | .IX Item "lineno" |
| 5345 | Enable showing line numbers for statements. |
| 5346 | .IP "\fBuid\fR" 4 |
| 5347 | .IX Item "uid" |
| 5348 | Enable showing the unique \s-1ID\s0 (\f(CW\*(C`DECL_UID\*(C'\fR) for each variable. |
| 5349 | .IP "\fBverbose\fR" 4 |
| 5350 | .IX Item "verbose" |
| 5351 | Enable showing the tree dump for each statement. |
| 5352 | .IP "\fBeh\fR" 4 |
| 5353 | .IX Item "eh" |
| 5354 | Enable showing the \s-1EH\s0 region number holding each statement. |
| 5355 | .IP "\fBscev\fR" 4 |
| 5356 | .IX Item "scev" |
| 5357 | Enable showing scalar evolution analysis details. |
| 5358 | .IP "\fBoptimized\fR" 4 |
| 5359 | .IX Item "optimized" |
| 5360 | Enable showing optimization information (only available in certain |
| 5361 | passes). |
| 5362 | .IP "\fBmissed\fR" 4 |
| 5363 | .IX Item "missed" |
| 5364 | Enable showing missed optimization information (only available in certain |
| 5365 | passes). |
| 5366 | .IP "\fBnotes\fR" 4 |
| 5367 | .IX Item "notes" |
| 5368 | Enable other detailed optimization information (only available in |
| 5369 | certain passes). |
| 5370 | .IP "\fB=\fR\fIfilename\fR" 4 |
| 5371 | .IX Item "=filename" |
| 5372 | Instead of an auto named dump file, output into the given file |
| 5373 | name. The file names \fIstdout\fR and \fIstderr\fR are treated |
| 5374 | specially and are considered already open standard streams. For |
| 5375 | example, |
| 5376 | .Sp |
| 5377 | .Vb 2 |
| 5378 | \& gcc \-O2 \-ftree\-vectorize \-fdump\-tree\-vect\-blocks=foo.dump |
| 5379 | \& \-fdump\-tree\-pre=stderr file.c |
| 5380 | .Ve |
| 5381 | .Sp |
| 5382 | outputs vectorizer dump into \fIfoo.dump\fR, while the \s-1PRE\s0 dump is |
| 5383 | output on to \fIstderr\fR. If two conflicting dump filenames are |
| 5384 | given for the same pass, then the latter option overrides the earlier |
| 5385 | one. |
| 5386 | .IP "\fBall\fR" 4 |
| 5387 | .IX Item "all" |
| 5388 | Turn on all options, except \fBraw\fR, \fBslim\fR, \fBverbose\fR |
| 5389 | and \fBlineno\fR. |
| 5390 | .IP "\fBoptall\fR" 4 |
| 5391 | .IX Item "optall" |
| 5392 | Turn on all optimization options, i.e., \fBoptimized\fR, |
| 5393 | \&\fBmissed\fR, and \fBnote\fR. |
| 5394 | .RE |
| 5395 | .RS 4 |
| 5396 | .Sp |
| 5397 | The following tree dumps are possible: |
| 5398 | .IP "\fBoriginal\fR" 4 |
| 5399 | .IX Item "original" |
| 5400 | Dump before any tree based optimization, to \fI\fIfile\fI.original\fR. |
| 5401 | .IP "\fBoptimized\fR" 4 |
| 5402 | .IX Item "optimized" |
| 5403 | Dump after all tree based optimization, to \fI\fIfile\fI.optimized\fR. |
| 5404 | .IP "\fBgimple\fR" 4 |
| 5405 | .IX Item "gimple" |
| 5406 | Dump each function before and after the gimplification pass to a file. The |
| 5407 | file name is made by appending \fI.gimple\fR to the source file name. |
| 5408 | .IP "\fBcfg\fR" 4 |
| 5409 | .IX Item "cfg" |
| 5410 | Dump the control flow graph of each function to a file. The file name is |
| 5411 | made by appending \fI.cfg\fR to the source file name. |
| 5412 | .IP "\fBch\fR" 4 |
| 5413 | .IX Item "ch" |
| 5414 | Dump each function after copying loop headers. The file name is made by |
| 5415 | appending \fI.ch\fR to the source file name. |
| 5416 | .IP "\fBssa\fR" 4 |
| 5417 | .IX Item "ssa" |
| 5418 | Dump \s-1SSA\s0 related information to a file. The file name is made by appending |
| 5419 | \&\fI.ssa\fR to the source file name. |
| 5420 | .IP "\fBalias\fR" 4 |
| 5421 | .IX Item "alias" |
| 5422 | Dump aliasing information for each function. The file name is made by |
| 5423 | appending \fI.alias\fR to the source file name. |
| 5424 | .IP "\fBccp\fR" 4 |
| 5425 | .IX Item "ccp" |
| 5426 | Dump each function after \s-1CCP\s0. The file name is made by appending |
| 5427 | \&\fI.ccp\fR to the source file name. |
| 5428 | .IP "\fBstoreccp\fR" 4 |
| 5429 | .IX Item "storeccp" |
| 5430 | Dump each function after STORE-CCP. The file name is made by appending |
| 5431 | \&\fI.storeccp\fR to the source file name. |
| 5432 | .IP "\fBpre\fR" 4 |
| 5433 | .IX Item "pre" |
| 5434 | Dump trees after partial redundancy elimination. The file name is made |
| 5435 | by appending \fI.pre\fR to the source file name. |
| 5436 | .IP "\fBfre\fR" 4 |
| 5437 | .IX Item "fre" |
| 5438 | Dump trees after full redundancy elimination. The file name is made |
| 5439 | by appending \fI.fre\fR to the source file name. |
| 5440 | .IP "\fBcopyprop\fR" 4 |
| 5441 | .IX Item "copyprop" |
| 5442 | Dump trees after copy propagation. The file name is made |
| 5443 | by appending \fI.copyprop\fR to the source file name. |
| 5444 | .IP "\fBstore_copyprop\fR" 4 |
| 5445 | .IX Item "store_copyprop" |
| 5446 | Dump trees after store copy-propagation. The file name is made |
| 5447 | by appending \fI.store_copyprop\fR to the source file name. |
| 5448 | .IP "\fBdce\fR" 4 |
| 5449 | .IX Item "dce" |
| 5450 | Dump each function after dead code elimination. The file name is made by |
| 5451 | appending \fI.dce\fR to the source file name. |
| 5452 | .IP "\fBmudflap\fR" 4 |
| 5453 | .IX Item "mudflap" |
| 5454 | Dump each function after adding mudflap instrumentation. The file name is |
| 5455 | made by appending \fI.mudflap\fR to the source file name. |
| 5456 | .IP "\fBsra\fR" 4 |
| 5457 | .IX Item "sra" |
| 5458 | Dump each function after performing scalar replacement of aggregates. The |
| 5459 | file name is made by appending \fI.sra\fR to the source file name. |
| 5460 | .IP "\fBsink\fR" 4 |
| 5461 | .IX Item "sink" |
| 5462 | Dump each function after performing code sinking. The file name is made |
| 5463 | by appending \fI.sink\fR to the source file name. |
| 5464 | .IP "\fBdom\fR" 4 |
| 5465 | .IX Item "dom" |
| 5466 | Dump each function after applying dominator tree optimizations. The file |
| 5467 | name is made by appending \fI.dom\fR to the source file name. |
| 5468 | .IP "\fBdse\fR" 4 |
| 5469 | .IX Item "dse" |
| 5470 | Dump each function after applying dead store elimination. The file |
| 5471 | name is made by appending \fI.dse\fR to the source file name. |
| 5472 | .IP "\fBphiopt\fR" 4 |
| 5473 | .IX Item "phiopt" |
| 5474 | Dump each function after optimizing \s-1PHI\s0 nodes into straightline code. The file |
| 5475 | name is made by appending \fI.phiopt\fR to the source file name. |
| 5476 | .IP "\fBforwprop\fR" 4 |
| 5477 | .IX Item "forwprop" |
| 5478 | Dump each function after forward propagating single use variables. The file |
| 5479 | name is made by appending \fI.forwprop\fR to the source file name. |
| 5480 | .IP "\fBcopyrename\fR" 4 |
| 5481 | .IX Item "copyrename" |
| 5482 | Dump each function after applying the copy rename optimization. The file |
| 5483 | name is made by appending \fI.copyrename\fR to the source file name. |
| 5484 | .IP "\fBnrv\fR" 4 |
| 5485 | .IX Item "nrv" |
| 5486 | Dump each function after applying the named return value optimization on |
| 5487 | generic trees. The file name is made by appending \fI.nrv\fR to the source |
| 5488 | file name. |
| 5489 | .IP "\fBvect\fR" 4 |
| 5490 | .IX Item "vect" |
| 5491 | Dump each function after applying vectorization of loops. The file name is |
| 5492 | made by appending \fI.vect\fR to the source file name. |
| 5493 | .IP "\fBslp\fR" 4 |
| 5494 | .IX Item "slp" |
| 5495 | Dump each function after applying vectorization of basic blocks. The file name |
| 5496 | is made by appending \fI.slp\fR to the source file name. |
| 5497 | .IP "\fBvrp\fR" 4 |
| 5498 | .IX Item "vrp" |
| 5499 | Dump each function after Value Range Propagation (\s-1VRP\s0). The file name |
| 5500 | is made by appending \fI.vrp\fR to the source file name. |
| 5501 | .IP "\fBall\fR" 4 |
| 5502 | .IX Item "all" |
| 5503 | Enable all the available tree dumps with the flags provided in this option. |
| 5504 | .RE |
| 5505 | .RS 4 |
| 5506 | .RE |
| 5507 | .IP "\fB\-fopt\-info\fR" 4 |
| 5508 | .IX Item "-fopt-info" |
| 5509 | .PD 0 |
| 5510 | .IP "\fB\-fopt\-info\-\fR\fIoptions\fR" 4 |
| 5511 | .IX Item "-fopt-info-options" |
| 5512 | .IP "\fB\-fopt\-info\-\fR\fIoptions\fR\fB=\fR\fIfilename\fR" 4 |
| 5513 | .IX Item "-fopt-info-options=filename" |
| 5514 | .PD |
| 5515 | Controls optimization dumps from various optimization passes. If the |
| 5516 | \&\fB\-\fR\fIoptions\fR form is used, \fIoptions\fR is a list of |
| 5517 | \&\fB\-\fR separated options to select the dump details and |
| 5518 | optimizations. If \fIoptions\fR is not specified, it defaults to |
| 5519 | \&\fBall\fR for details and \fBoptall\fR for optimization |
| 5520 | groups. If the \fIfilename\fR is not specified, it defaults to |
| 5521 | \&\fIstderr\fR. Note that the output \fIfilename\fR will be overwritten |
| 5522 | in case of multiple translation units. If a combined output from |
| 5523 | multiple translation units is desired, \fIstderr\fR should be used |
| 5524 | instead. |
| 5525 | .Sp |
| 5526 | The options can be divided into two groups, 1) options describing the |
| 5527 | verbosity of the dump, and 2) options describing which optimizations |
| 5528 | should be included. The options from both the groups can be freely |
| 5529 | mixed as they are non-overlapping. However, in case of any conflicts, |
| 5530 | the latter options override the earlier options on the command |
| 5531 | line. Though multiple \-fopt\-info options are accepted, only one of |
| 5532 | them can have \fB=filename\fR. If other filenames are provided then |
| 5533 | all but the first one are ignored. |
| 5534 | .Sp |
| 5535 | The dump verbosity has the following options |
| 5536 | .RS 4 |
| 5537 | .IP "\fBoptimized\fR" 4 |
| 5538 | .IX Item "optimized" |
| 5539 | Print information when an optimization is successfully applied. It is |
| 5540 | up to a pass to decide which information is relevant. For example, the |
| 5541 | vectorizer passes print the source location of loops which got |
| 5542 | successfully vectorized. |
| 5543 | .IP "\fBmissed\fR" 4 |
| 5544 | .IX Item "missed" |
| 5545 | Print information about missed optimizations. Individual passes |
| 5546 | control which information to include in the output. For example, |
| 5547 | .Sp |
| 5548 | .Vb 1 |
| 5549 | \& gcc \-O2 \-ftree\-vectorize \-fopt\-info\-vec\-missed |
| 5550 | .Ve |
| 5551 | .Sp |
| 5552 | will print information about missed optimization opportunities from |
| 5553 | vectorization passes on stderr. |
| 5554 | .IP "\fBnote\fR" 4 |
| 5555 | .IX Item "note" |
| 5556 | Print verbose information about optimizations, such as certain |
| 5557 | transformations, more detailed messages about decisions etc. |
| 5558 | .IP "\fBall\fR" 4 |
| 5559 | .IX Item "all" |
| 5560 | Print detailed optimization information. This includes |
| 5561 | \&\fIoptimized\fR, \fImissed\fR, and \fInote\fR. |
| 5562 | .RE |
| 5563 | .RS 4 |
| 5564 | .Sp |
| 5565 | The second set of options describes a group of optimizations and may |
| 5566 | include one or more of the following. |
| 5567 | .IP "\fBipa\fR" 4 |
| 5568 | .IX Item "ipa" |
| 5569 | Enable dumps from all interprocedural optimizations. |
| 5570 | .IP "\fBloop\fR" 4 |
| 5571 | .IX Item "loop" |
| 5572 | Enable dumps from all loop optimizations. |
| 5573 | .IP "\fBinline\fR" 4 |
| 5574 | .IX Item "inline" |
| 5575 | Enable dumps from all inlining optimizations. |
| 5576 | .IP "\fBvec\fR" 4 |
| 5577 | .IX Item "vec" |
| 5578 | Enable dumps from all vectorization optimizations. |
| 5579 | .RE |
| 5580 | .RS 4 |
| 5581 | .Sp |
| 5582 | For example, |
| 5583 | .Sp |
| 5584 | .Vb 1 |
| 5585 | \& gcc \-O3 \-fopt\-info\-missed=missed.all |
| 5586 | .Ve |
| 5587 | .Sp |
| 5588 | outputs missed optimization report from all the passes into |
| 5589 | \&\fImissed.all\fR. |
| 5590 | .Sp |
| 5591 | As another example, |
| 5592 | .Sp |
| 5593 | .Vb 1 |
| 5594 | \& gcc \-O3 \-fopt\-info\-inline\-optimized\-missed=inline.txt |
| 5595 | .Ve |
| 5596 | .Sp |
| 5597 | will output information about missed optimizations as well as |
| 5598 | optimized locations from all the inlining passes into |
| 5599 | \&\fIinline.txt\fR. |
| 5600 | .Sp |
| 5601 | If the \fIfilename\fR is provided, then the dumps from all the |
| 5602 | applicable optimizations are concatenated into the \fIfilename\fR. |
| 5603 | Otherwise the dump is output onto \fIstderr\fR. If \fIoptions\fR is |
| 5604 | omitted, it defaults to \fBall-optall\fR, which means dump all |
| 5605 | available optimization info from all the passes. In the following |
| 5606 | example, all optimization info is output on to \fIstderr\fR. |
| 5607 | .Sp |
| 5608 | .Vb 1 |
| 5609 | \& gcc \-O3 \-fopt\-info |
| 5610 | .Ve |
| 5611 | .Sp |
| 5612 | Note that \fB\-fopt\-info\-vec\-missed\fR behaves the same as |
| 5613 | \&\fB\-fopt\-info\-missed\-vec\fR. |
| 5614 | .Sp |
| 5615 | As another example, consider |
| 5616 | .Sp |
| 5617 | .Vb 1 |
| 5618 | \& gcc \-fopt\-info\-vec\-missed=vec.miss \-fopt\-info\-loop\-optimized=loop.opt |
| 5619 | .Ve |
| 5620 | .Sp |
| 5621 | Here the two output filenames \fIvec.miss\fR and \fIloop.opt\fR are |
| 5622 | in conflict since only one output file is allowed. In this case, only |
| 5623 | the first option takes effect and the subsequent options are |
| 5624 | ignored. Thus only the \fIvec.miss\fR is produced which cotaints |
| 5625 | dumps from the vectorizer about missed opportunities. |
| 5626 | .RE |
| 5627 | .IP "\fB\-ftree\-vectorizer\-verbose=\fR\fIn\fR" 4 |
| 5628 | .IX Item "-ftree-vectorizer-verbose=n" |
| 5629 | This option is deprecated and is implemented in terms of |
| 5630 | \&\fB\-fopt\-info\fR. Please use \fB\-fopt\-info\-\fR\fIkind\fR form |
| 5631 | instead, where \fIkind\fR is one of the valid opt-info options. It |
| 5632 | prints additional optimization information. For \fIn\fR=0 no |
| 5633 | diagnostic information is reported. If \fIn\fR=1 the vectorizer |
| 5634 | reports each loop that got vectorized, and the total number of loops |
| 5635 | that got vectorized. If \fIn\fR=2 the vectorizer reports locations |
| 5636 | which could not be vectorized and the reasons for those. For any |
| 5637 | higher verbosity levels all the analysis and transformation |
| 5638 | information from the vectorizer is reported. |
| 5639 | .Sp |
| 5640 | Note that the information output by \fB\-ftree\-vectorizer\-verbose\fR |
| 5641 | option is sent to \fIstderr\fR. If the equivalent form |
| 5642 | \&\fB\-fopt\-info\-\fR\fIoptions\fR\fB=\fR\fIfilename\fR is used then the |
| 5643 | output is sent into \fIfilename\fR instead. |
| 5644 | .IP "\fB\-frandom\-seed=\fR\fIstring\fR" 4 |
| 5645 | .IX Item "-frandom-seed=string" |
| 5646 | This option provides a seed that \s-1GCC\s0 uses in place of |
| 5647 | random numbers in generating certain symbol names |
| 5648 | that have to be different in every compiled file. It is also used to |
| 5649 | place unique stamps in coverage data files and the object files that |
| 5650 | produce them. You can use the \fB\-frandom\-seed\fR option to produce |
| 5651 | reproducibly identical object files. |
| 5652 | .Sp |
| 5653 | The \fIstring\fR should be different for every file you compile. |
| 5654 | .IP "\fB\-fsched\-verbose=\fR\fIn\fR" 4 |
| 5655 | .IX Item "-fsched-verbose=n" |
| 5656 | On targets that use instruction scheduling, this option controls the |
| 5657 | amount of debugging output the scheduler prints. This information is |
| 5658 | written to standard error, unless \fB\-fdump\-rtl\-sched1\fR or |
| 5659 | \&\fB\-fdump\-rtl\-sched2\fR is specified, in which case it is output |
| 5660 | to the usual dump listing file, \fI.sched1\fR or \fI.sched2\fR |
| 5661 | respectively. However for \fIn\fR greater than nine, the output is |
| 5662 | always printed to standard error. |
| 5663 | .Sp |
| 5664 | For \fIn\fR greater than zero, \fB\-fsched\-verbose\fR outputs the |
| 5665 | same information as \fB\-fdump\-rtl\-sched1\fR and \fB\-fdump\-rtl\-sched2\fR. |
| 5666 | For \fIn\fR greater than one, it also output basic block probabilities, |
| 5667 | detailed ready list information and unit/insn info. For \fIn\fR greater |
| 5668 | than two, it includes \s-1RTL\s0 at abort point, control-flow and regions info. |
| 5669 | And for \fIn\fR over four, \fB\-fsched\-verbose\fR also includes |
| 5670 | dependence info. |
| 5671 | .IP "\fB\-save\-temps\fR" 4 |
| 5672 | .IX Item "-save-temps" |
| 5673 | .PD 0 |
| 5674 | .IP "\fB\-save\-temps=cwd\fR" 4 |
| 5675 | .IX Item "-save-temps=cwd" |
| 5676 | .PD |
| 5677 | Store the usual \*(L"temporary\*(R" intermediate files permanently; place them |
| 5678 | in the current directory and name them based on the source file. Thus, |
| 5679 | compiling \fIfoo.c\fR with \fB\-c \-save\-temps\fR produces files |
| 5680 | \&\fIfoo.i\fR and \fIfoo.s\fR, as well as \fIfoo.o\fR. This creates a |
| 5681 | preprocessed \fIfoo.i\fR output file even though the compiler now |
| 5682 | normally uses an integrated preprocessor. |
| 5683 | .Sp |
| 5684 | When used in combination with the \fB\-x\fR command-line option, |
| 5685 | \&\fB\-save\-temps\fR is sensible enough to avoid over writing an |
| 5686 | input source file with the same extension as an intermediate file. |
| 5687 | The corresponding intermediate file may be obtained by renaming the |
| 5688 | source file before using \fB\-save\-temps\fR. |
| 5689 | .Sp |
| 5690 | If you invoke \s-1GCC\s0 in parallel, compiling several different source |
| 5691 | files that share a common base name in different subdirectories or the |
| 5692 | same source file compiled for multiple output destinations, it is |
| 5693 | likely that the different parallel compilers will interfere with each |
| 5694 | other, and overwrite the temporary files. For instance: |
| 5695 | .Sp |
| 5696 | .Vb 2 |
| 5697 | \& gcc \-save\-temps \-o outdir1/foo.o indir1/foo.c& |
| 5698 | \& gcc \-save\-temps \-o outdir2/foo.o indir2/foo.c& |
| 5699 | .Ve |
| 5700 | .Sp |
| 5701 | may result in \fIfoo.i\fR and \fIfoo.o\fR being written to |
| 5702 | simultaneously by both compilers. |
| 5703 | .IP "\fB\-save\-temps=obj\fR" 4 |
| 5704 | .IX Item "-save-temps=obj" |
| 5705 | Store the usual \*(L"temporary\*(R" intermediate files permanently. If the |
| 5706 | \&\fB\-o\fR option is used, the temporary files are based on the |
| 5707 | object file. If the \fB\-o\fR option is not used, the |
| 5708 | \&\fB\-save\-temps=obj\fR switch behaves like \fB\-save\-temps\fR. |
| 5709 | .Sp |
| 5710 | For example: |
| 5711 | .Sp |
| 5712 | .Vb 3 |
| 5713 | \& gcc \-save\-temps=obj \-c foo.c |
| 5714 | \& gcc \-save\-temps=obj \-c bar.c \-o dir/xbar.o |
| 5715 | \& gcc \-save\-temps=obj foobar.c \-o dir2/yfoobar |
| 5716 | .Ve |
| 5717 | .Sp |
| 5718 | creates \fIfoo.i\fR, \fIfoo.s\fR, \fIdir/xbar.i\fR, |
| 5719 | \&\fIdir/xbar.s\fR, \fIdir2/yfoobar.i\fR, \fIdir2/yfoobar.s\fR, and |
| 5720 | \&\fIdir2/yfoobar.o\fR. |
| 5721 | .IP "\fB\-time\fR[\fB=\fR\fIfile\fR]" 4 |
| 5722 | .IX Item "-time[=file]" |
| 5723 | Report the \s-1CPU\s0 time taken by each subprocess in the compilation |
| 5724 | sequence. For C source files, this is the compiler proper and assembler |
| 5725 | (plus the linker if linking is done). |
| 5726 | .Sp |
| 5727 | Without the specification of an output file, the output looks like this: |
| 5728 | .Sp |
| 5729 | .Vb 2 |
| 5730 | \& # cc1 0.12 0.01 |
| 5731 | \& # as 0.00 0.01 |
| 5732 | .Ve |
| 5733 | .Sp |
| 5734 | The first number on each line is the \*(L"user time\*(R", that is time spent |
| 5735 | executing the program itself. The second number is \*(L"system time\*(R", |
| 5736 | time spent executing operating system routines on behalf of the program. |
| 5737 | Both numbers are in seconds. |
| 5738 | .Sp |
| 5739 | With the specification of an output file, the output is appended to the |
| 5740 | named file, and it looks like this: |
| 5741 | .Sp |
| 5742 | .Vb 2 |
| 5743 | \& 0.12 0.01 cc1 <options> |
| 5744 | \& 0.00 0.01 as <options> |
| 5745 | .Ve |
| 5746 | .Sp |
| 5747 | The \*(L"user time\*(R" and the \*(L"system time\*(R" are moved before the program |
| 5748 | name, and the options passed to the program are displayed, so that one |
| 5749 | can later tell what file was being compiled, and with which options. |
| 5750 | .IP "\fB\-fvar\-tracking\fR" 4 |
| 5751 | .IX Item "-fvar-tracking" |
| 5752 | Run variable tracking pass. It computes where variables are stored at each |
| 5753 | position in code. Better debugging information is then generated |
| 5754 | (if the debugging information format supports this information). |
| 5755 | .Sp |
| 5756 | It is enabled by default when compiling with optimization (\fB\-Os\fR, |
| 5757 | \&\fB\-O\fR, \fB\-O2\fR, ...), debugging information (\fB\-g\fR) and |
| 5758 | the debug info format supports it. |
| 5759 | .IP "\fB\-fvar\-tracking\-assignments\fR" 4 |
| 5760 | .IX Item "-fvar-tracking-assignments" |
| 5761 | Annotate assignments to user variables early in the compilation and |
| 5762 | attempt to carry the annotations over throughout the compilation all the |
| 5763 | way to the end, in an attempt to improve debug information while |
| 5764 | optimizing. Use of \fB\-gdwarf\-4\fR is recommended along with it. |
| 5765 | .Sp |
| 5766 | It can be enabled even if var-tracking is disabled, in which case |
| 5767 | annotations are created and maintained, but discarded at the end. |
| 5768 | .IP "\fB\-fvar\-tracking\-assignments\-toggle\fR" 4 |
| 5769 | .IX Item "-fvar-tracking-assignments-toggle" |
| 5770 | Toggle \fB\-fvar\-tracking\-assignments\fR, in the same way that |
| 5771 | \&\fB\-gtoggle\fR toggles \fB\-g\fR. |
| 5772 | .IP "\fB\-print\-file\-name=\fR\fIlibrary\fR" 4 |
| 5773 | .IX Item "-print-file-name=library" |
| 5774 | Print the full absolute name of the library file \fIlibrary\fR that |
| 5775 | would be used when linking\-\-\-and don't do anything else. With this |
| 5776 | option, \s-1GCC\s0 does not compile or link anything; it just prints the |
| 5777 | file name. |
| 5778 | .IP "\fB\-print\-multi\-directory\fR" 4 |
| 5779 | .IX Item "-print-multi-directory" |
| 5780 | Print the directory name corresponding to the multilib selected by any |
| 5781 | other switches present in the command line. This directory is supposed |
| 5782 | to exist in \fB\s-1GCC_EXEC_PREFIX\s0\fR. |
| 5783 | .IP "\fB\-print\-multi\-lib\fR" 4 |
| 5784 | .IX Item "-print-multi-lib" |
| 5785 | Print the mapping from multilib directory names to compiler switches |
| 5786 | that enable them. The directory name is separated from the switches by |
| 5787 | \&\fB;\fR, and each switch starts with an \fB@\fR instead of the |
| 5788 | \&\fB\-\fR, without spaces between multiple switches. This is supposed to |
| 5789 | ease shell processing. |
| 5790 | .IP "\fB\-print\-multi\-os\-directory\fR" 4 |
| 5791 | .IX Item "-print-multi-os-directory" |
| 5792 | Print the path to \s-1OS\s0 libraries for the selected |
| 5793 | multilib, relative to some \fIlib\fR subdirectory. If \s-1OS\s0 libraries are |
| 5794 | present in the \fIlib\fR subdirectory and no multilibs are used, this is |
| 5795 | usually just \fI.\fR, if \s-1OS\s0 libraries are present in \fIlib\fIsuffix\fI\fR |
| 5796 | sibling directories this prints e.g. \fI../lib64\fR, \fI../lib\fR or |
| 5797 | \&\fI../lib32\fR, or if \s-1OS\s0 libraries are present in \fIlib/\fIsubdir\fI\fR |
| 5798 | subdirectories it prints e.g. \fIamd64\fR, \fIsparcv9\fR or \fIev6\fR. |
| 5799 | .IP "\fB\-print\-multiarch\fR" 4 |
| 5800 | .IX Item "-print-multiarch" |
| 5801 | Print the path to \s-1OS\s0 libraries for the selected multiarch, |
| 5802 | relative to some \fIlib\fR subdirectory. |
| 5803 | .IP "\fB\-print\-prog\-name=\fR\fIprogram\fR" 4 |
| 5804 | .IX Item "-print-prog-name=program" |
| 5805 | Like \fB\-print\-file\-name\fR, but searches for a program such as \fBcpp\fR. |
| 5806 | .IP "\fB\-print\-libgcc\-file\-name\fR" 4 |
| 5807 | .IX Item "-print-libgcc-file-name" |
| 5808 | Same as \fB\-print\-file\-name=libgcc.a\fR. |
| 5809 | .Sp |
| 5810 | This is useful when you use \fB\-nostdlib\fR or \fB\-nodefaultlibs\fR |
| 5811 | but you do want to link with \fIlibgcc.a\fR. You can do: |
| 5812 | .Sp |
| 5813 | .Vb 1 |
| 5814 | \& gcc \-nostdlib <files>... \`gcc \-print\-libgcc\-file\-name\` |
| 5815 | .Ve |
| 5816 | .IP "\fB\-print\-search\-dirs\fR" 4 |
| 5817 | .IX Item "-print-search-dirs" |
| 5818 | Print the name of the configured installation directory and a list of |
| 5819 | program and library directories \fBgcc\fR searches\-\-\-and don't do anything else. |
| 5820 | .Sp |
| 5821 | This is useful when \fBgcc\fR prints the error message |
| 5822 | \&\fBinstallation problem, cannot exec cpp0: No such file or directory\fR. |
| 5823 | To resolve this you either need to put \fIcpp0\fR and the other compiler |
| 5824 | components where \fBgcc\fR expects to find them, or you can set the environment |
| 5825 | variable \fB\s-1GCC_EXEC_PREFIX\s0\fR to the directory where you installed them. |
| 5826 | Don't forget the trailing \fB/\fR. |
| 5827 | .IP "\fB\-print\-sysroot\fR" 4 |
| 5828 | .IX Item "-print-sysroot" |
| 5829 | Print the target sysroot directory that is used during |
| 5830 | compilation. This is the target sysroot specified either at configure |
| 5831 | time or using the \fB\-\-sysroot\fR option, possibly with an extra |
| 5832 | suffix that depends on compilation options. If no target sysroot is |
| 5833 | specified, the option prints nothing. |
| 5834 | .IP "\fB\-print\-sysroot\-headers\-suffix\fR" 4 |
| 5835 | .IX Item "-print-sysroot-headers-suffix" |
| 5836 | Print the suffix added to the target sysroot when searching for |
| 5837 | headers, or give an error if the compiler is not configured with such |
| 5838 | a suffix\-\-\-and don't do anything else. |
| 5839 | .IP "\fB\-dumpmachine\fR" 4 |
| 5840 | .IX Item "-dumpmachine" |
| 5841 | Print the compiler's target machine (for example, |
| 5842 | \&\fBi686\-pc\-linux\-gnu\fR)\-\-\-and don't do anything else. |
| 5843 | .IP "\fB\-dumpversion\fR" 4 |
| 5844 | .IX Item "-dumpversion" |
| 5845 | Print the compiler version (for example, \fB3.0\fR)\-\-\-and don't do |
| 5846 | anything else. |
| 5847 | .IP "\fB\-dumpspecs\fR" 4 |
| 5848 | .IX Item "-dumpspecs" |
| 5849 | Print the compiler's built-in specs\-\-\-and don't do anything else. (This |
| 5850 | is used when \s-1GCC\s0 itself is being built.) |
| 5851 | .IP "\fB\-fno\-eliminate\-unused\-debug\-types\fR" 4 |
| 5852 | .IX Item "-fno-eliminate-unused-debug-types" |
| 5853 | Normally, when producing \s-1DWARF\s0 2 output, \s-1GCC\s0 avoids producing debug symbol |
| 5854 | output for types that are nowhere used in the source file being compiled. |
| 5855 | Sometimes it is useful to have \s-1GCC\s0 emit debugging |
| 5856 | information for all types declared in a compilation |
| 5857 | unit, regardless of whether or not they are actually used |
| 5858 | in that compilation unit, for example |
| 5859 | if, in the debugger, you want to cast a value to a type that is |
| 5860 | not actually used in your program (but is declared). More often, |
| 5861 | however, this results in a significant amount of wasted space. |
| 5862 | .SS "Options That Control Optimization" |
| 5863 | .IX Subsection "Options That Control Optimization" |
| 5864 | These options control various sorts of optimizations. |
| 5865 | .PP |
| 5866 | Without any optimization option, the compiler's goal is to reduce the |
| 5867 | cost of compilation and to make debugging produce the expected |
| 5868 | results. Statements are independent: if you stop the program with a |
| 5869 | breakpoint between statements, you can then assign a new value to any |
| 5870 | variable or change the program counter to any other statement in the |
| 5871 | function and get exactly the results you expect from the source |
| 5872 | code. |
| 5873 | .PP |
| 5874 | Turning on optimization flags makes the compiler attempt to improve |
| 5875 | the performance and/or code size at the expense of compilation time |
| 5876 | and possibly the ability to debug the program. |
| 5877 | .PP |
| 5878 | The compiler performs optimization based on the knowledge it has of the |
| 5879 | program. Compiling multiple files at once to a single output file mode allows |
| 5880 | the compiler to use information gained from all of the files when compiling |
| 5881 | each of them. |
| 5882 | .PP |
| 5883 | Not all optimizations are controlled directly by a flag. Only |
| 5884 | optimizations that have a flag are listed in this section. |
| 5885 | .PP |
| 5886 | Most optimizations are only enabled if an \fB\-O\fR level is set on |
| 5887 | the command line. Otherwise they are disabled, even if individual |
| 5888 | optimization flags are specified. |
| 5889 | .PP |
| 5890 | Depending on the target and how \s-1GCC\s0 was configured, a slightly different |
| 5891 | set of optimizations may be enabled at each \fB\-O\fR level than |
| 5892 | those listed here. You can invoke \s-1GCC\s0 with \fB\-Q \-\-help=optimizers\fR |
| 5893 | to find out the exact set of optimizations that are enabled at each level. |
| 5894 | .IP "\fB\-O\fR" 4 |
| 5895 | .IX Item "-O" |
| 5896 | .PD 0 |
| 5897 | .IP "\fB\-O1\fR" 4 |
| 5898 | .IX Item "-O1" |
| 5899 | .PD |
| 5900 | Optimize. Optimizing compilation takes somewhat more time, and a lot |
| 5901 | more memory for a large function. |
| 5902 | .Sp |
| 5903 | With \fB\-O\fR, the compiler tries to reduce code size and execution |
| 5904 | time, without performing any optimizations that take a great deal of |
| 5905 | compilation time. |
| 5906 | .Sp |
| 5907 | \&\fB\-O\fR turns on the following optimization flags: |
| 5908 | .Sp |
| 5909 | \&\fB\-fauto\-inc\-dec |
| 5910 | \&\-fcompare\-elim |
| 5911 | \&\-fcprop\-registers |
| 5912 | \&\-fdce |
| 5913 | \&\-fdefer\-pop |
| 5914 | \&\-fdelayed\-branch |
| 5915 | \&\-fdse |
| 5916 | \&\-fguess\-branch\-probability |
| 5917 | \&\-fif\-conversion2 |
| 5918 | \&\-fif\-conversion |
| 5919 | \&\-fipa\-pure\-const |
| 5920 | \&\-fipa\-profile |
| 5921 | \&\-fipa\-reference |
| 5922 | \&\-fmerge\-constants |
| 5923 | \&\-fsplit\-wide\-types |
| 5924 | \&\-ftree\-bit\-ccp |
| 5925 | \&\-ftree\-builtin\-call\-dce |
| 5926 | \&\-ftree\-ccp |
| 5927 | \&\-ftree\-ch |
| 5928 | \&\-ftree\-copyrename |
| 5929 | \&\-ftree\-dce |
| 5930 | \&\-ftree\-dominator\-opts |
| 5931 | \&\-ftree\-dse |
| 5932 | \&\-ftree\-forwprop |
| 5933 | \&\-ftree\-fre |
| 5934 | \&\-ftree\-phiprop |
| 5935 | \&\-ftree\-slsr |
| 5936 | \&\-ftree\-sra |
| 5937 | \&\-ftree\-pta |
| 5938 | \&\-ftree\-ter |
| 5939 | \&\-funit\-at\-a\-time\fR |
| 5940 | .Sp |
| 5941 | \&\fB\-O\fR also turns on \fB\-fomit\-frame\-pointer\fR on machines |
| 5942 | where doing so does not interfere with debugging. |
| 5943 | .IP "\fB\-O2\fR" 4 |
| 5944 | .IX Item "-O2" |
| 5945 | Optimize even more. \s-1GCC\s0 performs nearly all supported optimizations |
| 5946 | that do not involve a space-speed tradeoff. |
| 5947 | As compared to \fB\-O\fR, this option increases both compilation time |
| 5948 | and the performance of the generated code. |
| 5949 | .Sp |
| 5950 | \&\fB\-O2\fR turns on all optimization flags specified by \fB\-O\fR. It |
| 5951 | also turns on the following optimization flags: |
| 5952 | \&\fB\-fthread\-jumps |
| 5953 | \&\-falign\-functions \-falign\-jumps |
| 5954 | \&\-falign\-loops \-falign\-labels |
| 5955 | \&\-fcaller\-saves |
| 5956 | \&\-fcrossjumping |
| 5957 | \&\-fcse\-follow\-jumps \-fcse\-skip\-blocks |
| 5958 | \&\-fdelete\-null\-pointer\-checks |
| 5959 | \&\-fdevirtualize |
| 5960 | \&\-fexpensive\-optimizations |
| 5961 | \&\-fgcse \-fgcse\-lm |
| 5962 | \&\-fhoist\-adjacent\-loads |
| 5963 | \&\-finline\-small\-functions |
| 5964 | \&\-findirect\-inlining |
| 5965 | \&\-fipa\-sra |
| 5966 | \&\-foptimize\-sibling\-calls |
| 5967 | \&\-fpartial\-inlining |
| 5968 | \&\-fpeephole2 |
| 5969 | \&\-fregmove |
| 5970 | \&\-freorder\-blocks \-freorder\-functions |
| 5971 | \&\-frerun\-cse\-after\-loop |
| 5972 | \&\-fsched\-interblock \-fsched\-spec |
| 5973 | \&\-fschedule\-insns \-fschedule\-insns2 |
| 5974 | \&\-fstrict\-aliasing \-fstrict\-overflow |
| 5975 | \&\-ftree\-switch\-conversion \-ftree\-tail\-merge |
| 5976 | \&\-ftree\-pre |
| 5977 | \&\-ftree\-vrp\fR |
| 5978 | .Sp |
| 5979 | Please note the warning under \fB\-fgcse\fR about |
| 5980 | invoking \fB\-O2\fR on programs that use computed gotos. |
| 5981 | .IP "\fB\-O3\fR" 4 |
| 5982 | .IX Item "-O3" |
| 5983 | Optimize yet more. \fB\-O3\fR turns on all optimizations specified |
| 5984 | by \fB\-O2\fR and also turns on the \fB\-finline\-functions\fR, |
| 5985 | \&\fB\-funswitch\-loops\fR, \fB\-fpredictive\-commoning\fR, |
| 5986 | \&\fB\-fgcse\-after\-reload\fR, \fB\-ftree\-vectorize\fR, |
| 5987 | \&\fB\-fvect\-cost\-model\fR, |
| 5988 | \&\fB\-ftree\-partial\-pre\fR and \fB\-fipa\-cp\-clone\fR options. |
| 5989 | .IP "\fB\-O0\fR" 4 |
| 5990 | .IX Item "-O0" |
| 5991 | Reduce compilation time and make debugging produce the expected |
| 5992 | results. This is the default. |
| 5993 | .IP "\fB\-Os\fR" 4 |
| 5994 | .IX Item "-Os" |
| 5995 | Optimize for size. \fB\-Os\fR enables all \fB\-O2\fR optimizations that |
| 5996 | do not typically increase code size. It also performs further |
| 5997 | optimizations designed to reduce code size. |
| 5998 | .Sp |
| 5999 | \&\fB\-Os\fR disables the following optimization flags: |
| 6000 | \&\fB\-falign\-functions \-falign\-jumps \-falign\-loops |
| 6001 | \&\-falign\-labels \-freorder\-blocks \-freorder\-blocks\-and\-partition |
| 6002 | \&\-fprefetch\-loop\-arrays \-ftree\-vect\-loop\-version\fR |
| 6003 | .IP "\fB\-Ofast\fR" 4 |
| 6004 | .IX Item "-Ofast" |
| 6005 | Disregard strict standards compliance. \fB\-Ofast\fR enables all |
| 6006 | \&\fB\-O3\fR optimizations. It also enables optimizations that are not |
| 6007 | valid for all standard-compliant programs. |
| 6008 | It turns on \fB\-ffast\-math\fR and the Fortran-specific |
| 6009 | \&\fB\-fno\-protect\-parens\fR and \fB\-fstack\-arrays\fR. |
| 6010 | .IP "\fB\-Og\fR" 4 |
| 6011 | .IX Item "-Og" |
| 6012 | Optimize debugging experience. \fB\-Og\fR enables optimizations |
| 6013 | that do not interfere with debugging. It should be the optimization |
| 6014 | level of choice for the standard edit-compile-debug cycle, offering |
| 6015 | a reasonable level of optimization while maintaining fast compilation |
| 6016 | and a good debugging experience. |
| 6017 | .Sp |
| 6018 | If you use multiple \fB\-O\fR options, with or without level numbers, |
| 6019 | the last such option is the one that is effective. |
| 6020 | .PP |
| 6021 | Options of the form \fB\-f\fR\fIflag\fR specify machine-independent |
| 6022 | flags. Most flags have both positive and negative forms; the negative |
| 6023 | form of \fB\-ffoo\fR is \fB\-fno\-foo\fR. In the table |
| 6024 | below, only one of the forms is listed\-\-\-the one you typically |
| 6025 | use. You can figure out the other form by either removing \fBno\-\fR |
| 6026 | or adding it. |
| 6027 | .PP |
| 6028 | The following options control specific optimizations. They are either |
| 6029 | activated by \fB\-O\fR options or are related to ones that are. You |
| 6030 | can use the following flags in the rare cases when \*(L"fine-tuning\*(R" of |
| 6031 | optimizations to be performed is desired. |
| 6032 | .IP "\fB\-fno\-default\-inline\fR" 4 |
| 6033 | .IX Item "-fno-default-inline" |
| 6034 | Do not make member functions inline by default merely because they are |
| 6035 | defined inside the class scope (\*(C+ only). Otherwise, when you specify |
| 6036 | \&\fB\-O\fR, member functions defined inside class scope are compiled |
| 6037 | inline by default; i.e., you don't need to add \fBinline\fR in front of |
| 6038 | the member function name. |
| 6039 | .IP "\fB\-fno\-defer\-pop\fR" 4 |
| 6040 | .IX Item "-fno-defer-pop" |
| 6041 | Always pop the arguments to each function call as soon as that function |
| 6042 | returns. For machines that must pop arguments after a function call, |
| 6043 | the compiler normally lets arguments accumulate on the stack for several |
| 6044 | function calls and pops them all at once. |
| 6045 | .Sp |
| 6046 | Disabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6047 | .IP "\fB\-fforward\-propagate\fR" 4 |
| 6048 | .IX Item "-fforward-propagate" |
| 6049 | Perform a forward propagation pass on \s-1RTL\s0. The pass tries to combine two |
| 6050 | instructions and checks if the result can be simplified. If loop unrolling |
| 6051 | is active, two passes are performed and the second is scheduled after |
| 6052 | loop unrolling. |
| 6053 | .Sp |
| 6054 | This option is enabled by default at optimization levels \fB\-O\fR, |
| 6055 | \&\fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6056 | .IP "\fB\-ffp\-contract=\fR\fIstyle\fR" 4 |
| 6057 | .IX Item "-ffp-contract=style" |
| 6058 | \&\fB\-ffp\-contract=off\fR disables floating-point expression contraction. |
| 6059 | \&\fB\-ffp\-contract=fast\fR enables floating-point expression contraction |
| 6060 | such as forming of fused multiply-add operations if the target has |
| 6061 | native support for them. |
| 6062 | \&\fB\-ffp\-contract=on\fR enables floating-point expression contraction |
| 6063 | if allowed by the language standard. This is currently not implemented |
| 6064 | and treated equal to \fB\-ffp\-contract=off\fR. |
| 6065 | .Sp |
| 6066 | The default is \fB\-ffp\-contract=fast\fR. |
| 6067 | .IP "\fB\-fomit\-frame\-pointer\fR" 4 |
| 6068 | .IX Item "-fomit-frame-pointer" |
| 6069 | Don't keep the frame pointer in a register for functions that |
| 6070 | don't need one. This avoids the instructions to save, set up and |
| 6071 | restore frame pointers; it also makes an extra register available |
| 6072 | in many functions. \fBIt also makes debugging impossible on |
| 6073 | some machines.\fR |
| 6074 | .Sp |
| 6075 | On some machines, such as the \s-1VAX\s0, this flag has no effect, because |
| 6076 | the standard calling sequence automatically handles the frame pointer |
| 6077 | and nothing is saved by pretending it doesn't exist. The |
| 6078 | machine-description macro \f(CW\*(C`FRAME_POINTER_REQUIRED\*(C'\fR controls |
| 6079 | whether a target machine supports this flag. |
| 6080 | .Sp |
| 6081 | Starting with \s-1GCC\s0 version 4.6, the default setting (when not optimizing for |
| 6082 | size) for 32\-bit GNU/Linux x86 and 32\-bit Darwin x86 targets has been changed to |
| 6083 | \&\fB\-fomit\-frame\-pointer\fR. The default can be reverted to |
| 6084 | \&\fB\-fno\-omit\-frame\-pointer\fR by configuring \s-1GCC\s0 with the |
| 6085 | \&\fB\-\-enable\-frame\-pointer\fR configure option. |
| 6086 | .Sp |
| 6087 | Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6088 | .IP "\fB\-foptimize\-sibling\-calls\fR" 4 |
| 6089 | .IX Item "-foptimize-sibling-calls" |
| 6090 | Optimize sibling and tail recursive calls. |
| 6091 | .Sp |
| 6092 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6093 | .IP "\fB\-fno\-inline\fR" 4 |
| 6094 | .IX Item "-fno-inline" |
| 6095 | Do not expand any functions inline apart from those marked with |
| 6096 | the \f(CW\*(C`always_inline\*(C'\fR attribute. This is the default when not |
| 6097 | optimizing. |
| 6098 | .Sp |
| 6099 | Single functions can be exempted from inlining by marking them |
| 6100 | with the \f(CW\*(C`noinline\*(C'\fR attribute. |
| 6101 | .IP "\fB\-finline\-small\-functions\fR" 4 |
| 6102 | .IX Item "-finline-small-functions" |
| 6103 | Integrate functions into their callers when their body is smaller than expected |
| 6104 | function call code (so overall size of program gets smaller). The compiler |
| 6105 | heuristically decides which functions are simple enough to be worth integrating |
| 6106 | in this way. This inlining applies to all functions, even those not declared |
| 6107 | inline. |
| 6108 | .Sp |
| 6109 | Enabled at level \fB\-O2\fR. |
| 6110 | .IP "\fB\-findirect\-inlining\fR" 4 |
| 6111 | .IX Item "-findirect-inlining" |
| 6112 | Inline also indirect calls that are discovered to be known at compile |
| 6113 | time thanks to previous inlining. This option has any effect only |
| 6114 | when inlining itself is turned on by the \fB\-finline\-functions\fR |
| 6115 | or \fB\-finline\-small\-functions\fR options. |
| 6116 | .Sp |
| 6117 | Enabled at level \fB\-O2\fR. |
| 6118 | .IP "\fB\-finline\-functions\fR" 4 |
| 6119 | .IX Item "-finline-functions" |
| 6120 | Consider all functions for inlining, even if they are not declared inline. |
| 6121 | The compiler heuristically decides which functions are worth integrating |
| 6122 | in this way. |
| 6123 | .Sp |
| 6124 | If all calls to a given function are integrated, and the function is |
| 6125 | declared \f(CW\*(C`static\*(C'\fR, then the function is normally not output as |
| 6126 | assembler code in its own right. |
| 6127 | .Sp |
| 6128 | Enabled at level \fB\-O3\fR. |
| 6129 | .IP "\fB\-finline\-functions\-called\-once\fR" 4 |
| 6130 | .IX Item "-finline-functions-called-once" |
| 6131 | Consider all \f(CW\*(C`static\*(C'\fR functions called once for inlining into their |
| 6132 | caller even if they are not marked \f(CW\*(C`inline\*(C'\fR. If a call to a given |
| 6133 | function is integrated, then the function is not output as assembler code |
| 6134 | in its own right. |
| 6135 | .Sp |
| 6136 | Enabled at levels \fB\-O1\fR, \fB\-O2\fR, \fB\-O3\fR and \fB\-Os\fR. |
| 6137 | .IP "\fB\-fearly\-inlining\fR" 4 |
| 6138 | .IX Item "-fearly-inlining" |
| 6139 | Inline functions marked by \f(CW\*(C`always_inline\*(C'\fR and functions whose body seems |
| 6140 | smaller than the function call overhead early before doing |
| 6141 | \&\fB\-fprofile\-generate\fR instrumentation and real inlining pass. Doing so |
| 6142 | makes profiling significantly cheaper and usually inlining faster on programs |
| 6143 | having large chains of nested wrapper functions. |
| 6144 | .Sp |
| 6145 | Enabled by default. |
| 6146 | .IP "\fB\-fipa\-sra\fR" 4 |
| 6147 | .IX Item "-fipa-sra" |
| 6148 | Perform interprocedural scalar replacement of aggregates, removal of |
| 6149 | unused parameters and replacement of parameters passed by reference |
| 6150 | by parameters passed by value. |
| 6151 | .Sp |
| 6152 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR and \fB\-Os\fR. |
| 6153 | .IP "\fB\-finline\-limit=\fR\fIn\fR" 4 |
| 6154 | .IX Item "-finline-limit=n" |
| 6155 | By default, \s-1GCC\s0 limits the size of functions that can be inlined. This flag |
| 6156 | allows coarse control of this limit. \fIn\fR is the size of functions that |
| 6157 | can be inlined in number of pseudo instructions. |
| 6158 | .Sp |
| 6159 | Inlining is actually controlled by a number of parameters, which may be |
| 6160 | specified individually by using \fB\-\-param\fR \fIname\fR\fB=\fR\fIvalue\fR. |
| 6161 | The \fB\-finline\-limit=\fR\fIn\fR option sets some of these parameters |
| 6162 | as follows: |
| 6163 | .RS 4 |
| 6164 | .IP "\fBmax-inline-insns-single\fR" 4 |
| 6165 | .IX Item "max-inline-insns-single" |
| 6166 | is set to \fIn\fR/2. |
| 6167 | .IP "\fBmax-inline-insns-auto\fR" 4 |
| 6168 | .IX Item "max-inline-insns-auto" |
| 6169 | is set to \fIn\fR/2. |
| 6170 | .RE |
| 6171 | .RS 4 |
| 6172 | .Sp |
| 6173 | See below for a documentation of the individual |
| 6174 | parameters controlling inlining and for the defaults of these parameters. |
| 6175 | .Sp |
| 6176 | \&\fINote:\fR there may be no value to \fB\-finline\-limit\fR that results |
| 6177 | in default behavior. |
| 6178 | .Sp |
| 6179 | \&\fINote:\fR pseudo instruction represents, in this particular context, an |
| 6180 | abstract measurement of function's size. In no way does it represent a count |
| 6181 | of assembly instructions and as such its exact meaning might change from one |
| 6182 | release to an another. |
| 6183 | .RE |
| 6184 | .IP "\fB\-fno\-keep\-inline\-dllexport\fR" 4 |
| 6185 | .IX Item "-fno-keep-inline-dllexport" |
| 6186 | This is a more fine-grained version of \fB\-fkeep\-inline\-functions\fR, |
| 6187 | which applies only to functions that are declared using the \f(CW\*(C`dllexport\*(C'\fR |
| 6188 | attribute or declspec |
| 6189 | .IP "\fB\-fkeep\-inline\-functions\fR" 4 |
| 6190 | .IX Item "-fkeep-inline-functions" |
| 6191 | In C, emit \f(CW\*(C`static\*(C'\fR functions that are declared \f(CW\*(C`inline\*(C'\fR |
| 6192 | into the object file, even if the function has been inlined into all |
| 6193 | of its callers. This switch does not affect functions using the |
| 6194 | \&\f(CW\*(C`extern inline\*(C'\fR extension in \s-1GNU\s0 C90. In \*(C+, emit any and all |
| 6195 | inline functions into the object file. |
| 6196 | .IP "\fB\-fkeep\-static\-consts\fR" 4 |
| 6197 | .IX Item "-fkeep-static-consts" |
| 6198 | Emit variables declared \f(CW\*(C`static const\*(C'\fR when optimization isn't turned |
| 6199 | on, even if the variables aren't referenced. |
| 6200 | .Sp |
| 6201 | \&\s-1GCC\s0 enables this option by default. If you want to force the compiler to |
| 6202 | check if a variable is referenced, regardless of whether or not |
| 6203 | optimization is turned on, use the \fB\-fno\-keep\-static\-consts\fR option. |
| 6204 | .IP "\fB\-fmerge\-constants\fR" 4 |
| 6205 | .IX Item "-fmerge-constants" |
| 6206 | Attempt to merge identical constants (string constants and floating-point |
| 6207 | constants) across compilation units. |
| 6208 | .Sp |
| 6209 | This option is the default for optimized compilation if the assembler and |
| 6210 | linker support it. Use \fB\-fno\-merge\-constants\fR to inhibit this |
| 6211 | behavior. |
| 6212 | .Sp |
| 6213 | Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6214 | .IP "\fB\-fmerge\-all\-constants\fR" 4 |
| 6215 | .IX Item "-fmerge-all-constants" |
| 6216 | Attempt to merge identical constants and identical variables. |
| 6217 | .Sp |
| 6218 | This option implies \fB\-fmerge\-constants\fR. In addition to |
| 6219 | \&\fB\-fmerge\-constants\fR this considers e.g. even constant initialized |
| 6220 | arrays or initialized constant variables with integral or floating-point |
| 6221 | types. Languages like C or \*(C+ require each variable, including multiple |
| 6222 | instances of the same variable in recursive calls, to have distinct locations, |
| 6223 | so using this option results in non-conforming |
| 6224 | behavior. |
| 6225 | .IP "\fB\-fmodulo\-sched\fR" 4 |
| 6226 | .IX Item "-fmodulo-sched" |
| 6227 | Perform swing modulo scheduling immediately before the first scheduling |
| 6228 | pass. This pass looks at innermost loops and reorders their |
| 6229 | instructions by overlapping different iterations. |
| 6230 | .IP "\fB\-fmodulo\-sched\-allow\-regmoves\fR" 4 |
| 6231 | .IX Item "-fmodulo-sched-allow-regmoves" |
| 6232 | Perform more aggressive SMS-based modulo scheduling with register moves |
| 6233 | allowed. By setting this flag certain anti-dependences edges are |
| 6234 | deleted, which triggers the generation of reg-moves based on the |
| 6235 | life-range analysis. This option is effective only with |
| 6236 | \&\fB\-fmodulo\-sched\fR enabled. |
| 6237 | .IP "\fB\-fno\-branch\-count\-reg\fR" 4 |
| 6238 | .IX Item "-fno-branch-count-reg" |
| 6239 | Do not use \*(L"decrement and branch\*(R" instructions on a count register, |
| 6240 | but instead generate a sequence of instructions that decrement a |
| 6241 | register, compare it against zero, then branch based upon the result. |
| 6242 | This option is only meaningful on architectures that support such |
| 6243 | instructions, which include x86, PowerPC, \s-1IA\-64\s0 and S/390. |
| 6244 | .Sp |
| 6245 | The default is \fB\-fbranch\-count\-reg\fR. |
| 6246 | .IP "\fB\-fno\-function\-cse\fR" 4 |
| 6247 | .IX Item "-fno-function-cse" |
| 6248 | Do not put function addresses in registers; make each instruction that |
| 6249 | calls a constant function contain the function's address explicitly. |
| 6250 | .Sp |
| 6251 | This option results in less efficient code, but some strange hacks |
| 6252 | that alter the assembler output may be confused by the optimizations |
| 6253 | performed when this option is not used. |
| 6254 | .Sp |
| 6255 | The default is \fB\-ffunction\-cse\fR |
| 6256 | .IP "\fB\-fno\-zero\-initialized\-in\-bss\fR" 4 |
| 6257 | .IX Item "-fno-zero-initialized-in-bss" |
| 6258 | If the target supports a \s-1BSS\s0 section, \s-1GCC\s0 by default puts variables that |
| 6259 | are initialized to zero into \s-1BSS\s0. This can save space in the resulting |
| 6260 | code. |
| 6261 | .Sp |
| 6262 | This option turns off this behavior because some programs explicitly |
| 6263 | rely on variables going to the data section\-\-\-e.g., so that the |
| 6264 | resulting executable can find the beginning of that section and/or make |
| 6265 | assumptions based on that. |
| 6266 | .Sp |
| 6267 | The default is \fB\-fzero\-initialized\-in\-bss\fR. |
| 6268 | .IP "\fB\-fmudflap \-fmudflapth \-fmudflapir\fR" 4 |
| 6269 | .IX Item "-fmudflap -fmudflapth -fmudflapir" |
| 6270 | For front-ends that support it (C and \*(C+), instrument all risky |
| 6271 | pointer/array dereferencing operations, some standard library |
| 6272 | string/heap functions, and some other associated constructs with |
| 6273 | range/validity tests. Modules so instrumented should be immune to |
| 6274 | buffer overflows, invalid heap use, and some other classes of C/\*(C+ |
| 6275 | programming errors. The instrumentation relies on a separate runtime |
| 6276 | library (\fIlibmudflap\fR), which is linked into a program if |
| 6277 | \&\fB\-fmudflap\fR is given at link time. Run-time behavior of the |
| 6278 | instrumented program is controlled by the \fB\s-1MUDFLAP_OPTIONS\s0\fR |
| 6279 | environment variable. See \f(CW\*(C`env MUDFLAP_OPTIONS=\-help a.out\*(C'\fR |
| 6280 | for its options. |
| 6281 | .Sp |
| 6282 | Use \fB\-fmudflapth\fR instead of \fB\-fmudflap\fR to compile and to |
| 6283 | link if your program is multi-threaded. Use \fB\-fmudflapir\fR, in |
| 6284 | addition to \fB\-fmudflap\fR or \fB\-fmudflapth\fR, if |
| 6285 | instrumentation should ignore pointer reads. This produces less |
| 6286 | instrumentation (and therefore faster execution) and still provides |
| 6287 | some protection against outright memory corrupting writes, but allows |
| 6288 | erroneously read data to propagate within a program. |
| 6289 | .IP "\fB\-fthread\-jumps\fR" 4 |
| 6290 | .IX Item "-fthread-jumps" |
| 6291 | Perform optimizations that check to see if a jump branches to a |
| 6292 | location where another comparison subsumed by the first is found. If |
| 6293 | so, the first branch is redirected to either the destination of the |
| 6294 | second branch or a point immediately following it, depending on whether |
| 6295 | the condition is known to be true or false. |
| 6296 | .Sp |
| 6297 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6298 | .IP "\fB\-fsplit\-wide\-types\fR" 4 |
| 6299 | .IX Item "-fsplit-wide-types" |
| 6300 | When using a type that occupies multiple registers, such as \f(CW\*(C`long |
| 6301 | long\*(C'\fR on a 32\-bit system, split the registers apart and allocate them |
| 6302 | independently. This normally generates better code for those types, |
| 6303 | but may make debugging more difficult. |
| 6304 | .Sp |
| 6305 | Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, |
| 6306 | \&\fB\-Os\fR. |
| 6307 | .IP "\fB\-fcse\-follow\-jumps\fR" 4 |
| 6308 | .IX Item "-fcse-follow-jumps" |
| 6309 | In common subexpression elimination (\s-1CSE\s0), scan through jump instructions |
| 6310 | when the target of the jump is not reached by any other path. For |
| 6311 | example, when \s-1CSE\s0 encounters an \f(CW\*(C`if\*(C'\fR statement with an |
| 6312 | \&\f(CW\*(C`else\*(C'\fR clause, \s-1CSE\s0 follows the jump when the condition |
| 6313 | tested is false. |
| 6314 | .Sp |
| 6315 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6316 | .IP "\fB\-fcse\-skip\-blocks\fR" 4 |
| 6317 | .IX Item "-fcse-skip-blocks" |
| 6318 | This is similar to \fB\-fcse\-follow\-jumps\fR, but causes \s-1CSE\s0 to |
| 6319 | follow jumps that conditionally skip over blocks. When \s-1CSE\s0 |
| 6320 | encounters a simple \f(CW\*(C`if\*(C'\fR statement with no else clause, |
| 6321 | \&\fB\-fcse\-skip\-blocks\fR causes \s-1CSE\s0 to follow the jump around the |
| 6322 | body of the \f(CW\*(C`if\*(C'\fR. |
| 6323 | .Sp |
| 6324 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6325 | .IP "\fB\-frerun\-cse\-after\-loop\fR" 4 |
| 6326 | .IX Item "-frerun-cse-after-loop" |
| 6327 | Re-run common subexpression elimination after loop optimizations are |
| 6328 | performed. |
| 6329 | .Sp |
| 6330 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6331 | .IP "\fB\-fgcse\fR" 4 |
| 6332 | .IX Item "-fgcse" |
| 6333 | Perform a global common subexpression elimination pass. |
| 6334 | This pass also performs global constant and copy propagation. |
| 6335 | .Sp |
| 6336 | \&\fINote:\fR When compiling a program using computed gotos, a \s-1GCC\s0 |
| 6337 | extension, you may get better run-time performance if you disable |
| 6338 | the global common subexpression elimination pass by adding |
| 6339 | \&\fB\-fno\-gcse\fR to the command line. |
| 6340 | .Sp |
| 6341 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6342 | .IP "\fB\-fgcse\-lm\fR" 4 |
| 6343 | .IX Item "-fgcse-lm" |
| 6344 | When \fB\-fgcse\-lm\fR is enabled, global common subexpression elimination |
| 6345 | attempts to move loads that are only killed by stores into themselves. This |
| 6346 | allows a loop containing a load/store sequence to be changed to a load outside |
| 6347 | the loop, and a copy/store within the loop. |
| 6348 | .Sp |
| 6349 | Enabled by default when \fB\-fgcse\fR is enabled. |
| 6350 | .IP "\fB\-fgcse\-sm\fR" 4 |
| 6351 | .IX Item "-fgcse-sm" |
| 6352 | When \fB\-fgcse\-sm\fR is enabled, a store motion pass is run after |
| 6353 | global common subexpression elimination. This pass attempts to move |
| 6354 | stores out of loops. When used in conjunction with \fB\-fgcse\-lm\fR, |
| 6355 | loops containing a load/store sequence can be changed to a load before |
| 6356 | the loop and a store after the loop. |
| 6357 | .Sp |
| 6358 | Not enabled at any optimization level. |
| 6359 | .IP "\fB\-fgcse\-las\fR" 4 |
| 6360 | .IX Item "-fgcse-las" |
| 6361 | When \fB\-fgcse\-las\fR is enabled, the global common subexpression |
| 6362 | elimination pass eliminates redundant loads that come after stores to the |
| 6363 | same memory location (both partial and full redundancies). |
| 6364 | .Sp |
| 6365 | Not enabled at any optimization level. |
| 6366 | .IP "\fB\-fgcse\-after\-reload\fR" 4 |
| 6367 | .IX Item "-fgcse-after-reload" |
| 6368 | When \fB\-fgcse\-after\-reload\fR is enabled, a redundant load elimination |
| 6369 | pass is performed after reload. The purpose of this pass is to clean up |
| 6370 | redundant spilling. |
| 6371 | .IP "\fB\-faggressive\-loop\-optimizations\fR" 4 |
| 6372 | .IX Item "-faggressive-loop-optimizations" |
| 6373 | This option tells the loop optimizer to use language constraints to |
| 6374 | derive bounds for the number of iterations of a loop. This assumes that |
| 6375 | loop code does not invoke undefined behavior by for example causing signed |
| 6376 | integer overflows or out-of-bound array accesses. The bounds for the |
| 6377 | number of iterations of a loop are used to guide loop unrolling and peeling |
| 6378 | and loop exit test optimizations. |
| 6379 | This option is enabled by default. |
| 6380 | .IP "\fB\-funsafe\-loop\-optimizations\fR" 4 |
| 6381 | .IX Item "-funsafe-loop-optimizations" |
| 6382 | This option tells the loop optimizer to assume that loop indices do not |
| 6383 | overflow, and that loops with nontrivial exit condition are not |
| 6384 | infinite. This enables a wider range of loop optimizations even if |
| 6385 | the loop optimizer itself cannot prove that these assumptions are valid. |
| 6386 | If you use \fB\-Wunsafe\-loop\-optimizations\fR, the compiler warns you |
| 6387 | if it finds this kind of loop. |
| 6388 | .IP "\fB\-fcrossjumping\fR" 4 |
| 6389 | .IX Item "-fcrossjumping" |
| 6390 | Perform cross-jumping transformation. |
| 6391 | This transformation unifies equivalent code and saves code size. The |
| 6392 | resulting code may or may not perform better than without cross-jumping. |
| 6393 | .Sp |
| 6394 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6395 | .IP "\fB\-fauto\-inc\-dec\fR" 4 |
| 6396 | .IX Item "-fauto-inc-dec" |
| 6397 | Combine increments or decrements of addresses with memory accesses. |
| 6398 | This pass is always skipped on architectures that do not have |
| 6399 | instructions to support this. Enabled by default at \fB\-O\fR and |
| 6400 | higher on architectures that support this. |
| 6401 | .IP "\fB\-fdce\fR" 4 |
| 6402 | .IX Item "-fdce" |
| 6403 | Perform dead code elimination (\s-1DCE\s0) on \s-1RTL\s0. |
| 6404 | Enabled by default at \fB\-O\fR and higher. |
| 6405 | .IP "\fB\-fdse\fR" 4 |
| 6406 | .IX Item "-fdse" |
| 6407 | Perform dead store elimination (\s-1DSE\s0) on \s-1RTL\s0. |
| 6408 | Enabled by default at \fB\-O\fR and higher. |
| 6409 | .IP "\fB\-fif\-conversion\fR" 4 |
| 6410 | .IX Item "-fif-conversion" |
| 6411 | Attempt to transform conditional jumps into branch-less equivalents. This |
| 6412 | includes use of conditional moves, min, max, set flags and abs instructions, and |
| 6413 | some tricks doable by standard arithmetics. The use of conditional execution |
| 6414 | on chips where it is available is controlled by \f(CW\*(C`if\-conversion2\*(C'\fR. |
| 6415 | .Sp |
| 6416 | Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6417 | .IP "\fB\-fif\-conversion2\fR" 4 |
| 6418 | .IX Item "-fif-conversion2" |
| 6419 | Use conditional execution (where available) to transform conditional jumps into |
| 6420 | branch-less equivalents. |
| 6421 | .Sp |
| 6422 | Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6423 | .IP "\fB\-fdelete\-null\-pointer\-checks\fR" 4 |
| 6424 | .IX Item "-fdelete-null-pointer-checks" |
| 6425 | Assume that programs cannot safely dereference null pointers, and that |
| 6426 | no code or data element resides there. This enables simple constant |
| 6427 | folding optimizations at all optimization levels. In addition, other |
| 6428 | optimization passes in \s-1GCC\s0 use this flag to control global dataflow |
| 6429 | analyses that eliminate useless checks for null pointers; these assume |
| 6430 | that if a pointer is checked after it has already been dereferenced, |
| 6431 | it cannot be null. |
| 6432 | .Sp |
| 6433 | Note however that in some environments this assumption is not true. |
| 6434 | Use \fB\-fno\-delete\-null\-pointer\-checks\fR to disable this optimization |
| 6435 | for programs that depend on that behavior. |
| 6436 | .Sp |
| 6437 | Some targets, especially embedded ones, disable this option at all levels. |
| 6438 | Otherwise it is enabled at all levels: \fB\-O0\fR, \fB\-O1\fR, |
| 6439 | \&\fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. Passes that use the information |
| 6440 | are enabled independently at different optimization levels. |
| 6441 | .IP "\fB\-fdevirtualize\fR" 4 |
| 6442 | .IX Item "-fdevirtualize" |
| 6443 | Attempt to convert calls to virtual functions to direct calls. This |
| 6444 | is done both within a procedure and interprocedurally as part of |
| 6445 | indirect inlining (\f(CW\*(C`\-findirect\-inlining\*(C'\fR) and interprocedural constant |
| 6446 | propagation (\fB\-fipa\-cp\fR). |
| 6447 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6448 | .IP "\fB\-fexpensive\-optimizations\fR" 4 |
| 6449 | .IX Item "-fexpensive-optimizations" |
| 6450 | Perform a number of minor optimizations that are relatively expensive. |
| 6451 | .Sp |
| 6452 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6453 | .IP "\fB\-free\fR" 4 |
| 6454 | .IX Item "-free" |
| 6455 | Attempt to remove redundant extension instructions. This is especially |
| 6456 | helpful for the x86\-64 architecture, which implicitly zero-extends in 64\-bit |
| 6457 | registers after writing to their lower 32\-bit half. |
| 6458 | .Sp |
| 6459 | Enabled for x86 at levels \fB\-O2\fR, \fB\-O3\fR. |
| 6460 | .IP "\fB\-foptimize\-register\-move\fR" 4 |
| 6461 | .IX Item "-foptimize-register-move" |
| 6462 | .PD 0 |
| 6463 | .IP "\fB\-fregmove\fR" 4 |
| 6464 | .IX Item "-fregmove" |
| 6465 | .PD |
| 6466 | Attempt to reassign register numbers in move instructions and as |
| 6467 | operands of other simple instructions in order to maximize the amount of |
| 6468 | register tying. This is especially helpful on machines with two-operand |
| 6469 | instructions. |
| 6470 | .Sp |
| 6471 | Note \fB\-fregmove\fR and \fB\-foptimize\-register\-move\fR are the same |
| 6472 | optimization. |
| 6473 | .Sp |
| 6474 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6475 | .IP "\fB\-fira\-algorithm=\fR\fIalgorithm\fR" 4 |
| 6476 | .IX Item "-fira-algorithm=algorithm" |
| 6477 | Use the specified coloring algorithm for the integrated register |
| 6478 | allocator. The \fIalgorithm\fR argument can be \fBpriority\fR, which |
| 6479 | specifies Chow's priority coloring, or \fB\s-1CB\s0\fR, which specifies |
| 6480 | Chaitin-Briggs coloring. Chaitin-Briggs coloring is not implemented |
| 6481 | for all architectures, but for those targets that do support it, it is |
| 6482 | the default because it generates better code. |
| 6483 | .IP "\fB\-fira\-region=\fR\fIregion\fR" 4 |
| 6484 | .IX Item "-fira-region=region" |
| 6485 | Use specified regions for the integrated register allocator. The |
| 6486 | \&\fIregion\fR argument should be one of the following: |
| 6487 | .RS 4 |
| 6488 | .IP "\fBall\fR" 4 |
| 6489 | .IX Item "all" |
| 6490 | Use all loops as register allocation regions. |
| 6491 | This can give the best results for machines with a small and/or |
| 6492 | irregular register set. |
| 6493 | .IP "\fBmixed\fR" 4 |
| 6494 | .IX Item "mixed" |
| 6495 | Use all loops except for loops with small register pressure |
| 6496 | as the regions. This value usually gives |
| 6497 | the best results in most cases and for most architectures, |
| 6498 | and is enabled by default when compiling with optimization for speed |
| 6499 | (\fB\-O\fR, \fB\-O2\fR, ...). |
| 6500 | .IP "\fBone\fR" 4 |
| 6501 | .IX Item "one" |
| 6502 | Use all functions as a single region. |
| 6503 | This typically results in the smallest code size, and is enabled by default for |
| 6504 | \&\fB\-Os\fR or \fB\-O0\fR. |
| 6505 | .RE |
| 6506 | .RS 4 |
| 6507 | .RE |
| 6508 | .IP "\fB\-fira\-hoist\-pressure\fR" 4 |
| 6509 | .IX Item "-fira-hoist-pressure" |
| 6510 | Use \s-1IRA\s0 to evaluate register pressure in the code hoisting pass for |
| 6511 | decisions to hoist expressions. This option usually results in smaller |
| 6512 | code, but it can slow the compiler down. |
| 6513 | .Sp |
| 6514 | This option is enabled at level \fB\-Os\fR for all targets. |
| 6515 | .IP "\fB\-fira\-loop\-pressure\fR" 4 |
| 6516 | .IX Item "-fira-loop-pressure" |
| 6517 | Use \s-1IRA\s0 to evaluate register pressure in loops for decisions to move |
| 6518 | loop invariants. This option usually results in generation |
| 6519 | of faster and smaller code on machines with large register files (>= 32 |
| 6520 | registers), but it can slow the compiler down. |
| 6521 | .Sp |
| 6522 | This option is enabled at level \fB\-O3\fR for some targets. |
| 6523 | .IP "\fB\-fno\-ira\-share\-save\-slots\fR" 4 |
| 6524 | .IX Item "-fno-ira-share-save-slots" |
| 6525 | Disable sharing of stack slots used for saving call-used hard |
| 6526 | registers living through a call. Each hard register gets a |
| 6527 | separate stack slot, and as a result function stack frames are |
| 6528 | larger. |
| 6529 | .IP "\fB\-fno\-ira\-share\-spill\-slots\fR" 4 |
| 6530 | .IX Item "-fno-ira-share-spill-slots" |
| 6531 | Disable sharing of stack slots allocated for pseudo-registers. Each |
| 6532 | pseudo-register that does not get a hard register gets a separate |
| 6533 | stack slot, and as a result function stack frames are larger. |
| 6534 | .IP "\fB\-fira\-verbose=\fR\fIn\fR" 4 |
| 6535 | .IX Item "-fira-verbose=n" |
| 6536 | Control the verbosity of the dump file for the integrated register allocator. |
| 6537 | The default value is 5. If the value \fIn\fR is greater or equal to 10, |
| 6538 | the dump output is sent to stderr using the same format as \fIn\fR minus 10. |
| 6539 | .IP "\fB\-fdelayed\-branch\fR" 4 |
| 6540 | .IX Item "-fdelayed-branch" |
| 6541 | If supported for the target machine, attempt to reorder instructions |
| 6542 | to exploit instruction slots available after delayed branch |
| 6543 | instructions. |
| 6544 | .Sp |
| 6545 | Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6546 | .IP "\fB\-fschedule\-insns\fR" 4 |
| 6547 | .IX Item "-fschedule-insns" |
| 6548 | If supported for the target machine, attempt to reorder instructions to |
| 6549 | eliminate execution stalls due to required data being unavailable. This |
| 6550 | helps machines that have slow floating point or memory load instructions |
| 6551 | by allowing other instructions to be issued until the result of the load |
| 6552 | or floating-point instruction is required. |
| 6553 | .Sp |
| 6554 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR. |
| 6555 | .IP "\fB\-fschedule\-insns2\fR" 4 |
| 6556 | .IX Item "-fschedule-insns2" |
| 6557 | Similar to \fB\-fschedule\-insns\fR, but requests an additional pass of |
| 6558 | instruction scheduling after register allocation has been done. This is |
| 6559 | especially useful on machines with a relatively small number of |
| 6560 | registers and where memory load instructions take more than one cycle. |
| 6561 | .Sp |
| 6562 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6563 | .IP "\fB\-fno\-sched\-interblock\fR" 4 |
| 6564 | .IX Item "-fno-sched-interblock" |
| 6565 | Don't schedule instructions across basic blocks. This is normally |
| 6566 | enabled by default when scheduling before register allocation, i.e. |
| 6567 | with \fB\-fschedule\-insns\fR or at \fB\-O2\fR or higher. |
| 6568 | .IP "\fB\-fno\-sched\-spec\fR" 4 |
| 6569 | .IX Item "-fno-sched-spec" |
| 6570 | Don't allow speculative motion of non-load instructions. This is normally |
| 6571 | enabled by default when scheduling before register allocation, i.e. |
| 6572 | with \fB\-fschedule\-insns\fR or at \fB\-O2\fR or higher. |
| 6573 | .IP "\fB\-fsched\-pressure\fR" 4 |
| 6574 | .IX Item "-fsched-pressure" |
| 6575 | Enable register pressure sensitive insn scheduling before register |
| 6576 | allocation. This only makes sense when scheduling before register |
| 6577 | allocation is enabled, i.e. with \fB\-fschedule\-insns\fR or at |
| 6578 | \&\fB\-O2\fR or higher. Usage of this option can improve the |
| 6579 | generated code and decrease its size by preventing register pressure |
| 6580 | increase above the number of available hard registers and subsequent |
| 6581 | spills in register allocation. |
| 6582 | .IP "\fB\-fsched\-spec\-load\fR" 4 |
| 6583 | .IX Item "-fsched-spec-load" |
| 6584 | Allow speculative motion of some load instructions. This only makes |
| 6585 | sense when scheduling before register allocation, i.e. with |
| 6586 | \&\fB\-fschedule\-insns\fR or at \fB\-O2\fR or higher. |
| 6587 | .IP "\fB\-fsched\-spec\-load\-dangerous\fR" 4 |
| 6588 | .IX Item "-fsched-spec-load-dangerous" |
| 6589 | Allow speculative motion of more load instructions. This only makes |
| 6590 | sense when scheduling before register allocation, i.e. with |
| 6591 | \&\fB\-fschedule\-insns\fR or at \fB\-O2\fR or higher. |
| 6592 | .IP "\fB\-fsched\-stalled\-insns\fR" 4 |
| 6593 | .IX Item "-fsched-stalled-insns" |
| 6594 | .PD 0 |
| 6595 | .IP "\fB\-fsched\-stalled\-insns=\fR\fIn\fR" 4 |
| 6596 | .IX Item "-fsched-stalled-insns=n" |
| 6597 | .PD |
| 6598 | Define how many insns (if any) can be moved prematurely from the queue |
| 6599 | of stalled insns into the ready list during the second scheduling pass. |
| 6600 | \&\fB\-fno\-sched\-stalled\-insns\fR means that no insns are moved |
| 6601 | prematurely, \fB\-fsched\-stalled\-insns=0\fR means there is no limit |
| 6602 | on how many queued insns can be moved prematurely. |
| 6603 | \&\fB\-fsched\-stalled\-insns\fR without a value is equivalent to |
| 6604 | \&\fB\-fsched\-stalled\-insns=1\fR. |
| 6605 | .IP "\fB\-fsched\-stalled\-insns\-dep\fR" 4 |
| 6606 | .IX Item "-fsched-stalled-insns-dep" |
| 6607 | .PD 0 |
| 6608 | .IP "\fB\-fsched\-stalled\-insns\-dep=\fR\fIn\fR" 4 |
| 6609 | .IX Item "-fsched-stalled-insns-dep=n" |
| 6610 | .PD |
| 6611 | Define how many insn groups (cycles) are examined for a dependency |
| 6612 | on a stalled insn that is a candidate for premature removal from the queue |
| 6613 | of stalled insns. This has an effect only during the second scheduling pass, |
| 6614 | and only if \fB\-fsched\-stalled\-insns\fR is used. |
| 6615 | \&\fB\-fno\-sched\-stalled\-insns\-dep\fR is equivalent to |
| 6616 | \&\fB\-fsched\-stalled\-insns\-dep=0\fR. |
| 6617 | \&\fB\-fsched\-stalled\-insns\-dep\fR without a value is equivalent to |
| 6618 | \&\fB\-fsched\-stalled\-insns\-dep=1\fR. |
| 6619 | .IP "\fB\-fsched2\-use\-superblocks\fR" 4 |
| 6620 | .IX Item "-fsched2-use-superblocks" |
| 6621 | When scheduling after register allocation, use superblock scheduling. |
| 6622 | This allows motion across basic block boundaries, |
| 6623 | resulting in faster schedules. This option is experimental, as not all machine |
| 6624 | descriptions used by \s-1GCC\s0 model the \s-1CPU\s0 closely enough to avoid unreliable |
| 6625 | results from the algorithm. |
| 6626 | .Sp |
| 6627 | This only makes sense when scheduling after register allocation, i.e. with |
| 6628 | \&\fB\-fschedule\-insns2\fR or at \fB\-O2\fR or higher. |
| 6629 | .IP "\fB\-fsched\-group\-heuristic\fR" 4 |
| 6630 | .IX Item "-fsched-group-heuristic" |
| 6631 | Enable the group heuristic in the scheduler. This heuristic favors |
| 6632 | the instruction that belongs to a schedule group. This is enabled |
| 6633 | by default when scheduling is enabled, i.e. with \fB\-fschedule\-insns\fR |
| 6634 | or \fB\-fschedule\-insns2\fR or at \fB\-O2\fR or higher. |
| 6635 | .IP "\fB\-fsched\-critical\-path\-heuristic\fR" 4 |
| 6636 | .IX Item "-fsched-critical-path-heuristic" |
| 6637 | Enable the critical-path heuristic in the scheduler. This heuristic favors |
| 6638 | instructions on the critical path. This is enabled by default when |
| 6639 | scheduling is enabled, i.e. with \fB\-fschedule\-insns\fR |
| 6640 | or \fB\-fschedule\-insns2\fR or at \fB\-O2\fR or higher. |
| 6641 | .IP "\fB\-fsched\-spec\-insn\-heuristic\fR" 4 |
| 6642 | .IX Item "-fsched-spec-insn-heuristic" |
| 6643 | Enable the speculative instruction heuristic in the scheduler. This |
| 6644 | heuristic favors speculative instructions with greater dependency weakness. |
| 6645 | This is enabled by default when scheduling is enabled, i.e. |
| 6646 | with \fB\-fschedule\-insns\fR or \fB\-fschedule\-insns2\fR |
| 6647 | or at \fB\-O2\fR or higher. |
| 6648 | .IP "\fB\-fsched\-rank\-heuristic\fR" 4 |
| 6649 | .IX Item "-fsched-rank-heuristic" |
| 6650 | Enable the rank heuristic in the scheduler. This heuristic favors |
| 6651 | the instruction belonging to a basic block with greater size or frequency. |
| 6652 | This is enabled by default when scheduling is enabled, i.e. |
| 6653 | with \fB\-fschedule\-insns\fR or \fB\-fschedule\-insns2\fR or |
| 6654 | at \fB\-O2\fR or higher. |
| 6655 | .IP "\fB\-fsched\-last\-insn\-heuristic\fR" 4 |
| 6656 | .IX Item "-fsched-last-insn-heuristic" |
| 6657 | Enable the last-instruction heuristic in the scheduler. This heuristic |
| 6658 | favors the instruction that is less dependent on the last instruction |
| 6659 | scheduled. This is enabled by default when scheduling is enabled, |
| 6660 | i.e. with \fB\-fschedule\-insns\fR or \fB\-fschedule\-insns2\fR or |
| 6661 | at \fB\-O2\fR or higher. |
| 6662 | .IP "\fB\-fsched\-dep\-count\-heuristic\fR" 4 |
| 6663 | .IX Item "-fsched-dep-count-heuristic" |
| 6664 | Enable the dependent-count heuristic in the scheduler. This heuristic |
| 6665 | favors the instruction that has more instructions depending on it. |
| 6666 | This is enabled by default when scheduling is enabled, i.e. |
| 6667 | with \fB\-fschedule\-insns\fR or \fB\-fschedule\-insns2\fR or |
| 6668 | at \fB\-O2\fR or higher. |
| 6669 | .IP "\fB\-freschedule\-modulo\-scheduled\-loops\fR" 4 |
| 6670 | .IX Item "-freschedule-modulo-scheduled-loops" |
| 6671 | Modulo scheduling is performed before traditional scheduling. If a loop |
| 6672 | is modulo scheduled, later scheduling passes may change its schedule. |
| 6673 | Use this option to control that behavior. |
| 6674 | .IP "\fB\-fselective\-scheduling\fR" 4 |
| 6675 | .IX Item "-fselective-scheduling" |
| 6676 | Schedule instructions using selective scheduling algorithm. Selective |
| 6677 | scheduling runs instead of the first scheduler pass. |
| 6678 | .IP "\fB\-fselective\-scheduling2\fR" 4 |
| 6679 | .IX Item "-fselective-scheduling2" |
| 6680 | Schedule instructions using selective scheduling algorithm. Selective |
| 6681 | scheduling runs instead of the second scheduler pass. |
| 6682 | .IP "\fB\-fsel\-sched\-pipelining\fR" 4 |
| 6683 | .IX Item "-fsel-sched-pipelining" |
| 6684 | Enable software pipelining of innermost loops during selective scheduling. |
| 6685 | This option has no effect unless one of \fB\-fselective\-scheduling\fR or |
| 6686 | \&\fB\-fselective\-scheduling2\fR is turned on. |
| 6687 | .IP "\fB\-fsel\-sched\-pipelining\-outer\-loops\fR" 4 |
| 6688 | .IX Item "-fsel-sched-pipelining-outer-loops" |
| 6689 | When pipelining loops during selective scheduling, also pipeline outer loops. |
| 6690 | This option has no effect unless \fB\-fsel\-sched\-pipelining\fR is turned on. |
| 6691 | .IP "\fB\-fshrink\-wrap\fR" 4 |
| 6692 | .IX Item "-fshrink-wrap" |
| 6693 | Emit function prologues only before parts of the function that need it, |
| 6694 | rather than at the top of the function. This flag is enabled by default at |
| 6695 | \&\fB\-O\fR and higher. |
| 6696 | .IP "\fB\-fcaller\-saves\fR" 4 |
| 6697 | .IX Item "-fcaller-saves" |
| 6698 | Enable allocation of values to registers that are clobbered by |
| 6699 | function calls, by emitting extra instructions to save and restore the |
| 6700 | registers around such calls. Such allocation is done only when it |
| 6701 | seems to result in better code. |
| 6702 | .Sp |
| 6703 | This option is always enabled by default on certain machines, usually |
| 6704 | those which have no call-preserved registers to use instead. |
| 6705 | .Sp |
| 6706 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 6707 | .IP "\fB\-fcombine\-stack\-adjustments\fR" 4 |
| 6708 | .IX Item "-fcombine-stack-adjustments" |
| 6709 | Tracks stack adjustments (pushes and pops) and stack memory references |
| 6710 | and then tries to find ways to combine them. |
| 6711 | .Sp |
| 6712 | Enabled by default at \fB\-O1\fR and higher. |
| 6713 | .IP "\fB\-fconserve\-stack\fR" 4 |
| 6714 | .IX Item "-fconserve-stack" |
| 6715 | Attempt to minimize stack usage. The compiler attempts to use less |
| 6716 | stack space, even if that makes the program slower. This option |
| 6717 | implies setting the \fBlarge-stack-frame\fR parameter to 100 |
| 6718 | and the \fBlarge-stack-frame-growth\fR parameter to 400. |
| 6719 | .IP "\fB\-ftree\-reassoc\fR" 4 |
| 6720 | .IX Item "-ftree-reassoc" |
| 6721 | Perform reassociation on trees. This flag is enabled by default |
| 6722 | at \fB\-O\fR and higher. |
| 6723 | .IP "\fB\-ftree\-pre\fR" 4 |
| 6724 | .IX Item "-ftree-pre" |
| 6725 | Perform partial redundancy elimination (\s-1PRE\s0) on trees. This flag is |
| 6726 | enabled by default at \fB\-O2\fR and \fB\-O3\fR. |
| 6727 | .IP "\fB\-ftree\-partial\-pre\fR" 4 |
| 6728 | .IX Item "-ftree-partial-pre" |
| 6729 | Make partial redundancy elimination (\s-1PRE\s0) more aggressive. This flag is |
| 6730 | enabled by default at \fB\-O3\fR. |
| 6731 | .IP "\fB\-ftree\-forwprop\fR" 4 |
| 6732 | .IX Item "-ftree-forwprop" |
| 6733 | Perform forward propagation on trees. This flag is enabled by default |
| 6734 | at \fB\-O\fR and higher. |
| 6735 | .IP "\fB\-ftree\-fre\fR" 4 |
| 6736 | .IX Item "-ftree-fre" |
| 6737 | Perform full redundancy elimination (\s-1FRE\s0) on trees. The difference |
| 6738 | between \s-1FRE\s0 and \s-1PRE\s0 is that \s-1FRE\s0 only considers expressions |
| 6739 | that are computed on all paths leading to the redundant computation. |
| 6740 | This analysis is faster than \s-1PRE\s0, though it exposes fewer redundancies. |
| 6741 | This flag is enabled by default at \fB\-O\fR and higher. |
| 6742 | .IP "\fB\-ftree\-phiprop\fR" 4 |
| 6743 | .IX Item "-ftree-phiprop" |
| 6744 | Perform hoisting of loads from conditional pointers on trees. This |
| 6745 | pass is enabled by default at \fB\-O\fR and higher. |
| 6746 | .IP "\fB\-fhoist\-adjacent\-loads\fR" 4 |
| 6747 | .IX Item "-fhoist-adjacent-loads" |
| 6748 | Speculatively hoist loads from both branches of an if-then-else if the |
| 6749 | loads are from adjacent locations in the same structure and the target |
| 6750 | architecture has a conditional move instruction. This flag is enabled |
| 6751 | by default at \fB\-O2\fR and higher. |
| 6752 | .IP "\fB\-ftree\-copy\-prop\fR" 4 |
| 6753 | .IX Item "-ftree-copy-prop" |
| 6754 | Perform copy propagation on trees. This pass eliminates unnecessary |
| 6755 | copy operations. This flag is enabled by default at \fB\-O\fR and |
| 6756 | higher. |
| 6757 | .IP "\fB\-fipa\-pure\-const\fR" 4 |
| 6758 | .IX Item "-fipa-pure-const" |
| 6759 | Discover which functions are pure or constant. |
| 6760 | Enabled by default at \fB\-O\fR and higher. |
| 6761 | .IP "\fB\-fipa\-reference\fR" 4 |
| 6762 | .IX Item "-fipa-reference" |
| 6763 | Discover which static variables do not escape the |
| 6764 | compilation unit. |
| 6765 | Enabled by default at \fB\-O\fR and higher. |
| 6766 | .IP "\fB\-fipa\-pta\fR" 4 |
| 6767 | .IX Item "-fipa-pta" |
| 6768 | Perform interprocedural pointer analysis and interprocedural modification |
| 6769 | and reference analysis. This option can cause excessive memory and |
| 6770 | compile-time usage on large compilation units. It is not enabled by |
| 6771 | default at any optimization level. |
| 6772 | .IP "\fB\-fipa\-profile\fR" 4 |
| 6773 | .IX Item "-fipa-profile" |
| 6774 | Perform interprocedural profile propagation. The functions called only from |
| 6775 | cold functions are marked as cold. Also functions executed once (such as |
| 6776 | \&\f(CW\*(C`cold\*(C'\fR, \f(CW\*(C`noreturn\*(C'\fR, static constructors or destructors) are identified. Cold |
| 6777 | functions and loop less parts of functions executed once are then optimized for |
| 6778 | size. |
| 6779 | Enabled by default at \fB\-O\fR and higher. |
| 6780 | .IP "\fB\-fipa\-cp\fR" 4 |
| 6781 | .IX Item "-fipa-cp" |
| 6782 | Perform interprocedural constant propagation. |
| 6783 | This optimization analyzes the program to determine when values passed |
| 6784 | to functions are constants and then optimizes accordingly. |
| 6785 | This optimization can substantially increase performance |
| 6786 | if the application has constants passed to functions. |
| 6787 | This flag is enabled by default at \fB\-O2\fR, \fB\-Os\fR and \fB\-O3\fR. |
| 6788 | .IP "\fB\-fipa\-cp\-clone\fR" 4 |
| 6789 | .IX Item "-fipa-cp-clone" |
| 6790 | Perform function cloning to make interprocedural constant propagation stronger. |
| 6791 | When enabled, interprocedural constant propagation performs function cloning |
| 6792 | when externally visible function can be called with constant arguments. |
| 6793 | Because this optimization can create multiple copies of functions, |
| 6794 | it may significantly increase code size |
| 6795 | (see \fB\-\-param ipcp\-unit\-growth=\fR\fIvalue\fR). |
| 6796 | This flag is enabled by default at \fB\-O3\fR. |
| 6797 | .IP "\fB\-ftree\-sink\fR" 4 |
| 6798 | .IX Item "-ftree-sink" |
| 6799 | Perform forward store motion on trees. This flag is |
| 6800 | enabled by default at \fB\-O\fR and higher. |
| 6801 | .IP "\fB\-ftree\-bit\-ccp\fR" 4 |
| 6802 | .IX Item "-ftree-bit-ccp" |
| 6803 | Perform sparse conditional bit constant propagation on trees and propagate |
| 6804 | pointer alignment information. |
| 6805 | This pass only operates on local scalar variables and is enabled by default |
| 6806 | at \fB\-O\fR and higher. It requires that \fB\-ftree\-ccp\fR is enabled. |
| 6807 | .IP "\fB\-ftree\-ccp\fR" 4 |
| 6808 | .IX Item "-ftree-ccp" |
| 6809 | Perform sparse conditional constant propagation (\s-1CCP\s0) on trees. This |
| 6810 | pass only operates on local scalar variables and is enabled by default |
| 6811 | at \fB\-O\fR and higher. |
| 6812 | .IP "\fB\-ftree\-switch\-conversion\fR" 4 |
| 6813 | .IX Item "-ftree-switch-conversion" |
| 6814 | Perform conversion of simple initializations in a switch to |
| 6815 | initializations from a scalar array. This flag is enabled by default |
| 6816 | at \fB\-O2\fR and higher. |
| 6817 | .IP "\fB\-ftree\-tail\-merge\fR" 4 |
| 6818 | .IX Item "-ftree-tail-merge" |
| 6819 | Look for identical code sequences. When found, replace one with a jump to the |
| 6820 | other. This optimization is known as tail merging or cross jumping. This flag |
| 6821 | is enabled by default at \fB\-O2\fR and higher. The compilation time |
| 6822 | in this pass can |
| 6823 | be limited using \fBmax-tail-merge-comparisons\fR parameter and |
| 6824 | \&\fBmax-tail-merge-iterations\fR parameter. |
| 6825 | .IP "\fB\-ftree\-dce\fR" 4 |
| 6826 | .IX Item "-ftree-dce" |
| 6827 | Perform dead code elimination (\s-1DCE\s0) on trees. This flag is enabled by |
| 6828 | default at \fB\-O\fR and higher. |
| 6829 | .IP "\fB\-ftree\-builtin\-call\-dce\fR" 4 |
| 6830 | .IX Item "-ftree-builtin-call-dce" |
| 6831 | Perform conditional dead code elimination (\s-1DCE\s0) for calls to built-in functions |
| 6832 | that may set \f(CW\*(C`errno\*(C'\fR but are otherwise side-effect free. This flag is |
| 6833 | enabled by default at \fB\-O2\fR and higher if \fB\-Os\fR is not also |
| 6834 | specified. |
| 6835 | .IP "\fB\-ftree\-dominator\-opts\fR" 4 |
| 6836 | .IX Item "-ftree-dominator-opts" |
| 6837 | Perform a variety of simple scalar cleanups (constant/copy |
| 6838 | propagation, redundancy elimination, range propagation and expression |
| 6839 | simplification) based on a dominator tree traversal. This also |
| 6840 | performs jump threading (to reduce jumps to jumps). This flag is |
| 6841 | enabled by default at \fB\-O\fR and higher. |
| 6842 | .IP "\fB\-ftree\-dse\fR" 4 |
| 6843 | .IX Item "-ftree-dse" |
| 6844 | Perform dead store elimination (\s-1DSE\s0) on trees. A dead store is a store into |
| 6845 | a memory location that is later overwritten by another store without |
| 6846 | any intervening loads. In this case the earlier store can be deleted. This |
| 6847 | flag is enabled by default at \fB\-O\fR and higher. |
| 6848 | .IP "\fB\-ftree\-ch\fR" 4 |
| 6849 | .IX Item "-ftree-ch" |
| 6850 | Perform loop header copying on trees. This is beneficial since it increases |
| 6851 | effectiveness of code motion optimizations. It also saves one jump. This flag |
| 6852 | is enabled by default at \fB\-O\fR and higher. It is not enabled |
| 6853 | for \fB\-Os\fR, since it usually increases code size. |
| 6854 | .IP "\fB\-ftree\-loop\-optimize\fR" 4 |
| 6855 | .IX Item "-ftree-loop-optimize" |
| 6856 | Perform loop optimizations on trees. This flag is enabled by default |
| 6857 | at \fB\-O\fR and higher. |
| 6858 | .IP "\fB\-ftree\-loop\-linear\fR" 4 |
| 6859 | .IX Item "-ftree-loop-linear" |
| 6860 | Perform loop interchange transformations on tree. Same as |
| 6861 | \&\fB\-floop\-interchange\fR. To use this code transformation, \s-1GCC\s0 has |
| 6862 | to be configured with \fB\-\-with\-ppl\fR and \fB\-\-with\-cloog\fR to |
| 6863 | enable the Graphite loop transformation infrastructure. |
| 6864 | .IP "\fB\-floop\-interchange\fR" 4 |
| 6865 | .IX Item "-floop-interchange" |
| 6866 | Perform loop interchange transformations on loops. Interchanging two |
| 6867 | nested loops switches the inner and outer loops. For example, given a |
| 6868 | loop like: |
| 6869 | .Sp |
| 6870 | .Vb 5 |
| 6871 | \& DO J = 1, M |
| 6872 | \& DO I = 1, N |
| 6873 | \& A(J, I) = A(J, I) * C |
| 6874 | \& ENDDO |
| 6875 | \& ENDDO |
| 6876 | .Ve |
| 6877 | .Sp |
| 6878 | loop interchange transforms the loop as if it were written: |
| 6879 | .Sp |
| 6880 | .Vb 5 |
| 6881 | \& DO I = 1, N |
| 6882 | \& DO J = 1, M |
| 6883 | \& A(J, I) = A(J, I) * C |
| 6884 | \& ENDDO |
| 6885 | \& ENDDO |
| 6886 | .Ve |
| 6887 | .Sp |
| 6888 | which can be beneficial when \f(CW\*(C`N\*(C'\fR is larger than the caches, |
| 6889 | because in Fortran, the elements of an array are stored in memory |
| 6890 | contiguously by column, and the original loop iterates over rows, |
| 6891 | potentially creating at each access a cache miss. This optimization |
| 6892 | applies to all the languages supported by \s-1GCC\s0 and is not limited to |
| 6893 | Fortran. To use this code transformation, \s-1GCC\s0 has to be configured |
| 6894 | with \fB\-\-with\-ppl\fR and \fB\-\-with\-cloog\fR to enable the |
| 6895 | Graphite loop transformation infrastructure. |
| 6896 | .IP "\fB\-floop\-strip\-mine\fR" 4 |
| 6897 | .IX Item "-floop-strip-mine" |
| 6898 | Perform loop strip mining transformations on loops. Strip mining |
| 6899 | splits a loop into two nested loops. The outer loop has strides |
| 6900 | equal to the strip size and the inner loop has strides of the |
| 6901 | original loop within a strip. The strip length can be changed |
| 6902 | using the \fBloop-block-tile-size\fR parameter. For example, |
| 6903 | given a loop like: |
| 6904 | .Sp |
| 6905 | .Vb 3 |
| 6906 | \& DO I = 1, N |
| 6907 | \& A(I) = A(I) + C |
| 6908 | \& ENDDO |
| 6909 | .Ve |
| 6910 | .Sp |
| 6911 | loop strip mining transforms the loop as if it were written: |
| 6912 | .Sp |
| 6913 | .Vb 5 |
| 6914 | \& DO II = 1, N, 51 |
| 6915 | \& DO I = II, min (II + 50, N) |
| 6916 | \& A(I) = A(I) + C |
| 6917 | \& ENDDO |
| 6918 | \& ENDDO |
| 6919 | .Ve |
| 6920 | .Sp |
| 6921 | This optimization applies to all the languages supported by \s-1GCC\s0 and is |
| 6922 | not limited to Fortran. To use this code transformation, \s-1GCC\s0 has to |
| 6923 | be configured with \fB\-\-with\-ppl\fR and \fB\-\-with\-cloog\fR to |
| 6924 | enable the Graphite loop transformation infrastructure. |
| 6925 | .IP "\fB\-floop\-block\fR" 4 |
| 6926 | .IX Item "-floop-block" |
| 6927 | Perform loop blocking transformations on loops. Blocking strip mines |
| 6928 | each loop in the loop nest such that the memory accesses of the |
| 6929 | element loops fit inside caches. The strip length can be changed |
| 6930 | using the \fBloop-block-tile-size\fR parameter. For example, given |
| 6931 | a loop like: |
| 6932 | .Sp |
| 6933 | .Vb 5 |
| 6934 | \& DO I = 1, N |
| 6935 | \& DO J = 1, M |
| 6936 | \& A(J, I) = B(I) + C(J) |
| 6937 | \& ENDDO |
| 6938 | \& ENDDO |
| 6939 | .Ve |
| 6940 | .Sp |
| 6941 | loop blocking transforms the loop as if it were written: |
| 6942 | .Sp |
| 6943 | .Vb 9 |
| 6944 | \& DO II = 1, N, 51 |
| 6945 | \& DO JJ = 1, M, 51 |
| 6946 | \& DO I = II, min (II + 50, N) |
| 6947 | \& DO J = JJ, min (JJ + 50, M) |
| 6948 | \& A(J, I) = B(I) + C(J) |
| 6949 | \& ENDDO |
| 6950 | \& ENDDO |
| 6951 | \& ENDDO |
| 6952 | \& ENDDO |
| 6953 | .Ve |
| 6954 | .Sp |
| 6955 | which can be beneficial when \f(CW\*(C`M\*(C'\fR is larger than the caches, |
| 6956 | because the innermost loop iterates over a smaller amount of data |
| 6957 | which can be kept in the caches. This optimization applies to all the |
| 6958 | languages supported by \s-1GCC\s0 and is not limited to Fortran. To use this |
| 6959 | code transformation, \s-1GCC\s0 has to be configured with \fB\-\-with\-ppl\fR |
| 6960 | and \fB\-\-with\-cloog\fR to enable the Graphite loop transformation |
| 6961 | infrastructure. |
| 6962 | .IP "\fB\-fgraphite\-identity\fR" 4 |
| 6963 | .IX Item "-fgraphite-identity" |
| 6964 | Enable the identity transformation for graphite. For every SCoP we generate |
| 6965 | the polyhedral representation and transform it back to gimple. Using |
| 6966 | \&\fB\-fgraphite\-identity\fR we can check the costs or benefits of the |
| 6967 | \&\s-1GIMPLE\s0 \-> \s-1GRAPHITE\s0 \-> \s-1GIMPLE\s0 transformation. Some minimal optimizations |
| 6968 | are also performed by the code generator CLooG, like index splitting and |
| 6969 | dead code elimination in loops. |
| 6970 | .IP "\fB\-floop\-nest\-optimize\fR" 4 |
| 6971 | .IX Item "-floop-nest-optimize" |
| 6972 | Enable the \s-1ISL\s0 based loop nest optimizer. This is a generic loop nest |
| 6973 | optimizer based on the Pluto optimization algorithms. It calculates a loop |
| 6974 | structure optimized for data-locality and parallelism. This option |
| 6975 | is experimental. |
| 6976 | .IP "\fB\-floop\-parallelize\-all\fR" 4 |
| 6977 | .IX Item "-floop-parallelize-all" |
| 6978 | Use the Graphite data dependence analysis to identify loops that can |
| 6979 | be parallelized. Parallelize all the loops that can be analyzed to |
| 6980 | not contain loop carried dependences without checking that it is |
| 6981 | profitable to parallelize the loops. |
| 6982 | .IP "\fB\-fcheck\-data\-deps\fR" 4 |
| 6983 | .IX Item "-fcheck-data-deps" |
| 6984 | Compare the results of several data dependence analyzers. This option |
| 6985 | is used for debugging the data dependence analyzers. |
| 6986 | .IP "\fB\-ftree\-loop\-if\-convert\fR" 4 |
| 6987 | .IX Item "-ftree-loop-if-convert" |
| 6988 | Attempt to transform conditional jumps in the innermost loops to |
| 6989 | branch-less equivalents. The intent is to remove control-flow from |
| 6990 | the innermost loops in order to improve the ability of the |
| 6991 | vectorization pass to handle these loops. This is enabled by default |
| 6992 | if vectorization is enabled. |
| 6993 | .IP "\fB\-ftree\-loop\-if\-convert\-stores\fR" 4 |
| 6994 | .IX Item "-ftree-loop-if-convert-stores" |
| 6995 | Attempt to also if-convert conditional jumps containing memory writes. |
| 6996 | This transformation can be unsafe for multi-threaded programs as it |
| 6997 | transforms conditional memory writes into unconditional memory writes. |
| 6998 | For example, |
| 6999 | .Sp |
| 7000 | .Vb 3 |
| 7001 | \& for (i = 0; i < N; i++) |
| 7002 | \& if (cond) |
| 7003 | \& A[i] = expr; |
| 7004 | .Ve |
| 7005 | .Sp |
| 7006 | is transformed to |
| 7007 | .Sp |
| 7008 | .Vb 2 |
| 7009 | \& for (i = 0; i < N; i++) |
| 7010 | \& A[i] = cond ? expr : A[i]; |
| 7011 | .Ve |
| 7012 | .Sp |
| 7013 | potentially producing data races. |
| 7014 | .IP "\fB\-ftree\-loop\-distribution\fR" 4 |
| 7015 | .IX Item "-ftree-loop-distribution" |
| 7016 | Perform loop distribution. This flag can improve cache performance on |
| 7017 | big loop bodies and allow further loop optimizations, like |
| 7018 | parallelization or vectorization, to take place. For example, the loop |
| 7019 | .Sp |
| 7020 | .Vb 4 |
| 7021 | \& DO I = 1, N |
| 7022 | \& A(I) = B(I) + C |
| 7023 | \& D(I) = E(I) * F |
| 7024 | \& ENDDO |
| 7025 | .Ve |
| 7026 | .Sp |
| 7027 | is transformed to |
| 7028 | .Sp |
| 7029 | .Vb 6 |
| 7030 | \& DO I = 1, N |
| 7031 | \& A(I) = B(I) + C |
| 7032 | \& ENDDO |
| 7033 | \& DO I = 1, N |
| 7034 | \& D(I) = E(I) * F |
| 7035 | \& ENDDO |
| 7036 | .Ve |
| 7037 | .IP "\fB\-ftree\-loop\-distribute\-patterns\fR" 4 |
| 7038 | .IX Item "-ftree-loop-distribute-patterns" |
| 7039 | Perform loop distribution of patterns that can be code generated with |
| 7040 | calls to a library. This flag is enabled by default at \fB\-O3\fR. |
| 7041 | .Sp |
| 7042 | This pass distributes the initialization loops and generates a call to |
| 7043 | memset zero. For example, the loop |
| 7044 | .Sp |
| 7045 | .Vb 4 |
| 7046 | \& DO I = 1, N |
| 7047 | \& A(I) = 0 |
| 7048 | \& B(I) = A(I) + I |
| 7049 | \& ENDDO |
| 7050 | .Ve |
| 7051 | .Sp |
| 7052 | is transformed to |
| 7053 | .Sp |
| 7054 | .Vb 6 |
| 7055 | \& DO I = 1, N |
| 7056 | \& A(I) = 0 |
| 7057 | \& ENDDO |
| 7058 | \& DO I = 1, N |
| 7059 | \& B(I) = A(I) + I |
| 7060 | \& ENDDO |
| 7061 | .Ve |
| 7062 | .Sp |
| 7063 | and the initialization loop is transformed into a call to memset zero. |
| 7064 | .IP "\fB\-ftree\-loop\-im\fR" 4 |
| 7065 | .IX Item "-ftree-loop-im" |
| 7066 | Perform loop invariant motion on trees. This pass moves only invariants that |
| 7067 | are hard to handle at \s-1RTL\s0 level (function calls, operations that expand to |
| 7068 | nontrivial sequences of insns). With \fB\-funswitch\-loops\fR it also moves |
| 7069 | operands of conditions that are invariant out of the loop, so that we can use |
| 7070 | just trivial invariantness analysis in loop unswitching. The pass also includes |
| 7071 | store motion. |
| 7072 | .IP "\fB\-ftree\-loop\-ivcanon\fR" 4 |
| 7073 | .IX Item "-ftree-loop-ivcanon" |
| 7074 | Create a canonical counter for number of iterations in loops for which |
| 7075 | determining number of iterations requires complicated analysis. Later |
| 7076 | optimizations then may determine the number easily. Useful especially |
| 7077 | in connection with unrolling. |
| 7078 | .IP "\fB\-fivopts\fR" 4 |
| 7079 | .IX Item "-fivopts" |
| 7080 | Perform induction variable optimizations (strength reduction, induction |
| 7081 | variable merging and induction variable elimination) on trees. |
| 7082 | .IP "\fB\-ftree\-parallelize\-loops=n\fR" 4 |
| 7083 | .IX Item "-ftree-parallelize-loops=n" |
| 7084 | Parallelize loops, i.e., split their iteration space to run in n threads. |
| 7085 | This is only possible for loops whose iterations are independent |
| 7086 | and can be arbitrarily reordered. The optimization is only |
| 7087 | profitable on multiprocessor machines, for loops that are CPU-intensive, |
| 7088 | rather than constrained e.g. by memory bandwidth. This option |
| 7089 | implies \fB\-pthread\fR, and thus is only supported on targets |
| 7090 | that have support for \fB\-pthread\fR. |
| 7091 | .IP "\fB\-ftree\-pta\fR" 4 |
| 7092 | .IX Item "-ftree-pta" |
| 7093 | Perform function-local points-to analysis on trees. This flag is |
| 7094 | enabled by default at \fB\-O\fR and higher. |
| 7095 | .IP "\fB\-ftree\-sra\fR" 4 |
| 7096 | .IX Item "-ftree-sra" |
| 7097 | Perform scalar replacement of aggregates. This pass replaces structure |
| 7098 | references with scalars to prevent committing structures to memory too |
| 7099 | early. This flag is enabled by default at \fB\-O\fR and higher. |
| 7100 | .IP "\fB\-ftree\-copyrename\fR" 4 |
| 7101 | .IX Item "-ftree-copyrename" |
| 7102 | Perform copy renaming on trees. This pass attempts to rename compiler |
| 7103 | temporaries to other variables at copy locations, usually resulting in |
| 7104 | variable names which more closely resemble the original variables. This flag |
| 7105 | is enabled by default at \fB\-O\fR and higher. |
| 7106 | .IP "\fB\-ftree\-coalesce\-inlined\-vars\fR" 4 |
| 7107 | .IX Item "-ftree-coalesce-inlined-vars" |
| 7108 | Tell the copyrename pass (see \fB\-ftree\-copyrename\fR) to attempt to |
| 7109 | combine small user-defined variables too, but only if they were inlined |
| 7110 | from other functions. It is a more limited form of |
| 7111 | \&\fB\-ftree\-coalesce\-vars\fR. This may harm debug information of such |
| 7112 | inlined variables, but it will keep variables of the inlined-into |
| 7113 | function apart from each other, such that they are more likely to |
| 7114 | contain the expected values in a debugging session. This was the |
| 7115 | default in \s-1GCC\s0 versions older than 4.7. |
| 7116 | .IP "\fB\-ftree\-coalesce\-vars\fR" 4 |
| 7117 | .IX Item "-ftree-coalesce-vars" |
| 7118 | Tell the copyrename pass (see \fB\-ftree\-copyrename\fR) to attempt to |
| 7119 | combine small user-defined variables too, instead of just compiler |
| 7120 | temporaries. This may severely limit the ability to debug an optimized |
| 7121 | program compiled with \fB\-fno\-var\-tracking\-assignments\fR. In the |
| 7122 | negated form, this flag prevents \s-1SSA\s0 coalescing of user variables, |
| 7123 | including inlined ones. This option is enabled by default. |
| 7124 | .IP "\fB\-ftree\-ter\fR" 4 |
| 7125 | .IX Item "-ftree-ter" |
| 7126 | Perform temporary expression replacement during the \s-1SSA\-\s0>normal phase. Single |
| 7127 | use/single def temporaries are replaced at their use location with their |
| 7128 | defining expression. This results in non-GIMPLE code, but gives the expanders |
| 7129 | much more complex trees to work on resulting in better \s-1RTL\s0 generation. This is |
| 7130 | enabled by default at \fB\-O\fR and higher. |
| 7131 | .IP "\fB\-ftree\-slsr\fR" 4 |
| 7132 | .IX Item "-ftree-slsr" |
| 7133 | Perform straight-line strength reduction on trees. This recognizes related |
| 7134 | expressions involving multiplications and replaces them by less expensive |
| 7135 | calculations when possible. This is enabled by default at \fB\-O\fR and |
| 7136 | higher. |
| 7137 | .IP "\fB\-ftree\-vectorize\fR" 4 |
| 7138 | .IX Item "-ftree-vectorize" |
| 7139 | Perform loop vectorization on trees. This flag is enabled by default at |
| 7140 | \&\fB\-O3\fR. |
| 7141 | .IP "\fB\-ftree\-slp\-vectorize\fR" 4 |
| 7142 | .IX Item "-ftree-slp-vectorize" |
| 7143 | Perform basic block vectorization on trees. This flag is enabled by default at |
| 7144 | \&\fB\-O3\fR and when \fB\-ftree\-vectorize\fR is enabled. |
| 7145 | .IP "\fB\-ftree\-vect\-loop\-version\fR" 4 |
| 7146 | .IX Item "-ftree-vect-loop-version" |
| 7147 | Perform loop versioning when doing loop vectorization on trees. When a loop |
| 7148 | appears to be vectorizable except that data alignment or data dependence cannot |
| 7149 | be determined at compile time, then vectorized and non-vectorized versions of |
| 7150 | the loop are generated along with run-time checks for alignment or dependence |
| 7151 | to control which version is executed. This option is enabled by default |
| 7152 | except at level \fB\-Os\fR where it is disabled. |
| 7153 | .IP "\fB\-fvect\-cost\-model\fR" 4 |
| 7154 | .IX Item "-fvect-cost-model" |
| 7155 | Enable cost model for vectorization. This option is enabled by default at |
| 7156 | \&\fB\-O3\fR. |
| 7157 | .IP "\fB\-ftree\-vrp\fR" 4 |
| 7158 | .IX Item "-ftree-vrp" |
| 7159 | Perform Value Range Propagation on trees. This is similar to the |
| 7160 | constant propagation pass, but instead of values, ranges of values are |
| 7161 | propagated. This allows the optimizers to remove unnecessary range |
| 7162 | checks like array bound checks and null pointer checks. This is |
| 7163 | enabled by default at \fB\-O2\fR and higher. Null pointer check |
| 7164 | elimination is only done if \fB\-fdelete\-null\-pointer\-checks\fR is |
| 7165 | enabled. |
| 7166 | .IP "\fB\-ftracer\fR" 4 |
| 7167 | .IX Item "-ftracer" |
| 7168 | Perform tail duplication to enlarge superblock size. This transformation |
| 7169 | simplifies the control flow of the function allowing other optimizations to do |
| 7170 | a better job. |
| 7171 | .IP "\fB\-funroll\-loops\fR" 4 |
| 7172 | .IX Item "-funroll-loops" |
| 7173 | Unroll loops whose number of iterations can be determined at compile |
| 7174 | time or upon entry to the loop. \fB\-funroll\-loops\fR implies |
| 7175 | \&\fB\-frerun\-cse\-after\-loop\fR. This option makes code larger, |
| 7176 | and may or may not make it run faster. |
| 7177 | .IP "\fB\-funroll\-all\-loops\fR" 4 |
| 7178 | .IX Item "-funroll-all-loops" |
| 7179 | Unroll all loops, even if their number of iterations is uncertain when |
| 7180 | the loop is entered. This usually makes programs run more slowly. |
| 7181 | \&\fB\-funroll\-all\-loops\fR implies the same options as |
| 7182 | \&\fB\-funroll\-loops\fR, |
| 7183 | .IP "\fB\-fsplit\-ivs\-in\-unroller\fR" 4 |
| 7184 | .IX Item "-fsplit-ivs-in-unroller" |
| 7185 | Enables expression of values of induction variables in later iterations |
| 7186 | of the unrolled loop using the value in the first iteration. This breaks |
| 7187 | long dependency chains, thus improving efficiency of the scheduling passes. |
| 7188 | .Sp |
| 7189 | A combination of \fB\-fweb\fR and \s-1CSE\s0 is often sufficient to obtain the |
| 7190 | same effect. However, that is not reliable in cases where the loop body |
| 7191 | is more complicated than a single basic block. It also does not work at all |
| 7192 | on some architectures due to restrictions in the \s-1CSE\s0 pass. |
| 7193 | .Sp |
| 7194 | This optimization is enabled by default. |
| 7195 | .IP "\fB\-fvariable\-expansion\-in\-unroller\fR" 4 |
| 7196 | .IX Item "-fvariable-expansion-in-unroller" |
| 7197 | With this option, the compiler creates multiple copies of some |
| 7198 | local variables when unrolling a loop, which can result in superior code. |
| 7199 | .IP "\fB\-fpartial\-inlining\fR" 4 |
| 7200 | .IX Item "-fpartial-inlining" |
| 7201 | Inline parts of functions. This option has any effect only |
| 7202 | when inlining itself is turned on by the \fB\-finline\-functions\fR |
| 7203 | or \fB\-finline\-small\-functions\fR options. |
| 7204 | .Sp |
| 7205 | Enabled at level \fB\-O2\fR. |
| 7206 | .IP "\fB\-fpredictive\-commoning\fR" 4 |
| 7207 | .IX Item "-fpredictive-commoning" |
| 7208 | Perform predictive commoning optimization, i.e., reusing computations |
| 7209 | (especially memory loads and stores) performed in previous |
| 7210 | iterations of loops. |
| 7211 | .Sp |
| 7212 | This option is enabled at level \fB\-O3\fR. |
| 7213 | .IP "\fB\-fprefetch\-loop\-arrays\fR" 4 |
| 7214 | .IX Item "-fprefetch-loop-arrays" |
| 7215 | If supported by the target machine, generate instructions to prefetch |
| 7216 | memory to improve the performance of loops that access large arrays. |
| 7217 | .Sp |
| 7218 | This option may generate better or worse code; results are highly |
| 7219 | dependent on the structure of loops within the source code. |
| 7220 | .Sp |
| 7221 | Disabled at level \fB\-Os\fR. |
| 7222 | .IP "\fB\-fno\-peephole\fR" 4 |
| 7223 | .IX Item "-fno-peephole" |
| 7224 | .PD 0 |
| 7225 | .IP "\fB\-fno\-peephole2\fR" 4 |
| 7226 | .IX Item "-fno-peephole2" |
| 7227 | .PD |
| 7228 | Disable any machine-specific peephole optimizations. The difference |
| 7229 | between \fB\-fno\-peephole\fR and \fB\-fno\-peephole2\fR is in how they |
| 7230 | are implemented in the compiler; some targets use one, some use the |
| 7231 | other, a few use both. |
| 7232 | .Sp |
| 7233 | \&\fB\-fpeephole\fR is enabled by default. |
| 7234 | \&\fB\-fpeephole2\fR enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 7235 | .IP "\fB\-fno\-guess\-branch\-probability\fR" 4 |
| 7236 | .IX Item "-fno-guess-branch-probability" |
| 7237 | Do not guess branch probabilities using heuristics. |
| 7238 | .Sp |
| 7239 | \&\s-1GCC\s0 uses heuristics to guess branch probabilities if they are |
| 7240 | not provided by profiling feedback (\fB\-fprofile\-arcs\fR). These |
| 7241 | heuristics are based on the control flow graph. If some branch probabilities |
| 7242 | are specified by \fB_\|_builtin_expect\fR, then the heuristics are |
| 7243 | used to guess branch probabilities for the rest of the control flow graph, |
| 7244 | taking the \fB_\|_builtin_expect\fR info into account. The interactions |
| 7245 | between the heuristics and \fB_\|_builtin_expect\fR can be complex, and in |
| 7246 | some cases, it may be useful to disable the heuristics so that the effects |
| 7247 | of \fB_\|_builtin_expect\fR are easier to understand. |
| 7248 | .Sp |
| 7249 | The default is \fB\-fguess\-branch\-probability\fR at levels |
| 7250 | \&\fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 7251 | .IP "\fB\-freorder\-blocks\fR" 4 |
| 7252 | .IX Item "-freorder-blocks" |
| 7253 | Reorder basic blocks in the compiled function in order to reduce number of |
| 7254 | taken branches and improve code locality. |
| 7255 | .Sp |
| 7256 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR. |
| 7257 | .IP "\fB\-freorder\-blocks\-and\-partition\fR" 4 |
| 7258 | .IX Item "-freorder-blocks-and-partition" |
| 7259 | In addition to reordering basic blocks in the compiled function, in order |
| 7260 | to reduce number of taken branches, partitions hot and cold basic blocks |
| 7261 | into separate sections of the assembly and .o files, to improve |
| 7262 | paging and cache locality performance. |
| 7263 | .Sp |
| 7264 | This optimization is automatically turned off in the presence of |
| 7265 | exception handling, for linkonce sections, for functions with a user-defined |
| 7266 | section attribute and on any architecture that does not support named |
| 7267 | sections. |
| 7268 | .IP "\fB\-freorder\-functions\fR" 4 |
| 7269 | .IX Item "-freorder-functions" |
| 7270 | Reorder functions in the object file in order to |
| 7271 | improve code locality. This is implemented by using special |
| 7272 | subsections \f(CW\*(C`.text.hot\*(C'\fR for most frequently executed functions and |
| 7273 | \&\f(CW\*(C`.text.unlikely\*(C'\fR for unlikely executed functions. Reordering is done by |
| 7274 | the linker so object file format must support named sections and linker must |
| 7275 | place them in a reasonable way. |
| 7276 | .Sp |
| 7277 | Also profile feedback must be available to make this option effective. See |
| 7278 | \&\fB\-fprofile\-arcs\fR for details. |
| 7279 | .Sp |
| 7280 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 7281 | .IP "\fB\-fstrict\-aliasing\fR" 4 |
| 7282 | .IX Item "-fstrict-aliasing" |
| 7283 | Allow the compiler to assume the strictest aliasing rules applicable to |
| 7284 | the language being compiled. For C (and \*(C+), this activates |
| 7285 | optimizations based on the type of expressions. In particular, an |
| 7286 | object of one type is assumed never to reside at the same address as an |
| 7287 | object of a different type, unless the types are almost the same. For |
| 7288 | example, an \f(CW\*(C`unsigned int\*(C'\fR can alias an \f(CW\*(C`int\*(C'\fR, but not a |
| 7289 | \&\f(CW\*(C`void*\*(C'\fR or a \f(CW\*(C`double\*(C'\fR. A character type may alias any other |
| 7290 | type. |
| 7291 | .Sp |
| 7292 | Pay special attention to code like this: |
| 7293 | .Sp |
| 7294 | .Vb 4 |
| 7295 | \& union a_union { |
| 7296 | \& int i; |
| 7297 | \& double d; |
| 7298 | \& }; |
| 7299 | \& |
| 7300 | \& int f() { |
| 7301 | \& union a_union t; |
| 7302 | \& t.d = 3.0; |
| 7303 | \& return t.i; |
| 7304 | \& } |
| 7305 | .Ve |
| 7306 | .Sp |
| 7307 | The practice of reading from a different union member than the one most |
| 7308 | recently written to (called \*(L"type-punning\*(R") is common. Even with |
| 7309 | \&\fB\-fstrict\-aliasing\fR, type-punning is allowed, provided the memory |
| 7310 | is accessed through the union type. So, the code above works as |
| 7311 | expected. However, this code might not: |
| 7312 | .Sp |
| 7313 | .Vb 7 |
| 7314 | \& int f() { |
| 7315 | \& union a_union t; |
| 7316 | \& int* ip; |
| 7317 | \& t.d = 3.0; |
| 7318 | \& ip = &t.i; |
| 7319 | \& return *ip; |
| 7320 | \& } |
| 7321 | .Ve |
| 7322 | .Sp |
| 7323 | Similarly, access by taking the address, casting the resulting pointer |
| 7324 | and dereferencing the result has undefined behavior, even if the cast |
| 7325 | uses a union type, e.g.: |
| 7326 | .Sp |
| 7327 | .Vb 4 |
| 7328 | \& int f() { |
| 7329 | \& double d = 3.0; |
| 7330 | \& return ((union a_union *) &d)\->i; |
| 7331 | \& } |
| 7332 | .Ve |
| 7333 | .Sp |
| 7334 | The \fB\-fstrict\-aliasing\fR option is enabled at levels |
| 7335 | \&\fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 7336 | .IP "\fB\-fstrict\-overflow\fR" 4 |
| 7337 | .IX Item "-fstrict-overflow" |
| 7338 | Allow the compiler to assume strict signed overflow rules, depending |
| 7339 | on the language being compiled. For C (and \*(C+) this means that |
| 7340 | overflow when doing arithmetic with signed numbers is undefined, which |
| 7341 | means that the compiler may assume that it does not happen. This |
| 7342 | permits various optimizations. For example, the compiler assumes |
| 7343 | that an expression like \f(CW\*(C`i + 10 > i\*(C'\fR is always true for |
| 7344 | signed \f(CW\*(C`i\*(C'\fR. This assumption is only valid if signed overflow is |
| 7345 | undefined, as the expression is false if \f(CW\*(C`i + 10\*(C'\fR overflows when |
| 7346 | using twos complement arithmetic. When this option is in effect any |
| 7347 | attempt to determine whether an operation on signed numbers |
| 7348 | overflows must be written carefully to not actually involve overflow. |
| 7349 | .Sp |
| 7350 | This option also allows the compiler to assume strict pointer |
| 7351 | semantics: given a pointer to an object, if adding an offset to that |
| 7352 | pointer does not produce a pointer to the same object, the addition is |
| 7353 | undefined. This permits the compiler to conclude that \f(CW\*(C`p + u > |
| 7354 | p\*(C'\fR is always true for a pointer \f(CW\*(C`p\*(C'\fR and unsigned integer |
| 7355 | \&\f(CW\*(C`u\*(C'\fR. This assumption is only valid because pointer wraparound is |
| 7356 | undefined, as the expression is false if \f(CW\*(C`p + u\*(C'\fR overflows using |
| 7357 | twos complement arithmetic. |
| 7358 | .Sp |
| 7359 | See also the \fB\-fwrapv\fR option. Using \fB\-fwrapv\fR means |
| 7360 | that integer signed overflow is fully defined: it wraps. When |
| 7361 | \&\fB\-fwrapv\fR is used, there is no difference between |
| 7362 | \&\fB\-fstrict\-overflow\fR and \fB\-fno\-strict\-overflow\fR for |
| 7363 | integers. With \fB\-fwrapv\fR certain types of overflow are |
| 7364 | permitted. For example, if the compiler gets an overflow when doing |
| 7365 | arithmetic on constants, the overflowed value can still be used with |
| 7366 | \&\fB\-fwrapv\fR, but not otherwise. |
| 7367 | .Sp |
| 7368 | The \fB\-fstrict\-overflow\fR option is enabled at levels |
| 7369 | \&\fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 7370 | .IP "\fB\-falign\-functions\fR" 4 |
| 7371 | .IX Item "-falign-functions" |
| 7372 | .PD 0 |
| 7373 | .IP "\fB\-falign\-functions=\fR\fIn\fR" 4 |
| 7374 | .IX Item "-falign-functions=n" |
| 7375 | .PD |
| 7376 | Align the start of functions to the next power-of-two greater than |
| 7377 | \&\fIn\fR, skipping up to \fIn\fR bytes. For instance, |
| 7378 | \&\fB\-falign\-functions=32\fR aligns functions to the next 32\-byte |
| 7379 | boundary, but \fB\-falign\-functions=24\fR aligns to the next |
| 7380 | 32\-byte boundary only if this can be done by skipping 23 bytes or less. |
| 7381 | .Sp |
| 7382 | \&\fB\-fno\-align\-functions\fR and \fB\-falign\-functions=1\fR are |
| 7383 | equivalent and mean that functions are not aligned. |
| 7384 | .Sp |
| 7385 | Some assemblers only support this flag when \fIn\fR is a power of two; |
| 7386 | in that case, it is rounded up. |
| 7387 | .Sp |
| 7388 | If \fIn\fR is not specified or is zero, use a machine-dependent default. |
| 7389 | .Sp |
| 7390 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR. |
| 7391 | .IP "\fB\-falign\-labels\fR" 4 |
| 7392 | .IX Item "-falign-labels" |
| 7393 | .PD 0 |
| 7394 | .IP "\fB\-falign\-labels=\fR\fIn\fR" 4 |
| 7395 | .IX Item "-falign-labels=n" |
| 7396 | .PD |
| 7397 | Align all branch targets to a power-of-two boundary, skipping up to |
| 7398 | \&\fIn\fR bytes like \fB\-falign\-functions\fR. This option can easily |
| 7399 | make code slower, because it must insert dummy operations for when the |
| 7400 | branch target is reached in the usual flow of the code. |
| 7401 | .Sp |
| 7402 | \&\fB\-fno\-align\-labels\fR and \fB\-falign\-labels=1\fR are |
| 7403 | equivalent and mean that labels are not aligned. |
| 7404 | .Sp |
| 7405 | If \fB\-falign\-loops\fR or \fB\-falign\-jumps\fR are applicable and |
| 7406 | are greater than this value, then their values are used instead. |
| 7407 | .Sp |
| 7408 | If \fIn\fR is not specified or is zero, use a machine-dependent default |
| 7409 | which is very likely to be \fB1\fR, meaning no alignment. |
| 7410 | .Sp |
| 7411 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR. |
| 7412 | .IP "\fB\-falign\-loops\fR" 4 |
| 7413 | .IX Item "-falign-loops" |
| 7414 | .PD 0 |
| 7415 | .IP "\fB\-falign\-loops=\fR\fIn\fR" 4 |
| 7416 | .IX Item "-falign-loops=n" |
| 7417 | .PD |
| 7418 | Align loops to a power-of-two boundary, skipping up to \fIn\fR bytes |
| 7419 | like \fB\-falign\-functions\fR. If the loops are |
| 7420 | executed many times, this makes up for any execution of the dummy |
| 7421 | operations. |
| 7422 | .Sp |
| 7423 | \&\fB\-fno\-align\-loops\fR and \fB\-falign\-loops=1\fR are |
| 7424 | equivalent and mean that loops are not aligned. |
| 7425 | .Sp |
| 7426 | If \fIn\fR is not specified or is zero, use a machine-dependent default. |
| 7427 | .Sp |
| 7428 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR. |
| 7429 | .IP "\fB\-falign\-jumps\fR" 4 |
| 7430 | .IX Item "-falign-jumps" |
| 7431 | .PD 0 |
| 7432 | .IP "\fB\-falign\-jumps=\fR\fIn\fR" 4 |
| 7433 | .IX Item "-falign-jumps=n" |
| 7434 | .PD |
| 7435 | Align branch targets to a power-of-two boundary, for branch targets |
| 7436 | where the targets can only be reached by jumping, skipping up to \fIn\fR |
| 7437 | bytes like \fB\-falign\-functions\fR. In this case, no dummy operations |
| 7438 | need be executed. |
| 7439 | .Sp |
| 7440 | \&\fB\-fno\-align\-jumps\fR and \fB\-falign\-jumps=1\fR are |
| 7441 | equivalent and mean that loops are not aligned. |
| 7442 | .Sp |
| 7443 | If \fIn\fR is not specified or is zero, use a machine-dependent default. |
| 7444 | .Sp |
| 7445 | Enabled at levels \fB\-O2\fR, \fB\-O3\fR. |
| 7446 | .IP "\fB\-funit\-at\-a\-time\fR" 4 |
| 7447 | .IX Item "-funit-at-a-time" |
| 7448 | This option is left for compatibility reasons. \fB\-funit\-at\-a\-time\fR |
| 7449 | has no effect, while \fB\-fno\-unit\-at\-a\-time\fR implies |
| 7450 | \&\fB\-fno\-toplevel\-reorder\fR and \fB\-fno\-section\-anchors\fR. |
| 7451 | .Sp |
| 7452 | Enabled by default. |
| 7453 | .IP "\fB\-fno\-toplevel\-reorder\fR" 4 |
| 7454 | .IX Item "-fno-toplevel-reorder" |
| 7455 | Do not reorder top-level functions, variables, and \f(CW\*(C`asm\*(C'\fR |
| 7456 | statements. Output them in the same order that they appear in the |
| 7457 | input file. When this option is used, unreferenced static variables |
| 7458 | are not removed. This option is intended to support existing code |
| 7459 | that relies on a particular ordering. For new code, it is better to |
| 7460 | use attributes. |
| 7461 | .Sp |
| 7462 | Enabled at level \fB\-O0\fR. When disabled explicitly, it also implies |
| 7463 | \&\fB\-fno\-section\-anchors\fR, which is otherwise enabled at \fB\-O0\fR on some |
| 7464 | targets. |
| 7465 | .IP "\fB\-fweb\fR" 4 |
| 7466 | .IX Item "-fweb" |
| 7467 | Constructs webs as commonly used for register allocation purposes and assign |
| 7468 | each web individual pseudo register. This allows the register allocation pass |
| 7469 | to operate on pseudos directly, but also strengthens several other optimization |
| 7470 | passes, such as \s-1CSE\s0, loop optimizer and trivial dead code remover. It can, |
| 7471 | however, make debugging impossible, since variables no longer stay in a |
| 7472 | \&\*(L"home register\*(R". |
| 7473 | .Sp |
| 7474 | Enabled by default with \fB\-funroll\-loops\fR. |
| 7475 | .IP "\fB\-fwhole\-program\fR" 4 |
| 7476 | .IX Item "-fwhole-program" |
| 7477 | Assume that the current compilation unit represents the whole program being |
| 7478 | compiled. All public functions and variables with the exception of \f(CW\*(C`main\*(C'\fR |
| 7479 | and those merged by attribute \f(CW\*(C`externally_visible\*(C'\fR become static functions |
| 7480 | and in effect are optimized more aggressively by interprocedural optimizers. |
| 7481 | .Sp |
| 7482 | This option should not be used in combination with \f(CW\*(C`\-flto\*(C'\fR. |
| 7483 | Instead relying on a linker plugin should provide safer and more precise |
| 7484 | information. |
| 7485 | .IP "\fB\-flto[=\fR\fIn\fR\fB]\fR" 4 |
| 7486 | .IX Item "-flto[=n]" |
| 7487 | This option runs the standard link-time optimizer. When invoked |
| 7488 | with source code, it generates \s-1GIMPLE\s0 (one of \s-1GCC\s0's internal |
| 7489 | representations) and writes it to special \s-1ELF\s0 sections in the object |
| 7490 | file. When the object files are linked together, all the function |
| 7491 | bodies are read from these \s-1ELF\s0 sections and instantiated as if they |
| 7492 | had been part of the same translation unit. |
| 7493 | .Sp |
| 7494 | To use the link-time optimizer, \fB\-flto\fR needs to be specified at |
| 7495 | compile time and during the final link. For example: |
| 7496 | .Sp |
| 7497 | .Vb 3 |
| 7498 | \& gcc \-c \-O2 \-flto foo.c |
| 7499 | \& gcc \-c \-O2 \-flto bar.c |
| 7500 | \& gcc \-o myprog \-flto \-O2 foo.o bar.o |
| 7501 | .Ve |
| 7502 | .Sp |
| 7503 | The first two invocations to \s-1GCC\s0 save a bytecode representation |
| 7504 | of \s-1GIMPLE\s0 into special \s-1ELF\s0 sections inside \fIfoo.o\fR and |
| 7505 | \&\fIbar.o\fR. The final invocation reads the \s-1GIMPLE\s0 bytecode from |
| 7506 | \&\fIfoo.o\fR and \fIbar.o\fR, merges the two files into a single |
| 7507 | internal image, and compiles the result as usual. Since both |
| 7508 | \&\fIfoo.o\fR and \fIbar.o\fR are merged into a single image, this |
| 7509 | causes all the interprocedural analyses and optimizations in \s-1GCC\s0 to |
| 7510 | work across the two files as if they were a single one. This means, |
| 7511 | for example, that the inliner is able to inline functions in |
| 7512 | \&\fIbar.o\fR into functions in \fIfoo.o\fR and vice-versa. |
| 7513 | .Sp |
| 7514 | Another (simpler) way to enable link-time optimization is: |
| 7515 | .Sp |
| 7516 | .Vb 1 |
| 7517 | \& gcc \-o myprog \-flto \-O2 foo.c bar.c |
| 7518 | .Ve |
| 7519 | .Sp |
| 7520 | The above generates bytecode for \fIfoo.c\fR and \fIbar.c\fR, |
| 7521 | merges them together into a single \s-1GIMPLE\s0 representation and optimizes |
| 7522 | them as usual to produce \fImyprog\fR. |
| 7523 | .Sp |
| 7524 | The only important thing to keep in mind is that to enable link-time |
| 7525 | optimizations the \fB\-flto\fR flag needs to be passed to both the |
| 7526 | compile and the link commands. |
| 7527 | .Sp |
| 7528 | To make whole program optimization effective, it is necessary to make |
| 7529 | certain whole program assumptions. The compiler needs to know |
| 7530 | what functions and variables can be accessed by libraries and runtime |
| 7531 | outside of the link-time optimized unit. When supported by the linker, |
| 7532 | the linker plugin (see \fB\-fuse\-linker\-plugin\fR) passes information |
| 7533 | to the compiler about used and externally visible symbols. When |
| 7534 | the linker plugin is not available, \fB\-fwhole\-program\fR should be |
| 7535 | used to allow the compiler to make these assumptions, which leads |
| 7536 | to more aggressive optimization decisions. |
| 7537 | .Sp |
| 7538 | Note that when a file is compiled with \fB\-flto\fR, the generated |
| 7539 | object file is larger than a regular object file because it |
| 7540 | contains \s-1GIMPLE\s0 bytecodes and the usual final code. This means that |
| 7541 | object files with \s-1LTO\s0 information can be linked as normal object |
| 7542 | files; if \fB\-flto\fR is not passed to the linker, no |
| 7543 | interprocedural optimizations are applied. |
| 7544 | .Sp |
| 7545 | Additionally, the optimization flags used to compile individual files |
| 7546 | are not necessarily related to those used at link time. For instance, |
| 7547 | .Sp |
| 7548 | .Vb 3 |
| 7549 | \& gcc \-c \-O0 \-flto foo.c |
| 7550 | \& gcc \-c \-O0 \-flto bar.c |
| 7551 | \& gcc \-o myprog \-flto \-O3 foo.o bar.o |
| 7552 | .Ve |
| 7553 | .Sp |
| 7554 | This produces individual object files with unoptimized assembler |
| 7555 | code, but the resulting binary \fImyprog\fR is optimized at |
| 7556 | \&\fB\-O3\fR. If, instead, the final binary is generated without |
| 7557 | \&\fB\-flto\fR, then \fImyprog\fR is not optimized. |
| 7558 | .Sp |
| 7559 | When producing the final binary with \fB\-flto\fR, \s-1GCC\s0 only |
| 7560 | applies link-time optimizations to those files that contain bytecode. |
| 7561 | Therefore, you can mix and match object files and libraries with |
| 7562 | \&\s-1GIMPLE\s0 bytecodes and final object code. \s-1GCC\s0 automatically selects |
| 7563 | which files to optimize in \s-1LTO\s0 mode and which files to link without |
| 7564 | further processing. |
| 7565 | .Sp |
| 7566 | There are some code generation flags preserved by \s-1GCC\s0 when |
| 7567 | generating bytecodes, as they need to be used during the final link |
| 7568 | stage. Currently, the following options are saved into the \s-1GIMPLE\s0 |
| 7569 | bytecode files: \fB\-fPIC\fR, \fB\-fcommon\fR and all the |
| 7570 | \&\fB\-m\fR target flags. |
| 7571 | .Sp |
| 7572 | At link time, these options are read in and reapplied. Note that the |
| 7573 | current implementation makes no attempt to recognize conflicting |
| 7574 | values for these options. If different files have conflicting option |
| 7575 | values (e.g., one file is compiled with \fB\-fPIC\fR and another |
| 7576 | isn't), the compiler simply uses the last value read from the |
| 7577 | bytecode files. It is recommended, then, that you compile all the files |
| 7578 | participating in the same link with the same options. |
| 7579 | .Sp |
| 7580 | If \s-1LTO\s0 encounters objects with C linkage declared with incompatible |
| 7581 | types in separate translation units to be linked together (undefined |
| 7582 | behavior according to \s-1ISO\s0 C99 6.2.7), a non-fatal diagnostic may be |
| 7583 | issued. The behavior is still undefined at run time. |
| 7584 | .Sp |
| 7585 | Another feature of \s-1LTO\s0 is that it is possible to apply interprocedural |
| 7586 | optimizations on files written in different languages. This requires |
| 7587 | support in the language front end. Currently, the C, \*(C+ and |
| 7588 | Fortran front ends are capable of emitting \s-1GIMPLE\s0 bytecodes, so |
| 7589 | something like this should work: |
| 7590 | .Sp |
| 7591 | .Vb 4 |
| 7592 | \& gcc \-c \-flto foo.c |
| 7593 | \& g++ \-c \-flto bar.cc |
| 7594 | \& gfortran \-c \-flto baz.f90 |
| 7595 | \& g++ \-o myprog \-flto \-O3 foo.o bar.o baz.o \-lgfortran |
| 7596 | .Ve |
| 7597 | .Sp |
| 7598 | Notice that the final link is done with \fBg++\fR to get the \*(C+ |
| 7599 | runtime libraries and \fB\-lgfortran\fR is added to get the Fortran |
| 7600 | runtime libraries. In general, when mixing languages in \s-1LTO\s0 mode, you |
| 7601 | should use the same link command options as when mixing languages in a |
| 7602 | regular (non-LTO) compilation; all you need to add is \fB\-flto\fR to |
| 7603 | all the compile and link commands. |
| 7604 | .Sp |
| 7605 | If object files containing \s-1GIMPLE\s0 bytecode are stored in a library archive, say |
| 7606 | \&\fIlibfoo.a\fR, it is possible to extract and use them in an \s-1LTO\s0 link if you |
| 7607 | are using a linker with plugin support. To enable this feature, use |
| 7608 | the flag \fB\-fuse\-linker\-plugin\fR at link time: |
| 7609 | .Sp |
| 7610 | .Vb 1 |
| 7611 | \& gcc \-o myprog \-O2 \-flto \-fuse\-linker\-plugin a.o b.o \-lfoo |
| 7612 | .Ve |
| 7613 | .Sp |
| 7614 | With the linker plugin enabled, the linker extracts the needed |
| 7615 | \&\s-1GIMPLE\s0 files from \fIlibfoo.a\fR and passes them on to the running \s-1GCC\s0 |
| 7616 | to make them part of the aggregated \s-1GIMPLE\s0 image to be optimized. |
| 7617 | .Sp |
| 7618 | If you are not using a linker with plugin support and/or do not |
| 7619 | enable the linker plugin, then the objects inside \fIlibfoo.a\fR |
| 7620 | are extracted and linked as usual, but they do not participate |
| 7621 | in the \s-1LTO\s0 optimization process. |
| 7622 | .Sp |
| 7623 | Link-time optimizations do not require the presence of the whole program to |
| 7624 | operate. If the program does not require any symbols to be exported, it is |
| 7625 | possible to combine \fB\-flto\fR and \fB\-fwhole\-program\fR to allow |
| 7626 | the interprocedural optimizers to use more aggressive assumptions which may |
| 7627 | lead to improved optimization opportunities. |
| 7628 | Use of \fB\-fwhole\-program\fR is not needed when linker plugin is |
| 7629 | active (see \fB\-fuse\-linker\-plugin\fR). |
| 7630 | .Sp |
| 7631 | The current implementation of \s-1LTO\s0 makes no |
| 7632 | attempt to generate bytecode that is portable between different |
| 7633 | types of hosts. The bytecode files are versioned and there is a |
| 7634 | strict version check, so bytecode files generated in one version of |
| 7635 | \&\s-1GCC\s0 will not work with an older/newer version of \s-1GCC\s0. |
| 7636 | .Sp |
| 7637 | Link-time optimization does not work well with generation of debugging |
| 7638 | information. Combining \fB\-flto\fR with |
| 7639 | \&\fB\-g\fR is currently experimental and expected to produce wrong |
| 7640 | results. |
| 7641 | .Sp |
| 7642 | If you specify the optional \fIn\fR, the optimization and code |
| 7643 | generation done at link time is executed in parallel using \fIn\fR |
| 7644 | parallel jobs by utilizing an installed \fBmake\fR program. The |
| 7645 | environment variable \fB\s-1MAKE\s0\fR may be used to override the program |
| 7646 | used. The default value for \fIn\fR is 1. |
| 7647 | .Sp |
| 7648 | You can also specify \fB\-flto=jobserver\fR to use \s-1GNU\s0 make's |
| 7649 | job server mode to determine the number of parallel jobs. This |
| 7650 | is useful when the Makefile calling \s-1GCC\s0 is already executing in parallel. |
| 7651 | You must prepend a \fB+\fR to the command recipe in the parent Makefile |
| 7652 | for this to work. This option likely only works if \fB\s-1MAKE\s0\fR is |
| 7653 | \&\s-1GNU\s0 make. |
| 7654 | .Sp |
| 7655 | This option is disabled by default. |
| 7656 | .IP "\fB\-flto\-partition=\fR\fIalg\fR" 4 |
| 7657 | .IX Item "-flto-partition=alg" |
| 7658 | Specify the partitioning algorithm used by the link-time optimizer. |
| 7659 | The value is either \f(CW\*(C`1to1\*(C'\fR to specify a partitioning mirroring |
| 7660 | the original source files or \f(CW\*(C`balanced\*(C'\fR to specify partitioning |
| 7661 | into equally sized chunks (whenever possible) or \f(CW\*(C`max\*(C'\fR to create |
| 7662 | new partition for every symbol where possible. Specifying \f(CW\*(C`none\*(C'\fR |
| 7663 | as an algorithm disables partitioning and streaming completely. |
| 7664 | The default value is \f(CW\*(C`balanced\*(C'\fR. While \f(CW\*(C`1to1\*(C'\fR can be used |
| 7665 | as an workaround for various code ordering issues, the \f(CW\*(C`max\*(C'\fR |
| 7666 | partitioning is intended for internal testing only. |
| 7667 | .IP "\fB\-flto\-compression\-level=\fR\fIn\fR" 4 |
| 7668 | .IX Item "-flto-compression-level=n" |
| 7669 | This option specifies the level of compression used for intermediate |
| 7670 | language written to \s-1LTO\s0 object files, and is only meaningful in |
| 7671 | conjunction with \s-1LTO\s0 mode (\fB\-flto\fR). Valid |
| 7672 | values are 0 (no compression) to 9 (maximum compression). Values |
| 7673 | outside this range are clamped to either 0 or 9. If the option is not |
| 7674 | given, a default balanced compression setting is used. |
| 7675 | .IP "\fB\-flto\-report\fR" 4 |
| 7676 | .IX Item "-flto-report" |
| 7677 | Prints a report with internal details on the workings of the link-time |
| 7678 | optimizer. The contents of this report vary from version to version. |
| 7679 | It is meant to be useful to \s-1GCC\s0 developers when processing object |
| 7680 | files in \s-1LTO\s0 mode (via \fB\-flto\fR). |
| 7681 | .Sp |
| 7682 | Disabled by default. |
| 7683 | .IP "\fB\-fuse\-linker\-plugin\fR" 4 |
| 7684 | .IX Item "-fuse-linker-plugin" |
| 7685 | Enables the use of a linker plugin during link-time optimization. This |
| 7686 | option relies on plugin support in the linker, which is available in gold |
| 7687 | or in \s-1GNU\s0 ld 2.21 or newer. |
| 7688 | .Sp |
| 7689 | This option enables the extraction of object files with \s-1GIMPLE\s0 bytecode out |
| 7690 | of library archives. This improves the quality of optimization by exposing |
| 7691 | more code to the link-time optimizer. This information specifies what |
| 7692 | symbols can be accessed externally (by non-LTO object or during dynamic |
| 7693 | linking). Resulting code quality improvements on binaries (and shared |
| 7694 | libraries that use hidden visibility) are similar to \f(CW\*(C`\-fwhole\-program\*(C'\fR. |
| 7695 | See \fB\-flto\fR for a description of the effect of this flag and how to |
| 7696 | use it. |
| 7697 | .Sp |
| 7698 | This option is enabled by default when \s-1LTO\s0 support in \s-1GCC\s0 is enabled |
| 7699 | and \s-1GCC\s0 was configured for use with |
| 7700 | a linker supporting plugins (\s-1GNU\s0 ld 2.21 or newer or gold). |
| 7701 | .IP "\fB\-ffat\-lto\-objects\fR" 4 |
| 7702 | .IX Item "-ffat-lto-objects" |
| 7703 | Fat \s-1LTO\s0 objects are object files that contain both the intermediate language |
| 7704 | and the object code. This makes them usable for both \s-1LTO\s0 linking and normal |
| 7705 | linking. This option is effective only when compiling with \fB\-flto\fR |
| 7706 | and is ignored at link time. |
| 7707 | .Sp |
| 7708 | \&\fB\-fno\-fat\-lto\-objects\fR improves compilation time over plain \s-1LTO\s0, but |
| 7709 | requires the complete toolchain to be aware of \s-1LTO\s0. It requires a linker with |
| 7710 | linker plugin support for basic functionality. Additionally, |
| 7711 | \&\fBnm\fR, \fBar\fR and \fBranlib\fR |
| 7712 | need to support linker plugins to allow a full-featured build environment |
| 7713 | (capable of building static libraries etc). \s-1GCC\s0 provides the \fBgcc-ar\fR, |
| 7714 | \&\fBgcc-nm\fR, \fBgcc-ranlib\fR wrappers to pass the right options |
| 7715 | to these tools. With non fat \s-1LTO\s0 makefiles need to be modified to use them. |
| 7716 | .Sp |
| 7717 | The default is \fB\-ffat\-lto\-objects\fR but this default is intended to |
| 7718 | change in future releases when linker plugin enabled environments become more |
| 7719 | common. |
| 7720 | .IP "\fB\-fcompare\-elim\fR" 4 |
| 7721 | .IX Item "-fcompare-elim" |
| 7722 | After register allocation and post-register allocation instruction splitting, |
| 7723 | identify arithmetic instructions that compute processor flags similar to a |
| 7724 | comparison operation based on that arithmetic. If possible, eliminate the |
| 7725 | explicit comparison operation. |
| 7726 | .Sp |
| 7727 | This pass only applies to certain targets that cannot explicitly represent |
| 7728 | the comparison operation before register allocation is complete. |
| 7729 | .Sp |
| 7730 | Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 7731 | .IP "\fB\-fuse\-ld=bfd\fR" 4 |
| 7732 | .IX Item "-fuse-ld=bfd" |
| 7733 | Use the \fBbfd\fR linker instead of the default linker. |
| 7734 | .IP "\fB\-fuse\-ld=gold\fR" 4 |
| 7735 | .IX Item "-fuse-ld=gold" |
| 7736 | Use the \fBgold\fR linker instead of the default linker. |
| 7737 | .IP "\fB\-fcprop\-registers\fR" 4 |
| 7738 | .IX Item "-fcprop-registers" |
| 7739 | After register allocation and post-register allocation instruction splitting, |
| 7740 | perform a copy-propagation pass to try to reduce scheduling dependencies |
| 7741 | and occasionally eliminate the copy. |
| 7742 | .Sp |
| 7743 | Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. |
| 7744 | .IP "\fB\-fprofile\-correction\fR" 4 |
| 7745 | .IX Item "-fprofile-correction" |
| 7746 | Profiles collected using an instrumented binary for multi-threaded programs may |
| 7747 | be inconsistent due to missed counter updates. When this option is specified, |
| 7748 | \&\s-1GCC\s0 uses heuristics to correct or smooth out such inconsistencies. By |
| 7749 | default, \s-1GCC\s0 emits an error message when an inconsistent profile is detected. |
| 7750 | .IP "\fB\-fprofile\-dir=\fR\fIpath\fR" 4 |
| 7751 | .IX Item "-fprofile-dir=path" |
| 7752 | Set the directory to search for the profile data files in to \fIpath\fR. |
| 7753 | This option affects only the profile data generated by |
| 7754 | \&\fB\-fprofile\-generate\fR, \fB\-ftest\-coverage\fR, \fB\-fprofile\-arcs\fR |
| 7755 | and used by \fB\-fprofile\-use\fR and \fB\-fbranch\-probabilities\fR |
| 7756 | and its related options. Both absolute and relative paths can be used. |
| 7757 | By default, \s-1GCC\s0 uses the current directory as \fIpath\fR, thus the |
| 7758 | profile data file appears in the same directory as the object file. |
| 7759 | .IP "\fB\-fprofile\-generate\fR" 4 |
| 7760 | .IX Item "-fprofile-generate" |
| 7761 | .PD 0 |
| 7762 | .IP "\fB\-fprofile\-generate=\fR\fIpath\fR" 4 |
| 7763 | .IX Item "-fprofile-generate=path" |
| 7764 | .PD |
| 7765 | Enable options usually used for instrumenting application to produce |
| 7766 | profile useful for later recompilation with profile feedback based |
| 7767 | optimization. You must use \fB\-fprofile\-generate\fR both when |
| 7768 | compiling and when linking your program. |
| 7769 | .Sp |
| 7770 | The following options are enabled: \f(CW\*(C`\-fprofile\-arcs\*(C'\fR, \f(CW\*(C`\-fprofile\-values\*(C'\fR, \f(CW\*(C`\-fvpt\*(C'\fR. |
| 7771 | .Sp |
| 7772 | If \fIpath\fR is specified, \s-1GCC\s0 looks at the \fIpath\fR to find |
| 7773 | the profile feedback data files. See \fB\-fprofile\-dir\fR. |
| 7774 | .IP "\fB\-fprofile\-use\fR" 4 |
| 7775 | .IX Item "-fprofile-use" |
| 7776 | .PD 0 |
| 7777 | .IP "\fB\-fprofile\-use=\fR\fIpath\fR" 4 |
| 7778 | .IX Item "-fprofile-use=path" |
| 7779 | .PD |
| 7780 | Enable profile feedback directed optimizations, and optimizations |
| 7781 | generally profitable only with profile feedback available. |
| 7782 | .Sp |
| 7783 | The following options are enabled: \f(CW\*(C`\-fbranch\-probabilities\*(C'\fR, \f(CW\*(C`\-fvpt\*(C'\fR, |
| 7784 | \&\f(CW\*(C`\-funroll\-loops\*(C'\fR, \f(CW\*(C`\-fpeel\-loops\*(C'\fR, \f(CW\*(C`\-ftracer\*(C'\fR, \f(CW\*(C`\-ftree\-vectorize\*(C'\fR, |
| 7785 | \&\f(CW\*(C`ftree\-loop\-distribute\-patterns\*(C'\fR |
| 7786 | .Sp |
| 7787 | By default, \s-1GCC\s0 emits an error message if the feedback profiles do not |
| 7788 | match the source code. This error can be turned into a warning by using |
| 7789 | \&\fB\-Wcoverage\-mismatch\fR. Note this may result in poorly optimized |
| 7790 | code. |
| 7791 | .Sp |
| 7792 | If \fIpath\fR is specified, \s-1GCC\s0 looks at the \fIpath\fR to find |
| 7793 | the profile feedback data files. See \fB\-fprofile\-dir\fR. |
| 7794 | .PP |
| 7795 | The following options control compiler behavior regarding floating-point |
| 7796 | arithmetic. These options trade off between speed and |
| 7797 | correctness. All must be specifically enabled. |
| 7798 | .IP "\fB\-ffloat\-store\fR" 4 |
| 7799 | .IX Item "-ffloat-store" |
| 7800 | Do not store floating-point variables in registers, and inhibit other |
| 7801 | options that might change whether a floating-point value is taken from a |
| 7802 | register or memory. |
| 7803 | .Sp |
| 7804 | This option prevents undesirable excess precision on machines such as |
| 7805 | the 68000 where the floating registers (of the 68881) keep more |
| 7806 | precision than a \f(CW\*(C`double\*(C'\fR is supposed to have. Similarly for the |
| 7807 | x86 architecture. For most programs, the excess precision does only |
| 7808 | good, but a few programs rely on the precise definition of \s-1IEEE\s0 floating |
| 7809 | point. Use \fB\-ffloat\-store\fR for such programs, after modifying |
| 7810 | them to store all pertinent intermediate computations into variables. |
| 7811 | .IP "\fB\-fexcess\-precision=\fR\fIstyle\fR" 4 |
| 7812 | .IX Item "-fexcess-precision=style" |
| 7813 | This option allows further control over excess precision on machines |
| 7814 | where floating-point registers have more precision than the \s-1IEEE\s0 |
| 7815 | \&\f(CW\*(C`float\*(C'\fR and \f(CW\*(C`double\*(C'\fR types and the processor does not |
| 7816 | support operations rounding to those types. By default, |
| 7817 | \&\fB\-fexcess\-precision=fast\fR is in effect; this means that |
| 7818 | operations are carried out in the precision of the registers and that |
| 7819 | it is unpredictable when rounding to the types specified in the source |
| 7820 | code takes place. When compiling C, if |
| 7821 | \&\fB\-fexcess\-precision=standard\fR is specified then excess |
| 7822 | precision follows the rules specified in \s-1ISO\s0 C99; in particular, |
| 7823 | both casts and assignments cause values to be rounded to their |
| 7824 | semantic types (whereas \fB\-ffloat\-store\fR only affects |
| 7825 | assignments). This option is enabled by default for C if a strict |
| 7826 | conformance option such as \fB\-std=c99\fR is used. |
| 7827 | .Sp |
| 7828 | \&\fB\-fexcess\-precision=standard\fR is not implemented for languages |
| 7829 | other than C, and has no effect if |
| 7830 | \&\fB\-funsafe\-math\-optimizations\fR or \fB\-ffast\-math\fR is |
| 7831 | specified. On the x86, it also has no effect if \fB\-mfpmath=sse\fR |
| 7832 | or \fB\-mfpmath=sse+387\fR is specified; in the former case, \s-1IEEE\s0 |
| 7833 | semantics apply without excess precision, and in the latter, rounding |
| 7834 | is unpredictable. |
| 7835 | .IP "\fB\-ffast\-math\fR" 4 |
| 7836 | .IX Item "-ffast-math" |
| 7837 | Sets \fB\-fno\-math\-errno\fR, \fB\-funsafe\-math\-optimizations\fR, |
| 7838 | \&\fB\-ffinite\-math\-only\fR, \fB\-fno\-rounding\-math\fR, |
| 7839 | \&\fB\-fno\-signaling\-nans\fR and \fB\-fcx\-limited\-range\fR. |
| 7840 | .Sp |
| 7841 | This option causes the preprocessor macro \f(CW\*(C`_\|_FAST_MATH_\|_\*(C'\fR to be defined. |
| 7842 | .Sp |
| 7843 | This option is not turned on by any \fB\-O\fR option besides |
| 7844 | \&\fB\-Ofast\fR since it can result in incorrect output for programs |
| 7845 | that depend on an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications |
| 7846 | for math functions. It may, however, yield faster code for programs |
| 7847 | that do not require the guarantees of these specifications. |
| 7848 | .IP "\fB\-fno\-math\-errno\fR" 4 |
| 7849 | .IX Item "-fno-math-errno" |
| 7850 | Do not set \f(CW\*(C`errno\*(C'\fR after calling math functions that are executed |
| 7851 | with a single instruction, e.g., \f(CW\*(C`sqrt\*(C'\fR. A program that relies on |
| 7852 | \&\s-1IEEE\s0 exceptions for math error handling may want to use this flag |
| 7853 | for speed while maintaining \s-1IEEE\s0 arithmetic compatibility. |
| 7854 | .Sp |
| 7855 | This option is not turned on by any \fB\-O\fR option since |
| 7856 | it can result in incorrect output for programs that depend on |
| 7857 | an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications for |
| 7858 | math functions. It may, however, yield faster code for programs |
| 7859 | that do not require the guarantees of these specifications. |
| 7860 | .Sp |
| 7861 | The default is \fB\-fmath\-errno\fR. |
| 7862 | .Sp |
| 7863 | On Darwin systems, the math library never sets \f(CW\*(C`errno\*(C'\fR. There is |
| 7864 | therefore no reason for the compiler to consider the possibility that |
| 7865 | it might, and \fB\-fno\-math\-errno\fR is the default. |
| 7866 | .IP "\fB\-funsafe\-math\-optimizations\fR" 4 |
| 7867 | .IX Item "-funsafe-math-optimizations" |
| 7868 | Allow optimizations for floating-point arithmetic that (a) assume |
| 7869 | that arguments and results are valid and (b) may violate \s-1IEEE\s0 or |
| 7870 | \&\s-1ANSI\s0 standards. When used at link-time, it may include libraries |
| 7871 | or startup files that change the default \s-1FPU\s0 control word or other |
| 7872 | similar optimizations. |
| 7873 | .Sp |
| 7874 | This option is not turned on by any \fB\-O\fR option since |
| 7875 | it can result in incorrect output for programs that depend on |
| 7876 | an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications for |
| 7877 | math functions. It may, however, yield faster code for programs |
| 7878 | that do not require the guarantees of these specifications. |
| 7879 | Enables \fB\-fno\-signed\-zeros\fR, \fB\-fno\-trapping\-math\fR, |
| 7880 | \&\fB\-fassociative\-math\fR and \fB\-freciprocal\-math\fR. |
| 7881 | .Sp |
| 7882 | The default is \fB\-fno\-unsafe\-math\-optimizations\fR. |
| 7883 | .IP "\fB\-fassociative\-math\fR" 4 |
| 7884 | .IX Item "-fassociative-math" |
| 7885 | Allow re-association of operands in series of floating-point operations. |
| 7886 | This violates the \s-1ISO\s0 C and \*(C+ language standard by possibly changing |
| 7887 | computation result. \s-1NOTE:\s0 re-ordering may change the sign of zero as |
| 7888 | well as ignore NaNs and inhibit or create underflow or overflow (and |
| 7889 | thus cannot be used on code that relies on rounding behavior like |
| 7890 | \&\f(CW\*(C`(x + 2**52) \- 2**52\*(C'\fR. May also reorder floating-point comparisons |
| 7891 | and thus may not be used when ordered comparisons are required. |
| 7892 | This option requires that both \fB\-fno\-signed\-zeros\fR and |
| 7893 | \&\fB\-fno\-trapping\-math\fR be in effect. Moreover, it doesn't make |
| 7894 | much sense with \fB\-frounding\-math\fR. For Fortran the option |
| 7895 | is automatically enabled when both \fB\-fno\-signed\-zeros\fR and |
| 7896 | \&\fB\-fno\-trapping\-math\fR are in effect. |
| 7897 | .Sp |
| 7898 | The default is \fB\-fno\-associative\-math\fR. |
| 7899 | .IP "\fB\-freciprocal\-math\fR" 4 |
| 7900 | .IX Item "-freciprocal-math" |
| 7901 | Allow the reciprocal of a value to be used instead of dividing by |
| 7902 | the value if this enables optimizations. For example \f(CW\*(C`x / y\*(C'\fR |
| 7903 | can be replaced with \f(CW\*(C`x * (1/y)\*(C'\fR, which is useful if \f(CW\*(C`(1/y)\*(C'\fR |
| 7904 | is subject to common subexpression elimination. Note that this loses |
| 7905 | precision and increases the number of flops operating on the value. |
| 7906 | .Sp |
| 7907 | The default is \fB\-fno\-reciprocal\-math\fR. |
| 7908 | .IP "\fB\-ffinite\-math\-only\fR" 4 |
| 7909 | .IX Item "-ffinite-math-only" |
| 7910 | Allow optimizations for floating-point arithmetic that assume |
| 7911 | that arguments and results are not NaNs or +\-Infs. |
| 7912 | .Sp |
| 7913 | This option is not turned on by any \fB\-O\fR option since |
| 7914 | it can result in incorrect output for programs that depend on |
| 7915 | an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications for |
| 7916 | math functions. It may, however, yield faster code for programs |
| 7917 | that do not require the guarantees of these specifications. |
| 7918 | .Sp |
| 7919 | The default is \fB\-fno\-finite\-math\-only\fR. |
| 7920 | .IP "\fB\-fno\-signed\-zeros\fR" 4 |
| 7921 | .IX Item "-fno-signed-zeros" |
| 7922 | Allow optimizations for floating-point arithmetic that ignore the |
| 7923 | signedness of zero. \s-1IEEE\s0 arithmetic specifies the behavior of |
| 7924 | distinct +0.0 and \-0.0 values, which then prohibits simplification |
| 7925 | of expressions such as x+0.0 or 0.0*x (even with \fB\-ffinite\-math\-only\fR). |
| 7926 | This option implies that the sign of a zero result isn't significant. |
| 7927 | .Sp |
| 7928 | The default is \fB\-fsigned\-zeros\fR. |
| 7929 | .IP "\fB\-fno\-trapping\-math\fR" 4 |
| 7930 | .IX Item "-fno-trapping-math" |
| 7931 | Compile code assuming that floating-point operations cannot generate |
| 7932 | user-visible traps. These traps include division by zero, overflow, |
| 7933 | underflow, inexact result and invalid operation. This option requires |
| 7934 | that \fB\-fno\-signaling\-nans\fR be in effect. Setting this option may |
| 7935 | allow faster code if one relies on \*(L"non-stop\*(R" \s-1IEEE\s0 arithmetic, for example. |
| 7936 | .Sp |
| 7937 | This option should never be turned on by any \fB\-O\fR option since |
| 7938 | it can result in incorrect output for programs that depend on |
| 7939 | an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications for |
| 7940 | math functions. |
| 7941 | .Sp |
| 7942 | The default is \fB\-ftrapping\-math\fR. |
| 7943 | .IP "\fB\-frounding\-math\fR" 4 |
| 7944 | .IX Item "-frounding-math" |
| 7945 | Disable transformations and optimizations that assume default floating-point |
| 7946 | rounding behavior. This is round-to-zero for all floating point |
| 7947 | to integer conversions, and round-to-nearest for all other arithmetic |
| 7948 | truncations. This option should be specified for programs that change |
| 7949 | the \s-1FP\s0 rounding mode dynamically, or that may be executed with a |
| 7950 | non-default rounding mode. This option disables constant folding of |
| 7951 | floating-point expressions at compile time (which may be affected by |
| 7952 | rounding mode) and arithmetic transformations that are unsafe in the |
| 7953 | presence of sign-dependent rounding modes. |
| 7954 | .Sp |
| 7955 | The default is \fB\-fno\-rounding\-math\fR. |
| 7956 | .Sp |
| 7957 | This option is experimental and does not currently guarantee to |
| 7958 | disable all \s-1GCC\s0 optimizations that are affected by rounding mode. |
| 7959 | Future versions of \s-1GCC\s0 may provide finer control of this setting |
| 7960 | using C99's \f(CW\*(C`FENV_ACCESS\*(C'\fR pragma. This command-line option |
| 7961 | will be used to specify the default state for \f(CW\*(C`FENV_ACCESS\*(C'\fR. |
| 7962 | .IP "\fB\-fsignaling\-nans\fR" 4 |
| 7963 | .IX Item "-fsignaling-nans" |
| 7964 | Compile code assuming that \s-1IEEE\s0 signaling NaNs may generate user-visible |
| 7965 | traps during floating-point operations. Setting this option disables |
| 7966 | optimizations that may change the number of exceptions visible with |
| 7967 | signaling NaNs. This option implies \fB\-ftrapping\-math\fR. |
| 7968 | .Sp |
| 7969 | This option causes the preprocessor macro \f(CW\*(C`_\|_SUPPORT_SNAN_\|_\*(C'\fR to |
| 7970 | be defined. |
| 7971 | .Sp |
| 7972 | The default is \fB\-fno\-signaling\-nans\fR. |
| 7973 | .Sp |
| 7974 | This option is experimental and does not currently guarantee to |
| 7975 | disable all \s-1GCC\s0 optimizations that affect signaling NaN behavior. |
| 7976 | .IP "\fB\-fsingle\-precision\-constant\fR" 4 |
| 7977 | .IX Item "-fsingle-precision-constant" |
| 7978 | Treat floating-point constants as single precision instead of |
| 7979 | implicitly converting them to double-precision constants. |
| 7980 | .IP "\fB\-fcx\-limited\-range\fR" 4 |
| 7981 | .IX Item "-fcx-limited-range" |
| 7982 | When enabled, this option states that a range reduction step is not |
| 7983 | needed when performing complex division. Also, there is no checking |
| 7984 | whether the result of a complex multiplication or division is \f(CW\*(C`NaN |
| 7985 | + I*NaN\*(C'\fR, with an attempt to rescue the situation in that case. The |
| 7986 | default is \fB\-fno\-cx\-limited\-range\fR, but is enabled by |
| 7987 | \&\fB\-ffast\-math\fR. |
| 7988 | .Sp |
| 7989 | This option controls the default setting of the \s-1ISO\s0 C99 |
| 7990 | \&\f(CW\*(C`CX_LIMITED_RANGE\*(C'\fR pragma. Nevertheless, the option applies to |
| 7991 | all languages. |
| 7992 | .IP "\fB\-fcx\-fortran\-rules\fR" 4 |
| 7993 | .IX Item "-fcx-fortran-rules" |
| 7994 | Complex multiplication and division follow Fortran rules. Range |
| 7995 | reduction is done as part of complex division, but there is no checking |
| 7996 | whether the result of a complex multiplication or division is \f(CW\*(C`NaN |
| 7997 | + I*NaN\*(C'\fR, with an attempt to rescue the situation in that case. |
| 7998 | .Sp |
| 7999 | The default is \fB\-fno\-cx\-fortran\-rules\fR. |
| 8000 | .PP |
| 8001 | The following options control optimizations that may improve |
| 8002 | performance, but are not enabled by any \fB\-O\fR options. This |
| 8003 | section includes experimental options that may produce broken code. |
| 8004 | .IP "\fB\-fbranch\-probabilities\fR" 4 |
| 8005 | .IX Item "-fbranch-probabilities" |
| 8006 | After running a program compiled with \fB\-fprofile\-arcs\fR, you can compile it a second time using |
| 8007 | \&\fB\-fbranch\-probabilities\fR, to improve optimizations based on |
| 8008 | the number of times each branch was taken. When a program |
| 8009 | compiled with \fB\-fprofile\-arcs\fR exits, it saves arc execution |
| 8010 | counts to a file called \fI\fIsourcename\fI.gcda\fR for each source |
| 8011 | file. The information in this data file is very dependent on the |
| 8012 | structure of the generated code, so you must use the same source code |
| 8013 | and the same optimization options for both compilations. |
| 8014 | .Sp |
| 8015 | With \fB\-fbranch\-probabilities\fR, \s-1GCC\s0 puts a |
| 8016 | \&\fB\s-1REG_BR_PROB\s0\fR note on each \fB\s-1JUMP_INSN\s0\fR and \fB\s-1CALL_INSN\s0\fR. |
| 8017 | These can be used to improve optimization. Currently, they are only |
| 8018 | used in one place: in \fIreorg.c\fR, instead of guessing which path a |
| 8019 | branch is most likely to take, the \fB\s-1REG_BR_PROB\s0\fR values are used to |
| 8020 | exactly determine which path is taken more often. |
| 8021 | .IP "\fB\-fprofile\-values\fR" 4 |
| 8022 | .IX Item "-fprofile-values" |
| 8023 | If combined with \fB\-fprofile\-arcs\fR, it adds code so that some |
| 8024 | data about values of expressions in the program is gathered. |
| 8025 | .Sp |
| 8026 | With \fB\-fbranch\-probabilities\fR, it reads back the data gathered |
| 8027 | from profiling values of expressions for usage in optimizations. |
| 8028 | .Sp |
| 8029 | Enabled with \fB\-fprofile\-generate\fR and \fB\-fprofile\-use\fR. |
| 8030 | .IP "\fB\-fvpt\fR" 4 |
| 8031 | .IX Item "-fvpt" |
| 8032 | If combined with \fB\-fprofile\-arcs\fR, this option instructs the compiler |
| 8033 | to add code to gather information about values of expressions. |
| 8034 | .Sp |
| 8035 | With \fB\-fbranch\-probabilities\fR, it reads back the data gathered |
| 8036 | and actually performs the optimizations based on them. |
| 8037 | Currently the optimizations include specialization of division operations |
| 8038 | using the knowledge about the value of the denominator. |
| 8039 | .IP "\fB\-frename\-registers\fR" 4 |
| 8040 | .IX Item "-frename-registers" |
| 8041 | Attempt to avoid false dependencies in scheduled code by making use |
| 8042 | of registers left over after register allocation. This optimization |
| 8043 | most benefits processors with lots of registers. Depending on the |
| 8044 | debug information format adopted by the target, however, it can |
| 8045 | make debugging impossible, since variables no longer stay in |
| 8046 | a \*(L"home register\*(R". |
| 8047 | .Sp |
| 8048 | Enabled by default with \fB\-funroll\-loops\fR and \fB\-fpeel\-loops\fR. |
| 8049 | .IP "\fB\-ftracer\fR" 4 |
| 8050 | .IX Item "-ftracer" |
| 8051 | Perform tail duplication to enlarge superblock size. This transformation |
| 8052 | simplifies the control flow of the function allowing other optimizations to do |
| 8053 | a better job. |
| 8054 | .Sp |
| 8055 | Enabled with \fB\-fprofile\-use\fR. |
| 8056 | .IP "\fB\-funroll\-loops\fR" 4 |
| 8057 | .IX Item "-funroll-loops" |
| 8058 | Unroll loops whose number of iterations can be determined at compile time or |
| 8059 | upon entry to the loop. \fB\-funroll\-loops\fR implies |
| 8060 | \&\fB\-frerun\-cse\-after\-loop\fR, \fB\-fweb\fR and \fB\-frename\-registers\fR. |
| 8061 | It also turns on complete loop peeling (i.e. complete removal of loops with |
| 8062 | a small constant number of iterations). This option makes code larger, and may |
| 8063 | or may not make it run faster. |
| 8064 | .Sp |
| 8065 | Enabled with \fB\-fprofile\-use\fR. |
| 8066 | .IP "\fB\-funroll\-all\-loops\fR" 4 |
| 8067 | .IX Item "-funroll-all-loops" |
| 8068 | Unroll all loops, even if their number of iterations is uncertain when |
| 8069 | the loop is entered. This usually makes programs run more slowly. |
| 8070 | \&\fB\-funroll\-all\-loops\fR implies the same options as |
| 8071 | \&\fB\-funroll\-loops\fR. |
| 8072 | .IP "\fB\-fpeel\-loops\fR" 4 |
| 8073 | .IX Item "-fpeel-loops" |
| 8074 | Peels loops for which there is enough information that they do not |
| 8075 | roll much (from profile feedback). It also turns on complete loop peeling |
| 8076 | (i.e. complete removal of loops with small constant number of iterations). |
| 8077 | .Sp |
| 8078 | Enabled with \fB\-fprofile\-use\fR. |
| 8079 | .IP "\fB\-fmove\-loop\-invariants\fR" 4 |
| 8080 | .IX Item "-fmove-loop-invariants" |
| 8081 | Enables the loop invariant motion pass in the \s-1RTL\s0 loop optimizer. Enabled |
| 8082 | at level \fB\-O1\fR |
| 8083 | .IP "\fB\-funswitch\-loops\fR" 4 |
| 8084 | .IX Item "-funswitch-loops" |
| 8085 | Move branches with loop invariant conditions out of the loop, with duplicates |
| 8086 | of the loop on both branches (modified according to result of the condition). |
| 8087 | .IP "\fB\-ffunction\-sections\fR" 4 |
| 8088 | .IX Item "-ffunction-sections" |
| 8089 | .PD 0 |
| 8090 | .IP "\fB\-fdata\-sections\fR" 4 |
| 8091 | .IX Item "-fdata-sections" |
| 8092 | .PD |
| 8093 | Place each function or data item into its own section in the output |
| 8094 | file if the target supports arbitrary sections. The name of the |
| 8095 | function or the name of the data item determines the section's name |
| 8096 | in the output file. |
| 8097 | .Sp |
| 8098 | Use these options on systems where the linker can perform optimizations |
| 8099 | to improve locality of reference in the instruction space. Most systems |
| 8100 | using the \s-1ELF\s0 object format and \s-1SPARC\s0 processors running Solaris 2 have |
| 8101 | linkers with such optimizations. \s-1AIX\s0 may have these optimizations in |
| 8102 | the future. |
| 8103 | .Sp |
| 8104 | Only use these options when there are significant benefits from doing |
| 8105 | so. When you specify these options, the assembler and linker |
| 8106 | create larger object and executable files and are also slower. |
| 8107 | You cannot use \f(CW\*(C`gprof\*(C'\fR on all systems if you |
| 8108 | specify this option, and you may have problems with debugging if |
| 8109 | you specify both this option and \fB\-g\fR. |
| 8110 | .IP "\fB\-fbranch\-target\-load\-optimize\fR" 4 |
| 8111 | .IX Item "-fbranch-target-load-optimize" |
| 8112 | Perform branch target register load optimization before prologue / epilogue |
| 8113 | threading. |
| 8114 | The use of target registers can typically be exposed only during reload, |
| 8115 | thus hoisting loads out of loops and doing inter-block scheduling needs |
| 8116 | a separate optimization pass. |
| 8117 | .IP "\fB\-fbranch\-target\-load\-optimize2\fR" 4 |
| 8118 | .IX Item "-fbranch-target-load-optimize2" |
| 8119 | Perform branch target register load optimization after prologue / epilogue |
| 8120 | threading. |
| 8121 | .IP "\fB\-fbtr\-bb\-exclusive\fR" 4 |
| 8122 | .IX Item "-fbtr-bb-exclusive" |
| 8123 | When performing branch target register load optimization, don't reuse |
| 8124 | branch target registers within any basic block. |
| 8125 | .IP "\fB\-fstack\-protector\fR" 4 |
| 8126 | .IX Item "-fstack-protector" |
| 8127 | Emit extra code to check for buffer overflows, such as stack smashing |
| 8128 | attacks. This is done by adding a guard variable to functions with |
| 8129 | vulnerable objects. This includes functions that call \f(CW\*(C`alloca\*(C'\fR, and |
| 8130 | functions with buffers larger than 8 bytes. The guards are initialized |
| 8131 | when a function is entered and then checked when the function exits. |
| 8132 | If a guard check fails, an error message is printed and the program exits. |
| 8133 | .IP "\fB\-fstack\-protector\-all\fR" 4 |
| 8134 | .IX Item "-fstack-protector-all" |
| 8135 | Like \fB\-fstack\-protector\fR except that all functions are protected. |
| 8136 | .IP "\fB\-fsection\-anchors\fR" 4 |
| 8137 | .IX Item "-fsection-anchors" |
| 8138 | Try to reduce the number of symbolic address calculations by using |
| 8139 | shared \*(L"anchor\*(R" symbols to address nearby objects. This transformation |
| 8140 | can help to reduce the number of \s-1GOT\s0 entries and \s-1GOT\s0 accesses on some |
| 8141 | targets. |
| 8142 | .Sp |
| 8143 | For example, the implementation of the following function \f(CW\*(C`foo\*(C'\fR: |
| 8144 | .Sp |
| 8145 | .Vb 2 |
| 8146 | \& static int a, b, c; |
| 8147 | \& int foo (void) { return a + b + c; } |
| 8148 | .Ve |
| 8149 | .Sp |
| 8150 | usually calculates the addresses of all three variables, but if you |
| 8151 | compile it with \fB\-fsection\-anchors\fR, it accesses the variables |
| 8152 | from a common anchor point instead. The effect is similar to the |
| 8153 | following pseudocode (which isn't valid C): |
| 8154 | .Sp |
| 8155 | .Vb 5 |
| 8156 | \& int foo (void) |
| 8157 | \& { |
| 8158 | \& register int *xr = &x; |
| 8159 | \& return xr[&a \- &x] + xr[&b \- &x] + xr[&c \- &x]; |
| 8160 | \& } |
| 8161 | .Ve |
| 8162 | .Sp |
| 8163 | Not all targets support this option. |
| 8164 | .IP "\fB\-\-param\fR \fIname\fR\fB=\fR\fIvalue\fR" 4 |
| 8165 | .IX Item "--param name=value" |
| 8166 | In some places, \s-1GCC\s0 uses various constants to control the amount of |
| 8167 | optimization that is done. For example, \s-1GCC\s0 does not inline functions |
| 8168 | that contain more than a certain number of instructions. You can |
| 8169 | control some of these constants on the command line using the |
| 8170 | \&\fB\-\-param\fR option. |
| 8171 | .Sp |
| 8172 | The names of specific parameters, and the meaning of the values, are |
| 8173 | tied to the internals of the compiler, and are subject to change |
| 8174 | without notice in future releases. |
| 8175 | .Sp |
| 8176 | In each case, the \fIvalue\fR is an integer. The allowable choices for |
| 8177 | \&\fIname\fR are: |
| 8178 | .RS 4 |
| 8179 | .IP "\fBpredictable-branch-outcome\fR" 4 |
| 8180 | .IX Item "predictable-branch-outcome" |
| 8181 | When branch is predicted to be taken with probability lower than this threshold |
| 8182 | (in percent), then it is considered well predictable. The default is 10. |
| 8183 | .IP "\fBmax-crossjump-edges\fR" 4 |
| 8184 | .IX Item "max-crossjump-edges" |
| 8185 | The maximum number of incoming edges to consider for cross-jumping. |
| 8186 | The algorithm used by \fB\-fcrossjumping\fR is O(N^2) in |
| 8187 | the number of edges incoming to each block. Increasing values mean |
| 8188 | more aggressive optimization, making the compilation time increase with |
| 8189 | probably small improvement in executable size. |
| 8190 | .IP "\fBmin-crossjump-insns\fR" 4 |
| 8191 | .IX Item "min-crossjump-insns" |
| 8192 | The minimum number of instructions that must be matched at the end |
| 8193 | of two blocks before cross-jumping is performed on them. This |
| 8194 | value is ignored in the case where all instructions in the block being |
| 8195 | cross-jumped from are matched. The default value is 5. |
| 8196 | .IP "\fBmax-grow-copy-bb-insns\fR" 4 |
| 8197 | .IX Item "max-grow-copy-bb-insns" |
| 8198 | The maximum code size expansion factor when copying basic blocks |
| 8199 | instead of jumping. The expansion is relative to a jump instruction. |
| 8200 | The default value is 8. |
| 8201 | .IP "\fBmax-goto-duplication-insns\fR" 4 |
| 8202 | .IX Item "max-goto-duplication-insns" |
| 8203 | The maximum number of instructions to duplicate to a block that jumps |
| 8204 | to a computed goto. To avoid O(N^2) behavior in a number of |
| 8205 | passes, \s-1GCC\s0 factors computed gotos early in the compilation process, |
| 8206 | and unfactors them as late as possible. Only computed jumps at the |
| 8207 | end of a basic blocks with no more than max-goto-duplication-insns are |
| 8208 | unfactored. The default value is 8. |
| 8209 | .IP "\fBmax-delay-slot-insn-search\fR" 4 |
| 8210 | .IX Item "max-delay-slot-insn-search" |
| 8211 | The maximum number of instructions to consider when looking for an |
| 8212 | instruction to fill a delay slot. If more than this arbitrary number of |
| 8213 | instructions are searched, the time savings from filling the delay slot |
| 8214 | are minimal, so stop searching. Increasing values mean more |
| 8215 | aggressive optimization, making the compilation time increase with probably |
| 8216 | small improvement in execution time. |
| 8217 | .IP "\fBmax-delay-slot-live-search\fR" 4 |
| 8218 | .IX Item "max-delay-slot-live-search" |
| 8219 | When trying to fill delay slots, the maximum number of instructions to |
| 8220 | consider when searching for a block with valid live register |
| 8221 | information. Increasing this arbitrarily chosen value means more |
| 8222 | aggressive optimization, increasing the compilation time. This parameter |
| 8223 | should be removed when the delay slot code is rewritten to maintain the |
| 8224 | control-flow graph. |
| 8225 | .IP "\fBmax-gcse-memory\fR" 4 |
| 8226 | .IX Item "max-gcse-memory" |
| 8227 | The approximate maximum amount of memory that can be allocated in |
| 8228 | order to perform the global common subexpression elimination |
| 8229 | optimization. If more memory than specified is required, the |
| 8230 | optimization is not done. |
| 8231 | .IP "\fBmax-gcse-insertion-ratio\fR" 4 |
| 8232 | .IX Item "max-gcse-insertion-ratio" |
| 8233 | If the ratio of expression insertions to deletions is larger than this value |
| 8234 | for any expression, then \s-1RTL\s0 \s-1PRE\s0 inserts or removes the expression and thus |
| 8235 | leaves partially redundant computations in the instruction stream. The default value is 20. |
| 8236 | .IP "\fBmax-pending-list-length\fR" 4 |
| 8237 | .IX Item "max-pending-list-length" |
| 8238 | The maximum number of pending dependencies scheduling allows |
| 8239 | before flushing the current state and starting over. Large functions |
| 8240 | with few branches or calls can create excessively large lists which |
| 8241 | needlessly consume memory and resources. |
| 8242 | .IP "\fBmax-modulo-backtrack-attempts\fR" 4 |
| 8243 | .IX Item "max-modulo-backtrack-attempts" |
| 8244 | The maximum number of backtrack attempts the scheduler should make |
| 8245 | when modulo scheduling a loop. Larger values can exponentially increase |
| 8246 | compilation time. |
| 8247 | .IP "\fBmax-inline-insns-single\fR" 4 |
| 8248 | .IX Item "max-inline-insns-single" |
| 8249 | Several parameters control the tree inliner used in \s-1GCC\s0. |
| 8250 | This number sets the maximum number of instructions (counted in \s-1GCC\s0's |
| 8251 | internal representation) in a single function that the tree inliner |
| 8252 | considers for inlining. This only affects functions declared |
| 8253 | inline and methods implemented in a class declaration (\*(C+). |
| 8254 | The default value is 400. |
| 8255 | .IP "\fBmax-inline-insns-auto\fR" 4 |
| 8256 | .IX Item "max-inline-insns-auto" |
| 8257 | When you use \fB\-finline\-functions\fR (included in \fB\-O3\fR), |
| 8258 | a lot of functions that would otherwise not be considered for inlining |
| 8259 | by the compiler are investigated. To those functions, a different |
| 8260 | (more restrictive) limit compared to functions declared inline can |
| 8261 | be applied. |
| 8262 | The default value is 40. |
| 8263 | .IP "\fBinline-min-speedup\fR" 4 |
| 8264 | .IX Item "inline-min-speedup" |
| 8265 | When estimated performance improvement of caller + callee runtime exceeds this |
| 8266 | threshold (in precent), the function can be inlined regardless the limit on |
| 8267 | \&\fB\-\-param max-inline-insns-single\fR and \fB\-\-param |
| 8268 | max-inline-insns-auto\fR. |
| 8269 | .IP "\fBlarge-function-insns\fR" 4 |
| 8270 | .IX Item "large-function-insns" |
| 8271 | The limit specifying really large functions. For functions larger than this |
| 8272 | limit after inlining, inlining is constrained by |
| 8273 | \&\fB\-\-param large-function-growth\fR. This parameter is useful primarily |
| 8274 | to avoid extreme compilation time caused by non-linear algorithms used by the |
| 8275 | back end. |
| 8276 | The default value is 2700. |
| 8277 | .IP "\fBlarge-function-growth\fR" 4 |
| 8278 | .IX Item "large-function-growth" |
| 8279 | Specifies maximal growth of large function caused by inlining in percents. |
| 8280 | The default value is 100 which limits large function growth to 2.0 times |
| 8281 | the original size. |
| 8282 | .IP "\fBlarge-unit-insns\fR" 4 |
| 8283 | .IX Item "large-unit-insns" |
| 8284 | The limit specifying large translation unit. Growth caused by inlining of |
| 8285 | units larger than this limit is limited by \fB\-\-param inline-unit-growth\fR. |
| 8286 | For small units this might be too tight. |
| 8287 | For example, consider a unit consisting of function A |
| 8288 | that is inline and B that just calls A three times. If B is small relative to |
| 8289 | A, the growth of unit is 300\e% and yet such inlining is very sane. For very |
| 8290 | large units consisting of small inlineable functions, however, the overall unit |
| 8291 | growth limit is needed to avoid exponential explosion of code size. Thus for |
| 8292 | smaller units, the size is increased to \fB\-\-param large-unit-insns\fR |
| 8293 | before applying \fB\-\-param inline-unit-growth\fR. The default is 10000. |
| 8294 | .IP "\fBinline-unit-growth\fR" 4 |
| 8295 | .IX Item "inline-unit-growth" |
| 8296 | Specifies maximal overall growth of the compilation unit caused by inlining. |
| 8297 | The default value is 30 which limits unit growth to 1.3 times the original |
| 8298 | size. |
| 8299 | .IP "\fBipcp-unit-growth\fR" 4 |
| 8300 | .IX Item "ipcp-unit-growth" |
| 8301 | Specifies maximal overall growth of the compilation unit caused by |
| 8302 | interprocedural constant propagation. The default value is 10 which limits |
| 8303 | unit growth to 1.1 times the original size. |
| 8304 | .IP "\fBlarge-stack-frame\fR" 4 |
| 8305 | .IX Item "large-stack-frame" |
| 8306 | The limit specifying large stack frames. While inlining the algorithm is trying |
| 8307 | to not grow past this limit too much. The default value is 256 bytes. |
| 8308 | .IP "\fBlarge-stack-frame-growth\fR" 4 |
| 8309 | .IX Item "large-stack-frame-growth" |
| 8310 | Specifies maximal growth of large stack frames caused by inlining in percents. |
| 8311 | The default value is 1000 which limits large stack frame growth to 11 times |
| 8312 | the original size. |
| 8313 | .IP "\fBmax-inline-insns-recursive\fR" 4 |
| 8314 | .IX Item "max-inline-insns-recursive" |
| 8315 | .PD 0 |
| 8316 | .IP "\fBmax-inline-insns-recursive-auto\fR" 4 |
| 8317 | .IX Item "max-inline-insns-recursive-auto" |
| 8318 | .PD |
| 8319 | Specifies the maximum number of instructions an out-of-line copy of a |
| 8320 | self-recursive inline |
| 8321 | function can grow into by performing recursive inlining. |
| 8322 | .Sp |
| 8323 | For functions declared inline, \fB\-\-param max-inline-insns-recursive\fR is |
| 8324 | taken into account. For functions not declared inline, recursive inlining |
| 8325 | happens only when \fB\-finline\-functions\fR (included in \fB\-O3\fR) is |
| 8326 | enabled and \fB\-\-param max-inline-insns-recursive-auto\fR is used. The |
| 8327 | default value is 450. |
| 8328 | .IP "\fBmax-inline-recursive-depth\fR" 4 |
| 8329 | .IX Item "max-inline-recursive-depth" |
| 8330 | .PD 0 |
| 8331 | .IP "\fBmax-inline-recursive-depth-auto\fR" 4 |
| 8332 | .IX Item "max-inline-recursive-depth-auto" |
| 8333 | .PD |
| 8334 | Specifies the maximum recursion depth used for recursive inlining. |
| 8335 | .Sp |
| 8336 | For functions declared inline, \fB\-\-param max-inline-recursive-depth\fR is |
| 8337 | taken into account. For functions not declared inline, recursive inlining |
| 8338 | happens only when \fB\-finline\-functions\fR (included in \fB\-O3\fR) is |
| 8339 | enabled and \fB\-\-param max-inline-recursive-depth-auto\fR is used. The |
| 8340 | default value is 8. |
| 8341 | .IP "\fBmin-inline-recursive-probability\fR" 4 |
| 8342 | .IX Item "min-inline-recursive-probability" |
| 8343 | Recursive inlining is profitable only for function having deep recursion |
| 8344 | in average and can hurt for function having little recursion depth by |
| 8345 | increasing the prologue size or complexity of function body to other |
| 8346 | optimizers. |
| 8347 | .Sp |
| 8348 | When profile feedback is available (see \fB\-fprofile\-generate\fR) the actual |
| 8349 | recursion depth can be guessed from probability that function recurses via a |
| 8350 | given call expression. This parameter limits inlining only to call expressions |
| 8351 | whose probability exceeds the given threshold (in percents). |
| 8352 | The default value is 10. |
| 8353 | .IP "\fBearly-inlining-insns\fR" 4 |
| 8354 | .IX Item "early-inlining-insns" |
| 8355 | Specify growth that the early inliner can make. In effect it increases |
| 8356 | the amount of inlining for code having a large abstraction penalty. |
| 8357 | The default value is 10. |
| 8358 | .IP "\fBmax-early-inliner-iterations\fR" 4 |
| 8359 | .IX Item "max-early-inliner-iterations" |
| 8360 | .PD 0 |
| 8361 | .IP "\fBmax-early-inliner-iterations\fR" 4 |
| 8362 | .IX Item "max-early-inliner-iterations" |
| 8363 | .PD |
| 8364 | Limit of iterations of the early inliner. This basically bounds |
| 8365 | the number of nested indirect calls the early inliner can resolve. |
| 8366 | Deeper chains are still handled by late inlining. |
| 8367 | .IP "\fBcomdat-sharing-probability\fR" 4 |
| 8368 | .IX Item "comdat-sharing-probability" |
| 8369 | .PD 0 |
| 8370 | .IP "\fBcomdat-sharing-probability\fR" 4 |
| 8371 | .IX Item "comdat-sharing-probability" |
| 8372 | .PD |
| 8373 | Probability (in percent) that \*(C+ inline function with comdat visibility |
| 8374 | are shared across multiple compilation units. The default value is 20. |
| 8375 | .IP "\fBmin-vect-loop-bound\fR" 4 |
| 8376 | .IX Item "min-vect-loop-bound" |
| 8377 | The minimum number of iterations under which loops are not vectorized |
| 8378 | when \fB\-ftree\-vectorize\fR is used. The number of iterations after |
| 8379 | vectorization needs to be greater than the value specified by this option |
| 8380 | to allow vectorization. The default value is 0. |
| 8381 | .IP "\fBgcse-cost-distance-ratio\fR" 4 |
| 8382 | .IX Item "gcse-cost-distance-ratio" |
| 8383 | Scaling factor in calculation of maximum distance an expression |
| 8384 | can be moved by \s-1GCSE\s0 optimizations. This is currently supported only in the |
| 8385 | code hoisting pass. The bigger the ratio, the more aggressive code hoisting |
| 8386 | is with simple expressions, i.e., the expressions that have cost |
| 8387 | less than \fBgcse-unrestricted-cost\fR. Specifying 0 disables |
| 8388 | hoisting of simple expressions. The default value is 10. |
| 8389 | .IP "\fBgcse-unrestricted-cost\fR" 4 |
| 8390 | .IX Item "gcse-unrestricted-cost" |
| 8391 | Cost, roughly measured as the cost of a single typical machine |
| 8392 | instruction, at which \s-1GCSE\s0 optimizations do not constrain |
| 8393 | the distance an expression can travel. This is currently |
| 8394 | supported only in the code hoisting pass. The lesser the cost, |
| 8395 | the more aggressive code hoisting is. Specifying 0 |
| 8396 | allows all expressions to travel unrestricted distances. |
| 8397 | The default value is 3. |
| 8398 | .IP "\fBmax-hoist-depth\fR" 4 |
| 8399 | .IX Item "max-hoist-depth" |
| 8400 | The depth of search in the dominator tree for expressions to hoist. |
| 8401 | This is used to avoid quadratic behavior in hoisting algorithm. |
| 8402 | The value of 0 does not limit on the search, but may slow down compilation |
| 8403 | of huge functions. The default value is 30. |
| 8404 | .IP "\fBmax-tail-merge-comparisons\fR" 4 |
| 8405 | .IX Item "max-tail-merge-comparisons" |
| 8406 | The maximum amount of similar bbs to compare a bb with. This is used to |
| 8407 | avoid quadratic behavior in tree tail merging. The default value is 10. |
| 8408 | .IP "\fBmax-tail-merge-iterations\fR" 4 |
| 8409 | .IX Item "max-tail-merge-iterations" |
| 8410 | The maximum amount of iterations of the pass over the function. This is used to |
| 8411 | limit compilation time in tree tail merging. The default value is 2. |
| 8412 | .IP "\fBmax-unrolled-insns\fR" 4 |
| 8413 | .IX Item "max-unrolled-insns" |
| 8414 | The maximum number of instructions that a loop may have to be unrolled. |
| 8415 | If a loop is unrolled, this parameter also determines how many times |
| 8416 | the loop code is unrolled. |
| 8417 | .IP "\fBmax-average-unrolled-insns\fR" 4 |
| 8418 | .IX Item "max-average-unrolled-insns" |
| 8419 | The maximum number of instructions biased by probabilities of their execution |
| 8420 | that a loop may have to be unrolled. If a loop is unrolled, |
| 8421 | this parameter also determines how many times the loop code is unrolled. |
| 8422 | .IP "\fBmax-unroll-times\fR" 4 |
| 8423 | .IX Item "max-unroll-times" |
| 8424 | The maximum number of unrollings of a single loop. |
| 8425 | .IP "\fBmax-peeled-insns\fR" 4 |
| 8426 | .IX Item "max-peeled-insns" |
| 8427 | The maximum number of instructions that a loop may have to be peeled. |
| 8428 | If a loop is peeled, this parameter also determines how many times |
| 8429 | the loop code is peeled. |
| 8430 | .IP "\fBmax-peel-times\fR" 4 |
| 8431 | .IX Item "max-peel-times" |
| 8432 | The maximum number of peelings of a single loop. |
| 8433 | .IP "\fBmax-peel-branches\fR" 4 |
| 8434 | .IX Item "max-peel-branches" |
| 8435 | The maximum number of branches on the hot path through the peeled sequence. |
| 8436 | .IP "\fBmax-completely-peeled-insns\fR" 4 |
| 8437 | .IX Item "max-completely-peeled-insns" |
| 8438 | The maximum number of insns of a completely peeled loop. |
| 8439 | .IP "\fBmax-completely-peel-times\fR" 4 |
| 8440 | .IX Item "max-completely-peel-times" |
| 8441 | The maximum number of iterations of a loop to be suitable for complete peeling. |
| 8442 | .IP "\fBmax-completely-peel-loop-nest-depth\fR" 4 |
| 8443 | .IX Item "max-completely-peel-loop-nest-depth" |
| 8444 | The maximum depth of a loop nest suitable for complete peeling. |
| 8445 | .IP "\fBmax-unswitch-insns\fR" 4 |
| 8446 | .IX Item "max-unswitch-insns" |
| 8447 | The maximum number of insns of an unswitched loop. |
| 8448 | .IP "\fBmax-unswitch-level\fR" 4 |
| 8449 | .IX Item "max-unswitch-level" |
| 8450 | The maximum number of branches unswitched in a single loop. |
| 8451 | .IP "\fBlim-expensive\fR" 4 |
| 8452 | .IX Item "lim-expensive" |
| 8453 | The minimum cost of an expensive expression in the loop invariant motion. |
| 8454 | .IP "\fBiv-consider-all-candidates-bound\fR" 4 |
| 8455 | .IX Item "iv-consider-all-candidates-bound" |
| 8456 | Bound on number of candidates for induction variables, below which |
| 8457 | all candidates are considered for each use in induction variable |
| 8458 | optimizations. If there are more candidates than this, |
| 8459 | only the most relevant ones are considered to avoid quadratic time complexity. |
| 8460 | .IP "\fBiv-max-considered-uses\fR" 4 |
| 8461 | .IX Item "iv-max-considered-uses" |
| 8462 | The induction variable optimizations give up on loops that contain more |
| 8463 | induction variable uses. |
| 8464 | .IP "\fBiv-always-prune-cand-set-bound\fR" 4 |
| 8465 | .IX Item "iv-always-prune-cand-set-bound" |
| 8466 | If the number of candidates in the set is smaller than this value, |
| 8467 | always try to remove unnecessary ivs from the set |
| 8468 | when adding a new one. |
| 8469 | .IP "\fBscev-max-expr-size\fR" 4 |
| 8470 | .IX Item "scev-max-expr-size" |
| 8471 | Bound on size of expressions used in the scalar evolutions analyzer. |
| 8472 | Large expressions slow the analyzer. |
| 8473 | .IP "\fBscev-max-expr-complexity\fR" 4 |
| 8474 | .IX Item "scev-max-expr-complexity" |
| 8475 | Bound on the complexity of the expressions in the scalar evolutions analyzer. |
| 8476 | Complex expressions slow the analyzer. |
| 8477 | .IP "\fBomega-max-vars\fR" 4 |
| 8478 | .IX Item "omega-max-vars" |
| 8479 | The maximum number of variables in an Omega constraint system. |
| 8480 | The default value is 128. |
| 8481 | .IP "\fBomega-max-geqs\fR" 4 |
| 8482 | .IX Item "omega-max-geqs" |
| 8483 | The maximum number of inequalities in an Omega constraint system. |
| 8484 | The default value is 256. |
| 8485 | .IP "\fBomega-max-eqs\fR" 4 |
| 8486 | .IX Item "omega-max-eqs" |
| 8487 | The maximum number of equalities in an Omega constraint system. |
| 8488 | The default value is 128. |
| 8489 | .IP "\fBomega-max-wild-cards\fR" 4 |
| 8490 | .IX Item "omega-max-wild-cards" |
| 8491 | The maximum number of wildcard variables that the Omega solver is |
| 8492 | able to insert. The default value is 18. |
| 8493 | .IP "\fBomega-hash-table-size\fR" 4 |
| 8494 | .IX Item "omega-hash-table-size" |
| 8495 | The size of the hash table in the Omega solver. The default value is |
| 8496 | 550. |
| 8497 | .IP "\fBomega-max-keys\fR" 4 |
| 8498 | .IX Item "omega-max-keys" |
| 8499 | The maximal number of keys used by the Omega solver. The default |
| 8500 | value is 500. |
| 8501 | .IP "\fBomega-eliminate-redundant-constraints\fR" 4 |
| 8502 | .IX Item "omega-eliminate-redundant-constraints" |
| 8503 | When set to 1, use expensive methods to eliminate all redundant |
| 8504 | constraints. The default value is 0. |
| 8505 | .IP "\fBvect-max-version-for-alignment-checks\fR" 4 |
| 8506 | .IX Item "vect-max-version-for-alignment-checks" |
| 8507 | The maximum number of run-time checks that can be performed when |
| 8508 | doing loop versioning for alignment in the vectorizer. See option |
| 8509 | \&\fB\-ftree\-vect\-loop\-version\fR for more information. |
| 8510 | .IP "\fBvect-max-version-for-alias-checks\fR" 4 |
| 8511 | .IX Item "vect-max-version-for-alias-checks" |
| 8512 | The maximum number of run-time checks that can be performed when |
| 8513 | doing loop versioning for alias in the vectorizer. See option |
| 8514 | \&\fB\-ftree\-vect\-loop\-version\fR for more information. |
| 8515 | .IP "\fBmax-iterations-to-track\fR" 4 |
| 8516 | .IX Item "max-iterations-to-track" |
| 8517 | The maximum number of iterations of a loop the brute-force algorithm |
| 8518 | for analysis of the number of iterations of the loop tries to evaluate. |
| 8519 | .IP "\fBhot-bb-count-ws-permille\fR" 4 |
| 8520 | .IX Item "hot-bb-count-ws-permille" |
| 8521 | A basic block profile count is considered hot if it contributes to |
| 8522 | the given permillage (i.e. 0...1000) of the entire profiled execution. |
| 8523 | .IP "\fBhot-bb-frequency-fraction\fR" 4 |
| 8524 | .IX Item "hot-bb-frequency-fraction" |
| 8525 | Select fraction of the entry block frequency of executions of basic block in |
| 8526 | function given basic block needs to have to be considered hot. |
| 8527 | .IP "\fBmax-predicted-iterations\fR" 4 |
| 8528 | .IX Item "max-predicted-iterations" |
| 8529 | The maximum number of loop iterations we predict statically. This is useful |
| 8530 | in cases where a function contains a single loop with known bound and |
| 8531 | another loop with unknown bound. |
| 8532 | The known number of iterations is predicted correctly, while |
| 8533 | the unknown number of iterations average to roughly 10. This means that the |
| 8534 | loop without bounds appears artificially cold relative to the other one. |
| 8535 | .IP "\fBalign-threshold\fR" 4 |
| 8536 | .IX Item "align-threshold" |
| 8537 | Select fraction of the maximal frequency of executions of a basic block in |
| 8538 | a function to align the basic block. |
| 8539 | .IP "\fBalign-loop-iterations\fR" 4 |
| 8540 | .IX Item "align-loop-iterations" |
| 8541 | A loop expected to iterate at least the selected number of iterations is |
| 8542 | aligned. |
| 8543 | .IP "\fBtracer-dynamic-coverage\fR" 4 |
| 8544 | .IX Item "tracer-dynamic-coverage" |
| 8545 | .PD 0 |
| 8546 | .IP "\fBtracer-dynamic-coverage-feedback\fR" 4 |
| 8547 | .IX Item "tracer-dynamic-coverage-feedback" |
| 8548 | .PD |
| 8549 | This value is used to limit superblock formation once the given percentage of |
| 8550 | executed instructions is covered. This limits unnecessary code size |
| 8551 | expansion. |
| 8552 | .Sp |
| 8553 | The \fBtracer-dynamic-coverage-feedback\fR is used only when profile |
| 8554 | feedback is available. The real profiles (as opposed to statically estimated |
| 8555 | ones) are much less balanced allowing the threshold to be larger value. |
| 8556 | .IP "\fBtracer-max-code-growth\fR" 4 |
| 8557 | .IX Item "tracer-max-code-growth" |
| 8558 | Stop tail duplication once code growth has reached given percentage. This is |
| 8559 | a rather artificial limit, as most of the duplicates are eliminated later in |
| 8560 | cross jumping, so it may be set to much higher values than is the desired code |
| 8561 | growth. |
| 8562 | .IP "\fBtracer-min-branch-ratio\fR" 4 |
| 8563 | .IX Item "tracer-min-branch-ratio" |
| 8564 | Stop reverse growth when the reverse probability of best edge is less than this |
| 8565 | threshold (in percent). |
| 8566 | .IP "\fBtracer-min-branch-ratio\fR" 4 |
| 8567 | .IX Item "tracer-min-branch-ratio" |
| 8568 | .PD 0 |
| 8569 | .IP "\fBtracer-min-branch-ratio-feedback\fR" 4 |
| 8570 | .IX Item "tracer-min-branch-ratio-feedback" |
| 8571 | .PD |
| 8572 | Stop forward growth if the best edge has probability lower than this |
| 8573 | threshold. |
| 8574 | .Sp |
| 8575 | Similarly to \fBtracer-dynamic-coverage\fR two values are present, one for |
| 8576 | compilation for profile feedback and one for compilation without. The value |
| 8577 | for compilation with profile feedback needs to be more conservative (higher) in |
| 8578 | order to make tracer effective. |
| 8579 | .IP "\fBmax-cse-path-length\fR" 4 |
| 8580 | .IX Item "max-cse-path-length" |
| 8581 | The maximum number of basic blocks on path that \s-1CSE\s0 considers. |
| 8582 | The default is 10. |
| 8583 | .IP "\fBmax-cse-insns\fR" 4 |
| 8584 | .IX Item "max-cse-insns" |
| 8585 | The maximum number of instructions \s-1CSE\s0 processes before flushing. |
| 8586 | The default is 1000. |
| 8587 | .IP "\fBggc-min-expand\fR" 4 |
| 8588 | .IX Item "ggc-min-expand" |
| 8589 | \&\s-1GCC\s0 uses a garbage collector to manage its own memory allocation. This |
| 8590 | parameter specifies the minimum percentage by which the garbage |
| 8591 | collector's heap should be allowed to expand between collections. |
| 8592 | Tuning this may improve compilation speed; it has no effect on code |
| 8593 | generation. |
| 8594 | .Sp |
| 8595 | The default is 30% + 70% * (\s-1RAM/1GB\s0) with an upper bound of 100% when |
| 8596 | \&\s-1RAM\s0 >= 1GB. If \f(CW\*(C`getrlimit\*(C'\fR is available, the notion of \*(L"\s-1RAM\s0\*(R" is |
| 8597 | the smallest of actual \s-1RAM\s0 and \f(CW\*(C`RLIMIT_DATA\*(C'\fR or \f(CW\*(C`RLIMIT_AS\*(C'\fR. If |
| 8598 | \&\s-1GCC\s0 is not able to calculate \s-1RAM\s0 on a particular platform, the lower |
| 8599 | bound of 30% is used. Setting this parameter and |
| 8600 | \&\fBggc-min-heapsize\fR to zero causes a full collection to occur at |
| 8601 | every opportunity. This is extremely slow, but can be useful for |
| 8602 | debugging. |
| 8603 | .IP "\fBggc-min-heapsize\fR" 4 |
| 8604 | .IX Item "ggc-min-heapsize" |
| 8605 | Minimum size of the garbage collector's heap before it begins bothering |
| 8606 | to collect garbage. The first collection occurs after the heap expands |
| 8607 | by \fBggc-min-expand\fR% beyond \fBggc-min-heapsize\fR. Again, |
| 8608 | tuning this may improve compilation speed, and has no effect on code |
| 8609 | generation. |
| 8610 | .Sp |
| 8611 | The default is the smaller of \s-1RAM/8\s0, \s-1RLIMIT_RSS\s0, or a limit that |
| 8612 | tries to ensure that \s-1RLIMIT_DATA\s0 or \s-1RLIMIT_AS\s0 are not exceeded, but |
| 8613 | with a lower bound of 4096 (four megabytes) and an upper bound of |
| 8614 | 131072 (128 megabytes). If \s-1GCC\s0 is not able to calculate \s-1RAM\s0 on a |
| 8615 | particular platform, the lower bound is used. Setting this parameter |
| 8616 | very large effectively disables garbage collection. Setting this |
| 8617 | parameter and \fBggc-min-expand\fR to zero causes a full collection |
| 8618 | to occur at every opportunity. |
| 8619 | .IP "\fBmax-reload-search-insns\fR" 4 |
| 8620 | .IX Item "max-reload-search-insns" |
| 8621 | The maximum number of instruction reload should look backward for equivalent |
| 8622 | register. Increasing values mean more aggressive optimization, making the |
| 8623 | compilation time increase with probably slightly better performance. |
| 8624 | The default value is 100. |
| 8625 | .IP "\fBmax-cselib-memory-locations\fR" 4 |
| 8626 | .IX Item "max-cselib-memory-locations" |
| 8627 | The maximum number of memory locations cselib should take into account. |
| 8628 | Increasing values mean more aggressive optimization, making the compilation time |
| 8629 | increase with probably slightly better performance. The default value is 500. |
| 8630 | .IP "\fBreorder-blocks-duplicate\fR" 4 |
| 8631 | .IX Item "reorder-blocks-duplicate" |
| 8632 | .PD 0 |
| 8633 | .IP "\fBreorder-blocks-duplicate-feedback\fR" 4 |
| 8634 | .IX Item "reorder-blocks-duplicate-feedback" |
| 8635 | .PD |
| 8636 | Used by the basic block reordering pass to decide whether to use unconditional |
| 8637 | branch or duplicate the code on its destination. Code is duplicated when its |
| 8638 | estimated size is smaller than this value multiplied by the estimated size of |
| 8639 | unconditional jump in the hot spots of the program. |
| 8640 | .Sp |
| 8641 | The \fBreorder-block-duplicate-feedback\fR is used only when profile |
| 8642 | feedback is available. It may be set to higher values than |
| 8643 | \&\fBreorder-block-duplicate\fR since information about the hot spots is more |
| 8644 | accurate. |
| 8645 | .IP "\fBmax-sched-ready-insns\fR" 4 |
| 8646 | .IX Item "max-sched-ready-insns" |
| 8647 | The maximum number of instructions ready to be issued the scheduler should |
| 8648 | consider at any given time during the first scheduling pass. Increasing |
| 8649 | values mean more thorough searches, making the compilation time increase |
| 8650 | with probably little benefit. The default value is 100. |
| 8651 | .IP "\fBmax-sched-region-blocks\fR" 4 |
| 8652 | .IX Item "max-sched-region-blocks" |
| 8653 | The maximum number of blocks in a region to be considered for |
| 8654 | interblock scheduling. The default value is 10. |
| 8655 | .IP "\fBmax-pipeline-region-blocks\fR" 4 |
| 8656 | .IX Item "max-pipeline-region-blocks" |
| 8657 | The maximum number of blocks in a region to be considered for |
| 8658 | pipelining in the selective scheduler. The default value is 15. |
| 8659 | .IP "\fBmax-sched-region-insns\fR" 4 |
| 8660 | .IX Item "max-sched-region-insns" |
| 8661 | The maximum number of insns in a region to be considered for |
| 8662 | interblock scheduling. The default value is 100. |
| 8663 | .IP "\fBmax-pipeline-region-insns\fR" 4 |
| 8664 | .IX Item "max-pipeline-region-insns" |
| 8665 | The maximum number of insns in a region to be considered for |
| 8666 | pipelining in the selective scheduler. The default value is 200. |
| 8667 | .IP "\fBmin-spec-prob\fR" 4 |
| 8668 | .IX Item "min-spec-prob" |
| 8669 | The minimum probability (in percents) of reaching a source block |
| 8670 | for interblock speculative scheduling. The default value is 40. |
| 8671 | .IP "\fBmax-sched-extend-regions-iters\fR" 4 |
| 8672 | .IX Item "max-sched-extend-regions-iters" |
| 8673 | The maximum number of iterations through \s-1CFG\s0 to extend regions. |
| 8674 | A value of 0 (the default) disables region extensions. |
| 8675 | .IP "\fBmax-sched-insn-conflict-delay\fR" 4 |
| 8676 | .IX Item "max-sched-insn-conflict-delay" |
| 8677 | The maximum conflict delay for an insn to be considered for speculative motion. |
| 8678 | The default value is 3. |
| 8679 | .IP "\fBsched-spec-prob-cutoff\fR" 4 |
| 8680 | .IX Item "sched-spec-prob-cutoff" |
| 8681 | The minimal probability of speculation success (in percents), so that |
| 8682 | speculative insns are scheduled. |
| 8683 | The default value is 40. |
| 8684 | .IP "\fBsched-spec-state-edge-prob-cutoff\fR" 4 |
| 8685 | .IX Item "sched-spec-state-edge-prob-cutoff" |
| 8686 | The minimum probability an edge must have for the scheduler to save its |
| 8687 | state across it. |
| 8688 | The default value is 10. |
| 8689 | .IP "\fBsched-mem-true-dep-cost\fR" 4 |
| 8690 | .IX Item "sched-mem-true-dep-cost" |
| 8691 | Minimal distance (in \s-1CPU\s0 cycles) between store and load targeting same |
| 8692 | memory locations. The default value is 1. |
| 8693 | .IP "\fBselsched-max-lookahead\fR" 4 |
| 8694 | .IX Item "selsched-max-lookahead" |
| 8695 | The maximum size of the lookahead window of selective scheduling. It is a |
| 8696 | depth of search for available instructions. |
| 8697 | The default value is 50. |
| 8698 | .IP "\fBselsched-max-sched-times\fR" 4 |
| 8699 | .IX Item "selsched-max-sched-times" |
| 8700 | The maximum number of times that an instruction is scheduled during |
| 8701 | selective scheduling. This is the limit on the number of iterations |
| 8702 | through which the instruction may be pipelined. The default value is 2. |
| 8703 | .IP "\fBselsched-max-insns-to-rename\fR" 4 |
| 8704 | .IX Item "selsched-max-insns-to-rename" |
| 8705 | The maximum number of best instructions in the ready list that are considered |
| 8706 | for renaming in the selective scheduler. The default value is 2. |
| 8707 | .IP "\fBsms-min-sc\fR" 4 |
| 8708 | .IX Item "sms-min-sc" |
| 8709 | The minimum value of stage count that swing modulo scheduler |
| 8710 | generates. The default value is 2. |
| 8711 | .IP "\fBmax-last-value-rtl\fR" 4 |
| 8712 | .IX Item "max-last-value-rtl" |
| 8713 | The maximum size measured as number of RTLs that can be recorded in an expression |
| 8714 | in combiner for a pseudo register as last known value of that register. The default |
| 8715 | is 10000. |
| 8716 | .IP "\fBinteger-share-limit\fR" 4 |
| 8717 | .IX Item "integer-share-limit" |
| 8718 | Small integer constants can use a shared data structure, reducing the |
| 8719 | compiler's memory usage and increasing its speed. This sets the maximum |
| 8720 | value of a shared integer constant. The default value is 256. |
| 8721 | .IP "\fBssp-buffer-size\fR" 4 |
| 8722 | .IX Item "ssp-buffer-size" |
| 8723 | The minimum size of buffers (i.e. arrays) that receive stack smashing |
| 8724 | protection when \fB\-fstack\-protection\fR is used. |
| 8725 | .IP "\fBmax-jump-thread-duplication-stmts\fR" 4 |
| 8726 | .IX Item "max-jump-thread-duplication-stmts" |
| 8727 | Maximum number of statements allowed in a block that needs to be |
| 8728 | duplicated when threading jumps. |
| 8729 | .IP "\fBmax-fields-for-field-sensitive\fR" 4 |
| 8730 | .IX Item "max-fields-for-field-sensitive" |
| 8731 | Maximum number of fields in a structure treated in |
| 8732 | a field sensitive manner during pointer analysis. The default is zero |
| 8733 | for \fB\-O0\fR and \fB\-O1\fR, |
| 8734 | and 100 for \fB\-Os\fR, \fB\-O2\fR, and \fB\-O3\fR. |
| 8735 | .IP "\fBprefetch-latency\fR" 4 |
| 8736 | .IX Item "prefetch-latency" |
| 8737 | Estimate on average number of instructions that are executed before |
| 8738 | prefetch finishes. The distance prefetched ahead is proportional |
| 8739 | to this constant. Increasing this number may also lead to less |
| 8740 | streams being prefetched (see \fBsimultaneous-prefetches\fR). |
| 8741 | .IP "\fBsimultaneous-prefetches\fR" 4 |
| 8742 | .IX Item "simultaneous-prefetches" |
| 8743 | Maximum number of prefetches that can run at the same time. |
| 8744 | .IP "\fBl1\-cache\-line\-size\fR" 4 |
| 8745 | .IX Item "l1-cache-line-size" |
| 8746 | The size of cache line in L1 cache, in bytes. |
| 8747 | .IP "\fBl1\-cache\-size\fR" 4 |
| 8748 | .IX Item "l1-cache-size" |
| 8749 | The size of L1 cache, in kilobytes. |
| 8750 | .IP "\fBl2\-cache\-size\fR" 4 |
| 8751 | .IX Item "l2-cache-size" |
| 8752 | The size of L2 cache, in kilobytes. |
| 8753 | .IP "\fBmin-insn-to-prefetch-ratio\fR" 4 |
| 8754 | .IX Item "min-insn-to-prefetch-ratio" |
| 8755 | The minimum ratio between the number of instructions and the |
| 8756 | number of prefetches to enable prefetching in a loop. |
| 8757 | .IP "\fBprefetch-min-insn-to-mem-ratio\fR" 4 |
| 8758 | .IX Item "prefetch-min-insn-to-mem-ratio" |
| 8759 | The minimum ratio between the number of instructions and the |
| 8760 | number of memory references to enable prefetching in a loop. |
| 8761 | .IP "\fBuse-canonical-types\fR" 4 |
| 8762 | .IX Item "use-canonical-types" |
| 8763 | Whether the compiler should use the \*(L"canonical\*(R" type system. By |
| 8764 | default, this should always be 1, which uses a more efficient internal |
| 8765 | mechanism for comparing types in \*(C+ and Objective\-\*(C+. However, if |
| 8766 | bugs in the canonical type system are causing compilation failures, |
| 8767 | set this value to 0 to disable canonical types. |
| 8768 | .IP "\fBswitch-conversion-max-branch-ratio\fR" 4 |
| 8769 | .IX Item "switch-conversion-max-branch-ratio" |
| 8770 | Switch initialization conversion refuses to create arrays that are |
| 8771 | bigger than \fBswitch-conversion-max-branch-ratio\fR times the number of |
| 8772 | branches in the switch. |
| 8773 | .IP "\fBmax-partial-antic-length\fR" 4 |
| 8774 | .IX Item "max-partial-antic-length" |
| 8775 | Maximum length of the partial antic set computed during the tree |
| 8776 | partial redundancy elimination optimization (\fB\-ftree\-pre\fR) when |
| 8777 | optimizing at \fB\-O3\fR and above. For some sorts of source code |
| 8778 | the enhanced partial redundancy elimination optimization can run away, |
| 8779 | consuming all of the memory available on the host machine. This |
| 8780 | parameter sets a limit on the length of the sets that are computed, |
| 8781 | which prevents the runaway behavior. Setting a value of 0 for |
| 8782 | this parameter allows an unlimited set length. |
| 8783 | .IP "\fBsccvn-max-scc-size\fR" 4 |
| 8784 | .IX Item "sccvn-max-scc-size" |
| 8785 | Maximum size of a strongly connected component (\s-1SCC\s0) during \s-1SCCVN\s0 |
| 8786 | processing. If this limit is hit, \s-1SCCVN\s0 processing for the whole |
| 8787 | function is not done and optimizations depending on it are |
| 8788 | disabled. The default maximum \s-1SCC\s0 size is 10000. |
| 8789 | .IP "\fBsccvn-max-alias-queries-per-access\fR" 4 |
| 8790 | .IX Item "sccvn-max-alias-queries-per-access" |
| 8791 | Maximum number of alias-oracle queries we perform when looking for |
| 8792 | redundancies for loads and stores. If this limit is hit the search |
| 8793 | is aborted and the load or store is not considered redundant. The |
| 8794 | number of queries is algorithmically limited to the number of |
| 8795 | stores on all paths from the load to the function entry. |
| 8796 | The default maxmimum number of queries is 1000. |
| 8797 | .IP "\fBira-max-loops-num\fR" 4 |
| 8798 | .IX Item "ira-max-loops-num" |
| 8799 | \&\s-1IRA\s0 uses regional register allocation by default. If a function |
| 8800 | contains more loops than the number given by this parameter, only at most |
| 8801 | the given number of the most frequently-executed loops form regions |
| 8802 | for regional register allocation. The default value of the |
| 8803 | parameter is 100. |
| 8804 | .IP "\fBira-max-conflict-table-size\fR" 4 |
| 8805 | .IX Item "ira-max-conflict-table-size" |
| 8806 | Although \s-1IRA\s0 uses a sophisticated algorithm to compress the conflict |
| 8807 | table, the table can still require excessive amounts of memory for |
| 8808 | huge functions. If the conflict table for a function could be more |
| 8809 | than the size in \s-1MB\s0 given by this parameter, the register allocator |
| 8810 | instead uses a faster, simpler, and lower-quality |
| 8811 | algorithm that does not require building a pseudo-register conflict table. |
| 8812 | The default value of the parameter is 2000. |
| 8813 | .IP "\fBira-loop-reserved-regs\fR" 4 |
| 8814 | .IX Item "ira-loop-reserved-regs" |
| 8815 | \&\s-1IRA\s0 can be used to evaluate more accurate register pressure in loops |
| 8816 | for decisions to move loop invariants (see \fB\-O3\fR). The number |
| 8817 | of available registers reserved for some other purposes is given |
| 8818 | by this parameter. The default value of the parameter is 2, which is |
| 8819 | the minimal number of registers needed by typical instructions. |
| 8820 | This value is the best found from numerous experiments. |
| 8821 | .IP "\fBloop-invariant-max-bbs-in-loop\fR" 4 |
| 8822 | .IX Item "loop-invariant-max-bbs-in-loop" |
| 8823 | Loop invariant motion can be very expensive, both in compilation time and |
| 8824 | in amount of needed compile-time memory, with very large loops. Loops |
| 8825 | with more basic blocks than this parameter won't have loop invariant |
| 8826 | motion optimization performed on them. The default value of the |
| 8827 | parameter is 1000 for \fB\-O1\fR and 10000 for \fB\-O2\fR and above. |
| 8828 | .IP "\fBloop-max-datarefs-for-datadeps\fR" 4 |
| 8829 | .IX Item "loop-max-datarefs-for-datadeps" |
| 8830 | Building data dapendencies is expensive for very large loops. This |
| 8831 | parameter limits the number of data references in loops that are |
| 8832 | considered for data dependence analysis. These large loops are no |
| 8833 | handled by the optimizations using loop data dependencies. |
| 8834 | The default value is 1000. |
| 8835 | .IP "\fBmax-vartrack-size\fR" 4 |
| 8836 | .IX Item "max-vartrack-size" |
| 8837 | Sets a maximum number of hash table slots to use during variable |
| 8838 | tracking dataflow analysis of any function. If this limit is exceeded |
| 8839 | with variable tracking at assignments enabled, analysis for that |
| 8840 | function is retried without it, after removing all debug insns from |
| 8841 | the function. If the limit is exceeded even without debug insns, var |
| 8842 | tracking analysis is completely disabled for the function. Setting |
| 8843 | the parameter to zero makes it unlimited. |
| 8844 | .IP "\fBmax-vartrack-expr-depth\fR" 4 |
| 8845 | .IX Item "max-vartrack-expr-depth" |
| 8846 | Sets a maximum number of recursion levels when attempting to map |
| 8847 | variable names or debug temporaries to value expressions. This trades |
| 8848 | compilation time for more complete debug information. If this is set too |
| 8849 | low, value expressions that are available and could be represented in |
| 8850 | debug information may end up not being used; setting this higher may |
| 8851 | enable the compiler to find more complex debug expressions, but compile |
| 8852 | time and memory use may grow. The default is 12. |
| 8853 | .IP "\fBmin-nondebug-insn-uid\fR" 4 |
| 8854 | .IX Item "min-nondebug-insn-uid" |
| 8855 | Use uids starting at this parameter for nondebug insns. The range below |
| 8856 | the parameter is reserved exclusively for debug insns created by |
| 8857 | \&\fB\-fvar\-tracking\-assignments\fR, but debug insns may get |
| 8858 | (non-overlapping) uids above it if the reserved range is exhausted. |
| 8859 | .IP "\fBipa-sra-ptr-growth-factor\fR" 4 |
| 8860 | .IX Item "ipa-sra-ptr-growth-factor" |
| 8861 | IPA-SRA replaces a pointer to an aggregate with one or more new |
| 8862 | parameters only when their cumulative size is less or equal to |
| 8863 | \&\fBipa-sra-ptr-growth-factor\fR times the size of the original |
| 8864 | pointer parameter. |
| 8865 | .IP "\fBtm-max-aggregate-size\fR" 4 |
| 8866 | .IX Item "tm-max-aggregate-size" |
| 8867 | When making copies of thread-local variables in a transaction, this |
| 8868 | parameter specifies the size in bytes after which variables are |
| 8869 | saved with the logging functions as opposed to save/restore code |
| 8870 | sequence pairs. This option only applies when using |
| 8871 | \&\fB\-fgnu\-tm\fR. |
| 8872 | .IP "\fBgraphite-max-nb-scop-params\fR" 4 |
| 8873 | .IX Item "graphite-max-nb-scop-params" |
| 8874 | To avoid exponential effects in the Graphite loop transforms, the |
| 8875 | number of parameters in a Static Control Part (SCoP) is bounded. The |
| 8876 | default value is 10 parameters. A variable whose value is unknown at |
| 8877 | compilation time and defined outside a SCoP is a parameter of the SCoP. |
| 8878 | .IP "\fBgraphite-max-bbs-per-function\fR" 4 |
| 8879 | .IX Item "graphite-max-bbs-per-function" |
| 8880 | To avoid exponential effects in the detection of SCoPs, the size of |
| 8881 | the functions analyzed by Graphite is bounded. The default value is |
| 8882 | 100 basic blocks. |
| 8883 | .IP "\fBloop-block-tile-size\fR" 4 |
| 8884 | .IX Item "loop-block-tile-size" |
| 8885 | Loop blocking or strip mining transforms, enabled with |
| 8886 | \&\fB\-floop\-block\fR or \fB\-floop\-strip\-mine\fR, strip mine each |
| 8887 | loop in the loop nest by a given number of iterations. The strip |
| 8888 | length can be changed using the \fBloop-block-tile-size\fR |
| 8889 | parameter. The default value is 51 iterations. |
| 8890 | .IP "\fBipa-cp-value-list-size\fR" 4 |
| 8891 | .IX Item "ipa-cp-value-list-size" |
| 8892 | IPA-CP attempts to track all possible values and types passed to a function's |
| 8893 | parameter in order to propagate them and perform devirtualization. |
| 8894 | \&\fBipa-cp-value-list-size\fR is the maximum number of values and types it |
| 8895 | stores per one formal parameter of a function. |
| 8896 | .IP "\fBlto-partitions\fR" 4 |
| 8897 | .IX Item "lto-partitions" |
| 8898 | Specify desired number of partitions produced during \s-1WHOPR\s0 compilation. |
| 8899 | The number of partitions should exceed the number of CPUs used for compilation. |
| 8900 | The default value is 32. |
| 8901 | .IP "\fBlto-minpartition\fR" 4 |
| 8902 | .IX Item "lto-minpartition" |
| 8903 | Size of minimal partition for \s-1WHOPR\s0 (in estimated instructions). |
| 8904 | This prevents expenses of splitting very small programs into too many |
| 8905 | partitions. |
| 8906 | .IP "\fBcxx-max-namespaces-for-diagnostic-help\fR" 4 |
| 8907 | .IX Item "cxx-max-namespaces-for-diagnostic-help" |
| 8908 | The maximum number of namespaces to consult for suggestions when \*(C+ |
| 8909 | name lookup fails for an identifier. The default is 1000. |
| 8910 | .IP "\fBsink-frequency-threshold\fR" 4 |
| 8911 | .IX Item "sink-frequency-threshold" |
| 8912 | The maximum relative execution frequency (in percents) of the target block |
| 8913 | relative to a statement's original block to allow statement sinking of a |
| 8914 | statement. Larger numbers result in more aggressive statement sinking. |
| 8915 | The default value is 75. A small positive adjustment is applied for |
| 8916 | statements with memory operands as those are even more profitable so sink. |
| 8917 | .IP "\fBmax-stores-to-sink\fR" 4 |
| 8918 | .IX Item "max-stores-to-sink" |
| 8919 | The maximum number of conditional stores paires that can be sunk. Set to 0 |
| 8920 | if either vectorization (\fB\-ftree\-vectorize\fR) or if-conversion |
| 8921 | (\fB\-ftree\-loop\-if\-convert\fR) is disabled. The default is 2. |
| 8922 | .IP "\fBallow-load-data-races\fR" 4 |
| 8923 | .IX Item "allow-load-data-races" |
| 8924 | Allow optimizers to introduce new data races on loads. |
| 8925 | Set to 1 to allow, otherwise to 0. This option is enabled by default |
| 8926 | unless implicitly set by the \fB\-fmemory\-model=\fR option. |
| 8927 | .IP "\fBallow-store-data-races\fR" 4 |
| 8928 | .IX Item "allow-store-data-races" |
| 8929 | Allow optimizers to introduce new data races on stores. |
| 8930 | Set to 1 to allow, otherwise to 0. This option is enabled by default |
| 8931 | unless implicitly set by the \fB\-fmemory\-model=\fR option. |
| 8932 | .IP "\fBallow-packed-load-data-races\fR" 4 |
| 8933 | .IX Item "allow-packed-load-data-races" |
| 8934 | Allow optimizers to introduce new data races on packed data loads. |
| 8935 | Set to 1 to allow, otherwise to 0. This option is enabled by default |
| 8936 | unless implicitly set by the \fB\-fmemory\-model=\fR option. |
| 8937 | .IP "\fBallow-packed-store-data-races\fR" 4 |
| 8938 | .IX Item "allow-packed-store-data-races" |
| 8939 | Allow optimizers to introduce new data races on packed data stores. |
| 8940 | Set to 1 to allow, otherwise to 0. This option is enabled by default |
| 8941 | unless implicitly set by the \fB\-fmemory\-model=\fR option. |
| 8942 | .IP "\fBcase-values-threshold\fR" 4 |
| 8943 | .IX Item "case-values-threshold" |
| 8944 | The smallest number of different values for which it is best to use a |
| 8945 | jump-table instead of a tree of conditional branches. If the value is |
| 8946 | 0, use the default for the machine. The default is 0. |
| 8947 | .IP "\fBtree-reassoc-width\fR" 4 |
| 8948 | .IX Item "tree-reassoc-width" |
| 8949 | Set the maximum number of instructions executed in parallel in |
| 8950 | reassociated tree. This parameter overrides target dependent |
| 8951 | heuristics used by default if has non zero value. |
| 8952 | .IP "\fBsched-pressure-algorithm\fR" 4 |
| 8953 | .IX Item "sched-pressure-algorithm" |
| 8954 | Choose between the two available implementations of |
| 8955 | \&\fB\-fsched\-pressure\fR. Algorithm 1 is the original implementation |
| 8956 | and is the more likely to prevent instructions from being reordered. |
| 8957 | Algorithm 2 was designed to be a compromise between the relatively |
| 8958 | conservative approach taken by algorithm 1 and the rather aggressive |
| 8959 | approach taken by the default scheduler. It relies more heavily on |
| 8960 | having a regular register file and accurate register pressure classes. |
| 8961 | See \fIhaifa\-sched.c\fR in the \s-1GCC\s0 sources for more details. |
| 8962 | .Sp |
| 8963 | The default choice depends on the target. |
| 8964 | .IP "\fBmax-slsr-cand-scan\fR" 4 |
| 8965 | .IX Item "max-slsr-cand-scan" |
| 8966 | Set the maximum number of existing candidates that will be considered when |
| 8967 | seeking a basis for a new straight-line strength reduction candidate. |
| 8968 | .RE |
| 8969 | .RS 4 |
| 8970 | .RE |
| 8971 | .SS "Options Controlling the Preprocessor" |
| 8972 | .IX Subsection "Options Controlling the Preprocessor" |
| 8973 | These options control the C preprocessor, which is run on each C source |
| 8974 | file before actual compilation. |
| 8975 | .PP |
| 8976 | If you use the \fB\-E\fR option, nothing is done except preprocessing. |
| 8977 | Some of these options make sense only together with \fB\-E\fR because |
| 8978 | they cause the preprocessor output to be unsuitable for actual |
| 8979 | compilation. |
| 8980 | .IP "\fB\-Wp,\fR\fIoption\fR" 4 |
| 8981 | .IX Item "-Wp,option" |
| 8982 | You can use \fB\-Wp,\fR\fIoption\fR to bypass the compiler driver |
| 8983 | and pass \fIoption\fR directly through to the preprocessor. If |
| 8984 | \&\fIoption\fR contains commas, it is split into multiple options at the |
| 8985 | commas. However, many options are modified, translated or interpreted |
| 8986 | by the compiler driver before being passed to the preprocessor, and |
| 8987 | \&\fB\-Wp\fR forcibly bypasses this phase. The preprocessor's direct |
| 8988 | interface is undocumented and subject to change, so whenever possible |
| 8989 | you should avoid using \fB\-Wp\fR and let the driver handle the |
| 8990 | options instead. |
| 8991 | .IP "\fB\-Xpreprocessor\fR \fIoption\fR" 4 |
| 8992 | .IX Item "-Xpreprocessor option" |
| 8993 | Pass \fIoption\fR as an option to the preprocessor. You can use this to |
| 8994 | supply system-specific preprocessor options that \s-1GCC\s0 does not |
| 8995 | recognize. |
| 8996 | .Sp |
| 8997 | If you want to pass an option that takes an argument, you must use |
| 8998 | \&\fB\-Xpreprocessor\fR twice, once for the option and once for the argument. |
| 8999 | .IP "\fB\-no\-integrated\-cpp\fR" 4 |
| 9000 | .IX Item "-no-integrated-cpp" |
| 9001 | Perform preprocessing as a separate pass before compilation. |
| 9002 | By default, \s-1GCC\s0 performs preprocessing as an integrated part of |
| 9003 | input tokenization and parsing. |
| 9004 | If this option is provided, the appropriate language front end |
| 9005 | (\fBcc1\fR, \fBcc1plus\fR, or \fBcc1obj\fR for C, \*(C+, |
| 9006 | and Objective-C, respectively) is instead invoked twice, |
| 9007 | once for preprocessing only and once for actual compilation |
| 9008 | of the preprocessed input. |
| 9009 | This option may be useful in conjunction with the \fB\-B\fR or |
| 9010 | \&\fB\-wrapper\fR options to specify an alternate preprocessor or |
| 9011 | perform additional processing of the program source between |
| 9012 | normal preprocessing and compilation. |
| 9013 | .IP "\fB\-D\fR \fIname\fR" 4 |
| 9014 | .IX Item "-D name" |
| 9015 | Predefine \fIname\fR as a macro, with definition \f(CW1\fR. |
| 9016 | .IP "\fB\-D\fR \fIname\fR\fB=\fR\fIdefinition\fR" 4 |
| 9017 | .IX Item "-D name=definition" |
| 9018 | The contents of \fIdefinition\fR are tokenized and processed as if |
| 9019 | they appeared during translation phase three in a \fB#define\fR |
| 9020 | directive. In particular, the definition will be truncated by |
| 9021 | embedded newline characters. |
| 9022 | .Sp |
| 9023 | If you are invoking the preprocessor from a shell or shell-like |
| 9024 | program you may need to use the shell's quoting syntax to protect |
| 9025 | characters such as spaces that have a meaning in the shell syntax. |
| 9026 | .Sp |
| 9027 | If you wish to define a function-like macro on the command line, write |
| 9028 | its argument list with surrounding parentheses before the equals sign |
| 9029 | (if any). Parentheses are meaningful to most shells, so you will need |
| 9030 | to quote the option. With \fBsh\fR and \fBcsh\fR, |
| 9031 | \&\fB\-D'\fR\fIname\fR\fB(\fR\fIargs...\fR\fB)=\fR\fIdefinition\fR\fB'\fR works. |
| 9032 | .Sp |
| 9033 | \&\fB\-D\fR and \fB\-U\fR options are processed in the order they |
| 9034 | are given on the command line. All \fB\-imacros\fR \fIfile\fR and |
| 9035 | \&\fB\-include\fR \fIfile\fR options are processed after all |
| 9036 | \&\fB\-D\fR and \fB\-U\fR options. |
| 9037 | .IP "\fB\-U\fR \fIname\fR" 4 |
| 9038 | .IX Item "-U name" |
| 9039 | Cancel any previous definition of \fIname\fR, either built in or |
| 9040 | provided with a \fB\-D\fR option. |
| 9041 | .IP "\fB\-undef\fR" 4 |
| 9042 | .IX Item "-undef" |
| 9043 | Do not predefine any system-specific or GCC-specific macros. The |
| 9044 | standard predefined macros remain defined. |
| 9045 | .IP "\fB\-I\fR \fIdir\fR" 4 |
| 9046 | .IX Item "-I dir" |
| 9047 | Add the directory \fIdir\fR to the list of directories to be searched |
| 9048 | for header files. |
| 9049 | Directories named by \fB\-I\fR are searched before the standard |
| 9050 | system include directories. If the directory \fIdir\fR is a standard |
| 9051 | system include directory, the option is ignored to ensure that the |
| 9052 | default search order for system directories and the special treatment |
| 9053 | of system headers are not defeated |
| 9054 | \&. |
| 9055 | If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced |
| 9056 | by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR. |
| 9057 | .IP "\fB\-o\fR \fIfile\fR" 4 |
| 9058 | .IX Item "-o file" |
| 9059 | Write output to \fIfile\fR. This is the same as specifying \fIfile\fR |
| 9060 | as the second non-option argument to \fBcpp\fR. \fBgcc\fR has a |
| 9061 | different interpretation of a second non-option argument, so you must |
| 9062 | use \fB\-o\fR to specify the output file. |
| 9063 | .IP "\fB\-Wall\fR" 4 |
| 9064 | .IX Item "-Wall" |
| 9065 | Turns on all optional warnings which are desirable for normal code. |
| 9066 | At present this is \fB\-Wcomment\fR, \fB\-Wtrigraphs\fR, |
| 9067 | \&\fB\-Wmultichar\fR and a warning about integer promotion causing a |
| 9068 | change of sign in \f(CW\*(C`#if\*(C'\fR expressions. Note that many of the |
| 9069 | preprocessor's warnings are on by default and have no options to |
| 9070 | control them. |
| 9071 | .IP "\fB\-Wcomment\fR" 4 |
| 9072 | .IX Item "-Wcomment" |
| 9073 | .PD 0 |
| 9074 | .IP "\fB\-Wcomments\fR" 4 |
| 9075 | .IX Item "-Wcomments" |
| 9076 | .PD |
| 9077 | Warn whenever a comment-start sequence \fB/*\fR appears in a \fB/*\fR |
| 9078 | comment, or whenever a backslash-newline appears in a \fB//\fR comment. |
| 9079 | (Both forms have the same effect.) |
| 9080 | .IP "\fB\-Wtrigraphs\fR" 4 |
| 9081 | .IX Item "-Wtrigraphs" |
| 9082 | Most trigraphs in comments cannot affect the meaning of the program. |
| 9083 | However, a trigraph that would form an escaped newline (\fB??/\fR at |
| 9084 | the end of a line) can, by changing where the comment begins or ends. |
| 9085 | Therefore, only trigraphs that would form escaped newlines produce |
| 9086 | warnings inside a comment. |
| 9087 | .Sp |
| 9088 | This option is implied by \fB\-Wall\fR. If \fB\-Wall\fR is not |
| 9089 | given, this option is still enabled unless trigraphs are enabled. To |
| 9090 | get trigraph conversion without warnings, but get the other |
| 9091 | \&\fB\-Wall\fR warnings, use \fB\-trigraphs \-Wall \-Wno\-trigraphs\fR. |
| 9092 | .IP "\fB\-Wtraditional\fR" 4 |
| 9093 | .IX Item "-Wtraditional" |
| 9094 | Warn about certain constructs that behave differently in traditional and |
| 9095 | \&\s-1ISO\s0 C. Also warn about \s-1ISO\s0 C constructs that have no traditional C |
| 9096 | equivalent, and problematic constructs which should be avoided. |
| 9097 | .IP "\fB\-Wundef\fR" 4 |
| 9098 | .IX Item "-Wundef" |
| 9099 | Warn whenever an identifier which is not a macro is encountered in an |
| 9100 | \&\fB#if\fR directive, outside of \fBdefined\fR. Such identifiers are |
| 9101 | replaced with zero. |
| 9102 | .IP "\fB\-Wunused\-macros\fR" 4 |
| 9103 | .IX Item "-Wunused-macros" |
| 9104 | Warn about macros defined in the main file that are unused. A macro |
| 9105 | is \fIused\fR if it is expanded or tested for existence at least once. |
| 9106 | The preprocessor will also warn if the macro has not been used at the |
| 9107 | time it is redefined or undefined. |
| 9108 | .Sp |
| 9109 | Built-in macros, macros defined on the command line, and macros |
| 9110 | defined in include files are not warned about. |
| 9111 | .Sp |
| 9112 | \&\fINote:\fR If a macro is actually used, but only used in skipped |
| 9113 | conditional blocks, then \s-1CPP\s0 will report it as unused. To avoid the |
| 9114 | warning in such a case, you might improve the scope of the macro's |
| 9115 | definition by, for example, moving it into the first skipped block. |
| 9116 | Alternatively, you could provide a dummy use with something like: |
| 9117 | .Sp |
| 9118 | .Vb 2 |
| 9119 | \& #if defined the_macro_causing_the_warning |
| 9120 | \& #endif |
| 9121 | .Ve |
| 9122 | .IP "\fB\-Wendif\-labels\fR" 4 |
| 9123 | .IX Item "-Wendif-labels" |
| 9124 | Warn whenever an \fB#else\fR or an \fB#endif\fR are followed by text. |
| 9125 | This usually happens in code of the form |
| 9126 | .Sp |
| 9127 | .Vb 5 |
| 9128 | \& #if FOO |
| 9129 | \& ... |
| 9130 | \& #else FOO |
| 9131 | \& ... |
| 9132 | \& #endif FOO |
| 9133 | .Ve |
| 9134 | .Sp |
| 9135 | The second and third \f(CW\*(C`FOO\*(C'\fR should be in comments, but often are not |
| 9136 | in older programs. This warning is on by default. |
| 9137 | .IP "\fB\-Werror\fR" 4 |
| 9138 | .IX Item "-Werror" |
| 9139 | Make all warnings into hard errors. Source code which triggers warnings |
| 9140 | will be rejected. |
| 9141 | .IP "\fB\-Wsystem\-headers\fR" 4 |
| 9142 | .IX Item "-Wsystem-headers" |
| 9143 | Issue warnings for code in system headers. These are normally unhelpful |
| 9144 | in finding bugs in your own code, therefore suppressed. If you are |
| 9145 | responsible for the system library, you may want to see them. |
| 9146 | .IP "\fB\-w\fR" 4 |
| 9147 | .IX Item "-w" |
| 9148 | Suppress all warnings, including those which \s-1GNU\s0 \s-1CPP\s0 issues by default. |
| 9149 | .IP "\fB\-pedantic\fR" 4 |
| 9150 | .IX Item "-pedantic" |
| 9151 | Issue all the mandatory diagnostics listed in the C standard. Some of |
| 9152 | them are left out by default, since they trigger frequently on harmless |
| 9153 | code. |
| 9154 | .IP "\fB\-pedantic\-errors\fR" 4 |
| 9155 | .IX Item "-pedantic-errors" |
| 9156 | Issue all the mandatory diagnostics, and make all mandatory diagnostics |
| 9157 | into errors. This includes mandatory diagnostics that \s-1GCC\s0 issues |
| 9158 | without \fB\-pedantic\fR but treats as warnings. |
| 9159 | .IP "\fB\-M\fR" 4 |
| 9160 | .IX Item "-M" |
| 9161 | Instead of outputting the result of preprocessing, output a rule |
| 9162 | suitable for \fBmake\fR describing the dependencies of the main |
| 9163 | source file. The preprocessor outputs one \fBmake\fR rule containing |
| 9164 | the object file name for that source file, a colon, and the names of all |
| 9165 | the included files, including those coming from \fB\-include\fR or |
| 9166 | \&\fB\-imacros\fR command line options. |
| 9167 | .Sp |
| 9168 | Unless specified explicitly (with \fB\-MT\fR or \fB\-MQ\fR), the |
| 9169 | object file name consists of the name of the source file with any |
| 9170 | suffix replaced with object file suffix and with any leading directory |
| 9171 | parts removed. If there are many included files then the rule is |
| 9172 | split into several lines using \fB\e\fR\-newline. The rule has no |
| 9173 | commands. |
| 9174 | .Sp |
| 9175 | This option does not suppress the preprocessor's debug output, such as |
| 9176 | \&\fB\-dM\fR. To avoid mixing such debug output with the dependency |
| 9177 | rules you should explicitly specify the dependency output file with |
| 9178 | \&\fB\-MF\fR, or use an environment variable like |
| 9179 | \&\fB\s-1DEPENDENCIES_OUTPUT\s0\fR. Debug output |
| 9180 | will still be sent to the regular output stream as normal. |
| 9181 | .Sp |
| 9182 | Passing \fB\-M\fR to the driver implies \fB\-E\fR, and suppresses |
| 9183 | warnings with an implicit \fB\-w\fR. |
| 9184 | .IP "\fB\-MM\fR" 4 |
| 9185 | .IX Item "-MM" |
| 9186 | Like \fB\-M\fR but do not mention header files that are found in |
| 9187 | system header directories, nor header files that are included, |
| 9188 | directly or indirectly, from such a header. |
| 9189 | .Sp |
| 9190 | This implies that the choice of angle brackets or double quotes in an |
| 9191 | \&\fB#include\fR directive does not in itself determine whether that |
| 9192 | header will appear in \fB\-MM\fR dependency output. This is a |
| 9193 | slight change in semantics from \s-1GCC\s0 versions 3.0 and earlier. |
| 9194 | .IP "\fB\-MF\fR \fIfile\fR" 4 |
| 9195 | .IX Item "-MF file" |
| 9196 | When used with \fB\-M\fR or \fB\-MM\fR, specifies a |
| 9197 | file to write the dependencies to. If no \fB\-MF\fR switch is given |
| 9198 | the preprocessor sends the rules to the same place it would have sent |
| 9199 | preprocessed output. |
| 9200 | .Sp |
| 9201 | When used with the driver options \fB\-MD\fR or \fB\-MMD\fR, |
| 9202 | \&\fB\-MF\fR overrides the default dependency output file. |
| 9203 | .IP "\fB\-MG\fR" 4 |
| 9204 | .IX Item "-MG" |
| 9205 | In conjunction with an option such as \fB\-M\fR requesting |
| 9206 | dependency generation, \fB\-MG\fR assumes missing header files are |
| 9207 | generated files and adds them to the dependency list without raising |
| 9208 | an error. The dependency filename is taken directly from the |
| 9209 | \&\f(CW\*(C`#include\*(C'\fR directive without prepending any path. \fB\-MG\fR |
| 9210 | also suppresses preprocessed output, as a missing header file renders |
| 9211 | this useless. |
| 9212 | .Sp |
| 9213 | This feature is used in automatic updating of makefiles. |
| 9214 | .IP "\fB\-MP\fR" 4 |
| 9215 | .IX Item "-MP" |
| 9216 | This option instructs \s-1CPP\s0 to add a phony target for each dependency |
| 9217 | other than the main file, causing each to depend on nothing. These |
| 9218 | dummy rules work around errors \fBmake\fR gives if you remove header |
| 9219 | files without updating the \fIMakefile\fR to match. |
| 9220 | .Sp |
| 9221 | This is typical output: |
| 9222 | .Sp |
| 9223 | .Vb 1 |
| 9224 | \& test.o: test.c test.h |
| 9225 | \& |
| 9226 | \& test.h: |
| 9227 | .Ve |
| 9228 | .IP "\fB\-MT\fR \fItarget\fR" 4 |
| 9229 | .IX Item "-MT target" |
| 9230 | Change the target of the rule emitted by dependency generation. By |
| 9231 | default \s-1CPP\s0 takes the name of the main input file, deletes any |
| 9232 | directory components and any file suffix such as \fB.c\fR, and |
| 9233 | appends the platform's usual object suffix. The result is the target. |
| 9234 | .Sp |
| 9235 | An \fB\-MT\fR option will set the target to be exactly the string you |
| 9236 | specify. If you want multiple targets, you can specify them as a single |
| 9237 | argument to \fB\-MT\fR, or use multiple \fB\-MT\fR options. |
| 9238 | .Sp |
| 9239 | For example, \fB\-MT\ '$(objpfx)foo.o'\fR might give |
| 9240 | .Sp |
| 9241 | .Vb 1 |
| 9242 | \& $(objpfx)foo.o: foo.c |
| 9243 | .Ve |
| 9244 | .IP "\fB\-MQ\fR \fItarget\fR" 4 |
| 9245 | .IX Item "-MQ target" |
| 9246 | Same as \fB\-MT\fR, but it quotes any characters which are special to |
| 9247 | Make. \fB\-MQ\ '$(objpfx)foo.o'\fR gives |
| 9248 | .Sp |
| 9249 | .Vb 1 |
| 9250 | \& $$(objpfx)foo.o: foo.c |
| 9251 | .Ve |
| 9252 | .Sp |
| 9253 | The default target is automatically quoted, as if it were given with |
| 9254 | \&\fB\-MQ\fR. |
| 9255 | .IP "\fB\-MD\fR" 4 |
| 9256 | .IX Item "-MD" |
| 9257 | \&\fB\-MD\fR is equivalent to \fB\-M \-MF\fR \fIfile\fR, except that |
| 9258 | \&\fB\-E\fR is not implied. The driver determines \fIfile\fR based on |
| 9259 | whether an \fB\-o\fR option is given. If it is, the driver uses its |
| 9260 | argument but with a suffix of \fI.d\fR, otherwise it takes the name |
| 9261 | of the input file, removes any directory components and suffix, and |
| 9262 | applies a \fI.d\fR suffix. |
| 9263 | .Sp |
| 9264 | If \fB\-MD\fR is used in conjunction with \fB\-E\fR, any |
| 9265 | \&\fB\-o\fR switch is understood to specify the dependency output file, but if used without \fB\-E\fR, each \fB\-o\fR |
| 9266 | is understood to specify a target object file. |
| 9267 | .Sp |
| 9268 | Since \fB\-E\fR is not implied, \fB\-MD\fR can be used to generate |
| 9269 | a dependency output file as a side-effect of the compilation process. |
| 9270 | .IP "\fB\-MMD\fR" 4 |
| 9271 | .IX Item "-MMD" |
| 9272 | Like \fB\-MD\fR except mention only user header files, not system |
| 9273 | header files. |
| 9274 | .IP "\fB\-fpch\-deps\fR" 4 |
| 9275 | .IX Item "-fpch-deps" |
| 9276 | When using precompiled headers, this flag |
| 9277 | will cause the dependency-output flags to also list the files from the |
| 9278 | precompiled header's dependencies. If not specified only the |
| 9279 | precompiled header would be listed and not the files that were used to |
| 9280 | create it because those files are not consulted when a precompiled |
| 9281 | header is used. |
| 9282 | .IP "\fB\-fpch\-preprocess\fR" 4 |
| 9283 | .IX Item "-fpch-preprocess" |
| 9284 | This option allows use of a precompiled header together with \fB\-E\fR. It inserts a special \f(CW\*(C`#pragma\*(C'\fR, |
| 9285 | \&\f(CW\*(C`#pragma GCC pch_preprocess "\f(CIfilename\f(CW"\*(C'\fR in the output to mark |
| 9286 | the place where the precompiled header was found, and its \fIfilename\fR. |
| 9287 | When \fB\-fpreprocessed\fR is in use, \s-1GCC\s0 recognizes this \f(CW\*(C`#pragma\*(C'\fR |
| 9288 | and loads the \s-1PCH\s0. |
| 9289 | .Sp |
| 9290 | This option is off by default, because the resulting preprocessed output |
| 9291 | is only really suitable as input to \s-1GCC\s0. It is switched on by |
| 9292 | \&\fB\-save\-temps\fR. |
| 9293 | .Sp |
| 9294 | You should not write this \f(CW\*(C`#pragma\*(C'\fR in your own code, but it is |
| 9295 | safe to edit the filename if the \s-1PCH\s0 file is available in a different |
| 9296 | location. The filename may be absolute or it may be relative to \s-1GCC\s0's |
| 9297 | current directory. |
| 9298 | .IP "\fB\-x c\fR" 4 |
| 9299 | .IX Item "-x c" |
| 9300 | .PD 0 |
| 9301 | .IP "\fB\-x c++\fR" 4 |
| 9302 | .IX Item "-x c++" |
| 9303 | .IP "\fB\-x objective-c\fR" 4 |
| 9304 | .IX Item "-x objective-c" |
| 9305 | .IP "\fB\-x assembler-with-cpp\fR" 4 |
| 9306 | .IX Item "-x assembler-with-cpp" |
| 9307 | .PD |
| 9308 | Specify the source language: C, \*(C+, Objective-C, or assembly. This has |
| 9309 | nothing to do with standards conformance or extensions; it merely |
| 9310 | selects which base syntax to expect. If you give none of these options, |
| 9311 | cpp will deduce the language from the extension of the source file: |
| 9312 | \&\fB.c\fR, \fB.cc\fR, \fB.m\fR, or \fB.S\fR. Some other common |
| 9313 | extensions for \*(C+ and assembly are also recognized. If cpp does not |
| 9314 | recognize the extension, it will treat the file as C; this is the most |
| 9315 | generic mode. |
| 9316 | .Sp |
| 9317 | \&\fINote:\fR Previous versions of cpp accepted a \fB\-lang\fR option |
| 9318 | which selected both the language and the standards conformance level. |
| 9319 | This option has been removed, because it conflicts with the \fB\-l\fR |
| 9320 | option. |
| 9321 | .IP "\fB\-std=\fR\fIstandard\fR" 4 |
| 9322 | .IX Item "-std=standard" |
| 9323 | .PD 0 |
| 9324 | .IP "\fB\-ansi\fR" 4 |
| 9325 | .IX Item "-ansi" |
| 9326 | .PD |
| 9327 | Specify the standard to which the code should conform. Currently \s-1CPP\s0 |
| 9328 | knows about C and \*(C+ standards; others may be added in the future. |
| 9329 | .Sp |
| 9330 | \&\fIstandard\fR |
| 9331 | may be one of: |
| 9332 | .RS 4 |
| 9333 | .ie n .IP """c90""" 4 |
| 9334 | .el .IP "\f(CWc90\fR" 4 |
| 9335 | .IX Item "c90" |
| 9336 | .PD 0 |
| 9337 | .ie n .IP """c89""" 4 |
| 9338 | .el .IP "\f(CWc89\fR" 4 |
| 9339 | .IX Item "c89" |
| 9340 | .ie n .IP """iso9899:1990""" 4 |
| 9341 | .el .IP "\f(CWiso9899:1990\fR" 4 |
| 9342 | .IX Item "iso9899:1990" |
| 9343 | .PD |
| 9344 | The \s-1ISO\s0 C standard from 1990. \fBc90\fR is the customary shorthand for |
| 9345 | this version of the standard. |
| 9346 | .Sp |
| 9347 | The \fB\-ansi\fR option is equivalent to \fB\-std=c90\fR. |
| 9348 | .ie n .IP """iso9899:199409""" 4 |
| 9349 | .el .IP "\f(CWiso9899:199409\fR" 4 |
| 9350 | .IX Item "iso9899:199409" |
| 9351 | The 1990 C standard, as amended in 1994. |
| 9352 | .ie n .IP """iso9899:1999""" 4 |
| 9353 | .el .IP "\f(CWiso9899:1999\fR" 4 |
| 9354 | .IX Item "iso9899:1999" |
| 9355 | .PD 0 |
| 9356 | .ie n .IP """c99""" 4 |
| 9357 | .el .IP "\f(CWc99\fR" 4 |
| 9358 | .IX Item "c99" |
| 9359 | .ie n .IP """iso9899:199x""" 4 |
| 9360 | .el .IP "\f(CWiso9899:199x\fR" 4 |
| 9361 | .IX Item "iso9899:199x" |
| 9362 | .ie n .IP """c9x""" 4 |
| 9363 | .el .IP "\f(CWc9x\fR" 4 |
| 9364 | .IX Item "c9x" |
| 9365 | .PD |
| 9366 | The revised \s-1ISO\s0 C standard, published in December 1999. Before |
| 9367 | publication, this was known as C9X. |
| 9368 | .ie n .IP """iso9899:2011""" 4 |
| 9369 | .el .IP "\f(CWiso9899:2011\fR" 4 |
| 9370 | .IX Item "iso9899:2011" |
| 9371 | .PD 0 |
| 9372 | .ie n .IP """c11""" 4 |
| 9373 | .el .IP "\f(CWc11\fR" 4 |
| 9374 | .IX Item "c11" |
| 9375 | .ie n .IP """c1x""" 4 |
| 9376 | .el .IP "\f(CWc1x\fR" 4 |
| 9377 | .IX Item "c1x" |
| 9378 | .PD |
| 9379 | The revised \s-1ISO\s0 C standard, published in December 2011. Before |
| 9380 | publication, this was known as C1X. |
| 9381 | .ie n .IP """gnu90""" 4 |
| 9382 | .el .IP "\f(CWgnu90\fR" 4 |
| 9383 | .IX Item "gnu90" |
| 9384 | .PD 0 |
| 9385 | .ie n .IP """gnu89""" 4 |
| 9386 | .el .IP "\f(CWgnu89\fR" 4 |
| 9387 | .IX Item "gnu89" |
| 9388 | .PD |
| 9389 | The 1990 C standard plus \s-1GNU\s0 extensions. This is the default. |
| 9390 | .ie n .IP """gnu99""" 4 |
| 9391 | .el .IP "\f(CWgnu99\fR" 4 |
| 9392 | .IX Item "gnu99" |
| 9393 | .PD 0 |
| 9394 | .ie n .IP """gnu9x""" 4 |
| 9395 | .el .IP "\f(CWgnu9x\fR" 4 |
| 9396 | .IX Item "gnu9x" |
| 9397 | .PD |
| 9398 | The 1999 C standard plus \s-1GNU\s0 extensions. |
| 9399 | .ie n .IP """gnu11""" 4 |
| 9400 | .el .IP "\f(CWgnu11\fR" 4 |
| 9401 | .IX Item "gnu11" |
| 9402 | .PD 0 |
| 9403 | .ie n .IP """gnu1x""" 4 |
| 9404 | .el .IP "\f(CWgnu1x\fR" 4 |
| 9405 | .IX Item "gnu1x" |
| 9406 | .PD |
| 9407 | The 2011 C standard plus \s-1GNU\s0 extensions. |
| 9408 | .ie n .IP """c++98""" 4 |
| 9409 | .el .IP "\f(CWc++98\fR" 4 |
| 9410 | .IX Item "c++98" |
| 9411 | The 1998 \s-1ISO\s0 \*(C+ standard plus amendments. |
| 9412 | .ie n .IP """gnu++98""" 4 |
| 9413 | .el .IP "\f(CWgnu++98\fR" 4 |
| 9414 | .IX Item "gnu++98" |
| 9415 | The same as \fB\-std=c++98\fR plus \s-1GNU\s0 extensions. This is the |
| 9416 | default for \*(C+ code. |
| 9417 | .RE |
| 9418 | .RS 4 |
| 9419 | .RE |
| 9420 | .IP "\fB\-I\-\fR" 4 |
| 9421 | .IX Item "-I-" |
| 9422 | Split the include path. Any directories specified with \fB\-I\fR |
| 9423 | options before \fB\-I\-\fR are searched only for headers requested with |
| 9424 | \&\f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR; they are not searched for |
| 9425 | \&\f(CW\*(C`#include\ <\f(CIfile\f(CW>\*(C'\fR. If additional directories are |
| 9426 | specified with \fB\-I\fR options after the \fB\-I\-\fR, those |
| 9427 | directories are searched for all \fB#include\fR directives. |
| 9428 | .Sp |
| 9429 | In addition, \fB\-I\-\fR inhibits the use of the directory of the current |
| 9430 | file directory as the first search directory for \f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR. |
| 9431 | This option has been deprecated. |
| 9432 | .IP "\fB\-nostdinc\fR" 4 |
| 9433 | .IX Item "-nostdinc" |
| 9434 | Do not search the standard system directories for header files. |
| 9435 | Only the directories you have specified with \fB\-I\fR options |
| 9436 | (and the directory of the current file, if appropriate) are searched. |
| 9437 | .IP "\fB\-nostdinc++\fR" 4 |
| 9438 | .IX Item "-nostdinc++" |
| 9439 | Do not search for header files in the \*(C+\-specific standard directories, |
| 9440 | but do still search the other standard directories. (This option is |
| 9441 | used when building the \*(C+ library.) |
| 9442 | .IP "\fB\-include\fR \fIfile\fR" 4 |
| 9443 | .IX Item "-include file" |
| 9444 | Process \fIfile\fR as if \f(CW\*(C`#include "file"\*(C'\fR appeared as the first |
| 9445 | line of the primary source file. However, the first directory searched |
| 9446 | for \fIfile\fR is the preprocessor's working directory \fIinstead of\fR |
| 9447 | the directory containing the main source file. If not found there, it |
| 9448 | is searched for in the remainder of the \f(CW\*(C`#include "..."\*(C'\fR search |
| 9449 | chain as normal. |
| 9450 | .Sp |
| 9451 | If multiple \fB\-include\fR options are given, the files are included |
| 9452 | in the order they appear on the command line. |
| 9453 | .IP "\fB\-imacros\fR \fIfile\fR" 4 |
| 9454 | .IX Item "-imacros file" |
| 9455 | Exactly like \fB\-include\fR, except that any output produced by |
| 9456 | scanning \fIfile\fR is thrown away. Macros it defines remain defined. |
| 9457 | This allows you to acquire all the macros from a header without also |
| 9458 | processing its declarations. |
| 9459 | .Sp |
| 9460 | All files specified by \fB\-imacros\fR are processed before all files |
| 9461 | specified by \fB\-include\fR. |
| 9462 | .IP "\fB\-idirafter\fR \fIdir\fR" 4 |
| 9463 | .IX Item "-idirafter dir" |
| 9464 | Search \fIdir\fR for header files, but do it \fIafter\fR all |
| 9465 | directories specified with \fB\-I\fR and the standard system directories |
| 9466 | have been exhausted. \fIdir\fR is treated as a system include directory. |
| 9467 | If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced |
| 9468 | by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR. |
| 9469 | .IP "\fB\-iprefix\fR \fIprefix\fR" 4 |
| 9470 | .IX Item "-iprefix prefix" |
| 9471 | Specify \fIprefix\fR as the prefix for subsequent \fB\-iwithprefix\fR |
| 9472 | options. If the prefix represents a directory, you should include the |
| 9473 | final \fB/\fR. |
| 9474 | .IP "\fB\-iwithprefix\fR \fIdir\fR" 4 |
| 9475 | .IX Item "-iwithprefix dir" |
| 9476 | .PD 0 |
| 9477 | .IP "\fB\-iwithprefixbefore\fR \fIdir\fR" 4 |
| 9478 | .IX Item "-iwithprefixbefore dir" |
| 9479 | .PD |
| 9480 | Append \fIdir\fR to the prefix specified previously with |
| 9481 | \&\fB\-iprefix\fR, and add the resulting directory to the include search |
| 9482 | path. \fB\-iwithprefixbefore\fR puts it in the same place \fB\-I\fR |
| 9483 | would; \fB\-iwithprefix\fR puts it where \fB\-idirafter\fR would. |
| 9484 | .IP "\fB\-isysroot\fR \fIdir\fR" 4 |
| 9485 | .IX Item "-isysroot dir" |
| 9486 | This option is like the \fB\-\-sysroot\fR option, but applies only to |
| 9487 | header files (except for Darwin targets, where it applies to both header |
| 9488 | files and libraries). See the \fB\-\-sysroot\fR option for more |
| 9489 | information. |
| 9490 | .IP "\fB\-imultilib\fR \fIdir\fR" 4 |
| 9491 | .IX Item "-imultilib dir" |
| 9492 | Use \fIdir\fR as a subdirectory of the directory containing |
| 9493 | target-specific \*(C+ headers. |
| 9494 | .IP "\fB\-isystem\fR \fIdir\fR" 4 |
| 9495 | .IX Item "-isystem dir" |
| 9496 | Search \fIdir\fR for header files, after all directories specified by |
| 9497 | \&\fB\-I\fR but before the standard system directories. Mark it |
| 9498 | as a system directory, so that it gets the same special treatment as |
| 9499 | is applied to the standard system directories. |
| 9500 | If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced |
| 9501 | by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR. |
| 9502 | .IP "\fB\-iquote\fR \fIdir\fR" 4 |
| 9503 | .IX Item "-iquote dir" |
| 9504 | Search \fIdir\fR only for header files requested with |
| 9505 | \&\f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR; they are not searched for |
| 9506 | \&\f(CW\*(C`#include\ <\f(CIfile\f(CW>\*(C'\fR, before all directories specified by |
| 9507 | \&\fB\-I\fR and before the standard system directories. |
| 9508 | If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced |
| 9509 | by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR. |
| 9510 | .IP "\fB\-fdirectives\-only\fR" 4 |
| 9511 | .IX Item "-fdirectives-only" |
| 9512 | When preprocessing, handle directives, but do not expand macros. |
| 9513 | .Sp |
| 9514 | The option's behavior depends on the \fB\-E\fR and \fB\-fpreprocessed\fR |
| 9515 | options. |
| 9516 | .Sp |
| 9517 | With \fB\-E\fR, preprocessing is limited to the handling of directives |
| 9518 | such as \f(CW\*(C`#define\*(C'\fR, \f(CW\*(C`#ifdef\*(C'\fR, and \f(CW\*(C`#error\*(C'\fR. Other |
| 9519 | preprocessor operations, such as macro expansion and trigraph |
| 9520 | conversion are not performed. In addition, the \fB\-dD\fR option is |
| 9521 | implicitly enabled. |
| 9522 | .Sp |
| 9523 | With \fB\-fpreprocessed\fR, predefinition of command line and most |
| 9524 | builtin macros is disabled. Macros such as \f(CW\*(C`_\|_LINE_\|_\*(C'\fR, which are |
| 9525 | contextually dependent, are handled normally. This enables compilation of |
| 9526 | files previously preprocessed with \f(CW\*(C`\-E \-fdirectives\-only\*(C'\fR. |
| 9527 | .Sp |
| 9528 | With both \fB\-E\fR and \fB\-fpreprocessed\fR, the rules for |
| 9529 | \&\fB\-fpreprocessed\fR take precedence. This enables full preprocessing of |
| 9530 | files previously preprocessed with \f(CW\*(C`\-E \-fdirectives\-only\*(C'\fR. |
| 9531 | .IP "\fB\-fdollars\-in\-identifiers\fR" 4 |
| 9532 | .IX Item "-fdollars-in-identifiers" |
| 9533 | Accept \fB$\fR in identifiers. |
| 9534 | .IP "\fB\-fextended\-identifiers\fR" 4 |
| 9535 | .IX Item "-fextended-identifiers" |
| 9536 | Accept universal character names in identifiers. This option is |
| 9537 | experimental; in a future version of \s-1GCC\s0, it will be enabled by |
| 9538 | default for C99 and \*(C+. |
| 9539 | .IP "\fB\-fno\-canonical\-system\-headers\fR" 4 |
| 9540 | .IX Item "-fno-canonical-system-headers" |
| 9541 | When preprocessing, do not shorten system header paths with canonicalization. |
| 9542 | .IP "\fB\-fpreprocessed\fR" 4 |
| 9543 | .IX Item "-fpreprocessed" |
| 9544 | Indicate to the preprocessor that the input file has already been |
| 9545 | preprocessed. This suppresses things like macro expansion, trigraph |
| 9546 | conversion, escaped newline splicing, and processing of most directives. |
| 9547 | The preprocessor still recognizes and removes comments, so that you can |
| 9548 | pass a file preprocessed with \fB\-C\fR to the compiler without |
| 9549 | problems. In this mode the integrated preprocessor is little more than |
| 9550 | a tokenizer for the front ends. |
| 9551 | .Sp |
| 9552 | \&\fB\-fpreprocessed\fR is implicit if the input file has one of the |
| 9553 | extensions \fB.i\fR, \fB.ii\fR or \fB.mi\fR. These are the |
| 9554 | extensions that \s-1GCC\s0 uses for preprocessed files created by |
| 9555 | \&\fB\-save\-temps\fR. |
| 9556 | .IP "\fB\-ftabstop=\fR\fIwidth\fR" 4 |
| 9557 | .IX Item "-ftabstop=width" |
| 9558 | Set the distance between tab stops. This helps the preprocessor report |
| 9559 | correct column numbers in warnings or errors, even if tabs appear on the |
| 9560 | line. If the value is less than 1 or greater than 100, the option is |
| 9561 | ignored. The default is 8. |
| 9562 | .IP "\fB\-fdebug\-cpp\fR" 4 |
| 9563 | .IX Item "-fdebug-cpp" |
| 9564 | This option is only useful for debugging \s-1GCC\s0. When used with |
| 9565 | \&\fB\-E\fR, dumps debugging information about location maps. Every |
| 9566 | token in the output is preceded by the dump of the map its location |
| 9567 | belongs to. The dump of the map holding the location of a token would |
| 9568 | be: |
| 9569 | .Sp |
| 9570 | .Vb 1 |
| 9571 | \& {"P":F</file/path>;"F":F</includer/path>;"L":<line_num>;"C":<col_num>;"S":<system_header_p>;"M":<map_address>;"E":<macro_expansion_p>,"loc":<location>} |
| 9572 | .Ve |
| 9573 | .Sp |
| 9574 | When used without \fB\-E\fR, this option has no effect. |
| 9575 | .IP "\fB\-ftrack\-macro\-expansion\fR[\fB=\fR\fIlevel\fR]" 4 |
| 9576 | .IX Item "-ftrack-macro-expansion[=level]" |
| 9577 | Track locations of tokens across macro expansions. This allows the |
| 9578 | compiler to emit diagnostic about the current macro expansion stack |
| 9579 | when a compilation error occurs in a macro expansion. Using this |
| 9580 | option makes the preprocessor and the compiler consume more |
| 9581 | memory. The \fIlevel\fR parameter can be used to choose the level of |
| 9582 | precision of token location tracking thus decreasing the memory |
| 9583 | consumption if necessary. Value \fB0\fR of \fIlevel\fR de-activates |
| 9584 | this option just as if no \fB\-ftrack\-macro\-expansion\fR was present |
| 9585 | on the command line. Value \fB1\fR tracks tokens locations in a |
| 9586 | degraded mode for the sake of minimal memory overhead. In this mode |
| 9587 | all tokens resulting from the expansion of an argument of a |
| 9588 | function-like macro have the same location. Value \fB2\fR tracks |
| 9589 | tokens locations completely. This value is the most memory hungry. |
| 9590 | When this option is given no argument, the default parameter value is |
| 9591 | \&\fB2\fR. |
| 9592 | .Sp |
| 9593 | Note that \-ftrack\-macro\-expansion=2 is activated by default. |
| 9594 | .IP "\fB\-fexec\-charset=\fR\fIcharset\fR" 4 |
| 9595 | .IX Item "-fexec-charset=charset" |
| 9596 | Set the execution character set, used for string and character |
| 9597 | constants. The default is \s-1UTF\-8\s0. \fIcharset\fR can be any encoding |
| 9598 | supported by the system's \f(CW\*(C`iconv\*(C'\fR library routine. |
| 9599 | .IP "\fB\-fwide\-exec\-charset=\fR\fIcharset\fR" 4 |
| 9600 | .IX Item "-fwide-exec-charset=charset" |
| 9601 | Set the wide execution character set, used for wide string and |
| 9602 | character constants. The default is \s-1UTF\-32\s0 or \s-1UTF\-16\s0, whichever |
| 9603 | corresponds to the width of \f(CW\*(C`wchar_t\*(C'\fR. As with |
| 9604 | \&\fB\-fexec\-charset\fR, \fIcharset\fR can be any encoding supported |
| 9605 | by the system's \f(CW\*(C`iconv\*(C'\fR library routine; however, you will have |
| 9606 | problems with encodings that do not fit exactly in \f(CW\*(C`wchar_t\*(C'\fR. |
| 9607 | .IP "\fB\-finput\-charset=\fR\fIcharset\fR" 4 |
| 9608 | .IX Item "-finput-charset=charset" |
| 9609 | Set the input character set, used for translation from the character |
| 9610 | set of the input file to the source character set used by \s-1GCC\s0. If the |
| 9611 | locale does not specify, or \s-1GCC\s0 cannot get this information from the |
| 9612 | locale, the default is \s-1UTF\-8\s0. This can be overridden by either the locale |
| 9613 | or this command line option. Currently the command line option takes |
| 9614 | precedence if there's a conflict. \fIcharset\fR can be any encoding |
| 9615 | supported by the system's \f(CW\*(C`iconv\*(C'\fR library routine. |
| 9616 | .IP "\fB\-fworking\-directory\fR" 4 |
| 9617 | .IX Item "-fworking-directory" |
| 9618 | Enable generation of linemarkers in the preprocessor output that will |
| 9619 | let the compiler know the current working directory at the time of |
| 9620 | preprocessing. When this option is enabled, the preprocessor will |
| 9621 | emit, after the initial linemarker, a second linemarker with the |
| 9622 | current working directory followed by two slashes. \s-1GCC\s0 will use this |
| 9623 | directory, when it's present in the preprocessed input, as the |
| 9624 | directory emitted as the current working directory in some debugging |
| 9625 | information formats. This option is implicitly enabled if debugging |
| 9626 | information is enabled, but this can be inhibited with the negated |
| 9627 | form \fB\-fno\-working\-directory\fR. If the \fB\-P\fR flag is |
| 9628 | present in the command line, this option has no effect, since no |
| 9629 | \&\f(CW\*(C`#line\*(C'\fR directives are emitted whatsoever. |
| 9630 | .IP "\fB\-fno\-show\-column\fR" 4 |
| 9631 | .IX Item "-fno-show-column" |
| 9632 | Do not print column numbers in diagnostics. This may be necessary if |
| 9633 | diagnostics are being scanned by a program that does not understand the |
| 9634 | column numbers, such as \fBdejagnu\fR. |
| 9635 | .IP "\fB\-A\fR \fIpredicate\fR\fB=\fR\fIanswer\fR" 4 |
| 9636 | .IX Item "-A predicate=answer" |
| 9637 | Make an assertion with the predicate \fIpredicate\fR and answer |
| 9638 | \&\fIanswer\fR. This form is preferred to the older form \fB\-A\fR |
| 9639 | \&\fIpredicate\fR\fB(\fR\fIanswer\fR\fB)\fR, which is still supported, because |
| 9640 | it does not use shell special characters. |
| 9641 | .IP "\fB\-A \-\fR\fIpredicate\fR\fB=\fR\fIanswer\fR" 4 |
| 9642 | .IX Item "-A -predicate=answer" |
| 9643 | Cancel an assertion with the predicate \fIpredicate\fR and answer |
| 9644 | \&\fIanswer\fR. |
| 9645 | .IP "\fB\-dCHARS\fR" 4 |
| 9646 | .IX Item "-dCHARS" |
| 9647 | \&\fI\s-1CHARS\s0\fR is a sequence of one or more of the following characters, |
| 9648 | and must not be preceded by a space. Other characters are interpreted |
| 9649 | by the compiler proper, or reserved for future versions of \s-1GCC\s0, and so |
| 9650 | are silently ignored. If you specify characters whose behavior |
| 9651 | conflicts, the result is undefined. |
| 9652 | .RS 4 |
| 9653 | .IP "\fBM\fR" 4 |
| 9654 | .IX Item "M" |
| 9655 | Instead of the normal output, generate a list of \fB#define\fR |
| 9656 | directives for all the macros defined during the execution of the |
| 9657 | preprocessor, including predefined macros. This gives you a way of |
| 9658 | finding out what is predefined in your version of the preprocessor. |
| 9659 | Assuming you have no file \fIfoo.h\fR, the command |
| 9660 | .Sp |
| 9661 | .Vb 1 |
| 9662 | \& touch foo.h; cpp \-dM foo.h |
| 9663 | .Ve |
| 9664 | .Sp |
| 9665 | will show all the predefined macros. |
| 9666 | .Sp |
| 9667 | If you use \fB\-dM\fR without the \fB\-E\fR option, \fB\-dM\fR is |
| 9668 | interpreted as a synonym for \fB\-fdump\-rtl\-mach\fR. |
| 9669 | .IP "\fBD\fR" 4 |
| 9670 | .IX Item "D" |
| 9671 | Like \fBM\fR except in two respects: it does \fInot\fR include the |
| 9672 | predefined macros, and it outputs \fIboth\fR the \fB#define\fR |
| 9673 | directives and the result of preprocessing. Both kinds of output go to |
| 9674 | the standard output file. |
| 9675 | .IP "\fBN\fR" 4 |
| 9676 | .IX Item "N" |
| 9677 | Like \fBD\fR, but emit only the macro names, not their expansions. |
| 9678 | .IP "\fBI\fR" 4 |
| 9679 | .IX Item "I" |
| 9680 | Output \fB#include\fR directives in addition to the result of |
| 9681 | preprocessing. |
| 9682 | .IP "\fBU\fR" 4 |
| 9683 | .IX Item "U" |
| 9684 | Like \fBD\fR except that only macros that are expanded, or whose |
| 9685 | definedness is tested in preprocessor directives, are output; the |
| 9686 | output is delayed until the use or test of the macro; and |
| 9687 | \&\fB#undef\fR directives are also output for macros tested but |
| 9688 | undefined at the time. |
| 9689 | .RE |
| 9690 | .RS 4 |
| 9691 | .RE |
| 9692 | .IP "\fB\-P\fR" 4 |
| 9693 | .IX Item "-P" |
| 9694 | Inhibit generation of linemarkers in the output from the preprocessor. |
| 9695 | This might be useful when running the preprocessor on something that is |
| 9696 | not C code, and will be sent to a program which might be confused by the |
| 9697 | linemarkers. |
| 9698 | .IP "\fB\-C\fR" 4 |
| 9699 | .IX Item "-C" |
| 9700 | Do not discard comments. All comments are passed through to the output |
| 9701 | file, except for comments in processed directives, which are deleted |
| 9702 | along with the directive. |
| 9703 | .Sp |
| 9704 | You should be prepared for side effects when using \fB\-C\fR; it |
| 9705 | causes the preprocessor to treat comments as tokens in their own right. |
| 9706 | For example, comments appearing at the start of what would be a |
| 9707 | directive line have the effect of turning that line into an ordinary |
| 9708 | source line, since the first token on the line is no longer a \fB#\fR. |
| 9709 | .IP "\fB\-CC\fR" 4 |
| 9710 | .IX Item "-CC" |
| 9711 | Do not discard comments, including during macro expansion. This is |
| 9712 | like \fB\-C\fR, except that comments contained within macros are |
| 9713 | also passed through to the output file where the macro is expanded. |
| 9714 | .Sp |
| 9715 | In addition to the side-effects of the \fB\-C\fR option, the |
| 9716 | \&\fB\-CC\fR option causes all \*(C+\-style comments inside a macro |
| 9717 | to be converted to C\-style comments. This is to prevent later use |
| 9718 | of that macro from inadvertently commenting out the remainder of |
| 9719 | the source line. |
| 9720 | .Sp |
| 9721 | The \fB\-CC\fR option is generally used to support lint comments. |
| 9722 | .IP "\fB\-traditional\-cpp\fR" 4 |
| 9723 | .IX Item "-traditional-cpp" |
| 9724 | Try to imitate the behavior of old-fashioned C preprocessors, as |
| 9725 | opposed to \s-1ISO\s0 C preprocessors. |
| 9726 | .IP "\fB\-trigraphs\fR" 4 |
| 9727 | .IX Item "-trigraphs" |
| 9728 | Process trigraph sequences. |
| 9729 | These are three-character sequences, all starting with \fB??\fR, that |
| 9730 | are defined by \s-1ISO\s0 C to stand for single characters. For example, |
| 9731 | \&\fB??/\fR stands for \fB\e\fR, so \fB'??/n'\fR is a character |
| 9732 | constant for a newline. By default, \s-1GCC\s0 ignores trigraphs, but in |
| 9733 | standard-conforming modes it converts them. See the \fB\-std\fR and |
| 9734 | \&\fB\-ansi\fR options. |
| 9735 | .Sp |
| 9736 | The nine trigraphs and their replacements are |
| 9737 | .Sp |
| 9738 | .Vb 2 |
| 9739 | \& Trigraph: ??( ??) ??< ??> ??= ??/ ??\*(Aq ??! ??\- |
| 9740 | \& Replacement: [ ] { } # \e ^ | ~ |
| 9741 | .Ve |
| 9742 | .IP "\fB\-remap\fR" 4 |
| 9743 | .IX Item "-remap" |
| 9744 | Enable special code to work around file systems which only permit very |
| 9745 | short file names, such as MS-DOS. |
| 9746 | .IP "\fB\-\-help\fR" 4 |
| 9747 | .IX Item "--help" |
| 9748 | .PD 0 |
| 9749 | .IP "\fB\-\-target\-help\fR" 4 |
| 9750 | .IX Item "--target-help" |
| 9751 | .PD |
| 9752 | Print text describing all the command line options instead of |
| 9753 | preprocessing anything. |
| 9754 | .IP "\fB\-v\fR" 4 |
| 9755 | .IX Item "-v" |
| 9756 | Verbose mode. Print out \s-1GNU\s0 \s-1CPP\s0's version number at the beginning of |
| 9757 | execution, and report the final form of the include path. |
| 9758 | .IP "\fB\-H\fR" 4 |
| 9759 | .IX Item "-H" |
| 9760 | Print the name of each header file used, in addition to other normal |
| 9761 | activities. Each name is indented to show how deep in the |
| 9762 | \&\fB#include\fR stack it is. Precompiled header files are also |
| 9763 | printed, even if they are found to be invalid; an invalid precompiled |
| 9764 | header file is printed with \fB...x\fR and a valid one with \fB...!\fR . |
| 9765 | .IP "\fB\-version\fR" 4 |
| 9766 | .IX Item "-version" |
| 9767 | .PD 0 |
| 9768 | .IP "\fB\-\-version\fR" 4 |
| 9769 | .IX Item "--version" |
| 9770 | .PD |
| 9771 | Print out \s-1GNU\s0 \s-1CPP\s0's version number. With one dash, proceed to |
| 9772 | preprocess as normal. With two dashes, exit immediately. |
| 9773 | .SS "Passing Options to the Assembler" |
| 9774 | .IX Subsection "Passing Options to the Assembler" |
| 9775 | You can pass options to the assembler. |
| 9776 | .IP "\fB\-Wa,\fR\fIoption\fR" 4 |
| 9777 | .IX Item "-Wa,option" |
| 9778 | Pass \fIoption\fR as an option to the assembler. If \fIoption\fR |
| 9779 | contains commas, it is split into multiple options at the commas. |
| 9780 | .IP "\fB\-Xassembler\fR \fIoption\fR" 4 |
| 9781 | .IX Item "-Xassembler option" |
| 9782 | Pass \fIoption\fR as an option to the assembler. You can use this to |
| 9783 | supply system-specific assembler options that \s-1GCC\s0 does not |
| 9784 | recognize. |
| 9785 | .Sp |
| 9786 | If you want to pass an option that takes an argument, you must use |
| 9787 | \&\fB\-Xassembler\fR twice, once for the option and once for the argument. |
| 9788 | .SS "Options for Linking" |
| 9789 | .IX Subsection "Options for Linking" |
| 9790 | These options come into play when the compiler links object files into |
| 9791 | an executable output file. They are meaningless if the compiler is |
| 9792 | not doing a link step. |
| 9793 | .IP "\fIobject-file-name\fR" 4 |
| 9794 | .IX Item "object-file-name" |
| 9795 | A file name that does not end in a special recognized suffix is |
| 9796 | considered to name an object file or library. (Object files are |
| 9797 | distinguished from libraries by the linker according to the file |
| 9798 | contents.) If linking is done, these object files are used as input |
| 9799 | to the linker. |
| 9800 | .IP "\fB\-c\fR" 4 |
| 9801 | .IX Item "-c" |
| 9802 | .PD 0 |
| 9803 | .IP "\fB\-S\fR" 4 |
| 9804 | .IX Item "-S" |
| 9805 | .IP "\fB\-E\fR" 4 |
| 9806 | .IX Item "-E" |
| 9807 | .PD |
| 9808 | If any of these options is used, then the linker is not run, and |
| 9809 | object file names should not be used as arguments. |
| 9810 | .IP "\fB\-l\fR\fIlibrary\fR" 4 |
| 9811 | .IX Item "-llibrary" |
| 9812 | .PD 0 |
| 9813 | .IP "\fB\-l\fR \fIlibrary\fR" 4 |
| 9814 | .IX Item "-l library" |
| 9815 | .PD |
| 9816 | Search the library named \fIlibrary\fR when linking. (The second |
| 9817 | alternative with the library as a separate argument is only for |
| 9818 | \&\s-1POSIX\s0 compliance and is not recommended.) |
| 9819 | .Sp |
| 9820 | It makes a difference where in the command you write this option; the |
| 9821 | linker searches and processes libraries and object files in the order they |
| 9822 | are specified. Thus, \fBfoo.o \-lz bar.o\fR searches library \fBz\fR |
| 9823 | after file \fIfoo.o\fR but before \fIbar.o\fR. If \fIbar.o\fR refers |
| 9824 | to functions in \fBz\fR, those functions may not be loaded. |
| 9825 | .Sp |
| 9826 | The linker searches a standard list of directories for the library, |
| 9827 | which is actually a file named \fIlib\fIlibrary\fI.a\fR. The linker |
| 9828 | then uses this file as if it had been specified precisely by name. |
| 9829 | .Sp |
| 9830 | The directories searched include several standard system directories |
| 9831 | plus any that you specify with \fB\-L\fR. |
| 9832 | .Sp |
| 9833 | Normally the files found this way are library files\-\-\-archive files |
| 9834 | whose members are object files. The linker handles an archive file by |
| 9835 | scanning through it for members which define symbols that have so far |
| 9836 | been referenced but not defined. But if the file that is found is an |
| 9837 | ordinary object file, it is linked in the usual fashion. The only |
| 9838 | difference between using an \fB\-l\fR option and specifying a file name |
| 9839 | is that \fB\-l\fR surrounds \fIlibrary\fR with \fBlib\fR and \fB.a\fR |
| 9840 | and searches several directories. |
| 9841 | .IP "\fB\-lobjc\fR" 4 |
| 9842 | .IX Item "-lobjc" |
| 9843 | You need this special case of the \fB\-l\fR option in order to |
| 9844 | link an Objective-C or Objective\-\*(C+ program. |
| 9845 | .IP "\fB\-nostartfiles\fR" 4 |
| 9846 | .IX Item "-nostartfiles" |
| 9847 | Do not use the standard system startup files when linking. |
| 9848 | The standard system libraries are used normally, unless \fB\-nostdlib\fR |
| 9849 | or \fB\-nodefaultlibs\fR is used. |
| 9850 | .IP "\fB\-nodefaultlibs\fR" 4 |
| 9851 | .IX Item "-nodefaultlibs" |
| 9852 | Do not use the standard system libraries when linking. |
| 9853 | Only the libraries you specify are passed to the linker, and options |
| 9854 | specifying linkage of the system libraries, such as \f(CW\*(C`\-static\-libgcc\*(C'\fR |
| 9855 | or \f(CW\*(C`\-shared\-libgcc\*(C'\fR, are ignored. |
| 9856 | The standard startup files are used normally, unless \fB\-nostartfiles\fR |
| 9857 | is used. |
| 9858 | .Sp |
| 9859 | The compiler may generate calls to \f(CW\*(C`memcmp\*(C'\fR, |
| 9860 | \&\f(CW\*(C`memset\*(C'\fR, \f(CW\*(C`memcpy\*(C'\fR and \f(CW\*(C`memmove\*(C'\fR. |
| 9861 | These entries are usually resolved by entries in |
| 9862 | libc. These entry points should be supplied through some other |
| 9863 | mechanism when this option is specified. |
| 9864 | .IP "\fB\-nostdlib\fR" 4 |
| 9865 | .IX Item "-nostdlib" |
| 9866 | Do not use the standard system startup files or libraries when linking. |
| 9867 | No startup files and only the libraries you specify are passed to |
| 9868 | the linker, and options specifying linkage of the system libraries, such as |
| 9869 | \&\f(CW\*(C`\-static\-libgcc\*(C'\fR or \f(CW\*(C`\-shared\-libgcc\*(C'\fR, are ignored. |
| 9870 | .Sp |
| 9871 | The compiler may generate calls to \f(CW\*(C`memcmp\*(C'\fR, \f(CW\*(C`memset\*(C'\fR, |
| 9872 | \&\f(CW\*(C`memcpy\*(C'\fR and \f(CW\*(C`memmove\*(C'\fR. |
| 9873 | These entries are usually resolved by entries in |
| 9874 | libc. These entry points should be supplied through some other |
| 9875 | mechanism when this option is specified. |
| 9876 | .Sp |
| 9877 | One of the standard libraries bypassed by \fB\-nostdlib\fR and |
| 9878 | \&\fB\-nodefaultlibs\fR is \fIlibgcc.a\fR, a library of internal subroutines |
| 9879 | which \s-1GCC\s0 uses to overcome shortcomings of particular machines, or special |
| 9880 | needs for some languages. |
| 9881 | .Sp |
| 9882 | In most cases, you need \fIlibgcc.a\fR even when you want to avoid |
| 9883 | other standard libraries. In other words, when you specify \fB\-nostdlib\fR |
| 9884 | or \fB\-nodefaultlibs\fR you should usually specify \fB\-lgcc\fR as well. |
| 9885 | This ensures that you have no unresolved references to internal \s-1GCC\s0 |
| 9886 | library subroutines. |
| 9887 | (An example of such an internal subroutine is \fB_\|_main\fR, used to ensure \*(C+ |
| 9888 | constructors are called.) |
| 9889 | .IP "\fB\-pie\fR" 4 |
| 9890 | .IX Item "-pie" |
| 9891 | Produce a position independent executable on targets that support it. |
| 9892 | For predictable results, you must also specify the same set of options |
| 9893 | used for compilation (\fB\-fpie\fR, \fB\-fPIE\fR, |
| 9894 | or model suboptions) when you specify this linker option. |
| 9895 | .IP "\fB\-rdynamic\fR" 4 |
| 9896 | .IX Item "-rdynamic" |
| 9897 | Pass the flag \fB\-export\-dynamic\fR to the \s-1ELF\s0 linker, on targets |
| 9898 | that support it. This instructs the linker to add all symbols, not |
| 9899 | only used ones, to the dynamic symbol table. This option is needed |
| 9900 | for some uses of \f(CW\*(C`dlopen\*(C'\fR or to allow obtaining backtraces |
| 9901 | from within a program. |
| 9902 | .IP "\fB\-s\fR" 4 |
| 9903 | .IX Item "-s" |
| 9904 | Remove all symbol table and relocation information from the executable. |
| 9905 | .IP "\fB\-static\fR" 4 |
| 9906 | .IX Item "-static" |
| 9907 | On systems that support dynamic linking, this prevents linking with the shared |
| 9908 | libraries. On other systems, this option has no effect. |
| 9909 | .IP "\fB\-shared\fR" 4 |
| 9910 | .IX Item "-shared" |
| 9911 | Produce a shared object which can then be linked with other objects to |
| 9912 | form an executable. Not all systems support this option. For predictable |
| 9913 | results, you must also specify the same set of options used for compilation |
| 9914 | (\fB\-fpic\fR, \fB\-fPIC\fR, or model suboptions) when |
| 9915 | you specify this linker option.[1] |
| 9916 | .IP "\fB\-shared\-libgcc\fR" 4 |
| 9917 | .IX Item "-shared-libgcc" |
| 9918 | .PD 0 |
| 9919 | .IP "\fB\-static\-libgcc\fR" 4 |
| 9920 | .IX Item "-static-libgcc" |
| 9921 | .PD |
| 9922 | On systems that provide \fIlibgcc\fR as a shared library, these options |
| 9923 | force the use of either the shared or static version, respectively. |
| 9924 | If no shared version of \fIlibgcc\fR was built when the compiler was |
| 9925 | configured, these options have no effect. |
| 9926 | .Sp |
| 9927 | There are several situations in which an application should use the |
| 9928 | shared \fIlibgcc\fR instead of the static version. The most common |
| 9929 | of these is when the application wishes to throw and catch exceptions |
| 9930 | across different shared libraries. In that case, each of the libraries |
| 9931 | as well as the application itself should use the shared \fIlibgcc\fR. |
| 9932 | .Sp |
| 9933 | Therefore, the G++ and \s-1GCJ\s0 drivers automatically add |
| 9934 | \&\fB\-shared\-libgcc\fR whenever you build a shared library or a main |
| 9935 | executable, because \*(C+ and Java programs typically use exceptions, so |
| 9936 | this is the right thing to do. |
| 9937 | .Sp |
| 9938 | If, instead, you use the \s-1GCC\s0 driver to create shared libraries, you may |
| 9939 | find that they are not always linked with the shared \fIlibgcc\fR. |
| 9940 | If \s-1GCC\s0 finds, at its configuration time, that you have a non-GNU linker |
| 9941 | or a \s-1GNU\s0 linker that does not support option \fB\-\-eh\-frame\-hdr\fR, |
| 9942 | it links the shared version of \fIlibgcc\fR into shared libraries |
| 9943 | by default. Otherwise, it takes advantage of the linker and optimizes |
| 9944 | away the linking with the shared version of \fIlibgcc\fR, linking with |
| 9945 | the static version of libgcc by default. This allows exceptions to |
| 9946 | propagate through such shared libraries, without incurring relocation |
| 9947 | costs at library load time. |
| 9948 | .Sp |
| 9949 | However, if a library or main executable is supposed to throw or catch |
| 9950 | exceptions, you must link it using the G++ or \s-1GCJ\s0 driver, as appropriate |
| 9951 | for the languages used in the program, or using the option |
| 9952 | \&\fB\-shared\-libgcc\fR, such that it is linked with the shared |
| 9953 | \&\fIlibgcc\fR. |
| 9954 | .IP "\fB\-static\-libasan\fR" 4 |
| 9955 | .IX Item "-static-libasan" |
| 9956 | When the \fB\-fsanitize=address\fR option is used to link a program, |
| 9957 | the \s-1GCC\s0 driver automatically links against \fBlibasan\fR. If |
| 9958 | \&\fIlibasan\fR is available as a shared library, and the \fB\-static\fR |
| 9959 | option is not used, then this links against the shared version of |
| 9960 | \&\fIlibasan\fR. The \fB\-static\-libasan\fR option directs the \s-1GCC\s0 |
| 9961 | driver to link \fIlibasan\fR statically, without necessarily linking |
| 9962 | other libraries statically. |
| 9963 | .IP "\fB\-static\-libtsan\fR" 4 |
| 9964 | .IX Item "-static-libtsan" |
| 9965 | When the \fB\-fsanitize=thread\fR option is used to link a program, |
| 9966 | the \s-1GCC\s0 driver automatically links against \fBlibtsan\fR. If |
| 9967 | \&\fIlibtsan\fR is available as a shared library, and the \fB\-static\fR |
| 9968 | option is not used, then this links against the shared version of |
| 9969 | \&\fIlibtsan\fR. The \fB\-static\-libtsan\fR option directs the \s-1GCC\s0 |
| 9970 | driver to link \fIlibtsan\fR statically, without necessarily linking |
| 9971 | other libraries statically. |
| 9972 | .IP "\fB\-static\-libstdc++\fR" 4 |
| 9973 | .IX Item "-static-libstdc++" |
| 9974 | When the \fBg++\fR program is used to link a \*(C+ program, it |
| 9975 | normally automatically links against \fBlibstdc++\fR. If |
| 9976 | \&\fIlibstdc++\fR is available as a shared library, and the |
| 9977 | \&\fB\-static\fR option is not used, then this links against the |
| 9978 | shared version of \fIlibstdc++\fR. That is normally fine. However, it |
| 9979 | is sometimes useful to freeze the version of \fIlibstdc++\fR used by |
| 9980 | the program without going all the way to a fully static link. The |
| 9981 | \&\fB\-static\-libstdc++\fR option directs the \fBg++\fR driver to |
| 9982 | link \fIlibstdc++\fR statically, without necessarily linking other |
| 9983 | libraries statically. |
| 9984 | .IP "\fB\-symbolic\fR" 4 |
| 9985 | .IX Item "-symbolic" |
| 9986 | Bind references to global symbols when building a shared object. Warn |
| 9987 | about any unresolved references (unless overridden by the link editor |
| 9988 | option \fB\-Xlinker \-z \-Xlinker defs\fR). Only a few systems support |
| 9989 | this option. |
| 9990 | .IP "\fB\-T\fR \fIscript\fR" 4 |
| 9991 | .IX Item "-T script" |
| 9992 | Use \fIscript\fR as the linker script. This option is supported by most |
| 9993 | systems using the \s-1GNU\s0 linker. On some targets, such as bare-board |
| 9994 | targets without an operating system, the \fB\-T\fR option may be required |
| 9995 | when linking to avoid references to undefined symbols. |
| 9996 | .IP "\fB\-Xlinker\fR \fIoption\fR" 4 |
| 9997 | .IX Item "-Xlinker option" |
| 9998 | Pass \fIoption\fR as an option to the linker. You can use this to |
| 9999 | supply system-specific linker options that \s-1GCC\s0 does not recognize. |
| 10000 | .Sp |
| 10001 | If you want to pass an option that takes a separate argument, you must use |
| 10002 | \&\fB\-Xlinker\fR twice, once for the option and once for the argument. |
| 10003 | For example, to pass \fB\-assert definitions\fR, you must write |
| 10004 | \&\fB\-Xlinker \-assert \-Xlinker definitions\fR. It does not work to write |
| 10005 | \&\fB\-Xlinker \*(L"\-assert definitions\*(R"\fR, because this passes the entire |
| 10006 | string as a single argument, which is not what the linker expects. |
| 10007 | .Sp |
| 10008 | When using the \s-1GNU\s0 linker, it is usually more convenient to pass |
| 10009 | arguments to linker options using the \fIoption\fR\fB=\fR\fIvalue\fR |
| 10010 | syntax than as separate arguments. For example, you can specify |
| 10011 | \&\fB\-Xlinker \-Map=output.map\fR rather than |
| 10012 | \&\fB\-Xlinker \-Map \-Xlinker output.map\fR. Other linkers may not support |
| 10013 | this syntax for command-line options. |
| 10014 | .IP "\fB\-Wl,\fR\fIoption\fR" 4 |
| 10015 | .IX Item "-Wl,option" |
| 10016 | Pass \fIoption\fR as an option to the linker. If \fIoption\fR contains |
| 10017 | commas, it is split into multiple options at the commas. You can use this |
| 10018 | syntax to pass an argument to the option. |
| 10019 | For example, \fB\-Wl,\-Map,output.map\fR passes \fB\-Map output.map\fR to the |
| 10020 | linker. When using the \s-1GNU\s0 linker, you can also get the same effect with |
| 10021 | \&\fB\-Wl,\-Map=output.map\fR. |
| 10022 | .IP "\fB\-u\fR \fIsymbol\fR" 4 |
| 10023 | .IX Item "-u symbol" |
| 10024 | Pretend the symbol \fIsymbol\fR is undefined, to force linking of |
| 10025 | library modules to define it. You can use \fB\-u\fR multiple times with |
| 10026 | different symbols to force loading of additional library modules. |
| 10027 | .SS "Options for Directory Search" |
| 10028 | .IX Subsection "Options for Directory Search" |
| 10029 | These options specify directories to search for header files, for |
| 10030 | libraries and for parts of the compiler: |
| 10031 | .IP "\fB\-I\fR\fIdir\fR" 4 |
| 10032 | .IX Item "-Idir" |
| 10033 | Add the directory \fIdir\fR to the head of the list of directories to be |
| 10034 | searched for header files. This can be used to override a system header |
| 10035 | file, substituting your own version, since these directories are |
| 10036 | searched before the system header file directories. However, you should |
| 10037 | not use this option to add directories that contain vendor-supplied |
| 10038 | system header files (use \fB\-isystem\fR for that). If you use more than |
| 10039 | one \fB\-I\fR option, the directories are scanned in left-to-right |
| 10040 | order; the standard system directories come after. |
| 10041 | .Sp |
| 10042 | If a standard system include directory, or a directory specified with |
| 10043 | \&\fB\-isystem\fR, is also specified with \fB\-I\fR, the \fB\-I\fR |
| 10044 | option is ignored. The directory is still searched but as a |
| 10045 | system directory at its normal position in the system include chain. |
| 10046 | This is to ensure that \s-1GCC\s0's procedure to fix buggy system headers and |
| 10047 | the ordering for the \f(CW\*(C`include_next\*(C'\fR directive are not inadvertently changed. |
| 10048 | If you really need to change the search order for system directories, |
| 10049 | use the \fB\-nostdinc\fR and/or \fB\-isystem\fR options. |
| 10050 | .IP "\fB\-iplugindir=\fR\fIdir\fR" 4 |
| 10051 | .IX Item "-iplugindir=dir" |
| 10052 | Set the directory to search for plugins that are passed |
| 10053 | by \fB\-fplugin=\fR\fIname\fR instead of |
| 10054 | \&\fB\-fplugin=\fR\fIpath\fR\fB/\fR\fIname\fR\fB.so\fR. This option is not meant |
| 10055 | to be used by the user, but only passed by the driver. |
| 10056 | .IP "\fB\-iquote\fR\fIdir\fR" 4 |
| 10057 | .IX Item "-iquotedir" |
| 10058 | Add the directory \fIdir\fR to the head of the list of directories to |
| 10059 | be searched for header files only for the case of \fB#include |
| 10060 | "\fR\fIfile\fR\fB"\fR; they are not searched for \fB#include <\fR\fIfile\fR\fB>\fR, |
| 10061 | otherwise just like \fB\-I\fR. |
| 10062 | .IP "\fB\-L\fR\fIdir\fR" 4 |
| 10063 | .IX Item "-Ldir" |
| 10064 | Add directory \fIdir\fR to the list of directories to be searched |
| 10065 | for \fB\-l\fR. |
| 10066 | .IP "\fB\-B\fR\fIprefix\fR" 4 |
| 10067 | .IX Item "-Bprefix" |
| 10068 | This option specifies where to find the executables, libraries, |
| 10069 | include files, and data files of the compiler itself. |
| 10070 | .Sp |
| 10071 | The compiler driver program runs one or more of the subprograms |
| 10072 | \&\fBcpp\fR, \fBcc1\fR, \fBas\fR and \fBld\fR. It tries |
| 10073 | \&\fIprefix\fR as a prefix for each program it tries to run, both with and |
| 10074 | without \fImachine\fR\fB/\fR\fIversion\fR\fB/\fR. |
| 10075 | .Sp |
| 10076 | For each subprogram to be run, the compiler driver first tries the |
| 10077 | \&\fB\-B\fR prefix, if any. If that name is not found, or if \fB\-B\fR |
| 10078 | is not specified, the driver tries two standard prefixes, |
| 10079 | \&\fI/usr/lib/gcc/\fR and \fI/usr/local/lib/gcc/\fR. If neither of |
| 10080 | those results in a file name that is found, the unmodified program |
| 10081 | name is searched for using the directories specified in your |
| 10082 | \&\fB\s-1PATH\s0\fR environment variable. |
| 10083 | .Sp |
| 10084 | The compiler checks to see if the path provided by the \fB\-B\fR |
| 10085 | refers to a directory, and if necessary it adds a directory |
| 10086 | separator character at the end of the path. |
| 10087 | .Sp |
| 10088 | \&\fB\-B\fR prefixes that effectively specify directory names also apply |
| 10089 | to libraries in the linker, because the compiler translates these |
| 10090 | options into \fB\-L\fR options for the linker. They also apply to |
| 10091 | includes files in the preprocessor, because the compiler translates these |
| 10092 | options into \fB\-isystem\fR options for the preprocessor. In this case, |
| 10093 | the compiler appends \fBinclude\fR to the prefix. |
| 10094 | .Sp |
| 10095 | The runtime support file \fIlibgcc.a\fR can also be searched for using |
| 10096 | the \fB\-B\fR prefix, if needed. If it is not found there, the two |
| 10097 | standard prefixes above are tried, and that is all. The file is left |
| 10098 | out of the link if it is not found by those means. |
| 10099 | .Sp |
| 10100 | Another way to specify a prefix much like the \fB\-B\fR prefix is to use |
| 10101 | the environment variable \fB\s-1GCC_EXEC_PREFIX\s0\fR. |
| 10102 | .Sp |
| 10103 | As a special kludge, if the path provided by \fB\-B\fR is |
| 10104 | \&\fI[dir/]stage\fIN\fI/\fR, where \fIN\fR is a number in the range 0 to |
| 10105 | 9, then it is replaced by \fI[dir/]include\fR. This is to help |
| 10106 | with boot-strapping the compiler. |
| 10107 | .IP "\fB\-specs=\fR\fIfile\fR" 4 |
| 10108 | .IX Item "-specs=file" |
| 10109 | Process \fIfile\fR after the compiler reads in the standard \fIspecs\fR |
| 10110 | file, in order to override the defaults which the \fBgcc\fR driver |
| 10111 | program uses when determining what switches to pass to \fBcc1\fR, |
| 10112 | \&\fBcc1plus\fR, \fBas\fR, \fBld\fR, etc. More than one |
| 10113 | \&\fB\-specs=\fR\fIfile\fR can be specified on the command line, and they |
| 10114 | are processed in order, from left to right. |
| 10115 | .IP "\fB\-\-sysroot=\fR\fIdir\fR" 4 |
| 10116 | .IX Item "--sysroot=dir" |
| 10117 | Use \fIdir\fR as the logical root directory for headers and libraries. |
| 10118 | For example, if the compiler normally searches for headers in |
| 10119 | \&\fI/usr/include\fR and libraries in \fI/usr/lib\fR, it instead |
| 10120 | searches \fI\fIdir\fI/usr/include\fR and \fI\fIdir\fI/usr/lib\fR. |
| 10121 | .Sp |
| 10122 | If you use both this option and the \fB\-isysroot\fR option, then |
| 10123 | the \fB\-\-sysroot\fR option applies to libraries, but the |
| 10124 | \&\fB\-isysroot\fR option applies to header files. |
| 10125 | .Sp |
| 10126 | The \s-1GNU\s0 linker (beginning with version 2.16) has the necessary support |
| 10127 | for this option. If your linker does not support this option, the |
| 10128 | header file aspect of \fB\-\-sysroot\fR still works, but the |
| 10129 | library aspect does not. |
| 10130 | .IP "\fB\-\-no\-sysroot\-suffix\fR" 4 |
| 10131 | .IX Item "--no-sysroot-suffix" |
| 10132 | For some targets, a suffix is added to the root directory specified |
| 10133 | with \fB\-\-sysroot\fR, depending on the other options used, so that |
| 10134 | headers may for example be found in |
| 10135 | \&\fI\fIdir\fI/\fIsuffix\fI/usr/include\fR instead of |
| 10136 | \&\fI\fIdir\fI/usr/include\fR. This option disables the addition of |
| 10137 | such a suffix. |
| 10138 | .IP "\fB\-I\-\fR" 4 |
| 10139 | .IX Item "-I-" |
| 10140 | This option has been deprecated. Please use \fB\-iquote\fR instead for |
| 10141 | \&\fB\-I\fR directories before the \fB\-I\-\fR and remove the \fB\-I\-\fR. |
| 10142 | Any directories you specify with \fB\-I\fR options before the \fB\-I\-\fR |
| 10143 | option are searched only for the case of \fB#include "\fR\fIfile\fR\fB"\fR; |
| 10144 | they are not searched for \fB#include <\fR\fIfile\fR\fB>\fR. |
| 10145 | .Sp |
| 10146 | If additional directories are specified with \fB\-I\fR options after |
| 10147 | the \fB\-I\-\fR, these directories are searched for all \fB#include\fR |
| 10148 | directives. (Ordinarily \fIall\fR \fB\-I\fR directories are used |
| 10149 | this way.) |
| 10150 | .Sp |
| 10151 | In addition, the \fB\-I\-\fR option inhibits the use of the current |
| 10152 | directory (where the current input file came from) as the first search |
| 10153 | directory for \fB#include "\fR\fIfile\fR\fB"\fR. There is no way to |
| 10154 | override this effect of \fB\-I\-\fR. With \fB\-I.\fR you can specify |
| 10155 | searching the directory that is current when the compiler is |
| 10156 | invoked. That is not exactly the same as what the preprocessor does |
| 10157 | by default, but it is often satisfactory. |
| 10158 | .Sp |
| 10159 | \&\fB\-I\-\fR does not inhibit the use of the standard system directories |
| 10160 | for header files. Thus, \fB\-I\-\fR and \fB\-nostdinc\fR are |
| 10161 | independent. |
| 10162 | .SS "Specifying Target Machine and Compiler Version" |
| 10163 | .IX Subsection "Specifying Target Machine and Compiler Version" |
| 10164 | The usual way to run \s-1GCC\s0 is to run the executable called \fBgcc\fR, or |
| 10165 | \&\fImachine\fR\fB\-gcc\fR when cross-compiling, or |
| 10166 | \&\fImachine\fR\fB\-gcc\-\fR\fIversion\fR to run a version other than the |
| 10167 | one that was installed last. |
| 10168 | .SS "Hardware Models and Configurations" |
| 10169 | .IX Subsection "Hardware Models and Configurations" |
| 10170 | Each target machine types can have its own |
| 10171 | special options, starting with \fB\-m\fR, to choose among various |
| 10172 | hardware models or configurations\-\-\-for example, 68010 vs 68020, |
| 10173 | floating coprocessor or none. A single installed version of the |
| 10174 | compiler can compile for any model or configuration, according to the |
| 10175 | options specified. |
| 10176 | .PP |
| 10177 | Some configurations of the compiler also support additional special |
| 10178 | options, usually for compatibility with other compilers on the same |
| 10179 | platform. |
| 10180 | .PP |
| 10181 | \fIAArch64 Options\fR |
| 10182 | .IX Subsection "AArch64 Options" |
| 10183 | .PP |
| 10184 | These options are defined for AArch64 implementations: |
| 10185 | .IP "\fB\-mbig\-endian\fR" 4 |
| 10186 | .IX Item "-mbig-endian" |
| 10187 | Generate big-endian code. This is the default when \s-1GCC\s0 is configured for an |
| 10188 | \&\fBaarch64_be\-*\-*\fR target. |
| 10189 | .IP "\fB\-mgeneral\-regs\-only\fR" 4 |
| 10190 | .IX Item "-mgeneral-regs-only" |
| 10191 | Generate code which uses only the general registers. |
| 10192 | .IP "\fB\-mlittle\-endian\fR" 4 |
| 10193 | .IX Item "-mlittle-endian" |
| 10194 | Generate little-endian code. This is the default when \s-1GCC\s0 is configured for an |
| 10195 | \&\fBaarch64\-*\-*\fR but not an \fBaarch64_be\-*\-*\fR target. |
| 10196 | .IP "\fB\-mcmodel=tiny\fR" 4 |
| 10197 | .IX Item "-mcmodel=tiny" |
| 10198 | Generate code for the tiny code model. The program and its statically defined |
| 10199 | symbols must be within 1GB of each other. Pointers are 64 bits. Programs can |
| 10200 | be statically or dynamically linked. This model is not fully implemented and |
| 10201 | mostly treated as \fBsmall\fR. |
| 10202 | .IP "\fB\-mcmodel=small\fR" 4 |
| 10203 | .IX Item "-mcmodel=small" |
| 10204 | Generate code for the small code model. The program and its statically defined |
| 10205 | symbols must be within 4GB of each other. Pointers are 64 bits. Programs can |
| 10206 | be statically or dynamically linked. This is the default code model. |
| 10207 | .IP "\fB\-mcmodel=large\fR" 4 |
| 10208 | .IX Item "-mcmodel=large" |
| 10209 | Generate code for the large code model. This makes no assumptions about |
| 10210 | addresses and sizes of sections. Pointers are 64 bits. Programs can be |
| 10211 | statically linked only. |
| 10212 | .IP "\fB\-mstrict\-align\fR" 4 |
| 10213 | .IX Item "-mstrict-align" |
| 10214 | Do not assume that unaligned memory references will be handled by the system. |
| 10215 | .IP "\fB\-momit\-leaf\-frame\-pointer\fR" 4 |
| 10216 | .IX Item "-momit-leaf-frame-pointer" |
| 10217 | .PD 0 |
| 10218 | .IP "\fB\-mno\-omit\-leaf\-frame\-pointer\fR" 4 |
| 10219 | .IX Item "-mno-omit-leaf-frame-pointer" |
| 10220 | .PD |
| 10221 | Omit or keep the frame pointer in leaf functions. The former behaviour is the |
| 10222 | default. |
| 10223 | .IP "\fB\-mtls\-dialect=desc\fR" 4 |
| 10224 | .IX Item "-mtls-dialect=desc" |
| 10225 | Use \s-1TLS\s0 descriptors as the thread-local storage mechanism for dynamic accesses |
| 10226 | of \s-1TLS\s0 variables. This is the default. |
| 10227 | .IP "\fB\-mtls\-dialect=traditional\fR" 4 |
| 10228 | .IX Item "-mtls-dialect=traditional" |
| 10229 | Use traditional \s-1TLS\s0 as the thread-local storage mechanism for dynamic accesses |
| 10230 | of \s-1TLS\s0 variables. |
| 10231 | .IP "\fB\-march=\fR\fIname\fR" 4 |
| 10232 | .IX Item "-march=name" |
| 10233 | Specify the name of the target architecture, optionally suffixed by one or |
| 10234 | more feature modifiers. This option has the form |
| 10235 | \&\fB\-march=\fR\fIarch\fR{\fB+\fR[\fBno\fR]\fIfeature\fR}*, where the |
| 10236 | only value for \fIarch\fR is \fBarmv8\-a\fR. The possible values for |
| 10237 | \&\fIfeature\fR are documented in the sub-section below. |
| 10238 | .Sp |
| 10239 | Where conflicting feature modifiers are specified, the right-most feature is |
| 10240 | used. |
| 10241 | .Sp |
| 10242 | \&\s-1GCC\s0 uses this name to determine what kind of instructions it can emit when |
| 10243 | generating assembly code. This option can be used in conjunction with or |
| 10244 | instead of the \fB\-mcpu=\fR option. |
| 10245 | .IP "\fB\-mcpu=\fR\fIname\fR" 4 |
| 10246 | .IX Item "-mcpu=name" |
| 10247 | Specify the name of the target processor, optionally suffixed by one or more |
| 10248 | feature modifiers. This option has the form |
| 10249 | \&\fB\-mcpu=\fR\fIcpu\fR{\fB+\fR[\fBno\fR]\fIfeature\fR}*, where the |
| 10250 | possible values for \fIcpu\fR are \fBgeneric\fR, \fBlarge\fR. The |
| 10251 | possible values for \fIfeature\fR are documented in the sub-section |
| 10252 | below. |
| 10253 | .Sp |
| 10254 | Where conflicting feature modifiers are specified, the right-most feature is |
| 10255 | used. |
| 10256 | .Sp |
| 10257 | \&\s-1GCC\s0 uses this name to determine what kind of instructions it can emit when |
| 10258 | generating assembly code. |
| 10259 | .IP "\fB\-mtune=\fR\fIname\fR" 4 |
| 10260 | .IX Item "-mtune=name" |
| 10261 | Specify the name of the processor to tune the performance for. The code will |
| 10262 | be tuned as if the target processor were of the type specified in this option, |
| 10263 | but still using instructions compatible with the target processor specified |
| 10264 | by a \fB\-mcpu=\fR option. This option cannot be suffixed by feature |
| 10265 | modifiers. |
| 10266 | .PP |
| 10267 | \fB\-march\fR and \fB\-mcpu\fR feature modifiers |
| 10268 | .IX Subsection "-march and -mcpu feature modifiers" |
| 10269 | .PP |
| 10270 | Feature modifiers used with \fB\-march\fR and \fB\-mcpu\fR can be one |
| 10271 | the following: |
| 10272 | .IP "\fBcrypto\fR" 4 |
| 10273 | .IX Item "crypto" |
| 10274 | Enable Crypto extension. This implies Advanced \s-1SIMD\s0 is enabled. |
| 10275 | .IP "\fBfp\fR" 4 |
| 10276 | .IX Item "fp" |
| 10277 | Enable floating-point instructions. |
| 10278 | .IP "\fBsimd\fR" 4 |
| 10279 | .IX Item "simd" |
| 10280 | Enable Advanced \s-1SIMD\s0 instructions. This implies floating-point instructions |
| 10281 | are enabled. This is the default for all current possible values for options |
| 10282 | \&\fB\-march\fR and \fB\-mcpu=\fR. |
| 10283 | .PP |
| 10284 | \fIAdapteva Epiphany Options\fR |
| 10285 | .IX Subsection "Adapteva Epiphany Options" |
| 10286 | .PP |
| 10287 | These \fB\-m\fR options are defined for Adapteva Epiphany: |
| 10288 | .IP "\fB\-mhalf\-reg\-file\fR" 4 |
| 10289 | .IX Item "-mhalf-reg-file" |
| 10290 | Don't allocate any register in the range \f(CW\*(C`r32\*(C'\fR...\f(CW\*(C`r63\*(C'\fR. |
| 10291 | That allows code to run on hardware variants that lack these registers. |
| 10292 | .IP "\fB\-mprefer\-short\-insn\-regs\fR" 4 |
| 10293 | .IX Item "-mprefer-short-insn-regs" |
| 10294 | Preferrentially allocate registers that allow short instruction generation. |
| 10295 | This can result in increased instruction count, so this may either reduce or |
| 10296 | increase overall code size. |
| 10297 | .IP "\fB\-mbranch\-cost=\fR\fInum\fR" 4 |
| 10298 | .IX Item "-mbranch-cost=num" |
| 10299 | Set the cost of branches to roughly \fInum\fR \*(L"simple\*(R" instructions. |
| 10300 | This cost is only a heuristic and is not guaranteed to produce |
| 10301 | consistent results across releases. |
| 10302 | .IP "\fB\-mcmove\fR" 4 |
| 10303 | .IX Item "-mcmove" |
| 10304 | Enable the generation of conditional moves. |
| 10305 | .IP "\fB\-mnops=\fR\fInum\fR" 4 |
| 10306 | .IX Item "-mnops=num" |
| 10307 | Emit \fInum\fR NOPs before every other generated instruction. |
| 10308 | .IP "\fB\-mno\-soft\-cmpsf\fR" 4 |
| 10309 | .IX Item "-mno-soft-cmpsf" |
| 10310 | For single-precision floating-point comparisons, emit an \f(CW\*(C`fsub\*(C'\fR instruction |
| 10311 | and test the flags. This is faster than a software comparison, but can |
| 10312 | get incorrect results in the presence of NaNs, or when two different small |
| 10313 | numbers are compared such that their difference is calculated as zero. |
| 10314 | The default is \fB\-msoft\-cmpsf\fR, which uses slower, but IEEE-compliant, |
| 10315 | software comparisons. |
| 10316 | .IP "\fB\-mstack\-offset=\fR\fInum\fR" 4 |
| 10317 | .IX Item "-mstack-offset=num" |
| 10318 | Set the offset between the top of the stack and the stack pointer. |
| 10319 | E.g., a value of 8 means that the eight bytes in the range \f(CW\*(C`sp+0...sp+7\*(C'\fR |
| 10320 | can be used by leaf functions without stack allocation. |
| 10321 | Values other than \fB8\fR or \fB16\fR are untested and unlikely to work. |
| 10322 | Note also that this option changes the \s-1ABI\s0; compiling a program with a |
| 10323 | different stack offset than the libraries have been compiled with |
| 10324 | generally does not work. |
| 10325 | This option can be useful if you want to evaluate if a different stack |
| 10326 | offset would give you better code, but to actually use a different stack |
| 10327 | offset to build working programs, it is recommended to configure the |
| 10328 | toolchain with the appropriate \fB\-\-with\-stack\-offset=\fR\fInum\fR option. |
| 10329 | .IP "\fB\-mno\-round\-nearest\fR" 4 |
| 10330 | .IX Item "-mno-round-nearest" |
| 10331 | Make the scheduler assume that the rounding mode has been set to |
| 10332 | truncating. The default is \fB\-mround\-nearest\fR. |
| 10333 | .IP "\fB\-mlong\-calls\fR" 4 |
| 10334 | .IX Item "-mlong-calls" |
| 10335 | If not otherwise specified by an attribute, assume all calls might be beyond |
| 10336 | the offset range of the \f(CW\*(C`b\*(C'\fR / \f(CW\*(C`bl\*(C'\fR instructions, and therefore load the |
| 10337 | function address into a register before performing a (otherwise direct) call. |
| 10338 | This is the default. |
| 10339 | .IP "\fB\-mshort\-calls\fR" 4 |
| 10340 | .IX Item "-mshort-calls" |
| 10341 | If not otherwise specified by an attribute, assume all direct calls are |
| 10342 | in the range of the \f(CW\*(C`b\*(C'\fR / \f(CW\*(C`bl\*(C'\fR instructions, so use these instructions |
| 10343 | for direct calls. The default is \fB\-mlong\-calls\fR. |
| 10344 | .IP "\fB\-msmall16\fR" 4 |
| 10345 | .IX Item "-msmall16" |
| 10346 | Assume addresses can be loaded as 16\-bit unsigned values. This does not |
| 10347 | apply to function addresses for which \fB\-mlong\-calls\fR semantics |
| 10348 | are in effect. |
| 10349 | .IP "\fB\-mfp\-mode=\fR\fImode\fR" 4 |
| 10350 | .IX Item "-mfp-mode=mode" |
| 10351 | Set the prevailing mode of the floating-point unit. |
| 10352 | This determines the floating-point mode that is provided and expected |
| 10353 | at function call and return time. Making this mode match the mode you |
| 10354 | predominantly need at function start can make your programs smaller and |
| 10355 | faster by avoiding unnecessary mode switches. |
| 10356 | .Sp |
| 10357 | \&\fImode\fR can be set to one the following values: |
| 10358 | .RS 4 |
| 10359 | .IP "\fBcaller\fR" 4 |
| 10360 | .IX Item "caller" |
| 10361 | Any mode at function entry is valid, and retained or restored when |
| 10362 | the function returns, and when it calls other functions. |
| 10363 | This mode is useful for compiling libraries or other compilation units |
| 10364 | you might want to incorporate into different programs with different |
| 10365 | prevailing \s-1FPU\s0 modes, and the convenience of being able to use a single |
| 10366 | object file outweighs the size and speed overhead for any extra |
| 10367 | mode switching that might be needed, compared with what would be needed |
| 10368 | with a more specific choice of prevailing \s-1FPU\s0 mode. |
| 10369 | .IP "\fBtruncate\fR" 4 |
| 10370 | .IX Item "truncate" |
| 10371 | This is the mode used for floating-point calculations with |
| 10372 | truncating (i.e. round towards zero) rounding mode. That includes |
| 10373 | conversion from floating point to integer. |
| 10374 | .IP "\fBround-nearest\fR" 4 |
| 10375 | .IX Item "round-nearest" |
| 10376 | This is the mode used for floating-point calculations with |
| 10377 | round-to-nearest-or-even rounding mode. |
| 10378 | .IP "\fBint\fR" 4 |
| 10379 | .IX Item "int" |
| 10380 | This is the mode used to perform integer calculations in the \s-1FPU\s0, e.g. |
| 10381 | integer multiply, or integer multiply-and-accumulate. |
| 10382 | .RE |
| 10383 | .RS 4 |
| 10384 | .Sp |
| 10385 | The default is \fB\-mfp\-mode=caller\fR |
| 10386 | .RE |
| 10387 | .IP "\fB\-mnosplit\-lohi\fR" 4 |
| 10388 | .IX Item "-mnosplit-lohi" |
| 10389 | .PD 0 |
| 10390 | .IP "\fB\-mno\-postinc\fR" 4 |
| 10391 | .IX Item "-mno-postinc" |
| 10392 | .IP "\fB\-mno\-postmodify\fR" 4 |
| 10393 | .IX Item "-mno-postmodify" |
| 10394 | .PD |
| 10395 | Code generation tweaks that disable, respectively, splitting of 32\-bit |
| 10396 | loads, generation of post-increment addresses, and generation of |
| 10397 | post-modify addresses. The defaults are \fBmsplit-lohi\fR, |
| 10398 | \&\fB\-mpost\-inc\fR, and \fB\-mpost\-modify\fR. |
| 10399 | .IP "\fB\-mnovect\-double\fR" 4 |
| 10400 | .IX Item "-mnovect-double" |
| 10401 | Change the preferred \s-1SIMD\s0 mode to SImode. The default is |
| 10402 | \&\fB\-mvect\-double\fR, which uses DImode as preferred \s-1SIMD\s0 mode. |
| 10403 | .IP "\fB\-max\-vect\-align=\fR\fInum\fR" 4 |
| 10404 | .IX Item "-max-vect-align=num" |
| 10405 | The maximum alignment for \s-1SIMD\s0 vector mode types. |
| 10406 | \&\fInum\fR may be 4 or 8. The default is 8. |
| 10407 | Note that this is an \s-1ABI\s0 change, even though many library function |
| 10408 | interfaces are unaffected if they don't use \s-1SIMD\s0 vector modes |
| 10409 | in places that affect size and/or alignment of relevant types. |
| 10410 | .IP "\fB\-msplit\-vecmove\-early\fR" 4 |
| 10411 | .IX Item "-msplit-vecmove-early" |
| 10412 | Split vector moves into single word moves before reload. In theory this |
| 10413 | can give better register allocation, but so far the reverse seems to be |
| 10414 | generally the case. |
| 10415 | .IP "\fB\-m1reg\-\fR\fIreg\fR" 4 |
| 10416 | .IX Item "-m1reg-reg" |
| 10417 | Specify a register to hold the constant \-1, which makes loading small negative |
| 10418 | constants and certain bitmasks faster. |
| 10419 | Allowable values for \fIreg\fR are \fBr43\fR and \fBr63\fR, |
| 10420 | which specify use of that register as a fixed register, |
| 10421 | and \fBnone\fR, which means that no register is used for this |
| 10422 | purpose. The default is \fB\-m1reg\-none\fR. |
| 10423 | .PP |
| 10424 | \fI\s-1ARM\s0 Options\fR |
| 10425 | .IX Subsection "ARM Options" |
| 10426 | .PP |
| 10427 | These \fB\-m\fR options are defined for Advanced \s-1RISC\s0 Machines (\s-1ARM\s0) |
| 10428 | architectures: |
| 10429 | .IP "\fB\-mabi=\fR\fIname\fR" 4 |
| 10430 | .IX Item "-mabi=name" |
| 10431 | Generate code for the specified \s-1ABI\s0. Permissible values are: \fBapcs-gnu\fR, |
| 10432 | \&\fBatpcs\fR, \fBaapcs\fR, \fBaapcs-linux\fR and \fBiwmmxt\fR. |
| 10433 | .IP "\fB\-mapcs\-frame\fR" 4 |
| 10434 | .IX Item "-mapcs-frame" |
| 10435 | Generate a stack frame that is compliant with the \s-1ARM\s0 Procedure Call |
| 10436 | Standard for all functions, even if this is not strictly necessary for |
| 10437 | correct execution of the code. Specifying \fB\-fomit\-frame\-pointer\fR |
| 10438 | with this option causes the stack frames not to be generated for |
| 10439 | leaf functions. The default is \fB\-mno\-apcs\-frame\fR. |
| 10440 | .IP "\fB\-mapcs\fR" 4 |
| 10441 | .IX Item "-mapcs" |
| 10442 | This is a synonym for \fB\-mapcs\-frame\fR. |
| 10443 | .IP "\fB\-mthumb\-interwork\fR" 4 |
| 10444 | .IX Item "-mthumb-interwork" |
| 10445 | Generate code that supports calling between the \s-1ARM\s0 and Thumb |
| 10446 | instruction sets. Without this option, on pre\-v5 architectures, the |
| 10447 | two instruction sets cannot be reliably used inside one program. The |
| 10448 | default is \fB\-mno\-thumb\-interwork\fR, since slightly larger code |
| 10449 | is generated when \fB\-mthumb\-interwork\fR is specified. In \s-1AAPCS\s0 |
| 10450 | configurations this option is meaningless. |
| 10451 | .IP "\fB\-mno\-sched\-prolog\fR" 4 |
| 10452 | .IX Item "-mno-sched-prolog" |
| 10453 | Prevent the reordering of instructions in the function prologue, or the |
| 10454 | merging of those instruction with the instructions in the function's |
| 10455 | body. This means that all functions start with a recognizable set |
| 10456 | of instructions (or in fact one of a choice from a small set of |
| 10457 | different function prologues), and this information can be used to |
| 10458 | locate the start of functions inside an executable piece of code. The |
| 10459 | default is \fB\-msched\-prolog\fR. |
| 10460 | .IP "\fB\-mfloat\-abi=\fR\fIname\fR" 4 |
| 10461 | .IX Item "-mfloat-abi=name" |
| 10462 | Specifies which floating-point \s-1ABI\s0 to use. Permissible values |
| 10463 | are: \fBsoft\fR, \fBsoftfp\fR and \fBhard\fR. |
| 10464 | .Sp |
| 10465 | Specifying \fBsoft\fR causes \s-1GCC\s0 to generate output containing |
| 10466 | library calls for floating-point operations. |
| 10467 | \&\fBsoftfp\fR allows the generation of code using hardware floating-point |
| 10468 | instructions, but still uses the soft-float calling conventions. |
| 10469 | \&\fBhard\fR allows generation of floating-point instructions |
| 10470 | and uses FPU-specific calling conventions. |
| 10471 | .Sp |
| 10472 | The default depends on the specific target configuration. Note that |
| 10473 | the hard-float and soft-float ABIs are not link-compatible; you must |
| 10474 | compile your entire program with the same \s-1ABI\s0, and link with a |
| 10475 | compatible set of libraries. |
| 10476 | .IP "\fB\-mlittle\-endian\fR" 4 |
| 10477 | .IX Item "-mlittle-endian" |
| 10478 | Generate code for a processor running in little-endian mode. This is |
| 10479 | the default for all standard configurations. |
| 10480 | .IP "\fB\-mbig\-endian\fR" 4 |
| 10481 | .IX Item "-mbig-endian" |
| 10482 | Generate code for a processor running in big-endian mode; the default is |
| 10483 | to compile code for a little-endian processor. |
| 10484 | .IP "\fB\-mwords\-little\-endian\fR" 4 |
| 10485 | .IX Item "-mwords-little-endian" |
| 10486 | This option only applies when generating code for big-endian processors. |
| 10487 | Generate code for a little-endian word order but a big-endian byte |
| 10488 | order. That is, a byte order of the form \fB32107654\fR. Note: this |
| 10489 | option should only be used if you require compatibility with code for |
| 10490 | big-endian \s-1ARM\s0 processors generated by versions of the compiler prior to |
| 10491 | 2.8. This option is now deprecated. |
| 10492 | .IP "\fB\-mcpu=\fR\fIname\fR" 4 |
| 10493 | .IX Item "-mcpu=name" |
| 10494 | This specifies the name of the target \s-1ARM\s0 processor. \s-1GCC\s0 uses this name |
| 10495 | to determine what kind of instructions it can emit when generating |
| 10496 | assembly code. Permissible names are: \fBarm2\fR, \fBarm250\fR, |
| 10497 | \&\fBarm3\fR, \fBarm6\fR, \fBarm60\fR, \fBarm600\fR, \fBarm610\fR, |
| 10498 | \&\fBarm620\fR, \fBarm7\fR, \fBarm7m\fR, \fBarm7d\fR, \fBarm7dm\fR, |
| 10499 | \&\fBarm7di\fR, \fBarm7dmi\fR, \fBarm70\fR, \fBarm700\fR, |
| 10500 | \&\fBarm700i\fR, \fBarm710\fR, \fBarm710c\fR, \fBarm7100\fR, |
| 10501 | \&\fBarm720\fR, |
| 10502 | \&\fBarm7500\fR, \fBarm7500fe\fR, \fBarm7tdmi\fR, \fBarm7tdmi\-s\fR, |
| 10503 | \&\fBarm710t\fR, \fBarm720t\fR, \fBarm740t\fR, |
| 10504 | \&\fBstrongarm\fR, \fBstrongarm110\fR, \fBstrongarm1100\fR, |
| 10505 | \&\fBstrongarm1110\fR, |
| 10506 | \&\fBarm8\fR, \fBarm810\fR, \fBarm9\fR, \fBarm9e\fR, \fBarm920\fR, |
| 10507 | \&\fBarm920t\fR, \fBarm922t\fR, \fBarm946e\-s\fR, \fBarm966e\-s\fR, |
| 10508 | \&\fBarm968e\-s\fR, \fBarm926ej\-s\fR, \fBarm940t\fR, \fBarm9tdmi\fR, |
| 10509 | \&\fBarm10tdmi\fR, \fBarm1020t\fR, \fBarm1026ej\-s\fR, |
| 10510 | \&\fBarm10e\fR, \fBarm1020e\fR, \fBarm1022e\fR, |
| 10511 | \&\fBarm1136j\-s\fR, \fBarm1136jf\-s\fR, \fBmpcore\fR, \fBmpcorenovfp\fR, |
| 10512 | \&\fBarm1156t2\-s\fR, \fBarm1156t2f\-s\fR, \fBarm1176jz\-s\fR, \fBarm1176jzf\-s\fR, |
| 10513 | \&\fBcortex\-a5\fR, \fBcortex\-a7\fR, \fBcortex\-a8\fR, \fBcortex\-a9\fR, |
| 10514 | \&\fBcortex\-a15\fR, \fBcortex\-r4\fR, \fBcortex\-r4f\fR, \fBcortex\-r5\fR, |
| 10515 | \&\fBcortex\-m4\fR, \fBcortex\-m3\fR, |
| 10516 | \&\fBcortex\-m1\fR, |
| 10517 | \&\fBcortex\-m0\fR, |
| 10518 | \&\fBcortex\-m0plus\fR, |
| 10519 | \&\fBmarvell\-pj4\fR, |
| 10520 | \&\fBxscale\fR, \fBiwmmxt\fR, \fBiwmmxt2\fR, \fBep9312\fR, |
| 10521 | \&\fBfa526\fR, \fBfa626\fR, |
| 10522 | \&\fBfa606te\fR, \fBfa626te\fR, \fBfmp626\fR, \fBfa726te\fR. |
| 10523 | .Sp |
| 10524 | \&\fB\-mcpu=generic\-\fR\fIarch\fR is also permissible, and is |
| 10525 | equivalent to \fB\-march=\fR\fIarch\fR \fB\-mtune=generic\-\fR\fIarch\fR. |
| 10526 | See \fB\-mtune\fR for more information. |
| 10527 | .Sp |
| 10528 | \&\fB\-mcpu=native\fR causes the compiler to auto-detect the \s-1CPU\s0 |
| 10529 | of the build computer. At present, this feature is only supported on |
| 10530 | Linux, and not all architectures are recognized. If the auto-detect is |
| 10531 | unsuccessful the option has no effect. |
| 10532 | .IP "\fB\-mtune=\fR\fIname\fR" 4 |
| 10533 | .IX Item "-mtune=name" |
| 10534 | This option is very similar to the \fB\-mcpu=\fR option, except that |
| 10535 | instead of specifying the actual target processor type, and hence |
| 10536 | restricting which instructions can be used, it specifies that \s-1GCC\s0 should |
| 10537 | tune the performance of the code as if the target were of the type |
| 10538 | specified in this option, but still choosing the instructions it |
| 10539 | generates based on the \s-1CPU\s0 specified by a \fB\-mcpu=\fR option. |
| 10540 | For some \s-1ARM\s0 implementations better performance can be obtained by using |
| 10541 | this option. |
| 10542 | .Sp |
| 10543 | \&\fB\-mtune=generic\-\fR\fIarch\fR specifies that \s-1GCC\s0 should tune the |
| 10544 | performance for a blend of processors within architecture \fIarch\fR. |
| 10545 | The aim is to generate code that run well on the current most popular |
| 10546 | processors, balancing between optimizations that benefit some CPUs in the |
| 10547 | range, and avoiding performance pitfalls of other CPUs. The effects of |
| 10548 | this option may change in future \s-1GCC\s0 versions as \s-1CPU\s0 models come and go. |
| 10549 | .Sp |
| 10550 | \&\fB\-mtune=native\fR causes the compiler to auto-detect the \s-1CPU\s0 |
| 10551 | of the build computer. At present, this feature is only supported on |
| 10552 | Linux, and not all architectures are recognized. If the auto-detect is |
| 10553 | unsuccessful the option has no effect. |
| 10554 | .IP "\fB\-march=\fR\fIname\fR" 4 |
| 10555 | .IX Item "-march=name" |
| 10556 | This specifies the name of the target \s-1ARM\s0 architecture. \s-1GCC\s0 uses this |
| 10557 | name to determine what kind of instructions it can emit when generating |
| 10558 | assembly code. This option can be used in conjunction with or instead |
| 10559 | of the \fB\-mcpu=\fR option. Permissible names are: \fBarmv2\fR, |
| 10560 | \&\fBarmv2a\fR, \fBarmv3\fR, \fBarmv3m\fR, \fBarmv4\fR, \fBarmv4t\fR, |
| 10561 | \&\fBarmv5\fR, \fBarmv5t\fR, \fBarmv5e\fR, \fBarmv5te\fR, |
| 10562 | \&\fBarmv6\fR, \fBarmv6j\fR, |
| 10563 | \&\fBarmv6t2\fR, \fBarmv6z\fR, \fBarmv6zk\fR, \fBarmv6\-m\fR, |
| 10564 | \&\fBarmv7\fR, \fBarmv7\-a\fR, \fBarmv7\-r\fR, \fBarmv7\-m\fR, |
| 10565 | \&\fBarmv8\-a\fR, |
| 10566 | \&\fBiwmmxt\fR, \fBiwmmxt2\fR, \fBep9312\fR. |
| 10567 | .Sp |
| 10568 | \&\fB\-march=native\fR causes the compiler to auto-detect the architecture |
| 10569 | of the build computer. At present, this feature is only supported on |
| 10570 | Linux, and not all architectures are recognized. If the auto-detect is |
| 10571 | unsuccessful the option has no effect. |
| 10572 | .IP "\fB\-mfpu=\fR\fIname\fR" 4 |
| 10573 | .IX Item "-mfpu=name" |
| 10574 | This specifies what floating-point hardware (or hardware emulation) is |
| 10575 | available on the target. Permissible names are: \fBvfp\fR, \fBvfpv3\fR, |
| 10576 | \&\fBvfpv3\-fp16\fR, \fBvfpv3\-d16\fR, \fBvfpv3\-d16\-fp16\fR, \fBvfpv3xd\fR, |
| 10577 | \&\fBvfpv3xd\-fp16\fR, \fBneon\fR, \fBneon\-fp16\fR, \fBvfpv4\fR, |
| 10578 | \&\fBvfpv4\-d16\fR, \fBfpv4\-sp\-d16\fR, \fBneon\-vfpv4\fR, |
| 10579 | \&\fBfp\-armv8\fR, \fBneon\-fp\-armv8\fR, and \fBcrypto\-neon\-fp\-armv8\fR. |
| 10580 | .Sp |
| 10581 | If \fB\-msoft\-float\fR is specified this specifies the format of |
| 10582 | floating-point values. |
| 10583 | .Sp |
| 10584 | If the selected floating-point hardware includes the \s-1NEON\s0 extension |
| 10585 | (e.g. \fB\-mfpu\fR=\fBneon\fR), note that floating-point |
| 10586 | operations are not generated by \s-1GCC\s0's auto-vectorization pass unless |
| 10587 | \&\fB\-funsafe\-math\-optimizations\fR is also specified. This is |
| 10588 | because \s-1NEON\s0 hardware does not fully implement the \s-1IEEE\s0 754 standard for |
| 10589 | floating-point arithmetic (in particular denormal values are treated as |
| 10590 | zero), so the use of \s-1NEON\s0 instructions may lead to a loss of precision. |
| 10591 | .IP "\fB\-mfp16\-format=\fR\fIname\fR" 4 |
| 10592 | .IX Item "-mfp16-format=name" |
| 10593 | Specify the format of the \f(CW\*(C`_\|_fp16\*(C'\fR half-precision floating-point type. |
| 10594 | Permissible names are \fBnone\fR, \fBieee\fR, and \fBalternative\fR; |
| 10595 | the default is \fBnone\fR, in which case the \f(CW\*(C`_\|_fp16\*(C'\fR type is not |
| 10596 | defined. |
| 10597 | .IP "\fB\-mstructure\-size\-boundary=\fR\fIn\fR" 4 |
| 10598 | .IX Item "-mstructure-size-boundary=n" |
| 10599 | The sizes of all structures and unions are rounded up to a multiple |
| 10600 | of the number of bits set by this option. Permissible values are 8, 32 |
| 10601 | and 64. The default value varies for different toolchains. For the \s-1COFF\s0 |
| 10602 | targeted toolchain the default value is 8. A value of 64 is only allowed |
| 10603 | if the underlying \s-1ABI\s0 supports it. |
| 10604 | .Sp |
| 10605 | Specifying a larger number can produce faster, more efficient code, but |
| 10606 | can also increase the size of the program. Different values are potentially |
| 10607 | incompatible. Code compiled with one value cannot necessarily expect to |
| 10608 | work with code or libraries compiled with another value, if they exchange |
| 10609 | information using structures or unions. |
| 10610 | .IP "\fB\-mabort\-on\-noreturn\fR" 4 |
| 10611 | .IX Item "-mabort-on-noreturn" |
| 10612 | Generate a call to the function \f(CW\*(C`abort\*(C'\fR at the end of a |
| 10613 | \&\f(CW\*(C`noreturn\*(C'\fR function. It is executed if the function tries to |
| 10614 | return. |
| 10615 | .IP "\fB\-mlong\-calls\fR" 4 |
| 10616 | .IX Item "-mlong-calls" |
| 10617 | .PD 0 |
| 10618 | .IP "\fB\-mno\-long\-calls\fR" 4 |
| 10619 | .IX Item "-mno-long-calls" |
| 10620 | .PD |
| 10621 | Tells the compiler to perform function calls by first loading the |
| 10622 | address of the function into a register and then performing a subroutine |
| 10623 | call on this register. This switch is needed if the target function |
| 10624 | lies outside of the 64\-megabyte addressing range of the offset-based |
| 10625 | version of subroutine call instruction. |
| 10626 | .Sp |
| 10627 | Even if this switch is enabled, not all function calls are turned |
| 10628 | into long calls. The heuristic is that static functions, functions |
| 10629 | that have the \fBshort-call\fR attribute, functions that are inside |
| 10630 | the scope of a \fB#pragma no_long_calls\fR directive, and functions whose |
| 10631 | definitions have already been compiled within the current compilation |
| 10632 | unit are not turned into long calls. The exceptions to this rule are |
| 10633 | that weak function definitions, functions with the \fBlong-call\fR |
| 10634 | attribute or the \fBsection\fR attribute, and functions that are within |
| 10635 | the scope of a \fB#pragma long_calls\fR directive are always |
| 10636 | turned into long calls. |
| 10637 | .Sp |
| 10638 | This feature is not enabled by default. Specifying |
| 10639 | \&\fB\-mno\-long\-calls\fR restores the default behavior, as does |
| 10640 | placing the function calls within the scope of a \fB#pragma |
| 10641 | long_calls_off\fR directive. Note these switches have no effect on how |
| 10642 | the compiler generates code to handle function calls via function |
| 10643 | pointers. |
| 10644 | .IP "\fB\-msingle\-pic\-base\fR" 4 |
| 10645 | .IX Item "-msingle-pic-base" |
| 10646 | Treat the register used for \s-1PIC\s0 addressing as read-only, rather than |
| 10647 | loading it in the prologue for each function. The runtime system is |
| 10648 | responsible for initializing this register with an appropriate value |
| 10649 | before execution begins. |
| 10650 | .IP "\fB\-mpic\-register=\fR\fIreg\fR" 4 |
| 10651 | .IX Item "-mpic-register=reg" |
| 10652 | Specify the register to be used for \s-1PIC\s0 addressing. The default is R10 |
| 10653 | unless stack-checking is enabled, when R9 is used. |
| 10654 | .IP "\fB\-mpoke\-function\-name\fR" 4 |
| 10655 | .IX Item "-mpoke-function-name" |
| 10656 | Write the name of each function into the text section, directly |
| 10657 | preceding the function prologue. The generated code is similar to this: |
| 10658 | .Sp |
| 10659 | .Vb 9 |
| 10660 | \& t0 |
| 10661 | \& .ascii "arm_poke_function_name", 0 |
| 10662 | \& .align |
| 10663 | \& t1 |
| 10664 | \& .word 0xff000000 + (t1 \- t0) |
| 10665 | \& arm_poke_function_name |
| 10666 | \& mov ip, sp |
| 10667 | \& stmfd sp!, {fp, ip, lr, pc} |
| 10668 | \& sub fp, ip, #4 |
| 10669 | .Ve |
| 10670 | .Sp |
| 10671 | When performing a stack backtrace, code can inspect the value of |
| 10672 | \&\f(CW\*(C`pc\*(C'\fR stored at \f(CW\*(C`fp + 0\*(C'\fR. If the trace function then looks at |
| 10673 | location \f(CW\*(C`pc \- 12\*(C'\fR and the top 8 bits are set, then we know that |
| 10674 | there is a function name embedded immediately preceding this location |
| 10675 | and has length \f(CW\*(C`((pc[\-3]) & 0xff000000)\*(C'\fR. |
| 10676 | .IP "\fB\-mthumb\fR" 4 |
| 10677 | .IX Item "-mthumb" |
| 10678 | .PD 0 |
| 10679 | .IP "\fB\-marm\fR" 4 |
| 10680 | .IX Item "-marm" |
| 10681 | .PD |
| 10682 | Select between generating code that executes in \s-1ARM\s0 and Thumb |
| 10683 | states. The default for most configurations is to generate code |
| 10684 | that executes in \s-1ARM\s0 state, but the default can be changed by |
| 10685 | configuring \s-1GCC\s0 with the \fB\-\-with\-mode=\fR\fIstate\fR |
| 10686 | configure option. |
| 10687 | .IP "\fB\-mtpcs\-frame\fR" 4 |
| 10688 | .IX Item "-mtpcs-frame" |
| 10689 | Generate a stack frame that is compliant with the Thumb Procedure Call |
| 10690 | Standard for all non-leaf functions. (A leaf function is one that does |
| 10691 | not call any other functions.) The default is \fB\-mno\-tpcs\-frame\fR. |
| 10692 | .IP "\fB\-mtpcs\-leaf\-frame\fR" 4 |
| 10693 | .IX Item "-mtpcs-leaf-frame" |
| 10694 | Generate a stack frame that is compliant with the Thumb Procedure Call |
| 10695 | Standard for all leaf functions. (A leaf function is one that does |
| 10696 | not call any other functions.) The default is \fB\-mno\-apcs\-leaf\-frame\fR. |
| 10697 | .IP "\fB\-mcallee\-super\-interworking\fR" 4 |
| 10698 | .IX Item "-mcallee-super-interworking" |
| 10699 | Gives all externally visible functions in the file being compiled an \s-1ARM\s0 |
| 10700 | instruction set header which switches to Thumb mode before executing the |
| 10701 | rest of the function. This allows these functions to be called from |
| 10702 | non-interworking code. This option is not valid in \s-1AAPCS\s0 configurations |
| 10703 | because interworking is enabled by default. |
| 10704 | .IP "\fB\-mcaller\-super\-interworking\fR" 4 |
| 10705 | .IX Item "-mcaller-super-interworking" |
| 10706 | Allows calls via function pointers (including virtual functions) to |
| 10707 | execute correctly regardless of whether the target code has been |
| 10708 | compiled for interworking or not. There is a small overhead in the cost |
| 10709 | of executing a function pointer if this option is enabled. This option |
| 10710 | is not valid in \s-1AAPCS\s0 configurations because interworking is enabled |
| 10711 | by default. |
| 10712 | .IP "\fB\-mtp=\fR\fIname\fR" 4 |
| 10713 | .IX Item "-mtp=name" |
| 10714 | Specify the access model for the thread local storage pointer. The valid |
| 10715 | models are \fBsoft\fR, which generates calls to \f(CW\*(C`_\|_aeabi_read_tp\*(C'\fR, |
| 10716 | \&\fBcp15\fR, which fetches the thread pointer from \f(CW\*(C`cp15\*(C'\fR directly |
| 10717 | (supported in the arm6k architecture), and \fBauto\fR, which uses the |
| 10718 | best available method for the selected processor. The default setting is |
| 10719 | \&\fBauto\fR. |
| 10720 | .IP "\fB\-mtls\-dialect=\fR\fIdialect\fR" 4 |
| 10721 | .IX Item "-mtls-dialect=dialect" |
| 10722 | Specify the dialect to use for accessing thread local storage. Two |
| 10723 | \&\fIdialect\fRs are supported\-\-\-\fBgnu\fR and \fBgnu2\fR. The |
| 10724 | \&\fBgnu\fR dialect selects the original \s-1GNU\s0 scheme for supporting |
| 10725 | local and global dynamic \s-1TLS\s0 models. The \fBgnu2\fR dialect |
| 10726 | selects the \s-1GNU\s0 descriptor scheme, which provides better performance |
| 10727 | for shared libraries. The \s-1GNU\s0 descriptor scheme is compatible with |
| 10728 | the original scheme, but does require new assembler, linker and |
| 10729 | library support. Initial and local exec \s-1TLS\s0 models are unaffected by |
| 10730 | this option and always use the original scheme. |
| 10731 | .IP "\fB\-mword\-relocations\fR" 4 |
| 10732 | .IX Item "-mword-relocations" |
| 10733 | Only generate absolute relocations on word-sized values (i.e. R_ARM_ABS32). |
| 10734 | This is enabled by default on targets (uClinux, SymbianOS) where the runtime |
| 10735 | loader imposes this restriction, and when \fB\-fpic\fR or \fB\-fPIC\fR |
| 10736 | is specified. |
| 10737 | .IP "\fB\-mfix\-cortex\-m3\-ldrd\fR" 4 |
| 10738 | .IX Item "-mfix-cortex-m3-ldrd" |
| 10739 | Some Cortex\-M3 cores can cause data corruption when \f(CW\*(C`ldrd\*(C'\fR instructions |
| 10740 | with overlapping destination and base registers are used. This option avoids |
| 10741 | generating these instructions. This option is enabled by default when |
| 10742 | \&\fB\-mcpu=cortex\-m3\fR is specified. |
| 10743 | .IP "\fB\-munaligned\-access\fR" 4 |
| 10744 | .IX Item "-munaligned-access" |
| 10745 | .PD 0 |
| 10746 | .IP "\fB\-mno\-unaligned\-access\fR" 4 |
| 10747 | .IX Item "-mno-unaligned-access" |
| 10748 | .PD |
| 10749 | Enables (or disables) reading and writing of 16\- and 32\- bit values |
| 10750 | from addresses that are not 16\- or 32\- bit aligned. By default |
| 10751 | unaligned access is disabled for all pre\-ARMv6 and all ARMv6\-M |
| 10752 | architectures, and enabled for all other architectures. If unaligned |
| 10753 | access is not enabled then words in packed data structures will be |
| 10754 | accessed a byte at a time. |
| 10755 | .Sp |
| 10756 | The \s-1ARM\s0 attribute \f(CW\*(C`Tag_CPU_unaligned_access\*(C'\fR will be set in the |
| 10757 | generated object file to either true or false, depending upon the |
| 10758 | setting of this option. If unaligned access is enabled then the |
| 10759 | preprocessor symbol \f(CW\*(C`_\|_ARM_FEATURE_UNALIGNED\*(C'\fR will also be |
| 10760 | defined. |
| 10761 | .PP |
| 10762 | \fI\s-1AVR\s0 Options\fR |
| 10763 | .IX Subsection "AVR Options" |
| 10764 | .PP |
| 10765 | These options are defined for \s-1AVR\s0 implementations: |
| 10766 | .IP "\fB\-mmcu=\fR\fImcu\fR" 4 |
| 10767 | .IX Item "-mmcu=mcu" |
| 10768 | Specify Atmel \s-1AVR\s0 instruction set architectures (\s-1ISA\s0) or \s-1MCU\s0 type. |
| 10769 | .Sp |
| 10770 | The default for this option is@tie{}\f(CW\*(C`avr2\*(C'\fR. |
| 10771 | .Sp |
| 10772 | \&\s-1GCC\s0 supports the following \s-1AVR\s0 devices and ISAs: |
| 10773 | .RS 4 |
| 10774 | .ie n .IP """avr2""" 4 |
| 10775 | .el .IP "\f(CWavr2\fR" 4 |
| 10776 | .IX Item "avr2" |
| 10777 | \&\*(L"Classic\*(R" devices with up to 8@tie{}KiB of program memory. |
| 10778 | \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`attiny22\*(C'\fR, \f(CW\*(C`attiny26\*(C'\fR, \f(CW\*(C`at90c8534\*(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`at90s8515\*(C'\fR, \f(CW\*(C`at90s8535\*(C'\fR. |
| 10779 | .ie n .IP """avr25""" 4 |
| 10780 | .el .IP "\f(CWavr25\fR" 4 |
| 10781 | .IX Item "avr25" |
| 10782 | \&\*(L"Classic\*(R" devices with up to 8@tie{}KiB of program memory and with the \f(CW\*(C`MOVW\*(C'\fR instruction. |
| 10783 | \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`ata5272\*(C'\fR, \f(CW\*(C`ata6289\*(C'\fR, \f(CW\*(C`attiny13\*(C'\fR, \f(CW\*(C`attiny13a\*(C'\fR, \f(CW\*(C`attiny2313\*(C'\fR, \f(CW\*(C`attiny2313a\*(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`attiny43u\*(C'\fR, \f(CW\*(C`attiny4313\*(C'\fR, \f(CW\*(C`attiny44\*(C'\fR, \f(CW\*(C`attiny44a\*(C'\fR, \f(CW\*(C`attiny45\*(C'\fR, \f(CW\*(C`attiny461\*(C'\fR, \f(CW\*(C`attiny461a\*(C'\fR, \f(CW\*(C`attiny48\*(C'\fR, \f(CW\*(C`attiny84\*(C'\fR, \f(CW\*(C`attiny84a\*(C'\fR, \f(CW\*(C`attiny85\*(C'\fR, \f(CW\*(C`attiny861\*(C'\fR, \f(CW\*(C`attiny861a\*(C'\fR, \f(CW\*(C`attiny87\*(C'\fR, \f(CW\*(C`attiny88\*(C'\fR, \f(CW\*(C`at86rf401\*(C'\fR. |
| 10784 | .ie n .IP """avr3""" 4 |
| 10785 | .el .IP "\f(CWavr3\fR" 4 |
| 10786 | .IX Item "avr3" |
| 10787 | \&\*(L"Classic\*(R" devices with 16@tie{}KiB up to 64@tie{}KiB of program memory. |
| 10788 | \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`at43usb355\*(C'\fR, \f(CW\*(C`at76c711\*(C'\fR. |
| 10789 | .ie n .IP """avr31""" 4 |
| 10790 | .el .IP "\f(CWavr31\fR" 4 |
| 10791 | .IX Item "avr31" |
| 10792 | \&\*(L"Classic\*(R" devices with 128@tie{}KiB of program memory. |
| 10793 | \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`atmega103\*(C'\fR, \f(CW\*(C`at43usb320\*(C'\fR. |
| 10794 | .ie n .IP """avr35""" 4 |
| 10795 | .el .IP "\f(CWavr35\fR" 4 |
| 10796 | .IX Item "avr35" |
| 10797 | \&\*(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. |
| 10798 | \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`ata5505\*(C'\fR, \f(CW\*(C`atmega16u2\*(C'\fR, \f(CW\*(C`atmega32u2\*(C'\fR, \f(CW\*(C`atmega8u2\*(C'\fR, \f(CW\*(C`attiny1634\*(C'\fR, \f(CW\*(C`attiny167\*(C'\fR, \f(CW\*(C`at90usb162\*(C'\fR, \f(CW\*(C`at90usb82\*(C'\fR. |
| 10799 | .ie n .IP """avr4""" 4 |
| 10800 | .el .IP "\f(CWavr4\fR" 4 |
| 10801 | .IX Item "avr4" |
| 10802 | \&\*(L"Enhanced\*(R" devices with up to 8@tie{}KiB of program memory. |
| 10803 | \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`ata6285\*(C'\fR, \f(CW\*(C`ata6286\*(C'\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`atmega8\*(C'\fR, \f(CW\*(C`atmega8a\*(C'\fR, \f(CW\*(C`atmega8hva\*(C'\fR, \f(CW\*(C`atmega8515\*(C'\fR, \f(CW\*(C`atmega8535\*(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`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. |
| 10804 | .ie n .IP """avr5""" 4 |
| 10805 | .el .IP "\f(CWavr5\fR" 4 |
| 10806 | .IX Item "avr5" |
| 10807 | \&\*(L"Enhanced\*(R" devices with 16@tie{}KiB up to 64@tie{}KiB of program memory. |
| 10808 | \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`ata5790\*(C'\fR, \f(CW\*(C`ata5790n\*(C'\fR, \f(CW\*(C`ata5795\*(C'\fR, \f(CW\*(C`atmega16\*(C'\fR, \f(CW\*(C`atmega16a\*(C'\fR, \f(CW\*(C`atmega16hva\*(C'\fR, \f(CW\*(C`atmega16hva\*(C'\fR, \f(CW\*(C`atmega16hva2\*(C'\fR, \f(CW\*(C`atmega16hva2\*(C'\fR, \f(CW\*(C`atmega16hvb\*(C'\fR, \f(CW\*(C`atmega16hvb\*(C'\fR, \f(CW\*(C`atmega16hvbrevb\*(C'\fR, \f(CW\*(C`atmega16m1\*(C'\fR, \f(CW\*(C`atmega16m1\*(C'\fR, \f(CW\*(C`atmega16u4\*(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`atmega169\*(C'\fR, \f(CW\*(C`atmega169a\*(C'\fR, \f(CW\*(C`atmega169p\*(C'\fR, \f(CW\*(C`atmega169pa\*(C'\fR, \f(CW\*(C`atmega26hvg\*(C'\fR, \f(CW\*(C`atmega32\*(C'\fR, \f(CW\*(C`atmega32a\*(C'\fR, \f(CW\*(C`atmega32a\*(C'\fR, \f(CW\*(C`atmega32c1\*(C'\fR, \f(CW\*(C`atmega32c1\*(C'\fR, \f(CW\*(C`atmega32hvb\*(C'\fR, \f(CW\*(C`atmega32hvb\*(C'\fR, \f(CW\*(C`atmega32hvbrevb\*(C'\fR, \f(CW\*(C`atmega32m1\*(C'\fR, \f(CW\*(C`atmega32m1\*(C'\fR, \f(CW\*(C`atmega32u4\*(C'\fR, \f(CW\*(C`atmega32u4\*(C'\fR, \f(CW\*(C`atmega32u6\*(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`atmega3250\*(C'\fR, \f(CW\*(C`atmega3250a\*(C'\fR, \f(CW\*(C`atmega3250p\*(C'\fR, \f(CW\*(C`atmega3250pa\*(C'\fR, \f(CW\*(C`atmega328\*(C'\fR, \f(CW\*(C`atmega328p\*(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`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`atmega48hvf\*(C'\fR, \f(CW\*(C`atmega64\*(C'\fR, \f(CW\*(C`atmega64a\*(C'\fR, \f(CW\*(C`atmega64c1\*(C'\fR, \f(CW\*(C`atmega64c1\*(C'\fR, \f(CW\*(C`atmega64hve\*(C'\fR, \f(CW\*(C`atmega64m1\*(C'\fR, \f(CW\*(C`atmega64m1\*(C'\fR, \f(CW\*(C`atmega64rfa2\*(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`atmega645\*(C'\fR, \f(CW\*(C`atmega645a\*(C'\fR, \f(CW\*(C`atmega645p\*(C'\fR, \f(CW\*(C`atmega6450\*(C'\fR, \f(CW\*(C`atmega6450a\*(C'\fR, \f(CW\*(C`atmega6450p\*(C'\fR, \f(CW\*(C`atmega649\*(C'\fR, \f(CW\*(C`atmega649a\*(C'\fR, \f(CW\*(C`atmega649p\*(C'\fR, \f(CW\*(C`atmega6490\*(C'\fR, \f(CW\*(C`atmega6490a\*(C'\fR, \f(CW\*(C`atmega6490p\*(C'\fR, \f(CW\*(C`at90can32\*(C'\fR, \f(CW\*(C`at90can64\*(C'\fR, \f(CW\*(C`at90pwm161\*(C'\fR, \f(CW\*(C`at90pwm216\*(C'\fR, \f(CW\*(C`at90pwm316\*(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. |
| 10809 | .ie n .IP """avr51""" 4 |
| 10810 | .el .IP "\f(CWavr51\fR" 4 |
| 10811 | .IX Item "avr51" |
| 10812 | \&\*(L"Enhanced\*(R" devices with 128@tie{}KiB of program memory. |
| 10813 | \&\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`atmega1280\*(C'\fR, \f(CW\*(C`atmega1281\*(C'\fR, \f(CW\*(C`atmega1284\*(C'\fR, \f(CW\*(C`atmega1284p\*(C'\fR, \f(CW\*(C`at90can128\*(C'\fR, \f(CW\*(C`at90usb1286\*(C'\fR, \f(CW\*(C`at90usb1287\*(C'\fR. |
| 10814 | .ie n .IP """avr6""" 4 |
| 10815 | .el .IP "\f(CWavr6\fR" 4 |
| 10816 | .IX Item "avr6" |
| 10817 | \&\*(L"Enhanced\*(R" devices with 3\-byte \s-1PC\s0, i.e. with more than 128@tie{}KiB of program memory. |
| 10818 | \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`atmega2560\*(C'\fR, \f(CW\*(C`atmega2561\*(C'\fR. |
| 10819 | .ie n .IP """avrxmega2""" 4 |
| 10820 | .el .IP "\f(CWavrxmega2\fR" 4 |
| 10821 | .IX Item "avrxmega2" |
| 10822 | \&\*(L"\s-1XMEGA\s0\*(R" devices with more than 8@tie{}KiB and up to 64@tie{}KiB of program memory. |
| 10823 | \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`atmxt112sl\*(C'\fR, \f(CW\*(C`atmxt224\*(C'\fR, \f(CW\*(C`atmxt224e\*(C'\fR, \f(CW\*(C`atmxt336s\*(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`atxmega16x1\*(C'\fR, \f(CW\*(C`atxmega32a4\*(C'\fR, \f(CW\*(C`atxmega32a4u\*(C'\fR, \f(CW\*(C`atxmega32c4\*(C'\fR, \f(CW\*(C`atxmega32d4\*(C'\fR, \f(CW\*(C`atxmega32e5\*(C'\fR, \f(CW\*(C`atxmega32x1\*(C'\fR. |
| 10824 | .ie n .IP """avrxmega4""" 4 |
| 10825 | .el .IP "\f(CWavrxmega4\fR" 4 |
| 10826 | .IX Item "avrxmega4" |
| 10827 | \&\*(L"\s-1XMEGA\s0\*(R" devices with more than 64@tie{}KiB and up to 128@tie{}KiB of program memory. |
| 10828 | \&\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. |
| 10829 | .ie n .IP """avrxmega5""" 4 |
| 10830 | .el .IP "\f(CWavrxmega5\fR" 4 |
| 10831 | .IX Item "avrxmega5" |
| 10832 | \&\*(L"\s-1XMEGA\s0\*(R" 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\s0. |
| 10833 | \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`atxmega64a1\*(C'\fR, \f(CW\*(C`atxmega64a1u\*(C'\fR. |
| 10834 | .ie n .IP """avrxmega6""" 4 |
| 10835 | .el .IP "\f(CWavrxmega6\fR" 4 |
| 10836 | .IX Item "avrxmega6" |
| 10837 | \&\*(L"\s-1XMEGA\s0\*(R" devices with more than 128@tie{}KiB of program memory. |
| 10838 | \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`atmxt540s\*(C'\fR, \f(CW\*(C`atmxt540sreva\*(C'\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. |
| 10839 | .ie n .IP """avrxmega7""" 4 |
| 10840 | .el .IP "\f(CWavrxmega7\fR" 4 |
| 10841 | .IX Item "avrxmega7" |
| 10842 | \&\*(L"\s-1XMEGA\s0\*(R" devices with more than 128@tie{}KiB of program memory and more than 64@tie{}KiB of \s-1RAM\s0. |
| 10843 | \&\fImcu\fR\f(CW@tie\fR{}= \f(CW\*(C`atxmega128a1\*(C'\fR, \f(CW\*(C`atxmega128a1u\*(C'\fR, \f(CW\*(C`atxmega128a4u\*(C'\fR. |
| 10844 | .ie n .IP """avr1""" 4 |
| 10845 | .el .IP "\f(CWavr1\fR" 4 |
| 10846 | .IX Item "avr1" |
| 10847 | This \s-1ISA\s0 is implemented by the minimal \s-1AVR\s0 core and supported for assembler only. |
| 10848 | \&\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. |
| 10849 | .RE |
| 10850 | .RS 4 |
| 10851 | .RE |
| 10852 | .IP "\fB\-maccumulate\-args\fR" 4 |
| 10853 | .IX Item "-maccumulate-args" |
| 10854 | Accumulate outgoing function arguments and acquire/release the needed |
| 10855 | stack space for outgoing function arguments once in function |
| 10856 | prologue/epilogue. Without this option, outgoing arguments are pushed |
| 10857 | before calling a function and popped afterwards. |
| 10858 | .Sp |
| 10859 | Popping the arguments after the function call can be expensive on |
| 10860 | \&\s-1AVR\s0 so that accumulating the stack space might lead to smaller |
| 10861 | executables because arguments need not to be removed from the |
| 10862 | stack after such a function call. |
| 10863 | .Sp |
| 10864 | This option can lead to reduced code size for functions that perform |
| 10865 | several calls to functions that get their arguments on the stack like |
| 10866 | calls to printf-like functions. |
| 10867 | .IP "\fB\-mbranch\-cost=\fR\fIcost\fR" 4 |
| 10868 | .IX Item "-mbranch-cost=cost" |
| 10869 | Set the branch costs for conditional branch instructions to |
| 10870 | \&\fIcost\fR. Reasonable values for \fIcost\fR are small, non-negative |
| 10871 | integers. The default branch cost is 0. |
| 10872 | .IP "\fB\-mcall\-prologues\fR" 4 |
| 10873 | .IX Item "-mcall-prologues" |
| 10874 | Functions prologues/epilogues are expanded as calls to appropriate |
| 10875 | subroutines. Code size is smaller. |
| 10876 | .IP "\fB\-mint8\fR" 4 |
| 10877 | .IX Item "-mint8" |
| 10878 | Assume \f(CW\*(C`int\*(C'\fR to be 8\-bit integer. This affects the sizes of all types: a |
| 10879 | \&\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, |
| 10880 | and \f(CW\*(C`long long\*(C'\fR is 4 bytes. Please note that this option does not |
| 10881 | conform to the C standards, but it results in smaller code |
| 10882 | size. |
| 10883 | .IP "\fB\-mno\-interrupts\fR" 4 |
| 10884 | .IX Item "-mno-interrupts" |
| 10885 | Generated code is not compatible with hardware interrupts. |
| 10886 | Code size is smaller. |
| 10887 | .IP "\fB\-mrelax\fR" 4 |
| 10888 | .IX Item "-mrelax" |
| 10889 | Try to replace \f(CW\*(C`CALL\*(C'\fR resp. \f(CW\*(C`JMP\*(C'\fR instruction by the shorter |
| 10890 | \&\f(CW\*(C`RCALL\*(C'\fR resp. \f(CW\*(C`RJMP\*(C'\fR instruction if applicable. |
| 10891 | Setting \f(CW\*(C`\-mrelax\*(C'\fR just adds the \f(CW\*(C`\-\-relax\*(C'\fR option to the |
| 10892 | linker command line when the linker is called. |
| 10893 | .Sp |
| 10894 | Jump relaxing is performed by the linker because jump offsets are not |
| 10895 | known before code is located. Therefore, the assembler code generated by the |
| 10896 | compiler is the same, but the instructions in the executable may |
| 10897 | differ from instructions in the assembler code. |
| 10898 | .Sp |
| 10899 | Relaxing must be turned on if linker stubs are needed, see the |
| 10900 | section on \f(CW\*(C`EIND\*(C'\fR and linker stubs below. |
| 10901 | .IP "\fB\-msp8\fR" 4 |
| 10902 | .IX Item "-msp8" |
| 10903 | Treat the stack pointer register as an 8\-bit register, |
| 10904 | i.e. assume the high byte of the stack pointer is zero. |
| 10905 | In general, you don't need to set this option by hand. |
| 10906 | .Sp |
| 10907 | This option is used internally by the compiler to select and |
| 10908 | build multilibs for architectures \f(CW\*(C`avr2\*(C'\fR and \f(CW\*(C`avr25\*(C'\fR. |
| 10909 | These architectures mix devices with and without \f(CW\*(C`SPH\*(C'\fR. |
| 10910 | For any setting other than \f(CW\*(C`\-mmcu=avr2\*(C'\fR or \f(CW\*(C`\-mmcu=avr25\*(C'\fR |
| 10911 | the compiler driver will add or remove this option from the compiler |
| 10912 | proper's command line, because the compiler then knows if the device |
| 10913 | or architecture has an 8\-bit stack pointer and thus no \f(CW\*(C`SPH\*(C'\fR |
| 10914 | register or not. |
| 10915 | .IP "\fB\-mstrict\-X\fR" 4 |
| 10916 | .IX Item "-mstrict-X" |
| 10917 | Use address register \f(CW\*(C`X\*(C'\fR in a way proposed by the hardware. This means |
| 10918 | that \f(CW\*(C`X\*(C'\fR is only used in indirect, post-increment or |
| 10919 | pre-decrement addressing. |
| 10920 | .Sp |
| 10921 | Without this option, the \f(CW\*(C`X\*(C'\fR register may be used in the same way |
| 10922 | as \f(CW\*(C`Y\*(C'\fR or \f(CW\*(C`Z\*(C'\fR which then is emulated by additional |
| 10923 | instructions. |
| 10924 | For example, loading a value with \f(CW\*(C`X+const\*(C'\fR addressing with a |
| 10925 | small non-negative \f(CW\*(C`const < 64\*(C'\fR to a register \fIRn\fR is |
| 10926 | performed as |
| 10927 | .Sp |
| 10928 | .Vb 3 |
| 10929 | \& adiw r26, const ; X += const |
| 10930 | \& ld <Rn>, X ; <Rn> = *X |
| 10931 | \& sbiw r26, const ; X \-= const |
| 10932 | .Ve |
| 10933 | .IP "\fB\-mtiny\-stack\fR" 4 |
| 10934 | .IX Item "-mtiny-stack" |
| 10935 | Only change the lower 8@tie{}bits of the stack pointer. |
| 10936 | .IP "\fB\-Waddr\-space\-convert\fR" 4 |
| 10937 | .IX Item "-Waddr-space-convert" |
| 10938 | Warn about conversions between address spaces in the case where the |
| 10939 | resulting address space is not contained in the incoming address space. |
| 10940 | .PP |
| 10941 | \f(CW\*(C`EIND\*(C'\fR and Devices with more than 128 Ki Bytes of Flash |
| 10942 | .IX Subsection "EIND and Devices with more than 128 Ki Bytes of Flash" |
| 10943 | .PP |
| 10944 | Pointers in the implementation are 16@tie{}bits wide. |
| 10945 | The address of a function or label is represented as word address so |
| 10946 | that indirect jumps and calls can target any code address in the |
| 10947 | range of 64@tie{}Ki words. |
| 10948 | .PP |
| 10949 | In order to facilitate indirect jump on devices with more than 128@tie{}Ki |
| 10950 | bytes of program memory space, there is a special function register called |
| 10951 | \&\f(CW\*(C`EIND\*(C'\fR that serves as most significant part of the target address |
| 10952 | when \f(CW\*(C`EICALL\*(C'\fR or \f(CW\*(C`EIJMP\*(C'\fR instructions are used. |
| 10953 | .PP |
| 10954 | Indirect jumps and calls on these devices are handled as follows by |
| 10955 | the compiler and are subject to some limitations: |
| 10956 | .IP "\(bu" 4 |
| 10957 | The compiler never sets \f(CW\*(C`EIND\*(C'\fR. |
| 10958 | .IP "\(bu" 4 |
| 10959 | The compiler uses \f(CW\*(C`EIND\*(C'\fR implicitely in \f(CW\*(C`EICALL\*(C'\fR/\f(CW\*(C`EIJMP\*(C'\fR |
| 10960 | instructions or might read \f(CW\*(C`EIND\*(C'\fR directly in order to emulate an |
| 10961 | indirect call/jump by means of a \f(CW\*(C`RET\*(C'\fR instruction. |
| 10962 | .IP "\(bu" 4 |
| 10963 | The compiler assumes that \f(CW\*(C`EIND\*(C'\fR never changes during the startup |
| 10964 | code or during the application. In particular, \f(CW\*(C`EIND\*(C'\fR is not |
| 10965 | saved/restored in function or interrupt service routine |
| 10966 | prologue/epilogue. |
| 10967 | .IP "\(bu" 4 |
| 10968 | For indirect calls to functions and computed goto, the linker |
| 10969 | generates \fIstubs\fR. Stubs are jump pads sometimes also called |
| 10970 | \&\fItrampolines\fR. Thus, the indirect call/jump jumps to such a stub. |
| 10971 | The stub contains a direct jump to the desired address. |
| 10972 | .IP "\(bu" 4 |
| 10973 | Linker relaxation must be turned on so that the linker will generate |
| 10974 | the stubs correctly an all situaltion. See the compiler option |
| 10975 | \&\f(CW\*(C`\-mrelax\*(C'\fR and the linler option \f(CW\*(C`\-\-relax\*(C'\fR. |
| 10976 | There are corner cases where the linker is supposed to generate stubs |
| 10977 | but aborts without relaxation and without a helpful error message. |
| 10978 | .IP "\(bu" 4 |
| 10979 | The default linker script is arranged for code with \f(CW\*(C`EIND = 0\*(C'\fR. |
| 10980 | If code is supposed to work for a setup with \f(CW\*(C`EIND != 0\*(C'\fR, a custom |
| 10981 | linker script has to be used in order to place the sections whose |
| 10982 | name start with \f(CW\*(C`.trampolines\*(C'\fR into the segment where \f(CW\*(C`EIND\*(C'\fR |
| 10983 | points to. |
| 10984 | .IP "\(bu" 4 |
| 10985 | The startup code from libgcc never sets \f(CW\*(C`EIND\*(C'\fR. |
| 10986 | Notice that startup code is a blend of code from libgcc and AVR-LibC. |
| 10987 | For the impact of AVR-LibC on \f(CW\*(C`EIND\*(C'\fR, see the |
| 10988 | AVR-LibC\ user\ manual (\f(CW\*(C`http://nongnu.org/avr\-libc/user\-manual/\*(C'\fR). |
| 10989 | .IP "\(bu" 4 |
| 10990 | It is legitimate for user-specific startup code to set up \f(CW\*(C`EIND\*(C'\fR |
| 10991 | early, for example by means of initialization code located in |
| 10992 | section \f(CW\*(C`.init3\*(C'\fR. Such code runs prior to general startup code |
| 10993 | that initializes \s-1RAM\s0 and calls constructors, but after the bit |
| 10994 | of startup code from AVR-LibC that sets \f(CW\*(C`EIND\*(C'\fR to the segment |
| 10995 | where the vector table is located. |
| 10996 | .Sp |
| 10997 | .Vb 1 |
| 10998 | \& #include <avr/io.h> |
| 10999 | \& |
| 11000 | \& static void |
| 11001 | \& _\|_attribute_\|_((section(".init3"),naked,used,no_instrument_function)) |
| 11002 | \& init3_set_eind (void) |
| 11003 | \& { |
| 11004 | \& _\|_asm volatile ("ldi r24,pm_hh8(_\|_trampolines_start)\en\et" |
| 11005 | \& "out %i0,r24" :: "n" (&EIND) : "r24","memory"); |
| 11006 | \& } |
| 11007 | .Ve |
| 11008 | .Sp |
| 11009 | The \f(CW\*(C`_\|_trampolines_start\*(C'\fR symbol is defined in the linker script. |
| 11010 | .IP "\(bu" 4 |
| 11011 | Stubs are generated automatically by the linker if |
| 11012 | the following two conditions are met: |
| 11013 | .RS 4 |
| 11014 | .ie n .IP "\-<The address of a label is taken by means of the ""gs"" modifier>" 4 |
| 11015 | .el .IP "\-<The address of a label is taken by means of the \f(CWgs\fR modifier>" 4 |
| 11016 | .IX Item "-<The address of a label is taken by means of the gs modifier>" |
| 11017 | (short for \fIgenerate stubs\fR) like so: |
| 11018 | .Sp |
| 11019 | .Vb 2 |
| 11020 | \& LDI r24, lo8(gs(<func>)) |
| 11021 | \& LDI r25, hi8(gs(<func>)) |
| 11022 | .Ve |
| 11023 | .IP "\-<The final location of that label is in a code segment>" 4 |
| 11024 | .IX Item "-<The final location of that label is in a code segment>" |
| 11025 | \&\fIoutside\fR the segment where the stubs are located. |
| 11026 | .RE |
| 11027 | .RS 4 |
| 11028 | .RE |
| 11029 | .IP "\(bu" 4 |
| 11030 | The compiler emits such \f(CW\*(C`gs\*(C'\fR modifiers for code labels in the |
| 11031 | following situations: |
| 11032 | .RS 4 |
| 11033 | .IP "\-<Taking address of a function or code label.>" 4 |
| 11034 | .IX Item "-<Taking address of a function or code label.>" |
| 11035 | .PD 0 |
| 11036 | .IP "\-<Computed goto.>" 4 |
| 11037 | .IX Item "-<Computed goto.>" |
| 11038 | .IP "\-<If prologue-save function is used, see \fB\-mcall\-prologues\fR>" 4 |
| 11039 | .IX Item "-<If prologue-save function is used, see -mcall-prologues>" |
| 11040 | .PD |
| 11041 | command-line option. |
| 11042 | .IP "\-<Switch/case dispatch tables. If you do not want such dispatch>" 4 |
| 11043 | .IX Item "-<Switch/case dispatch tables. If you do not want such dispatch>" |
| 11044 | tables you can specify the \fB\-fno\-jump\-tables\fR command-line option. |
| 11045 | .IP "\-<C and \*(C+ constructors/destructors called during startup/shutdown.>" 4 |
| 11046 | .IX Item "-<C and constructors/destructors called during startup/shutdown.>" |
| 11047 | .PD 0 |
| 11048 | .ie n .IP "\-<If the tools hit a ""gs()"" modifier explained above.>" 4 |
| 11049 | .el .IP "\-<If the tools hit a \f(CWgs()\fR modifier explained above.>" 4 |
| 11050 | .IX Item "-<If the tools hit a gs() modifier explained above.>" |
| 11051 | .RE |
| 11052 | .RS 4 |
| 11053 | .RE |
| 11054 | .IP "\(bu" 4 |
| 11055 | .PD |
| 11056 | Jumping to non-symbolic addresses like so is \fInot\fR supported: |
| 11057 | .Sp |
| 11058 | .Vb 5 |
| 11059 | \& int main (void) |
| 11060 | \& { |
| 11061 | \& /* Call function at word address 0x2 */ |
| 11062 | \& return ((int(*)(void)) 0x2)(); |
| 11063 | \& } |
| 11064 | .Ve |
| 11065 | .Sp |
| 11066 | Instead, a stub has to be set up, i.e. the function has to be called |
| 11067 | through a symbol (\f(CW\*(C`func_4\*(C'\fR in the example): |
| 11068 | .Sp |
| 11069 | .Vb 3 |
| 11070 | \& int main (void) |
| 11071 | \& { |
| 11072 | \& extern int func_4 (void); |
| 11073 | \& |
| 11074 | \& /* Call function at byte address 0x4 */ |
| 11075 | \& return func_4(); |
| 11076 | \& } |
| 11077 | .Ve |
| 11078 | .Sp |
| 11079 | and the application be linked with \f(CW\*(C`\-Wl,\-\-defsym,func_4=0x4\*(C'\fR. |
| 11080 | Alternatively, \f(CW\*(C`func_4\*(C'\fR can be defined in the linker script. |
| 11081 | .PP |
| 11082 | 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 |
| 11083 | .IX Subsection "Handling of the RAMPD, RAMPX, RAMPY and RAMPZ Special Function Registers" |
| 11084 | .PP |
| 11085 | Some \s-1AVR\s0 devices support memories larger than the 64@tie{}KiB range |
| 11086 | that can be accessed with 16\-bit pointers. To access memory locations |
| 11087 | outside this 64@tie{}KiB range, the contentent of a \f(CW\*(C`RAMP\*(C'\fR |
| 11088 | register is used as high part of the address: |
| 11089 | The \f(CW\*(C`X\*(C'\fR, \f(CW\*(C`Y\*(C'\fR, \f(CW\*(C`Z\*(C'\fR address register is concatenated |
| 11090 | with the \f(CW\*(C`RAMPX\*(C'\fR, \f(CW\*(C`RAMPY\*(C'\fR, \f(CW\*(C`RAMPZ\*(C'\fR special function |
| 11091 | register, respectively, to get a wide address. Similarly, |
| 11092 | \&\f(CW\*(C`RAMPD\*(C'\fR is used together with direct addressing. |
| 11093 | .IP "\(bu" 4 |
| 11094 | The startup code initializes the \f(CW\*(C`RAMP\*(C'\fR special function |
| 11095 | registers with zero. |
| 11096 | .IP "\(bu" 4 |
| 11097 | If a \fB\s-1AVR\s0 Named Address Spaces,named address space\fR other than |
| 11098 | generic or \f(CW\*(C`_\|_flash\*(C'\fR is used, then \f(CW\*(C`RAMPZ\*(C'\fR is set |
| 11099 | as needed before the operation. |
| 11100 | .IP "\(bu" 4 |
| 11101 | If the device supports \s-1RAM\s0 larger than 64@tie{KiB} and the compiler |
| 11102 | needs to change \f(CW\*(C`RAMPZ\*(C'\fR to accomplish an operation, \f(CW\*(C`RAMPZ\*(C'\fR |
| 11103 | is reset to zero after the operation. |
| 11104 | .IP "\(bu" 4 |
| 11105 | If the device comes with a specific \f(CW\*(C`RAMP\*(C'\fR register, the \s-1ISR\s0 |
| 11106 | prologue/epilogue saves/restores that \s-1SFR\s0 and initializes it with |
| 11107 | zero in case the \s-1ISR\s0 code might (implicitly) use it. |
| 11108 | .IP "\(bu" 4 |
| 11109 | \&\s-1RAM\s0 larger than 64@tie{KiB} is not supported by \s-1GCC\s0 for \s-1AVR\s0 targets. |
| 11110 | If you use inline assembler to read from locations outside the |
| 11111 | 16\-bit address range and change one of the \f(CW\*(C`RAMP\*(C'\fR registers, |
| 11112 | you must reset it to zero after the access. |
| 11113 | .PP |
| 11114 | \s-1AVR\s0 Built-in Macros |
| 11115 | .IX Subsection "AVR Built-in Macros" |
| 11116 | .PP |
| 11117 | \&\s-1GCC\s0 defines several built-in macros so that the user code can test |
| 11118 | for the presence or absence of features. Almost any of the following |
| 11119 | built-in macros are deduced from device capabilities and thus |
| 11120 | triggered by the \f(CW\*(C`\-mmcu=\*(C'\fR command-line option. |
| 11121 | .PP |
| 11122 | For even more AVR-specific built-in macros see |
| 11123 | \&\fB\s-1AVR\s0 Named Address Spaces\fR and \fB\s-1AVR\s0 Built-in Functions\fR. |
| 11124 | .ie n .IP """_\|_AVR_ARCH_\|_""" 4 |
| 11125 | .el .IP "\f(CW_\|_AVR_ARCH_\|_\fR" 4 |
| 11126 | .IX Item "__AVR_ARCH__" |
| 11127 | Build-in macro that resolves to a decimal number that identifies the |
| 11128 | architecture and depends on the \f(CW\*(C`\-mmcu=\f(CImcu\f(CW\*(C'\fR option. |
| 11129 | Possible values are: |
| 11130 | .Sp |
| 11131 | \&\f(CW2\fR, \f(CW25\fR, \f(CW3\fR, \f(CW31\fR, \f(CW35\fR, |
| 11132 | \&\f(CW4\fR, \f(CW5\fR, \f(CW51\fR, \f(CW6\fR, \f(CW102\fR, \f(CW104\fR, |
| 11133 | \&\f(CW105\fR, \f(CW106\fR, \f(CW107\fR |
| 11134 | .Sp |
| 11135 | for \fImcu\fR=\f(CW\*(C`avr2\*(C'\fR, \f(CW\*(C`avr25\*(C'\fR, \f(CW\*(C`avr3\*(C'\fR, |
| 11136 | \&\f(CW\*(C`avr31\*(C'\fR, \f(CW\*(C`avr35\*(C'\fR, \f(CW\*(C`avr4\*(C'\fR, \f(CW\*(C`avr5\*(C'\fR, \f(CW\*(C`avr51\*(C'\fR, |
| 11137 | \&\f(CW\*(C`avr6\*(C'\fR, \f(CW\*(C`avrxmega2\*(C'\fR, \f(CW\*(C`avrxmega4\*(C'\fR, \f(CW\*(C`avrxmega5\*(C'\fR, |
| 11138 | \&\f(CW\*(C`avrxmega6\*(C'\fR, \f(CW\*(C`avrxmega7\*(C'\fR, respectively. |
| 11139 | If \fImcu\fR specifies a device, this built-in macro is set |
| 11140 | accordingly. For example, with \f(CW\*(C`\-mmcu=atmega8\*(C'\fR the macro will be |
| 11141 | defined to \f(CW4\fR. |
| 11142 | .ie n .IP """_\|_AVR_\f(CIDevice\f(CW_\|_""" 4 |
| 11143 | .el .IP "\f(CW_\|_AVR_\f(CIDevice\f(CW_\|_\fR" 4 |
| 11144 | .IX Item "__AVR_Device__" |
| 11145 | Setting \f(CW\*(C`\-mmcu=\f(CIdevice\f(CW\*(C'\fR defines this built-in macro which reflects |
| 11146 | the device's name. For example, \f(CW\*(C`\-mmcu=atmega8\*(C'\fR defines the |
| 11147 | built-in macro \f(CW\*(C`_\|_AVR_ATmega8_\|_\*(C'\fR, \f(CW\*(C`\-mmcu=attiny261a\*(C'\fR defines |
| 11148 | \&\f(CW\*(C`_\|_AVR_ATtiny261A_\|_\*(C'\fR, etc. |
| 11149 | .Sp |
| 11150 | The built-in macros' names follow |
| 11151 | the scheme \f(CW\*(C`_\|_AVR_\f(CIDevice\f(CW_\|_\*(C'\fR where \fIDevice\fR is |
| 11152 | the device name as from the \s-1AVR\s0 user manual. The difference between |
| 11153 | \&\fIDevice\fR in the built-in macro and \fIdevice\fR in |
| 11154 | \&\f(CW\*(C`\-mmcu=\f(CIdevice\f(CW\*(C'\fR is that the latter is always lowercase. |
| 11155 | .Sp |
| 11156 | If \fIdevice\fR is not a device but only a core architecture like |
| 11157 | \&\f(CW\*(C`avr51\*(C'\fR, this macro will not be defined. |
| 11158 | .ie n .IP """_\|_AVR_XMEGA_\|_""" 4 |
| 11159 | .el .IP "\f(CW_\|_AVR_XMEGA_\|_\fR" 4 |
| 11160 | .IX Item "__AVR_XMEGA__" |
| 11161 | The device / architecture belongs to the \s-1XMEGA\s0 family of devices. |
| 11162 | .ie n .IP """_\|_AVR_HAVE_ELPM_\|_""" 4 |
| 11163 | .el .IP "\f(CW_\|_AVR_HAVE_ELPM_\|_\fR" 4 |
| 11164 | .IX Item "__AVR_HAVE_ELPM__" |
| 11165 | The device has the the \f(CW\*(C`ELPM\*(C'\fR instruction. |
| 11166 | .ie n .IP """_\|_AVR_HAVE_ELPMX_\|_""" 4 |
| 11167 | .el .IP "\f(CW_\|_AVR_HAVE_ELPMX_\|_\fR" 4 |
| 11168 | .IX Item "__AVR_HAVE_ELPMX__" |
| 11169 | The device has the \f(CW\*(C`ELPM R\f(CIn\f(CW,Z\*(C'\fR and \f(CW\*(C`ELPM |
| 11170 | R\f(CIn\f(CW,Z+\*(C'\fR instructions. |
| 11171 | .ie n .IP """_\|_AVR_HAVE_MOVW_\|_""" 4 |
| 11172 | .el .IP "\f(CW_\|_AVR_HAVE_MOVW_\|_\fR" 4 |
| 11173 | .IX Item "__AVR_HAVE_MOVW__" |
| 11174 | The device has the \f(CW\*(C`MOVW\*(C'\fR instruction to perform 16\-bit |
| 11175 | register-register moves. |
| 11176 | .ie n .IP """_\|_AVR_HAVE_LPMX_\|_""" 4 |
| 11177 | .el .IP "\f(CW_\|_AVR_HAVE_LPMX_\|_\fR" 4 |
| 11178 | .IX Item "__AVR_HAVE_LPMX__" |
| 11179 | The device has the \f(CW\*(C`LPM R\f(CIn\f(CW,Z\*(C'\fR and |
| 11180 | \&\f(CW\*(C`LPM R\f(CIn\f(CW,Z+\*(C'\fR instructions. |
| 11181 | .ie n .IP """_\|_AVR_HAVE_MUL_\|_""" 4 |
| 11182 | .el .IP "\f(CW_\|_AVR_HAVE_MUL_\|_\fR" 4 |
| 11183 | .IX Item "__AVR_HAVE_MUL__" |
| 11184 | The device has a hardware multiplier. |
| 11185 | .ie n .IP """_\|_AVR_HAVE_JMP_CALL_\|_""" 4 |
| 11186 | .el .IP "\f(CW_\|_AVR_HAVE_JMP_CALL_\|_\fR" 4 |
| 11187 | .IX Item "__AVR_HAVE_JMP_CALL__" |
| 11188 | The device has the \f(CW\*(C`JMP\*(C'\fR and \f(CW\*(C`CALL\*(C'\fR instructions. |
| 11189 | This is the case for devices with at least 16@tie{}KiB of program |
| 11190 | memory. |
| 11191 | .ie n .IP """_\|_AVR_HAVE_EIJMP_EICALL_\|_""" 4 |
| 11192 | .el .IP "\f(CW_\|_AVR_HAVE_EIJMP_EICALL_\|_\fR" 4 |
| 11193 | .IX Item "__AVR_HAVE_EIJMP_EICALL__" |
| 11194 | .PD 0 |
| 11195 | .ie n .IP """_\|_AVR_3_BYTE_PC_\|_""" 4 |
| 11196 | .el .IP "\f(CW_\|_AVR_3_BYTE_PC_\|_\fR" 4 |
| 11197 | .IX Item "__AVR_3_BYTE_PC__" |
| 11198 | .PD |
| 11199 | The device has the \f(CW\*(C`EIJMP\*(C'\fR and \f(CW\*(C`EICALL\*(C'\fR instructions. |
| 11200 | This is the case for devices with more than 128@tie{}KiB of program memory. |
| 11201 | This also means that the program counter |
| 11202 | (\s-1PC\s0) is 3@tie{}bytes wide. |
| 11203 | .ie n .IP """_\|_AVR_2_BYTE_PC_\|_""" 4 |
| 11204 | .el .IP "\f(CW_\|_AVR_2_BYTE_PC_\|_\fR" 4 |
| 11205 | .IX Item "__AVR_2_BYTE_PC__" |
| 11206 | The program counter (\s-1PC\s0) is 2@tie{}bytes wide. This is the case for devices |
| 11207 | with up to 128@tie{}KiB of program memory. |
| 11208 | .ie n .IP """_\|_AVR_HAVE_8BIT_SP_\|_""" 4 |
| 11209 | .el .IP "\f(CW_\|_AVR_HAVE_8BIT_SP_\|_\fR" 4 |
| 11210 | .IX Item "__AVR_HAVE_8BIT_SP__" |
| 11211 | .PD 0 |
| 11212 | .ie n .IP """_\|_AVR_HAVE_16BIT_SP_\|_""" 4 |
| 11213 | .el .IP "\f(CW_\|_AVR_HAVE_16BIT_SP_\|_\fR" 4 |
| 11214 | .IX Item "__AVR_HAVE_16BIT_SP__" |
| 11215 | .PD |
| 11216 | The stack pointer (\s-1SP\s0) register is treated as 8\-bit respectively |
| 11217 | 16\-bit register by the compiler. |
| 11218 | The definition of these macros is affected by \f(CW\*(C`\-mtiny\-stack\*(C'\fR. |
| 11219 | .ie n .IP """_\|_AVR_HAVE_SPH_\|_""" 4 |
| 11220 | .el .IP "\f(CW_\|_AVR_HAVE_SPH_\|_\fR" 4 |
| 11221 | .IX Item "__AVR_HAVE_SPH__" |
| 11222 | .PD 0 |
| 11223 | .ie n .IP """_\|_AVR_SP8_\|_""" 4 |
| 11224 | .el .IP "\f(CW_\|_AVR_SP8_\|_\fR" 4 |
| 11225 | .IX Item "__AVR_SP8__" |
| 11226 | .PD |
| 11227 | The device has the \s-1SPH\s0 (high part of stack pointer) special function |
| 11228 | register or has an 8\-bit stack pointer, respectively. |
| 11229 | The definition of these macros is affected by \f(CW\*(C`\-mmcu=\*(C'\fR and |
| 11230 | in the cases of \f(CW\*(C`\-mmcu=avr2\*(C'\fR and \f(CW\*(C`\-mmcu=avr25\*(C'\fR also |
| 11231 | by \f(CW\*(C`\-msp8\*(C'\fR. |
| 11232 | .ie n .IP """_\|_AVR_HAVE_RAMPD_\|_""" 4 |
| 11233 | .el .IP "\f(CW_\|_AVR_HAVE_RAMPD_\|_\fR" 4 |
| 11234 | .IX Item "__AVR_HAVE_RAMPD__" |
| 11235 | .PD 0 |
| 11236 | .ie n .IP """_\|_AVR_HAVE_RAMPX_\|_""" 4 |
| 11237 | .el .IP "\f(CW_\|_AVR_HAVE_RAMPX_\|_\fR" 4 |
| 11238 | .IX Item "__AVR_HAVE_RAMPX__" |
| 11239 | .ie n .IP """_\|_AVR_HAVE_RAMPY_\|_""" 4 |
| 11240 | .el .IP "\f(CW_\|_AVR_HAVE_RAMPY_\|_\fR" 4 |
| 11241 | .IX Item "__AVR_HAVE_RAMPY__" |
| 11242 | .ie n .IP """_\|_AVR_HAVE_RAMPZ_\|_""" 4 |
| 11243 | .el .IP "\f(CW_\|_AVR_HAVE_RAMPZ_\|_\fR" 4 |
| 11244 | .IX Item "__AVR_HAVE_RAMPZ__" |
| 11245 | .PD |
| 11246 | The device has the \f(CW\*(C`RAMPD\*(C'\fR, \f(CW\*(C`RAMPX\*(C'\fR, \f(CW\*(C`RAMPY\*(C'\fR, |
| 11247 | \&\f(CW\*(C`RAMPZ\*(C'\fR special function register, respectively. |
| 11248 | .ie n .IP """_\|_NO_INTERRUPTS_\|_""" 4 |
| 11249 | .el .IP "\f(CW_\|_NO_INTERRUPTS_\|_\fR" 4 |
| 11250 | .IX Item "__NO_INTERRUPTS__" |
| 11251 | This macro reflects the \f(CW\*(C`\-mno\-interrupts\*(C'\fR command line option. |
| 11252 | .ie n .IP """_\|_AVR_ERRATA_SKIP_\|_""" 4 |
| 11253 | .el .IP "\f(CW_\|_AVR_ERRATA_SKIP_\|_\fR" 4 |
| 11254 | .IX Item "__AVR_ERRATA_SKIP__" |
| 11255 | .PD 0 |
| 11256 | .ie n .IP """_\|_AVR_ERRATA_SKIP_JMP_CALL_\|_""" 4 |
| 11257 | .el .IP "\f(CW_\|_AVR_ERRATA_SKIP_JMP_CALL_\|_\fR" 4 |
| 11258 | .IX Item "__AVR_ERRATA_SKIP_JMP_CALL__" |
| 11259 | .PD |
| 11260 | Some \s-1AVR\s0 devices (\s-1AT90S8515\s0, ATmega103) must not skip 32\-bit |
| 11261 | instructions because of a hardware erratum. Skip instructions are |
| 11262 | \&\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. |
| 11263 | The second macro is only defined if \f(CW\*(C`_\|_AVR_HAVE_JMP_CALL_\|_\*(C'\fR is also |
| 11264 | set. |
| 11265 | .ie n .IP """_\|_AVR_SFR_OFFSET_\|_=\f(CIoffset\f(CW""" 4 |
| 11266 | .el .IP "\f(CW_\|_AVR_SFR_OFFSET_\|_=\f(CIoffset\f(CW\fR" 4 |
| 11267 | .IX Item "__AVR_SFR_OFFSET__=offset" |
| 11268 | Instructions that can address I/O special function registers directly |
| 11269 | like \f(CW\*(C`IN\*(C'\fR, \f(CW\*(C`OUT\*(C'\fR, \f(CW\*(C`SBI\*(C'\fR, etc. may use a different |
| 11270 | address as if addressed by an instruction to access \s-1RAM\s0 like \f(CW\*(C`LD\*(C'\fR |
| 11271 | or \f(CW\*(C`STS\*(C'\fR. This offset depends on the device architecture and has |
| 11272 | to be subtracted from the \s-1RAM\s0 address in order to get the |
| 11273 | respective I/O@tie{}address. |
| 11274 | .ie n .IP """_\|_WITH_AVRLIBC_\|_""" 4 |
| 11275 | .el .IP "\f(CW_\|_WITH_AVRLIBC_\|_\fR" 4 |
| 11276 | .IX Item "__WITH_AVRLIBC__" |
| 11277 | The compiler is configured to be used together with AVR-Libc. |
| 11278 | See the \f(CW\*(C`\-\-with\-avrlibc\*(C'\fR configure option. |
| 11279 | .PP |
| 11280 | \fIBlackfin Options\fR |
| 11281 | .IX Subsection "Blackfin Options" |
| 11282 | .IP "\fB\-mcpu=\fR\fIcpu\fR[\fB\-\fR\fIsirevision\fR]" 4 |
| 11283 | .IX Item "-mcpu=cpu[-sirevision]" |
| 11284 | Specifies the name of the target Blackfin processor. Currently, \fIcpu\fR |
| 11285 | can be one of \fBbf512\fR, \fBbf514\fR, \fBbf516\fR, \fBbf518\fR, |
| 11286 | \&\fBbf522\fR, \fBbf523\fR, \fBbf524\fR, \fBbf525\fR, \fBbf526\fR, |
| 11287 | \&\fBbf527\fR, \fBbf531\fR, \fBbf532\fR, \fBbf533\fR, |
| 11288 | \&\fBbf534\fR, \fBbf536\fR, \fBbf537\fR, \fBbf538\fR, \fBbf539\fR, |
| 11289 | \&\fBbf542\fR, \fBbf544\fR, \fBbf547\fR, \fBbf548\fR, \fBbf549\fR, |
| 11290 | \&\fBbf542m\fR, \fBbf544m\fR, \fBbf547m\fR, \fBbf548m\fR, \fBbf549m\fR, |
| 11291 | \&\fBbf561\fR, \fBbf592\fR. |
| 11292 | .Sp |
| 11293 | The optional \fIsirevision\fR specifies the silicon revision of the target |
| 11294 | Blackfin processor. Any workarounds available for the targeted silicon revision |
| 11295 | are enabled. If \fIsirevision\fR is \fBnone\fR, no workarounds are enabled. |
| 11296 | If \fIsirevision\fR is \fBany\fR, all workarounds for the targeted processor |
| 11297 | are enabled. The \f(CW\*(C`_\|_SILICON_REVISION_\|_\*(C'\fR macro is defined to two |
| 11298 | hexadecimal digits representing the major and minor numbers in the silicon |
| 11299 | revision. If \fIsirevision\fR is \fBnone\fR, the \f(CW\*(C`_\|_SILICON_REVISION_\|_\*(C'\fR |
| 11300 | is not defined. If \fIsirevision\fR is \fBany\fR, the |
| 11301 | \&\f(CW\*(C`_\|_SILICON_REVISION_\|_\*(C'\fR is defined to be \f(CW0xffff\fR. |
| 11302 | If this optional \fIsirevision\fR is not used, \s-1GCC\s0 assumes the latest known |
| 11303 | silicon revision of the targeted Blackfin processor. |
| 11304 | .Sp |
| 11305 | \&\s-1GCC\s0 defines a preprocessor macro for the specified \fIcpu\fR. |
| 11306 | For the \fBbfin-elf\fR toolchain, this option causes the hardware \s-1BSP\s0 |
| 11307 | provided by libgloss to be linked in if \fB\-msim\fR is not given. |
| 11308 | .Sp |
| 11309 | Without this option, \fBbf532\fR is used as the processor by default. |
| 11310 | .Sp |
| 11311 | Note that support for \fBbf561\fR is incomplete. For \fBbf561\fR, |
| 11312 | only the preprocessor macro is defined. |
| 11313 | .IP "\fB\-msim\fR" 4 |
| 11314 | .IX Item "-msim" |
| 11315 | Specifies that the program will be run on the simulator. This causes |
| 11316 | the simulator \s-1BSP\s0 provided by libgloss to be linked in. This option |
| 11317 | has effect only for \fBbfin-elf\fR toolchain. |
| 11318 | Certain other options, such as \fB\-mid\-shared\-library\fR and |
| 11319 | \&\fB\-mfdpic\fR, imply \fB\-msim\fR. |
| 11320 | .IP "\fB\-momit\-leaf\-frame\-pointer\fR" 4 |
| 11321 | .IX Item "-momit-leaf-frame-pointer" |
| 11322 | Don't keep the frame pointer in a register for leaf functions. This |
| 11323 | avoids the instructions to save, set up and restore frame pointers and |
| 11324 | makes an extra register available in leaf functions. The option |
| 11325 | \&\fB\-fomit\-frame\-pointer\fR removes the frame pointer for all functions, |
| 11326 | which might make debugging harder. |
| 11327 | .IP "\fB\-mspecld\-anomaly\fR" 4 |
| 11328 | .IX Item "-mspecld-anomaly" |
| 11329 | When enabled, the compiler ensures that the generated code does not |
| 11330 | contain speculative loads after jump instructions. If this option is used, |
| 11331 | \&\f(CW\*(C`_\|_WORKAROUND_SPECULATIVE_LOADS\*(C'\fR is defined. |
| 11332 | .IP "\fB\-mno\-specld\-anomaly\fR" 4 |
| 11333 | .IX Item "-mno-specld-anomaly" |
| 11334 | Don't generate extra code to prevent speculative loads from occurring. |
| 11335 | .IP "\fB\-mcsync\-anomaly\fR" 4 |
| 11336 | .IX Item "-mcsync-anomaly" |
| 11337 | When enabled, the compiler ensures that the generated code does not |
| 11338 | contain \s-1CSYNC\s0 or \s-1SSYNC\s0 instructions too soon after conditional branches. |
| 11339 | If this option is used, \f(CW\*(C`_\|_WORKAROUND_SPECULATIVE_SYNCS\*(C'\fR is defined. |
| 11340 | .IP "\fB\-mno\-csync\-anomaly\fR" 4 |
| 11341 | .IX Item "-mno-csync-anomaly" |
| 11342 | Don't generate extra code to prevent \s-1CSYNC\s0 or \s-1SSYNC\s0 instructions from |
| 11343 | occurring too soon after a conditional branch. |
| 11344 | .IP "\fB\-mlow\-64k\fR" 4 |
| 11345 | .IX Item "-mlow-64k" |
| 11346 | When enabled, the compiler is free to take advantage of the knowledge that |
| 11347 | the entire program fits into the low 64k of memory. |
| 11348 | .IP "\fB\-mno\-low\-64k\fR" 4 |
| 11349 | .IX Item "-mno-low-64k" |
| 11350 | Assume that the program is arbitrarily large. This is the default. |
| 11351 | .IP "\fB\-mstack\-check\-l1\fR" 4 |
| 11352 | .IX Item "-mstack-check-l1" |
| 11353 | Do stack checking using information placed into L1 scratchpad memory by the |
| 11354 | uClinux kernel. |
| 11355 | .IP "\fB\-mid\-shared\-library\fR" 4 |
| 11356 | .IX Item "-mid-shared-library" |
| 11357 | Generate code that supports shared libraries via the library \s-1ID\s0 method. |
| 11358 | This allows for execute in place and shared libraries in an environment |
| 11359 | without virtual memory management. This option implies \fB\-fPIC\fR. |
| 11360 | With a \fBbfin-elf\fR target, this option implies \fB\-msim\fR. |
| 11361 | .IP "\fB\-mno\-id\-shared\-library\fR" 4 |
| 11362 | .IX Item "-mno-id-shared-library" |
| 11363 | Generate code that doesn't assume ID-based shared libraries are being used. |
| 11364 | This is the default. |
| 11365 | .IP "\fB\-mleaf\-id\-shared\-library\fR" 4 |
| 11366 | .IX Item "-mleaf-id-shared-library" |
| 11367 | Generate code that supports shared libraries via the library \s-1ID\s0 method, |
| 11368 | but assumes that this library or executable won't link against any other |
| 11369 | \&\s-1ID\s0 shared libraries. That allows the compiler to use faster code for jumps |
| 11370 | and calls. |
| 11371 | .IP "\fB\-mno\-leaf\-id\-shared\-library\fR" 4 |
| 11372 | .IX Item "-mno-leaf-id-shared-library" |
| 11373 | Do not assume that the code being compiled won't link against any \s-1ID\s0 shared |
| 11374 | libraries. Slower code is generated for jump and call insns. |
| 11375 | .IP "\fB\-mshared\-library\-id=n\fR" 4 |
| 11376 | .IX Item "-mshared-library-id=n" |
| 11377 | Specifies the identification number of the ID-based shared library being |
| 11378 | compiled. Specifying a value of 0 generates more compact code; specifying |
| 11379 | other values forces the allocation of that number to the current |
| 11380 | library but is no more space\- or time-efficient than omitting this option. |
| 11381 | .IP "\fB\-msep\-data\fR" 4 |
| 11382 | .IX Item "-msep-data" |
| 11383 | Generate code that allows the data segment to be located in a different |
| 11384 | area of memory from the text segment. This allows for execute in place in |
| 11385 | an environment without virtual memory management by eliminating relocations |
| 11386 | against the text section. |
| 11387 | .IP "\fB\-mno\-sep\-data\fR" 4 |
| 11388 | .IX Item "-mno-sep-data" |
| 11389 | Generate code that assumes that the data segment follows the text segment. |
| 11390 | This is the default. |
| 11391 | .IP "\fB\-mlong\-calls\fR" 4 |
| 11392 | .IX Item "-mlong-calls" |
| 11393 | .PD 0 |
| 11394 | .IP "\fB\-mno\-long\-calls\fR" 4 |
| 11395 | .IX Item "-mno-long-calls" |
| 11396 | .PD |
| 11397 | Tells the compiler to perform function calls by first loading the |
| 11398 | address of the function into a register and then performing a subroutine |
| 11399 | call on this register. This switch is needed if the target function |
| 11400 | lies outside of the 24\-bit addressing range of the offset-based |
| 11401 | version of subroutine call instruction. |
| 11402 | .Sp |
| 11403 | This feature is not enabled by default. Specifying |
| 11404 | \&\fB\-mno\-long\-calls\fR restores the default behavior. Note these |
| 11405 | switches have no effect on how the compiler generates code to handle |
| 11406 | function calls via function pointers. |
| 11407 | .IP "\fB\-mfast\-fp\fR" 4 |
| 11408 | .IX Item "-mfast-fp" |
| 11409 | Link with the fast floating-point library. This library relaxes some of |
| 11410 | the \s-1IEEE\s0 floating-point standard's rules for checking inputs against |
| 11411 | Not-a-Number (\s-1NAN\s0), in the interest of performance. |
| 11412 | .IP "\fB\-minline\-plt\fR" 4 |
| 11413 | .IX Item "-minline-plt" |
| 11414 | Enable inlining of \s-1PLT\s0 entries in function calls to functions that are |
| 11415 | not known to bind locally. It has no effect without \fB\-mfdpic\fR. |
| 11416 | .IP "\fB\-mmulticore\fR" 4 |
| 11417 | .IX Item "-mmulticore" |
| 11418 | Build a standalone application for multicore Blackfin processors. |
| 11419 | This option causes proper start files and link scripts supporting |
| 11420 | multicore to be used, and defines the macro \f(CW\*(C`_\|_BFIN_MULTICORE\*(C'\fR. |
| 11421 | It can only be used with \fB\-mcpu=bf561\fR[\fB\-\fR\fIsirevision\fR]. |
| 11422 | .Sp |
| 11423 | This option can be used with \fB\-mcorea\fR or \fB\-mcoreb\fR, which |
| 11424 | selects the one-application-per-core programming model. Without |
| 11425 | \&\fB\-mcorea\fR or \fB\-mcoreb\fR, the single\-application/dual\-core |
| 11426 | programming model is used. In this model, the main function of Core B |
| 11427 | should be named as \f(CW\*(C`coreb_main\*(C'\fR. |
| 11428 | .Sp |
| 11429 | If this option is not used, the single-core application programming |
| 11430 | model is used. |
| 11431 | .IP "\fB\-mcorea\fR" 4 |
| 11432 | .IX Item "-mcorea" |
| 11433 | Build a standalone application for Core A of \s-1BF561\s0 when using |
| 11434 | the one-application-per-core programming model. Proper start files |
| 11435 | and link scripts are used to support Core A, and the macro |
| 11436 | \&\f(CW\*(C`_\|_BFIN_COREA\*(C'\fR is defined. |
| 11437 | This option can only be used in conjunction with \fB\-mmulticore\fR. |
| 11438 | .IP "\fB\-mcoreb\fR" 4 |
| 11439 | .IX Item "-mcoreb" |
| 11440 | Build a standalone application for Core B of \s-1BF561\s0 when using |
| 11441 | the one-application-per-core programming model. Proper start files |
| 11442 | and link scripts are used to support Core B, and the macro |
| 11443 | \&\f(CW\*(C`_\|_BFIN_COREB\*(C'\fR is defined. When this option is used, \f(CW\*(C`coreb_main\*(C'\fR |
| 11444 | should be used instead of \f(CW\*(C`main\*(C'\fR. |
| 11445 | This option can only be used in conjunction with \fB\-mmulticore\fR. |
| 11446 | .IP "\fB\-msdram\fR" 4 |
| 11447 | .IX Item "-msdram" |
| 11448 | Build a standalone application for \s-1SDRAM\s0. Proper start files and |
| 11449 | link scripts are used to put the application into \s-1SDRAM\s0, and the macro |
| 11450 | \&\f(CW\*(C`_\|_BFIN_SDRAM\*(C'\fR is defined. |
| 11451 | The loader should initialize \s-1SDRAM\s0 before loading the application. |
| 11452 | .IP "\fB\-micplb\fR" 4 |
| 11453 | .IX Item "-micplb" |
| 11454 | Assume that ICPLBs are enabled at run time. This has an effect on certain |
| 11455 | anomaly workarounds. For Linux targets, the default is to assume ICPLBs |
| 11456 | are enabled; for standalone applications the default is off. |
| 11457 | .PP |
| 11458 | \fIC6X Options\fR |
| 11459 | .IX Subsection "C6X Options" |
| 11460 | .IP "\fB\-march=\fR\fIname\fR" 4 |
| 11461 | .IX Item "-march=name" |
| 11462 | This specifies the name of the target architecture. \s-1GCC\s0 uses this |
| 11463 | name to determine what kind of instructions it can emit when generating |
| 11464 | assembly code. Permissible names are: \fBc62x\fR, |
| 11465 | \&\fBc64x\fR, \fBc64x+\fR, \fBc67x\fR, \fBc67x+\fR, \fBc674x\fR. |
| 11466 | .IP "\fB\-mbig\-endian\fR" 4 |
| 11467 | .IX Item "-mbig-endian" |
| 11468 | Generate code for a big-endian target. |
| 11469 | .IP "\fB\-mlittle\-endian\fR" 4 |
| 11470 | .IX Item "-mlittle-endian" |
| 11471 | Generate code for a little-endian target. This is the default. |
| 11472 | .IP "\fB\-msim\fR" 4 |
| 11473 | .IX Item "-msim" |
| 11474 | Choose startup files and linker script suitable for the simulator. |
| 11475 | .IP "\fB\-msdata=default\fR" 4 |
| 11476 | .IX Item "-msdata=default" |
| 11477 | Put small global and static data in the \fB.neardata\fR section, |
| 11478 | which is pointed to by register \f(CW\*(C`B14\*(C'\fR. Put small uninitialized |
| 11479 | global and static data in the \fB.bss\fR section, which is adjacent |
| 11480 | to the \fB.neardata\fR section. Put small read-only data into the |
| 11481 | \&\fB.rodata\fR section. The corresponding sections used for large |
| 11482 | pieces of data are \fB.fardata\fR, \fB.far\fR and \fB.const\fR. |
| 11483 | .IP "\fB\-msdata=all\fR" 4 |
| 11484 | .IX Item "-msdata=all" |
| 11485 | Put all data, not just small objects, into the sections reserved for |
| 11486 | small data, and use addressing relative to the \f(CW\*(C`B14\*(C'\fR register to |
| 11487 | access them. |
| 11488 | .IP "\fB\-msdata=none\fR" 4 |
| 11489 | .IX Item "-msdata=none" |
| 11490 | Make no use of the sections reserved for small data, and use absolute |
| 11491 | addresses to access all data. Put all initialized global and static |
| 11492 | data in the \fB.fardata\fR section, and all uninitialized data in the |
| 11493 | \&\fB.far\fR section. Put all constant data into the \fB.const\fR |
| 11494 | section. |
| 11495 | .PP |
| 11496 | \fI\s-1CRIS\s0 Options\fR |
| 11497 | .IX Subsection "CRIS Options" |
| 11498 | .PP |
| 11499 | These options are defined specifically for the \s-1CRIS\s0 ports. |
| 11500 | .IP "\fB\-march=\fR\fIarchitecture-type\fR" 4 |
| 11501 | .IX Item "-march=architecture-type" |
| 11502 | .PD 0 |
| 11503 | .IP "\fB\-mcpu=\fR\fIarchitecture-type\fR" 4 |
| 11504 | .IX Item "-mcpu=architecture-type" |
| 11505 | .PD |
| 11506 | Generate code for the specified architecture. The choices for |
| 11507 | \&\fIarchitecture-type\fR are \fBv3\fR, \fBv8\fR and \fBv10\fR for |
| 11508 | respectively \s-1ETRAX\s0\ 4, \s-1ETRAX\s0\ 100, and \s-1ETRAX\s0\ 100\ \s-1LX\s0. |
| 11509 | Default is \fBv0\fR except for cris-axis-linux-gnu, where the default is |
| 11510 | \&\fBv10\fR. |
| 11511 | .IP "\fB\-mtune=\fR\fIarchitecture-type\fR" 4 |
| 11512 | .IX Item "-mtune=architecture-type" |
| 11513 | Tune to \fIarchitecture-type\fR everything applicable about the generated |
| 11514 | code, except for the \s-1ABI\s0 and the set of available instructions. The |
| 11515 | choices for \fIarchitecture-type\fR are the same as for |
| 11516 | \&\fB\-march=\fR\fIarchitecture-type\fR. |
| 11517 | .IP "\fB\-mmax\-stack\-frame=\fR\fIn\fR" 4 |
| 11518 | .IX Item "-mmax-stack-frame=n" |
| 11519 | Warn when the stack frame of a function exceeds \fIn\fR bytes. |
| 11520 | .IP "\fB\-metrax4\fR" 4 |
| 11521 | .IX Item "-metrax4" |
| 11522 | .PD 0 |
| 11523 | .IP "\fB\-metrax100\fR" 4 |
| 11524 | .IX Item "-metrax100" |
| 11525 | .PD |
| 11526 | The options \fB\-metrax4\fR and \fB\-metrax100\fR are synonyms for |
| 11527 | \&\fB\-march=v3\fR and \fB\-march=v8\fR respectively. |
| 11528 | .IP "\fB\-mmul\-bug\-workaround\fR" 4 |
| 11529 | .IX Item "-mmul-bug-workaround" |
| 11530 | .PD 0 |
| 11531 | .IP "\fB\-mno\-mul\-bug\-workaround\fR" 4 |
| 11532 | .IX Item "-mno-mul-bug-workaround" |
| 11533 | .PD |
| 11534 | Work around a bug in the \f(CW\*(C`muls\*(C'\fR and \f(CW\*(C`mulu\*(C'\fR instructions for \s-1CPU\s0 |
| 11535 | models where it applies. This option is active by default. |
| 11536 | .IP "\fB\-mpdebug\fR" 4 |
| 11537 | .IX Item "-mpdebug" |
| 11538 | Enable CRIS-specific verbose debug-related information in the assembly |
| 11539 | code. This option also has the effect of turning off the \fB#NO_APP\fR |
| 11540 | formatted-code indicator to the assembler at the beginning of the |
| 11541 | assembly file. |
| 11542 | .IP "\fB\-mcc\-init\fR" 4 |
| 11543 | .IX Item "-mcc-init" |
| 11544 | Do not use condition-code results from previous instruction; always emit |
| 11545 | compare and test instructions before use of condition codes. |
| 11546 | .IP "\fB\-mno\-side\-effects\fR" 4 |
| 11547 | .IX Item "-mno-side-effects" |
| 11548 | Do not emit instructions with side effects in addressing modes other than |
| 11549 | post-increment. |
| 11550 | .IP "\fB\-mstack\-align\fR" 4 |
| 11551 | .IX Item "-mstack-align" |
| 11552 | .PD 0 |
| 11553 | .IP "\fB\-mno\-stack\-align\fR" 4 |
| 11554 | .IX Item "-mno-stack-align" |
| 11555 | .IP "\fB\-mdata\-align\fR" 4 |
| 11556 | .IX Item "-mdata-align" |
| 11557 | .IP "\fB\-mno\-data\-align\fR" 4 |
| 11558 | .IX Item "-mno-data-align" |
| 11559 | .IP "\fB\-mconst\-align\fR" 4 |
| 11560 | .IX Item "-mconst-align" |
| 11561 | .IP "\fB\-mno\-const\-align\fR" 4 |
| 11562 | .IX Item "-mno-const-align" |
| 11563 | .PD |
| 11564 | These options (\fBno\-\fR options) arrange (eliminate arrangements) for the |
| 11565 | stack frame, individual data and constants to be aligned for the maximum |
| 11566 | single data access size for the chosen \s-1CPU\s0 model. The default is to |
| 11567 | arrange for 32\-bit alignment. \s-1ABI\s0 details such as structure layout are |
| 11568 | not affected by these options. |
| 11569 | .IP "\fB\-m32\-bit\fR" 4 |
| 11570 | .IX Item "-m32-bit" |
| 11571 | .PD 0 |
| 11572 | .IP "\fB\-m16\-bit\fR" 4 |
| 11573 | .IX Item "-m16-bit" |
| 11574 | .IP "\fB\-m8\-bit\fR" 4 |
| 11575 | .IX Item "-m8-bit" |
| 11576 | .PD |
| 11577 | Similar to the stack\- data\- and const-align options above, these options |
| 11578 | arrange for stack frame, writable data and constants to all be 32\-bit, |
| 11579 | 16\-bit or 8\-bit aligned. The default is 32\-bit alignment. |
| 11580 | .IP "\fB\-mno\-prologue\-epilogue\fR" 4 |
| 11581 | .IX Item "-mno-prologue-epilogue" |
| 11582 | .PD 0 |
| 11583 | .IP "\fB\-mprologue\-epilogue\fR" 4 |
| 11584 | .IX Item "-mprologue-epilogue" |
| 11585 | .PD |
| 11586 | With \fB\-mno\-prologue\-epilogue\fR, the normal function prologue and |
| 11587 | epilogue which set up the stack frame are omitted and no return |
| 11588 | instructions or return sequences are generated in the code. Use this |
| 11589 | option only together with visual inspection of the compiled code: no |
| 11590 | warnings or errors are generated when call-saved registers must be saved, |
| 11591 | or storage for local variables needs to be allocated. |
| 11592 | .IP "\fB\-mno\-gotplt\fR" 4 |
| 11593 | .IX Item "-mno-gotplt" |
| 11594 | .PD 0 |
| 11595 | .IP "\fB\-mgotplt\fR" 4 |
| 11596 | .IX Item "-mgotplt" |
| 11597 | .PD |
| 11598 | With \fB\-fpic\fR and \fB\-fPIC\fR, don't generate (do generate) |
| 11599 | instruction sequences that load addresses for functions from the \s-1PLT\s0 part |
| 11600 | of the \s-1GOT\s0 rather than (traditional on other architectures) calls to the |
| 11601 | \&\s-1PLT\s0. The default is \fB\-mgotplt\fR. |
| 11602 | .IP "\fB\-melf\fR" 4 |
| 11603 | .IX Item "-melf" |
| 11604 | Legacy no-op option only recognized with the cris-axis-elf and |
| 11605 | cris-axis-linux-gnu targets. |
| 11606 | .IP "\fB\-mlinux\fR" 4 |
| 11607 | .IX Item "-mlinux" |
| 11608 | Legacy no-op option only recognized with the cris-axis-linux-gnu target. |
| 11609 | .IP "\fB\-sim\fR" 4 |
| 11610 | .IX Item "-sim" |
| 11611 | This option, recognized for the cris-axis-elf, arranges |
| 11612 | to link with input-output functions from a simulator library. Code, |
| 11613 | initialized data and zero-initialized data are allocated consecutively. |
| 11614 | .IP "\fB\-sim2\fR" 4 |
| 11615 | .IX Item "-sim2" |
| 11616 | Like \fB\-sim\fR, but pass linker options to locate initialized data at |
| 11617 | 0x40000000 and zero-initialized data at 0x80000000. |
| 11618 | .PP |
| 11619 | \fI\s-1CR16\s0 Options\fR |
| 11620 | .IX Subsection "CR16 Options" |
| 11621 | .PP |
| 11622 | These options are defined specifically for the \s-1CR16\s0 ports. |
| 11623 | .IP "\fB\-mmac\fR" 4 |
| 11624 | .IX Item "-mmac" |
| 11625 | Enable the use of multiply-accumulate instructions. Disabled by default. |
| 11626 | .IP "\fB\-mcr16cplus\fR" 4 |
| 11627 | .IX Item "-mcr16cplus" |
| 11628 | .PD 0 |
| 11629 | .IP "\fB\-mcr16c\fR" 4 |
| 11630 | .IX Item "-mcr16c" |
| 11631 | .PD |
| 11632 | Generate code for \s-1CR16C\s0 or \s-1CR16C+\s0 architecture. \s-1CR16C+\s0 architecture |
| 11633 | is default. |
| 11634 | .IP "\fB\-msim\fR" 4 |
| 11635 | .IX Item "-msim" |
| 11636 | Links the library libsim.a which is in compatible with simulator. Applicable |
| 11637 | to \s-1ELF\s0 compiler only. |
| 11638 | .IP "\fB\-mint32\fR" 4 |
| 11639 | .IX Item "-mint32" |
| 11640 | Choose integer type as 32\-bit wide. |
| 11641 | .IP "\fB\-mbit\-ops\fR" 4 |
| 11642 | .IX Item "-mbit-ops" |
| 11643 | Generates \f(CW\*(C`sbit\*(C'\fR/\f(CW\*(C`cbit\*(C'\fR instructions for bit manipulations. |
| 11644 | .IP "\fB\-mdata\-model=\fR\fImodel\fR" 4 |
| 11645 | .IX Item "-mdata-model=model" |
| 11646 | Choose a data model. The choices for \fImodel\fR are \fBnear\fR, |
| 11647 | \&\fBfar\fR or \fBmedium\fR. \fBmedium\fR is default. |
| 11648 | However, \fBfar\fR is not valid with \fB\-mcr16c\fR, as the |
| 11649 | \&\s-1CR16C\s0 architecture does not support the far data model. |
| 11650 | .PP |
| 11651 | \fIDarwin Options\fR |
| 11652 | .IX Subsection "Darwin Options" |
| 11653 | .PP |
| 11654 | These options are defined for all architectures running the Darwin operating |
| 11655 | system. |
| 11656 | .PP |
| 11657 | \&\s-1FSF\s0 \s-1GCC\s0 on Darwin does not create \*(L"fat\*(R" object files; it creates |
| 11658 | an object file for the single architecture that \s-1GCC\s0 was built to |
| 11659 | target. Apple's \s-1GCC\s0 on Darwin does create \*(L"fat\*(R" files if multiple |
| 11660 | \&\fB\-arch\fR options are used; it does so by running the compiler or |
| 11661 | linker multiple times and joining the results together with |
| 11662 | \&\fIlipo\fR. |
| 11663 | .PP |
| 11664 | The subtype of the file created (like \fBppc7400\fR or \fBppc970\fR or |
| 11665 | \&\fBi686\fR) is determined by the flags that specify the \s-1ISA\s0 |
| 11666 | that \s-1GCC\s0 is targeting, like \fB\-mcpu\fR or \fB\-march\fR. The |
| 11667 | \&\fB\-force_cpusubtype_ALL\fR option can be used to override this. |
| 11668 | .PP |
| 11669 | The Darwin tools vary in their behavior when presented with an \s-1ISA\s0 |
| 11670 | mismatch. The assembler, \fIas\fR, only permits instructions to |
| 11671 | be used that are valid for the subtype of the file it is generating, |
| 11672 | so you cannot put 64\-bit instructions in a \fBppc750\fR object file. |
| 11673 | The linker for shared libraries, \fI/usr/bin/libtool\fR, fails |
| 11674 | and prints an error if asked to create a shared library with a less |
| 11675 | restrictive subtype than its input files (for instance, trying to put |
| 11676 | a \fBppc970\fR object file in a \fBppc7400\fR library). The linker |
| 11677 | for executables, \fBld\fR, quietly gives the executable the most |
| 11678 | restrictive subtype of any of its input files. |
| 11679 | .IP "\fB\-F\fR\fIdir\fR" 4 |
| 11680 | .IX Item "-Fdir" |
| 11681 | Add the framework directory \fIdir\fR to the head of the list of |
| 11682 | directories to be searched for header files. These directories are |
| 11683 | interleaved with those specified by \fB\-I\fR options and are |
| 11684 | scanned in a left-to-right order. |
| 11685 | .Sp |
| 11686 | A framework directory is a directory with frameworks in it. A |
| 11687 | framework is a directory with a \fIHeaders\fR and/or |
| 11688 | \&\fIPrivateHeaders\fR directory contained directly in it that ends |
| 11689 | in \fI.framework\fR. The name of a framework is the name of this |
| 11690 | directory excluding the \fI.framework\fR. Headers associated with |
| 11691 | the framework are found in one of those two directories, with |
| 11692 | \&\fIHeaders\fR being searched first. A subframework is a framework |
| 11693 | directory that is in a framework's \fIFrameworks\fR directory. |
| 11694 | Includes of subframework headers can only appear in a header of a |
| 11695 | framework that contains the subframework, or in a sibling subframework |
| 11696 | header. Two subframeworks are siblings if they occur in the same |
| 11697 | framework. A subframework should not have the same name as a |
| 11698 | framework; a warning is issued if this is violated. Currently a |
| 11699 | subframework cannot have subframeworks; in the future, the mechanism |
| 11700 | may be extended to support this. The standard frameworks can be found |
| 11701 | in \fI/System/Library/Frameworks\fR and |
| 11702 | \&\fI/Library/Frameworks\fR. An example include looks like |
| 11703 | \&\f(CW\*(C`#include <Framework/header.h>\*(C'\fR, where \fIFramework\fR denotes |
| 11704 | the name of the framework and \fIheader.h\fR is found in the |
| 11705 | \&\fIPrivateHeaders\fR or \fIHeaders\fR directory. |
| 11706 | .IP "\fB\-iframework\fR\fIdir\fR" 4 |
| 11707 | .IX Item "-iframeworkdir" |
| 11708 | Like \fB\-F\fR except the directory is a treated as a system |
| 11709 | directory. The main difference between this \fB\-iframework\fR and |
| 11710 | \&\fB\-F\fR is that with \fB\-iframework\fR the compiler does not |
| 11711 | warn about constructs contained within header files found via |
| 11712 | \&\fIdir\fR. This option is valid only for the C family of languages. |
| 11713 | .IP "\fB\-gused\fR" 4 |
| 11714 | .IX Item "-gused" |
| 11715 | Emit debugging information for symbols that are used. For stabs |
| 11716 | debugging format, this enables \fB\-feliminate\-unused\-debug\-symbols\fR. |
| 11717 | This is by default \s-1ON\s0. |
| 11718 | .IP "\fB\-gfull\fR" 4 |
| 11719 | .IX Item "-gfull" |
| 11720 | Emit debugging information for all symbols and types. |
| 11721 | .IP "\fB\-mmacosx\-version\-min=\fR\fIversion\fR" 4 |
| 11722 | .IX Item "-mmacosx-version-min=version" |
| 11723 | The earliest version of MacOS X that this executable will run on |
| 11724 | is \fIversion\fR. Typical values of \fIversion\fR include \f(CW10.1\fR, |
| 11725 | \&\f(CW10.2\fR, and \f(CW10.3.9\fR. |
| 11726 | .Sp |
| 11727 | If the compiler was built to use the system's headers by default, |
| 11728 | then the default for this option is the system version on which the |
| 11729 | compiler is running, otherwise the default is to make choices that |
| 11730 | are compatible with as many systems and code bases as possible. |
| 11731 | .IP "\fB\-mkernel\fR" 4 |
| 11732 | .IX Item "-mkernel" |
| 11733 | Enable kernel development mode. The \fB\-mkernel\fR option sets |
| 11734 | \&\fB\-static\fR, \fB\-fno\-common\fR, \fB\-fno\-cxa\-atexit\fR, |
| 11735 | \&\fB\-fno\-exceptions\fR, \fB\-fno\-non\-call\-exceptions\fR, |
| 11736 | \&\fB\-fapple\-kext\fR, \fB\-fno\-weak\fR and \fB\-fno\-rtti\fR where |
| 11737 | applicable. This mode also sets \fB\-mno\-altivec\fR, |
| 11738 | \&\fB\-msoft\-float\fR, \fB\-fno\-builtin\fR and |
| 11739 | \&\fB\-mlong\-branch\fR for PowerPC targets. |
| 11740 | .IP "\fB\-mone\-byte\-bool\fR" 4 |
| 11741 | .IX Item "-mone-byte-bool" |
| 11742 | Override the defaults for \fBbool\fR so that \fBsizeof(bool)==1\fR. |
| 11743 | By default \fBsizeof(bool)\fR is \fB4\fR when compiling for |
| 11744 | Darwin/PowerPC and \fB1\fR when compiling for Darwin/x86, so this |
| 11745 | option has no effect on x86. |
| 11746 | .Sp |
| 11747 | \&\fBWarning:\fR The \fB\-mone\-byte\-bool\fR switch causes \s-1GCC\s0 |
| 11748 | to generate code that is not binary compatible with code generated |
| 11749 | without that switch. Using this switch may require recompiling all |
| 11750 | other modules in a program, including system libraries. Use this |
| 11751 | switch to conform to a non-default data model. |
| 11752 | .IP "\fB\-mfix\-and\-continue\fR" 4 |
| 11753 | .IX Item "-mfix-and-continue" |
| 11754 | .PD 0 |
| 11755 | .IP "\fB\-ffix\-and\-continue\fR" 4 |
| 11756 | .IX Item "-ffix-and-continue" |
| 11757 | .IP "\fB\-findirect\-data\fR" 4 |
| 11758 | .IX Item "-findirect-data" |
| 11759 | .PD |
| 11760 | Generate code suitable for fast turnaround development, such as to |
| 11761 | allow \s-1GDB\s0 to dynamically load \f(CW\*(C`.o\*(C'\fR files into already-running |
| 11762 | programs. \fB\-findirect\-data\fR and \fB\-ffix\-and\-continue\fR |
| 11763 | are provided for backwards compatibility. |
| 11764 | .IP "\fB\-all_load\fR" 4 |
| 11765 | .IX Item "-all_load" |
| 11766 | Loads all members of static archive libraries. |
| 11767 | See man \fIld\fR\|(1) for more information. |
| 11768 | .IP "\fB\-arch_errors_fatal\fR" 4 |
| 11769 | .IX Item "-arch_errors_fatal" |
| 11770 | Cause the errors having to do with files that have the wrong architecture |
| 11771 | to be fatal. |
| 11772 | .IP "\fB\-bind_at_load\fR" 4 |
| 11773 | .IX Item "-bind_at_load" |
| 11774 | Causes the output file to be marked such that the dynamic linker will |
| 11775 | bind all undefined references when the file is loaded or launched. |
| 11776 | .IP "\fB\-bundle\fR" 4 |
| 11777 | .IX Item "-bundle" |
| 11778 | Produce a Mach-o bundle format file. |
| 11779 | See man \fIld\fR\|(1) for more information. |
| 11780 | .IP "\fB\-bundle_loader\fR \fIexecutable\fR" 4 |
| 11781 | .IX Item "-bundle_loader executable" |
| 11782 | This option specifies the \fIexecutable\fR that will load the build |
| 11783 | output file being linked. See man \fIld\fR\|(1) for more information. |
| 11784 | .IP "\fB\-dynamiclib\fR" 4 |
| 11785 | .IX Item "-dynamiclib" |
| 11786 | When passed this option, \s-1GCC\s0 produces a dynamic library instead of |
| 11787 | an executable when linking, using the Darwin \fIlibtool\fR command. |
| 11788 | .IP "\fB\-force_cpusubtype_ALL\fR" 4 |
| 11789 | .IX Item "-force_cpusubtype_ALL" |
| 11790 | This causes \s-1GCC\s0's output file to have the \fI\s-1ALL\s0\fR subtype, instead of |
| 11791 | one controlled by the \fB\-mcpu\fR or \fB\-march\fR option. |
| 11792 | .IP "\fB\-allowable_client\fR \fIclient_name\fR" 4 |
| 11793 | .IX Item "-allowable_client client_name" |
| 11794 | .PD 0 |
| 11795 | .IP "\fB\-client_name\fR" 4 |
| 11796 | .IX Item "-client_name" |
| 11797 | .IP "\fB\-compatibility_version\fR" 4 |
| 11798 | .IX Item "-compatibility_version" |
| 11799 | .IP "\fB\-current_version\fR" 4 |
| 11800 | .IX Item "-current_version" |
| 11801 | .IP "\fB\-dead_strip\fR" 4 |
| 11802 | .IX Item "-dead_strip" |
| 11803 | .IP "\fB\-dependency\-file\fR" 4 |
| 11804 | .IX Item "-dependency-file" |
| 11805 | .IP "\fB\-dylib_file\fR" 4 |
| 11806 | .IX Item "-dylib_file" |
| 11807 | .IP "\fB\-dylinker_install_name\fR" 4 |
| 11808 | .IX Item "-dylinker_install_name" |
| 11809 | .IP "\fB\-dynamic\fR" 4 |
| 11810 | .IX Item "-dynamic" |
| 11811 | .IP "\fB\-exported_symbols_list\fR" 4 |
| 11812 | .IX Item "-exported_symbols_list" |
| 11813 | .IP "\fB\-filelist\fR" 4 |
| 11814 | .IX Item "-filelist" |
| 11815 | .IP "\fB\-flat_namespace\fR" 4 |
| 11816 | .IX Item "-flat_namespace" |
| 11817 | .IP "\fB\-force_flat_namespace\fR" 4 |
| 11818 | .IX Item "-force_flat_namespace" |
| 11819 | .IP "\fB\-headerpad_max_install_names\fR" 4 |
| 11820 | .IX Item "-headerpad_max_install_names" |
| 11821 | .IP "\fB\-image_base\fR" 4 |
| 11822 | .IX Item "-image_base" |
| 11823 | .IP "\fB\-init\fR" 4 |
| 11824 | .IX Item "-init" |
| 11825 | .IP "\fB\-install_name\fR" 4 |
| 11826 | .IX Item "-install_name" |
| 11827 | .IP "\fB\-keep_private_externs\fR" 4 |
| 11828 | .IX Item "-keep_private_externs" |
| 11829 | .IP "\fB\-multi_module\fR" 4 |
| 11830 | .IX Item "-multi_module" |
| 11831 | .IP "\fB\-multiply_defined\fR" 4 |
| 11832 | .IX Item "-multiply_defined" |
| 11833 | .IP "\fB\-multiply_defined_unused\fR" 4 |
| 11834 | .IX Item "-multiply_defined_unused" |
| 11835 | .IP "\fB\-noall_load\fR" 4 |
| 11836 | .IX Item "-noall_load" |
| 11837 | .IP "\fB\-no_dead_strip_inits_and_terms\fR" 4 |
| 11838 | .IX Item "-no_dead_strip_inits_and_terms" |
| 11839 | .IP "\fB\-nofixprebinding\fR" 4 |
| 11840 | .IX Item "-nofixprebinding" |
| 11841 | .IP "\fB\-nomultidefs\fR" 4 |
| 11842 | .IX Item "-nomultidefs" |
| 11843 | .IP "\fB\-noprebind\fR" 4 |
| 11844 | .IX Item "-noprebind" |
| 11845 | .IP "\fB\-noseglinkedit\fR" 4 |
| 11846 | .IX Item "-noseglinkedit" |
| 11847 | .IP "\fB\-pagezero_size\fR" 4 |
| 11848 | .IX Item "-pagezero_size" |
| 11849 | .IP "\fB\-prebind\fR" 4 |
| 11850 | .IX Item "-prebind" |
| 11851 | .IP "\fB\-prebind_all_twolevel_modules\fR" 4 |
| 11852 | .IX Item "-prebind_all_twolevel_modules" |
| 11853 | .IP "\fB\-private_bundle\fR" 4 |
| 11854 | .IX Item "-private_bundle" |
| 11855 | .IP "\fB\-read_only_relocs\fR" 4 |
| 11856 | .IX Item "-read_only_relocs" |
| 11857 | .IP "\fB\-sectalign\fR" 4 |
| 11858 | .IX Item "-sectalign" |
| 11859 | .IP "\fB\-sectobjectsymbols\fR" 4 |
| 11860 | .IX Item "-sectobjectsymbols" |
| 11861 | .IP "\fB\-whyload\fR" 4 |
| 11862 | .IX Item "-whyload" |
| 11863 | .IP "\fB\-seg1addr\fR" 4 |
| 11864 | .IX Item "-seg1addr" |
| 11865 | .IP "\fB\-sectcreate\fR" 4 |
| 11866 | .IX Item "-sectcreate" |
| 11867 | .IP "\fB\-sectobjectsymbols\fR" 4 |
| 11868 | .IX Item "-sectobjectsymbols" |
| 11869 | .IP "\fB\-sectorder\fR" 4 |
| 11870 | .IX Item "-sectorder" |
| 11871 | .IP "\fB\-segaddr\fR" 4 |
| 11872 | .IX Item "-segaddr" |
| 11873 | .IP "\fB\-segs_read_only_addr\fR" 4 |
| 11874 | .IX Item "-segs_read_only_addr" |
| 11875 | .IP "\fB\-segs_read_write_addr\fR" 4 |
| 11876 | .IX Item "-segs_read_write_addr" |
| 11877 | .IP "\fB\-seg_addr_table\fR" 4 |
| 11878 | .IX Item "-seg_addr_table" |
| 11879 | .IP "\fB\-seg_addr_table_filename\fR" 4 |
| 11880 | .IX Item "-seg_addr_table_filename" |
| 11881 | .IP "\fB\-seglinkedit\fR" 4 |
| 11882 | .IX Item "-seglinkedit" |
| 11883 | .IP "\fB\-segprot\fR" 4 |
| 11884 | .IX Item "-segprot" |
| 11885 | .IP "\fB\-segs_read_only_addr\fR" 4 |
| 11886 | .IX Item "-segs_read_only_addr" |
| 11887 | .IP "\fB\-segs_read_write_addr\fR" 4 |
| 11888 | .IX Item "-segs_read_write_addr" |
| 11889 | .IP "\fB\-single_module\fR" 4 |
| 11890 | .IX Item "-single_module" |
| 11891 | .IP "\fB\-static\fR" 4 |
| 11892 | .IX Item "-static" |
| 11893 | .IP "\fB\-sub_library\fR" 4 |
| 11894 | .IX Item "-sub_library" |
| 11895 | .IP "\fB\-sub_umbrella\fR" 4 |
| 11896 | .IX Item "-sub_umbrella" |
| 11897 | .IP "\fB\-twolevel_namespace\fR" 4 |
| 11898 | .IX Item "-twolevel_namespace" |
| 11899 | .IP "\fB\-umbrella\fR" 4 |
| 11900 | .IX Item "-umbrella" |
| 11901 | .IP "\fB\-undefined\fR" 4 |
| 11902 | .IX Item "-undefined" |
| 11903 | .IP "\fB\-unexported_symbols_list\fR" 4 |
| 11904 | .IX Item "-unexported_symbols_list" |
| 11905 | .IP "\fB\-weak_reference_mismatches\fR" 4 |
| 11906 | .IX Item "-weak_reference_mismatches" |
| 11907 | .IP "\fB\-whatsloaded\fR" 4 |
| 11908 | .IX Item "-whatsloaded" |
| 11909 | .PD |
| 11910 | These options are passed to the Darwin linker. The Darwin linker man page |
| 11911 | describes them in detail. |
| 11912 | .PP |
| 11913 | \fI\s-1DEC\s0 Alpha Options\fR |
| 11914 | .IX Subsection "DEC Alpha Options" |
| 11915 | .PP |
| 11916 | These \fB\-m\fR options are defined for the \s-1DEC\s0 Alpha implementations: |
| 11917 | .IP "\fB\-mno\-soft\-float\fR" 4 |
| 11918 | .IX Item "-mno-soft-float" |
| 11919 | .PD 0 |
| 11920 | .IP "\fB\-msoft\-float\fR" 4 |
| 11921 | .IX Item "-msoft-float" |
| 11922 | .PD |
| 11923 | Use (do not use) the hardware floating-point instructions for |
| 11924 | floating-point operations. When \fB\-msoft\-float\fR is specified, |
| 11925 | functions in \fIlibgcc.a\fR are used to perform floating-point |
| 11926 | operations. Unless they are replaced by routines that emulate the |
| 11927 | floating-point operations, or compiled in such a way as to call such |
| 11928 | emulations routines, these routines issue floating-point |
| 11929 | operations. If you are compiling for an Alpha without floating-point |
| 11930 | operations, you must ensure that the library is built so as not to call |
| 11931 | them. |
| 11932 | .Sp |
| 11933 | Note that Alpha implementations without floating-point operations are |
| 11934 | required to have floating-point registers. |
| 11935 | .IP "\fB\-mfp\-reg\fR" 4 |
| 11936 | .IX Item "-mfp-reg" |
| 11937 | .PD 0 |
| 11938 | .IP "\fB\-mno\-fp\-regs\fR" 4 |
| 11939 | .IX Item "-mno-fp-regs" |
| 11940 | .PD |
| 11941 | Generate code that uses (does not use) the floating-point register set. |
| 11942 | \&\fB\-mno\-fp\-regs\fR implies \fB\-msoft\-float\fR. If the floating-point |
| 11943 | register set is not used, floating-point operands are passed in integer |
| 11944 | registers as if they were integers and floating-point results are passed |
| 11945 | in \f(CW$0\fR instead of \f(CW$f0\fR. This is a non-standard calling sequence, |
| 11946 | so any function with a floating-point argument or return value called by code |
| 11947 | compiled with \fB\-mno\-fp\-regs\fR must also be compiled with that |
| 11948 | option. |
| 11949 | .Sp |
| 11950 | A typical use of this option is building a kernel that does not use, |
| 11951 | and hence need not save and restore, any floating-point registers. |
| 11952 | .IP "\fB\-mieee\fR" 4 |
| 11953 | .IX Item "-mieee" |
| 11954 | The Alpha architecture implements floating-point hardware optimized for |
| 11955 | maximum performance. It is mostly compliant with the \s-1IEEE\s0 floating-point |
| 11956 | standard. However, for full compliance, software assistance is |
| 11957 | required. This option generates code fully IEEE-compliant code |
| 11958 | \&\fIexcept\fR that the \fIinexact-flag\fR is not maintained (see below). |
| 11959 | If this option is turned on, the preprocessor macro \f(CW\*(C`_IEEE_FP\*(C'\fR is |
| 11960 | defined during compilation. The resulting code is less efficient but is |
| 11961 | able to correctly support denormalized numbers and exceptional \s-1IEEE\s0 |
| 11962 | values such as not-a-number and plus/minus infinity. Other Alpha |
| 11963 | compilers call this option \fB\-ieee_with_no_inexact\fR. |
| 11964 | .IP "\fB\-mieee\-with\-inexact\fR" 4 |
| 11965 | .IX Item "-mieee-with-inexact" |
| 11966 | This is like \fB\-mieee\fR except the generated code also maintains |
| 11967 | the \s-1IEEE\s0 \fIinexact-flag\fR. Turning on this option causes the |
| 11968 | generated code to implement fully-compliant \s-1IEEE\s0 math. In addition to |
| 11969 | \&\f(CW\*(C`_IEEE_FP\*(C'\fR, \f(CW\*(C`_IEEE_FP_EXACT\*(C'\fR is defined as a preprocessor |
| 11970 | macro. On some Alpha implementations the resulting code may execute |
| 11971 | significantly slower than the code generated by default. Since there is |
| 11972 | very little code that depends on the \fIinexact-flag\fR, you should |
| 11973 | normally not specify this option. Other Alpha compilers call this |
| 11974 | option \fB\-ieee_with_inexact\fR. |
| 11975 | .IP "\fB\-mfp\-trap\-mode=\fR\fItrap-mode\fR" 4 |
| 11976 | .IX Item "-mfp-trap-mode=trap-mode" |
| 11977 | This option controls what floating-point related traps are enabled. |
| 11978 | Other Alpha compilers call this option \fB\-fptm\fR \fItrap-mode\fR. |
| 11979 | The trap mode can be set to one of four values: |
| 11980 | .RS 4 |
| 11981 | .IP "\fBn\fR" 4 |
| 11982 | .IX Item "n" |
| 11983 | This is the default (normal) setting. The only traps that are enabled |
| 11984 | are the ones that cannot be disabled in software (e.g., division by zero |
| 11985 | trap). |
| 11986 | .IP "\fBu\fR" 4 |
| 11987 | .IX Item "u" |
| 11988 | In addition to the traps enabled by \fBn\fR, underflow traps are enabled |
| 11989 | as well. |
| 11990 | .IP "\fBsu\fR" 4 |
| 11991 | .IX Item "su" |
| 11992 | Like \fBu\fR, but the instructions are marked to be safe for software |
| 11993 | completion (see Alpha architecture manual for details). |
| 11994 | .IP "\fBsui\fR" 4 |
| 11995 | .IX Item "sui" |
| 11996 | Like \fBsu\fR, but inexact traps are enabled as well. |
| 11997 | .RE |
| 11998 | .RS 4 |
| 11999 | .RE |
| 12000 | .IP "\fB\-mfp\-rounding\-mode=\fR\fIrounding-mode\fR" 4 |
| 12001 | .IX Item "-mfp-rounding-mode=rounding-mode" |
| 12002 | Selects the \s-1IEEE\s0 rounding mode. Other Alpha compilers call this option |
| 12003 | \&\fB\-fprm\fR \fIrounding-mode\fR. The \fIrounding-mode\fR can be one |
| 12004 | of: |
| 12005 | .RS 4 |
| 12006 | .IP "\fBn\fR" 4 |
| 12007 | .IX Item "n" |
| 12008 | Normal \s-1IEEE\s0 rounding mode. Floating-point numbers are rounded towards |
| 12009 | the nearest machine number or towards the even machine number in case |
| 12010 | of a tie. |
| 12011 | .IP "\fBm\fR" 4 |
| 12012 | .IX Item "m" |
| 12013 | Round towards minus infinity. |
| 12014 | .IP "\fBc\fR" 4 |
| 12015 | .IX Item "c" |
| 12016 | Chopped rounding mode. Floating-point numbers are rounded towards zero. |
| 12017 | .IP "\fBd\fR" 4 |
| 12018 | .IX Item "d" |
| 12019 | Dynamic rounding mode. A field in the floating-point control register |
| 12020 | (\fIfpcr\fR, see Alpha architecture reference manual) controls the |
| 12021 | rounding mode in effect. The C library initializes this register for |
| 12022 | rounding towards plus infinity. Thus, unless your program modifies the |
| 12023 | \&\fIfpcr\fR, \fBd\fR corresponds to round towards plus infinity. |
| 12024 | .RE |
| 12025 | .RS 4 |
| 12026 | .RE |
| 12027 | .IP "\fB\-mtrap\-precision=\fR\fItrap-precision\fR" 4 |
| 12028 | .IX Item "-mtrap-precision=trap-precision" |
| 12029 | In the Alpha architecture, floating-point traps are imprecise. This |
| 12030 | means without software assistance it is impossible to recover from a |
| 12031 | floating trap and program execution normally needs to be terminated. |
| 12032 | \&\s-1GCC\s0 can generate code that can assist operating system trap handlers |
| 12033 | in determining the exact location that caused a floating-point trap. |
| 12034 | Depending on the requirements of an application, different levels of |
| 12035 | precisions can be selected: |
| 12036 | .RS 4 |
| 12037 | .IP "\fBp\fR" 4 |
| 12038 | .IX Item "p" |
| 12039 | Program precision. This option is the default and means a trap handler |
| 12040 | can only identify which program caused a floating-point exception. |
| 12041 | .IP "\fBf\fR" 4 |
| 12042 | .IX Item "f" |
| 12043 | Function precision. The trap handler can determine the function that |
| 12044 | caused a floating-point exception. |
| 12045 | .IP "\fBi\fR" 4 |
| 12046 | .IX Item "i" |
| 12047 | Instruction precision. The trap handler can determine the exact |
| 12048 | instruction that caused a floating-point exception. |
| 12049 | .RE |
| 12050 | .RS 4 |
| 12051 | .Sp |
| 12052 | Other Alpha compilers provide the equivalent options called |
| 12053 | \&\fB\-scope_safe\fR and \fB\-resumption_safe\fR. |
| 12054 | .RE |
| 12055 | .IP "\fB\-mieee\-conformant\fR" 4 |
| 12056 | .IX Item "-mieee-conformant" |
| 12057 | This option marks the generated code as \s-1IEEE\s0 conformant. You must not |
| 12058 | use this option unless you also specify \fB\-mtrap\-precision=i\fR and either |
| 12059 | \&\fB\-mfp\-trap\-mode=su\fR or \fB\-mfp\-trap\-mode=sui\fR. Its only effect |
| 12060 | is to emit the line \fB.eflag 48\fR in the function prologue of the |
| 12061 | generated assembly file. |
| 12062 | .IP "\fB\-mbuild\-constants\fR" 4 |
| 12063 | .IX Item "-mbuild-constants" |
| 12064 | Normally \s-1GCC\s0 examines a 32\- or 64\-bit integer constant to |
| 12065 | see if it can construct it from smaller constants in two or three |
| 12066 | instructions. If it cannot, it outputs the constant as a literal and |
| 12067 | generates code to load it from the data segment at run time. |
| 12068 | .Sp |
| 12069 | Use this option to require \s-1GCC\s0 to construct \fIall\fR integer constants |
| 12070 | using code, even if it takes more instructions (the maximum is six). |
| 12071 | .Sp |
| 12072 | You typically use this option to build a shared library dynamic |
| 12073 | loader. Itself a shared library, it must relocate itself in memory |
| 12074 | before it can find the variables and constants in its own data segment. |
| 12075 | .IP "\fB\-mbwx\fR" 4 |
| 12076 | .IX Item "-mbwx" |
| 12077 | .PD 0 |
| 12078 | .IP "\fB\-mno\-bwx\fR" 4 |
| 12079 | .IX Item "-mno-bwx" |
| 12080 | .IP "\fB\-mcix\fR" 4 |
| 12081 | .IX Item "-mcix" |
| 12082 | .IP "\fB\-mno\-cix\fR" 4 |
| 12083 | .IX Item "-mno-cix" |
| 12084 | .IP "\fB\-mfix\fR" 4 |
| 12085 | .IX Item "-mfix" |
| 12086 | .IP "\fB\-mno\-fix\fR" 4 |
| 12087 | .IX Item "-mno-fix" |
| 12088 | .IP "\fB\-mmax\fR" 4 |
| 12089 | .IX Item "-mmax" |
| 12090 | .IP "\fB\-mno\-max\fR" 4 |
| 12091 | .IX Item "-mno-max" |
| 12092 | .PD |
| 12093 | Indicate whether \s-1GCC\s0 should generate code to use the optional \s-1BWX\s0, |
| 12094 | \&\s-1CIX\s0, \s-1FIX\s0 and \s-1MAX\s0 instruction sets. The default is to use the instruction |
| 12095 | sets supported by the \s-1CPU\s0 type specified via \fB\-mcpu=\fR option or that |
| 12096 | of the \s-1CPU\s0 on which \s-1GCC\s0 was built if none is specified. |
| 12097 | .IP "\fB\-mfloat\-vax\fR" 4 |
| 12098 | .IX Item "-mfloat-vax" |
| 12099 | .PD 0 |
| 12100 | .IP "\fB\-mfloat\-ieee\fR" 4 |
| 12101 | .IX Item "-mfloat-ieee" |
| 12102 | .PD |
| 12103 | Generate code that uses (does not use) \s-1VAX\s0 F and G floating-point |
| 12104 | arithmetic instead of \s-1IEEE\s0 single and double precision. |
| 12105 | .IP "\fB\-mexplicit\-relocs\fR" 4 |
| 12106 | .IX Item "-mexplicit-relocs" |
| 12107 | .PD 0 |
| 12108 | .IP "\fB\-mno\-explicit\-relocs\fR" 4 |
| 12109 | .IX Item "-mno-explicit-relocs" |
| 12110 | .PD |
| 12111 | Older Alpha assemblers provided no way to generate symbol relocations |
| 12112 | except via assembler macros. Use of these macros does not allow |
| 12113 | optimal instruction scheduling. \s-1GNU\s0 binutils as of version 2.12 |
| 12114 | supports a new syntax that allows the compiler to explicitly mark |
| 12115 | which relocations should apply to which instructions. This option |
| 12116 | is mostly useful for debugging, as \s-1GCC\s0 detects the capabilities of |
| 12117 | the assembler when it is built and sets the default accordingly. |
| 12118 | .IP "\fB\-msmall\-data\fR" 4 |
| 12119 | .IX Item "-msmall-data" |
| 12120 | .PD 0 |
| 12121 | .IP "\fB\-mlarge\-data\fR" 4 |
| 12122 | .IX Item "-mlarge-data" |
| 12123 | .PD |
| 12124 | When \fB\-mexplicit\-relocs\fR is in effect, static data is |
| 12125 | accessed via \fIgp-relative\fR relocations. When \fB\-msmall\-data\fR |
| 12126 | is used, objects 8 bytes long or smaller are placed in a \fIsmall data area\fR |
| 12127 | (the \f(CW\*(C`.sdata\*(C'\fR and \f(CW\*(C`.sbss\*(C'\fR sections) and are accessed via |
| 12128 | 16\-bit relocations off of the \f(CW$gp\fR register. This limits the |
| 12129 | size of the small data area to 64KB, but allows the variables to be |
| 12130 | directly accessed via a single instruction. |
| 12131 | .Sp |
| 12132 | The default is \fB\-mlarge\-data\fR. With this option the data area |
| 12133 | is limited to just below 2GB. Programs that require more than 2GB of |
| 12134 | data must use \f(CW\*(C`malloc\*(C'\fR or \f(CW\*(C`mmap\*(C'\fR to allocate the data in the |
| 12135 | heap instead of in the program's data segment. |
| 12136 | .Sp |
| 12137 | When generating code for shared libraries, \fB\-fpic\fR implies |
| 12138 | \&\fB\-msmall\-data\fR and \fB\-fPIC\fR implies \fB\-mlarge\-data\fR. |
| 12139 | .IP "\fB\-msmall\-text\fR" 4 |
| 12140 | .IX Item "-msmall-text" |
| 12141 | .PD 0 |
| 12142 | .IP "\fB\-mlarge\-text\fR" 4 |
| 12143 | .IX Item "-mlarge-text" |
| 12144 | .PD |
| 12145 | When \fB\-msmall\-text\fR is used, the compiler assumes that the |
| 12146 | code of the entire program (or shared library) fits in 4MB, and is |
| 12147 | thus reachable with a branch instruction. When \fB\-msmall\-data\fR |
| 12148 | is used, the compiler can assume that all local symbols share the |
| 12149 | same \f(CW$gp\fR value, and thus reduce the number of instructions |
| 12150 | required for a function call from 4 to 1. |
| 12151 | .Sp |
| 12152 | The default is \fB\-mlarge\-text\fR. |
| 12153 | .IP "\fB\-mcpu=\fR\fIcpu_type\fR" 4 |
| 12154 | .IX Item "-mcpu=cpu_type" |
| 12155 | Set the instruction set and instruction scheduling parameters for |
| 12156 | machine type \fIcpu_type\fR. You can specify either the \fB\s-1EV\s0\fR |
| 12157 | style name or the corresponding chip number. \s-1GCC\s0 supports scheduling |
| 12158 | parameters for the \s-1EV4\s0, \s-1EV5\s0 and \s-1EV6\s0 family of processors and |
| 12159 | chooses the default values for the instruction set from the processor |
| 12160 | you specify. If you do not specify a processor type, \s-1GCC\s0 defaults |
| 12161 | to the processor on which the compiler was built. |
| 12162 | .Sp |
| 12163 | Supported values for \fIcpu_type\fR are |
| 12164 | .RS 4 |
| 12165 | .IP "\fBev4\fR" 4 |
| 12166 | .IX Item "ev4" |
| 12167 | .PD 0 |
| 12168 | .IP "\fBev45\fR" 4 |
| 12169 | .IX Item "ev45" |
| 12170 | .IP "\fB21064\fR" 4 |
| 12171 | .IX Item "21064" |
| 12172 | .PD |
| 12173 | Schedules as an \s-1EV4\s0 and has no instruction set extensions. |
| 12174 | .IP "\fBev5\fR" 4 |
| 12175 | .IX Item "ev5" |
| 12176 | .PD 0 |
| 12177 | .IP "\fB21164\fR" 4 |
| 12178 | .IX Item "21164" |
| 12179 | .PD |
| 12180 | Schedules as an \s-1EV5\s0 and has no instruction set extensions. |
| 12181 | .IP "\fBev56\fR" 4 |
| 12182 | .IX Item "ev56" |
| 12183 | .PD 0 |
| 12184 | .IP "\fB21164a\fR" 4 |
| 12185 | .IX Item "21164a" |
| 12186 | .PD |
| 12187 | Schedules as an \s-1EV5\s0 and supports the \s-1BWX\s0 extension. |
| 12188 | .IP "\fBpca56\fR" 4 |
| 12189 | .IX Item "pca56" |
| 12190 | .PD 0 |
| 12191 | .IP "\fB21164pc\fR" 4 |
| 12192 | .IX Item "21164pc" |
| 12193 | .IP "\fB21164PC\fR" 4 |
| 12194 | .IX Item "21164PC" |
| 12195 | .PD |
| 12196 | Schedules as an \s-1EV5\s0 and supports the \s-1BWX\s0 and \s-1MAX\s0 extensions. |
| 12197 | .IP "\fBev6\fR" 4 |
| 12198 | .IX Item "ev6" |
| 12199 | .PD 0 |
| 12200 | .IP "\fB21264\fR" 4 |
| 12201 | .IX Item "21264" |
| 12202 | .PD |
| 12203 | Schedules as an \s-1EV6\s0 and supports the \s-1BWX\s0, \s-1FIX\s0, and \s-1MAX\s0 extensions. |
| 12204 | .IP "\fBev67\fR" 4 |
| 12205 | .IX Item "ev67" |
| 12206 | .PD 0 |
| 12207 | .IP "\fB21264a\fR" 4 |
| 12208 | .IX Item "21264a" |
| 12209 | .PD |
| 12210 | Schedules as an \s-1EV6\s0 and supports the \s-1BWX\s0, \s-1CIX\s0, \s-1FIX\s0, and \s-1MAX\s0 extensions. |
| 12211 | .RE |
| 12212 | .RS 4 |
| 12213 | .Sp |
| 12214 | Native toolchains also support the value \fBnative\fR, |
| 12215 | which selects the best architecture option for the host processor. |
| 12216 | \&\fB\-mcpu=native\fR has no effect if \s-1GCC\s0 does not recognize |
| 12217 | the processor. |
| 12218 | .RE |
| 12219 | .IP "\fB\-mtune=\fR\fIcpu_type\fR" 4 |
| 12220 | .IX Item "-mtune=cpu_type" |
| 12221 | Set only the instruction scheduling parameters for machine type |
| 12222 | \&\fIcpu_type\fR. The instruction set is not changed. |
| 12223 | .Sp |
| 12224 | Native toolchains also support the value \fBnative\fR, |
| 12225 | which selects the best architecture option for the host processor. |
| 12226 | \&\fB\-mtune=native\fR has no effect if \s-1GCC\s0 does not recognize |
| 12227 | the processor. |
| 12228 | .IP "\fB\-mmemory\-latency=\fR\fItime\fR" 4 |
| 12229 | .IX Item "-mmemory-latency=time" |
| 12230 | Sets the latency the scheduler should assume for typical memory |
| 12231 | references as seen by the application. This number is highly |
| 12232 | dependent on the memory access patterns used by the application |
| 12233 | and the size of the external cache on the machine. |
| 12234 | .Sp |
| 12235 | Valid options for \fItime\fR are |
| 12236 | .RS 4 |
| 12237 | .IP "\fInumber\fR" 4 |
| 12238 | .IX Item "number" |
| 12239 | A decimal number representing clock cycles. |
| 12240 | .IP "\fBL1\fR" 4 |
| 12241 | .IX Item "L1" |
| 12242 | .PD 0 |
| 12243 | .IP "\fBL2\fR" 4 |
| 12244 | .IX Item "L2" |
| 12245 | .IP "\fBL3\fR" 4 |
| 12246 | .IX Item "L3" |
| 12247 | .IP "\fBmain\fR" 4 |
| 12248 | .IX Item "main" |
| 12249 | .PD |
| 12250 | The compiler contains estimates of the number of clock cycles for |
| 12251 | \&\*(L"typical\*(R" \s-1EV4\s0 & \s-1EV5\s0 hardware for the Level 1, 2 & 3 caches |
| 12252 | (also called Dcache, Scache, and Bcache), as well as to main memory. |
| 12253 | Note that L3 is only valid for \s-1EV5\s0. |
| 12254 | .RE |
| 12255 | .RS 4 |
| 12256 | .RE |
| 12257 | .PP |
| 12258 | \fI\s-1FR30\s0 Options\fR |
| 12259 | .IX Subsection "FR30 Options" |
| 12260 | .PP |
| 12261 | These options are defined specifically for the \s-1FR30\s0 port. |
| 12262 | .IP "\fB\-msmall\-model\fR" 4 |
| 12263 | .IX Item "-msmall-model" |
| 12264 | Use the small address space model. This can produce smaller code, but |
| 12265 | it does assume that all symbolic values and addresses fit into a |
| 12266 | 20\-bit range. |
| 12267 | .IP "\fB\-mno\-lsim\fR" 4 |
| 12268 | .IX Item "-mno-lsim" |
| 12269 | Assume that runtime support has been provided and so there is no need |
| 12270 | to include the simulator library (\fIlibsim.a\fR) on the linker |
| 12271 | command line. |
| 12272 | .PP |
| 12273 | \fI\s-1FRV\s0 Options\fR |
| 12274 | .IX Subsection "FRV Options" |
| 12275 | .IP "\fB\-mgpr\-32\fR" 4 |
| 12276 | .IX Item "-mgpr-32" |
| 12277 | Only use the first 32 general-purpose registers. |
| 12278 | .IP "\fB\-mgpr\-64\fR" 4 |
| 12279 | .IX Item "-mgpr-64" |
| 12280 | Use all 64 general-purpose registers. |
| 12281 | .IP "\fB\-mfpr\-32\fR" 4 |
| 12282 | .IX Item "-mfpr-32" |
| 12283 | Use only the first 32 floating-point registers. |
| 12284 | .IP "\fB\-mfpr\-64\fR" 4 |
| 12285 | .IX Item "-mfpr-64" |
| 12286 | Use all 64 floating-point registers. |
| 12287 | .IP "\fB\-mhard\-float\fR" 4 |
| 12288 | .IX Item "-mhard-float" |
| 12289 | Use hardware instructions for floating-point operations. |
| 12290 | .IP "\fB\-msoft\-float\fR" 4 |
| 12291 | .IX Item "-msoft-float" |
| 12292 | Use library routines for floating-point operations. |
| 12293 | .IP "\fB\-malloc\-cc\fR" 4 |
| 12294 | .IX Item "-malloc-cc" |
| 12295 | Dynamically allocate condition code registers. |
| 12296 | .IP "\fB\-mfixed\-cc\fR" 4 |
| 12297 | .IX Item "-mfixed-cc" |
| 12298 | Do not try to dynamically allocate condition code registers, only |
| 12299 | use \f(CW\*(C`icc0\*(C'\fR and \f(CW\*(C`fcc0\*(C'\fR. |
| 12300 | .IP "\fB\-mdword\fR" 4 |
| 12301 | .IX Item "-mdword" |
| 12302 | Change \s-1ABI\s0 to use double word insns. |
| 12303 | .IP "\fB\-mno\-dword\fR" 4 |
| 12304 | .IX Item "-mno-dword" |
| 12305 | Do not use double word instructions. |
| 12306 | .IP "\fB\-mdouble\fR" 4 |
| 12307 | .IX Item "-mdouble" |
| 12308 | Use floating-point double instructions. |
| 12309 | .IP "\fB\-mno\-double\fR" 4 |
| 12310 | .IX Item "-mno-double" |
| 12311 | Do not use floating-point double instructions. |
| 12312 | .IP "\fB\-mmedia\fR" 4 |
| 12313 | .IX Item "-mmedia" |
| 12314 | Use media instructions. |
| 12315 | .IP "\fB\-mno\-media\fR" 4 |
| 12316 | .IX Item "-mno-media" |
| 12317 | Do not use media instructions. |
| 12318 | .IP "\fB\-mmuladd\fR" 4 |
| 12319 | .IX Item "-mmuladd" |
| 12320 | Use multiply and add/subtract instructions. |
| 12321 | .IP "\fB\-mno\-muladd\fR" 4 |
| 12322 | .IX Item "-mno-muladd" |
| 12323 | Do not use multiply and add/subtract instructions. |
| 12324 | .IP "\fB\-mfdpic\fR" 4 |
| 12325 | .IX Item "-mfdpic" |
| 12326 | Select the \s-1FDPIC\s0 \s-1ABI\s0, which uses function descriptors to represent |
| 12327 | pointers to functions. Without any PIC/PIE\-related options, it |
| 12328 | implies \fB\-fPIE\fR. With \fB\-fpic\fR or \fB\-fpie\fR, it |
| 12329 | assumes \s-1GOT\s0 entries and small data are within a 12\-bit range from the |
| 12330 | \&\s-1GOT\s0 base address; with \fB\-fPIC\fR or \fB\-fPIE\fR, \s-1GOT\s0 offsets |
| 12331 | are computed with 32 bits. |
| 12332 | With a \fBbfin-elf\fR target, this option implies \fB\-msim\fR. |
| 12333 | .IP "\fB\-minline\-plt\fR" 4 |
| 12334 | .IX Item "-minline-plt" |
| 12335 | Enable inlining of \s-1PLT\s0 entries in function calls to functions that are |
| 12336 | not known to bind locally. It has no effect without \fB\-mfdpic\fR. |
| 12337 | It's enabled by default if optimizing for speed and compiling for |
| 12338 | shared libraries (i.e., \fB\-fPIC\fR or \fB\-fpic\fR), or when an |
| 12339 | optimization option such as \fB\-O3\fR or above is present in the |
| 12340 | command line. |
| 12341 | .IP "\fB\-mTLS\fR" 4 |
| 12342 | .IX Item "-mTLS" |
| 12343 | Assume a large \s-1TLS\s0 segment when generating thread-local code. |
| 12344 | .IP "\fB\-mtls\fR" 4 |
| 12345 | .IX Item "-mtls" |
| 12346 | Do not assume a large \s-1TLS\s0 segment when generating thread-local code. |
| 12347 | .IP "\fB\-mgprel\-ro\fR" 4 |
| 12348 | .IX Item "-mgprel-ro" |
| 12349 | Enable the use of \f(CW\*(C`GPREL\*(C'\fR relocations in the \s-1FDPIC\s0 \s-1ABI\s0 for data |
| 12350 | that is known to be in read-only sections. It's enabled by default, |
| 12351 | except for \fB\-fpic\fR or \fB\-fpie\fR: even though it may help |
| 12352 | make the global offset table smaller, it trades 1 instruction for 4. |
| 12353 | With \fB\-fPIC\fR or \fB\-fPIE\fR, it trades 3 instructions for 4, |
| 12354 | one of which may be shared by multiple symbols, and it avoids the need |
| 12355 | for a \s-1GOT\s0 entry for the referenced symbol, so it's more likely to be a |
| 12356 | win. If it is not, \fB\-mno\-gprel\-ro\fR can be used to disable it. |
| 12357 | .IP "\fB\-multilib\-library\-pic\fR" 4 |
| 12358 | .IX Item "-multilib-library-pic" |
| 12359 | Link with the (library, not \s-1FD\s0) pic libraries. It's implied by |
| 12360 | \&\fB\-mlibrary\-pic\fR, as well as by \fB\-fPIC\fR and |
| 12361 | \&\fB\-fpic\fR without \fB\-mfdpic\fR. You should never have to use |
| 12362 | it explicitly. |
| 12363 | .IP "\fB\-mlinked\-fp\fR" 4 |
| 12364 | .IX Item "-mlinked-fp" |
| 12365 | Follow the \s-1EABI\s0 requirement of always creating a frame pointer whenever |
| 12366 | a stack frame is allocated. This option is enabled by default and can |
| 12367 | be disabled with \fB\-mno\-linked\-fp\fR. |
| 12368 | .IP "\fB\-mlong\-calls\fR" 4 |
| 12369 | .IX Item "-mlong-calls" |
| 12370 | Use indirect addressing to call functions outside the current |
| 12371 | compilation unit. This allows the functions to be placed anywhere |
| 12372 | within the 32\-bit address space. |
| 12373 | .IP "\fB\-malign\-labels\fR" 4 |
| 12374 | .IX Item "-malign-labels" |
| 12375 | Try to align labels to an 8\-byte boundary by inserting NOPs into the |
| 12376 | previous packet. This option only has an effect when \s-1VLIW\s0 packing |
| 12377 | is enabled. It doesn't create new packets; it merely adds NOPs to |
| 12378 | existing ones. |
| 12379 | .IP "\fB\-mlibrary\-pic\fR" 4 |
| 12380 | .IX Item "-mlibrary-pic" |
| 12381 | Generate position-independent \s-1EABI\s0 code. |
| 12382 | .IP "\fB\-macc\-4\fR" 4 |
| 12383 | .IX Item "-macc-4" |
| 12384 | Use only the first four media accumulator registers. |
| 12385 | .IP "\fB\-macc\-8\fR" 4 |
| 12386 | .IX Item "-macc-8" |
| 12387 | Use all eight media accumulator registers. |
| 12388 | .IP "\fB\-mpack\fR" 4 |
| 12389 | .IX Item "-mpack" |
| 12390 | Pack \s-1VLIW\s0 instructions. |
| 12391 | .IP "\fB\-mno\-pack\fR" 4 |
| 12392 | .IX Item "-mno-pack" |
| 12393 | Do not pack \s-1VLIW\s0 instructions. |
| 12394 | .IP "\fB\-mno\-eflags\fR" 4 |
| 12395 | .IX Item "-mno-eflags" |
| 12396 | Do not mark \s-1ABI\s0 switches in e_flags. |
| 12397 | .IP "\fB\-mcond\-move\fR" 4 |
| 12398 | .IX Item "-mcond-move" |
| 12399 | Enable the use of conditional-move instructions (default). |
| 12400 | .Sp |
| 12401 | This switch is mainly for debugging the compiler and will likely be removed |
| 12402 | in a future version. |
| 12403 | .IP "\fB\-mno\-cond\-move\fR" 4 |
| 12404 | .IX Item "-mno-cond-move" |
| 12405 | Disable the use of conditional-move instructions. |
| 12406 | .Sp |
| 12407 | This switch is mainly for debugging the compiler and will likely be removed |
| 12408 | in a future version. |
| 12409 | .IP "\fB\-mscc\fR" 4 |
| 12410 | .IX Item "-mscc" |
| 12411 | Enable the use of conditional set instructions (default). |
| 12412 | .Sp |
| 12413 | This switch is mainly for debugging the compiler and will likely be removed |
| 12414 | in a future version. |
| 12415 | .IP "\fB\-mno\-scc\fR" 4 |
| 12416 | .IX Item "-mno-scc" |
| 12417 | Disable the use of conditional set instructions. |
| 12418 | .Sp |
| 12419 | This switch is mainly for debugging the compiler and will likely be removed |
| 12420 | in a future version. |
| 12421 | .IP "\fB\-mcond\-exec\fR" 4 |
| 12422 | .IX Item "-mcond-exec" |
| 12423 | Enable the use of conditional execution (default). |
| 12424 | .Sp |
| 12425 | This switch is mainly for debugging the compiler and will likely be removed |
| 12426 | in a future version. |
| 12427 | .IP "\fB\-mno\-cond\-exec\fR" 4 |
| 12428 | .IX Item "-mno-cond-exec" |
| 12429 | Disable the use of conditional execution. |
| 12430 | .Sp |
| 12431 | This switch is mainly for debugging the compiler and will likely be removed |
| 12432 | in a future version. |
| 12433 | .IP "\fB\-mvliw\-branch\fR" 4 |
| 12434 | .IX Item "-mvliw-branch" |
| 12435 | Run a pass to pack branches into \s-1VLIW\s0 instructions (default). |
| 12436 | .Sp |
| 12437 | This switch is mainly for debugging the compiler and will likely be removed |
| 12438 | in a future version. |
| 12439 | .IP "\fB\-mno\-vliw\-branch\fR" 4 |
| 12440 | .IX Item "-mno-vliw-branch" |
| 12441 | Do not run a pass to pack branches into \s-1VLIW\s0 instructions. |
| 12442 | .Sp |
| 12443 | This switch is mainly for debugging the compiler and will likely be removed |
| 12444 | in a future version. |
| 12445 | .IP "\fB\-mmulti\-cond\-exec\fR" 4 |
| 12446 | .IX Item "-mmulti-cond-exec" |
| 12447 | Enable optimization of \f(CW\*(C`&&\*(C'\fR and \f(CW\*(C`||\*(C'\fR in conditional execution |
| 12448 | (default). |
| 12449 | .Sp |
| 12450 | This switch is mainly for debugging the compiler and will likely be removed |
| 12451 | in a future version. |
| 12452 | .IP "\fB\-mno\-multi\-cond\-exec\fR" 4 |
| 12453 | .IX Item "-mno-multi-cond-exec" |
| 12454 | Disable optimization of \f(CW\*(C`&&\*(C'\fR and \f(CW\*(C`||\*(C'\fR in conditional execution. |
| 12455 | .Sp |
| 12456 | This switch is mainly for debugging the compiler and will likely be removed |
| 12457 | in a future version. |
| 12458 | .IP "\fB\-mnested\-cond\-exec\fR" 4 |
| 12459 | .IX Item "-mnested-cond-exec" |
| 12460 | Enable nested conditional execution optimizations (default). |
| 12461 | .Sp |
| 12462 | This switch is mainly for debugging the compiler and will likely be removed |
| 12463 | in a future version. |
| 12464 | .IP "\fB\-mno\-nested\-cond\-exec\fR" 4 |
| 12465 | .IX Item "-mno-nested-cond-exec" |
| 12466 | Disable nested conditional execution optimizations. |
| 12467 | .Sp |
| 12468 | This switch is mainly for debugging the compiler and will likely be removed |
| 12469 | in a future version. |
| 12470 | .IP "\fB\-moptimize\-membar\fR" 4 |
| 12471 | .IX Item "-moptimize-membar" |
| 12472 | This switch removes redundant \f(CW\*(C`membar\*(C'\fR instructions from the |
| 12473 | compiler-generated code. It is enabled by default. |
| 12474 | .IP "\fB\-mno\-optimize\-membar\fR" 4 |
| 12475 | .IX Item "-mno-optimize-membar" |
| 12476 | This switch disables the automatic removal of redundant \f(CW\*(C`membar\*(C'\fR |
| 12477 | instructions from the generated code. |
| 12478 | .IP "\fB\-mtomcat\-stats\fR" 4 |
| 12479 | .IX Item "-mtomcat-stats" |
| 12480 | Cause gas to print out tomcat statistics. |
| 12481 | .IP "\fB\-mcpu=\fR\fIcpu\fR" 4 |
| 12482 | .IX Item "-mcpu=cpu" |
| 12483 | Select the processor type for which to generate code. Possible values are |
| 12484 | \&\fBfrv\fR, \fBfr550\fR, \fBtomcat\fR, \fBfr500\fR, \fBfr450\fR, |
| 12485 | \&\fBfr405\fR, \fBfr400\fR, \fBfr300\fR and \fBsimple\fR. |
| 12486 | .PP |
| 12487 | \fIGNU/Linux Options\fR |
| 12488 | .IX Subsection "GNU/Linux Options" |
| 12489 | .PP |
| 12490 | These \fB\-m\fR options are defined for GNU/Linux targets: |
| 12491 | .IP "\fB\-mglibc\fR" 4 |
| 12492 | .IX Item "-mglibc" |
| 12493 | Use the \s-1GNU\s0 C library. This is the default except |
| 12494 | on \fB*\-*\-linux\-*uclibc*\fR and \fB*\-*\-linux\-*android*\fR targets. |
| 12495 | .IP "\fB\-muclibc\fR" 4 |
| 12496 | .IX Item "-muclibc" |
| 12497 | Use uClibc C library. This is the default on |
| 12498 | \&\fB*\-*\-linux\-*uclibc*\fR targets. |
| 12499 | .IP "\fB\-mbionic\fR" 4 |
| 12500 | .IX Item "-mbionic" |
| 12501 | Use Bionic C library. This is the default on |
| 12502 | \&\fB*\-*\-linux\-*android*\fR targets. |
| 12503 | .IP "\fB\-mandroid\fR" 4 |
| 12504 | .IX Item "-mandroid" |
| 12505 | Compile code compatible with Android platform. This is the default on |
| 12506 | \&\fB*\-*\-linux\-*android*\fR targets. |
| 12507 | .Sp |
| 12508 | When compiling, this option enables \fB\-mbionic\fR, \fB\-fPIC\fR, |
| 12509 | \&\fB\-fno\-exceptions\fR and \fB\-fno\-rtti\fR by default. When linking, |
| 12510 | this option makes the \s-1GCC\s0 driver pass Android-specific options to the linker. |
| 12511 | Finally, this option causes the preprocessor macro \f(CW\*(C`_\|_ANDROID_\|_\*(C'\fR |
| 12512 | to be defined. |
| 12513 | .IP "\fB\-tno\-android\-cc\fR" 4 |
| 12514 | .IX Item "-tno-android-cc" |
| 12515 | Disable compilation effects of \fB\-mandroid\fR, i.e., do not enable |
| 12516 | \&\fB\-mbionic\fR, \fB\-fPIC\fR, \fB\-fno\-exceptions\fR and |
| 12517 | \&\fB\-fno\-rtti\fR by default. |
| 12518 | .IP "\fB\-tno\-android\-ld\fR" 4 |
| 12519 | .IX Item "-tno-android-ld" |
| 12520 | Disable linking effects of \fB\-mandroid\fR, i.e., pass standard Linux |
| 12521 | linking options to the linker. |
| 12522 | .PP |
| 12523 | \fIH8/300 Options\fR |
| 12524 | .IX Subsection "H8/300 Options" |
| 12525 | .PP |
| 12526 | These \fB\-m\fR options are defined for the H8/300 implementations: |
| 12527 | .IP "\fB\-mrelax\fR" 4 |
| 12528 | .IX Item "-mrelax" |
| 12529 | Shorten some address references at link time, when possible; uses the |
| 12530 | linker option \fB\-relax\fR. |
| 12531 | .IP "\fB\-mh\fR" 4 |
| 12532 | .IX Item "-mh" |
| 12533 | Generate code for the H8/300H. |
| 12534 | .IP "\fB\-ms\fR" 4 |
| 12535 | .IX Item "-ms" |
| 12536 | Generate code for the H8S. |
| 12537 | .IP "\fB\-mn\fR" 4 |
| 12538 | .IX Item "-mn" |
| 12539 | Generate code for the H8S and H8/300H in the normal mode. This switch |
| 12540 | must be used either with \fB\-mh\fR or \fB\-ms\fR. |
| 12541 | .IP "\fB\-ms2600\fR" 4 |
| 12542 | .IX Item "-ms2600" |
| 12543 | Generate code for the H8S/2600. This switch must be used with \fB\-ms\fR. |
| 12544 | .IP "\fB\-mexr\fR" 4 |
| 12545 | .IX Item "-mexr" |
| 12546 | Extended registers are stored on stack before execution of function |
| 12547 | with monitor attribute. Default option is \fB\-mexr\fR. |
| 12548 | This option is valid only for H8S targets. |
| 12549 | .IP "\fB\-mno\-exr\fR" 4 |
| 12550 | .IX Item "-mno-exr" |
| 12551 | Extended registers are not stored on stack before execution of function |
| 12552 | with monitor attribute. Default option is \fB\-mno\-exr\fR. |
| 12553 | This option is valid only for H8S targets. |
| 12554 | .IP "\fB\-mint32\fR" 4 |
| 12555 | .IX Item "-mint32" |
| 12556 | Make \f(CW\*(C`int\*(C'\fR data 32 bits by default. |
| 12557 | .IP "\fB\-malign\-300\fR" 4 |
| 12558 | .IX Item "-malign-300" |
| 12559 | On the H8/300H and H8S, use the same alignment rules as for the H8/300. |
| 12560 | The default for the H8/300H and H8S is to align longs and floats on |
| 12561 | 4\-byte boundaries. |
| 12562 | \&\fB\-malign\-300\fR causes them to be aligned on 2\-byte boundaries. |
| 12563 | This option has no effect on the H8/300. |
| 12564 | .PP |
| 12565 | \fI\s-1HPPA\s0 Options\fR |
| 12566 | .IX Subsection "HPPA Options" |
| 12567 | .PP |
| 12568 | These \fB\-m\fR options are defined for the \s-1HPPA\s0 family of computers: |
| 12569 | .IP "\fB\-march=\fR\fIarchitecture-type\fR" 4 |
| 12570 | .IX Item "-march=architecture-type" |
| 12571 | Generate code for the specified architecture. The choices for |
| 12572 | \&\fIarchitecture-type\fR are \fB1.0\fR for \s-1PA\s0 1.0, \fB1.1\fR for \s-1PA\s0 |
| 12573 | 1.1, and \fB2.0\fR for \s-1PA\s0 2.0 processors. Refer to |
| 12574 | \&\fI/usr/lib/sched.models\fR on an HP-UX system to determine the proper |
| 12575 | architecture option for your machine. Code compiled for lower numbered |
| 12576 | architectures runs on higher numbered architectures, but not the |
| 12577 | other way around. |
| 12578 | .IP "\fB\-mpa\-risc\-1\-0\fR" 4 |
| 12579 | .IX Item "-mpa-risc-1-0" |
| 12580 | .PD 0 |
| 12581 | .IP "\fB\-mpa\-risc\-1\-1\fR" 4 |
| 12582 | .IX Item "-mpa-risc-1-1" |
| 12583 | .IP "\fB\-mpa\-risc\-2\-0\fR" 4 |
| 12584 | .IX Item "-mpa-risc-2-0" |
| 12585 | .PD |
| 12586 | Synonyms for \fB\-march=1.0\fR, \fB\-march=1.1\fR, and \fB\-march=2.0\fR respectively. |
| 12587 | .IP "\fB\-mbig\-switch\fR" 4 |
| 12588 | .IX Item "-mbig-switch" |
| 12589 | Generate code suitable for big switch tables. Use this option only if |
| 12590 | the assembler/linker complain about out-of-range branches within a switch |
| 12591 | table. |
| 12592 | .IP "\fB\-mjump\-in\-delay\fR" 4 |
| 12593 | .IX Item "-mjump-in-delay" |
| 12594 | Fill delay slots of function calls with unconditional jump instructions |
| 12595 | by modifying the return pointer for the function call to be the target |
| 12596 | of the conditional jump. |
| 12597 | .IP "\fB\-mdisable\-fpregs\fR" 4 |
| 12598 | .IX Item "-mdisable-fpregs" |
| 12599 | Prevent floating-point registers from being used in any manner. This is |
| 12600 | necessary for compiling kernels that perform lazy context switching of |
| 12601 | floating-point registers. If you use this option and attempt to perform |
| 12602 | floating-point operations, the compiler aborts. |
| 12603 | .IP "\fB\-mdisable\-indexing\fR" 4 |
| 12604 | .IX Item "-mdisable-indexing" |
| 12605 | Prevent the compiler from using indexing address modes. This avoids some |
| 12606 | rather obscure problems when compiling \s-1MIG\s0 generated code under \s-1MACH\s0. |
| 12607 | .IP "\fB\-mno\-space\-regs\fR" 4 |
| 12608 | .IX Item "-mno-space-regs" |
| 12609 | Generate code that assumes the target has no space registers. This allows |
| 12610 | \&\s-1GCC\s0 to generate faster indirect calls and use unscaled index address modes. |
| 12611 | .Sp |
| 12612 | Such code is suitable for level 0 \s-1PA\s0 systems and kernels. |
| 12613 | .IP "\fB\-mfast\-indirect\-calls\fR" 4 |
| 12614 | .IX Item "-mfast-indirect-calls" |
| 12615 | Generate code that assumes calls never cross space boundaries. This |
| 12616 | allows \s-1GCC\s0 to emit code that performs faster indirect calls. |
| 12617 | .Sp |
| 12618 | This option does not work in the presence of shared libraries or nested |
| 12619 | functions. |
| 12620 | .IP "\fB\-mfixed\-range=\fR\fIregister-range\fR" 4 |
| 12621 | .IX Item "-mfixed-range=register-range" |
| 12622 | Generate code treating the given register range as fixed registers. |
| 12623 | A fixed register is one that the register allocator cannot use. This is |
| 12624 | useful when compiling kernel code. A register range is specified as |
| 12625 | two registers separated by a dash. Multiple register ranges can be |
| 12626 | specified separated by a comma. |
| 12627 | .IP "\fB\-mlong\-load\-store\fR" 4 |
| 12628 | .IX Item "-mlong-load-store" |
| 12629 | Generate 3\-instruction load and store sequences as sometimes required by |
| 12630 | the HP-UX 10 linker. This is equivalent to the \fB+k\fR option to |
| 12631 | the \s-1HP\s0 compilers. |
| 12632 | .IP "\fB\-mportable\-runtime\fR" 4 |
| 12633 | .IX Item "-mportable-runtime" |
| 12634 | Use the portable calling conventions proposed by \s-1HP\s0 for \s-1ELF\s0 systems. |
| 12635 | .IP "\fB\-mgas\fR" 4 |
| 12636 | .IX Item "-mgas" |
| 12637 | Enable the use of assembler directives only \s-1GAS\s0 understands. |
| 12638 | .IP "\fB\-mschedule=\fR\fIcpu-type\fR" 4 |
| 12639 | .IX Item "-mschedule=cpu-type" |
| 12640 | Schedule code according to the constraints for the machine type |
| 12641 | \&\fIcpu-type\fR. The choices for \fIcpu-type\fR are \fB700\fR |
| 12642 | \&\fB7100\fR, \fB7100LC\fR, \fB7200\fR, \fB7300\fR and \fB8000\fR. Refer |
| 12643 | to \fI/usr/lib/sched.models\fR on an HP-UX system to determine the |
| 12644 | proper scheduling option for your machine. The default scheduling is |
| 12645 | \&\fB8000\fR. |
| 12646 | .IP "\fB\-mlinker\-opt\fR" 4 |
| 12647 | .IX Item "-mlinker-opt" |
| 12648 | Enable the optimization pass in the HP-UX linker. Note this makes symbolic |
| 12649 | debugging impossible. It also triggers a bug in the HP-UX 8 and HP-UX 9 |
| 12650 | linkers in which they give bogus error messages when linking some programs. |
| 12651 | .IP "\fB\-msoft\-float\fR" 4 |
| 12652 | .IX Item "-msoft-float" |
| 12653 | Generate output containing library calls for floating point. |
| 12654 | \&\fBWarning:\fR the requisite libraries are not available for all \s-1HPPA\s0 |
| 12655 | targets. Normally the facilities of the machine's usual C compiler are |
| 12656 | used, but this cannot be done directly in cross-compilation. You must make |
| 12657 | your own arrangements to provide suitable library functions for |
| 12658 | cross-compilation. |
| 12659 | .Sp |
| 12660 | \&\fB\-msoft\-float\fR changes the calling convention in the output file; |
| 12661 | therefore, it is only useful if you compile \fIall\fR of a program with |
| 12662 | this option. In particular, you need to compile \fIlibgcc.a\fR, the |
| 12663 | library that comes with \s-1GCC\s0, with \fB\-msoft\-float\fR in order for |
| 12664 | this to work. |
| 12665 | .IP "\fB\-msio\fR" 4 |
| 12666 | .IX Item "-msio" |
| 12667 | Generate the predefine, \f(CW\*(C`_SIO\*(C'\fR, for server \s-1IO\s0. The default is |
| 12668 | \&\fB\-mwsio\fR. This generates the predefines, \f(CW\*(C`_\|_hp9000s700\*(C'\fR, |
| 12669 | \&\f(CW\*(C`_\|_hp9000s700_\|_\*(C'\fR and \f(CW\*(C`_WSIO\*(C'\fR, for workstation \s-1IO\s0. These |
| 12670 | options are available under HP-UX and HI-UX. |
| 12671 | .IP "\fB\-mgnu\-ld\fR" 4 |
| 12672 | .IX Item "-mgnu-ld" |
| 12673 | Use options specific to \s-1GNU\s0 \fBld\fR. |
| 12674 | This passes \fB\-shared\fR to \fBld\fR when |
| 12675 | building a shared library. It is the default when \s-1GCC\s0 is configured, |
| 12676 | explicitly or implicitly, with the \s-1GNU\s0 linker. This option does not |
| 12677 | affect which \fBld\fR is called; it only changes what parameters |
| 12678 | are passed to that \fBld\fR. |
| 12679 | The \fBld\fR that is called is determined by the |
| 12680 | \&\fB\-\-with\-ld\fR configure option, \s-1GCC\s0's program search path, and |
| 12681 | finally by the user's \fB\s-1PATH\s0\fR. The linker used by \s-1GCC\s0 can be printed |
| 12682 | using \fBwhich `gcc \-print\-prog\-name=ld`\fR. This option is only available |
| 12683 | on the 64\-bit HP-UX \s-1GCC\s0, i.e. configured with \fBhppa*64*\-*\-hpux*\fR. |
| 12684 | .IP "\fB\-mhp\-ld\fR" 4 |
| 12685 | .IX Item "-mhp-ld" |
| 12686 | Use options specific to \s-1HP\s0 \fBld\fR. |
| 12687 | This passes \fB\-b\fR to \fBld\fR when building |
| 12688 | a shared library and passes \fB+Accept TypeMismatch\fR to \fBld\fR on all |
| 12689 | links. It is the default when \s-1GCC\s0 is configured, explicitly or |
| 12690 | implicitly, with the \s-1HP\s0 linker. This option does not affect |
| 12691 | which \fBld\fR is called; it only changes what parameters are passed to that |
| 12692 | \&\fBld\fR. |
| 12693 | The \fBld\fR that is called is determined by the \fB\-\-with\-ld\fR |
| 12694 | configure option, \s-1GCC\s0's program search path, and finally by the user's |
| 12695 | \&\fB\s-1PATH\s0\fR. The linker used by \s-1GCC\s0 can be printed using \fBwhich |
| 12696 | `gcc \-print\-prog\-name=ld`\fR. This option is only available on the 64\-bit |
| 12697 | HP-UX \s-1GCC\s0, i.e. configured with \fBhppa*64*\-*\-hpux*\fR. |
| 12698 | .IP "\fB\-mlong\-calls\fR" 4 |
| 12699 | .IX Item "-mlong-calls" |
| 12700 | Generate code that uses long call sequences. This ensures that a call |
| 12701 | is always able to reach linker generated stubs. The default is to generate |
| 12702 | long calls only when the distance from the call site to the beginning |
| 12703 | of the function or translation unit, as the case may be, exceeds a |
| 12704 | predefined limit set by the branch type being used. The limits for |
| 12705 | normal calls are 7,600,000 and 240,000 bytes, respectively for the |
| 12706 | \&\s-1PA\s0 2.0 and \s-1PA\s0 1.X architectures. Sibcalls are always limited at |
| 12707 | 240,000 bytes. |
| 12708 | .Sp |
| 12709 | Distances are measured from the beginning of functions when using the |
| 12710 | \&\fB\-ffunction\-sections\fR option, or when using the \fB\-mgas\fR |
| 12711 | and \fB\-mno\-portable\-runtime\fR options together under HP-UX with |
| 12712 | the \s-1SOM\s0 linker. |
| 12713 | .Sp |
| 12714 | It is normally not desirable to use this option as it degrades |
| 12715 | performance. However, it may be useful in large applications, |
| 12716 | particularly when partial linking is used to build the application. |
| 12717 | .Sp |
| 12718 | The types of long calls used depends on the capabilities of the |
| 12719 | assembler and linker, and the type of code being generated. The |
| 12720 | impact on systems that support long absolute calls, and long pic |
| 12721 | symbol-difference or pc-relative calls should be relatively small. |
| 12722 | However, an indirect call is used on 32\-bit \s-1ELF\s0 systems in pic code |
| 12723 | and it is quite long. |
| 12724 | .IP "\fB\-munix=\fR\fIunix-std\fR" 4 |
| 12725 | .IX Item "-munix=unix-std" |
| 12726 | Generate compiler predefines and select a startfile for the specified |
| 12727 | \&\s-1UNIX\s0 standard. The choices for \fIunix-std\fR are \fB93\fR, \fB95\fR |
| 12728 | and \fB98\fR. \fB93\fR is supported on all HP-UX versions. \fB95\fR |
| 12729 | is available on HP-UX 10.10 and later. \fB98\fR is available on HP-UX |
| 12730 | 11.11 and later. The default values are \fB93\fR for HP-UX 10.00, |
| 12731 | \&\fB95\fR for HP-UX 10.10 though to 11.00, and \fB98\fR for HP-UX 11.11 |
| 12732 | and later. |
| 12733 | .Sp |
| 12734 | \&\fB\-munix=93\fR provides the same predefines as \s-1GCC\s0 3.3 and 3.4. |
| 12735 | \&\fB\-munix=95\fR provides additional predefines for \f(CW\*(C`XOPEN_UNIX\*(C'\fR |
| 12736 | and \f(CW\*(C`_XOPEN_SOURCE_EXTENDED\*(C'\fR, and the startfile \fIunix95.o\fR. |
| 12737 | \&\fB\-munix=98\fR provides additional predefines for \f(CW\*(C`_XOPEN_UNIX\*(C'\fR, |
| 12738 | \&\f(CW\*(C`_XOPEN_SOURCE_EXTENDED\*(C'\fR, \f(CW\*(C`_INCLUDE_\|_STDC_A1_SOURCE\*(C'\fR and |
| 12739 | \&\f(CW\*(C`_INCLUDE_XOPEN_SOURCE_500\*(C'\fR, and the startfile \fIunix98.o\fR. |
| 12740 | .Sp |
| 12741 | It is \fIimportant\fR to note that this option changes the interfaces |
| 12742 | for various library routines. It also affects the operational behavior |
| 12743 | of the C library. Thus, \fIextreme\fR care is needed in using this |
| 12744 | option. |
| 12745 | .Sp |
| 12746 | Library code that is intended to operate with more than one \s-1UNIX\s0 |
| 12747 | standard must test, set and restore the variable \fI_\|_xpg4_extended_mask\fR |
| 12748 | as appropriate. Most \s-1GNU\s0 software doesn't provide this capability. |
| 12749 | .IP "\fB\-nolibdld\fR" 4 |
| 12750 | .IX Item "-nolibdld" |
| 12751 | Suppress the generation of link options to search libdld.sl when the |
| 12752 | \&\fB\-static\fR option is specified on HP-UX 10 and later. |
| 12753 | .IP "\fB\-static\fR" 4 |
| 12754 | .IX Item "-static" |
| 12755 | The HP-UX implementation of setlocale in libc has a dependency on |
| 12756 | libdld.sl. There isn't an archive version of libdld.sl. Thus, |
| 12757 | when the \fB\-static\fR option is specified, special link options |
| 12758 | are needed to resolve this dependency. |
| 12759 | .Sp |
| 12760 | On HP-UX 10 and later, the \s-1GCC\s0 driver adds the necessary options to |
| 12761 | link with libdld.sl when the \fB\-static\fR option is specified. |
| 12762 | This causes the resulting binary to be dynamic. On the 64\-bit port, |
| 12763 | the linkers generate dynamic binaries by default in any case. The |
| 12764 | \&\fB\-nolibdld\fR option can be used to prevent the \s-1GCC\s0 driver from |
| 12765 | adding these link options. |
| 12766 | .IP "\fB\-threads\fR" 4 |
| 12767 | .IX Item "-threads" |
| 12768 | Add support for multithreading with the \fIdce thread\fR library |
| 12769 | under HP-UX. This option sets flags for both the preprocessor and |
| 12770 | linker. |
| 12771 | .PP |
| 12772 | \fIIntel 386 and \s-1AMD\s0 x86\-64 Options\fR |
| 12773 | .IX Subsection "Intel 386 and AMD x86-64 Options" |
| 12774 | .PP |
| 12775 | These \fB\-m\fR options are defined for the i386 and x86\-64 family of |
| 12776 | computers: |
| 12777 | .IP "\fB\-march=\fR\fIcpu-type\fR" 4 |
| 12778 | .IX Item "-march=cpu-type" |
| 12779 | Generate instructions for the machine type \fIcpu-type\fR. In contrast to |
| 12780 | \&\fB\-mtune=\fR\fIcpu-type\fR, which merely tunes the generated code |
| 12781 | for the specified \fIcpu-type\fR, \fB\-march=\fR\fIcpu-type\fR allows \s-1GCC\s0 |
| 12782 | to generate code that may not run at all on processors other than the one |
| 12783 | indicated. Specifying \fB\-march=\fR\fIcpu-type\fR implies |
| 12784 | \&\fB\-mtune=\fR\fIcpu-type\fR. |
| 12785 | .Sp |
| 12786 | The choices for \fIcpu-type\fR are: |
| 12787 | .RS 4 |
| 12788 | .IP "\fBnative\fR" 4 |
| 12789 | .IX Item "native" |
| 12790 | This selects the \s-1CPU\s0 to generate code for at compilation time by determining |
| 12791 | the processor type of the compiling machine. Using \fB\-march=native\fR |
| 12792 | enables all instruction subsets supported by the local machine (hence |
| 12793 | the result might not run on different machines). Using \fB\-mtune=native\fR |
| 12794 | produces code optimized for the local machine under the constraints |
| 12795 | of the selected instruction set. |
| 12796 | .IP "\fBi386\fR" 4 |
| 12797 | .IX Item "i386" |
| 12798 | Original Intel i386 \s-1CPU\s0. |
| 12799 | .IP "\fBi486\fR" 4 |
| 12800 | .IX Item "i486" |
| 12801 | Intel i486 \s-1CPU\s0. (No scheduling is implemented for this chip.) |
| 12802 | .IP "\fBi586\fR" 4 |
| 12803 | .IX Item "i586" |
| 12804 | .PD 0 |
| 12805 | .IP "\fBpentium\fR" 4 |
| 12806 | .IX Item "pentium" |
| 12807 | .PD |
| 12808 | Intel Pentium \s-1CPU\s0 with no \s-1MMX\s0 support. |
| 12809 | .IP "\fBpentium-mmx\fR" 4 |
| 12810 | .IX Item "pentium-mmx" |
| 12811 | Intel Pentium \s-1MMX\s0 \s-1CPU\s0, based on Pentium core with \s-1MMX\s0 instruction set support. |
| 12812 | .IP "\fBpentiumpro\fR" 4 |
| 12813 | .IX Item "pentiumpro" |
| 12814 | Intel Pentium Pro \s-1CPU\s0. |
| 12815 | .IP "\fBi686\fR" 4 |
| 12816 | .IX Item "i686" |
| 12817 | When used with \fB\-march\fR, the Pentium Pro |
| 12818 | instruction set is used, so the code runs on all i686 family chips. |
| 12819 | When used with \fB\-mtune\fR, it has the same meaning as \fBgeneric\fR. |
| 12820 | .IP "\fBpentium2\fR" 4 |
| 12821 | .IX Item "pentium2" |
| 12822 | Intel Pentium \s-1II\s0 \s-1CPU\s0, based on Pentium Pro core with \s-1MMX\s0 instruction set |
| 12823 | support. |
| 12824 | .IP "\fBpentium3\fR" 4 |
| 12825 | .IX Item "pentium3" |
| 12826 | .PD 0 |
| 12827 | .IP "\fBpentium3m\fR" 4 |
| 12828 | .IX Item "pentium3m" |
| 12829 | .PD |
| 12830 | Intel Pentium \s-1III\s0 \s-1CPU\s0, based on Pentium Pro core with \s-1MMX\s0 and \s-1SSE\s0 instruction |
| 12831 | set support. |
| 12832 | .IP "\fBpentium-m\fR" 4 |
| 12833 | .IX Item "pentium-m" |
| 12834 | Intel Pentium M; low-power version of Intel Pentium \s-1III\s0 \s-1CPU\s0 |
| 12835 | with \s-1MMX\s0, \s-1SSE\s0 and \s-1SSE2\s0 instruction set support. Used by Centrino notebooks. |
| 12836 | .IP "\fBpentium4\fR" 4 |
| 12837 | .IX Item "pentium4" |
| 12838 | .PD 0 |
| 12839 | .IP "\fBpentium4m\fR" 4 |
| 12840 | .IX Item "pentium4m" |
| 12841 | .PD |
| 12842 | Intel Pentium 4 \s-1CPU\s0 with \s-1MMX\s0, \s-1SSE\s0 and \s-1SSE2\s0 instruction set support. |
| 12843 | .IP "\fBprescott\fR" 4 |
| 12844 | .IX Item "prescott" |
| 12845 | Improved version of Intel Pentium 4 \s-1CPU\s0 with \s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0 and \s-1SSE3\s0 instruction |
| 12846 | set support. |
| 12847 | .IP "\fBnocona\fR" 4 |
| 12848 | .IX Item "nocona" |
| 12849 | Improved version of Intel Pentium 4 \s-1CPU\s0 with 64\-bit extensions, \s-1MMX\s0, \s-1SSE\s0, |
| 12850 | \&\s-1SSE2\s0 and \s-1SSE3\s0 instruction set support. |
| 12851 | .IP "\fBcore2\fR" 4 |
| 12852 | .IX Item "core2" |
| 12853 | Intel Core 2 \s-1CPU\s0 with 64\-bit extensions, \s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0, \s-1SSE3\s0 and \s-1SSSE3\s0 |
| 12854 | instruction set support. |
| 12855 | .IP "\fBcorei7\fR" 4 |
| 12856 | .IX Item "corei7" |
| 12857 | Intel Core i7 \s-1CPU\s0 with 64\-bit extensions, \s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0, \s-1SSE3\s0, \s-1SSSE3\s0, \s-1SSE4\s0.1 |
| 12858 | and \s-1SSE4\s0.2 instruction set support. |
| 12859 | .IP "\fBcorei7\-avx\fR" 4 |
| 12860 | .IX Item "corei7-avx" |
| 12861 | Intel Core i7 \s-1CPU\s0 with 64\-bit extensions, \s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0, \s-1SSE3\s0, \s-1SSSE3\s0, |
| 12862 | \&\s-1SSE4\s0.1, \s-1SSE4\s0.2, \s-1AVX\s0, \s-1AES\s0 and \s-1PCLMUL\s0 instruction set support. |
| 12863 | .IP "\fBcore-avx-i\fR" 4 |
| 12864 | .IX Item "core-avx-i" |
| 12865 | Intel Core \s-1CPU\s0 with 64\-bit extensions, \s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0, \s-1SSE3\s0, \s-1SSSE3\s0, |
| 12866 | \&\s-1SSE4\s0.1, \s-1SSE4\s0.2, \s-1AVX\s0, \s-1AES\s0, \s-1PCLMUL\s0, \s-1FSGSBASE\s0, \s-1RDRND\s0 and F16C instruction |
| 12867 | set support. |
| 12868 | .IP "\fBatom\fR" 4 |
| 12869 | .IX Item "atom" |
| 12870 | Intel Atom \s-1CPU\s0 with 64\-bit extensions, \s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0, \s-1SSE3\s0 and \s-1SSSE3\s0 |
| 12871 | instruction set support. |
| 12872 | .IP "\fBk6\fR" 4 |
| 12873 | .IX Item "k6" |
| 12874 | \&\s-1AMD\s0 K6 \s-1CPU\s0 with \s-1MMX\s0 instruction set support. |
| 12875 | .IP "\fBk6\-2\fR" 4 |
| 12876 | .IX Item "k6-2" |
| 12877 | .PD 0 |
| 12878 | .IP "\fBk6\-3\fR" 4 |
| 12879 | .IX Item "k6-3" |
| 12880 | .PD |
| 12881 | Improved versions of \s-1AMD\s0 K6 \s-1CPU\s0 with \s-1MMX\s0 and 3DNow! instruction set support. |
| 12882 | .IP "\fBathlon\fR" 4 |
| 12883 | .IX Item "athlon" |
| 12884 | .PD 0 |
| 12885 | .IP "\fBathlon-tbird\fR" 4 |
| 12886 | .IX Item "athlon-tbird" |
| 12887 | .PD |
| 12888 | \&\s-1AMD\s0 Athlon \s-1CPU\s0 with \s-1MMX\s0, 3dNOW!, enhanced 3DNow! and \s-1SSE\s0 prefetch instructions |
| 12889 | support. |
| 12890 | .IP "\fBathlon\-4\fR" 4 |
| 12891 | .IX Item "athlon-4" |
| 12892 | .PD 0 |
| 12893 | .IP "\fBathlon-xp\fR" 4 |
| 12894 | .IX Item "athlon-xp" |
| 12895 | .IP "\fBathlon-mp\fR" 4 |
| 12896 | .IX Item "athlon-mp" |
| 12897 | .PD |
| 12898 | Improved \s-1AMD\s0 Athlon \s-1CPU\s0 with \s-1MMX\s0, 3DNow!, enhanced 3DNow! and full \s-1SSE\s0 |
| 12899 | instruction set support. |
| 12900 | .IP "\fBk8\fR" 4 |
| 12901 | .IX Item "k8" |
| 12902 | .PD 0 |
| 12903 | .IP "\fBopteron\fR" 4 |
| 12904 | .IX Item "opteron" |
| 12905 | .IP "\fBathlon64\fR" 4 |
| 12906 | .IX Item "athlon64" |
| 12907 | .IP "\fBathlon-fx\fR" 4 |
| 12908 | .IX Item "athlon-fx" |
| 12909 | .PD |
| 12910 | Processors based on the \s-1AMD\s0 K8 core with x86\-64 instruction set support, |
| 12911 | including the \s-1AMD\s0 Opteron, Athlon 64, and Athlon 64 \s-1FX\s0 processors. |
| 12912 | (This supersets \s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0, 3DNow!, enhanced 3DNow! and 64\-bit |
| 12913 | instruction set extensions.) |
| 12914 | .IP "\fBk8\-sse3\fR" 4 |
| 12915 | .IX Item "k8-sse3" |
| 12916 | .PD 0 |
| 12917 | .IP "\fBopteron\-sse3\fR" 4 |
| 12918 | .IX Item "opteron-sse3" |
| 12919 | .IP "\fBathlon64\-sse3\fR" 4 |
| 12920 | .IX Item "athlon64-sse3" |
| 12921 | .PD |
| 12922 | Improved versions of \s-1AMD\s0 K8 cores with \s-1SSE3\s0 instruction set support. |
| 12923 | .IP "\fBamdfam10\fR" 4 |
| 12924 | .IX Item "amdfam10" |
| 12925 | .PD 0 |
| 12926 | .IP "\fBbarcelona\fR" 4 |
| 12927 | .IX Item "barcelona" |
| 12928 | .PD |
| 12929 | CPUs based on \s-1AMD\s0 Family 10h cores with x86\-64 instruction set support. (This |
| 12930 | supersets \s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0, \s-1SSE3\s0, \s-1SSE4A\s0, 3DNow!, enhanced 3DNow!, \s-1ABM\s0 and 64\-bit |
| 12931 | instruction set extensions.) |
| 12932 | .IP "\fBbdver1\fR" 4 |
| 12933 | .IX Item "bdver1" |
| 12934 | CPUs based on \s-1AMD\s0 Family 15h cores with x86\-64 instruction set support. (This |
| 12935 | supersets \s-1FMA4\s0, \s-1AVX\s0, \s-1XOP\s0, \s-1LWP\s0, \s-1AES\s0, \s-1PCL_MUL\s0, \s-1CX16\s0, \s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0, \s-1SSE3\s0, \s-1SSE4A\s0, |
| 12936 | \&\s-1SSSE3\s0, \s-1SSE4\s0.1, \s-1SSE4\s0.2, \s-1ABM\s0 and 64\-bit instruction set extensions.) |
| 12937 | .IP "\fBbdver2\fR" 4 |
| 12938 | .IX Item "bdver2" |
| 12939 | \&\s-1AMD\s0 Family 15h core based CPUs with x86\-64 instruction set support. (This |
| 12940 | supersets \s-1BMI\s0, \s-1TBM\s0, F16C, \s-1FMA\s0, \s-1AVX\s0, \s-1XOP\s0, \s-1LWP\s0, \s-1AES\s0, \s-1PCL_MUL\s0, \s-1CX16\s0, \s-1MMX\s0, \s-1SSE\s0, |
| 12941 | \&\s-1SSE2\s0, \s-1SSE3\s0, \s-1SSE4A\s0, \s-1SSSE3\s0, \s-1SSE4\s0.1, \s-1SSE4\s0.2, \s-1ABM\s0 and 64\-bit instruction set |
| 12942 | extensions.) |
| 12943 | .IP "\fBbdver3\fR" 4 |
| 12944 | .IX Item "bdver3" |
| 12945 | \&\s-1AMD\s0 Family 15h core based CPUs with x86\-64 instruction set support. (This |
| 12946 | supersets \s-1BMI\s0, \s-1TBM\s0, F16C, \s-1FMA\s0, \s-1AVX\s0, \s-1XOP\s0, \s-1LWP\s0, \s-1AES\s0, \s-1PCL_MUL\s0, \s-1CX16\s0, \s-1MMX\s0, \s-1SSE\s0, |
| 12947 | \&\s-1SSE2\s0, \s-1SSE3\s0, \s-1SSE4A\s0, \s-1SSSE3\s0, \s-1SSE4\s0.1, \s-1SSE4\s0.2, \s-1ABM\s0 and 64\-bit instruction set |
| 12948 | extensions. |
| 12949 | .IP "\fBbtver1\fR" 4 |
| 12950 | .IX Item "btver1" |
| 12951 | CPUs based on \s-1AMD\s0 Family 14h cores with x86\-64 instruction set support. (This |
| 12952 | supersets \s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0, \s-1SSE3\s0, \s-1SSSE3\s0, \s-1SSE4A\s0, \s-1CX16\s0, \s-1ABM\s0 and 64\-bit |
| 12953 | instruction set extensions.) |
| 12954 | .IP "\fBbtver2\fR" 4 |
| 12955 | .IX Item "btver2" |
| 12956 | CPUs based on \s-1AMD\s0 Family 16h cores with x86\-64 instruction set support. This |
| 12957 | includes \s-1MOVBE\s0, F16C, \s-1BMI\s0, \s-1AVX\s0, \s-1PCL_MUL\s0, \s-1AES\s0, \s-1SSE4\s0.2, \s-1SSE4\s0.1, \s-1CX16\s0, \s-1ABM\s0, |
| 12958 | \&\s-1SSE4A\s0, \s-1SSSE3\s0, \s-1SSE3\s0, \s-1SSE2\s0, \s-1SSE\s0, \s-1MMX\s0 and 64\-bit instruction set extensions. |
| 12959 | .IP "\fBwinchip\-c6\fR" 4 |
| 12960 | .IX Item "winchip-c6" |
| 12961 | \&\s-1IDT\s0 WinChip C6 \s-1CPU\s0, dealt in same way as i486 with additional \s-1MMX\s0 instruction |
| 12962 | set support. |
| 12963 | .IP "\fBwinchip2\fR" 4 |
| 12964 | .IX Item "winchip2" |
| 12965 | \&\s-1IDT\s0 WinChip 2 \s-1CPU\s0, dealt in same way as i486 with additional \s-1MMX\s0 and 3DNow! |
| 12966 | instruction set support. |
| 12967 | .IP "\fBc3\fR" 4 |
| 12968 | .IX Item "c3" |
| 12969 | \&\s-1VIA\s0 C3 \s-1CPU\s0 with \s-1MMX\s0 and 3DNow! instruction set support. (No scheduling is |
| 12970 | implemented for this chip.) |
| 12971 | .IP "\fBc3\-2\fR" 4 |
| 12972 | .IX Item "c3-2" |
| 12973 | \&\s-1VIA\s0 C3\-2 (Nehemiah/C5XL) \s-1CPU\s0 with \s-1MMX\s0 and \s-1SSE\s0 instruction set support. |
| 12974 | (No scheduling is |
| 12975 | implemented for this chip.) |
| 12976 | .IP "\fBgeode\fR" 4 |
| 12977 | .IX Item "geode" |
| 12978 | \&\s-1AMD\s0 Geode embedded processor with \s-1MMX\s0 and 3DNow! instruction set support. |
| 12979 | .RE |
| 12980 | .RS 4 |
| 12981 | .RE |
| 12982 | .IP "\fB\-mtune=\fR\fIcpu-type\fR" 4 |
| 12983 | .IX Item "-mtune=cpu-type" |
| 12984 | Tune to \fIcpu-type\fR everything applicable about the generated code, except |
| 12985 | for the \s-1ABI\s0 and the set of available instructions. |
| 12986 | While picking a specific \fIcpu-type\fR schedules things appropriately |
| 12987 | for that particular chip, the compiler does not generate any code that |
| 12988 | cannot run on the default machine type unless you use a |
| 12989 | \&\fB\-march=\fR\fIcpu-type\fR option. |
| 12990 | For example, if \s-1GCC\s0 is configured for i686\-pc\-linux\-gnu |
| 12991 | then \fB\-mtune=pentium4\fR generates code that is tuned for Pentium 4 |
| 12992 | but still runs on i686 machines. |
| 12993 | .Sp |
| 12994 | The choices for \fIcpu-type\fR are the same as for \fB\-march\fR. |
| 12995 | In addition, \fB\-mtune\fR supports an extra choice for \fIcpu-type\fR: |
| 12996 | .RS 4 |
| 12997 | .IP "\fBgeneric\fR" 4 |
| 12998 | .IX Item "generic" |
| 12999 | Produce code optimized for the most common \s-1IA32/AMD64/EM64T\s0 processors. |
| 13000 | If you know the \s-1CPU\s0 on which your code will run, then you should use |
| 13001 | the corresponding \fB\-mtune\fR or \fB\-march\fR option instead of |
| 13002 | \&\fB\-mtune=generic\fR. But, if you do not know exactly what \s-1CPU\s0 users |
| 13003 | of your application will have, then you should use this option. |
| 13004 | .Sp |
| 13005 | As new processors are deployed in the marketplace, the behavior of this |
| 13006 | option will change. Therefore, if you upgrade to a newer version of |
| 13007 | \&\s-1GCC\s0, code generation controlled by this option will change to reflect |
| 13008 | the processors |
| 13009 | that are most common at the time that version of \s-1GCC\s0 is released. |
| 13010 | .Sp |
| 13011 | There is no \fB\-march=generic\fR option because \fB\-march\fR |
| 13012 | indicates the instruction set the compiler can use, and there is no |
| 13013 | generic instruction set applicable to all processors. In contrast, |
| 13014 | \&\fB\-mtune\fR indicates the processor (or, in this case, collection of |
| 13015 | processors) for which the code is optimized. |
| 13016 | .RE |
| 13017 | .RS 4 |
| 13018 | .RE |
| 13019 | .IP "\fB\-mcpu=\fR\fIcpu-type\fR" 4 |
| 13020 | .IX Item "-mcpu=cpu-type" |
| 13021 | A deprecated synonym for \fB\-mtune\fR. |
| 13022 | .IP "\fB\-mfpmath=\fR\fIunit\fR" 4 |
| 13023 | .IX Item "-mfpmath=unit" |
| 13024 | Generate floating-point arithmetic for selected unit \fIunit\fR. The choices |
| 13025 | for \fIunit\fR are: |
| 13026 | .RS 4 |
| 13027 | .IP "\fB387\fR" 4 |
| 13028 | .IX Item "387" |
| 13029 | Use the standard 387 floating-point coprocessor present on the majority of chips and |
| 13030 | emulated otherwise. Code compiled with this option runs almost everywhere. |
| 13031 | The temporary results are computed in 80\-bit precision instead of the precision |
| 13032 | specified by the type, resulting in slightly different results compared to most |
| 13033 | of other chips. See \fB\-ffloat\-store\fR for more detailed description. |
| 13034 | .Sp |
| 13035 | This is the default choice for i386 compiler. |
| 13036 | .IP "\fBsse\fR" 4 |
| 13037 | .IX Item "sse" |
| 13038 | Use scalar floating-point instructions present in the \s-1SSE\s0 instruction set. |
| 13039 | This instruction set is supported by Pentium \s-1III\s0 and newer chips, |
| 13040 | and in the \s-1AMD\s0 line |
| 13041 | by Athlon\-4, Athlon \s-1XP\s0 and Athlon \s-1MP\s0 chips. The earlier version of the \s-1SSE\s0 |
| 13042 | instruction set supports only single-precision arithmetic, thus the double and |
| 13043 | extended-precision arithmetic are still done using 387. A later version, present |
| 13044 | only in Pentium 4 and \s-1AMD\s0 x86\-64 chips, supports double-precision |
| 13045 | arithmetic too. |
| 13046 | .Sp |
| 13047 | For the i386 compiler, you must use \fB\-march=\fR\fIcpu-type\fR, \fB\-msse\fR |
| 13048 | or \fB\-msse2\fR switches to enable \s-1SSE\s0 extensions and make this option |
| 13049 | effective. For the x86\-64 compiler, these extensions are enabled by default. |
| 13050 | .Sp |
| 13051 | The resulting code should be considerably faster in the majority of cases and avoid |
| 13052 | the numerical instability problems of 387 code, but may break some existing |
| 13053 | code that expects temporaries to be 80 bits. |
| 13054 | .Sp |
| 13055 | This is the default choice for the x86\-64 compiler. |
| 13056 | .IP "\fBsse,387\fR" 4 |
| 13057 | .IX Item "sse,387" |
| 13058 | .PD 0 |
| 13059 | .IP "\fBsse+387\fR" 4 |
| 13060 | .IX Item "sse+387" |
| 13061 | .IP "\fBboth\fR" 4 |
| 13062 | .IX Item "both" |
| 13063 | .PD |
| 13064 | Attempt to utilize both instruction sets at once. This effectively doubles the |
| 13065 | amount of available registers, and on chips with separate execution units for |
| 13066 | 387 and \s-1SSE\s0 the execution resources too. Use this option with care, as it is |
| 13067 | still experimental, because the \s-1GCC\s0 register allocator does not model separate |
| 13068 | functional units well, resulting in unstable performance. |
| 13069 | .RE |
| 13070 | .RS 4 |
| 13071 | .RE |
| 13072 | .IP "\fB\-masm=\fR\fIdialect\fR" 4 |
| 13073 | .IX Item "-masm=dialect" |
| 13074 | Output assembly instructions using selected \fIdialect\fR. Supported |
| 13075 | choices are \fBintel\fR or \fBatt\fR (the default). Darwin does |
| 13076 | not support \fBintel\fR. |
| 13077 | .IP "\fB\-mieee\-fp\fR" 4 |
| 13078 | .IX Item "-mieee-fp" |
| 13079 | .PD 0 |
| 13080 | .IP "\fB\-mno\-ieee\-fp\fR" 4 |
| 13081 | .IX Item "-mno-ieee-fp" |
| 13082 | .PD |
| 13083 | Control whether or not the compiler uses \s-1IEEE\s0 floating-point |
| 13084 | comparisons. These correctly handle the case where the result of a |
| 13085 | comparison is unordered. |
| 13086 | .IP "\fB\-msoft\-float\fR" 4 |
| 13087 | .IX Item "-msoft-float" |
| 13088 | Generate output containing library calls for floating point. |
| 13089 | .Sp |
| 13090 | \&\fBWarning:\fR the requisite libraries are not part of \s-1GCC\s0. |
| 13091 | Normally the facilities of the machine's usual C compiler are used, but |
| 13092 | this can't be done directly in cross-compilation. You must make your |
| 13093 | own arrangements to provide suitable library functions for |
| 13094 | cross-compilation. |
| 13095 | .Sp |
| 13096 | On machines where a function returns floating-point results in the 80387 |
| 13097 | register stack, some floating-point opcodes may be emitted even if |
| 13098 | \&\fB\-msoft\-float\fR is used. |
| 13099 | .IP "\fB\-mno\-fp\-ret\-in\-387\fR" 4 |
| 13100 | .IX Item "-mno-fp-ret-in-387" |
| 13101 | Do not use the \s-1FPU\s0 registers for return values of functions. |
| 13102 | .Sp |
| 13103 | The usual calling convention has functions return values of types |
| 13104 | \&\f(CW\*(C`float\*(C'\fR and \f(CW\*(C`double\*(C'\fR in an \s-1FPU\s0 register, even if there |
| 13105 | is no \s-1FPU\s0. The idea is that the operating system should emulate |
| 13106 | an \s-1FPU\s0. |
| 13107 | .Sp |
| 13108 | The option \fB\-mno\-fp\-ret\-in\-387\fR causes such values to be returned |
| 13109 | in ordinary \s-1CPU\s0 registers instead. |
| 13110 | .IP "\fB\-mno\-fancy\-math\-387\fR" 4 |
| 13111 | .IX Item "-mno-fancy-math-387" |
| 13112 | Some 387 emulators do not support the \f(CW\*(C`sin\*(C'\fR, \f(CW\*(C`cos\*(C'\fR and |
| 13113 | \&\f(CW\*(C`sqrt\*(C'\fR instructions for the 387. Specify this option to avoid |
| 13114 | generating those instructions. This option is the default on FreeBSD, |
| 13115 | OpenBSD and NetBSD. This option is overridden when \fB\-march\fR |
| 13116 | indicates that the target \s-1CPU\s0 always has an \s-1FPU\s0 and so the |
| 13117 | instruction does not need emulation. These |
| 13118 | instructions are not generated unless you also use the |
| 13119 | \&\fB\-funsafe\-math\-optimizations\fR switch. |
| 13120 | .IP "\fB\-malign\-double\fR" 4 |
| 13121 | .IX Item "-malign-double" |
| 13122 | .PD 0 |
| 13123 | .IP "\fB\-mno\-align\-double\fR" 4 |
| 13124 | .IX Item "-mno-align-double" |
| 13125 | .PD |
| 13126 | Control whether \s-1GCC\s0 aligns \f(CW\*(C`double\*(C'\fR, \f(CW\*(C`long double\*(C'\fR, and |
| 13127 | \&\f(CW\*(C`long long\*(C'\fR variables on a two-word boundary or a one-word |
| 13128 | boundary. Aligning \f(CW\*(C`double\*(C'\fR variables on a two-word boundary |
| 13129 | produces code that runs somewhat faster on a Pentium at the |
| 13130 | expense of more memory. |
| 13131 | .Sp |
| 13132 | On x86\-64, \fB\-malign\-double\fR is enabled by default. |
| 13133 | .Sp |
| 13134 | \&\fBWarning:\fR if you use the \fB\-malign\-double\fR switch, |
| 13135 | structures containing the above types are aligned differently than |
| 13136 | the published application binary interface specifications for the 386 |
| 13137 | and are not binary compatible with structures in code compiled |
| 13138 | without that switch. |
| 13139 | .IP "\fB\-m96bit\-long\-double\fR" 4 |
| 13140 | .IX Item "-m96bit-long-double" |
| 13141 | .PD 0 |
| 13142 | .IP "\fB\-m128bit\-long\-double\fR" 4 |
| 13143 | .IX Item "-m128bit-long-double" |
| 13144 | .PD |
| 13145 | These switches control the size of \f(CW\*(C`long double\*(C'\fR type. The i386 |
| 13146 | application binary interface specifies the size to be 96 bits, |
| 13147 | so \fB\-m96bit\-long\-double\fR is the default in 32\-bit mode. |
| 13148 | .Sp |
| 13149 | Modern architectures (Pentium and newer) prefer \f(CW\*(C`long double\*(C'\fR |
| 13150 | to be aligned to an 8\- or 16\-byte boundary. In arrays or structures |
| 13151 | conforming to the \s-1ABI\s0, this is not possible. So specifying |
| 13152 | \&\fB\-m128bit\-long\-double\fR aligns \f(CW\*(C`long double\*(C'\fR |
| 13153 | to a 16\-byte boundary by padding the \f(CW\*(C`long double\*(C'\fR with an additional |
| 13154 | 32\-bit zero. |
| 13155 | .Sp |
| 13156 | In the x86\-64 compiler, \fB\-m128bit\-long\-double\fR is the default choice as |
| 13157 | its \s-1ABI\s0 specifies that \f(CW\*(C`long double\*(C'\fR is aligned on 16\-byte boundary. |
| 13158 | .Sp |
| 13159 | Notice that neither of these options enable any extra precision over the x87 |
| 13160 | standard of 80 bits for a \f(CW\*(C`long double\*(C'\fR. |
| 13161 | .Sp |
| 13162 | \&\fBWarning:\fR if you override the default value for your target \s-1ABI\s0, this |
| 13163 | changes the size of |
| 13164 | structures and arrays containing \f(CW\*(C`long double\*(C'\fR variables, |
| 13165 | as well as modifying the function calling convention for functions taking |
| 13166 | \&\f(CW\*(C`long double\*(C'\fR. Hence they are not binary-compatible |
| 13167 | with code compiled without that switch. |
| 13168 | .IP "\fB\-mlong\-double\-64\fR" 4 |
| 13169 | .IX Item "-mlong-double-64" |
| 13170 | .PD 0 |
| 13171 | .IP "\fB\-mlong\-double\-80\fR" 4 |
| 13172 | .IX Item "-mlong-double-80" |
| 13173 | .PD |
| 13174 | These switches control the size of \f(CW\*(C`long double\*(C'\fR type. A size |
| 13175 | of 64 bits makes the \f(CW\*(C`long double\*(C'\fR type equivalent to the \f(CW\*(C`double\*(C'\fR |
| 13176 | type. This is the default for Bionic C library. |
| 13177 | .Sp |
| 13178 | \&\fBWarning:\fR if you override the default value for your target \s-1ABI\s0, this |
| 13179 | changes the size of |
| 13180 | structures and arrays containing \f(CW\*(C`long double\*(C'\fR variables, |
| 13181 | as well as modifying the function calling convention for functions taking |
| 13182 | \&\f(CW\*(C`long double\*(C'\fR. Hence they are not binary-compatible |
| 13183 | with code compiled without that switch. |
| 13184 | .IP "\fB\-mlarge\-data\-threshold=\fR\fIthreshold\fR" 4 |
| 13185 | .IX Item "-mlarge-data-threshold=threshold" |
| 13186 | When \fB\-mcmodel=medium\fR is specified, data objects larger than |
| 13187 | \&\fIthreshold\fR are placed in the large data section. This value must be the |
| 13188 | same across all objects linked into the binary, and defaults to 65535. |
| 13189 | .IP "\fB\-mrtd\fR" 4 |
| 13190 | .IX Item "-mrtd" |
| 13191 | Use a different function-calling convention, in which functions that |
| 13192 | take a fixed number of arguments return with the \f(CW\*(C`ret \f(CInum\f(CW\*(C'\fR |
| 13193 | instruction, which pops their arguments while returning. This saves one |
| 13194 | instruction in the caller since there is no need to pop the arguments |
| 13195 | there. |
| 13196 | .Sp |
| 13197 | You can specify that an individual function is called with this calling |
| 13198 | sequence with the function attribute \fBstdcall\fR. You can also |
| 13199 | override the \fB\-mrtd\fR option by using the function attribute |
| 13200 | \&\fBcdecl\fR. |
| 13201 | .Sp |
| 13202 | \&\fBWarning:\fR this calling convention is incompatible with the one |
| 13203 | normally used on Unix, so you cannot use it if you need to call |
| 13204 | libraries compiled with the Unix compiler. |
| 13205 | .Sp |
| 13206 | Also, you must provide function prototypes for all functions that |
| 13207 | take variable numbers of arguments (including \f(CW\*(C`printf\*(C'\fR); |
| 13208 | otherwise incorrect code is generated for calls to those |
| 13209 | functions. |
| 13210 | .Sp |
| 13211 | In addition, seriously incorrect code results if you call a |
| 13212 | function with too many arguments. (Normally, extra arguments are |
| 13213 | harmlessly ignored.) |
| 13214 | .IP "\fB\-mregparm=\fR\fInum\fR" 4 |
| 13215 | .IX Item "-mregparm=num" |
| 13216 | Control how many registers are used to pass integer arguments. By |
| 13217 | default, no registers are used to pass arguments, and at most 3 |
| 13218 | registers can be used. You can control this behavior for a specific |
| 13219 | function by using the function attribute \fBregparm\fR. |
| 13220 | .Sp |
| 13221 | \&\fBWarning:\fR if you use this switch, and |
| 13222 | \&\fInum\fR is nonzero, then you must build all modules with the same |
| 13223 | value, including any libraries. This includes the system libraries and |
| 13224 | startup modules. |
| 13225 | .IP "\fB\-msseregparm\fR" 4 |
| 13226 | .IX Item "-msseregparm" |
| 13227 | Use \s-1SSE\s0 register passing conventions for float and double arguments |
| 13228 | and return values. You can control this behavior for a specific |
| 13229 | function by using the function attribute \fBsseregparm\fR. |
| 13230 | .Sp |
| 13231 | \&\fBWarning:\fR if you use this switch then you must build all |
| 13232 | modules with the same value, including any libraries. This includes |
| 13233 | the system libraries and startup modules. |
| 13234 | .IP "\fB\-mvect8\-ret\-in\-mem\fR" 4 |
| 13235 | .IX Item "-mvect8-ret-in-mem" |
| 13236 | Return 8\-byte vectors in memory instead of \s-1MMX\s0 registers. This is the |
| 13237 | default on Solaris@tie{}8 and 9 and VxWorks to match the \s-1ABI\s0 of the Sun |
| 13238 | Studio compilers until version 12. Later compiler versions (starting |
| 13239 | with Studio 12 Update@tie{}1) follow the \s-1ABI\s0 used by other x86 targets, which |
| 13240 | is the default on Solaris@tie{}10 and later. \fIOnly\fR use this option if |
| 13241 | you need to remain compatible with existing code produced by those |
| 13242 | previous compiler versions or older versions of \s-1GCC\s0. |
| 13243 | .IP "\fB\-mpc32\fR" 4 |
| 13244 | .IX Item "-mpc32" |
| 13245 | .PD 0 |
| 13246 | .IP "\fB\-mpc64\fR" 4 |
| 13247 | .IX Item "-mpc64" |
| 13248 | .IP "\fB\-mpc80\fR" 4 |
| 13249 | .IX Item "-mpc80" |
| 13250 | .PD |
| 13251 | Set 80387 floating-point precision to 32, 64 or 80 bits. When \fB\-mpc32\fR |
| 13252 | is specified, the significands of results of floating-point operations are |
| 13253 | rounded to 24 bits (single precision); \fB\-mpc64\fR rounds the |
| 13254 | significands of results of floating-point operations to 53 bits (double |
| 13255 | precision) and \fB\-mpc80\fR rounds the significands of results of |
| 13256 | floating-point operations to 64 bits (extended double precision), which is |
| 13257 | the default. When this option is used, floating-point operations in higher |
| 13258 | precisions are not available to the programmer without setting the \s-1FPU\s0 |
| 13259 | control word explicitly. |
| 13260 | .Sp |
| 13261 | Setting the rounding of floating-point operations to less than the default |
| 13262 | 80 bits can speed some programs by 2% or more. Note that some mathematical |
| 13263 | libraries assume that extended-precision (80\-bit) floating-point operations |
| 13264 | are enabled by default; routines in such libraries could suffer significant |
| 13265 | loss of accuracy, typically through so-called \*(L"catastrophic cancellation\*(R", |
| 13266 | when this option is used to set the precision to less than extended precision. |
| 13267 | .IP "\fB\-mstackrealign\fR" 4 |
| 13268 | .IX Item "-mstackrealign" |
| 13269 | Realign the stack at entry. On the Intel x86, the \fB\-mstackrealign\fR |
| 13270 | option generates an alternate prologue and epilogue that realigns the |
| 13271 | run-time stack if necessary. This supports mixing legacy codes that keep |
| 13272 | 4\-byte stack alignment with modern codes that keep 16\-byte stack alignment for |
| 13273 | \&\s-1SSE\s0 compatibility. See also the attribute \f(CW\*(C`force_align_arg_pointer\*(C'\fR, |
| 13274 | applicable to individual functions. |
| 13275 | .IP "\fB\-mpreferred\-stack\-boundary=\fR\fInum\fR" 4 |
| 13276 | .IX Item "-mpreferred-stack-boundary=num" |
| 13277 | Attempt to keep the stack boundary aligned to a 2 raised to \fInum\fR |
| 13278 | byte boundary. If \fB\-mpreferred\-stack\-boundary\fR is not specified, |
| 13279 | the default is 4 (16 bytes or 128 bits). |
| 13280 | .Sp |
| 13281 | \&\fBWarning:\fR When generating code for the x86\-64 architecture with |
| 13282 | \&\s-1SSE\s0 extensions disabled, \fB\-mpreferred\-stack\-boundary=3\fR can be |
| 13283 | used to keep the stack boundary aligned to 8 byte boundary. Since |
| 13284 | x86\-64 \s-1ABI\s0 require 16 byte stack alignment, this is \s-1ABI\s0 incompatible and |
| 13285 | intended to be used in controlled environment where stack space is |
| 13286 | important limitation. This option will lead to wrong code when functions |
| 13287 | compiled with 16 byte stack alignment (such as functions from a standard |
| 13288 | library) are called with misaligned stack. In this case, \s-1SSE\s0 |
| 13289 | instructions may lead to misaligned memory access traps. In addition, |
| 13290 | variable arguments will be handled incorrectly for 16 byte aligned |
| 13291 | objects (including x87 long double and _\|_int128), leading to wrong |
| 13292 | results. You must build all modules with |
| 13293 | \&\fB\-mpreferred\-stack\-boundary=3\fR, including any libraries. This |
| 13294 | includes the system libraries and startup modules. |
| 13295 | .IP "\fB\-mincoming\-stack\-boundary=\fR\fInum\fR" 4 |
| 13296 | .IX Item "-mincoming-stack-boundary=num" |
| 13297 | Assume the incoming stack is aligned to a 2 raised to \fInum\fR byte |
| 13298 | boundary. If \fB\-mincoming\-stack\-boundary\fR is not specified, |
| 13299 | the one specified by \fB\-mpreferred\-stack\-boundary\fR is used. |
| 13300 | .Sp |
| 13301 | On Pentium and Pentium Pro, \f(CW\*(C`double\*(C'\fR and \f(CW\*(C`long double\*(C'\fR values |
| 13302 | should be aligned to an 8\-byte boundary (see \fB\-malign\-double\fR) or |
| 13303 | suffer significant run time performance penalties. On Pentium \s-1III\s0, the |
| 13304 | Streaming \s-1SIMD\s0 Extension (\s-1SSE\s0) data type \f(CW\*(C`_\|_m128\*(C'\fR may not work |
| 13305 | properly if it is not 16\-byte aligned. |
| 13306 | .Sp |
| 13307 | To ensure proper alignment of this values on the stack, the stack boundary |
| 13308 | must be as aligned as that required by any value stored on the stack. |
| 13309 | Further, every function must be generated such that it keeps the stack |
| 13310 | aligned. Thus calling a function compiled with a higher preferred |
| 13311 | stack boundary from a function compiled with a lower preferred stack |
| 13312 | boundary most likely misaligns the stack. It is recommended that |
| 13313 | libraries that use callbacks always use the default setting. |
| 13314 | .Sp |
| 13315 | This extra alignment does consume extra stack space, and generally |
| 13316 | increases code size. Code that is sensitive to stack space usage, such |
| 13317 | as embedded systems and operating system kernels, may want to reduce the |
| 13318 | preferred alignment to \fB\-mpreferred\-stack\-boundary=2\fR. |
| 13319 | .IP "\fB\-mmmx\fR" 4 |
| 13320 | .IX Item "-mmmx" |
| 13321 | .PD 0 |
| 13322 | .IP "\fB\-mno\-mmx\fR" 4 |
| 13323 | .IX Item "-mno-mmx" |
| 13324 | .IP "\fB\-msse\fR" 4 |
| 13325 | .IX Item "-msse" |
| 13326 | .IP "\fB\-mno\-sse\fR" 4 |
| 13327 | .IX Item "-mno-sse" |
| 13328 | .IP "\fB\-msse2\fR" 4 |
| 13329 | .IX Item "-msse2" |
| 13330 | .IP "\fB\-mno\-sse2\fR" 4 |
| 13331 | .IX Item "-mno-sse2" |
| 13332 | .IP "\fB\-msse3\fR" 4 |
| 13333 | .IX Item "-msse3" |
| 13334 | .IP "\fB\-mno\-sse3\fR" 4 |
| 13335 | .IX Item "-mno-sse3" |
| 13336 | .IP "\fB\-mssse3\fR" 4 |
| 13337 | .IX Item "-mssse3" |
| 13338 | .IP "\fB\-mno\-ssse3\fR" 4 |
| 13339 | .IX Item "-mno-ssse3" |
| 13340 | .IP "\fB\-msse4.1\fR" 4 |
| 13341 | .IX Item "-msse4.1" |
| 13342 | .IP "\fB\-mno\-sse4.1\fR" 4 |
| 13343 | .IX Item "-mno-sse4.1" |
| 13344 | .IP "\fB\-msse4.2\fR" 4 |
| 13345 | .IX Item "-msse4.2" |
| 13346 | .IP "\fB\-mno\-sse4.2\fR" 4 |
| 13347 | .IX Item "-mno-sse4.2" |
| 13348 | .IP "\fB\-msse4\fR" 4 |
| 13349 | .IX Item "-msse4" |
| 13350 | .IP "\fB\-mno\-sse4\fR" 4 |
| 13351 | .IX Item "-mno-sse4" |
| 13352 | .IP "\fB\-mavx\fR" 4 |
| 13353 | .IX Item "-mavx" |
| 13354 | .IP "\fB\-mno\-avx\fR" 4 |
| 13355 | .IX Item "-mno-avx" |
| 13356 | .IP "\fB\-mavx2\fR" 4 |
| 13357 | .IX Item "-mavx2" |
| 13358 | .IP "\fB\-mno\-avx2\fR" 4 |
| 13359 | .IX Item "-mno-avx2" |
| 13360 | .IP "\fB\-maes\fR" 4 |
| 13361 | .IX Item "-maes" |
| 13362 | .IP "\fB\-mno\-aes\fR" 4 |
| 13363 | .IX Item "-mno-aes" |
| 13364 | .IP "\fB\-mpclmul\fR" 4 |
| 13365 | .IX Item "-mpclmul" |
| 13366 | .IP "\fB\-mno\-pclmul\fR" 4 |
| 13367 | .IX Item "-mno-pclmul" |
| 13368 | .IP "\fB\-mfsgsbase\fR" 4 |
| 13369 | .IX Item "-mfsgsbase" |
| 13370 | .IP "\fB\-mno\-fsgsbase\fR" 4 |
| 13371 | .IX Item "-mno-fsgsbase" |
| 13372 | .IP "\fB\-mrdrnd\fR" 4 |
| 13373 | .IX Item "-mrdrnd" |
| 13374 | .IP "\fB\-mno\-rdrnd\fR" 4 |
| 13375 | .IX Item "-mno-rdrnd" |
| 13376 | .IP "\fB\-mf16c\fR" 4 |
| 13377 | .IX Item "-mf16c" |
| 13378 | .IP "\fB\-mno\-f16c\fR" 4 |
| 13379 | .IX Item "-mno-f16c" |
| 13380 | .IP "\fB\-mfma\fR" 4 |
| 13381 | .IX Item "-mfma" |
| 13382 | .IP "\fB\-mno\-fma\fR" 4 |
| 13383 | .IX Item "-mno-fma" |
| 13384 | .IP "\fB\-msse4a\fR" 4 |
| 13385 | .IX Item "-msse4a" |
| 13386 | .IP "\fB\-mno\-sse4a\fR" 4 |
| 13387 | .IX Item "-mno-sse4a" |
| 13388 | .IP "\fB\-mfma4\fR" 4 |
| 13389 | .IX Item "-mfma4" |
| 13390 | .IP "\fB\-mno\-fma4\fR" 4 |
| 13391 | .IX Item "-mno-fma4" |
| 13392 | .IP "\fB\-mxop\fR" 4 |
| 13393 | .IX Item "-mxop" |
| 13394 | .IP "\fB\-mno\-xop\fR" 4 |
| 13395 | .IX Item "-mno-xop" |
| 13396 | .IP "\fB\-mlwp\fR" 4 |
| 13397 | .IX Item "-mlwp" |
| 13398 | .IP "\fB\-mno\-lwp\fR" 4 |
| 13399 | .IX Item "-mno-lwp" |
| 13400 | .IP "\fB\-m3dnow\fR" 4 |
| 13401 | .IX Item "-m3dnow" |
| 13402 | .IP "\fB\-mno\-3dnow\fR" 4 |
| 13403 | .IX Item "-mno-3dnow" |
| 13404 | .IP "\fB\-mpopcnt\fR" 4 |
| 13405 | .IX Item "-mpopcnt" |
| 13406 | .IP "\fB\-mno\-popcnt\fR" 4 |
| 13407 | .IX Item "-mno-popcnt" |
| 13408 | .IP "\fB\-mabm\fR" 4 |
| 13409 | .IX Item "-mabm" |
| 13410 | .IP "\fB\-mno\-abm\fR" 4 |
| 13411 | .IX Item "-mno-abm" |
| 13412 | .IP "\fB\-mbmi\fR" 4 |
| 13413 | .IX Item "-mbmi" |
| 13414 | .IP "\fB\-mbmi2\fR" 4 |
| 13415 | .IX Item "-mbmi2" |
| 13416 | .IP "\fB\-mno\-bmi\fR" 4 |
| 13417 | .IX Item "-mno-bmi" |
| 13418 | .IP "\fB\-mno\-bmi2\fR" 4 |
| 13419 | .IX Item "-mno-bmi2" |
| 13420 | .IP "\fB\-mlzcnt\fR" 4 |
| 13421 | .IX Item "-mlzcnt" |
| 13422 | .IP "\fB\-mno\-lzcnt\fR" 4 |
| 13423 | .IX Item "-mno-lzcnt" |
| 13424 | .IP "\fB\-mrtm\fR" 4 |
| 13425 | .IX Item "-mrtm" |
| 13426 | .IP "\fB\-mtbm\fR" 4 |
| 13427 | .IX Item "-mtbm" |
| 13428 | .IP "\fB\-mno\-tbm\fR" 4 |
| 13429 | .IX Item "-mno-tbm" |
| 13430 | .PD |
| 13431 | These switches enable or disable the use of instructions in the \s-1MMX\s0, \s-1SSE\s0, |
| 13432 | \&\s-1SSE2\s0, \s-1SSE3\s0, \s-1SSSE3\s0, \s-1SSE4\s0.1, \s-1AVX\s0, \s-1AVX2\s0, \s-1AES\s0, \s-1PCLMUL\s0, \s-1FSGSBASE\s0, \s-1RDRND\s0, F16C, |
| 13433 | \&\s-1FMA\s0, \s-1SSE4A\s0, \s-1FMA4\s0, \s-1XOP\s0, \s-1LWP\s0, \s-1ABM\s0, \s-1BMI\s0, \s-1BMI2\s0, \s-1LZCNT\s0, \s-1RTM\s0 or 3DNow! |
| 13434 | extended instruction sets. |
| 13435 | These extensions are also available as built-in functions: see |
| 13436 | \&\fBX86 Built-in Functions\fR, for details of the functions enabled and |
| 13437 | disabled by these switches. |
| 13438 | .Sp |
| 13439 | To generate \s-1SSE/SSE2\s0 instructions automatically from floating-point |
| 13440 | code (as opposed to 387 instructions), see \fB\-mfpmath=sse\fR. |
| 13441 | .Sp |
| 13442 | \&\s-1GCC\s0 depresses SSEx instructions when \fB\-mavx\fR is used. Instead, it |
| 13443 | generates new \s-1AVX\s0 instructions or \s-1AVX\s0 equivalence for all SSEx instructions |
| 13444 | when needed. |
| 13445 | .Sp |
| 13446 | These options enable \s-1GCC\s0 to use these extended instructions in |
| 13447 | generated code, even without \fB\-mfpmath=sse\fR. Applications that |
| 13448 | perform run-time \s-1CPU\s0 detection must compile separate files for each |
| 13449 | supported architecture, using the appropriate flags. In particular, |
| 13450 | the file containing the \s-1CPU\s0 detection code should be compiled without |
| 13451 | these options. |
| 13452 | .IP "\fB\-mcld\fR" 4 |
| 13453 | .IX Item "-mcld" |
| 13454 | This option instructs \s-1GCC\s0 to emit a \f(CW\*(C`cld\*(C'\fR instruction in the prologue |
| 13455 | of functions that use string instructions. String instructions depend on |
| 13456 | the \s-1DF\s0 flag to select between autoincrement or autodecrement mode. While the |
| 13457 | \&\s-1ABI\s0 specifies the \s-1DF\s0 flag to be cleared on function entry, some operating |
| 13458 | systems violate this specification by not clearing the \s-1DF\s0 flag in their |
| 13459 | exception dispatchers. The exception handler can be invoked with the \s-1DF\s0 flag |
| 13460 | set, which leads to wrong direction mode when string instructions are used. |
| 13461 | This option can be enabled by default on 32\-bit x86 targets by configuring |
| 13462 | \&\s-1GCC\s0 with the \fB\-\-enable\-cld\fR configure option. Generation of \f(CW\*(C`cld\*(C'\fR |
| 13463 | instructions can be suppressed with the \fB\-mno\-cld\fR compiler option |
| 13464 | in this case. |
| 13465 | .IP "\fB\-mvzeroupper\fR" 4 |
| 13466 | .IX Item "-mvzeroupper" |
| 13467 | This option instructs \s-1GCC\s0 to emit a \f(CW\*(C`vzeroupper\*(C'\fR instruction |
| 13468 | before a transfer of control flow out of the function to minimize |
| 13469 | the \s-1AVX\s0 to \s-1SSE\s0 transition penalty as well as remove unnecessary \f(CW\*(C`zeroupper\*(C'\fR |
| 13470 | intrinsics. |
| 13471 | .IP "\fB\-mprefer\-avx128\fR" 4 |
| 13472 | .IX Item "-mprefer-avx128" |
| 13473 | This option instructs \s-1GCC\s0 to use 128\-bit \s-1AVX\s0 instructions instead of |
| 13474 | 256\-bit \s-1AVX\s0 instructions in the auto-vectorizer. |
| 13475 | .IP "\fB\-mcx16\fR" 4 |
| 13476 | .IX Item "-mcx16" |
| 13477 | This option enables \s-1GCC\s0 to generate \f(CW\*(C`CMPXCHG16B\*(C'\fR instructions. |
| 13478 | \&\f(CW\*(C`CMPXCHG16B\*(C'\fR allows for atomic operations on 128\-bit double quadword |
| 13479 | (or oword) data types. |
| 13480 | This is useful for high-resolution counters that can be updated |
| 13481 | by multiple processors (or cores). This instruction is generated as part of |
| 13482 | atomic built-in functions: see \fB_\|_sync Builtins\fR or |
| 13483 | \&\fB_\|_atomic Builtins\fR for details. |
| 13484 | .IP "\fB\-msahf\fR" 4 |
| 13485 | .IX Item "-msahf" |
| 13486 | This option enables generation of \f(CW\*(C`SAHF\*(C'\fR instructions in 64\-bit code. |
| 13487 | Early Intel Pentium 4 CPUs with Intel 64 support, |
| 13488 | prior to the introduction of Pentium 4 G1 step in December 2005, |
| 13489 | lacked the \f(CW\*(C`LAHF\*(C'\fR and \f(CW\*(C`SAHF\*(C'\fR instructions |
| 13490 | which were supported by \s-1AMD64\s0. |
| 13491 | These are load and store instructions, respectively, for certain status flags. |
| 13492 | In 64\-bit mode, the \f(CW\*(C`SAHF\*(C'\fR instruction is used to optimize \f(CW\*(C`fmod\*(C'\fR, |
| 13493 | \&\f(CW\*(C`drem\*(C'\fR, and \f(CW\*(C`remainder\*(C'\fR built-in functions; |
| 13494 | see \fBOther Builtins\fR for details. |
| 13495 | .IP "\fB\-mmovbe\fR" 4 |
| 13496 | .IX Item "-mmovbe" |
| 13497 | This option enables use of the \f(CW\*(C`movbe\*(C'\fR instruction to implement |
| 13498 | \&\f(CW\*(C`_\|_builtin_bswap32\*(C'\fR and \f(CW\*(C`_\|_builtin_bswap64\*(C'\fR. |
| 13499 | .IP "\fB\-mcrc32\fR" 4 |
| 13500 | .IX Item "-mcrc32" |
| 13501 | This option enables built-in functions \f(CW\*(C`_\|_builtin_ia32_crc32qi\*(C'\fR, |
| 13502 | \&\f(CW\*(C`_\|_builtin_ia32_crc32hi\*(C'\fR, \f(CW\*(C`_\|_builtin_ia32_crc32si\*(C'\fR and |
| 13503 | \&\f(CW\*(C`_\|_builtin_ia32_crc32di\*(C'\fR to generate the \f(CW\*(C`crc32\*(C'\fR machine instruction. |
| 13504 | .IP "\fB\-mrecip\fR" 4 |
| 13505 | .IX Item "-mrecip" |
| 13506 | This option enables use of \f(CW\*(C`RCPSS\*(C'\fR and \f(CW\*(C`RSQRTSS\*(C'\fR instructions |
| 13507 | (and their vectorized variants \f(CW\*(C`RCPPS\*(C'\fR and \f(CW\*(C`RSQRTPS\*(C'\fR) |
| 13508 | with an additional Newton-Raphson step |
| 13509 | to increase precision instead of \f(CW\*(C`DIVSS\*(C'\fR and \f(CW\*(C`SQRTSS\*(C'\fR |
| 13510 | (and their vectorized |
| 13511 | variants) for single-precision floating-point arguments. These instructions |
| 13512 | are generated only when \fB\-funsafe\-math\-optimizations\fR is enabled |
| 13513 | together with \fB\-finite\-math\-only\fR and \fB\-fno\-trapping\-math\fR. |
| 13514 | Note that while the throughput of the sequence is higher than the throughput |
| 13515 | of the non-reciprocal instruction, the precision of the sequence can be |
| 13516 | decreased by up to 2 ulp (i.e. the inverse of 1.0 equals 0.99999994). |
| 13517 | .Sp |
| 13518 | 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 |
| 13519 | (or \f(CW\*(C`RSQRTPS\*(C'\fR) already with \fB\-ffast\-math\fR (or the above option |
| 13520 | combination), and doesn't need \fB\-mrecip\fR. |
| 13521 | .Sp |
| 13522 | Also note that \s-1GCC\s0 emits the above sequence with additional Newton-Raphson step |
| 13523 | for vectorized single-float division and vectorized \f(CW\*(C`sqrtf(\f(CIx\f(CW)\*(C'\fR |
| 13524 | already with \fB\-ffast\-math\fR (or the above option combination), and |
| 13525 | doesn't need \fB\-mrecip\fR. |
| 13526 | .IP "\fB\-mrecip=\fR\fIopt\fR" 4 |
| 13527 | .IX Item "-mrecip=opt" |
| 13528 | This option controls which reciprocal estimate instructions |
| 13529 | may be used. \fIopt\fR is a comma-separated list of options, which may |
| 13530 | be preceded by a \fB!\fR to invert the option: |
| 13531 | .RS 4 |
| 13532 | .IP "\fBall\fR" 4 |
| 13533 | .IX Item "all" |
| 13534 | Enable all estimate instructions. |
| 13535 | .IP "\fBdefault\fR" 4 |
| 13536 | .IX Item "default" |
| 13537 | Enable the default instructions, equivalent to \fB\-mrecip\fR. |
| 13538 | .IP "\fBnone\fR" 4 |
| 13539 | .IX Item "none" |
| 13540 | Disable all estimate instructions, equivalent to \fB\-mno\-recip\fR. |
| 13541 | .IP "\fBdiv\fR" 4 |
| 13542 | .IX Item "div" |
| 13543 | Enable the approximation for scalar division. |
| 13544 | .IP "\fBvec-div\fR" 4 |
| 13545 | .IX Item "vec-div" |
| 13546 | Enable the approximation for vectorized division. |
| 13547 | .IP "\fBsqrt\fR" 4 |
| 13548 | .IX Item "sqrt" |
| 13549 | Enable the approximation for scalar square root. |
| 13550 | .IP "\fBvec-sqrt\fR" 4 |
| 13551 | .IX Item "vec-sqrt" |
| 13552 | Enable the approximation for vectorized square root. |
| 13553 | .RE |
| 13554 | .RS 4 |
| 13555 | .Sp |
| 13556 | So, for example, \fB\-mrecip=all,!sqrt\fR enables |
| 13557 | all of the reciprocal approximations, except for square root. |
| 13558 | .RE |
| 13559 | .IP "\fB\-mveclibabi=\fR\fItype\fR" 4 |
| 13560 | .IX Item "-mveclibabi=type" |
| 13561 | Specifies the \s-1ABI\s0 type to use for vectorizing intrinsics using an |
| 13562 | external library. Supported values for \fItype\fR are \fBsvml\fR |
| 13563 | for the Intel short |
| 13564 | vector math library and \fBacml\fR for the \s-1AMD\s0 math core library. |
| 13565 | To use this option, both \fB\-ftree\-vectorize\fR and |
| 13566 | \&\fB\-funsafe\-math\-optimizations\fR have to be enabled, and an \s-1SVML\s0 or \s-1ACML\s0 |
| 13567 | ABI-compatible library must be specified at link time. |
| 13568 | .Sp |
| 13569 | \&\s-1GCC\s0 currently emits calls to \f(CW\*(C`vmldExp2\*(C'\fR, |
| 13570 | \&\f(CW\*(C`vmldLn2\*(C'\fR, \f(CW\*(C`vmldLog102\*(C'\fR, \f(CW\*(C`vmldLog102\*(C'\fR, \f(CW\*(C`vmldPow2\*(C'\fR, |
| 13571 | \&\f(CW\*(C`vmldTanh2\*(C'\fR, \f(CW\*(C`vmldTan2\*(C'\fR, \f(CW\*(C`vmldAtan2\*(C'\fR, \f(CW\*(C`vmldAtanh2\*(C'\fR, |
| 13572 | \&\f(CW\*(C`vmldCbrt2\*(C'\fR, \f(CW\*(C`vmldSinh2\*(C'\fR, \f(CW\*(C`vmldSin2\*(C'\fR, \f(CW\*(C`vmldAsinh2\*(C'\fR, |
| 13573 | \&\f(CW\*(C`vmldAsin2\*(C'\fR, \f(CW\*(C`vmldCosh2\*(C'\fR, \f(CW\*(C`vmldCos2\*(C'\fR, \f(CW\*(C`vmldAcosh2\*(C'\fR, |
| 13574 | \&\f(CW\*(C`vmldAcos2\*(C'\fR, \f(CW\*(C`vmlsExp4\*(C'\fR, \f(CW\*(C`vmlsLn4\*(C'\fR, \f(CW\*(C`vmlsLog104\*(C'\fR, |
| 13575 | \&\f(CW\*(C`vmlsLog104\*(C'\fR, \f(CW\*(C`vmlsPow4\*(C'\fR, \f(CW\*(C`vmlsTanh4\*(C'\fR, \f(CW\*(C`vmlsTan4\*(C'\fR, |
| 13576 | \&\f(CW\*(C`vmlsAtan4\*(C'\fR, \f(CW\*(C`vmlsAtanh4\*(C'\fR, \f(CW\*(C`vmlsCbrt4\*(C'\fR, \f(CW\*(C`vmlsSinh4\*(C'\fR, |
| 13577 | \&\f(CW\*(C`vmlsSin4\*(C'\fR, \f(CW\*(C`vmlsAsinh4\*(C'\fR, \f(CW\*(C`vmlsAsin4\*(C'\fR, \f(CW\*(C`vmlsCosh4\*(C'\fR, |
| 13578 | \&\f(CW\*(C`vmlsCos4\*(C'\fR, \f(CW\*(C`vmlsAcosh4\*(C'\fR and \f(CW\*(C`vmlsAcos4\*(C'\fR for corresponding |
| 13579 | function type when \fB\-mveclibabi=svml\fR is used, and \f(CW\*(C`_\|_vrd2_sin\*(C'\fR, |
| 13580 | \&\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, |
| 13581 | \&\f(CW\*(C`_\|_vrd2_log10\*(C'\fR, \f(CW\*(C`_\|_vrs4_sinf\*(C'\fR, \f(CW\*(C`_\|_vrs4_cosf\*(C'\fR, |
| 13582 | \&\f(CW\*(C`_\|_vrs4_expf\*(C'\fR, \f(CW\*(C`_\|_vrs4_logf\*(C'\fR, \f(CW\*(C`_\|_vrs4_log2f\*(C'\fR, |
| 13583 | \&\f(CW\*(C`_\|_vrs4_log10f\*(C'\fR and \f(CW\*(C`_\|_vrs4_powf\*(C'\fR for the corresponding function type |
| 13584 | when \fB\-mveclibabi=acml\fR is used. |
| 13585 | .IP "\fB\-mabi=\fR\fIname\fR" 4 |
| 13586 | .IX Item "-mabi=name" |
| 13587 | Generate code for the specified calling convention. Permissible values |
| 13588 | are \fBsysv\fR for the \s-1ABI\s0 used on GNU/Linux and other systems, and |
| 13589 | \&\fBms\fR for the Microsoft \s-1ABI\s0. The default is to use the Microsoft |
| 13590 | \&\s-1ABI\s0 when targeting Microsoft Windows and the SysV \s-1ABI\s0 on all other systems. |
| 13591 | You can control this behavior for a specific function by |
| 13592 | using the function attribute \fBms_abi\fR/\fBsysv_abi\fR. |
| 13593 | .IP "\fB\-mtls\-dialect=\fR\fItype\fR" 4 |
| 13594 | .IX Item "-mtls-dialect=type" |
| 13595 | Generate code to access thread-local storage using the \fBgnu\fR or |
| 13596 | \&\fBgnu2\fR conventions. \fBgnu\fR is the conservative default; |
| 13597 | \&\fBgnu2\fR is more efficient, but it may add compile\- and run-time |
| 13598 | requirements that cannot be satisfied on all systems. |
| 13599 | .IP "\fB\-mpush\-args\fR" 4 |
| 13600 | .IX Item "-mpush-args" |
| 13601 | .PD 0 |
| 13602 | .IP "\fB\-mno\-push\-args\fR" 4 |
| 13603 | .IX Item "-mno-push-args" |
| 13604 | .PD |
| 13605 | Use \s-1PUSH\s0 operations to store outgoing parameters. This method is shorter |
| 13606 | and usually equally fast as method using \s-1SUB/MOV\s0 operations and is enabled |
| 13607 | by default. In some cases disabling it may improve performance because of |
| 13608 | improved scheduling and reduced dependencies. |
| 13609 | .IP "\fB\-maccumulate\-outgoing\-args\fR" 4 |
| 13610 | .IX Item "-maccumulate-outgoing-args" |
| 13611 | If enabled, the maximum amount of space required for outgoing arguments is |
| 13612 | computed in the function prologue. This is faster on most modern CPUs |
| 13613 | because of reduced dependencies, improved scheduling and reduced stack usage |
| 13614 | when the preferred stack boundary is not equal to 2. The drawback is a notable |
| 13615 | increase in code size. This switch implies \fB\-mno\-push\-args\fR. |
| 13616 | .IP "\fB\-mthreads\fR" 4 |
| 13617 | .IX Item "-mthreads" |
| 13618 | Support thread-safe exception handling on MinGW. Programs that rely |
| 13619 | on thread-safe exception handling must compile and link all code with the |
| 13620 | \&\fB\-mthreads\fR option. When compiling, \fB\-mthreads\fR defines |
| 13621 | \&\f(CW\*(C`\-D_MT\*(C'\fR; when linking, it links in a special thread helper library |
| 13622 | \&\fB\-lmingwthrd\fR which cleans up per-thread exception-handling data. |
| 13623 | .IP "\fB\-mno\-align\-stringops\fR" 4 |
| 13624 | .IX Item "-mno-align-stringops" |
| 13625 | Do not align the destination of inlined string operations. This switch reduces |
| 13626 | code size and improves performance in case the destination is already aligned, |
| 13627 | but \s-1GCC\s0 doesn't know about it. |
| 13628 | .IP "\fB\-minline\-all\-stringops\fR" 4 |
| 13629 | .IX Item "-minline-all-stringops" |
| 13630 | By default \s-1GCC\s0 inlines string operations only when the destination is |
| 13631 | known to be aligned to least a 4\-byte boundary. |
| 13632 | This enables more inlining and increases code |
| 13633 | size, but may improve performance of code that depends on fast |
| 13634 | \&\f(CW\*(C`memcpy\*(C'\fR, \f(CW\*(C`strlen\*(C'\fR, |
| 13635 | and \f(CW\*(C`memset\*(C'\fR for short lengths. |
| 13636 | .IP "\fB\-minline\-stringops\-dynamically\fR" 4 |
| 13637 | .IX Item "-minline-stringops-dynamically" |
| 13638 | For string operations of unknown size, use run-time checks with |
| 13639 | inline code for small blocks and a library call for large blocks. |
| 13640 | .IP "\fB\-mstringop\-strategy=\fR\fIalg\fR" 4 |
| 13641 | .IX Item "-mstringop-strategy=alg" |
| 13642 | Override the internal decision heuristic for the particular algorithm to use |
| 13643 | for inlining string operations. The allowed values for \fIalg\fR are: |
| 13644 | .RS 4 |
| 13645 | .IP "\fBrep_byte\fR" 4 |
| 13646 | .IX Item "rep_byte" |
| 13647 | .PD 0 |
| 13648 | .IP "\fBrep_4byte\fR" 4 |
| 13649 | .IX Item "rep_4byte" |
| 13650 | .IP "\fBrep_8byte\fR" 4 |
| 13651 | .IX Item "rep_8byte" |
| 13652 | .PD |
| 13653 | Expand using i386 \f(CW\*(C`rep\*(C'\fR prefix of the specified size. |
| 13654 | .IP "\fBbyte_loop\fR" 4 |
| 13655 | .IX Item "byte_loop" |
| 13656 | .PD 0 |
| 13657 | .IP "\fBloop\fR" 4 |
| 13658 | .IX Item "loop" |
| 13659 | .IP "\fBunrolled_loop\fR" 4 |
| 13660 | .IX Item "unrolled_loop" |
| 13661 | .PD |
| 13662 | Expand into an inline loop. |
| 13663 | .IP "\fBlibcall\fR" 4 |
| 13664 | .IX Item "libcall" |
| 13665 | Always use a library call. |
| 13666 | .RE |
| 13667 | .RS 4 |
| 13668 | .RE |
| 13669 | .IP "\fB\-momit\-leaf\-frame\-pointer\fR" 4 |
| 13670 | .IX Item "-momit-leaf-frame-pointer" |
| 13671 | Don't keep the frame pointer in a register for leaf functions. This |
| 13672 | avoids the instructions to save, set up, and restore frame pointers and |
| 13673 | makes an extra register available in leaf functions. The option |
| 13674 | \&\fB\-fomit\-leaf\-frame\-pointer\fR removes the frame pointer for leaf functions, |
| 13675 | which might make debugging harder. |
| 13676 | .IP "\fB\-mtls\-direct\-seg\-refs\fR" 4 |
| 13677 | .IX Item "-mtls-direct-seg-refs" |
| 13678 | .PD 0 |
| 13679 | .IP "\fB\-mno\-tls\-direct\-seg\-refs\fR" 4 |
| 13680 | .IX Item "-mno-tls-direct-seg-refs" |
| 13681 | .PD |
| 13682 | Controls whether \s-1TLS\s0 variables may be accessed with offsets from the |
| 13683 | \&\s-1TLS\s0 segment register (\f(CW%gs\fR for 32\-bit, \f(CW%fs\fR for 64\-bit), |
| 13684 | or whether the thread base pointer must be added. Whether or not this |
| 13685 | is valid depends on the operating system, and whether it maps the |
| 13686 | segment to cover the entire \s-1TLS\s0 area. |
| 13687 | .Sp |
| 13688 | For systems that use the \s-1GNU\s0 C Library, the default is on. |
| 13689 | .IP "\fB\-msse2avx\fR" 4 |
| 13690 | .IX Item "-msse2avx" |
| 13691 | .PD 0 |
| 13692 | .IP "\fB\-mno\-sse2avx\fR" 4 |
| 13693 | .IX Item "-mno-sse2avx" |
| 13694 | .PD |
| 13695 | Specify that the assembler should encode \s-1SSE\s0 instructions with \s-1VEX\s0 |
| 13696 | prefix. The option \fB\-mavx\fR turns this on by default. |
| 13697 | .IP "\fB\-mfentry\fR" 4 |
| 13698 | .IX Item "-mfentry" |
| 13699 | .PD 0 |
| 13700 | .IP "\fB\-mno\-fentry\fR" 4 |
| 13701 | .IX Item "-mno-fentry" |
| 13702 | .PD |
| 13703 | If profiling is active (\fB\-pg\fR), put the profiling |
| 13704 | counter call before the prologue. |
| 13705 | Note: On x86 architectures the attribute \f(CW\*(C`ms_hook_prologue\*(C'\fR |
| 13706 | isn't possible at the moment for \fB\-mfentry\fR and \fB\-pg\fR. |
| 13707 | .IP "\fB\-m8bit\-idiv\fR" 4 |
| 13708 | .IX Item "-m8bit-idiv" |
| 13709 | .PD 0 |
| 13710 | .IP "\fB\-mno\-8bit\-idiv\fR" 4 |
| 13711 | .IX Item "-mno-8bit-idiv" |
| 13712 | .PD |
| 13713 | On some processors, like Intel Atom, 8\-bit unsigned integer divide is |
| 13714 | much faster than 32\-bit/64\-bit integer divide. This option generates a |
| 13715 | run-time check. If both dividend and divisor are within range of 0 |
| 13716 | to 255, 8\-bit unsigned integer divide is used instead of |
| 13717 | 32\-bit/64\-bit integer divide. |
| 13718 | .IP "\fB\-mavx256\-split\-unaligned\-load\fR" 4 |
| 13719 | .IX Item "-mavx256-split-unaligned-load" |
| 13720 | .PD 0 |
| 13721 | .IP "\fB\-mavx256\-split\-unaligned\-store\fR" 4 |
| 13722 | .IX Item "-mavx256-split-unaligned-store" |
| 13723 | .PD |
| 13724 | Split 32\-byte \s-1AVX\s0 unaligned load and store. |
| 13725 | .PP |
| 13726 | These \fB\-m\fR switches are supported in addition to the above |
| 13727 | on x86\-64 processors in 64\-bit environments. |
| 13728 | .IP "\fB\-m32\fR" 4 |
| 13729 | .IX Item "-m32" |
| 13730 | .PD 0 |
| 13731 | .IP "\fB\-m64\fR" 4 |
| 13732 | .IX Item "-m64" |
| 13733 | .IP "\fB\-mx32\fR" 4 |
| 13734 | .IX Item "-mx32" |
| 13735 | .PD |
| 13736 | Generate code for a 32\-bit or 64\-bit environment. |
| 13737 | The \fB\-m32\fR option sets \f(CW\*(C`int\*(C'\fR, \f(CW\*(C`long\*(C'\fR, and pointer types |
| 13738 | to 32 bits, and |
| 13739 | generates code that runs on any i386 system. |
| 13740 | .Sp |
| 13741 | The \fB\-m64\fR option sets \f(CW\*(C`int\*(C'\fR to 32 bits and \f(CW\*(C`long\*(C'\fR and pointer |
| 13742 | types to 64 bits, and generates code for the x86\-64 architecture. |
| 13743 | For Darwin only the \fB\-m64\fR option also turns off the \fB\-fno\-pic\fR |
| 13744 | and \fB\-mdynamic\-no\-pic\fR options. |
| 13745 | .Sp |
| 13746 | The \fB\-mx32\fR option sets \f(CW\*(C`int\*(C'\fR, \f(CW\*(C`long\*(C'\fR, and pointer types |
| 13747 | to 32 bits, and |
| 13748 | generates code for the x86\-64 architecture. |
| 13749 | .IP "\fB\-mno\-red\-zone\fR" 4 |
| 13750 | .IX Item "-mno-red-zone" |
| 13751 | Do not use a so-called \*(L"red zone\*(R" for x86\-64 code. The red zone is mandated |
| 13752 | by the x86\-64 \s-1ABI\s0; it is a 128\-byte area beyond the location of the |
| 13753 | stack pointer that is not modified by signal or interrupt handlers |
| 13754 | and therefore can be used for temporary data without adjusting the stack |
| 13755 | pointer. The flag \fB\-mno\-red\-zone\fR disables this red zone. |
| 13756 | .IP "\fB\-mcmodel=small\fR" 4 |
| 13757 | .IX Item "-mcmodel=small" |
| 13758 | Generate code for the small code model: the program and its symbols must |
| 13759 | be linked in the lower 2 \s-1GB\s0 of the address space. Pointers are 64 bits. |
| 13760 | Programs can be statically or dynamically linked. This is the default |
| 13761 | code model. |
| 13762 | .IP "\fB\-mcmodel=kernel\fR" 4 |
| 13763 | .IX Item "-mcmodel=kernel" |
| 13764 | Generate code for the kernel code model. The kernel runs in the |
| 13765 | negative 2 \s-1GB\s0 of the address space. |
| 13766 | This model has to be used for Linux kernel code. |
| 13767 | .IP "\fB\-mcmodel=medium\fR" 4 |
| 13768 | .IX Item "-mcmodel=medium" |
| 13769 | Generate code for the medium model: the program is linked in the lower 2 |
| 13770 | \&\s-1GB\s0 of the address space. Small symbols are also placed there. Symbols |
| 13771 | with sizes larger than \fB\-mlarge\-data\-threshold\fR are put into |
| 13772 | large data or \s-1BSS\s0 sections and can be located above 2GB. Programs can |
| 13773 | be statically or dynamically linked. |
| 13774 | .IP "\fB\-mcmodel=large\fR" 4 |
| 13775 | .IX Item "-mcmodel=large" |
| 13776 | Generate code for the large model. This model makes no assumptions |
| 13777 | about addresses and sizes of sections. |
| 13778 | .IP "\fB\-maddress\-mode=long\fR" 4 |
| 13779 | .IX Item "-maddress-mode=long" |
| 13780 | Generate code for long address mode. This is only supported for 64\-bit |
| 13781 | and x32 environments. It is the default address mode for 64\-bit |
| 13782 | environments. |
| 13783 | .IP "\fB\-maddress\-mode=short\fR" 4 |
| 13784 | .IX Item "-maddress-mode=short" |
| 13785 | Generate code for short address mode. This is only supported for 32\-bit |
| 13786 | and x32 environments. It is the default address mode for 32\-bit and |
| 13787 | x32 environments. |
| 13788 | .PP |
| 13789 | \fIi386 and x86\-64 Windows Options\fR |
| 13790 | .IX Subsection "i386 and x86-64 Windows Options" |
| 13791 | .PP |
| 13792 | These additional options are available for Microsoft Windows targets: |
| 13793 | .IP "\fB\-mconsole\fR" 4 |
| 13794 | .IX Item "-mconsole" |
| 13795 | This option |
| 13796 | specifies that a console application is to be generated, by |
| 13797 | instructing the linker to set the \s-1PE\s0 header subsystem type |
| 13798 | required for console applications. |
| 13799 | This option is available for Cygwin and MinGW targets and is |
| 13800 | enabled by default on those targets. |
| 13801 | .IP "\fB\-mdll\fR" 4 |
| 13802 | .IX Item "-mdll" |
| 13803 | This option is available for Cygwin and MinGW targets. It |
| 13804 | specifies that a DLL\-\-\-a dynamic link library\-\-\-is to be |
| 13805 | generated, enabling the selection of the required runtime |
| 13806 | startup object and entry point. |
| 13807 | .IP "\fB\-mnop\-fun\-dllimport\fR" 4 |
| 13808 | .IX Item "-mnop-fun-dllimport" |
| 13809 | This option is available for Cygwin and MinGW targets. It |
| 13810 | specifies that the \f(CW\*(C`dllimport\*(C'\fR attribute should be ignored. |
| 13811 | .IP "\fB\-mthread\fR" 4 |
| 13812 | .IX Item "-mthread" |
| 13813 | This option is available for MinGW targets. It specifies |
| 13814 | that MinGW-specific thread support is to be used. |
| 13815 | .IP "\fB\-municode\fR" 4 |
| 13816 | .IX Item "-municode" |
| 13817 | This option is available for MinGW\-w64 targets. It causes |
| 13818 | the \f(CW\*(C`UNICODE\*(C'\fR preprocessor macro to be predefined, and |
| 13819 | chooses Unicode-capable runtime startup code. |
| 13820 | .IP "\fB\-mwin32\fR" 4 |
| 13821 | .IX Item "-mwin32" |
| 13822 | This option is available for Cygwin and MinGW targets. It |
| 13823 | specifies that the typical Microsoft Windows predefined macros are to |
| 13824 | be set in the pre-processor, but does not influence the choice |
| 13825 | of runtime library/startup code. |
| 13826 | .IP "\fB\-mwindows\fR" 4 |
| 13827 | .IX Item "-mwindows" |
| 13828 | This option is available for Cygwin and MinGW targets. It |
| 13829 | specifies that a \s-1GUI\s0 application is to be generated by |
| 13830 | instructing the linker to set the \s-1PE\s0 header subsystem type |
| 13831 | appropriately. |
| 13832 | .IP "\fB\-fno\-set\-stack\-executable\fR" 4 |
| 13833 | .IX Item "-fno-set-stack-executable" |
| 13834 | This option is available for MinGW targets. It specifies that |
| 13835 | the executable flag for the stack used by nested functions isn't |
| 13836 | set. This is necessary for binaries running in kernel mode of |
| 13837 | Microsoft Windows, as there the User32 \s-1API\s0, which is used to set executable |
| 13838 | privileges, isn't available. |
| 13839 | .IP "\fB\-fwritable\-relocated\-rdata\fR" 4 |
| 13840 | .IX Item "-fwritable-relocated-rdata" |
| 13841 | This option is available for MinGW and Cygwin targets. It specifies |
| 13842 | that relocated-data in read-only section is put into .data |
| 13843 | section. This is a necessary for older runtimes not supporting |
| 13844 | modification of .rdata sections for pseudo-relocation. |
| 13845 | .IP "\fB\-mpe\-aligned\-commons\fR" 4 |
| 13846 | .IX Item "-mpe-aligned-commons" |
| 13847 | This option is available for Cygwin and MinGW targets. It |
| 13848 | specifies that the \s-1GNU\s0 extension to the \s-1PE\s0 file format that |
| 13849 | permits the correct alignment of \s-1COMMON\s0 variables should be |
| 13850 | used when generating code. It is enabled by default if |
| 13851 | \&\s-1GCC\s0 detects that the target assembler found during configuration |
| 13852 | supports the feature. |
| 13853 | .PP |
| 13854 | See also under \fBi386 and x86\-64 Options\fR for standard options. |
| 13855 | .PP |
| 13856 | \fI\s-1IA\-64\s0 Options\fR |
| 13857 | .IX Subsection "IA-64 Options" |
| 13858 | .PP |
| 13859 | These are the \fB\-m\fR options defined for the Intel \s-1IA\-64\s0 architecture. |
| 13860 | .IP "\fB\-mbig\-endian\fR" 4 |
| 13861 | .IX Item "-mbig-endian" |
| 13862 | Generate code for a big-endian target. This is the default for HP-UX. |
| 13863 | .IP "\fB\-mlittle\-endian\fR" 4 |
| 13864 | .IX Item "-mlittle-endian" |
| 13865 | Generate code for a little-endian target. This is the default for \s-1AIX5\s0 |
| 13866 | and GNU/Linux. |
| 13867 | .IP "\fB\-mgnu\-as\fR" 4 |
| 13868 | .IX Item "-mgnu-as" |
| 13869 | .PD 0 |
| 13870 | .IP "\fB\-mno\-gnu\-as\fR" 4 |
| 13871 | .IX Item "-mno-gnu-as" |
| 13872 | .PD |
| 13873 | Generate (or don't) code for the \s-1GNU\s0 assembler. This is the default. |
| 13874 | .IP "\fB\-mgnu\-ld\fR" 4 |
| 13875 | .IX Item "-mgnu-ld" |
| 13876 | .PD 0 |
| 13877 | .IP "\fB\-mno\-gnu\-ld\fR" 4 |
| 13878 | .IX Item "-mno-gnu-ld" |
| 13879 | .PD |
| 13880 | Generate (or don't) code for the \s-1GNU\s0 linker. This is the default. |
| 13881 | .IP "\fB\-mno\-pic\fR" 4 |
| 13882 | .IX Item "-mno-pic" |
| 13883 | Generate code that does not use a global pointer register. The result |
| 13884 | is not position independent code, and violates the \s-1IA\-64\s0 \s-1ABI\s0. |
| 13885 | .IP "\fB\-mvolatile\-asm\-stop\fR" 4 |
| 13886 | .IX Item "-mvolatile-asm-stop" |
| 13887 | .PD 0 |
| 13888 | .IP "\fB\-mno\-volatile\-asm\-stop\fR" 4 |
| 13889 | .IX Item "-mno-volatile-asm-stop" |
| 13890 | .PD |
| 13891 | Generate (or don't) a stop bit immediately before and after volatile asm |
| 13892 | statements. |
| 13893 | .IP "\fB\-mregister\-names\fR" 4 |
| 13894 | .IX Item "-mregister-names" |
| 13895 | .PD 0 |
| 13896 | .IP "\fB\-mno\-register\-names\fR" 4 |
| 13897 | .IX Item "-mno-register-names" |
| 13898 | .PD |
| 13899 | Generate (or don't) \fBin\fR, \fBloc\fR, and \fBout\fR register names for |
| 13900 | the stacked registers. This may make assembler output more readable. |
| 13901 | .IP "\fB\-mno\-sdata\fR" 4 |
| 13902 | .IX Item "-mno-sdata" |
| 13903 | .PD 0 |
| 13904 | .IP "\fB\-msdata\fR" 4 |
| 13905 | .IX Item "-msdata" |
| 13906 | .PD |
| 13907 | Disable (or enable) optimizations that use the small data section. This may |
| 13908 | be useful for working around optimizer bugs. |
| 13909 | .IP "\fB\-mconstant\-gp\fR" 4 |
| 13910 | .IX Item "-mconstant-gp" |
| 13911 | Generate code that uses a single constant global pointer value. This is |
| 13912 | useful when compiling kernel code. |
| 13913 | .IP "\fB\-mauto\-pic\fR" 4 |
| 13914 | .IX Item "-mauto-pic" |
| 13915 | Generate code that is self-relocatable. This implies \fB\-mconstant\-gp\fR. |
| 13916 | This is useful when compiling firmware code. |
| 13917 | .IP "\fB\-minline\-float\-divide\-min\-latency\fR" 4 |
| 13918 | .IX Item "-minline-float-divide-min-latency" |
| 13919 | Generate code for inline divides of floating-point values |
| 13920 | using the minimum latency algorithm. |
| 13921 | .IP "\fB\-minline\-float\-divide\-max\-throughput\fR" 4 |
| 13922 | .IX Item "-minline-float-divide-max-throughput" |
| 13923 | Generate code for inline divides of floating-point values |
| 13924 | using the maximum throughput algorithm. |
| 13925 | .IP "\fB\-mno\-inline\-float\-divide\fR" 4 |
| 13926 | .IX Item "-mno-inline-float-divide" |
| 13927 | Do not generate inline code for divides of floating-point values. |
| 13928 | .IP "\fB\-minline\-int\-divide\-min\-latency\fR" 4 |
| 13929 | .IX Item "-minline-int-divide-min-latency" |
| 13930 | Generate code for inline divides of integer values |
| 13931 | using the minimum latency algorithm. |
| 13932 | .IP "\fB\-minline\-int\-divide\-max\-throughput\fR" 4 |
| 13933 | .IX Item "-minline-int-divide-max-throughput" |
| 13934 | Generate code for inline divides of integer values |
| 13935 | using the maximum throughput algorithm. |
| 13936 | .IP "\fB\-mno\-inline\-int\-divide\fR" 4 |
| 13937 | .IX Item "-mno-inline-int-divide" |
| 13938 | Do not generate inline code for divides of integer values. |
| 13939 | .IP "\fB\-minline\-sqrt\-min\-latency\fR" 4 |
| 13940 | .IX Item "-minline-sqrt-min-latency" |
| 13941 | Generate code for inline square roots |
| 13942 | using the minimum latency algorithm. |
| 13943 | .IP "\fB\-minline\-sqrt\-max\-throughput\fR" 4 |
| 13944 | .IX Item "-minline-sqrt-max-throughput" |
| 13945 | Generate code for inline square roots |
| 13946 | using the maximum throughput algorithm. |
| 13947 | .IP "\fB\-mno\-inline\-sqrt\fR" 4 |
| 13948 | .IX Item "-mno-inline-sqrt" |
| 13949 | Do not generate inline code for \f(CW\*(C`sqrt\*(C'\fR. |
| 13950 | .IP "\fB\-mfused\-madd\fR" 4 |
| 13951 | .IX Item "-mfused-madd" |
| 13952 | .PD 0 |
| 13953 | .IP "\fB\-mno\-fused\-madd\fR" 4 |
| 13954 | .IX Item "-mno-fused-madd" |
| 13955 | .PD |
| 13956 | Do (don't) generate code that uses the fused multiply/add or multiply/subtract |
| 13957 | instructions. The default is to use these instructions. |
| 13958 | .IP "\fB\-mno\-dwarf2\-asm\fR" 4 |
| 13959 | .IX Item "-mno-dwarf2-asm" |
| 13960 | .PD 0 |
| 13961 | .IP "\fB\-mdwarf2\-asm\fR" 4 |
| 13962 | .IX Item "-mdwarf2-asm" |
| 13963 | .PD |
| 13964 | Don't (or do) generate assembler code for the \s-1DWARF\s0 2 line number debugging |
| 13965 | info. This may be useful when not using the \s-1GNU\s0 assembler. |
| 13966 | .IP "\fB\-mearly\-stop\-bits\fR" 4 |
| 13967 | .IX Item "-mearly-stop-bits" |
| 13968 | .PD 0 |
| 13969 | .IP "\fB\-mno\-early\-stop\-bits\fR" 4 |
| 13970 | .IX Item "-mno-early-stop-bits" |
| 13971 | .PD |
| 13972 | Allow stop bits to be placed earlier than immediately preceding the |
| 13973 | instruction that triggered the stop bit. This can improve instruction |
| 13974 | scheduling, but does not always do so. |
| 13975 | .IP "\fB\-mfixed\-range=\fR\fIregister-range\fR" 4 |
| 13976 | .IX Item "-mfixed-range=register-range" |
| 13977 | Generate code treating the given register range as fixed registers. |
| 13978 | A fixed register is one that the register allocator cannot use. This is |
| 13979 | useful when compiling kernel code. A register range is specified as |
| 13980 | two registers separated by a dash. Multiple register ranges can be |
| 13981 | specified separated by a comma. |
| 13982 | .IP "\fB\-mtls\-size=\fR\fItls-size\fR" 4 |
| 13983 | .IX Item "-mtls-size=tls-size" |
| 13984 | Specify bit size of immediate \s-1TLS\s0 offsets. Valid values are 14, 22, and |
| 13985 | 64. |
| 13986 | .IP "\fB\-mtune=\fR\fIcpu-type\fR" 4 |
| 13987 | .IX Item "-mtune=cpu-type" |
| 13988 | Tune the instruction scheduling for a particular \s-1CPU\s0, Valid values are |
| 13989 | \&\fBitanium\fR, \fBitanium1\fR, \fBmerced\fR, \fBitanium2\fR, |
| 13990 | and \fBmckinley\fR. |
| 13991 | .IP "\fB\-milp32\fR" 4 |
| 13992 | .IX Item "-milp32" |
| 13993 | .PD 0 |
| 13994 | .IP "\fB\-mlp64\fR" 4 |
| 13995 | .IX Item "-mlp64" |
| 13996 | .PD |
| 13997 | Generate code for a 32\-bit or 64\-bit environment. |
| 13998 | The 32\-bit environment sets int, long and pointer to 32 bits. |
| 13999 | The 64\-bit environment sets int to 32 bits and long and pointer |
| 14000 | to 64 bits. These are HP-UX specific flags. |
| 14001 | .IP "\fB\-mno\-sched\-br\-data\-spec\fR" 4 |
| 14002 | .IX Item "-mno-sched-br-data-spec" |
| 14003 | .PD 0 |
| 14004 | .IP "\fB\-msched\-br\-data\-spec\fR" 4 |
| 14005 | .IX Item "-msched-br-data-spec" |
| 14006 | .PD |
| 14007 | (Dis/En)able data speculative scheduling before reload. |
| 14008 | This results in generation of \f(CW\*(C`ld.a\*(C'\fR instructions and |
| 14009 | the corresponding check instructions (\f(CW\*(C`ld.c\*(C'\fR / \f(CW\*(C`chk.a\*(C'\fR). |
| 14010 | The default is 'disable'. |
| 14011 | .IP "\fB\-msched\-ar\-data\-spec\fR" 4 |
| 14012 | .IX Item "-msched-ar-data-spec" |
| 14013 | .PD 0 |
| 14014 | .IP "\fB\-mno\-sched\-ar\-data\-spec\fR" 4 |
| 14015 | .IX Item "-mno-sched-ar-data-spec" |
| 14016 | .PD |
| 14017 | (En/Dis)able data speculative scheduling after reload. |
| 14018 | This results in generation of \f(CW\*(C`ld.a\*(C'\fR instructions and |
| 14019 | the corresponding check instructions (\f(CW\*(C`ld.c\*(C'\fR / \f(CW\*(C`chk.a\*(C'\fR). |
| 14020 | The default is 'enable'. |
| 14021 | .IP "\fB\-mno\-sched\-control\-spec\fR" 4 |
| 14022 | .IX Item "-mno-sched-control-spec" |
| 14023 | .PD 0 |
| 14024 | .IP "\fB\-msched\-control\-spec\fR" 4 |
| 14025 | .IX Item "-msched-control-spec" |
| 14026 | .PD |
| 14027 | (Dis/En)able control speculative scheduling. This feature is |
| 14028 | available only during region scheduling (i.e. before reload). |
| 14029 | This results in generation of the \f(CW\*(C`ld.s\*(C'\fR instructions and |
| 14030 | the corresponding check instructions \f(CW\*(C`chk.s\*(C'\fR. |
| 14031 | The default is 'disable'. |
| 14032 | .IP "\fB\-msched\-br\-in\-data\-spec\fR" 4 |
| 14033 | .IX Item "-msched-br-in-data-spec" |
| 14034 | .PD 0 |
| 14035 | .IP "\fB\-mno\-sched\-br\-in\-data\-spec\fR" 4 |
| 14036 | .IX Item "-mno-sched-br-in-data-spec" |
| 14037 | .PD |
| 14038 | (En/Dis)able speculative scheduling of the instructions that |
| 14039 | are dependent on the data speculative loads before reload. |
| 14040 | This is effective only with \fB\-msched\-br\-data\-spec\fR enabled. |
| 14041 | The default is 'enable'. |
| 14042 | .IP "\fB\-msched\-ar\-in\-data\-spec\fR" 4 |
| 14043 | .IX Item "-msched-ar-in-data-spec" |
| 14044 | .PD 0 |
| 14045 | .IP "\fB\-mno\-sched\-ar\-in\-data\-spec\fR" 4 |
| 14046 | .IX Item "-mno-sched-ar-in-data-spec" |
| 14047 | .PD |
| 14048 | (En/Dis)able speculative scheduling of the instructions that |
| 14049 | are dependent on the data speculative loads after reload. |
| 14050 | This is effective only with \fB\-msched\-ar\-data\-spec\fR enabled. |
| 14051 | The default is 'enable'. |
| 14052 | .IP "\fB\-msched\-in\-control\-spec\fR" 4 |
| 14053 | .IX Item "-msched-in-control-spec" |
| 14054 | .PD 0 |
| 14055 | .IP "\fB\-mno\-sched\-in\-control\-spec\fR" 4 |
| 14056 | .IX Item "-mno-sched-in-control-spec" |
| 14057 | .PD |
| 14058 | (En/Dis)able speculative scheduling of the instructions that |
| 14059 | are dependent on the control speculative loads. |
| 14060 | This is effective only with \fB\-msched\-control\-spec\fR enabled. |
| 14061 | The default is 'enable'. |
| 14062 | .IP "\fB\-mno\-sched\-prefer\-non\-data\-spec\-insns\fR" 4 |
| 14063 | .IX Item "-mno-sched-prefer-non-data-spec-insns" |
| 14064 | .PD 0 |
| 14065 | .IP "\fB\-msched\-prefer\-non\-data\-spec\-insns\fR" 4 |
| 14066 | .IX Item "-msched-prefer-non-data-spec-insns" |
| 14067 | .PD |
| 14068 | If enabled, data-speculative instructions are chosen for schedule |
| 14069 | only if there are no other choices at the moment. This makes |
| 14070 | the use of the data speculation much more conservative. |
| 14071 | The default is 'disable'. |
| 14072 | .IP "\fB\-mno\-sched\-prefer\-non\-control\-spec\-insns\fR" 4 |
| 14073 | .IX Item "-mno-sched-prefer-non-control-spec-insns" |
| 14074 | .PD 0 |
| 14075 | .IP "\fB\-msched\-prefer\-non\-control\-spec\-insns\fR" 4 |
| 14076 | .IX Item "-msched-prefer-non-control-spec-insns" |
| 14077 | .PD |
| 14078 | If enabled, control-speculative instructions are chosen for schedule |
| 14079 | only if there are no other choices at the moment. This makes |
| 14080 | the use of the control speculation much more conservative. |
| 14081 | The default is 'disable'. |
| 14082 | .IP "\fB\-mno\-sched\-count\-spec\-in\-critical\-path\fR" 4 |
| 14083 | .IX Item "-mno-sched-count-spec-in-critical-path" |
| 14084 | .PD 0 |
| 14085 | .IP "\fB\-msched\-count\-spec\-in\-critical\-path\fR" 4 |
| 14086 | .IX Item "-msched-count-spec-in-critical-path" |
| 14087 | .PD |
| 14088 | If enabled, speculative dependencies are considered during |
| 14089 | computation of the instructions priorities. This makes the use of the |
| 14090 | speculation a bit more conservative. |
| 14091 | The default is 'disable'. |
| 14092 | .IP "\fB\-msched\-spec\-ldc\fR" 4 |
| 14093 | .IX Item "-msched-spec-ldc" |
| 14094 | Use a simple data speculation check. This option is on by default. |
| 14095 | .IP "\fB\-msched\-control\-spec\-ldc\fR" 4 |
| 14096 | .IX Item "-msched-control-spec-ldc" |
| 14097 | Use a simple check for control speculation. This option is on by default. |
| 14098 | .IP "\fB\-msched\-stop\-bits\-after\-every\-cycle\fR" 4 |
| 14099 | .IX Item "-msched-stop-bits-after-every-cycle" |
| 14100 | Place a stop bit after every cycle when scheduling. This option is on |
| 14101 | by default. |
| 14102 | .IP "\fB\-msched\-fp\-mem\-deps\-zero\-cost\fR" 4 |
| 14103 | .IX Item "-msched-fp-mem-deps-zero-cost" |
| 14104 | Assume that floating-point stores and loads are not likely to cause a conflict |
| 14105 | when placed into the same instruction group. This option is disabled by |
| 14106 | default. |
| 14107 | .IP "\fB\-msel\-sched\-dont\-check\-control\-spec\fR" 4 |
| 14108 | .IX Item "-msel-sched-dont-check-control-spec" |
| 14109 | Generate checks for control speculation in selective scheduling. |
| 14110 | This flag is disabled by default. |
| 14111 | .IP "\fB\-msched\-max\-memory\-insns=\fR\fImax-insns\fR" 4 |
| 14112 | .IX Item "-msched-max-memory-insns=max-insns" |
| 14113 | Limit on the number of memory insns per instruction group, giving lower |
| 14114 | priority to subsequent memory insns attempting to schedule in the same |
| 14115 | instruction group. Frequently useful to prevent cache bank conflicts. |
| 14116 | The default value is 1. |
| 14117 | .IP "\fB\-msched\-max\-memory\-insns\-hard\-limit\fR" 4 |
| 14118 | .IX Item "-msched-max-memory-insns-hard-limit" |
| 14119 | Makes the limit specified by \fBmsched-max-memory-insns\fR a hard limit, |
| 14120 | disallowing more than that number in an instruction group. |
| 14121 | Otherwise, the limit is \*(L"soft\*(R", meaning that non-memory operations |
| 14122 | are preferred when the limit is reached, but memory operations may still |
| 14123 | be scheduled. |
| 14124 | .PP |
| 14125 | \fI\s-1LM32\s0 Options\fR |
| 14126 | .IX Subsection "LM32 Options" |
| 14127 | .PP |
| 14128 | These \fB\-m\fR options are defined for the LatticeMico32 architecture: |
| 14129 | .IP "\fB\-mbarrel\-shift\-enabled\fR" 4 |
| 14130 | .IX Item "-mbarrel-shift-enabled" |
| 14131 | Enable barrel-shift instructions. |
| 14132 | .IP "\fB\-mdivide\-enabled\fR" 4 |
| 14133 | .IX Item "-mdivide-enabled" |
| 14134 | Enable divide and modulus instructions. |
| 14135 | .IP "\fB\-mmultiply\-enabled\fR" 4 |
| 14136 | .IX Item "-mmultiply-enabled" |
| 14137 | Enable multiply instructions. |
| 14138 | .IP "\fB\-msign\-extend\-enabled\fR" 4 |
| 14139 | .IX Item "-msign-extend-enabled" |
| 14140 | Enable sign extend instructions. |
| 14141 | .IP "\fB\-muser\-enabled\fR" 4 |
| 14142 | .IX Item "-muser-enabled" |
| 14143 | Enable user-defined instructions. |
| 14144 | .PP |
| 14145 | \fIM32C Options\fR |
| 14146 | .IX Subsection "M32C Options" |
| 14147 | .IP "\fB\-mcpu=\fR\fIname\fR" 4 |
| 14148 | .IX Item "-mcpu=name" |
| 14149 | Select the \s-1CPU\s0 for which code is generated. \fIname\fR may be one of |
| 14150 | \&\fBr8c\fR for the R8C/Tiny series, \fBm16c\fR for the M16C (up to |
| 14151 | /60) series, \fBm32cm\fR for the M16C/80 series, or \fBm32c\fR for |
| 14152 | the M32C/80 series. |
| 14153 | .IP "\fB\-msim\fR" 4 |
| 14154 | .IX Item "-msim" |
| 14155 | Specifies that the program will be run on the simulator. This causes |
| 14156 | an alternate runtime library to be linked in which supports, for |
| 14157 | example, file I/O. You must not use this option when generating |
| 14158 | programs that will run on real hardware; you must provide your own |
| 14159 | runtime library for whatever I/O functions are needed. |
| 14160 | .IP "\fB\-memregs=\fR\fInumber\fR" 4 |
| 14161 | .IX Item "-memregs=number" |
| 14162 | Specifies the number of memory-based pseudo-registers \s-1GCC\s0 uses |
| 14163 | during code generation. These pseudo-registers are used like real |
| 14164 | registers, so there is a tradeoff between \s-1GCC\s0's ability to fit the |
| 14165 | code into available registers, and the performance penalty of using |
| 14166 | memory instead of registers. Note that all modules in a program must |
| 14167 | be compiled with the same value for this option. Because of that, you |
| 14168 | must not use this option with \s-1GCC\s0's default runtime libraries. |
| 14169 | .PP |
| 14170 | \fIM32R/D Options\fR |
| 14171 | .IX Subsection "M32R/D Options" |
| 14172 | .PP |
| 14173 | These \fB\-m\fR options are defined for Renesas M32R/D architectures: |
| 14174 | .IP "\fB\-m32r2\fR" 4 |
| 14175 | .IX Item "-m32r2" |
| 14176 | Generate code for the M32R/2. |
| 14177 | .IP "\fB\-m32rx\fR" 4 |
| 14178 | .IX Item "-m32rx" |
| 14179 | Generate code for the M32R/X. |
| 14180 | .IP "\fB\-m32r\fR" 4 |
| 14181 | .IX Item "-m32r" |
| 14182 | Generate code for the M32R. This is the default. |
| 14183 | .IP "\fB\-mmodel=small\fR" 4 |
| 14184 | .IX Item "-mmodel=small" |
| 14185 | Assume all objects live in the lower 16MB of memory (so that their addresses |
| 14186 | can be loaded with the \f(CW\*(C`ld24\*(C'\fR instruction), and assume all subroutines |
| 14187 | are reachable with the \f(CW\*(C`bl\*(C'\fR instruction. |
| 14188 | This is the default. |
| 14189 | .Sp |
| 14190 | The addressability of a particular object can be set with the |
| 14191 | \&\f(CW\*(C`model\*(C'\fR attribute. |
| 14192 | .IP "\fB\-mmodel=medium\fR" 4 |
| 14193 | .IX Item "-mmodel=medium" |
| 14194 | Assume objects may be anywhere in the 32\-bit address space (the compiler |
| 14195 | generates \f(CW\*(C`seth/add3\*(C'\fR instructions to load their addresses), and |
| 14196 | assume all subroutines are reachable with the \f(CW\*(C`bl\*(C'\fR instruction. |
| 14197 | .IP "\fB\-mmodel=large\fR" 4 |
| 14198 | .IX Item "-mmodel=large" |
| 14199 | Assume objects may be anywhere in the 32\-bit address space (the compiler |
| 14200 | generates \f(CW\*(C`seth/add3\*(C'\fR instructions to load their addresses), and |
| 14201 | assume subroutines may not be reachable with the \f(CW\*(C`bl\*(C'\fR instruction |
| 14202 | (the compiler generates the much slower \f(CW\*(C`seth/add3/jl\*(C'\fR |
| 14203 | instruction sequence). |
| 14204 | .IP "\fB\-msdata=none\fR" 4 |
| 14205 | .IX Item "-msdata=none" |
| 14206 | Disable use of the small data area. Variables are put into |
| 14207 | one of \fB.data\fR, \fB.bss\fR, or \fB.rodata\fR (unless the |
| 14208 | \&\f(CW\*(C`section\*(C'\fR attribute has been specified). |
| 14209 | This is the default. |
| 14210 | .Sp |
| 14211 | The small data area consists of sections \fB.sdata\fR and \fB.sbss\fR. |
| 14212 | Objects may be explicitly put in the small data area with the |
| 14213 | \&\f(CW\*(C`section\*(C'\fR attribute using one of these sections. |
| 14214 | .IP "\fB\-msdata=sdata\fR" 4 |
| 14215 | .IX Item "-msdata=sdata" |
| 14216 | Put small global and static data in the small data area, but do not |
| 14217 | generate special code to reference them. |
| 14218 | .IP "\fB\-msdata=use\fR" 4 |
| 14219 | .IX Item "-msdata=use" |
| 14220 | Put small global and static data in the small data area, and generate |
| 14221 | special instructions to reference them. |
| 14222 | .IP "\fB\-G\fR \fInum\fR" 4 |
| 14223 | .IX Item "-G num" |
| 14224 | Put global and static objects less than or equal to \fInum\fR bytes |
| 14225 | into the small data or \s-1BSS\s0 sections instead of the normal data or \s-1BSS\s0 |
| 14226 | sections. The default value of \fInum\fR is 8. |
| 14227 | The \fB\-msdata\fR option must be set to one of \fBsdata\fR or \fBuse\fR |
| 14228 | for this option to have any effect. |
| 14229 | .Sp |
| 14230 | All modules should be compiled with the same \fB\-G\fR \fInum\fR value. |
| 14231 | Compiling with different values of \fInum\fR may or may not work; if it |
| 14232 | doesn't the linker gives an error message\-\-\-incorrect code is not |
| 14233 | generated. |
| 14234 | .IP "\fB\-mdebug\fR" 4 |
| 14235 | .IX Item "-mdebug" |
| 14236 | Makes the M32R\-specific code in the compiler display some statistics |
| 14237 | that might help in debugging programs. |
| 14238 | .IP "\fB\-malign\-loops\fR" 4 |
| 14239 | .IX Item "-malign-loops" |
| 14240 | Align all loops to a 32\-byte boundary. |
| 14241 | .IP "\fB\-mno\-align\-loops\fR" 4 |
| 14242 | .IX Item "-mno-align-loops" |
| 14243 | Do not enforce a 32\-byte alignment for loops. This is the default. |
| 14244 | .IP "\fB\-missue\-rate=\fR\fInumber\fR" 4 |
| 14245 | .IX Item "-missue-rate=number" |
| 14246 | Issue \fInumber\fR instructions per cycle. \fInumber\fR can only be 1 |
| 14247 | or 2. |
| 14248 | .IP "\fB\-mbranch\-cost=\fR\fInumber\fR" 4 |
| 14249 | .IX Item "-mbranch-cost=number" |
| 14250 | \&\fInumber\fR can only be 1 or 2. If it is 1 then branches are |
| 14251 | preferred over conditional code, if it is 2, then the opposite applies. |
| 14252 | .IP "\fB\-mflush\-trap=\fR\fInumber\fR" 4 |
| 14253 | .IX Item "-mflush-trap=number" |
| 14254 | Specifies the trap number to use to flush the cache. The default is |
| 14255 | 12. Valid numbers are between 0 and 15 inclusive. |
| 14256 | .IP "\fB\-mno\-flush\-trap\fR" 4 |
| 14257 | .IX Item "-mno-flush-trap" |
| 14258 | Specifies that the cache cannot be flushed by using a trap. |
| 14259 | .IP "\fB\-mflush\-func=\fR\fIname\fR" 4 |
| 14260 | .IX Item "-mflush-func=name" |
| 14261 | Specifies the name of the operating system function to call to flush |
| 14262 | the cache. The default is \fI_flush_cache\fR, but a function call |
| 14263 | is only used if a trap is not available. |
| 14264 | .IP "\fB\-mno\-flush\-func\fR" 4 |
| 14265 | .IX Item "-mno-flush-func" |
| 14266 | Indicates that there is no \s-1OS\s0 function for flushing the cache. |
| 14267 | .PP |
| 14268 | \fIM680x0 Options\fR |
| 14269 | .IX Subsection "M680x0 Options" |
| 14270 | .PP |
| 14271 | These are the \fB\-m\fR options defined for M680x0 and ColdFire processors. |
| 14272 | The default settings depend on which architecture was selected when |
| 14273 | the compiler was configured; the defaults for the most common choices |
| 14274 | are given below. |
| 14275 | .IP "\fB\-march=\fR\fIarch\fR" 4 |
| 14276 | .IX Item "-march=arch" |
| 14277 | Generate code for a specific M680x0 or ColdFire instruction set |
| 14278 | architecture. Permissible values of \fIarch\fR for M680x0 |
| 14279 | architectures are: \fB68000\fR, \fB68010\fR, \fB68020\fR, |
| 14280 | \&\fB68030\fR, \fB68040\fR, \fB68060\fR and \fBcpu32\fR. ColdFire |
| 14281 | architectures are selected according to Freescale's \s-1ISA\s0 classification |
| 14282 | and the permissible values are: \fBisaa\fR, \fBisaaplus\fR, |
| 14283 | \&\fBisab\fR and \fBisac\fR. |
| 14284 | .Sp |
| 14285 | \&\s-1GCC\s0 defines a macro \fB_\|_mcf\fR\fIarch\fR\fB_\|_\fR whenever it is generating |
| 14286 | code for a ColdFire target. The \fIarch\fR in this macro is one of the |
| 14287 | \&\fB\-march\fR arguments given above. |
| 14288 | .Sp |
| 14289 | When used together, \fB\-march\fR and \fB\-mtune\fR select code |
| 14290 | that runs on a family of similar processors but that is optimized |
| 14291 | for a particular microarchitecture. |
| 14292 | .IP "\fB\-mcpu=\fR\fIcpu\fR" 4 |
| 14293 | .IX Item "-mcpu=cpu" |
| 14294 | Generate code for a specific M680x0 or ColdFire processor. |
| 14295 | The M680x0 \fIcpu\fRs are: \fB68000\fR, \fB68010\fR, \fB68020\fR, |
| 14296 | \&\fB68030\fR, \fB68040\fR, \fB68060\fR, \fB68302\fR, \fB68332\fR |
| 14297 | and \fBcpu32\fR. The ColdFire \fIcpu\fRs are given by the table |
| 14298 | below, which also classifies the CPUs into families: |
| 14299 | .RS 4 |
| 14300 | .IP "Family : \fB\-mcpu\fR arguments" 4 |
| 14301 | .IX Item "Family : -mcpu arguments" |
| 14302 | .PD 0 |
| 14303 | .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 |
| 14304 | .IX Item "51 : 51 51ac 51ag 51cn 51em 51je 51jf 51jg 51jm 51mm 51qe 51qm" |
| 14305 | .IP "\fB5206\fR : \fB5202\fR \fB5204\fR \fB5206\fR" 4 |
| 14306 | .IX Item "5206 : 5202 5204 5206" |
| 14307 | .IP "\fB5206e\fR : \fB5206e\fR" 4 |
| 14308 | .IX Item "5206e : 5206e" |
| 14309 | .IP "\fB5208\fR : \fB5207\fR \fB5208\fR" 4 |
| 14310 | .IX Item "5208 : 5207 5208" |
| 14311 | .IP "\fB5211a\fR : \fB5210a\fR \fB5211a\fR" 4 |
| 14312 | .IX Item "5211a : 5210a 5211a" |
| 14313 | .IP "\fB5213\fR : \fB5211\fR \fB5212\fR \fB5213\fR" 4 |
| 14314 | .IX Item "5213 : 5211 5212 5213" |
| 14315 | .IP "\fB5216\fR : \fB5214\fR \fB5216\fR" 4 |
| 14316 | .IX Item "5216 : 5214 5216" |
| 14317 | .IP "\fB52235\fR : \fB52230\fR \fB52231\fR \fB52232\fR \fB52233\fR \fB52234\fR \fB52235\fR" 4 |
| 14318 | .IX Item "52235 : 52230 52231 52232 52233 52234 52235" |
| 14319 | .IP "\fB5225\fR : \fB5224\fR \fB5225\fR" 4 |
| 14320 | .IX Item "5225 : 5224 5225" |
| 14321 | .IP "\fB52259\fR : \fB52252\fR \fB52254\fR \fB52255\fR \fB52256\fR \fB52258\fR \fB52259\fR" 4 |
| 14322 | .IX Item "52259 : 52252 52254 52255 52256 52258 52259" |
| 14323 | .IP "\fB5235\fR : \fB5232\fR \fB5233\fR \fB5234\fR \fB5235\fR \fB523x\fR" 4 |
| 14324 | .IX Item "5235 : 5232 5233 5234 5235 523x" |
| 14325 | .IP "\fB5249\fR : \fB5249\fR" 4 |
| 14326 | .IX Item "5249 : 5249" |
| 14327 | .IP "\fB5250\fR : \fB5250\fR" 4 |
| 14328 | .IX Item "5250 : 5250" |
| 14329 | .IP "\fB5271\fR : \fB5270\fR \fB5271\fR" 4 |
| 14330 | .IX Item "5271 : 5270 5271" |
| 14331 | .IP "\fB5272\fR : \fB5272\fR" 4 |
| 14332 | .IX Item "5272 : 5272" |
| 14333 | .IP "\fB5275\fR : \fB5274\fR \fB5275\fR" 4 |
| 14334 | .IX Item "5275 : 5274 5275" |
| 14335 | .IP "\fB5282\fR : \fB5280\fR \fB5281\fR \fB5282\fR \fB528x\fR" 4 |
| 14336 | .IX Item "5282 : 5280 5281 5282 528x" |
| 14337 | .IP "\fB53017\fR : \fB53011\fR \fB53012\fR \fB53013\fR \fB53014\fR \fB53015\fR \fB53016\fR \fB53017\fR" 4 |
| 14338 | .IX Item "53017 : 53011 53012 53013 53014 53015 53016 53017" |
| 14339 | .IP "\fB5307\fR : \fB5307\fR" 4 |
| 14340 | .IX Item "5307 : 5307" |
| 14341 | .IP "\fB5329\fR : \fB5327\fR \fB5328\fR \fB5329\fR \fB532x\fR" 4 |
| 14342 | .IX Item "5329 : 5327 5328 5329 532x" |
| 14343 | .IP "\fB5373\fR : \fB5372\fR \fB5373\fR \fB537x\fR" 4 |
| 14344 | .IX Item "5373 : 5372 5373 537x" |
| 14345 | .IP "\fB5407\fR : \fB5407\fR" 4 |
| 14346 | .IX Item "5407 : 5407" |
| 14347 | .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 |
| 14348 | .IX Item "5475 : 5470 5471 5472 5473 5474 5475 547x 5480 5481 5482 5483 5484 5485" |
| 14349 | .RE |
| 14350 | .RS 4 |
| 14351 | .PD |
| 14352 | .Sp |
| 14353 | \&\fB\-mcpu=\fR\fIcpu\fR overrides \fB\-march=\fR\fIarch\fR if |
| 14354 | \&\fIarch\fR is compatible with \fIcpu\fR. Other combinations of |
| 14355 | \&\fB\-mcpu\fR and \fB\-march\fR are rejected. |
| 14356 | .Sp |
| 14357 | \&\s-1GCC\s0 defines the macro \fB_\|_mcf_cpu_\fR\fIcpu\fR when ColdFire target |
| 14358 | \&\fIcpu\fR is selected. It also defines \fB_\|_mcf_family_\fR\fIfamily\fR, |
| 14359 | where the value of \fIfamily\fR is given by the table above. |
| 14360 | .RE |
| 14361 | .IP "\fB\-mtune=\fR\fItune\fR" 4 |
| 14362 | .IX Item "-mtune=tune" |
| 14363 | Tune the code for a particular microarchitecture within the |
| 14364 | constraints set by \fB\-march\fR and \fB\-mcpu\fR. |
| 14365 | The M680x0 microarchitectures are: \fB68000\fR, \fB68010\fR, |
| 14366 | \&\fB68020\fR, \fB68030\fR, \fB68040\fR, \fB68060\fR |
| 14367 | and \fBcpu32\fR. The ColdFire microarchitectures |
| 14368 | are: \fBcfv1\fR, \fBcfv2\fR, \fBcfv3\fR, \fBcfv4\fR and \fBcfv4e\fR. |
| 14369 | .Sp |
| 14370 | You can also use \fB\-mtune=68020\-40\fR for code that needs |
| 14371 | to run relatively well on 68020, 68030 and 68040 targets. |
| 14372 | \&\fB\-mtune=68020\-60\fR is similar but includes 68060 targets |
| 14373 | as well. These two options select the same tuning decisions as |
| 14374 | \&\fB\-m68020\-40\fR and \fB\-m68020\-60\fR respectively. |
| 14375 | .Sp |
| 14376 | \&\s-1GCC\s0 defines the macros \fB_\|_mc\fR\fIarch\fR and \fB_\|_mc\fR\fIarch\fR\fB_\|_\fR |
| 14377 | when tuning for 680x0 architecture \fIarch\fR. It also defines |
| 14378 | \&\fBmc\fR\fIarch\fR unless either \fB\-ansi\fR or a non-GNU \fB\-std\fR |
| 14379 | option is used. If \s-1GCC\s0 is tuning for a range of architectures, |
| 14380 | as selected by \fB\-mtune=68020\-40\fR or \fB\-mtune=68020\-60\fR, |
| 14381 | it defines the macros for every architecture in the range. |
| 14382 | .Sp |
| 14383 | \&\s-1GCC\s0 also defines the macro \fB_\|_m\fR\fIuarch\fR\fB_\|_\fR when tuning for |
| 14384 | ColdFire microarchitecture \fIuarch\fR, where \fIuarch\fR is one |
| 14385 | of the arguments given above. |
| 14386 | .IP "\fB\-m68000\fR" 4 |
| 14387 | .IX Item "-m68000" |
| 14388 | .PD 0 |
| 14389 | .IP "\fB\-mc68000\fR" 4 |
| 14390 | .IX Item "-mc68000" |
| 14391 | .PD |
| 14392 | Generate output for a 68000. This is the default |
| 14393 | when the compiler is configured for 68000\-based systems. |
| 14394 | It is equivalent to \fB\-march=68000\fR. |
| 14395 | .Sp |
| 14396 | Use this option for microcontrollers with a 68000 or \s-1EC000\s0 core, |
| 14397 | including the 68008, 68302, 68306, 68307, 68322, 68328 and 68356. |
| 14398 | .IP "\fB\-m68010\fR" 4 |
| 14399 | .IX Item "-m68010" |
| 14400 | Generate output for a 68010. This is the default |
| 14401 | when the compiler is configured for 68010\-based systems. |
| 14402 | It is equivalent to \fB\-march=68010\fR. |
| 14403 | .IP "\fB\-m68020\fR" 4 |
| 14404 | .IX Item "-m68020" |
| 14405 | .PD 0 |
| 14406 | .IP "\fB\-mc68020\fR" 4 |
| 14407 | .IX Item "-mc68020" |
| 14408 | .PD |
| 14409 | Generate output for a 68020. This is the default |
| 14410 | when the compiler is configured for 68020\-based systems. |
| 14411 | It is equivalent to \fB\-march=68020\fR. |
| 14412 | .IP "\fB\-m68030\fR" 4 |
| 14413 | .IX Item "-m68030" |
| 14414 | Generate output for a 68030. This is the default when the compiler is |
| 14415 | configured for 68030\-based systems. It is equivalent to |
| 14416 | \&\fB\-march=68030\fR. |
| 14417 | .IP "\fB\-m68040\fR" 4 |
| 14418 | .IX Item "-m68040" |
| 14419 | Generate output for a 68040. This is the default when the compiler is |
| 14420 | configured for 68040\-based systems. It is equivalent to |
| 14421 | \&\fB\-march=68040\fR. |
| 14422 | .Sp |
| 14423 | This option inhibits the use of 68881/68882 instructions that have to be |
| 14424 | emulated by software on the 68040. Use this option if your 68040 does not |
| 14425 | have code to emulate those instructions. |
| 14426 | .IP "\fB\-m68060\fR" 4 |
| 14427 | .IX Item "-m68060" |
| 14428 | Generate output for a 68060. This is the default when the compiler is |
| 14429 | configured for 68060\-based systems. It is equivalent to |
| 14430 | \&\fB\-march=68060\fR. |
| 14431 | .Sp |
| 14432 | This option inhibits the use of 68020 and 68881/68882 instructions that |
| 14433 | have to be emulated by software on the 68060. Use this option if your 68060 |
| 14434 | does not have code to emulate those instructions. |
| 14435 | .IP "\fB\-mcpu32\fR" 4 |
| 14436 | .IX Item "-mcpu32" |
| 14437 | Generate output for a \s-1CPU32\s0. This is the default |
| 14438 | when the compiler is configured for CPU32\-based systems. |
| 14439 | It is equivalent to \fB\-march=cpu32\fR. |
| 14440 | .Sp |
| 14441 | Use this option for microcontrollers with a |
| 14442 | \&\s-1CPU32\s0 or \s-1CPU32+\s0 core, including the 68330, 68331, 68332, 68333, 68334, |
| 14443 | 68336, 68340, 68341, 68349 and 68360. |
| 14444 | .IP "\fB\-m5200\fR" 4 |
| 14445 | .IX Item "-m5200" |
| 14446 | Generate output for a 520X ColdFire \s-1CPU\s0. This is the default |
| 14447 | when the compiler is configured for 520X\-based systems. |
| 14448 | It is equivalent to \fB\-mcpu=5206\fR, and is now deprecated |
| 14449 | in favor of that option. |
| 14450 | .Sp |
| 14451 | Use this option for microcontroller with a 5200 core, including |
| 14452 | the \s-1MCF5202\s0, \s-1MCF5203\s0, \s-1MCF5204\s0 and \s-1MCF5206\s0. |
| 14453 | .IP "\fB\-m5206e\fR" 4 |
| 14454 | .IX Item "-m5206e" |
| 14455 | Generate output for a 5206e ColdFire \s-1CPU\s0. The option is now |
| 14456 | deprecated in favor of the equivalent \fB\-mcpu=5206e\fR. |
| 14457 | .IP "\fB\-m528x\fR" 4 |
| 14458 | .IX Item "-m528x" |
| 14459 | Generate output for a member of the ColdFire 528X family. |
| 14460 | The option is now deprecated in favor of the equivalent |
| 14461 | \&\fB\-mcpu=528x\fR. |
| 14462 | .IP "\fB\-m5307\fR" 4 |
| 14463 | .IX Item "-m5307" |
| 14464 | Generate output for a ColdFire 5307 \s-1CPU\s0. The option is now deprecated |
| 14465 | in favor of the equivalent \fB\-mcpu=5307\fR. |
| 14466 | .IP "\fB\-m5407\fR" 4 |
| 14467 | .IX Item "-m5407" |
| 14468 | Generate output for a ColdFire 5407 \s-1CPU\s0. The option is now deprecated |
| 14469 | in favor of the equivalent \fB\-mcpu=5407\fR. |
| 14470 | .IP "\fB\-mcfv4e\fR" 4 |
| 14471 | .IX Item "-mcfv4e" |
| 14472 | Generate output for a ColdFire V4e family \s-1CPU\s0 (e.g. 547x/548x). |
| 14473 | This includes use of hardware floating-point instructions. |
| 14474 | The option is equivalent to \fB\-mcpu=547x\fR, and is now |
| 14475 | deprecated in favor of that option. |
| 14476 | .IP "\fB\-m68020\-40\fR" 4 |
| 14477 | .IX Item "-m68020-40" |
| 14478 | Generate output for a 68040, without using any of the new instructions. |
| 14479 | This results in code that can run relatively efficiently on either a |
| 14480 | 68020/68881 or a 68030 or a 68040. The generated code does use the |
| 14481 | 68881 instructions that are emulated on the 68040. |
| 14482 | .Sp |
| 14483 | The option is equivalent to \fB\-march=68020\fR \fB\-mtune=68020\-40\fR. |
| 14484 | .IP "\fB\-m68020\-60\fR" 4 |
| 14485 | .IX Item "-m68020-60" |
| 14486 | Generate output for a 68060, without using any of the new instructions. |
| 14487 | This results in code that can run relatively efficiently on either a |
| 14488 | 68020/68881 or a 68030 or a 68040. The generated code does use the |
| 14489 | 68881 instructions that are emulated on the 68060. |
| 14490 | .Sp |
| 14491 | The option is equivalent to \fB\-march=68020\fR \fB\-mtune=68020\-60\fR. |
| 14492 | .IP "\fB\-mhard\-float\fR" 4 |
| 14493 | .IX Item "-mhard-float" |
| 14494 | .PD 0 |
| 14495 | .IP "\fB\-m68881\fR" 4 |
| 14496 | .IX Item "-m68881" |
| 14497 | .PD |
| 14498 | Generate floating-point instructions. This is the default for 68020 |
| 14499 | and above, and for ColdFire devices that have an \s-1FPU\s0. It defines the |
| 14500 | macro \fB_\|_HAVE_68881_\|_\fR on M680x0 targets and \fB_\|_mcffpu_\|_\fR |
| 14501 | on ColdFire targets. |
| 14502 | .IP "\fB\-msoft\-float\fR" 4 |
| 14503 | .IX Item "-msoft-float" |
| 14504 | Do not generate floating-point instructions; use library calls instead. |
| 14505 | This is the default for 68000, 68010, and 68832 targets. It is also |
| 14506 | the default for ColdFire devices that have no \s-1FPU\s0. |
| 14507 | .IP "\fB\-mdiv\fR" 4 |
| 14508 | .IX Item "-mdiv" |
| 14509 | .PD 0 |
| 14510 | .IP "\fB\-mno\-div\fR" 4 |
| 14511 | .IX Item "-mno-div" |
| 14512 | .PD |
| 14513 | Generate (do not generate) ColdFire hardware divide and remainder |
| 14514 | instructions. If \fB\-march\fR is used without \fB\-mcpu\fR, |
| 14515 | the default is \*(L"on\*(R" for ColdFire architectures and \*(L"off\*(R" for M680x0 |
| 14516 | architectures. Otherwise, the default is taken from the target \s-1CPU\s0 |
| 14517 | (either the default \s-1CPU\s0, or the one specified by \fB\-mcpu\fR). For |
| 14518 | example, the default is \*(L"off\*(R" for \fB\-mcpu=5206\fR and \*(L"on\*(R" for |
| 14519 | \&\fB\-mcpu=5206e\fR. |
| 14520 | .Sp |
| 14521 | \&\s-1GCC\s0 defines the macro \fB_\|_mcfhwdiv_\|_\fR when this option is enabled. |
| 14522 | .IP "\fB\-mshort\fR" 4 |
| 14523 | .IX Item "-mshort" |
| 14524 | Consider type \f(CW\*(C`int\*(C'\fR to be 16 bits wide, like \f(CW\*(C`short int\*(C'\fR. |
| 14525 | Additionally, parameters passed on the stack are also aligned to a |
| 14526 | 16\-bit boundary even on targets whose \s-1API\s0 mandates promotion to 32\-bit. |
| 14527 | .IP "\fB\-mno\-short\fR" 4 |
| 14528 | .IX Item "-mno-short" |
| 14529 | Do not consider type \f(CW\*(C`int\*(C'\fR to be 16 bits wide. This is the default. |
| 14530 | .IP "\fB\-mnobitfield\fR" 4 |
| 14531 | .IX Item "-mnobitfield" |
| 14532 | .PD 0 |
| 14533 | .IP "\fB\-mno\-bitfield\fR" 4 |
| 14534 | .IX Item "-mno-bitfield" |
| 14535 | .PD |
| 14536 | Do not use the bit-field instructions. The \fB\-m68000\fR, \fB\-mcpu32\fR |
| 14537 | and \fB\-m5200\fR options imply \fB\-mnobitfield\fR. |
| 14538 | .IP "\fB\-mbitfield\fR" 4 |
| 14539 | .IX Item "-mbitfield" |
| 14540 | Do use the bit-field instructions. The \fB\-m68020\fR option implies |
| 14541 | \&\fB\-mbitfield\fR. This is the default if you use a configuration |
| 14542 | designed for a 68020. |
| 14543 | .IP "\fB\-mrtd\fR" 4 |
| 14544 | .IX Item "-mrtd" |
| 14545 | Use a different function-calling convention, in which functions |
| 14546 | that take a fixed number of arguments return with the \f(CW\*(C`rtd\*(C'\fR |
| 14547 | instruction, which pops their arguments while returning. This |
| 14548 | saves one instruction in the caller since there is no need to pop |
| 14549 | the arguments there. |
| 14550 | .Sp |
| 14551 | This calling convention is incompatible with the one normally |
| 14552 | used on Unix, so you cannot use it if you need to call libraries |
| 14553 | compiled with the Unix compiler. |
| 14554 | .Sp |
| 14555 | Also, you must provide function prototypes for all functions that |
| 14556 | take variable numbers of arguments (including \f(CW\*(C`printf\*(C'\fR); |
| 14557 | otherwise incorrect code is generated for calls to those |
| 14558 | functions. |
| 14559 | .Sp |
| 14560 | In addition, seriously incorrect code results if you call a |
| 14561 | function with too many arguments. (Normally, extra arguments are |
| 14562 | harmlessly ignored.) |
| 14563 | .Sp |
| 14564 | The \f(CW\*(C`rtd\*(C'\fR instruction is supported by the 68010, 68020, 68030, |
| 14565 | 68040, 68060 and \s-1CPU32\s0 processors, but not by the 68000 or 5200. |
| 14566 | .IP "\fB\-mno\-rtd\fR" 4 |
| 14567 | .IX Item "-mno-rtd" |
| 14568 | Do not use the calling conventions selected by \fB\-mrtd\fR. |
| 14569 | This is the default. |
| 14570 | .IP "\fB\-malign\-int\fR" 4 |
| 14571 | .IX Item "-malign-int" |
| 14572 | .PD 0 |
| 14573 | .IP "\fB\-mno\-align\-int\fR" 4 |
| 14574 | .IX Item "-mno-align-int" |
| 14575 | .PD |
| 14576 | 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, |
| 14577 | \&\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 |
| 14578 | boundary (\fB\-malign\-int\fR) or a 16\-bit boundary (\fB\-mno\-align\-int\fR). |
| 14579 | Aligning variables on 32\-bit boundaries produces code that runs somewhat |
| 14580 | faster on processors with 32\-bit busses at the expense of more memory. |
| 14581 | .Sp |
| 14582 | \&\fBWarning:\fR if you use the \fB\-malign\-int\fR switch, \s-1GCC\s0 |
| 14583 | aligns structures containing the above types differently than |
| 14584 | most published application binary interface specifications for the m68k. |
| 14585 | .IP "\fB\-mpcrel\fR" 4 |
| 14586 | .IX Item "-mpcrel" |
| 14587 | Use the pc-relative addressing mode of the 68000 directly, instead of |
| 14588 | using a global offset table. At present, this option implies \fB\-fpic\fR, |
| 14589 | allowing at most a 16\-bit offset for pc-relative addressing. \fB\-fPIC\fR is |
| 14590 | not presently supported with \fB\-mpcrel\fR, though this could be supported for |
| 14591 | 68020 and higher processors. |
| 14592 | .IP "\fB\-mno\-strict\-align\fR" 4 |
| 14593 | .IX Item "-mno-strict-align" |
| 14594 | .PD 0 |
| 14595 | .IP "\fB\-mstrict\-align\fR" 4 |
| 14596 | .IX Item "-mstrict-align" |
| 14597 | .PD |
| 14598 | Do not (do) assume that unaligned memory references are handled by |
| 14599 | the system. |
| 14600 | .IP "\fB\-msep\-data\fR" 4 |
| 14601 | .IX Item "-msep-data" |
| 14602 | Generate code that allows the data segment to be located in a different |
| 14603 | area of memory from the text segment. This allows for execute-in-place in |
| 14604 | an environment without virtual memory management. This option implies |
| 14605 | \&\fB\-fPIC\fR. |
| 14606 | .IP "\fB\-mno\-sep\-data\fR" 4 |
| 14607 | .IX Item "-mno-sep-data" |
| 14608 | Generate code that assumes that the data segment follows the text segment. |
| 14609 | This is the default. |
| 14610 | .IP "\fB\-mid\-shared\-library\fR" 4 |
| 14611 | .IX Item "-mid-shared-library" |
| 14612 | Generate code that supports shared libraries via the library \s-1ID\s0 method. |
| 14613 | This allows for execute-in-place and shared libraries in an environment |
| 14614 | without virtual memory management. This option implies \fB\-fPIC\fR. |
| 14615 | .IP "\fB\-mno\-id\-shared\-library\fR" 4 |
| 14616 | .IX Item "-mno-id-shared-library" |
| 14617 | Generate code that doesn't assume ID-based shared libraries are being used. |
| 14618 | This is the default. |
| 14619 | .IP "\fB\-mshared\-library\-id=n\fR" 4 |
| 14620 | .IX Item "-mshared-library-id=n" |
| 14621 | Specifies the identification number of the ID-based shared library being |
| 14622 | compiled. Specifying a value of 0 generates more compact code; specifying |
| 14623 | other values forces the allocation of that number to the current |
| 14624 | library, but is no more space\- or time-efficient than omitting this option. |
| 14625 | .IP "\fB\-mxgot\fR" 4 |
| 14626 | .IX Item "-mxgot" |
| 14627 | .PD 0 |
| 14628 | .IP "\fB\-mno\-xgot\fR" 4 |
| 14629 | .IX Item "-mno-xgot" |
| 14630 | .PD |
| 14631 | When generating position-independent code for ColdFire, generate code |
| 14632 | that works if the \s-1GOT\s0 has more than 8192 entries. This code is |
| 14633 | larger and slower than code generated without this option. On M680x0 |
| 14634 | processors, this option is not needed; \fB\-fPIC\fR suffices. |
| 14635 | .Sp |
| 14636 | \&\s-1GCC\s0 normally uses a single instruction to load values from the \s-1GOT\s0. |
| 14637 | While this is relatively efficient, it only works if the \s-1GOT\s0 |
| 14638 | is smaller than about 64k. Anything larger causes the linker |
| 14639 | to report an error such as: |
| 14640 | .Sp |
| 14641 | .Vb 1 |
| 14642 | \& relocation truncated to fit: R_68K_GOT16O foobar |
| 14643 | .Ve |
| 14644 | .Sp |
| 14645 | If this happens, you should recompile your code with \fB\-mxgot\fR. |
| 14646 | It should then work with very large GOTs. However, code generated with |
| 14647 | \&\fB\-mxgot\fR is less efficient, since it takes 4 instructions to fetch |
| 14648 | the value of a global symbol. |
| 14649 | .Sp |
| 14650 | Note that some linkers, including newer versions of the \s-1GNU\s0 linker, |
| 14651 | can create multiple GOTs and sort \s-1GOT\s0 entries. If you have such a linker, |
| 14652 | you should only need to use \fB\-mxgot\fR when compiling a single |
| 14653 | object file that accesses more than 8192 \s-1GOT\s0 entries. Very few do. |
| 14654 | .Sp |
| 14655 | These options have no effect unless \s-1GCC\s0 is generating |
| 14656 | position-independent code. |
| 14657 | .PP |
| 14658 | \fIMCore Options\fR |
| 14659 | .IX Subsection "MCore Options" |
| 14660 | .PP |
| 14661 | These are the \fB\-m\fR options defined for the Motorola M*Core |
| 14662 | processors. |
| 14663 | .IP "\fB\-mhardlit\fR" 4 |
| 14664 | .IX Item "-mhardlit" |
| 14665 | .PD 0 |
| 14666 | .IP "\fB\-mno\-hardlit\fR" 4 |
| 14667 | .IX Item "-mno-hardlit" |
| 14668 | .PD |
| 14669 | Inline constants into the code stream if it can be done in two |
| 14670 | instructions or less. |
| 14671 | .IP "\fB\-mdiv\fR" 4 |
| 14672 | .IX Item "-mdiv" |
| 14673 | .PD 0 |
| 14674 | .IP "\fB\-mno\-div\fR" 4 |
| 14675 | .IX Item "-mno-div" |
| 14676 | .PD |
| 14677 | Use the divide instruction. (Enabled by default). |
| 14678 | .IP "\fB\-mrelax\-immediate\fR" 4 |
| 14679 | .IX Item "-mrelax-immediate" |
| 14680 | .PD 0 |
| 14681 | .IP "\fB\-mno\-relax\-immediate\fR" 4 |
| 14682 | .IX Item "-mno-relax-immediate" |
| 14683 | .PD |
| 14684 | Allow arbitrary-sized immediates in bit operations. |
| 14685 | .IP "\fB\-mwide\-bitfields\fR" 4 |
| 14686 | .IX Item "-mwide-bitfields" |
| 14687 | .PD 0 |
| 14688 | .IP "\fB\-mno\-wide\-bitfields\fR" 4 |
| 14689 | .IX Item "-mno-wide-bitfields" |
| 14690 | .PD |
| 14691 | Always treat bit-fields as \f(CW\*(C`int\*(C'\fR\-sized. |
| 14692 | .IP "\fB\-m4byte\-functions\fR" 4 |
| 14693 | .IX Item "-m4byte-functions" |
| 14694 | .PD 0 |
| 14695 | .IP "\fB\-mno\-4byte\-functions\fR" 4 |
| 14696 | .IX Item "-mno-4byte-functions" |
| 14697 | .PD |
| 14698 | Force all functions to be aligned to a 4\-byte boundary. |
| 14699 | .IP "\fB\-mcallgraph\-data\fR" 4 |
| 14700 | .IX Item "-mcallgraph-data" |
| 14701 | .PD 0 |
| 14702 | .IP "\fB\-mno\-callgraph\-data\fR" 4 |
| 14703 | .IX Item "-mno-callgraph-data" |
| 14704 | .PD |
| 14705 | Emit callgraph information. |
| 14706 | .IP "\fB\-mslow\-bytes\fR" 4 |
| 14707 | .IX Item "-mslow-bytes" |
| 14708 | .PD 0 |
| 14709 | .IP "\fB\-mno\-slow\-bytes\fR" 4 |
| 14710 | .IX Item "-mno-slow-bytes" |
| 14711 | .PD |
| 14712 | Prefer word access when reading byte quantities. |
| 14713 | .IP "\fB\-mlittle\-endian\fR" 4 |
| 14714 | .IX Item "-mlittle-endian" |
| 14715 | .PD 0 |
| 14716 | .IP "\fB\-mbig\-endian\fR" 4 |
| 14717 | .IX Item "-mbig-endian" |
| 14718 | .PD |
| 14719 | Generate code for a little-endian target. |
| 14720 | .IP "\fB\-m210\fR" 4 |
| 14721 | .IX Item "-m210" |
| 14722 | .PD 0 |
| 14723 | .IP "\fB\-m340\fR" 4 |
| 14724 | .IX Item "-m340" |
| 14725 | .PD |
| 14726 | Generate code for the 210 processor. |
| 14727 | .IP "\fB\-mno\-lsim\fR" 4 |
| 14728 | .IX Item "-mno-lsim" |
| 14729 | Assume that runtime support has been provided and so omit the |
| 14730 | simulator library (\fIlibsim.a)\fR from the linker command line. |
| 14731 | .IP "\fB\-mstack\-increment=\fR\fIsize\fR" 4 |
| 14732 | .IX Item "-mstack-increment=size" |
| 14733 | Set the maximum amount for a single stack increment operation. Large |
| 14734 | values can increase the speed of programs that contain functions |
| 14735 | that need a large amount of stack space, but they can also trigger a |
| 14736 | segmentation fault if the stack is extended too much. The default |
| 14737 | value is 0x1000. |
| 14738 | .PP |
| 14739 | \fIMeP Options\fR |
| 14740 | .IX Subsection "MeP Options" |
| 14741 | .IP "\fB\-mabsdiff\fR" 4 |
| 14742 | .IX Item "-mabsdiff" |
| 14743 | Enables the \f(CW\*(C`abs\*(C'\fR instruction, which is the absolute difference |
| 14744 | between two registers. |
| 14745 | .IP "\fB\-mall\-opts\fR" 4 |
| 14746 | .IX Item "-mall-opts" |
| 14747 | Enables all the optional instructions\-\-\-average, multiply, divide, bit |
| 14748 | operations, leading zero, absolute difference, min/max, clip, and |
| 14749 | saturation. |
| 14750 | .IP "\fB\-maverage\fR" 4 |
| 14751 | .IX Item "-maverage" |
| 14752 | Enables the \f(CW\*(C`ave\*(C'\fR instruction, which computes the average of two |
| 14753 | registers. |
| 14754 | .IP "\fB\-mbased=\fR\fIn\fR" 4 |
| 14755 | .IX Item "-mbased=n" |
| 14756 | Variables of size \fIn\fR bytes or smaller are placed in the |
| 14757 | \&\f(CW\*(C`.based\*(C'\fR section by default. Based variables use the \f(CW$tp\fR |
| 14758 | register as a base register, and there is a 128\-byte limit to the |
| 14759 | \&\f(CW\*(C`.based\*(C'\fR section. |
| 14760 | .IP "\fB\-mbitops\fR" 4 |
| 14761 | .IX Item "-mbitops" |
| 14762 | Enables the bit operation instructions\-\-\-bit test (\f(CW\*(C`btstm\*(C'\fR), set |
| 14763 | (\f(CW\*(C`bsetm\*(C'\fR), clear (\f(CW\*(C`bclrm\*(C'\fR), invert (\f(CW\*(C`bnotm\*(C'\fR), and |
| 14764 | test-and-set (\f(CW\*(C`tas\*(C'\fR). |
| 14765 | .IP "\fB\-mc=\fR\fIname\fR" 4 |
| 14766 | .IX Item "-mc=name" |
| 14767 | Selects which section constant data is placed in. \fIname\fR may |
| 14768 | be \f(CW\*(C`tiny\*(C'\fR, \f(CW\*(C`near\*(C'\fR, or \f(CW\*(C`far\*(C'\fR. |
| 14769 | .IP "\fB\-mclip\fR" 4 |
| 14770 | .IX Item "-mclip" |
| 14771 | Enables the \f(CW\*(C`clip\*(C'\fR instruction. Note that \f(CW\*(C`\-mclip\*(C'\fR is not |
| 14772 | useful unless you also provide \f(CW\*(C`\-mminmax\*(C'\fR. |
| 14773 | .IP "\fB\-mconfig=\fR\fIname\fR" 4 |
| 14774 | .IX Item "-mconfig=name" |
| 14775 | Selects one of the built-in core configurations. Each MeP chip has |
| 14776 | one or more modules in it; each module has a core \s-1CPU\s0 and a variety of |
| 14777 | coprocessors, optional instructions, and peripherals. The |
| 14778 | \&\f(CW\*(C`MeP\-Integrator\*(C'\fR tool, not part of \s-1GCC\s0, provides these |
| 14779 | configurations through this option; using this option is the same as |
| 14780 | using all the corresponding command-line options. The default |
| 14781 | configuration is \f(CW\*(C`default\*(C'\fR. |
| 14782 | .IP "\fB\-mcop\fR" 4 |
| 14783 | .IX Item "-mcop" |
| 14784 | Enables the coprocessor instructions. By default, this is a 32\-bit |
| 14785 | coprocessor. Note that the coprocessor is normally enabled via the |
| 14786 | \&\f(CW\*(C`\-mconfig=\*(C'\fR option. |
| 14787 | .IP "\fB\-mcop32\fR" 4 |
| 14788 | .IX Item "-mcop32" |
| 14789 | Enables the 32\-bit coprocessor's instructions. |
| 14790 | .IP "\fB\-mcop64\fR" 4 |
| 14791 | .IX Item "-mcop64" |
| 14792 | Enables the 64\-bit coprocessor's instructions. |
| 14793 | .IP "\fB\-mivc2\fR" 4 |
| 14794 | .IX Item "-mivc2" |
| 14795 | Enables \s-1IVC2\s0 scheduling. \s-1IVC2\s0 is a 64\-bit \s-1VLIW\s0 coprocessor. |
| 14796 | .IP "\fB\-mdc\fR" 4 |
| 14797 | .IX Item "-mdc" |
| 14798 | Causes constant variables to be placed in the \f(CW\*(C`.near\*(C'\fR section. |
| 14799 | .IP "\fB\-mdiv\fR" 4 |
| 14800 | .IX Item "-mdiv" |
| 14801 | Enables the \f(CW\*(C`div\*(C'\fR and \f(CW\*(C`divu\*(C'\fR instructions. |
| 14802 | .IP "\fB\-meb\fR" 4 |
| 14803 | .IX Item "-meb" |
| 14804 | Generate big-endian code. |
| 14805 | .IP "\fB\-mel\fR" 4 |
| 14806 | .IX Item "-mel" |
| 14807 | Generate little-endian code. |
| 14808 | .IP "\fB\-mio\-volatile\fR" 4 |
| 14809 | .IX Item "-mio-volatile" |
| 14810 | Tells the compiler that any variable marked with the \f(CW\*(C`io\*(C'\fR |
| 14811 | attribute is to be considered volatile. |
| 14812 | .IP "\fB\-ml\fR" 4 |
| 14813 | .IX Item "-ml" |
| 14814 | Causes variables to be assigned to the \f(CW\*(C`.far\*(C'\fR section by default. |
| 14815 | .IP "\fB\-mleadz\fR" 4 |
| 14816 | .IX Item "-mleadz" |
| 14817 | Enables the \f(CW\*(C`leadz\*(C'\fR (leading zero) instruction. |
| 14818 | .IP "\fB\-mm\fR" 4 |
| 14819 | .IX Item "-mm" |
| 14820 | Causes variables to be assigned to the \f(CW\*(C`.near\*(C'\fR section by default. |
| 14821 | .IP "\fB\-mminmax\fR" 4 |
| 14822 | .IX Item "-mminmax" |
| 14823 | Enables the \f(CW\*(C`min\*(C'\fR and \f(CW\*(C`max\*(C'\fR instructions. |
| 14824 | .IP "\fB\-mmult\fR" 4 |
| 14825 | .IX Item "-mmult" |
| 14826 | Enables the multiplication and multiply-accumulate instructions. |
| 14827 | .IP "\fB\-mno\-opts\fR" 4 |
| 14828 | .IX Item "-mno-opts" |
| 14829 | Disables all the optional instructions enabled by \f(CW\*(C`\-mall\-opts\*(C'\fR. |
| 14830 | .IP "\fB\-mrepeat\fR" 4 |
| 14831 | .IX Item "-mrepeat" |
| 14832 | Enables the \f(CW\*(C`repeat\*(C'\fR and \f(CW\*(C`erepeat\*(C'\fR instructions, used for |
| 14833 | low-overhead looping. |
| 14834 | .IP "\fB\-ms\fR" 4 |
| 14835 | .IX Item "-ms" |
| 14836 | Causes all variables to default to the \f(CW\*(C`.tiny\*(C'\fR section. Note |
| 14837 | that there is a 65536\-byte limit to this section. Accesses to these |
| 14838 | variables use the \f(CW%gp\fR base register. |
| 14839 | .IP "\fB\-msatur\fR" 4 |
| 14840 | .IX Item "-msatur" |
| 14841 | Enables the saturation instructions. Note that the compiler does not |
| 14842 | currently generate these itself, but this option is included for |
| 14843 | compatibility with other tools, like \f(CW\*(C`as\*(C'\fR. |
| 14844 | .IP "\fB\-msdram\fR" 4 |
| 14845 | .IX Item "-msdram" |
| 14846 | Link the SDRAM-based runtime instead of the default ROM-based runtime. |
| 14847 | .IP "\fB\-msim\fR" 4 |
| 14848 | .IX Item "-msim" |
| 14849 | Link the simulator runtime libraries. |
| 14850 | .IP "\fB\-msimnovec\fR" 4 |
| 14851 | .IX Item "-msimnovec" |
| 14852 | Link the simulator runtime libraries, excluding built-in support |
| 14853 | for reset and exception vectors and tables. |
| 14854 | .IP "\fB\-mtf\fR" 4 |
| 14855 | .IX Item "-mtf" |
| 14856 | Causes all functions to default to the \f(CW\*(C`.far\*(C'\fR section. Without |
| 14857 | this option, functions default to the \f(CW\*(C`.near\*(C'\fR section. |
| 14858 | .IP "\fB\-mtiny=\fR\fIn\fR" 4 |
| 14859 | .IX Item "-mtiny=n" |
| 14860 | Variables that are \fIn\fR bytes or smaller are allocated to the |
| 14861 | \&\f(CW\*(C`.tiny\*(C'\fR section. These variables use the \f(CW$gp\fR base |
| 14862 | register. The default for this option is 4, but note that there's a |
| 14863 | 65536\-byte limit to the \f(CW\*(C`.tiny\*(C'\fR section. |
| 14864 | .PP |
| 14865 | \fIMicroBlaze Options\fR |
| 14866 | .IX Subsection "MicroBlaze Options" |
| 14867 | .IP "\fB\-msoft\-float\fR" 4 |
| 14868 | .IX Item "-msoft-float" |
| 14869 | Use software emulation for floating point (default). |
| 14870 | .IP "\fB\-mhard\-float\fR" 4 |
| 14871 | .IX Item "-mhard-float" |
| 14872 | Use hardware floating-point instructions. |
| 14873 | .IP "\fB\-mmemcpy\fR" 4 |
| 14874 | .IX Item "-mmemcpy" |
| 14875 | Do not optimize block moves, use \f(CW\*(C`memcpy\*(C'\fR. |
| 14876 | .IP "\fB\-mno\-clearbss\fR" 4 |
| 14877 | .IX Item "-mno-clearbss" |
| 14878 | This option is deprecated. Use \fB\-fno\-zero\-initialized\-in\-bss\fR instead. |
| 14879 | .IP "\fB\-mcpu=\fR\fIcpu-type\fR" 4 |
| 14880 | .IX Item "-mcpu=cpu-type" |
| 14881 | Use features of, and schedule code for, the given \s-1CPU\s0. |
| 14882 | Supported values are in the format \fBv\fR\fIX\fR\fB.\fR\fI\s-1YY\s0\fR\fB.\fR\fIZ\fR, |
| 14883 | where \fIX\fR is a major version, \fI\s-1YY\s0\fR is the minor version, and |
| 14884 | \&\fIZ\fR is compatibility code. Example values are \fBv3.00.a\fR, |
| 14885 | \&\fBv4.00.b\fR, \fBv5.00.a\fR, \fBv5.00.b\fR, \fBv5.00.b\fR, \fBv6.00.a\fR. |
| 14886 | .IP "\fB\-mxl\-soft\-mul\fR" 4 |
| 14887 | .IX Item "-mxl-soft-mul" |
| 14888 | Use software multiply emulation (default). |
| 14889 | .IP "\fB\-mxl\-soft\-div\fR" 4 |
| 14890 | .IX Item "-mxl-soft-div" |
| 14891 | Use software emulation for divides (default). |
| 14892 | .IP "\fB\-mxl\-barrel\-shift\fR" 4 |
| 14893 | .IX Item "-mxl-barrel-shift" |
| 14894 | Use the hardware barrel shifter. |
| 14895 | .IP "\fB\-mxl\-pattern\-compare\fR" 4 |
| 14896 | .IX Item "-mxl-pattern-compare" |
| 14897 | Use pattern compare instructions. |
| 14898 | .IP "\fB\-msmall\-divides\fR" 4 |
| 14899 | .IX Item "-msmall-divides" |
| 14900 | Use table lookup optimization for small signed integer divisions. |
| 14901 | .IP "\fB\-mxl\-stack\-check\fR" 4 |
| 14902 | .IX Item "-mxl-stack-check" |
| 14903 | This option is deprecated. Use \fB\-fstack\-check\fR instead. |
| 14904 | .IP "\fB\-mxl\-gp\-opt\fR" 4 |
| 14905 | .IX Item "-mxl-gp-opt" |
| 14906 | Use GP-relative \f(CW\*(C`.sdata\*(C'\fR/\f(CW\*(C`.sbss\*(C'\fR sections. |
| 14907 | .IP "\fB\-mxl\-multiply\-high\fR" 4 |
| 14908 | .IX Item "-mxl-multiply-high" |
| 14909 | Use multiply high instructions for high part of 32x32 multiply. |
| 14910 | .IP "\fB\-mxl\-float\-convert\fR" 4 |
| 14911 | .IX Item "-mxl-float-convert" |
| 14912 | Use hardware floating-point conversion instructions. |
| 14913 | .IP "\fB\-mxl\-float\-sqrt\fR" 4 |
| 14914 | .IX Item "-mxl-float-sqrt" |
| 14915 | Use hardware floating-point square root instruction. |
| 14916 | .IP "\fB\-mbig\-endian\fR" 4 |
| 14917 | .IX Item "-mbig-endian" |
| 14918 | Generate code for a big-endian target. |
| 14919 | .IP "\fB\-mlittle\-endian\fR" 4 |
| 14920 | .IX Item "-mlittle-endian" |
| 14921 | Generate code for a little-endian target. |
| 14922 | .IP "\fB\-mxl\-reorder\fR" 4 |
| 14923 | .IX Item "-mxl-reorder" |
| 14924 | Use reorder instructions (swap and byte reversed load/store). |
| 14925 | .IP "\fB\-mxl\-mode\-\fR\fIapp-model\fR" 4 |
| 14926 | .IX Item "-mxl-mode-app-model" |
| 14927 | Select application model \fIapp-model\fR. Valid models are |
| 14928 | .RS 4 |
| 14929 | .IP "\fBexecutable\fR" 4 |
| 14930 | .IX Item "executable" |
| 14931 | normal executable (default), uses startup code \fIcrt0.o\fR. |
| 14932 | .IP "\fBxmdstub\fR" 4 |
| 14933 | .IX Item "xmdstub" |
| 14934 | for use with Xilinx Microprocessor Debugger (\s-1XMD\s0) based |
| 14935 | software intrusive debug agent called xmdstub. This uses startup file |
| 14936 | \&\fIcrt1.o\fR and sets the start address of the program to 0x800. |
| 14937 | .IP "\fBbootstrap\fR" 4 |
| 14938 | .IX Item "bootstrap" |
| 14939 | for applications that are loaded using a bootloader. |
| 14940 | This model uses startup file \fIcrt2.o\fR which does not contain a processor |
| 14941 | reset vector handler. This is suitable for transferring control on a |
| 14942 | processor reset to the bootloader rather than the application. |
| 14943 | .IP "\fBnovectors\fR" 4 |
| 14944 | .IX Item "novectors" |
| 14945 | for applications that do not require any of the |
| 14946 | MicroBlaze vectors. This option may be useful for applications running |
| 14947 | within a monitoring application. This model uses \fIcrt3.o\fR as a startup file. |
| 14948 | .RE |
| 14949 | .RS 4 |
| 14950 | .Sp |
| 14951 | Option \fB\-xl\-mode\-\fR\fIapp-model\fR is a deprecated alias for |
| 14952 | \&\fB\-mxl\-mode\-\fR\fIapp-model\fR. |
| 14953 | .RE |
| 14954 | .PP |
| 14955 | \fI\s-1MIPS\s0 Options\fR |
| 14956 | .IX Subsection "MIPS Options" |
| 14957 | .IP "\fB\-EB\fR" 4 |
| 14958 | .IX Item "-EB" |
| 14959 | Generate big-endian code. |
| 14960 | .IP "\fB\-EL\fR" 4 |
| 14961 | .IX Item "-EL" |
| 14962 | Generate little-endian code. This is the default for \fBmips*el\-*\-*\fR |
| 14963 | configurations. |
| 14964 | .IP "\fB\-march=\fR\fIarch\fR" 4 |
| 14965 | .IX Item "-march=arch" |
| 14966 | Generate code that runs on \fIarch\fR, which can be the name of a |
| 14967 | generic \s-1MIPS\s0 \s-1ISA\s0, or the name of a particular processor. |
| 14968 | The \s-1ISA\s0 names are: |
| 14969 | \&\fBmips1\fR, \fBmips2\fR, \fBmips3\fR, \fBmips4\fR, |
| 14970 | \&\fBmips32\fR, \fBmips32r2\fR, \fBmips64\fR and \fBmips64r2\fR. |
| 14971 | The processor names are: |
| 14972 | \&\fB4kc\fR, \fB4km\fR, \fB4kp\fR, \fB4ksc\fR, |
| 14973 | \&\fB4kec\fR, \fB4kem\fR, \fB4kep\fR, \fB4ksd\fR, |
| 14974 | \&\fB5kc\fR, \fB5kf\fR, |
| 14975 | \&\fB20kc\fR, |
| 14976 | \&\fB24kc\fR, \fB24kf2_1\fR, \fB24kf1_1\fR, |
| 14977 | \&\fB24kec\fR, \fB24kef2_1\fR, \fB24kef1_1\fR, |
| 14978 | \&\fB34kc\fR, \fB34kf2_1\fR, \fB34kf1_1\fR, \fB34kn\fR, |
| 14979 | \&\fB74kc\fR, \fB74kf2_1\fR, \fB74kf1_1\fR, \fB74kf3_2\fR, |
| 14980 | \&\fB1004kc\fR, \fB1004kf2_1\fR, \fB1004kf1_1\fR, |
| 14981 | \&\fBloongson2e\fR, \fBloongson2f\fR, \fBloongson3a\fR, |
| 14982 | \&\fBm4k\fR, |
| 14983 | \&\fBocteon\fR, \fBocteon+\fR, \fBocteon2\fR, |
| 14984 | \&\fBorion\fR, |
| 14985 | \&\fBr2000\fR, \fBr3000\fR, \fBr3900\fR, \fBr4000\fR, \fBr4400\fR, |
| 14986 | \&\fBr4600\fR, \fBr4650\fR, \fBr4700\fR, \fBr6000\fR, \fBr8000\fR, |
| 14987 | \&\fBrm7000\fR, \fBrm9000\fR, |
| 14988 | \&\fBr10000\fR, \fBr12000\fR, \fBr14000\fR, \fBr16000\fR, |
| 14989 | \&\fBsb1\fR, |
| 14990 | \&\fBsr71000\fR, |
| 14991 | \&\fBvr4100\fR, \fBvr4111\fR, \fBvr4120\fR, \fBvr4130\fR, \fBvr4300\fR, |
| 14992 | \&\fBvr5000\fR, \fBvr5400\fR, \fBvr5500\fR, |
| 14993 | \&\fBxlr\fR and \fBxlp\fR. |
| 14994 | The special value \fBfrom-abi\fR selects the |
| 14995 | most compatible architecture for the selected \s-1ABI\s0 (that is, |
| 14996 | \&\fBmips1\fR for 32\-bit ABIs and \fBmips3\fR for 64\-bit ABIs). |
| 14997 | .Sp |
| 14998 | The native Linux/GNU toolchain also supports the value \fBnative\fR, |
| 14999 | which selects the best architecture option for the host processor. |
| 15000 | \&\fB\-march=native\fR has no effect if \s-1GCC\s0 does not recognize |
| 15001 | the processor. |
| 15002 | .Sp |
| 15003 | In processor names, a final \fB000\fR can be abbreviated as \fBk\fR |
| 15004 | (for example, \fB\-march=r2k\fR). Prefixes are optional, and |
| 15005 | \&\fBvr\fR may be written \fBr\fR. |
| 15006 | .Sp |
| 15007 | Names of the form \fIn\fR\fBf2_1\fR refer to processors with |
| 15008 | FPUs clocked at half the rate of the core, names of the form |
| 15009 | \&\fIn\fR\fBf1_1\fR refer to processors with FPUs clocked at the same |
| 15010 | rate as the core, and names of the form \fIn\fR\fBf3_2\fR refer to |
| 15011 | processors with FPUs clocked a ratio of 3:2 with respect to the core. |
| 15012 | For compatibility reasons, \fIn\fR\fBf\fR is accepted as a synonym |
| 15013 | for \fIn\fR\fBf2_1\fR while \fIn\fR\fBx\fR and \fIb\fR\fBfx\fR are |
| 15014 | accepted as synonyms for \fIn\fR\fBf1_1\fR. |
| 15015 | .Sp |
| 15016 | \&\s-1GCC\s0 defines two macros based on the value of this option. The first |
| 15017 | is \fB_MIPS_ARCH\fR, which gives the name of target architecture, as |
| 15018 | a string. The second has the form \fB_MIPS_ARCH_\fR\fIfoo\fR, |
| 15019 | where \fIfoo\fR is the capitalized value of \fB_MIPS_ARCH\fR. |
| 15020 | For example, \fB\-march=r2000\fR sets \fB_MIPS_ARCH\fR |
| 15021 | to \fB\*(L"r2000\*(R"\fR and defines the macro \fB_MIPS_ARCH_R2000\fR. |
| 15022 | .Sp |
| 15023 | Note that the \fB_MIPS_ARCH\fR macro uses the processor names given |
| 15024 | above. In other words, it has the full prefix and does not |
| 15025 | abbreviate \fB000\fR as \fBk\fR. In the case of \fBfrom-abi\fR, |
| 15026 | the macro names the resolved architecture (either \fB\*(L"mips1\*(R"\fR or |
| 15027 | \&\fB\*(L"mips3\*(R"\fR). It names the default architecture when no |
| 15028 | \&\fB\-march\fR option is given. |
| 15029 | .IP "\fB\-mtune=\fR\fIarch\fR" 4 |
| 15030 | .IX Item "-mtune=arch" |
| 15031 | Optimize for \fIarch\fR. Among other things, this option controls |
| 15032 | the way instructions are scheduled, and the perceived cost of arithmetic |
| 15033 | operations. The list of \fIarch\fR values is the same as for |
| 15034 | \&\fB\-march\fR. |
| 15035 | .Sp |
| 15036 | When this option is not used, \s-1GCC\s0 optimizes for the processor |
| 15037 | specified by \fB\-march\fR. By using \fB\-march\fR and |
| 15038 | \&\fB\-mtune\fR together, it is possible to generate code that |
| 15039 | runs on a family of processors, but optimize the code for one |
| 15040 | particular member of that family. |
| 15041 | .Sp |
| 15042 | \&\fB\-mtune\fR defines the macros \fB_MIPS_TUNE\fR and |
| 15043 | \&\fB_MIPS_TUNE_\fR\fIfoo\fR, which work in the same way as the |
| 15044 | \&\fB\-march\fR ones described above. |
| 15045 | .IP "\fB\-mips1\fR" 4 |
| 15046 | .IX Item "-mips1" |
| 15047 | Equivalent to \fB\-march=mips1\fR. |
| 15048 | .IP "\fB\-mips2\fR" 4 |
| 15049 | .IX Item "-mips2" |
| 15050 | Equivalent to \fB\-march=mips2\fR. |
| 15051 | .IP "\fB\-mips3\fR" 4 |
| 15052 | .IX Item "-mips3" |
| 15053 | Equivalent to \fB\-march=mips3\fR. |
| 15054 | .IP "\fB\-mips4\fR" 4 |
| 15055 | .IX Item "-mips4" |
| 15056 | Equivalent to \fB\-march=mips4\fR. |
| 15057 | .IP "\fB\-mips32\fR" 4 |
| 15058 | .IX Item "-mips32" |
| 15059 | Equivalent to \fB\-march=mips32\fR. |
| 15060 | .IP "\fB\-mips32r2\fR" 4 |
| 15061 | .IX Item "-mips32r2" |
| 15062 | Equivalent to \fB\-march=mips32r2\fR. |
| 15063 | .IP "\fB\-mips64\fR" 4 |
| 15064 | .IX Item "-mips64" |
| 15065 | Equivalent to \fB\-march=mips64\fR. |
| 15066 | .IP "\fB\-mips64r2\fR" 4 |
| 15067 | .IX Item "-mips64r2" |
| 15068 | Equivalent to \fB\-march=mips64r2\fR. |
| 15069 | .IP "\fB\-mips16\fR" 4 |
| 15070 | .IX Item "-mips16" |
| 15071 | .PD 0 |
| 15072 | .IP "\fB\-mno\-mips16\fR" 4 |
| 15073 | .IX Item "-mno-mips16" |
| 15074 | .PD |
| 15075 | Generate (do not generate) \s-1MIPS16\s0 code. If \s-1GCC\s0 is targeting a |
| 15076 | \&\s-1MIPS32\s0 or \s-1MIPS64\s0 architecture, it makes use of the MIPS16e \s-1ASE\s0. |
| 15077 | .Sp |
| 15078 | \&\s-1MIPS16\s0 code generation can also be controlled on a per-function basis |
| 15079 | by means of \f(CW\*(C`mips16\*(C'\fR and \f(CW\*(C`nomips16\*(C'\fR attributes. |
| 15080 | .IP "\fB\-mflip\-mips16\fR" 4 |
| 15081 | .IX Item "-mflip-mips16" |
| 15082 | Generate \s-1MIPS16\s0 code on alternating functions. This option is provided |
| 15083 | for regression testing of mixed MIPS16/non\-MIPS16 code generation, and is |
| 15084 | not intended for ordinary use in compiling user code. |
| 15085 | .IP "\fB\-minterlink\-mips16\fR" 4 |
| 15086 | .IX Item "-minterlink-mips16" |
| 15087 | .PD 0 |
| 15088 | .IP "\fB\-mno\-interlink\-mips16\fR" 4 |
| 15089 | .IX Item "-mno-interlink-mips16" |
| 15090 | .PD |
| 15091 | Require (do not require) that non\-MIPS16 code be link-compatible with |
| 15092 | \&\s-1MIPS16\s0 code. |
| 15093 | .Sp |
| 15094 | For example, non\-MIPS16 code cannot jump directly to \s-1MIPS16\s0 code; |
| 15095 | it must either use a call or an indirect jump. \fB\-minterlink\-mips16\fR |
| 15096 | therefore disables direct jumps unless \s-1GCC\s0 knows that the target of the |
| 15097 | jump is not \s-1MIPS16\s0. |
| 15098 | .IP "\fB\-mabi=32\fR" 4 |
| 15099 | .IX Item "-mabi=32" |
| 15100 | .PD 0 |
| 15101 | .IP "\fB\-mabi=o64\fR" 4 |
| 15102 | .IX Item "-mabi=o64" |
| 15103 | .IP "\fB\-mabi=n32\fR" 4 |
| 15104 | .IX Item "-mabi=n32" |
| 15105 | .IP "\fB\-mabi=64\fR" 4 |
| 15106 | .IX Item "-mabi=64" |
| 15107 | .IP "\fB\-mabi=eabi\fR" 4 |
| 15108 | .IX Item "-mabi=eabi" |
| 15109 | .PD |
| 15110 | Generate code for the given \s-1ABI\s0. |
| 15111 | .Sp |
| 15112 | Note that the \s-1EABI\s0 has a 32\-bit and a 64\-bit variant. \s-1GCC\s0 normally |
| 15113 | generates 64\-bit code when you select a 64\-bit architecture, but you |
| 15114 | can use \fB\-mgp32\fR to get 32\-bit code instead. |
| 15115 | .Sp |
| 15116 | For information about the O64 \s-1ABI\s0, see |
| 15117 | <\fBhttp://gcc.gnu.org/projects/mipso64\-abi.html\fR>. |
| 15118 | .Sp |
| 15119 | \&\s-1GCC\s0 supports a variant of the o32 \s-1ABI\s0 in which floating-point registers |
| 15120 | are 64 rather than 32 bits wide. You can select this combination with |
| 15121 | \&\fB\-mabi=32\fR \fB\-mfp64\fR. This \s-1ABI\s0 relies on the \f(CW\*(C`mthc1\*(C'\fR |
| 15122 | and \f(CW\*(C`mfhc1\*(C'\fR instructions and is therefore only supported for |
| 15123 | \&\s-1MIPS32R2\s0 processors. |
| 15124 | .Sp |
| 15125 | The register assignments for arguments and return values remain the |
| 15126 | same, but each scalar value is passed in a single 64\-bit register |
| 15127 | rather than a pair of 32\-bit registers. For example, scalar |
| 15128 | floating-point values are returned in \fB\f(CB$f0\fB\fR only, not a |
| 15129 | \&\fB\f(CB$f0\fB\fR/\fB\f(CB$f1\fB\fR pair. The set of call-saved registers also |
| 15130 | remains the same, but all 64 bits are saved. |
| 15131 | .IP "\fB\-mabicalls\fR" 4 |
| 15132 | .IX Item "-mabicalls" |
| 15133 | .PD 0 |
| 15134 | .IP "\fB\-mno\-abicalls\fR" 4 |
| 15135 | .IX Item "-mno-abicalls" |
| 15136 | .PD |
| 15137 | Generate (do not generate) code that is suitable for SVR4\-style |
| 15138 | dynamic objects. \fB\-mabicalls\fR is the default for SVR4\-based |
| 15139 | systems. |
| 15140 | .IP "\fB\-mshared\fR" 4 |
| 15141 | .IX Item "-mshared" |
| 15142 | .PD 0 |
| 15143 | .IP "\fB\-mno\-shared\fR" 4 |
| 15144 | .IX Item "-mno-shared" |
| 15145 | .PD |
| 15146 | Generate (do not generate) code that is fully position-independent, |
| 15147 | and that can therefore be linked into shared libraries. This option |
| 15148 | only affects \fB\-mabicalls\fR. |
| 15149 | .Sp |
| 15150 | All \fB\-mabicalls\fR code has traditionally been position-independent, |
| 15151 | regardless of options like \fB\-fPIC\fR and \fB\-fpic\fR. However, |
| 15152 | as an extension, the \s-1GNU\s0 toolchain allows executables to use absolute |
| 15153 | accesses for locally-binding symbols. It can also use shorter \s-1GP\s0 |
| 15154 | initialization sequences and generate direct calls to locally-defined |
| 15155 | functions. This mode is selected by \fB\-mno\-shared\fR. |
| 15156 | .Sp |
| 15157 | \&\fB\-mno\-shared\fR depends on binutils 2.16 or higher and generates |
| 15158 | objects that can only be linked by the \s-1GNU\s0 linker. However, the option |
| 15159 | does not affect the \s-1ABI\s0 of the final executable; it only affects the \s-1ABI\s0 |
| 15160 | of relocatable objects. Using \fB\-mno\-shared\fR generally makes |
| 15161 | executables both smaller and quicker. |
| 15162 | .Sp |
| 15163 | \&\fB\-mshared\fR is the default. |
| 15164 | .IP "\fB\-mplt\fR" 4 |
| 15165 | .IX Item "-mplt" |
| 15166 | .PD 0 |
| 15167 | .IP "\fB\-mno\-plt\fR" 4 |
| 15168 | .IX Item "-mno-plt" |
| 15169 | .PD |
| 15170 | Assume (do not assume) that the static and dynamic linkers |
| 15171 | support PLTs and copy relocations. This option only affects |
| 15172 | \&\fB\-mno\-shared \-mabicalls\fR. For the n64 \s-1ABI\s0, this option |
| 15173 | has no effect without \fB\-msym32\fR. |
| 15174 | .Sp |
| 15175 | You can make \fB\-mplt\fR the default by configuring |
| 15176 | \&\s-1GCC\s0 with \fB\-\-with\-mips\-plt\fR. The default is |
| 15177 | \&\fB\-mno\-plt\fR otherwise. |
| 15178 | .IP "\fB\-mxgot\fR" 4 |
| 15179 | .IX Item "-mxgot" |
| 15180 | .PD 0 |
| 15181 | .IP "\fB\-mno\-xgot\fR" 4 |
| 15182 | .IX Item "-mno-xgot" |
| 15183 | .PD |
| 15184 | Lift (do not lift) the usual restrictions on the size of the global |
| 15185 | offset table. |
| 15186 | .Sp |
| 15187 | \&\s-1GCC\s0 normally uses a single instruction to load values from the \s-1GOT\s0. |
| 15188 | While this is relatively efficient, it only works if the \s-1GOT\s0 |
| 15189 | is smaller than about 64k. Anything larger causes the linker |
| 15190 | to report an error such as: |
| 15191 | .Sp |
| 15192 | .Vb 1 |
| 15193 | \& relocation truncated to fit: R_MIPS_GOT16 foobar |
| 15194 | .Ve |
| 15195 | .Sp |
| 15196 | If this happens, you should recompile your code with \fB\-mxgot\fR. |
| 15197 | This works with very large GOTs, although the code is also |
| 15198 | less efficient, since it takes three instructions to fetch the |
| 15199 | value of a global symbol. |
| 15200 | .Sp |
| 15201 | Note that some linkers can create multiple GOTs. If you have such a |
| 15202 | linker, you should only need to use \fB\-mxgot\fR when a single object |
| 15203 | file accesses more than 64k's worth of \s-1GOT\s0 entries. Very few do. |
| 15204 | .Sp |
| 15205 | These options have no effect unless \s-1GCC\s0 is generating position |
| 15206 | independent code. |
| 15207 | .IP "\fB\-mgp32\fR" 4 |
| 15208 | .IX Item "-mgp32" |
| 15209 | Assume that general-purpose registers are 32 bits wide. |
| 15210 | .IP "\fB\-mgp64\fR" 4 |
| 15211 | .IX Item "-mgp64" |
| 15212 | Assume that general-purpose registers are 64 bits wide. |
| 15213 | .IP "\fB\-mfp32\fR" 4 |
| 15214 | .IX Item "-mfp32" |
| 15215 | Assume that floating-point registers are 32 bits wide. |
| 15216 | .IP "\fB\-mfp64\fR" 4 |
| 15217 | .IX Item "-mfp64" |
| 15218 | Assume that floating-point registers are 64 bits wide. |
| 15219 | .IP "\fB\-mhard\-float\fR" 4 |
| 15220 | .IX Item "-mhard-float" |
| 15221 | Use floating-point coprocessor instructions. |
| 15222 | .IP "\fB\-msoft\-float\fR" 4 |
| 15223 | .IX Item "-msoft-float" |
| 15224 | Do not use floating-point coprocessor instructions. Implement |
| 15225 | floating-point calculations using library calls instead. |
| 15226 | .IP "\fB\-mno\-float\fR" 4 |
| 15227 | .IX Item "-mno-float" |
| 15228 | Equivalent to \fB\-msoft\-float\fR, but additionally asserts that the |
| 15229 | program being compiled does not perform any floating-point operations. |
| 15230 | This option is presently supported only by some bare-metal \s-1MIPS\s0 |
| 15231 | configurations, where it may select a special set of libraries |
| 15232 | that lack all floating-point support (including, for example, the |
| 15233 | floating-point \f(CW\*(C`printf\*(C'\fR formats). |
| 15234 | If code compiled with \f(CW\*(C`\-mno\-float\*(C'\fR accidentally contains |
| 15235 | floating-point operations, it is likely to suffer a link-time |
| 15236 | or run-time failure. |
| 15237 | .IP "\fB\-msingle\-float\fR" 4 |
| 15238 | .IX Item "-msingle-float" |
| 15239 | Assume that the floating-point coprocessor only supports single-precision |
| 15240 | operations. |
| 15241 | .IP "\fB\-mdouble\-float\fR" 4 |
| 15242 | .IX Item "-mdouble-float" |
| 15243 | Assume that the floating-point coprocessor supports double-precision |
| 15244 | operations. This is the default. |
| 15245 | .IP "\fB\-mllsc\fR" 4 |
| 15246 | .IX Item "-mllsc" |
| 15247 | .PD 0 |
| 15248 | .IP "\fB\-mno\-llsc\fR" 4 |
| 15249 | .IX Item "-mno-llsc" |
| 15250 | .PD |
| 15251 | Use (do not use) \fBll\fR, \fBsc\fR, and \fBsync\fR instructions to |
| 15252 | implement atomic memory built-in functions. When neither option is |
| 15253 | specified, \s-1GCC\s0 uses the instructions if the target architecture |
| 15254 | supports them. |
| 15255 | .Sp |
| 15256 | \&\fB\-mllsc\fR is useful if the runtime environment can emulate the |
| 15257 | instructions and \fB\-mno\-llsc\fR can be useful when compiling for |
| 15258 | nonstandard ISAs. You can make either option the default by |
| 15259 | configuring \s-1GCC\s0 with \fB\-\-with\-llsc\fR and \fB\-\-without\-llsc\fR |
| 15260 | respectively. \fB\-\-with\-llsc\fR is the default for some |
| 15261 | configurations; see the installation documentation for details. |
| 15262 | .IP "\fB\-mdsp\fR" 4 |
| 15263 | .IX Item "-mdsp" |
| 15264 | .PD 0 |
| 15265 | .IP "\fB\-mno\-dsp\fR" 4 |
| 15266 | .IX Item "-mno-dsp" |
| 15267 | .PD |
| 15268 | Use (do not use) revision 1 of the \s-1MIPS\s0 \s-1DSP\s0 \s-1ASE\s0. |
| 15269 | This option defines the |
| 15270 | preprocessor macro \fB_\|_mips_dsp\fR. It also defines |
| 15271 | \&\fB_\|_mips_dsp_rev\fR to 1. |
| 15272 | .IP "\fB\-mdspr2\fR" 4 |
| 15273 | .IX Item "-mdspr2" |
| 15274 | .PD 0 |
| 15275 | .IP "\fB\-mno\-dspr2\fR" 4 |
| 15276 | .IX Item "-mno-dspr2" |
| 15277 | .PD |
| 15278 | Use (do not use) revision 2 of the \s-1MIPS\s0 \s-1DSP\s0 \s-1ASE\s0. |
| 15279 | This option defines the |
| 15280 | preprocessor macros \fB_\|_mips_dsp\fR and \fB_\|_mips_dspr2\fR. |
| 15281 | It also defines \fB_\|_mips_dsp_rev\fR to 2. |
| 15282 | .IP "\fB\-msmartmips\fR" 4 |
| 15283 | .IX Item "-msmartmips" |
| 15284 | .PD 0 |
| 15285 | .IP "\fB\-mno\-smartmips\fR" 4 |
| 15286 | .IX Item "-mno-smartmips" |
| 15287 | .PD |
| 15288 | Use (do not use) the \s-1MIPS\s0 SmartMIPS \s-1ASE\s0. |
| 15289 | .IP "\fB\-mpaired\-single\fR" 4 |
| 15290 | .IX Item "-mpaired-single" |
| 15291 | .PD 0 |
| 15292 | .IP "\fB\-mno\-paired\-single\fR" 4 |
| 15293 | .IX Item "-mno-paired-single" |
| 15294 | .PD |
| 15295 | Use (do not use) paired-single floating-point instructions. |
| 15296 | This option requires |
| 15297 | hardware floating-point support to be enabled. |
| 15298 | .IP "\fB\-mdmx\fR" 4 |
| 15299 | .IX Item "-mdmx" |
| 15300 | .PD 0 |
| 15301 | .IP "\fB\-mno\-mdmx\fR" 4 |
| 15302 | .IX Item "-mno-mdmx" |
| 15303 | .PD |
| 15304 | Use (do not use) \s-1MIPS\s0 Digital Media Extension instructions. |
| 15305 | This option can only be used when generating 64\-bit code and requires |
| 15306 | hardware floating-point support to be enabled. |
| 15307 | .IP "\fB\-mips3d\fR" 4 |
| 15308 | .IX Item "-mips3d" |
| 15309 | .PD 0 |
| 15310 | .IP "\fB\-mno\-mips3d\fR" 4 |
| 15311 | .IX Item "-mno-mips3d" |
| 15312 | .PD |
| 15313 | Use (do not use) the \s-1MIPS\-3D\s0 \s-1ASE\s0. |
| 15314 | The option \fB\-mips3d\fR implies \fB\-mpaired\-single\fR. |
| 15315 | .IP "\fB\-mmt\fR" 4 |
| 15316 | .IX Item "-mmt" |
| 15317 | .PD 0 |
| 15318 | .IP "\fB\-mno\-mt\fR" 4 |
| 15319 | .IX Item "-mno-mt" |
| 15320 | .PD |
| 15321 | Use (do not use) \s-1MT\s0 Multithreading instructions. |
| 15322 | .IP "\fB\-mmcu\fR" 4 |
| 15323 | .IX Item "-mmcu" |
| 15324 | .PD 0 |
| 15325 | .IP "\fB\-mno\-mcu\fR" 4 |
| 15326 | .IX Item "-mno-mcu" |
| 15327 | .PD |
| 15328 | Use (do not use) the \s-1MIPS\s0 \s-1MCU\s0 \s-1ASE\s0 instructions. |
| 15329 | .IP "\fB\-mlong64\fR" 4 |
| 15330 | .IX Item "-mlong64" |
| 15331 | Force \f(CW\*(C`long\*(C'\fR types to be 64 bits wide. See \fB\-mlong32\fR for |
| 15332 | an explanation of the default and the way that the pointer size is |
| 15333 | determined. |
| 15334 | .IP "\fB\-mlong32\fR" 4 |
| 15335 | .IX Item "-mlong32" |
| 15336 | Force \f(CW\*(C`long\*(C'\fR, \f(CW\*(C`int\*(C'\fR, and pointer types to be 32 bits wide. |
| 15337 | .Sp |
| 15338 | The default size of \f(CW\*(C`int\*(C'\fRs, \f(CW\*(C`long\*(C'\fRs and pointers depends on |
| 15339 | the \s-1ABI\s0. All the supported ABIs use 32\-bit \f(CW\*(C`int\*(C'\fRs. The n64 \s-1ABI\s0 |
| 15340 | uses 64\-bit \f(CW\*(C`long\*(C'\fRs, as does the 64\-bit \s-1EABI\s0; the others use |
| 15341 | 32\-bit \f(CW\*(C`long\*(C'\fRs. Pointers are the same size as \f(CW\*(C`long\*(C'\fRs, |
| 15342 | or the same size as integer registers, whichever is smaller. |
| 15343 | .IP "\fB\-msym32\fR" 4 |
| 15344 | .IX Item "-msym32" |
| 15345 | .PD 0 |
| 15346 | .IP "\fB\-mno\-sym32\fR" 4 |
| 15347 | .IX Item "-mno-sym32" |
| 15348 | .PD |
| 15349 | Assume (do not assume) that all symbols have 32\-bit values, regardless |
| 15350 | of the selected \s-1ABI\s0. This option is useful in combination with |
| 15351 | \&\fB\-mabi=64\fR and \fB\-mno\-abicalls\fR because it allows \s-1GCC\s0 |
| 15352 | to generate shorter and faster references to symbolic addresses. |
| 15353 | .IP "\fB\-G\fR \fInum\fR" 4 |
| 15354 | .IX Item "-G num" |
| 15355 | Put definitions of externally-visible data in a small data section |
| 15356 | if that data is no bigger than \fInum\fR bytes. \s-1GCC\s0 can then generate |
| 15357 | more efficient accesses to the data; see \fB\-mgpopt\fR for details. |
| 15358 | .Sp |
| 15359 | The default \fB\-G\fR option depends on the configuration. |
| 15360 | .IP "\fB\-mlocal\-sdata\fR" 4 |
| 15361 | .IX Item "-mlocal-sdata" |
| 15362 | .PD 0 |
| 15363 | .IP "\fB\-mno\-local\-sdata\fR" 4 |
| 15364 | .IX Item "-mno-local-sdata" |
| 15365 | .PD |
| 15366 | Extend (do not extend) the \fB\-G\fR behavior to local data too, |
| 15367 | such as to static variables in C. \fB\-mlocal\-sdata\fR is the |
| 15368 | default for all configurations. |
| 15369 | .Sp |
| 15370 | If the linker complains that an application is using too much small data, |
| 15371 | you might want to try rebuilding the less performance-critical parts with |
| 15372 | \&\fB\-mno\-local\-sdata\fR. You might also want to build large |
| 15373 | libraries with \fB\-mno\-local\-sdata\fR, so that the libraries leave |
| 15374 | more room for the main program. |
| 15375 | .IP "\fB\-mextern\-sdata\fR" 4 |
| 15376 | .IX Item "-mextern-sdata" |
| 15377 | .PD 0 |
| 15378 | .IP "\fB\-mno\-extern\-sdata\fR" 4 |
| 15379 | .IX Item "-mno-extern-sdata" |
| 15380 | .PD |
| 15381 | Assume (do not assume) that externally-defined data is in |
| 15382 | a small data section if the size of that data is within the \fB\-G\fR limit. |
| 15383 | \&\fB\-mextern\-sdata\fR is the default for all configurations. |
| 15384 | .Sp |
| 15385 | If you compile a module \fIMod\fR with \fB\-mextern\-sdata\fR \fB\-G\fR |
| 15386 | \&\fInum\fR \fB\-mgpopt\fR, and \fIMod\fR references a variable \fIVar\fR |
| 15387 | that is no bigger than \fInum\fR bytes, you must make sure that \fIVar\fR |
| 15388 | is placed in a small data section. If \fIVar\fR is defined by another |
| 15389 | module, you must either compile that module with a high-enough |
| 15390 | \&\fB\-G\fR setting or attach a \f(CW\*(C`section\*(C'\fR attribute to \fIVar\fR's |
| 15391 | definition. If \fIVar\fR is common, you must link the application |
| 15392 | with a high-enough \fB\-G\fR setting. |
| 15393 | .Sp |
| 15394 | The easiest way of satisfying these restrictions is to compile |
| 15395 | and link every module with the same \fB\-G\fR option. However, |
| 15396 | you may wish to build a library that supports several different |
| 15397 | small data limits. You can do this by compiling the library with |
| 15398 | the highest supported \fB\-G\fR setting and additionally using |
| 15399 | \&\fB\-mno\-extern\-sdata\fR to stop the library from making assumptions |
| 15400 | about externally-defined data. |
| 15401 | .IP "\fB\-mgpopt\fR" 4 |
| 15402 | .IX Item "-mgpopt" |
| 15403 | .PD 0 |
| 15404 | .IP "\fB\-mno\-gpopt\fR" 4 |
| 15405 | .IX Item "-mno-gpopt" |
| 15406 | .PD |
| 15407 | Use (do not use) GP-relative accesses for symbols that are known to be |
| 15408 | in a small data section; see \fB\-G\fR, \fB\-mlocal\-sdata\fR and |
| 15409 | \&\fB\-mextern\-sdata\fR. \fB\-mgpopt\fR is the default for all |
| 15410 | configurations. |
| 15411 | .Sp |
| 15412 | \&\fB\-mno\-gpopt\fR is useful for cases where the \f(CW$gp\fR register |
| 15413 | might not hold the value of \f(CW\*(C`_gp\*(C'\fR. For example, if the code is |
| 15414 | part of a library that might be used in a boot monitor, programs that |
| 15415 | call boot monitor routines pass an unknown value in \f(CW$gp\fR. |
| 15416 | (In such situations, the boot monitor itself is usually compiled |
| 15417 | with \fB\-G0\fR.) |
| 15418 | .Sp |
| 15419 | \&\fB\-mno\-gpopt\fR implies \fB\-mno\-local\-sdata\fR and |
| 15420 | \&\fB\-mno\-extern\-sdata\fR. |
| 15421 | .IP "\fB\-membedded\-data\fR" 4 |
| 15422 | .IX Item "-membedded-data" |
| 15423 | .PD 0 |
| 15424 | .IP "\fB\-mno\-embedded\-data\fR" 4 |
| 15425 | .IX Item "-mno-embedded-data" |
| 15426 | .PD |
| 15427 | Allocate variables to the read-only data section first if possible, then |
| 15428 | next in the small data section if possible, otherwise in data. This gives |
| 15429 | slightly slower code than the default, but reduces the amount of \s-1RAM\s0 required |
| 15430 | when executing, and thus may be preferred for some embedded systems. |
| 15431 | .IP "\fB\-muninit\-const\-in\-rodata\fR" 4 |
| 15432 | .IX Item "-muninit-const-in-rodata" |
| 15433 | .PD 0 |
| 15434 | .IP "\fB\-mno\-uninit\-const\-in\-rodata\fR" 4 |
| 15435 | .IX Item "-mno-uninit-const-in-rodata" |
| 15436 | .PD |
| 15437 | Put uninitialized \f(CW\*(C`const\*(C'\fR variables in the read-only data section. |
| 15438 | This option is only meaningful in conjunction with \fB\-membedded\-data\fR. |
| 15439 | .IP "\fB\-mcode\-readable=\fR\fIsetting\fR" 4 |
| 15440 | .IX Item "-mcode-readable=setting" |
| 15441 | Specify whether \s-1GCC\s0 may generate code that reads from executable sections. |
| 15442 | There are three possible settings: |
| 15443 | .RS 4 |
| 15444 | .IP "\fB\-mcode\-readable=yes\fR" 4 |
| 15445 | .IX Item "-mcode-readable=yes" |
| 15446 | Instructions may freely access executable sections. This is the |
| 15447 | default setting. |
| 15448 | .IP "\fB\-mcode\-readable=pcrel\fR" 4 |
| 15449 | .IX Item "-mcode-readable=pcrel" |
| 15450 | \&\s-1MIPS16\s0 PC-relative load instructions can access executable sections, |
| 15451 | but other instructions must not do so. This option is useful on 4KSc |
| 15452 | and 4KSd processors when the code TLBs have the Read Inhibit bit set. |
| 15453 | It is also useful on processors that can be configured to have a dual |
| 15454 | instruction/data \s-1SRAM\s0 interface and that, like the M4K, automatically |
| 15455 | redirect PC-relative loads to the instruction \s-1RAM\s0. |
| 15456 | .IP "\fB\-mcode\-readable=no\fR" 4 |
| 15457 | .IX Item "-mcode-readable=no" |
| 15458 | Instructions must not access executable sections. This option can be |
| 15459 | useful on targets that are configured to have a dual instruction/data |
| 15460 | \&\s-1SRAM\s0 interface but that (unlike the M4K) do not automatically redirect |
| 15461 | PC-relative loads to the instruction \s-1RAM\s0. |
| 15462 | .RE |
| 15463 | .RS 4 |
| 15464 | .RE |
| 15465 | .IP "\fB\-msplit\-addresses\fR" 4 |
| 15466 | .IX Item "-msplit-addresses" |
| 15467 | .PD 0 |
| 15468 | .IP "\fB\-mno\-split\-addresses\fR" 4 |
| 15469 | .IX Item "-mno-split-addresses" |
| 15470 | .PD |
| 15471 | Enable (disable) use of the \f(CW\*(C`%hi()\*(C'\fR and \f(CW\*(C`%lo()\*(C'\fR assembler |
| 15472 | relocation operators. This option has been superseded by |
| 15473 | \&\fB\-mexplicit\-relocs\fR but is retained for backwards compatibility. |
| 15474 | .IP "\fB\-mexplicit\-relocs\fR" 4 |
| 15475 | .IX Item "-mexplicit-relocs" |
| 15476 | .PD 0 |
| 15477 | .IP "\fB\-mno\-explicit\-relocs\fR" 4 |
| 15478 | .IX Item "-mno-explicit-relocs" |
| 15479 | .PD |
| 15480 | Use (do not use) assembler relocation operators when dealing with symbolic |
| 15481 | addresses. The alternative, selected by \fB\-mno\-explicit\-relocs\fR, |
| 15482 | is to use assembler macros instead. |
| 15483 | .Sp |
| 15484 | \&\fB\-mexplicit\-relocs\fR is the default if \s-1GCC\s0 was configured |
| 15485 | to use an assembler that supports relocation operators. |
| 15486 | .IP "\fB\-mcheck\-zero\-division\fR" 4 |
| 15487 | .IX Item "-mcheck-zero-division" |
| 15488 | .PD 0 |
| 15489 | .IP "\fB\-mno\-check\-zero\-division\fR" 4 |
| 15490 | .IX Item "-mno-check-zero-division" |
| 15491 | .PD |
| 15492 | Trap (do not trap) on integer division by zero. |
| 15493 | .Sp |
| 15494 | The default is \fB\-mcheck\-zero\-division\fR. |
| 15495 | .IP "\fB\-mdivide\-traps\fR" 4 |
| 15496 | .IX Item "-mdivide-traps" |
| 15497 | .PD 0 |
| 15498 | .IP "\fB\-mdivide\-breaks\fR" 4 |
| 15499 | .IX Item "-mdivide-breaks" |
| 15500 | .PD |
| 15501 | \&\s-1MIPS\s0 systems check for division by zero by generating either a |
| 15502 | conditional trap or a break instruction. Using traps results in |
| 15503 | smaller code, but is only supported on \s-1MIPS\s0 \s-1II\s0 and later. Also, some |
| 15504 | versions of the Linux kernel have a bug that prevents trap from |
| 15505 | generating the proper signal (\f(CW\*(C`SIGFPE\*(C'\fR). Use \fB\-mdivide\-traps\fR to |
| 15506 | allow conditional traps on architectures that support them and |
| 15507 | \&\fB\-mdivide\-breaks\fR to force the use of breaks. |
| 15508 | .Sp |
| 15509 | The default is usually \fB\-mdivide\-traps\fR, but this can be |
| 15510 | overridden at configure time using \fB\-\-with\-divide=breaks\fR. |
| 15511 | Divide-by-zero checks can be completely disabled using |
| 15512 | \&\fB\-mno\-check\-zero\-division\fR. |
| 15513 | .IP "\fB\-mmemcpy\fR" 4 |
| 15514 | .IX Item "-mmemcpy" |
| 15515 | .PD 0 |
| 15516 | .IP "\fB\-mno\-memcpy\fR" 4 |
| 15517 | .IX Item "-mno-memcpy" |
| 15518 | .PD |
| 15519 | Force (do not force) the use of \f(CW\*(C`memcpy()\*(C'\fR for non-trivial block |
| 15520 | moves. The default is \fB\-mno\-memcpy\fR, which allows \s-1GCC\s0 to inline |
| 15521 | most constant-sized copies. |
| 15522 | .IP "\fB\-mlong\-calls\fR" 4 |
| 15523 | .IX Item "-mlong-calls" |
| 15524 | .PD 0 |
| 15525 | .IP "\fB\-mno\-long\-calls\fR" 4 |
| 15526 | .IX Item "-mno-long-calls" |
| 15527 | .PD |
| 15528 | Disable (do not disable) use of the \f(CW\*(C`jal\*(C'\fR instruction. Calling |
| 15529 | functions using \f(CW\*(C`jal\*(C'\fR is more efficient but requires the caller |
| 15530 | and callee to be in the same 256 megabyte segment. |
| 15531 | .Sp |
| 15532 | This option has no effect on abicalls code. The default is |
| 15533 | \&\fB\-mno\-long\-calls\fR. |
| 15534 | .IP "\fB\-mmad\fR" 4 |
| 15535 | .IX Item "-mmad" |
| 15536 | .PD 0 |
| 15537 | .IP "\fB\-mno\-mad\fR" 4 |
| 15538 | .IX Item "-mno-mad" |
| 15539 | .PD |
| 15540 | Enable (disable) use of the \f(CW\*(C`mad\*(C'\fR, \f(CW\*(C`madu\*(C'\fR and \f(CW\*(C`mul\*(C'\fR |
| 15541 | instructions, as provided by the R4650 \s-1ISA\s0. |
| 15542 | .IP "\fB\-mfused\-madd\fR" 4 |
| 15543 | .IX Item "-mfused-madd" |
| 15544 | .PD 0 |
| 15545 | .IP "\fB\-mno\-fused\-madd\fR" 4 |
| 15546 | .IX Item "-mno-fused-madd" |
| 15547 | .PD |
| 15548 | Enable (disable) use of the floating-point multiply-accumulate |
| 15549 | instructions, when they are available. The default is |
| 15550 | \&\fB\-mfused\-madd\fR. |
| 15551 | .Sp |
| 15552 | On the R8000 \s-1CPU\s0 when multiply-accumulate instructions are used, |
| 15553 | the intermediate product is calculated to infinite precision |
| 15554 | and is not subject to the \s-1FCSR\s0 Flush to Zero bit. This may be |
| 15555 | undesirable in some circumstances. On other processors the result |
| 15556 | is numerically identical to the equivalent computation using |
| 15557 | separate multiply, add, subtract and negate instructions. |
| 15558 | .IP "\fB\-nocpp\fR" 4 |
| 15559 | .IX Item "-nocpp" |
| 15560 | Tell the \s-1MIPS\s0 assembler to not run its preprocessor over user |
| 15561 | assembler files (with a \fB.s\fR suffix) when assembling them. |
| 15562 | .IP "\fB\-mfix\-24k\fR" 4 |
| 15563 | .IX Item "-mfix-24k" |
| 15564 | .PD 0 |
| 15565 | .IP "\fB\-mno\-fix\-24k\fR" 4 |
| 15566 | .IX Item "-mno-fix-24k" |
| 15567 | .PD |
| 15568 | Work around the 24K E48 (lost data on stores during refill) errata. |
| 15569 | The workarounds are implemented by the assembler rather than by \s-1GCC\s0. |
| 15570 | .IP "\fB\-mfix\-r4000\fR" 4 |
| 15571 | .IX Item "-mfix-r4000" |
| 15572 | .PD 0 |
| 15573 | .IP "\fB\-mno\-fix\-r4000\fR" 4 |
| 15574 | .IX Item "-mno-fix-r4000" |
| 15575 | .PD |
| 15576 | Work around certain R4000 \s-1CPU\s0 errata: |
| 15577 | .RS 4 |
| 15578 | .IP "\-" 4 |
| 15579 | A double-word or a variable shift may give an incorrect result if executed |
| 15580 | immediately after starting an integer division. |
| 15581 | .IP "\-" 4 |
| 15582 | A double-word or a variable shift may give an incorrect result if executed |
| 15583 | while an integer multiplication is in progress. |
| 15584 | .IP "\-" 4 |
| 15585 | An integer division may give an incorrect result if started in a delay slot |
| 15586 | of a taken branch or a jump. |
| 15587 | .RE |
| 15588 | .RS 4 |
| 15589 | .RE |
| 15590 | .IP "\fB\-mfix\-r4400\fR" 4 |
| 15591 | .IX Item "-mfix-r4400" |
| 15592 | .PD 0 |
| 15593 | .IP "\fB\-mno\-fix\-r4400\fR" 4 |
| 15594 | .IX Item "-mno-fix-r4400" |
| 15595 | .PD |
| 15596 | Work around certain R4400 \s-1CPU\s0 errata: |
| 15597 | .RS 4 |
| 15598 | .IP "\-" 4 |
| 15599 | A double-word or a variable shift may give an incorrect result if executed |
| 15600 | immediately after starting an integer division. |
| 15601 | .RE |
| 15602 | .RS 4 |
| 15603 | .RE |
| 15604 | .IP "\fB\-mfix\-r10000\fR" 4 |
| 15605 | .IX Item "-mfix-r10000" |
| 15606 | .PD 0 |
| 15607 | .IP "\fB\-mno\-fix\-r10000\fR" 4 |
| 15608 | .IX Item "-mno-fix-r10000" |
| 15609 | .PD |
| 15610 | Work around certain R10000 errata: |
| 15611 | .RS 4 |
| 15612 | .IP "\-" 4 |
| 15613 | \&\f(CW\*(C`ll\*(C'\fR/\f(CW\*(C`sc\*(C'\fR sequences may not behave atomically on revisions |
| 15614 | prior to 3.0. They may deadlock on revisions 2.6 and earlier. |
| 15615 | .RE |
| 15616 | .RS 4 |
| 15617 | .Sp |
| 15618 | This option can only be used if the target architecture supports |
| 15619 | branch-likely instructions. \fB\-mfix\-r10000\fR is the default when |
| 15620 | \&\fB\-march=r10000\fR is used; \fB\-mno\-fix\-r10000\fR is the default |
| 15621 | otherwise. |
| 15622 | .RE |
| 15623 | .IP "\fB\-mfix\-vr4120\fR" 4 |
| 15624 | .IX Item "-mfix-vr4120" |
| 15625 | .PD 0 |
| 15626 | .IP "\fB\-mno\-fix\-vr4120\fR" 4 |
| 15627 | .IX Item "-mno-fix-vr4120" |
| 15628 | .PD |
| 15629 | Work around certain \s-1VR4120\s0 errata: |
| 15630 | .RS 4 |
| 15631 | .IP "\-" 4 |
| 15632 | \&\f(CW\*(C`dmultu\*(C'\fR does not always produce the correct result. |
| 15633 | .IP "\-" 4 |
| 15634 | \&\f(CW\*(C`div\*(C'\fR and \f(CW\*(C`ddiv\*(C'\fR do not always produce the correct result if one |
| 15635 | of the operands is negative. |
| 15636 | .RE |
| 15637 | .RS 4 |
| 15638 | .Sp |
| 15639 | The workarounds for the division errata rely on special functions in |
| 15640 | \&\fIlibgcc.a\fR. At present, these functions are only provided by |
| 15641 | the \f(CW\*(C`mips64vr*\-elf\*(C'\fR configurations. |
| 15642 | .Sp |
| 15643 | Other \s-1VR4120\s0 errata require a \s-1NOP\s0 to be inserted between certain pairs of |
| 15644 | instructions. These errata are handled by the assembler, not by \s-1GCC\s0 itself. |
| 15645 | .RE |
| 15646 | .IP "\fB\-mfix\-vr4130\fR" 4 |
| 15647 | .IX Item "-mfix-vr4130" |
| 15648 | Work around the \s-1VR4130\s0 \f(CW\*(C`mflo\*(C'\fR/\f(CW\*(C`mfhi\*(C'\fR errata. The |
| 15649 | workarounds are implemented by the assembler rather than by \s-1GCC\s0, |
| 15650 | although \s-1GCC\s0 avoids using \f(CW\*(C`mflo\*(C'\fR and \f(CW\*(C`mfhi\*(C'\fR if the |
| 15651 | \&\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 |
| 15652 | instructions are available instead. |
| 15653 | .IP "\fB\-mfix\-sb1\fR" 4 |
| 15654 | .IX Item "-mfix-sb1" |
| 15655 | .PD 0 |
| 15656 | .IP "\fB\-mno\-fix\-sb1\fR" 4 |
| 15657 | .IX Item "-mno-fix-sb1" |
| 15658 | .PD |
| 15659 | Work around certain \s-1SB\-1\s0 \s-1CPU\s0 core errata. |
| 15660 | (This flag currently works around the \s-1SB\-1\s0 revision 2 |
| 15661 | \&\*(L"F1\*(R" and \*(L"F2\*(R" floating-point errata.) |
| 15662 | .IP "\fB\-mr10k\-cache\-barrier=\fR\fIsetting\fR" 4 |
| 15663 | .IX Item "-mr10k-cache-barrier=setting" |
| 15664 | Specify whether \s-1GCC\s0 should insert cache barriers to avoid the |
| 15665 | side-effects of speculation on R10K processors. |
| 15666 | .Sp |
| 15667 | In common with many processors, the R10K tries to predict the outcome |
| 15668 | of a conditional branch and speculatively executes instructions from |
| 15669 | the \*(L"taken\*(R" branch. It later aborts these instructions if the |
| 15670 | predicted outcome is wrong. However, on the R10K, even aborted |
| 15671 | instructions can have side effects. |
| 15672 | .Sp |
| 15673 | This problem only affects kernel stores and, depending on the system, |
| 15674 | kernel loads. As an example, a speculatively-executed store may load |
| 15675 | the target memory into cache and mark the cache line as dirty, even if |
| 15676 | the store itself is later aborted. If a \s-1DMA\s0 operation writes to the |
| 15677 | same area of memory before the \*(L"dirty\*(R" line is flushed, the cached |
| 15678 | data overwrites the DMA-ed data. See the R10K processor manual |
| 15679 | for a full description, including other potential problems. |
| 15680 | .Sp |
| 15681 | One workaround is to insert cache barrier instructions before every memory |
| 15682 | access that might be speculatively executed and that might have side |
| 15683 | effects even if aborted. \fB\-mr10k\-cache\-barrier=\fR\fIsetting\fR |
| 15684 | controls \s-1GCC\s0's implementation of this workaround. It assumes that |
| 15685 | aborted accesses to any byte in the following regions does not have |
| 15686 | side effects: |
| 15687 | .RS 4 |
| 15688 | .IP "1." 4 |
| 15689 | the memory occupied by the current function's stack frame; |
| 15690 | .IP "2." 4 |
| 15691 | the memory occupied by an incoming stack argument; |
| 15692 | .IP "3." 4 |
| 15693 | the memory occupied by an object with a link-time-constant address. |
| 15694 | .RE |
| 15695 | .RS 4 |
| 15696 | .Sp |
| 15697 | It is the kernel's responsibility to ensure that speculative |
| 15698 | accesses to these regions are indeed safe. |
| 15699 | .Sp |
| 15700 | If the input program contains a function declaration such as: |
| 15701 | .Sp |
| 15702 | .Vb 1 |
| 15703 | \& void foo (void); |
| 15704 | .Ve |
| 15705 | .Sp |
| 15706 | then the implementation of \f(CW\*(C`foo\*(C'\fR must allow \f(CW\*(C`j foo\*(C'\fR and |
| 15707 | \&\f(CW\*(C`jal foo\*(C'\fR to be executed speculatively. \s-1GCC\s0 honors this |
| 15708 | restriction for functions it compiles itself. It expects non-GCC |
| 15709 | functions (such as hand-written assembly code) to do the same. |
| 15710 | .Sp |
| 15711 | The option has three forms: |
| 15712 | .IP "\fB\-mr10k\-cache\-barrier=load\-store\fR" 4 |
| 15713 | .IX Item "-mr10k-cache-barrier=load-store" |
| 15714 | Insert a cache barrier before a load or store that might be |
| 15715 | speculatively executed and that might have side effects even |
| 15716 | if aborted. |
| 15717 | .IP "\fB\-mr10k\-cache\-barrier=store\fR" 4 |
| 15718 | .IX Item "-mr10k-cache-barrier=store" |
| 15719 | Insert a cache barrier before a store that might be speculatively |
| 15720 | executed and that might have side effects even if aborted. |
| 15721 | .IP "\fB\-mr10k\-cache\-barrier=none\fR" 4 |
| 15722 | .IX Item "-mr10k-cache-barrier=none" |
| 15723 | Disable the insertion of cache barriers. This is the default setting. |
| 15724 | .RE |
| 15725 | .RS 4 |
| 15726 | .RE |
| 15727 | .IP "\fB\-mflush\-func=\fR\fIfunc\fR" 4 |
| 15728 | .IX Item "-mflush-func=func" |
| 15729 | .PD 0 |
| 15730 | .IP "\fB\-mno\-flush\-func\fR" 4 |
| 15731 | .IX Item "-mno-flush-func" |
| 15732 | .PD |
| 15733 | Specifies the function to call to flush the I and D caches, or to not |
| 15734 | call any such function. If called, the function must take the same |
| 15735 | arguments as the common \f(CW\*(C`_flush_func()\*(C'\fR, that is, the address of the |
| 15736 | memory range for which the cache is being flushed, the size of the |
| 15737 | memory range, and the number 3 (to flush both caches). The default |
| 15738 | depends on the target \s-1GCC\s0 was configured for, but commonly is either |
| 15739 | \&\fB_flush_func\fR or \fB_\|_cpu_flush\fR. |
| 15740 | .IP "\fBmbranch\-cost=\fR\fInum\fR" 4 |
| 15741 | .IX Item "mbranch-cost=num" |
| 15742 | Set the cost of branches to roughly \fInum\fR \*(L"simple\*(R" instructions. |
| 15743 | This cost is only a heuristic and is not guaranteed to produce |
| 15744 | consistent results across releases. A zero cost redundantly selects |
| 15745 | the default, which is based on the \fB\-mtune\fR setting. |
| 15746 | .IP "\fB\-mbranch\-likely\fR" 4 |
| 15747 | .IX Item "-mbranch-likely" |
| 15748 | .PD 0 |
| 15749 | .IP "\fB\-mno\-branch\-likely\fR" 4 |
| 15750 | .IX Item "-mno-branch-likely" |
| 15751 | .PD |
| 15752 | Enable or disable use of Branch Likely instructions, regardless of the |
| 15753 | default for the selected architecture. By default, Branch Likely |
| 15754 | instructions may be generated if they are supported by the selected |
| 15755 | architecture. An exception is for the \s-1MIPS32\s0 and \s-1MIPS64\s0 architectures |
| 15756 | and processors that implement those architectures; for those, Branch |
| 15757 | Likely instructions are not be generated by default because the \s-1MIPS32\s0 |
| 15758 | and \s-1MIPS64\s0 architectures specifically deprecate their use. |
| 15759 | .IP "\fB\-mfp\-exceptions\fR" 4 |
| 15760 | .IX Item "-mfp-exceptions" |
| 15761 | .PD 0 |
| 15762 | .IP "\fB\-mno\-fp\-exceptions\fR" 4 |
| 15763 | .IX Item "-mno-fp-exceptions" |
| 15764 | .PD |
| 15765 | Specifies whether \s-1FP\s0 exceptions are enabled. This affects how |
| 15766 | \&\s-1FP\s0 instructions are scheduled for some processors. |
| 15767 | The default is that \s-1FP\s0 exceptions are |
| 15768 | enabled. |
| 15769 | .Sp |
| 15770 | For instance, on the \s-1SB\-1\s0, if \s-1FP\s0 exceptions are disabled, and we are emitting |
| 15771 | 64\-bit code, then we can use both \s-1FP\s0 pipes. Otherwise, we can only use one |
| 15772 | \&\s-1FP\s0 pipe. |
| 15773 | .IP "\fB\-mvr4130\-align\fR" 4 |
| 15774 | .IX Item "-mvr4130-align" |
| 15775 | .PD 0 |
| 15776 | .IP "\fB\-mno\-vr4130\-align\fR" 4 |
| 15777 | .IX Item "-mno-vr4130-align" |
| 15778 | .PD |
| 15779 | The \s-1VR4130\s0 pipeline is two-way superscalar, but can only issue two |
| 15780 | instructions together if the first one is 8\-byte aligned. When this |
| 15781 | option is enabled, \s-1GCC\s0 aligns pairs of instructions that it |
| 15782 | thinks should execute in parallel. |
| 15783 | .Sp |
| 15784 | This option only has an effect when optimizing for the \s-1VR4130\s0. |
| 15785 | It normally makes code faster, but at the expense of making it bigger. |
| 15786 | It is enabled by default at optimization level \fB\-O3\fR. |
| 15787 | .IP "\fB\-msynci\fR" 4 |
| 15788 | .IX Item "-msynci" |
| 15789 | .PD 0 |
| 15790 | .IP "\fB\-mno\-synci\fR" 4 |
| 15791 | .IX Item "-mno-synci" |
| 15792 | .PD |
| 15793 | Enable (disable) generation of \f(CW\*(C`synci\*(C'\fR instructions on |
| 15794 | architectures that support it. The \f(CW\*(C`synci\*(C'\fR instructions (if |
| 15795 | enabled) are generated when \f(CW\*(C`_\|_builtin_\|_\|_clear_cache()\*(C'\fR is |
| 15796 | compiled. |
| 15797 | .Sp |
| 15798 | This option defaults to \f(CW\*(C`\-mno\-synci\*(C'\fR, but the default can be |
| 15799 | overridden by configuring with \f(CW\*(C`\-\-with\-synci\*(C'\fR. |
| 15800 | .Sp |
| 15801 | When compiling code for single processor systems, it is generally safe |
| 15802 | to use \f(CW\*(C`synci\*(C'\fR. However, on many multi-core (\s-1SMP\s0) systems, it |
| 15803 | does not invalidate the instruction caches on all cores and may lead |
| 15804 | to undefined behavior. |
| 15805 | .IP "\fB\-mrelax\-pic\-calls\fR" 4 |
| 15806 | .IX Item "-mrelax-pic-calls" |
| 15807 | .PD 0 |
| 15808 | .IP "\fB\-mno\-relax\-pic\-calls\fR" 4 |
| 15809 | .IX Item "-mno-relax-pic-calls" |
| 15810 | .PD |
| 15811 | Try to turn \s-1PIC\s0 calls that are normally dispatched via register |
| 15812 | \&\f(CW$25\fR into direct calls. This is only possible if the linker can |
| 15813 | resolve the destination at link-time and if the destination is within |
| 15814 | range for a direct call. |
| 15815 | .Sp |
| 15816 | \&\fB\-mrelax\-pic\-calls\fR is the default if \s-1GCC\s0 was configured to use |
| 15817 | an assembler and a linker that support the \f(CW\*(C`.reloc\*(C'\fR assembly |
| 15818 | directive and \f(CW\*(C`\-mexplicit\-relocs\*(C'\fR is in effect. With |
| 15819 | \&\f(CW\*(C`\-mno\-explicit\-relocs\*(C'\fR, this optimization can be performed by the |
| 15820 | assembler and the linker alone without help from the compiler. |
| 15821 | .IP "\fB\-mmcount\-ra\-address\fR" 4 |
| 15822 | .IX Item "-mmcount-ra-address" |
| 15823 | .PD 0 |
| 15824 | .IP "\fB\-mno\-mcount\-ra\-address\fR" 4 |
| 15825 | .IX Item "-mno-mcount-ra-address" |
| 15826 | .PD |
| 15827 | Emit (do not emit) code that allows \f(CW\*(C`_mcount\*(C'\fR to modify the |
| 15828 | calling function's return address. When enabled, this option extends |
| 15829 | the usual \f(CW\*(C`_mcount\*(C'\fR interface with a new \fIra-address\fR |
| 15830 | parameter, which has type \f(CW\*(C`intptr_t *\*(C'\fR and is passed in register |
| 15831 | \&\f(CW$12\fR. \f(CW\*(C`_mcount\*(C'\fR can then modify the return address by |
| 15832 | doing both of the following: |
| 15833 | .RS 4 |
| 15834 | .IP "\(bu" 4 |
| 15835 | Returning the new address in register \f(CW$31\fR. |
| 15836 | .IP "\(bu" 4 |
| 15837 | Storing the new address in \f(CW\*(C`*\f(CIra\-address\f(CW\*(C'\fR, |
| 15838 | if \fIra-address\fR is nonnull. |
| 15839 | .RE |
| 15840 | .RS 4 |
| 15841 | .Sp |
| 15842 | The default is \fB\-mno\-mcount\-ra\-address\fR. |
| 15843 | .RE |
| 15844 | .PP |
| 15845 | \fI\s-1MMIX\s0 Options\fR |
| 15846 | .IX Subsection "MMIX Options" |
| 15847 | .PP |
| 15848 | These options are defined for the \s-1MMIX:\s0 |
| 15849 | .IP "\fB\-mlibfuncs\fR" 4 |
| 15850 | .IX Item "-mlibfuncs" |
| 15851 | .PD 0 |
| 15852 | .IP "\fB\-mno\-libfuncs\fR" 4 |
| 15853 | .IX Item "-mno-libfuncs" |
| 15854 | .PD |
| 15855 | Specify that intrinsic library functions are being compiled, passing all |
| 15856 | values in registers, no matter the size. |
| 15857 | .IP "\fB\-mepsilon\fR" 4 |
| 15858 | .IX Item "-mepsilon" |
| 15859 | .PD 0 |
| 15860 | .IP "\fB\-mno\-epsilon\fR" 4 |
| 15861 | .IX Item "-mno-epsilon" |
| 15862 | .PD |
| 15863 | Generate floating-point comparison instructions that compare with respect |
| 15864 | to the \f(CW\*(C`rE\*(C'\fR epsilon register. |
| 15865 | .IP "\fB\-mabi=mmixware\fR" 4 |
| 15866 | .IX Item "-mabi=mmixware" |
| 15867 | .PD 0 |
| 15868 | .IP "\fB\-mabi=gnu\fR" 4 |
| 15869 | .IX Item "-mabi=gnu" |
| 15870 | .PD |
| 15871 | Generate code that passes function parameters and return values that (in |
| 15872 | the called function) are seen as registers \f(CW$0\fR and up, as opposed to |
| 15873 | the \s-1GNU\s0 \s-1ABI\s0 which uses global registers \f(CW$231\fR and up. |
| 15874 | .IP "\fB\-mzero\-extend\fR" 4 |
| 15875 | .IX Item "-mzero-extend" |
| 15876 | .PD 0 |
| 15877 | .IP "\fB\-mno\-zero\-extend\fR" 4 |
| 15878 | .IX Item "-mno-zero-extend" |
| 15879 | .PD |
| 15880 | When reading data from memory in sizes shorter than 64 bits, use (do not |
| 15881 | use) zero-extending load instructions by default, rather than |
| 15882 | sign-extending ones. |
| 15883 | .IP "\fB\-mknuthdiv\fR" 4 |
| 15884 | .IX Item "-mknuthdiv" |
| 15885 | .PD 0 |
| 15886 | .IP "\fB\-mno\-knuthdiv\fR" 4 |
| 15887 | .IX Item "-mno-knuthdiv" |
| 15888 | .PD |
| 15889 | Make the result of a division yielding a remainder have the same sign as |
| 15890 | the divisor. With the default, \fB\-mno\-knuthdiv\fR, the sign of the |
| 15891 | remainder follows the sign of the dividend. Both methods are |
| 15892 | arithmetically valid, the latter being almost exclusively used. |
| 15893 | .IP "\fB\-mtoplevel\-symbols\fR" 4 |
| 15894 | .IX Item "-mtoplevel-symbols" |
| 15895 | .PD 0 |
| 15896 | .IP "\fB\-mno\-toplevel\-symbols\fR" 4 |
| 15897 | .IX Item "-mno-toplevel-symbols" |
| 15898 | .PD |
| 15899 | Prepend (do not prepend) a \fB:\fR to all global symbols, so the assembly |
| 15900 | code can be used with the \f(CW\*(C`PREFIX\*(C'\fR assembly directive. |
| 15901 | .IP "\fB\-melf\fR" 4 |
| 15902 | .IX Item "-melf" |
| 15903 | Generate an executable in the \s-1ELF\s0 format, rather than the default |
| 15904 | \&\fBmmo\fR format used by the \fBmmix\fR simulator. |
| 15905 | .IP "\fB\-mbranch\-predict\fR" 4 |
| 15906 | .IX Item "-mbranch-predict" |
| 15907 | .PD 0 |
| 15908 | .IP "\fB\-mno\-branch\-predict\fR" 4 |
| 15909 | .IX Item "-mno-branch-predict" |
| 15910 | .PD |
| 15911 | Use (do not use) the probable-branch instructions, when static branch |
| 15912 | prediction indicates a probable branch. |
| 15913 | .IP "\fB\-mbase\-addresses\fR" 4 |
| 15914 | .IX Item "-mbase-addresses" |
| 15915 | .PD 0 |
| 15916 | .IP "\fB\-mno\-base\-addresses\fR" 4 |
| 15917 | .IX Item "-mno-base-addresses" |
| 15918 | .PD |
| 15919 | Generate (do not generate) code that uses \fIbase addresses\fR. Using a |
| 15920 | base address automatically generates a request (handled by the assembler |
| 15921 | and the linker) for a constant to be set up in a global register. The |
| 15922 | register is used for one or more base address requests within the range 0 |
| 15923 | to 255 from the value held in the register. The generally leads to short |
| 15924 | and fast code, but the number of different data items that can be |
| 15925 | addressed is limited. This means that a program that uses lots of static |
| 15926 | data may require \fB\-mno\-base\-addresses\fR. |
| 15927 | .IP "\fB\-msingle\-exit\fR" 4 |
| 15928 | .IX Item "-msingle-exit" |
| 15929 | .PD 0 |
| 15930 | .IP "\fB\-mno\-single\-exit\fR" 4 |
| 15931 | .IX Item "-mno-single-exit" |
| 15932 | .PD |
| 15933 | Force (do not force) generated code to have a single exit point in each |
| 15934 | function. |
| 15935 | .PP |
| 15936 | \fI\s-1MN10300\s0 Options\fR |
| 15937 | .IX Subsection "MN10300 Options" |
| 15938 | .PP |
| 15939 | These \fB\-m\fR options are defined for Matsushita \s-1MN10300\s0 architectures: |
| 15940 | .IP "\fB\-mmult\-bug\fR" 4 |
| 15941 | .IX Item "-mmult-bug" |
| 15942 | Generate code to avoid bugs in the multiply instructions for the \s-1MN10300\s0 |
| 15943 | processors. This is the default. |
| 15944 | .IP "\fB\-mno\-mult\-bug\fR" 4 |
| 15945 | .IX Item "-mno-mult-bug" |
| 15946 | Do not generate code to avoid bugs in the multiply instructions for the |
| 15947 | \&\s-1MN10300\s0 processors. |
| 15948 | .IP "\fB\-mam33\fR" 4 |
| 15949 | .IX Item "-mam33" |
| 15950 | Generate code using features specific to the \s-1AM33\s0 processor. |
| 15951 | .IP "\fB\-mno\-am33\fR" 4 |
| 15952 | .IX Item "-mno-am33" |
| 15953 | Do not generate code using features specific to the \s-1AM33\s0 processor. This |
| 15954 | is the default. |
| 15955 | .IP "\fB\-mam33\-2\fR" 4 |
| 15956 | .IX Item "-mam33-2" |
| 15957 | Generate code using features specific to the \s-1AM33/2\s0.0 processor. |
| 15958 | .IP "\fB\-mam34\fR" 4 |
| 15959 | .IX Item "-mam34" |
| 15960 | Generate code using features specific to the \s-1AM34\s0 processor. |
| 15961 | .IP "\fB\-mtune=\fR\fIcpu-type\fR" 4 |
| 15962 | .IX Item "-mtune=cpu-type" |
| 15963 | Use the timing characteristics of the indicated \s-1CPU\s0 type when |
| 15964 | scheduling instructions. This does not change the targeted processor |
| 15965 | type. The \s-1CPU\s0 type must be one of \fBmn10300\fR, \fBam33\fR, |
| 15966 | \&\fBam33\-2\fR or \fBam34\fR. |
| 15967 | .IP "\fB\-mreturn\-pointer\-on\-d0\fR" 4 |
| 15968 | .IX Item "-mreturn-pointer-on-d0" |
| 15969 | When generating a function that returns a pointer, return the pointer |
| 15970 | in both \f(CW\*(C`a0\*(C'\fR and \f(CW\*(C`d0\*(C'\fR. Otherwise, the pointer is returned |
| 15971 | only in \f(CW\*(C`a0\*(C'\fR, and attempts to call such functions without a prototype |
| 15972 | result in errors. Note that this option is on by default; use |
| 15973 | \&\fB\-mno\-return\-pointer\-on\-d0\fR to disable it. |
| 15974 | .IP "\fB\-mno\-crt0\fR" 4 |
| 15975 | .IX Item "-mno-crt0" |
| 15976 | Do not link in the C run-time initialization object file. |
| 15977 | .IP "\fB\-mrelax\fR" 4 |
| 15978 | .IX Item "-mrelax" |
| 15979 | Indicate to the linker that it should perform a relaxation optimization pass |
| 15980 | to shorten branches, calls and absolute memory addresses. This option only |
| 15981 | has an effect when used on the command line for the final link step. |
| 15982 | .Sp |
| 15983 | This option makes symbolic debugging impossible. |
| 15984 | .IP "\fB\-mliw\fR" 4 |
| 15985 | .IX Item "-mliw" |
| 15986 | Allow the compiler to generate \fILong Instruction Word\fR |
| 15987 | instructions if the target is the \fB\s-1AM33\s0\fR or later. This is the |
| 15988 | default. This option defines the preprocessor macro \fB_\|_LIW_\|_\fR. |
| 15989 | .IP "\fB\-mnoliw\fR" 4 |
| 15990 | .IX Item "-mnoliw" |
| 15991 | Do not allow the compiler to generate \fILong Instruction Word\fR |
| 15992 | instructions. This option defines the preprocessor macro |
| 15993 | \&\fB_\|_NO_LIW_\|_\fR. |
| 15994 | .IP "\fB\-msetlb\fR" 4 |
| 15995 | .IX Item "-msetlb" |
| 15996 | Allow the compiler to generate the \fI\s-1SETLB\s0\fR and \fILcc\fR |
| 15997 | instructions if the target is the \fB\s-1AM33\s0\fR or later. This is the |
| 15998 | default. This option defines the preprocessor macro \fB_\|_SETLB_\|_\fR. |
| 15999 | .IP "\fB\-mnosetlb\fR" 4 |
| 16000 | .IX Item "-mnosetlb" |
| 16001 | Do not allow the compiler to generate \fI\s-1SETLB\s0\fR or \fILcc\fR |
| 16002 | instructions. This option defines the preprocessor macro |
| 16003 | \&\fB_\|_NO_SETLB_\|_\fR. |
| 16004 | .PP |
| 16005 | \fIMoxie Options\fR |
| 16006 | .IX Subsection "Moxie Options" |
| 16007 | .IP "\fB\-meb\fR" 4 |
| 16008 | .IX Item "-meb" |
| 16009 | Generate big-endian code. This is the default for \fBmoxie\-*\-*\fR |
| 16010 | configurations. |
| 16011 | .IP "\fB\-mel\fR" 4 |
| 16012 | .IX Item "-mel" |
| 16013 | Generate little-endian code. |
| 16014 | .IP "\fB\-mno\-crt0\fR" 4 |
| 16015 | .IX Item "-mno-crt0" |
| 16016 | Do not link in the C run-time initialization object file. |
| 16017 | .PP |
| 16018 | \fI\s-1PDP\-11\s0 Options\fR |
| 16019 | .IX Subsection "PDP-11 Options" |
| 16020 | .PP |
| 16021 | These options are defined for the \s-1PDP\-11:\s0 |
| 16022 | .IP "\fB\-mfpu\fR" 4 |
| 16023 | .IX Item "-mfpu" |
| 16024 | Use hardware \s-1FPP\s0 floating point. This is the default. (\s-1FIS\s0 floating |
| 16025 | point on the \s-1PDP\-11/40\s0 is not supported.) |
| 16026 | .IP "\fB\-msoft\-float\fR" 4 |
| 16027 | .IX Item "-msoft-float" |
| 16028 | Do not use hardware floating point. |
| 16029 | .IP "\fB\-mac0\fR" 4 |
| 16030 | .IX Item "-mac0" |
| 16031 | Return floating-point results in ac0 (fr0 in Unix assembler syntax). |
| 16032 | .IP "\fB\-mno\-ac0\fR" 4 |
| 16033 | .IX Item "-mno-ac0" |
| 16034 | Return floating-point results in memory. This is the default. |
| 16035 | .IP "\fB\-m40\fR" 4 |
| 16036 | .IX Item "-m40" |
| 16037 | Generate code for a \s-1PDP\-11/40\s0. |
| 16038 | .IP "\fB\-m45\fR" 4 |
| 16039 | .IX Item "-m45" |
| 16040 | Generate code for a \s-1PDP\-11/45\s0. This is the default. |
| 16041 | .IP "\fB\-m10\fR" 4 |
| 16042 | .IX Item "-m10" |
| 16043 | Generate code for a \s-1PDP\-11/10\s0. |
| 16044 | .IP "\fB\-mbcopy\-builtin\fR" 4 |
| 16045 | .IX Item "-mbcopy-builtin" |
| 16046 | Use inline \f(CW\*(C`movmemhi\*(C'\fR patterns for copying memory. This is the |
| 16047 | default. |
| 16048 | .IP "\fB\-mbcopy\fR" 4 |
| 16049 | .IX Item "-mbcopy" |
| 16050 | Do not use inline \f(CW\*(C`movmemhi\*(C'\fR patterns for copying memory. |
| 16051 | .IP "\fB\-mint16\fR" 4 |
| 16052 | .IX Item "-mint16" |
| 16053 | .PD 0 |
| 16054 | .IP "\fB\-mno\-int32\fR" 4 |
| 16055 | .IX Item "-mno-int32" |
| 16056 | .PD |
| 16057 | Use 16\-bit \f(CW\*(C`int\*(C'\fR. This is the default. |
| 16058 | .IP "\fB\-mint32\fR" 4 |
| 16059 | .IX Item "-mint32" |
| 16060 | .PD 0 |
| 16061 | .IP "\fB\-mno\-int16\fR" 4 |
| 16062 | .IX Item "-mno-int16" |
| 16063 | .PD |
| 16064 | Use 32\-bit \f(CW\*(C`int\*(C'\fR. |
| 16065 | .IP "\fB\-mfloat64\fR" 4 |
| 16066 | .IX Item "-mfloat64" |
| 16067 | .PD 0 |
| 16068 | .IP "\fB\-mno\-float32\fR" 4 |
| 16069 | .IX Item "-mno-float32" |
| 16070 | .PD |
| 16071 | Use 64\-bit \f(CW\*(C`float\*(C'\fR. This is the default. |
| 16072 | .IP "\fB\-mfloat32\fR" 4 |
| 16073 | .IX Item "-mfloat32" |
| 16074 | .PD 0 |
| 16075 | .IP "\fB\-mno\-float64\fR" 4 |
| 16076 | .IX Item "-mno-float64" |
| 16077 | .PD |
| 16078 | Use 32\-bit \f(CW\*(C`float\*(C'\fR. |
| 16079 | .IP "\fB\-mabshi\fR" 4 |
| 16080 | .IX Item "-mabshi" |
| 16081 | Use \f(CW\*(C`abshi2\*(C'\fR pattern. This is the default. |
| 16082 | .IP "\fB\-mno\-abshi\fR" 4 |
| 16083 | .IX Item "-mno-abshi" |
| 16084 | Do not use \f(CW\*(C`abshi2\*(C'\fR pattern. |
| 16085 | .IP "\fB\-mbranch\-expensive\fR" 4 |
| 16086 | .IX Item "-mbranch-expensive" |
| 16087 | Pretend that branches are expensive. This is for experimenting with |
| 16088 | code generation only. |
| 16089 | .IP "\fB\-mbranch\-cheap\fR" 4 |
| 16090 | .IX Item "-mbranch-cheap" |
| 16091 | Do not pretend that branches are expensive. This is the default. |
| 16092 | .IP "\fB\-munix\-asm\fR" 4 |
| 16093 | .IX Item "-munix-asm" |
| 16094 | Use Unix assembler syntax. This is the default when configured for |
| 16095 | \&\fBpdp11\-*\-bsd\fR. |
| 16096 | .IP "\fB\-mdec\-asm\fR" 4 |
| 16097 | .IX Item "-mdec-asm" |
| 16098 | Use \s-1DEC\s0 assembler syntax. This is the default when configured for any |
| 16099 | \&\s-1PDP\-11\s0 target other than \fBpdp11\-*\-bsd\fR. |
| 16100 | .PP |
| 16101 | \fIpicoChip Options\fR |
| 16102 | .IX Subsection "picoChip Options" |
| 16103 | .PP |
| 16104 | These \fB\-m\fR options are defined for picoChip implementations: |
| 16105 | .IP "\fB\-mae=\fR\fIae_type\fR" 4 |
| 16106 | .IX Item "-mae=ae_type" |
| 16107 | Set the instruction set, register set, and instruction scheduling |
| 16108 | parameters for array element type \fIae_type\fR. Supported values |
| 16109 | for \fIae_type\fR are \fB\s-1ANY\s0\fR, \fB\s-1MUL\s0\fR, and \fB\s-1MAC\s0\fR. |
| 16110 | .Sp |
| 16111 | \&\fB\-mae=ANY\fR selects a completely generic \s-1AE\s0 type. Code |
| 16112 | generated with this option runs on any of the other \s-1AE\s0 types. The |
| 16113 | code is not as efficient as it would be if compiled for a specific |
| 16114 | \&\s-1AE\s0 type, and some types of operation (e.g., multiplication) do not |
| 16115 | work properly on all types of \s-1AE\s0. |
| 16116 | .Sp |
| 16117 | \&\fB\-mae=MUL\fR selects a \s-1MUL\s0 \s-1AE\s0 type. This is the most useful \s-1AE\s0 type |
| 16118 | for compiled code, and is the default. |
| 16119 | .Sp |
| 16120 | \&\fB\-mae=MAC\fR selects a DSP-style \s-1MAC\s0 \s-1AE\s0. Code compiled with this |
| 16121 | option may suffer from poor performance of byte (char) manipulation, |
| 16122 | since the \s-1DSP\s0 \s-1AE\s0 does not provide hardware support for byte load/stores. |
| 16123 | .IP "\fB\-msymbol\-as\-address\fR" 4 |
| 16124 | .IX Item "-msymbol-as-address" |
| 16125 | Enable the compiler to directly use a symbol name as an address in a |
| 16126 | load/store instruction, without first loading it into a |
| 16127 | register. Typically, the use of this option generates larger |
| 16128 | programs, which run faster than when the option isn't used. However, the |
| 16129 | results vary from program to program, so it is left as a user option, |
| 16130 | rather than being permanently enabled. |
| 16131 | .IP "\fB\-mno\-inefficient\-warnings\fR" 4 |
| 16132 | .IX Item "-mno-inefficient-warnings" |
| 16133 | Disables warnings about the generation of inefficient code. These |
| 16134 | warnings can be generated, for example, when compiling code that |
| 16135 | performs byte-level memory operations on the \s-1MAC\s0 \s-1AE\s0 type. The \s-1MAC\s0 \s-1AE\s0 has |
| 16136 | no hardware support for byte-level memory operations, so all byte |
| 16137 | load/stores must be synthesized from word load/store operations. This is |
| 16138 | inefficient and a warning is generated to indicate |
| 16139 | that you should rewrite the code to avoid byte operations, or to target |
| 16140 | an \s-1AE\s0 type that has the necessary hardware support. This option disables |
| 16141 | these warnings. |
| 16142 | .PP |
| 16143 | \fIPowerPC Options\fR |
| 16144 | .IX Subsection "PowerPC Options" |
| 16145 | .PP |
| 16146 | These are listed under |
| 16147 | .PP |
| 16148 | \fI\s-1RL78\s0 Options\fR |
| 16149 | .IX Subsection "RL78 Options" |
| 16150 | .IP "\fB\-msim\fR" 4 |
| 16151 | .IX Item "-msim" |
| 16152 | Links in additional target libraries to support operation within a |
| 16153 | simulator. |
| 16154 | .IP "\fB\-mmul=none\fR" 4 |
| 16155 | .IX Item "-mmul=none" |
| 16156 | .PD 0 |
| 16157 | .IP "\fB\-mmul=g13\fR" 4 |
| 16158 | .IX Item "-mmul=g13" |
| 16159 | .IP "\fB\-mmul=rl78\fR" 4 |
| 16160 | .IX Item "-mmul=rl78" |
| 16161 | .PD |
| 16162 | Specifies the type of hardware multiplication support to be used. The |
| 16163 | default is \f(CW\*(C`none\*(C'\fR, which uses software multiplication functions. |
| 16164 | The \f(CW\*(C`g13\*(C'\fR option is for the hardware multiply/divide peripheral |
| 16165 | only on the \s-1RL78/G13\s0 targets. The \f(CW\*(C`rl78\*(C'\fR option is for the |
| 16166 | standard hardware multiplication defined in the \s-1RL78\s0 software manual. |
| 16167 | .PP |
| 16168 | \fI\s-1IBM\s0 \s-1RS/6000\s0 and PowerPC Options\fR |
| 16169 | .IX Subsection "IBM RS/6000 and PowerPC Options" |
| 16170 | .PP |
| 16171 | These \fB\-m\fR options are defined for the \s-1IBM\s0 \s-1RS/6000\s0 and PowerPC: |
| 16172 | .IP "\fB\-mpowerpc\-gpopt\fR" 4 |
| 16173 | .IX Item "-mpowerpc-gpopt" |
| 16174 | .PD 0 |
| 16175 | .IP "\fB\-mno\-powerpc\-gpopt\fR" 4 |
| 16176 | .IX Item "-mno-powerpc-gpopt" |
| 16177 | .IP "\fB\-mpowerpc\-gfxopt\fR" 4 |
| 16178 | .IX Item "-mpowerpc-gfxopt" |
| 16179 | .IP "\fB\-mno\-powerpc\-gfxopt\fR" 4 |
| 16180 | .IX Item "-mno-powerpc-gfxopt" |
| 16181 | .IP "\fB\-mpowerpc64\fR" 4 |
| 16182 | .IX Item "-mpowerpc64" |
| 16183 | .IP "\fB\-mno\-powerpc64\fR" 4 |
| 16184 | .IX Item "-mno-powerpc64" |
| 16185 | .IP "\fB\-mmfcrf\fR" 4 |
| 16186 | .IX Item "-mmfcrf" |
| 16187 | .IP "\fB\-mno\-mfcrf\fR" 4 |
| 16188 | .IX Item "-mno-mfcrf" |
| 16189 | .IP "\fB\-mpopcntb\fR" 4 |
| 16190 | .IX Item "-mpopcntb" |
| 16191 | .IP "\fB\-mno\-popcntb\fR" 4 |
| 16192 | .IX Item "-mno-popcntb" |
| 16193 | .IP "\fB\-mpopcntd\fR" 4 |
| 16194 | .IX Item "-mpopcntd" |
| 16195 | .IP "\fB\-mno\-popcntd\fR" 4 |
| 16196 | .IX Item "-mno-popcntd" |
| 16197 | .IP "\fB\-mfprnd\fR" 4 |
| 16198 | .IX Item "-mfprnd" |
| 16199 | .IP "\fB\-mno\-fprnd\fR" 4 |
| 16200 | .IX Item "-mno-fprnd" |
| 16201 | .IP "\fB\-mcmpb\fR" 4 |
| 16202 | .IX Item "-mcmpb" |
| 16203 | .IP "\fB\-mno\-cmpb\fR" 4 |
| 16204 | .IX Item "-mno-cmpb" |
| 16205 | .IP "\fB\-mmfpgpr\fR" 4 |
| 16206 | .IX Item "-mmfpgpr" |
| 16207 | .IP "\fB\-mno\-mfpgpr\fR" 4 |
| 16208 | .IX Item "-mno-mfpgpr" |
| 16209 | .IP "\fB\-mhard\-dfp\fR" 4 |
| 16210 | .IX Item "-mhard-dfp" |
| 16211 | .IP "\fB\-mno\-hard\-dfp\fR" 4 |
| 16212 | .IX Item "-mno-hard-dfp" |
| 16213 | .PD |
| 16214 | You use these options to specify which instructions are available on the |
| 16215 | processor you are using. The default value of these options is |
| 16216 | determined when configuring \s-1GCC\s0. Specifying the |
| 16217 | \&\fB\-mcpu=\fR\fIcpu_type\fR overrides the specification of these |
| 16218 | options. We recommend you use the \fB\-mcpu=\fR\fIcpu_type\fR option |
| 16219 | rather than the options listed above. |
| 16220 | .Sp |
| 16221 | Specifying \fB\-mpowerpc\-gpopt\fR allows |
| 16222 | \&\s-1GCC\s0 to use the optional PowerPC architecture instructions in the |
| 16223 | General Purpose group, including floating-point square root. Specifying |
| 16224 | \&\fB\-mpowerpc\-gfxopt\fR allows \s-1GCC\s0 to |
| 16225 | use the optional PowerPC architecture instructions in the Graphics |
| 16226 | group, including floating-point select. |
| 16227 | .Sp |
| 16228 | The \fB\-mmfcrf\fR option allows \s-1GCC\s0 to generate the move from |
| 16229 | condition register field instruction implemented on the \s-1POWER4\s0 |
| 16230 | processor and other processors that support the PowerPC V2.01 |
| 16231 | architecture. |
| 16232 | The \fB\-mpopcntb\fR option allows \s-1GCC\s0 to generate the popcount and |
| 16233 | double-precision \s-1FP\s0 reciprocal estimate instruction implemented on the |
| 16234 | \&\s-1POWER5\s0 processor and other processors that support the PowerPC V2.02 |
| 16235 | architecture. |
| 16236 | The \fB\-mpopcntd\fR option allows \s-1GCC\s0 to generate the popcount |
| 16237 | instruction implemented on the \s-1POWER7\s0 processor and other processors |
| 16238 | that support the PowerPC V2.06 architecture. |
| 16239 | The \fB\-mfprnd\fR option allows \s-1GCC\s0 to generate the \s-1FP\s0 round to |
| 16240 | integer instructions implemented on the \s-1POWER5+\s0 processor and other |
| 16241 | processors that support the PowerPC V2.03 architecture. |
| 16242 | The \fB\-mcmpb\fR option allows \s-1GCC\s0 to generate the compare bytes |
| 16243 | instruction implemented on the \s-1POWER6\s0 processor and other processors |
| 16244 | that support the PowerPC V2.05 architecture. |
| 16245 | The \fB\-mmfpgpr\fR option allows \s-1GCC\s0 to generate the \s-1FP\s0 move to/from |
| 16246 | general-purpose register instructions implemented on the \s-1POWER6X\s0 |
| 16247 | processor and other processors that support the extended PowerPC V2.05 |
| 16248 | architecture. |
| 16249 | The \fB\-mhard\-dfp\fR option allows \s-1GCC\s0 to generate the decimal |
| 16250 | floating-point instructions implemented on some \s-1POWER\s0 processors. |
| 16251 | .Sp |
| 16252 | The \fB\-mpowerpc64\fR option allows \s-1GCC\s0 to generate the additional |
| 16253 | 64\-bit instructions that are found in the full PowerPC64 architecture |
| 16254 | and to treat GPRs as 64\-bit, doubleword quantities. \s-1GCC\s0 defaults to |
| 16255 | \&\fB\-mno\-powerpc64\fR. |
| 16256 | .IP "\fB\-mcpu=\fR\fIcpu_type\fR" 4 |
| 16257 | .IX Item "-mcpu=cpu_type" |
| 16258 | Set architecture type, register usage, and |
| 16259 | instruction scheduling parameters for machine type \fIcpu_type\fR. |
| 16260 | Supported values for \fIcpu_type\fR are \fB401\fR, \fB403\fR, |
| 16261 | \&\fB405\fR, \fB405fp\fR, \fB440\fR, \fB440fp\fR, \fB464\fR, \fB464fp\fR, |
| 16262 | \&\fB476\fR, \fB476fp\fR, \fB505\fR, \fB601\fR, \fB602\fR, \fB603\fR, |
| 16263 | \&\fB603e\fR, \fB604\fR, \fB604e\fR, \fB620\fR, \fB630\fR, \fB740\fR, |
| 16264 | \&\fB7400\fR, \fB7450\fR, \fB750\fR, \fB801\fR, \fB821\fR, \fB823\fR, |
| 16265 | \&\fB860\fR, \fB970\fR, \fB8540\fR, \fBa2\fR, \fBe300c2\fR, |
| 16266 | \&\fBe300c3\fR, \fBe500mc\fR, \fBe500mc64\fR, \fBe5500\fR, |
| 16267 | \&\fBe6500\fR, \fBec603e\fR, \fBG3\fR, \fBG4\fR, \fBG5\fR, |
| 16268 | \&\fBtitan\fR, \fBpower3\fR, \fBpower4\fR, \fBpower5\fR, \fBpower5+\fR, |
| 16269 | \&\fBpower6\fR, \fBpower6x\fR, \fBpower7\fR, \fBpower8\fR, \fBpowerpc\fR, |
| 16270 | \&\fBpowerpc64\fR, and \fBrs64\fR. |
| 16271 | .Sp |
| 16272 | \&\fB\-mcpu=powerpc\fR, and \fB\-mcpu=powerpc64\fR specify pure 32\-bit |
| 16273 | PowerPC and 64\-bit PowerPC architecture machine |
| 16274 | types, with an appropriate, generic processor model assumed for |
| 16275 | scheduling purposes. |
| 16276 | .Sp |
| 16277 | The other options specify a specific processor. Code generated under |
| 16278 | those options runs best on that processor, and may not run at all on |
| 16279 | others. |
| 16280 | .Sp |
| 16281 | The \fB\-mcpu\fR options automatically enable or disable the |
| 16282 | following options: |
| 16283 | .Sp |
| 16284 | \&\fB\-maltivec \-mfprnd \-mhard\-float \-mmfcrf \-mmultiple |
| 16285 | \&\-mpopcntb \-mpopcntd \-mpowerpc64 |
| 16286 | \&\-mpowerpc\-gpopt \-mpowerpc\-gfxopt \-msingle\-float \-mdouble\-float |
| 16287 | \&\-msimple\-fpu \-mstring \-mmulhw \-mdlmzb \-mmfpgpr \-mvsx\fR |
| 16288 | .Sp |
| 16289 | The particular options set for any particular \s-1CPU\s0 varies between |
| 16290 | compiler versions, depending on what setting seems to produce optimal |
| 16291 | code for that \s-1CPU\s0; it doesn't necessarily reflect the actual hardware's |
| 16292 | capabilities. If you wish to set an individual option to a particular |
| 16293 | value, you may specify it after the \fB\-mcpu\fR option, like |
| 16294 | \&\fB\-mcpu=970 \-mno\-altivec\fR. |
| 16295 | .Sp |
| 16296 | On \s-1AIX\s0, the \fB\-maltivec\fR and \fB\-mpowerpc64\fR options are |
| 16297 | not enabled or disabled by the \fB\-mcpu\fR option at present because |
| 16298 | \&\s-1AIX\s0 does not have full support for these options. You may still |
| 16299 | enable or disable them individually if you're sure it'll work in your |
| 16300 | environment. |
| 16301 | .IP "\fB\-mtune=\fR\fIcpu_type\fR" 4 |
| 16302 | .IX Item "-mtune=cpu_type" |
| 16303 | Set the instruction scheduling parameters for machine type |
| 16304 | \&\fIcpu_type\fR, but do not set the architecture type or register usage, |
| 16305 | as \fB\-mcpu=\fR\fIcpu_type\fR does. The same |
| 16306 | values for \fIcpu_type\fR are used for \fB\-mtune\fR as for |
| 16307 | \&\fB\-mcpu\fR. If both are specified, the code generated uses the |
| 16308 | architecture and registers set by \fB\-mcpu\fR, but the |
| 16309 | scheduling parameters set by \fB\-mtune\fR. |
| 16310 | .IP "\fB\-mcmodel=small\fR" 4 |
| 16311 | .IX Item "-mcmodel=small" |
| 16312 | Generate PowerPC64 code for the small model: The \s-1TOC\s0 is limited to |
| 16313 | 64k. |
| 16314 | .IP "\fB\-mcmodel=medium\fR" 4 |
| 16315 | .IX Item "-mcmodel=medium" |
| 16316 | Generate PowerPC64 code for the medium model: The \s-1TOC\s0 and other static |
| 16317 | data may be up to a total of 4G in size. |
| 16318 | .IP "\fB\-mcmodel=large\fR" 4 |
| 16319 | .IX Item "-mcmodel=large" |
| 16320 | Generate PowerPC64 code for the large model: The \s-1TOC\s0 may be up to 4G |
| 16321 | in size. Other data and code is only limited by the 64\-bit address |
| 16322 | space. |
| 16323 | .IP "\fB\-maltivec\fR" 4 |
| 16324 | .IX Item "-maltivec" |
| 16325 | .PD 0 |
| 16326 | .IP "\fB\-mno\-altivec\fR" 4 |
| 16327 | .IX Item "-mno-altivec" |
| 16328 | .PD |
| 16329 | Generate code that uses (does not use) AltiVec instructions, and also |
| 16330 | enable the use of built-in functions that allow more direct access to |
| 16331 | the AltiVec instruction set. You may also need to set |
| 16332 | \&\fB\-mabi=altivec\fR to adjust the current \s-1ABI\s0 with AltiVec \s-1ABI\s0 |
| 16333 | enhancements. |
| 16334 | .IP "\fB\-mvrsave\fR" 4 |
| 16335 | .IX Item "-mvrsave" |
| 16336 | .PD 0 |
| 16337 | .IP "\fB\-mno\-vrsave\fR" 4 |
| 16338 | .IX Item "-mno-vrsave" |
| 16339 | .PD |
| 16340 | Generate \s-1VRSAVE\s0 instructions when generating AltiVec code. |
| 16341 | .IP "\fB\-mgen\-cell\-microcode\fR" 4 |
| 16342 | .IX Item "-mgen-cell-microcode" |
| 16343 | Generate Cell microcode instructions. |
| 16344 | .IP "\fB\-mwarn\-cell\-microcode\fR" 4 |
| 16345 | .IX Item "-mwarn-cell-microcode" |
| 16346 | Warn when a Cell microcode instruction is emitted. An example |
| 16347 | of a Cell microcode instruction is a variable shift. |
| 16348 | .IP "\fB\-msecure\-plt\fR" 4 |
| 16349 | .IX Item "-msecure-plt" |
| 16350 | Generate code that allows \fBld\fR and \fBld.so\fR |
| 16351 | to build executables and shared |
| 16352 | libraries with non-executable \f(CW\*(C`.plt\*(C'\fR and \f(CW\*(C`.got\*(C'\fR sections. |
| 16353 | This is a PowerPC |
| 16354 | 32\-bit \s-1SYSV\s0 \s-1ABI\s0 option. |
| 16355 | .IP "\fB\-mbss\-plt\fR" 4 |
| 16356 | .IX Item "-mbss-plt" |
| 16357 | Generate code that uses a \s-1BSS\s0 \f(CW\*(C`.plt\*(C'\fR section that \fBld.so\fR |
| 16358 | fills in, and |
| 16359 | requires \f(CW\*(C`.plt\*(C'\fR and \f(CW\*(C`.got\*(C'\fR |
| 16360 | sections that are both writable and executable. |
| 16361 | This is a PowerPC 32\-bit \s-1SYSV\s0 \s-1ABI\s0 option. |
| 16362 | .IP "\fB\-misel\fR" 4 |
| 16363 | .IX Item "-misel" |
| 16364 | .PD 0 |
| 16365 | .IP "\fB\-mno\-isel\fR" 4 |
| 16366 | .IX Item "-mno-isel" |
| 16367 | .PD |
| 16368 | This switch enables or disables the generation of \s-1ISEL\s0 instructions. |
| 16369 | .IP "\fB\-misel=\fR\fIyes/no\fR" 4 |
| 16370 | .IX Item "-misel=yes/no" |
| 16371 | This switch has been deprecated. Use \fB\-misel\fR and |
| 16372 | \&\fB\-mno\-isel\fR instead. |
| 16373 | .IP "\fB\-mspe\fR" 4 |
| 16374 | .IX Item "-mspe" |
| 16375 | .PD 0 |
| 16376 | .IP "\fB\-mno\-spe\fR" 4 |
| 16377 | .IX Item "-mno-spe" |
| 16378 | .PD |
| 16379 | This switch enables or disables the generation of \s-1SPE\s0 simd |
| 16380 | instructions. |
| 16381 | .IP "\fB\-mpaired\fR" 4 |
| 16382 | .IX Item "-mpaired" |
| 16383 | .PD 0 |
| 16384 | .IP "\fB\-mno\-paired\fR" 4 |
| 16385 | .IX Item "-mno-paired" |
| 16386 | .PD |
| 16387 | This switch enables or disables the generation of \s-1PAIRED\s0 simd |
| 16388 | instructions. |
| 16389 | .IP "\fB\-mspe=\fR\fIyes/no\fR" 4 |
| 16390 | .IX Item "-mspe=yes/no" |
| 16391 | This option has been deprecated. Use \fB\-mspe\fR and |
| 16392 | \&\fB\-mno\-spe\fR instead. |
| 16393 | .IP "\fB\-mvsx\fR" 4 |
| 16394 | .IX Item "-mvsx" |
| 16395 | .PD 0 |
| 16396 | .IP "\fB\-mno\-vsx\fR" 4 |
| 16397 | .IX Item "-mno-vsx" |
| 16398 | .PD |
| 16399 | Generate code that uses (does not use) vector/scalar (\s-1VSX\s0) |
| 16400 | instructions, and also enable the use of built-in functions that allow |
| 16401 | more direct access to the \s-1VSX\s0 instruction set. |
| 16402 | .IP "\fB\-mfloat\-gprs=\fR\fIyes/single/double/no\fR" 4 |
| 16403 | .IX Item "-mfloat-gprs=yes/single/double/no" |
| 16404 | .PD 0 |
| 16405 | .IP "\fB\-mfloat\-gprs\fR" 4 |
| 16406 | .IX Item "-mfloat-gprs" |
| 16407 | .PD |
| 16408 | This switch enables or disables the generation of floating-point |
| 16409 | operations on the general-purpose registers for architectures that |
| 16410 | support it. |
| 16411 | .Sp |
| 16412 | The argument \fIyes\fR or \fIsingle\fR enables the use of |
| 16413 | single-precision floating-point operations. |
| 16414 | .Sp |
| 16415 | The argument \fIdouble\fR enables the use of single and |
| 16416 | double-precision floating-point operations. |
| 16417 | .Sp |
| 16418 | The argument \fIno\fR disables floating-point operations on the |
| 16419 | general-purpose registers. |
| 16420 | .Sp |
| 16421 | This option is currently only available on the MPC854x. |
| 16422 | .IP "\fB\-m32\fR" 4 |
| 16423 | .IX Item "-m32" |
| 16424 | .PD 0 |
| 16425 | .IP "\fB\-m64\fR" 4 |
| 16426 | .IX Item "-m64" |
| 16427 | .PD |
| 16428 | Generate code for 32\-bit or 64\-bit environments of Darwin and \s-1SVR4\s0 |
| 16429 | targets (including GNU/Linux). The 32\-bit environment sets int, long |
| 16430 | and pointer to 32 bits and generates code that runs on any PowerPC |
| 16431 | variant. The 64\-bit environment sets int to 32 bits and long and |
| 16432 | pointer to 64 bits, and generates code for PowerPC64, as for |
| 16433 | \&\fB\-mpowerpc64\fR. |
| 16434 | .IP "\fB\-mfull\-toc\fR" 4 |
| 16435 | .IX Item "-mfull-toc" |
| 16436 | .PD 0 |
| 16437 | .IP "\fB\-mno\-fp\-in\-toc\fR" 4 |
| 16438 | .IX Item "-mno-fp-in-toc" |
| 16439 | .IP "\fB\-mno\-sum\-in\-toc\fR" 4 |
| 16440 | .IX Item "-mno-sum-in-toc" |
| 16441 | .IP "\fB\-mminimal\-toc\fR" 4 |
| 16442 | .IX Item "-mminimal-toc" |
| 16443 | .PD |
| 16444 | Modify generation of the \s-1TOC\s0 (Table Of Contents), which is created for |
| 16445 | every executable file. The \fB\-mfull\-toc\fR option is selected by |
| 16446 | default. In that case, \s-1GCC\s0 allocates at least one \s-1TOC\s0 entry for |
| 16447 | each unique non-automatic variable reference in your program. \s-1GCC\s0 |
| 16448 | also places floating-point constants in the \s-1TOC\s0. However, only |
| 16449 | 16,384 entries are available in the \s-1TOC\s0. |
| 16450 | .Sp |
| 16451 | If you receive a linker error message that saying you have overflowed |
| 16452 | the available \s-1TOC\s0 space, you can reduce the amount of \s-1TOC\s0 space used |
| 16453 | with the \fB\-mno\-fp\-in\-toc\fR and \fB\-mno\-sum\-in\-toc\fR options. |
| 16454 | \&\fB\-mno\-fp\-in\-toc\fR prevents \s-1GCC\s0 from putting floating-point |
| 16455 | constants in the \s-1TOC\s0 and \fB\-mno\-sum\-in\-toc\fR forces \s-1GCC\s0 to |
| 16456 | generate code to calculate the sum of an address and a constant at |
| 16457 | run time instead of putting that sum into the \s-1TOC\s0. You may specify one |
| 16458 | or both of these options. Each causes \s-1GCC\s0 to produce very slightly |
| 16459 | slower and larger code at the expense of conserving \s-1TOC\s0 space. |
| 16460 | .Sp |
| 16461 | If you still run out of space in the \s-1TOC\s0 even when you specify both of |
| 16462 | these options, specify \fB\-mminimal\-toc\fR instead. This option causes |
| 16463 | \&\s-1GCC\s0 to make only one \s-1TOC\s0 entry for every file. When you specify this |
| 16464 | option, \s-1GCC\s0 produces code that is slower and larger but which |
| 16465 | uses extremely little \s-1TOC\s0 space. You may wish to use this option |
| 16466 | only on files that contain less frequently-executed code. |
| 16467 | .IP "\fB\-maix64\fR" 4 |
| 16468 | .IX Item "-maix64" |
| 16469 | .PD 0 |
| 16470 | .IP "\fB\-maix32\fR" 4 |
| 16471 | .IX Item "-maix32" |
| 16472 | .PD |
| 16473 | Enable 64\-bit \s-1AIX\s0 \s-1ABI\s0 and calling convention: 64\-bit pointers, 64\-bit |
| 16474 | \&\f(CW\*(C`long\*(C'\fR type, and the infrastructure needed to support them. |
| 16475 | Specifying \fB\-maix64\fR implies \fB\-mpowerpc64\fR, |
| 16476 | while \fB\-maix32\fR disables the 64\-bit \s-1ABI\s0 and |
| 16477 | implies \fB\-mno\-powerpc64\fR. \s-1GCC\s0 defaults to \fB\-maix32\fR. |
| 16478 | .IP "\fB\-mxl\-compat\fR" 4 |
| 16479 | .IX Item "-mxl-compat" |
| 16480 | .PD 0 |
| 16481 | .IP "\fB\-mno\-xl\-compat\fR" 4 |
| 16482 | .IX Item "-mno-xl-compat" |
| 16483 | .PD |
| 16484 | Produce code that conforms more closely to \s-1IBM\s0 \s-1XL\s0 compiler semantics |
| 16485 | when using AIX-compatible \s-1ABI\s0. Pass floating-point arguments to |
| 16486 | prototyped functions beyond the register save area (\s-1RSA\s0) on the stack |
| 16487 | in addition to argument FPRs. Do not assume that most significant |
| 16488 | double in 128\-bit long double value is properly rounded when comparing |
| 16489 | values and converting to double. Use \s-1XL\s0 symbol names for long double |
| 16490 | support routines. |
| 16491 | .Sp |
| 16492 | The \s-1AIX\s0 calling convention was extended but not initially documented to |
| 16493 | handle an obscure K&R C case of calling a function that takes the |
| 16494 | address of its arguments with fewer arguments than declared. \s-1IBM\s0 \s-1XL\s0 |
| 16495 | compilers access floating-point arguments that do not fit in the |
| 16496 | \&\s-1RSA\s0 from the stack when a subroutine is compiled without |
| 16497 | optimization. Because always storing floating-point arguments on the |
| 16498 | stack is inefficient and rarely needed, this option is not enabled by |
| 16499 | default and only is necessary when calling subroutines compiled by \s-1IBM\s0 |
| 16500 | \&\s-1XL\s0 compilers without optimization. |
| 16501 | .IP "\fB\-mpe\fR" 4 |
| 16502 | .IX Item "-mpe" |
| 16503 | Support \fI\s-1IBM\s0 \s-1RS/6000\s0 \s-1SP\s0\fR \fIParallel Environment\fR (\s-1PE\s0). Link an |
| 16504 | application written to use message passing with special startup code to |
| 16505 | enable the application to run. The system must have \s-1PE\s0 installed in the |
| 16506 | standard location (\fI/usr/lpp/ppe.poe/\fR), or the \fIspecs\fR file |
| 16507 | must be overridden with the \fB\-specs=\fR option to specify the |
| 16508 | appropriate directory location. The Parallel Environment does not |
| 16509 | support threads, so the \fB\-mpe\fR option and the \fB\-pthread\fR |
| 16510 | option are incompatible. |
| 16511 | .IP "\fB\-malign\-natural\fR" 4 |
| 16512 | .IX Item "-malign-natural" |
| 16513 | .PD 0 |
| 16514 | .IP "\fB\-malign\-power\fR" 4 |
| 16515 | .IX Item "-malign-power" |
| 16516 | .PD |
| 16517 | On \s-1AIX\s0, 32\-bit Darwin, and 64\-bit PowerPC GNU/Linux, the option |
| 16518 | \&\fB\-malign\-natural\fR overrides the ABI-defined alignment of larger |
| 16519 | types, such as floating-point doubles, on their natural size-based boundary. |
| 16520 | The option \fB\-malign\-power\fR instructs \s-1GCC\s0 to follow the ABI-specified |
| 16521 | alignment rules. \s-1GCC\s0 defaults to the standard alignment defined in the \s-1ABI\s0. |
| 16522 | .Sp |
| 16523 | On 64\-bit Darwin, natural alignment is the default, and \fB\-malign\-power\fR |
| 16524 | is not supported. |
| 16525 | .IP "\fB\-msoft\-float\fR" 4 |
| 16526 | .IX Item "-msoft-float" |
| 16527 | .PD 0 |
| 16528 | .IP "\fB\-mhard\-float\fR" 4 |
| 16529 | .IX Item "-mhard-float" |
| 16530 | .PD |
| 16531 | Generate code that does not use (uses) the floating-point register set. |
| 16532 | Software floating-point emulation is provided if you use the |
| 16533 | \&\fB\-msoft\-float\fR option, and pass the option to \s-1GCC\s0 when linking. |
| 16534 | .IP "\fB\-msingle\-float\fR" 4 |
| 16535 | .IX Item "-msingle-float" |
| 16536 | .PD 0 |
| 16537 | .IP "\fB\-mdouble\-float\fR" 4 |
| 16538 | .IX Item "-mdouble-float" |
| 16539 | .PD |
| 16540 | Generate code for single\- or double-precision floating-point operations. |
| 16541 | \&\fB\-mdouble\-float\fR implies \fB\-msingle\-float\fR. |
| 16542 | .IP "\fB\-msimple\-fpu\fR" 4 |
| 16543 | .IX Item "-msimple-fpu" |
| 16544 | Do not generate \f(CW\*(C`sqrt\*(C'\fR and \f(CW\*(C`div\*(C'\fR instructions for hardware |
| 16545 | floating-point unit. |
| 16546 | .IP "\fB\-mfpu=\fR\fIname\fR" 4 |
| 16547 | .IX Item "-mfpu=name" |
| 16548 | Specify type of floating-point unit. Valid values for \fIname\fR are |
| 16549 | \&\fBsp_lite\fR (equivalent to \fB\-msingle\-float \-msimple\-fpu\fR), |
| 16550 | \&\fBdp_lite\fR (equivalent to \fB\-mdouble\-float \-msimple\-fpu\fR), |
| 16551 | \&\fBsp_full\fR (equivalent to \fB\-msingle\-float\fR), |
| 16552 | and \fBdp_full\fR (equivalent to \fB\-mdouble\-float\fR). |
| 16553 | .IP "\fB\-mxilinx\-fpu\fR" 4 |
| 16554 | .IX Item "-mxilinx-fpu" |
| 16555 | Perform optimizations for the floating-point unit on Xilinx \s-1PPC\s0 405/440. |
| 16556 | .IP "\fB\-mmultiple\fR" 4 |
| 16557 | .IX Item "-mmultiple" |
| 16558 | .PD 0 |
| 16559 | .IP "\fB\-mno\-multiple\fR" 4 |
| 16560 | .IX Item "-mno-multiple" |
| 16561 | .PD |
| 16562 | Generate code that uses (does not use) the load multiple word |
| 16563 | instructions and the store multiple word instructions. These |
| 16564 | instructions are generated by default on \s-1POWER\s0 systems, and not |
| 16565 | generated on PowerPC systems. Do not use \fB\-mmultiple\fR on little-endian |
| 16566 | PowerPC systems, since those instructions do not work when the |
| 16567 | processor is in little-endian mode. The exceptions are \s-1PPC740\s0 and |
| 16568 | \&\s-1PPC750\s0 which permit these instructions in little-endian mode. |
| 16569 | .IP "\fB\-mstring\fR" 4 |
| 16570 | .IX Item "-mstring" |
| 16571 | .PD 0 |
| 16572 | .IP "\fB\-mno\-string\fR" 4 |
| 16573 | .IX Item "-mno-string" |
| 16574 | .PD |
| 16575 | Generate code that uses (does not use) the load string instructions |
| 16576 | and the store string word instructions to save multiple registers and |
| 16577 | do small block moves. These instructions are generated by default on |
| 16578 | \&\s-1POWER\s0 systems, and not generated on PowerPC systems. Do not use |
| 16579 | \&\fB\-mstring\fR on little-endian PowerPC systems, since those |
| 16580 | instructions do not work when the processor is in little-endian mode. |
| 16581 | The exceptions are \s-1PPC740\s0 and \s-1PPC750\s0 which permit these instructions |
| 16582 | in little-endian mode. |
| 16583 | .IP "\fB\-mupdate\fR" 4 |
| 16584 | .IX Item "-mupdate" |
| 16585 | .PD 0 |
| 16586 | .IP "\fB\-mno\-update\fR" 4 |
| 16587 | .IX Item "-mno-update" |
| 16588 | .PD |
| 16589 | Generate code that uses (does not use) the load or store instructions |
| 16590 | that update the base register to the address of the calculated memory |
| 16591 | location. These instructions are generated by default. If you use |
| 16592 | \&\fB\-mno\-update\fR, there is a small window between the time that the |
| 16593 | stack pointer is updated and the address of the previous frame is |
| 16594 | stored, which means code that walks the stack frame across interrupts or |
| 16595 | signals may get corrupted data. |
| 16596 | .IP "\fB\-mavoid\-indexed\-addresses\fR" 4 |
| 16597 | .IX Item "-mavoid-indexed-addresses" |
| 16598 | .PD 0 |
| 16599 | .IP "\fB\-mno\-avoid\-indexed\-addresses\fR" 4 |
| 16600 | .IX Item "-mno-avoid-indexed-addresses" |
| 16601 | .PD |
| 16602 | Generate code that tries to avoid (not avoid) the use of indexed load |
| 16603 | or store instructions. These instructions can incur a performance |
| 16604 | penalty on Power6 processors in certain situations, such as when |
| 16605 | stepping through large arrays that cross a 16M boundary. This option |
| 16606 | is enabled by default when targeting Power6 and disabled otherwise. |
| 16607 | .IP "\fB\-mfused\-madd\fR" 4 |
| 16608 | .IX Item "-mfused-madd" |
| 16609 | .PD 0 |
| 16610 | .IP "\fB\-mno\-fused\-madd\fR" 4 |
| 16611 | .IX Item "-mno-fused-madd" |
| 16612 | .PD |
| 16613 | Generate code that uses (does not use) the floating-point multiply and |
| 16614 | accumulate instructions. These instructions are generated by default |
| 16615 | if hardware floating point is used. The machine-dependent |
| 16616 | \&\fB\-mfused\-madd\fR option is now mapped to the machine-independent |
| 16617 | \&\fB\-ffp\-contract=fast\fR option, and \fB\-mno\-fused\-madd\fR is |
| 16618 | mapped to \fB\-ffp\-contract=off\fR. |
| 16619 | .IP "\fB\-mmulhw\fR" 4 |
| 16620 | .IX Item "-mmulhw" |
| 16621 | .PD 0 |
| 16622 | .IP "\fB\-mno\-mulhw\fR" 4 |
| 16623 | .IX Item "-mno-mulhw" |
| 16624 | .PD |
| 16625 | Generate code that uses (does not use) the half-word multiply and |
| 16626 | multiply-accumulate instructions on the \s-1IBM\s0 405, 440, 464 and 476 processors. |
| 16627 | These instructions are generated by default when targeting those |
| 16628 | processors. |
| 16629 | .IP "\fB\-mdlmzb\fR" 4 |
| 16630 | .IX Item "-mdlmzb" |
| 16631 | .PD 0 |
| 16632 | .IP "\fB\-mno\-dlmzb\fR" 4 |
| 16633 | .IX Item "-mno-dlmzb" |
| 16634 | .PD |
| 16635 | Generate code that uses (does not use) the string-search \fBdlmzb\fR |
| 16636 | instruction on the \s-1IBM\s0 405, 440, 464 and 476 processors. This instruction is |
| 16637 | generated by default when targeting those processors. |
| 16638 | .IP "\fB\-mno\-bit\-align\fR" 4 |
| 16639 | .IX Item "-mno-bit-align" |
| 16640 | .PD 0 |
| 16641 | .IP "\fB\-mbit\-align\fR" 4 |
| 16642 | .IX Item "-mbit-align" |
| 16643 | .PD |
| 16644 | On System V.4 and embedded PowerPC systems do not (do) force structures |
| 16645 | and unions that contain bit-fields to be aligned to the base type of the |
| 16646 | bit-field. |
| 16647 | .Sp |
| 16648 | For example, by default a structure containing nothing but 8 |
| 16649 | \&\f(CW\*(C`unsigned\*(C'\fR bit-fields of length 1 is aligned to a 4\-byte |
| 16650 | boundary and has a size of 4 bytes. By using \fB\-mno\-bit\-align\fR, |
| 16651 | the structure is aligned to a 1\-byte boundary and is 1 byte in |
| 16652 | size. |
| 16653 | .IP "\fB\-mno\-strict\-align\fR" 4 |
| 16654 | .IX Item "-mno-strict-align" |
| 16655 | .PD 0 |
| 16656 | .IP "\fB\-mstrict\-align\fR" 4 |
| 16657 | .IX Item "-mstrict-align" |
| 16658 | .PD |
| 16659 | On System V.4 and embedded PowerPC systems do not (do) assume that |
| 16660 | unaligned memory references are handled by the system. |
| 16661 | .IP "\fB\-mrelocatable\fR" 4 |
| 16662 | .IX Item "-mrelocatable" |
| 16663 | .PD 0 |
| 16664 | .IP "\fB\-mno\-relocatable\fR" 4 |
| 16665 | .IX Item "-mno-relocatable" |
| 16666 | .PD |
| 16667 | Generate code that allows (does not allow) a static executable to be |
| 16668 | relocated to a different address at run time. A simple embedded |
| 16669 | PowerPC system loader should relocate the entire contents of |
| 16670 | \&\f(CW\*(C`.got2\*(C'\fR and 4\-byte locations listed in the \f(CW\*(C`.fixup\*(C'\fR section, |
| 16671 | a table of 32\-bit addresses generated by this option. For this to |
| 16672 | work, all objects linked together must be compiled with |
| 16673 | \&\fB\-mrelocatable\fR or \fB\-mrelocatable\-lib\fR. |
| 16674 | \&\fB\-mrelocatable\fR code aligns the stack to an 8\-byte boundary. |
| 16675 | .IP "\fB\-mrelocatable\-lib\fR" 4 |
| 16676 | .IX Item "-mrelocatable-lib" |
| 16677 | .PD 0 |
| 16678 | .IP "\fB\-mno\-relocatable\-lib\fR" 4 |
| 16679 | .IX Item "-mno-relocatable-lib" |
| 16680 | .PD |
| 16681 | Like \fB\-mrelocatable\fR, \fB\-mrelocatable\-lib\fR generates a |
| 16682 | \&\f(CW\*(C`.fixup\*(C'\fR section to allow static executables to be relocated at |
| 16683 | run time, but \fB\-mrelocatable\-lib\fR does not use the smaller stack |
| 16684 | alignment of \fB\-mrelocatable\fR. Objects compiled with |
| 16685 | \&\fB\-mrelocatable\-lib\fR may be linked with objects compiled with |
| 16686 | any combination of the \fB\-mrelocatable\fR options. |
| 16687 | .IP "\fB\-mno\-toc\fR" 4 |
| 16688 | .IX Item "-mno-toc" |
| 16689 | .PD 0 |
| 16690 | .IP "\fB\-mtoc\fR" 4 |
| 16691 | .IX Item "-mtoc" |
| 16692 | .PD |
| 16693 | On System V.4 and embedded PowerPC systems do not (do) assume that |
| 16694 | register 2 contains a pointer to a global area pointing to the addresses |
| 16695 | used in the program. |
| 16696 | .IP "\fB\-mlittle\fR" 4 |
| 16697 | .IX Item "-mlittle" |
| 16698 | .PD 0 |
| 16699 | .IP "\fB\-mlittle\-endian\fR" 4 |
| 16700 | .IX Item "-mlittle-endian" |
| 16701 | .PD |
| 16702 | On System V.4 and embedded PowerPC systems compile code for the |
| 16703 | processor in little-endian mode. The \fB\-mlittle\-endian\fR option is |
| 16704 | the same as \fB\-mlittle\fR. |
| 16705 | .IP "\fB\-mbig\fR" 4 |
| 16706 | .IX Item "-mbig" |
| 16707 | .PD 0 |
| 16708 | .IP "\fB\-mbig\-endian\fR" 4 |
| 16709 | .IX Item "-mbig-endian" |
| 16710 | .PD |
| 16711 | On System V.4 and embedded PowerPC systems compile code for the |
| 16712 | processor in big-endian mode. The \fB\-mbig\-endian\fR option is |
| 16713 | the same as \fB\-mbig\fR. |
| 16714 | .IP "\fB\-mdynamic\-no\-pic\fR" 4 |
| 16715 | .IX Item "-mdynamic-no-pic" |
| 16716 | On Darwin and Mac \s-1OS\s0 X systems, compile code so that it is not |
| 16717 | relocatable, but that its external references are relocatable. The |
| 16718 | resulting code is suitable for applications, but not shared |
| 16719 | libraries. |
| 16720 | .IP "\fB\-msingle\-pic\-base\fR" 4 |
| 16721 | .IX Item "-msingle-pic-base" |
| 16722 | Treat the register used for \s-1PIC\s0 addressing as read-only, rather than |
| 16723 | loading it in the prologue for each function. The runtime system is |
| 16724 | responsible for initializing this register with an appropriate value |
| 16725 | before execution begins. |
| 16726 | .IP "\fB\-mprioritize\-restricted\-insns=\fR\fIpriority\fR" 4 |
| 16727 | .IX Item "-mprioritize-restricted-insns=priority" |
| 16728 | This option controls the priority that is assigned to |
| 16729 | dispatch-slot restricted instructions during the second scheduling |
| 16730 | pass. The argument \fIpriority\fR takes the value \fB0\fR, \fB1\fR, |
| 16731 | or \fB2\fR to assign no, highest, or second-highest (respectively) |
| 16732 | priority to dispatch-slot restricted |
| 16733 | instructions. |
| 16734 | .IP "\fB\-msched\-costly\-dep=\fR\fIdependence_type\fR" 4 |
| 16735 | .IX Item "-msched-costly-dep=dependence_type" |
| 16736 | This option controls which dependences are considered costly |
| 16737 | by the target during instruction scheduling. The argument |
| 16738 | \&\fIdependence_type\fR takes one of the following values: |
| 16739 | .RS 4 |
| 16740 | .IP "\fBno\fR" 4 |
| 16741 | .IX Item "no" |
| 16742 | No dependence is costly. |
| 16743 | .IP "\fBall\fR" 4 |
| 16744 | .IX Item "all" |
| 16745 | All dependences are costly. |
| 16746 | .IP "\fBtrue_store_to_load\fR" 4 |
| 16747 | .IX Item "true_store_to_load" |
| 16748 | A true dependence from store to load is costly. |
| 16749 | .IP "\fBstore_to_load\fR" 4 |
| 16750 | .IX Item "store_to_load" |
| 16751 | Any dependence from store to load is costly. |
| 16752 | .IP "\fInumber\fR" 4 |
| 16753 | .IX Item "number" |
| 16754 | Any dependence for which the latency is greater than or equal to |
| 16755 | \&\fInumber\fR is costly. |
| 16756 | .RE |
| 16757 | .RS 4 |
| 16758 | .RE |
| 16759 | .IP "\fB\-minsert\-sched\-nops=\fR\fIscheme\fR" 4 |
| 16760 | .IX Item "-minsert-sched-nops=scheme" |
| 16761 | This option controls which \s-1NOP\s0 insertion scheme is used during |
| 16762 | the second scheduling pass. The argument \fIscheme\fR takes one of the |
| 16763 | following values: |
| 16764 | .RS 4 |
| 16765 | .IP "\fBno\fR" 4 |
| 16766 | .IX Item "no" |
| 16767 | Don't insert NOPs. |
| 16768 | .IP "\fBpad\fR" 4 |
| 16769 | .IX Item "pad" |
| 16770 | Pad with NOPs any dispatch group that has vacant issue slots, |
| 16771 | according to the scheduler's grouping. |
| 16772 | .IP "\fBregroup_exact\fR" 4 |
| 16773 | .IX Item "regroup_exact" |
| 16774 | Insert NOPs to force costly dependent insns into |
| 16775 | separate groups. Insert exactly as many NOPs as needed to force an insn |
| 16776 | to a new group, according to the estimated processor grouping. |
| 16777 | .IP "\fInumber\fR" 4 |
| 16778 | .IX Item "number" |
| 16779 | Insert NOPs to force costly dependent insns into |
| 16780 | separate groups. Insert \fInumber\fR NOPs to force an insn to a new group. |
| 16781 | .RE |
| 16782 | .RS 4 |
| 16783 | .RE |
| 16784 | .IP "\fB\-mcall\-sysv\fR" 4 |
| 16785 | .IX Item "-mcall-sysv" |
| 16786 | On System V.4 and embedded PowerPC systems compile code using calling |
| 16787 | conventions that adhere to the March 1995 draft of the System V |
| 16788 | Application Binary Interface, PowerPC processor supplement. This is the |
| 16789 | default unless you configured \s-1GCC\s0 using \fBpowerpc\-*\-eabiaix\fR. |
| 16790 | .IP "\fB\-mcall\-sysv\-eabi\fR" 4 |
| 16791 | .IX Item "-mcall-sysv-eabi" |
| 16792 | .PD 0 |
| 16793 | .IP "\fB\-mcall\-eabi\fR" 4 |
| 16794 | .IX Item "-mcall-eabi" |
| 16795 | .PD |
| 16796 | Specify both \fB\-mcall\-sysv\fR and \fB\-meabi\fR options. |
| 16797 | .IP "\fB\-mcall\-sysv\-noeabi\fR" 4 |
| 16798 | .IX Item "-mcall-sysv-noeabi" |
| 16799 | Specify both \fB\-mcall\-sysv\fR and \fB\-mno\-eabi\fR options. |
| 16800 | .IP "\fB\-mcall\-aixdesc\fR" 4 |
| 16801 | .IX Item "-mcall-aixdesc" |
| 16802 | On System V.4 and embedded PowerPC systems compile code for the \s-1AIX\s0 |
| 16803 | operating system. |
| 16804 | .IP "\fB\-mcall\-linux\fR" 4 |
| 16805 | .IX Item "-mcall-linux" |
| 16806 | On System V.4 and embedded PowerPC systems compile code for the |
| 16807 | Linux-based \s-1GNU\s0 system. |
| 16808 | .IP "\fB\-mcall\-freebsd\fR" 4 |
| 16809 | .IX Item "-mcall-freebsd" |
| 16810 | On System V.4 and embedded PowerPC systems compile code for the |
| 16811 | FreeBSD operating system. |
| 16812 | .IP "\fB\-mcall\-netbsd\fR" 4 |
| 16813 | .IX Item "-mcall-netbsd" |
| 16814 | On System V.4 and embedded PowerPC systems compile code for the |
| 16815 | NetBSD operating system. |
| 16816 | .IP "\fB\-mcall\-openbsd\fR" 4 |
| 16817 | .IX Item "-mcall-openbsd" |
| 16818 | On System V.4 and embedded PowerPC systems compile code for the |
| 16819 | OpenBSD operating system. |
| 16820 | .IP "\fB\-maix\-struct\-return\fR" 4 |
| 16821 | .IX Item "-maix-struct-return" |
| 16822 | Return all structures in memory (as specified by the \s-1AIX\s0 \s-1ABI\s0). |
| 16823 | .IP "\fB\-msvr4\-struct\-return\fR" 4 |
| 16824 | .IX Item "-msvr4-struct-return" |
| 16825 | Return structures smaller than 8 bytes in registers (as specified by the |
| 16826 | \&\s-1SVR4\s0 \s-1ABI\s0). |
| 16827 | .IP "\fB\-mabi=\fR\fIabi-type\fR" 4 |
| 16828 | .IX Item "-mabi=abi-type" |
| 16829 | Extend the current \s-1ABI\s0 with a particular extension, or remove such extension. |
| 16830 | Valid values are \fIaltivec\fR, \fIno-altivec\fR, \fIspe\fR, |
| 16831 | \&\fIno-spe\fR, \fIibmlongdouble\fR, \fIieeelongdouble\fR. |
| 16832 | .IP "\fB\-mabi=spe\fR" 4 |
| 16833 | .IX Item "-mabi=spe" |
| 16834 | Extend the current \s-1ABI\s0 with \s-1SPE\s0 \s-1ABI\s0 extensions. This does not change |
| 16835 | the default \s-1ABI\s0, instead it adds the \s-1SPE\s0 \s-1ABI\s0 extensions to the current |
| 16836 | \&\s-1ABI\s0. |
| 16837 | .IP "\fB\-mabi=no\-spe\fR" 4 |
| 16838 | .IX Item "-mabi=no-spe" |
| 16839 | Disable Book-E \s-1SPE\s0 \s-1ABI\s0 extensions for the current \s-1ABI\s0. |
| 16840 | .IP "\fB\-mabi=ibmlongdouble\fR" 4 |
| 16841 | .IX Item "-mabi=ibmlongdouble" |
| 16842 | Change the current \s-1ABI\s0 to use \s-1IBM\s0 extended-precision long double. |
| 16843 | This is a PowerPC 32\-bit \s-1SYSV\s0 \s-1ABI\s0 option. |
| 16844 | .IP "\fB\-mabi=ieeelongdouble\fR" 4 |
| 16845 | .IX Item "-mabi=ieeelongdouble" |
| 16846 | Change the current \s-1ABI\s0 to use \s-1IEEE\s0 extended-precision long double. |
| 16847 | This is a PowerPC 32\-bit Linux \s-1ABI\s0 option. |
| 16848 | .IP "\fB\-mprototype\fR" 4 |
| 16849 | .IX Item "-mprototype" |
| 16850 | .PD 0 |
| 16851 | .IP "\fB\-mno\-prototype\fR" 4 |
| 16852 | .IX Item "-mno-prototype" |
| 16853 | .PD |
| 16854 | On System V.4 and embedded PowerPC systems assume that all calls to |
| 16855 | variable argument functions are properly prototyped. Otherwise, the |
| 16856 | compiler must insert an instruction before every non-prototyped call to |
| 16857 | set or clear bit 6 of the condition code register (\fI\s-1CR\s0\fR) to |
| 16858 | indicate whether floating-point values are passed in the floating-point |
| 16859 | registers in case the function takes variable arguments. With |
| 16860 | \&\fB\-mprototype\fR, only calls to prototyped variable argument functions |
| 16861 | set or clear the bit. |
| 16862 | .IP "\fB\-msim\fR" 4 |
| 16863 | .IX Item "-msim" |
| 16864 | On embedded PowerPC systems, assume that the startup module is called |
| 16865 | \&\fIsim\-crt0.o\fR and that the standard C libraries are \fIlibsim.a\fR and |
| 16866 | \&\fIlibc.a\fR. This is the default for \fBpowerpc\-*\-eabisim\fR |
| 16867 | configurations. |
| 16868 | .IP "\fB\-mmvme\fR" 4 |
| 16869 | .IX Item "-mmvme" |
| 16870 | On embedded PowerPC systems, assume that the startup module is called |
| 16871 | \&\fIcrt0.o\fR and the standard C libraries are \fIlibmvme.a\fR and |
| 16872 | \&\fIlibc.a\fR. |
| 16873 | .IP "\fB\-mads\fR" 4 |
| 16874 | .IX Item "-mads" |
| 16875 | On embedded PowerPC systems, assume that the startup module is called |
| 16876 | \&\fIcrt0.o\fR and the standard C libraries are \fIlibads.a\fR and |
| 16877 | \&\fIlibc.a\fR. |
| 16878 | .IP "\fB\-myellowknife\fR" 4 |
| 16879 | .IX Item "-myellowknife" |
| 16880 | On embedded PowerPC systems, assume that the startup module is called |
| 16881 | \&\fIcrt0.o\fR and the standard C libraries are \fIlibyk.a\fR and |
| 16882 | \&\fIlibc.a\fR. |
| 16883 | .IP "\fB\-mvxworks\fR" 4 |
| 16884 | .IX Item "-mvxworks" |
| 16885 | On System V.4 and embedded PowerPC systems, specify that you are |
| 16886 | compiling for a VxWorks system. |
| 16887 | .IP "\fB\-memb\fR" 4 |
| 16888 | .IX Item "-memb" |
| 16889 | On embedded PowerPC systems, set the \fI\s-1PPC_EMB\s0\fR bit in the \s-1ELF\s0 flags |
| 16890 | header to indicate that \fBeabi\fR extended relocations are used. |
| 16891 | .IP "\fB\-meabi\fR" 4 |
| 16892 | .IX Item "-meabi" |
| 16893 | .PD 0 |
| 16894 | .IP "\fB\-mno\-eabi\fR" 4 |
| 16895 | .IX Item "-mno-eabi" |
| 16896 | .PD |
| 16897 | On System V.4 and embedded PowerPC systems do (do not) adhere to the |
| 16898 | Embedded Applications Binary Interface (\s-1EABI\s0), which is a set of |
| 16899 | modifications to the System V.4 specifications. Selecting \fB\-meabi\fR |
| 16900 | means that the stack is aligned to an 8\-byte boundary, a function |
| 16901 | \&\f(CW\*(C`_\|_eabi\*(C'\fR is called from \f(CW\*(C`main\*(C'\fR to set up the \s-1EABI\s0 |
| 16902 | environment, and the \fB\-msdata\fR option can use both \f(CW\*(C`r2\*(C'\fR and |
| 16903 | \&\f(CW\*(C`r13\*(C'\fR to point to two separate small data areas. Selecting |
| 16904 | \&\fB\-mno\-eabi\fR means that the stack is aligned to a 16\-byte boundary, |
| 16905 | no \s-1EABI\s0 initialization function is called from \f(CW\*(C`main\*(C'\fR, and the |
| 16906 | \&\fB\-msdata\fR option only uses \f(CW\*(C`r13\*(C'\fR to point to a single |
| 16907 | small data area. The \fB\-meabi\fR option is on by default if you |
| 16908 | configured \s-1GCC\s0 using one of the \fBpowerpc*\-*\-eabi*\fR options. |
| 16909 | .IP "\fB\-msdata=eabi\fR" 4 |
| 16910 | .IX Item "-msdata=eabi" |
| 16911 | On System V.4 and embedded PowerPC systems, put small initialized |
| 16912 | \&\f(CW\*(C`const\*(C'\fR global and static data in the \fB.sdata2\fR section, which |
| 16913 | is pointed to by register \f(CW\*(C`r2\*(C'\fR. Put small initialized |
| 16914 | non\-\f(CW\*(C`const\*(C'\fR global and static data in the \fB.sdata\fR section, |
| 16915 | which is pointed to by register \f(CW\*(C`r13\*(C'\fR. Put small uninitialized |
| 16916 | global and static data in the \fB.sbss\fR section, which is adjacent to |
| 16917 | the \fB.sdata\fR section. The \fB\-msdata=eabi\fR option is |
| 16918 | incompatible with the \fB\-mrelocatable\fR option. The |
| 16919 | \&\fB\-msdata=eabi\fR option also sets the \fB\-memb\fR option. |
| 16920 | .IP "\fB\-msdata=sysv\fR" 4 |
| 16921 | .IX Item "-msdata=sysv" |
| 16922 | On System V.4 and embedded PowerPC systems, put small global and static |
| 16923 | data in the \fB.sdata\fR section, which is pointed to by register |
| 16924 | \&\f(CW\*(C`r13\*(C'\fR. Put small uninitialized global and static data in the |
| 16925 | \&\fB.sbss\fR section, which is adjacent to the \fB.sdata\fR section. |
| 16926 | The \fB\-msdata=sysv\fR option is incompatible with the |
| 16927 | \&\fB\-mrelocatable\fR option. |
| 16928 | .IP "\fB\-msdata=default\fR" 4 |
| 16929 | .IX Item "-msdata=default" |
| 16930 | .PD 0 |
| 16931 | .IP "\fB\-msdata\fR" 4 |
| 16932 | .IX Item "-msdata" |
| 16933 | .PD |
| 16934 | On System V.4 and embedded PowerPC systems, if \fB\-meabi\fR is used, |
| 16935 | compile code the same as \fB\-msdata=eabi\fR, otherwise compile code the |
| 16936 | same as \fB\-msdata=sysv\fR. |
| 16937 | .IP "\fB\-msdata=data\fR" 4 |
| 16938 | .IX Item "-msdata=data" |
| 16939 | On System V.4 and embedded PowerPC systems, put small global |
| 16940 | data in the \fB.sdata\fR section. Put small uninitialized global |
| 16941 | data in the \fB.sbss\fR section. Do not use register \f(CW\*(C`r13\*(C'\fR |
| 16942 | to address small data however. This is the default behavior unless |
| 16943 | other \fB\-msdata\fR options are used. |
| 16944 | .IP "\fB\-msdata=none\fR" 4 |
| 16945 | .IX Item "-msdata=none" |
| 16946 | .PD 0 |
| 16947 | .IP "\fB\-mno\-sdata\fR" 4 |
| 16948 | .IX Item "-mno-sdata" |
| 16949 | .PD |
| 16950 | On embedded PowerPC systems, put all initialized global and static data |
| 16951 | in the \fB.data\fR section, and all uninitialized data in the |
| 16952 | \&\fB.bss\fR section. |
| 16953 | .IP "\fB\-mblock\-move\-inline\-limit=\fR\fInum\fR" 4 |
| 16954 | .IX Item "-mblock-move-inline-limit=num" |
| 16955 | Inline all block moves (such as calls to \f(CW\*(C`memcpy\*(C'\fR or structure |
| 16956 | copies) less than or equal to \fInum\fR bytes. The minimum value for |
| 16957 | \&\fInum\fR is 32 bytes on 32\-bit targets and 64 bytes on 64\-bit |
| 16958 | targets. The default value is target-specific. |
| 16959 | .IP "\fB\-G\fR \fInum\fR" 4 |
| 16960 | .IX Item "-G num" |
| 16961 | On embedded PowerPC systems, put global and static items less than or |
| 16962 | equal to \fInum\fR bytes into the small data or \s-1BSS\s0 sections instead of |
| 16963 | the normal data or \s-1BSS\s0 section. By default, \fInum\fR is 8. The |
| 16964 | \&\fB\-G\fR \fInum\fR switch is also passed to the linker. |
| 16965 | All modules should be compiled with the same \fB\-G\fR \fInum\fR value. |
| 16966 | .IP "\fB\-mregnames\fR" 4 |
| 16967 | .IX Item "-mregnames" |
| 16968 | .PD 0 |
| 16969 | .IP "\fB\-mno\-regnames\fR" 4 |
| 16970 | .IX Item "-mno-regnames" |
| 16971 | .PD |
| 16972 | On System V.4 and embedded PowerPC systems do (do not) emit register |
| 16973 | names in the assembly language output using symbolic forms. |
| 16974 | .IP "\fB\-mlongcall\fR" 4 |
| 16975 | .IX Item "-mlongcall" |
| 16976 | .PD 0 |
| 16977 | .IP "\fB\-mno\-longcall\fR" 4 |
| 16978 | .IX Item "-mno-longcall" |
| 16979 | .PD |
| 16980 | By default assume that all calls are far away so that a longer and more |
| 16981 | expensive calling sequence is required. This is required for calls |
| 16982 | farther than 32 megabytes (33,554,432 bytes) from the current location. |
| 16983 | A short call is generated if the compiler knows |
| 16984 | the call cannot be that far away. This setting can be overridden by |
| 16985 | the \f(CW\*(C`shortcall\*(C'\fR function attribute, or by \f(CW\*(C`#pragma |
| 16986 | longcall(0)\*(C'\fR. |
| 16987 | .Sp |
| 16988 | Some linkers are capable of detecting out-of-range calls and generating |
| 16989 | glue code on the fly. On these systems, long calls are unnecessary and |
| 16990 | generate slower code. As of this writing, the \s-1AIX\s0 linker can do this, |
| 16991 | as can the \s-1GNU\s0 linker for PowerPC/64. It is planned to add this feature |
| 16992 | to the \s-1GNU\s0 linker for 32\-bit PowerPC systems as well. |
| 16993 | .Sp |
| 16994 | On Darwin/PPC systems, \f(CW\*(C`#pragma longcall\*(C'\fR generates \f(CW\*(C`jbsr |
| 16995 | callee, L42\*(C'\fR, plus a \fIbranch island\fR (glue code). The two target |
| 16996 | addresses represent the callee and the branch island. The |
| 16997 | Darwin/PPC linker prefers the first address and generates a \f(CW\*(C`bl |
| 16998 | callee\*(C'\fR if the \s-1PPC\s0 \f(CW\*(C`bl\*(C'\fR instruction reaches the callee directly; |
| 16999 | otherwise, the linker generates \f(CW\*(C`bl L42\*(C'\fR to call the branch |
| 17000 | island. The branch island is appended to the body of the |
| 17001 | calling function; it computes the full 32\-bit address of the callee |
| 17002 | and jumps to it. |
| 17003 | .Sp |
| 17004 | On Mach-O (Darwin) systems, this option directs the compiler emit to |
| 17005 | the glue for every direct call, and the Darwin linker decides whether |
| 17006 | to use or discard it. |
| 17007 | .Sp |
| 17008 | In the future, \s-1GCC\s0 may ignore all longcall specifications |
| 17009 | when the linker is known to generate glue. |
| 17010 | .IP "\fB\-mtls\-markers\fR" 4 |
| 17011 | .IX Item "-mtls-markers" |
| 17012 | .PD 0 |
| 17013 | .IP "\fB\-mno\-tls\-markers\fR" 4 |
| 17014 | .IX Item "-mno-tls-markers" |
| 17015 | .PD |
| 17016 | Mark (do not mark) calls to \f(CW\*(C`_\|_tls_get_addr\*(C'\fR with a relocation |
| 17017 | specifying the function argument. The relocation allows the linker to |
| 17018 | reliably associate function call with argument setup instructions for |
| 17019 | \&\s-1TLS\s0 optimization, which in turn allows \s-1GCC\s0 to better schedule the |
| 17020 | sequence. |
| 17021 | .IP "\fB\-pthread\fR" 4 |
| 17022 | .IX Item "-pthread" |
| 17023 | Adds support for multithreading with the \fIpthreads\fR library. |
| 17024 | This option sets flags for both the preprocessor and linker. |
| 17025 | .IP "\fB\-mrecip\fR" 4 |
| 17026 | .IX Item "-mrecip" |
| 17027 | .PD 0 |
| 17028 | .IP "\fB\-mno\-recip\fR" 4 |
| 17029 | .IX Item "-mno-recip" |
| 17030 | .PD |
| 17031 | This option enables use of the reciprocal estimate and |
| 17032 | reciprocal square root estimate instructions with additional |
| 17033 | Newton-Raphson steps to increase precision instead of doing a divide or |
| 17034 | square root and divide for floating-point arguments. You should use |
| 17035 | the \fB\-ffast\-math\fR option when using \fB\-mrecip\fR (or at |
| 17036 | least \fB\-funsafe\-math\-optimizations\fR, |
| 17037 | \&\fB\-finite\-math\-only\fR, \fB\-freciprocal\-math\fR and |
| 17038 | \&\fB\-fno\-trapping\-math\fR). Note that while the throughput of the |
| 17039 | sequence is generally higher than the throughput of the non-reciprocal |
| 17040 | instruction, the precision of the sequence can be decreased by up to 2 |
| 17041 | ulp (i.e. the inverse of 1.0 equals 0.99999994) for reciprocal square |
| 17042 | roots. |
| 17043 | .IP "\fB\-mrecip=\fR\fIopt\fR" 4 |
| 17044 | .IX Item "-mrecip=opt" |
| 17045 | This option controls which reciprocal estimate instructions |
| 17046 | may be used. \fIopt\fR is a comma-separated list of options, which may |
| 17047 | be preceded by a \f(CW\*(C`!\*(C'\fR to invert the option: |
| 17048 | \&\f(CW\*(C`all\*(C'\fR: enable all estimate instructions, |
| 17049 | \&\f(CW\*(C`default\*(C'\fR: enable the default instructions, equivalent to \fB\-mrecip\fR, |
| 17050 | \&\f(CW\*(C`none\*(C'\fR: disable all estimate instructions, equivalent to \fB\-mno\-recip\fR; |
| 17051 | \&\f(CW\*(C`div\*(C'\fR: enable the reciprocal approximation instructions for both single and double precision; |
| 17052 | \&\f(CW\*(C`divf\*(C'\fR: enable the single-precision reciprocal approximation instructions; |
| 17053 | \&\f(CW\*(C`divd\*(C'\fR: enable the double-precision reciprocal approximation instructions; |
| 17054 | \&\f(CW\*(C`rsqrt\*(C'\fR: enable the reciprocal square root approximation instructions for both single and double precision; |
| 17055 | \&\f(CW\*(C`rsqrtf\*(C'\fR: enable the single-precision reciprocal square root approximation instructions; |
| 17056 | \&\f(CW\*(C`rsqrtd\*(C'\fR: enable the double-precision reciprocal square root approximation instructions; |
| 17057 | .Sp |
| 17058 | So, for example, \fB\-mrecip=all,!rsqrtd\fR enables |
| 17059 | all of the reciprocal estimate instructions, except for the |
| 17060 | \&\f(CW\*(C`FRSQRTE\*(C'\fR, \f(CW\*(C`XSRSQRTEDP\*(C'\fR, and \f(CW\*(C`XVRSQRTEDP\*(C'\fR instructions |
| 17061 | which handle the double-precision reciprocal square root calculations. |
| 17062 | .IP "\fB\-mrecip\-precision\fR" 4 |
| 17063 | .IX Item "-mrecip-precision" |
| 17064 | .PD 0 |
| 17065 | .IP "\fB\-mno\-recip\-precision\fR" 4 |
| 17066 | .IX Item "-mno-recip-precision" |
| 17067 | .PD |
| 17068 | Assume (do not assume) that the reciprocal estimate instructions |
| 17069 | provide higher-precision estimates than is mandated by the PowerPC |
| 17070 | \&\s-1ABI\s0. Selecting \fB\-mcpu=power6\fR, \fB\-mcpu=power7\fR or |
| 17071 | \&\fB\-mcpu=power8\fR automatically selects \fB\-mrecip\-precision\fR. |
| 17072 | The double-precision square root estimate instructions are not generated by |
| 17073 | default on low-precision machines, since they do not provide an |
| 17074 | estimate that converges after three steps. |
| 17075 | .IP "\fB\-mveclibabi=\fR\fItype\fR" 4 |
| 17076 | .IX Item "-mveclibabi=type" |
| 17077 | Specifies the \s-1ABI\s0 type to use for vectorizing intrinsics using an |
| 17078 | external library. The only type supported at present is \f(CW\*(C`mass\*(C'\fR, |
| 17079 | which specifies to use \s-1IBM\s0's Mathematical Acceleration Subsystem |
| 17080 | (\s-1MASS\s0) libraries for vectorizing intrinsics using external libraries. |
| 17081 | \&\s-1GCC\s0 currently emits calls to \f(CW\*(C`acosd2\*(C'\fR, \f(CW\*(C`acosf4\*(C'\fR, |
| 17082 | \&\f(CW\*(C`acoshd2\*(C'\fR, \f(CW\*(C`acoshf4\*(C'\fR, \f(CW\*(C`asind2\*(C'\fR, \f(CW\*(C`asinf4\*(C'\fR, |
| 17083 | \&\f(CW\*(C`asinhd2\*(C'\fR, \f(CW\*(C`asinhf4\*(C'\fR, \f(CW\*(C`atan2d2\*(C'\fR, \f(CW\*(C`atan2f4\*(C'\fR, |
| 17084 | \&\f(CW\*(C`atand2\*(C'\fR, \f(CW\*(C`atanf4\*(C'\fR, \f(CW\*(C`atanhd2\*(C'\fR, \f(CW\*(C`atanhf4\*(C'\fR, |
| 17085 | \&\f(CW\*(C`cbrtd2\*(C'\fR, \f(CW\*(C`cbrtf4\*(C'\fR, \f(CW\*(C`cosd2\*(C'\fR, \f(CW\*(C`cosf4\*(C'\fR, |
| 17086 | \&\f(CW\*(C`coshd2\*(C'\fR, \f(CW\*(C`coshf4\*(C'\fR, \f(CW\*(C`erfcd2\*(C'\fR, \f(CW\*(C`erfcf4\*(C'\fR, |
| 17087 | \&\f(CW\*(C`erfd2\*(C'\fR, \f(CW\*(C`erff4\*(C'\fR, \f(CW\*(C`exp2d2\*(C'\fR, \f(CW\*(C`exp2f4\*(C'\fR, |
| 17088 | \&\f(CW\*(C`expd2\*(C'\fR, \f(CW\*(C`expf4\*(C'\fR, \f(CW\*(C`expm1d2\*(C'\fR, \f(CW\*(C`expm1f4\*(C'\fR, |
| 17089 | \&\f(CW\*(C`hypotd2\*(C'\fR, \f(CW\*(C`hypotf4\*(C'\fR, \f(CW\*(C`lgammad2\*(C'\fR, \f(CW\*(C`lgammaf4\*(C'\fR, |
| 17090 | \&\f(CW\*(C`log10d2\*(C'\fR, \f(CW\*(C`log10f4\*(C'\fR, \f(CW\*(C`log1pd2\*(C'\fR, \f(CW\*(C`log1pf4\*(C'\fR, |
| 17091 | \&\f(CW\*(C`log2d2\*(C'\fR, \f(CW\*(C`log2f4\*(C'\fR, \f(CW\*(C`logd2\*(C'\fR, \f(CW\*(C`logf4\*(C'\fR, |
| 17092 | \&\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, |
| 17093 | \&\f(CW\*(C`sinhf4\*(C'\fR, \f(CW\*(C`sqrtd2\*(C'\fR, \f(CW\*(C`sqrtf4\*(C'\fR, \f(CW\*(C`tand2\*(C'\fR, |
| 17094 | \&\f(CW\*(C`tanf4\*(C'\fR, \f(CW\*(C`tanhd2\*(C'\fR, and \f(CW\*(C`tanhf4\*(C'\fR when generating code |
| 17095 | for power7. Both \fB\-ftree\-vectorize\fR and |
| 17096 | \&\fB\-funsafe\-math\-optimizations\fR must also be enabled. The \s-1MASS\s0 |
| 17097 | libraries must be specified at link time. |
| 17098 | .IP "\fB\-mfriz\fR" 4 |
| 17099 | .IX Item "-mfriz" |
| 17100 | .PD 0 |
| 17101 | .IP "\fB\-mno\-friz\fR" 4 |
| 17102 | .IX Item "-mno-friz" |
| 17103 | .PD |
| 17104 | Generate (do not generate) the \f(CW\*(C`friz\*(C'\fR instruction when the |
| 17105 | \&\fB\-funsafe\-math\-optimizations\fR option is used to optimize |
| 17106 | rounding of floating-point values to 64\-bit integer and back to floating |
| 17107 | point. The \f(CW\*(C`friz\*(C'\fR instruction does not return the same value if |
| 17108 | the floating-point number is too large to fit in an integer. |
| 17109 | .IP "\fB\-mpointers\-to\-nested\-functions\fR" 4 |
| 17110 | .IX Item "-mpointers-to-nested-functions" |
| 17111 | .PD 0 |
| 17112 | .IP "\fB\-mno\-pointers\-to\-nested\-functions\fR" 4 |
| 17113 | .IX Item "-mno-pointers-to-nested-functions" |
| 17114 | .PD |
| 17115 | Generate (do not generate) code to load up the static chain register |
| 17116 | (\fIr11\fR) when calling through a pointer on \s-1AIX\s0 and 64\-bit Linux |
| 17117 | systems where a function pointer points to a 3\-word descriptor giving |
| 17118 | the function address, \s-1TOC\s0 value to be loaded in register \fIr2\fR, and |
| 17119 | static chain value to be loaded in register \fIr11\fR. The |
| 17120 | \&\fB\-mpointers\-to\-nested\-functions\fR is on by default. You cannot |
| 17121 | call through pointers to nested functions or pointers |
| 17122 | to functions compiled in other languages that use the static chain if |
| 17123 | you use the \fB\-mno\-pointers\-to\-nested\-functions\fR. |
| 17124 | .IP "\fB\-msave\-toc\-indirect\fR" 4 |
| 17125 | .IX Item "-msave-toc-indirect" |
| 17126 | .PD 0 |
| 17127 | .IP "\fB\-mno\-save\-toc\-indirect\fR" 4 |
| 17128 | .IX Item "-mno-save-toc-indirect" |
| 17129 | .PD |
| 17130 | Generate (do not generate) code to save the \s-1TOC\s0 value in the reserved |
| 17131 | stack location in the function prologue if the function calls through |
| 17132 | a pointer on \s-1AIX\s0 and 64\-bit Linux systems. If the \s-1TOC\s0 value is not |
| 17133 | saved in the prologue, it is saved just before the call through the |
| 17134 | pointer. The \fB\-mno\-save\-toc\-indirect\fR option is the default. |
| 17135 | .PP |
| 17136 | \fI\s-1RX\s0 Options\fR |
| 17137 | .IX Subsection "RX Options" |
| 17138 | .PP |
| 17139 | These command-line options are defined for \s-1RX\s0 targets: |
| 17140 | .IP "\fB\-m64bit\-doubles\fR" 4 |
| 17141 | .IX Item "-m64bit-doubles" |
| 17142 | .PD 0 |
| 17143 | .IP "\fB\-m32bit\-doubles\fR" 4 |
| 17144 | .IX Item "-m32bit-doubles" |
| 17145 | .PD |
| 17146 | Make the \f(CW\*(C`double\*(C'\fR data type be 64 bits (\fB\-m64bit\-doubles\fR) |
| 17147 | or 32 bits (\fB\-m32bit\-doubles\fR) in size. The default is |
| 17148 | \&\fB\-m32bit\-doubles\fR. \fINote\fR \s-1RX\s0 floating-point hardware only |
| 17149 | works on 32\-bit values, which is why the default is |
| 17150 | \&\fB\-m32bit\-doubles\fR. |
| 17151 | .IP "\fB\-fpu\fR" 4 |
| 17152 | .IX Item "-fpu" |
| 17153 | .PD 0 |
| 17154 | .IP "\fB\-nofpu\fR" 4 |
| 17155 | .IX Item "-nofpu" |
| 17156 | .PD |
| 17157 | Enables (\fB\-fpu\fR) or disables (\fB\-nofpu\fR) the use of \s-1RX\s0 |
| 17158 | floating-point hardware. The default is enabled for the \fI\s-1RX600\s0\fR |
| 17159 | series and disabled for the \fI\s-1RX200\s0\fR series. |
| 17160 | .Sp |
| 17161 | Floating-point instructions are only generated for 32\-bit floating-point |
| 17162 | values, however, so the \s-1FPU\s0 hardware is not used for doubles if the |
| 17163 | \&\fB\-m64bit\-doubles\fR option is used. |
| 17164 | .Sp |
| 17165 | \&\fINote\fR If the \fB\-fpu\fR option is enabled then |
| 17166 | \&\fB\-funsafe\-math\-optimizations\fR is also enabled automatically. |
| 17167 | This is because the \s-1RX\s0 \s-1FPU\s0 instructions are themselves unsafe. |
| 17168 | .IP "\fB\-mcpu=\fR\fIname\fR" 4 |
| 17169 | .IX Item "-mcpu=name" |
| 17170 | Selects the type of \s-1RX\s0 \s-1CPU\s0 to be targeted. Currently three types are |
| 17171 | supported, the generic \fI\s-1RX600\s0\fR and \fI\s-1RX200\s0\fR series hardware and |
| 17172 | the specific \fI\s-1RX610\s0\fR \s-1CPU\s0. The default is \fI\s-1RX600\s0\fR. |
| 17173 | .Sp |
| 17174 | The only difference between \fI\s-1RX600\s0\fR and \fI\s-1RX610\s0\fR is that the |
| 17175 | \&\fI\s-1RX610\s0\fR does not support the \f(CW\*(C`MVTIPL\*(C'\fR instruction. |
| 17176 | .Sp |
| 17177 | The \fI\s-1RX200\s0\fR series does not have a hardware floating-point unit |
| 17178 | and so \fB\-nofpu\fR is enabled by default when this type is |
| 17179 | selected. |
| 17180 | .IP "\fB\-mbig\-endian\-data\fR" 4 |
| 17181 | .IX Item "-mbig-endian-data" |
| 17182 | .PD 0 |
| 17183 | .IP "\fB\-mlittle\-endian\-data\fR" 4 |
| 17184 | .IX Item "-mlittle-endian-data" |
| 17185 | .PD |
| 17186 | Store data (but not code) in the big-endian format. The default is |
| 17187 | \&\fB\-mlittle\-endian\-data\fR, i.e. to store data in the little-endian |
| 17188 | format. |
| 17189 | .IP "\fB\-msmall\-data\-limit=\fR\fIN\fR" 4 |
| 17190 | .IX Item "-msmall-data-limit=N" |
| 17191 | Specifies the maximum size in bytes of global and static variables |
| 17192 | which can be placed into the small data area. Using the small data |
| 17193 | area can lead to smaller and faster code, but the size of area is |
| 17194 | limited and it is up to the programmer to ensure that the area does |
| 17195 | not overflow. Also when the small data area is used one of the \s-1RX\s0's |
| 17196 | registers (usually \f(CW\*(C`r13\*(C'\fR) is reserved for use pointing to this |
| 17197 | area, so it is no longer available for use by the compiler. This |
| 17198 | could result in slower and/or larger code if variables are pushed onto |
| 17199 | the stack instead of being held in this register. |
| 17200 | .Sp |
| 17201 | Note, common variables (variables that have not been initialized) and |
| 17202 | constants are not placed into the small data area as they are assigned |
| 17203 | to other sections in the output executable. |
| 17204 | .Sp |
| 17205 | The default value is zero, which disables this feature. Note, this |
| 17206 | feature is not enabled by default with higher optimization levels |
| 17207 | (\fB\-O2\fR etc) because of the potentially detrimental effects of |
| 17208 | reserving a register. It is up to the programmer to experiment and |
| 17209 | discover whether this feature is of benefit to their program. See the |
| 17210 | description of the \fB\-mpid\fR option for a description of how the |
| 17211 | actual register to hold the small data area pointer is chosen. |
| 17212 | .IP "\fB\-msim\fR" 4 |
| 17213 | .IX Item "-msim" |
| 17214 | .PD 0 |
| 17215 | .IP "\fB\-mno\-sim\fR" 4 |
| 17216 | .IX Item "-mno-sim" |
| 17217 | .PD |
| 17218 | Use the simulator runtime. The default is to use the libgloss |
| 17219 | board-specific runtime. |
| 17220 | .IP "\fB\-mas100\-syntax\fR" 4 |
| 17221 | .IX Item "-mas100-syntax" |
| 17222 | .PD 0 |
| 17223 | .IP "\fB\-mno\-as100\-syntax\fR" 4 |
| 17224 | .IX Item "-mno-as100-syntax" |
| 17225 | .PD |
| 17226 | When generating assembler output use a syntax that is compatible with |
| 17227 | Renesas's \s-1AS100\s0 assembler. This syntax can also be handled by the \s-1GAS\s0 |
| 17228 | assembler, but it has some restrictions so it is not generated by default. |
| 17229 | .IP "\fB\-mmax\-constant\-size=\fR\fIN\fR" 4 |
| 17230 | .IX Item "-mmax-constant-size=N" |
| 17231 | Specifies the maximum size, in bytes, of a constant that can be used as |
| 17232 | an operand in a \s-1RX\s0 instruction. Although the \s-1RX\s0 instruction set does |
| 17233 | allow constants of up to 4 bytes in length to be used in instructions, |
| 17234 | a longer value equates to a longer instruction. Thus in some |
| 17235 | circumstances it can be beneficial to restrict the size of constants |
| 17236 | that are used in instructions. Constants that are too big are instead |
| 17237 | placed into a constant pool and referenced via register indirection. |
| 17238 | .Sp |
| 17239 | The value \fIN\fR can be between 0 and 4. A value of 0 (the default) |
| 17240 | or 4 means that constants of any size are allowed. |
| 17241 | .IP "\fB\-mrelax\fR" 4 |
| 17242 | .IX Item "-mrelax" |
| 17243 | Enable linker relaxation. Linker relaxation is a process whereby the |
| 17244 | linker attempts to reduce the size of a program by finding shorter |
| 17245 | versions of various instructions. Disabled by default. |
| 17246 | .IP "\fB\-mint\-register=\fR\fIN\fR" 4 |
| 17247 | .IX Item "-mint-register=N" |
| 17248 | Specify the number of registers to reserve for fast interrupt handler |
| 17249 | functions. The value \fIN\fR can be between 0 and 4. A value of 1 |
| 17250 | means that register \f(CW\*(C`r13\*(C'\fR is reserved for the exclusive use |
| 17251 | of fast interrupt handlers. A value of 2 reserves \f(CW\*(C`r13\*(C'\fR and |
| 17252 | \&\f(CW\*(C`r12\*(C'\fR. A value of 3 reserves \f(CW\*(C`r13\*(C'\fR, \f(CW\*(C`r12\*(C'\fR and |
| 17253 | \&\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. |
| 17254 | A value of 0, the default, does not reserve any registers. |
| 17255 | .IP "\fB\-msave\-acc\-in\-interrupts\fR" 4 |
| 17256 | .IX Item "-msave-acc-in-interrupts" |
| 17257 | Specifies that interrupt handler functions should preserve the |
| 17258 | accumulator register. This is only necessary if normal code might use |
| 17259 | the accumulator register, for example because it performs 64\-bit |
| 17260 | multiplications. The default is to ignore the accumulator as this |
| 17261 | makes the interrupt handlers faster. |
| 17262 | .IP "\fB\-mpid\fR" 4 |
| 17263 | .IX Item "-mpid" |
| 17264 | .PD 0 |
| 17265 | .IP "\fB\-mno\-pid\fR" 4 |
| 17266 | .IX Item "-mno-pid" |
| 17267 | .PD |
| 17268 | Enables the generation of position independent data. When enabled any |
| 17269 | access to constant data is done via an offset from a base address |
| 17270 | held in a register. This allows the location of constant data to be |
| 17271 | determined at run time without requiring the executable to be |
| 17272 | relocated, which is a benefit to embedded applications with tight |
| 17273 | memory constraints. Data that can be modified is not affected by this |
| 17274 | option. |
| 17275 | .Sp |
| 17276 | Note, using this feature reserves a register, usually \f(CW\*(C`r13\*(C'\fR, for |
| 17277 | the constant data base address. This can result in slower and/or |
| 17278 | larger code, especially in complicated functions. |
| 17279 | .Sp |
| 17280 | The actual register chosen to hold the constant data base address |
| 17281 | depends upon whether the \fB\-msmall\-data\-limit\fR and/or the |
| 17282 | \&\fB\-mint\-register\fR command-line options are enabled. Starting |
| 17283 | with register \f(CW\*(C`r13\*(C'\fR and proceeding downwards, registers are |
| 17284 | allocated first to satisfy the requirements of \fB\-mint\-register\fR, |
| 17285 | then \fB\-mpid\fR and finally \fB\-msmall\-data\-limit\fR. Thus it |
| 17286 | is possible for the small data area register to be \f(CW\*(C`r8\*(C'\fR if both |
| 17287 | \&\fB\-mint\-register=4\fR and \fB\-mpid\fR are specified on the |
| 17288 | command line. |
| 17289 | .Sp |
| 17290 | By default this feature is not enabled. The default can be restored |
| 17291 | via the \fB\-mno\-pid\fR command-line option. |
| 17292 | .IP "\fB\-mno\-warn\-multiple\-fast\-interrupts\fR" 4 |
| 17293 | .IX Item "-mno-warn-multiple-fast-interrupts" |
| 17294 | .PD 0 |
| 17295 | .IP "\fB\-mwarn\-multiple\-fast\-interrupts\fR" 4 |
| 17296 | .IX Item "-mwarn-multiple-fast-interrupts" |
| 17297 | .PD |
| 17298 | Prevents \s-1GCC\s0 from issuing a warning message if it finds more than one |
| 17299 | fast interrupt handler when it is compiling a file. The default is to |
| 17300 | issue a warning for each extra fast interrupt handler found, as the \s-1RX\s0 |
| 17301 | only supports one such interrupt. |
| 17302 | .PP |
| 17303 | \&\fINote:\fR The generic \s-1GCC\s0 command-line option \fB\-ffixed\-\fR\fIreg\fR |
| 17304 | has special significance to the \s-1RX\s0 port when used with the |
| 17305 | \&\f(CW\*(C`interrupt\*(C'\fR function attribute. This attribute indicates a |
| 17306 | function intended to process fast interrupts. \s-1GCC\s0 ensures |
| 17307 | that it only uses the registers \f(CW\*(C`r10\*(C'\fR, \f(CW\*(C`r11\*(C'\fR, \f(CW\*(C`r12\*(C'\fR |
| 17308 | and/or \f(CW\*(C`r13\*(C'\fR and only provided that the normal use of the |
| 17309 | corresponding registers have been restricted via the |
| 17310 | \&\fB\-ffixed\-\fR\fIreg\fR or \fB\-mint\-register\fR command-line |
| 17311 | options. |
| 17312 | .PP |
| 17313 | \fIS/390 and zSeries Options\fR |
| 17314 | .IX Subsection "S/390 and zSeries Options" |
| 17315 | .PP |
| 17316 | These are the \fB\-m\fR options defined for the S/390 and zSeries architecture. |
| 17317 | .IP "\fB\-mhard\-float\fR" 4 |
| 17318 | .IX Item "-mhard-float" |
| 17319 | .PD 0 |
| 17320 | .IP "\fB\-msoft\-float\fR" 4 |
| 17321 | .IX Item "-msoft-float" |
| 17322 | .PD |
| 17323 | Use (do not use) the hardware floating-point instructions and registers |
| 17324 | for floating-point operations. When \fB\-msoft\-float\fR is specified, |
| 17325 | functions in \fIlibgcc.a\fR are used to perform floating-point |
| 17326 | operations. When \fB\-mhard\-float\fR is specified, the compiler |
| 17327 | generates \s-1IEEE\s0 floating-point instructions. This is the default. |
| 17328 | .IP "\fB\-mhard\-dfp\fR" 4 |
| 17329 | .IX Item "-mhard-dfp" |
| 17330 | .PD 0 |
| 17331 | .IP "\fB\-mno\-hard\-dfp\fR" 4 |
| 17332 | .IX Item "-mno-hard-dfp" |
| 17333 | .PD |
| 17334 | Use (do not use) the hardware decimal-floating-point instructions for |
| 17335 | decimal-floating-point operations. When \fB\-mno\-hard\-dfp\fR is |
| 17336 | specified, functions in \fIlibgcc.a\fR are used to perform |
| 17337 | decimal-floating-point operations. When \fB\-mhard\-dfp\fR is |
| 17338 | specified, the compiler generates decimal-floating-point hardware |
| 17339 | instructions. This is the default for \fB\-march=z9\-ec\fR or higher. |
| 17340 | .IP "\fB\-mlong\-double\-64\fR" 4 |
| 17341 | .IX Item "-mlong-double-64" |
| 17342 | .PD 0 |
| 17343 | .IP "\fB\-mlong\-double\-128\fR" 4 |
| 17344 | .IX Item "-mlong-double-128" |
| 17345 | .PD |
| 17346 | These switches control the size of \f(CW\*(C`long double\*(C'\fR type. A size |
| 17347 | of 64 bits makes the \f(CW\*(C`long double\*(C'\fR type equivalent to the \f(CW\*(C`double\*(C'\fR |
| 17348 | type. This is the default. |
| 17349 | .IP "\fB\-mbackchain\fR" 4 |
| 17350 | .IX Item "-mbackchain" |
| 17351 | .PD 0 |
| 17352 | .IP "\fB\-mno\-backchain\fR" 4 |
| 17353 | .IX Item "-mno-backchain" |
| 17354 | .PD |
| 17355 | Store (do not store) the address of the caller's frame as backchain pointer |
| 17356 | into the callee's stack frame. |
| 17357 | A backchain may be needed to allow debugging using tools that do not understand |
| 17358 | \&\s-1DWARF\s0 2 call frame information. |
| 17359 | When \fB\-mno\-packed\-stack\fR is in effect, the backchain pointer is stored |
| 17360 | at the bottom of the stack frame; when \fB\-mpacked\-stack\fR is in effect, |
| 17361 | the backchain is placed into the topmost word of the 96/160 byte register |
| 17362 | save area. |
| 17363 | .Sp |
| 17364 | In general, code compiled with \fB\-mbackchain\fR is call-compatible with |
| 17365 | code compiled with \fB\-mmo\-backchain\fR; however, use of the backchain |
| 17366 | for debugging purposes usually requires that the whole binary is built with |
| 17367 | \&\fB\-mbackchain\fR. Note that the combination of \fB\-mbackchain\fR, |
| 17368 | \&\fB\-mpacked\-stack\fR and \fB\-mhard\-float\fR is not supported. In order |
| 17369 | to build a linux kernel use \fB\-msoft\-float\fR. |
| 17370 | .Sp |
| 17371 | The default is to not maintain the backchain. |
| 17372 | .IP "\fB\-mpacked\-stack\fR" 4 |
| 17373 | .IX Item "-mpacked-stack" |
| 17374 | .PD 0 |
| 17375 | .IP "\fB\-mno\-packed\-stack\fR" 4 |
| 17376 | .IX Item "-mno-packed-stack" |
| 17377 | .PD |
| 17378 | Use (do not use) the packed stack layout. When \fB\-mno\-packed\-stack\fR is |
| 17379 | specified, the compiler uses the all fields of the 96/160 byte register save |
| 17380 | area only for their default purpose; unused fields still take up stack space. |
| 17381 | When \fB\-mpacked\-stack\fR is specified, register save slots are densely |
| 17382 | packed at the top of the register save area; unused space is reused for other |
| 17383 | purposes, allowing for more efficient use of the available stack space. |
| 17384 | However, when \fB\-mbackchain\fR is also in effect, the topmost word of |
| 17385 | the save area is always used to store the backchain, and the return address |
| 17386 | register is always saved two words below the backchain. |
| 17387 | .Sp |
| 17388 | As long as the stack frame backchain is not used, code generated with |
| 17389 | \&\fB\-mpacked\-stack\fR is call-compatible with code generated with |
| 17390 | \&\fB\-mno\-packed\-stack\fR. Note that some non-FSF releases of \s-1GCC\s0 2.95 for |
| 17391 | S/390 or zSeries generated code that uses the stack frame backchain at run |
| 17392 | time, not just for debugging purposes. Such code is not call-compatible |
| 17393 | with code compiled with \fB\-mpacked\-stack\fR. Also, note that the |
| 17394 | combination of \fB\-mbackchain\fR, |
| 17395 | \&\fB\-mpacked\-stack\fR and \fB\-mhard\-float\fR is not supported. In order |
| 17396 | to build a linux kernel use \fB\-msoft\-float\fR. |
| 17397 | .Sp |
| 17398 | The default is to not use the packed stack layout. |
| 17399 | .IP "\fB\-msmall\-exec\fR" 4 |
| 17400 | .IX Item "-msmall-exec" |
| 17401 | .PD 0 |
| 17402 | .IP "\fB\-mno\-small\-exec\fR" 4 |
| 17403 | .IX Item "-mno-small-exec" |
| 17404 | .PD |
| 17405 | Generate (or do not generate) code using the \f(CW\*(C`bras\*(C'\fR instruction |
| 17406 | to do subroutine calls. |
| 17407 | This only works reliably if the total executable size does not |
| 17408 | exceed 64k. The default is to use the \f(CW\*(C`basr\*(C'\fR instruction instead, |
| 17409 | which does not have this limitation. |
| 17410 | .IP "\fB\-m64\fR" 4 |
| 17411 | .IX Item "-m64" |
| 17412 | .PD 0 |
| 17413 | .IP "\fB\-m31\fR" 4 |
| 17414 | .IX Item "-m31" |
| 17415 | .PD |
| 17416 | When \fB\-m31\fR is specified, generate code compliant to the |
| 17417 | GNU/Linux for S/390 \s-1ABI\s0. When \fB\-m64\fR is specified, generate |
| 17418 | code compliant to the GNU/Linux for zSeries \s-1ABI\s0. This allows \s-1GCC\s0 in |
| 17419 | particular to generate 64\-bit instructions. For the \fBs390\fR |
| 17420 | targets, the default is \fB\-m31\fR, while the \fBs390x\fR |
| 17421 | targets default to \fB\-m64\fR. |
| 17422 | .IP "\fB\-mzarch\fR" 4 |
| 17423 | .IX Item "-mzarch" |
| 17424 | .PD 0 |
| 17425 | .IP "\fB\-mesa\fR" 4 |
| 17426 | .IX Item "-mesa" |
| 17427 | .PD |
| 17428 | When \fB\-mzarch\fR is specified, generate code using the |
| 17429 | instructions available on z/Architecture. |
| 17430 | When \fB\-mesa\fR is specified, generate code using the |
| 17431 | instructions available on \s-1ESA/390\s0. Note that \fB\-mesa\fR is |
| 17432 | not possible with \fB\-m64\fR. |
| 17433 | When generating code compliant to the GNU/Linux for S/390 \s-1ABI\s0, |
| 17434 | the default is \fB\-mesa\fR. When generating code compliant |
| 17435 | to the GNU/Linux for zSeries \s-1ABI\s0, the default is \fB\-mzarch\fR. |
| 17436 | .IP "\fB\-mmvcle\fR" 4 |
| 17437 | .IX Item "-mmvcle" |
| 17438 | .PD 0 |
| 17439 | .IP "\fB\-mno\-mvcle\fR" 4 |
| 17440 | .IX Item "-mno-mvcle" |
| 17441 | .PD |
| 17442 | Generate (or do not generate) code using the \f(CW\*(C`mvcle\*(C'\fR instruction |
| 17443 | to perform block moves. When \fB\-mno\-mvcle\fR is specified, |
| 17444 | use a \f(CW\*(C`mvc\*(C'\fR loop instead. This is the default unless optimizing for |
| 17445 | size. |
| 17446 | .IP "\fB\-mdebug\fR" 4 |
| 17447 | .IX Item "-mdebug" |
| 17448 | .PD 0 |
| 17449 | .IP "\fB\-mno\-debug\fR" 4 |
| 17450 | .IX Item "-mno-debug" |
| 17451 | .PD |
| 17452 | Print (or do not print) additional debug information when compiling. |
| 17453 | The default is to not print debug information. |
| 17454 | .IP "\fB\-march=\fR\fIcpu-type\fR" 4 |
| 17455 | .IX Item "-march=cpu-type" |
| 17456 | Generate code that runs on \fIcpu-type\fR, which is the name of a system |
| 17457 | representing a certain processor type. Possible values for |
| 17458 | \&\fIcpu-type\fR are \fBg5\fR, \fBg6\fR, \fBz900\fR, \fBz990\fR, |
| 17459 | \&\fBz9\-109\fR, \fBz9\-ec\fR and \fBz10\fR. |
| 17460 | When generating code using the instructions available on z/Architecture, |
| 17461 | the default is \fB\-march=z900\fR. Otherwise, the default is |
| 17462 | \&\fB\-march=g5\fR. |
| 17463 | .IP "\fB\-mtune=\fR\fIcpu-type\fR" 4 |
| 17464 | .IX Item "-mtune=cpu-type" |
| 17465 | Tune to \fIcpu-type\fR everything applicable about the generated code, |
| 17466 | except for the \s-1ABI\s0 and the set of available instructions. |
| 17467 | The list of \fIcpu-type\fR values is the same as for \fB\-march\fR. |
| 17468 | The default is the value used for \fB\-march\fR. |
| 17469 | .IP "\fB\-mtpf\-trace\fR" 4 |
| 17470 | .IX Item "-mtpf-trace" |
| 17471 | .PD 0 |
| 17472 | .IP "\fB\-mno\-tpf\-trace\fR" 4 |
| 17473 | .IX Item "-mno-tpf-trace" |
| 17474 | .PD |
| 17475 | Generate code that adds (does not add) in \s-1TPF\s0 \s-1OS\s0 specific branches to trace |
| 17476 | routines in the operating system. This option is off by default, even |
| 17477 | when compiling for the \s-1TPF\s0 \s-1OS\s0. |
| 17478 | .IP "\fB\-mfused\-madd\fR" 4 |
| 17479 | .IX Item "-mfused-madd" |
| 17480 | .PD 0 |
| 17481 | .IP "\fB\-mno\-fused\-madd\fR" 4 |
| 17482 | .IX Item "-mno-fused-madd" |
| 17483 | .PD |
| 17484 | Generate code that uses (does not use) the floating-point multiply and |
| 17485 | accumulate instructions. These instructions are generated by default if |
| 17486 | hardware floating point is used. |
| 17487 | .IP "\fB\-mwarn\-framesize=\fR\fIframesize\fR" 4 |
| 17488 | .IX Item "-mwarn-framesize=framesize" |
| 17489 | Emit a warning if the current function exceeds the given frame size. Because |
| 17490 | this is a compile-time check it doesn't need to be a real problem when the program |
| 17491 | runs. It is intended to identify functions that most probably cause |
| 17492 | a stack overflow. It is useful to be used in an environment with limited stack |
| 17493 | size e.g. the linux kernel. |
| 17494 | .IP "\fB\-mwarn\-dynamicstack\fR" 4 |
| 17495 | .IX Item "-mwarn-dynamicstack" |
| 17496 | Emit a warning if the function calls \f(CW\*(C`alloca\*(C'\fR or uses dynamically-sized |
| 17497 | arrays. This is generally a bad idea with a limited stack size. |
| 17498 | .IP "\fB\-mstack\-guard=\fR\fIstack-guard\fR" 4 |
| 17499 | .IX Item "-mstack-guard=stack-guard" |
| 17500 | .PD 0 |
| 17501 | .IP "\fB\-mstack\-size=\fR\fIstack-size\fR" 4 |
| 17502 | .IX Item "-mstack-size=stack-size" |
| 17503 | .PD |
| 17504 | If these options are provided the S/390 back end emits additional instructions in |
| 17505 | the function prologue that trigger a trap if the stack size is \fIstack-guard\fR |
| 17506 | bytes above the \fIstack-size\fR (remember that the stack on S/390 grows downward). |
| 17507 | If the \fIstack-guard\fR option is omitted the smallest power of 2 larger than |
| 17508 | the frame size of the compiled function is chosen. |
| 17509 | These options are intended to be used to help debugging stack overflow problems. |
| 17510 | The additionally emitted code causes only little overhead and hence can also be |
| 17511 | used in production-like systems without greater performance degradation. The given |
| 17512 | values have to be exact powers of 2 and \fIstack-size\fR has to be greater than |
| 17513 | \&\fIstack-guard\fR without exceeding 64k. |
| 17514 | In order to be efficient the extra code makes the assumption that the stack starts |
| 17515 | at an address aligned to the value given by \fIstack-size\fR. |
| 17516 | The \fIstack-guard\fR option can only be used in conjunction with \fIstack-size\fR. |
| 17517 | .PP |
| 17518 | \fIScore Options\fR |
| 17519 | .IX Subsection "Score Options" |
| 17520 | .PP |
| 17521 | These options are defined for Score implementations: |
| 17522 | .IP "\fB\-meb\fR" 4 |
| 17523 | .IX Item "-meb" |
| 17524 | Compile code for big-endian mode. This is the default. |
| 17525 | .IP "\fB\-mel\fR" 4 |
| 17526 | .IX Item "-mel" |
| 17527 | Compile code for little-endian mode. |
| 17528 | .IP "\fB\-mnhwloop\fR" 4 |
| 17529 | .IX Item "-mnhwloop" |
| 17530 | Disable generation of \f(CW\*(C`bcnz\*(C'\fR instructions. |
| 17531 | .IP "\fB\-muls\fR" 4 |
| 17532 | .IX Item "-muls" |
| 17533 | Enable generation of unaligned load and store instructions. |
| 17534 | .IP "\fB\-mmac\fR" 4 |
| 17535 | .IX Item "-mmac" |
| 17536 | Enable the use of multiply-accumulate instructions. Disabled by default. |
| 17537 | .IP "\fB\-mscore5\fR" 4 |
| 17538 | .IX Item "-mscore5" |
| 17539 | Specify the \s-1SCORE5\s0 as the target architecture. |
| 17540 | .IP "\fB\-mscore5u\fR" 4 |
| 17541 | .IX Item "-mscore5u" |
| 17542 | Specify the \s-1SCORE5U\s0 of the target architecture. |
| 17543 | .IP "\fB\-mscore7\fR" 4 |
| 17544 | .IX Item "-mscore7" |
| 17545 | Specify the \s-1SCORE7\s0 as the target architecture. This is the default. |
| 17546 | .IP "\fB\-mscore7d\fR" 4 |
| 17547 | .IX Item "-mscore7d" |
| 17548 | Specify the \s-1SCORE7D\s0 as the target architecture. |
| 17549 | .PP |
| 17550 | \fI\s-1SH\s0 Options\fR |
| 17551 | .IX Subsection "SH Options" |
| 17552 | .PP |
| 17553 | These \fB\-m\fR options are defined for the \s-1SH\s0 implementations: |
| 17554 | .IP "\fB\-m1\fR" 4 |
| 17555 | .IX Item "-m1" |
| 17556 | Generate code for the \s-1SH1\s0. |
| 17557 | .IP "\fB\-m2\fR" 4 |
| 17558 | .IX Item "-m2" |
| 17559 | Generate code for the \s-1SH2\s0. |
| 17560 | .IP "\fB\-m2e\fR" 4 |
| 17561 | .IX Item "-m2e" |
| 17562 | Generate code for the SH2e. |
| 17563 | .IP "\fB\-m2a\-nofpu\fR" 4 |
| 17564 | .IX Item "-m2a-nofpu" |
| 17565 | Generate code for the SH2a without \s-1FPU\s0, or for a SH2a\-FPU in such a way |
| 17566 | that the floating-point unit is not used. |
| 17567 | .IP "\fB\-m2a\-single\-only\fR" 4 |
| 17568 | .IX Item "-m2a-single-only" |
| 17569 | Generate code for the SH2a\-FPU, in such a way that no double-precision |
| 17570 | floating-point operations are used. |
| 17571 | .IP "\fB\-m2a\-single\fR" 4 |
| 17572 | .IX Item "-m2a-single" |
| 17573 | Generate code for the SH2a\-FPU assuming the floating-point unit is in |
| 17574 | single-precision mode by default. |
| 17575 | .IP "\fB\-m2a\fR" 4 |
| 17576 | .IX Item "-m2a" |
| 17577 | Generate code for the SH2a\-FPU assuming the floating-point unit is in |
| 17578 | double-precision mode by default. |
| 17579 | .IP "\fB\-m3\fR" 4 |
| 17580 | .IX Item "-m3" |
| 17581 | Generate code for the \s-1SH3\s0. |
| 17582 | .IP "\fB\-m3e\fR" 4 |
| 17583 | .IX Item "-m3e" |
| 17584 | Generate code for the SH3e. |
| 17585 | .IP "\fB\-m4\-nofpu\fR" 4 |
| 17586 | .IX Item "-m4-nofpu" |
| 17587 | Generate code for the \s-1SH4\s0 without a floating-point unit. |
| 17588 | .IP "\fB\-m4\-single\-only\fR" 4 |
| 17589 | .IX Item "-m4-single-only" |
| 17590 | Generate code for the \s-1SH4\s0 with a floating-point unit that only |
| 17591 | supports single-precision arithmetic. |
| 17592 | .IP "\fB\-m4\-single\fR" 4 |
| 17593 | .IX Item "-m4-single" |
| 17594 | Generate code for the \s-1SH4\s0 assuming the floating-point unit is in |
| 17595 | single-precision mode by default. |
| 17596 | .IP "\fB\-m4\fR" 4 |
| 17597 | .IX Item "-m4" |
| 17598 | Generate code for the \s-1SH4\s0. |
| 17599 | .IP "\fB\-m4a\-nofpu\fR" 4 |
| 17600 | .IX Item "-m4a-nofpu" |
| 17601 | Generate code for the SH4al\-dsp, or for a SH4a in such a way that the |
| 17602 | floating-point unit is not used. |
| 17603 | .IP "\fB\-m4a\-single\-only\fR" 4 |
| 17604 | .IX Item "-m4a-single-only" |
| 17605 | Generate code for the SH4a, in such a way that no double-precision |
| 17606 | floating-point operations are used. |
| 17607 | .IP "\fB\-m4a\-single\fR" 4 |
| 17608 | .IX Item "-m4a-single" |
| 17609 | Generate code for the SH4a assuming the floating-point unit is in |
| 17610 | single-precision mode by default. |
| 17611 | .IP "\fB\-m4a\fR" 4 |
| 17612 | .IX Item "-m4a" |
| 17613 | Generate code for the SH4a. |
| 17614 | .IP "\fB\-m4al\fR" 4 |
| 17615 | .IX Item "-m4al" |
| 17616 | Same as \fB\-m4a\-nofpu\fR, except that it implicitly passes |
| 17617 | \&\fB\-dsp\fR to the assembler. \s-1GCC\s0 doesn't generate any \s-1DSP\s0 |
| 17618 | instructions at the moment. |
| 17619 | .IP "\fB\-mb\fR" 4 |
| 17620 | .IX Item "-mb" |
| 17621 | Compile code for the processor in big-endian mode. |
| 17622 | .IP "\fB\-ml\fR" 4 |
| 17623 | .IX Item "-ml" |
| 17624 | Compile code for the processor in little-endian mode. |
| 17625 | .IP "\fB\-mdalign\fR" 4 |
| 17626 | .IX Item "-mdalign" |
| 17627 | Align doubles at 64\-bit boundaries. Note that this changes the calling |
| 17628 | conventions, and thus some functions from the standard C library do |
| 17629 | not work unless you recompile it first with \fB\-mdalign\fR. |
| 17630 | .IP "\fB\-mrelax\fR" 4 |
| 17631 | .IX Item "-mrelax" |
| 17632 | Shorten some address references at link time, when possible; uses the |
| 17633 | linker option \fB\-relax\fR. |
| 17634 | .IP "\fB\-mbigtable\fR" 4 |
| 17635 | .IX Item "-mbigtable" |
| 17636 | Use 32\-bit offsets in \f(CW\*(C`switch\*(C'\fR tables. The default is to use |
| 17637 | 16\-bit offsets. |
| 17638 | .IP "\fB\-mbitops\fR" 4 |
| 17639 | .IX Item "-mbitops" |
| 17640 | Enable the use of bit manipulation instructions on \s-1SH2A\s0. |
| 17641 | .IP "\fB\-mfmovd\fR" 4 |
| 17642 | .IX Item "-mfmovd" |
| 17643 | Enable the use of the instruction \f(CW\*(C`fmovd\*(C'\fR. Check \fB\-mdalign\fR for |
| 17644 | alignment constraints. |
| 17645 | .IP "\fB\-mhitachi\fR" 4 |
| 17646 | .IX Item "-mhitachi" |
| 17647 | Comply with the calling conventions defined by Renesas. |
| 17648 | .IP "\fB\-mrenesas\fR" 4 |
| 17649 | .IX Item "-mrenesas" |
| 17650 | Comply with the calling conventions defined by Renesas. |
| 17651 | .IP "\fB\-mno\-renesas\fR" 4 |
| 17652 | .IX Item "-mno-renesas" |
| 17653 | Comply with the calling conventions defined for \s-1GCC\s0 before the Renesas |
| 17654 | conventions were available. This option is the default for all |
| 17655 | targets of the \s-1SH\s0 toolchain. |
| 17656 | .IP "\fB\-mnomacsave\fR" 4 |
| 17657 | .IX Item "-mnomacsave" |
| 17658 | Mark the \f(CW\*(C`MAC\*(C'\fR register as call-clobbered, even if |
| 17659 | \&\fB\-mhitachi\fR is given. |
| 17660 | .IP "\fB\-mieee\fR" 4 |
| 17661 | .IX Item "-mieee" |
| 17662 | .PD 0 |
| 17663 | .IP "\fB\-mno\-ieee\fR" 4 |
| 17664 | .IX Item "-mno-ieee" |
| 17665 | .PD |
| 17666 | Control the \s-1IEEE\s0 compliance of floating-point comparisons, which affects the |
| 17667 | handling of cases where the result of a comparison is unordered. By default |
| 17668 | \&\fB\-mieee\fR is implicitly enabled. If \fB\-ffinite\-math\-only\fR is |
| 17669 | enabled \fB\-mno\-ieee\fR is implicitly set, which results in faster |
| 17670 | floating-point greater-equal and less-equal comparisons. The implcit settings |
| 17671 | can be overridden by specifying either \fB\-mieee\fR or \fB\-mno\-ieee\fR. |
| 17672 | .IP "\fB\-minline\-ic_invalidate\fR" 4 |
| 17673 | .IX Item "-minline-ic_invalidate" |
| 17674 | Inline code to invalidate instruction cache entries after setting up |
| 17675 | nested function trampolines. |
| 17676 | This option has no effect if \fB\-musermode\fR is in effect and the selected |
| 17677 | code generation option (e.g. \fB\-m4\fR) does not allow the use of the \f(CW\*(C`icbi\*(C'\fR |
| 17678 | instruction. |
| 17679 | If the selected code generation option does not allow the use of the \f(CW\*(C`icbi\*(C'\fR |
| 17680 | instruction, and \fB\-musermode\fR is not in effect, the inlined code |
| 17681 | manipulates the instruction cache address array directly with an associative |
| 17682 | write. This not only requires privileged mode at run time, but it also |
| 17683 | fails if the cache line had been mapped via the \s-1TLB\s0 and has become unmapped. |
| 17684 | .IP "\fB\-misize\fR" 4 |
| 17685 | .IX Item "-misize" |
| 17686 | Dump instruction size and location in the assembly code. |
| 17687 | .IP "\fB\-mpadstruct\fR" 4 |
| 17688 | .IX Item "-mpadstruct" |
| 17689 | This option is deprecated. It pads structures to multiple of 4 bytes, |
| 17690 | which is incompatible with the \s-1SH\s0 \s-1ABI\s0. |
| 17691 | .IP "\fB\-matomic\-model=\fR\fImodel\fR" 4 |
| 17692 | .IX Item "-matomic-model=model" |
| 17693 | Sets the model of atomic operations and additional parameters as a comma |
| 17694 | separated list. For details on the atomic built-in functions see |
| 17695 | \&\fB_\|_atomic Builtins\fR. The following models and parameters are supported: |
| 17696 | .RS 4 |
| 17697 | .IP "\fBnone\fR" 4 |
| 17698 | .IX Item "none" |
| 17699 | Disable compiler generated atomic sequences and emit library calls for atomic |
| 17700 | operations. This is the default if the target is not \f(CW\*(C`sh\-*\-linux*\*(C'\fR. |
| 17701 | .IP "\fBsoft-gusa\fR" 4 |
| 17702 | .IX Item "soft-gusa" |
| 17703 | Generate GNU/Linux compatible gUSA software atomic sequences for the atomic |
| 17704 | built-in functions. The generated atomic sequences require additional support |
| 17705 | from the interrupt/exception handling code of the system and are only suitable |
| 17706 | for SH3* and SH4* single-core systems. This option is enabled by default when |
| 17707 | the target is \f(CW\*(C`sh\-*\-linux*\*(C'\fR and SH3* or SH4*. When the target is \s-1SH4A\s0, |
| 17708 | this option will also partially utilize the hardware atomic instructions |
| 17709 | \&\f(CW\*(C`movli.l\*(C'\fR and \f(CW\*(C`movco.l\*(C'\fR to create more efficient code, unless |
| 17710 | \&\fBstrict\fR is specified. |
| 17711 | .IP "\fBsoft-tcb\fR" 4 |
| 17712 | .IX Item "soft-tcb" |
| 17713 | Generate software atomic sequences that use a variable in the thread control |
| 17714 | block. This is a variation of the gUSA sequences which can also be used on |
| 17715 | SH1* and SH2* targets. The generated atomic sequences require additional |
| 17716 | support from the interrupt/exception handling code of the system and are only |
| 17717 | suitable for single-core systems. When using this model, the \fBgbr\-offset=\fR |
| 17718 | parameter has to be specified as well. |
| 17719 | .IP "\fBsoft-imask\fR" 4 |
| 17720 | .IX Item "soft-imask" |
| 17721 | Generate software atomic sequences that temporarily disable interrupts by |
| 17722 | setting \f(CW\*(C`SR.IMASK = 1111\*(C'\fR. This model works only when the program runs |
| 17723 | in privileged mode and is only suitable for single-core systems. Additional |
| 17724 | support from the interrupt/exception handling code of the system is not |
| 17725 | required. This model is enabled by default when the target is |
| 17726 | \&\f(CW\*(C`sh\-*\-linux*\*(C'\fR and SH1* or SH2*. |
| 17727 | .IP "\fBhard-llcs\fR" 4 |
| 17728 | .IX Item "hard-llcs" |
| 17729 | Generate hardware atomic sequences using the \f(CW\*(C`movli.l\*(C'\fR and \f(CW\*(C`movco.l\*(C'\fR |
| 17730 | instructions only. This is only available on \s-1SH4A\s0 and is suitable for |
| 17731 | multi-core systems. Since the hardware instructions support only 32 bit atomic |
| 17732 | variables access to 8 or 16 bit variables is emulated with 32 bit accesses. |
| 17733 | Code compiled with this option will also be compatible with other software |
| 17734 | atomic model interrupt/exception handling systems if executed on an \s-1SH4A\s0 |
| 17735 | system. Additional support from the interrupt/exception handling code of the |
| 17736 | system is not required for this model. |
| 17737 | .IP "\fBgbr\-offset=\fR" 4 |
| 17738 | .IX Item "gbr-offset=" |
| 17739 | This parameter specifies the offset in bytes of the variable in the thread |
| 17740 | control block structure that should be used by the generated atomic sequences |
| 17741 | when the \fBsoft-tcb\fR model has been selected. For other models this |
| 17742 | parameter is ignored. The specified value must be an integer multiple of four |
| 17743 | and in the range 0\-1020. |
| 17744 | .IP "\fBstrict\fR" 4 |
| 17745 | .IX Item "strict" |
| 17746 | This parameter prevents mixed usage of multiple atomic models, even though they |
| 17747 | would be compatible, and will make the compiler generate atomic sequences of the |
| 17748 | specified model only. |
| 17749 | .RE |
| 17750 | .RS 4 |
| 17751 | .RE |
| 17752 | .IP "\fB\-mtas\fR" 4 |
| 17753 | .IX Item "-mtas" |
| 17754 | Generate the \f(CW\*(C`tas.b\*(C'\fR opcode for \f(CW\*(C`_\|_atomic_test_and_set\*(C'\fR. |
| 17755 | Notice that depending on the particular hardware and software configuration |
| 17756 | this can degrade overall performance due to the operand cache line flushes |
| 17757 | that are implied by the \f(CW\*(C`tas.b\*(C'\fR instruction. On multi-core \s-1SH4A\s0 |
| 17758 | processors the \f(CW\*(C`tas.b\*(C'\fR instruction must be used with caution since it |
| 17759 | can result in data corruption for certain cache configurations. |
| 17760 | .IP "\fB\-mspace\fR" 4 |
| 17761 | .IX Item "-mspace" |
| 17762 | Optimize for space instead of speed. Implied by \fB\-Os\fR. |
| 17763 | .IP "\fB\-mprefergot\fR" 4 |
| 17764 | .IX Item "-mprefergot" |
| 17765 | When generating position-independent code, emit function calls using |
| 17766 | the Global Offset Table instead of the Procedure Linkage Table. |
| 17767 | .IP "\fB\-musermode\fR" 4 |
| 17768 | .IX Item "-musermode" |
| 17769 | Don't generate privileged mode only code. This option |
| 17770 | implies \fB\-mno\-inline\-ic_invalidate\fR |
| 17771 | if the inlined code would not work in user mode. |
| 17772 | This is the default when the target is \f(CW\*(C`sh\-*\-linux*\*(C'\fR. |
| 17773 | .IP "\fB\-multcost=\fR\fInumber\fR" 4 |
| 17774 | .IX Item "-multcost=number" |
| 17775 | Set the cost to assume for a multiply insn. |
| 17776 | .IP "\fB\-mdiv=\fR\fIstrategy\fR" 4 |
| 17777 | .IX Item "-mdiv=strategy" |
| 17778 | Set the division strategy to be used for integer division operations. |
| 17779 | For SHmedia \fIstrategy\fR can be one of: |
| 17780 | .RS 4 |
| 17781 | .IP "\fBfp\fR" 4 |
| 17782 | .IX Item "fp" |
| 17783 | Performs the operation in floating point. This has a very high latency, |
| 17784 | but needs only a few instructions, so it might be a good choice if |
| 17785 | your code has enough easily-exploitable \s-1ILP\s0 to allow the compiler to |
| 17786 | schedule the floating-point instructions together with other instructions. |
| 17787 | Division by zero causes a floating-point exception. |
| 17788 | .IP "\fBinv\fR" 4 |
| 17789 | .IX Item "inv" |
| 17790 | Uses integer operations to calculate the inverse of the divisor, |
| 17791 | and then multiplies the dividend with the inverse. This strategy allows |
| 17792 | \&\s-1CSE\s0 and hoisting of the inverse calculation. Division by zero calculates |
| 17793 | an unspecified result, but does not trap. |
| 17794 | .IP "\fBinv:minlat\fR" 4 |
| 17795 | .IX Item "inv:minlat" |
| 17796 | A variant of \fBinv\fR where, if no \s-1CSE\s0 or hoisting opportunities |
| 17797 | have been found, or if the entire operation has been hoisted to the same |
| 17798 | place, the last stages of the inverse calculation are intertwined with the |
| 17799 | final multiply to reduce the overall latency, at the expense of using a few |
| 17800 | more instructions, and thus offering fewer scheduling opportunities with |
| 17801 | other code. |
| 17802 | .IP "\fBcall\fR" 4 |
| 17803 | .IX Item "call" |
| 17804 | Calls a library function that usually implements the \fBinv:minlat\fR |
| 17805 | strategy. |
| 17806 | This gives high code density for \f(CW\*(C`m5\-*media\-nofpu\*(C'\fR compilations. |
| 17807 | .IP "\fBcall2\fR" 4 |
| 17808 | .IX Item "call2" |
| 17809 | Uses a different entry point of the same library function, where it |
| 17810 | assumes that a pointer to a lookup table has already been set up, which |
| 17811 | exposes the pointer load to \s-1CSE\s0 and code hoisting optimizations. |
| 17812 | .IP "\fBinv:call\fR" 4 |
| 17813 | .IX Item "inv:call" |
| 17814 | .PD 0 |
| 17815 | .IP "\fBinv:call2\fR" 4 |
| 17816 | .IX Item "inv:call2" |
| 17817 | .IP "\fBinv:fp\fR" 4 |
| 17818 | .IX Item "inv:fp" |
| 17819 | .PD |
| 17820 | Use the \fBinv\fR algorithm for initial |
| 17821 | code generation, but if the code stays unoptimized, revert to the \fBcall\fR, |
| 17822 | \&\fBcall2\fR, or \fBfp\fR strategies, respectively. Note that the |
| 17823 | potentially-trapping side effect of division by zero is carried by a |
| 17824 | separate instruction, so it is possible that all the integer instructions |
| 17825 | are hoisted out, but the marker for the side effect stays where it is. |
| 17826 | A recombination to floating-point operations or a call is not possible |
| 17827 | in that case. |
| 17828 | .IP "\fBinv20u\fR" 4 |
| 17829 | .IX Item "inv20u" |
| 17830 | .PD 0 |
| 17831 | .IP "\fBinv20l\fR" 4 |
| 17832 | .IX Item "inv20l" |
| 17833 | .PD |
| 17834 | Variants of the \fBinv:minlat\fR strategy. In the case |
| 17835 | that the inverse calculation is not separated from the multiply, they speed |
| 17836 | up division where the dividend fits into 20 bits (plus sign where applicable) |
| 17837 | by inserting a test to skip a number of operations in this case; this test |
| 17838 | slows down the case of larger dividends. \fBinv20u\fR assumes the case of a such |
| 17839 | a small dividend to be unlikely, and \fBinv20l\fR assumes it to be likely. |
| 17840 | .RE |
| 17841 | .RS 4 |
| 17842 | .Sp |
| 17843 | For targets other than SHmedia \fIstrategy\fR can be one of: |
| 17844 | .IP "\fBcall\-div1\fR" 4 |
| 17845 | .IX Item "call-div1" |
| 17846 | Calls a library function that uses the single-step division instruction |
| 17847 | \&\f(CW\*(C`div1\*(C'\fR to perform the operation. Division by zero calculates an |
| 17848 | unspecified result and does not trap. This is the default except for \s-1SH4\s0, |
| 17849 | \&\s-1SH2A\s0 and SHcompact. |
| 17850 | .IP "\fBcall-fp\fR" 4 |
| 17851 | .IX Item "call-fp" |
| 17852 | Calls a library function that performs the operation in double precision |
| 17853 | floating point. Division by zero causes a floating-point exception. This is |
| 17854 | the default for SHcompact with \s-1FPU\s0. Specifying this for targets that do not |
| 17855 | have a double precision \s-1FPU\s0 will default to \f(CW\*(C`call\-div1\*(C'\fR. |
| 17856 | .IP "\fBcall-table\fR" 4 |
| 17857 | .IX Item "call-table" |
| 17858 | Calls a library function that uses a lookup table for small divisors and |
| 17859 | the \f(CW\*(C`div1\*(C'\fR instruction with case distinction for larger divisors. Division |
| 17860 | by zero calculates an unspecified result and does not trap. This is the default |
| 17861 | for \s-1SH4\s0. Specifying this for targets that do not have dynamic shift |
| 17862 | instructions will default to \f(CW\*(C`call\-div1\*(C'\fR. |
| 17863 | .RE |
| 17864 | .RS 4 |
| 17865 | .Sp |
| 17866 | When a division strategy has not been specified the default strategy will be |
| 17867 | selected based on the current target. For \s-1SH2A\s0 the default strategy is to |
| 17868 | use the \f(CW\*(C`divs\*(C'\fR and \f(CW\*(C`divu\*(C'\fR instructions instead of library function |
| 17869 | calls. |
| 17870 | .RE |
| 17871 | .IP "\fB\-maccumulate\-outgoing\-args\fR" 4 |
| 17872 | .IX Item "-maccumulate-outgoing-args" |
| 17873 | Reserve space once for outgoing arguments in the function prologue rather |
| 17874 | than around each call. Generally beneficial for performance and size. Also |
| 17875 | needed for unwinding to avoid changing the stack frame around conditional code. |
| 17876 | .IP "\fB\-mdivsi3_libfunc=\fR\fIname\fR" 4 |
| 17877 | .IX Item "-mdivsi3_libfunc=name" |
| 17878 | Set the name of the library function used for 32\-bit signed division to |
| 17879 | \&\fIname\fR. |
| 17880 | This only affects the name used in the \fBcall\fR and \fBinv:call\fR |
| 17881 | division strategies, and the compiler still expects the same |
| 17882 | sets of input/output/clobbered registers as if this option were not present. |
| 17883 | .IP "\fB\-mfixed\-range=\fR\fIregister-range\fR" 4 |
| 17884 | .IX Item "-mfixed-range=register-range" |
| 17885 | Generate code treating the given register range as fixed registers. |
| 17886 | A fixed register is one that the register allocator can not use. This is |
| 17887 | useful when compiling kernel code. A register range is specified as |
| 17888 | two registers separated by a dash. Multiple register ranges can be |
| 17889 | specified separated by a comma. |
| 17890 | .IP "\fB\-mindexed\-addressing\fR" 4 |
| 17891 | .IX Item "-mindexed-addressing" |
| 17892 | Enable the use of the indexed addressing mode for SHmedia32/SHcompact. |
| 17893 | This is only safe if the hardware and/or \s-1OS\s0 implement 32\-bit wrap-around |
| 17894 | semantics for the indexed addressing mode. The architecture allows the |
| 17895 | implementation of processors with 64\-bit \s-1MMU\s0, which the \s-1OS\s0 could use to |
| 17896 | get 32\-bit addressing, but since no current hardware implementation supports |
| 17897 | this or any other way to make the indexed addressing mode safe to use in |
| 17898 | the 32\-bit \s-1ABI\s0, the default is \fB\-mno\-indexed\-addressing\fR. |
| 17899 | .IP "\fB\-mgettrcost=\fR\fInumber\fR" 4 |
| 17900 | .IX Item "-mgettrcost=number" |
| 17901 | Set the cost assumed for the \f(CW\*(C`gettr\*(C'\fR instruction to \fInumber\fR. |
| 17902 | The default is 2 if \fB\-mpt\-fixed\fR is in effect, 100 otherwise. |
| 17903 | .IP "\fB\-mpt\-fixed\fR" 4 |
| 17904 | .IX Item "-mpt-fixed" |
| 17905 | Assume \f(CW\*(C`pt*\*(C'\fR instructions won't trap. This generally generates |
| 17906 | better-scheduled code, but is unsafe on current hardware. |
| 17907 | The current architecture |
| 17908 | definition says that \f(CW\*(C`ptabs\*(C'\fR and \f(CW\*(C`ptrel\*(C'\fR trap when the target |
| 17909 | anded with 3 is 3. |
| 17910 | This has the unintentional effect of making it unsafe to schedule these |
| 17911 | instructions before a branch, or hoist them out of a loop. For example, |
| 17912 | \&\f(CW\*(C`_\|_do_global_ctors\*(C'\fR, a part of \fIlibgcc\fR |
| 17913 | that runs constructors at program |
| 17914 | startup, calls functions in a list which is delimited by \-1. With the |
| 17915 | \&\fB\-mpt\-fixed\fR option, the \f(CW\*(C`ptabs\*(C'\fR is done before testing against \-1. |
| 17916 | That means that all the constructors run a bit more quickly, but when |
| 17917 | the loop comes to the end of the list, the program crashes because \f(CW\*(C`ptabs\*(C'\fR |
| 17918 | loads \-1 into a target register. |
| 17919 | .Sp |
| 17920 | Since this option is unsafe for any |
| 17921 | hardware implementing the current architecture specification, the default |
| 17922 | is \fB\-mno\-pt\-fixed\fR. Unless specified explicitly with |
| 17923 | \&\fB\-mgettrcost\fR, \fB\-mno\-pt\-fixed\fR also implies \fB\-mgettrcost=100\fR; |
| 17924 | this deters register allocation from using target registers for storing |
| 17925 | ordinary integers. |
| 17926 | .IP "\fB\-minvalid\-symbols\fR" 4 |
| 17927 | .IX Item "-minvalid-symbols" |
| 17928 | Assume symbols might be invalid. Ordinary function symbols generated by |
| 17929 | the compiler are always valid to load with |
| 17930 | \&\f(CW\*(C`movi\*(C'\fR/\f(CW\*(C`shori\*(C'\fR/\f(CW\*(C`ptabs\*(C'\fR or |
| 17931 | \&\f(CW\*(C`movi\*(C'\fR/\f(CW\*(C`shori\*(C'\fR/\f(CW\*(C`ptrel\*(C'\fR, |
| 17932 | but with assembler and/or linker tricks it is possible |
| 17933 | to generate symbols that cause \f(CW\*(C`ptabs\*(C'\fR or \f(CW\*(C`ptrel\*(C'\fR to trap. |
| 17934 | This option is only meaningful when \fB\-mno\-pt\-fixed\fR is in effect. |
| 17935 | It prevents cross-basic-block \s-1CSE\s0, hoisting and most scheduling |
| 17936 | of symbol loads. The default is \fB\-mno\-invalid\-symbols\fR. |
| 17937 | .IP "\fB\-mbranch\-cost=\fR\fInum\fR" 4 |
| 17938 | .IX Item "-mbranch-cost=num" |
| 17939 | Assume \fInum\fR to be the cost for a branch instruction. Higher numbers |
| 17940 | make the compiler try to generate more branch-free code if possible. |
| 17941 | If not specified the value is selected depending on the processor type that |
| 17942 | is being compiled for. |
| 17943 | .IP "\fB\-mzdcbranch\fR" 4 |
| 17944 | .IX Item "-mzdcbranch" |
| 17945 | .PD 0 |
| 17946 | .IP "\fB\-mno\-zdcbranch\fR" 4 |
| 17947 | .IX Item "-mno-zdcbranch" |
| 17948 | .PD |
| 17949 | Assume (do not assume) that zero displacement conditional branch instructions |
| 17950 | \&\f(CW\*(C`bt\*(C'\fR and \f(CW\*(C`bf\*(C'\fR are fast. If \fB\-mzdcbranch\fR is specified, the |
| 17951 | compiler will try to prefer zero displacement branch code sequences. This is |
| 17952 | enabled by default when generating code for \s-1SH4\s0 and \s-1SH4A\s0. It can be explicitly |
| 17953 | disabled by specifying \fB\-mno\-zdcbranch\fR. |
| 17954 | .IP "\fB\-mcbranchdi\fR" 4 |
| 17955 | .IX Item "-mcbranchdi" |
| 17956 | Enable the \f(CW\*(C`cbranchdi4\*(C'\fR instruction pattern. |
| 17957 | .IP "\fB\-mcmpeqdi\fR" 4 |
| 17958 | .IX Item "-mcmpeqdi" |
| 17959 | Emit the \f(CW\*(C`cmpeqdi_t\*(C'\fR instruction pattern even when \fB\-mcbranchdi\fR |
| 17960 | is in effect. |
| 17961 | .IP "\fB\-mfused\-madd\fR" 4 |
| 17962 | .IX Item "-mfused-madd" |
| 17963 | .PD 0 |
| 17964 | .IP "\fB\-mno\-fused\-madd\fR" 4 |
| 17965 | .IX Item "-mno-fused-madd" |
| 17966 | .PD |
| 17967 | Generate code that uses (does not use) the floating-point multiply and |
| 17968 | accumulate instructions. These instructions are generated by default |
| 17969 | if hardware floating point is used. The machine-dependent |
| 17970 | \&\fB\-mfused\-madd\fR option is now mapped to the machine-independent |
| 17971 | \&\fB\-ffp\-contract=fast\fR option, and \fB\-mno\-fused\-madd\fR is |
| 17972 | mapped to \fB\-ffp\-contract=off\fR. |
| 17973 | .IP "\fB\-mfsca\fR" 4 |
| 17974 | .IX Item "-mfsca" |
| 17975 | .PD 0 |
| 17976 | .IP "\fB\-mno\-fsca\fR" 4 |
| 17977 | .IX Item "-mno-fsca" |
| 17978 | .PD |
| 17979 | Allow or disallow the compiler to emit the \f(CW\*(C`fsca\*(C'\fR instruction for sine |
| 17980 | and cosine approximations. The option \f(CW\*(C`\-mfsca\*(C'\fR must be used in |
| 17981 | combination with \f(CW\*(C`\-funsafe\-math\-optimizations\*(C'\fR. It is enabled by default |
| 17982 | when generating code for \s-1SH4A\s0. Using \f(CW\*(C`\-mno\-fsca\*(C'\fR disables sine and cosine |
| 17983 | approximations even if \f(CW\*(C`\-funsafe\-math\-optimizations\*(C'\fR is in effect. |
| 17984 | .IP "\fB\-mfsrra\fR" 4 |
| 17985 | .IX Item "-mfsrra" |
| 17986 | .PD 0 |
| 17987 | .IP "\fB\-mno\-fsrra\fR" 4 |
| 17988 | .IX Item "-mno-fsrra" |
| 17989 | .PD |
| 17990 | Allow or disallow the compiler to emit the \f(CW\*(C`fsrra\*(C'\fR instruction for |
| 17991 | reciprocal square root approximations. The option \f(CW\*(C`\-mfsrra\*(C'\fR must be used |
| 17992 | in combination with \f(CW\*(C`\-funsafe\-math\-optimizations\*(C'\fR and |
| 17993 | \&\f(CW\*(C`\-ffinite\-math\-only\*(C'\fR. It is enabled by default when generating code for |
| 17994 | \&\s-1SH4A\s0. Using \f(CW\*(C`\-mno\-fsrra\*(C'\fR disables reciprocal square root approximations |
| 17995 | even if \f(CW\*(C`\-funsafe\-math\-optimizations\*(C'\fR and \f(CW\*(C`\-ffinite\-math\-only\*(C'\fR are |
| 17996 | in effect. |
| 17997 | .IP "\fB\-mpretend\-cmove\fR" 4 |
| 17998 | .IX Item "-mpretend-cmove" |
| 17999 | Prefer zero-displacement conditional branches for conditional move instruction |
| 18000 | patterns. This can result in faster code on the \s-1SH4\s0 processor. |
| 18001 | .PP |
| 18002 | \fISolaris 2 Options\fR |
| 18003 | .IX Subsection "Solaris 2 Options" |
| 18004 | .PP |
| 18005 | These \fB\-m\fR options are supported on Solaris 2: |
| 18006 | .IP "\fB\-mimpure\-text\fR" 4 |
| 18007 | .IX Item "-mimpure-text" |
| 18008 | \&\fB\-mimpure\-text\fR, used in addition to \fB\-shared\fR, tells |
| 18009 | the compiler to not pass \fB\-z text\fR to the linker when linking a |
| 18010 | shared object. Using this option, you can link position-dependent |
| 18011 | code into a shared object. |
| 18012 | .Sp |
| 18013 | \&\fB\-mimpure\-text\fR suppresses the \*(L"relocations remain against |
| 18014 | allocatable but non-writable sections\*(R" linker error message. |
| 18015 | However, the necessary relocations trigger copy-on-write, and the |
| 18016 | shared object is not actually shared across processes. Instead of |
| 18017 | using \fB\-mimpure\-text\fR, you should compile all source code with |
| 18018 | \&\fB\-fpic\fR or \fB\-fPIC\fR. |
| 18019 | .PP |
| 18020 | These switches are supported in addition to the above on Solaris 2: |
| 18021 | .IP "\fB\-pthreads\fR" 4 |
| 18022 | .IX Item "-pthreads" |
| 18023 | Add support for multithreading using the \s-1POSIX\s0 threads library. This |
| 18024 | option sets flags for both the preprocessor and linker. This option does |
| 18025 | not affect the thread safety of object code produced by the compiler or |
| 18026 | that of libraries supplied with it. |
| 18027 | .IP "\fB\-pthread\fR" 4 |
| 18028 | .IX Item "-pthread" |
| 18029 | This is a synonym for \fB\-pthreads\fR. |
| 18030 | .PP |
| 18031 | \fI\s-1SPARC\s0 Options\fR |
| 18032 | .IX Subsection "SPARC Options" |
| 18033 | .PP |
| 18034 | These \fB\-m\fR options are supported on the \s-1SPARC:\s0 |
| 18035 | .IP "\fB\-mno\-app\-regs\fR" 4 |
| 18036 | .IX Item "-mno-app-regs" |
| 18037 | .PD 0 |
| 18038 | .IP "\fB\-mapp\-regs\fR" 4 |
| 18039 | .IX Item "-mapp-regs" |
| 18040 | .PD |
| 18041 | Specify \fB\-mapp\-regs\fR to generate output using the global registers |
| 18042 | 2 through 4, which the \s-1SPARC\s0 \s-1SVR4\s0 \s-1ABI\s0 reserves for applications. This |
| 18043 | is the default. |
| 18044 | .Sp |
| 18045 | To be fully \s-1SVR4\s0 ABI-compliant at the cost of some performance loss, |
| 18046 | specify \fB\-mno\-app\-regs\fR. You should compile libraries and system |
| 18047 | software with this option. |
| 18048 | .IP "\fB\-mflat\fR" 4 |
| 18049 | .IX Item "-mflat" |
| 18050 | .PD 0 |
| 18051 | .IP "\fB\-mno\-flat\fR" 4 |
| 18052 | .IX Item "-mno-flat" |
| 18053 | .PD |
| 18054 | With \fB\-mflat\fR, the compiler does not generate save/restore instructions |
| 18055 | and uses a \*(L"flat\*(R" or single register window model. This model is compatible |
| 18056 | with the regular register window model. The local registers and the input |
| 18057 | registers (0\-\-5) are still treated as \*(L"call-saved\*(R" registers and are |
| 18058 | saved on the stack as needed. |
| 18059 | .Sp |
| 18060 | With \fB\-mno\-flat\fR (the default), the compiler generates save/restore |
| 18061 | instructions (except for leaf functions). This is the normal operating mode. |
| 18062 | .IP "\fB\-mfpu\fR" 4 |
| 18063 | .IX Item "-mfpu" |
| 18064 | .PD 0 |
| 18065 | .IP "\fB\-mhard\-float\fR" 4 |
| 18066 | .IX Item "-mhard-float" |
| 18067 | .PD |
| 18068 | Generate output containing floating-point instructions. This is the |
| 18069 | default. |
| 18070 | .IP "\fB\-mno\-fpu\fR" 4 |
| 18071 | .IX Item "-mno-fpu" |
| 18072 | .PD 0 |
| 18073 | .IP "\fB\-msoft\-float\fR" 4 |
| 18074 | .IX Item "-msoft-float" |
| 18075 | .PD |
| 18076 | Generate output containing library calls for floating point. |
| 18077 | \&\fBWarning:\fR the requisite libraries are not available for all \s-1SPARC\s0 |
| 18078 | targets. Normally the facilities of the machine's usual C compiler are |
| 18079 | used, but this cannot be done directly in cross-compilation. You must make |
| 18080 | your own arrangements to provide suitable library functions for |
| 18081 | cross-compilation. The embedded targets \fBsparc\-*\-aout\fR and |
| 18082 | \&\fBsparclite\-*\-*\fR do provide software floating-point support. |
| 18083 | .Sp |
| 18084 | \&\fB\-msoft\-float\fR changes the calling convention in the output file; |
| 18085 | therefore, it is only useful if you compile \fIall\fR of a program with |
| 18086 | this option. In particular, you need to compile \fIlibgcc.a\fR, the |
| 18087 | library that comes with \s-1GCC\s0, with \fB\-msoft\-float\fR in order for |
| 18088 | this to work. |
| 18089 | .IP "\fB\-mhard\-quad\-float\fR" 4 |
| 18090 | .IX Item "-mhard-quad-float" |
| 18091 | Generate output containing quad-word (long double) floating-point |
| 18092 | instructions. |
| 18093 | .IP "\fB\-msoft\-quad\-float\fR" 4 |
| 18094 | .IX Item "-msoft-quad-float" |
| 18095 | Generate output containing library calls for quad-word (long double) |
| 18096 | floating-point instructions. The functions called are those specified |
| 18097 | in the \s-1SPARC\s0 \s-1ABI\s0. This is the default. |
| 18098 | .Sp |
| 18099 | As of this writing, there are no \s-1SPARC\s0 implementations that have hardware |
| 18100 | support for the quad-word floating-point instructions. They all invoke |
| 18101 | a trap handler for one of these instructions, and then the trap handler |
| 18102 | emulates the effect of the instruction. Because of the trap handler overhead, |
| 18103 | this is much slower than calling the \s-1ABI\s0 library routines. Thus the |
| 18104 | \&\fB\-msoft\-quad\-float\fR option is the default. |
| 18105 | .IP "\fB\-mno\-unaligned\-doubles\fR" 4 |
| 18106 | .IX Item "-mno-unaligned-doubles" |
| 18107 | .PD 0 |
| 18108 | .IP "\fB\-munaligned\-doubles\fR" 4 |
| 18109 | .IX Item "-munaligned-doubles" |
| 18110 | .PD |
| 18111 | Assume that doubles have 8\-byte alignment. This is the default. |
| 18112 | .Sp |
| 18113 | With \fB\-munaligned\-doubles\fR, \s-1GCC\s0 assumes that doubles have 8\-byte |
| 18114 | alignment only if they are contained in another type, or if they have an |
| 18115 | absolute address. Otherwise, it assumes they have 4\-byte alignment. |
| 18116 | Specifying this option avoids some rare compatibility problems with code |
| 18117 | generated by other compilers. It is not the default because it results |
| 18118 | in a performance loss, especially for floating-point code. |
| 18119 | .IP "\fB\-mno\-faster\-structs\fR" 4 |
| 18120 | .IX Item "-mno-faster-structs" |
| 18121 | .PD 0 |
| 18122 | .IP "\fB\-mfaster\-structs\fR" 4 |
| 18123 | .IX Item "-mfaster-structs" |
| 18124 | .PD |
| 18125 | With \fB\-mfaster\-structs\fR, the compiler assumes that structures |
| 18126 | should have 8\-byte alignment. This enables the use of pairs of |
| 18127 | \&\f(CW\*(C`ldd\*(C'\fR and \f(CW\*(C`std\*(C'\fR instructions for copies in structure |
| 18128 | assignment, in place of twice as many \f(CW\*(C`ld\*(C'\fR and \f(CW\*(C`st\*(C'\fR pairs. |
| 18129 | However, the use of this changed alignment directly violates the \s-1SPARC\s0 |
| 18130 | \&\s-1ABI\s0. Thus, it's intended only for use on targets where the developer |
| 18131 | acknowledges that their resulting code is not directly in line with |
| 18132 | the rules of the \s-1ABI\s0. |
| 18133 | .IP "\fB\-mcpu=\fR\fIcpu_type\fR" 4 |
| 18134 | .IX Item "-mcpu=cpu_type" |
| 18135 | Set the instruction set, register set, and instruction scheduling parameters |
| 18136 | for machine type \fIcpu_type\fR. Supported values for \fIcpu_type\fR are |
| 18137 | \&\fBv7\fR, \fBcypress\fR, \fBv8\fR, \fBsupersparc\fR, \fBhypersparc\fR, |
| 18138 | \&\fBleon\fR, \fBsparclite\fR, \fBf930\fR, \fBf934\fR, \fBsparclite86x\fR, |
| 18139 | \&\fBsparclet\fR, \fBtsc701\fR, \fBv9\fR, \fBultrasparc\fR, |
| 18140 | \&\fBultrasparc3\fR, \fBniagara\fR, \fBniagara2\fR, \fBniagara3\fR, |
| 18141 | and \fBniagara4\fR. |
| 18142 | .Sp |
| 18143 | Native Solaris and GNU/Linux toolchains also support the value \fBnative\fR, |
| 18144 | which selects the best architecture option for the host processor. |
| 18145 | \&\fB\-mcpu=native\fR has no effect if \s-1GCC\s0 does not recognize |
| 18146 | the processor. |
| 18147 | .Sp |
| 18148 | Default instruction scheduling parameters are used for values that select |
| 18149 | an architecture and not an implementation. These are \fBv7\fR, \fBv8\fR, |
| 18150 | \&\fBsparclite\fR, \fBsparclet\fR, \fBv9\fR. |
| 18151 | .Sp |
| 18152 | Here is a list of each supported architecture and their supported |
| 18153 | implementations. |
| 18154 | .RS 4 |
| 18155 | .IP "v7" 4 |
| 18156 | .IX Item "v7" |
| 18157 | cypress |
| 18158 | .IP "v8" 4 |
| 18159 | .IX Item "v8" |
| 18160 | supersparc, hypersparc, leon |
| 18161 | .IP "sparclite" 4 |
| 18162 | .IX Item "sparclite" |
| 18163 | f930, f934, sparclite86x |
| 18164 | .IP "sparclet" 4 |
| 18165 | .IX Item "sparclet" |
| 18166 | tsc701 |
| 18167 | .IP "v9" 4 |
| 18168 | .IX Item "v9" |
| 18169 | ultrasparc, ultrasparc3, niagara, niagara2, niagara3, niagara4 |
| 18170 | .RE |
| 18171 | .RS 4 |
| 18172 | .Sp |
| 18173 | By default (unless configured otherwise), \s-1GCC\s0 generates code for the V7 |
| 18174 | variant of the \s-1SPARC\s0 architecture. With \fB\-mcpu=cypress\fR, the compiler |
| 18175 | additionally optimizes it for the Cypress \s-1CY7C602\s0 chip, as used in the |
| 18176 | SPARCStation/SPARCServer 3xx series. This is also appropriate for the older |
| 18177 | SPARCStation 1, 2, \s-1IPX\s0 etc. |
| 18178 | .Sp |
| 18179 | With \fB\-mcpu=v8\fR, \s-1GCC\s0 generates code for the V8 variant of the \s-1SPARC\s0 |
| 18180 | architecture. The only difference from V7 code is that the compiler emits |
| 18181 | the integer multiply and integer divide instructions which exist in \s-1SPARC\-V8\s0 |
| 18182 | but not in \s-1SPARC\-V7\s0. With \fB\-mcpu=supersparc\fR, the compiler additionally |
| 18183 | optimizes it for the SuperSPARC chip, as used in the SPARCStation 10, 1000 and |
| 18184 | 2000 series. |
| 18185 | .Sp |
| 18186 | With \fB\-mcpu=sparclite\fR, \s-1GCC\s0 generates code for the SPARClite variant of |
| 18187 | the \s-1SPARC\s0 architecture. This adds the integer multiply, integer divide step |
| 18188 | and scan (\f(CW\*(C`ffs\*(C'\fR) instructions which exist in SPARClite but not in \s-1SPARC\-V7\s0. |
| 18189 | With \fB\-mcpu=f930\fR, the compiler additionally optimizes it for the |
| 18190 | Fujitsu \s-1MB86930\s0 chip, which is the original SPARClite, with no \s-1FPU\s0. With |
| 18191 | \&\fB\-mcpu=f934\fR, the compiler additionally optimizes it for the Fujitsu |
| 18192 | \&\s-1MB86934\s0 chip, which is the more recent SPARClite with \s-1FPU\s0. |
| 18193 | .Sp |
| 18194 | With \fB\-mcpu=sparclet\fR, \s-1GCC\s0 generates code for the SPARClet variant of |
| 18195 | the \s-1SPARC\s0 architecture. This adds the integer multiply, multiply/accumulate, |
| 18196 | integer divide step and scan (\f(CW\*(C`ffs\*(C'\fR) instructions which exist in SPARClet |
| 18197 | but not in \s-1SPARC\-V7\s0. With \fB\-mcpu=tsc701\fR, the compiler additionally |
| 18198 | optimizes it for the \s-1TEMIC\s0 SPARClet chip. |
| 18199 | .Sp |
| 18200 | With \fB\-mcpu=v9\fR, \s-1GCC\s0 generates code for the V9 variant of the \s-1SPARC\s0 |
| 18201 | architecture. This adds 64\-bit integer and floating-point move instructions, |
| 18202 | 3 additional floating-point condition code registers and conditional move |
| 18203 | instructions. With \fB\-mcpu=ultrasparc\fR, the compiler additionally |
| 18204 | optimizes it for the Sun UltraSPARC I/II/IIi chips. With |
| 18205 | \&\fB\-mcpu=ultrasparc3\fR, the compiler additionally optimizes it for the |
| 18206 | Sun UltraSPARC III/III+/IIIi/IIIi+/IV/IV+ chips. With |
| 18207 | \&\fB\-mcpu=niagara\fR, the compiler additionally optimizes it for |
| 18208 | Sun UltraSPARC T1 chips. With \fB\-mcpu=niagara2\fR, the compiler |
| 18209 | additionally optimizes it for Sun UltraSPARC T2 chips. With |
| 18210 | \&\fB\-mcpu=niagara3\fR, the compiler additionally optimizes it for Sun |
| 18211 | UltraSPARC T3 chips. With \fB\-mcpu=niagara4\fR, the compiler |
| 18212 | additionally optimizes it for Sun UltraSPARC T4 chips. |
| 18213 | .RE |
| 18214 | .IP "\fB\-mtune=\fR\fIcpu_type\fR" 4 |
| 18215 | .IX Item "-mtune=cpu_type" |
| 18216 | Set the instruction scheduling parameters for machine type |
| 18217 | \&\fIcpu_type\fR, but do not set the instruction set or register set that the |
| 18218 | option \fB\-mcpu=\fR\fIcpu_type\fR does. |
| 18219 | .Sp |
| 18220 | The same values for \fB\-mcpu=\fR\fIcpu_type\fR can be used for |
| 18221 | \&\fB\-mtune=\fR\fIcpu_type\fR, but the only useful values are those |
| 18222 | that select a particular \s-1CPU\s0 implementation. Those are \fBcypress\fR, |
| 18223 | \&\fBsupersparc\fR, \fBhypersparc\fR, \fBleon\fR, \fBf930\fR, \fBf934\fR, |
| 18224 | \&\fBsparclite86x\fR, \fBtsc701\fR, \fBultrasparc\fR, \fBultrasparc3\fR, |
| 18225 | \&\fBniagara\fR, \fBniagara2\fR, \fBniagara3\fR and \fBniagara4\fR. With |
| 18226 | native Solaris and GNU/Linux toolchains, \fBnative\fR can also be used. |
| 18227 | .IP "\fB\-mv8plus\fR" 4 |
| 18228 | .IX Item "-mv8plus" |
| 18229 | .PD 0 |
| 18230 | .IP "\fB\-mno\-v8plus\fR" 4 |
| 18231 | .IX Item "-mno-v8plus" |
| 18232 | .PD |
| 18233 | With \fB\-mv8plus\fR, \s-1GCC\s0 generates code for the \s-1SPARC\-V8+\s0 \s-1ABI\s0. The |
| 18234 | difference from the V8 \s-1ABI\s0 is that the global and out registers are |
| 18235 | considered 64 bits wide. This is enabled by default on Solaris in 32\-bit |
| 18236 | mode for all \s-1SPARC\-V9\s0 processors. |
| 18237 | .IP "\fB\-mvis\fR" 4 |
| 18238 | .IX Item "-mvis" |
| 18239 | .PD 0 |
| 18240 | .IP "\fB\-mno\-vis\fR" 4 |
| 18241 | .IX Item "-mno-vis" |
| 18242 | .PD |
| 18243 | With \fB\-mvis\fR, \s-1GCC\s0 generates code that takes advantage of the UltraSPARC |
| 18244 | Visual Instruction Set extensions. The default is \fB\-mno\-vis\fR. |
| 18245 | .IP "\fB\-mvis2\fR" 4 |
| 18246 | .IX Item "-mvis2" |
| 18247 | .PD 0 |
| 18248 | .IP "\fB\-mno\-vis2\fR" 4 |
| 18249 | .IX Item "-mno-vis2" |
| 18250 | .PD |
| 18251 | With \fB\-mvis2\fR, \s-1GCC\s0 generates code that takes advantage of |
| 18252 | version 2.0 of the UltraSPARC Visual Instruction Set extensions. The |
| 18253 | default is \fB\-mvis2\fR when targeting a cpu that supports such |
| 18254 | instructions, such as UltraSPARC-III and later. Setting \fB\-mvis2\fR |
| 18255 | also sets \fB\-mvis\fR. |
| 18256 | .IP "\fB\-mvis3\fR" 4 |
| 18257 | .IX Item "-mvis3" |
| 18258 | .PD 0 |
| 18259 | .IP "\fB\-mno\-vis3\fR" 4 |
| 18260 | .IX Item "-mno-vis3" |
| 18261 | .PD |
| 18262 | With \fB\-mvis3\fR, \s-1GCC\s0 generates code that takes advantage of |
| 18263 | version 3.0 of the UltraSPARC Visual Instruction Set extensions. The |
| 18264 | default is \fB\-mvis3\fR when targeting a cpu that supports such |
| 18265 | instructions, such as niagara\-3 and later. Setting \fB\-mvis3\fR |
| 18266 | also sets \fB\-mvis2\fR and \fB\-mvis\fR. |
| 18267 | .IP "\fB\-mcbcond\fR" 4 |
| 18268 | .IX Item "-mcbcond" |
| 18269 | .PD 0 |
| 18270 | .IP "\fB\-mno\-cbcond\fR" 4 |
| 18271 | .IX Item "-mno-cbcond" |
| 18272 | .PD |
| 18273 | With \fB\-mcbcond\fR, \s-1GCC\s0 generates code that takes advantage of |
| 18274 | compare-and-branch instructions, as defined in the Sparc Architecture 2011. |
| 18275 | The default is \fB\-mcbcond\fR when targeting a cpu that supports such |
| 18276 | instructions, such as niagara\-4 and later. |
| 18277 | .IP "\fB\-mpopc\fR" 4 |
| 18278 | .IX Item "-mpopc" |
| 18279 | .PD 0 |
| 18280 | .IP "\fB\-mno\-popc\fR" 4 |
| 18281 | .IX Item "-mno-popc" |
| 18282 | .PD |
| 18283 | With \fB\-mpopc\fR, \s-1GCC\s0 generates code that takes advantage of the UltraSPARC |
| 18284 | population count instruction. The default is \fB\-mpopc\fR |
| 18285 | when targeting a cpu that supports such instructions, such as Niagara\-2 and |
| 18286 | later. |
| 18287 | .IP "\fB\-mfmaf\fR" 4 |
| 18288 | .IX Item "-mfmaf" |
| 18289 | .PD 0 |
| 18290 | .IP "\fB\-mno\-fmaf\fR" 4 |
| 18291 | .IX Item "-mno-fmaf" |
| 18292 | .PD |
| 18293 | With \fB\-mfmaf\fR, \s-1GCC\s0 generates code that takes advantage of the UltraSPARC |
| 18294 | Fused Multiply-Add Floating-point extensions. The default is \fB\-mfmaf\fR |
| 18295 | when targeting a cpu that supports such instructions, such as Niagara\-3 and |
| 18296 | later. |
| 18297 | .IP "\fB\-mfix\-at697f\fR" 4 |
| 18298 | .IX Item "-mfix-at697f" |
| 18299 | Enable the documented workaround for the single erratum of the Atmel \s-1AT697F\s0 |
| 18300 | processor (which corresponds to erratum #13 of the \s-1AT697E\s0 processor). |
| 18301 | .PP |
| 18302 | These \fB\-m\fR options are supported in addition to the above |
| 18303 | on \s-1SPARC\-V9\s0 processors in 64\-bit environments: |
| 18304 | .IP "\fB\-m32\fR" 4 |
| 18305 | .IX Item "-m32" |
| 18306 | .PD 0 |
| 18307 | .IP "\fB\-m64\fR" 4 |
| 18308 | .IX Item "-m64" |
| 18309 | .PD |
| 18310 | Generate code for a 32\-bit or 64\-bit environment. |
| 18311 | The 32\-bit environment sets int, long and pointer to 32 bits. |
| 18312 | The 64\-bit environment sets int to 32 bits and long and pointer |
| 18313 | to 64 bits. |
| 18314 | .IP "\fB\-mcmodel=\fR\fIwhich\fR" 4 |
| 18315 | .IX Item "-mcmodel=which" |
| 18316 | Set the code model to one of |
| 18317 | .RS 4 |
| 18318 | .IP "\fBmedlow\fR" 4 |
| 18319 | .IX Item "medlow" |
| 18320 | The Medium/Low code model: 64\-bit addresses, programs |
| 18321 | must be linked in the low 32 bits of memory. Programs can be statically |
| 18322 | or dynamically linked. |
| 18323 | .IP "\fBmedmid\fR" 4 |
| 18324 | .IX Item "medmid" |
| 18325 | The Medium/Middle code model: 64\-bit addresses, programs |
| 18326 | must be linked in the low 44 bits of memory, the text and data segments must |
| 18327 | be less than 2GB in size and the data segment must be located within 2GB of |
| 18328 | the text segment. |
| 18329 | .IP "\fBmedany\fR" 4 |
| 18330 | .IX Item "medany" |
| 18331 | The Medium/Anywhere code model: 64\-bit addresses, programs |
| 18332 | may be linked anywhere in memory, the text and data segments must be less |
| 18333 | than 2GB in size and the data segment must be located within 2GB of the |
| 18334 | text segment. |
| 18335 | .IP "\fBembmedany\fR" 4 |
| 18336 | .IX Item "embmedany" |
| 18337 | The Medium/Anywhere code model for embedded systems: |
| 18338 | 64\-bit addresses, the text and data segments must be less than 2GB in |
| 18339 | size, both starting anywhere in memory (determined at link time). The |
| 18340 | global register \f(CW%g4\fR points to the base of the data segment. Programs |
| 18341 | are statically linked and \s-1PIC\s0 is not supported. |
| 18342 | .RE |
| 18343 | .RS 4 |
| 18344 | .RE |
| 18345 | .IP "\fB\-mmemory\-model=\fR\fImem-model\fR" 4 |
| 18346 | .IX Item "-mmemory-model=mem-model" |
| 18347 | Set the memory model in force on the processor to one of |
| 18348 | .RS 4 |
| 18349 | .IP "\fBdefault\fR" 4 |
| 18350 | .IX Item "default" |
| 18351 | The default memory model for the processor and operating system. |
| 18352 | .IP "\fBrmo\fR" 4 |
| 18353 | .IX Item "rmo" |
| 18354 | Relaxed Memory Order |
| 18355 | .IP "\fBpso\fR" 4 |
| 18356 | .IX Item "pso" |
| 18357 | Partial Store Order |
| 18358 | .IP "\fBtso\fR" 4 |
| 18359 | .IX Item "tso" |
| 18360 | Total Store Order |
| 18361 | .IP "\fBsc\fR" 4 |
| 18362 | .IX Item "sc" |
| 18363 | Sequential Consistency |
| 18364 | .RE |
| 18365 | .RS 4 |
| 18366 | .Sp |
| 18367 | These memory models are formally defined in Appendix D of the Sparc V9 |
| 18368 | architecture manual, as set in the processor's \f(CW\*(C`PSTATE.MM\*(C'\fR field. |
| 18369 | .RE |
| 18370 | .IP "\fB\-mstack\-bias\fR" 4 |
| 18371 | .IX Item "-mstack-bias" |
| 18372 | .PD 0 |
| 18373 | .IP "\fB\-mno\-stack\-bias\fR" 4 |
| 18374 | .IX Item "-mno-stack-bias" |
| 18375 | .PD |
| 18376 | With \fB\-mstack\-bias\fR, \s-1GCC\s0 assumes that the stack pointer, and |
| 18377 | frame pointer if present, are offset by \-2047 which must be added back |
| 18378 | when making stack frame references. This is the default in 64\-bit mode. |
| 18379 | Otherwise, assume no such offset is present. |
| 18380 | .PP |
| 18381 | \fI\s-1SPU\s0 Options\fR |
| 18382 | .IX Subsection "SPU Options" |
| 18383 | .PP |
| 18384 | These \fB\-m\fR options are supported on the \s-1SPU:\s0 |
| 18385 | .IP "\fB\-mwarn\-reloc\fR" 4 |
| 18386 | .IX Item "-mwarn-reloc" |
| 18387 | .PD 0 |
| 18388 | .IP "\fB\-merror\-reloc\fR" 4 |
| 18389 | .IX Item "-merror-reloc" |
| 18390 | .PD |
| 18391 | The loader for \s-1SPU\s0 does not handle dynamic relocations. By default, \s-1GCC\s0 |
| 18392 | gives an error when it generates code that requires a dynamic |
| 18393 | relocation. \fB\-mno\-error\-reloc\fR disables the error, |
| 18394 | \&\fB\-mwarn\-reloc\fR generates a warning instead. |
| 18395 | .IP "\fB\-msafe\-dma\fR" 4 |
| 18396 | .IX Item "-msafe-dma" |
| 18397 | .PD 0 |
| 18398 | .IP "\fB\-munsafe\-dma\fR" 4 |
| 18399 | .IX Item "-munsafe-dma" |
| 18400 | .PD |
| 18401 | Instructions that initiate or test completion of \s-1DMA\s0 must not be |
| 18402 | reordered with respect to loads and stores of the memory that is being |
| 18403 | accessed. |
| 18404 | With \fB\-munsafe\-dma\fR you must use the \f(CW\*(C`volatile\*(C'\fR keyword to protect |
| 18405 | memory accesses, but that can lead to inefficient code in places where the |
| 18406 | memory is known to not change. Rather than mark the memory as volatile, |
| 18407 | you can use \fB\-msafe\-dma\fR to tell the compiler to treat |
| 18408 | the \s-1DMA\s0 instructions as potentially affecting all memory. |
| 18409 | .IP "\fB\-mbranch\-hints\fR" 4 |
| 18410 | .IX Item "-mbranch-hints" |
| 18411 | By default, \s-1GCC\s0 generates a branch hint instruction to avoid |
| 18412 | pipeline stalls for always-taken or probably-taken branches. A hint |
| 18413 | is not generated closer than 8 instructions away from its branch. |
| 18414 | There is little reason to disable them, except for debugging purposes, |
| 18415 | or to make an object a little bit smaller. |
| 18416 | .IP "\fB\-msmall\-mem\fR" 4 |
| 18417 | .IX Item "-msmall-mem" |
| 18418 | .PD 0 |
| 18419 | .IP "\fB\-mlarge\-mem\fR" 4 |
| 18420 | .IX Item "-mlarge-mem" |
| 18421 | .PD |
| 18422 | By default, \s-1GCC\s0 generates code assuming that addresses are never larger |
| 18423 | than 18 bits. With \fB\-mlarge\-mem\fR code is generated that assumes |
| 18424 | a full 32\-bit address. |
| 18425 | .IP "\fB\-mstdmain\fR" 4 |
| 18426 | .IX Item "-mstdmain" |
| 18427 | By default, \s-1GCC\s0 links against startup code that assumes the SPU-style |
| 18428 | main function interface (which has an unconventional parameter list). |
| 18429 | With \fB\-mstdmain\fR, \s-1GCC\s0 links your program against startup |
| 18430 | code that assumes a C99\-style interface to \f(CW\*(C`main\*(C'\fR, including a |
| 18431 | local copy of \f(CW\*(C`argv\*(C'\fR strings. |
| 18432 | .IP "\fB\-mfixed\-range=\fR\fIregister-range\fR" 4 |
| 18433 | .IX Item "-mfixed-range=register-range" |
| 18434 | Generate code treating the given register range as fixed registers. |
| 18435 | A fixed register is one that the register allocator cannot use. This is |
| 18436 | useful when compiling kernel code. A register range is specified as |
| 18437 | two registers separated by a dash. Multiple register ranges can be |
| 18438 | specified separated by a comma. |
| 18439 | .IP "\fB\-mea32\fR" 4 |
| 18440 | .IX Item "-mea32" |
| 18441 | .PD 0 |
| 18442 | .IP "\fB\-mea64\fR" 4 |
| 18443 | .IX Item "-mea64" |
| 18444 | .PD |
| 18445 | Compile code assuming that pointers to the \s-1PPU\s0 address space accessed |
| 18446 | via the \f(CW\*(C`_\|_ea\*(C'\fR named address space qualifier are either 32 or 64 |
| 18447 | bits wide. The default is 32 bits. As this is an ABI-changing option, |
| 18448 | all object code in an executable must be compiled with the same setting. |
| 18449 | .IP "\fB\-maddress\-space\-conversion\fR" 4 |
| 18450 | .IX Item "-maddress-space-conversion" |
| 18451 | .PD 0 |
| 18452 | .IP "\fB\-mno\-address\-space\-conversion\fR" 4 |
| 18453 | .IX Item "-mno-address-space-conversion" |
| 18454 | .PD |
| 18455 | Allow/disallow treating the \f(CW\*(C`_\|_ea\*(C'\fR address space as superset |
| 18456 | of the generic address space. This enables explicit type casts |
| 18457 | between \f(CW\*(C`_\|_ea\*(C'\fR and generic pointer as well as implicit |
| 18458 | conversions of generic pointers to \f(CW\*(C`_\|_ea\*(C'\fR pointers. The |
| 18459 | default is to allow address space pointer conversions. |
| 18460 | .IP "\fB\-mcache\-size=\fR\fIcache-size\fR" 4 |
| 18461 | .IX Item "-mcache-size=cache-size" |
| 18462 | This option controls the version of libgcc that the compiler links to an |
| 18463 | executable and selects a software-managed cache for accessing variables |
| 18464 | in the \f(CW\*(C`_\|_ea\*(C'\fR address space with a particular cache size. Possible |
| 18465 | options for \fIcache-size\fR are \fB8\fR, \fB16\fR, \fB32\fR, \fB64\fR |
| 18466 | and \fB128\fR. The default cache size is 64KB. |
| 18467 | .IP "\fB\-matomic\-updates\fR" 4 |
| 18468 | .IX Item "-matomic-updates" |
| 18469 | .PD 0 |
| 18470 | .IP "\fB\-mno\-atomic\-updates\fR" 4 |
| 18471 | .IX Item "-mno-atomic-updates" |
| 18472 | .PD |
| 18473 | This option controls the version of libgcc that the compiler links to an |
| 18474 | executable and selects whether atomic updates to the software-managed |
| 18475 | cache of PPU-side variables are used. If you use atomic updates, changes |
| 18476 | to a \s-1PPU\s0 variable from \s-1SPU\s0 code using the \f(CW\*(C`_\|_ea\*(C'\fR named address space |
| 18477 | qualifier do not interfere with changes to other \s-1PPU\s0 variables residing |
| 18478 | in the same cache line from \s-1PPU\s0 code. If you do not use atomic updates, |
| 18479 | such interference may occur; however, writing back cache lines is |
| 18480 | more efficient. The default behavior is to use atomic updates. |
| 18481 | .IP "\fB\-mdual\-nops\fR" 4 |
| 18482 | .IX Item "-mdual-nops" |
| 18483 | .PD 0 |
| 18484 | .IP "\fB\-mdual\-nops=\fR\fIn\fR" 4 |
| 18485 | .IX Item "-mdual-nops=n" |
| 18486 | .PD |
| 18487 | By default, \s-1GCC\s0 inserts nops to increase dual issue when it expects |
| 18488 | it to increase performance. \fIn\fR can be a value from 0 to 10. A |
| 18489 | smaller \fIn\fR inserts fewer nops. 10 is the default, 0 is the |
| 18490 | same as \fB\-mno\-dual\-nops\fR. Disabled with \fB\-Os\fR. |
| 18491 | .IP "\fB\-mhint\-max\-nops=\fR\fIn\fR" 4 |
| 18492 | .IX Item "-mhint-max-nops=n" |
| 18493 | Maximum number of nops to insert for a branch hint. A branch hint must |
| 18494 | be at least 8 instructions away from the branch it is affecting. \s-1GCC\s0 |
| 18495 | inserts up to \fIn\fR nops to enforce this, otherwise it does not |
| 18496 | generate the branch hint. |
| 18497 | .IP "\fB\-mhint\-max\-distance=\fR\fIn\fR" 4 |
| 18498 | .IX Item "-mhint-max-distance=n" |
| 18499 | The encoding of the branch hint instruction limits the hint to be within |
| 18500 | 256 instructions of the branch it is affecting. By default, \s-1GCC\s0 makes |
| 18501 | sure it is within 125. |
| 18502 | .IP "\fB\-msafe\-hints\fR" 4 |
| 18503 | .IX Item "-msafe-hints" |
| 18504 | Work around a hardware bug that causes the \s-1SPU\s0 to stall indefinitely. |
| 18505 | By default, \s-1GCC\s0 inserts the \f(CW\*(C`hbrp\*(C'\fR instruction to make sure |
| 18506 | this stall won't happen. |
| 18507 | .PP |
| 18508 | \fIOptions for System V\fR |
| 18509 | .IX Subsection "Options for System V" |
| 18510 | .PP |
| 18511 | These additional options are available on System V Release 4 for |
| 18512 | compatibility with other compilers on those systems: |
| 18513 | .IP "\fB\-G\fR" 4 |
| 18514 | .IX Item "-G" |
| 18515 | Create a shared object. |
| 18516 | It is recommended that \fB\-symbolic\fR or \fB\-shared\fR be used instead. |
| 18517 | .IP "\fB\-Qy\fR" 4 |
| 18518 | .IX Item "-Qy" |
| 18519 | Identify the versions of each tool used by the compiler, in a |
| 18520 | \&\f(CW\*(C`.ident\*(C'\fR assembler directive in the output. |
| 18521 | .IP "\fB\-Qn\fR" 4 |
| 18522 | .IX Item "-Qn" |
| 18523 | Refrain from adding \f(CW\*(C`.ident\*(C'\fR directives to the output file (this is |
| 18524 | the default). |
| 18525 | .IP "\fB\-YP,\fR\fIdirs\fR" 4 |
| 18526 | .IX Item "-YP,dirs" |
| 18527 | Search the directories \fIdirs\fR, and no others, for libraries |
| 18528 | specified with \fB\-l\fR. |
| 18529 | .IP "\fB\-Ym,\fR\fIdir\fR" 4 |
| 18530 | .IX Item "-Ym,dir" |
| 18531 | Look in the directory \fIdir\fR to find the M4 preprocessor. |
| 18532 | The assembler uses this option. |
| 18533 | .PP |
| 18534 | \fITILE-Gx Options\fR |
| 18535 | .IX Subsection "TILE-Gx Options" |
| 18536 | .PP |
| 18537 | These \fB\-m\fR options are supported on the TILE-Gx: |
| 18538 | .IP "\fB\-mcmodel=small\fR" 4 |
| 18539 | .IX Item "-mcmodel=small" |
| 18540 | Generate code for the small model. The distance for direct calls is |
| 18541 | limited to 500M in either direction. PC-relative addresses are 32 |
| 18542 | bits. Absolute addresses support the full address range. |
| 18543 | .IP "\fB\-mcmodel=large\fR" 4 |
| 18544 | .IX Item "-mcmodel=large" |
| 18545 | Generate code for the large model. There is no limitation on call |
| 18546 | distance, pc-relative addresses, or absolute addresses. |
| 18547 | .IP "\fB\-mcpu=\fR\fIname\fR" 4 |
| 18548 | .IX Item "-mcpu=name" |
| 18549 | Selects the type of \s-1CPU\s0 to be targeted. Currently the only supported |
| 18550 | type is \fBtilegx\fR. |
| 18551 | .IP "\fB\-m32\fR" 4 |
| 18552 | .IX Item "-m32" |
| 18553 | .PD 0 |
| 18554 | .IP "\fB\-m64\fR" 4 |
| 18555 | .IX Item "-m64" |
| 18556 | .PD |
| 18557 | Generate code for a 32\-bit or 64\-bit environment. The 32\-bit |
| 18558 | environment sets int, long, and pointer to 32 bits. The 64\-bit |
| 18559 | environment sets int to 32 bits and long and pointer to 64 bits. |
| 18560 | .PP |
| 18561 | \fITILEPro Options\fR |
| 18562 | .IX Subsection "TILEPro Options" |
| 18563 | .PP |
| 18564 | These \fB\-m\fR options are supported on the TILEPro: |
| 18565 | .IP "\fB\-mcpu=\fR\fIname\fR" 4 |
| 18566 | .IX Item "-mcpu=name" |
| 18567 | Selects the type of \s-1CPU\s0 to be targeted. Currently the only supported |
| 18568 | type is \fBtilepro\fR. |
| 18569 | .IP "\fB\-m32\fR" 4 |
| 18570 | .IX Item "-m32" |
| 18571 | Generate code for a 32\-bit environment, which sets int, long, and |
| 18572 | pointer to 32 bits. This is the only supported behavior so the flag |
| 18573 | is essentially ignored. |
| 18574 | .PP |
| 18575 | \fIV850 Options\fR |
| 18576 | .IX Subsection "V850 Options" |
| 18577 | .PP |
| 18578 | These \fB\-m\fR options are defined for V850 implementations: |
| 18579 | .IP "\fB\-mlong\-calls\fR" 4 |
| 18580 | .IX Item "-mlong-calls" |
| 18581 | .PD 0 |
| 18582 | .IP "\fB\-mno\-long\-calls\fR" 4 |
| 18583 | .IX Item "-mno-long-calls" |
| 18584 | .PD |
| 18585 | Treat all calls as being far away (near). If calls are assumed to be |
| 18586 | far away, the compiler always loads the function's address into a |
| 18587 | register, and calls indirect through the pointer. |
| 18588 | .IP "\fB\-mno\-ep\fR" 4 |
| 18589 | .IX Item "-mno-ep" |
| 18590 | .PD 0 |
| 18591 | .IP "\fB\-mep\fR" 4 |
| 18592 | .IX Item "-mep" |
| 18593 | .PD |
| 18594 | Do not optimize (do optimize) basic blocks that use the same index |
| 18595 | pointer 4 or more times to copy pointer into the \f(CW\*(C`ep\*(C'\fR register, and |
| 18596 | use the shorter \f(CW\*(C`sld\*(C'\fR and \f(CW\*(C`sst\*(C'\fR instructions. The \fB\-mep\fR |
| 18597 | option is on by default if you optimize. |
| 18598 | .IP "\fB\-mno\-prolog\-function\fR" 4 |
| 18599 | .IX Item "-mno-prolog-function" |
| 18600 | .PD 0 |
| 18601 | .IP "\fB\-mprolog\-function\fR" 4 |
| 18602 | .IX Item "-mprolog-function" |
| 18603 | .PD |
| 18604 | Do not use (do use) external functions to save and restore registers |
| 18605 | at the prologue and epilogue of a function. The external functions |
| 18606 | are slower, but use less code space if more than one function saves |
| 18607 | the same number of registers. The \fB\-mprolog\-function\fR option |
| 18608 | is on by default if you optimize. |
| 18609 | .IP "\fB\-mspace\fR" 4 |
| 18610 | .IX Item "-mspace" |
| 18611 | Try to make the code as small as possible. At present, this just turns |
| 18612 | on the \fB\-mep\fR and \fB\-mprolog\-function\fR options. |
| 18613 | .IP "\fB\-mtda=\fR\fIn\fR" 4 |
| 18614 | .IX Item "-mtda=n" |
| 18615 | Put static or global variables whose size is \fIn\fR bytes or less into |
| 18616 | the tiny data area that register \f(CW\*(C`ep\*(C'\fR points to. The tiny data |
| 18617 | area can hold up to 256 bytes in total (128 bytes for byte references). |
| 18618 | .IP "\fB\-msda=\fR\fIn\fR" 4 |
| 18619 | .IX Item "-msda=n" |
| 18620 | Put static or global variables whose size is \fIn\fR bytes or less into |
| 18621 | the small data area that register \f(CW\*(C`gp\*(C'\fR points to. The small data |
| 18622 | area can hold up to 64 kilobytes. |
| 18623 | .IP "\fB\-mzda=\fR\fIn\fR" 4 |
| 18624 | .IX Item "-mzda=n" |
| 18625 | Put static or global variables whose size is \fIn\fR bytes or less into |
| 18626 | the first 32 kilobytes of memory. |
| 18627 | .IP "\fB\-mv850\fR" 4 |
| 18628 | .IX Item "-mv850" |
| 18629 | Specify that the target processor is the V850. |
| 18630 | .IP "\fB\-mv850e3v5\fR" 4 |
| 18631 | .IX Item "-mv850e3v5" |
| 18632 | Specify that the target processor is the V850E3V5. The preprocessor |
| 18633 | constant \fB_\|_v850e3v5_\|_\fR is defined if this option is used. |
| 18634 | .IP "\fB\-mv850e2v4\fR" 4 |
| 18635 | .IX Item "-mv850e2v4" |
| 18636 | Specify that the target processor is the V850E3V5. This is an alias for |
| 18637 | the \fB\-mv850e3v5\fR option. |
| 18638 | .IP "\fB\-mv850e2v3\fR" 4 |
| 18639 | .IX Item "-mv850e2v3" |
| 18640 | Specify that the target processor is the V850E2V3. The preprocessor |
| 18641 | constant \fB_\|_v850e2v3_\|_\fR is defined if this option is used. |
| 18642 | .IP "\fB\-mv850e2\fR" 4 |
| 18643 | .IX Item "-mv850e2" |
| 18644 | Specify that the target processor is the V850E2. The preprocessor |
| 18645 | constant \fB_\|_v850e2_\|_\fR is defined if this option is used. |
| 18646 | .IP "\fB\-mv850e1\fR" 4 |
| 18647 | .IX Item "-mv850e1" |
| 18648 | Specify that the target processor is the V850E1. The preprocessor |
| 18649 | constants \fB_\|_v850e1_\|_\fR and \fB_\|_v850e_\|_\fR are defined if |
| 18650 | this option is used. |
| 18651 | .IP "\fB\-mv850es\fR" 4 |
| 18652 | .IX Item "-mv850es" |
| 18653 | Specify that the target processor is the V850ES. This is an alias for |
| 18654 | the \fB\-mv850e1\fR option. |
| 18655 | .IP "\fB\-mv850e\fR" 4 |
| 18656 | .IX Item "-mv850e" |
| 18657 | Specify that the target processor is the V850E. The preprocessor |
| 18658 | constant \fB_\|_v850e_\|_\fR is defined if this option is used. |
| 18659 | .Sp |
| 18660 | If neither \fB\-mv850\fR nor \fB\-mv850e\fR nor \fB\-mv850e1\fR |
| 18661 | nor \fB\-mv850e2\fR nor \fB\-mv850e2v3\fR nor \fB\-mv850e3v5\fR |
| 18662 | are defined then a default target processor is chosen and the |
| 18663 | relevant \fB_\|_v850*_\|_\fR preprocessor constant is defined. |
| 18664 | .Sp |
| 18665 | The preprocessor constants \fB_\|_v850\fR and \fB_\|_v851_\|_\fR are always |
| 18666 | defined, regardless of which processor variant is the target. |
| 18667 | .IP "\fB\-mdisable\-callt\fR" 4 |
| 18668 | .IX Item "-mdisable-callt" |
| 18669 | .PD 0 |
| 18670 | .IP "\fB\-mno\-disable\-callt\fR" 4 |
| 18671 | .IX Item "-mno-disable-callt" |
| 18672 | .PD |
| 18673 | This option suppresses generation of the \f(CW\*(C`CALLT\*(C'\fR instruction for the |
| 18674 | v850e, v850e1, v850e2, v850e2v3 and v850e3v5 flavors of the v850 |
| 18675 | architecture. |
| 18676 | .Sp |
| 18677 | This option is enabled by default when the \s-1RH850\s0 \s-1ABI\s0 is |
| 18678 | in use (see \fB\-mrh850\-abi\fR), and disabled by default when the |
| 18679 | \&\s-1GCC\s0 \s-1ABI\s0 is in use. If \f(CW\*(C`CALLT\*(C'\fR instructions are being generated |
| 18680 | then the C preprocessor symbol \f(CW\*(C`_\|_V850_CALLT_\|_\*(C'\fR will be defined. |
| 18681 | .IP "\fB\-mrelax\fR" 4 |
| 18682 | .IX Item "-mrelax" |
| 18683 | .PD 0 |
| 18684 | .IP "\fB\-mno\-relax\fR" 4 |
| 18685 | .IX Item "-mno-relax" |
| 18686 | .PD |
| 18687 | Pass on (or do not pass on) the \fB\-mrelax\fR command line option |
| 18688 | to the assembler. |
| 18689 | .IP "\fB\-mlong\-jumps\fR" 4 |
| 18690 | .IX Item "-mlong-jumps" |
| 18691 | .PD 0 |
| 18692 | .IP "\fB\-mno\-long\-jumps\fR" 4 |
| 18693 | .IX Item "-mno-long-jumps" |
| 18694 | .PD |
| 18695 | Disable (or re-enable) the generation of PC-relative jump instructions. |
| 18696 | .IP "\fB\-msoft\-float\fR" 4 |
| 18697 | .IX Item "-msoft-float" |
| 18698 | .PD 0 |
| 18699 | .IP "\fB\-mhard\-float\fR" 4 |
| 18700 | .IX Item "-mhard-float" |
| 18701 | .PD |
| 18702 | Disable (or re-enable) the generation of hardware floating point |
| 18703 | instructions. This option is only significant when the target |
| 18704 | architecture is \fBV850E2V3\fR or higher. If hardware floating point |
| 18705 | instructions are being generated then the C preprocessor symbol |
| 18706 | \&\f(CW\*(C`_\|_FPU_OK_\|_\*(C'\fR will be defined, otherwise the symbol |
| 18707 | \&\f(CW\*(C`_\|_NO_FPU_\|_\*(C'\fR will be defined. |
| 18708 | .IP "\fB\-mloop\fR" 4 |
| 18709 | .IX Item "-mloop" |
| 18710 | Enables the use of the e3v5 \s-1LOOP\s0 instruction. The use of this |
| 18711 | instruction is not enabled by default when the e3v5 architecture is |
| 18712 | selected because its use is still experimental. |
| 18713 | .IP "\fB\-mrh850\-abi\fR" 4 |
| 18714 | .IX Item "-mrh850-abi" |
| 18715 | .PD 0 |
| 18716 | .IP "\fB\-mghs\fR" 4 |
| 18717 | .IX Item "-mghs" |
| 18718 | .PD |
| 18719 | Enables support for the \s-1RH850\s0 version of the V850 \s-1ABI\s0. This is the |
| 18720 | default. With this version of the \s-1ABI\s0 the following rules apply: |
| 18721 | .RS 4 |
| 18722 | .IP "\(bu" 4 |
| 18723 | Integer sized structures and unions are returned via a memory pointer |
| 18724 | rather than a register. |
| 18725 | .IP "\(bu" 4 |
| 18726 | Large structures and unions (more than 8 bytes in size) are passed by |
| 18727 | value. |
| 18728 | .IP "\(bu" 4 |
| 18729 | Functions are aligned to 16\-bit boundaries. |
| 18730 | .IP "\(bu" 4 |
| 18731 | The \fB\-m8byte\-align\fR command line option is supported. |
| 18732 | .IP "\(bu" 4 |
| 18733 | The \fB\-mdisable\-callt\fR command line option is enabled by |
| 18734 | default. The \fB\-mno\-disable\-callt\fR command line option is not |
| 18735 | supported. |
| 18736 | .RE |
| 18737 | .RS 4 |
| 18738 | .Sp |
| 18739 | When this version of the \s-1ABI\s0 is enabled the C preprocessor symbol |
| 18740 | \&\f(CW\*(C`_\|_V850_RH850_ABI_\|_\*(C'\fR is defined. |
| 18741 | .RE |
| 18742 | .IP "\fB\-mgcc\-abi\fR" 4 |
| 18743 | .IX Item "-mgcc-abi" |
| 18744 | Enables support for the old \s-1GCC\s0 version of the V850 \s-1ABI\s0. With this |
| 18745 | version of the \s-1ABI\s0 the following rules apply: |
| 18746 | .RS 4 |
| 18747 | .IP "\(bu" 4 |
| 18748 | Integer sized structures and unions are returned in register \f(CW\*(C`r10\*(C'\fR. |
| 18749 | .IP "\(bu" 4 |
| 18750 | Large structures and unions (more than 8 bytes in size) are passed by |
| 18751 | reference. |
| 18752 | .IP "\(bu" 4 |
| 18753 | Functions are aligned to 32\-bit boundaries, unless optimizing for |
| 18754 | size. |
| 18755 | .IP "\(bu" 4 |
| 18756 | The \fB\-m8byte\-align\fR command line option is not supported. |
| 18757 | .IP "\(bu" 4 |
| 18758 | The \fB\-mdisable\-callt\fR command line option is supported but not |
| 18759 | enabled by default. |
| 18760 | .RE |
| 18761 | .RS 4 |
| 18762 | .Sp |
| 18763 | When this version of the \s-1ABI\s0 is enabled the C preprocessor symbol |
| 18764 | \&\f(CW\*(C`_\|_V850_GCC_ABI_\|_\*(C'\fR is defined. |
| 18765 | .RE |
| 18766 | .IP "\fB\-m8byte\-align\fR" 4 |
| 18767 | .IX Item "-m8byte-align" |
| 18768 | .PD 0 |
| 18769 | .IP "\fB\-mno\-8byte\-align\fR" 4 |
| 18770 | .IX Item "-mno-8byte-align" |
| 18771 | .PD |
| 18772 | Enables support for \f(CW\*(C`doubles\*(C'\fR and \f(CW\*(C`long long\*(C'\fR types to be |
| 18773 | aligned on 8\-byte boundaries. The default is to restrict the |
| 18774 | alignment of all objects to at most 4\-bytes. When |
| 18775 | \&\fB\-m8byte\-align\fR is in effect the C preprocessor symbol |
| 18776 | \&\f(CW\*(C`_\|_V850_8BYTE_ALIGN_\|_\*(C'\fR will be defined. |
| 18777 | .IP "\fB\-mbig\-switch\fR" 4 |
| 18778 | .IX Item "-mbig-switch" |
| 18779 | Generate code suitable for big switch tables. Use this option only if |
| 18780 | the assembler/linker complain about out of range branches within a switch |
| 18781 | table. |
| 18782 | .IP "\fB\-mapp\-regs\fR" 4 |
| 18783 | .IX Item "-mapp-regs" |
| 18784 | This option causes r2 and r5 to be used in the code generated by |
| 18785 | the compiler. This setting is the default. |
| 18786 | .IP "\fB\-mno\-app\-regs\fR" 4 |
| 18787 | .IX Item "-mno-app-regs" |
| 18788 | This option causes r2 and r5 to be treated as fixed registers. |
| 18789 | .PP |
| 18790 | \fI\s-1VAX\s0 Options\fR |
| 18791 | .IX Subsection "VAX Options" |
| 18792 | .PP |
| 18793 | These \fB\-m\fR options are defined for the \s-1VAX:\s0 |
| 18794 | .IP "\fB\-munix\fR" 4 |
| 18795 | .IX Item "-munix" |
| 18796 | Do not output certain jump instructions (\f(CW\*(C`aobleq\*(C'\fR and so on) |
| 18797 | that the Unix assembler for the \s-1VAX\s0 cannot handle across long |
| 18798 | ranges. |
| 18799 | .IP "\fB\-mgnu\fR" 4 |
| 18800 | .IX Item "-mgnu" |
| 18801 | Do output those jump instructions, on the assumption that the |
| 18802 | \&\s-1GNU\s0 assembler is being used. |
| 18803 | .IP "\fB\-mg\fR" 4 |
| 18804 | .IX Item "-mg" |
| 18805 | Output code for G\-format floating-point numbers instead of D\-format. |
| 18806 | .PP |
| 18807 | \fI\s-1VMS\s0 Options\fR |
| 18808 | .IX Subsection "VMS Options" |
| 18809 | .PP |
| 18810 | These \fB\-m\fR options are defined for the \s-1VMS\s0 implementations: |
| 18811 | .IP "\fB\-mvms\-return\-codes\fR" 4 |
| 18812 | .IX Item "-mvms-return-codes" |
| 18813 | Return \s-1VMS\s0 condition codes from \f(CW\*(C`main\*(C'\fR. The default is to return POSIX-style |
| 18814 | condition (e.g. error) codes. |
| 18815 | .IP "\fB\-mdebug\-main=\fR\fIprefix\fR" 4 |
| 18816 | .IX Item "-mdebug-main=prefix" |
| 18817 | Flag the first routine whose name starts with \fIprefix\fR as the main |
| 18818 | routine for the debugger. |
| 18819 | .IP "\fB\-mmalloc64\fR" 4 |
| 18820 | .IX Item "-mmalloc64" |
| 18821 | Default to 64\-bit memory allocation routines. |
| 18822 | .IP "\fB\-mpointer\-size=\fR\fIsize\fR" 4 |
| 18823 | .IX Item "-mpointer-size=size" |
| 18824 | Set the default size of pointers. Possible options for \fIsize\fR are |
| 18825 | \&\fB32\fR or \fBshort\fR for 32 bit pointers, \fB64\fR or \fBlong\fR |
| 18826 | for 64 bit pointers, and \fBno\fR for supporting only 32 bit pointers. |
| 18827 | The later option disables \f(CW\*(C`pragma pointer_size\*(C'\fR. |
| 18828 | .PP |
| 18829 | \fIVxWorks Options\fR |
| 18830 | .IX Subsection "VxWorks Options" |
| 18831 | .PP |
| 18832 | The options in this section are defined for all VxWorks targets. |
| 18833 | Options specific to the target hardware are listed with the other |
| 18834 | options for that target. |
| 18835 | .IP "\fB\-mrtp\fR" 4 |
| 18836 | .IX Item "-mrtp" |
| 18837 | \&\s-1GCC\s0 can generate code for both VxWorks kernels and real time processes |
| 18838 | (RTPs). This option switches from the former to the latter. It also |
| 18839 | defines the preprocessor macro \f(CW\*(C`_\|_RTP_\|_\*(C'\fR. |
| 18840 | .IP "\fB\-non\-static\fR" 4 |
| 18841 | .IX Item "-non-static" |
| 18842 | Link an \s-1RTP\s0 executable against shared libraries rather than static |
| 18843 | libraries. The options \fB\-static\fR and \fB\-shared\fR can |
| 18844 | also be used for RTPs; \fB\-static\fR |
| 18845 | is the default. |
| 18846 | .IP "\fB\-Bstatic\fR" 4 |
| 18847 | .IX Item "-Bstatic" |
| 18848 | .PD 0 |
| 18849 | .IP "\fB\-Bdynamic\fR" 4 |
| 18850 | .IX Item "-Bdynamic" |
| 18851 | .PD |
| 18852 | These options are passed down to the linker. They are defined for |
| 18853 | compatibility with Diab. |
| 18854 | .IP "\fB\-Xbind\-lazy\fR" 4 |
| 18855 | .IX Item "-Xbind-lazy" |
| 18856 | Enable lazy binding of function calls. This option is equivalent to |
| 18857 | \&\fB\-Wl,\-z,now\fR and is defined for compatibility with Diab. |
| 18858 | .IP "\fB\-Xbind\-now\fR" 4 |
| 18859 | .IX Item "-Xbind-now" |
| 18860 | Disable lazy binding of function calls. This option is the default and |
| 18861 | is defined for compatibility with Diab. |
| 18862 | .PP |
| 18863 | \fIx86\-64 Options\fR |
| 18864 | .IX Subsection "x86-64 Options" |
| 18865 | .PP |
| 18866 | These are listed under |
| 18867 | .PP |
| 18868 | \fIXstormy16 Options\fR |
| 18869 | .IX Subsection "Xstormy16 Options" |
| 18870 | .PP |
| 18871 | These options are defined for Xstormy16: |
| 18872 | .IP "\fB\-msim\fR" 4 |
| 18873 | .IX Item "-msim" |
| 18874 | Choose startup files and linker script suitable for the simulator. |
| 18875 | .PP |
| 18876 | \fIXtensa Options\fR |
| 18877 | .IX Subsection "Xtensa Options" |
| 18878 | .PP |
| 18879 | These options are supported for Xtensa targets: |
| 18880 | .IP "\fB\-mconst16\fR" 4 |
| 18881 | .IX Item "-mconst16" |
| 18882 | .PD 0 |
| 18883 | .IP "\fB\-mno\-const16\fR" 4 |
| 18884 | .IX Item "-mno-const16" |
| 18885 | .PD |
| 18886 | Enable or disable use of \f(CW\*(C`CONST16\*(C'\fR instructions for loading |
| 18887 | constant values. The \f(CW\*(C`CONST16\*(C'\fR instruction is currently not a |
| 18888 | standard option from Tensilica. When enabled, \f(CW\*(C`CONST16\*(C'\fR |
| 18889 | instructions are always used in place of the standard \f(CW\*(C`L32R\*(C'\fR |
| 18890 | instructions. The use of \f(CW\*(C`CONST16\*(C'\fR is enabled by default only if |
| 18891 | the \f(CW\*(C`L32R\*(C'\fR instruction is not available. |
| 18892 | .IP "\fB\-mfused\-madd\fR" 4 |
| 18893 | .IX Item "-mfused-madd" |
| 18894 | .PD 0 |
| 18895 | .IP "\fB\-mno\-fused\-madd\fR" 4 |
| 18896 | .IX Item "-mno-fused-madd" |
| 18897 | .PD |
| 18898 | Enable or disable use of fused multiply/add and multiply/subtract |
| 18899 | instructions in the floating-point option. This has no effect if the |
| 18900 | floating-point option is not also enabled. Disabling fused multiply/add |
| 18901 | and multiply/subtract instructions forces the compiler to use separate |
| 18902 | instructions for the multiply and add/subtract operations. This may be |
| 18903 | desirable in some cases where strict \s-1IEEE\s0 754\-compliant results are |
| 18904 | required: the fused multiply add/subtract instructions do not round the |
| 18905 | intermediate result, thereby producing results with \fImore\fR bits of |
| 18906 | precision than specified by the \s-1IEEE\s0 standard. Disabling fused multiply |
| 18907 | add/subtract instructions also ensures that the program output is not |
| 18908 | sensitive to the compiler's ability to combine multiply and add/subtract |
| 18909 | operations. |
| 18910 | .IP "\fB\-mserialize\-volatile\fR" 4 |
| 18911 | .IX Item "-mserialize-volatile" |
| 18912 | .PD 0 |
| 18913 | .IP "\fB\-mno\-serialize\-volatile\fR" 4 |
| 18914 | .IX Item "-mno-serialize-volatile" |
| 18915 | .PD |
| 18916 | When this option is enabled, \s-1GCC\s0 inserts \f(CW\*(C`MEMW\*(C'\fR instructions before |
| 18917 | \&\f(CW\*(C`volatile\*(C'\fR memory references to guarantee sequential consistency. |
| 18918 | The default is \fB\-mserialize\-volatile\fR. Use |
| 18919 | \&\fB\-mno\-serialize\-volatile\fR to omit the \f(CW\*(C`MEMW\*(C'\fR instructions. |
| 18920 | .IP "\fB\-mforce\-no\-pic\fR" 4 |
| 18921 | .IX Item "-mforce-no-pic" |
| 18922 | For targets, like GNU/Linux, where all user-mode Xtensa code must be |
| 18923 | position-independent code (\s-1PIC\s0), this option disables \s-1PIC\s0 for compiling |
| 18924 | kernel code. |
| 18925 | .IP "\fB\-mtext\-section\-literals\fR" 4 |
| 18926 | .IX Item "-mtext-section-literals" |
| 18927 | .PD 0 |
| 18928 | .IP "\fB\-mno\-text\-section\-literals\fR" 4 |
| 18929 | .IX Item "-mno-text-section-literals" |
| 18930 | .PD |
| 18931 | Control the treatment of literal pools. The default is |
| 18932 | \&\fB\-mno\-text\-section\-literals\fR, which places literals in a separate |
| 18933 | section in the output file. This allows the literal pool to be placed |
| 18934 | in a data \s-1RAM/ROM\s0, and it also allows the linker to combine literal |
| 18935 | pools from separate object files to remove redundant literals and |
| 18936 | improve code size. With \fB\-mtext\-section\-literals\fR, the literals |
| 18937 | are interspersed in the text section in order to keep them as close as |
| 18938 | possible to their references. This may be necessary for large assembly |
| 18939 | files. |
| 18940 | .IP "\fB\-mtarget\-align\fR" 4 |
| 18941 | .IX Item "-mtarget-align" |
| 18942 | .PD 0 |
| 18943 | .IP "\fB\-mno\-target\-align\fR" 4 |
| 18944 | .IX Item "-mno-target-align" |
| 18945 | .PD |
| 18946 | When this option is enabled, \s-1GCC\s0 instructs the assembler to |
| 18947 | automatically align instructions to reduce branch penalties at the |
| 18948 | expense of some code density. The assembler attempts to widen density |
| 18949 | instructions to align branch targets and the instructions following call |
| 18950 | instructions. If there are not enough preceding safe density |
| 18951 | instructions to align a target, no widening is performed. The |
| 18952 | default is \fB\-mtarget\-align\fR. These options do not affect the |
| 18953 | treatment of auto-aligned instructions like \f(CW\*(C`LOOP\*(C'\fR, which the |
| 18954 | assembler always aligns, either by widening density instructions or |
| 18955 | by inserting \s-1NOP\s0 instructions. |
| 18956 | .IP "\fB\-mlongcalls\fR" 4 |
| 18957 | .IX Item "-mlongcalls" |
| 18958 | .PD 0 |
| 18959 | .IP "\fB\-mno\-longcalls\fR" 4 |
| 18960 | .IX Item "-mno-longcalls" |
| 18961 | .PD |
| 18962 | When this option is enabled, \s-1GCC\s0 instructs the assembler to translate |
| 18963 | direct calls to indirect calls unless it can determine that the target |
| 18964 | of a direct call is in the range allowed by the call instruction. This |
| 18965 | translation typically occurs for calls to functions in other source |
| 18966 | files. Specifically, the assembler translates a direct \f(CW\*(C`CALL\*(C'\fR |
| 18967 | instruction into an \f(CW\*(C`L32R\*(C'\fR followed by a \f(CW\*(C`CALLX\*(C'\fR instruction. |
| 18968 | The default is \fB\-mno\-longcalls\fR. This option should be used in |
| 18969 | programs where the call target can potentially be out of range. This |
| 18970 | option is implemented in the assembler, not the compiler, so the |
| 18971 | assembly code generated by \s-1GCC\s0 still shows direct call |
| 18972 | instructions\-\-\-look at the disassembled object code to see the actual |
| 18973 | instructions. Note that the assembler uses an indirect call for |
| 18974 | every cross-file call, not just those that really are out of range. |
| 18975 | .PP |
| 18976 | \fIzSeries Options\fR |
| 18977 | .IX Subsection "zSeries Options" |
| 18978 | .PP |
| 18979 | These are listed under |
| 18980 | .SS "Options for Code Generation Conventions" |
| 18981 | .IX Subsection "Options for Code Generation Conventions" |
| 18982 | These machine-independent options control the interface conventions |
| 18983 | used in code generation. |
| 18984 | .PP |
| 18985 | Most of them have both positive and negative forms; the negative form |
| 18986 | of \fB\-ffoo\fR is \fB\-fno\-foo\fR. In the table below, only |
| 18987 | one of the forms is listed\-\-\-the one that is not the default. You |
| 18988 | can figure out the other form by either removing \fBno\-\fR or adding |
| 18989 | it. |
| 18990 | .IP "\fB\-fbounds\-check\fR" 4 |
| 18991 | .IX Item "-fbounds-check" |
| 18992 | For front ends that support it, generate additional code to check that |
| 18993 | indices used to access arrays are within the declared range. This is |
| 18994 | currently only supported by the Java and Fortran front ends, where |
| 18995 | this option defaults to true and false respectively. |
| 18996 | .IP "\fB\-fstack\-reuse=\fR\fIreuse-level\fR" 4 |
| 18997 | .IX Item "-fstack-reuse=reuse-level" |
| 18998 | This option controls stack space reuse for user declared local/auto variables |
| 18999 | and compiler generated temporaries. \fIreuse_level\fR can be \fBall\fR, |
| 19000 | \&\fBnamed_vars\fR, or \fBnone\fR. \fBall\fR enables stack reuse for all |
| 19001 | local variables and temporaries, \fBnamed_vars\fR enables the reuse only for |
| 19002 | user defined local variables with names, and \fBnone\fR disables stack reuse |
| 19003 | completely. The default value is \fBall\fR. The option is needed when the |
| 19004 | program extends the lifetime of a scoped local variable or a compiler generated |
| 19005 | temporary beyond the end point defined by the language. When a lifetime of |
| 19006 | a variable ends, and if the variable lives in memory, the optimizing compiler |
| 19007 | has the freedom to reuse its stack space with other temporaries or scoped |
| 19008 | local variables whose live range does not overlap with it. Legacy code extending |
| 19009 | local lifetime will likely to break with the stack reuse optimization. |
| 19010 | .Sp |
| 19011 | For example, |
| 19012 | .Sp |
| 19013 | .Vb 3 |
| 19014 | \& int *p; |
| 19015 | \& { |
| 19016 | \& int local1; |
| 19017 | \& |
| 19018 | \& p = &local1; |
| 19019 | \& local1 = 10; |
| 19020 | \& .... |
| 19021 | \& } |
| 19022 | \& { |
| 19023 | \& int local2; |
| 19024 | \& local2 = 20; |
| 19025 | \& ... |
| 19026 | \& } |
| 19027 | \& |
| 19028 | \& if (*p == 10) // out of scope use of local1 |
| 19029 | \& { |
| 19030 | \& |
| 19031 | \& } |
| 19032 | .Ve |
| 19033 | .Sp |
| 19034 | Another example: |
| 19035 | .Sp |
| 19036 | .Vb 6 |
| 19037 | \& struct A |
| 19038 | \& { |
| 19039 | \& A(int k) : i(k), j(k) { } |
| 19040 | \& int i; |
| 19041 | \& int j; |
| 19042 | \& }; |
| 19043 | \& |
| 19044 | \& A *ap; |
| 19045 | \& |
| 19046 | \& void foo(const A& ar) |
| 19047 | \& { |
| 19048 | \& ap = &ar; |
| 19049 | \& } |
| 19050 | \& |
| 19051 | \& void bar() |
| 19052 | \& { |
| 19053 | \& foo(A(10)); // temp object\*(Aqs lifetime ends when foo returns |
| 19054 | \& |
| 19055 | \& { |
| 19056 | \& A a(20); |
| 19057 | \& .... |
| 19058 | \& } |
| 19059 | \& ap\->i+= 10; // ap references out of scope temp whose space |
| 19060 | \& // is reused with a. What is the value of ap\->i? |
| 19061 | \& } |
| 19062 | .Ve |
| 19063 | .Sp |
| 19064 | The lifetime of a compiler generated temporary is well defined by the \*(C+ |
| 19065 | standard. When a lifetime of a temporary ends, and if the temporary lives |
| 19066 | in memory, the optimizing compiler has the freedom to reuse its stack |
| 19067 | space with other temporaries or scoped local variables whose live range |
| 19068 | does not overlap with it. However some of the legacy code relies on |
| 19069 | the behavior of older compilers in which temporaries' stack space is |
| 19070 | not reused, the aggressive stack reuse can lead to runtime errors. This |
| 19071 | option is used to control the temporary stack reuse optimization. |
| 19072 | .IP "\fB\-ftrapv\fR" 4 |
| 19073 | .IX Item "-ftrapv" |
| 19074 | This option generates traps for signed overflow on addition, subtraction, |
| 19075 | multiplication operations. |
| 19076 | .IP "\fB\-fwrapv\fR" 4 |
| 19077 | .IX Item "-fwrapv" |
| 19078 | This option instructs the compiler to assume that signed arithmetic |
| 19079 | overflow of addition, subtraction and multiplication wraps around |
| 19080 | using twos-complement representation. This flag enables some optimizations |
| 19081 | and disables others. This option is enabled by default for the Java |
| 19082 | front end, as required by the Java language specification. |
| 19083 | .IP "\fB\-fexceptions\fR" 4 |
| 19084 | .IX Item "-fexceptions" |
| 19085 | Enable exception handling. Generates extra code needed to propagate |
| 19086 | exceptions. For some targets, this implies \s-1GCC\s0 generates frame |
| 19087 | unwind information for all functions, which can produce significant data |
| 19088 | size overhead, although it does not affect execution. If you do not |
| 19089 | specify this option, \s-1GCC\s0 enables it by default for languages like |
| 19090 | \&\*(C+ that normally require exception handling, and disables it for |
| 19091 | languages like C that do not normally require it. However, you may need |
| 19092 | to enable this option when compiling C code that needs to interoperate |
| 19093 | properly with exception handlers written in \*(C+. You may also wish to |
| 19094 | disable this option if you are compiling older \*(C+ programs that don't |
| 19095 | use exception handling. |
| 19096 | .IP "\fB\-fnon\-call\-exceptions\fR" 4 |
| 19097 | .IX Item "-fnon-call-exceptions" |
| 19098 | Generate code that allows trapping instructions to throw exceptions. |
| 19099 | Note that this requires platform-specific runtime support that does |
| 19100 | not exist everywhere. Moreover, it only allows \fItrapping\fR |
| 19101 | instructions to throw exceptions, i.e. memory references or floating-point |
| 19102 | instructions. It does not allow exceptions to be thrown from |
| 19103 | arbitrary signal handlers such as \f(CW\*(C`SIGALRM\*(C'\fR. |
| 19104 | .IP "\fB\-fdelete\-dead\-exceptions\fR" 4 |
| 19105 | .IX Item "-fdelete-dead-exceptions" |
| 19106 | Consider that instructions that may throw exceptions but don't otherwise |
| 19107 | contribute to the execution of the program can be optimized away. |
| 19108 | This option is enabled by default for the Ada front end, as permitted by |
| 19109 | the Ada language specification. |
| 19110 | Optimization passes that cause dead exceptions to be removed are enabled independently at different optimization levels. |
| 19111 | .IP "\fB\-funwind\-tables\fR" 4 |
| 19112 | .IX Item "-funwind-tables" |
| 19113 | Similar to \fB\-fexceptions\fR, except that it just generates any needed |
| 19114 | static data, but does not affect the generated code in any other way. |
| 19115 | You normally do not need to enable this option; instead, a language processor |
| 19116 | that needs this handling enables it on your behalf. |
| 19117 | .IP "\fB\-fasynchronous\-unwind\-tables\fR" 4 |
| 19118 | .IX Item "-fasynchronous-unwind-tables" |
| 19119 | Generate unwind table in \s-1DWARF\s0 2 format, if supported by target machine. The |
| 19120 | table is exact at each instruction boundary, so it can be used for stack |
| 19121 | unwinding from asynchronous events (such as debugger or garbage collector). |
| 19122 | .IP "\fB\-fpcc\-struct\-return\fR" 4 |
| 19123 | .IX Item "-fpcc-struct-return" |
| 19124 | Return \*(L"short\*(R" \f(CW\*(C`struct\*(C'\fR and \f(CW\*(C`union\*(C'\fR values in memory like |
| 19125 | longer ones, rather than in registers. This convention is less |
| 19126 | efficient, but it has the advantage of allowing intercallability between |
| 19127 | GCC-compiled files and files compiled with other compilers, particularly |
| 19128 | the Portable C Compiler (pcc). |
| 19129 | .Sp |
| 19130 | The precise convention for returning structures in memory depends |
| 19131 | on the target configuration macros. |
| 19132 | .Sp |
| 19133 | Short structures and unions are those whose size and alignment match |
| 19134 | that of some integer type. |
| 19135 | .Sp |
| 19136 | \&\fBWarning:\fR code compiled with the \fB\-fpcc\-struct\-return\fR |
| 19137 | switch is not binary compatible with code compiled with the |
| 19138 | \&\fB\-freg\-struct\-return\fR switch. |
| 19139 | Use it to conform to a non-default application binary interface. |
| 19140 | .IP "\fB\-freg\-struct\-return\fR" 4 |
| 19141 | .IX Item "-freg-struct-return" |
| 19142 | Return \f(CW\*(C`struct\*(C'\fR and \f(CW\*(C`union\*(C'\fR values in registers when possible. |
| 19143 | This is more efficient for small structures than |
| 19144 | \&\fB\-fpcc\-struct\-return\fR. |
| 19145 | .Sp |
| 19146 | If you specify neither \fB\-fpcc\-struct\-return\fR nor |
| 19147 | \&\fB\-freg\-struct\-return\fR, \s-1GCC\s0 defaults to whichever convention is |
| 19148 | standard for the target. If there is no standard convention, \s-1GCC\s0 |
| 19149 | defaults to \fB\-fpcc\-struct\-return\fR, except on targets where \s-1GCC\s0 is |
| 19150 | the principal compiler. In those cases, we can choose the standard, and |
| 19151 | we chose the more efficient register return alternative. |
| 19152 | .Sp |
| 19153 | \&\fBWarning:\fR code compiled with the \fB\-freg\-struct\-return\fR |
| 19154 | switch is not binary compatible with code compiled with the |
| 19155 | \&\fB\-fpcc\-struct\-return\fR switch. |
| 19156 | Use it to conform to a non-default application binary interface. |
| 19157 | .IP "\fB\-fshort\-enums\fR" 4 |
| 19158 | .IX Item "-fshort-enums" |
| 19159 | Allocate to an \f(CW\*(C`enum\*(C'\fR type only as many bytes as it needs for the |
| 19160 | declared range of possible values. Specifically, the \f(CW\*(C`enum\*(C'\fR type |
| 19161 | is equivalent to the smallest integer type that has enough room. |
| 19162 | .Sp |
| 19163 | \&\fBWarning:\fR the \fB\-fshort\-enums\fR switch causes \s-1GCC\s0 to generate |
| 19164 | code that is not binary compatible with code generated without that switch. |
| 19165 | Use it to conform to a non-default application binary interface. |
| 19166 | .IP "\fB\-fshort\-double\fR" 4 |
| 19167 | .IX Item "-fshort-double" |
| 19168 | Use the same size for \f(CW\*(C`double\*(C'\fR as for \f(CW\*(C`float\*(C'\fR. |
| 19169 | .Sp |
| 19170 | \&\fBWarning:\fR the \fB\-fshort\-double\fR switch causes \s-1GCC\s0 to generate |
| 19171 | code that is not binary compatible with code generated without that switch. |
| 19172 | Use it to conform to a non-default application binary interface. |
| 19173 | .IP "\fB\-fshort\-wchar\fR" 4 |
| 19174 | .IX Item "-fshort-wchar" |
| 19175 | Override the underlying type for \fBwchar_t\fR to be \fBshort |
| 19176 | unsigned int\fR instead of the default for the target. This option is |
| 19177 | useful for building programs to run under \s-1WINE\s0. |
| 19178 | .Sp |
| 19179 | \&\fBWarning:\fR the \fB\-fshort\-wchar\fR switch causes \s-1GCC\s0 to generate |
| 19180 | code that is not binary compatible with code generated without that switch. |
| 19181 | Use it to conform to a non-default application binary interface. |
| 19182 | .IP "\fB\-fno\-common\fR" 4 |
| 19183 | .IX Item "-fno-common" |
| 19184 | In C code, controls the placement of uninitialized global variables. |
| 19185 | Unix C compilers have traditionally permitted multiple definitions of |
| 19186 | such variables in different compilation units by placing the variables |
| 19187 | in a common block. |
| 19188 | This is the behavior specified by \fB\-fcommon\fR, and is the default |
| 19189 | for \s-1GCC\s0 on most targets. |
| 19190 | On the other hand, this behavior is not required by \s-1ISO\s0 C, and on some |
| 19191 | targets may carry a speed or code size penalty on variable references. |
| 19192 | The \fB\-fno\-common\fR option specifies that the compiler should place |
| 19193 | uninitialized global variables in the data section of the object file, |
| 19194 | rather than generating them as common blocks. |
| 19195 | This has the effect that if the same variable is declared |
| 19196 | (without \f(CW\*(C`extern\*(C'\fR) in two different compilations, |
| 19197 | you get a multiple-definition error when you link them. |
| 19198 | In this case, you must compile with \fB\-fcommon\fR instead. |
| 19199 | Compiling with \fB\-fno\-common\fR is useful on targets for which |
| 19200 | it provides better performance, or if you wish to verify that the |
| 19201 | program will work on other systems that always treat uninitialized |
| 19202 | variable declarations this way. |
| 19203 | .IP "\fB\-fno\-ident\fR" 4 |
| 19204 | .IX Item "-fno-ident" |
| 19205 | Ignore the \fB#ident\fR directive. |
| 19206 | .IP "\fB\-finhibit\-size\-directive\fR" 4 |
| 19207 | .IX Item "-finhibit-size-directive" |
| 19208 | Don't output a \f(CW\*(C`.size\*(C'\fR assembler directive, or anything else that |
| 19209 | would cause trouble if the function is split in the middle, and the |
| 19210 | two halves are placed at locations far apart in memory. This option is |
| 19211 | used when compiling \fIcrtstuff.c\fR; you should not need to use it |
| 19212 | for anything else. |
| 19213 | .IP "\fB\-fverbose\-asm\fR" 4 |
| 19214 | .IX Item "-fverbose-asm" |
| 19215 | Put extra commentary information in the generated assembly code to |
| 19216 | make it more readable. This option is generally only of use to those |
| 19217 | who actually need to read the generated assembly code (perhaps while |
| 19218 | debugging the compiler itself). |
| 19219 | .Sp |
| 19220 | \&\fB\-fno\-verbose\-asm\fR, the default, causes the |
| 19221 | extra information to be omitted and is useful when comparing two assembler |
| 19222 | files. |
| 19223 | .IP "\fB\-frecord\-gcc\-switches\fR" 4 |
| 19224 | .IX Item "-frecord-gcc-switches" |
| 19225 | This switch causes the command line used to invoke the |
| 19226 | compiler to be recorded into the object file that is being created. |
| 19227 | This switch is only implemented on some targets and the exact format |
| 19228 | of the recording is target and binary file format dependent, but it |
| 19229 | usually takes the form of a section containing \s-1ASCII\s0 text. This |
| 19230 | switch is related to the \fB\-fverbose\-asm\fR switch, but that |
| 19231 | switch only records information in the assembler output file as |
| 19232 | comments, so it never reaches the object file. |
| 19233 | See also \fB\-grecord\-gcc\-switches\fR for another |
| 19234 | way of storing compiler options into the object file. |
| 19235 | .IP "\fB\-fpic\fR" 4 |
| 19236 | .IX Item "-fpic" |
| 19237 | Generate position-independent code (\s-1PIC\s0) suitable for use in a shared |
| 19238 | library, if supported for the target machine. Such code accesses all |
| 19239 | constant addresses through a global offset table (\s-1GOT\s0). The dynamic |
| 19240 | loader resolves the \s-1GOT\s0 entries when the program starts (the dynamic |
| 19241 | loader is not part of \s-1GCC\s0; it is part of the operating system). If |
| 19242 | the \s-1GOT\s0 size for the linked executable exceeds a machine-specific |
| 19243 | maximum size, you get an error message from the linker indicating that |
| 19244 | \&\fB\-fpic\fR does not work; in that case, recompile with \fB\-fPIC\fR |
| 19245 | instead. (These maximums are 8k on the \s-1SPARC\s0 and 32k |
| 19246 | on the m68k and \s-1RS/6000\s0. The 386 has no such limit.) |
| 19247 | .Sp |
| 19248 | Position-independent code requires special support, and therefore works |
| 19249 | only on certain machines. For the 386, \s-1GCC\s0 supports \s-1PIC\s0 for System V |
| 19250 | but not for the Sun 386i. Code generated for the \s-1IBM\s0 \s-1RS/6000\s0 is always |
| 19251 | position-independent. |
| 19252 | .Sp |
| 19253 | When this flag is set, the macros \f(CW\*(C`_\|_pic_\|_\*(C'\fR and \f(CW\*(C`_\|_PIC_\|_\*(C'\fR |
| 19254 | are defined to 1. |
| 19255 | .IP "\fB\-fPIC\fR" 4 |
| 19256 | .IX Item "-fPIC" |
| 19257 | If supported for the target machine, emit position-independent code, |
| 19258 | suitable for dynamic linking and avoiding any limit on the size of the |
| 19259 | global offset table. This option makes a difference on the m68k, |
| 19260 | PowerPC and \s-1SPARC\s0. |
| 19261 | .Sp |
| 19262 | Position-independent code requires special support, and therefore works |
| 19263 | only on certain machines. |
| 19264 | .Sp |
| 19265 | When this flag is set, the macros \f(CW\*(C`_\|_pic_\|_\*(C'\fR and \f(CW\*(C`_\|_PIC_\|_\*(C'\fR |
| 19266 | are defined to 2. |
| 19267 | .IP "\fB\-fpie\fR" 4 |
| 19268 | .IX Item "-fpie" |
| 19269 | .PD 0 |
| 19270 | .IP "\fB\-fPIE\fR" 4 |
| 19271 | .IX Item "-fPIE" |
| 19272 | .PD |
| 19273 | These options are similar to \fB\-fpic\fR and \fB\-fPIC\fR, but |
| 19274 | generated position independent code can be only linked into executables. |
| 19275 | Usually these options are used when \fB\-pie\fR \s-1GCC\s0 option is |
| 19276 | used during linking. |
| 19277 | .Sp |
| 19278 | \&\fB\-fpie\fR and \fB\-fPIE\fR both define the macros |
| 19279 | \&\f(CW\*(C`_\|_pie_\|_\*(C'\fR and \f(CW\*(C`_\|_PIE_\|_\*(C'\fR. The macros have the value 1 |
| 19280 | for \fB\-fpie\fR and 2 for \fB\-fPIE\fR. |
| 19281 | .IP "\fB\-fno\-jump\-tables\fR" 4 |
| 19282 | .IX Item "-fno-jump-tables" |
| 19283 | Do not use jump tables for switch statements even where it would be |
| 19284 | more efficient than other code generation strategies. This option is |
| 19285 | of use in conjunction with \fB\-fpic\fR or \fB\-fPIC\fR for |
| 19286 | building code that forms part of a dynamic linker and cannot |
| 19287 | reference the address of a jump table. On some targets, jump tables |
| 19288 | do not require a \s-1GOT\s0 and this option is not needed. |
| 19289 | .IP "\fB\-ffixed\-\fR\fIreg\fR" 4 |
| 19290 | .IX Item "-ffixed-reg" |
| 19291 | Treat the register named \fIreg\fR as a fixed register; generated code |
| 19292 | should never refer to it (except perhaps as a stack pointer, frame |
| 19293 | pointer or in some other fixed role). |
| 19294 | .Sp |
| 19295 | \&\fIreg\fR must be the name of a register. The register names accepted |
| 19296 | are machine-specific and are defined in the \f(CW\*(C`REGISTER_NAMES\*(C'\fR |
| 19297 | macro in the machine description macro file. |
| 19298 | .Sp |
| 19299 | This flag does not have a negative form, because it specifies a |
| 19300 | three-way choice. |
| 19301 | .IP "\fB\-fcall\-used\-\fR\fIreg\fR" 4 |
| 19302 | .IX Item "-fcall-used-reg" |
| 19303 | Treat the register named \fIreg\fR as an allocable register that is |
| 19304 | clobbered by function calls. It may be allocated for temporaries or |
| 19305 | variables that do not live across a call. Functions compiled this way |
| 19306 | do not save and restore the register \fIreg\fR. |
| 19307 | .Sp |
| 19308 | It is an error to use this flag with the frame pointer or stack pointer. |
| 19309 | Use of this flag for other registers that have fixed pervasive roles in |
| 19310 | the machine's execution model produces disastrous results. |
| 19311 | .Sp |
| 19312 | This flag does not have a negative form, because it specifies a |
| 19313 | three-way choice. |
| 19314 | .IP "\fB\-fcall\-saved\-\fR\fIreg\fR" 4 |
| 19315 | .IX Item "-fcall-saved-reg" |
| 19316 | Treat the register named \fIreg\fR as an allocable register saved by |
| 19317 | functions. It may be allocated even for temporaries or variables that |
| 19318 | live across a call. Functions compiled this way save and restore |
| 19319 | the register \fIreg\fR if they use it. |
| 19320 | .Sp |
| 19321 | It is an error to use this flag with the frame pointer or stack pointer. |
| 19322 | Use of this flag for other registers that have fixed pervasive roles in |
| 19323 | the machine's execution model produces disastrous results. |
| 19324 | .Sp |
| 19325 | A different sort of disaster results from the use of this flag for |
| 19326 | a register in which function values may be returned. |
| 19327 | .Sp |
| 19328 | This flag does not have a negative form, because it specifies a |
| 19329 | three-way choice. |
| 19330 | .IP "\fB\-fpack\-struct[=\fR\fIn\fR\fB]\fR" 4 |
| 19331 | .IX Item "-fpack-struct[=n]" |
| 19332 | Without a value specified, pack all structure members together without |
| 19333 | holes. When a value is specified (which must be a small power of two), pack |
| 19334 | structure members according to this value, representing the maximum |
| 19335 | alignment (that is, objects with default alignment requirements larger than |
| 19336 | this are output potentially unaligned at the next fitting location. |
| 19337 | .Sp |
| 19338 | \&\fBWarning:\fR the \fB\-fpack\-struct\fR switch causes \s-1GCC\s0 to generate |
| 19339 | code that is not binary compatible with code generated without that switch. |
| 19340 | Additionally, it makes the code suboptimal. |
| 19341 | Use it to conform to a non-default application binary interface. |
| 19342 | .IP "\fB\-finstrument\-functions\fR" 4 |
| 19343 | .IX Item "-finstrument-functions" |
| 19344 | Generate instrumentation calls for entry and exit to functions. Just |
| 19345 | after function entry and just before function exit, the following |
| 19346 | profiling functions are called with the address of the current |
| 19347 | function and its call site. (On some platforms, |
| 19348 | \&\f(CW\*(C`_\|_builtin_return_address\*(C'\fR does not work beyond the current |
| 19349 | function, so the call site information may not be available to the |
| 19350 | profiling functions otherwise.) |
| 19351 | .Sp |
| 19352 | .Vb 4 |
| 19353 | \& void _\|_cyg_profile_func_enter (void *this_fn, |
| 19354 | \& void *call_site); |
| 19355 | \& void _\|_cyg_profile_func_exit (void *this_fn, |
| 19356 | \& void *call_site); |
| 19357 | .Ve |
| 19358 | .Sp |
| 19359 | The first argument is the address of the start of the current function, |
| 19360 | which may be looked up exactly in the symbol table. |
| 19361 | .Sp |
| 19362 | This instrumentation is also done for functions expanded inline in other |
| 19363 | functions. The profiling calls indicate where, conceptually, the |
| 19364 | inline function is entered and exited. This means that addressable |
| 19365 | versions of such functions must be available. If all your uses of a |
| 19366 | function are expanded inline, this may mean an additional expansion of |
| 19367 | code size. If you use \fBextern inline\fR in your C code, an |
| 19368 | addressable version of such functions must be provided. (This is |
| 19369 | normally the case anyway, but if you get lucky and the optimizer always |
| 19370 | expands the functions inline, you might have gotten away without |
| 19371 | providing static copies.) |
| 19372 | .Sp |
| 19373 | A function may be given the attribute \f(CW\*(C`no_instrument_function\*(C'\fR, in |
| 19374 | which case this instrumentation is not done. This can be used, for |
| 19375 | example, for the profiling functions listed above, high-priority |
| 19376 | interrupt routines, and any functions from which the profiling functions |
| 19377 | cannot safely be called (perhaps signal handlers, if the profiling |
| 19378 | routines generate output or allocate memory). |
| 19379 | .IP "\fB\-finstrument\-functions\-exclude\-file\-list=\fR\fIfile\fR\fB,\fR\fIfile\fR\fB,...\fR" 4 |
| 19380 | .IX Item "-finstrument-functions-exclude-file-list=file,file,..." |
| 19381 | Set the list of functions that are excluded from instrumentation (see |
| 19382 | the description of \f(CW\*(C`\-finstrument\-functions\*(C'\fR). If the file that |
| 19383 | contains a function definition matches with one of \fIfile\fR, then |
| 19384 | that function is not instrumented. The match is done on substrings: |
| 19385 | if the \fIfile\fR parameter is a substring of the file name, it is |
| 19386 | considered to be a match. |
| 19387 | .Sp |
| 19388 | For example: |
| 19389 | .Sp |
| 19390 | .Vb 1 |
| 19391 | \& \-finstrument\-functions\-exclude\-file\-list=/bits/stl,include/sys |
| 19392 | .Ve |
| 19393 | .Sp |
| 19394 | excludes any inline function defined in files whose pathnames |
| 19395 | contain \f(CW\*(C`/bits/stl\*(C'\fR or \f(CW\*(C`include/sys\*(C'\fR. |
| 19396 | .Sp |
| 19397 | If, for some reason, you want to include letter \f(CW\*(Aq,\*(Aq\fR in one of |
| 19398 | \&\fIsym\fR, write \f(CW\*(Aq,\*(Aq\fR. For example, |
| 19399 | \&\f(CW\*(C`\-finstrument\-functions\-exclude\-file\-list=\*(Aq,,tmp\*(Aq\*(C'\fR |
| 19400 | (note the single quote surrounding the option). |
| 19401 | .IP "\fB\-finstrument\-functions\-exclude\-function\-list=\fR\fIsym\fR\fB,\fR\fIsym\fR\fB,...\fR" 4 |
| 19402 | .IX Item "-finstrument-functions-exclude-function-list=sym,sym,..." |
| 19403 | This is similar to \f(CW\*(C`\-finstrument\-functions\-exclude\-file\-list\*(C'\fR, |
| 19404 | but this option sets the list of function names to be excluded from |
| 19405 | instrumentation. The function name to be matched is its user-visible |
| 19406 | name, such as \f(CW\*(C`vector<int> blah(const vector<int> &)\*(C'\fR, not the |
| 19407 | internal mangled name (e.g., \f(CW\*(C`_Z4blahRSt6vectorIiSaIiEE\*(C'\fR). The |
| 19408 | match is done on substrings: if the \fIsym\fR parameter is a substring |
| 19409 | of the function name, it is considered to be a match. For C99 and \*(C+ |
| 19410 | extended identifiers, the function name must be given in \s-1UTF\-8\s0, not |
| 19411 | using universal character names. |
| 19412 | .IP "\fB\-fstack\-check\fR" 4 |
| 19413 | .IX Item "-fstack-check" |
| 19414 | Generate code to verify that you do not go beyond the boundary of the |
| 19415 | stack. You should specify this flag if you are running in an |
| 19416 | environment with multiple threads, but you only rarely need to specify it in |
| 19417 | a single-threaded environment since stack overflow is automatically |
| 19418 | detected on nearly all systems if there is only one stack. |
| 19419 | .Sp |
| 19420 | Note that this switch does not actually cause checking to be done; the |
| 19421 | operating system or the language runtime must do that. The switch causes |
| 19422 | generation of code to ensure that they see the stack being extended. |
| 19423 | .Sp |
| 19424 | You can additionally specify a string parameter: \f(CW\*(C`no\*(C'\fR means no |
| 19425 | checking, \f(CW\*(C`generic\*(C'\fR means force the use of old-style checking, |
| 19426 | \&\f(CW\*(C`specific\*(C'\fR means use the best checking method and is equivalent |
| 19427 | to bare \fB\-fstack\-check\fR. |
| 19428 | .Sp |
| 19429 | Old-style checking is a generic mechanism that requires no specific |
| 19430 | target support in the compiler but comes with the following drawbacks: |
| 19431 | .RS 4 |
| 19432 | .IP "1." 4 |
| 19433 | Modified allocation strategy for large objects: they are always |
| 19434 | allocated dynamically if their size exceeds a fixed threshold. |
| 19435 | .IP "2." 4 |
| 19436 | Fixed limit on the size of the static frame of functions: when it is |
| 19437 | topped by a particular function, stack checking is not reliable and |
| 19438 | a warning is issued by the compiler. |
| 19439 | .IP "3." 4 |
| 19440 | Inefficiency: because of both the modified allocation strategy and the |
| 19441 | generic implementation, code performance is hampered. |
| 19442 | .RE |
| 19443 | .RS 4 |
| 19444 | .Sp |
| 19445 | Note that old-style stack checking is also the fallback method for |
| 19446 | \&\f(CW\*(C`specific\*(C'\fR if no target support has been added in the compiler. |
| 19447 | .RE |
| 19448 | .IP "\fB\-fstack\-limit\-register=\fR\fIreg\fR" 4 |
| 19449 | .IX Item "-fstack-limit-register=reg" |
| 19450 | .PD 0 |
| 19451 | .IP "\fB\-fstack\-limit\-symbol=\fR\fIsym\fR" 4 |
| 19452 | .IX Item "-fstack-limit-symbol=sym" |
| 19453 | .IP "\fB\-fno\-stack\-limit\fR" 4 |
| 19454 | .IX Item "-fno-stack-limit" |
| 19455 | .PD |
| 19456 | Generate code to ensure that the stack does not grow beyond a certain value, |
| 19457 | either the value of a register or the address of a symbol. If a larger |
| 19458 | stack is required, a signal is raised at run time. For most targets, |
| 19459 | the signal is raised before the stack overruns the boundary, so |
| 19460 | it is possible to catch the signal without taking special precautions. |
| 19461 | .Sp |
| 19462 | For instance, if the stack starts at absolute address \fB0x80000000\fR |
| 19463 | and grows downwards, you can use the flags |
| 19464 | \&\fB\-fstack\-limit\-symbol=_\|_stack_limit\fR and |
| 19465 | \&\fB\-Wl,\-\-defsym,_\|_stack_limit=0x7ffe0000\fR to enforce a stack limit |
| 19466 | of 128KB. Note that this may only work with the \s-1GNU\s0 linker. |
| 19467 | .IP "\fB\-fsplit\-stack\fR" 4 |
| 19468 | .IX Item "-fsplit-stack" |
| 19469 | Generate code to automatically split the stack before it overflows. |
| 19470 | The resulting program has a discontiguous stack which can only |
| 19471 | overflow if the program is unable to allocate any more memory. This |
| 19472 | is most useful when running threaded programs, as it is no longer |
| 19473 | necessary to calculate a good stack size to use for each thread. This |
| 19474 | is currently only implemented for the i386 and x86_64 back ends running |
| 19475 | GNU/Linux. |
| 19476 | .Sp |
| 19477 | When code compiled with \fB\-fsplit\-stack\fR calls code compiled |
| 19478 | without \fB\-fsplit\-stack\fR, there may not be much stack space |
| 19479 | available for the latter code to run. If compiling all code, |
| 19480 | including library code, with \fB\-fsplit\-stack\fR is not an option, |
| 19481 | then the linker can fix up these calls so that the code compiled |
| 19482 | without \fB\-fsplit\-stack\fR always has a large stack. Support for |
| 19483 | this is implemented in the gold linker in \s-1GNU\s0 binutils release 2.21 |
| 19484 | and later. |
| 19485 | .IP "\fB\-fleading\-underscore\fR" 4 |
| 19486 | .IX Item "-fleading-underscore" |
| 19487 | This option and its counterpart, \fB\-fno\-leading\-underscore\fR, forcibly |
| 19488 | change the way C symbols are represented in the object file. One use |
| 19489 | is to help link with legacy assembly code. |
| 19490 | .Sp |
| 19491 | \&\fBWarning:\fR the \fB\-fleading\-underscore\fR switch causes \s-1GCC\s0 to |
| 19492 | generate code that is not binary compatible with code generated without that |
| 19493 | switch. Use it to conform to a non-default application binary interface. |
| 19494 | Not all targets provide complete support for this switch. |
| 19495 | .IP "\fB\-ftls\-model=\fR\fImodel\fR" 4 |
| 19496 | .IX Item "-ftls-model=model" |
| 19497 | Alter the thread-local storage model to be used. |
| 19498 | The \fImodel\fR argument should be one of \f(CW\*(C`global\-dynamic\*(C'\fR, |
| 19499 | \&\f(CW\*(C`local\-dynamic\*(C'\fR, \f(CW\*(C`initial\-exec\*(C'\fR or \f(CW\*(C`local\-exec\*(C'\fR. |
| 19500 | .Sp |
| 19501 | The default without \fB\-fpic\fR is \f(CW\*(C`initial\-exec\*(C'\fR; with |
| 19502 | \&\fB\-fpic\fR the default is \f(CW\*(C`global\-dynamic\*(C'\fR. |
| 19503 | .IP "\fB\-fvisibility=\fR\fIdefault|internal|hidden|protected\fR" 4 |
| 19504 | .IX Item "-fvisibility=default|internal|hidden|protected" |
| 19505 | Set the default \s-1ELF\s0 image symbol visibility to the specified option\-\-\-all |
| 19506 | symbols are marked with this unless overridden within the code. |
| 19507 | Using this feature can very substantially improve linking and |
| 19508 | load times of shared object libraries, produce more optimized |
| 19509 | code, provide near-perfect \s-1API\s0 export and prevent symbol clashes. |
| 19510 | It is \fBstrongly\fR recommended that you use this in any shared objects |
| 19511 | you distribute. |
| 19512 | .Sp |
| 19513 | Despite the nomenclature, \f(CW\*(C`default\*(C'\fR always means public; i.e., |
| 19514 | available to be linked against from outside the shared object. |
| 19515 | \&\f(CW\*(C`protected\*(C'\fR and \f(CW\*(C`internal\*(C'\fR are pretty useless in real-world |
| 19516 | usage so the only other commonly used option is \f(CW\*(C`hidden\*(C'\fR. |
| 19517 | The default if \fB\-fvisibility\fR isn't specified is |
| 19518 | \&\f(CW\*(C`default\*(C'\fR, i.e., make every |
| 19519 | symbol public\-\-\-this causes the same behavior as previous versions of |
| 19520 | \&\s-1GCC\s0. |
| 19521 | .Sp |
| 19522 | A good explanation of the benefits offered by ensuring \s-1ELF\s0 |
| 19523 | symbols have the correct visibility is given by \*(L"How To Write |
| 19524 | Shared Libraries\*(R" by Ulrich Drepper (which can be found at |
| 19525 | <\fBhttp://people.redhat.com/~drepper/\fR>)\-\-\-however a superior |
| 19526 | solution made possible by this option to marking things hidden when |
| 19527 | the default is public is to make the default hidden and mark things |
| 19528 | public. This is the norm with DLLs on Windows and with \fB\-fvisibility=hidden\fR |
| 19529 | and \f(CW\*(C`_\|_attribute_\|_ ((visibility("default")))\*(C'\fR instead of |
| 19530 | \&\f(CW\*(C`_\|_declspec(dllexport)\*(C'\fR you get almost identical semantics with |
| 19531 | identical syntax. This is a great boon to those working with |
| 19532 | cross-platform projects. |
| 19533 | .Sp |
| 19534 | For those adding visibility support to existing code, you may find |
| 19535 | \&\fB#pragma \s-1GCC\s0 visibility\fR of use. This works by you enclosing |
| 19536 | the declarations you wish to set visibility for with (for example) |
| 19537 | \&\fB#pragma \s-1GCC\s0 visibility push(hidden)\fR and |
| 19538 | \&\fB#pragma \s-1GCC\s0 visibility pop\fR. |
| 19539 | Bear in mind that symbol visibility should be viewed \fBas |
| 19540 | part of the \s-1API\s0 interface contract\fR and thus all new code should |
| 19541 | always specify visibility when it is not the default; i.e., declarations |
| 19542 | only for use within the local \s-1DSO\s0 should \fBalways\fR be marked explicitly |
| 19543 | as hidden as so to avoid \s-1PLT\s0 indirection overheads\-\-\-making this |
| 19544 | abundantly clear also aids readability and self-documentation of the code. |
| 19545 | Note that due to \s-1ISO\s0 \*(C+ specification requirements, \f(CW\*(C`operator new\*(C'\fR and |
| 19546 | \&\f(CW\*(C`operator delete\*(C'\fR must always be of default visibility. |
| 19547 | .Sp |
| 19548 | Be aware that headers from outside your project, in particular system |
| 19549 | headers and headers from any other library you use, may not be |
| 19550 | expecting to be compiled with visibility other than the default. You |
| 19551 | may need to explicitly say \fB#pragma \s-1GCC\s0 visibility push(default)\fR |
| 19552 | before including any such headers. |
| 19553 | .Sp |
| 19554 | \&\fBextern\fR declarations are not affected by \fB\-fvisibility\fR, so |
| 19555 | a lot of code can be recompiled with \fB\-fvisibility=hidden\fR with |
| 19556 | no modifications. However, this means that calls to \f(CW\*(C`extern\*(C'\fR |
| 19557 | functions with no explicit visibility use the \s-1PLT\s0, so it is more |
| 19558 | effective to use \f(CW\*(C`_\|_attribute ((visibility))\*(C'\fR and/or |
| 19559 | \&\f(CW\*(C`#pragma GCC visibility\*(C'\fR to tell the compiler which \f(CW\*(C`extern\*(C'\fR |
| 19560 | declarations should be treated as hidden. |
| 19561 | .Sp |
| 19562 | Note that \fB\-fvisibility\fR does affect \*(C+ vague linkage |
| 19563 | entities. This means that, for instance, an exception class that is |
| 19564 | be thrown between DSOs must be explicitly marked with default |
| 19565 | visibility so that the \fBtype_info\fR nodes are unified between |
| 19566 | the DSOs. |
| 19567 | .Sp |
| 19568 | An overview of these techniques, their benefits and how to use them |
| 19569 | is at <\fBhttp://gcc.gnu.org/wiki/Visibility\fR>. |
| 19570 | .IP "\fB\-fstrict\-volatile\-bitfields\fR" 4 |
| 19571 | .IX Item "-fstrict-volatile-bitfields" |
| 19572 | This option should be used if accesses to volatile bit-fields (or other |
| 19573 | structure fields, although the compiler usually honors those types |
| 19574 | anyway) should use a single access of the width of the |
| 19575 | field's type, aligned to a natural alignment if possible. For |
| 19576 | example, targets with memory-mapped peripheral registers might require |
| 19577 | all such accesses to be 16 bits wide; with this flag you can |
| 19578 | declare all peripheral bit-fields as \f(CW\*(C`unsigned short\*(C'\fR (assuming short |
| 19579 | is 16 bits on these targets) to force \s-1GCC\s0 to use 16\-bit accesses |
| 19580 | instead of, perhaps, a more efficient 32\-bit access. |
| 19581 | .Sp |
| 19582 | If this option is disabled, the compiler uses the most efficient |
| 19583 | instruction. In the previous example, that might be a 32\-bit load |
| 19584 | instruction, even though that accesses bytes that do not contain |
| 19585 | any portion of the bit-field, or memory-mapped registers unrelated to |
| 19586 | the one being updated. |
| 19587 | .Sp |
| 19588 | If the target requires strict alignment, and honoring the field |
| 19589 | type would require violating this alignment, a warning is issued. |
| 19590 | If the field has \f(CW\*(C`packed\*(C'\fR attribute, the access is done without |
| 19591 | honoring the field type. If the field doesn't have \f(CW\*(C`packed\*(C'\fR |
| 19592 | attribute, the access is done honoring the field type. In both cases, |
| 19593 | \&\s-1GCC\s0 assumes that the user knows something about the target hardware |
| 19594 | that it is unaware of. |
| 19595 | .Sp |
| 19596 | The default value of this option is determined by the application binary |
| 19597 | interface for the target processor. |
| 19598 | .IP "\fB\-fsync\-libcalls\fR" 4 |
| 19599 | .IX Item "-fsync-libcalls" |
| 19600 | This option controls whether any out-of-line instance of the \f(CW\*(C`_\|_sync\*(C'\fR |
| 19601 | family of functions may be used to implement the \*(C+11 \f(CW\*(C`_\|_atomic\*(C'\fR |
| 19602 | family of functions. |
| 19603 | .Sp |
| 19604 | The default value of this option is enabled, thus the only useful form |
| 19605 | of the option is \fB\-fno\-sync\-libcalls\fR. This option is used in |
| 19606 | the implementation of the \fIlibatomic\fR runtime library. |
| 19607 | .SH "ENVIRONMENT" |
| 19608 | .IX Header "ENVIRONMENT" |
| 19609 | This section describes several environment variables that affect how \s-1GCC\s0 |
| 19610 | operates. Some of them work by specifying directories or prefixes to use |
| 19611 | when searching for various kinds of files. Some are used to specify other |
| 19612 | aspects of the compilation environment. |
| 19613 | .PP |
| 19614 | Note that you can also specify places to search using options such as |
| 19615 | \&\fB\-B\fR, \fB\-I\fR and \fB\-L\fR. These |
| 19616 | take precedence over places specified using environment variables, which |
| 19617 | in turn take precedence over those specified by the configuration of \s-1GCC\s0. |
| 19618 | .IP "\fB\s-1LANG\s0\fR" 4 |
| 19619 | .IX Item "LANG" |
| 19620 | .PD 0 |
| 19621 | .IP "\fB\s-1LC_CTYPE\s0\fR" 4 |
| 19622 | .IX Item "LC_CTYPE" |
| 19623 | .IP "\fB\s-1LC_MESSAGES\s0\fR" 4 |
| 19624 | .IX Item "LC_MESSAGES" |
| 19625 | .IP "\fB\s-1LC_ALL\s0\fR" 4 |
| 19626 | .IX Item "LC_ALL" |
| 19627 | .PD |
| 19628 | These environment variables control the way that \s-1GCC\s0 uses |
| 19629 | localization information which allows \s-1GCC\s0 to work with different |
| 19630 | national conventions. \s-1GCC\s0 inspects the locale categories |
| 19631 | \&\fB\s-1LC_CTYPE\s0\fR and \fB\s-1LC_MESSAGES\s0\fR if it has been configured to do |
| 19632 | so. These locale categories can be set to any value supported by your |
| 19633 | installation. A typical value is \fBen_GB.UTF\-8\fR for English in the United |
| 19634 | Kingdom encoded in \s-1UTF\-8\s0. |
| 19635 | .Sp |
| 19636 | The \fB\s-1LC_CTYPE\s0\fR environment variable specifies character |
| 19637 | classification. \s-1GCC\s0 uses it to determine the character boundaries in |
| 19638 | a string; this is needed for some multibyte encodings that contain quote |
| 19639 | and escape characters that are otherwise interpreted as a string |
| 19640 | end or escape. |
| 19641 | .Sp |
| 19642 | The \fB\s-1LC_MESSAGES\s0\fR environment variable specifies the language to |
| 19643 | use in diagnostic messages. |
| 19644 | .Sp |
| 19645 | If the \fB\s-1LC_ALL\s0\fR environment variable is set, it overrides the value |
| 19646 | of \fB\s-1LC_CTYPE\s0\fR and \fB\s-1LC_MESSAGES\s0\fR; otherwise, \fB\s-1LC_CTYPE\s0\fR |
| 19647 | and \fB\s-1LC_MESSAGES\s0\fR default to the value of the \fB\s-1LANG\s0\fR |
| 19648 | environment variable. If none of these variables are set, \s-1GCC\s0 |
| 19649 | defaults to traditional C English behavior. |
| 19650 | .IP "\fB\s-1TMPDIR\s0\fR" 4 |
| 19651 | .IX Item "TMPDIR" |
| 19652 | If \fB\s-1TMPDIR\s0\fR is set, it specifies the directory to use for temporary |
| 19653 | files. \s-1GCC\s0 uses temporary files to hold the output of one stage of |
| 19654 | compilation which is to be used as input to the next stage: for example, |
| 19655 | the output of the preprocessor, which is the input to the compiler |
| 19656 | proper. |
| 19657 | .IP "\fB\s-1GCC_COMPARE_DEBUG\s0\fR" 4 |
| 19658 | .IX Item "GCC_COMPARE_DEBUG" |
| 19659 | Setting \fB\s-1GCC_COMPARE_DEBUG\s0\fR is nearly equivalent to passing |
| 19660 | \&\fB\-fcompare\-debug\fR to the compiler driver. See the documentation |
| 19661 | of this option for more details. |
| 19662 | .IP "\fB\s-1GCC_EXEC_PREFIX\s0\fR" 4 |
| 19663 | .IX Item "GCC_EXEC_PREFIX" |
| 19664 | If \fB\s-1GCC_EXEC_PREFIX\s0\fR is set, it specifies a prefix to use in the |
| 19665 | names of the subprograms executed by the compiler. No slash is added |
| 19666 | when this prefix is combined with the name of a subprogram, but you can |
| 19667 | specify a prefix that ends with a slash if you wish. |
| 19668 | .Sp |
| 19669 | If \fB\s-1GCC_EXEC_PREFIX\s0\fR is not set, \s-1GCC\s0 attempts to figure out |
| 19670 | an appropriate prefix to use based on the pathname it is invoked with. |
| 19671 | .Sp |
| 19672 | If \s-1GCC\s0 cannot find the subprogram using the specified prefix, it |
| 19673 | tries looking in the usual places for the subprogram. |
| 19674 | .Sp |
| 19675 | The default value of \fB\s-1GCC_EXEC_PREFIX\s0\fR is |
| 19676 | \&\fI\fIprefix\fI/lib/gcc/\fR where \fIprefix\fR is the prefix to |
| 19677 | the installed compiler. In many cases \fIprefix\fR is the value |
| 19678 | of \f(CW\*(C`prefix\*(C'\fR when you ran the \fIconfigure\fR script. |
| 19679 | .Sp |
| 19680 | Other prefixes specified with \fB\-B\fR take precedence over this prefix. |
| 19681 | .Sp |
| 19682 | This prefix is also used for finding files such as \fIcrt0.o\fR that are |
| 19683 | used for linking. |
| 19684 | .Sp |
| 19685 | In addition, the prefix is used in an unusual way in finding the |
| 19686 | directories to search for header files. For each of the standard |
| 19687 | directories whose name normally begins with \fB/usr/local/lib/gcc\fR |
| 19688 | (more precisely, with the value of \fB\s-1GCC_INCLUDE_DIR\s0\fR), \s-1GCC\s0 tries |
| 19689 | replacing that beginning with the specified prefix to produce an |
| 19690 | alternate directory name. Thus, with \fB\-Bfoo/\fR, \s-1GCC\s0 searches |
| 19691 | \&\fIfoo/bar\fR just before it searches the standard directory |
| 19692 | \&\fI/usr/local/lib/bar\fR. |
| 19693 | If a standard directory begins with the configured |
| 19694 | \&\fIprefix\fR then the value of \fIprefix\fR is replaced by |
| 19695 | \&\fB\s-1GCC_EXEC_PREFIX\s0\fR when looking for header files. |
| 19696 | .IP "\fB\s-1COMPILER_PATH\s0\fR" 4 |
| 19697 | .IX Item "COMPILER_PATH" |
| 19698 | The value of \fB\s-1COMPILER_PATH\s0\fR is a colon-separated list of |
| 19699 | directories, much like \fB\s-1PATH\s0\fR. \s-1GCC\s0 tries the directories thus |
| 19700 | specified when searching for subprograms, if it can't find the |
| 19701 | subprograms using \fB\s-1GCC_EXEC_PREFIX\s0\fR. |
| 19702 | .IP "\fB\s-1LIBRARY_PATH\s0\fR" 4 |
| 19703 | .IX Item "LIBRARY_PATH" |
| 19704 | The value of \fB\s-1LIBRARY_PATH\s0\fR is a colon-separated list of |
| 19705 | directories, much like \fB\s-1PATH\s0\fR. When configured as a native compiler, |
| 19706 | \&\s-1GCC\s0 tries the directories thus specified when searching for special |
| 19707 | linker files, if it can't find them using \fB\s-1GCC_EXEC_PREFIX\s0\fR. Linking |
| 19708 | using \s-1GCC\s0 also uses these directories when searching for ordinary |
| 19709 | libraries for the \fB\-l\fR option (but directories specified with |
| 19710 | \&\fB\-L\fR come first). |
| 19711 | .IP "\fB\s-1LANG\s0\fR" 4 |
| 19712 | .IX Item "LANG" |
| 19713 | This variable is used to pass locale information to the compiler. One way in |
| 19714 | which this information is used is to determine the character set to be used |
| 19715 | when character literals, string literals and comments are parsed in C and \*(C+. |
| 19716 | When the compiler is configured to allow multibyte characters, |
| 19717 | the following values for \fB\s-1LANG\s0\fR are recognized: |
| 19718 | .RS 4 |
| 19719 | .IP "\fBC\-JIS\fR" 4 |
| 19720 | .IX Item "C-JIS" |
| 19721 | Recognize \s-1JIS\s0 characters. |
| 19722 | .IP "\fBC\-SJIS\fR" 4 |
| 19723 | .IX Item "C-SJIS" |
| 19724 | Recognize \s-1SJIS\s0 characters. |
| 19725 | .IP "\fBC\-EUCJP\fR" 4 |
| 19726 | .IX Item "C-EUCJP" |
| 19727 | Recognize \s-1EUCJP\s0 characters. |
| 19728 | .RE |
| 19729 | .RS 4 |
| 19730 | .Sp |
| 19731 | If \fB\s-1LANG\s0\fR is not defined, or if it has some other value, then the |
| 19732 | compiler uses \f(CW\*(C`mblen\*(C'\fR and \f(CW\*(C`mbtowc\*(C'\fR as defined by the default locale to |
| 19733 | recognize and translate multibyte characters. |
| 19734 | .RE |
| 19735 | .PP |
| 19736 | Some additional environment variables affect the behavior of the |
| 19737 | preprocessor. |
| 19738 | .IP "\fB\s-1CPATH\s0\fR" 4 |
| 19739 | .IX Item "CPATH" |
| 19740 | .PD 0 |
| 19741 | .IP "\fBC_INCLUDE_PATH\fR" 4 |
| 19742 | .IX Item "C_INCLUDE_PATH" |
| 19743 | .IP "\fB\s-1CPLUS_INCLUDE_PATH\s0\fR" 4 |
| 19744 | .IX Item "CPLUS_INCLUDE_PATH" |
| 19745 | .IP "\fB\s-1OBJC_INCLUDE_PATH\s0\fR" 4 |
| 19746 | .IX Item "OBJC_INCLUDE_PATH" |
| 19747 | .PD |
| 19748 | Each variable's value is a list of directories separated by a special |
| 19749 | character, much like \fB\s-1PATH\s0\fR, in which to look for header files. |
| 19750 | The special character, \f(CW\*(C`PATH_SEPARATOR\*(C'\fR, is target-dependent and |
| 19751 | determined at \s-1GCC\s0 build time. For Microsoft Windows-based targets it is a |
| 19752 | semicolon, and for almost all other targets it is a colon. |
| 19753 | .Sp |
| 19754 | \&\fB\s-1CPATH\s0\fR specifies a list of directories to be searched as if |
| 19755 | specified with \fB\-I\fR, but after any paths given with \fB\-I\fR |
| 19756 | options on the command line. This environment variable is used |
| 19757 | regardless of which language is being preprocessed. |
| 19758 | .Sp |
| 19759 | The remaining environment variables apply only when preprocessing the |
| 19760 | particular language indicated. Each specifies a list of directories |
| 19761 | to be searched as if specified with \fB\-isystem\fR, but after any |
| 19762 | paths given with \fB\-isystem\fR options on the command line. |
| 19763 | .Sp |
| 19764 | In all these variables, an empty element instructs the compiler to |
| 19765 | search its current working directory. Empty elements can appear at the |
| 19766 | beginning or end of a path. For instance, if the value of |
| 19767 | \&\fB\s-1CPATH\s0\fR is \f(CW\*(C`:/special/include\*(C'\fR, that has the same |
| 19768 | effect as \fB\-I.\ \-I/special/include\fR. |
| 19769 | .IP "\fB\s-1DEPENDENCIES_OUTPUT\s0\fR" 4 |
| 19770 | .IX Item "DEPENDENCIES_OUTPUT" |
| 19771 | If this variable is set, its value specifies how to output |
| 19772 | dependencies for Make based on the non-system header files processed |
| 19773 | by the compiler. System header files are ignored in the dependency |
| 19774 | output. |
| 19775 | .Sp |
| 19776 | The value of \fB\s-1DEPENDENCIES_OUTPUT\s0\fR can be just a file name, in |
| 19777 | which case the Make rules are written to that file, guessing the target |
| 19778 | name from the source file name. Or the value can have the form |
| 19779 | \&\fIfile\fR\fB \fR\fItarget\fR, in which case the rules are written to |
| 19780 | file \fIfile\fR using \fItarget\fR as the target name. |
| 19781 | .Sp |
| 19782 | In other words, this environment variable is equivalent to combining |
| 19783 | the options \fB\-MM\fR and \fB\-MF\fR, |
| 19784 | with an optional \fB\-MT\fR switch too. |
| 19785 | .IP "\fB\s-1SUNPRO_DEPENDENCIES\s0\fR" 4 |
| 19786 | .IX Item "SUNPRO_DEPENDENCIES" |
| 19787 | This variable is the same as \fB\s-1DEPENDENCIES_OUTPUT\s0\fR (see above), |
| 19788 | except that system header files are not ignored, so it implies |
| 19789 | \&\fB\-M\fR rather than \fB\-MM\fR. However, the dependence on the |
| 19790 | main input file is omitted. |
| 19791 | .SH "BUGS" |
| 19792 | .IX Header "BUGS" |
| 19793 | For instructions on reporting bugs, see |
| 19794 | <\fBhttp://gcc.gnu.org/bugs.html\fR>. |
| 19795 | .SH "FOOTNOTES" |
| 19796 | .IX Header "FOOTNOTES" |
| 19797 | .IP "1." 4 |
| 19798 | On some systems, \fBgcc \-shared\fR |
| 19799 | needs to build supplementary stub code for constructors to work. On |
| 19800 | multi-libbed systems, \fBgcc \-shared\fR must select the correct support |
| 19801 | libraries to link against. Failing to supply the correct flags may lead |
| 19802 | to subtle defects. Supplying them in cases where they are not necessary |
| 19803 | is innocuous. |
| 19804 | .SH "SEE ALSO" |
| 19805 | .IX Header "SEE ALSO" |
| 19806 | \&\fIgpl\fR\|(7), \fIgfdl\fR\|(7), \fIfsf\-funding\fR\|(7), |
| 19807 | \&\fIcpp\fR\|(1), \fIgcov\fR\|(1), \fIas\fR\|(1), \fIld\fR\|(1), \fIgdb\fR\|(1), \fIadb\fR\|(1), \fIdbx\fR\|(1), \fIsdb\fR\|(1) |
| 19808 | and the Info entries for \fIgcc\fR, \fIcpp\fR, \fIas\fR, |
| 19809 | \&\fIld\fR, \fIbinutils\fR and \fIgdb\fR. |
| 19810 | .SH "AUTHOR" |
| 19811 | .IX Header "AUTHOR" |
| 19812 | See the Info entry for \fBgcc\fR, or |
| 19813 | <\fBhttp://gcc.gnu.org/onlinedocs/gcc/Contributors.html\fR>, |
| 19814 | for contributors to \s-1GCC\s0. |
| 19815 | .SH "COPYRIGHT" |
| 19816 | .IX Header "COPYRIGHT" |
| 19817 | Copyright (c) 1988\-2013 Free Software Foundation, Inc. |
| 19818 | .PP |
| 19819 | Permission is granted to copy, distribute and/or modify this document |
| 19820 | under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or |
| 19821 | any later version published by the Free Software Foundation; with the |
| 19822 | Invariant Sections being \*(L"\s-1GNU\s0 General Public License\*(R" and \*(L"Funding |
| 19823 | Free Software\*(R", the Front-Cover texts being (a) (see below), and with |
| 19824 | the Back-Cover Texts being (b) (see below). A copy of the license is |
| 19825 | included in the \fIgfdl\fR\|(7) man page. |
| 19826 | .PP |
| 19827 | (a) The \s-1FSF\s0's Front-Cover Text is: |
| 19828 | .PP |
| 19829 | .Vb 1 |
| 19830 | \& A GNU Manual |
| 19831 | .Ve |
| 19832 | .PP |
| 19833 | (b) The \s-1FSF\s0's Back-Cover Text is: |
| 19834 | .PP |
| 19835 | .Vb 3 |
| 19836 | \& You have freedom to copy and modify this GNU Manual, like GNU |
| 19837 | \& software. Copies published by the Free Software Foundation raise |
| 19838 | \& funds for GNU development. |
| 19839 | .Ve |