blob: 88e400d95731b5b0ed448f26580097e7abce6756 [file] [log] [blame]
David 'Digit' Turner35235142014-06-03 15:18:04 +02001.\" 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"
133gcc \- GNU project C and C++ compiler
134.SH "SYNOPSIS"
135.IX Header "SYNOPSIS"
136gcc [\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
144Only the most useful options are listed here; see below for the
145remainder. \fBg++\fR accepts mostly the same options as \fBgcc\fR.
146.SH "DESCRIPTION"
147.IX Header "DESCRIPTION"
148When you invoke \s-1GCC\s0, it normally does preprocessing, compilation,
149assembly and linking. The \*(L"overall options\*(R" allow you to stop this
150process at an intermediate stage. For example, the \fB\-c\fR option
151says not to run the linker. Then the output consists of object files
152output by the assembler.
153.PP
154Other options are passed on to one stage of processing. Some options
155control the preprocessor and others the compiler itself. Yet other
156options control the assembler and linker; most of these are not
157documented here, since you rarely need to use any of them.
158.PP
159Most of the command-line options that you can use with \s-1GCC\s0 are useful
160for C programs; when an option is only useful with another language
161(usually \*(C+), the explanation says so explicitly. If the description
162for a particular option does not mention a source language, you can use
163that option with all supported languages.
164.PP
165The \fBgcc\fR program accepts options and file names as operands. Many
166options have multi-letter names; therefore multiple single-letter options
167may \fInot\fR be grouped: \fB\-dv\fR is very different from \fB\-d\ \-v\fR.
168.PP
169You can mix options and other arguments. For the most part, the order
170you use doesn't matter. Order does matter when you use several
171options of the same kind; for example, if you specify \fB\-L\fR more
172than once, the directories are searched in the order specified. Also,
173the placement of the \fB\-l\fR option is significant.
174.PP
175Many 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
178these have both positive and negative forms; the negative form of
179\&\fB\-ffoo\fR is \fB\-fno\-foo\fR. This manual documents
180only 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"
185Here is a summary of all the options, grouped by type. Explanations are
186in 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
818See \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
994See 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
1009See 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"
1034Compilation can involve up to four stages: preprocessing, compilation
1035proper, assembly and linking, always in that order. \s-1GCC\s0 is capable of
1036preprocessing and compiling several files either into several
1037assembler input files, or into one assembler input file; then each
1038assembler input file produces an object file, and linking combines all
1039the object files (those newly compiled, and those specified as input)
1040into an executable file.
1041.PP
1042For any given input file, the file name suffix determines what kind of
1043compilation is done:
1044.IP "\fIfile\fR\fB.c\fR" 4
1045.IX Item "file.c"
1046C source code that must be preprocessed.
1047.IP "\fIfile\fR\fB.i\fR" 4
1048.IX Item "file.i"
1049C 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"
1055Objective-C source code. Note that you must link with the \fIlibobjc\fR
1056library to make an Objective-C program work.
1057.IP "\fIfile\fR\fB.mi\fR" 4
1058.IX Item "file.mi"
1059Objective-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
1066Objective\-\*(C+ source code. Note that you must link with the \fIlibobjc\fR
1067library to make an Objective\-\*(C+ program work. Note that \fB.M\fR refers
1068to a literal capital M.
1069.IP "\fIfile\fR\fB.mii\fR" 4
1070.IX Item "file.mii"
1071Objective\-\*(C+ source code that should not be preprocessed.
1072.IP "\fIfile\fR\fB.h\fR" 4
1073.IX Item "file.h"
1074C, \*(C+, Objective-C or Objective\-\*(C+ header file to be turned into a
1075precompiled header (default), or C, \*(C+ header file to be turned into an
1076Ada 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,
1094the 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
1102Objective\-\*(C+ source code that must be preprocessed.
1103.IP "\fIfile\fR\fB.mii\fR" 4
1104.IX Item "file.mii"
1105Objective\-\*(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
1133Fixed 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
1146Fixed form Fortran source code that must be preprocessed (with the traditional
1147preprocessor).
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
1158Free 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
1169Free form Fortran source code that must be preprocessed (with the
1170traditional preprocessor).
1171.IP "\fIfile\fR\fB.go\fR" 4
1172.IX Item "file.go"
1173Go source code.
1174.IP "\fIfile\fR\fB.ads\fR" 4
1175.IX Item "file.ads"
1176Ada source code file that contains a library unit declaration (a
1177declaration of a package, subprogram, or generic, or a generic
1178instantiation), or a library unit renaming declaration (a package,
1179generic, or subprogram renaming declaration). Such files are also
1180called \fIspecs\fR.
1181.IP "\fIfile\fR\fB.adb\fR" 4
1182.IX Item "file.adb"
1183Ada source code file containing a library unit body (a subprogram or
1184package body). Such files are also called \fIbodies\fR.
1185.IP "\fIfile\fR\fB.s\fR" 4
1186.IX Item "file.s"
1187Assembler 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
1194Assembler code that must be preprocessed.
1195.IP "\fIother\fR" 4
1196.IX Item "other"
1197An object file to be fed straight into linking.
1198Any file name with no recognized suffix is treated this way.
1199.PP
1200You 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"
1203Specify explicitly the \fIlanguage\fR for the following input files
1204(rather than letting the compiler choose a default based on the file
1205name suffix). This option applies to all following input files until
1206the 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"
1221Turn off any specification of a language, so that subsequent files are
1222handled according to their file name suffixes (as they are if \fB\-x\fR
1223has not been used at all).
1224.IP "\fB\-pass\-exit\-codes\fR" 4
1225.IX Item "-pass-exit-codes"
1226Normally the \fBgcc\fR program exits with the code of 1 if any
1227phase 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
1229the numerically highest error produced by any phase returning an error
1230indication. The C, \*(C+, and Fortran front ends return 4 if an internal
1231compiler error is encountered.
1232.PP
1233If 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
1235one 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"
1240Compile or assemble the source files, but do not link. The linking
1241stage simply is not done. The ultimate output is in the form of an
1242object file for each source file.
1243.Sp
1244By default, the object file name for a source file is made by replacing
1245the suffix \fB.c\fR, \fB.i\fR, \fB.s\fR, etc., with \fB.o\fR.
1246.Sp
1247Unrecognized input files, not requiring compilation or assembly, are
1248ignored.
1249.IP "\fB\-S\fR" 4
1250.IX Item "-S"
1251Stop after the stage of compilation proper; do not assemble. The output
1252is in the form of an assembler code file for each non-assembler input
1253file specified.
1254.Sp
1255By default, the assembler file name for a source file is made by
1256replacing the suffix \fB.c\fR, \fB.i\fR, etc., with \fB.s\fR.
1257.Sp
1258Input files that don't require compilation are ignored.
1259.IP "\fB\-E\fR" 4
1260.IX Item "-E"
1261Stop after the preprocessing stage; do not run the compiler proper. The
1262output is in the form of preprocessed source code, which is sent to the
1263standard output.
1264.Sp
1265Input files that don't require preprocessing are ignored.
1266.IP "\fB\-o\fR \fIfile\fR" 4
1267.IX Item "-o file"
1268Place output in file \fIfile\fR. This applies to whatever
1269sort of output is being produced, whether it be an executable file,
1270an object file, an assembler file or preprocessed C code.
1271.Sp
1272If \fB\-o\fR is not specified, the default is to put an executable
1273file in \fIa.out\fR, the object file for
1274\&\fI\fIsource\fI.\fIsuffix\fI\fR in \fI\fIsource\fI.o\fR, its
1275assembler 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
1277standard output.
1278.IP "\fB\-v\fR" 4
1279.IX Item "-v"
1280Print (on standard error output) the commands executed to run the stages
1281of compilation. Also print the version number of the compiler driver
1282program and of the preprocessor and the compiler proper.
1283.IP "\fB\-###\fR" 4
1284.IX Item "-###"
1285Like \fB\-v\fR except the commands are not executed and arguments
1286are quoted unless they contain only alphanumeric characters or \f(CW\*(C`./\-_\*(C'\fR.
1287This is useful for shell scripts to capture the driver-generated command lines.
1288.IP "\fB\-pipe\fR" 4
1289.IX Item "-pipe"
1290Use pipes rather than temporary files for communication between the
1291various stages of compilation. This fails to work on some systems where
1292the assembler is unable to read from a pipe; but the \s-1GNU\s0 assembler has
1293no trouble.
1294.IP "\fB\-\-help\fR" 4
1295.IX Item "--help"
1296Print (on the standard output) a description of the command-line options
1297understood by \fBgcc\fR. If the \fB\-v\fR option is also specified
1298then \fB\-\-help\fR is also passed on to the various processes
1299invoked by \fBgcc\fR, so that they can display the command-line options
1300they accept. If the \fB\-Wextra\fR option has also been specified
1301(prior to the \fB\-\-help\fR option), then command-line options that
1302have no documentation associated with them are also displayed.
1303.IP "\fB\-\-target\-help\fR" 4
1304.IX Item "--target-help"
1305Print (on the standard output) a description of target-specific command-line
1306options for each tool. For some targets extra target-specific
1307information 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}[,...]"
1310Print (on the standard output) a description of the command-line
1311options understood by the compiler that fit into all specified classes
1312and qualifiers. These are the supported classes:
1313.RS 4
1314.IP "\fBoptimizers\fR" 4
1315.IX Item "optimizers"
1316Display all of the optimization options supported by the
1317compiler.
1318.IP "\fBwarnings\fR" 4
1319.IX Item "warnings"
1320Display all of the options controlling warning messages
1321produced by the compiler.
1322.IP "\fBtarget\fR" 4
1323.IX Item "target"
1324Display target-specific options. Unlike the
1325\&\fB\-\-target\-help\fR option however, target-specific options of the
1326linker and assembler are not displayed. This is because those
1327tools do not currently support the extended \fB\-\-help=\fR syntax.
1328.IP "\fBparams\fR" 4
1329.IX Item "params"
1330Display the values recognized by the \fB\-\-param\fR
1331option.
1332.IP "\fIlanguage\fR" 4
1333.IX Item "language"
1334Display the options supported for \fIlanguage\fR, where
1335\&\fIlanguage\fR is the name of one of the languages supported in this
1336version of \s-1GCC\s0.
1337.IP "\fBcommon\fR" 4
1338.IX Item "common"
1339Display the options that are common to all languages.
1340.RE
1341.RS 4
1342.Sp
1343These are the supported qualifiers:
1344.IP "\fBundocumented\fR" 4
1345.IX Item "undocumented"
1346Display only those options that are undocumented.
1347.IP "\fBjoined\fR" 4
1348.IX Item "joined"
1349Display options taking an argument that appears after an equal
1350sign in the same continuous piece of text, such as:
1351\&\fB\-\-help=target\fR.
1352.IP "\fBseparate\fR" 4
1353.IX Item "separate"
1354Display options taking an argument that appears as a separate word
1355following the original option, such as: \fB\-o output-file\fR.
1356.RE
1357.RS 4
1358.Sp
1359Thus for example to display all the undocumented target-specific
1360switches supported by the compiler, use:
1361.Sp
1362.Vb 1
1363\& \-\-help=target,undocumented
1364.Ve
1365.Sp
1366The sense of a qualifier can be inverted by prefixing it with the
1367\&\fB^\fR character, so for example to display all binary warning
1368options (i.e., ones that are either on or off and that do not take an
1369argument) that have a description, use:
1370.Sp
1371.Vb 1
1372\& \-\-help=warnings,^joined,^undocumented
1373.Ve
1374.Sp
1375The argument to \fB\-\-help=\fR should not consist solely of inverted
1376qualifiers.
1377.Sp
1378Combining several classes is possible, although this usually
1379restricts the output so much that there is nothing to display. One
1380case where it does work, however, is when one of the classes is
1381\&\fItarget\fR. For example, to display all the target-specific
1382optimization options, use:
1383.Sp
1384.Vb 1
1385\& \-\-help=target,optimizers
1386.Ve
1387.Sp
1388The \fB\-\-help=\fR option can be repeated on the command line. Each
1389successive use displays its requested class of options, skipping
1390those that have already been displayed.
1391.Sp
1392If 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
1395options, an indication is given as to whether the option is enabled,
1396disabled or set to a specific value (assuming that the compiler
1397knows this at the point where the \fB\-\-help=\fR option is used).
1398.Sp
1399Here 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
1409The output is sensitive to the effects of previous command-line
1410options, so for example it is possible to find out which optimizations
1411are enabled at \fB\-O2\fR by using:
1412.Sp
1413.Vb 1
1414\& \-Q \-O2 \-\-help=optimizers
1415.Ve
1416.Sp
1417Alternatively you can discover which binary optimizations are enabled
1418by \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"
1428Do not expand any symbolic links, resolve references to \fB/../\fR
1429or \fB/./\fR, or make the path absolute when generating a relative
1430prefix.
1431.IP "\fB\-\-version\fR" 4
1432.IX Item "--version"
1433Display the version number and copyrights of the invoked \s-1GCC\s0.
1434.IP "\fB\-wrapper\fR" 4
1435.IX Item "-wrapper"
1436Invoke all subcommands under a wrapper program. The name of the
1437wrapper program and its parameters are passed as a comma separated
1438list.
1439.Sp
1440.Vb 1
1441\& gcc \-c t.c \-wrapper gdb,\-\-args
1442.Ve
1443.Sp
1444This 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"
1449Load the plugin code in file \fIname\fR.so, assumed to be a
1450shared object to be dlopen'd by the compiler. The base name of
1451the shared object file is used to identify the plugin for the
1452purposes of argument parsing (See
1453\&\fB\-fplugin\-arg\-\fR\fIname\fR\fB\-\fR\fIkey\fR\fB=\fR\fIvalue\fR below).
1454Each plugin should define the callback functions specified in the
1455Plugins \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"
1458Define an argument called \fIkey\fR with a value of \fIvalue\fR
1459for the plugin called \fIname\fR.
1460.IP "\fB\-fdump\-ada\-spec\fR[\fB\-slim\fR]" 4
1461.IX Item "-fdump-ada-spec[-slim]"
1462For C and \*(C+ source and include files, generate corresponding Ada
1463specs.
1464.IP "\fB\-fdump\-go\-spec=\fR\fIfile\fR" 4
1465.IX Item "-fdump-go-spec=file"
1466For input files in any language, generate corresponding Go
1467declarations 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
1469useful way to start writing a Go interface to code written in some
1470other language.
1471.IP "\fB@\fR\fIfile\fR" 4
1472.IX Item "@file"
1473Read command-line options from \fIfile\fR. The options read are
1474inserted in place of the original @\fIfile\fR option. If \fIfile\fR
1475does not exist, or cannot be read, then the option will be treated
1476literally, and not removed.
1477.Sp
1478Options in \fIfile\fR are separated by whitespace. A whitespace
1479character may be included in an option by surrounding the entire
1480option in either single or double quotes. Any character (including a
1481backslash) may be included by prefixing the character to be included
1482with 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
1490preprocessed \*(C+ files use the suffix \fB.ii\fR. \s-1GCC\s0 recognizes
1491files with these names and compiles them as \*(C+ programs even if you
1492call the compiler the same way as for compiling C programs (usually
1493with the name \fBgcc\fR).
1494.PP
1495However, 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
1497against 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
1499files unless \fB\-x\fR is used. This program is also useful when
1500precompiling a C header file with a \fB.h\fR extension for use in \*(C+
1501compilations. On many systems, \fBg++\fR is also installed with
1502the name \fBc++\fR.
1503.PP
1504When you compile \*(C+ programs, you may specify many of the same
1505command-line options that you use for compiling programs in any
1506language; or command-line options meaningful for C and related
1507languages; or options that are meaningful only for \*(C+ programs.
1508.SS "Options Controlling C Dialect"
1509.IX Subsection "Options Controlling C Dialect"
1510The following options control the dialect of C (or languages derived
1511from C, such as \*(C+, Objective-C and Objective\-\*(C+) that the compiler
1512accepts:
1513.IP "\fB\-ansi\fR" 4
1514.IX Item "-ansi"
1515In C mode, this is equivalent to \fB\-std=c90\fR. In \*(C+ mode, it is
1516equivalent to \fB\-std=c++98\fR.
1517.Sp
1518This turns off certain features of \s-1GCC\s0 that are incompatible with \s-1ISO\s0
1519C90 (when compiling C code), or of standard \*(C+ (when compiling \*(C+ code),
1520such as the \f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`typeof\*(C'\fR keywords, and
1521predefined macros such as \f(CW\*(C`unix\*(C'\fR and \f(CW\*(C`vax\*(C'\fR that identify the
1522type of system you are using. It also enables the undesirable and
1523rarely used \s-1ISO\s0 trigraph feature. For the C compiler,
1524it disables recognition of \*(C+ style \fB//\fR comments as well as
1525the \f(CW\*(C`inline\*(C'\fR keyword.
1526.Sp
1527The 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
1530course, but it is useful to put them in header files that might be included
1531in compilations done with \fB\-ansi\fR. Alternate predefined macros
1532such as \f(CW\*(C`_\|_unix_\|_\*(C'\fR and \f(CW\*(C`_\|_vax_\|_\*(C'\fR are also available, with or
1533without \fB\-ansi\fR.
1534.Sp
1535The \fB\-ansi\fR option does not cause non-ISO programs to be
1536rejected gratuitously. For that, \fB\-Wpedantic\fR is required in
1537addition to \fB\-ansi\fR.
1538.Sp
1539The macro \f(CW\*(C`_\|_STRICT_ANSI_\|_\*(C'\fR is predefined when the \fB\-ansi\fR
1540option is used. Some header files may notice this macro and refrain
1541from 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
1543programs that might use these names for other things.
1544.Sp
1545Functions that are normally built in but do not have semantics
1546defined by \s-1ISO\s0 C (such as \f(CW\*(C`alloca\*(C'\fR and \f(CW\*(C`ffs\*(C'\fR) are not built-in
1547functions when \fB\-ansi\fR is used.
1548.IP "\fB\-std=\fR" 4
1549.IX Item "-std="
1550Determine the language standard. This option
1551is currently only supported when compiling C or \*(C+.
1552.Sp
1553The 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
1556compiler accepts all programs following that standard plus those
1557using \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
1559incompatible with \s-1ISO\s0 C90, such as the \f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`typeof\*(C'\fR
1560keywords, 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
1562expression. On the other hand, when a \s-1GNU\s0 dialect of a standard is
1563specified, all features supported by the compiler are enabled, even when
1564those features change the meaning of the base standard. As a result, some
1565strict-conforming programs may be rejected. The particular standard
1566is used by \fB\-Wpedantic\fR to identify which features are \s-1GNU\s0
1567extensions given that version of the standard. For example
1568\&\fB\-std=gnu90 \-Wpedantic\fR warns about \*(C+ style \fB//\fR
1569comments, while \fB\-std=gnu99 \-Wpedantic\fR does not.
1570.Sp
1571A 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
1581Support all \s-1ISO\s0 C90 programs (certain \s-1GNU\s0 extensions that conflict
1582with \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
1598names \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.
1608Support is incomplete and experimental. The name \fBc1x\fR is
1609deprecated.
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
1617is 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,
1625this 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
1633name \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
1640The 1998 \s-1ISO\s0 \*(C+ standard plus the 2003 technical corrigendum and some
1641additional 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
1656The 2011 \s-1ISO\s0 \*(C+ standard plus amendments. Support for \*(C+11 is still
1657experimental, and may change in incompatible ways in future releases.
1658The 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
1666experimental, and may change in incompatible ways in future releases.
1667The name \fBgnu++0x\fR is deprecated.
1668.IP "\fBc++1y\fR" 4
1669.IX Item "c++1y"
1670The next revision of the \s-1ISO\s0 \*(C+ standard, tentatively planned for
16712017. Support is highly experimental, and will almost certainly
1672change 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,
1676and will almost certainly change in incompatible ways in future
1677releases.
1678.RE
1679.RS 4
1680.RE
1681.IP "\fB\-fgnu89\-inline\fR" 4
1682.IX Item "-fgnu89-inline"
1683The 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
1686is accepted and ignored by \s-1GCC\s0 versions 4.1.3 up to but not including
16874.3. In \s-1GCC\s0 versions 4.3 and later it changes the behavior of \s-1GCC\s0 in
1688C99 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
1691The option \fB\-fno\-gnu89\-inline\fR explicitly tells \s-1GCC\s0 to use the
1692C99 semantics for \f(CW\*(C`inline\*(C'\fR when in C99 or gnu99 mode (i.e., it
1693specifies 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
1697The 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
1699in effect for \f(CW\*(C`inline\*(C'\fR functions.
1700.IP "\fB\-aux\-info\fR \fIfilename\fR" 4
1701.IX Item "-aux-info filename"
1702Output to the given filename prototyped declarations for all functions
1703declared and/or defined in a translation unit, including those in header
1704files. This option is silently ignored in any language other than C.
1705.Sp
1706Besides declarations, the file indicates, in comments, the origin of
1707each declaration (source file and line), whether the declaration was
1708implicit, prototyped or unprototyped (\fBI\fR, \fBN\fR for new or
1709\&\fBO\fR for old, respectively, in the first character after the line
1710number and the colon), and whether it came from a declaration or a
1711definition (\fBC\fR or \fBF\fR, respectively, in the following
1712character). In the case of function definitions, a K&R\-style list of
1713arguments followed by their declarations is also provided, inside
1714comments, after the declaration.
1715.IP "\fB\-fallow\-parameterless\-variadic\-functions\fR" 4
1716.IX Item "-fallow-parameterless-variadic-functions"
1717Accept variadic functions without named parameters.
1718.Sp
1719Although it is possible to define such a function, this is not very
1720useful as it is not possible to read the arguments. This is only
1721supported for C as this construct is allowed by \*(C+.
1722.IP "\fB\-fno\-asm\fR" 4
1723.IX Item "-fno-asm"
1724Do not recognize \f(CW\*(C`asm\*(C'\fR, \f(CW\*(C`inline\*(C'\fR or \f(CW\*(C`typeof\*(C'\fR as a
1725keyword, so that code can use these words as identifiers. You can use
1726the keywords \f(CW\*(C`_\|_asm_\|_\*(C'\fR, \f(CW\*(C`_\|_inline_\|_\*(C'\fR and \f(CW\*(C`_\|_typeof_\|_\*(C'\fR
1727instead. \fB\-ansi\fR implies \fB\-fno\-asm\fR.
1728.Sp
1729In \*(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
1731use the \fB\-fno\-gnu\-keywords\fR flag instead, which has the same
1732effect. In C99 mode (\fB\-std=c99\fR or \fB\-std=gnu99\fR), this
1733switch 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
1741Don'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
1745more efficiently; for instance, calls to \f(CW\*(C`alloca\*(C'\fR may become single
1746instructions which adjust the stack directly, and calls to \f(CW\*(C`memcpy\*(C'\fR
1747may become inline copy loops. The resulting code is often both smaller
1748and faster, but since the function calls no longer appear as such, you
1749cannot set a breakpoint on those calls, nor can you change the behavior
1750of the functions by linking with a different library. In addition,
1751when a function is recognized as a built-in function, \s-1GCC\s0 may use
1752information about that function to warn about problems with calls to
1753that function, or to generate more efficient code, even if the
1754resulting code still contains calls to that function. For example,
1755warnings 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
1757known not to modify global memory.
1758.Sp
1759With the \fB\-fno\-builtin\-\fR\fIfunction\fR option
1760only the built-in function \fIfunction\fR is
1761disabled. \fIfunction\fR must not begin with \fB_\|_builtin_\fR. If a
1762function is named that is not built-in in this version of \s-1GCC\s0, this
1763option is ignored. There is no corresponding
1764\&\fB\-fbuiltin\-\fR\fIfunction\fR option; if you wish to enable
1765built-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"
1774Assert that compilation targets a hosted environment. This implies
1775\&\fB\-fbuiltin\fR. A hosted environment is one in which the
1776entire standard library is available, and in which \f(CW\*(C`main\*(C'\fR has a return
1777type of \f(CW\*(C`int\*(C'\fR. Examples are nearly everything except a kernel.
1778This is equivalent to \fB\-fno\-freestanding\fR.
1779.IP "\fB\-ffreestanding\fR" 4
1780.IX Item "-ffreestanding"
1781Assert that compilation targets a freestanding environment. This
1782implies \fB\-fno\-builtin\fR. A freestanding environment
1783is one in which the standard library may not exist, and program startup may
1784not necessarily be at \f(CW\*(C`main\*(C'\fR. The most obvious example is an \s-1OS\s0 kernel.
1785This is equivalent to \fB\-fno\-hosted\fR.
1786.IP "\fB\-fopenmp\fR" 4
1787.IX Item "-fopenmp"
1788Enable 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
1790compiler generates parallel code according to the OpenMP Application
1791Program Interface v3.0 <\fBhttp://www.openmp.org/\fR>. This option
1792implies \fB\-pthread\fR, and thus is only supported on targets that
1793have support for \fB\-pthread\fR.
1794.IP "\fB\-fgnu\-tm\fR" 4
1795.IX Item "-fgnu-tm"
1796When the option \fB\-fgnu\-tm\fR is specified, the compiler
1797generates code for the Linux variant of Intel's current Transactional
1798Memory \s-1ABI\s0 specification document (Revision 1.1, May 6 2009). This is
1799an experimental feature whose interface may change in future versions
1800of \s-1GCC\s0, as the official specification changes. Please note that not
1801all architectures are supported for this feature.
1802.Sp
1803For more information on \s-1GCC\s0's support for transactional memory,
1804.Sp
1805Note that the transactional memory feature is not supported with
1806non-call exceptions (\fB\-fnon\-call\-exceptions\fR).
1807.IP "\fB\-fms\-extensions\fR" 4
1808.IX Item "-fms-extensions"
1809Accept some non-standard constructs used in Microsoft header files.
1810.Sp
1811In \*(C+ code, this allows member names in structures to be similar
1812to previous types declarations.
1813.Sp
1814.Vb 4
1815\& typedef int UOW;
1816\& struct ABC {
1817\& UOW UOW;
1818\& };
1819.Ve
1820.Sp
1821Some cases of unnamed fields in structures and unions are only
1822accepted with this option.
1823.IP "\fB\-fplan9\-extensions\fR" 4
1824.IX Item "-fplan9-extensions"
1825Accept some non-standard constructs used in Plan 9 code.
1826.Sp
1827This enables \fB\-fms\-extensions\fR, permits passing pointers to
1828structures with anonymous fields to functions that expect pointers to
1829elements of the type of the field, and permits referring to anonymous
1830fields declared using a typedef. This is only
1831supported for C, not \*(C+.
1832.IP "\fB\-trigraphs\fR" 4
1833.IX Item "-trigraphs"
1834Support \s-1ISO\s0 C trigraphs. The \fB\-ansi\fR option (and \fB\-std\fR
1835options 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
1842Formerly, these options caused \s-1GCC\s0 to attempt to emulate a pre-standard
1843C compiler. They are now only supported with the \fB\-E\fR switch.
1844The 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"
1848Allow conditional expressions with mismatched types in the second and
1849third arguments. The value of such an expression is void. This option
1850is not supported for \*(C+.
1851.IP "\fB\-flax\-vector\-conversions\fR" 4
1852.IX Item "-flax-vector-conversions"
1853Allow implicit conversions between vectors with differing numbers of
1854elements and/or incompatible element types. This option should not be
1855used for new code.
1856.IP "\fB\-funsigned\-char\fR" 4
1857.IX Item "-funsigned-char"
1858Let the type \f(CW\*(C`char\*(C'\fR be unsigned, like \f(CW\*(C`unsigned char\*(C'\fR.
1859.Sp
1860Each kind of machine has a default for what \f(CW\*(C`char\*(C'\fR should
1861be. 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
1864Ideally, 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.
1866But many programs have been written to use plain \f(CW\*(C`char\*(C'\fR and
1867expect it to be signed, or expect it to be unsigned, depending on the
1868machines they were written for. This option, and its inverse, let you
1869make such a program work with the opposite default.
1870.Sp
1871The 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
1873is always just like one of those two.
1874.IP "\fB\-fsigned\-char\fR" 4
1875.IX Item "-fsigned-char"
1876Let the type \f(CW\*(C`char\*(C'\fR be signed, like \f(CW\*(C`signed char\*(C'\fR.
1877.Sp
1878Note that this is equivalent to \fB\-fno\-unsigned\-char\fR, which is
1879the 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
1891These options control whether a bit-field is signed or unsigned, when the
1892declaration does not use either \f(CW\*(C`signed\*(C'\fR or \f(CW\*(C`unsigned\*(C'\fR. By
1893default, such a bit-field is signed, because this is consistent: the
1894basic 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"
1897This section describes the command-line options that are only meaningful
1898for \*(C+ programs. You can also use most of the \s-1GNU\s0 compiler options
1899regardless of what language your program is in. For example, you
1900might 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
1906In this example, only \fB\-frepo\fR is an option meant
1907only for \*(C+ programs; you can use the other options with any
1908language supported by \s-1GCC\s0.
1909.PP
1910Here 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"
1913Use version \fIn\fR of the \*(C+ \s-1ABI\s0. The default is version 2.
1914.Sp
1915Version 0 refers to the version conforming most closely to
1916the \*(C+ \s-1ABI\s0 specification. Therefore, the \s-1ABI\s0 obtained using version 0
1917will change in different versions of G++ as \s-1ABI\s0 bugs are fixed.
1918.Sp
1919Version 1 is the version of the \*(C+ \s-1ABI\s0 that first appeared in G++ 3.2.
1920.Sp
1921Version 2 is the version of the \*(C+ \s-1ABI\s0 that first appeared in G++ 3.4.
1922.Sp
1923Version 3 corrects an error in mangling a constant address as a
1924template argument.
1925.Sp
1926Version 4, which first appeared in G++ 4.5, implements a standard
1927mangling for vector types.
1928.Sp
1929Version 5, which first appeared in G++ 4.6, corrects the mangling of
1930attribute const/volatile on function pointer types, decltype of a
1931plain decl, and use of a function parameter in the declaration of
1932another parameter.
1933.Sp
1934Version 6, which first appeared in G++ 4.7, corrects the promotion
1935behavior of \*(C+11 scoped enums and the mangling of template argument
1936packs, const/static_cast, prefix ++ and \-\-, and a class scope function
1937used as a template argument.
1938.Sp
1939See also \fB\-Wabi\fR.
1940.IP "\fB\-fno\-access\-control\fR" 4
1941.IX Item "-fno-access-control"
1942Turn off all access checking. This switch is mainly useful for working
1943around bugs in the access control code.
1944.IP "\fB\-fcheck\-new\fR" 4
1945.IX Item "-fcheck-new"
1946Check that the pointer returned by \f(CW\*(C`operator new\*(C'\fR is non-null
1947before attempting to modify the storage allocated. This check is
1948normally 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
1951return 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
1953exhaustion 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"
1957Set the maximum nested evaluation depth for \*(C+11 constexpr functions
1958to \fIn\fR. A limit is needed to detect endless recursion during
1959constant expression evaluation. The minimum specified by the standard
1960is 512.
1961.IP "\fB\-fdeduce\-init\-list\fR" 4
1962.IX Item "-fdeduce-init-list"
1963Enable 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
1978This deduction was implemented as a possible extension to the
1979originally proposed semantics for the \*(C+11 standard, but was not part
1980of the final standard, so it is disabled by default. This option is
1981deprecated, and may be removed in a future version of G++.
1982.IP "\fB\-ffriend\-injection\fR" 4
1983.IX Item "-ffriend-injection"
1984Inject friend functions into the enclosing namespace, so that they are
1985visible outside the scope of the class in which they are declared.
1986Friend functions were documented to work this way in the old Annotated
1987\&\*(C+ Reference Manual, and versions of G++ before 4.1 always worked
1988that way. However, in \s-1ISO\s0 \*(C+ a friend function that is not declared
1989in an enclosing scope can only be found using argument dependent
1990lookup. This option causes friends to be injected as they were in
1991earlier releases.
1992.Sp
1993This option is for compatibility, and may be removed in a future
1994release of G++.
1995.IP "\fB\-fno\-elide\-constructors\fR" 4
1996.IX Item "-fno-elide-constructors"
1997The \*(C+ standard allows an implementation to omit creating a temporary
1998that is only used to initialize another object of the same type.
1999Specifying this option disables that optimization, and forces G++ to
2000call the copy constructor in all cases.
2001.IP "\fB\-fno\-enforce\-eh\-specs\fR" 4
2002.IX Item "-fno-enforce-eh-specs"
2003Don't generate code to check for violation of exception specifications
2004at run time. This option violates the \*(C+ standard, but may be useful
2005for reducing code size in production builds, much like defining
2006\&\fB\s-1NDEBUG\s0\fR. This does not give user code permission to throw
2007exceptions in violation of the exception specifications; the compiler
2008still optimizes based on the specifications, so throwing an
2009unexpected 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
2016The \*(C+11 and OpenMP standards allow \fBthread_local\fR and
2017\&\fBthreadprivate\fR variables to have dynamic (runtime)
2018initialization. To support this, any use of such a variable goes
2019through a wrapper function that performs any necessary initialization.
2020When the use and definition of the variable are in the same
2021translation unit, this overhead can be optimized away, but when the
2022use is in a different translation unit there is significant overhead
2023even if the variable doesn't actually need dynamic initialization. If
2024the programmer can be sure that no use of the variable in a
2025non-defining \s-1TU\s0 needs to trigger dynamic initialization (either
2026because the variable is statically initialized, or a use of the
2027variable in the defining \s-1TU\s0 will be executed before any uses in
2028another \s-1TU\s0), they can avoid this overhead with the
2029\&\fB\-fno\-extern\-tls\-init\fR option.
2030.Sp
2031On targets that support symbol aliases, the default is
2032\&\fB\-fextern\-tls\-init\fR. On targets that do not support symbol
2033aliases, 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
2040If \fB\-ffor\-scope\fR is specified, the scope of variables declared in
2041a \fIfor-init-statement\fR is limited to the \fBfor\fR loop itself,
2042as specified by the \*(C+ standard.
2043If \fB\-fno\-for\-scope\fR is specified, the scope of variables declared in
2044a \fIfor-init-statement\fR extends to the end of the enclosing scope,
2045as was the case in old versions of G++, and other (traditional)
2046implementations of \*(C+.
2047.Sp
2048If neither flag is given, the default is to follow the standard,
2049but to allow and give a warning for old-style code that would
2050otherwise be invalid, or have different behavior.
2051.IP "\fB\-fno\-gnu\-keywords\fR" 4
2052.IX Item "-fno-gnu-keywords"
2053Do not recognize \f(CW\*(C`typeof\*(C'\fR as a keyword, so that code can use this
2054word 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"
2058Never emit code for non-inline templates that are instantiated
2059implicitly (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"
2062Don't emit code for implicit instantiations of inline templates, either.
2063The default is to handle inlines differently so that compiles with and
2064without optimization need the same set of explicit instantiations.
2065.IP "\fB\-fno\-implement\-inlines\fR" 4
2066.IX Item "-fno-implement-inlines"
2067To save space, do not emit out-of-line copies of inline functions
2068controlled by \fB#pragma implementation\fR. This causes linker
2069errors if these functions are not inlined everywhere they are called.
2070.IP "\fB\-fms\-extensions\fR" 4
2071.IX Item "-fms-extensions"
2072Disable Wpedantic warnings about constructs used in \s-1MFC\s0, such as implicit
2073int 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"
2076Disable 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"
2081Treat 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
2083overhead relative to a function with no exception specification. If
2084the function has local variables of types with non-trivial
2085destructors, the exception specification actually makes the
2086function smaller because the \s-1EH\s0 cleanups for those variables can be
2087optimized away. The semantic effect is that an exception thrown out of
2088a function with such an exception specification results in a call
2089to \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"
2092Do 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
2094synonyms as keywords.
2095.IP "\fB\-fno\-optional\-diags\fR" 4
2096.IX Item "-fno-optional-diags"
2097Disable diagnostics that the standard says a compiler does not need to
2098issue. Currently, the only such diagnostic issued by G++ is the one for
2099a name having multiple meanings within a class.
2100.IP "\fB\-fpermissive\fR" 4
2101.IX Item "-fpermissive"
2102Downgrade some diagnostics about nonconformant code from errors to
2103warnings. Thus, using \fB\-fpermissive\fR allows some
2104nonconforming code to compile.
2105.IP "\fB\-fno\-pretty\-templates\fR" 4
2106.IX Item "-fno-pretty-templates"
2107When an error message refers to a specialization of a function
2108template, the compiler normally prints the signature of the
2109template followed by the template arguments and any typedefs or
2110typenames in the signature (e.g. \f(CW\*(C`void f(T) [with T = int]\*(C'\fR
2111rather than \f(CW\*(C`void f(int)\*(C'\fR) so that it's clear which template is
2112involved. When an error message refers to a specialization of a class
2113template, the compiler omits any template arguments that match
2114the default template arguments for that template. If either of these
2115behaviors make it harder to understand the error message rather than
2116easier, you can use \fB\-fno\-pretty\-templates\fR to disable them.
2117.IP "\fB\-frepo\fR" 4
2118.IX Item "-frepo"
2119Enable automatic template instantiation at link time. This option also
2120implies \fB\-fno\-implicit\-templates\fR.
2121.IP "\fB\-fno\-rtti\fR" 4
2122.IX Item "-fno-rtti"
2123Disable generation of information about every class with virtual
2124functions for use by the \*(C+ run-time type identification features
2125(\fBdynamic_cast\fR and \fBtypeid\fR). If you don't use those parts
2126of the language, you can save some space by using this flag. Note that
2127exception handling uses the same information, but G++ generates it as
2128needed. The \fBdynamic_cast\fR operator can still be used for casts that
2129do not require run-time type information, i.e. casts to \f(CW\*(C`void *\*(C'\fR or to
2130unambiguous base classes.
2131.IP "\fB\-fstats\fR" 4
2132.IX Item "-fstats"
2133Emit statistics about front-end processing at the end of the compilation.
2134This information is generally only useful to the G++ development team.
2135.IP "\fB\-fstrict\-enums\fR" 4
2136.IX Item "-fstrict-enums"
2137Allow the compiler to optimize using the assumption that a value of
2138enumerated type can only be one of the values of the enumeration (as
2139defined in the \*(C+ standard; basically, a value that can be
2140represented in the minimum number of bits needed to represent all the
2141enumerators). This assumption may not be valid if the program uses a
2142cast 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"
2145Set the maximum number of template instantiation notes for a single
2146warning 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"
2149Set the maximum instantiation depth for template classes to \fIn\fR.
2150A limit on the template instantiation depth is needed to detect
2151endless recursions during template class instantiation. \s-1ANSI/ISO\s0 \*(C+
2152conforming 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
2154can 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"
2157Do 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
2159option to reduce code size slightly in code that doesn't need to be
2160thread-safe.
2161.IP "\fB\-fuse\-cxa\-atexit\fR" 4
2162.IX Item "-fuse-cxa-atexit"
2163Register 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.
2165This option is required for fully standards-compliant handling of static
2166destructors, 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"
2170Don't use the \f(CW\*(C`_\|_cxa_get_exception_ptr\*(C'\fR runtime routine. This
2171causes \f(CW\*(C`std::uncaught_exception\*(C'\fR to be incorrect, but is necessary
2172if the runtime routine is not available.
2173.IP "\fB\-fvisibility\-inlines\-hidden\fR" 4
2174.IX Item "-fvisibility-inlines-hidden"
2175This switch declares that the user does not attempt to compare
2176pointers to inline functions or methods where the addresses of the two functions
2177are taken in different shared objects.
2178.Sp
2179The 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
2181appear in the export table of a \s-1DSO\s0 and do not require a \s-1PLT\s0 indirection
2182when used within the \s-1DSO\s0. Enabling this option can have a dramatic effect
2183on load and link times of a \s-1DSO\s0 as it massively reduces the size of the
2184dynamic export table when the library makes heavy use of templates.
2185.Sp
2186The behavior of this switch is not quite the same as marking the
2187methods as hidden directly, because it does not affect static variables
2188local to the function or cause the compiler to deduce that
2189the function is defined in only one shared object.
2190.Sp
2191You may mark a method as having a visibility explicitly to negate the
2192effect of the switch for that method. For example, if you do want to
2193compare pointers to a particular inline method, you might mark it as
2194having default visibility. Marking the enclosing class with explicit
2195visibility has no effect.
2196.Sp
2197Explicitly instantiated inline methods are unaffected by this option
2198as their linkage might otherwise cross a shared library boundary.
2199.IP "\fB\-fvisibility\-ms\-compat\fR" 4
2200.IX Item "-fvisibility-ms-compat"
2201This flag attempts to use visibility settings to make \s-1GCC\s0's \*(C+
2202linkage model compatible with that of Microsoft Visual Studio.
2203.Sp
2204The flag makes these changes to \s-1GCC\s0's linkage model:
2205.RS 4
2206.IP "1." 4
2207It sets the default visibility to \f(CW\*(C`hidden\*(C'\fR, like
2208\&\fB\-fvisibility=hidden\fR.
2209.IP "2." 4
2210Types, but not their members, are not hidden by default.
2211.IP "3." 4
2212The One Definition Rule is relaxed for types without explicit
2213visibility specifications that are defined in more than one
2214shared object: those declarations are permitted if they are
2215permitted when this option is not used.
2216.RE
2217.RS 4
2218.Sp
2219In new code it is better to use \fB\-fvisibility=hidden\fR and
2220export those classes that are intended to be externally visible.
2221Unfortunately it is possible for code to rely, perhaps accidentally,
2222on the Visual Studio behavior.
2223.Sp
2224Among the consequences of these changes are that static data members
2225of the same type with the same name but defined in different shared
2226objects are different, so changing one does not change the other;
2227and that pointers to function members defined in different shared
2228objects may not compare equal. When this flag is given, it is a
2229violation 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"
2233Do not use weak symbol support, even if it is provided by the linker.
2234By default, G++ uses weak symbols if they are available. This
2235option exists only for testing, and should not be used by end-users;
2236it results in inferior code and has no benefits. This option may
2237be removed in a future release of G++.
2238.IP "\fB\-nostdinc++\fR" 4
2239.IX Item "-nostdinc++"
2240Do not search for header files in the standard directories specific to
2241\&\*(C+, but do still search the other standard directories. (This option
2242is used when building the \*(C+ library.)
2243.PP
2244In addition, these optimization, warning, and code generation options
2245have meanings only for \*(C+ programs:
2246.IP "\fB\-fno\-default\-inline\fR" 4
2247.IX Item "-fno-default-inline"
2248Do not assume \fBinline\fR for functions defined inside a class scope.
2249 Note that these
2250functions have linkage like inline functions; they just aren't
2251inlined 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)"
2254Warn when G++ generates code that is probably not compatible with the
2255vendor-neutral \*(C+ \s-1ABI\s0. Although an effort has been made to warn about
2256all such cases, there are probably some cases that are not warned about,
2257even though G++ is generating incompatible code. There may also be
2258cases where warnings are emitted even though the code that is generated
2259is compatible.
2260.Sp
2261You should rewrite your code to avoid these warnings if you are
2262concerned about the fact that code generated by G++ may not be binary
2263compatible with code generated by other compilers.
2264.Sp
2265The known incompatibilities in \fB\-fabi\-version=2\fR (the default) include:
2266.RS 4
2267.IP "\(bu" 4
2268A template with a non-type template parameter of reference type is
2269mangled 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
2277This 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
2280mangled in a non-standard way that does not allow for overloading of
2281functions taking vectors of different sizes.
2282.Sp
2283The mangling is changed in \fB\-fabi\-version=4\fR.
2284.RE
2285.RS 4
2286.Sp
2287The known incompatibilities in \fB\-fabi\-version=1\fR include:
2288.IP "\(bu" 4
2289Incorrect handling of tail-padding for bit-fields. G++ may attempt to
2290pack 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
2297In this case, G++ places \f(CW\*(C`B::f2\*(C'\fR into the same byte
2298as \f(CW\*(C`A::f1\*(C'\fR; other compilers do not. You can avoid this problem
2299by explicitly padding \f(CW\*(C`A\*(C'\fR so that its size is a multiple of the
2300byte size on your platform; that causes G++ and other compilers to
2301lay out \f(CW\*(C`B\*(C'\fR identically.
2302.IP "\(bu" 4
2303Incorrect handling of tail-padding for virtual bases. G++ does not use
2304tail 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
2312In 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
2314explicitly padding \f(CW\*(C`A\*(C'\fR so that its size is a multiple of its
2315alignment (ignoring virtual base classes); that causes G++ and other
2316compilers to lay out \f(CW\*(C`C\*(C'\fR identically.
2317.IP "\(bu" 4
2318Incorrect handling of bit-fields with declared widths greater than that
2319of their underlying types, when the bit-fields appear in a union. For
2320example:
2321.Sp
2322.Vb 1
2323\& union U { int i : 4096; };
2324.Ve
2325.Sp
2326Assuming that an \f(CW\*(C`int\*(C'\fR does not have 4096 bits, G++ makes the
2327union too small by the number of bits in an \f(CW\*(C`int\*(C'\fR.
2328.IP "\(bu" 4
2329Empty 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
2342G++ places the \f(CW\*(C`A\*(C'\fR base class of \f(CW\*(C`C\*(C'\fR at a nonzero offset;
2343it 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
2346Names of template functions whose types involve \f(CW\*(C`typename\*(C'\fR or
2347template 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
2357Instantiations of these templates may be mangled incorrectly.
2358.RE
2359.RS 4
2360.Sp
2361It also warns about psABI-related changes. The known psABI changes at this
2362point include:
2363.IP "\(bu" 4
2364For SysV/x86\-64, unions with \f(CW\*(C`long double\*(C'\fR members are
2365passed 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)"
2380Warn when a class seems unusable because all the constructors or
2381destructors in that class are private, and it has neither friends nor
2382public static member functions. Also warn if there are no non-private
2383methods, and there's at least one private member function that isn't
2384a 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)"
2387Warn when \fBdelete\fR is used to destroy an instance of a class that
2388has virtual functions and non-virtual destructor. It is unsafe to delete
2389an instance of a derived class through a pointer to a base class if the
2390base class does not have a virtual destructor. This warning is enabled
2391by \fB\-Wall\fR.
2392.IP "\fB\-Wliteral\-suffix\fR (\*(C+ and Objective\-\*(C+ only)" 4
2393.IX Item "-Wliteral-suffix ( and Objective- only)"
2394Warn when a string or character literal is followed by a ud-suffix which does
2395not begin with an underscore. As a conforming extension, \s-1GCC\s0 treats such
2396suffixes as separate preprocessing tokens in order to maintain backwards
2397compatibility with code that uses formatting macros from \f(CW\*(C`<inttypes.h>\*(C'\fR.
2398For 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
2411In this case, \f(CW\*(C`PRId64\*(C'\fR is treated as a separate preprocessing token.
2412.Sp
2413This warning is enabled by default.
2414.IP "\fB\-Wnarrowing\fR (\*(C+ and Objective\-\*(C+ only)" 4
2415.IX Item "-Wnarrowing ( and Objective- only)"
2416Warn 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
2423This flag is included in \fB\-Wall\fR and \fB\-Wc++11\-compat\fR.
2424.Sp
2425With \fB\-std=c++11\fR, \fB\-Wno\-narrowing\fR suppresses the diagnostic
2426required by the standard. Note that this does not affect the meaning
2427of well-formed code; narrowing conversions are still considered
2428ill-formed in \s-1SFINAE\s0 context.
2429.IP "\fB\-Wnoexcept\fR (\*(C+ and Objective\-\*(C+ only)" 4
2430.IX Item "-Wnoexcept ( and Objective- only)"
2431Warn when a noexcept-expression evaluates to false because of a call
2432to a function that does not have a non-throwing exception
2433specification (i.e. \fB\f(BIthrow()\fB\fR or \fBnoexcept\fR) but is known by
2434the 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)"
2437Warn when a class has virtual functions and an accessible non-virtual
2438destructor, in which case it is possible but unsafe to delete
2439an instance of a derived class through a pointer to the base class.
2440This 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)"
2443Warn when the order of member initializers given in the code does not
2444match 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
2454The compiler rearranges the member initializers for \fBi\fR
2455and \fBj\fR to match the declaration order of the members, emitting
2456a 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)"
2459Accept imaginary, fixed-point, or machine-defined
2460literal number suffixes as \s-1GNU\s0 extensions.
2461When this option is turned off these suffixes are treated
2462as \*(C+11 user-defined literal numeric suffixes.
2463This 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.
2466This option is off by default
2467for \s-1ISO\s0 \*(C+11 onwards (\fB\-std=c++11\fR, ...).
2468.PP
2469The 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)"
2472Warn about violations of the following style guidelines from Scott Meyers'
2473\&\fIEffective \*(C+, Second Edition\fR book:
2474.RS 4
2475.IP "\(bu" 4
2476Item 11: Define a copy constructor and an assignment operator for classes
2477with dynamically-allocated memory.
2478.IP "\(bu" 4
2479Item 12: Prefer initialization to assignment in constructors.
2480.IP "\(bu" 4
2481Item 14: Make destructors virtual in base classes.
2482.IP "\(bu" 4
2483Item 15: Have \f(CW\*(C`operator=\*(C'\fR return a reference to \f(CW*this\fR.
2484.IP "\(bu" 4
2485Item 23: Don't try to return a reference when you must return an object.
2486.RE
2487.RS 4
2488.Sp
2489Also warn about violations of the following style guidelines from
2490Scott Meyers' \fIMore Effective \*(C+\fR book:
2491.IP "\(bu" 4
2492Item 6: Distinguish between prefix and postfix forms of increment and
2493decrement operators.
2494.IP "\(bu" 4
2495Item 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
2499When selecting this option, be aware that the standard library
2500headers do not obey all of these guidelines; use \fBgrep \-v\fR
2501to 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)"
2505Warn about the use of an uncasted \f(CW\*(C`NULL\*(C'\fR as sentinel. When
2506compiling only with \s-1GCC\s0 this is a valid sentinel, as \f(CW\*(C`NULL\*(C'\fR is defined
2507to \f(CW\*(C`_\|_null\*(C'\fR. Although it is a null pointer constant rather than a
2508null pointer, it is guaranteed to be of the same size as a pointer.
2509But 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)"
2512Disable warnings when non-templatized friend functions are declared
2513within a template. Since the advent of explicit template specification
2514support 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
2516friend declare or define an ordinary, nontemplate function. (Section
251714.5.3). Before G++ implemented explicit specification, unqualified-ids
2518could be interpreted as a particular specialization of a templatized
2519function. Because this non-conforming behavior is no longer the default
2520behavior for G++, \fB\-Wnon\-template\-friend\fR allows the compiler to
2521check existing code for potential trouble spots and is on by default.
2522This new compiler behavior can be turned off with
2523\&\fB\-Wno\-non\-template\-friend\fR, which keeps the conformant compiler code
2524but 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)"
2527Warn if an old-style (C\-style) cast to a non-void type is used within
2528a \*(C+ program. The new-style casts (\fBdynamic_cast\fR,
2529\&\fBstatic_cast\fR, \fBreinterpret_cast\fR, and \fBconst_cast\fR) are
2530less 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)"
2533Warn when a function declaration hides virtual functions from a
2534base 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
2546the \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
2547like:
2548.Sp
2549.Vb 2
2550\& B* b;
2551\& b\->f();
2552.Ve
2553.Sp
2554fails to compile.
2555.IP "\fB\-Wno\-pmf\-conversions\fR (\*(C+ and Objective\-\*(C+ only)" 4
2556.IX Item "-Wno-pmf-conversions ( and Objective- only)"
2557Disable the diagnostic for converting a bound pointer to member function
2558to a plain pointer.
2559.IP "\fB\-Wsign\-promo\fR (\*(C+ and Objective\-\*(C+ only)" 4
2560.IX Item "-Wsign-promo ( and Objective- only)"
2561Warn when overload resolution chooses a promotion from unsigned or
2562enumerated type to a signed type, over a conversion to an unsigned type of
2563the same size. Previous versions of G++ tried to preserve
2564unsignedness, 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+
2568languages themselves.
2569.PP
2570This section describes the command-line options that are only meaningful
2571for Objective-C and Objective\-\*(C+ programs. You can also use most of
2572the language-independent \s-1GNU\s0 compiler options.
2573For 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
2579In this example, \fB\-fgnu\-runtime\fR is an option meant only for
2580Objective-C and Objective\-\*(C+ programs; you can use the other options with
2581any language supported by \s-1GCC\s0.
2582.PP
2583Note that since Objective-C is an extension of the C language, Objective-C
2584compilations 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
2588Here is a list of options that are \fIonly\fR for compiling Objective-C
2589and Objective\-\*(C+ programs:
2590.IP "\fB\-fconstant\-string\-class=\fR\fIclass-name\fR" 4
2591.IX Item "-fconstant-string-class=class-name"
2592Use \fIclass-name\fR as the name of the class to instantiate for each
2593literal string specified with the syntax \f(CW\*(C`@"..."\*(C'\fR. The default
2594class 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
2598to be laid out as constant CoreFoundation strings.
2599.IP "\fB\-fgnu\-runtime\fR" 4
2600.IX Item "-fgnu-runtime"
2601Generate object code compatible with the standard \s-1GNU\s0 Objective-C
2602runtime. This is the default for most types of systems.
2603.IP "\fB\-fnext\-runtime\fR" 4
2604.IX Item "-fnext-runtime"
2605Generate output compatible with the NeXT runtime. This is the default
2606for 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
2608used.
2609.IP "\fB\-fno\-nil\-receivers\fR" 4
2610.IX Item "-fno-nil-receivers"
2611Assume that all Objective-C message dispatches (\f(CW\*(C`[receiver
2612message:arg]\*(C'\fR) in this translation unit ensure that the receiver is
2613not \f(CW\*(C`nil\*(C'\fR. This allows for more efficient entry points in the
2614runtime to be used. This option is only available in conjunction with
2615the 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"
2618Use version \fIn\fR of the Objective-C \s-1ABI\s0 for the selected runtime.
2619This option is currently supported only for the NeXT runtime. In that
2620case, Version 0 is the traditional (32\-bit) \s-1ABI\s0 without support for
2621properties and other Objective-C 2.0 additions. Version 1 is the
2622traditional (32\-bit) \s-1ABI\s0 with support for properties and other
2623Objective-C 2.0 additions. Version 2 is the modern (64\-bit) \s-1ABI\s0. If
2624nothing is specified, the default is Version 0 on 32\-bit target
2625machines, and Version 2 on 64\-bit target machines.
2626.IP "\fB\-fobjc\-call\-cxx\-cdtors\fR" 4
2627.IX Item "-fobjc-call-cxx-cdtors"
2628For 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
2630special \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR instance method which runs
2631non-trivial default constructors on any such instance variables, in order,
2632and then return \f(CW\*(C`self\*(C'\fR. Similarly, check if any instance variable
2633is a \*(C+ object with a non-trivial destructor, and if so, synthesize a
2634special \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR method which runs
2635all such default destructors, in reverse order.
2636.Sp
2637The \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR and \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR
2638methods thusly generated only operate on instance variables
2639declared in the current Objective-C class, and not those inherited
2640from superclasses. It is the responsibility of the Objective-C
2641runtime to invoke all such methods in an object's inheritance
2642hierarchy. The \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR methods are invoked
2643by the runtime immediately after a new object instance is allocated;
2644the \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR methods are invoked immediately
2645before the runtime deallocates an object instance.
2646.Sp
2647As of this writing, only the NeXT runtime on Mac \s-1OS\s0 X 10.4 and later has
2648support 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"
2652Allow fast jumps to the message dispatcher. On Darwin this is
2653accomplished via the comm page.
2654.IP "\fB\-fobjc\-exceptions\fR" 4
2655.IX Item "-fobjc-exceptions"
2656Enable syntactic support for structured exception handling in
2657Objective-C, similar to what is offered by \*(C+ and Java. This option
2658is 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
2661runtime and the NeXT runtime (but not available in conjunction with
2662the NeXT runtime on Mac \s-1OS\s0 X 10.2 and earlier).
2663.IP "\fB\-fobjc\-gc\fR" 4
2664.IX Item "-fobjc-gc"
2665Enable garbage collection (\s-1GC\s0) in Objective-C and Objective\-\*(C+
2666programs. This option is only available with the NeXT runtime; the
2667\&\s-1GNU\s0 runtime has a different garbage collection implementation that
2668does not require special compiler flags.
2669.IP "\fB\-fobjc\-nilcheck\fR" 4
2670.IX Item "-fobjc-nilcheck"
2671For the NeXT runtime with version 2 of the \s-1ABI\s0, check for a nil
2672receiver in method invocations before doing the actual method call.
2673This is the default and can be disabled using
2674\&\fB\-fno\-objc\-nilcheck\fR. Class methods and super calls are never
2675checked for nil in this way no matter what this flag is set to.
2676Currently this flag does nothing when the \s-1GNU\s0 runtime, or an older
2677version of the NeXT runtime \s-1ABI\s0, is used.
2678.IP "\fB\-fobjc\-std=objc1\fR" 4
2679.IX Item "-fobjc-std=objc1"
2680Conform to the language syntax of Objective-C 1.0, the language
2681recognized by \s-1GCC\s0 4.0. This only affects the Objective-C additions to
2682the C/\*(C+ language; it does not affect conformance to C/\*(C+ standards,
2683which is controlled by the separate C/\*(C+ dialect option flags. When
2684this option is used with the Objective-C or Objective\-\*(C+ compiler,
2685any Objective-C syntax that is not recognized by \s-1GCC\s0 4.0 is rejected.
2686This is useful if you need to make sure that your Objective-C code can
2687be compiled with older versions of \s-1GCC\s0.
2688.IP "\fB\-freplace\-objc\-classes\fR" 4
2689.IX Item "-freplace-objc-classes"
2690Emit a special marker instructing \fB\f(BIld\fB\|(1)\fR not to statically link in
2691the resulting object file, and allow \fB\f(BIdyld\fB\|(1)\fR to load it in at
2692run time instead. This is used in conjunction with the Fix-and-Continue
2693debugging mode, where the object file in question may be recompiled and
2694dynamically reloaded in the course of program execution, without the need
2695to restart the program itself. Currently, Fix-and-Continue functionality
2696is only available in conjunction with the NeXT runtime on Mac \s-1OS\s0 X 10.3
2697and later.
2698.IP "\fB\-fzero\-link\fR" 4
2699.IX Item "-fzero-link"
2700When compiling for the NeXT runtime, the compiler ordinarily replaces calls
2701to \f(CW\*(C`objc_getClass("...")\*(C'\fR (when the name of the class is known at
2702compile time) with static class references that get initialized at load time,
2703which improves run-time performance. Specifying the \fB\-fzero\-link\fR flag
2704suppresses this behavior and causes calls to \f(CW\*(C`objc_getClass("...")\*(C'\fR
2705to be retained. This is useful in Zero-Link debugging mode, since it allows
2706for individual class implementations to be modified during program execution.
2707The \s-1GNU\s0 runtime currently always retains calls to \f(CW\*(C`objc_get_class("...")\*(C'\fR
2708regardless of command-line options.
2709.IP "\fB\-gen\-decls\fR" 4
2710.IX Item "-gen-decls"
2711Dump interface declarations for all classes seen in the source file to a
2712file 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)"
2715Warn whenever an Objective-C assignment is being intercepted by the
2716garbage collector.
2717.IP "\fB\-Wno\-protocol\fR (Objective-C and Objective\-\*(C+ only)" 4
2718.IX Item "-Wno-protocol (Objective-C and Objective- only)"
2719If a class is declared to implement a protocol, a warning is issued for
2720every method in the protocol that is not implemented by the class. The
2721default behavior is to issue a warning for every method not explicitly
2722implemented in the class, even if a method implementation is inherited
2723from the superclass. If you use the \fB\-Wno\-protocol\fR option, then
2724methods inherited from the superclass are considered to be implemented,
2725and 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)"
2728Warn if multiple methods of different types for the same selector are
2729found during compilation. The check is performed on the list of methods
2730in the final stage of compilation. Additionally, a check is performed
2731for each selector appearing in a \f(CW\*(C`@selector(...)\*(C'\fR
2732expression, and a corresponding method for that selector has been found
2733during compilation. Because these checks scan the method table only at
2734the end of compilation, these warnings are not produced if the final
2735stage of compilation is not reached, for example because an error is
2736found during compilation, or because the \fB\-fsyntax\-only\fR option is
2737being 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)"
2740Warn if multiple methods with differing argument and/or return types are
2741found for a given selector when attempting to send a message using this
2742selector to a receiver of type \f(CW\*(C`id\*(C'\fR or \f(CW\*(C`Class\*(C'\fR. When this flag
2743is off (which is the default behavior), the compiler omits such warnings
2744if any differences found are confined to types that share the same size
2745and alignment.
2746.IP "\fB\-Wundeclared\-selector\fR (Objective-C and Objective\-\*(C+ only)" 4
2747.IX Item "-Wundeclared-selector (Objective-C and Objective- only)"
2748Warn if a \f(CW\*(C`@selector(...)\*(C'\fR expression referring to an
2749undeclared selector is found. A selector is considered undeclared if no
2750method 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
2753an \f(CW@implementation\fR section. This option always performs its
2754checks as soon as a \f(CW\*(C`@selector(...)\*(C'\fR expression is found,
2755while \fB\-Wselector\fR only performs its checks in the final stage of
2756compilation. This also enforces the coding style convention
2757that 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"
2760Generate C header describing the largest structure that is passed by
2761value, if any.
2762.SS "Options to Control Diagnostic Messages Formatting"
2763.IX Subsection "Options to Control Diagnostic Messages Formatting"
2764Traditionally, diagnostic messages have been formatted irrespective of
2765the output device's aspect (e.g. its width, ...). You can use the
2766options described below
2767to control the formatting algorithm for diagnostic messages,
2768e.g. how many characters per line, how often source location
2769information should be reported. Note that some language front ends may not
2770honor these options.
2771.IP "\fB\-fmessage\-length=\fR\fIn\fR" 4
2772.IX Item "-fmessage-length=n"
2773Try to format error messages so that they fit on lines of about \fIn\fR
2774characters. The default is 72 characters for \fBg++\fR and 0 for the rest of
2775the front ends supported by \s-1GCC\s0. If \fIn\fR is zero, then no
2776line-wrapping is done; each error message appears on a single
2777line.
2778.IP "\fB\-fdiagnostics\-show\-location=once\fR" 4
2779.IX Item "-fdiagnostics-show-location=once"
2780Only meaningful in line-wrapping mode. Instructs the diagnostic messages
2781reporter to emit source location information \fIonce\fR; that is, in
2782case the message is too long to fit on a single physical line and has to
2783be wrapped, the source location won't be emitted (as prefix) again,
2784over and over, in subsequent continuation lines. This is the default
2785behavior.
2786.IP "\fB\-fdiagnostics\-show\-location=every\-line\fR" 4
2787.IX Item "-fdiagnostics-show-location=every-line"
2788Only meaningful in line-wrapping mode. Instructs the diagnostic
2789messages reporter to emit the same source location information (as
2790prefix) for physical lines that result from the process of breaking
2791a 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"
2794By default, each diagnostic emitted includes text indicating the
2795command-line option that directly controls the diagnostic (if such an
2796option 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"
2800By default, each diagnostic emitted includes the original source line
2801and a caret '^' indicating the column. This option suppresses this
2802information.
2803.SS "Options to Request or Suppress Warnings"
2804.IX Subsection "Options to Request or Suppress Warnings"
2805Warnings are diagnostic messages that report constructions that
2806are not inherently erroneous but that are risky or suggest there
2807may have been an error.
2808.PP
2809The following language-independent options do not enable specific
2810warnings but control the kinds of diagnostics produced by \s-1GCC\s0.
2811.IP "\fB\-fsyntax\-only\fR" 4
2812.IX Item "-fsyntax-only"
2813Check 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"
2816Limits 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
2818code. If \fIn\fR is 0 (the default), there is no limit on the number
2819of error messages produced. If \fB\-Wfatal\-errors\fR is also
2820specified, then \fB\-Wfatal\-errors\fR takes precedence over this
2821option.
2822.IP "\fB\-w\fR" 4
2823.IX Item "-w"
2824Inhibit all warning messages.
2825.IP "\fB\-Werror\fR" 4
2826.IX Item "-Werror"
2827Make all warnings into errors.
2828.IP "\fB\-Werror=\fR" 4
2829.IX Item "-Werror="
2830Make the specified warning into an error. The specifier for a warning
2831is appended; for example \fB\-Werror=switch\fR turns the warnings
2832controlled by \fB\-Wswitch\fR into errors. This switch takes a
2833negative form, to be used to negate \fB\-Werror\fR for specific
2834warnings; for example \fB\-Wno\-error=switch\fR makes
2835\&\fB\-Wswitch\fR warnings not be errors, even when \fB\-Werror\fR
2836is in effect.
2837.Sp
2838The warning message for each controllable warning includes the
2839option 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
2844Note that specifying \fB\-Werror=\fR\fIfoo\fR automatically implies
2845\&\fB\-W\fR\fIfoo\fR. However, \fB\-Wno\-error=\fR\fIfoo\fR does not
2846imply anything.
2847.IP "\fB\-Wfatal\-errors\fR" 4
2848.IX Item "-Wfatal-errors"
2849This option causes the compiler to abort compilation on the first error
2850occurred rather than trying to keep going and printing further error
2851messages.
2852.PP
2853You can request many specific warnings with options beginning with
2854\&\fB\-W\fR, for example \fB\-Wimplicit\fR to request warnings on
2855implicit declarations. Each of these specific warning options also
2856has a negative form beginning \fB\-Wno\-\fR to turn off warnings; for
2857example, \fB\-Wno\-implicit\fR. This manual lists only one of the
2858two forms, whichever is not the default. For further
2859language-specific options also refer to \fB\*(C+ Dialect Options\fR and
2860\&\fBObjective-C and Objective\-\*(C+ Dialect Options\fR.
2861.PP
2862When an unrecognized warning option is requested (e.g.,
2863\&\fB\-Wunknown\-warning\fR), \s-1GCC\s0 emits a diagnostic stating
2864that the option is not recognized. However, if the \fB\-Wno\-\fR form
2865is used, the behavior is slightly different: no diagnostic is
2866produced for \fB\-Wno\-unknown\-warning\fR unless other diagnostics
2867are being produced. This allows the use of new \fB\-Wno\-\fR options
2868with old compilers, but if something goes wrong, the compiler
2869warns 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
2876Issue all the warnings demanded by strict \s-1ISO\s0 C and \s-1ISO\s0 \*(C+;
2877reject all programs that use forbidden extensions, and some other
2878programs that do not follow \s-1ISO\s0 C and \s-1ISO\s0 \*(C+. For \s-1ISO\s0 C, follows the
2879version of the \s-1ISO\s0 C standard specified by any \fB\-std\fR option used.
2880.Sp
2881Valid \s-1ISO\s0 C and \s-1ISO\s0 \*(C+ programs should compile properly with or without
2882this 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,
2884without this option, certain \s-1GNU\s0 extensions and traditional C and \*(C+
2885features 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
2888alternate keywords whose names begin and end with \fB_\|_\fR. Pedantic
2889warnings are also disabled in the expression that follows
2890\&\f(CW\*(C`_\|_extension_\|_\*(C'\fR. However, only system header files should use
2891these escape routes; application programs should avoid them.
2892.Sp
2893Some users try to use \fB\-Wpedantic\fR to check programs for strict \s-1ISO\s0
2894C conformance. They soon find that it does not do quite what they want:
2895it 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
2897diagnostics have been added.
2898.Sp
2899A feature to report any failure to conform to \s-1ISO\s0 C might be useful in
2900some instances, but would require considerable additional work and would
2901be quite different from \fB\-Wpedantic\fR. We don't have plans to
2902support such a feature in the near future.
2903.Sp
2904Where the standard specified with \fB\-std\fR represents a \s-1GNU\s0
2905extended dialect of C, such as \fBgnu90\fR or \fBgnu99\fR, there is a
2906corresponding \fIbase standard\fR, the version of \s-1ISO\s0 C on which the \s-1GNU\s0
2907extended dialect is based. Warnings from \fB\-Wpedantic\fR are given
2908where they are required by the base standard. (It does not make sense
2909for such warnings to be given only for features not in the specified \s-1GNU\s0
2910C dialect, since by definition the \s-1GNU\s0 dialects of C include all
2911features the compiler supports with the given option, and there would be
2912nothing to warn about.)
2913.IP "\fB\-pedantic\-errors\fR" 4
2914.IX Item "-pedantic-errors"
2915Like \fB\-Wpedantic\fR, except that errors are produced rather than
2916warnings.
2917.IP "\fB\-Wall\fR" 4
2918.IX Item "-Wall"
2919This enables all the warnings about constructions that some users
2920consider questionable, and that are easy to avoid (or modify to
2921prevent the warning), even in conjunction with macros. This also
2922enables some language-specific warnings described in \fB\*(C+ Dialect
2923Options\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
2958Note that some warning flags are not implied by \fB\-Wall\fR. Some of
2959them warn about constructions that users generally do not consider
2960questionable, but which occasionally you might wish to check for;
2961others warn about constructions that are necessary or hard to avoid in
2962some cases, and there is no simple way to modify the code to suppress
2963the warning. Some of them are enabled by \fB\-Wextra\fR but many of
2964them must be enabled individually.
2965.IP "\fB\-Wextra\fR" 4
2966.IX Item "-Wextra"
2967This 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
2969name 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
2984The option \fB\-Wextra\fR also prints warning messages for the
2985following cases:
2986.RS 4
2987.IP "\(bu" 4
2988A 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
2992conditional 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
3002constructor.
3003.RE
3004.RS 4
3005.RE
3006.IP "\fB\-Wchar\-subscripts\fR" 4
3007.IX Item "-Wchar-subscripts"
3008Warn if an array subscript has type \f(CW\*(C`char\*(C'\fR. This is a common cause
3009of error, as programmers often forget that this type is signed on some
3010machines.
3011This warning is enabled by \fB\-Wall\fR.
3012.IP "\fB\-Wcomment\fR" 4
3013.IX Item "-Wcomment"
3014Warn whenever a comment-start sequence \fB/*\fR appears in a \fB/*\fR
3015comment, or whenever a Backslash-Newline appears in a \fB//\fR comment.
3016This warning is enabled by \fB\-Wall\fR.
3017.IP "\fB\-Wno\-coverage\-mismatch\fR" 4
3018.IX Item "-Wno-coverage-mismatch"
3019Warn if feedback profiles do not match when using the
3020\&\fB\-fprofile\-use\fR option.
3021If a source file is changed between compiling with \fB\-fprofile\-gen\fR and
3022with \fB\-fprofile\-use\fR, the files with the profile feedback can fail
3023to match the source file and \s-1GCC\s0 cannot use the profile feedback
3024information. By default, this warning is enabled and is treated as an
3025error. \fB\-Wno\-coverage\-mismatch\fR can be used to disable the
3026warning or \fB\-Wno\-error=coverage\-mismatch\fR can be used to
3027disable the error. Disabling the error for this warning can result in
3028poorly optimized code and is useful only in the
3029case of very minor changes such as bug fixes to an existing code-base.
3030Completely 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
3035Suppress 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)"
3038Give a warning when a value of type \f(CW\*(C`float\*(C'\fR is implicitly
3039promoted to \f(CW\*(C`double\*(C'\fR. CPUs with a 32\-bit \*(L"single-precision\*(R"
3040floating-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
3042using \f(CW\*(C`double\*(C'\fR values is much more expensive because of the
3043overhead required for software emulation.
3044.Sp
3045It is easy to accidentally do computations with \f(CW\*(C`double\*(C'\fR because
3046floating-point literals are implicitly of type \f(CW\*(C`double\*(C'\fR. For
3047example, in:
3048.Sp
3049.Vb 4
3050\& float area(float radius)
3051\& {
3052\& return 3.14159 * radius * radius;
3053\& }
3054.Ve
3055.Sp
3056the compiler performs the entire computation with \f(CW\*(C`double\*(C'\fR
3057because 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
3064Check calls to \f(CW\*(C`printf\*(C'\fR and \f(CW\*(C`scanf\*(C'\fR, etc., to make sure that
3065the arguments supplied have types appropriate to the format string
3066specified, and that the conversions specified in the format string make
3067sense. This includes standard functions, and others specified by format
3068attributes, 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,
3070not in the C standard) families (or other target-specific families).
3071Which functions are checked without format attributes having been
3072specified depends on the standard version selected, and such checks of
3073functions without the attribute specified are disabled by
3074\&\fB\-ffreestanding\fR or \fB\-fno\-builtin\fR.
3075.Sp
3076The formats are checked against the format features supported by \s-1GNU\s0
3077libc version 2.2. These include all \s-1ISO\s0 C90 and C99 features, as well
3078as features from the Single Unix Specification and some \s-1BSD\s0 and \s-1GNU\s0
3079extensions. Other library implementations may not support all these
3080features; \s-1GCC\s0 does not support warning about features that go beyond a
3081particular library's limitations. However, if \fB\-Wpedantic\fR is used
3082with \fB\-Wformat\fR, warnings are given about format features not
3083in the selected standard version (but not for \f(CW\*(C`strfmon\*(C'\fR formats,
3084since 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
3092Option \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
3095functions, \fB\-Wformat\fR also implies \fB\-Wnonnull\fR. Some
3096aspects of this level of format checking can be disabled by the
3097options: \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"
3102If \fB\-Wformat\fR is specified, do not warn about format strings that
3103contain \s-1NUL\s0 bytes.
3104.IP "\fB\-Wno\-format\-extra\-args\fR" 4
3105.IX Item "-Wno-format-extra-args"
3106If \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
3108that such arguments are ignored.
3109.Sp
3110Where the unused arguments lie between used arguments that are
3111specified with \fB$\fR operand number specifications, normally
3112warnings are still given, since the implementation could not know what
3113type to pass to \f(CW\*(C`va_arg\*(C'\fR to skip the unused arguments. However,
3114in the case of \f(CW\*(C`scanf\*(C'\fR formats, this option suppresses the
3115warning if the unused arguments are all pointers, since the Single
3116Unix Specification says that such unused arguments are allowed.
3117.IP "\fB\-Wno\-format\-zero\-length\fR" 4
3118.IX Item "-Wno-format-zero-length"
3119If \fB\-Wformat\fR is specified, do not warn about zero-length formats.
3120The C standard specifies that zero-length formats are allowed.
3121.IP "\fB\-Wformat=2\fR" 4
3122.IX Item "-Wformat=2"
3123Enable \fB\-Wformat\fR plus additional format checks. Currently
3124equivalent to \fB\-Wformat \-Wformat\-nonliteral \-Wformat\-security
3125\&\-Wformat\-y2k\fR.
3126.IP "\fB\-Wformat\-nonliteral\fR" 4
3127.IX Item "-Wformat-nonliteral"
3128If \fB\-Wformat\fR is specified, also warn if the format string is not a
3129string literal and so cannot be checked, unless the format function
3130takes its format arguments as a \f(CW\*(C`va_list\*(C'\fR.
3131.IP "\fB\-Wformat\-security\fR" 4
3132.IX Item "-Wformat-security"
3133If \fB\-Wformat\fR is specified, also warn about uses of format
3134functions that represent possible security problems. At present, this
3135warns about calls to \f(CW\*(C`printf\*(C'\fR and \f(CW\*(C`scanf\*(C'\fR functions where the
3136format string is not a string literal and there are no format arguments,
3137as in \f(CW\*(C`printf (foo);\*(C'\fR. This may be a security hole if the format
3138string came from untrusted input and contains \fB\f(CB%n\fB\fR. (This is
3139currently a subset of what \fB\-Wformat\-nonliteral\fR warns about, but
3140in future warnings may be added to \fB\-Wformat\-security\fR that are not
3141included in \fB\-Wformat\-nonliteral\fR.)
3142.IP "\fB\-Wformat\-y2k\fR" 4
3143.IX Item "-Wformat-y2k"
3144If \fB\-Wformat\fR is specified, also warn about \f(CW\*(C`strftime\*(C'\fR
3145formats 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"
3151Warn about passing a null pointer for arguments marked as
3152requiring 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
3155can 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)"
3158Warn about uninitialized variables that are initialized with themselves.
3159Note this option can only be used with the \fB\-Wuninitialized\fR option.
3160.Sp
3161For example, \s-1GCC\s0 warns about \f(CW\*(C`i\*(C'\fR being uninitialized in the
3162following 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
3172This 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)"
3175Warn when a declaration does not specify a type.
3176This 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)"
3179Give a warning whenever a function is used before being declared. In
3180C99 mode (\fB\-std=c99\fR or \fB\-std=gnu99\fR), this warning is
3181enabled 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)"
3186Same as \fB\-Wimplicit\-int\fR and \fB\-Wimplicit\-function\-declaration\fR.
3187This 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)"
3190Warn if the return type of a function has a type qualifier
3191such as \f(CW\*(C`const\*(C'\fR. For \s-1ISO\s0 C such a type qualifier has no effect,
3192since the value returned by a function is not an lvalue.
3193For \*(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
3195definitions, so such return types always receive a warning
3196even without this option.
3197.Sp
3198This warning is also enabled by \fB\-Wextra\fR.
3199.IP "\fB\-Wmain\fR" 4
3200.IX Item "-Wmain"
3201Warn if the type of \fBmain\fR is suspicious. \fBmain\fR should be
3202a function with external linkage, returning int, taking either zero
3203arguments, two, or three arguments of appropriate types. This warning
3204is enabled by default in \*(C+ and is enabled by either \fB\-Wall\fR
3205or \fB\-Wpedantic\fR.
3206.IP "\fB\-Wmissing\-braces\fR" 4
3207.IX Item "-Wmissing-braces"
3208Warn if an aggregate or union initializer is not fully bracketed. In
3209the following example, the initializer for \fBa\fR is not fully
3210bracketed, but that for \fBb\fR is fully bracketed. This warning is
3211enabled 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
3218This 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)"
3221Warn if a user-supplied include directory does not exist.
3222.IP "\fB\-Wparentheses\fR" 4
3223.IX Item "-Wparentheses"
3224Warn if parentheses are omitted in certain contexts, such
3225as when there is an assignment in a context where a truth value
3226is expected, or when operators are nested whose precedence people
3227often get confused about.
3228.Sp
3229Also warn if a comparison like \fBx<=y<=z\fR appears; this is
3230equivalent to \fB(x<=y ? 1 : 0) <= z\fR, which is a different
3231interpretation from that of ordinary mathematical notation.
3232.Sp
3233Also 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
3235such 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
3247In 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
3249often not what the programmer expected, as illustrated in the above
3250example by indentation the programmer chose. When there is the
3251potential for this confusion, \s-1GCC\s0 issues a warning when this flag
3252is specified. To eliminate the warning, add explicit braces around
3253the innermost \f(CW\*(C`if\*(C'\fR statement so there is no way the \f(CW\*(C`else\*(C'\fR
3254can belong to the enclosing \f(CW\*(C`if\*(C'\fR. The resulting code
3255looks 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
3269Also warn for dangerous uses of the \s-1GNU\s0 extension to
3270\&\f(CW\*(C`?:\*(C'\fR with omitted middle operand. When the condition
3271in the \f(CW\*(C`?\*(C'\fR: operator is a boolean expression, the omitted value is
3272always 1. Often programmers expect it to be a value computed
3273inside the conditional expression instead.
3274.Sp
3275This warning is enabled by \fB\-Wall\fR.
3276.IP "\fB\-Wsequence\-point\fR" 4
3277.IX Item "-Wsequence-point"
3278Warn about code that may have undefined semantics because of violations
3279of sequence point rules in the C and \*(C+ standards.
3280.Sp
3281The C and \*(C+ standards define the order in which expressions in a C/\*(C+
3282program are evaluated in terms of \fIsequence points\fR, which represent
3283a partial ordering between the execution of parts of the program: those
3284executed before the sequence point, and those executed after it. These
3285occur after the evaluation of a full expression (one which is not part
3286of 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
3288function is called (but after the evaluation of its arguments and the
3289expression denoting the called function), and in certain other places.
3290Other than as expressed by the sequence point rules, the order of
3291evaluation of subexpressions of an expression is not specified. All
3292these rules describe only a partial order rather than a total order,
3293since, for example, if two functions are called within one expression
3294with no sequence point between them, the order in which the functions
3295are called is not specified. However, the standards committee have
3296ruled that function calls do not overlap.
3297.Sp
3298It is not specified when between sequence points modifications to the
3299values of objects take effect. Programs whose behavior depends on this
3300have undefined behavior; the C and \*(C+ standards specify that \*(L"Between
3301the previous and next sequence point an object shall have its stored
3302value modified at most once by the evaluation of an expression.
3303Furthermore, the prior value shall be read only to determine the value
3304to be stored.\*(R". If a program breaks these rules, the results on any
3305particular implementation are entirely unpredictable.
3306.Sp
3307Examples 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
3309diagnosed by this option, and it may give an occasional false positive
3310result, but in general it has been found fairly effective at detecting
3311this sort of problem in programs.
3312.Sp
3313The standard is worded confusingly, therefore there is some debate
3314over the precise meaning of the sequence point rules in subtle cases.
3315Links to discussions of the problem, including proposed formal
3316definitions, may be found on the \s-1GCC\s0 readings page, at
3317<\fBhttp://gcc.gnu.org/readings.html\fR>.
3318.Sp
3319This 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"
3322Do not warn about returning a pointer (or in \*(C+, a reference) to a
3323variable that goes out of scope after the function returns.
3324.IP "\fB\-Wreturn\-type\fR" 4
3325.IX Item "-Wreturn-type"
3326Warn whenever a function is defined with a return type that defaults
3327to \f(CW\*(C`int\*(C'\fR. Also warn about any \f(CW\*(C`return\*(C'\fR statement with no
3328return 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
3330without a value), and about a \f(CW\*(C`return\*(C'\fR statement with an
3331expression in a function whose return type is \f(CW\*(C`void\*(C'\fR.
3332.Sp
3333For \*(C+, a function without return type always produces a diagnostic
3334message, even when \fB\-Wno\-return\-type\fR is specified. The only
3335exceptions are \fBmain\fR and functions defined in system headers.
3336.Sp
3337This warning is enabled by \fB\-Wall\fR.
3338.IP "\fB\-Wswitch\fR" 4
3339.IX Item "-Wswitch"
3340Warn whenever a \f(CW\*(C`switch\*(C'\fR statement has an index of enumerated type
3341and lacks a \f(CW\*(C`case\*(C'\fR for one or more of the named codes of that
3342enumeration. (The presence of a \f(CW\*(C`default\*(C'\fR label prevents this
3343warning.) \f(CW\*(C`case\*(C'\fR labels outside the enumeration range also
3344provoke warnings when this option is used (even if there is a
3345\&\f(CW\*(C`default\*(C'\fR label).
3346This warning is enabled by \fB\-Wall\fR.
3347.IP "\fB\-Wswitch\-default\fR" 4
3348.IX Item "-Wswitch-default"
3349Warn whenever a \f(CW\*(C`switch\*(C'\fR statement does not have a \f(CW\*(C`default\*(C'\fR
3350case.
3351.IP "\fB\-Wswitch\-enum\fR" 4
3352.IX Item "-Wswitch-enum"
3353Warn whenever a \f(CW\*(C`switch\*(C'\fR statement has an index of enumerated type
3354and lacks a \f(CW\*(C`case\*(C'\fR for one or more of the named codes of that
3355enumeration. \f(CW\*(C`case\*(C'\fR labels outside the enumeration range also
3356provoke warnings when this option is used. The only difference
3357between \fB\-Wswitch\fR and this option is that this option gives a
3358warning 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)"
3362Warn when \f(CW\*(C`_\|_sync_fetch_and_nand\*(C'\fR and \f(CW\*(C`_\|_sync_nand_and_fetch\*(C'\fR
3363built-in functions are used. These functions changed semantics in \s-1GCC\s0 4.4.
3364.IP "\fB\-Wtrigraphs\fR" 4
3365.IX Item "-Wtrigraphs"
3366Warn if any trigraphs are encountered that might change the meaning of
3367the program (trigraphs within comments are not warned about).
3368This warning is enabled by \fB\-Wall\fR.
3369.IP "\fB\-Wunused\-but\-set\-parameter\fR" 4
3370.IX Item "-Wunused-but-set-parameter"
3371Warn whenever a function parameter is assigned to, but otherwise unused
3372(aside from its declaration).
3373.Sp
3374To suppress this warning use the \fBunused\fR attribute.
3375.Sp
3376This 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"
3380Warn whenever a local variable is assigned to, but otherwise unused
3381(aside from its declaration).
3382This warning is enabled by \fB\-Wall\fR.
3383.Sp
3384To suppress this warning use the \fBunused\fR attribute.
3385.Sp
3386This warning is also enabled by \fB\-Wunused\fR, which is enabled
3387by \fB\-Wall\fR.
3388.IP "\fB\-Wunused\-function\fR" 4
3389.IX Item "-Wunused-function"
3390Warn whenever a static function is declared but not defined or a
3391non-inline static function is unused.
3392This warning is enabled by \fB\-Wall\fR.
3393.IP "\fB\-Wunused\-label\fR" 4
3394.IX Item "-Wunused-label"
3395Warn whenever a label is declared but not used.
3396This warning is enabled by \fB\-Wall\fR.
3397.Sp
3398To 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)"
3401Warn when a typedef locally defined in a function is not used.
3402This warning is enabled by \fB\-Wall\fR.
3403.IP "\fB\-Wunused\-parameter\fR" 4
3404.IX Item "-Wunused-parameter"
3405Warn whenever a function parameter is unused aside from its declaration.
3406.Sp
3407To suppress this warning use the \fBunused\fR attribute.
3408.IP "\fB\-Wno\-unused\-result\fR" 4
3409.IX Item "-Wno-unused-result"
3410Do not warn if a caller of a function marked with attribute
3411\&\f(CW\*(C`warn_unused_result\*(C'\fR does not use
3412its return value. The default is \fB\-Wunused\-result\fR.
3413.IP "\fB\-Wunused\-variable\fR" 4
3414.IX Item "-Wunused-variable"
3415Warn whenever a local variable or non-constant static variable is unused
3416aside from its declaration.
3417This warning is enabled by \fB\-Wall\fR.
3418.Sp
3419To suppress this warning use the \fBunused\fR attribute.
3420.IP "\fB\-Wunused\-value\fR" 4
3421.IX Item "-Wunused-value"
3422Warn whenever a statement computes a result that is explicitly not
3423used. To suppress this warning cast the unused expression to
3424\&\fBvoid\fR. This includes an expression-statement or the left-hand
3425side of a comma expression that contains no side effects. For example,
3426an expression such as \fBx[i,j]\fR causes a warning, while
3427\&\fBx[(void)i,j]\fR does not.
3428.Sp
3429This warning is enabled by \fB\-Wall\fR.
3430.IP "\fB\-Wunused\fR" 4
3431.IX Item "-Wunused"
3432All the above \fB\-Wunused\fR options combined.
3433.Sp
3434In order to get a warning about an unused function parameter, you must
3435either 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"
3439Warn if an automatic variable is used without first being initialized
3440or if a variable may be clobbered by a \f(CW\*(C`setjmp\*(C'\fR call. In \*(C+,
3441warn if a non-static reference or non-static \fBconst\fR member
3442appears in a class without constructors.
3443.Sp
3444If you want to warn about code that uses the uninitialized value of the
3445variable in its own initializer, use the \fB\-Winit\-self\fR option.
3446.Sp
3447These warnings occur for individual uninitialized or clobbered
3448elements of structure, union or array variables as well as for
3449variables that are uninitialized or clobbered as a whole. They do
3450not occur for variables or elements declared \f(CW\*(C`volatile\*(C'\fR. Because
3451these warnings depend on optimization, the exact variables or elements
3452for which there are warnings depends on the precise optimization
3453options and version of \s-1GCC\s0 used.
3454.Sp
3455Note that there may be no warning about a variable that is used only
3456to compute a value that itself is never used, because such
3457computations may be deleted by data flow analysis before the warnings
3458are printed.
3459.IP "\fB\-Wmaybe\-uninitialized\fR" 4
3460.IX Item "-Wmaybe-uninitialized"
3461For an automatic variable, if there exists a path from the function
3462entry to a use of the variable that is initialized, but there exist
3463some other paths for which the variable is not initialized, the compiler
3464emits a warning if it cannot prove the uninitialized paths are not
3465executed at run time. These warnings are made optional because \s-1GCC\s0 is
3466not smart enough to see all the reasons why the code might be correct
3467in spite of appearing to have an error. Here is one example of how
3468this 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
3485If the value of \f(CW\*(C`y\*(C'\fR is always 1, 2 or 3, then \f(CW\*(C`x\*(C'\fR is
3486always initialized, but \s-1GCC\s0 doesn't know this. To suppress the
3487warning, you need to provide a default case with \fIassert\fR\|(0) or
3488similar code.
3489.Sp
3490This option also warns when a non-volatile automatic variable might be
3491changed by a call to \f(CW\*(C`longjmp\*(C'\fR. These warnings as well are possible
3492only in optimizing compilation.
3493.Sp
3494The compiler sees only the calls to \f(CW\*(C`setjmp\*(C'\fR. It cannot know
3495where \f(CW\*(C`longjmp\*(C'\fR will be called; in fact, a signal handler could
3496call it at any point in the code. As a result, you may get a warning
3497even when there is in fact no problem because \f(CW\*(C`longjmp\*(C'\fR cannot
3498in fact be called at the place that would cause a problem.
3499.Sp
3500Some spurious warnings can be avoided if you declare all the functions
3501you use that never return as \f(CW\*(C`noreturn\*(C'\fR.
3502.Sp
3503This warning is enabled by \fB\-Wall\fR or \fB\-Wextra\fR.
3504.IP "\fB\-Wunknown\-pragmas\fR" 4
3505.IX Item "-Wunknown-pragmas"
3506Warn 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
3508for unknown pragmas in system header files. This is not the case if
3509the warnings are only enabled by the \fB\-Wall\fR command-line option.
3510.IP "\fB\-Wno\-pragmas\fR" 4
3511.IX Item "-Wno-pragmas"
3512Do not warn about misuses of pragmas, such as incorrect parameters,
3513invalid syntax, or conflicts between pragmas. See also
3514\&\fB\-Wunknown\-pragmas\fR.
3515.IP "\fB\-Wstrict\-aliasing\fR" 4
3516.IX Item "-Wstrict-aliasing"
3517This option is only active when \fB\-fstrict\-aliasing\fR is active.
3518It warns about code that might break the strict aliasing rules that the
3519compiler is using for optimization. The warning does not catch all
3520cases, but does attempt to catch the more common pitfalls. It is
3521included in \fB\-Wall\fR.
3522It is equivalent to \fB\-Wstrict\-aliasing=3\fR
3523.IP "\fB\-Wstrict\-aliasing=n\fR" 4
3524.IX Item "-Wstrict-aliasing=n"
3525This option is only active when \fB\-fstrict\-aliasing\fR is active.
3526It warns about code that might break the strict aliasing rules that the
3527compiler is using for optimization.
3528Higher levels correspond to higher accuracy (fewer false positives).
3529Higher levels also correspond to more effort, similar to the way \fB\-O\fR
3530works.
3531\&\fB\-Wstrict\-aliasing\fR is equivalent to \fB\-Wstrict\-aliasing=3\fR.
3532.Sp
3533Level 1: Most aggressive, quick, least accurate.
3534Possibly useful when higher levels
3535do not warn but \fB\-fstrict\-aliasing\fR still breaks the code, as it has very few
3536false negatives. However, it has many false positives.
3537Warns for all pointer conversions between possibly incompatible types,
3538even if never dereferenced. Runs in the front end only.
3539.Sp
3540Level 2: Aggressive, quick, not too precise.
3541May still have many false positives (not as many as level 1 though),
3542and few false negatives (but possibly more than level 1).
3543Unlike level 1, it only warns when an address is taken. Warns about
3544incomplete types. Runs in the front end only.
3545.Sp
3546Level 3 (default for \fB\-Wstrict\-aliasing\fR):
3547Should have very few false positives and few false
3548negatives. Slightly slower than levels 1 or 2 when optimization is enabled.
3549Takes care of the common pun+dereference pattern in the front end:
3550\&\f(CW\*(C`*(int*)&some_float\*(C'\fR.
3551If optimization is enabled, it also runs in the back end, where it deals
3552with multiple statement cases using flow-sensitive points-to information.
3553Only warns when the converted pointer is dereferenced.
3554Does 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
3561This option is only active when \fB\-fstrict\-overflow\fR is active.
3562It warns about cases where the compiler optimizes based on the
3563assumption that signed overflow does not occur. Note that it does not
3564warn about all cases where the code might overflow: it only warns
3565about cases where the compiler implements some optimization. Thus
3566this warning depends on the optimization level.
3567.Sp
3568An optimization that assumes that signed overflow does not occur is
3569perfectly safe if the values of the variables involved are such that
3570overflow never does, in fact, occur. Therefore this warning can
3571easily give a false positive: a warning about code that is not
3572actually a problem. To help focus on important issues, several
3573warning levels are defined. No warnings are issued for the use of
3574undefined signed overflow when estimating how many iterations a loop
3575requires, in particular when determining whether a loop will be
3576executed at all.
3577.RS 4
3578.IP "\fB\-Wstrict\-overflow=1\fR" 4
3579.IX Item "-Wstrict-overflow=1"
3580Warn about cases that are both questionable and easy to avoid. For
3581example, 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
3584are not, and must be explicitly requested.
3585.IP "\fB\-Wstrict\-overflow=2\fR" 4
3586.IX Item "-Wstrict-overflow=2"
3587Also warn about other cases where a comparison is simplified to a
3588constant. For example: \f(CW\*(C`abs (x) >= 0\*(C'\fR. This can only be
3589simplified 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
3591zero. \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"
3595Also warn about other cases where a comparison is simplified. For
3596example: \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"
3599Also warn about other simplifications not covered by the above cases.
3600For 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"
3603Also warn about cases where the compiler reduces the magnitude of a
3604constant involved in a comparison. For example: \f(CW\*(C`x + 2 > y\*(C'\fR is
3605simplified to \f(CW\*(C`x + 1 >= y\*(C'\fR. This is reported only at the
3606highest warning level because this simplification applies to many
3607comparisons, so this warning level gives a very large number of
3608false 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]"
3614Warn for cases where adding an attribute may be beneficial. The
3615attributes 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
3625Warn 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
3627functions 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
3629returns normally if it doesn't contain an infinite loop or return abnormally
3630by 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
3632higher. 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
3639Warn about function pointers that might be candidates for \f(CW\*(C`format\*(C'\fR
3640attributes. 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
3642are used in assignment, initialization, parameter passing or return
3643statements should have a corresponding \f(CW\*(C`format\*(C'\fR attribute in the
3644resulting type. I.e. the left-hand side of the assignment or
3645initialization, the type of the parameter variable, or the return type
3646of the containing function respectively should also have a \f(CW\*(C`format\*(C'\fR
3647attribute to avoid the warning.
3648.Sp
3649\&\s-1GCC\s0 also warns about function definitions that might be
3650candidates for \f(CW\*(C`format\*(C'\fR attributes. Again, these are only
3651possible candidates. \s-1GCC\s0 guesses that \f(CW\*(C`format\*(C'\fR attributes
3652might 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
3654case, and some functions for which \f(CW\*(C`format\*(C'\fR attributes are
3655appropriate may not be detected.
3656.RE
3657.RS 4
3658.RE
3659.IP "\fB\-Warray\-bounds\fR" 4
3660.IX Item "-Warray-bounds"
3661This 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
3663that 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"
3666Do not warn about compile-time integer division by zero. Floating-point
3667division by zero is not warned about, as it can be a legitimate way of
3668obtaining infinities and NaNs.
3669.IP "\fB\-Wsystem\-headers\fR" 4
3670.IX Item "-Wsystem-headers"
3671Print warning messages for constructs found in system header files.
3672Warnings from system headers are normally suppressed, on the assumption
3673that they usually do not indicate real problems and would only make the
3674compiler 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
3676code. However, note that using \fB\-Wall\fR in conjunction with this
3677option does \fInot\fR warn about unknown pragmas in system
3678headers\-\-\-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"
3693Warn if floating-point values are used in equality comparisons.
3694.Sp
3695The idea behind this is that sometimes it is convenient (for the
3696programmer) to consider floating-point values as approximations to
3697infinitely precise real numbers. If you are doing this, then you need
3698to compute (by analyzing the code, or in some other way) the maximum or
3699likely maximum error that the computation introduces, and allow for it
3700when performing comparisons (and when producing output, but that's a
3701different problem). In particular, instead of testing for equality, you
3702should check to see whether the two values have ranges that overlap; and
3703this is done with the relational operators, so equality comparisons are
3704probably mistaken.
3705.IP "\fB\-Wtraditional\fR (C and Objective-C only)" 4
3706.IX Item "-Wtraditional (C and Objective-C only)"
3707Warn 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
3709equivalent, and/or problematic constructs that should be avoided.
3710.RS 4
3711.IP "\(bu" 4
3712Macro parameters that appear within string literals in the macro body.
3713In traditional C macro replacement takes place within string literals,
3714but in \s-1ISO\s0 C it does not.
3715.IP "\(bu" 4
3716In traditional C, some preprocessor directives did not exist.
3717Traditional preprocessors only considered a line to be a directive
3718if the \fB#\fR appeared in column 1 on the line. Therefore
3719\&\fB\-Wtraditional\fR warns about directives that traditional C
3720understands but ignores because the \fB#\fR does not appear as the
3721first character on the line. It also suggests you hide directives like
3722\&\fB#pragma\fR not understood by traditional C by indenting them. Some
3723traditional implementations do not recognize \fB#elif\fR, so this option
3724suggests avoiding it altogether.
3725.IP "\(bu" 4
3726A function-like macro that appears without arguments.
3727.IP "\(bu" 4
3728The unary plus operator.
3729.IP "\(bu" 4
3730The \fBU\fR integer constant suffix, or the \fBF\fR or \fBL\fR floating-point
3731constant suffixes. (Traditional C does support the \fBL\fR suffix on integer
3732constants.) Note, these suffixes appear in macros defined in the system
3733headers of most modern systems, e.g. the \fB_MIN\fR/\fB_MAX\fR macros in \f(CW\*(C`<limits.h>\*(C'\fR.
3734Use of these macros in user code might normally lead to spurious
3735warnings, however \s-1GCC\s0's integrated preprocessor has enough context to
3736avoid warning in these cases.
3737.IP "\(bu" 4
3738A function declared external in one block and then used after the end of
3739the block.
3740.IP "\(bu" 4
3741A \f(CW\*(C`switch\*(C'\fR statement has an operand of type \f(CW\*(C`long\*(C'\fR.
3742.IP "\(bu" 4
3743A non\-\f(CW\*(C`static\*(C'\fR function declaration follows a \f(CW\*(C`static\*(C'\fR one.
3744This construct is not accepted by some traditional C compilers.
3745.IP "\(bu" 4
3746The \s-1ISO\s0 type of an integer constant has a different width or
3747signedness from its traditional type. This warning is only issued if
3748the base of the constant is ten. I.e. hexadecimal or octal values, which
3749typically represent bit patterns, are not warned about.
3750.IP "\(bu" 4
3751Usage of \s-1ISO\s0 string concatenation is detected.
3752.IP "\(bu" 4
3753Initialization of automatic aggregates.
3754.IP "\(bu" 4
3755Identifier conflicts with labels. Traditional C lacks a separate
3756namespace for labels.
3757.IP "\(bu" 4
3758Initialization of unions. If the initializer is zero, the warning is
3759omitted. This is done under the assumption that the zero initializer in
3760user code appears conditioned on e.g. \f(CW\*(C`_\|_STDC_\|_\*(C'\fR to avoid missing
3761initializer warnings and relies on default initialization to zero in the
3762traditional C case.
3763.IP "\(bu" 4
3764Conversions by prototypes between fixed/floating\-point values and vice
3765versa. The absence of these prototypes when compiling with traditional
3766C causes serious problems. This is a subset of the possible
3767conversion warnings; for the full set use \fB\-Wtraditional\-conversion\fR.
3768.IP "\(bu" 4
3769Use of \s-1ISO\s0 C style function definitions. This warning intentionally is
3770\&\fInot\fR issued for prototype declarations or variadic functions
3771because these \s-1ISO\s0 C features appear in your code when using
3772libiberty'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
3774because that feature is already a \s-1GCC\s0 extension and thus not relevant to
3775traditional 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)"
3781Warn if a prototype causes a type conversion that is different from what
3782would happen to the same argument in the absence of a prototype. This
3783includes conversions of fixed point to floating and vice versa, and
3784conversions changing the width or signedness of a fixed-point argument
3785except 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)"
3788Warn when a declaration is found after a statement in a block. This
3789construct, known from \*(C+, was introduced with \s-1ISO\s0 C99 and is by default
3790allowed 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"
3794Warn 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"
3797Do 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"
3800Warn whenever a local variable or type declaration shadows another variable,
3801parameter, type, or class member (in \*(C+), or whenever a built-in function
3802is shadowed. Note that in \*(C+, the compiler warns if a local variable
3803shadows 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"
3806Warn 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"
3809Warn if the size of a function frame is larger than \fIlen\fR bytes.
3810The computation done to determine the stack frame size is approximate
3811and not conservative.
3812The actual requirements may be somewhat greater than \fIlen\fR
3813even if you do not get a warning. In addition, any space allocated
3814via \f(CW\*(C`alloca\*(C'\fR, variable-length arrays, or related constructs
3815is not included by the compiler when determining
3816whether or not to issue a warning.
3817.IP "\fB\-Wno\-free\-nonheap\-object\fR" 4
3818.IX Item "-Wno-free-nonheap-object"
3819Do not warn when attempting to free an object that was not allocated
3820on the heap.
3821.IP "\fB\-Wstack\-usage=\fR\fIlen\fR" 4
3822.IX Item "-Wstack-usage=len"
3823Warn if the stack usage of a function might be larger than \fIlen\fR bytes.
3824The computation done to determine the stack usage is conservative.
3825Any space allocated via \f(CW\*(C`alloca\*(C'\fR, variable-length arrays, or related
3826constructs is included by the compiler when determining whether or not to
3827issue a warning.
3828.Sp
3829The message is in keeping with the output of \fB\-fstack\-usage\fR.
3830.RS 4
3831.IP "\(bu" 4
3832If 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
3838If 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
3844If 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"
3854Warn if the loop cannot be optimized because the compiler cannot
3855assume anything on the bounds of the loop indices. With
3856\&\fB\-funsafe\-loop\-optimizations\fR warn if the compiler makes
3857such assumptions.
3858.IP "\fB\-Wno\-pedantic\-ms\-format\fR (MinGW targets only)" 4
3859.IX Item "-Wno-pedantic-ms-format (MinGW targets only)"
3860When used in combination with \fB\-Wformat\fR
3861and \fB\-pedantic\fR without \s-1GNU\s0 extensions, this option
3862disables the warnings about non-ISO \f(CW\*(C`printf\*(C'\fR / \f(CW\*(C`scanf\*(C'\fR format
3863width specifiers \f(CW\*(C`I32\*(C'\fR, \f(CW\*(C`I64\*(C'\fR, and \f(CW\*(C`I\*(C'\fR used on Windows targets,
3864which depend on the \s-1MS\s0 runtime.
3865.IP "\fB\-Wpointer\-arith\fR" 4
3866.IX Item "-Wpointer-arith"
3867Warn about anything that depends on the \*(L"size of\*(R" a function type or
3868of \f(CW\*(C`void\*(C'\fR. \s-1GNU\s0 C assigns these types a size of 1, for
3869convenience in calculations with \f(CW\*(C`void *\*(C'\fR pointers and pointers
3870to 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"
3874Warn if a comparison is always true or always false due to the limited
3875range of the data type, but do not warn for constant expressions. For
3876example, 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)"
3881Warn whenever a function call is cast to a non-matching type.
3882For 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)"
3885Warn 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)"
3890Warn about \*(C+ constructs whose meaning differs between \s-1ISO\s0 \*(C+ 1998
3891and \s-1ISO\s0 \*(C+ 2011, e.g., identifiers in \s-1ISO\s0 \*(C+ 1998 that are keywords
3892in \s-1ISO\s0 \*(C+ 2011. This warning turns on \fB\-Wnarrowing\fR and is
3893enabled by \fB\-Wall\fR.
3894.IP "\fB\-Wcast\-qual\fR" 4
3895.IX Item "-Wcast-qual"
3896Warn whenever a pointer is cast so as to remove a type qualifier from
3897the target type. For example, warn if a \f(CW\*(C`const char *\*(C'\fR is cast
3898to an ordinary \f(CW\*(C`char *\*(C'\fR.
3899.Sp
3900Also warn when making a cast that introduces a type qualifier in an
3901unsafe way. For example, casting \f(CW\*(C`char **\*(C'\fR to \f(CW\*(C`const char **\*(C'\fR
3902is 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"
3914Warn whenever a pointer is cast such that the required alignment of the
3915target is increased. For example, warn if a \f(CW\*(C`char *\*(C'\fR is cast to
3916an \f(CW\*(C`int *\*(C'\fR on machines where integers can only be accessed at
3917two\- or four-byte boundaries.
3918.IP "\fB\-Wwrite\-strings\fR" 4
3919.IX Item "-Wwrite-strings"
3920When compiling C, give string constants the type \f(CW\*(C`const
3921char[\f(CIlength\f(CW]\*(C'\fR so that copying the address of one into a
3922non\-\f(CW\*(C`const\*(C'\fR \f(CW\*(C`char *\*(C'\fR pointer produces a warning. These
3923warnings help you find at compile time code that can try to write
3924into a string constant, but only if you have been very careful about
3925using \f(CW\*(C`const\*(C'\fR in declarations and prototypes. Otherwise, it is
3926just a nuisance. This is why we did not make \fB\-Wall\fR request
3927these warnings.
3928.Sp
3929When compiling \*(C+, warn about the deprecated conversion from string
3930literals to \f(CW\*(C`char *\*(C'\fR. This warning is enabled by default for \*(C+
3931programs.
3932.IP "\fB\-Wclobbered\fR" 4
3933.IX Item "-Wclobbered"
3934Warn 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"
3938Warn for implicit conversions that may alter a value. This includes
3939conversions 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,
3941like \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
3944changed by the conversion like in \f(CW\*(C`abs (2.0)\*(C'\fR. Warnings about
3945conversions between signed and unsigned integers can be disabled by
3946using \fB\-Wno\-sign\-conversion\fR.
3947.Sp
3948For \*(C+, also warn for confusing overload resolution for user-defined
3949conversions; and conversions that never use a type conversion
3950operator: conversions to \f(CW\*(C`void\*(C'\fR, the same type, a base class or a
3951reference to them. Warnings about conversions between signed and
3952unsigned 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)"
3956Do not warn for conversions between \f(CW\*(C`NULL\*(C'\fR and non-pointer
3957types. \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)"
3960Warn when a literal '0' is used as null pointer constant. This can
3961be 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)"
3964Warn when an expression is casted to its own type.
3965.IP "\fB\-Wempty\-body\fR" 4
3966.IX Item "-Wempty-body"
3967Warn if an empty body occurs in an \fBif\fR, \fBelse\fR or \fBdo
3968while\fR statement. This warning is also enabled by \fB\-Wextra\fR.
3969.IP "\fB\-Wenum\-compare\fR" 4
3970.IX Item "-Wenum-compare"
3971Warn about a comparison between values of different enumerated types.
3972In \*(C+ enumeral mismatches in conditional expressions are also
3973diagnosed and the warning is enabled by default. In C this warning is
3974enabled 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)"
3977Warn if a \f(CW\*(C`goto\*(C'\fR statement or a \f(CW\*(C`switch\*(C'\fR statement jumps
3978forward across the initialization of a variable, or jumps backward to a
3979label after the variable has been initialized. This only warns about
3980variables that are initialized when they are declared. This warning is
3981only supported for C and Objective-C; in \*(C+ this sort of branch is an
3982error in any case.
3983.Sp
3984\&\fB\-Wjump\-misses\-init\fR is included in \fB\-Wc++\-compat\fR. It
3985can be disabled with the \fB\-Wno\-jump\-misses\-init\fR option.
3986.IP "\fB\-Wsign\-compare\fR" 4
3987.IX Item "-Wsign-compare"
3988Warn when a comparison between signed and unsigned values could produce
3989an incorrect result when the signed value is converted to unsigned.
3990This warning is also enabled by \fB\-Wextra\fR; to get the other warnings
3991of \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"
3994Warn for implicit conversions that may change the sign of an integer
3995value, like assigning a signed integer expression to an unsigned
3996integer variable. An explicit cast silences the warning. In C, this
3997option is enabled also by \fB\-Wconversion\fR.
3998.IP "\fB\-Wsizeof\-pointer\-memaccess\fR" 4
3999.IX Item "-Wsizeof-pointer-memaccess"
4000Warn for suspicious length parameters to certain string and memory built-in
4001functions if the argument uses \f(CW\*(C`sizeof\*(C'\fR. This warning warns e.g.
4002about \f(CW\*(C`memset (ptr, 0, sizeof (ptr));\*(C'\fR if \f(CW\*(C`ptr\*(C'\fR is not an array,
4003but 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"
4008Warn about suspicious uses of memory addresses. These include using
4009the 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
4011address of a string literal, such as \f(CW\*(C`if (x == "abc")\*(C'\fR. Such
4012uses typically indicate a programmer error: the address of a function
4013always evaluates to true, so their use in a conditional usually
4014indicate that the programmer forgot the parentheses in a function
4015call; and comparisons against string literals result in unspecified
4016behavior and are not portable in C, so they usually indicate that the
4017programmer 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"
4021Warn about suspicious uses of logical operators in expressions.
4022This includes using logical operators in contexts where a
4023bit-wise operator is likely to be expected.
4024.IP "\fB\-Waggregate\-return\fR" 4
4025.IX Item "-Waggregate-return"
4026Warn if any functions that return structures or unions are defined or
4027called. (In languages where you can return an array, this also elicits
4028a warning.)
4029.IP "\fB\-Wno\-aggressive\-loop\-optimizations\fR" 4
4030.IX Item "-Wno-aggressive-loop-optimizations"
4031Warn if in a loop with constant number of iterations the compiler detects
4032undefined behavior in some statement during one or more of the iterations.
4033.IP "\fB\-Wno\-attributes\fR" 4
4034.IX Item "-Wno-attributes"
4035Do not warn if an unexpected \f(CW\*(C`_\|_attribute_\|_\*(C'\fR is used, such as
4036unrecognized attributes, function attributes applied to variables,
4037etc. This does not stop errors for incorrect use of supported
4038attributes.
4039.IP "\fB\-Wno\-builtin\-macro\-redefined\fR" 4
4040.IX Item "-Wno-builtin-macro-redefined"
4041Do not warn if certain built-in macros are redefined. This suppresses
4042warnings 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)"
4046Warn if a function is declared or defined without specifying the
4047argument types. (An old-style function definition is permitted without
4048a warning if preceded by a declaration that specifies the argument
4049types.)
4050.IP "\fB\-Wold\-style\-declaration\fR (C and Objective-C only)" 4
4051.IX Item "-Wold-style-declaration (C and Objective-C only)"
4052Warn for obsolescent usages, according to the C Standard, in a
4053declaration. 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
4055is 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)"
4058Warn if an old-style function definition is used. A warning is given
4059even 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)"
4062A function parameter is declared without a type specifier in K&R\-style
4063functions:
4064.Sp
4065.Vb 1
4066\& void foo(bar) { }
4067.Ve
4068.Sp
4069This 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)"
4072Warn if a global function is defined without a previous prototype
4073declaration. This warning is issued even if the definition itself
4074provides a prototype. Use this option to detect global functions
4075that do not have a matching prototype declaration in a header file.
4076This option is not valid for \*(C+ because all function declarations
4077provide prototypes and a non-matching declaration will declare an
4078overload rather than conflict with an earlier declaration.
4079Use \fB\-Wmissing\-declarations\fR to detect missing declarations in \*(C+.
4080.IP "\fB\-Wmissing\-declarations\fR" 4
4081.IX Item "-Wmissing-declarations"
4082Warn if a global function is defined without a previous declaration.
4083Do so even if the definition itself provides a prototype.
4084Use this option to detect global functions that are not declared in
4085header files. In C, no warnings are issued for functions with previous
4086non-prototype declarations; use \fB\-Wmissing\-prototype\fR to detect
4087missing prototypes. In \*(C+, no warnings are issued for function templates,
4088or for inline functions, or for functions in anonymous namespaces.
4089.IP "\fB\-Wmissing\-field\-initializers\fR" 4
4090.IX Item "-Wmissing-field-initializers"
4091Warn if a structure's initializer has some fields missing. For
4092example, 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
4100This option does not warn about designated initializers, so the following
4101modification 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
4108This warning is included in \fB\-Wextra\fR. To get other \fB\-Wextra\fR
4109warnings without this one, use \fB\-Wextra \-Wno\-missing\-field\-initializers\fR.
4110.IP "\fB\-Wno\-multichar\fR" 4
4111.IX Item "-Wno-multichar"
4112Do not warn if a multicharacter constant (\fB'\s-1FOOF\s0'\fR) is used.
4113Usually they indicate a typo in the user's code, as they have
4114implementation-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>"
4117In \s-1ISO\s0 C and \s-1ISO\s0 \*(C+, two identifiers are different if they are
4118different sequences of characters. However, sometimes when characters
4119outside the basic \s-1ASCII\s0 character set are used, you can have two
4120different character sequences that look the same. To avoid confusion,
4121the \s-1ISO\s0 10646 standard sets out some \fInormalization rules\fR which
4122when applied ensure that two sequences that look the same are turned into
4123the same sequence. \s-1GCC\s0 can warn you if you are using identifiers that
4124have not been normalized; this option controls that warning.
4125.Sp
4126There 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
4128not in the \s-1ISO\s0 10646 \*(L"C\*(R" normalized form, \fI\s-1NFC\s0\fR. \s-1NFC\s0 is the
4129recommended form for most uses.
4130.Sp
4131Unfortunately, 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
4133identifiers. 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.
4136It is hoped that future versions of the standards involved will correct
4137this, which is why this option is not the default.
4138.Sp
4139You can switch the warning off for all characters by writing
4140\&\fB\-Wnormalized=none\fR. You should only do this if you
4141are using some other normalization scheme (like \*(L"D\*(R"), because
4142otherwise you can easily create bugs that are literally impossible to see.
4143.Sp
4144Some characters in \s-1ISO\s0 10646 have distinct meanings but look identical
4145in some fonts or display methodologies, especially once formatting has
4146been 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
4148placed in a superscript. \s-1ISO\s0 10646 defines the \fI\s-1NFKC\s0\fR
4149normalization scheme to convert all these into a standard form as
4150well, 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
4152about every identifier that contains the letter O because it might be
4153confused with the digit 0, and so is not the default, but may be
4154useful as a local coding convention if the programming environment
4155cannot be fixed to display these characters distinctly.
4156.IP "\fB\-Wno\-deprecated\fR" 4
4157.IX Item "-Wno-deprecated"
4158Do not warn about usage of deprecated features.
4159.IP "\fB\-Wno\-deprecated\-declarations\fR" 4
4160.IX Item "-Wno-deprecated-declarations"
4161Do not warn about uses of functions,
4162variables, and types marked as deprecated by using the \f(CW\*(C`deprecated\*(C'\fR
4163attribute.
4164.IP "\fB\-Wno\-overflow\fR" 4
4165.IX Item "-Wno-overflow"
4166Do 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)"
4169Warn if an initialized field without side effects is overridden when
4170using designated initializers.
4171.Sp
4172This 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"
4177Warn if a structure is given the packed attribute, but the packed
4178attribute has no effect on the layout or size of the structure.
4179Such structures may be mis-aligned for little benefit. For
4180instance, in this code, the variable \f(CW\*(C`f.x\*(C'\fR in \f(CW\*(C`struct bar\*(C'\fR
4181is misaligned even though \f(CW\*(C`struct bar\*(C'\fR does not itself
4182have 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"
4196The 4.1, 4.2 and 4.3 series of \s-1GCC\s0 ignore the \f(CW\*(C`packed\*(C'\fR attribute
4197on bit-fields of type \f(CW\*(C`char\*(C'\fR. This has been fixed in \s-1GCC\s0 4.4 but
4198the change can lead to differences in the structure layout. \s-1GCC\s0
4199informs you when the offset of such a field has changed in \s-1GCC\s0 4.4.
4200For example there is no longer a 4\-bit padding between field \f(CW\*(C`a\*(C'\fR
4201and \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
4211This 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"
4215Warn if padding is included in a structure, either to align an element
4216of the structure or to align the whole structure. Sometimes when this
4217happens it is possible to rearrange the fields of the structure to
4218reduce the padding and so make the structure smaller.
4219.IP "\fB\-Wredundant\-decls\fR" 4
4220.IX Item "-Wredundant-decls"
4221Warn if anything is declared more than once in the same scope, even in
4222cases 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)"
4225Warn 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"
4228Suppress warnings about use of \*(C+11 inheriting constructors when the
4229base class inherited from has a C variadic constructor; the warning is
4230on by default because the ellipsis is not inherited.
4231.IP "\fB\-Winline\fR" 4
4232.IX Item "-Winline"
4233Warn if a function that is declared as inline cannot be inlined.
4234Even with this option, the compiler does not warn about failures to
4235inline functions declared in system headers.
4236.Sp
4237The compiler uses a variety of heuristics to determine whether or not
4238to inline a function. For example, the compiler takes into account
4239the size of the function being inlined and the amount of inlining
4240that has already been done in the current function. Therefore,
4241seemingly insignificant changes in the source program can cause the
4242warnings 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)"
4245Suppress warnings from applying the \fBoffsetof\fR macro to a non-POD
4246type. According to the 1998 \s-1ISO\s0 \*(C+ standard, applying \fBoffsetof\fR
4247to a non-POD type is undefined. In existing \*(C+ implementations,
4248however, \fBoffsetof\fR typically gives meaningful results even when
4249applied 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
4251constructor). This flag is for users who are aware that they are
4252writing nonportable code and who have deliberately chosen to ignore the
4253warning about it.
4254.Sp
4255The restrictions on \fBoffsetof\fR may be relaxed in a future version
4256of the \*(C+ standard.
4257.IP "\fB\-Wno\-int\-to\-pointer\-cast\fR" 4
4258.IX Item "-Wno-int-to-pointer-cast"
4259Suppress warnings from casts to pointer type of an integer of a
4260different size. In \*(C+, casting to a pointer type of smaller size is
4261an 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)"
4264Suppress warnings from casts from a pointer to an integer type of a
4265different size.
4266.IP "\fB\-Winvalid\-pch\fR" 4
4267.IX Item "-Winvalid-pch"
4268Warn if a precompiled header is found in
4269the search path but can't be used.
4270.IP "\fB\-Wlong\-long\fR" 4
4271.IX Item "-Wlong-long"
4272Warn 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
4274modes. To inhibit the warning messages, use \fB\-Wno\-long\-long\fR.
4275.IP "\fB\-Wvariadic\-macros\fR" 4
4276.IX Item "-Wvariadic-macros"
4277Warn if variadic macros are used in pedantic \s-1ISO\s0 C90 mode, or the \s-1GNU\s0
4278alternate syntax when in pedantic \s-1ISO\s0 C99 mode. This is default.
4279To inhibit the warning messages, use \fB\-Wno\-variadic\-macros\fR.
4280.IP "\fB\-Wvarargs\fR" 4
4281.IX Item "-Wvarargs"
4282Warn upon questionable usage of the macros used to handle variable
4283arguments like \fBva_start\fR. This is default. To inhibit the
4284warning messages, use \fB\-Wno\-varargs\fR.
4285.IP "\fB\-Wvector\-operation\-performance\fR" 4
4286.IX Item "-Wvector-operation-performance"
4287Warn if vector operation is not implemented via \s-1SIMD\s0 capabilities of the
4288architecture. Mainly useful for the performance tuning.
4289Vector operation can be implemented \f(CW\*(C`piecewise\*(C'\fR, which means that the
4290scalar operation is performed on every vector element;
4291\&\f(CW\*(C`in parallel\*(C'\fR, which means that the vector operation is implemented
4292using scalars of wider type, which normally is more performance efficient;
4293and \f(CW\*(C`as a single scalar\*(C'\fR, which means that vector fits into a
4294scalar type.
4295.IP "\fB\-Wno\-virtual\-move\-assign\fR" 4
4296.IX Item "-Wno-virtual-move-assign"
4297Suppress warnings about inheriting from a virtual base with a
4298non-trivial \*(C+11 move assignment operator. This is dangerous because
4299if the virtual base is reachable along more than one path, it will be
4300moved multiple times, which can mean both objects end up in the
4301moved-from state. If the move assignment operator is written to avoid
4302moving from a moved-from object, this warning can be disabled.
4303.IP "\fB\-Wvla\fR" 4
4304.IX Item "-Wvla"
4305Warn if variable length array is used in the code.
4306\&\fB\-Wno\-vla\fR prevents the \fB\-Wpedantic\fR warning of
4307the variable length array.
4308.IP "\fB\-Wvolatile\-register\-var\fR" 4
4309.IX Item "-Wvolatile-register-var"
4310Warn if a register variable is declared volatile. The volatile
4311modifier does not inhibit all optimizations that may eliminate reads
4312and/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"
4316Warn if a requested optimization pass is disabled. This warning does
4317not generally indicate that there is anything wrong with your code; it
4318merely indicates that \s-1GCC\s0's optimizers are unable to handle the code
4319effectively. Often, the problem is that your code is too big or too
4320complex; \s-1GCC\s0 refuses to optimize programs when the optimization
4321itself 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)"
4324Warn for pointer argument passing or assignment with different signedness.
4325This 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"
4330This option is only active when \fB\-fstack\-protector\fR is active. It
4331warns about functions that are not protected against stack smashing.
4332.IP "\fB\-Wno\-mudflap\fR" 4
4333.IX Item "-Wno-mudflap"
4334Suppress warnings about constructs that cannot be instrumented by
4335\&\fB\-fmudflap\fR.
4336.IP "\fB\-Woverlength\-strings\fR" 4
4337.IX Item "-Woverlength-strings"
4338Warn about string constants that are longer than the \*(L"minimum
4339maximum\*(R" length specified in the C standard. Modern compilers
4340generally allow string constants that are much longer than the
4341standard's minimum limit, but very portable programs should avoid
4342using longer strings.
4343.Sp
4344The limit applies \fIafter\fR string constant concatenation, and does
4345not count the trailing \s-1NUL\s0. In C90, the limit was 509 characters; in
4346C99, it was raised to 4095. \*(C+98 does not specify a normative
4347minimum maximum, so we do not diagnose overlength strings in \*(C+.
4348.Sp
4349This 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)"
4353Issue a warning for any floating constant that does not have
4354a suffix. When used together with \fB\-Wsystem\-headers\fR it
4355warns about such constants in system header files. This can be useful
4356when preparing code to use with the \f(CW\*(C`FLOAT_CONST_DECIMAL64\*(C'\fR pragma
4357from 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
4361either your program or \s-1GCC:\s0
4362.IP "\fB\-g\fR" 4
4363.IX Item "-g"
4364Produce 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
4366information.
4367.Sp
4368On most systems that use stabs format, \fB\-g\fR enables use of extra
4369debugging information that only \s-1GDB\s0 can use; this extra information
4370makes debugging work better in \s-1GDB\s0 but probably makes other debuggers
4371crash or
4372refuse to read the program. If you want to control for certain whether
4373to 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
4378produce surprising results: some variables you declared may not exist
4379at all; flow of control may briefly move where you did not expect it;
4380some statements may not be executed because they compute constant
4381results or their values are already at hand; some statements may
4382execute in different places because they have been moved out of loops.
4383.Sp
4384Nevertheless it proves possible to debug optimized output. This makes
4385it reasonable to use the optimizer for programs that might have bugs.
4386.Sp
4387The following options are useful when \s-1GCC\s0 is generated with the
4388capability for more than one debugging format.
4389.IP "\fB\-gsplit\-dwarf\fR" 4
4390.IX Item "-gsplit-dwarf"
4391Separate as much dwarf debugging information as possible into a
4392separate output file with the extension .dwo. This option allows
4393the build system to avoid linking files with debug information. To
4394be useful, this option requires a debugger capable of reading .dwo
4395files.
4396.IP "\fB\-ggdb\fR" 4
4397.IX Item "-ggdb"
4398Produce debugging information for use by \s-1GDB\s0. This means to use the
4399most expressive format available (\s-1DWARF\s0 2, stabs, or the native format
4400if neither of those are supported), including \s-1GDB\s0 extensions if at all
4401possible.
4402.IP "\fB\-gpubnames\fR" 4
4403.IX Item "-gpubnames"
4404Generate dwarf .debug_pubnames and .debug_pubtypes sections.
4405.IP "\fB\-gstabs\fR" 4
4406.IX Item "-gstabs"
4407Produce debugging information in stabs format (if that is supported),
4408without \s-1GDB\s0 extensions. This is the format used by \s-1DBX\s0 on most \s-1BSD\s0
4409systems. On \s-1MIPS\s0, Alpha and System V Release 4 systems this option
4410produces stabs debugging output that is not understood by \s-1DBX\s0 or \s-1SDB\s0.
4411On 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"
4414Produce debugging information in stabs format (if that is supported),
4415for only symbols that are actually used.
4416.IP "\fB\-femit\-class\-debug\-always\fR" 4
4417.IX Item "-femit-class-debug-always"
4418Instead of emitting debugging information for a \*(C+ class in only one
4419object file, emit it in all object files using the class. This option
4420should be used only with debuggers that are unable to handle the way \s-1GCC\s0
4421normally emits debugging information for classes because using this
4422option increases the size of debugging information by as much as a
4423factor of two.
4424.IP "\fB\-fdebug\-types\-section\fR" 4
4425.IX Item "-fdebug-types-section"
4426When using \s-1DWARF\s0 Version 4 or higher, type DIEs can be put into
4427their 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
4429comdat sections since the linker can then remove duplicates.
4430But not all \s-1DWARF\s0 consumers support \f(CW\*(C`.debug_types\*(C'\fR sections yet
4431and on some objects \f(CW\*(C`.debug_types\*(C'\fR produces larger instead of smaller
4432debugging information.
4433.IP "\fB\-gstabs+\fR" 4
4434.IX Item "-gstabs+"
4435Produce debugging information in stabs format (if that is supported),
4436using \s-1GNU\s0 extensions understood only by the \s-1GNU\s0 debugger (\s-1GDB\s0). The
4437use of these extensions is likely to make other debuggers crash or
4438refuse to read the program.
4439.IP "\fB\-gcoff\fR" 4
4440.IX Item "-gcoff"
4441Produce debugging information in \s-1COFF\s0 format (if that is supported).
4442This is the format used by \s-1SDB\s0 on most System V systems prior to
4443System V Release 4.
4444.IP "\fB\-gxcoff\fR" 4
4445.IX Item "-gxcoff"
4446Produce debugging information in \s-1XCOFF\s0 format (if that is supported).
4447This 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+"
4450Produce debugging information in \s-1XCOFF\s0 format (if that is supported),
4451using \s-1GNU\s0 extensions understood only by the \s-1GNU\s0 debugger (\s-1GDB\s0). The
4452use of these extensions is likely to make other debuggers crash or
4453refuse to read the program, and may cause assemblers other than the \s-1GNU\s0
4454assembler (\s-1GAS\s0) to fail with an error.
4455.IP "\fB\-gdwarf\-\fR\fIversion\fR" 4
4456.IX Item "-gdwarf-version"
4457Produce debugging information in \s-1DWARF\s0 format (if that is supported).
4458The value of \fIversion\fR may be either 2, 3 or 4; the default version
4459for most targets is 4.
4460.Sp
4461Note that with \s-1DWARF\s0 Version 2, some ports require and always
4462use some non-conflicting \s-1DWARF\s0 3 extensions in the unwind tables.
4463.Sp
4464Version 4 may require \s-1GDB\s0 7.0 and \fB\-fvar\-tracking\-assignments\fR
4465for maximum benefit.
4466.IP "\fB\-grecord\-gcc\-switches\fR" 4
4467.IX Item "-grecord-gcc-switches"
4468This switch causes the command-line options used to invoke the
4469compiler that may affect code generation to be appended to the
4470DW_AT_producer attribute in \s-1DWARF\s0 debugging information. The options
4471are concatenated with spaces separating them from each other and from
4472the compiler version. See also \fB\-frecord\-gcc\-switches\fR for another
4473way 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"
4476Disallow appending command-line options to the DW_AT_producer attribute
4477in \s-1DWARF\s0 debugging information.
4478.IP "\fB\-gstrict\-dwarf\fR" 4
4479.IX Item "-gstrict-dwarf"
4480Disallow using extensions of later \s-1DWARF\s0 standard version than selected
4481with \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"
4485Allow 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"
4489Produce debugging information in Alpha/VMS debug format (if that is
4490supported). 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
4505Request debugging information and also use \fIlevel\fR to specify how
4506much information. The default level is 2.
4507.Sp
4508Level 0 produces no debug information at all. Thus, \fB\-g0\fR negates
4509\&\fB\-g\fR.
4510.Sp
4511Level 1 produces minimal information, enough for making backtraces in
4512parts of the program that you don't plan to debug. This includes
4513descriptions of functions and external variables, but no information
4514about local variables and no line numbers.
4515.Sp
4516Level 3 includes extra information, such as all the macro definitions
4517present in the program. Some debuggers support macro expansion when
4518you 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
4522debug information in version 1 of the \s-1DWARF\s0 format (which is very
4523different from version 2), and it would have been too confusing. That
4524debug format is long obsolete, but the option cannot be changed now.
4525Instead use an additional \fB\-g\fR\fIlevel\fR option to change the
4526debug level for \s-1DWARF\s0.
4527.IP "\fB\-gtoggle\fR" 4
4528.IX Item "-gtoggle"
4529Turn off generation of debug info, if leaving out this option
4530generates it, or turn it on at level 2 otherwise. The position of this
4531argument in the command line does not matter; it takes effect after all
4532other options are processed, and it does so only once, no matter how
4533many 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"
4537Enable AddressSanitizer, a fast memory error detector.
4538Memory access instructions will be instrumented to detect
4539out-of-bounds and use-after-free bugs.
4540See <\fBhttp://code.google.com/p/address\-sanitizer/\fR> for more details.
4541.IP "\fB\-fsanitize=thread\fR" 4
4542.IX Item "-fsanitize=thread"
4543Enable ThreadSanitizer, a fast data race detector.
4544Memory access instructions will be instrumented to detect
4545data race bugs.
4546See <\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]"
4549Dump the final internal representation (\s-1RTL\s0) to \fIfile\fR. If the
4550optional argument is omitted (or if \fIfile\fR is \f(CW\*(C`.\*(C'\fR), the name
4551of the dump file is determined by appending \f(CW\*(C`.gkd\*(C'\fR to the
4552compilation output file name.
4553.IP "\fB\-fcompare\-debug\fR[\fB=\fR\fIopts\fR]" 4
4554.IX Item "-fcompare-debug[=opts]"
4555If no error occurs during compilation, run the compiler a second time,
4556adding \fIopts\fR and \fB\-fcompare\-debug\-second\fR to the arguments
4557passed to the second compilation. Dump the final internal
4558representation in both compilations, and print an error if they differ.
4559.Sp
4560If the equal sign is omitted, the default \fB\-gtoggle\fR is used.
4561.Sp
4562The environment variable \fB\s-1GCC_COMPARE_DEBUG\s0\fR, if defined, non-empty
4563and 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,
4565then it is used for \fIopts\fR, otherwise the default \fB\-gtoggle\fR
4566is used.
4567.Sp
4568\&\fB\-fcompare\-debug=\fR, with the equal sign but without \fIopts\fR,
4569is equivalent to \fB\-fno\-compare\-debug\fR, which disables the dumping
4570of the final representation and the second compilation, preventing even
4571\&\fB\s-1GCC_COMPARE_DEBUG\s0\fR from taking effect.
4572.Sp
4573To 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,
4575which \s-1GCC\s0 rejects as an invalid option in any actual compilation
4576(rather than preprocessing, assembly or linking). To get just a
4577warning, setting \fB\s-1GCC_COMPARE_DEBUG\s0\fR to \fB\-w%n\-fcompare\-debug
4578not overridden\fR will do.
4579.IP "\fB\-fcompare\-debug\-second\fR" 4
4580.IX Item "-fcompare-debug-second"
4581This option is implicitly passed to the compiler for the second
4582compilation requested by \fB\-fcompare\-debug\fR, along with options to
4583silence warnings, and omitting other options that would cause
4584side-effect compiler outputs to files or to the standard output. Dump
4585files 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
4587overwriting those generated by the first.
4588.Sp
4589When this option is passed to the compiler driver, it causes the
4590\&\fIfirst\fR compilation to be skipped, which makes it useful for little
4591other than debugging the compiler proper.
4592.IP "\fB\-feliminate\-dwarf2\-dups\fR" 4
4593.IX Item "-feliminate-dwarf2-dups"
4594Compress \s-1DWARF\s0 2 debugging information by eliminating duplicated
4595information about each symbol. This option only makes sense when
4596generating \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"
4599Emit debug information for struct-like types
4600only when the base name of the compilation source file
4601matches the base name of file in which the struct is defined.
4602.Sp
4603This option substantially reduces the size of debugging information,
4604but at significant potential loss in type information to the debugger.
4605See \fB\-femit\-struct\-debug\-reduced\fR for a less aggressive option.
4606See \fB\-femit\-struct\-debug\-detailed\fR for more detailed control.
4607.Sp
4608This option works only with \s-1DWARF\s0 2.
4609.IP "\fB\-femit\-struct\-debug\-reduced\fR" 4
4610.IX Item "-femit-struct-debug-reduced"
4611Emit debug information for struct-like types
4612only when the base name of the compilation source file
4613matches the base name of file in which the type is defined,
4614unless the struct is a template or defined in a system header.
4615.Sp
4616This option significantly reduces the size of debugging information,
4617with some potential loss in type information to the debugger.
4618See \fB\-femit\-struct\-debug\-baseonly\fR for a more aggressive option.
4619See \fB\-femit\-struct\-debug\-detailed\fR for more detailed control.
4620.Sp
4621This 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]"
4624Specify the struct-like types
4625for which the compiler generates debug information.
4626The intent is to reduce duplicate struct debug information
4627between different object files within the same program.
4628.Sp
4629This option is a detailed version of
4630\&\fB\-femit\-struct\-debug\-reduced\fR and \fB\-femit\-struct\-debug\-baseonly\fR,
4631which serves for most needs.
4632.Sp
4633A specification has the syntax[\fBdir:\fR|\fBind:\fR][\fBord:\fR|\fBgen:\fR](\fBany\fR|\fBsys\fR|\fBbase\fR|\fBnone\fR)
4634.Sp
4635The optional first word limits the specification to
4636structs that are used directly (\fBdir:\fR) or used indirectly (\fBind:\fR).
4637A struct type is used directly when it is the type of a variable, member.
4638Indirect uses arise through pointers to structs.
4639That is, when use of an incomplete struct is valid, the use is indirect.
4640An example is
4641\&\fBstruct one direct; struct two * indirect;\fR.
4642.Sp
4643The optional second word limits the specification to
4644ordinary structs (\fBord:\fR) or generic structs (\fBgen:\fR).
4645Generic structs are a bit complicated to explain.
4646For \*(C+, these are non-explicit specializations of template classes,
4647or non-template classes within the above.
4648Other programming languages have generics,
4649but \fB\-femit\-struct\-debug\-detailed\fR does not yet implement them.
4650.Sp
4651The third word specifies the source files for those
4652structs for which the compiler should emit debug information.
4653The values \fBnone\fR and \fBany\fR have the normal meaning.
4654The value \fBbase\fR means that
4655the base of name of the file in which the type declaration appears
4656must match the base of the name of the main compilation file.
4657In practice, this means that when compiling \fIfoo.c\fR, debug information
4658is generated for types declared in that file and \fIfoo.h\fR,
4659but not other header files.
4660The value \fBsys\fR means those types satisfying \fBbase\fR
4661or declared in system or compiler headers.
4662.Sp
4663You may need to experiment to determine the best settings for your application.
4664.Sp
4665The default is \fB\-femit\-struct\-debug\-detailed=all\fR.
4666.Sp
4667This option works only with \s-1DWARF\s0 2.
4668.IP "\fB\-fno\-merge\-debug\-strings\fR" 4
4669.IX Item "-fno-merge-debug-strings"
4670Direct the linker to not merge together strings in the debugging
4671information that are identical in different object files. Merging is
4672not supported by all assemblers or linkers. Merging decreases the size
4673of the debug information in the output file at the cost of increasing
4674link 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"
4677When compiling files in directory \fI\fIold\fI\fR, record debugging
4678information 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"
4681Emit \s-1DWARF\s0 2 unwind info as compiler generated \f(CW\*(C`.eh_frame\*(C'\fR section
4682instead of using \s-1GAS\s0 \f(CW\*(C`.cfi_*\*(C'\fR directives.
4683.IP "\fB\-p\fR" 4
4684.IX Item "-p"
4685Generate extra code to write profile information suitable for the
4686analysis program \fBprof\fR. You must use this option when compiling
4687the source files you want data about, and you must also use it when
4688linking.
4689.IP "\fB\-pg\fR" 4
4690.IX Item "-pg"
4691Generate extra code to write profile information suitable for the
4692analysis program \fBgprof\fR. You must use this option when compiling
4693the source files you want data about, and you must also use it when
4694linking.
4695.IP "\fB\-Q\fR" 4
4696.IX Item "-Q"
4697Makes the compiler print out each function name as it is compiled, and
4698print some statistics about each pass when it finishes.
4699.IP "\fB\-ftime\-report\fR" 4
4700.IX Item "-ftime-report"
4701Makes the compiler print some statistics about the time consumed by each
4702pass when it finishes.
4703.IP "\fB\-fmem\-report\fR" 4
4704.IX Item "-fmem-report"
4705Makes the compiler print some statistics about permanent memory
4706allocation when it finishes.
4707.IP "\fB\-fmem\-report\-wpa\fR" 4
4708.IX Item "-fmem-report-wpa"
4709Makes the compiler print some statistics about permanent memory
4710allocation 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
4717Makes the compiler print some statistics about permanent memory
4718allocation before or after interprocedural optimization.
4719.IP "\fB\-fprofile\-report\fR" 4
4720.IX Item "-fprofile-report"
4721Makes 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"
4725Makes the compiler output stack usage information for the program, on a
4726per-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
4728the output file, if explicitly specified and it is not an executable,
4729otherwise it is the basename of the source file. An entry is made up
4730of three fields:
4731.RS 4
4732.IP "\(bu" 4
4733The name of the function.
4734.IP "\(bu" 4
4735A number of bytes.
4736.IP "\(bu" 4
4737One 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
4741The qualifier \f(CW\*(C`static\*(C'\fR means that the function manipulates the stack
4742statically: a fixed number of bytes are allocated for the frame on function
4743entry and released on function exit; no stack adjustments are otherwise made
4744in the function. The second field is this fixed number of bytes.
4745.Sp
4746The qualifier \f(CW\*(C`dynamic\*(C'\fR means that the function manipulates the stack
4747dynamically: in addition to the static allocation described above, stack
4748adjustments are made in the body of the function, for example to push/pop
4749arguments around function calls. If the qualifier \f(CW\*(C`bounded\*(C'\fR is also
4750present, the amount of these adjustments is bounded at compile time and
4751the second field is an upper bound of the total amount of stack used by
4752the function. If it is not present, the amount of these adjustments is
4753not bounded at compile time and the second field only represents the
4754bounded part.
4755.RE
4756.IP "\fB\-fprofile\-arcs\fR" 4
4757.IX Item "-fprofile-arcs"
4758Add code so that program flow \fIarcs\fR are instrumented. During
4759execution the program records how many times each branch and call is
4760executed and how many times it is taken or returns. When the compiled
4761program 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
4763profile-directed optimizations (\fB\-fbranch\-probabilities\fR), or for
4764test coverage analysis (\fB\-ftest\-coverage\fR). Each object file's
4765\&\fIauxname\fR is generated from the name of the output file, if
4766explicitly specified and it is not the final executable, otherwise it is
4767the 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"
4772This option is used to compile and link code instrumented for coverage
4773analysis. The option is a synonym for \fB\-fprofile\-arcs\fR
4774\&\fB\-ftest\-coverage\fR (when compiling) and \fB\-lgcov\fR (when
4775linking). See the documentation for those options for more details.
4776.RS 4
4777.IP "\(bu" 4
4778Compile the source files with \fB\-fprofile\-arcs\fR plus optimization
4779and code generation options. For test coverage analysis, use the
4780additional \fB\-ftest\-coverage\fR option. You do not need to profile
4781every source file in a program.
4782.IP "\(bu" 4
4783Link your object files with \fB\-lgcov\fR or \fB\-fprofile\-arcs\fR
4784(the latter implies the former).
4785.IP "\(bu" 4
4786Run the program on a representative workload to generate the arc profile
4787information. This may be repeated any number of times. You can run
4788concurrent instances of your program, and provided that the file system
4789supports locking, the data files will be correctly updated. Also
4790\&\f(CW\*(C`fork\*(C'\fR calls are detected and correctly handled (double counting
4791will not happen).
4792.IP "\(bu" 4
4793For profile-directed optimizations, compile the source files again with
4794the same optimization and code generation options plus
4795\&\fB\-fbranch\-probabilities\fR.
4796.IP "\(bu" 4
4797For test coverage analysis, use \fBgcov\fR to produce human readable
4798information 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
4803With \fB\-fprofile\-arcs\fR, for each function of your program \s-1GCC\s0
4804creates a program flow graph, then finds a spanning tree for the graph.
4805Only arcs that are not on the spanning tree have to be instrumented: the
4806compiler adds code to count the number of times that these arcs are
4807executed. When an arc is the only exit or only entrance to a block, the
4808instrumentation code can be added to the block; otherwise, a new basic
4809block must be created to hold the instrumentation code.
4810.RE
4811.IP "\fB\-ftest\-coverage\fR" 4
4812.IX Item "-ftest-coverage"
4813Produce a notes file that the \fBgcov\fR code-coverage utility can use to
4814show program coverage. Each source file's note file is called
4815\&\fI\fIauxname\fI.gcno\fR. Refer to the \fB\-fprofile\-arcs\fR option
4816above for a description of \fIauxname\fR and instructions on how to
4817generate test coverage data. Coverage data matches the source files
4818more closely if you do not optimize.
4819.IP "\fB\-fdbg\-cnt\-list\fR" 4
4820.IX Item "-fdbg-cnt-list"
4821Print 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"
4824Set the internal debug counter upper bound. \fIcounter-value-list\fR
4825is a comma-separated list of \fIname\fR:\fIvalue\fR pairs
4826which sets the upper bound of each debug counter \fIname\fR to \fIvalue\fR.
4827All debug counters have the initial upper bound of \f(CW\*(C`UINT_MAX\*(C'\fR;
4828thus \f(CW\*(C`dbg_cnt()\*(C'\fR returns true always unless the upper bound
4829is set by this option.
4830For 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
4838This is a set of options that are used to explicitly disable/enable
4839optimization passes. These options are intended for use for debugging \s-1GCC\s0.
4840Compiler users should use regular options for enabling/disabling
4841passes instead.
4842.RS 4
4843.IP "\fB\-fdisable\-ipa\-\fR\fIpass\fR" 4
4844.IX Item "-fdisable-ipa-pass"
4845Disable \s-1IPA\s0 pass \fIpass\fR. \fIpass\fR is the pass name. If the same pass is
4846statically invoked in the compiler multiple times, the pass name should be
4847appended 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
4854Disable \s-1RTL\s0 pass \fIpass\fR. \fIpass\fR is the pass name. If the same pass is
4855statically invoked in the compiler multiple times, the pass name should be
4856appended with a sequential number starting from 1. \fIrange-list\fR is a
4857comma-separated list of function ranges or assembler names. Each range is a number
4858pair separated by a colon. The range is inclusive in both ends. If the range
4859is trivial, the number pair can be simplified as a single number. If the
4860function's call graph node's \fIuid\fR falls within one of the specified ranges,
4861the \fIpass\fR is disabled for that function. The \fIuid\fR is shown in the
4862function header of a dump file, and the pass names can be dumped by using
4863option \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
4870Disable tree pass \fIpass\fR. See \fB\-fdisable\-rtl\fR for the description of
4871option arguments.
4872.IP "\fB\-fenable\-ipa\-\fR\fIpass\fR" 4
4873.IX Item "-fenable-ipa-pass"
4874Enable \s-1IPA\s0 pass \fIpass\fR. \fIpass\fR is the pass name. If the same pass is
4875statically invoked in the compiler multiple times, the pass name should be
4876appended 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
4883Enable \s-1RTL\s0 pass \fIpass\fR. See \fB\-fdisable\-rtl\fR for option argument
4884description 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
4891Enable tree pass \fIpass\fR. See \fB\-fdisable\-rtl\fR for the description
4892of option arguments.
4893.RE
4894.RS 4
4895.Sp
4896Here 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
4923Says to make debugging dumps during compilation at times specified by
4924\&\fIletters\fR. This is used for debugging the RTL-based passes of the
4925compiler. The file names for most of the dumps are made by appending
4926a pass number and a word to the \fIdumpname\fR, and the files are
4927created in the directory of the output file. In case of
4928\&\fB=\fR\fIfilename\fR option, the dump is output on the given file
4929instead of the pass numbered dump files. Note that the pass number is
4930computed statically as passes get registered into the pass manager.
4931Thus the numbering is not related to the dynamic order of execution of
4932passes. In particular, a pass installed by a plugin could have a
4933number over 200 even if it executed quite early. \fIdumpname\fR is
4934generated from the name of the output file, if explicitly specified
4935and it is not an executable, otherwise it is the basename of the
4936source file. These switches may have different effects when
4937\&\fB\-E\fR is used for preprocessing.
4938.Sp
4939Debug dumps can be enabled with a \fB\-fdump\-rtl\fR switch or some
4940\&\fB\-d\fR option \fIletters\fR. Here are the possible
4941letters 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"
4945Dump after branch alignments have been computed.
4946.IP "\fB\-fdump\-rtl\-asmcons\fR" 4
4947.IX Item "-fdump-rtl-asmcons"
4948Dump 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"
4951Dump after auto-inc-dec discovery. This pass is only run on
4952architectures that have auto inc or auto dec instructions.
4953.IP "\fB\-fdump\-rtl\-barriers\fR" 4
4954.IX Item "-fdump-rtl-barriers"
4955Dump after cleaning up the barrier instructions.
4956.IP "\fB\-fdump\-rtl\-bbpart\fR" 4
4957.IX Item "-fdump-rtl-bbpart"
4958Dump after partitioning hot and cold basic blocks.
4959.IP "\fB\-fdump\-rtl\-bbro\fR" 4
4960.IX Item "-fdump-rtl-bbro"
4961Dump 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
4969after the two branch
4970target load optimization passes.
4971.IP "\fB\-fdump\-rtl\-bypass\fR" 4
4972.IX Item "-fdump-rtl-bypass"
4973Dump after jump bypassing and control flow optimizations.
4974.IP "\fB\-fdump\-rtl\-combine\fR" 4
4975.IX Item "-fdump-rtl-combine"
4976Dump after the \s-1RTL\s0 instruction combination pass.
4977.IP "\fB\-fdump\-rtl\-compgotos\fR" 4
4978.IX Item "-fdump-rtl-compgotos"
4979Dump 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
4990if conversion passes.
4991.IP "\fB\-fdump\-rtl\-cprop_hardreg\fR" 4
4992.IX Item "-fdump-rtl-cprop_hardreg"
4993Dump after hard register copy propagation.
4994.IP "\fB\-fdump\-rtl\-csa\fR" 4
4995.IX Item "-fdump-rtl-csa"
4996Dump 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
5004the two common subexpression elimination passes.
5005.IP "\fB\-fdump\-rtl\-dce\fR" 4
5006.IX Item "-fdump-rtl-dce"
5007Dump after the standalone dead code elimination passes.
5008.IP "\fB\-fdump\-rtl\-dbr\fR" 4
5009.IX Item "-fdump-rtl-dbr"
5010Dump 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
5018the two dead store elimination passes.
5019.IP "\fB\-fdump\-rtl\-eh\fR" 4
5020.IX Item "-fdump-rtl-eh"
5021Dump after finalization of \s-1EH\s0 handling code.
5022.IP "\fB\-fdump\-rtl\-eh_ranges\fR" 4
5023.IX Item "-fdump-rtl-eh_ranges"
5024Dump after conversion of \s-1EH\s0 handling range regions.
5025.IP "\fB\-fdump\-rtl\-expand\fR" 4
5026.IX Item "-fdump-rtl-expand"
5027Dump 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
5035dumping 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
5043after global common subexpression elimination.
5044.IP "\fB\-fdump\-rtl\-init\-regs\fR" 4
5045.IX Item "-fdump-rtl-init-regs"
5046Dump after the initialization of the registers.
5047.IP "\fB\-fdump\-rtl\-initvals\fR" 4
5048.IX Item "-fdump-rtl-initvals"
5049Dump after the computation of the initial value sets.
5050.IP "\fB\-fdump\-rtl\-into_cfglayout\fR" 4
5051.IX Item "-fdump-rtl-into_cfglayout"
5052Dump after converting to cfglayout mode.
5053.IP "\fB\-fdump\-rtl\-ira\fR" 4
5054.IX Item "-fdump-rtl-ira"
5055Dump after iterated register allocation.
5056.IP "\fB\-fdump\-rtl\-jump\fR" 4
5057.IX Item "-fdump-rtl-jump"
5058Dump 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
5062loop optimization passes.
5063.IP "\fB\-fdump\-rtl\-mach\fR" 4
5064.IX Item "-fdump-rtl-mach"
5065Dump after performing the machine dependent reorganization pass, if that
5066pass exists.
5067.IP "\fB\-fdump\-rtl\-mode_sw\fR" 4
5068.IX Item "-fdump-rtl-mode_sw"
5069Dump after removing redundant mode switches.
5070.IP "\fB\-fdump\-rtl\-rnreg\fR" 4
5071.IX Item "-fdump-rtl-rnreg"
5072Dump after register renumbering.
5073.IP "\fB\-fdump\-rtl\-outof_cfglayout\fR" 4
5074.IX Item "-fdump-rtl-outof_cfglayout"
5075Dump after converting from cfglayout mode.
5076.IP "\fB\-fdump\-rtl\-peephole2\fR" 4
5077.IX Item "-fdump-rtl-peephole2"
5078Dump after the peephole pass.
5079.IP "\fB\-fdump\-rtl\-postreload\fR" 4
5080.IX Item "-fdump-rtl-postreload"
5081Dump after post-reload optimizations.
5082.IP "\fB\-fdump\-rtl\-pro_and_epilogue\fR" 4
5083.IX Item "-fdump-rtl-pro_and_epilogue"
5084Dump after generating the function prologues and epilogues.
5085.IP "\fB\-fdump\-rtl\-regmove\fR" 4
5086.IX Item "-fdump-rtl-regmove"
5087Dump 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
5095after the basic block scheduling passes.
5096.IP "\fB\-fdump\-rtl\-see\fR" 4
5097.IX Item "-fdump-rtl-see"
5098Dump after sign extension elimination.
5099.IP "\fB\-fdump\-rtl\-seqabstr\fR" 4
5100.IX Item "-fdump-rtl-seqabstr"
5101Dump after common sequence discovery.
5102.IP "\fB\-fdump\-rtl\-shorten\fR" 4
5103.IX Item "-fdump-rtl-shorten"
5104Dump after shortening branches.
5105.IP "\fB\-fdump\-rtl\-sibling\fR" 4
5106.IX Item "-fdump-rtl-sibling"
5107Dump 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
5123instruction splitting.
5124.IP "\fB\-fdump\-rtl\-sms\fR" 4
5125.IX Item "-fdump-rtl-sms"
5126Dump after modulo scheduling. This pass is only run on some
5127architectures.
5128.IP "\fB\-fdump\-rtl\-stack\fR" 4
5129.IX Item "-fdump-rtl-stack"
5130Dump after conversion from \s-1GCC\s0's \*(L"flat register file\*(R" registers to the
5131x87'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
5139the two subreg expansion passes.
5140.IP "\fB\-fdump\-rtl\-unshare\fR" 4
5141.IX Item "-fdump-rtl-unshare"
5142Dump after all rtl has been unshared.
5143.IP "\fB\-fdump\-rtl\-vartrack\fR" 4
5144.IX Item "-fdump-rtl-vartrack"
5145Dump after variable tracking.
5146.IP "\fB\-fdump\-rtl\-vregs\fR" 4
5147.IX Item "-fdump-rtl-vregs"
5148Dump after converting virtual registers to hard registers.
5149.IP "\fB\-fdump\-rtl\-web\fR" 4
5150.IX Item "-fdump-rtl-web"
5151Dump 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
5164These 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
5171Produce all the dumps listed above.
5172.IP "\fB\-dA\fR" 4
5173.IX Item "-dA"
5174Annotate the assembler output with miscellaneous debugging information.
5175.IP "\fB\-dD\fR" 4
5176.IX Item "-dD"
5177Dump all macro definitions, at the end of preprocessing, in addition to
5178normal output.
5179.IP "\fB\-dH\fR" 4
5180.IX Item "-dH"
5181Produce a core dump whenever an error occurs.
5182.IP "\fB\-dp\fR" 4
5183.IX Item "-dp"
5184Annotate the assembler output with a comment indicating which
5185pattern and alternative is used. The length of each instruction is
5186also printed.
5187.IP "\fB\-dP\fR" 4
5188.IX Item "-dP"
5189Dump the \s-1RTL\s0 in the assembler output as a comment before each instruction.
5190Also turns on \fB\-dp\fR annotation.
5191.IP "\fB\-dx\fR" 4
5192.IX Item "-dx"
5193Just generate \s-1RTL\s0 for a function instead of compiling it. Usually used
5194with \fB\-fdump\-rtl\-expand\fR.
5195.RE
5196.RS 4
5197.RE
5198.IP "\fB\-fdump\-noaddr\fR" 4
5199.IX Item "-fdump-noaddr"
5200When doing debugging dumps, suppress address output. This makes it more
5201feasible to use diff on debugging dumps for compiler invocations with
5202different compiler binaries and/or different
5203text / bss / data / heap / stack / dso start locations.
5204.IP "\fB\-fdump\-unnumbered\fR" 4
5205.IX Item "-fdump-unnumbered"
5206When doing debugging dumps, suppress instruction numbers and address output.
5207This makes it more feasible to use diff on debugging dumps for compiler
5208invocations 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"
5212When doing debugging dumps (see \fB\-d\fR option above), suppress
5213instruction numbers for the links to the previous and next instructions
5214in 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
5221Dump a representation of the tree structure for the entire translation
5222unit to a file. The file name is made by appending \fI.tu\fR to the
5223source file name, and the file is created in the same directory as the
5224output file. If the \fB\-\fR\fIoptions\fR form is used, \fIoptions\fR
5225controls 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
5233Dump a representation of each class's hierarchy and virtual function
5234table 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
5236same directory as the output file. If the \fB\-\fR\fIoptions\fR form
5237is used, \fIoptions\fR controls the details of the dump as described
5238for the \fB\-fdump\-tree\fR options.
5239.IP "\fB\-fdump\-ipa\-\fR\fIswitch\fR" 4
5240.IX Item "-fdump-ipa-switch"
5241Control the dumping at various stages of inter-procedural analysis
5242language tree to a file. The file name is generated by appending a
5243switch specific suffix to the source file name, and the file is created
5244in the same directory as the output file. The following dumps are
5245possible:
5246.RS 4
5247.IP "\fBall\fR" 4
5248.IX Item "all"
5249Enables all inter-procedural analysis dumps.
5250.IP "\fBcgraph\fR" 4
5251.IX Item "cgraph"
5252Dumps information about call-graph optimization, unused function removal,
5253and inlining decisions.
5254.IP "\fBinline\fR" 4
5255.IX Item "inline"
5256Dump after function inlining.
5257.RE
5258.RS 4
5259.RE
5260.IP "\fB\-fdump\-passes\fR" 4
5261.IX Item "-fdump-passes"
5262Dump the list of optimization passes that are turned on and off by
5263the current command-line options.
5264.IP "\fB\-fdump\-statistics\-\fR\fIoption\fR" 4
5265.IX Item "-fdump-statistics-option"
5266Enable and control dumping of pass statistics in a separate file. The
5267file name is generated by appending a suffix ending in
5268\&\fB.statistics\fR to the source file name, and the file is created in
5269the same directory as the output file. If the \fB\-\fR\fIoption\fR
5270form is used, \fB\-stats\fR causes counters to be summed over the
5271whole compilation unit while \fB\-details\fR dumps every event as
5272the passes generate them. The default with no option is to sum
5273counters 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
5282Control the dumping at various stages of processing the intermediate
5283language tree to a file. The file name is generated by appending a
5284switch-specific suffix to the source file name, and the file is
5285created 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
5287instead of the auto named dump files. If the \fB\-\fR\fIoptions\fR
5288form is used, \fIoptions\fR is a list of \fB\-\fR separated options
5289which control the details of the dump. Not all options are applicable
5290to all dumps; those that are not meaningful are ignored. The
5291following options are available
5292.RS 4
5293.IP "\fBaddress\fR" 4
5294.IX Item "address"
5295Print the address of each node. Usually this is not meaningful as it
5296changes according to the environment and source file. Its primary use
5297is for tying up a dump file with a debug environment.
5298.IP "\fBasmname\fR" 4
5299.IX Item "asmname"
5300If \f(CW\*(C`DECL_ASSEMBLER_NAME\*(C'\fR has been set for a given decl, use that
5301in the dump instead of \f(CW\*(C`DECL_NAME\*(C'\fR. Its primary use is ease of
5302use working backward from mangled names in the assembly file.
5303.IP "\fBslim\fR" 4
5304.IX Item "slim"
5305When dumping front-end intermediate representations, inhibit dumping
5306of members of a scope or body of a function merely because that scope
5307has been reached. Only dump such items when they are directly reachable
5308by some other path.
5309.Sp
5310When dumping pretty-printed trees, this option inhibits dumping the
5311bodies of control structures.
5312.Sp
5313When dumping \s-1RTL\s0, print the \s-1RTL\s0 in slim (condensed) form instead of
5314the default LISP-like representation.
5315.IP "\fBraw\fR" 4
5316.IX Item "raw"
5317Print a raw representation of the tree. By default, trees are
5318pretty-printed into a C\-like representation.
5319.IP "\fBdetails\fR" 4
5320.IX Item "details"
5321Enable more detailed dumps (not honored by every dump option). Also
5322include information from the optimization passes.
5323.IP "\fBstats\fR" 4
5324.IX Item "stats"
5325Enable dumping various statistics about the pass (not honored by every dump
5326option).
5327.IP "\fBblocks\fR" 4
5328.IX Item "blocks"
5329Enable showing basic block boundaries (disabled in raw dumps).
5330.IP "\fBgraph\fR" 4
5331.IX Item "graph"
5332For each of the other indicated dump files (\fB\-fdump\-rtl\-\fR\fIpass\fR),
5333dump a representation of the control flow graph suitable for viewing with
5334GraphViz to \fI\fIfile\fI.\fIpassid\fI.\fIpass\fI.dot\fR. Each function in
5335the file is pretty-printed as a subgraph, so that GraphViz can render them
5336all in a single plot.
5337.Sp
5338This option currently only works for \s-1RTL\s0 dumps, and the \s-1RTL\s0 is always
5339dumped in slim form.
5340.IP "\fBvops\fR" 4
5341.IX Item "vops"
5342Enable showing virtual operands for every statement.
5343.IP "\fBlineno\fR" 4
5344.IX Item "lineno"
5345Enable showing line numbers for statements.
5346.IP "\fBuid\fR" 4
5347.IX Item "uid"
5348Enable 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"
5351Enable showing the tree dump for each statement.
5352.IP "\fBeh\fR" 4
5353.IX Item "eh"
5354Enable showing the \s-1EH\s0 region number holding each statement.
5355.IP "\fBscev\fR" 4
5356.IX Item "scev"
5357Enable showing scalar evolution analysis details.
5358.IP "\fBoptimized\fR" 4
5359.IX Item "optimized"
5360Enable showing optimization information (only available in certain
5361passes).
5362.IP "\fBmissed\fR" 4
5363.IX Item "missed"
5364Enable showing missed optimization information (only available in certain
5365passes).
5366.IP "\fBnotes\fR" 4
5367.IX Item "notes"
5368Enable other detailed optimization information (only available in
5369certain passes).
5370.IP "\fB=\fR\fIfilename\fR" 4
5371.IX Item "=filename"
5372Instead of an auto named dump file, output into the given file
5373name. The file names \fIstdout\fR and \fIstderr\fR are treated
5374specially and are considered already open standard streams. For
5375example,
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
5382outputs vectorizer dump into \fIfoo.dump\fR, while the \s-1PRE\s0 dump is
5383output on to \fIstderr\fR. If two conflicting dump filenames are
5384given for the same pass, then the latter option overrides the earlier
5385one.
5386.IP "\fBall\fR" 4
5387.IX Item "all"
5388Turn on all options, except \fBraw\fR, \fBslim\fR, \fBverbose\fR
5389and \fBlineno\fR.
5390.IP "\fBoptall\fR" 4
5391.IX Item "optall"
5392Turn on all optimization options, i.e., \fBoptimized\fR,
5393\&\fBmissed\fR, and \fBnote\fR.
5394.RE
5395.RS 4
5396.Sp
5397The following tree dumps are possible:
5398.IP "\fBoriginal\fR" 4
5399.IX Item "original"
5400Dump before any tree based optimization, to \fI\fIfile\fI.original\fR.
5401.IP "\fBoptimized\fR" 4
5402.IX Item "optimized"
5403Dump after all tree based optimization, to \fI\fIfile\fI.optimized\fR.
5404.IP "\fBgimple\fR" 4
5405.IX Item "gimple"
5406Dump each function before and after the gimplification pass to a file. The
5407file name is made by appending \fI.gimple\fR to the source file name.
5408.IP "\fBcfg\fR" 4
5409.IX Item "cfg"
5410Dump the control flow graph of each function to a file. The file name is
5411made by appending \fI.cfg\fR to the source file name.
5412.IP "\fBch\fR" 4
5413.IX Item "ch"
5414Dump each function after copying loop headers. The file name is made by
5415appending \fI.ch\fR to the source file name.
5416.IP "\fBssa\fR" 4
5417.IX Item "ssa"
5418Dump \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"
5422Dump aliasing information for each function. The file name is made by
5423appending \fI.alias\fR to the source file name.
5424.IP "\fBccp\fR" 4
5425.IX Item "ccp"
5426Dump 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"
5430Dump 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"
5434Dump trees after partial redundancy elimination. The file name is made
5435by appending \fI.pre\fR to the source file name.
5436.IP "\fBfre\fR" 4
5437.IX Item "fre"
5438Dump trees after full redundancy elimination. The file name is made
5439by appending \fI.fre\fR to the source file name.
5440.IP "\fBcopyprop\fR" 4
5441.IX Item "copyprop"
5442Dump trees after copy propagation. The file name is made
5443by appending \fI.copyprop\fR to the source file name.
5444.IP "\fBstore_copyprop\fR" 4
5445.IX Item "store_copyprop"
5446Dump trees after store copy-propagation. The file name is made
5447by appending \fI.store_copyprop\fR to the source file name.
5448.IP "\fBdce\fR" 4
5449.IX Item "dce"
5450Dump each function after dead code elimination. The file name is made by
5451appending \fI.dce\fR to the source file name.
5452.IP "\fBmudflap\fR" 4
5453.IX Item "mudflap"
5454Dump each function after adding mudflap instrumentation. The file name is
5455made by appending \fI.mudflap\fR to the source file name.
5456.IP "\fBsra\fR" 4
5457.IX Item "sra"
5458Dump each function after performing scalar replacement of aggregates. The
5459file name is made by appending \fI.sra\fR to the source file name.
5460.IP "\fBsink\fR" 4
5461.IX Item "sink"
5462Dump each function after performing code sinking. The file name is made
5463by appending \fI.sink\fR to the source file name.
5464.IP "\fBdom\fR" 4
5465.IX Item "dom"
5466Dump each function after applying dominator tree optimizations. The file
5467name is made by appending \fI.dom\fR to the source file name.
5468.IP "\fBdse\fR" 4
5469.IX Item "dse"
5470Dump each function after applying dead store elimination. The file
5471name is made by appending \fI.dse\fR to the source file name.
5472.IP "\fBphiopt\fR" 4
5473.IX Item "phiopt"
5474Dump each function after optimizing \s-1PHI\s0 nodes into straightline code. The file
5475name is made by appending \fI.phiopt\fR to the source file name.
5476.IP "\fBforwprop\fR" 4
5477.IX Item "forwprop"
5478Dump each function after forward propagating single use variables. The file
5479name is made by appending \fI.forwprop\fR to the source file name.
5480.IP "\fBcopyrename\fR" 4
5481.IX Item "copyrename"
5482Dump each function after applying the copy rename optimization. The file
5483name is made by appending \fI.copyrename\fR to the source file name.
5484.IP "\fBnrv\fR" 4
5485.IX Item "nrv"
5486Dump each function after applying the named return value optimization on
5487generic trees. The file name is made by appending \fI.nrv\fR to the source
5488file name.
5489.IP "\fBvect\fR" 4
5490.IX Item "vect"
5491Dump each function after applying vectorization of loops. The file name is
5492made by appending \fI.vect\fR to the source file name.
5493.IP "\fBslp\fR" 4
5494.IX Item "slp"
5495Dump each function after applying vectorization of basic blocks. The file name
5496is made by appending \fI.slp\fR to the source file name.
5497.IP "\fBvrp\fR" 4
5498.IX Item "vrp"
5499Dump each function after Value Range Propagation (\s-1VRP\s0). The file name
5500is made by appending \fI.vrp\fR to the source file name.
5501.IP "\fBall\fR" 4
5502.IX Item "all"
5503Enable 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
5515Controls 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
5518optimizations. If \fIoptions\fR is not specified, it defaults to
5519\&\fBall\fR for details and \fBoptall\fR for optimization
5520groups. If the \fIfilename\fR is not specified, it defaults to
5521\&\fIstderr\fR. Note that the output \fIfilename\fR will be overwritten
5522in case of multiple translation units. If a combined output from
5523multiple translation units is desired, \fIstderr\fR should be used
5524instead.
5525.Sp
5526The options can be divided into two groups, 1) options describing the
5527verbosity of the dump, and 2) options describing which optimizations
5528should be included. The options from both the groups can be freely
5529mixed as they are non-overlapping. However, in case of any conflicts,
5530the latter options override the earlier options on the command
5531line. Though multiple \-fopt\-info options are accepted, only one of
5532them can have \fB=filename\fR. If other filenames are provided then
5533all but the first one are ignored.
5534.Sp
5535The dump verbosity has the following options
5536.RS 4
5537.IP "\fBoptimized\fR" 4
5538.IX Item "optimized"
5539Print information when an optimization is successfully applied. It is
5540up to a pass to decide which information is relevant. For example, the
5541vectorizer passes print the source location of loops which got
5542successfully vectorized.
5543.IP "\fBmissed\fR" 4
5544.IX Item "missed"
5545Print information about missed optimizations. Individual passes
5546control 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
5552will print information about missed optimization opportunities from
5553vectorization passes on stderr.
5554.IP "\fBnote\fR" 4
5555.IX Item "note"
5556Print verbose information about optimizations, such as certain
5557transformations, more detailed messages about decisions etc.
5558.IP "\fBall\fR" 4
5559.IX Item "all"
5560Print detailed optimization information. This includes
5561\&\fIoptimized\fR, \fImissed\fR, and \fInote\fR.
5562.RE
5563.RS 4
5564.Sp
5565The second set of options describes a group of optimizations and may
5566include one or more of the following.
5567.IP "\fBipa\fR" 4
5568.IX Item "ipa"
5569Enable dumps from all interprocedural optimizations.
5570.IP "\fBloop\fR" 4
5571.IX Item "loop"
5572Enable dumps from all loop optimizations.
5573.IP "\fBinline\fR" 4
5574.IX Item "inline"
5575Enable dumps from all inlining optimizations.
5576.IP "\fBvec\fR" 4
5577.IX Item "vec"
5578Enable dumps from all vectorization optimizations.
5579.RE
5580.RS 4
5581.Sp
5582For example,
5583.Sp
5584.Vb 1
5585\& gcc \-O3 \-fopt\-info\-missed=missed.all
5586.Ve
5587.Sp
5588outputs missed optimization report from all the passes into
5589\&\fImissed.all\fR.
5590.Sp
5591As another example,
5592.Sp
5593.Vb 1
5594\& gcc \-O3 \-fopt\-info\-inline\-optimized\-missed=inline.txt
5595.Ve
5596.Sp
5597will output information about missed optimizations as well as
5598optimized locations from all the inlining passes into
5599\&\fIinline.txt\fR.
5600.Sp
5601If the \fIfilename\fR is provided, then the dumps from all the
5602applicable optimizations are concatenated into the \fIfilename\fR.
5603Otherwise the dump is output onto \fIstderr\fR. If \fIoptions\fR is
5604omitted, it defaults to \fBall-optall\fR, which means dump all
5605available optimization info from all the passes. In the following
5606example, all optimization info is output on to \fIstderr\fR.
5607.Sp
5608.Vb 1
5609\& gcc \-O3 \-fopt\-info
5610.Ve
5611.Sp
5612Note that \fB\-fopt\-info\-vec\-missed\fR behaves the same as
5613\&\fB\-fopt\-info\-missed\-vec\fR.
5614.Sp
5615As 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
5621Here the two output filenames \fIvec.miss\fR and \fIloop.opt\fR are
5622in conflict since only one output file is allowed. In this case, only
5623the first option takes effect and the subsequent options are
5624ignored. Thus only the \fIvec.miss\fR is produced which cotaints
5625dumps 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"
5629This option is deprecated and is implemented in terms of
5630\&\fB\-fopt\-info\fR. Please use \fB\-fopt\-info\-\fR\fIkind\fR form
5631instead, where \fIkind\fR is one of the valid opt-info options. It
5632prints additional optimization information. For \fIn\fR=0 no
5633diagnostic information is reported. If \fIn\fR=1 the vectorizer
5634reports each loop that got vectorized, and the total number of loops
5635that got vectorized. If \fIn\fR=2 the vectorizer reports locations
5636which could not be vectorized and the reasons for those. For any
5637higher verbosity levels all the analysis and transformation
5638information from the vectorizer is reported.
5639.Sp
5640Note that the information output by \fB\-ftree\-vectorizer\-verbose\fR
5641option is sent to \fIstderr\fR. If the equivalent form
5642\&\fB\-fopt\-info\-\fR\fIoptions\fR\fB=\fR\fIfilename\fR is used then the
5643output is sent into \fIfilename\fR instead.
5644.IP "\fB\-frandom\-seed=\fR\fIstring\fR" 4
5645.IX Item "-frandom-seed=string"
5646This option provides a seed that \s-1GCC\s0 uses in place of
5647random numbers in generating certain symbol names
5648that have to be different in every compiled file. It is also used to
5649place unique stamps in coverage data files and the object files that
5650produce them. You can use the \fB\-frandom\-seed\fR option to produce
5651reproducibly identical object files.
5652.Sp
5653The \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"
5656On targets that use instruction scheduling, this option controls the
5657amount of debugging output the scheduler prints. This information is
5658written to standard error, unless \fB\-fdump\-rtl\-sched1\fR or
5659\&\fB\-fdump\-rtl\-sched2\fR is specified, in which case it is output
5660to the usual dump listing file, \fI.sched1\fR or \fI.sched2\fR
5661respectively. However for \fIn\fR greater than nine, the output is
5662always printed to standard error.
5663.Sp
5664For \fIn\fR greater than zero, \fB\-fsched\-verbose\fR outputs the
5665same information as \fB\-fdump\-rtl\-sched1\fR and \fB\-fdump\-rtl\-sched2\fR.
5666For \fIn\fR greater than one, it also output basic block probabilities,
5667detailed ready list information and unit/insn info. For \fIn\fR greater
5668than two, it includes \s-1RTL\s0 at abort point, control-flow and regions info.
5669And for \fIn\fR over four, \fB\-fsched\-verbose\fR also includes
5670dependence 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
5677Store the usual \*(L"temporary\*(R" intermediate files permanently; place them
5678in the current directory and name them based on the source file. Thus,
5679compiling \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
5681preprocessed \fIfoo.i\fR output file even though the compiler now
5682normally uses an integrated preprocessor.
5683.Sp
5684When used in combination with the \fB\-x\fR command-line option,
5685\&\fB\-save\-temps\fR is sensible enough to avoid over writing an
5686input source file with the same extension as an intermediate file.
5687The corresponding intermediate file may be obtained by renaming the
5688source file before using \fB\-save\-temps\fR.
5689.Sp
5690If you invoke \s-1GCC\s0 in parallel, compiling several different source
5691files that share a common base name in different subdirectories or the
5692same source file compiled for multiple output destinations, it is
5693likely that the different parallel compilers will interfere with each
5694other, 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
5701may result in \fIfoo.i\fR and \fIfoo.o\fR being written to
5702simultaneously by both compilers.
5703.IP "\fB\-save\-temps=obj\fR" 4
5704.IX Item "-save-temps=obj"
5705Store the usual \*(L"temporary\*(R" intermediate files permanently. If the
5706\&\fB\-o\fR option is used, the temporary files are based on the
5707object 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
5710For 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
5718creates \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]"
5723Report the \s-1CPU\s0 time taken by each subprocess in the compilation
5724sequence. For C source files, this is the compiler proper and assembler
5725(plus the linker if linking is done).
5726.Sp
5727Without 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
5734The first number on each line is the \*(L"user time\*(R", that is time spent
5735executing the program itself. The second number is \*(L"system time\*(R",
5736time spent executing operating system routines on behalf of the program.
5737Both numbers are in seconds.
5738.Sp
5739With the specification of an output file, the output is appended to the
5740named 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
5747The \*(L"user time\*(R" and the \*(L"system time\*(R" are moved before the program
5748name, and the options passed to the program are displayed, so that one
5749can later tell what file was being compiled, and with which options.
5750.IP "\fB\-fvar\-tracking\fR" 4
5751.IX Item "-fvar-tracking"
5752Run variable tracking pass. It computes where variables are stored at each
5753position in code. Better debugging information is then generated
5754(if the debugging information format supports this information).
5755.Sp
5756It is enabled by default when compiling with optimization (\fB\-Os\fR,
5757\&\fB\-O\fR, \fB\-O2\fR, ...), debugging information (\fB\-g\fR) and
5758the debug info format supports it.
5759.IP "\fB\-fvar\-tracking\-assignments\fR" 4
5760.IX Item "-fvar-tracking-assignments"
5761Annotate assignments to user variables early in the compilation and
5762attempt to carry the annotations over throughout the compilation all the
5763way to the end, in an attempt to improve debug information while
5764optimizing. Use of \fB\-gdwarf\-4\fR is recommended along with it.
5765.Sp
5766It can be enabled even if var-tracking is disabled, in which case
5767annotations 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"
5770Toggle \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"
5774Print the full absolute name of the library file \fIlibrary\fR that
5775would be used when linking\-\-\-and don't do anything else. With this
5776option, \s-1GCC\s0 does not compile or link anything; it just prints the
5777file name.
5778.IP "\fB\-print\-multi\-directory\fR" 4
5779.IX Item "-print-multi-directory"
5780Print the directory name corresponding to the multilib selected by any
5781other switches present in the command line. This directory is supposed
5782to exist in \fB\s-1GCC_EXEC_PREFIX\s0\fR.
5783.IP "\fB\-print\-multi\-lib\fR" 4
5784.IX Item "-print-multi-lib"
5785Print the mapping from multilib directory names to compiler switches
5786that 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
5789ease shell processing.
5790.IP "\fB\-print\-multi\-os\-directory\fR" 4
5791.IX Item "-print-multi-os-directory"
5792Print the path to \s-1OS\s0 libraries for the selected
5793multilib, relative to some \fIlib\fR subdirectory. If \s-1OS\s0 libraries are
5794present in the \fIlib\fR subdirectory and no multilibs are used, this is
5795usually just \fI.\fR, if \s-1OS\s0 libraries are present in \fIlib\fIsuffix\fI\fR
5796sibling 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
5798subdirectories it prints e.g. \fIamd64\fR, \fIsparcv9\fR or \fIev6\fR.
5799.IP "\fB\-print\-multiarch\fR" 4
5800.IX Item "-print-multiarch"
5801Print the path to \s-1OS\s0 libraries for the selected multiarch,
5802relative to some \fIlib\fR subdirectory.
5803.IP "\fB\-print\-prog\-name=\fR\fIprogram\fR" 4
5804.IX Item "-print-prog-name=program"
5805Like \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"
5808Same as \fB\-print\-file\-name=libgcc.a\fR.
5809.Sp
5810This is useful when you use \fB\-nostdlib\fR or \fB\-nodefaultlibs\fR
5811but 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"
5818Print the name of the configured installation directory and a list of
5819program and library directories \fBgcc\fR searches\-\-\-and don't do anything else.
5820.Sp
5821This is useful when \fBgcc\fR prints the error message
5822\&\fBinstallation problem, cannot exec cpp0: No such file or directory\fR.
5823To resolve this you either need to put \fIcpp0\fR and the other compiler
5824components where \fBgcc\fR expects to find them, or you can set the environment
5825variable \fB\s-1GCC_EXEC_PREFIX\s0\fR to the directory where you installed them.
5826Don't forget the trailing \fB/\fR.
5827.IP "\fB\-print\-sysroot\fR" 4
5828.IX Item "-print-sysroot"
5829Print the target sysroot directory that is used during
5830compilation. This is the target sysroot specified either at configure
5831time or using the \fB\-\-sysroot\fR option, possibly with an extra
5832suffix that depends on compilation options. If no target sysroot is
5833specified, the option prints nothing.
5834.IP "\fB\-print\-sysroot\-headers\-suffix\fR" 4
5835.IX Item "-print-sysroot-headers-suffix"
5836Print the suffix added to the target sysroot when searching for
5837headers, or give an error if the compiler is not configured with such
5838a suffix\-\-\-and don't do anything else.
5839.IP "\fB\-dumpmachine\fR" 4
5840.IX Item "-dumpmachine"
5841Print 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"
5845Print the compiler version (for example, \fB3.0\fR)\-\-\-and don't do
5846anything else.
5847.IP "\fB\-dumpspecs\fR" 4
5848.IX Item "-dumpspecs"
5849Print the compiler's built-in specs\-\-\-and don't do anything else. (This
5850is 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"
5853Normally, when producing \s-1DWARF\s0 2 output, \s-1GCC\s0 avoids producing debug symbol
5854output for types that are nowhere used in the source file being compiled.
5855Sometimes it is useful to have \s-1GCC\s0 emit debugging
5856information for all types declared in a compilation
5857unit, regardless of whether or not they are actually used
5858in that compilation unit, for example
5859if, in the debugger, you want to cast a value to a type that is
5860not actually used in your program (but is declared). More often,
5861however, this results in a significant amount of wasted space.
5862.SS "Options That Control Optimization"
5863.IX Subsection "Options That Control Optimization"
5864These options control various sorts of optimizations.
5865.PP
5866Without any optimization option, the compiler's goal is to reduce the
5867cost of compilation and to make debugging produce the expected
5868results. Statements are independent: if you stop the program with a
5869breakpoint between statements, you can then assign a new value to any
5870variable or change the program counter to any other statement in the
5871function and get exactly the results you expect from the source
5872code.
5873.PP
5874Turning on optimization flags makes the compiler attempt to improve
5875the performance and/or code size at the expense of compilation time
5876and possibly the ability to debug the program.
5877.PP
5878The compiler performs optimization based on the knowledge it has of the
5879program. Compiling multiple files at once to a single output file mode allows
5880the compiler to use information gained from all of the files when compiling
5881each of them.
5882.PP
5883Not all optimizations are controlled directly by a flag. Only
5884optimizations that have a flag are listed in this section.
5885.PP
5886Most optimizations are only enabled if an \fB\-O\fR level is set on
5887the command line. Otherwise they are disabled, even if individual
5888optimization flags are specified.
5889.PP
5890Depending on the target and how \s-1GCC\s0 was configured, a slightly different
5891set of optimizations may be enabled at each \fB\-O\fR level than
5892those listed here. You can invoke \s-1GCC\s0 with \fB\-Q \-\-help=optimizers\fR
5893to 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
5900Optimize. Optimizing compilation takes somewhat more time, and a lot
5901more memory for a large function.
5902.Sp
5903With \fB\-O\fR, the compiler tries to reduce code size and execution
5904time, without performing any optimizations that take a great deal of
5905compilation 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
5942where doing so does not interfere with debugging.
5943.IP "\fB\-O2\fR" 4
5944.IX Item "-O2"
5945Optimize even more. \s-1GCC\s0 performs nearly all supported optimizations
5946that do not involve a space-speed tradeoff.
5947As compared to \fB\-O\fR, this option increases both compilation time
5948and the performance of the generated code.
5949.Sp
5950\&\fB\-O2\fR turns on all optimization flags specified by \fB\-O\fR. It
5951also 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
5979Please note the warning under \fB\-fgcse\fR about
5980invoking \fB\-O2\fR on programs that use computed gotos.
5981.IP "\fB\-O3\fR" 4
5982.IX Item "-O3"
5983Optimize yet more. \fB\-O3\fR turns on all optimizations specified
5984by \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"
5991Reduce compilation time and make debugging produce the expected
5992results. This is the default.
5993.IP "\fB\-Os\fR" 4
5994.IX Item "-Os"
5995Optimize for size. \fB\-Os\fR enables all \fB\-O2\fR optimizations that
5996do not typically increase code size. It also performs further
5997optimizations 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"
6005Disregard strict standards compliance. \fB\-Ofast\fR enables all
6006\&\fB\-O3\fR optimizations. It also enables optimizations that are not
6007valid for all standard-compliant programs.
6008It 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"
6012Optimize debugging experience. \fB\-Og\fR enables optimizations
6013that do not interfere with debugging. It should be the optimization
6014level of choice for the standard edit-compile-debug cycle, offering
6015a reasonable level of optimization while maintaining fast compilation
6016and a good debugging experience.
6017.Sp
6018If you use multiple \fB\-O\fR options, with or without level numbers,
6019the last such option is the one that is effective.
6020.PP
6021Options of the form \fB\-f\fR\fIflag\fR specify machine-independent
6022flags. Most flags have both positive and negative forms; the negative
6023form of \fB\-ffoo\fR is \fB\-fno\-foo\fR. In the table
6024below, only one of the forms is listed\-\-\-the one you typically
6025use. You can figure out the other form by either removing \fBno\-\fR
6026or adding it.
6027.PP
6028The following options control specific optimizations. They are either
6029activated by \fB\-O\fR options or are related to ones that are. You
6030can use the following flags in the rare cases when \*(L"fine-tuning\*(R" of
6031optimizations to be performed is desired.
6032.IP "\fB\-fno\-default\-inline\fR" 4
6033.IX Item "-fno-default-inline"
6034Do not make member functions inline by default merely because they are
6035defined inside the class scope (\*(C+ only). Otherwise, when you specify
6036\&\fB\-O\fR, member functions defined inside class scope are compiled
6037inline by default; i.e., you don't need to add \fBinline\fR in front of
6038the member function name.
6039.IP "\fB\-fno\-defer\-pop\fR" 4
6040.IX Item "-fno-defer-pop"
6041Always pop the arguments to each function call as soon as that function
6042returns. For machines that must pop arguments after a function call,
6043the compiler normally lets arguments accumulate on the stack for several
6044function calls and pops them all at once.
6045.Sp
6046Disabled 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"
6049Perform a forward propagation pass on \s-1RTL\s0. The pass tries to combine two
6050instructions and checks if the result can be simplified. If loop unrolling
6051is active, two passes are performed and the second is scheduled after
6052loop unrolling.
6053.Sp
6054This 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
6060such as forming of fused multiply-add operations if the target has
6061native support for them.
6062\&\fB\-ffp\-contract=on\fR enables floating-point expression contraction
6063if allowed by the language standard. This is currently not implemented
6064and treated equal to \fB\-ffp\-contract=off\fR.
6065.Sp
6066The default is \fB\-ffp\-contract=fast\fR.
6067.IP "\fB\-fomit\-frame\-pointer\fR" 4
6068.IX Item "-fomit-frame-pointer"
6069Don't keep the frame pointer in a register for functions that
6070don't need one. This avoids the instructions to save, set up and
6071restore frame pointers; it also makes an extra register available
6072in many functions. \fBIt also makes debugging impossible on
6073some machines.\fR
6074.Sp
6075On some machines, such as the \s-1VAX\s0, this flag has no effect, because
6076the standard calling sequence automatically handles the frame pointer
6077and nothing is saved by pretending it doesn't exist. The
6078machine-description macro \f(CW\*(C`FRAME_POINTER_REQUIRED\*(C'\fR controls
6079whether a target machine supports this flag.
6080.Sp
6081Starting with \s-1GCC\s0 version 4.6, the default setting (when not optimizing for
6082size) 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
6087Enabled 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"
6090Optimize sibling and tail recursive calls.
6091.Sp
6092Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
6093.IP "\fB\-fno\-inline\fR" 4
6094.IX Item "-fno-inline"
6095Do not expand any functions inline apart from those marked with
6096the \f(CW\*(C`always_inline\*(C'\fR attribute. This is the default when not
6097optimizing.
6098.Sp
6099Single functions can be exempted from inlining by marking them
6100with the \f(CW\*(C`noinline\*(C'\fR attribute.
6101.IP "\fB\-finline\-small\-functions\fR" 4
6102.IX Item "-finline-small-functions"
6103Integrate functions into their callers when their body is smaller than expected
6104function call code (so overall size of program gets smaller). The compiler
6105heuristically decides which functions are simple enough to be worth integrating
6106in this way. This inlining applies to all functions, even those not declared
6107inline.
6108.Sp
6109Enabled at level \fB\-O2\fR.
6110.IP "\fB\-findirect\-inlining\fR" 4
6111.IX Item "-findirect-inlining"
6112Inline also indirect calls that are discovered to be known at compile
6113time thanks to previous inlining. This option has any effect only
6114when inlining itself is turned on by the \fB\-finline\-functions\fR
6115or \fB\-finline\-small\-functions\fR options.
6116.Sp
6117Enabled at level \fB\-O2\fR.
6118.IP "\fB\-finline\-functions\fR" 4
6119.IX Item "-finline-functions"
6120Consider all functions for inlining, even if they are not declared inline.
6121The compiler heuristically decides which functions are worth integrating
6122in this way.
6123.Sp
6124If all calls to a given function are integrated, and the function is
6125declared \f(CW\*(C`static\*(C'\fR, then the function is normally not output as
6126assembler code in its own right.
6127.Sp
6128Enabled at level \fB\-O3\fR.
6129.IP "\fB\-finline\-functions\-called\-once\fR" 4
6130.IX Item "-finline-functions-called-once"
6131Consider all \f(CW\*(C`static\*(C'\fR functions called once for inlining into their
6132caller even if they are not marked \f(CW\*(C`inline\*(C'\fR. If a call to a given
6133function is integrated, then the function is not output as assembler code
6134in its own right.
6135.Sp
6136Enabled 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"
6139Inline functions marked by \f(CW\*(C`always_inline\*(C'\fR and functions whose body seems
6140smaller than the function call overhead early before doing
6141\&\fB\-fprofile\-generate\fR instrumentation and real inlining pass. Doing so
6142makes profiling significantly cheaper and usually inlining faster on programs
6143having large chains of nested wrapper functions.
6144.Sp
6145Enabled by default.
6146.IP "\fB\-fipa\-sra\fR" 4
6147.IX Item "-fipa-sra"
6148Perform interprocedural scalar replacement of aggregates, removal of
6149unused parameters and replacement of parameters passed by reference
6150by parameters passed by value.
6151.Sp
6152Enabled 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"
6155By default, \s-1GCC\s0 limits the size of functions that can be inlined. This flag
6156allows coarse control of this limit. \fIn\fR is the size of functions that
6157can be inlined in number of pseudo instructions.
6158.Sp
6159Inlining is actually controlled by a number of parameters, which may be
6160specified individually by using \fB\-\-param\fR \fIname\fR\fB=\fR\fIvalue\fR.
6161The \fB\-finline\-limit=\fR\fIn\fR option sets some of these parameters
6162as follows:
6163.RS 4
6164.IP "\fBmax-inline-insns-single\fR" 4
6165.IX Item "max-inline-insns-single"
6166is set to \fIn\fR/2.
6167.IP "\fBmax-inline-insns-auto\fR" 4
6168.IX Item "max-inline-insns-auto"
6169is set to \fIn\fR/2.
6170.RE
6171.RS 4
6172.Sp
6173See below for a documentation of the individual
6174parameters 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
6177in default behavior.
6178.Sp
6179\&\fINote:\fR pseudo instruction represents, in this particular context, an
6180abstract measurement of function's size. In no way does it represent a count
6181of assembly instructions and as such its exact meaning might change from one
6182release to an another.
6183.RE
6184.IP "\fB\-fno\-keep\-inline\-dllexport\fR" 4
6185.IX Item "-fno-keep-inline-dllexport"
6186This is a more fine-grained version of \fB\-fkeep\-inline\-functions\fR,
6187which applies only to functions that are declared using the \f(CW\*(C`dllexport\*(C'\fR
6188attribute or declspec
6189.IP "\fB\-fkeep\-inline\-functions\fR" 4
6190.IX Item "-fkeep-inline-functions"
6191In C, emit \f(CW\*(C`static\*(C'\fR functions that are declared \f(CW\*(C`inline\*(C'\fR
6192into the object file, even if the function has been inlined into all
6193of 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
6195inline functions into the object file.
6196.IP "\fB\-fkeep\-static\-consts\fR" 4
6197.IX Item "-fkeep-static-consts"
6198Emit variables declared \f(CW\*(C`static const\*(C'\fR when optimization isn't turned
6199on, 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
6202check if a variable is referenced, regardless of whether or not
6203optimization is turned on, use the \fB\-fno\-keep\-static\-consts\fR option.
6204.IP "\fB\-fmerge\-constants\fR" 4
6205.IX Item "-fmerge-constants"
6206Attempt to merge identical constants (string constants and floating-point
6207constants) across compilation units.
6208.Sp
6209This option is the default for optimized compilation if the assembler and
6210linker support it. Use \fB\-fno\-merge\-constants\fR to inhibit this
6211behavior.
6212.Sp
6213Enabled 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"
6216Attempt to merge identical constants and identical variables.
6217.Sp
6218This option implies \fB\-fmerge\-constants\fR. In addition to
6219\&\fB\-fmerge\-constants\fR this considers e.g. even constant initialized
6220arrays or initialized constant variables with integral or floating-point
6221types. Languages like C or \*(C+ require each variable, including multiple
6222instances of the same variable in recursive calls, to have distinct locations,
6223so using this option results in non-conforming
6224behavior.
6225.IP "\fB\-fmodulo\-sched\fR" 4
6226.IX Item "-fmodulo-sched"
6227Perform swing modulo scheduling immediately before the first scheduling
6228pass. This pass looks at innermost loops and reorders their
6229instructions by overlapping different iterations.
6230.IP "\fB\-fmodulo\-sched\-allow\-regmoves\fR" 4
6231.IX Item "-fmodulo-sched-allow-regmoves"
6232Perform more aggressive SMS-based modulo scheduling with register moves
6233allowed. By setting this flag certain anti-dependences edges are
6234deleted, which triggers the generation of reg-moves based on the
6235life-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"
6239Do not use \*(L"decrement and branch\*(R" instructions on a count register,
6240but instead generate a sequence of instructions that decrement a
6241register, compare it against zero, then branch based upon the result.
6242This option is only meaningful on architectures that support such
6243instructions, which include x86, PowerPC, \s-1IA\-64\s0 and S/390.
6244.Sp
6245The default is \fB\-fbranch\-count\-reg\fR.
6246.IP "\fB\-fno\-function\-cse\fR" 4
6247.IX Item "-fno-function-cse"
6248Do not put function addresses in registers; make each instruction that
6249calls a constant function contain the function's address explicitly.
6250.Sp
6251This option results in less efficient code, but some strange hacks
6252that alter the assembler output may be confused by the optimizations
6253performed when this option is not used.
6254.Sp
6255The default is \fB\-ffunction\-cse\fR
6256.IP "\fB\-fno\-zero\-initialized\-in\-bss\fR" 4
6257.IX Item "-fno-zero-initialized-in-bss"
6258If the target supports a \s-1BSS\s0 section, \s-1GCC\s0 by default puts variables that
6259are initialized to zero into \s-1BSS\s0. This can save space in the resulting
6260code.
6261.Sp
6262This option turns off this behavior because some programs explicitly
6263rely on variables going to the data section\-\-\-e.g., so that the
6264resulting executable can find the beginning of that section and/or make
6265assumptions based on that.
6266.Sp
6267The default is \fB\-fzero\-initialized\-in\-bss\fR.
6268.IP "\fB\-fmudflap \-fmudflapth \-fmudflapir\fR" 4
6269.IX Item "-fmudflap -fmudflapth -fmudflapir"
6270For front-ends that support it (C and \*(C+), instrument all risky
6271pointer/array dereferencing operations, some standard library
6272string/heap functions, and some other associated constructs with
6273range/validity tests. Modules so instrumented should be immune to
6274buffer overflows, invalid heap use, and some other classes of C/\*(C+
6275programming errors. The instrumentation relies on a separate runtime
6276library (\fIlibmudflap\fR), which is linked into a program if
6277\&\fB\-fmudflap\fR is given at link time. Run-time behavior of the
6278instrumented program is controlled by the \fB\s-1MUDFLAP_OPTIONS\s0\fR
6279environment variable. See \f(CW\*(C`env MUDFLAP_OPTIONS=\-help a.out\*(C'\fR
6280for its options.
6281.Sp
6282Use \fB\-fmudflapth\fR instead of \fB\-fmudflap\fR to compile and to
6283link if your program is multi-threaded. Use \fB\-fmudflapir\fR, in
6284addition to \fB\-fmudflap\fR or \fB\-fmudflapth\fR, if
6285instrumentation should ignore pointer reads. This produces less
6286instrumentation (and therefore faster execution) and still provides
6287some protection against outright memory corrupting writes, but allows
6288erroneously read data to propagate within a program.
6289.IP "\fB\-fthread\-jumps\fR" 4
6290.IX Item "-fthread-jumps"
6291Perform optimizations that check to see if a jump branches to a
6292location where another comparison subsumed by the first is found. If
6293so, the first branch is redirected to either the destination of the
6294second branch or a point immediately following it, depending on whether
6295the condition is known to be true or false.
6296.Sp
6297Enabled 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"
6300When using a type that occupies multiple registers, such as \f(CW\*(C`long
6301long\*(C'\fR on a 32\-bit system, split the registers apart and allocate them
6302independently. This normally generates better code for those types,
6303but may make debugging more difficult.
6304.Sp
6305Enabled 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"
6309In common subexpression elimination (\s-1CSE\s0), scan through jump instructions
6310when the target of the jump is not reached by any other path. For
6311example, 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
6313tested is false.
6314.Sp
6315Enabled 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"
6318This is similar to \fB\-fcse\-follow\-jumps\fR, but causes \s-1CSE\s0 to
6319follow jumps that conditionally skip over blocks. When \s-1CSE\s0
6320encounters 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
6322body of the \f(CW\*(C`if\*(C'\fR.
6323.Sp
6324Enabled 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"
6327Re-run common subexpression elimination after loop optimizations are
6328performed.
6329.Sp
6330Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
6331.IP "\fB\-fgcse\fR" 4
6332.IX Item "-fgcse"
6333Perform a global common subexpression elimination pass.
6334This pass also performs global constant and copy propagation.
6335.Sp
6336\&\fINote:\fR When compiling a program using computed gotos, a \s-1GCC\s0
6337extension, you may get better run-time performance if you disable
6338the global common subexpression elimination pass by adding
6339\&\fB\-fno\-gcse\fR to the command line.
6340.Sp
6341Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
6342.IP "\fB\-fgcse\-lm\fR" 4
6343.IX Item "-fgcse-lm"
6344When \fB\-fgcse\-lm\fR is enabled, global common subexpression elimination
6345attempts to move loads that are only killed by stores into themselves. This
6346allows a loop containing a load/store sequence to be changed to a load outside
6347the loop, and a copy/store within the loop.
6348.Sp
6349Enabled by default when \fB\-fgcse\fR is enabled.
6350.IP "\fB\-fgcse\-sm\fR" 4
6351.IX Item "-fgcse-sm"
6352When \fB\-fgcse\-sm\fR is enabled, a store motion pass is run after
6353global common subexpression elimination. This pass attempts to move
6354stores out of loops. When used in conjunction with \fB\-fgcse\-lm\fR,
6355loops containing a load/store sequence can be changed to a load before
6356the loop and a store after the loop.
6357.Sp
6358Not enabled at any optimization level.
6359.IP "\fB\-fgcse\-las\fR" 4
6360.IX Item "-fgcse-las"
6361When \fB\-fgcse\-las\fR is enabled, the global common subexpression
6362elimination pass eliminates redundant loads that come after stores to the
6363same memory location (both partial and full redundancies).
6364.Sp
6365Not enabled at any optimization level.
6366.IP "\fB\-fgcse\-after\-reload\fR" 4
6367.IX Item "-fgcse-after-reload"
6368When \fB\-fgcse\-after\-reload\fR is enabled, a redundant load elimination
6369pass is performed after reload. The purpose of this pass is to clean up
6370redundant spilling.
6371.IP "\fB\-faggressive\-loop\-optimizations\fR" 4
6372.IX Item "-faggressive-loop-optimizations"
6373This option tells the loop optimizer to use language constraints to
6374derive bounds for the number of iterations of a loop. This assumes that
6375loop code does not invoke undefined behavior by for example causing signed
6376integer overflows or out-of-bound array accesses. The bounds for the
6377number of iterations of a loop are used to guide loop unrolling and peeling
6378and loop exit test optimizations.
6379This option is enabled by default.
6380.IP "\fB\-funsafe\-loop\-optimizations\fR" 4
6381.IX Item "-funsafe-loop-optimizations"
6382This option tells the loop optimizer to assume that loop indices do not
6383overflow, and that loops with nontrivial exit condition are not
6384infinite. This enables a wider range of loop optimizations even if
6385the loop optimizer itself cannot prove that these assumptions are valid.
6386If you use \fB\-Wunsafe\-loop\-optimizations\fR, the compiler warns you
6387if it finds this kind of loop.
6388.IP "\fB\-fcrossjumping\fR" 4
6389.IX Item "-fcrossjumping"
6390Perform cross-jumping transformation.
6391This transformation unifies equivalent code and saves code size. The
6392resulting code may or may not perform better than without cross-jumping.
6393.Sp
6394Enabled 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"
6397Combine increments or decrements of addresses with memory accesses.
6398This pass is always skipped on architectures that do not have
6399instructions to support this. Enabled by default at \fB\-O\fR and
6400higher on architectures that support this.
6401.IP "\fB\-fdce\fR" 4
6402.IX Item "-fdce"
6403Perform dead code elimination (\s-1DCE\s0) on \s-1RTL\s0.
6404Enabled by default at \fB\-O\fR and higher.
6405.IP "\fB\-fdse\fR" 4
6406.IX Item "-fdse"
6407Perform dead store elimination (\s-1DSE\s0) on \s-1RTL\s0.
6408Enabled by default at \fB\-O\fR and higher.
6409.IP "\fB\-fif\-conversion\fR" 4
6410.IX Item "-fif-conversion"
6411Attempt to transform conditional jumps into branch-less equivalents. This
6412includes use of conditional moves, min, max, set flags and abs instructions, and
6413some tricks doable by standard arithmetics. The use of conditional execution
6414on chips where it is available is controlled by \f(CW\*(C`if\-conversion2\*(C'\fR.
6415.Sp
6416Enabled 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"
6419Use conditional execution (where available) to transform conditional jumps into
6420branch-less equivalents.
6421.Sp
6422Enabled 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"
6425Assume that programs cannot safely dereference null pointers, and that
6426no code or data element resides there. This enables simple constant
6427folding optimizations at all optimization levels. In addition, other
6428optimization passes in \s-1GCC\s0 use this flag to control global dataflow
6429analyses that eliminate useless checks for null pointers; these assume
6430that if a pointer is checked after it has already been dereferenced,
6431it cannot be null.
6432.Sp
6433Note however that in some environments this assumption is not true.
6434Use \fB\-fno\-delete\-null\-pointer\-checks\fR to disable this optimization
6435for programs that depend on that behavior.
6436.Sp
6437Some targets, especially embedded ones, disable this option at all levels.
6438Otherwise 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
6440are enabled independently at different optimization levels.
6441.IP "\fB\-fdevirtualize\fR" 4
6442.IX Item "-fdevirtualize"
6443Attempt to convert calls to virtual functions to direct calls. This
6444is done both within a procedure and interprocedurally as part of
6445indirect inlining (\f(CW\*(C`\-findirect\-inlining\*(C'\fR) and interprocedural constant
6446propagation (\fB\-fipa\-cp\fR).
6447Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
6448.IP "\fB\-fexpensive\-optimizations\fR" 4
6449.IX Item "-fexpensive-optimizations"
6450Perform a number of minor optimizations that are relatively expensive.
6451.Sp
6452Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
6453.IP "\fB\-free\fR" 4
6454.IX Item "-free"
6455Attempt to remove redundant extension instructions. This is especially
6456helpful for the x86\-64 architecture, which implicitly zero-extends in 64\-bit
6457registers after writing to their lower 32\-bit half.
6458.Sp
6459Enabled 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
6466Attempt to reassign register numbers in move instructions and as
6467operands of other simple instructions in order to maximize the amount of
6468register tying. This is especially helpful on machines with two-operand
6469instructions.
6470.Sp
6471Note \fB\-fregmove\fR and \fB\-foptimize\-register\-move\fR are the same
6472optimization.
6473.Sp
6474Enabled 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"
6477Use the specified coloring algorithm for the integrated register
6478allocator. The \fIalgorithm\fR argument can be \fBpriority\fR, which
6479specifies Chow's priority coloring, or \fB\s-1CB\s0\fR, which specifies
6480Chaitin-Briggs coloring. Chaitin-Briggs coloring is not implemented
6481for all architectures, but for those targets that do support it, it is
6482the default because it generates better code.
6483.IP "\fB\-fira\-region=\fR\fIregion\fR" 4
6484.IX Item "-fira-region=region"
6485Use 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"
6490Use all loops as register allocation regions.
6491This can give the best results for machines with a small and/or
6492irregular register set.
6493.IP "\fBmixed\fR" 4
6494.IX Item "mixed"
6495Use all loops except for loops with small register pressure
6496as the regions. This value usually gives
6497the best results in most cases and for most architectures,
6498and 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"
6502Use all functions as a single region.
6503This 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"
6510Use \s-1IRA\s0 to evaluate register pressure in the code hoisting pass for
6511decisions to hoist expressions. This option usually results in smaller
6512code, but it can slow the compiler down.
6513.Sp
6514This 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"
6517Use \s-1IRA\s0 to evaluate register pressure in loops for decisions to move
6518loop invariants. This option usually results in generation
6519of faster and smaller code on machines with large register files (>= 32
6520registers), but it can slow the compiler down.
6521.Sp
6522This 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"
6525Disable sharing of stack slots used for saving call-used hard
6526registers living through a call. Each hard register gets a
6527separate stack slot, and as a result function stack frames are
6528larger.
6529.IP "\fB\-fno\-ira\-share\-spill\-slots\fR" 4
6530.IX Item "-fno-ira-share-spill-slots"
6531Disable sharing of stack slots allocated for pseudo-registers. Each
6532pseudo-register that does not get a hard register gets a separate
6533stack 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"
6536Control the verbosity of the dump file for the integrated register allocator.
6537The default value is 5. If the value \fIn\fR is greater or equal to 10,
6538the 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"
6541If supported for the target machine, attempt to reorder instructions
6542to exploit instruction slots available after delayed branch
6543instructions.
6544.Sp
6545Enabled 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"
6548If supported for the target machine, attempt to reorder instructions to
6549eliminate execution stalls due to required data being unavailable. This
6550helps machines that have slow floating point or memory load instructions
6551by allowing other instructions to be issued until the result of the load
6552or floating-point instruction is required.
6553.Sp
6554Enabled at levels \fB\-O2\fR, \fB\-O3\fR.
6555.IP "\fB\-fschedule\-insns2\fR" 4
6556.IX Item "-fschedule-insns2"
6557Similar to \fB\-fschedule\-insns\fR, but requests an additional pass of
6558instruction scheduling after register allocation has been done. This is
6559especially useful on machines with a relatively small number of
6560registers and where memory load instructions take more than one cycle.
6561.Sp
6562Enabled 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"
6565Don't schedule instructions across basic blocks. This is normally
6566enabled by default when scheduling before register allocation, i.e.
6567with \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"
6570Don't allow speculative motion of non-load instructions. This is normally
6571enabled by default when scheduling before register allocation, i.e.
6572with \fB\-fschedule\-insns\fR or at \fB\-O2\fR or higher.
6573.IP "\fB\-fsched\-pressure\fR" 4
6574.IX Item "-fsched-pressure"
6575Enable register pressure sensitive insn scheduling before register
6576allocation. This only makes sense when scheduling before register
6577allocation is enabled, i.e. with \fB\-fschedule\-insns\fR or at
6578\&\fB\-O2\fR or higher. Usage of this option can improve the
6579generated code and decrease its size by preventing register pressure
6580increase above the number of available hard registers and subsequent
6581spills in register allocation.
6582.IP "\fB\-fsched\-spec\-load\fR" 4
6583.IX Item "-fsched-spec-load"
6584Allow speculative motion of some load instructions. This only makes
6585sense 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"
6589Allow speculative motion of more load instructions. This only makes
6590sense 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
6598Define how many insns (if any) can be moved prematurely from the queue
6599of stalled insns into the ready list during the second scheduling pass.
6600\&\fB\-fno\-sched\-stalled\-insns\fR means that no insns are moved
6601prematurely, \fB\-fsched\-stalled\-insns=0\fR means there is no limit
6602on 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
6611Define how many insn groups (cycles) are examined for a dependency
6612on a stalled insn that is a candidate for premature removal from the queue
6613of stalled insns. This has an effect only during the second scheduling pass,
6614and 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"
6621When scheduling after register allocation, use superblock scheduling.
6622This allows motion across basic block boundaries,
6623resulting in faster schedules. This option is experimental, as not all machine
6624descriptions used by \s-1GCC\s0 model the \s-1CPU\s0 closely enough to avoid unreliable
6625results from the algorithm.
6626.Sp
6627This 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"
6631Enable the group heuristic in the scheduler. This heuristic favors
6632the instruction that belongs to a schedule group. This is enabled
6633by default when scheduling is enabled, i.e. with \fB\-fschedule\-insns\fR
6634or \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"
6637Enable the critical-path heuristic in the scheduler. This heuristic favors
6638instructions on the critical path. This is enabled by default when
6639scheduling is enabled, i.e. with \fB\-fschedule\-insns\fR
6640or \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"
6643Enable the speculative instruction heuristic in the scheduler. This
6644heuristic favors speculative instructions with greater dependency weakness.
6645This is enabled by default when scheduling is enabled, i.e.
6646with \fB\-fschedule\-insns\fR or \fB\-fschedule\-insns2\fR
6647or at \fB\-O2\fR or higher.
6648.IP "\fB\-fsched\-rank\-heuristic\fR" 4
6649.IX Item "-fsched-rank-heuristic"
6650Enable the rank heuristic in the scheduler. This heuristic favors
6651the instruction belonging to a basic block with greater size or frequency.
6652This is enabled by default when scheduling is enabled, i.e.
6653with \fB\-fschedule\-insns\fR or \fB\-fschedule\-insns2\fR or
6654at \fB\-O2\fR or higher.
6655.IP "\fB\-fsched\-last\-insn\-heuristic\fR" 4
6656.IX Item "-fsched-last-insn-heuristic"
6657Enable the last-instruction heuristic in the scheduler. This heuristic
6658favors the instruction that is less dependent on the last instruction
6659scheduled. This is enabled by default when scheduling is enabled,
6660i.e. with \fB\-fschedule\-insns\fR or \fB\-fschedule\-insns2\fR or
6661at \fB\-O2\fR or higher.
6662.IP "\fB\-fsched\-dep\-count\-heuristic\fR" 4
6663.IX Item "-fsched-dep-count-heuristic"
6664Enable the dependent-count heuristic in the scheduler. This heuristic
6665favors the instruction that has more instructions depending on it.
6666This is enabled by default when scheduling is enabled, i.e.
6667with \fB\-fschedule\-insns\fR or \fB\-fschedule\-insns2\fR or
6668at \fB\-O2\fR or higher.
6669.IP "\fB\-freschedule\-modulo\-scheduled\-loops\fR" 4
6670.IX Item "-freschedule-modulo-scheduled-loops"
6671Modulo scheduling is performed before traditional scheduling. If a loop
6672is modulo scheduled, later scheduling passes may change its schedule.
6673Use this option to control that behavior.
6674.IP "\fB\-fselective\-scheduling\fR" 4
6675.IX Item "-fselective-scheduling"
6676Schedule instructions using selective scheduling algorithm. Selective
6677scheduling runs instead of the first scheduler pass.
6678.IP "\fB\-fselective\-scheduling2\fR" 4
6679.IX Item "-fselective-scheduling2"
6680Schedule instructions using selective scheduling algorithm. Selective
6681scheduling runs instead of the second scheduler pass.
6682.IP "\fB\-fsel\-sched\-pipelining\fR" 4
6683.IX Item "-fsel-sched-pipelining"
6684Enable software pipelining of innermost loops during selective scheduling.
6685This 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"
6689When pipelining loops during selective scheduling, also pipeline outer loops.
6690This 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"
6693Emit function prologues only before parts of the function that need it,
6694rather 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"
6698Enable allocation of values to registers that are clobbered by
6699function calls, by emitting extra instructions to save and restore the
6700registers around such calls. Such allocation is done only when it
6701seems to result in better code.
6702.Sp
6703This option is always enabled by default on certain machines, usually
6704those which have no call-preserved registers to use instead.
6705.Sp
6706Enabled 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"
6709Tracks stack adjustments (pushes and pops) and stack memory references
6710and then tries to find ways to combine them.
6711.Sp
6712Enabled by default at \fB\-O1\fR and higher.
6713.IP "\fB\-fconserve\-stack\fR" 4
6714.IX Item "-fconserve-stack"
6715Attempt to minimize stack usage. The compiler attempts to use less
6716stack space, even if that makes the program slower. This option
6717implies setting the \fBlarge-stack-frame\fR parameter to 100
6718and the \fBlarge-stack-frame-growth\fR parameter to 400.
6719.IP "\fB\-ftree\-reassoc\fR" 4
6720.IX Item "-ftree-reassoc"
6721Perform reassociation on trees. This flag is enabled by default
6722at \fB\-O\fR and higher.
6723.IP "\fB\-ftree\-pre\fR" 4
6724.IX Item "-ftree-pre"
6725Perform partial redundancy elimination (\s-1PRE\s0) on trees. This flag is
6726enabled by default at \fB\-O2\fR and \fB\-O3\fR.
6727.IP "\fB\-ftree\-partial\-pre\fR" 4
6728.IX Item "-ftree-partial-pre"
6729Make partial redundancy elimination (\s-1PRE\s0) more aggressive. This flag is
6730enabled by default at \fB\-O3\fR.
6731.IP "\fB\-ftree\-forwprop\fR" 4
6732.IX Item "-ftree-forwprop"
6733Perform forward propagation on trees. This flag is enabled by default
6734at \fB\-O\fR and higher.
6735.IP "\fB\-ftree\-fre\fR" 4
6736.IX Item "-ftree-fre"
6737Perform full redundancy elimination (\s-1FRE\s0) on trees. The difference
6738between \s-1FRE\s0 and \s-1PRE\s0 is that \s-1FRE\s0 only considers expressions
6739that are computed on all paths leading to the redundant computation.
6740This analysis is faster than \s-1PRE\s0, though it exposes fewer redundancies.
6741This flag is enabled by default at \fB\-O\fR and higher.
6742.IP "\fB\-ftree\-phiprop\fR" 4
6743.IX Item "-ftree-phiprop"
6744Perform hoisting of loads from conditional pointers on trees. This
6745pass is enabled by default at \fB\-O\fR and higher.
6746.IP "\fB\-fhoist\-adjacent\-loads\fR" 4
6747.IX Item "-fhoist-adjacent-loads"
6748Speculatively hoist loads from both branches of an if-then-else if the
6749loads are from adjacent locations in the same structure and the target
6750architecture has a conditional move instruction. This flag is enabled
6751by default at \fB\-O2\fR and higher.
6752.IP "\fB\-ftree\-copy\-prop\fR" 4
6753.IX Item "-ftree-copy-prop"
6754Perform copy propagation on trees. This pass eliminates unnecessary
6755copy operations. This flag is enabled by default at \fB\-O\fR and
6756higher.
6757.IP "\fB\-fipa\-pure\-const\fR" 4
6758.IX Item "-fipa-pure-const"
6759Discover which functions are pure or constant.
6760Enabled by default at \fB\-O\fR and higher.
6761.IP "\fB\-fipa\-reference\fR" 4
6762.IX Item "-fipa-reference"
6763Discover which static variables do not escape the
6764compilation unit.
6765Enabled by default at \fB\-O\fR and higher.
6766.IP "\fB\-fipa\-pta\fR" 4
6767.IX Item "-fipa-pta"
6768Perform interprocedural pointer analysis and interprocedural modification
6769and reference analysis. This option can cause excessive memory and
6770compile-time usage on large compilation units. It is not enabled by
6771default at any optimization level.
6772.IP "\fB\-fipa\-profile\fR" 4
6773.IX Item "-fipa-profile"
6774Perform interprocedural profile propagation. The functions called only from
6775cold 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
6777functions and loop less parts of functions executed once are then optimized for
6778size.
6779Enabled by default at \fB\-O\fR and higher.
6780.IP "\fB\-fipa\-cp\fR" 4
6781.IX Item "-fipa-cp"
6782Perform interprocedural constant propagation.
6783This optimization analyzes the program to determine when values passed
6784to functions are constants and then optimizes accordingly.
6785This optimization can substantially increase performance
6786if the application has constants passed to functions.
6787This 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"
6790Perform function cloning to make interprocedural constant propagation stronger.
6791When enabled, interprocedural constant propagation performs function cloning
6792when externally visible function can be called with constant arguments.
6793Because this optimization can create multiple copies of functions,
6794it may significantly increase code size
6795(see \fB\-\-param ipcp\-unit\-growth=\fR\fIvalue\fR).
6796This flag is enabled by default at \fB\-O3\fR.
6797.IP "\fB\-ftree\-sink\fR" 4
6798.IX Item "-ftree-sink"
6799Perform forward store motion on trees. This flag is
6800enabled by default at \fB\-O\fR and higher.
6801.IP "\fB\-ftree\-bit\-ccp\fR" 4
6802.IX Item "-ftree-bit-ccp"
6803Perform sparse conditional bit constant propagation on trees and propagate
6804pointer alignment information.
6805This pass only operates on local scalar variables and is enabled by default
6806at \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"
6809Perform sparse conditional constant propagation (\s-1CCP\s0) on trees. This
6810pass only operates on local scalar variables and is enabled by default
6811at \fB\-O\fR and higher.
6812.IP "\fB\-ftree\-switch\-conversion\fR" 4
6813.IX Item "-ftree-switch-conversion"
6814Perform conversion of simple initializations in a switch to
6815initializations from a scalar array. This flag is enabled by default
6816at \fB\-O2\fR and higher.
6817.IP "\fB\-ftree\-tail\-merge\fR" 4
6818.IX Item "-ftree-tail-merge"
6819Look for identical code sequences. When found, replace one with a jump to the
6820other. This optimization is known as tail merging or cross jumping. This flag
6821is enabled by default at \fB\-O2\fR and higher. The compilation time
6822in this pass can
6823be 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"
6827Perform dead code elimination (\s-1DCE\s0) on trees. This flag is enabled by
6828default at \fB\-O\fR and higher.
6829.IP "\fB\-ftree\-builtin\-call\-dce\fR" 4
6830.IX Item "-ftree-builtin-call-dce"
6831Perform conditional dead code elimination (\s-1DCE\s0) for calls to built-in functions
6832that may set \f(CW\*(C`errno\*(C'\fR but are otherwise side-effect free. This flag is
6833enabled by default at \fB\-O2\fR and higher if \fB\-Os\fR is not also
6834specified.
6835.IP "\fB\-ftree\-dominator\-opts\fR" 4
6836.IX Item "-ftree-dominator-opts"
6837Perform a variety of simple scalar cleanups (constant/copy
6838propagation, redundancy elimination, range propagation and expression
6839simplification) based on a dominator tree traversal. This also
6840performs jump threading (to reduce jumps to jumps). This flag is
6841enabled by default at \fB\-O\fR and higher.
6842.IP "\fB\-ftree\-dse\fR" 4
6843.IX Item "-ftree-dse"
6844Perform dead store elimination (\s-1DSE\s0) on trees. A dead store is a store into
6845a memory location that is later overwritten by another store without
6846any intervening loads. In this case the earlier store can be deleted. This
6847flag is enabled by default at \fB\-O\fR and higher.
6848.IP "\fB\-ftree\-ch\fR" 4
6849.IX Item "-ftree-ch"
6850Perform loop header copying on trees. This is beneficial since it increases
6851effectiveness of code motion optimizations. It also saves one jump. This flag
6852is enabled by default at \fB\-O\fR and higher. It is not enabled
6853for \fB\-Os\fR, since it usually increases code size.
6854.IP "\fB\-ftree\-loop\-optimize\fR" 4
6855.IX Item "-ftree-loop-optimize"
6856Perform loop optimizations on trees. This flag is enabled by default
6857at \fB\-O\fR and higher.
6858.IP "\fB\-ftree\-loop\-linear\fR" 4
6859.IX Item "-ftree-loop-linear"
6860Perform loop interchange transformations on tree. Same as
6861\&\fB\-floop\-interchange\fR. To use this code transformation, \s-1GCC\s0 has
6862to be configured with \fB\-\-with\-ppl\fR and \fB\-\-with\-cloog\fR to
6863enable the Graphite loop transformation infrastructure.
6864.IP "\fB\-floop\-interchange\fR" 4
6865.IX Item "-floop-interchange"
6866Perform loop interchange transformations on loops. Interchanging two
6867nested loops switches the inner and outer loops. For example, given a
6868loop 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
6878loop 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
6888which can be beneficial when \f(CW\*(C`N\*(C'\fR is larger than the caches,
6889because in Fortran, the elements of an array are stored in memory
6890contiguously by column, and the original loop iterates over rows,
6891potentially creating at each access a cache miss. This optimization
6892applies to all the languages supported by \s-1GCC\s0 and is not limited to
6893Fortran. To use this code transformation, \s-1GCC\s0 has to be configured
6894with \fB\-\-with\-ppl\fR and \fB\-\-with\-cloog\fR to enable the
6895Graphite loop transformation infrastructure.
6896.IP "\fB\-floop\-strip\-mine\fR" 4
6897.IX Item "-floop-strip-mine"
6898Perform loop strip mining transformations on loops. Strip mining
6899splits a loop into two nested loops. The outer loop has strides
6900equal to the strip size and the inner loop has strides of the
6901original loop within a strip. The strip length can be changed
6902using the \fBloop-block-tile-size\fR parameter. For example,
6903given 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
6911loop 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
6921This optimization applies to all the languages supported by \s-1GCC\s0 and is
6922not limited to Fortran. To use this code transformation, \s-1GCC\s0 has to
6923be configured with \fB\-\-with\-ppl\fR and \fB\-\-with\-cloog\fR to
6924enable the Graphite loop transformation infrastructure.
6925.IP "\fB\-floop\-block\fR" 4
6926.IX Item "-floop-block"
6927Perform loop blocking transformations on loops. Blocking strip mines
6928each loop in the loop nest such that the memory accesses of the
6929element loops fit inside caches. The strip length can be changed
6930using the \fBloop-block-tile-size\fR parameter. For example, given
6931a 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
6941loop 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
6955which can be beneficial when \f(CW\*(C`M\*(C'\fR is larger than the caches,
6956because the innermost loop iterates over a smaller amount of data
6957which can be kept in the caches. This optimization applies to all the
6958languages supported by \s-1GCC\s0 and is not limited to Fortran. To use this
6959code transformation, \s-1GCC\s0 has to be configured with \fB\-\-with\-ppl\fR
6960and \fB\-\-with\-cloog\fR to enable the Graphite loop transformation
6961infrastructure.
6962.IP "\fB\-fgraphite\-identity\fR" 4
6963.IX Item "-fgraphite-identity"
6964Enable the identity transformation for graphite. For every SCoP we generate
6965the 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
6968are also performed by the code generator CLooG, like index splitting and
6969dead code elimination in loops.
6970.IP "\fB\-floop\-nest\-optimize\fR" 4
6971.IX Item "-floop-nest-optimize"
6972Enable the \s-1ISL\s0 based loop nest optimizer. This is a generic loop nest
6973optimizer based on the Pluto optimization algorithms. It calculates a loop
6974structure optimized for data-locality and parallelism. This option
6975is experimental.
6976.IP "\fB\-floop\-parallelize\-all\fR" 4
6977.IX Item "-floop-parallelize-all"
6978Use the Graphite data dependence analysis to identify loops that can
6979be parallelized. Parallelize all the loops that can be analyzed to
6980not contain loop carried dependences without checking that it is
6981profitable to parallelize the loops.
6982.IP "\fB\-fcheck\-data\-deps\fR" 4
6983.IX Item "-fcheck-data-deps"
6984Compare the results of several data dependence analyzers. This option
6985is used for debugging the data dependence analyzers.
6986.IP "\fB\-ftree\-loop\-if\-convert\fR" 4
6987.IX Item "-ftree-loop-if-convert"
6988Attempt to transform conditional jumps in the innermost loops to
6989branch-less equivalents. The intent is to remove control-flow from
6990the innermost loops in order to improve the ability of the
6991vectorization pass to handle these loops. This is enabled by default
6992if vectorization is enabled.
6993.IP "\fB\-ftree\-loop\-if\-convert\-stores\fR" 4
6994.IX Item "-ftree-loop-if-convert-stores"
6995Attempt to also if-convert conditional jumps containing memory writes.
6996This transformation can be unsafe for multi-threaded programs as it
6997transforms conditional memory writes into unconditional memory writes.
6998For example,
6999.Sp
7000.Vb 3
7001\& for (i = 0; i < N; i++)
7002\& if (cond)
7003\& A[i] = expr;
7004.Ve
7005.Sp
7006is 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
7013potentially producing data races.
7014.IP "\fB\-ftree\-loop\-distribution\fR" 4
7015.IX Item "-ftree-loop-distribution"
7016Perform loop distribution. This flag can improve cache performance on
7017big loop bodies and allow further loop optimizations, like
7018parallelization 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
7027is 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"
7039Perform loop distribution of patterns that can be code generated with
7040calls to a library. This flag is enabled by default at \fB\-O3\fR.
7041.Sp
7042This pass distributes the initialization loops and generates a call to
7043memset 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
7052is 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
7063and 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"
7066Perform loop invariant motion on trees. This pass moves only invariants that
7067are hard to handle at \s-1RTL\s0 level (function calls, operations that expand to
7068nontrivial sequences of insns). With \fB\-funswitch\-loops\fR it also moves
7069operands of conditions that are invariant out of the loop, so that we can use
7070just trivial invariantness analysis in loop unswitching. The pass also includes
7071store motion.
7072.IP "\fB\-ftree\-loop\-ivcanon\fR" 4
7073.IX Item "-ftree-loop-ivcanon"
7074Create a canonical counter for number of iterations in loops for which
7075determining number of iterations requires complicated analysis. Later
7076optimizations then may determine the number easily. Useful especially
7077in connection with unrolling.
7078.IP "\fB\-fivopts\fR" 4
7079.IX Item "-fivopts"
7080Perform induction variable optimizations (strength reduction, induction
7081variable merging and induction variable elimination) on trees.
7082.IP "\fB\-ftree\-parallelize\-loops=n\fR" 4
7083.IX Item "-ftree-parallelize-loops=n"
7084Parallelize loops, i.e., split their iteration space to run in n threads.
7085This is only possible for loops whose iterations are independent
7086and can be arbitrarily reordered. The optimization is only
7087profitable on multiprocessor machines, for loops that are CPU-intensive,
7088rather than constrained e.g. by memory bandwidth. This option
7089implies \fB\-pthread\fR, and thus is only supported on targets
7090that have support for \fB\-pthread\fR.
7091.IP "\fB\-ftree\-pta\fR" 4
7092.IX Item "-ftree-pta"
7093Perform function-local points-to analysis on trees. This flag is
7094enabled by default at \fB\-O\fR and higher.
7095.IP "\fB\-ftree\-sra\fR" 4
7096.IX Item "-ftree-sra"
7097Perform scalar replacement of aggregates. This pass replaces structure
7098references with scalars to prevent committing structures to memory too
7099early. This flag is enabled by default at \fB\-O\fR and higher.
7100.IP "\fB\-ftree\-copyrename\fR" 4
7101.IX Item "-ftree-copyrename"
7102Perform copy renaming on trees. This pass attempts to rename compiler
7103temporaries to other variables at copy locations, usually resulting in
7104variable names which more closely resemble the original variables. This flag
7105is 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"
7108Tell the copyrename pass (see \fB\-ftree\-copyrename\fR) to attempt to
7109combine small user-defined variables too, but only if they were inlined
7110from other functions. It is a more limited form of
7111\&\fB\-ftree\-coalesce\-vars\fR. This may harm debug information of such
7112inlined variables, but it will keep variables of the inlined-into
7113function apart from each other, such that they are more likely to
7114contain the expected values in a debugging session. This was the
7115default in \s-1GCC\s0 versions older than 4.7.
7116.IP "\fB\-ftree\-coalesce\-vars\fR" 4
7117.IX Item "-ftree-coalesce-vars"
7118Tell the copyrename pass (see \fB\-ftree\-copyrename\fR) to attempt to
7119combine small user-defined variables too, instead of just compiler
7120temporaries. This may severely limit the ability to debug an optimized
7121program compiled with \fB\-fno\-var\-tracking\-assignments\fR. In the
7122negated form, this flag prevents \s-1SSA\s0 coalescing of user variables,
7123including inlined ones. This option is enabled by default.
7124.IP "\fB\-ftree\-ter\fR" 4
7125.IX Item "-ftree-ter"
7126Perform temporary expression replacement during the \s-1SSA\-\s0>normal phase. Single
7127use/single def temporaries are replaced at their use location with their
7128defining expression. This results in non-GIMPLE code, but gives the expanders
7129much more complex trees to work on resulting in better \s-1RTL\s0 generation. This is
7130enabled by default at \fB\-O\fR and higher.
7131.IP "\fB\-ftree\-slsr\fR" 4
7132.IX Item "-ftree-slsr"
7133Perform straight-line strength reduction on trees. This recognizes related
7134expressions involving multiplications and replaces them by less expensive
7135calculations when possible. This is enabled by default at \fB\-O\fR and
7136higher.
7137.IP "\fB\-ftree\-vectorize\fR" 4
7138.IX Item "-ftree-vectorize"
7139Perform 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"
7143Perform 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"
7147Perform loop versioning when doing loop vectorization on trees. When a loop
7148appears to be vectorizable except that data alignment or data dependence cannot
7149be determined at compile time, then vectorized and non-vectorized versions of
7150the loop are generated along with run-time checks for alignment or dependence
7151to control which version is executed. This option is enabled by default
7152except at level \fB\-Os\fR where it is disabled.
7153.IP "\fB\-fvect\-cost\-model\fR" 4
7154.IX Item "-fvect-cost-model"
7155Enable 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"
7159Perform Value Range Propagation on trees. This is similar to the
7160constant propagation pass, but instead of values, ranges of values are
7161propagated. This allows the optimizers to remove unnecessary range
7162checks like array bound checks and null pointer checks. This is
7163enabled by default at \fB\-O2\fR and higher. Null pointer check
7164elimination is only done if \fB\-fdelete\-null\-pointer\-checks\fR is
7165enabled.
7166.IP "\fB\-ftracer\fR" 4
7167.IX Item "-ftracer"
7168Perform tail duplication to enlarge superblock size. This transformation
7169simplifies the control flow of the function allowing other optimizations to do
7170a better job.
7171.IP "\fB\-funroll\-loops\fR" 4
7172.IX Item "-funroll-loops"
7173Unroll loops whose number of iterations can be determined at compile
7174time or upon entry to the loop. \fB\-funroll\-loops\fR implies
7175\&\fB\-frerun\-cse\-after\-loop\fR. This option makes code larger,
7176and may or may not make it run faster.
7177.IP "\fB\-funroll\-all\-loops\fR" 4
7178.IX Item "-funroll-all-loops"
7179Unroll all loops, even if their number of iterations is uncertain when
7180the 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"
7185Enables expression of values of induction variables in later iterations
7186of the unrolled loop using the value in the first iteration. This breaks
7187long dependency chains, thus improving efficiency of the scheduling passes.
7188.Sp
7189A combination of \fB\-fweb\fR and \s-1CSE\s0 is often sufficient to obtain the
7190same effect. However, that is not reliable in cases where the loop body
7191is more complicated than a single basic block. It also does not work at all
7192on some architectures due to restrictions in the \s-1CSE\s0 pass.
7193.Sp
7194This optimization is enabled by default.
7195.IP "\fB\-fvariable\-expansion\-in\-unroller\fR" 4
7196.IX Item "-fvariable-expansion-in-unroller"
7197With this option, the compiler creates multiple copies of some
7198local variables when unrolling a loop, which can result in superior code.
7199.IP "\fB\-fpartial\-inlining\fR" 4
7200.IX Item "-fpartial-inlining"
7201Inline parts of functions. This option has any effect only
7202when inlining itself is turned on by the \fB\-finline\-functions\fR
7203or \fB\-finline\-small\-functions\fR options.
7204.Sp
7205Enabled at level \fB\-O2\fR.
7206.IP "\fB\-fpredictive\-commoning\fR" 4
7207.IX Item "-fpredictive-commoning"
7208Perform predictive commoning optimization, i.e., reusing computations
7209(especially memory loads and stores) performed in previous
7210iterations of loops.
7211.Sp
7212This option is enabled at level \fB\-O3\fR.
7213.IP "\fB\-fprefetch\-loop\-arrays\fR" 4
7214.IX Item "-fprefetch-loop-arrays"
7215If supported by the target machine, generate instructions to prefetch
7216memory to improve the performance of loops that access large arrays.
7217.Sp
7218This option may generate better or worse code; results are highly
7219dependent on the structure of loops within the source code.
7220.Sp
7221Disabled 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
7228Disable any machine-specific peephole optimizations. The difference
7229between \fB\-fno\-peephole\fR and \fB\-fno\-peephole2\fR is in how they
7230are implemented in the compiler; some targets use one, some use the
7231other, 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"
7237Do not guess branch probabilities using heuristics.
7238.Sp
7239\&\s-1GCC\s0 uses heuristics to guess branch probabilities if they are
7240not provided by profiling feedback (\fB\-fprofile\-arcs\fR). These
7241heuristics are based on the control flow graph. If some branch probabilities
7242are specified by \fB_\|_builtin_expect\fR, then the heuristics are
7243used to guess branch probabilities for the rest of the control flow graph,
7244taking the \fB_\|_builtin_expect\fR info into account. The interactions
7245between the heuristics and \fB_\|_builtin_expect\fR can be complex, and in
7246some cases, it may be useful to disable the heuristics so that the effects
7247of \fB_\|_builtin_expect\fR are easier to understand.
7248.Sp
7249The 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"
7253Reorder basic blocks in the compiled function in order to reduce number of
7254taken branches and improve code locality.
7255.Sp
7256Enabled at levels \fB\-O2\fR, \fB\-O3\fR.
7257.IP "\fB\-freorder\-blocks\-and\-partition\fR" 4
7258.IX Item "-freorder-blocks-and-partition"
7259In addition to reordering basic blocks in the compiled function, in order
7260to reduce number of taken branches, partitions hot and cold basic blocks
7261into separate sections of the assembly and .o files, to improve
7262paging and cache locality performance.
7263.Sp
7264This optimization is automatically turned off in the presence of
7265exception handling, for linkonce sections, for functions with a user-defined
7266section attribute and on any architecture that does not support named
7267sections.
7268.IP "\fB\-freorder\-functions\fR" 4
7269.IX Item "-freorder-functions"
7270Reorder functions in the object file in order to
7271improve code locality. This is implemented by using special
7272subsections \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
7274the linker so object file format must support named sections and linker must
7275place them in a reasonable way.
7276.Sp
7277Also profile feedback must be available to make this option effective. See
7278\&\fB\-fprofile\-arcs\fR for details.
7279.Sp
7280Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
7281.IP "\fB\-fstrict\-aliasing\fR" 4
7282.IX Item "-fstrict-aliasing"
7283Allow the compiler to assume the strictest aliasing rules applicable to
7284the language being compiled. For C (and \*(C+), this activates
7285optimizations based on the type of expressions. In particular, an
7286object of one type is assumed never to reside at the same address as an
7287object of a different type, unless the types are almost the same. For
7288example, 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
7290type.
7291.Sp
7292Pay 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
7307The practice of reading from a different union member than the one most
7308recently written to (called \*(L"type-punning\*(R") is common. Even with
7309\&\fB\-fstrict\-aliasing\fR, type-punning is allowed, provided the memory
7310is accessed through the union type. So, the code above works as
7311expected. 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
7323Similarly, access by taking the address, casting the resulting pointer
7324and dereferencing the result has undefined behavior, even if the cast
7325uses 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
7334The \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"
7338Allow the compiler to assume strict signed overflow rules, depending
7339on the language being compiled. For C (and \*(C+) this means that
7340overflow when doing arithmetic with signed numbers is undefined, which
7341means that the compiler may assume that it does not happen. This
7342permits various optimizations. For example, the compiler assumes
7343that an expression like \f(CW\*(C`i + 10 > i\*(C'\fR is always true for
7344signed \f(CW\*(C`i\*(C'\fR. This assumption is only valid if signed overflow is
7345undefined, as the expression is false if \f(CW\*(C`i + 10\*(C'\fR overflows when
7346using twos complement arithmetic. When this option is in effect any
7347attempt to determine whether an operation on signed numbers
7348overflows must be written carefully to not actually involve overflow.
7349.Sp
7350This option also allows the compiler to assume strict pointer
7351semantics: given a pointer to an object, if adding an offset to that
7352pointer does not produce a pointer to the same object, the addition is
7353undefined. This permits the compiler to conclude that \f(CW\*(C`p + u >
7354p\*(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
7356undefined, as the expression is false if \f(CW\*(C`p + u\*(C'\fR overflows using
7357twos complement arithmetic.
7358.Sp
7359See also the \fB\-fwrapv\fR option. Using \fB\-fwrapv\fR means
7360that 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
7363integers. With \fB\-fwrapv\fR certain types of overflow are
7364permitted. For example, if the compiler gets an overflow when doing
7365arithmetic on constants, the overflowed value can still be used with
7366\&\fB\-fwrapv\fR, but not otherwise.
7367.Sp
7368The \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
7376Align 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
7379boundary, but \fB\-falign\-functions=24\fR aligns to the next
738032\-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
7383equivalent and mean that functions are not aligned.
7384.Sp
7385Some assemblers only support this flag when \fIn\fR is a power of two;
7386in that case, it is rounded up.
7387.Sp
7388If \fIn\fR is not specified or is zero, use a machine-dependent default.
7389.Sp
7390Enabled 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
7397Align 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
7399make code slower, because it must insert dummy operations for when the
7400branch 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
7403equivalent and mean that labels are not aligned.
7404.Sp
7405If \fB\-falign\-loops\fR or \fB\-falign\-jumps\fR are applicable and
7406are greater than this value, then their values are used instead.
7407.Sp
7408If \fIn\fR is not specified or is zero, use a machine-dependent default
7409which is very likely to be \fB1\fR, meaning no alignment.
7410.Sp
7411Enabled 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
7418Align loops to a power-of-two boundary, skipping up to \fIn\fR bytes
7419like \fB\-falign\-functions\fR. If the loops are
7420executed many times, this makes up for any execution of the dummy
7421operations.
7422.Sp
7423\&\fB\-fno\-align\-loops\fR and \fB\-falign\-loops=1\fR are
7424equivalent and mean that loops are not aligned.
7425.Sp
7426If \fIn\fR is not specified or is zero, use a machine-dependent default.
7427.Sp
7428Enabled 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
7435Align branch targets to a power-of-two boundary, for branch targets
7436where the targets can only be reached by jumping, skipping up to \fIn\fR
7437bytes like \fB\-falign\-functions\fR. In this case, no dummy operations
7438need be executed.
7439.Sp
7440\&\fB\-fno\-align\-jumps\fR and \fB\-falign\-jumps=1\fR are
7441equivalent and mean that loops are not aligned.
7442.Sp
7443If \fIn\fR is not specified or is zero, use a machine-dependent default.
7444.Sp
7445Enabled at levels \fB\-O2\fR, \fB\-O3\fR.
7446.IP "\fB\-funit\-at\-a\-time\fR" 4
7447.IX Item "-funit-at-a-time"
7448This option is left for compatibility reasons. \fB\-funit\-at\-a\-time\fR
7449has 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
7452Enabled by default.
7453.IP "\fB\-fno\-toplevel\-reorder\fR" 4
7454.IX Item "-fno-toplevel-reorder"
7455Do not reorder top-level functions, variables, and \f(CW\*(C`asm\*(C'\fR
7456statements. Output them in the same order that they appear in the
7457input file. When this option is used, unreferenced static variables
7458are not removed. This option is intended to support existing code
7459that relies on a particular ordering. For new code, it is better to
7460use attributes.
7461.Sp
7462Enabled 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
7464targets.
7465.IP "\fB\-fweb\fR" 4
7466.IX Item "-fweb"
7467Constructs webs as commonly used for register allocation purposes and assign
7468each web individual pseudo register. This allows the register allocation pass
7469to operate on pseudos directly, but also strengthens several other optimization
7470passes, such as \s-1CSE\s0, loop optimizer and trivial dead code remover. It can,
7471however, make debugging impossible, since variables no longer stay in a
7472\&\*(L"home register\*(R".
7473.Sp
7474Enabled by default with \fB\-funroll\-loops\fR.
7475.IP "\fB\-fwhole\-program\fR" 4
7476.IX Item "-fwhole-program"
7477Assume that the current compilation unit represents the whole program being
7478compiled. All public functions and variables with the exception of \f(CW\*(C`main\*(C'\fR
7479and those merged by attribute \f(CW\*(C`externally_visible\*(C'\fR become static functions
7480and in effect are optimized more aggressively by interprocedural optimizers.
7481.Sp
7482This option should not be used in combination with \f(CW\*(C`\-flto\*(C'\fR.
7483Instead relying on a linker plugin should provide safer and more precise
7484information.
7485.IP "\fB\-flto[=\fR\fIn\fR\fB]\fR" 4
7486.IX Item "-flto[=n]"
7487This option runs the standard link-time optimizer. When invoked
7488with source code, it generates \s-1GIMPLE\s0 (one of \s-1GCC\s0's internal
7489representations) and writes it to special \s-1ELF\s0 sections in the object
7490file. When the object files are linked together, all the function
7491bodies are read from these \s-1ELF\s0 sections and instantiated as if they
7492had been part of the same translation unit.
7493.Sp
7494To use the link-time optimizer, \fB\-flto\fR needs to be specified at
7495compile 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
7503The first two invocations to \s-1GCC\s0 save a bytecode representation
7504of \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
7507internal image, and compiles the result as usual. Since both
7508\&\fIfoo.o\fR and \fIbar.o\fR are merged into a single image, this
7509causes all the interprocedural analyses and optimizations in \s-1GCC\s0 to
7510work across the two files as if they were a single one. This means,
7511for 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
7514Another (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
7520The above generates bytecode for \fIfoo.c\fR and \fIbar.c\fR,
7521merges them together into a single \s-1GIMPLE\s0 representation and optimizes
7522them as usual to produce \fImyprog\fR.
7523.Sp
7524The only important thing to keep in mind is that to enable link-time
7525optimizations the \fB\-flto\fR flag needs to be passed to both the
7526compile and the link commands.
7527.Sp
7528To make whole program optimization effective, it is necessary to make
7529certain whole program assumptions. The compiler needs to know
7530what functions and variables can be accessed by libraries and runtime
7531outside of the link-time optimized unit. When supported by the linker,
7532the linker plugin (see \fB\-fuse\-linker\-plugin\fR) passes information
7533to the compiler about used and externally visible symbols. When
7534the linker plugin is not available, \fB\-fwhole\-program\fR should be
7535used to allow the compiler to make these assumptions, which leads
7536to more aggressive optimization decisions.
7537.Sp
7538Note that when a file is compiled with \fB\-flto\fR, the generated
7539object file is larger than a regular object file because it
7540contains \s-1GIMPLE\s0 bytecodes and the usual final code. This means that
7541object files with \s-1LTO\s0 information can be linked as normal object
7542files; if \fB\-flto\fR is not passed to the linker, no
7543interprocedural optimizations are applied.
7544.Sp
7545Additionally, the optimization flags used to compile individual files
7546are 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
7554This produces individual object files with unoptimized assembler
7555code, 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
7559When producing the final binary with \fB\-flto\fR, \s-1GCC\s0 only
7560applies link-time optimizations to those files that contain bytecode.
7561Therefore, you can mix and match object files and libraries with
7562\&\s-1GIMPLE\s0 bytecodes and final object code. \s-1GCC\s0 automatically selects
7563which files to optimize in \s-1LTO\s0 mode and which files to link without
7564further processing.
7565.Sp
7566There are some code generation flags preserved by \s-1GCC\s0 when
7567generating bytecodes, as they need to be used during the final link
7568stage. Currently, the following options are saved into the \s-1GIMPLE\s0
7569bytecode files: \fB\-fPIC\fR, \fB\-fcommon\fR and all the
7570\&\fB\-m\fR target flags.
7571.Sp
7572At link time, these options are read in and reapplied. Note that the
7573current implementation makes no attempt to recognize conflicting
7574values for these options. If different files have conflicting option
7575values (e.g., one file is compiled with \fB\-fPIC\fR and another
7576isn't), the compiler simply uses the last value read from the
7577bytecode files. It is recommended, then, that you compile all the files
7578participating in the same link with the same options.
7579.Sp
7580If \s-1LTO\s0 encounters objects with C linkage declared with incompatible
7581types in separate translation units to be linked together (undefined
7582behavior according to \s-1ISO\s0 C99 6.2.7), a non-fatal diagnostic may be
7583issued. The behavior is still undefined at run time.
7584.Sp
7585Another feature of \s-1LTO\s0 is that it is possible to apply interprocedural
7586optimizations on files written in different languages. This requires
7587support in the language front end. Currently, the C, \*(C+ and
7588Fortran front ends are capable of emitting \s-1GIMPLE\s0 bytecodes, so
7589something 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
7598Notice that the final link is done with \fBg++\fR to get the \*(C+
7599runtime libraries and \fB\-lgfortran\fR is added to get the Fortran
7600runtime libraries. In general, when mixing languages in \s-1LTO\s0 mode, you
7601should use the same link command options as when mixing languages in a
7602regular (non-LTO) compilation; all you need to add is \fB\-flto\fR to
7603all the compile and link commands.
7604.Sp
7605If 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
7607are using a linker with plugin support. To enable this feature, use
7608the 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
7614With 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
7616to make them part of the aggregated \s-1GIMPLE\s0 image to be optimized.
7617.Sp
7618If you are not using a linker with plugin support and/or do not
7619enable the linker plugin, then the objects inside \fIlibfoo.a\fR
7620are extracted and linked as usual, but they do not participate
7621in the \s-1LTO\s0 optimization process.
7622.Sp
7623Link-time optimizations do not require the presence of the whole program to
7624operate. If the program does not require any symbols to be exported, it is
7625possible to combine \fB\-flto\fR and \fB\-fwhole\-program\fR to allow
7626the interprocedural optimizers to use more aggressive assumptions which may
7627lead to improved optimization opportunities.
7628Use of \fB\-fwhole\-program\fR is not needed when linker plugin is
7629active (see \fB\-fuse\-linker\-plugin\fR).
7630.Sp
7631The current implementation of \s-1LTO\s0 makes no
7632attempt to generate bytecode that is portable between different
7633types of hosts. The bytecode files are versioned and there is a
7634strict 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
7637Link-time optimization does not work well with generation of debugging
7638information. Combining \fB\-flto\fR with
7639\&\fB\-g\fR is currently experimental and expected to produce wrong
7640results.
7641.Sp
7642If you specify the optional \fIn\fR, the optimization and code
7643generation done at link time is executed in parallel using \fIn\fR
7644parallel jobs by utilizing an installed \fBmake\fR program. The
7645environment variable \fB\s-1MAKE\s0\fR may be used to override the program
7646used. The default value for \fIn\fR is 1.
7647.Sp
7648You can also specify \fB\-flto=jobserver\fR to use \s-1GNU\s0 make's
7649job server mode to determine the number of parallel jobs. This
7650is useful when the Makefile calling \s-1GCC\s0 is already executing in parallel.
7651You must prepend a \fB+\fR to the command recipe in the parent Makefile
7652for this to work. This option likely only works if \fB\s-1MAKE\s0\fR is
7653\&\s-1GNU\s0 make.
7654.Sp
7655This option is disabled by default.
7656.IP "\fB\-flto\-partition=\fR\fIalg\fR" 4
7657.IX Item "-flto-partition=alg"
7658Specify the partitioning algorithm used by the link-time optimizer.
7659The value is either \f(CW\*(C`1to1\*(C'\fR to specify a partitioning mirroring
7660the original source files or \f(CW\*(C`balanced\*(C'\fR to specify partitioning
7661into equally sized chunks (whenever possible) or \f(CW\*(C`max\*(C'\fR to create
7662new partition for every symbol where possible. Specifying \f(CW\*(C`none\*(C'\fR
7663as an algorithm disables partitioning and streaming completely.
7664The default value is \f(CW\*(C`balanced\*(C'\fR. While \f(CW\*(C`1to1\*(C'\fR can be used
7665as an workaround for various code ordering issues, the \f(CW\*(C`max\*(C'\fR
7666partitioning is intended for internal testing only.
7667.IP "\fB\-flto\-compression\-level=\fR\fIn\fR" 4
7668.IX Item "-flto-compression-level=n"
7669This option specifies the level of compression used for intermediate
7670language written to \s-1LTO\s0 object files, and is only meaningful in
7671conjunction with \s-1LTO\s0 mode (\fB\-flto\fR). Valid
7672values are 0 (no compression) to 9 (maximum compression). Values
7673outside this range are clamped to either 0 or 9. If the option is not
7674given, a default balanced compression setting is used.
7675.IP "\fB\-flto\-report\fR" 4
7676.IX Item "-flto-report"
7677Prints a report with internal details on the workings of the link-time
7678optimizer. The contents of this report vary from version to version.
7679It is meant to be useful to \s-1GCC\s0 developers when processing object
7680files in \s-1LTO\s0 mode (via \fB\-flto\fR).
7681.Sp
7682Disabled by default.
7683.IP "\fB\-fuse\-linker\-plugin\fR" 4
7684.IX Item "-fuse-linker-plugin"
7685Enables the use of a linker plugin during link-time optimization. This
7686option relies on plugin support in the linker, which is available in gold
7687or in \s-1GNU\s0 ld 2.21 or newer.
7688.Sp
7689This option enables the extraction of object files with \s-1GIMPLE\s0 bytecode out
7690of library archives. This improves the quality of optimization by exposing
7691more code to the link-time optimizer. This information specifies what
7692symbols can be accessed externally (by non-LTO object or during dynamic
7693linking). Resulting code quality improvements on binaries (and shared
7694libraries that use hidden visibility) are similar to \f(CW\*(C`\-fwhole\-program\*(C'\fR.
7695See \fB\-flto\fR for a description of the effect of this flag and how to
7696use it.
7697.Sp
7698This option is enabled by default when \s-1LTO\s0 support in \s-1GCC\s0 is enabled
7699and \s-1GCC\s0 was configured for use with
7700a 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"
7703Fat \s-1LTO\s0 objects are object files that contain both the intermediate language
7704and the object code. This makes them usable for both \s-1LTO\s0 linking and normal
7705linking. This option is effective only when compiling with \fB\-flto\fR
7706and is ignored at link time.
7707.Sp
7708\&\fB\-fno\-fat\-lto\-objects\fR improves compilation time over plain \s-1LTO\s0, but
7709requires the complete toolchain to be aware of \s-1LTO\s0. It requires a linker with
7710linker plugin support for basic functionality. Additionally,
7711\&\fBnm\fR, \fBar\fR and \fBranlib\fR
7712need 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
7715to these tools. With non fat \s-1LTO\s0 makefiles need to be modified to use them.
7716.Sp
7717The default is \fB\-ffat\-lto\-objects\fR but this default is intended to
7718change in future releases when linker plugin enabled environments become more
7719common.
7720.IP "\fB\-fcompare\-elim\fR" 4
7721.IX Item "-fcompare-elim"
7722After register allocation and post-register allocation instruction splitting,
7723identify arithmetic instructions that compute processor flags similar to a
7724comparison operation based on that arithmetic. If possible, eliminate the
7725explicit comparison operation.
7726.Sp
7727This pass only applies to certain targets that cannot explicitly represent
7728the comparison operation before register allocation is complete.
7729.Sp
7730Enabled 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"
7733Use the \fBbfd\fR linker instead of the default linker.
7734.IP "\fB\-fuse\-ld=gold\fR" 4
7735.IX Item "-fuse-ld=gold"
7736Use the \fBgold\fR linker instead of the default linker.
7737.IP "\fB\-fcprop\-registers\fR" 4
7738.IX Item "-fcprop-registers"
7739After register allocation and post-register allocation instruction splitting,
7740perform a copy-propagation pass to try to reduce scheduling dependencies
7741and occasionally eliminate the copy.
7742.Sp
7743Enabled 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"
7746Profiles collected using an instrumented binary for multi-threaded programs may
7747be 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
7749default, \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"
7752Set the directory to search for the profile data files in to \fIpath\fR.
7753This option affects only the profile data generated by
7754\&\fB\-fprofile\-generate\fR, \fB\-ftest\-coverage\fR, \fB\-fprofile\-arcs\fR
7755and used by \fB\-fprofile\-use\fR and \fB\-fbranch\-probabilities\fR
7756and its related options. Both absolute and relative paths can be used.
7757By default, \s-1GCC\s0 uses the current directory as \fIpath\fR, thus the
7758profile 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
7765Enable options usually used for instrumenting application to produce
7766profile useful for later recompilation with profile feedback based
7767optimization. You must use \fB\-fprofile\-generate\fR both when
7768compiling and when linking your program.
7769.Sp
7770The 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
7772If \fIpath\fR is specified, \s-1GCC\s0 looks at the \fIpath\fR to find
7773the 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
7780Enable profile feedback directed optimizations, and optimizations
7781generally profitable only with profile feedback available.
7782.Sp
7783The 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
7787By default, \s-1GCC\s0 emits an error message if the feedback profiles do not
7788match 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
7790code.
7791.Sp
7792If \fIpath\fR is specified, \s-1GCC\s0 looks at the \fIpath\fR to find
7793the profile feedback data files. See \fB\-fprofile\-dir\fR.
7794.PP
7795The following options control compiler behavior regarding floating-point
7796arithmetic. These options trade off between speed and
7797correctness. All must be specifically enabled.
7798.IP "\fB\-ffloat\-store\fR" 4
7799.IX Item "-ffloat-store"
7800Do not store floating-point variables in registers, and inhibit other
7801options that might change whether a floating-point value is taken from a
7802register or memory.
7803.Sp
7804This option prevents undesirable excess precision on machines such as
7805the 68000 where the floating registers (of the 68881) keep more
7806precision than a \f(CW\*(C`double\*(C'\fR is supposed to have. Similarly for the
7807x86 architecture. For most programs, the excess precision does only
7808good, but a few programs rely on the precise definition of \s-1IEEE\s0 floating
7809point. Use \fB\-ffloat\-store\fR for such programs, after modifying
7810them to store all pertinent intermediate computations into variables.
7811.IP "\fB\-fexcess\-precision=\fR\fIstyle\fR" 4
7812.IX Item "-fexcess-precision=style"
7813This option allows further control over excess precision on machines
7814where 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
7816support operations rounding to those types. By default,
7817\&\fB\-fexcess\-precision=fast\fR is in effect; this means that
7818operations are carried out in the precision of the registers and that
7819it is unpredictable when rounding to the types specified in the source
7820code takes place. When compiling C, if
7821\&\fB\-fexcess\-precision=standard\fR is specified then excess
7822precision follows the rules specified in \s-1ISO\s0 C99; in particular,
7823both casts and assignments cause values to be rounded to their
7824semantic types (whereas \fB\-ffloat\-store\fR only affects
7825assignments). This option is enabled by default for C if a strict
7826conformance option such as \fB\-std=c99\fR is used.
7827.Sp
7828\&\fB\-fexcess\-precision=standard\fR is not implemented for languages
7829other than C, and has no effect if
7830\&\fB\-funsafe\-math\-optimizations\fR or \fB\-ffast\-math\fR is
7831specified. On the x86, it also has no effect if \fB\-mfpmath=sse\fR
7832or \fB\-mfpmath=sse+387\fR is specified; in the former case, \s-1IEEE\s0
7833semantics apply without excess precision, and in the latter, rounding
7834is unpredictable.
7835.IP "\fB\-ffast\-math\fR" 4
7836.IX Item "-ffast-math"
7837Sets \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
7841This option causes the preprocessor macro \f(CW\*(C`_\|_FAST_MATH_\|_\*(C'\fR to be defined.
7842.Sp
7843This 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
7845that depend on an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications
7846for math functions. It may, however, yield faster code for programs
7847that do not require the guarantees of these specifications.
7848.IP "\fB\-fno\-math\-errno\fR" 4
7849.IX Item "-fno-math-errno"
7850Do not set \f(CW\*(C`errno\*(C'\fR after calling math functions that are executed
7851with 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
7853for speed while maintaining \s-1IEEE\s0 arithmetic compatibility.
7854.Sp
7855This option is not turned on by any \fB\-O\fR option since
7856it can result in incorrect output for programs that depend on
7857an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications for
7858math functions. It may, however, yield faster code for programs
7859that do not require the guarantees of these specifications.
7860.Sp
7861The default is \fB\-fmath\-errno\fR.
7862.Sp
7863On Darwin systems, the math library never sets \f(CW\*(C`errno\*(C'\fR. There is
7864therefore no reason for the compiler to consider the possibility that
7865it might, and \fB\-fno\-math\-errno\fR is the default.
7866.IP "\fB\-funsafe\-math\-optimizations\fR" 4
7867.IX Item "-funsafe-math-optimizations"
7868Allow optimizations for floating-point arithmetic that (a) assume
7869that 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
7871or startup files that change the default \s-1FPU\s0 control word or other
7872similar optimizations.
7873.Sp
7874This option is not turned on by any \fB\-O\fR option since
7875it can result in incorrect output for programs that depend on
7876an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications for
7877math functions. It may, however, yield faster code for programs
7878that do not require the guarantees of these specifications.
7879Enables \fB\-fno\-signed\-zeros\fR, \fB\-fno\-trapping\-math\fR,
7880\&\fB\-fassociative\-math\fR and \fB\-freciprocal\-math\fR.
7881.Sp
7882The default is \fB\-fno\-unsafe\-math\-optimizations\fR.
7883.IP "\fB\-fassociative\-math\fR" 4
7884.IX Item "-fassociative-math"
7885Allow re-association of operands in series of floating-point operations.
7886This violates the \s-1ISO\s0 C and \*(C+ language standard by possibly changing
7887computation result. \s-1NOTE:\s0 re-ordering may change the sign of zero as
7888well as ignore NaNs and inhibit or create underflow or overflow (and
7889thus 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
7891and thus may not be used when ordered comparisons are required.
7892This option requires that both \fB\-fno\-signed\-zeros\fR and
7893\&\fB\-fno\-trapping\-math\fR be in effect. Moreover, it doesn't make
7894much sense with \fB\-frounding\-math\fR. For Fortran the option
7895is automatically enabled when both \fB\-fno\-signed\-zeros\fR and
7896\&\fB\-fno\-trapping\-math\fR are in effect.
7897.Sp
7898The default is \fB\-fno\-associative\-math\fR.
7899.IP "\fB\-freciprocal\-math\fR" 4
7900.IX Item "-freciprocal-math"
7901Allow the reciprocal of a value to be used instead of dividing by
7902the value if this enables optimizations. For example \f(CW\*(C`x / y\*(C'\fR
7903can be replaced with \f(CW\*(C`x * (1/y)\*(C'\fR, which is useful if \f(CW\*(C`(1/y)\*(C'\fR
7904is subject to common subexpression elimination. Note that this loses
7905precision and increases the number of flops operating on the value.
7906.Sp
7907The default is \fB\-fno\-reciprocal\-math\fR.
7908.IP "\fB\-ffinite\-math\-only\fR" 4
7909.IX Item "-ffinite-math-only"
7910Allow optimizations for floating-point arithmetic that assume
7911that arguments and results are not NaNs or +\-Infs.
7912.Sp
7913This option is not turned on by any \fB\-O\fR option since
7914it can result in incorrect output for programs that depend on
7915an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications for
7916math functions. It may, however, yield faster code for programs
7917that do not require the guarantees of these specifications.
7918.Sp
7919The default is \fB\-fno\-finite\-math\-only\fR.
7920.IP "\fB\-fno\-signed\-zeros\fR" 4
7921.IX Item "-fno-signed-zeros"
7922Allow optimizations for floating-point arithmetic that ignore the
7923signedness of zero. \s-1IEEE\s0 arithmetic specifies the behavior of
7924distinct +0.0 and \-0.0 values, which then prohibits simplification
7925of expressions such as x+0.0 or 0.0*x (even with \fB\-ffinite\-math\-only\fR).
7926This option implies that the sign of a zero result isn't significant.
7927.Sp
7928The default is \fB\-fsigned\-zeros\fR.
7929.IP "\fB\-fno\-trapping\-math\fR" 4
7930.IX Item "-fno-trapping-math"
7931Compile code assuming that floating-point operations cannot generate
7932user-visible traps. These traps include division by zero, overflow,
7933underflow, inexact result and invalid operation. This option requires
7934that \fB\-fno\-signaling\-nans\fR be in effect. Setting this option may
7935allow faster code if one relies on \*(L"non-stop\*(R" \s-1IEEE\s0 arithmetic, for example.
7936.Sp
7937This option should never be turned on by any \fB\-O\fR option since
7938it can result in incorrect output for programs that depend on
7939an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications for
7940math functions.
7941.Sp
7942The default is \fB\-ftrapping\-math\fR.
7943.IP "\fB\-frounding\-math\fR" 4
7944.IX Item "-frounding-math"
7945Disable transformations and optimizations that assume default floating-point
7946rounding behavior. This is round-to-zero for all floating point
7947to integer conversions, and round-to-nearest for all other arithmetic
7948truncations. This option should be specified for programs that change
7949the \s-1FP\s0 rounding mode dynamically, or that may be executed with a
7950non-default rounding mode. This option disables constant folding of
7951floating-point expressions at compile time (which may be affected by
7952rounding mode) and arithmetic transformations that are unsafe in the
7953presence of sign-dependent rounding modes.
7954.Sp
7955The default is \fB\-fno\-rounding\-math\fR.
7956.Sp
7957This option is experimental and does not currently guarantee to
7958disable all \s-1GCC\s0 optimizations that are affected by rounding mode.
7959Future versions of \s-1GCC\s0 may provide finer control of this setting
7960using C99's \f(CW\*(C`FENV_ACCESS\*(C'\fR pragma. This command-line option
7961will 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"
7964Compile code assuming that \s-1IEEE\s0 signaling NaNs may generate user-visible
7965traps during floating-point operations. Setting this option disables
7966optimizations that may change the number of exceptions visible with
7967signaling NaNs. This option implies \fB\-ftrapping\-math\fR.
7968.Sp
7969This option causes the preprocessor macro \f(CW\*(C`_\|_SUPPORT_SNAN_\|_\*(C'\fR to
7970be defined.
7971.Sp
7972The default is \fB\-fno\-signaling\-nans\fR.
7973.Sp
7974This option is experimental and does not currently guarantee to
7975disable all \s-1GCC\s0 optimizations that affect signaling NaN behavior.
7976.IP "\fB\-fsingle\-precision\-constant\fR" 4
7977.IX Item "-fsingle-precision-constant"
7978Treat floating-point constants as single precision instead of
7979implicitly converting them to double-precision constants.
7980.IP "\fB\-fcx\-limited\-range\fR" 4
7981.IX Item "-fcx-limited-range"
7982When enabled, this option states that a range reduction step is not
7983needed when performing complex division. Also, there is no checking
7984whether 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
7986default is \fB\-fno\-cx\-limited\-range\fR, but is enabled by
7987\&\fB\-ffast\-math\fR.
7988.Sp
7989This 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
7991all languages.
7992.IP "\fB\-fcx\-fortran\-rules\fR" 4
7993.IX Item "-fcx-fortran-rules"
7994Complex multiplication and division follow Fortran rules. Range
7995reduction is done as part of complex division, but there is no checking
7996whether 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
7999The default is \fB\-fno\-cx\-fortran\-rules\fR.
8000.PP
8001The following options control optimizations that may improve
8002performance, but are not enabled by any \fB\-O\fR options. This
8003section includes experimental options that may produce broken code.
8004.IP "\fB\-fbranch\-probabilities\fR" 4
8005.IX Item "-fbranch-probabilities"
8006After 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
8008the number of times each branch was taken. When a program
8009compiled with \fB\-fprofile\-arcs\fR exits, it saves arc execution
8010counts to a file called \fI\fIsourcename\fI.gcda\fR for each source
8011file. The information in this data file is very dependent on the
8012structure of the generated code, so you must use the same source code
8013and the same optimization options for both compilations.
8014.Sp
8015With \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.
8017These can be used to improve optimization. Currently, they are only
8018used in one place: in \fIreorg.c\fR, instead of guessing which path a
8019branch is most likely to take, the \fB\s-1REG_BR_PROB\s0\fR values are used to
8020exactly determine which path is taken more often.
8021.IP "\fB\-fprofile\-values\fR" 4
8022.IX Item "-fprofile-values"
8023If combined with \fB\-fprofile\-arcs\fR, it adds code so that some
8024data about values of expressions in the program is gathered.
8025.Sp
8026With \fB\-fbranch\-probabilities\fR, it reads back the data gathered
8027from profiling values of expressions for usage in optimizations.
8028.Sp
8029Enabled with \fB\-fprofile\-generate\fR and \fB\-fprofile\-use\fR.
8030.IP "\fB\-fvpt\fR" 4
8031.IX Item "-fvpt"
8032If combined with \fB\-fprofile\-arcs\fR, this option instructs the compiler
8033to add code to gather information about values of expressions.
8034.Sp
8035With \fB\-fbranch\-probabilities\fR, it reads back the data gathered
8036and actually performs the optimizations based on them.
8037Currently the optimizations include specialization of division operations
8038using the knowledge about the value of the denominator.
8039.IP "\fB\-frename\-registers\fR" 4
8040.IX Item "-frename-registers"
8041Attempt to avoid false dependencies in scheduled code by making use
8042of registers left over after register allocation. This optimization
8043most benefits processors with lots of registers. Depending on the
8044debug information format adopted by the target, however, it can
8045make debugging impossible, since variables no longer stay in
8046a \*(L"home register\*(R".
8047.Sp
8048Enabled by default with \fB\-funroll\-loops\fR and \fB\-fpeel\-loops\fR.
8049.IP "\fB\-ftracer\fR" 4
8050.IX Item "-ftracer"
8051Perform tail duplication to enlarge superblock size. This transformation
8052simplifies the control flow of the function allowing other optimizations to do
8053a better job.
8054.Sp
8055Enabled with \fB\-fprofile\-use\fR.
8056.IP "\fB\-funroll\-loops\fR" 4
8057.IX Item "-funroll-loops"
8058Unroll loops whose number of iterations can be determined at compile time or
8059upon entry to the loop. \fB\-funroll\-loops\fR implies
8060\&\fB\-frerun\-cse\-after\-loop\fR, \fB\-fweb\fR and \fB\-frename\-registers\fR.
8061It also turns on complete loop peeling (i.e. complete removal of loops with
8062a small constant number of iterations). This option makes code larger, and may
8063or may not make it run faster.
8064.Sp
8065Enabled with \fB\-fprofile\-use\fR.
8066.IP "\fB\-funroll\-all\-loops\fR" 4
8067.IX Item "-funroll-all-loops"
8068Unroll all loops, even if their number of iterations is uncertain when
8069the 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"
8074Peels loops for which there is enough information that they do not
8075roll 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
8078Enabled with \fB\-fprofile\-use\fR.
8079.IP "\fB\-fmove\-loop\-invariants\fR" 4
8080.IX Item "-fmove-loop-invariants"
8081Enables the loop invariant motion pass in the \s-1RTL\s0 loop optimizer. Enabled
8082at level \fB\-O1\fR
8083.IP "\fB\-funswitch\-loops\fR" 4
8084.IX Item "-funswitch-loops"
8085Move branches with loop invariant conditions out of the loop, with duplicates
8086of 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
8093Place each function or data item into its own section in the output
8094file if the target supports arbitrary sections. The name of the
8095function or the name of the data item determines the section's name
8096in the output file.
8097.Sp
8098Use these options on systems where the linker can perform optimizations
8099to improve locality of reference in the instruction space. Most systems
8100using the \s-1ELF\s0 object format and \s-1SPARC\s0 processors running Solaris 2 have
8101linkers with such optimizations. \s-1AIX\s0 may have these optimizations in
8102the future.
8103.Sp
8104Only use these options when there are significant benefits from doing
8105so. When you specify these options, the assembler and linker
8106create larger object and executable files and are also slower.
8107You cannot use \f(CW\*(C`gprof\*(C'\fR on all systems if you
8108specify this option, and you may have problems with debugging if
8109you specify both this option and \fB\-g\fR.
8110.IP "\fB\-fbranch\-target\-load\-optimize\fR" 4
8111.IX Item "-fbranch-target-load-optimize"
8112Perform branch target register load optimization before prologue / epilogue
8113threading.
8114The use of target registers can typically be exposed only during reload,
8115thus hoisting loads out of loops and doing inter-block scheduling needs
8116a separate optimization pass.
8117.IP "\fB\-fbranch\-target\-load\-optimize2\fR" 4
8118.IX Item "-fbranch-target-load-optimize2"
8119Perform branch target register load optimization after prologue / epilogue
8120threading.
8121.IP "\fB\-fbtr\-bb\-exclusive\fR" 4
8122.IX Item "-fbtr-bb-exclusive"
8123When performing branch target register load optimization, don't reuse
8124branch target registers within any basic block.
8125.IP "\fB\-fstack\-protector\fR" 4
8126.IX Item "-fstack-protector"
8127Emit extra code to check for buffer overflows, such as stack smashing
8128attacks. This is done by adding a guard variable to functions with
8129vulnerable objects. This includes functions that call \f(CW\*(C`alloca\*(C'\fR, and
8130functions with buffers larger than 8 bytes. The guards are initialized
8131when a function is entered and then checked when the function exits.
8132If 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"
8135Like \fB\-fstack\-protector\fR except that all functions are protected.
8136.IP "\fB\-fsection\-anchors\fR" 4
8137.IX Item "-fsection-anchors"
8138Try to reduce the number of symbolic address calculations by using
8139shared \*(L"anchor\*(R" symbols to address nearby objects. This transformation
8140can help to reduce the number of \s-1GOT\s0 entries and \s-1GOT\s0 accesses on some
8141targets.
8142.Sp
8143For 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
8150usually calculates the addresses of all three variables, but if you
8151compile it with \fB\-fsection\-anchors\fR, it accesses the variables
8152from a common anchor point instead. The effect is similar to the
8153following 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
8163Not all targets support this option.
8164.IP "\fB\-\-param\fR \fIname\fR\fB=\fR\fIvalue\fR" 4
8165.IX Item "--param name=value"
8166In some places, \s-1GCC\s0 uses various constants to control the amount of
8167optimization that is done. For example, \s-1GCC\s0 does not inline functions
8168that contain more than a certain number of instructions. You can
8169control some of these constants on the command line using the
8170\&\fB\-\-param\fR option.
8171.Sp
8172The names of specific parameters, and the meaning of the values, are
8173tied to the internals of the compiler, and are subject to change
8174without notice in future releases.
8175.Sp
8176In 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"
8181When 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"
8185The maximum number of incoming edges to consider for cross-jumping.
8186The algorithm used by \fB\-fcrossjumping\fR is O(N^2) in
8187the number of edges incoming to each block. Increasing values mean
8188more aggressive optimization, making the compilation time increase with
8189probably small improvement in executable size.
8190.IP "\fBmin-crossjump-insns\fR" 4
8191.IX Item "min-crossjump-insns"
8192The minimum number of instructions that must be matched at the end
8193of two blocks before cross-jumping is performed on them. This
8194value is ignored in the case where all instructions in the block being
8195cross-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"
8198The maximum code size expansion factor when copying basic blocks
8199instead of jumping. The expansion is relative to a jump instruction.
8200The default value is 8.
8201.IP "\fBmax-goto-duplication-insns\fR" 4
8202.IX Item "max-goto-duplication-insns"
8203The maximum number of instructions to duplicate to a block that jumps
8204to a computed goto. To avoid O(N^2) behavior in a number of
8205passes, \s-1GCC\s0 factors computed gotos early in the compilation process,
8206and unfactors them as late as possible. Only computed jumps at the
8207end of a basic blocks with no more than max-goto-duplication-insns are
8208unfactored. The default value is 8.
8209.IP "\fBmax-delay-slot-insn-search\fR" 4
8210.IX Item "max-delay-slot-insn-search"
8211The maximum number of instructions to consider when looking for an
8212instruction to fill a delay slot. If more than this arbitrary number of
8213instructions are searched, the time savings from filling the delay slot
8214are minimal, so stop searching. Increasing values mean more
8215aggressive optimization, making the compilation time increase with probably
8216small improvement in execution time.
8217.IP "\fBmax-delay-slot-live-search\fR" 4
8218.IX Item "max-delay-slot-live-search"
8219When trying to fill delay slots, the maximum number of instructions to
8220consider when searching for a block with valid live register
8221information. Increasing this arbitrarily chosen value means more
8222aggressive optimization, increasing the compilation time. This parameter
8223should be removed when the delay slot code is rewritten to maintain the
8224control-flow graph.
8225.IP "\fBmax-gcse-memory\fR" 4
8226.IX Item "max-gcse-memory"
8227The approximate maximum amount of memory that can be allocated in
8228order to perform the global common subexpression elimination
8229optimization. If more memory than specified is required, the
8230optimization is not done.
8231.IP "\fBmax-gcse-insertion-ratio\fR" 4
8232.IX Item "max-gcse-insertion-ratio"
8233If the ratio of expression insertions to deletions is larger than this value
8234for any expression, then \s-1RTL\s0 \s-1PRE\s0 inserts or removes the expression and thus
8235leaves 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"
8238The maximum number of pending dependencies scheduling allows
8239before flushing the current state and starting over. Large functions
8240with few branches or calls can create excessively large lists which
8241needlessly consume memory and resources.
8242.IP "\fBmax-modulo-backtrack-attempts\fR" 4
8243.IX Item "max-modulo-backtrack-attempts"
8244The maximum number of backtrack attempts the scheduler should make
8245when modulo scheduling a loop. Larger values can exponentially increase
8246compilation time.
8247.IP "\fBmax-inline-insns-single\fR" 4
8248.IX Item "max-inline-insns-single"
8249Several parameters control the tree inliner used in \s-1GCC\s0.
8250This number sets the maximum number of instructions (counted in \s-1GCC\s0's
8251internal representation) in a single function that the tree inliner
8252considers for inlining. This only affects functions declared
8253inline and methods implemented in a class declaration (\*(C+).
8254The default value is 400.
8255.IP "\fBmax-inline-insns-auto\fR" 4
8256.IX Item "max-inline-insns-auto"
8257When you use \fB\-finline\-functions\fR (included in \fB\-O3\fR),
8258a lot of functions that would otherwise not be considered for inlining
8259by the compiler are investigated. To those functions, a different
8260(more restrictive) limit compared to functions declared inline can
8261be applied.
8262The default value is 40.
8263.IP "\fBinline-min-speedup\fR" 4
8264.IX Item "inline-min-speedup"
8265When estimated performance improvement of caller + callee runtime exceeds this
8266threshold (in precent), the function can be inlined regardless the limit on
8267\&\fB\-\-param max-inline-insns-single\fR and \fB\-\-param
8268max-inline-insns-auto\fR.
8269.IP "\fBlarge-function-insns\fR" 4
8270.IX Item "large-function-insns"
8271The limit specifying really large functions. For functions larger than this
8272limit after inlining, inlining is constrained by
8273\&\fB\-\-param large-function-growth\fR. This parameter is useful primarily
8274to avoid extreme compilation time caused by non-linear algorithms used by the
8275back end.
8276The default value is 2700.
8277.IP "\fBlarge-function-growth\fR" 4
8278.IX Item "large-function-growth"
8279Specifies maximal growth of large function caused by inlining in percents.
8280The default value is 100 which limits large function growth to 2.0 times
8281the original size.
8282.IP "\fBlarge-unit-insns\fR" 4
8283.IX Item "large-unit-insns"
8284The limit specifying large translation unit. Growth caused by inlining of
8285units larger than this limit is limited by \fB\-\-param inline-unit-growth\fR.
8286For small units this might be too tight.
8287For example, consider a unit consisting of function A
8288that is inline and B that just calls A three times. If B is small relative to
8289A, the growth of unit is 300\e% and yet such inlining is very sane. For very
8290large units consisting of small inlineable functions, however, the overall unit
8291growth limit is needed to avoid exponential explosion of code size. Thus for
8292smaller units, the size is increased to \fB\-\-param large-unit-insns\fR
8293before applying \fB\-\-param inline-unit-growth\fR. The default is 10000.
8294.IP "\fBinline-unit-growth\fR" 4
8295.IX Item "inline-unit-growth"
8296Specifies maximal overall growth of the compilation unit caused by inlining.
8297The default value is 30 which limits unit growth to 1.3 times the original
8298size.
8299.IP "\fBipcp-unit-growth\fR" 4
8300.IX Item "ipcp-unit-growth"
8301Specifies maximal overall growth of the compilation unit caused by
8302interprocedural constant propagation. The default value is 10 which limits
8303unit growth to 1.1 times the original size.
8304.IP "\fBlarge-stack-frame\fR" 4
8305.IX Item "large-stack-frame"
8306The limit specifying large stack frames. While inlining the algorithm is trying
8307to 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"
8310Specifies maximal growth of large stack frames caused by inlining in percents.
8311The default value is 1000 which limits large stack frame growth to 11 times
8312the 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
8319Specifies the maximum number of instructions an out-of-line copy of a
8320self-recursive inline
8321function can grow into by performing recursive inlining.
8322.Sp
8323For functions declared inline, \fB\-\-param max-inline-insns-recursive\fR is
8324taken into account. For functions not declared inline, recursive inlining
8325happens only when \fB\-finline\-functions\fR (included in \fB\-O3\fR) is
8326enabled and \fB\-\-param max-inline-insns-recursive-auto\fR is used. The
8327default 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
8334Specifies the maximum recursion depth used for recursive inlining.
8335.Sp
8336For functions declared inline, \fB\-\-param max-inline-recursive-depth\fR is
8337taken into account. For functions not declared inline, recursive inlining
8338happens only when \fB\-finline\-functions\fR (included in \fB\-O3\fR) is
8339enabled and \fB\-\-param max-inline-recursive-depth-auto\fR is used. The
8340default value is 8.
8341.IP "\fBmin-inline-recursive-probability\fR" 4
8342.IX Item "min-inline-recursive-probability"
8343Recursive inlining is profitable only for function having deep recursion
8344in average and can hurt for function having little recursion depth by
8345increasing the prologue size or complexity of function body to other
8346optimizers.
8347.Sp
8348When profile feedback is available (see \fB\-fprofile\-generate\fR) the actual
8349recursion depth can be guessed from probability that function recurses via a
8350given call expression. This parameter limits inlining only to call expressions
8351whose probability exceeds the given threshold (in percents).
8352The default value is 10.
8353.IP "\fBearly-inlining-insns\fR" 4
8354.IX Item "early-inlining-insns"
8355Specify growth that the early inliner can make. In effect it increases
8356the amount of inlining for code having a large abstraction penalty.
8357The 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
8364Limit of iterations of the early inliner. This basically bounds
8365the number of nested indirect calls the early inliner can resolve.
8366Deeper 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
8373Probability (in percent) that \*(C+ inline function with comdat visibility
8374are 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"
8377The minimum number of iterations under which loops are not vectorized
8378when \fB\-ftree\-vectorize\fR is used. The number of iterations after
8379vectorization needs to be greater than the value specified by this option
8380to allow vectorization. The default value is 0.
8381.IP "\fBgcse-cost-distance-ratio\fR" 4
8382.IX Item "gcse-cost-distance-ratio"
8383Scaling factor in calculation of maximum distance an expression
8384can be moved by \s-1GCSE\s0 optimizations. This is currently supported only in the
8385code hoisting pass. The bigger the ratio, the more aggressive code hoisting
8386is with simple expressions, i.e., the expressions that have cost
8387less than \fBgcse-unrestricted-cost\fR. Specifying 0 disables
8388hoisting of simple expressions. The default value is 10.
8389.IP "\fBgcse-unrestricted-cost\fR" 4
8390.IX Item "gcse-unrestricted-cost"
8391Cost, roughly measured as the cost of a single typical machine
8392instruction, at which \s-1GCSE\s0 optimizations do not constrain
8393the distance an expression can travel. This is currently
8394supported only in the code hoisting pass. The lesser the cost,
8395the more aggressive code hoisting is. Specifying 0
8396allows all expressions to travel unrestricted distances.
8397The default value is 3.
8398.IP "\fBmax-hoist-depth\fR" 4
8399.IX Item "max-hoist-depth"
8400The depth of search in the dominator tree for expressions to hoist.
8401This is used to avoid quadratic behavior in hoisting algorithm.
8402The value of 0 does not limit on the search, but may slow down compilation
8403of huge functions. The default value is 30.
8404.IP "\fBmax-tail-merge-comparisons\fR" 4
8405.IX Item "max-tail-merge-comparisons"
8406The maximum amount of similar bbs to compare a bb with. This is used to
8407avoid 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"
8410The maximum amount of iterations of the pass over the function. This is used to
8411limit compilation time in tree tail merging. The default value is 2.
8412.IP "\fBmax-unrolled-insns\fR" 4
8413.IX Item "max-unrolled-insns"
8414The maximum number of instructions that a loop may have to be unrolled.
8415If a loop is unrolled, this parameter also determines how many times
8416the loop code is unrolled.
8417.IP "\fBmax-average-unrolled-insns\fR" 4
8418.IX Item "max-average-unrolled-insns"
8419The maximum number of instructions biased by probabilities of their execution
8420that a loop may have to be unrolled. If a loop is unrolled,
8421this parameter also determines how many times the loop code is unrolled.
8422.IP "\fBmax-unroll-times\fR" 4
8423.IX Item "max-unroll-times"
8424The maximum number of unrollings of a single loop.
8425.IP "\fBmax-peeled-insns\fR" 4
8426.IX Item "max-peeled-insns"
8427The maximum number of instructions that a loop may have to be peeled.
8428If a loop is peeled, this parameter also determines how many times
8429the loop code is peeled.
8430.IP "\fBmax-peel-times\fR" 4
8431.IX Item "max-peel-times"
8432The maximum number of peelings of a single loop.
8433.IP "\fBmax-peel-branches\fR" 4
8434.IX Item "max-peel-branches"
8435The 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"
8438The maximum number of insns of a completely peeled loop.
8439.IP "\fBmax-completely-peel-times\fR" 4
8440.IX Item "max-completely-peel-times"
8441The 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"
8444The maximum depth of a loop nest suitable for complete peeling.
8445.IP "\fBmax-unswitch-insns\fR" 4
8446.IX Item "max-unswitch-insns"
8447The maximum number of insns of an unswitched loop.
8448.IP "\fBmax-unswitch-level\fR" 4
8449.IX Item "max-unswitch-level"
8450The maximum number of branches unswitched in a single loop.
8451.IP "\fBlim-expensive\fR" 4
8452.IX Item "lim-expensive"
8453The 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"
8456Bound on number of candidates for induction variables, below which
8457all candidates are considered for each use in induction variable
8458optimizations. If there are more candidates than this,
8459only 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"
8462The induction variable optimizations give up on loops that contain more
8463induction variable uses.
8464.IP "\fBiv-always-prune-cand-set-bound\fR" 4
8465.IX Item "iv-always-prune-cand-set-bound"
8466If the number of candidates in the set is smaller than this value,
8467always try to remove unnecessary ivs from the set
8468when adding a new one.
8469.IP "\fBscev-max-expr-size\fR" 4
8470.IX Item "scev-max-expr-size"
8471Bound on size of expressions used in the scalar evolutions analyzer.
8472Large expressions slow the analyzer.
8473.IP "\fBscev-max-expr-complexity\fR" 4
8474.IX Item "scev-max-expr-complexity"
8475Bound on the complexity of the expressions in the scalar evolutions analyzer.
8476Complex expressions slow the analyzer.
8477.IP "\fBomega-max-vars\fR" 4
8478.IX Item "omega-max-vars"
8479The maximum number of variables in an Omega constraint system.
8480The default value is 128.
8481.IP "\fBomega-max-geqs\fR" 4
8482.IX Item "omega-max-geqs"
8483The maximum number of inequalities in an Omega constraint system.
8484The default value is 256.
8485.IP "\fBomega-max-eqs\fR" 4
8486.IX Item "omega-max-eqs"
8487The maximum number of equalities in an Omega constraint system.
8488The default value is 128.
8489.IP "\fBomega-max-wild-cards\fR" 4
8490.IX Item "omega-max-wild-cards"
8491The maximum number of wildcard variables that the Omega solver is
8492able to insert. The default value is 18.
8493.IP "\fBomega-hash-table-size\fR" 4
8494.IX Item "omega-hash-table-size"
8495The size of the hash table in the Omega solver. The default value is
8496550.
8497.IP "\fBomega-max-keys\fR" 4
8498.IX Item "omega-max-keys"
8499The maximal number of keys used by the Omega solver. The default
8500value is 500.
8501.IP "\fBomega-eliminate-redundant-constraints\fR" 4
8502.IX Item "omega-eliminate-redundant-constraints"
8503When set to 1, use expensive methods to eliminate all redundant
8504constraints. The default value is 0.
8505.IP "\fBvect-max-version-for-alignment-checks\fR" 4
8506.IX Item "vect-max-version-for-alignment-checks"
8507The maximum number of run-time checks that can be performed when
8508doing 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"
8512The maximum number of run-time checks that can be performed when
8513doing 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"
8517The maximum number of iterations of a loop the brute-force algorithm
8518for 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"
8521A basic block profile count is considered hot if it contributes to
8522the 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"
8525Select fraction of the entry block frequency of executions of basic block in
8526function given basic block needs to have to be considered hot.
8527.IP "\fBmax-predicted-iterations\fR" 4
8528.IX Item "max-predicted-iterations"
8529The maximum number of loop iterations we predict statically. This is useful
8530in cases where a function contains a single loop with known bound and
8531another loop with unknown bound.
8532The known number of iterations is predicted correctly, while
8533the unknown number of iterations average to roughly 10. This means that the
8534loop without bounds appears artificially cold relative to the other one.
8535.IP "\fBalign-threshold\fR" 4
8536.IX Item "align-threshold"
8537Select fraction of the maximal frequency of executions of a basic block in
8538a function to align the basic block.
8539.IP "\fBalign-loop-iterations\fR" 4
8540.IX Item "align-loop-iterations"
8541A loop expected to iterate at least the selected number of iterations is
8542aligned.
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
8549This value is used to limit superblock formation once the given percentage of
8550executed instructions is covered. This limits unnecessary code size
8551expansion.
8552.Sp
8553The \fBtracer-dynamic-coverage-feedback\fR is used only when profile
8554feedback is available. The real profiles (as opposed to statically estimated
8555ones) 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"
8558Stop tail duplication once code growth has reached given percentage. This is
8559a rather artificial limit, as most of the duplicates are eliminated later in
8560cross jumping, so it may be set to much higher values than is the desired code
8561growth.
8562.IP "\fBtracer-min-branch-ratio\fR" 4
8563.IX Item "tracer-min-branch-ratio"
8564Stop reverse growth when the reverse probability of best edge is less than this
8565threshold (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
8572Stop forward growth if the best edge has probability lower than this
8573threshold.
8574.Sp
8575Similarly to \fBtracer-dynamic-coverage\fR two values are present, one for
8576compilation for profile feedback and one for compilation without. The value
8577for compilation with profile feedback needs to be more conservative (higher) in
8578order to make tracer effective.
8579.IP "\fBmax-cse-path-length\fR" 4
8580.IX Item "max-cse-path-length"
8581The maximum number of basic blocks on path that \s-1CSE\s0 considers.
8582The default is 10.
8583.IP "\fBmax-cse-insns\fR" 4
8584.IX Item "max-cse-insns"
8585The maximum number of instructions \s-1CSE\s0 processes before flushing.
8586The 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
8590parameter specifies the minimum percentage by which the garbage
8591collector's heap should be allowed to expand between collections.
8592Tuning this may improve compilation speed; it has no effect on code
8593generation.
8594.Sp
8595The 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
8597the 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
8599bound of 30% is used. Setting this parameter and
8600\&\fBggc-min-heapsize\fR to zero causes a full collection to occur at
8601every opportunity. This is extremely slow, but can be useful for
8602debugging.
8603.IP "\fBggc-min-heapsize\fR" 4
8604.IX Item "ggc-min-heapsize"
8605Minimum size of the garbage collector's heap before it begins bothering
8606to collect garbage. The first collection occurs after the heap expands
8607by \fBggc-min-expand\fR% beyond \fBggc-min-heapsize\fR. Again,
8608tuning this may improve compilation speed, and has no effect on code
8609generation.
8610.Sp
8611The default is the smaller of \s-1RAM/8\s0, \s-1RLIMIT_RSS\s0, or a limit that
8612tries to ensure that \s-1RLIMIT_DATA\s0 or \s-1RLIMIT_AS\s0 are not exceeded, but
8613with a lower bound of 4096 (four megabytes) and an upper bound of
8614131072 (128 megabytes). If \s-1GCC\s0 is not able to calculate \s-1RAM\s0 on a
8615particular platform, the lower bound is used. Setting this parameter
8616very large effectively disables garbage collection. Setting this
8617parameter and \fBggc-min-expand\fR to zero causes a full collection
8618to occur at every opportunity.
8619.IP "\fBmax-reload-search-insns\fR" 4
8620.IX Item "max-reload-search-insns"
8621The maximum number of instruction reload should look backward for equivalent
8622register. Increasing values mean more aggressive optimization, making the
8623compilation time increase with probably slightly better performance.
8624The default value is 100.
8625.IP "\fBmax-cselib-memory-locations\fR" 4
8626.IX Item "max-cselib-memory-locations"
8627The maximum number of memory locations cselib should take into account.
8628Increasing values mean more aggressive optimization, making the compilation time
8629increase 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
8636Used by the basic block reordering pass to decide whether to use unconditional
8637branch or duplicate the code on its destination. Code is duplicated when its
8638estimated size is smaller than this value multiplied by the estimated size of
8639unconditional jump in the hot spots of the program.
8640.Sp
8641The \fBreorder-block-duplicate-feedback\fR is used only when profile
8642feedback is available. It may be set to higher values than
8643\&\fBreorder-block-duplicate\fR since information about the hot spots is more
8644accurate.
8645.IP "\fBmax-sched-ready-insns\fR" 4
8646.IX Item "max-sched-ready-insns"
8647The maximum number of instructions ready to be issued the scheduler should
8648consider at any given time during the first scheduling pass. Increasing
8649values mean more thorough searches, making the compilation time increase
8650with probably little benefit. The default value is 100.
8651.IP "\fBmax-sched-region-blocks\fR" 4
8652.IX Item "max-sched-region-blocks"
8653The maximum number of blocks in a region to be considered for
8654interblock scheduling. The default value is 10.
8655.IP "\fBmax-pipeline-region-blocks\fR" 4
8656.IX Item "max-pipeline-region-blocks"
8657The maximum number of blocks in a region to be considered for
8658pipelining in the selective scheduler. The default value is 15.
8659.IP "\fBmax-sched-region-insns\fR" 4
8660.IX Item "max-sched-region-insns"
8661The maximum number of insns in a region to be considered for
8662interblock scheduling. The default value is 100.
8663.IP "\fBmax-pipeline-region-insns\fR" 4
8664.IX Item "max-pipeline-region-insns"
8665The maximum number of insns in a region to be considered for
8666pipelining in the selective scheduler. The default value is 200.
8667.IP "\fBmin-spec-prob\fR" 4
8668.IX Item "min-spec-prob"
8669The minimum probability (in percents) of reaching a source block
8670for 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"
8673The maximum number of iterations through \s-1CFG\s0 to extend regions.
8674A 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"
8677The maximum conflict delay for an insn to be considered for speculative motion.
8678The default value is 3.
8679.IP "\fBsched-spec-prob-cutoff\fR" 4
8680.IX Item "sched-spec-prob-cutoff"
8681The minimal probability of speculation success (in percents), so that
8682speculative insns are scheduled.
8683The default value is 40.
8684.IP "\fBsched-spec-state-edge-prob-cutoff\fR" 4
8685.IX Item "sched-spec-state-edge-prob-cutoff"
8686The minimum probability an edge must have for the scheduler to save its
8687state across it.
8688The default value is 10.
8689.IP "\fBsched-mem-true-dep-cost\fR" 4
8690.IX Item "sched-mem-true-dep-cost"
8691Minimal distance (in \s-1CPU\s0 cycles) between store and load targeting same
8692memory locations. The default value is 1.
8693.IP "\fBselsched-max-lookahead\fR" 4
8694.IX Item "selsched-max-lookahead"
8695The maximum size of the lookahead window of selective scheduling. It is a
8696depth of search for available instructions.
8697The default value is 50.
8698.IP "\fBselsched-max-sched-times\fR" 4
8699.IX Item "selsched-max-sched-times"
8700The maximum number of times that an instruction is scheduled during
8701selective scheduling. This is the limit on the number of iterations
8702through 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"
8705The maximum number of best instructions in the ready list that are considered
8706for renaming in the selective scheduler. The default value is 2.
8707.IP "\fBsms-min-sc\fR" 4
8708.IX Item "sms-min-sc"
8709The minimum value of stage count that swing modulo scheduler
8710generates. The default value is 2.
8711.IP "\fBmax-last-value-rtl\fR" 4
8712.IX Item "max-last-value-rtl"
8713The maximum size measured as number of RTLs that can be recorded in an expression
8714in combiner for a pseudo register as last known value of that register. The default
8715is 10000.
8716.IP "\fBinteger-share-limit\fR" 4
8717.IX Item "integer-share-limit"
8718Small integer constants can use a shared data structure, reducing the
8719compiler's memory usage and increasing its speed. This sets the maximum
8720value of a shared integer constant. The default value is 256.
8721.IP "\fBssp-buffer-size\fR" 4
8722.IX Item "ssp-buffer-size"
8723The minimum size of buffers (i.e. arrays) that receive stack smashing
8724protection when \fB\-fstack\-protection\fR is used.
8725.IP "\fBmax-jump-thread-duplication-stmts\fR" 4
8726.IX Item "max-jump-thread-duplication-stmts"
8727Maximum number of statements allowed in a block that needs to be
8728duplicated when threading jumps.
8729.IP "\fBmax-fields-for-field-sensitive\fR" 4
8730.IX Item "max-fields-for-field-sensitive"
8731Maximum number of fields in a structure treated in
8732a field sensitive manner during pointer analysis. The default is zero
8733for \fB\-O0\fR and \fB\-O1\fR,
8734and 100 for \fB\-Os\fR, \fB\-O2\fR, and \fB\-O3\fR.
8735.IP "\fBprefetch-latency\fR" 4
8736.IX Item "prefetch-latency"
8737Estimate on average number of instructions that are executed before
8738prefetch finishes. The distance prefetched ahead is proportional
8739to this constant. Increasing this number may also lead to less
8740streams being prefetched (see \fBsimultaneous-prefetches\fR).
8741.IP "\fBsimultaneous-prefetches\fR" 4
8742.IX Item "simultaneous-prefetches"
8743Maximum 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"
8746The size of cache line in L1 cache, in bytes.
8747.IP "\fBl1\-cache\-size\fR" 4
8748.IX Item "l1-cache-size"
8749The size of L1 cache, in kilobytes.
8750.IP "\fBl2\-cache\-size\fR" 4
8751.IX Item "l2-cache-size"
8752The size of L2 cache, in kilobytes.
8753.IP "\fBmin-insn-to-prefetch-ratio\fR" 4
8754.IX Item "min-insn-to-prefetch-ratio"
8755The minimum ratio between the number of instructions and the
8756number 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"
8759The minimum ratio between the number of instructions and the
8760number of memory references to enable prefetching in a loop.
8761.IP "\fBuse-canonical-types\fR" 4
8762.IX Item "use-canonical-types"
8763Whether the compiler should use the \*(L"canonical\*(R" type system. By
8764default, this should always be 1, which uses a more efficient internal
8765mechanism for comparing types in \*(C+ and Objective\-\*(C+. However, if
8766bugs in the canonical type system are causing compilation failures,
8767set 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"
8770Switch initialization conversion refuses to create arrays that are
8771bigger than \fBswitch-conversion-max-branch-ratio\fR times the number of
8772branches in the switch.
8773.IP "\fBmax-partial-antic-length\fR" 4
8774.IX Item "max-partial-antic-length"
8775Maximum length of the partial antic set computed during the tree
8776partial redundancy elimination optimization (\fB\-ftree\-pre\fR) when
8777optimizing at \fB\-O3\fR and above. For some sorts of source code
8778the enhanced partial redundancy elimination optimization can run away,
8779consuming all of the memory available on the host machine. This
8780parameter sets a limit on the length of the sets that are computed,
8781which prevents the runaway behavior. Setting a value of 0 for
8782this parameter allows an unlimited set length.
8783.IP "\fBsccvn-max-scc-size\fR" 4
8784.IX Item "sccvn-max-scc-size"
8785Maximum size of a strongly connected component (\s-1SCC\s0) during \s-1SCCVN\s0
8786processing. If this limit is hit, \s-1SCCVN\s0 processing for the whole
8787function is not done and optimizations depending on it are
8788disabled. 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"
8791Maximum number of alias-oracle queries we perform when looking for
8792redundancies for loads and stores. If this limit is hit the search
8793is aborted and the load or store is not considered redundant. The
8794number of queries is algorithmically limited to the number of
8795stores on all paths from the load to the function entry.
8796The 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
8800contains more loops than the number given by this parameter, only at most
8801the given number of the most frequently-executed loops form regions
8802for regional register allocation. The default value of the
8803parameter is 100.
8804.IP "\fBira-max-conflict-table-size\fR" 4
8805.IX Item "ira-max-conflict-table-size"
8806Although \s-1IRA\s0 uses a sophisticated algorithm to compress the conflict
8807table, the table can still require excessive amounts of memory for
8808huge functions. If the conflict table for a function could be more
8809than the size in \s-1MB\s0 given by this parameter, the register allocator
8810instead uses a faster, simpler, and lower-quality
8811algorithm that does not require building a pseudo-register conflict table.
8812The 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
8816for decisions to move loop invariants (see \fB\-O3\fR). The number
8817of available registers reserved for some other purposes is given
8818by this parameter. The default value of the parameter is 2, which is
8819the minimal number of registers needed by typical instructions.
8820This 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"
8823Loop invariant motion can be very expensive, both in compilation time and
8824in amount of needed compile-time memory, with very large loops. Loops
8825with more basic blocks than this parameter won't have loop invariant
8826motion optimization performed on them. The default value of the
8827parameter 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"
8830Building data dapendencies is expensive for very large loops. This
8831parameter limits the number of data references in loops that are
8832considered for data dependence analysis. These large loops are no
8833handled by the optimizations using loop data dependencies.
8834The default value is 1000.
8835.IP "\fBmax-vartrack-size\fR" 4
8836.IX Item "max-vartrack-size"
8837Sets a maximum number of hash table slots to use during variable
8838tracking dataflow analysis of any function. If this limit is exceeded
8839with variable tracking at assignments enabled, analysis for that
8840function is retried without it, after removing all debug insns from
8841the function. If the limit is exceeded even without debug insns, var
8842tracking analysis is completely disabled for the function. Setting
8843the parameter to zero makes it unlimited.
8844.IP "\fBmax-vartrack-expr-depth\fR" 4
8845.IX Item "max-vartrack-expr-depth"
8846Sets a maximum number of recursion levels when attempting to map
8847variable names or debug temporaries to value expressions. This trades
8848compilation time for more complete debug information. If this is set too
8849low, value expressions that are available and could be represented in
8850debug information may end up not being used; setting this higher may
8851enable the compiler to find more complex debug expressions, but compile
8852time and memory use may grow. The default is 12.
8853.IP "\fBmin-nondebug-insn-uid\fR" 4
8854.IX Item "min-nondebug-insn-uid"
8855Use uids starting at this parameter for nondebug insns. The range below
8856the 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"
8861IPA-SRA replaces a pointer to an aggregate with one or more new
8862parameters only when their cumulative size is less or equal to
8863\&\fBipa-sra-ptr-growth-factor\fR times the size of the original
8864pointer parameter.
8865.IP "\fBtm-max-aggregate-size\fR" 4
8866.IX Item "tm-max-aggregate-size"
8867When making copies of thread-local variables in a transaction, this
8868parameter specifies the size in bytes after which variables are
8869saved with the logging functions as opposed to save/restore code
8870sequence 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"
8874To avoid exponential effects in the Graphite loop transforms, the
8875number of parameters in a Static Control Part (SCoP) is bounded. The
8876default value is 10 parameters. A variable whose value is unknown at
8877compilation 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"
8880To avoid exponential effects in the detection of SCoPs, the size of
8881the functions analyzed by Graphite is bounded. The default value is
8882100 basic blocks.
8883.IP "\fBloop-block-tile-size\fR" 4
8884.IX Item "loop-block-tile-size"
8885Loop blocking or strip mining transforms, enabled with
8886\&\fB\-floop\-block\fR or \fB\-floop\-strip\-mine\fR, strip mine each
8887loop in the loop nest by a given number of iterations. The strip
8888length can be changed using the \fBloop-block-tile-size\fR
8889parameter. The default value is 51 iterations.
8890.IP "\fBipa-cp-value-list-size\fR" 4
8891.IX Item "ipa-cp-value-list-size"
8892IPA-CP attempts to track all possible values and types passed to a function's
8893parameter in order to propagate them and perform devirtualization.
8894\&\fBipa-cp-value-list-size\fR is the maximum number of values and types it
8895stores per one formal parameter of a function.
8896.IP "\fBlto-partitions\fR" 4
8897.IX Item "lto-partitions"
8898Specify desired number of partitions produced during \s-1WHOPR\s0 compilation.
8899The number of partitions should exceed the number of CPUs used for compilation.
8900The default value is 32.
8901.IP "\fBlto-minpartition\fR" 4
8902.IX Item "lto-minpartition"
8903Size of minimal partition for \s-1WHOPR\s0 (in estimated instructions).
8904This prevents expenses of splitting very small programs into too many
8905partitions.
8906.IP "\fBcxx-max-namespaces-for-diagnostic-help\fR" 4
8907.IX Item "cxx-max-namespaces-for-diagnostic-help"
8908The maximum number of namespaces to consult for suggestions when \*(C+
8909name lookup fails for an identifier. The default is 1000.
8910.IP "\fBsink-frequency-threshold\fR" 4
8911.IX Item "sink-frequency-threshold"
8912The maximum relative execution frequency (in percents) of the target block
8913relative to a statement's original block to allow statement sinking of a
8914statement. Larger numbers result in more aggressive statement sinking.
8915The default value is 75. A small positive adjustment is applied for
8916statements 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"
8919The maximum number of conditional stores paires that can be sunk. Set to 0
8920if 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"
8924Allow optimizers to introduce new data races on loads.
8925Set to 1 to allow, otherwise to 0. This option is enabled by default
8926unless implicitly set by the \fB\-fmemory\-model=\fR option.
8927.IP "\fBallow-store-data-races\fR" 4
8928.IX Item "allow-store-data-races"
8929Allow optimizers to introduce new data races on stores.
8930Set to 1 to allow, otherwise to 0. This option is enabled by default
8931unless 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"
8934Allow optimizers to introduce new data races on packed data loads.
8935Set to 1 to allow, otherwise to 0. This option is enabled by default
8936unless 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"
8939Allow optimizers to introduce new data races on packed data stores.
8940Set to 1 to allow, otherwise to 0. This option is enabled by default
8941unless implicitly set by the \fB\-fmemory\-model=\fR option.
8942.IP "\fBcase-values-threshold\fR" 4
8943.IX Item "case-values-threshold"
8944The smallest number of different values for which it is best to use a
8945jump-table instead of a tree of conditional branches. If the value is
89460, use the default for the machine. The default is 0.
8947.IP "\fBtree-reassoc-width\fR" 4
8948.IX Item "tree-reassoc-width"
8949Set the maximum number of instructions executed in parallel in
8950reassociated tree. This parameter overrides target dependent
8951heuristics used by default if has non zero value.
8952.IP "\fBsched-pressure-algorithm\fR" 4
8953.IX Item "sched-pressure-algorithm"
8954Choose between the two available implementations of
8955\&\fB\-fsched\-pressure\fR. Algorithm 1 is the original implementation
8956and is the more likely to prevent instructions from being reordered.
8957Algorithm 2 was designed to be a compromise between the relatively
8958conservative approach taken by algorithm 1 and the rather aggressive
8959approach taken by the default scheduler. It relies more heavily on
8960having a regular register file and accurate register pressure classes.
8961See \fIhaifa\-sched.c\fR in the \s-1GCC\s0 sources for more details.
8962.Sp
8963The default choice depends on the target.
8964.IP "\fBmax-slsr-cand-scan\fR" 4
8965.IX Item "max-slsr-cand-scan"
8966Set the maximum number of existing candidates that will be considered when
8967seeking 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"
8973These options control the C preprocessor, which is run on each C source
8974file before actual compilation.
8975.PP
8976If you use the \fB\-E\fR option, nothing is done except preprocessing.
8977Some of these options make sense only together with \fB\-E\fR because
8978they cause the preprocessor output to be unsuitable for actual
8979compilation.
8980.IP "\fB\-Wp,\fR\fIoption\fR" 4
8981.IX Item "-Wp,option"
8982You can use \fB\-Wp,\fR\fIoption\fR to bypass the compiler driver
8983and pass \fIoption\fR directly through to the preprocessor. If
8984\&\fIoption\fR contains commas, it is split into multiple options at the
8985commas. However, many options are modified, translated or interpreted
8986by the compiler driver before being passed to the preprocessor, and
8987\&\fB\-Wp\fR forcibly bypasses this phase. The preprocessor's direct
8988interface is undocumented and subject to change, so whenever possible
8989you should avoid using \fB\-Wp\fR and let the driver handle the
8990options instead.
8991.IP "\fB\-Xpreprocessor\fR \fIoption\fR" 4
8992.IX Item "-Xpreprocessor option"
8993Pass \fIoption\fR as an option to the preprocessor. You can use this to
8994supply system-specific preprocessor options that \s-1GCC\s0 does not
8995recognize.
8996.Sp
8997If 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"
9001Perform preprocessing as a separate pass before compilation.
9002By default, \s-1GCC\s0 performs preprocessing as an integrated part of
9003input tokenization and parsing.
9004If this option is provided, the appropriate language front end
9005(\fBcc1\fR, \fBcc1plus\fR, or \fBcc1obj\fR for C, \*(C+,
9006and Objective-C, respectively) is instead invoked twice,
9007once for preprocessing only and once for actual compilation
9008of the preprocessed input.
9009This option may be useful in conjunction with the \fB\-B\fR or
9010\&\fB\-wrapper\fR options to specify an alternate preprocessor or
9011perform additional processing of the program source between
9012normal preprocessing and compilation.
9013.IP "\fB\-D\fR \fIname\fR" 4
9014.IX Item "-D name"
9015Predefine \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"
9018The contents of \fIdefinition\fR are tokenized and processed as if
9019they appeared during translation phase three in a \fB#define\fR
9020directive. In particular, the definition will be truncated by
9021embedded newline characters.
9022.Sp
9023If you are invoking the preprocessor from a shell or shell-like
9024program you may need to use the shell's quoting syntax to protect
9025characters such as spaces that have a meaning in the shell syntax.
9026.Sp
9027If you wish to define a function-like macro on the command line, write
9028its argument list with surrounding parentheses before the equals sign
9029(if any). Parentheses are meaningful to most shells, so you will need
9030to 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
9034are 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"
9039Cancel any previous definition of \fIname\fR, either built in or
9040provided with a \fB\-D\fR option.
9041.IP "\fB\-undef\fR" 4
9042.IX Item "-undef"
9043Do not predefine any system-specific or GCC-specific macros. The
9044standard predefined macros remain defined.
9045.IP "\fB\-I\fR \fIdir\fR" 4
9046.IX Item "-I dir"
9047Add the directory \fIdir\fR to the list of directories to be searched
9048for header files.
9049Directories named by \fB\-I\fR are searched before the standard
9050system include directories. If the directory \fIdir\fR is a standard
9051system include directory, the option is ignored to ensure that the
9052default search order for system directories and the special treatment
9053of system headers are not defeated
9054\&.
9055If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
9056by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
9057.IP "\fB\-o\fR \fIfile\fR" 4
9058.IX Item "-o file"
9059Write output to \fIfile\fR. This is the same as specifying \fIfile\fR
9060as the second non-option argument to \fBcpp\fR. \fBgcc\fR has a
9061different interpretation of a second non-option argument, so you must
9062use \fB\-o\fR to specify the output file.
9063.IP "\fB\-Wall\fR" 4
9064.IX Item "-Wall"
9065Turns on all optional warnings which are desirable for normal code.
9066At present this is \fB\-Wcomment\fR, \fB\-Wtrigraphs\fR,
9067\&\fB\-Wmultichar\fR and a warning about integer promotion causing a
9068change of sign in \f(CW\*(C`#if\*(C'\fR expressions. Note that many of the
9069preprocessor's warnings are on by default and have no options to
9070control 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
9077Warn whenever a comment-start sequence \fB/*\fR appears in a \fB/*\fR
9078comment, 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"
9082Most trigraphs in comments cannot affect the meaning of the program.
9083However, a trigraph that would form an escaped newline (\fB??/\fR at
9084the end of a line) can, by changing where the comment begins or ends.
9085Therefore, only trigraphs that would form escaped newlines produce
9086warnings inside a comment.
9087.Sp
9088This option is implied by \fB\-Wall\fR. If \fB\-Wall\fR is not
9089given, this option is still enabled unless trigraphs are enabled. To
9090get 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"
9094Warn 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
9096equivalent, and problematic constructs which should be avoided.
9097.IP "\fB\-Wundef\fR" 4
9098.IX Item "-Wundef"
9099Warn whenever an identifier which is not a macro is encountered in an
9100\&\fB#if\fR directive, outside of \fBdefined\fR. Such identifiers are
9101replaced with zero.
9102.IP "\fB\-Wunused\-macros\fR" 4
9103.IX Item "-Wunused-macros"
9104Warn about macros defined in the main file that are unused. A macro
9105is \fIused\fR if it is expanded or tested for existence at least once.
9106The preprocessor will also warn if the macro has not been used at the
9107time it is redefined or undefined.
9108.Sp
9109Built-in macros, macros defined on the command line, and macros
9110defined in include files are not warned about.
9111.Sp
9112\&\fINote:\fR If a macro is actually used, but only used in skipped
9113conditional blocks, then \s-1CPP\s0 will report it as unused. To avoid the
9114warning in such a case, you might improve the scope of the macro's
9115definition by, for example, moving it into the first skipped block.
9116Alternatively, 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"
9124Warn whenever an \fB#else\fR or an \fB#endif\fR are followed by text.
9125This 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
9135The second and third \f(CW\*(C`FOO\*(C'\fR should be in comments, but often are not
9136in older programs. This warning is on by default.
9137.IP "\fB\-Werror\fR" 4
9138.IX Item "-Werror"
9139Make all warnings into hard errors. Source code which triggers warnings
9140will be rejected.
9141.IP "\fB\-Wsystem\-headers\fR" 4
9142.IX Item "-Wsystem-headers"
9143Issue warnings for code in system headers. These are normally unhelpful
9144in finding bugs in your own code, therefore suppressed. If you are
9145responsible for the system library, you may want to see them.
9146.IP "\fB\-w\fR" 4
9147.IX Item "-w"
9148Suppress all warnings, including those which \s-1GNU\s0 \s-1CPP\s0 issues by default.
9149.IP "\fB\-pedantic\fR" 4
9150.IX Item "-pedantic"
9151Issue all the mandatory diagnostics listed in the C standard. Some of
9152them are left out by default, since they trigger frequently on harmless
9153code.
9154.IP "\fB\-pedantic\-errors\fR" 4
9155.IX Item "-pedantic-errors"
9156Issue all the mandatory diagnostics, and make all mandatory diagnostics
9157into errors. This includes mandatory diagnostics that \s-1GCC\s0 issues
9158without \fB\-pedantic\fR but treats as warnings.
9159.IP "\fB\-M\fR" 4
9160.IX Item "-M"
9161Instead of outputting the result of preprocessing, output a rule
9162suitable for \fBmake\fR describing the dependencies of the main
9163source file. The preprocessor outputs one \fBmake\fR rule containing
9164the object file name for that source file, a colon, and the names of all
9165the included files, including those coming from \fB\-include\fR or
9166\&\fB\-imacros\fR command line options.
9167.Sp
9168Unless specified explicitly (with \fB\-MT\fR or \fB\-MQ\fR), the
9169object file name consists of the name of the source file with any
9170suffix replaced with object file suffix and with any leading directory
9171parts removed. If there are many included files then the rule is
9172split into several lines using \fB\e\fR\-newline. The rule has no
9173commands.
9174.Sp
9175This option does not suppress the preprocessor's debug output, such as
9176\&\fB\-dM\fR. To avoid mixing such debug output with the dependency
9177rules 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
9180will still be sent to the regular output stream as normal.
9181.Sp
9182Passing \fB\-M\fR to the driver implies \fB\-E\fR, and suppresses
9183warnings with an implicit \fB\-w\fR.
9184.IP "\fB\-MM\fR" 4
9185.IX Item "-MM"
9186Like \fB\-M\fR but do not mention header files that are found in
9187system header directories, nor header files that are included,
9188directly or indirectly, from such a header.
9189.Sp
9190This implies that the choice of angle brackets or double quotes in an
9191\&\fB#include\fR directive does not in itself determine whether that
9192header will appear in \fB\-MM\fR dependency output. This is a
9193slight 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"
9196When used with \fB\-M\fR or \fB\-MM\fR, specifies a
9197file to write the dependencies to. If no \fB\-MF\fR switch is given
9198the preprocessor sends the rules to the same place it would have sent
9199preprocessed output.
9200.Sp
9201When 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"
9205In conjunction with an option such as \fB\-M\fR requesting
9206dependency generation, \fB\-MG\fR assumes missing header files are
9207generated files and adds them to the dependency list without raising
9208an error. The dependency filename is taken directly from the
9209\&\f(CW\*(C`#include\*(C'\fR directive without prepending any path. \fB\-MG\fR
9210also suppresses preprocessed output, as a missing header file renders
9211this useless.
9212.Sp
9213This feature is used in automatic updating of makefiles.
9214.IP "\fB\-MP\fR" 4
9215.IX Item "-MP"
9216This option instructs \s-1CPP\s0 to add a phony target for each dependency
9217other than the main file, causing each to depend on nothing. These
9218dummy rules work around errors \fBmake\fR gives if you remove header
9219files without updating the \fIMakefile\fR to match.
9220.Sp
9221This 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"
9230Change the target of the rule emitted by dependency generation. By
9231default \s-1CPP\s0 takes the name of the main input file, deletes any
9232directory components and any file suffix such as \fB.c\fR, and
9233appends the platform's usual object suffix. The result is the target.
9234.Sp
9235An \fB\-MT\fR option will set the target to be exactly the string you
9236specify. If you want multiple targets, you can specify them as a single
9237argument to \fB\-MT\fR, or use multiple \fB\-MT\fR options.
9238.Sp
9239For 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"
9246Same as \fB\-MT\fR, but it quotes any characters which are special to
9247Make. \fB\-MQ\ '$(objpfx)foo.o'\fR gives
9248.Sp
9249.Vb 1
9250\& $$(objpfx)foo.o: foo.c
9251.Ve
9252.Sp
9253The 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
9259whether an \fB\-o\fR option is given. If it is, the driver uses its
9260argument but with a suffix of \fI.d\fR, otherwise it takes the name
9261of the input file, removes any directory components and suffix, and
9262applies a \fI.d\fR suffix.
9263.Sp
9264If \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
9266is understood to specify a target object file.
9267.Sp
9268Since \fB\-E\fR is not implied, \fB\-MD\fR can be used to generate
9269a dependency output file as a side-effect of the compilation process.
9270.IP "\fB\-MMD\fR" 4
9271.IX Item "-MMD"
9272Like \fB\-MD\fR except mention only user header files, not system
9273header files.
9274.IP "\fB\-fpch\-deps\fR" 4
9275.IX Item "-fpch-deps"
9276When using precompiled headers, this flag
9277will cause the dependency-output flags to also list the files from the
9278precompiled header's dependencies. If not specified only the
9279precompiled header would be listed and not the files that were used to
9280create it because those files are not consulted when a precompiled
9281header is used.
9282.IP "\fB\-fpch\-preprocess\fR" 4
9283.IX Item "-fpch-preprocess"
9284This 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
9286the place where the precompiled header was found, and its \fIfilename\fR.
9287When \fB\-fpreprocessed\fR is in use, \s-1GCC\s0 recognizes this \f(CW\*(C`#pragma\*(C'\fR
9288and loads the \s-1PCH\s0.
9289.Sp
9290This option is off by default, because the resulting preprocessed output
9291is only really suitable as input to \s-1GCC\s0. It is switched on by
9292\&\fB\-save\-temps\fR.
9293.Sp
9294You should not write this \f(CW\*(C`#pragma\*(C'\fR in your own code, but it is
9295safe to edit the filename if the \s-1PCH\s0 file is available in a different
9296location. The filename may be absolute or it may be relative to \s-1GCC\s0's
9297current 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
9308Specify the source language: C, \*(C+, Objective-C, or assembly. This has
9309nothing to do with standards conformance or extensions; it merely
9310selects which base syntax to expect. If you give none of these options,
9311cpp 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
9313extensions for \*(C+ and assembly are also recognized. If cpp does not
9314recognize the extension, it will treat the file as C; this is the most
9315generic mode.
9316.Sp
9317\&\fINote:\fR Previous versions of cpp accepted a \fB\-lang\fR option
9318which selected both the language and the standards conformance level.
9319This option has been removed, because it conflicts with the \fB\-l\fR
9320option.
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
9327Specify the standard to which the code should conform. Currently \s-1CPP\s0
9328knows about C and \*(C+ standards; others may be added in the future.
9329.Sp
9330\&\fIstandard\fR
9331may 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
9344The \s-1ISO\s0 C standard from 1990. \fBc90\fR is the customary shorthand for
9345this version of the standard.
9346.Sp
9347The \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"
9351The 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
9366The revised \s-1ISO\s0 C standard, published in December 1999. Before
9367publication, 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
9379The revised \s-1ISO\s0 C standard, published in December 2011. Before
9380publication, 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
9389The 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
9398The 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
9407The 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"
9411The 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"
9415The same as \fB\-std=c++98\fR plus \s-1GNU\s0 extensions. This is the
9416default for \*(C+ code.
9417.RE
9418.RS 4
9419.RE
9420.IP "\fB\-I\-\fR" 4
9421.IX Item "-I-"
9422Split the include path. Any directories specified with \fB\-I\fR
9423options 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
9426specified with \fB\-I\fR options after the \fB\-I\-\fR, those
9427directories are searched for all \fB#include\fR directives.
9428.Sp
9429In addition, \fB\-I\-\fR inhibits the use of the directory of the current
9430file directory as the first search directory for \f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR.
9431This option has been deprecated.
9432.IP "\fB\-nostdinc\fR" 4
9433.IX Item "-nostdinc"
9434Do not search the standard system directories for header files.
9435Only 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++"
9439Do not search for header files in the \*(C+\-specific standard directories,
9440but do still search the other standard directories. (This option is
9441used when building the \*(C+ library.)
9442.IP "\fB\-include\fR \fIfile\fR" 4
9443.IX Item "-include file"
9444Process \fIfile\fR as if \f(CW\*(C`#include "file"\*(C'\fR appeared as the first
9445line of the primary source file. However, the first directory searched
9446for \fIfile\fR is the preprocessor's working directory \fIinstead of\fR
9447the directory containing the main source file. If not found there, it
9448is searched for in the remainder of the \f(CW\*(C`#include "..."\*(C'\fR search
9449chain as normal.
9450.Sp
9451If multiple \fB\-include\fR options are given, the files are included
9452in the order they appear on the command line.
9453.IP "\fB\-imacros\fR \fIfile\fR" 4
9454.IX Item "-imacros file"
9455Exactly like \fB\-include\fR, except that any output produced by
9456scanning \fIfile\fR is thrown away. Macros it defines remain defined.
9457This allows you to acquire all the macros from a header without also
9458processing its declarations.
9459.Sp
9460All files specified by \fB\-imacros\fR are processed before all files
9461specified by \fB\-include\fR.
9462.IP "\fB\-idirafter\fR \fIdir\fR" 4
9463.IX Item "-idirafter dir"
9464Search \fIdir\fR for header files, but do it \fIafter\fR all
9465directories specified with \fB\-I\fR and the standard system directories
9466have been exhausted. \fIdir\fR is treated as a system include directory.
9467If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
9468by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
9469.IP "\fB\-iprefix\fR \fIprefix\fR" 4
9470.IX Item "-iprefix prefix"
9471Specify \fIprefix\fR as the prefix for subsequent \fB\-iwithprefix\fR
9472options. If the prefix represents a directory, you should include the
9473final \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
9480Append \fIdir\fR to the prefix specified previously with
9481\&\fB\-iprefix\fR, and add the resulting directory to the include search
9482path. \fB\-iwithprefixbefore\fR puts it in the same place \fB\-I\fR
9483would; \fB\-iwithprefix\fR puts it where \fB\-idirafter\fR would.
9484.IP "\fB\-isysroot\fR \fIdir\fR" 4
9485.IX Item "-isysroot dir"
9486This option is like the \fB\-\-sysroot\fR option, but applies only to
9487header files (except for Darwin targets, where it applies to both header
9488files and libraries). See the \fB\-\-sysroot\fR option for more
9489information.
9490.IP "\fB\-imultilib\fR \fIdir\fR" 4
9491.IX Item "-imultilib dir"
9492Use \fIdir\fR as a subdirectory of the directory containing
9493target-specific \*(C+ headers.
9494.IP "\fB\-isystem\fR \fIdir\fR" 4
9495.IX Item "-isystem dir"
9496Search \fIdir\fR for header files, after all directories specified by
9497\&\fB\-I\fR but before the standard system directories. Mark it
9498as a system directory, so that it gets the same special treatment as
9499is applied to the standard system directories.
9500If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
9501by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
9502.IP "\fB\-iquote\fR \fIdir\fR" 4
9503.IX Item "-iquote dir"
9504Search \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.
9508If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
9509by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
9510.IP "\fB\-fdirectives\-only\fR" 4
9511.IX Item "-fdirectives-only"
9512When preprocessing, handle directives, but do not expand macros.
9513.Sp
9514The option's behavior depends on the \fB\-E\fR and \fB\-fpreprocessed\fR
9515options.
9516.Sp
9517With \fB\-E\fR, preprocessing is limited to the handling of directives
9518such as \f(CW\*(C`#define\*(C'\fR, \f(CW\*(C`#ifdef\*(C'\fR, and \f(CW\*(C`#error\*(C'\fR. Other
9519preprocessor operations, such as macro expansion and trigraph
9520conversion are not performed. In addition, the \fB\-dD\fR option is
9521implicitly enabled.
9522.Sp
9523With \fB\-fpreprocessed\fR, predefinition of command line and most
9524builtin macros is disabled. Macros such as \f(CW\*(C`_\|_LINE_\|_\*(C'\fR, which are
9525contextually dependent, are handled normally. This enables compilation of
9526files previously preprocessed with \f(CW\*(C`\-E \-fdirectives\-only\*(C'\fR.
9527.Sp
9528With both \fB\-E\fR and \fB\-fpreprocessed\fR, the rules for
9529\&\fB\-fpreprocessed\fR take precedence. This enables full preprocessing of
9530files 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"
9533Accept \fB$\fR in identifiers.
9534.IP "\fB\-fextended\-identifiers\fR" 4
9535.IX Item "-fextended-identifiers"
9536Accept universal character names in identifiers. This option is
9537experimental; in a future version of \s-1GCC\s0, it will be enabled by
9538default for C99 and \*(C+.
9539.IP "\fB\-fno\-canonical\-system\-headers\fR" 4
9540.IX Item "-fno-canonical-system-headers"
9541When preprocessing, do not shorten system header paths with canonicalization.
9542.IP "\fB\-fpreprocessed\fR" 4
9543.IX Item "-fpreprocessed"
9544Indicate to the preprocessor that the input file has already been
9545preprocessed. This suppresses things like macro expansion, trigraph
9546conversion, escaped newline splicing, and processing of most directives.
9547The preprocessor still recognizes and removes comments, so that you can
9548pass a file preprocessed with \fB\-C\fR to the compiler without
9549problems. In this mode the integrated preprocessor is little more than
9550a tokenizer for the front ends.
9551.Sp
9552\&\fB\-fpreprocessed\fR is implicit if the input file has one of the
9553extensions \fB.i\fR, \fB.ii\fR or \fB.mi\fR. These are the
9554extensions 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"
9558Set the distance between tab stops. This helps the preprocessor report
9559correct column numbers in warnings or errors, even if tabs appear on the
9560line. If the value is less than 1 or greater than 100, the option is
9561ignored. The default is 8.
9562.IP "\fB\-fdebug\-cpp\fR" 4
9563.IX Item "-fdebug-cpp"
9564This option is only useful for debugging \s-1GCC\s0. When used with
9565\&\fB\-E\fR, dumps debugging information about location maps. Every
9566token in the output is preceded by the dump of the map its location
9567belongs to. The dump of the map holding the location of a token would
9568be:
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
9574When 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]"
9577Track locations of tokens across macro expansions. This allows the
9578compiler to emit diagnostic about the current macro expansion stack
9579when a compilation error occurs in a macro expansion. Using this
9580option makes the preprocessor and the compiler consume more
9581memory. The \fIlevel\fR parameter can be used to choose the level of
9582precision of token location tracking thus decreasing the memory
9583consumption if necessary. Value \fB0\fR of \fIlevel\fR de-activates
9584this option just as if no \fB\-ftrack\-macro\-expansion\fR was present
9585on the command line. Value \fB1\fR tracks tokens locations in a
9586degraded mode for the sake of minimal memory overhead. In this mode
9587all tokens resulting from the expansion of an argument of a
9588function-like macro have the same location. Value \fB2\fR tracks
9589tokens locations completely. This value is the most memory hungry.
9590When this option is given no argument, the default parameter value is
9591\&\fB2\fR.
9592.Sp
9593Note that \-ftrack\-macro\-expansion=2 is activated by default.
9594.IP "\fB\-fexec\-charset=\fR\fIcharset\fR" 4
9595.IX Item "-fexec-charset=charset"
9596Set the execution character set, used for string and character
9597constants. The default is \s-1UTF\-8\s0. \fIcharset\fR can be any encoding
9598supported 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"
9601Set the wide execution character set, used for wide string and
9602character constants. The default is \s-1UTF\-32\s0 or \s-1UTF\-16\s0, whichever
9603corresponds 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
9605by the system's \f(CW\*(C`iconv\*(C'\fR library routine; however, you will have
9606problems 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"
9609Set the input character set, used for translation from the character
9610set of the input file to the source character set used by \s-1GCC\s0. If the
9611locale does not specify, or \s-1GCC\s0 cannot get this information from the
9612locale, the default is \s-1UTF\-8\s0. This can be overridden by either the locale
9613or this command line option. Currently the command line option takes
9614precedence if there's a conflict. \fIcharset\fR can be any encoding
9615supported by the system's \f(CW\*(C`iconv\*(C'\fR library routine.
9616.IP "\fB\-fworking\-directory\fR" 4
9617.IX Item "-fworking-directory"
9618Enable generation of linemarkers in the preprocessor output that will
9619let the compiler know the current working directory at the time of
9620preprocessing. When this option is enabled, the preprocessor will
9621emit, after the initial linemarker, a second linemarker with the
9622current working directory followed by two slashes. \s-1GCC\s0 will use this
9623directory, when it's present in the preprocessed input, as the
9624directory emitted as the current working directory in some debugging
9625information formats. This option is implicitly enabled if debugging
9626information is enabled, but this can be inhibited with the negated
9627form \fB\-fno\-working\-directory\fR. If the \fB\-P\fR flag is
9628present 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"
9632Do not print column numbers in diagnostics. This may be necessary if
9633diagnostics are being scanned by a program that does not understand the
9634column numbers, such as \fBdejagnu\fR.
9635.IP "\fB\-A\fR \fIpredicate\fR\fB=\fR\fIanswer\fR" 4
9636.IX Item "-A predicate=answer"
9637Make 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
9640it does not use shell special characters.
9641.IP "\fB\-A \-\fR\fIpredicate\fR\fB=\fR\fIanswer\fR" 4
9642.IX Item "-A -predicate=answer"
9643Cancel 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,
9648and must not be preceded by a space. Other characters are interpreted
9649by the compiler proper, or reserved for future versions of \s-1GCC\s0, and so
9650are silently ignored. If you specify characters whose behavior
9651conflicts, the result is undefined.
9652.RS 4
9653.IP "\fBM\fR" 4
9654.IX Item "M"
9655Instead of the normal output, generate a list of \fB#define\fR
9656directives for all the macros defined during the execution of the
9657preprocessor, including predefined macros. This gives you a way of
9658finding out what is predefined in your version of the preprocessor.
9659Assuming 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
9665will show all the predefined macros.
9666.Sp
9667If you use \fB\-dM\fR without the \fB\-E\fR option, \fB\-dM\fR is
9668interpreted as a synonym for \fB\-fdump\-rtl\-mach\fR.
9669.IP "\fBD\fR" 4
9670.IX Item "D"
9671Like \fBM\fR except in two respects: it does \fInot\fR include the
9672predefined macros, and it outputs \fIboth\fR the \fB#define\fR
9673directives and the result of preprocessing. Both kinds of output go to
9674the standard output file.
9675.IP "\fBN\fR" 4
9676.IX Item "N"
9677Like \fBD\fR, but emit only the macro names, not their expansions.
9678.IP "\fBI\fR" 4
9679.IX Item "I"
9680Output \fB#include\fR directives in addition to the result of
9681preprocessing.
9682.IP "\fBU\fR" 4
9683.IX Item "U"
9684Like \fBD\fR except that only macros that are expanded, or whose
9685definedness is tested in preprocessor directives, are output; the
9686output is delayed until the use or test of the macro; and
9687\&\fB#undef\fR directives are also output for macros tested but
9688undefined at the time.
9689.RE
9690.RS 4
9691.RE
9692.IP "\fB\-P\fR" 4
9693.IX Item "-P"
9694Inhibit generation of linemarkers in the output from the preprocessor.
9695This might be useful when running the preprocessor on something that is
9696not C code, and will be sent to a program which might be confused by the
9697linemarkers.
9698.IP "\fB\-C\fR" 4
9699.IX Item "-C"
9700Do not discard comments. All comments are passed through to the output
9701file, except for comments in processed directives, which are deleted
9702along with the directive.
9703.Sp
9704You should be prepared for side effects when using \fB\-C\fR; it
9705causes the preprocessor to treat comments as tokens in their own right.
9706For example, comments appearing at the start of what would be a
9707directive line have the effect of turning that line into an ordinary
9708source line, since the first token on the line is no longer a \fB#\fR.
9709.IP "\fB\-CC\fR" 4
9710.IX Item "-CC"
9711Do not discard comments, including during macro expansion. This is
9712like \fB\-C\fR, except that comments contained within macros are
9713also passed through to the output file where the macro is expanded.
9714.Sp
9715In 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
9717to be converted to C\-style comments. This is to prevent later use
9718of that macro from inadvertently commenting out the remainder of
9719the source line.
9720.Sp
9721The \fB\-CC\fR option is generally used to support lint comments.
9722.IP "\fB\-traditional\-cpp\fR" 4
9723.IX Item "-traditional-cpp"
9724Try to imitate the behavior of old-fashioned C preprocessors, as
9725opposed to \s-1ISO\s0 C preprocessors.
9726.IP "\fB\-trigraphs\fR" 4
9727.IX Item "-trigraphs"
9728Process trigraph sequences.
9729These are three-character sequences, all starting with \fB??\fR, that
9730are 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
9732constant for a newline. By default, \s-1GCC\s0 ignores trigraphs, but in
9733standard-conforming modes it converts them. See the \fB\-std\fR and
9734\&\fB\-ansi\fR options.
9735.Sp
9736The 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"
9744Enable special code to work around file systems which only permit very
9745short 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
9752Print text describing all the command line options instead of
9753preprocessing anything.
9754.IP "\fB\-v\fR" 4
9755.IX Item "-v"
9756Verbose mode. Print out \s-1GNU\s0 \s-1CPP\s0's version number at the beginning of
9757execution, and report the final form of the include path.
9758.IP "\fB\-H\fR" 4
9759.IX Item "-H"
9760Print the name of each header file used, in addition to other normal
9761activities. Each name is indented to show how deep in the
9762\&\fB#include\fR stack it is. Precompiled header files are also
9763printed, even if they are found to be invalid; an invalid precompiled
9764header 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
9771Print out \s-1GNU\s0 \s-1CPP\s0's version number. With one dash, proceed to
9772preprocess as normal. With two dashes, exit immediately.
9773.SS "Passing Options to the Assembler"
9774.IX Subsection "Passing Options to the Assembler"
9775You can pass options to the assembler.
9776.IP "\fB\-Wa,\fR\fIoption\fR" 4
9777.IX Item "-Wa,option"
9778Pass \fIoption\fR as an option to the assembler. If \fIoption\fR
9779contains commas, it is split into multiple options at the commas.
9780.IP "\fB\-Xassembler\fR \fIoption\fR" 4
9781.IX Item "-Xassembler option"
9782Pass \fIoption\fR as an option to the assembler. You can use this to
9783supply system-specific assembler options that \s-1GCC\s0 does not
9784recognize.
9785.Sp
9786If 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"
9790These options come into play when the compiler links object files into
9791an executable output file. They are meaningless if the compiler is
9792not doing a link step.
9793.IP "\fIobject-file-name\fR" 4
9794.IX Item "object-file-name"
9795A file name that does not end in a special recognized suffix is
9796considered to name an object file or library. (Object files are
9797distinguished from libraries by the linker according to the file
9798contents.) If linking is done, these object files are used as input
9799to 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
9808If any of these options is used, then the linker is not run, and
9809object 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
9816Search the library named \fIlibrary\fR when linking. (The second
9817alternative with the library as a separate argument is only for
9818\&\s-1POSIX\s0 compliance and is not recommended.)
9819.Sp
9820It makes a difference where in the command you write this option; the
9821linker searches and processes libraries and object files in the order they
9822are specified. Thus, \fBfoo.o \-lz bar.o\fR searches library \fBz\fR
9823after file \fIfoo.o\fR but before \fIbar.o\fR. If \fIbar.o\fR refers
9824to functions in \fBz\fR, those functions may not be loaded.
9825.Sp
9826The linker searches a standard list of directories for the library,
9827which is actually a file named \fIlib\fIlibrary\fI.a\fR. The linker
9828then uses this file as if it had been specified precisely by name.
9829.Sp
9830The directories searched include several standard system directories
9831plus any that you specify with \fB\-L\fR.
9832.Sp
9833Normally the files found this way are library files\-\-\-archive files
9834whose members are object files. The linker handles an archive file by
9835scanning through it for members which define symbols that have so far
9836been referenced but not defined. But if the file that is found is an
9837ordinary object file, it is linked in the usual fashion. The only
9838difference between using an \fB\-l\fR option and specifying a file name
9839is that \fB\-l\fR surrounds \fIlibrary\fR with \fBlib\fR and \fB.a\fR
9840and searches several directories.
9841.IP "\fB\-lobjc\fR" 4
9842.IX Item "-lobjc"
9843You need this special case of the \fB\-l\fR option in order to
9844link an Objective-C or Objective\-\*(C+ program.
9845.IP "\fB\-nostartfiles\fR" 4
9846.IX Item "-nostartfiles"
9847Do not use the standard system startup files when linking.
9848The standard system libraries are used normally, unless \fB\-nostdlib\fR
9849or \fB\-nodefaultlibs\fR is used.
9850.IP "\fB\-nodefaultlibs\fR" 4
9851.IX Item "-nodefaultlibs"
9852Do not use the standard system libraries when linking.
9853Only the libraries you specify are passed to the linker, and options
9854specifying linkage of the system libraries, such as \f(CW\*(C`\-static\-libgcc\*(C'\fR
9855or \f(CW\*(C`\-shared\-libgcc\*(C'\fR, are ignored.
9856The standard startup files are used normally, unless \fB\-nostartfiles\fR
9857is used.
9858.Sp
9859The 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.
9861These entries are usually resolved by entries in
9862libc. These entry points should be supplied through some other
9863mechanism when this option is specified.
9864.IP "\fB\-nostdlib\fR" 4
9865.IX Item "-nostdlib"
9866Do not use the standard system startup files or libraries when linking.
9867No startup files and only the libraries you specify are passed to
9868the 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
9871The 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.
9873These entries are usually resolved by entries in
9874libc. These entry points should be supplied through some other
9875mechanism when this option is specified.
9876.Sp
9877One of the standard libraries bypassed by \fB\-nostdlib\fR and
9878\&\fB\-nodefaultlibs\fR is \fIlibgcc.a\fR, a library of internal subroutines
9879which \s-1GCC\s0 uses to overcome shortcomings of particular machines, or special
9880needs for some languages.
9881.Sp
9882In most cases, you need \fIlibgcc.a\fR even when you want to avoid
9883other standard libraries. In other words, when you specify \fB\-nostdlib\fR
9884or \fB\-nodefaultlibs\fR you should usually specify \fB\-lgcc\fR as well.
9885This ensures that you have no unresolved references to internal \s-1GCC\s0
9886library subroutines.
9887(An example of such an internal subroutine is \fB_\|_main\fR, used to ensure \*(C+
9888constructors are called.)
9889.IP "\fB\-pie\fR" 4
9890.IX Item "-pie"
9891Produce a position independent executable on targets that support it.
9892For predictable results, you must also specify the same set of options
9893used for compilation (\fB\-fpie\fR, \fB\-fPIE\fR,
9894or model suboptions) when you specify this linker option.
9895.IP "\fB\-rdynamic\fR" 4
9896.IX Item "-rdynamic"
9897Pass the flag \fB\-export\-dynamic\fR to the \s-1ELF\s0 linker, on targets
9898that support it. This instructs the linker to add all symbols, not
9899only used ones, to the dynamic symbol table. This option is needed
9900for some uses of \f(CW\*(C`dlopen\*(C'\fR or to allow obtaining backtraces
9901from within a program.
9902.IP "\fB\-s\fR" 4
9903.IX Item "-s"
9904Remove all symbol table and relocation information from the executable.
9905.IP "\fB\-static\fR" 4
9906.IX Item "-static"
9907On systems that support dynamic linking, this prevents linking with the shared
9908libraries. On other systems, this option has no effect.
9909.IP "\fB\-shared\fR" 4
9910.IX Item "-shared"
9911Produce a shared object which can then be linked with other objects to
9912form an executable. Not all systems support this option. For predictable
9913results, you must also specify the same set of options used for compilation
9914(\fB\-fpic\fR, \fB\-fPIC\fR, or model suboptions) when
9915you 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
9922On systems that provide \fIlibgcc\fR as a shared library, these options
9923force the use of either the shared or static version, respectively.
9924If no shared version of \fIlibgcc\fR was built when the compiler was
9925configured, these options have no effect.
9926.Sp
9927There are several situations in which an application should use the
9928shared \fIlibgcc\fR instead of the static version. The most common
9929of these is when the application wishes to throw and catch exceptions
9930across different shared libraries. In that case, each of the libraries
9931as well as the application itself should use the shared \fIlibgcc\fR.
9932.Sp
9933Therefore, the G++ and \s-1GCJ\s0 drivers automatically add
9934\&\fB\-shared\-libgcc\fR whenever you build a shared library or a main
9935executable, because \*(C+ and Java programs typically use exceptions, so
9936this is the right thing to do.
9937.Sp
9938If, instead, you use the \s-1GCC\s0 driver to create shared libraries, you may
9939find that they are not always linked with the shared \fIlibgcc\fR.
9940If \s-1GCC\s0 finds, at its configuration time, that you have a non-GNU linker
9941or a \s-1GNU\s0 linker that does not support option \fB\-\-eh\-frame\-hdr\fR,
9942it links the shared version of \fIlibgcc\fR into shared libraries
9943by default. Otherwise, it takes advantage of the linker and optimizes
9944away the linking with the shared version of \fIlibgcc\fR, linking with
9945the static version of libgcc by default. This allows exceptions to
9946propagate through such shared libraries, without incurring relocation
9947costs at library load time.
9948.Sp
9949However, if a library or main executable is supposed to throw or catch
9950exceptions, you must link it using the G++ or \s-1GCJ\s0 driver, as appropriate
9951for 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"
9956When the \fB\-fsanitize=address\fR option is used to link a program,
9957the \s-1GCC\s0 driver automatically links against \fBlibasan\fR. If
9958\&\fIlibasan\fR is available as a shared library, and the \fB\-static\fR
9959option 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
9961driver to link \fIlibasan\fR statically, without necessarily linking
9962other libraries statically.
9963.IP "\fB\-static\-libtsan\fR" 4
9964.IX Item "-static-libtsan"
9965When the \fB\-fsanitize=thread\fR option is used to link a program,
9966the \s-1GCC\s0 driver automatically links against \fBlibtsan\fR. If
9967\&\fIlibtsan\fR is available as a shared library, and the \fB\-static\fR
9968option 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
9970driver to link \fIlibtsan\fR statically, without necessarily linking
9971other libraries statically.
9972.IP "\fB\-static\-libstdc++\fR" 4
9973.IX Item "-static-libstdc++"
9974When the \fBg++\fR program is used to link a \*(C+ program, it
9975normally 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
9978shared version of \fIlibstdc++\fR. That is normally fine. However, it
9979is sometimes useful to freeze the version of \fIlibstdc++\fR used by
9980the program without going all the way to a fully static link. The
9981\&\fB\-static\-libstdc++\fR option directs the \fBg++\fR driver to
9982link \fIlibstdc++\fR statically, without necessarily linking other
9983libraries statically.
9984.IP "\fB\-symbolic\fR" 4
9985.IX Item "-symbolic"
9986Bind references to global symbols when building a shared object. Warn
9987about any unresolved references (unless overridden by the link editor
9988option \fB\-Xlinker \-z \-Xlinker defs\fR). Only a few systems support
9989this option.
9990.IP "\fB\-T\fR \fIscript\fR" 4
9991.IX Item "-T script"
9992Use \fIscript\fR as the linker script. This option is supported by most
9993systems using the \s-1GNU\s0 linker. On some targets, such as bare-board
9994targets without an operating system, the \fB\-T\fR option may be required
9995when linking to avoid references to undefined symbols.
9996.IP "\fB\-Xlinker\fR \fIoption\fR" 4
9997.IX Item "-Xlinker option"
9998Pass \fIoption\fR as an option to the linker. You can use this to
9999supply system-specific linker options that \s-1GCC\s0 does not recognize.
10000.Sp
10001If 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.
10003For 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
10006string as a single argument, which is not what the linker expects.
10007.Sp
10008When using the \s-1GNU\s0 linker, it is usually more convenient to pass
10009arguments to linker options using the \fIoption\fR\fB=\fR\fIvalue\fR
10010syntax 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
10013this syntax for command-line options.
10014.IP "\fB\-Wl,\fR\fIoption\fR" 4
10015.IX Item "-Wl,option"
10016Pass \fIoption\fR as an option to the linker. If \fIoption\fR contains
10017commas, it is split into multiple options at the commas. You can use this
10018syntax to pass an argument to the option.
10019For example, \fB\-Wl,\-Map,output.map\fR passes \fB\-Map output.map\fR to the
10020linker. 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"
10024Pretend the symbol \fIsymbol\fR is undefined, to force linking of
10025library modules to define it. You can use \fB\-u\fR multiple times with
10026different symbols to force loading of additional library modules.
10027.SS "Options for Directory Search"
10028.IX Subsection "Options for Directory Search"
10029These options specify directories to search for header files, for
10030libraries and for parts of the compiler:
10031.IP "\fB\-I\fR\fIdir\fR" 4
10032.IX Item "-Idir"
10033Add the directory \fIdir\fR to the head of the list of directories to be
10034searched for header files. This can be used to override a system header
10035file, substituting your own version, since these directories are
10036searched before the system header file directories. However, you should
10037not use this option to add directories that contain vendor-supplied
10038system header files (use \fB\-isystem\fR for that). If you use more than
10039one \fB\-I\fR option, the directories are scanned in left-to-right
10040order; the standard system directories come after.
10041.Sp
10042If 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
10044option is ignored. The directory is still searched but as a
10045system directory at its normal position in the system include chain.
10046This is to ensure that \s-1GCC\s0's procedure to fix buggy system headers and
10047the ordering for the \f(CW\*(C`include_next\*(C'\fR directive are not inadvertently changed.
10048If you really need to change the search order for system directories,
10049use the \fB\-nostdinc\fR and/or \fB\-isystem\fR options.
10050.IP "\fB\-iplugindir=\fR\fIdir\fR" 4
10051.IX Item "-iplugindir=dir"
10052Set the directory to search for plugins that are passed
10053by \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
10055to be used by the user, but only passed by the driver.
10056.IP "\fB\-iquote\fR\fIdir\fR" 4
10057.IX Item "-iquotedir"
10058Add the directory \fIdir\fR to the head of the list of directories to
10059be 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,
10061otherwise just like \fB\-I\fR.
10062.IP "\fB\-L\fR\fIdir\fR" 4
10063.IX Item "-Ldir"
10064Add directory \fIdir\fR to the list of directories to be searched
10065for \fB\-l\fR.
10066.IP "\fB\-B\fR\fIprefix\fR" 4
10067.IX Item "-Bprefix"
10068This option specifies where to find the executables, libraries,
10069include files, and data files of the compiler itself.
10070.Sp
10071The 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
10074without \fImachine\fR\fB/\fR\fIversion\fR\fB/\fR.
10075.Sp
10076For 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
10078is not specified, the driver tries two standard prefixes,
10079\&\fI/usr/lib/gcc/\fR and \fI/usr/local/lib/gcc/\fR. If neither of
10080those results in a file name that is found, the unmodified program
10081name is searched for using the directories specified in your
10082\&\fB\s-1PATH\s0\fR environment variable.
10083.Sp
10084The compiler checks to see if the path provided by the \fB\-B\fR
10085refers to a directory, and if necessary it adds a directory
10086separator character at the end of the path.
10087.Sp
10088\&\fB\-B\fR prefixes that effectively specify directory names also apply
10089to libraries in the linker, because the compiler translates these
10090options into \fB\-L\fR options for the linker. They also apply to
10091includes files in the preprocessor, because the compiler translates these
10092options into \fB\-isystem\fR options for the preprocessor. In this case,
10093the compiler appends \fBinclude\fR to the prefix.
10094.Sp
10095The runtime support file \fIlibgcc.a\fR can also be searched for using
10096the \fB\-B\fR prefix, if needed. If it is not found there, the two
10097standard prefixes above are tried, and that is all. The file is left
10098out of the link if it is not found by those means.
10099.Sp
10100Another way to specify a prefix much like the \fB\-B\fR prefix is to use
10101the environment variable \fB\s-1GCC_EXEC_PREFIX\s0\fR.
10102.Sp
10103As 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
101059, then it is replaced by \fI[dir/]include\fR. This is to help
10106with boot-strapping the compiler.
10107.IP "\fB\-specs=\fR\fIfile\fR" 4
10108.IX Item "-specs=file"
10109Process \fIfile\fR after the compiler reads in the standard \fIspecs\fR
10110file, in order to override the defaults which the \fBgcc\fR driver
10111program 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
10114are processed in order, from left to right.
10115.IP "\fB\-\-sysroot=\fR\fIdir\fR" 4
10116.IX Item "--sysroot=dir"
10117Use \fIdir\fR as the logical root directory for headers and libraries.
10118For example, if the compiler normally searches for headers in
10119\&\fI/usr/include\fR and libraries in \fI/usr/lib\fR, it instead
10120searches \fI\fIdir\fI/usr/include\fR and \fI\fIdir\fI/usr/lib\fR.
10121.Sp
10122If you use both this option and the \fB\-isysroot\fR option, then
10123the \fB\-\-sysroot\fR option applies to libraries, but the
10124\&\fB\-isysroot\fR option applies to header files.
10125.Sp
10126The \s-1GNU\s0 linker (beginning with version 2.16) has the necessary support
10127for this option. If your linker does not support this option, the
10128header file aspect of \fB\-\-sysroot\fR still works, but the
10129library aspect does not.
10130.IP "\fB\-\-no\-sysroot\-suffix\fR" 4
10131.IX Item "--no-sysroot-suffix"
10132For some targets, a suffix is added to the root directory specified
10133with \fB\-\-sysroot\fR, depending on the other options used, so that
10134headers 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
10137such a suffix.
10138.IP "\fB\-I\-\fR" 4
10139.IX Item "-I-"
10140This 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.
10142Any directories you specify with \fB\-I\fR options before the \fB\-I\-\fR
10143option are searched only for the case of \fB#include "\fR\fIfile\fR\fB"\fR;
10144they are not searched for \fB#include <\fR\fIfile\fR\fB>\fR.
10145.Sp
10146If additional directories are specified with \fB\-I\fR options after
10147the \fB\-I\-\fR, these directories are searched for all \fB#include\fR
10148directives. (Ordinarily \fIall\fR \fB\-I\fR directories are used
10149this way.)
10150.Sp
10151In addition, the \fB\-I\-\fR option inhibits the use of the current
10152directory (where the current input file came from) as the first search
10153directory for \fB#include "\fR\fIfile\fR\fB"\fR. There is no way to
10154override this effect of \fB\-I\-\fR. With \fB\-I.\fR you can specify
10155searching the directory that is current when the compiler is
10156invoked. That is not exactly the same as what the preprocessor does
10157by default, but it is often satisfactory.
10158.Sp
10159\&\fB\-I\-\fR does not inhibit the use of the standard system directories
10160for header files. Thus, \fB\-I\-\fR and \fB\-nostdinc\fR are
10161independent.
10162.SS "Specifying Target Machine and Compiler Version"
10163.IX Subsection "Specifying Target Machine and Compiler Version"
10164The 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
10167one that was installed last.
10168.SS "Hardware Models and Configurations"
10169.IX Subsection "Hardware Models and Configurations"
10170Each target machine types can have its own
10171special options, starting with \fB\-m\fR, to choose among various
10172hardware models or configurations\-\-\-for example, 68010 vs 68020,
10173floating coprocessor or none. A single installed version of the
10174compiler can compile for any model or configuration, according to the
10175options specified.
10176.PP
10177Some configurations of the compiler also support additional special
10178options, usually for compatibility with other compilers on the same
10179platform.
10180.PP
10181\fIAArch64 Options\fR
10182.IX Subsection "AArch64 Options"
10183.PP
10184These options are defined for AArch64 implementations:
10185.IP "\fB\-mbig\-endian\fR" 4
10186.IX Item "-mbig-endian"
10187Generate 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"
10191Generate code which uses only the general registers.
10192.IP "\fB\-mlittle\-endian\fR" 4
10193.IX Item "-mlittle-endian"
10194Generate 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"
10198Generate code for the tiny code model. The program and its statically defined
10199symbols must be within 1GB of each other. Pointers are 64 bits. Programs can
10200be statically or dynamically linked. This model is not fully implemented and
10201mostly treated as \fBsmall\fR.
10202.IP "\fB\-mcmodel=small\fR" 4
10203.IX Item "-mcmodel=small"
10204Generate code for the small code model. The program and its statically defined
10205symbols must be within 4GB of each other. Pointers are 64 bits. Programs can
10206be statically or dynamically linked. This is the default code model.
10207.IP "\fB\-mcmodel=large\fR" 4
10208.IX Item "-mcmodel=large"
10209Generate code for the large code model. This makes no assumptions about
10210addresses and sizes of sections. Pointers are 64 bits. Programs can be
10211statically linked only.
10212.IP "\fB\-mstrict\-align\fR" 4
10213.IX Item "-mstrict-align"
10214Do 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
10221Omit or keep the frame pointer in leaf functions. The former behaviour is the
10222default.
10223.IP "\fB\-mtls\-dialect=desc\fR" 4
10224.IX Item "-mtls-dialect=desc"
10225Use \s-1TLS\s0 descriptors as the thread-local storage mechanism for dynamic accesses
10226of \s-1TLS\s0 variables. This is the default.
10227.IP "\fB\-mtls\-dialect=traditional\fR" 4
10228.IX Item "-mtls-dialect=traditional"
10229Use traditional \s-1TLS\s0 as the thread-local storage mechanism for dynamic accesses
10230of \s-1TLS\s0 variables.
10231.IP "\fB\-march=\fR\fIname\fR" 4
10232.IX Item "-march=name"
10233Specify the name of the target architecture, optionally suffixed by one or
10234more feature modifiers. This option has the form
10235\&\fB\-march=\fR\fIarch\fR{\fB+\fR[\fBno\fR]\fIfeature\fR}*, where the
10236only value for \fIarch\fR is \fBarmv8\-a\fR. The possible values for
10237\&\fIfeature\fR are documented in the sub-section below.
10238.Sp
10239Where conflicting feature modifiers are specified, the right-most feature is
10240used.
10241.Sp
10242\&\s-1GCC\s0 uses this name to determine what kind of instructions it can emit when
10243generating assembly code. This option can be used in conjunction with or
10244instead of the \fB\-mcpu=\fR option.
10245.IP "\fB\-mcpu=\fR\fIname\fR" 4
10246.IX Item "-mcpu=name"
10247Specify the name of the target processor, optionally suffixed by one or more
10248feature modifiers. This option has the form
10249\&\fB\-mcpu=\fR\fIcpu\fR{\fB+\fR[\fBno\fR]\fIfeature\fR}*, where the
10250possible values for \fIcpu\fR are \fBgeneric\fR, \fBlarge\fR. The
10251possible values for \fIfeature\fR are documented in the sub-section
10252below.
10253.Sp
10254Where conflicting feature modifiers are specified, the right-most feature is
10255used.
10256.Sp
10257\&\s-1GCC\s0 uses this name to determine what kind of instructions it can emit when
10258generating assembly code.
10259.IP "\fB\-mtune=\fR\fIname\fR" 4
10260.IX Item "-mtune=name"
10261Specify the name of the processor to tune the performance for. The code will
10262be tuned as if the target processor were of the type specified in this option,
10263but still using instructions compatible with the target processor specified
10264by a \fB\-mcpu=\fR option. This option cannot be suffixed by feature
10265modifiers.
10266.PP
10267\fB\-march\fR and \fB\-mcpu\fR feature modifiers
10268.IX Subsection "-march and -mcpu feature modifiers"
10269.PP
10270Feature modifiers used with \fB\-march\fR and \fB\-mcpu\fR can be one
10271the following:
10272.IP "\fBcrypto\fR" 4
10273.IX Item "crypto"
10274Enable Crypto extension. This implies Advanced \s-1SIMD\s0 is enabled.
10275.IP "\fBfp\fR" 4
10276.IX Item "fp"
10277Enable floating-point instructions.
10278.IP "\fBsimd\fR" 4
10279.IX Item "simd"
10280Enable Advanced \s-1SIMD\s0 instructions. This implies floating-point instructions
10281are 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
10287These \fB\-m\fR options are defined for Adapteva Epiphany:
10288.IP "\fB\-mhalf\-reg\-file\fR" 4
10289.IX Item "-mhalf-reg-file"
10290Don't allocate any register in the range \f(CW\*(C`r32\*(C'\fR...\f(CW\*(C`r63\*(C'\fR.
10291That 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"
10294Preferrentially allocate registers that allow short instruction generation.
10295This can result in increased instruction count, so this may either reduce or
10296increase overall code size.
10297.IP "\fB\-mbranch\-cost=\fR\fInum\fR" 4
10298.IX Item "-mbranch-cost=num"
10299Set the cost of branches to roughly \fInum\fR \*(L"simple\*(R" instructions.
10300This cost is only a heuristic and is not guaranteed to produce
10301consistent results across releases.
10302.IP "\fB\-mcmove\fR" 4
10303.IX Item "-mcmove"
10304Enable the generation of conditional moves.
10305.IP "\fB\-mnops=\fR\fInum\fR" 4
10306.IX Item "-mnops=num"
10307Emit \fInum\fR NOPs before every other generated instruction.
10308.IP "\fB\-mno\-soft\-cmpsf\fR" 4
10309.IX Item "-mno-soft-cmpsf"
10310For single-precision floating-point comparisons, emit an \f(CW\*(C`fsub\*(C'\fR instruction
10311and test the flags. This is faster than a software comparison, but can
10312get incorrect results in the presence of NaNs, or when two different small
10313numbers are compared such that their difference is calculated as zero.
10314The default is \fB\-msoft\-cmpsf\fR, which uses slower, but IEEE-compliant,
10315software comparisons.
10316.IP "\fB\-mstack\-offset=\fR\fInum\fR" 4
10317.IX Item "-mstack-offset=num"
10318Set the offset between the top of the stack and the stack pointer.
10319E.g., a value of 8 means that the eight bytes in the range \f(CW\*(C`sp+0...sp+7\*(C'\fR
10320can be used by leaf functions without stack allocation.
10321Values other than \fB8\fR or \fB16\fR are untested and unlikely to work.
10322Note also that this option changes the \s-1ABI\s0; compiling a program with a
10323different stack offset than the libraries have been compiled with
10324generally does not work.
10325This option can be useful if you want to evaluate if a different stack
10326offset would give you better code, but to actually use a different stack
10327offset to build working programs, it is recommended to configure the
10328toolchain 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"
10331Make the scheduler assume that the rounding mode has been set to
10332truncating. The default is \fB\-mround\-nearest\fR.
10333.IP "\fB\-mlong\-calls\fR" 4
10334.IX Item "-mlong-calls"
10335If not otherwise specified by an attribute, assume all calls might be beyond
10336the offset range of the \f(CW\*(C`b\*(C'\fR / \f(CW\*(C`bl\*(C'\fR instructions, and therefore load the
10337function address into a register before performing a (otherwise direct) call.
10338This is the default.
10339.IP "\fB\-mshort\-calls\fR" 4
10340.IX Item "-mshort-calls"
10341If not otherwise specified by an attribute, assume all direct calls are
10342in the range of the \f(CW\*(C`b\*(C'\fR / \f(CW\*(C`bl\*(C'\fR instructions, so use these instructions
10343for direct calls. The default is \fB\-mlong\-calls\fR.
10344.IP "\fB\-msmall16\fR" 4
10345.IX Item "-msmall16"
10346Assume addresses can be loaded as 16\-bit unsigned values. This does not
10347apply to function addresses for which \fB\-mlong\-calls\fR semantics
10348are in effect.
10349.IP "\fB\-mfp\-mode=\fR\fImode\fR" 4
10350.IX Item "-mfp-mode=mode"
10351Set the prevailing mode of the floating-point unit.
10352This determines the floating-point mode that is provided and expected
10353at function call and return time. Making this mode match the mode you
10354predominantly need at function start can make your programs smaller and
10355faster 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"
10361Any mode at function entry is valid, and retained or restored when
10362the function returns, and when it calls other functions.
10363This mode is useful for compiling libraries or other compilation units
10364you might want to incorporate into different programs with different
10365prevailing \s-1FPU\s0 modes, and the convenience of being able to use a single
10366object file outweighs the size and speed overhead for any extra
10367mode switching that might be needed, compared with what would be needed
10368with a more specific choice of prevailing \s-1FPU\s0 mode.
10369.IP "\fBtruncate\fR" 4
10370.IX Item "truncate"
10371This is the mode used for floating-point calculations with
10372truncating (i.e. round towards zero) rounding mode. That includes
10373conversion from floating point to integer.
10374.IP "\fBround-nearest\fR" 4
10375.IX Item "round-nearest"
10376This is the mode used for floating-point calculations with
10377round-to-nearest-or-even rounding mode.
10378.IP "\fBint\fR" 4
10379.IX Item "int"
10380This is the mode used to perform integer calculations in the \s-1FPU\s0, e.g.
10381integer multiply, or integer multiply-and-accumulate.
10382.RE
10383.RS 4
10384.Sp
10385The 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
10395Code generation tweaks that disable, respectively, splitting of 32\-bit
10396loads, generation of post-increment addresses, and generation of
10397post-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"
10401Change 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"
10405The maximum alignment for \s-1SIMD\s0 vector mode types.
10406\&\fInum\fR may be 4 or 8. The default is 8.
10407Note that this is an \s-1ABI\s0 change, even though many library function
10408interfaces are unaffected if they don't use \s-1SIMD\s0 vector modes
10409in places that affect size and/or alignment of relevant types.
10410.IP "\fB\-msplit\-vecmove\-early\fR" 4
10411.IX Item "-msplit-vecmove-early"
10412Split vector moves into single word moves before reload. In theory this
10413can give better register allocation, but so far the reverse seems to be
10414generally the case.
10415.IP "\fB\-m1reg\-\fR\fIreg\fR" 4
10416.IX Item "-m1reg-reg"
10417Specify a register to hold the constant \-1, which makes loading small negative
10418constants and certain bitmasks faster.
10419Allowable values for \fIreg\fR are \fBr43\fR and \fBr63\fR,
10420which specify use of that register as a fixed register,
10421and \fBnone\fR, which means that no register is used for this
10422purpose. The default is \fB\-m1reg\-none\fR.
10423.PP
10424\fI\s-1ARM\s0 Options\fR
10425.IX Subsection "ARM Options"
10426.PP
10427These \fB\-m\fR options are defined for Advanced \s-1RISC\s0 Machines (\s-1ARM\s0)
10428architectures:
10429.IP "\fB\-mabi=\fR\fIname\fR" 4
10430.IX Item "-mabi=name"
10431Generate 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"
10435Generate a stack frame that is compliant with the \s-1ARM\s0 Procedure Call
10436Standard for all functions, even if this is not strictly necessary for
10437correct execution of the code. Specifying \fB\-fomit\-frame\-pointer\fR
10438with this option causes the stack frames not to be generated for
10439leaf functions. The default is \fB\-mno\-apcs\-frame\fR.
10440.IP "\fB\-mapcs\fR" 4
10441.IX Item "-mapcs"
10442This is a synonym for \fB\-mapcs\-frame\fR.
10443.IP "\fB\-mthumb\-interwork\fR" 4
10444.IX Item "-mthumb-interwork"
10445Generate code that supports calling between the \s-1ARM\s0 and Thumb
10446instruction sets. Without this option, on pre\-v5 architectures, the
10447two instruction sets cannot be reliably used inside one program. The
10448default is \fB\-mno\-thumb\-interwork\fR, since slightly larger code
10449is generated when \fB\-mthumb\-interwork\fR is specified. In \s-1AAPCS\s0
10450configurations this option is meaningless.
10451.IP "\fB\-mno\-sched\-prolog\fR" 4
10452.IX Item "-mno-sched-prolog"
10453Prevent the reordering of instructions in the function prologue, or the
10454merging of those instruction with the instructions in the function's
10455body. This means that all functions start with a recognizable set
10456of instructions (or in fact one of a choice from a small set of
10457different function prologues), and this information can be used to
10458locate the start of functions inside an executable piece of code. The
10459default is \fB\-msched\-prolog\fR.
10460.IP "\fB\-mfloat\-abi=\fR\fIname\fR" 4
10461.IX Item "-mfloat-abi=name"
10462Specifies which floating-point \s-1ABI\s0 to use. Permissible values
10463are: \fBsoft\fR, \fBsoftfp\fR and \fBhard\fR.
10464.Sp
10465Specifying \fBsoft\fR causes \s-1GCC\s0 to generate output containing
10466library calls for floating-point operations.
10467\&\fBsoftfp\fR allows the generation of code using hardware floating-point
10468instructions, but still uses the soft-float calling conventions.
10469\&\fBhard\fR allows generation of floating-point instructions
10470and uses FPU-specific calling conventions.
10471.Sp
10472The default depends on the specific target configuration. Note that
10473the hard-float and soft-float ABIs are not link-compatible; you must
10474compile your entire program with the same \s-1ABI\s0, and link with a
10475compatible set of libraries.
10476.IP "\fB\-mlittle\-endian\fR" 4
10477.IX Item "-mlittle-endian"
10478Generate code for a processor running in little-endian mode. This is
10479the default for all standard configurations.
10480.IP "\fB\-mbig\-endian\fR" 4
10481.IX Item "-mbig-endian"
10482Generate code for a processor running in big-endian mode; the default is
10483to compile code for a little-endian processor.
10484.IP "\fB\-mwords\-little\-endian\fR" 4
10485.IX Item "-mwords-little-endian"
10486This option only applies when generating code for big-endian processors.
10487Generate code for a little-endian word order but a big-endian byte
10488order. That is, a byte order of the form \fB32107654\fR. Note: this
10489option should only be used if you require compatibility with code for
10490big-endian \s-1ARM\s0 processors generated by versions of the compiler prior to
104912.8. This option is now deprecated.
10492.IP "\fB\-mcpu=\fR\fIname\fR" 4
10493.IX Item "-mcpu=name"
10494This specifies the name of the target \s-1ARM\s0 processor. \s-1GCC\s0 uses this name
10495to determine what kind of instructions it can emit when generating
10496assembly 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
10525equivalent to \fB\-march=\fR\fIarch\fR \fB\-mtune=generic\-\fR\fIarch\fR.
10526See \fB\-mtune\fR for more information.
10527.Sp
10528\&\fB\-mcpu=native\fR causes the compiler to auto-detect the \s-1CPU\s0
10529of the build computer. At present, this feature is only supported on
10530Linux, and not all architectures are recognized. If the auto-detect is
10531unsuccessful the option has no effect.
10532.IP "\fB\-mtune=\fR\fIname\fR" 4
10533.IX Item "-mtune=name"
10534This option is very similar to the \fB\-mcpu=\fR option, except that
10535instead of specifying the actual target processor type, and hence
10536restricting which instructions can be used, it specifies that \s-1GCC\s0 should
10537tune the performance of the code as if the target were of the type
10538specified in this option, but still choosing the instructions it
10539generates based on the \s-1CPU\s0 specified by a \fB\-mcpu=\fR option.
10540For some \s-1ARM\s0 implementations better performance can be obtained by using
10541this option.
10542.Sp
10543\&\fB\-mtune=generic\-\fR\fIarch\fR specifies that \s-1GCC\s0 should tune the
10544performance for a blend of processors within architecture \fIarch\fR.
10545The aim is to generate code that run well on the current most popular
10546processors, balancing between optimizations that benefit some CPUs in the
10547range, and avoiding performance pitfalls of other CPUs. The effects of
10548this 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
10551of the build computer. At present, this feature is only supported on
10552Linux, and not all architectures are recognized. If the auto-detect is
10553unsuccessful the option has no effect.
10554.IP "\fB\-march=\fR\fIname\fR" 4
10555.IX Item "-march=name"
10556This specifies the name of the target \s-1ARM\s0 architecture. \s-1GCC\s0 uses this
10557name to determine what kind of instructions it can emit when generating
10558assembly code. This option can be used in conjunction with or instead
10559of 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
10569of the build computer. At present, this feature is only supported on
10570Linux, and not all architectures are recognized. If the auto-detect is
10571unsuccessful the option has no effect.
10572.IP "\fB\-mfpu=\fR\fIname\fR" 4
10573.IX Item "-mfpu=name"
10574This specifies what floating-point hardware (or hardware emulation) is
10575available 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
10581If \fB\-msoft\-float\fR is specified this specifies the format of
10582floating-point values.
10583.Sp
10584If the selected floating-point hardware includes the \s-1NEON\s0 extension
10585(e.g. \fB\-mfpu\fR=\fBneon\fR), note that floating-point
10586operations are not generated by \s-1GCC\s0's auto-vectorization pass unless
10587\&\fB\-funsafe\-math\-optimizations\fR is also specified. This is
10588because \s-1NEON\s0 hardware does not fully implement the \s-1IEEE\s0 754 standard for
10589floating-point arithmetic (in particular denormal values are treated as
10590zero), 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"
10593Specify the format of the \f(CW\*(C`_\|_fp16\*(C'\fR half-precision floating-point type.
10594Permissible names are \fBnone\fR, \fBieee\fR, and \fBalternative\fR;
10595the default is \fBnone\fR, in which case the \f(CW\*(C`_\|_fp16\*(C'\fR type is not
10596defined.
10597.IP "\fB\-mstructure\-size\-boundary=\fR\fIn\fR" 4
10598.IX Item "-mstructure-size-boundary=n"
10599The sizes of all structures and unions are rounded up to a multiple
10600of the number of bits set by this option. Permissible values are 8, 32
10601and 64. The default value varies for different toolchains. For the \s-1COFF\s0
10602targeted toolchain the default value is 8. A value of 64 is only allowed
10603if the underlying \s-1ABI\s0 supports it.
10604.Sp
10605Specifying a larger number can produce faster, more efficient code, but
10606can also increase the size of the program. Different values are potentially
10607incompatible. Code compiled with one value cannot necessarily expect to
10608work with code or libraries compiled with another value, if they exchange
10609information using structures or unions.
10610.IP "\fB\-mabort\-on\-noreturn\fR" 4
10611.IX Item "-mabort-on-noreturn"
10612Generate 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
10614return.
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
10621Tells the compiler to perform function calls by first loading the
10622address of the function into a register and then performing a subroutine
10623call on this register. This switch is needed if the target function
10624lies outside of the 64\-megabyte addressing range of the offset-based
10625version of subroutine call instruction.
10626.Sp
10627Even if this switch is enabled, not all function calls are turned
10628into long calls. The heuristic is that static functions, functions
10629that have the \fBshort-call\fR attribute, functions that are inside
10630the scope of a \fB#pragma no_long_calls\fR directive, and functions whose
10631definitions have already been compiled within the current compilation
10632unit are not turned into long calls. The exceptions to this rule are
10633that weak function definitions, functions with the \fBlong-call\fR
10634attribute or the \fBsection\fR attribute, and functions that are within
10635the scope of a \fB#pragma long_calls\fR directive are always
10636turned into long calls.
10637.Sp
10638This feature is not enabled by default. Specifying
10639\&\fB\-mno\-long\-calls\fR restores the default behavior, as does
10640placing the function calls within the scope of a \fB#pragma
10641long_calls_off\fR directive. Note these switches have no effect on how
10642the compiler generates code to handle function calls via function
10643pointers.
10644.IP "\fB\-msingle\-pic\-base\fR" 4
10645.IX Item "-msingle-pic-base"
10646Treat the register used for \s-1PIC\s0 addressing as read-only, rather than
10647loading it in the prologue for each function. The runtime system is
10648responsible for initializing this register with an appropriate value
10649before execution begins.
10650.IP "\fB\-mpic\-register=\fR\fIreg\fR" 4
10651.IX Item "-mpic-register=reg"
10652Specify the register to be used for \s-1PIC\s0 addressing. The default is R10
10653unless stack-checking is enabled, when R9 is used.
10654.IP "\fB\-mpoke\-function\-name\fR" 4
10655.IX Item "-mpoke-function-name"
10656Write the name of each function into the text section, directly
10657preceding 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
10671When 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
10673location \f(CW\*(C`pc \- 12\*(C'\fR and the top 8 bits are set, then we know that
10674there is a function name embedded immediately preceding this location
10675and 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
10682Select between generating code that executes in \s-1ARM\s0 and Thumb
10683states. The default for most configurations is to generate code
10684that executes in \s-1ARM\s0 state, but the default can be changed by
10685configuring \s-1GCC\s0 with the \fB\-\-with\-mode=\fR\fIstate\fR
10686configure option.
10687.IP "\fB\-mtpcs\-frame\fR" 4
10688.IX Item "-mtpcs-frame"
10689Generate a stack frame that is compliant with the Thumb Procedure Call
10690Standard for all non-leaf functions. (A leaf function is one that does
10691not 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"
10694Generate a stack frame that is compliant with the Thumb Procedure Call
10695Standard for all leaf functions. (A leaf function is one that does
10696not 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"
10699Gives all externally visible functions in the file being compiled an \s-1ARM\s0
10700instruction set header which switches to Thumb mode before executing the
10701rest of the function. This allows these functions to be called from
10702non-interworking code. This option is not valid in \s-1AAPCS\s0 configurations
10703because interworking is enabled by default.
10704.IP "\fB\-mcaller\-super\-interworking\fR" 4
10705.IX Item "-mcaller-super-interworking"
10706Allows calls via function pointers (including virtual functions) to
10707execute correctly regardless of whether the target code has been
10708compiled for interworking or not. There is a small overhead in the cost
10709of executing a function pointer if this option is enabled. This option
10710is not valid in \s-1AAPCS\s0 configurations because interworking is enabled
10711by default.
10712.IP "\fB\-mtp=\fR\fIname\fR" 4
10713.IX Item "-mtp=name"
10714Specify the access model for the thread local storage pointer. The valid
10715models 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
10718best 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"
10722Specify 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
10725local and global dynamic \s-1TLS\s0 models. The \fBgnu2\fR dialect
10726selects the \s-1GNU\s0 descriptor scheme, which provides better performance
10727for shared libraries. The \s-1GNU\s0 descriptor scheme is compatible with
10728the original scheme, but does require new assembler, linker and
10729library support. Initial and local exec \s-1TLS\s0 models are unaffected by
10730this option and always use the original scheme.
10731.IP "\fB\-mword\-relocations\fR" 4
10732.IX Item "-mword-relocations"
10733Only generate absolute relocations on word-sized values (i.e. R_ARM_ABS32).
10734This is enabled by default on targets (uClinux, SymbianOS) where the runtime
10735loader imposes this restriction, and when \fB\-fpic\fR or \fB\-fPIC\fR
10736is specified.
10737.IP "\fB\-mfix\-cortex\-m3\-ldrd\fR" 4
10738.IX Item "-mfix-cortex-m3-ldrd"
10739Some Cortex\-M3 cores can cause data corruption when \f(CW\*(C`ldrd\*(C'\fR instructions
10740with overlapping destination and base registers are used. This option avoids
10741generating 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
10749Enables (or disables) reading and writing of 16\- and 32\- bit values
10750from addresses that are not 16\- or 32\- bit aligned. By default
10751unaligned access is disabled for all pre\-ARMv6 and all ARMv6\-M
10752architectures, and enabled for all other architectures. If unaligned
10753access is not enabled then words in packed data structures will be
10754accessed a byte at a time.
10755.Sp
10756The \s-1ARM\s0 attribute \f(CW\*(C`Tag_CPU_unaligned_access\*(C'\fR will be set in the
10757generated object file to either true or false, depending upon the
10758setting of this option. If unaligned access is enabled then the
10759preprocessor symbol \f(CW\*(C`_\|_ARM_FEATURE_UNALIGNED\*(C'\fR will also be
10760defined.
10761.PP
10762\fI\s-1AVR\s0 Options\fR
10763.IX Subsection "AVR Options"
10764.PP
10765These options are defined for \s-1AVR\s0 implementations:
10766.IP "\fB\-mmcu=\fR\fImcu\fR" 4
10767.IX Item "-mmcu=mcu"
10768Specify Atmel \s-1AVR\s0 instruction set architectures (\s-1ISA\s0) or \s-1MCU\s0 type.
10769.Sp
10770The 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"
10847This \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"
10854Accumulate outgoing function arguments and acquire/release the needed
10855stack space for outgoing function arguments once in function
10856prologue/epilogue. Without this option, outgoing arguments are pushed
10857before calling a function and popped afterwards.
10858.Sp
10859Popping the arguments after the function call can be expensive on
10860\&\s-1AVR\s0 so that accumulating the stack space might lead to smaller
10861executables because arguments need not to be removed from the
10862stack after such a function call.
10863.Sp
10864This option can lead to reduced code size for functions that perform
10865several calls to functions that get their arguments on the stack like
10866calls to printf-like functions.
10867.IP "\fB\-mbranch\-cost=\fR\fIcost\fR" 4
10868.IX Item "-mbranch-cost=cost"
10869Set the branch costs for conditional branch instructions to
10870\&\fIcost\fR. Reasonable values for \fIcost\fR are small, non-negative
10871integers. The default branch cost is 0.
10872.IP "\fB\-mcall\-prologues\fR" 4
10873.IX Item "-mcall-prologues"
10874Functions prologues/epilogues are expanded as calls to appropriate
10875subroutines. Code size is smaller.
10876.IP "\fB\-mint8\fR" 4
10877.IX Item "-mint8"
10878Assume \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,
10880and \f(CW\*(C`long long\*(C'\fR is 4 bytes. Please note that this option does not
10881conform to the C standards, but it results in smaller code
10882size.
10883.IP "\fB\-mno\-interrupts\fR" 4
10884.IX Item "-mno-interrupts"
10885Generated code is not compatible with hardware interrupts.
10886Code size is smaller.
10887.IP "\fB\-mrelax\fR" 4
10888.IX Item "-mrelax"
10889Try 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.
10891Setting \f(CW\*(C`\-mrelax\*(C'\fR just adds the \f(CW\*(C`\-\-relax\*(C'\fR option to the
10892linker command line when the linker is called.
10893.Sp
10894Jump relaxing is performed by the linker because jump offsets are not
10895known before code is located. Therefore, the assembler code generated by the
10896compiler is the same, but the instructions in the executable may
10897differ from instructions in the assembler code.
10898.Sp
10899Relaxing must be turned on if linker stubs are needed, see the
10900section on \f(CW\*(C`EIND\*(C'\fR and linker stubs below.
10901.IP "\fB\-msp8\fR" 4
10902.IX Item "-msp8"
10903Treat the stack pointer register as an 8\-bit register,
10904i.e. assume the high byte of the stack pointer is zero.
10905In general, you don't need to set this option by hand.
10906.Sp
10907This option is used internally by the compiler to select and
10908build multilibs for architectures \f(CW\*(C`avr2\*(C'\fR and \f(CW\*(C`avr25\*(C'\fR.
10909These architectures mix devices with and without \f(CW\*(C`SPH\*(C'\fR.
10910For any setting other than \f(CW\*(C`\-mmcu=avr2\*(C'\fR or \f(CW\*(C`\-mmcu=avr25\*(C'\fR
10911the compiler driver will add or remove this option from the compiler
10912proper's command line, because the compiler then knows if the device
10913or architecture has an 8\-bit stack pointer and thus no \f(CW\*(C`SPH\*(C'\fR
10914register or not.
10915.IP "\fB\-mstrict\-X\fR" 4
10916.IX Item "-mstrict-X"
10917Use address register \f(CW\*(C`X\*(C'\fR in a way proposed by the hardware. This means
10918that \f(CW\*(C`X\*(C'\fR is only used in indirect, post-increment or
10919pre-decrement addressing.
10920.Sp
10921Without this option, the \f(CW\*(C`X\*(C'\fR register may be used in the same way
10922as \f(CW\*(C`Y\*(C'\fR or \f(CW\*(C`Z\*(C'\fR which then is emulated by additional
10923instructions.
10924For example, loading a value with \f(CW\*(C`X+const\*(C'\fR addressing with a
10925small non-negative \f(CW\*(C`const < 64\*(C'\fR to a register \fIRn\fR is
10926performed 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"
10935Only change the lower 8@tie{}bits of the stack pointer.
10936.IP "\fB\-Waddr\-space\-convert\fR" 4
10937.IX Item "-Waddr-space-convert"
10938Warn about conversions between address spaces in the case where the
10939resulting 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
10944Pointers in the implementation are 16@tie{}bits wide.
10945The address of a function or label is represented as word address so
10946that indirect jumps and calls can target any code address in the
10947range of 64@tie{}Ki words.
10948.PP
10949In order to facilitate indirect jump on devices with more than 128@tie{}Ki
10950bytes 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
10952when \f(CW\*(C`EICALL\*(C'\fR or \f(CW\*(C`EIJMP\*(C'\fR instructions are used.
10953.PP
10954Indirect jumps and calls on these devices are handled as follows by
10955the compiler and are subject to some limitations:
10956.IP "\(bu" 4
10957The compiler never sets \f(CW\*(C`EIND\*(C'\fR.
10958.IP "\(bu" 4
10959The compiler uses \f(CW\*(C`EIND\*(C'\fR implicitely in \f(CW\*(C`EICALL\*(C'\fR/\f(CW\*(C`EIJMP\*(C'\fR
10960instructions or might read \f(CW\*(C`EIND\*(C'\fR directly in order to emulate an
10961indirect call/jump by means of a \f(CW\*(C`RET\*(C'\fR instruction.
10962.IP "\(bu" 4
10963The compiler assumes that \f(CW\*(C`EIND\*(C'\fR never changes during the startup
10964code or during the application. In particular, \f(CW\*(C`EIND\*(C'\fR is not
10965saved/restored in function or interrupt service routine
10966prologue/epilogue.
10967.IP "\(bu" 4
10968For indirect calls to functions and computed goto, the linker
10969generates \fIstubs\fR. Stubs are jump pads sometimes also called
10970\&\fItrampolines\fR. Thus, the indirect call/jump jumps to such a stub.
10971The stub contains a direct jump to the desired address.
10972.IP "\(bu" 4
10973Linker relaxation must be turned on so that the linker will generate
10974the 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.
10976There are corner cases where the linker is supposed to generate stubs
10977but aborts without relaxation and without a helpful error message.
10978.IP "\(bu" 4
10979The default linker script is arranged for code with \f(CW\*(C`EIND = 0\*(C'\fR.
10980If code is supposed to work for a setup with \f(CW\*(C`EIND != 0\*(C'\fR, a custom
10981linker script has to be used in order to place the sections whose
10982name start with \f(CW\*(C`.trampolines\*(C'\fR into the segment where \f(CW\*(C`EIND\*(C'\fR
10983points to.
10984.IP "\(bu" 4
10985The startup code from libgcc never sets \f(CW\*(C`EIND\*(C'\fR.
10986Notice that startup code is a blend of code from libgcc and AVR-LibC.
10987For the impact of AVR-LibC on \f(CW\*(C`EIND\*(C'\fR, see the
10988AVR-LibC\ user\ manual (\f(CW\*(C`http://nongnu.org/avr\-libc/user\-manual/\*(C'\fR).
10989.IP "\(bu" 4
10990It is legitimate for user-specific startup code to set up \f(CW\*(C`EIND\*(C'\fR
10991early, for example by means of initialization code located in
10992section \f(CW\*(C`.init3\*(C'\fR. Such code runs prior to general startup code
10993that initializes \s-1RAM\s0 and calls constructors, but after the bit
10994of startup code from AVR-LibC that sets \f(CW\*(C`EIND\*(C'\fR to the segment
10995where 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
11009The \f(CW\*(C`_\|_trampolines_start\*(C'\fR symbol is defined in the linker script.
11010.IP "\(bu" 4
11011Stubs are generated automatically by the linker if
11012the 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
11030The compiler emits such \f(CW\*(C`gs\*(C'\fR modifiers for code labels in the
11031following 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
11041command-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>"
11044tables 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
11056Jumping 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
11066Instead, a stub has to be set up, i.e. the function has to be called
11067through 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
11079and the application be linked with \f(CW\*(C`\-Wl,\-\-defsym,func_4=0x4\*(C'\fR.
11080Alternatively, \f(CW\*(C`func_4\*(C'\fR can be defined in the linker script.
11081.PP
11082Handling 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
11085Some \s-1AVR\s0 devices support memories larger than the 64@tie{}KiB range
11086that can be accessed with 16\-bit pointers. To access memory locations
11087outside this 64@tie{}KiB range, the contentent of a \f(CW\*(C`RAMP\*(C'\fR
11088register is used as high part of the address:
11089The \f(CW\*(C`X\*(C'\fR, \f(CW\*(C`Y\*(C'\fR, \f(CW\*(C`Z\*(C'\fR address register is concatenated
11090with the \f(CW\*(C`RAMPX\*(C'\fR, \f(CW\*(C`RAMPY\*(C'\fR, \f(CW\*(C`RAMPZ\*(C'\fR special function
11091register, respectively, to get a wide address. Similarly,
11092\&\f(CW\*(C`RAMPD\*(C'\fR is used together with direct addressing.
11093.IP "\(bu" 4
11094The startup code initializes the \f(CW\*(C`RAMP\*(C'\fR special function
11095registers with zero.
11096.IP "\(bu" 4
11097If a \fB\s-1AVR\s0 Named Address Spaces,named address space\fR other than
11098generic or \f(CW\*(C`_\|_flash\*(C'\fR is used, then \f(CW\*(C`RAMPZ\*(C'\fR is set
11099as needed before the operation.
11100.IP "\(bu" 4
11101If the device supports \s-1RAM\s0 larger than 64@tie{KiB} and the compiler
11102needs to change \f(CW\*(C`RAMPZ\*(C'\fR to accomplish an operation, \f(CW\*(C`RAMPZ\*(C'\fR
11103is reset to zero after the operation.
11104.IP "\(bu" 4
11105If the device comes with a specific \f(CW\*(C`RAMP\*(C'\fR register, the \s-1ISR\s0
11106prologue/epilogue saves/restores that \s-1SFR\s0 and initializes it with
11107zero 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.
11110If you use inline assembler to read from locations outside the
1111116\-bit address range and change one of the \f(CW\*(C`RAMP\*(C'\fR registers,
11112you 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
11118for the presence or absence of features. Almost any of the following
11119built-in macros are deduced from device capabilities and thus
11120triggered by the \f(CW\*(C`\-mmcu=\*(C'\fR command-line option.
11121.PP
11122For 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__"
11127Build-in macro that resolves to a decimal number that identifies the
11128architecture and depends on the \f(CW\*(C`\-mmcu=\f(CImcu\f(CW\*(C'\fR option.
11129Possible 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
11135for \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.
11139If \fImcu\fR specifies a device, this built-in macro is set
11140accordingly. For example, with \f(CW\*(C`\-mmcu=atmega8\*(C'\fR the macro will be
11141defined 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__"
11145Setting \f(CW\*(C`\-mmcu=\f(CIdevice\f(CW\*(C'\fR defines this built-in macro which reflects
11146the device's name. For example, \f(CW\*(C`\-mmcu=atmega8\*(C'\fR defines the
11147built-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
11150The built-in macros' names follow
11151the scheme \f(CW\*(C`_\|_AVR_\f(CIDevice\f(CW_\|_\*(C'\fR where \fIDevice\fR is
11152the 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
11156If \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__"
11161The 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__"
11165The 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__"
11169The device has the \f(CW\*(C`ELPM R\f(CIn\f(CW,Z\*(C'\fR and \f(CW\*(C`ELPM
11170R\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__"
11174The device has the \f(CW\*(C`MOVW\*(C'\fR instruction to perform 16\-bit
11175register-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__"
11179The 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__"
11184The 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__"
11188The device has the \f(CW\*(C`JMP\*(C'\fR and \f(CW\*(C`CALL\*(C'\fR instructions.
11189This is the case for devices with at least 16@tie{}KiB of program
11190memory.
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
11199The device has the \f(CW\*(C`EIJMP\*(C'\fR and \f(CW\*(C`EICALL\*(C'\fR instructions.
11200This is the case for devices with more than 128@tie{}KiB of program memory.
11201This 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__"
11206The program counter (\s-1PC\s0) is 2@tie{}bytes wide. This is the case for devices
11207with 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
11216The stack pointer (\s-1SP\s0) register is treated as 8\-bit respectively
1121716\-bit register by the compiler.
11218The 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
11227The device has the \s-1SPH\s0 (high part of stack pointer) special function
11228register or has an 8\-bit stack pointer, respectively.
11229The definition of these macros is affected by \f(CW\*(C`\-mmcu=\*(C'\fR and
11230in the cases of \f(CW\*(C`\-mmcu=avr2\*(C'\fR and \f(CW\*(C`\-mmcu=avr25\*(C'\fR also
11231by \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
11246The 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__"
11251This 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
11260Some \s-1AVR\s0 devices (\s-1AT90S8515\s0, ATmega103) must not skip 32\-bit
11261instructions 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.
11263The second macro is only defined if \f(CW\*(C`_\|_AVR_HAVE_JMP_CALL_\|_\*(C'\fR is also
11264set.
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"
11268Instructions that can address I/O special function registers directly
11269like \f(CW\*(C`IN\*(C'\fR, \f(CW\*(C`OUT\*(C'\fR, \f(CW\*(C`SBI\*(C'\fR, etc. may use a different
11270address as if addressed by an instruction to access \s-1RAM\s0 like \f(CW\*(C`LD\*(C'\fR
11271or \f(CW\*(C`STS\*(C'\fR. This offset depends on the device architecture and has
11272to be subtracted from the \s-1RAM\s0 address in order to get the
11273respective 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__"
11277The compiler is configured to be used together with AVR-Libc.
11278See 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]"
11284Specifies the name of the target Blackfin processor. Currently, \fIcpu\fR
11285can 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
11293The optional \fIsirevision\fR specifies the silicon revision of the target
11294Blackfin processor. Any workarounds available for the targeted silicon revision
11295are enabled. If \fIsirevision\fR is \fBnone\fR, no workarounds are enabled.
11296If \fIsirevision\fR is \fBany\fR, all workarounds for the targeted processor
11297are enabled. The \f(CW\*(C`_\|_SILICON_REVISION_\|_\*(C'\fR macro is defined to two
11298hexadecimal digits representing the major and minor numbers in the silicon
11299revision. If \fIsirevision\fR is \fBnone\fR, the \f(CW\*(C`_\|_SILICON_REVISION_\|_\*(C'\fR
11300is not defined. If \fIsirevision\fR is \fBany\fR, the
11301\&\f(CW\*(C`_\|_SILICON_REVISION_\|_\*(C'\fR is defined to be \f(CW0xffff\fR.
11302If this optional \fIsirevision\fR is not used, \s-1GCC\s0 assumes the latest known
11303silicon revision of the targeted Blackfin processor.
11304.Sp
11305\&\s-1GCC\s0 defines a preprocessor macro for the specified \fIcpu\fR.
11306For the \fBbfin-elf\fR toolchain, this option causes the hardware \s-1BSP\s0
11307provided by libgloss to be linked in if \fB\-msim\fR is not given.
11308.Sp
11309Without this option, \fBbf532\fR is used as the processor by default.
11310.Sp
11311Note that support for \fBbf561\fR is incomplete. For \fBbf561\fR,
11312only the preprocessor macro is defined.
11313.IP "\fB\-msim\fR" 4
11314.IX Item "-msim"
11315Specifies that the program will be run on the simulator. This causes
11316the simulator \s-1BSP\s0 provided by libgloss to be linked in. This option
11317has effect only for \fBbfin-elf\fR toolchain.
11318Certain 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"
11322Don't keep the frame pointer in a register for leaf functions. This
11323avoids the instructions to save, set up and restore frame pointers and
11324makes an extra register available in leaf functions. The option
11325\&\fB\-fomit\-frame\-pointer\fR removes the frame pointer for all functions,
11326which might make debugging harder.
11327.IP "\fB\-mspecld\-anomaly\fR" 4
11328.IX Item "-mspecld-anomaly"
11329When enabled, the compiler ensures that the generated code does not
11330contain 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"
11334Don't generate extra code to prevent speculative loads from occurring.
11335.IP "\fB\-mcsync\-anomaly\fR" 4
11336.IX Item "-mcsync-anomaly"
11337When enabled, the compiler ensures that the generated code does not
11338contain \s-1CSYNC\s0 or \s-1SSYNC\s0 instructions too soon after conditional branches.
11339If 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"
11342Don't generate extra code to prevent \s-1CSYNC\s0 or \s-1SSYNC\s0 instructions from
11343occurring too soon after a conditional branch.
11344.IP "\fB\-mlow\-64k\fR" 4
11345.IX Item "-mlow-64k"
11346When enabled, the compiler is free to take advantage of the knowledge that
11347the entire program fits into the low 64k of memory.
11348.IP "\fB\-mno\-low\-64k\fR" 4
11349.IX Item "-mno-low-64k"
11350Assume that the program is arbitrarily large. This is the default.
11351.IP "\fB\-mstack\-check\-l1\fR" 4
11352.IX Item "-mstack-check-l1"
11353Do stack checking using information placed into L1 scratchpad memory by the
11354uClinux kernel.
11355.IP "\fB\-mid\-shared\-library\fR" 4
11356.IX Item "-mid-shared-library"
11357Generate code that supports shared libraries via the library \s-1ID\s0 method.
11358This allows for execute in place and shared libraries in an environment
11359without virtual memory management. This option implies \fB\-fPIC\fR.
11360With 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"
11363Generate code that doesn't assume ID-based shared libraries are being used.
11364This is the default.
11365.IP "\fB\-mleaf\-id\-shared\-library\fR" 4
11366.IX Item "-mleaf-id-shared-library"
11367Generate code that supports shared libraries via the library \s-1ID\s0 method,
11368but 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
11370and calls.
11371.IP "\fB\-mno\-leaf\-id\-shared\-library\fR" 4
11372.IX Item "-mno-leaf-id-shared-library"
11373Do not assume that the code being compiled won't link against any \s-1ID\s0 shared
11374libraries. 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"
11377Specifies the identification number of the ID-based shared library being
11378compiled. Specifying a value of 0 generates more compact code; specifying
11379other values forces the allocation of that number to the current
11380library but is no more space\- or time-efficient than omitting this option.
11381.IP "\fB\-msep\-data\fR" 4
11382.IX Item "-msep-data"
11383Generate code that allows the data segment to be located in a different
11384area of memory from the text segment. This allows for execute in place in
11385an environment without virtual memory management by eliminating relocations
11386against the text section.
11387.IP "\fB\-mno\-sep\-data\fR" 4
11388.IX Item "-mno-sep-data"
11389Generate code that assumes that the data segment follows the text segment.
11390This 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
11397Tells the compiler to perform function calls by first loading the
11398address of the function into a register and then performing a subroutine
11399call on this register. This switch is needed if the target function
11400lies outside of the 24\-bit addressing range of the offset-based
11401version of subroutine call instruction.
11402.Sp
11403This feature is not enabled by default. Specifying
11404\&\fB\-mno\-long\-calls\fR restores the default behavior. Note these
11405switches have no effect on how the compiler generates code to handle
11406function calls via function pointers.
11407.IP "\fB\-mfast\-fp\fR" 4
11408.IX Item "-mfast-fp"
11409Link with the fast floating-point library. This library relaxes some of
11410the \s-1IEEE\s0 floating-point standard's rules for checking inputs against
11411Not-a-Number (\s-1NAN\s0), in the interest of performance.
11412.IP "\fB\-minline\-plt\fR" 4
11413.IX Item "-minline-plt"
11414Enable inlining of \s-1PLT\s0 entries in function calls to functions that are
11415not known to bind locally. It has no effect without \fB\-mfdpic\fR.
11416.IP "\fB\-mmulticore\fR" 4
11417.IX Item "-mmulticore"
11418Build a standalone application for multicore Blackfin processors.
11419This option causes proper start files and link scripts supporting
11420multicore to be used, and defines the macro \f(CW\*(C`_\|_BFIN_MULTICORE\*(C'\fR.
11421It can only be used with \fB\-mcpu=bf561\fR[\fB\-\fR\fIsirevision\fR].
11422.Sp
11423This option can be used with \fB\-mcorea\fR or \fB\-mcoreb\fR, which
11424selects the one-application-per-core programming model. Without
11425\&\fB\-mcorea\fR or \fB\-mcoreb\fR, the single\-application/dual\-core
11426programming model is used. In this model, the main function of Core B
11427should be named as \f(CW\*(C`coreb_main\*(C'\fR.
11428.Sp
11429If this option is not used, the single-core application programming
11430model is used.
11431.IP "\fB\-mcorea\fR" 4
11432.IX Item "-mcorea"
11433Build a standalone application for Core A of \s-1BF561\s0 when using
11434the one-application-per-core programming model. Proper start files
11435and link scripts are used to support Core A, and the macro
11436\&\f(CW\*(C`_\|_BFIN_COREA\*(C'\fR is defined.
11437This option can only be used in conjunction with \fB\-mmulticore\fR.
11438.IP "\fB\-mcoreb\fR" 4
11439.IX Item "-mcoreb"
11440Build a standalone application for Core B of \s-1BF561\s0 when using
11441the one-application-per-core programming model. Proper start files
11442and 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
11444should be used instead of \f(CW\*(C`main\*(C'\fR.
11445This option can only be used in conjunction with \fB\-mmulticore\fR.
11446.IP "\fB\-msdram\fR" 4
11447.IX Item "-msdram"
11448Build a standalone application for \s-1SDRAM\s0. Proper start files and
11449link scripts are used to put the application into \s-1SDRAM\s0, and the macro
11450\&\f(CW\*(C`_\|_BFIN_SDRAM\*(C'\fR is defined.
11451The loader should initialize \s-1SDRAM\s0 before loading the application.
11452.IP "\fB\-micplb\fR" 4
11453.IX Item "-micplb"
11454Assume that ICPLBs are enabled at run time. This has an effect on certain
11455anomaly workarounds. For Linux targets, the default is to assume ICPLBs
11456are 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"
11462This specifies the name of the target architecture. \s-1GCC\s0 uses this
11463name to determine what kind of instructions it can emit when generating
11464assembly 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"
11468Generate code for a big-endian target.
11469.IP "\fB\-mlittle\-endian\fR" 4
11470.IX Item "-mlittle-endian"
11471Generate code for a little-endian target. This is the default.
11472.IP "\fB\-msim\fR" 4
11473.IX Item "-msim"
11474Choose startup files and linker script suitable for the simulator.
11475.IP "\fB\-msdata=default\fR" 4
11476.IX Item "-msdata=default"
11477Put small global and static data in the \fB.neardata\fR section,
11478which is pointed to by register \f(CW\*(C`B14\*(C'\fR. Put small uninitialized
11479global and static data in the \fB.bss\fR section, which is adjacent
11480to the \fB.neardata\fR section. Put small read-only data into the
11481\&\fB.rodata\fR section. The corresponding sections used for large
11482pieces 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"
11485Put all data, not just small objects, into the sections reserved for
11486small data, and use addressing relative to the \f(CW\*(C`B14\*(C'\fR register to
11487access them.
11488.IP "\fB\-msdata=none\fR" 4
11489.IX Item "-msdata=none"
11490Make no use of the sections reserved for small data, and use absolute
11491addresses to access all data. Put all initialized global and static
11492data 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
11494section.
11495.PP
11496\fI\s-1CRIS\s0 Options\fR
11497.IX Subsection "CRIS Options"
11498.PP
11499These 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
11506Generate code for the specified architecture. The choices for
11507\&\fIarchitecture-type\fR are \fBv3\fR, \fBv8\fR and \fBv10\fR for
11508respectively \s-1ETRAX\s0\ 4, \s-1ETRAX\s0\ 100, and \s-1ETRAX\s0\ 100\ \s-1LX\s0.
11509Default 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"
11513Tune to \fIarchitecture-type\fR everything applicable about the generated
11514code, except for the \s-1ABI\s0 and the set of available instructions. The
11515choices 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"
11519Warn 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
11526The 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
11534Work around a bug in the \f(CW\*(C`muls\*(C'\fR and \f(CW\*(C`mulu\*(C'\fR instructions for \s-1CPU\s0
11535models where it applies. This option is active by default.
11536.IP "\fB\-mpdebug\fR" 4
11537.IX Item "-mpdebug"
11538Enable CRIS-specific verbose debug-related information in the assembly
11539code. This option also has the effect of turning off the \fB#NO_APP\fR
11540formatted-code indicator to the assembler at the beginning of the
11541assembly file.
11542.IP "\fB\-mcc\-init\fR" 4
11543.IX Item "-mcc-init"
11544Do not use condition-code results from previous instruction; always emit
11545compare and test instructions before use of condition codes.
11546.IP "\fB\-mno\-side\-effects\fR" 4
11547.IX Item "-mno-side-effects"
11548Do not emit instructions with side effects in addressing modes other than
11549post-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
11564These options (\fBno\-\fR options) arrange (eliminate arrangements) for the
11565stack frame, individual data and constants to be aligned for the maximum
11566single data access size for the chosen \s-1CPU\s0 model. The default is to
11567arrange for 32\-bit alignment. \s-1ABI\s0 details such as structure layout are
11568not 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
11577Similar to the stack\- data\- and const-align options above, these options
11578arrange for stack frame, writable data and constants to all be 32\-bit,
1157916\-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
11586With \fB\-mno\-prologue\-epilogue\fR, the normal function prologue and
11587epilogue which set up the stack frame are omitted and no return
11588instructions or return sequences are generated in the code. Use this
11589option only together with visual inspection of the compiled code: no
11590warnings or errors are generated when call-saved registers must be saved,
11591or 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
11598With \fB\-fpic\fR and \fB\-fPIC\fR, don't generate (do generate)
11599instruction sequences that load addresses for functions from the \s-1PLT\s0 part
11600of 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"
11604Legacy no-op option only recognized with the cris-axis-elf and
11605cris-axis-linux-gnu targets.
11606.IP "\fB\-mlinux\fR" 4
11607.IX Item "-mlinux"
11608Legacy no-op option only recognized with the cris-axis-linux-gnu target.
11609.IP "\fB\-sim\fR" 4
11610.IX Item "-sim"
11611This option, recognized for the cris-axis-elf, arranges
11612to link with input-output functions from a simulator library. Code,
11613initialized data and zero-initialized data are allocated consecutively.
11614.IP "\fB\-sim2\fR" 4
11615.IX Item "-sim2"
11616Like \fB\-sim\fR, but pass linker options to locate initialized data at
116170x40000000 and zero-initialized data at 0x80000000.
11618.PP
11619\fI\s-1CR16\s0 Options\fR
11620.IX Subsection "CR16 Options"
11621.PP
11622These options are defined specifically for the \s-1CR16\s0 ports.
11623.IP "\fB\-mmac\fR" 4
11624.IX Item "-mmac"
11625Enable 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
11632Generate code for \s-1CR16C\s0 or \s-1CR16C+\s0 architecture. \s-1CR16C+\s0 architecture
11633is default.
11634.IP "\fB\-msim\fR" 4
11635.IX Item "-msim"
11636Links the library libsim.a which is in compatible with simulator. Applicable
11637to \s-1ELF\s0 compiler only.
11638.IP "\fB\-mint32\fR" 4
11639.IX Item "-mint32"
11640Choose integer type as 32\-bit wide.
11641.IP "\fB\-mbit\-ops\fR" 4
11642.IX Item "-mbit-ops"
11643Generates \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"
11646Choose a data model. The choices for \fImodel\fR are \fBnear\fR,
11647\&\fBfar\fR or \fBmedium\fR. \fBmedium\fR is default.
11648However, \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
11654These options are defined for all architectures running the Darwin operating
11655system.
11656.PP
11657\&\s-1FSF\s0 \s-1GCC\s0 on Darwin does not create \*(L"fat\*(R" object files; it creates
11658an object file for the single architecture that \s-1GCC\s0 was built to
11659target. 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
11661linker multiple times and joining the results together with
11662\&\fIlipo\fR.
11663.PP
11664The 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
11666that \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
11669The Darwin tools vary in their behavior when presented with an \s-1ISA\s0
11670mismatch. The assembler, \fIas\fR, only permits instructions to
11671be used that are valid for the subtype of the file it is generating,
11672so you cannot put 64\-bit instructions in a \fBppc750\fR object file.
11673The linker for shared libraries, \fI/usr/bin/libtool\fR, fails
11674and prints an error if asked to create a shared library with a less
11675restrictive subtype than its input files (for instance, trying to put
11676a \fBppc970\fR object file in a \fBppc7400\fR library). The linker
11677for executables, \fBld\fR, quietly gives the executable the most
11678restrictive subtype of any of its input files.
11679.IP "\fB\-F\fR\fIdir\fR" 4
11680.IX Item "-Fdir"
11681Add the framework directory \fIdir\fR to the head of the list of
11682directories to be searched for header files. These directories are
11683interleaved with those specified by \fB\-I\fR options and are
11684scanned in a left-to-right order.
11685.Sp
11686A framework directory is a directory with frameworks in it. A
11687framework is a directory with a \fIHeaders\fR and/or
11688\&\fIPrivateHeaders\fR directory contained directly in it that ends
11689in \fI.framework\fR. The name of a framework is the name of this
11690directory excluding the \fI.framework\fR. Headers associated with
11691the framework are found in one of those two directories, with
11692\&\fIHeaders\fR being searched first. A subframework is a framework
11693directory that is in a framework's \fIFrameworks\fR directory.
11694Includes of subframework headers can only appear in a header of a
11695framework that contains the subframework, or in a sibling subframework
11696header. Two subframeworks are siblings if they occur in the same
11697framework. A subframework should not have the same name as a
11698framework; a warning is issued if this is violated. Currently a
11699subframework cannot have subframeworks; in the future, the mechanism
11700may be extended to support this. The standard frameworks can be found
11701in \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
11704the 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"
11708Like \fB\-F\fR except the directory is a treated as a system
11709directory. The main difference between this \fB\-iframework\fR and
11710\&\fB\-F\fR is that with \fB\-iframework\fR the compiler does not
11711warn 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"
11715Emit debugging information for symbols that are used. For stabs
11716debugging format, this enables \fB\-feliminate\-unused\-debug\-symbols\fR.
11717This is by default \s-1ON\s0.
11718.IP "\fB\-gfull\fR" 4
11719.IX Item "-gfull"
11720Emit debugging information for all symbols and types.
11721.IP "\fB\-mmacosx\-version\-min=\fR\fIversion\fR" 4
11722.IX Item "-mmacosx-version-min=version"
11723The earliest version of MacOS X that this executable will run on
11724is \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
11727If the compiler was built to use the system's headers by default,
11728then the default for this option is the system version on which the
11729compiler is running, otherwise the default is to make choices that
11730are compatible with as many systems and code bases as possible.
11731.IP "\fB\-mkernel\fR" 4
11732.IX Item "-mkernel"
11733Enable 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
11737applicable. 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"
11742Override the defaults for \fBbool\fR so that \fBsizeof(bool)==1\fR.
11743By default \fBsizeof(bool)\fR is \fB4\fR when compiling for
11744Darwin/PowerPC and \fB1\fR when compiling for Darwin/x86, so this
11745option has no effect on x86.
11746.Sp
11747\&\fBWarning:\fR The \fB\-mone\-byte\-bool\fR switch causes \s-1GCC\s0
11748to generate code that is not binary compatible with code generated
11749without that switch. Using this switch may require recompiling all
11750other modules in a program, including system libraries. Use this
11751switch 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
11760Generate code suitable for fast turnaround development, such as to
11761allow \s-1GDB\s0 to dynamically load \f(CW\*(C`.o\*(C'\fR files into already-running
11762programs. \fB\-findirect\-data\fR and \fB\-ffix\-and\-continue\fR
11763are provided for backwards compatibility.
11764.IP "\fB\-all_load\fR" 4
11765.IX Item "-all_load"
11766Loads all members of static archive libraries.
11767See man \fIld\fR\|(1) for more information.
11768.IP "\fB\-arch_errors_fatal\fR" 4
11769.IX Item "-arch_errors_fatal"
11770Cause the errors having to do with files that have the wrong architecture
11771to be fatal.
11772.IP "\fB\-bind_at_load\fR" 4
11773.IX Item "-bind_at_load"
11774Causes the output file to be marked such that the dynamic linker will
11775bind all undefined references when the file is loaded or launched.
11776.IP "\fB\-bundle\fR" 4
11777.IX Item "-bundle"
11778Produce a Mach-o bundle format file.
11779See man \fIld\fR\|(1) for more information.
11780.IP "\fB\-bundle_loader\fR \fIexecutable\fR" 4
11781.IX Item "-bundle_loader executable"
11782This option specifies the \fIexecutable\fR that will load the build
11783output file being linked. See man \fIld\fR\|(1) for more information.
11784.IP "\fB\-dynamiclib\fR" 4
11785.IX Item "-dynamiclib"
11786When passed this option, \s-1GCC\s0 produces a dynamic library instead of
11787an executable when linking, using the Darwin \fIlibtool\fR command.
11788.IP "\fB\-force_cpusubtype_ALL\fR" 4
11789.IX Item "-force_cpusubtype_ALL"
11790This causes \s-1GCC\s0's output file to have the \fI\s-1ALL\s0\fR subtype, instead of
11791one 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
11910These options are passed to the Darwin linker. The Darwin linker man page
11911describes them in detail.
11912.PP
11913\fI\s-1DEC\s0 Alpha Options\fR
11914.IX Subsection "DEC Alpha Options"
11915.PP
11916These \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
11923Use (do not use) the hardware floating-point instructions for
11924floating-point operations. When \fB\-msoft\-float\fR is specified,
11925functions in \fIlibgcc.a\fR are used to perform floating-point
11926operations. Unless they are replaced by routines that emulate the
11927floating-point operations, or compiled in such a way as to call such
11928emulations routines, these routines issue floating-point
11929operations. If you are compiling for an Alpha without floating-point
11930operations, you must ensure that the library is built so as not to call
11931them.
11932.Sp
11933Note that Alpha implementations without floating-point operations are
11934required 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
11941Generate 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
11943register set is not used, floating-point operands are passed in integer
11944registers as if they were integers and floating-point results are passed
11945in \f(CW$0\fR instead of \f(CW$f0\fR. This is a non-standard calling sequence,
11946so any function with a floating-point argument or return value called by code
11947compiled with \fB\-mno\-fp\-regs\fR must also be compiled with that
11948option.
11949.Sp
11950A typical use of this option is building a kernel that does not use,
11951and hence need not save and restore, any floating-point registers.
11952.IP "\fB\-mieee\fR" 4
11953.IX Item "-mieee"
11954The Alpha architecture implements floating-point hardware optimized for
11955maximum performance. It is mostly compliant with the \s-1IEEE\s0 floating-point
11956standard. However, for full compliance, software assistance is
11957required. This option generates code fully IEEE-compliant code
11958\&\fIexcept\fR that the \fIinexact-flag\fR is not maintained (see below).
11959If this option is turned on, the preprocessor macro \f(CW\*(C`_IEEE_FP\*(C'\fR is
11960defined during compilation. The resulting code is less efficient but is
11961able to correctly support denormalized numbers and exceptional \s-1IEEE\s0
11962values such as not-a-number and plus/minus infinity. Other Alpha
11963compilers call this option \fB\-ieee_with_no_inexact\fR.
11964.IP "\fB\-mieee\-with\-inexact\fR" 4
11965.IX Item "-mieee-with-inexact"
11966This is like \fB\-mieee\fR except the generated code also maintains
11967the \s-1IEEE\s0 \fIinexact-flag\fR. Turning on this option causes the
11968generated 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
11970macro. On some Alpha implementations the resulting code may execute
11971significantly slower than the code generated by default. Since there is
11972very little code that depends on the \fIinexact-flag\fR, you should
11973normally not specify this option. Other Alpha compilers call this
11974option \fB\-ieee_with_inexact\fR.
11975.IP "\fB\-mfp\-trap\-mode=\fR\fItrap-mode\fR" 4
11976.IX Item "-mfp-trap-mode=trap-mode"
11977This option controls what floating-point related traps are enabled.
11978Other Alpha compilers call this option \fB\-fptm\fR \fItrap-mode\fR.
11979The trap mode can be set to one of four values:
11980.RS 4
11981.IP "\fBn\fR" 4
11982.IX Item "n"
11983This is the default (normal) setting. The only traps that are enabled
11984are the ones that cannot be disabled in software (e.g., division by zero
11985trap).
11986.IP "\fBu\fR" 4
11987.IX Item "u"
11988In addition to the traps enabled by \fBn\fR, underflow traps are enabled
11989as well.
11990.IP "\fBsu\fR" 4
11991.IX Item "su"
11992Like \fBu\fR, but the instructions are marked to be safe for software
11993completion (see Alpha architecture manual for details).
11994.IP "\fBsui\fR" 4
11995.IX Item "sui"
11996Like \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"
12002Selects 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
12004of:
12005.RS 4
12006.IP "\fBn\fR" 4
12007.IX Item "n"
12008Normal \s-1IEEE\s0 rounding mode. Floating-point numbers are rounded towards
12009the nearest machine number or towards the even machine number in case
12010of a tie.
12011.IP "\fBm\fR" 4
12012.IX Item "m"
12013Round towards minus infinity.
12014.IP "\fBc\fR" 4
12015.IX Item "c"
12016Chopped rounding mode. Floating-point numbers are rounded towards zero.
12017.IP "\fBd\fR" 4
12018.IX Item "d"
12019Dynamic rounding mode. A field in the floating-point control register
12020(\fIfpcr\fR, see Alpha architecture reference manual) controls the
12021rounding mode in effect. The C library initializes this register for
12022rounding 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"
12029In the Alpha architecture, floating-point traps are imprecise. This
12030means without software assistance it is impossible to recover from a
12031floating trap and program execution normally needs to be terminated.
12032\&\s-1GCC\s0 can generate code that can assist operating system trap handlers
12033in determining the exact location that caused a floating-point trap.
12034Depending on the requirements of an application, different levels of
12035precisions can be selected:
12036.RS 4
12037.IP "\fBp\fR" 4
12038.IX Item "p"
12039Program precision. This option is the default and means a trap handler
12040can only identify which program caused a floating-point exception.
12041.IP "\fBf\fR" 4
12042.IX Item "f"
12043Function precision. The trap handler can determine the function that
12044caused a floating-point exception.
12045.IP "\fBi\fR" 4
12046.IX Item "i"
12047Instruction precision. The trap handler can determine the exact
12048instruction that caused a floating-point exception.
12049.RE
12050.RS 4
12051.Sp
12052Other 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"
12057This option marks the generated code as \s-1IEEE\s0 conformant. You must not
12058use 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
12060is to emit the line \fB.eflag 48\fR in the function prologue of the
12061generated assembly file.
12062.IP "\fB\-mbuild\-constants\fR" 4
12063.IX Item "-mbuild-constants"
12064Normally \s-1GCC\s0 examines a 32\- or 64\-bit integer constant to
12065see if it can construct it from smaller constants in two or three
12066instructions. If it cannot, it outputs the constant as a literal and
12067generates code to load it from the data segment at run time.
12068.Sp
12069Use this option to require \s-1GCC\s0 to construct \fIall\fR integer constants
12070using code, even if it takes more instructions (the maximum is six).
12071.Sp
12072You typically use this option to build a shared library dynamic
12073loader. Itself a shared library, it must relocate itself in memory
12074before 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
12093Indicate 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
12095sets supported by the \s-1CPU\s0 type specified via \fB\-mcpu=\fR option or that
12096of 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
12103Generate code that uses (does not use) \s-1VAX\s0 F and G floating-point
12104arithmetic 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
12111Older Alpha assemblers provided no way to generate symbol relocations
12112except via assembler macros. Use of these macros does not allow
12113optimal instruction scheduling. \s-1GNU\s0 binutils as of version 2.12
12114supports a new syntax that allows the compiler to explicitly mark
12115which relocations should apply to which instructions. This option
12116is mostly useful for debugging, as \s-1GCC\s0 detects the capabilities of
12117the 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
12124When \fB\-mexplicit\-relocs\fR is in effect, static data is
12125accessed via \fIgp-relative\fR relocations. When \fB\-msmall\-data\fR
12126is 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
1212816\-bit relocations off of the \f(CW$gp\fR register. This limits the
12129size of the small data area to 64KB, but allows the variables to be
12130directly accessed via a single instruction.
12131.Sp
12132The default is \fB\-mlarge\-data\fR. With this option the data area
12133is limited to just below 2GB. Programs that require more than 2GB of
12134data must use \f(CW\*(C`malloc\*(C'\fR or \f(CW\*(C`mmap\*(C'\fR to allocate the data in the
12135heap instead of in the program's data segment.
12136.Sp
12137When 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
12145When \fB\-msmall\-text\fR is used, the compiler assumes that the
12146code of the entire program (or shared library) fits in 4MB, and is
12147thus reachable with a branch instruction. When \fB\-msmall\-data\fR
12148is used, the compiler can assume that all local symbols share the
12149same \f(CW$gp\fR value, and thus reduce the number of instructions
12150required for a function call from 4 to 1.
12151.Sp
12152The default is \fB\-mlarge\-text\fR.
12153.IP "\fB\-mcpu=\fR\fIcpu_type\fR" 4
12154.IX Item "-mcpu=cpu_type"
12155Set the instruction set and instruction scheduling parameters for
12156machine type \fIcpu_type\fR. You can specify either the \fB\s-1EV\s0\fR
12157style name or the corresponding chip number. \s-1GCC\s0 supports scheduling
12158parameters for the \s-1EV4\s0, \s-1EV5\s0 and \s-1EV6\s0 family of processors and
12159chooses the default values for the instruction set from the processor
12160you specify. If you do not specify a processor type, \s-1GCC\s0 defaults
12161to the processor on which the compiler was built.
12162.Sp
12163Supported 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
12173Schedules 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
12180Schedules 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
12187Schedules 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
12196Schedules 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
12203Schedules 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
12210Schedules 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
12214Native toolchains also support the value \fBnative\fR,
12215which selects the best architecture option for the host processor.
12216\&\fB\-mcpu=native\fR has no effect if \s-1GCC\s0 does not recognize
12217the processor.
12218.RE
12219.IP "\fB\-mtune=\fR\fIcpu_type\fR" 4
12220.IX Item "-mtune=cpu_type"
12221Set only the instruction scheduling parameters for machine type
12222\&\fIcpu_type\fR. The instruction set is not changed.
12223.Sp
12224Native toolchains also support the value \fBnative\fR,
12225which selects the best architecture option for the host processor.
12226\&\fB\-mtune=native\fR has no effect if \s-1GCC\s0 does not recognize
12227the processor.
12228.IP "\fB\-mmemory\-latency=\fR\fItime\fR" 4
12229.IX Item "-mmemory-latency=time"
12230Sets the latency the scheduler should assume for typical memory
12231references as seen by the application. This number is highly
12232dependent on the memory access patterns used by the application
12233and the size of the external cache on the machine.
12234.Sp
12235Valid options for \fItime\fR are
12236.RS 4
12237.IP "\fInumber\fR" 4
12238.IX Item "number"
12239A 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
12250The 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.
12253Note 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
12261These options are defined specifically for the \s-1FR30\s0 port.
12262.IP "\fB\-msmall\-model\fR" 4
12263.IX Item "-msmall-model"
12264Use the small address space model. This can produce smaller code, but
12265it does assume that all symbolic values and addresses fit into a
1226620\-bit range.
12267.IP "\fB\-mno\-lsim\fR" 4
12268.IX Item "-mno-lsim"
12269Assume that runtime support has been provided and so there is no need
12270to include the simulator library (\fIlibsim.a\fR) on the linker
12271command 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"
12277Only use the first 32 general-purpose registers.
12278.IP "\fB\-mgpr\-64\fR" 4
12279.IX Item "-mgpr-64"
12280Use all 64 general-purpose registers.
12281.IP "\fB\-mfpr\-32\fR" 4
12282.IX Item "-mfpr-32"
12283Use only the first 32 floating-point registers.
12284.IP "\fB\-mfpr\-64\fR" 4
12285.IX Item "-mfpr-64"
12286Use all 64 floating-point registers.
12287.IP "\fB\-mhard\-float\fR" 4
12288.IX Item "-mhard-float"
12289Use hardware instructions for floating-point operations.
12290.IP "\fB\-msoft\-float\fR" 4
12291.IX Item "-msoft-float"
12292Use library routines for floating-point operations.
12293.IP "\fB\-malloc\-cc\fR" 4
12294.IX Item "-malloc-cc"
12295Dynamically allocate condition code registers.
12296.IP "\fB\-mfixed\-cc\fR" 4
12297.IX Item "-mfixed-cc"
12298Do not try to dynamically allocate condition code registers, only
12299use \f(CW\*(C`icc0\*(C'\fR and \f(CW\*(C`fcc0\*(C'\fR.
12300.IP "\fB\-mdword\fR" 4
12301.IX Item "-mdword"
12302Change \s-1ABI\s0 to use double word insns.
12303.IP "\fB\-mno\-dword\fR" 4
12304.IX Item "-mno-dword"
12305Do not use double word instructions.
12306.IP "\fB\-mdouble\fR" 4
12307.IX Item "-mdouble"
12308Use floating-point double instructions.
12309.IP "\fB\-mno\-double\fR" 4
12310.IX Item "-mno-double"
12311Do not use floating-point double instructions.
12312.IP "\fB\-mmedia\fR" 4
12313.IX Item "-mmedia"
12314Use media instructions.
12315.IP "\fB\-mno\-media\fR" 4
12316.IX Item "-mno-media"
12317Do not use media instructions.
12318.IP "\fB\-mmuladd\fR" 4
12319.IX Item "-mmuladd"
12320Use multiply and add/subtract instructions.
12321.IP "\fB\-mno\-muladd\fR" 4
12322.IX Item "-mno-muladd"
12323Do not use multiply and add/subtract instructions.
12324.IP "\fB\-mfdpic\fR" 4
12325.IX Item "-mfdpic"
12326Select the \s-1FDPIC\s0 \s-1ABI\s0, which uses function descriptors to represent
12327pointers to functions. Without any PIC/PIE\-related options, it
12328implies \fB\-fPIE\fR. With \fB\-fpic\fR or \fB\-fpie\fR, it
12329assumes \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
12331are computed with 32 bits.
12332With a \fBbfin-elf\fR target, this option implies \fB\-msim\fR.
12333.IP "\fB\-minline\-plt\fR" 4
12334.IX Item "-minline-plt"
12335Enable inlining of \s-1PLT\s0 entries in function calls to functions that are
12336not known to bind locally. It has no effect without \fB\-mfdpic\fR.
12337It's enabled by default if optimizing for speed and compiling for
12338shared libraries (i.e., \fB\-fPIC\fR or \fB\-fpic\fR), or when an
12339optimization option such as \fB\-O3\fR or above is present in the
12340command line.
12341.IP "\fB\-mTLS\fR" 4
12342.IX Item "-mTLS"
12343Assume a large \s-1TLS\s0 segment when generating thread-local code.
12344.IP "\fB\-mtls\fR" 4
12345.IX Item "-mtls"
12346Do 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"
12349Enable the use of \f(CW\*(C`GPREL\*(C'\fR relocations in the \s-1FDPIC\s0 \s-1ABI\s0 for data
12350that is known to be in read-only sections. It's enabled by default,
12351except for \fB\-fpic\fR or \fB\-fpie\fR: even though it may help
12352make the global offset table smaller, it trades 1 instruction for 4.
12353With \fB\-fPIC\fR or \fB\-fPIE\fR, it trades 3 instructions for 4,
12354one of which may be shared by multiple symbols, and it avoids the need
12355for a \s-1GOT\s0 entry for the referenced symbol, so it's more likely to be a
12356win. 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"
12359Link 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
12362it explicitly.
12363.IP "\fB\-mlinked\-fp\fR" 4
12364.IX Item "-mlinked-fp"
12365Follow the \s-1EABI\s0 requirement of always creating a frame pointer whenever
12366a stack frame is allocated. This option is enabled by default and can
12367be disabled with \fB\-mno\-linked\-fp\fR.
12368.IP "\fB\-mlong\-calls\fR" 4
12369.IX Item "-mlong-calls"
12370Use indirect addressing to call functions outside the current
12371compilation unit. This allows the functions to be placed anywhere
12372within the 32\-bit address space.
12373.IP "\fB\-malign\-labels\fR" 4
12374.IX Item "-malign-labels"
12375Try to align labels to an 8\-byte boundary by inserting NOPs into the
12376previous packet. This option only has an effect when \s-1VLIW\s0 packing
12377is enabled. It doesn't create new packets; it merely adds NOPs to
12378existing ones.
12379.IP "\fB\-mlibrary\-pic\fR" 4
12380.IX Item "-mlibrary-pic"
12381Generate position-independent \s-1EABI\s0 code.
12382.IP "\fB\-macc\-4\fR" 4
12383.IX Item "-macc-4"
12384Use only the first four media accumulator registers.
12385.IP "\fB\-macc\-8\fR" 4
12386.IX Item "-macc-8"
12387Use all eight media accumulator registers.
12388.IP "\fB\-mpack\fR" 4
12389.IX Item "-mpack"
12390Pack \s-1VLIW\s0 instructions.
12391.IP "\fB\-mno\-pack\fR" 4
12392.IX Item "-mno-pack"
12393Do not pack \s-1VLIW\s0 instructions.
12394.IP "\fB\-mno\-eflags\fR" 4
12395.IX Item "-mno-eflags"
12396Do not mark \s-1ABI\s0 switches in e_flags.
12397.IP "\fB\-mcond\-move\fR" 4
12398.IX Item "-mcond-move"
12399Enable the use of conditional-move instructions (default).
12400.Sp
12401This switch is mainly for debugging the compiler and will likely be removed
12402in a future version.
12403.IP "\fB\-mno\-cond\-move\fR" 4
12404.IX Item "-mno-cond-move"
12405Disable the use of conditional-move instructions.
12406.Sp
12407This switch is mainly for debugging the compiler and will likely be removed
12408in a future version.
12409.IP "\fB\-mscc\fR" 4
12410.IX Item "-mscc"
12411Enable the use of conditional set instructions (default).
12412.Sp
12413This switch is mainly for debugging the compiler and will likely be removed
12414in a future version.
12415.IP "\fB\-mno\-scc\fR" 4
12416.IX Item "-mno-scc"
12417Disable the use of conditional set instructions.
12418.Sp
12419This switch is mainly for debugging the compiler and will likely be removed
12420in a future version.
12421.IP "\fB\-mcond\-exec\fR" 4
12422.IX Item "-mcond-exec"
12423Enable the use of conditional execution (default).
12424.Sp
12425This switch is mainly for debugging the compiler and will likely be removed
12426in a future version.
12427.IP "\fB\-mno\-cond\-exec\fR" 4
12428.IX Item "-mno-cond-exec"
12429Disable the use of conditional execution.
12430.Sp
12431This switch is mainly for debugging the compiler and will likely be removed
12432in a future version.
12433.IP "\fB\-mvliw\-branch\fR" 4
12434.IX Item "-mvliw-branch"
12435Run a pass to pack branches into \s-1VLIW\s0 instructions (default).
12436.Sp
12437This switch is mainly for debugging the compiler and will likely be removed
12438in a future version.
12439.IP "\fB\-mno\-vliw\-branch\fR" 4
12440.IX Item "-mno-vliw-branch"
12441Do not run a pass to pack branches into \s-1VLIW\s0 instructions.
12442.Sp
12443This switch is mainly for debugging the compiler and will likely be removed
12444in a future version.
12445.IP "\fB\-mmulti\-cond\-exec\fR" 4
12446.IX Item "-mmulti-cond-exec"
12447Enable optimization of \f(CW\*(C`&&\*(C'\fR and \f(CW\*(C`||\*(C'\fR in conditional execution
12448(default).
12449.Sp
12450This switch is mainly for debugging the compiler and will likely be removed
12451in a future version.
12452.IP "\fB\-mno\-multi\-cond\-exec\fR" 4
12453.IX Item "-mno-multi-cond-exec"
12454Disable optimization of \f(CW\*(C`&&\*(C'\fR and \f(CW\*(C`||\*(C'\fR in conditional execution.
12455.Sp
12456This switch is mainly for debugging the compiler and will likely be removed
12457in a future version.
12458.IP "\fB\-mnested\-cond\-exec\fR" 4
12459.IX Item "-mnested-cond-exec"
12460Enable nested conditional execution optimizations (default).
12461.Sp
12462This switch is mainly for debugging the compiler and will likely be removed
12463in a future version.
12464.IP "\fB\-mno\-nested\-cond\-exec\fR" 4
12465.IX Item "-mno-nested-cond-exec"
12466Disable nested conditional execution optimizations.
12467.Sp
12468This switch is mainly for debugging the compiler and will likely be removed
12469in a future version.
12470.IP "\fB\-moptimize\-membar\fR" 4
12471.IX Item "-moptimize-membar"
12472This switch removes redundant \f(CW\*(C`membar\*(C'\fR instructions from the
12473compiler-generated code. It is enabled by default.
12474.IP "\fB\-mno\-optimize\-membar\fR" 4
12475.IX Item "-mno-optimize-membar"
12476This switch disables the automatic removal of redundant \f(CW\*(C`membar\*(C'\fR
12477instructions from the generated code.
12478.IP "\fB\-mtomcat\-stats\fR" 4
12479.IX Item "-mtomcat-stats"
12480Cause gas to print out tomcat statistics.
12481.IP "\fB\-mcpu=\fR\fIcpu\fR" 4
12482.IX Item "-mcpu=cpu"
12483Select 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
12490These \fB\-m\fR options are defined for GNU/Linux targets:
12491.IP "\fB\-mglibc\fR" 4
12492.IX Item "-mglibc"
12493Use the \s-1GNU\s0 C library. This is the default except
12494on \fB*\-*\-linux\-*uclibc*\fR and \fB*\-*\-linux\-*android*\fR targets.
12495.IP "\fB\-muclibc\fR" 4
12496.IX Item "-muclibc"
12497Use uClibc C library. This is the default on
12498\&\fB*\-*\-linux\-*uclibc*\fR targets.
12499.IP "\fB\-mbionic\fR" 4
12500.IX Item "-mbionic"
12501Use Bionic C library. This is the default on
12502\&\fB*\-*\-linux\-*android*\fR targets.
12503.IP "\fB\-mandroid\fR" 4
12504.IX Item "-mandroid"
12505Compile code compatible with Android platform. This is the default on
12506\&\fB*\-*\-linux\-*android*\fR targets.
12507.Sp
12508When compiling, this option enables \fB\-mbionic\fR, \fB\-fPIC\fR,
12509\&\fB\-fno\-exceptions\fR and \fB\-fno\-rtti\fR by default. When linking,
12510this option makes the \s-1GCC\s0 driver pass Android-specific options to the linker.
12511Finally, this option causes the preprocessor macro \f(CW\*(C`_\|_ANDROID_\|_\*(C'\fR
12512to be defined.
12513.IP "\fB\-tno\-android\-cc\fR" 4
12514.IX Item "-tno-android-cc"
12515Disable 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"
12520Disable linking effects of \fB\-mandroid\fR, i.e., pass standard Linux
12521linking options to the linker.
12522.PP
12523\fIH8/300 Options\fR
12524.IX Subsection "H8/300 Options"
12525.PP
12526These \fB\-m\fR options are defined for the H8/300 implementations:
12527.IP "\fB\-mrelax\fR" 4
12528.IX Item "-mrelax"
12529Shorten some address references at link time, when possible; uses the
12530linker option \fB\-relax\fR.
12531.IP "\fB\-mh\fR" 4
12532.IX Item "-mh"
12533Generate code for the H8/300H.
12534.IP "\fB\-ms\fR" 4
12535.IX Item "-ms"
12536Generate code for the H8S.
12537.IP "\fB\-mn\fR" 4
12538.IX Item "-mn"
12539Generate code for the H8S and H8/300H in the normal mode. This switch
12540must be used either with \fB\-mh\fR or \fB\-ms\fR.
12541.IP "\fB\-ms2600\fR" 4
12542.IX Item "-ms2600"
12543Generate code for the H8S/2600. This switch must be used with \fB\-ms\fR.
12544.IP "\fB\-mexr\fR" 4
12545.IX Item "-mexr"
12546Extended registers are stored on stack before execution of function
12547with monitor attribute. Default option is \fB\-mexr\fR.
12548This option is valid only for H8S targets.
12549.IP "\fB\-mno\-exr\fR" 4
12550.IX Item "-mno-exr"
12551Extended registers are not stored on stack before execution of function
12552with monitor attribute. Default option is \fB\-mno\-exr\fR.
12553This option is valid only for H8S targets.
12554.IP "\fB\-mint32\fR" 4
12555.IX Item "-mint32"
12556Make \f(CW\*(C`int\*(C'\fR data 32 bits by default.
12557.IP "\fB\-malign\-300\fR" 4
12558.IX Item "-malign-300"
12559On the H8/300H and H8S, use the same alignment rules as for the H8/300.
12560The default for the H8/300H and H8S is to align longs and floats on
125614\-byte boundaries.
12562\&\fB\-malign\-300\fR causes them to be aligned on 2\-byte boundaries.
12563This option has no effect on the H8/300.
12564.PP
12565\fI\s-1HPPA\s0 Options\fR
12566.IX Subsection "HPPA Options"
12567.PP
12568These \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"
12571Generate 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
125731.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
12575architecture option for your machine. Code compiled for lower numbered
12576architectures runs on higher numbered architectures, but not the
12577other 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
12586Synonyms 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"
12589Generate code suitable for big switch tables. Use this option only if
12590the assembler/linker complain about out-of-range branches within a switch
12591table.
12592.IP "\fB\-mjump\-in\-delay\fR" 4
12593.IX Item "-mjump-in-delay"
12594Fill delay slots of function calls with unconditional jump instructions
12595by modifying the return pointer for the function call to be the target
12596of the conditional jump.
12597.IP "\fB\-mdisable\-fpregs\fR" 4
12598.IX Item "-mdisable-fpregs"
12599Prevent floating-point registers from being used in any manner. This is
12600necessary for compiling kernels that perform lazy context switching of
12601floating-point registers. If you use this option and attempt to perform
12602floating-point operations, the compiler aborts.
12603.IP "\fB\-mdisable\-indexing\fR" 4
12604.IX Item "-mdisable-indexing"
12605Prevent the compiler from using indexing address modes. This avoids some
12606rather 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"
12609Generate 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
12612Such 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"
12615Generate code that assumes calls never cross space boundaries. This
12616allows \s-1GCC\s0 to emit code that performs faster indirect calls.
12617.Sp
12618This option does not work in the presence of shared libraries or nested
12619functions.
12620.IP "\fB\-mfixed\-range=\fR\fIregister-range\fR" 4
12621.IX Item "-mfixed-range=register-range"
12622Generate code treating the given register range as fixed registers.
12623A fixed register is one that the register allocator cannot use. This is
12624useful when compiling kernel code. A register range is specified as
12625two registers separated by a dash. Multiple register ranges can be
12626specified separated by a comma.
12627.IP "\fB\-mlong\-load\-store\fR" 4
12628.IX Item "-mlong-load-store"
12629Generate 3\-instruction load and store sequences as sometimes required by
12630the HP-UX 10 linker. This is equivalent to the \fB+k\fR option to
12631the \s-1HP\s0 compilers.
12632.IP "\fB\-mportable\-runtime\fR" 4
12633.IX Item "-mportable-runtime"
12634Use the portable calling conventions proposed by \s-1HP\s0 for \s-1ELF\s0 systems.
12635.IP "\fB\-mgas\fR" 4
12636.IX Item "-mgas"
12637Enable 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"
12640Schedule 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
12643to \fI/usr/lib/sched.models\fR on an HP-UX system to determine the
12644proper scheduling option for your machine. The default scheduling is
12645\&\fB8000\fR.
12646.IP "\fB\-mlinker\-opt\fR" 4
12647.IX Item "-mlinker-opt"
12648Enable the optimization pass in the HP-UX linker. Note this makes symbolic
12649debugging impossible. It also triggers a bug in the HP-UX 8 and HP-UX 9
12650linkers in which they give bogus error messages when linking some programs.
12651.IP "\fB\-msoft\-float\fR" 4
12652.IX Item "-msoft-float"
12653Generate output containing library calls for floating point.
12654\&\fBWarning:\fR the requisite libraries are not available for all \s-1HPPA\s0
12655targets. Normally the facilities of the machine's usual C compiler are
12656used, but this cannot be done directly in cross-compilation. You must make
12657your own arrangements to provide suitable library functions for
12658cross-compilation.
12659.Sp
12660\&\fB\-msoft\-float\fR changes the calling convention in the output file;
12661therefore, it is only useful if you compile \fIall\fR of a program with
12662this option. In particular, you need to compile \fIlibgcc.a\fR, the
12663library that comes with \s-1GCC\s0, with \fB\-msoft\-float\fR in order for
12664this to work.
12665.IP "\fB\-msio\fR" 4
12666.IX Item "-msio"
12667Generate 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
12670options are available under HP-UX and HI-UX.
12671.IP "\fB\-mgnu\-ld\fR" 4
12672.IX Item "-mgnu-ld"
12673Use options specific to \s-1GNU\s0 \fBld\fR.
12674This passes \fB\-shared\fR to \fBld\fR when
12675building a shared library. It is the default when \s-1GCC\s0 is configured,
12676explicitly or implicitly, with the \s-1GNU\s0 linker. This option does not
12677affect which \fBld\fR is called; it only changes what parameters
12678are passed to that \fBld\fR.
12679The \fBld\fR that is called is determined by the
12680\&\fB\-\-with\-ld\fR configure option, \s-1GCC\s0's program search path, and
12681finally by the user's \fB\s-1PATH\s0\fR. The linker used by \s-1GCC\s0 can be printed
12682using \fBwhich `gcc \-print\-prog\-name=ld`\fR. This option is only available
12683on 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"
12686Use options specific to \s-1HP\s0 \fBld\fR.
12687This passes \fB\-b\fR to \fBld\fR when building
12688a shared library and passes \fB+Accept TypeMismatch\fR to \fBld\fR on all
12689links. It is the default when \s-1GCC\s0 is configured, explicitly or
12690implicitly, with the \s-1HP\s0 linker. This option does not affect
12691which \fBld\fR is called; it only changes what parameters are passed to that
12692\&\fBld\fR.
12693The \fBld\fR that is called is determined by the \fB\-\-with\-ld\fR
12694configure 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
12697HP-UX \s-1GCC\s0, i.e. configured with \fBhppa*64*\-*\-hpux*\fR.
12698.IP "\fB\-mlong\-calls\fR" 4
12699.IX Item "-mlong-calls"
12700Generate code that uses long call sequences. This ensures that a call
12701is always able to reach linker generated stubs. The default is to generate
12702long calls only when the distance from the call site to the beginning
12703of the function or translation unit, as the case may be, exceeds a
12704predefined limit set by the branch type being used. The limits for
12705normal 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
12707240,000 bytes.
12708.Sp
12709Distances are measured from the beginning of functions when using the
12710\&\fB\-ffunction\-sections\fR option, or when using the \fB\-mgas\fR
12711and \fB\-mno\-portable\-runtime\fR options together under HP-UX with
12712the \s-1SOM\s0 linker.
12713.Sp
12714It is normally not desirable to use this option as it degrades
12715performance. However, it may be useful in large applications,
12716particularly when partial linking is used to build the application.
12717.Sp
12718The types of long calls used depends on the capabilities of the
12719assembler and linker, and the type of code being generated. The
12720impact on systems that support long absolute calls, and long pic
12721symbol-difference or pc-relative calls should be relatively small.
12722However, an indirect call is used on 32\-bit \s-1ELF\s0 systems in pic code
12723and it is quite long.
12724.IP "\fB\-munix=\fR\fIunix-std\fR" 4
12725.IX Item "-munix=unix-std"
12726Generate 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
12728and \fB98\fR. \fB93\fR is supported on all HP-UX versions. \fB95\fR
12729is available on HP-UX 10.10 and later. \fB98\fR is available on HP-UX
1273011.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
12732and 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
12736and \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
12741It is \fIimportant\fR to note that this option changes the interfaces
12742for various library routines. It also affects the operational behavior
12743of the C library. Thus, \fIextreme\fR care is needed in using this
12744option.
12745.Sp
12746Library code that is intended to operate with more than one \s-1UNIX\s0
12747standard must test, set and restore the variable \fI_\|_xpg4_extended_mask\fR
12748as appropriate. Most \s-1GNU\s0 software doesn't provide this capability.
12749.IP "\fB\-nolibdld\fR" 4
12750.IX Item "-nolibdld"
12751Suppress 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"
12755The HP-UX implementation of setlocale in libc has a dependency on
12756libdld.sl. There isn't an archive version of libdld.sl. Thus,
12757when the \fB\-static\fR option is specified, special link options
12758are needed to resolve this dependency.
12759.Sp
12760On HP-UX 10 and later, the \s-1GCC\s0 driver adds the necessary options to
12761link with libdld.sl when the \fB\-static\fR option is specified.
12762This causes the resulting binary to be dynamic. On the 64\-bit port,
12763the 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
12765adding these link options.
12766.IP "\fB\-threads\fR" 4
12767.IX Item "-threads"
12768Add support for multithreading with the \fIdce thread\fR library
12769under HP-UX. This option sets flags for both the preprocessor and
12770linker.
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
12775These \fB\-m\fR options are defined for the i386 and x86\-64 family of
12776computers:
12777.IP "\fB\-march=\fR\fIcpu-type\fR" 4
12778.IX Item "-march=cpu-type"
12779Generate instructions for the machine type \fIcpu-type\fR. In contrast to
12780\&\fB\-mtune=\fR\fIcpu-type\fR, which merely tunes the generated code
12781for the specified \fIcpu-type\fR, \fB\-march=\fR\fIcpu-type\fR allows \s-1GCC\s0
12782to generate code that may not run at all on processors other than the one
12783indicated. Specifying \fB\-march=\fR\fIcpu-type\fR implies
12784\&\fB\-mtune=\fR\fIcpu-type\fR.
12785.Sp
12786The choices for \fIcpu-type\fR are:
12787.RS 4
12788.IP "\fBnative\fR" 4
12789.IX Item "native"
12790This selects the \s-1CPU\s0 to generate code for at compilation time by determining
12791the processor type of the compiling machine. Using \fB\-march=native\fR
12792enables all instruction subsets supported by the local machine (hence
12793the result might not run on different machines). Using \fB\-mtune=native\fR
12794produces code optimized for the local machine under the constraints
12795of the selected instruction set.
12796.IP "\fBi386\fR" 4
12797.IX Item "i386"
12798Original Intel i386 \s-1CPU\s0.
12799.IP "\fBi486\fR" 4
12800.IX Item "i486"
12801Intel 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
12808Intel Pentium \s-1CPU\s0 with no \s-1MMX\s0 support.
12809.IP "\fBpentium-mmx\fR" 4
12810.IX Item "pentium-mmx"
12811Intel 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"
12814Intel Pentium Pro \s-1CPU\s0.
12815.IP "\fBi686\fR" 4
12816.IX Item "i686"
12817When used with \fB\-march\fR, the Pentium Pro
12818instruction set is used, so the code runs on all i686 family chips.
12819When used with \fB\-mtune\fR, it has the same meaning as \fBgeneric\fR.
12820.IP "\fBpentium2\fR" 4
12821.IX Item "pentium2"
12822Intel Pentium \s-1II\s0 \s-1CPU\s0, based on Pentium Pro core with \s-1MMX\s0 instruction set
12823support.
12824.IP "\fBpentium3\fR" 4
12825.IX Item "pentium3"
12826.PD 0
12827.IP "\fBpentium3m\fR" 4
12828.IX Item "pentium3m"
12829.PD
12830Intel Pentium \s-1III\s0 \s-1CPU\s0, based on Pentium Pro core with \s-1MMX\s0 and \s-1SSE\s0 instruction
12831set support.
12832.IP "\fBpentium-m\fR" 4
12833.IX Item "pentium-m"
12834Intel Pentium M; low-power version of Intel Pentium \s-1III\s0 \s-1CPU\s0
12835with \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
12842Intel 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"
12845Improved version of Intel Pentium 4 \s-1CPU\s0 with \s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0 and \s-1SSE3\s0 instruction
12846set support.
12847.IP "\fBnocona\fR" 4
12848.IX Item "nocona"
12849Improved 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"
12853Intel 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
12854instruction set support.
12855.IP "\fBcorei7\fR" 4
12856.IX Item "corei7"
12857Intel 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
12858and \s-1SSE4\s0.2 instruction set support.
12859.IP "\fBcorei7\-avx\fR" 4
12860.IX Item "corei7-avx"
12861Intel 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"
12865Intel 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
12867set support.
12868.IP "\fBatom\fR" 4
12869.IX Item "atom"
12870Intel Atom \s-1CPU\s0 with 64\-bit extensions, \s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0, \s-1SSE3\s0 and \s-1SSSE3\s0
12871instruction 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
12881Improved 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
12889support.
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
12898Improved \s-1AMD\s0 Athlon \s-1CPU\s0 with \s-1MMX\s0, 3DNow!, enhanced 3DNow! and full \s-1SSE\s0
12899instruction 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
12910Processors based on the \s-1AMD\s0 K8 core with x86\-64 instruction set support,
12911including 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
12913instruction 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
12922Improved 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
12929CPUs based on \s-1AMD\s0 Family 10h cores with x86\-64 instruction set support. (This
12930supersets \s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0, \s-1SSE3\s0, \s-1SSE4A\s0, 3DNow!, enhanced 3DNow!, \s-1ABM\s0 and 64\-bit
12931instruction set extensions.)
12932.IP "\fBbdver1\fR" 4
12933.IX Item "bdver1"
12934CPUs based on \s-1AMD\s0 Family 15h cores with x86\-64 instruction set support. (This
12935supersets \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
12940supersets \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
12942extensions.)
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
12946supersets \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
12948extensions.
12949.IP "\fBbtver1\fR" 4
12950.IX Item "btver1"
12951CPUs based on \s-1AMD\s0 Family 14h cores with x86\-64 instruction set support. (This
12952supersets \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
12953instruction set extensions.)
12954.IP "\fBbtver2\fR" 4
12955.IX Item "btver2"
12956CPUs based on \s-1AMD\s0 Family 16h cores with x86\-64 instruction set support. This
12957includes \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
12962set 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!
12966instruction 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
12970implemented 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
12975implemented 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"
12984Tune to \fIcpu-type\fR everything applicable about the generated code, except
12985for the \s-1ABI\s0 and the set of available instructions.
12986While picking a specific \fIcpu-type\fR schedules things appropriately
12987for that particular chip, the compiler does not generate any code that
12988cannot run on the default machine type unless you use a
12989\&\fB\-march=\fR\fIcpu-type\fR option.
12990For example, if \s-1GCC\s0 is configured for i686\-pc\-linux\-gnu
12991then \fB\-mtune=pentium4\fR generates code that is tuned for Pentium 4
12992but still runs on i686 machines.
12993.Sp
12994The choices for \fIcpu-type\fR are the same as for \fB\-march\fR.
12995In addition, \fB\-mtune\fR supports an extra choice for \fIcpu-type\fR:
12996.RS 4
12997.IP "\fBgeneric\fR" 4
12998.IX Item "generic"
12999Produce code optimized for the most common \s-1IA32/AMD64/EM64T\s0 processors.
13000If you know the \s-1CPU\s0 on which your code will run, then you should use
13001the 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
13003of your application will have, then you should use this option.
13004.Sp
13005As new processors are deployed in the marketplace, the behavior of this
13006option 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
13008the processors
13009that are most common at the time that version of \s-1GCC\s0 is released.
13010.Sp
13011There is no \fB\-march=generic\fR option because \fB\-march\fR
13012indicates the instruction set the compiler can use, and there is no
13013generic instruction set applicable to all processors. In contrast,
13014\&\fB\-mtune\fR indicates the processor (or, in this case, collection of
13015processors) 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"
13021A deprecated synonym for \fB\-mtune\fR.
13022.IP "\fB\-mfpmath=\fR\fIunit\fR" 4
13023.IX Item "-mfpmath=unit"
13024Generate floating-point arithmetic for selected unit \fIunit\fR. The choices
13025for \fIunit\fR are:
13026.RS 4
13027.IP "\fB387\fR" 4
13028.IX Item "387"
13029Use the standard 387 floating-point coprocessor present on the majority of chips and
13030emulated otherwise. Code compiled with this option runs almost everywhere.
13031The temporary results are computed in 80\-bit precision instead of the precision
13032specified by the type, resulting in slightly different results compared to most
13033of other chips. See \fB\-ffloat\-store\fR for more detailed description.
13034.Sp
13035This is the default choice for i386 compiler.
13036.IP "\fBsse\fR" 4
13037.IX Item "sse"
13038Use scalar floating-point instructions present in the \s-1SSE\s0 instruction set.
13039This instruction set is supported by Pentium \s-1III\s0 and newer chips,
13040and in the \s-1AMD\s0 line
13041by Athlon\-4, Athlon \s-1XP\s0 and Athlon \s-1MP\s0 chips. The earlier version of the \s-1SSE\s0
13042instruction set supports only single-precision arithmetic, thus the double and
13043extended-precision arithmetic are still done using 387. A later version, present
13044only in Pentium 4 and \s-1AMD\s0 x86\-64 chips, supports double-precision
13045arithmetic too.
13046.Sp
13047For the i386 compiler, you must use \fB\-march=\fR\fIcpu-type\fR, \fB\-msse\fR
13048or \fB\-msse2\fR switches to enable \s-1SSE\s0 extensions and make this option
13049effective. For the x86\-64 compiler, these extensions are enabled by default.
13050.Sp
13051The resulting code should be considerably faster in the majority of cases and avoid
13052the numerical instability problems of 387 code, but may break some existing
13053code that expects temporaries to be 80 bits.
13054.Sp
13055This 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
13064Attempt to utilize both instruction sets at once. This effectively doubles the
13065amount of available registers, and on chips with separate execution units for
13066387 and \s-1SSE\s0 the execution resources too. Use this option with care, as it is
13067still experimental, because the \s-1GCC\s0 register allocator does not model separate
13068functional 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"
13074Output assembly instructions using selected \fIdialect\fR. Supported
13075choices are \fBintel\fR or \fBatt\fR (the default). Darwin does
13076not 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
13083Control whether or not the compiler uses \s-1IEEE\s0 floating-point
13084comparisons. These correctly handle the case where the result of a
13085comparison is unordered.
13086.IP "\fB\-msoft\-float\fR" 4
13087.IX Item "-msoft-float"
13088Generate output containing library calls for floating point.
13089.Sp
13090\&\fBWarning:\fR the requisite libraries are not part of \s-1GCC\s0.
13091Normally the facilities of the machine's usual C compiler are used, but
13092this can't be done directly in cross-compilation. You must make your
13093own arrangements to provide suitable library functions for
13094cross-compilation.
13095.Sp
13096On machines where a function returns floating-point results in the 80387
13097register 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"
13101Do not use the \s-1FPU\s0 registers for return values of functions.
13102.Sp
13103The 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
13105is no \s-1FPU\s0. The idea is that the operating system should emulate
13106an \s-1FPU\s0.
13107.Sp
13108The option \fB\-mno\-fp\-ret\-in\-387\fR causes such values to be returned
13109in ordinary \s-1CPU\s0 registers instead.
13110.IP "\fB\-mno\-fancy\-math\-387\fR" 4
13111.IX Item "-mno-fancy-math-387"
13112Some 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
13114generating those instructions. This option is the default on FreeBSD,
13115OpenBSD and NetBSD. This option is overridden when \fB\-march\fR
13116indicates that the target \s-1CPU\s0 always has an \s-1FPU\s0 and so the
13117instruction does not need emulation. These
13118instructions 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
13126Control 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
13128boundary. Aligning \f(CW\*(C`double\*(C'\fR variables on a two-word boundary
13129produces code that runs somewhat faster on a Pentium at the
13130expense of more memory.
13131.Sp
13132On x86\-64, \fB\-malign\-double\fR is enabled by default.
13133.Sp
13134\&\fBWarning:\fR if you use the \fB\-malign\-double\fR switch,
13135structures containing the above types are aligned differently than
13136the published application binary interface specifications for the 386
13137and are not binary compatible with structures in code compiled
13138without 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
13145These switches control the size of \f(CW\*(C`long double\*(C'\fR type. The i386
13146application binary interface specifies the size to be 96 bits,
13147so \fB\-m96bit\-long\-double\fR is the default in 32\-bit mode.
13148.Sp
13149Modern architectures (Pentium and newer) prefer \f(CW\*(C`long double\*(C'\fR
13150to be aligned to an 8\- or 16\-byte boundary. In arrays or structures
13151conforming 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
13153to a 16\-byte boundary by padding the \f(CW\*(C`long double\*(C'\fR with an additional
1315432\-bit zero.
13155.Sp
13156In the x86\-64 compiler, \fB\-m128bit\-long\-double\fR is the default choice as
13157its \s-1ABI\s0 specifies that \f(CW\*(C`long double\*(C'\fR is aligned on 16\-byte boundary.
13158.Sp
13159Notice that neither of these options enable any extra precision over the x87
13160standard 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
13163changes the size of
13164structures and arrays containing \f(CW\*(C`long double\*(C'\fR variables,
13165as well as modifying the function calling convention for functions taking
13166\&\f(CW\*(C`long double\*(C'\fR. Hence they are not binary-compatible
13167with 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
13174These switches control the size of \f(CW\*(C`long double\*(C'\fR type. A size
13175of 64 bits makes the \f(CW\*(C`long double\*(C'\fR type equivalent to the \f(CW\*(C`double\*(C'\fR
13176type. 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
13179changes the size of
13180structures and arrays containing \f(CW\*(C`long double\*(C'\fR variables,
13181as well as modifying the function calling convention for functions taking
13182\&\f(CW\*(C`long double\*(C'\fR. Hence they are not binary-compatible
13183with code compiled without that switch.
13184.IP "\fB\-mlarge\-data\-threshold=\fR\fIthreshold\fR" 4
13185.IX Item "-mlarge-data-threshold=threshold"
13186When \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
13188same across all objects linked into the binary, and defaults to 65535.
13189.IP "\fB\-mrtd\fR" 4
13190.IX Item "-mrtd"
13191Use a different function-calling convention, in which functions that
13192take a fixed number of arguments return with the \f(CW\*(C`ret \f(CInum\f(CW\*(C'\fR
13193instruction, which pops their arguments while returning. This saves one
13194instruction in the caller since there is no need to pop the arguments
13195there.
13196.Sp
13197You can specify that an individual function is called with this calling
13198sequence with the function attribute \fBstdcall\fR. You can also
13199override 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
13203normally used on Unix, so you cannot use it if you need to call
13204libraries compiled with the Unix compiler.
13205.Sp
13206Also, you must provide function prototypes for all functions that
13207take variable numbers of arguments (including \f(CW\*(C`printf\*(C'\fR);
13208otherwise incorrect code is generated for calls to those
13209functions.
13210.Sp
13211In addition, seriously incorrect code results if you call a
13212function with too many arguments. (Normally, extra arguments are
13213harmlessly ignored.)
13214.IP "\fB\-mregparm=\fR\fInum\fR" 4
13215.IX Item "-mregparm=num"
13216Control how many registers are used to pass integer arguments. By
13217default, no registers are used to pass arguments, and at most 3
13218registers can be used. You can control this behavior for a specific
13219function 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
13223value, including any libraries. This includes the system libraries and
13224startup modules.
13225.IP "\fB\-msseregparm\fR" 4
13226.IX Item "-msseregparm"
13227Use \s-1SSE\s0 register passing conventions for float and double arguments
13228and return values. You can control this behavior for a specific
13229function by using the function attribute \fBsseregparm\fR.
13230.Sp
13231\&\fBWarning:\fR if you use this switch then you must build all
13232modules with the same value, including any libraries. This includes
13233the system libraries and startup modules.
13234.IP "\fB\-mvect8\-ret\-in\-mem\fR" 4
13235.IX Item "-mvect8-ret-in-mem"
13236Return 8\-byte vectors in memory instead of \s-1MMX\s0 registers. This is the
13237default on Solaris@tie{}8 and 9 and VxWorks to match the \s-1ABI\s0 of the Sun
13238Studio compilers until version 12. Later compiler versions (starting
13239with Studio 12 Update@tie{}1) follow the \s-1ABI\s0 used by other x86 targets, which
13240is the default on Solaris@tie{}10 and later. \fIOnly\fR use this option if
13241you need to remain compatible with existing code produced by those
13242previous 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
13251Set 80387 floating-point precision to 32, 64 or 80 bits. When \fB\-mpc32\fR
13252is specified, the significands of results of floating-point operations are
13253rounded to 24 bits (single precision); \fB\-mpc64\fR rounds the
13254significands of results of floating-point operations to 53 bits (double
13255precision) and \fB\-mpc80\fR rounds the significands of results of
13256floating-point operations to 64 bits (extended double precision), which is
13257the default. When this option is used, floating-point operations in higher
13258precisions are not available to the programmer without setting the \s-1FPU\s0
13259control word explicitly.
13260.Sp
13261Setting the rounding of floating-point operations to less than the default
1326280 bits can speed some programs by 2% or more. Note that some mathematical
13263libraries assume that extended-precision (80\-bit) floating-point operations
13264are enabled by default; routines in such libraries could suffer significant
13265loss of accuracy, typically through so-called \*(L"catastrophic cancellation\*(R",
13266when this option is used to set the precision to less than extended precision.
13267.IP "\fB\-mstackrealign\fR" 4
13268.IX Item "-mstackrealign"
13269Realign the stack at entry. On the Intel x86, the \fB\-mstackrealign\fR
13270option generates an alternate prologue and epilogue that realigns the
13271run-time stack if necessary. This supports mixing legacy codes that keep
132724\-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,
13274applicable to individual functions.
13275.IP "\fB\-mpreferred\-stack\-boundary=\fR\fInum\fR" 4
13276.IX Item "-mpreferred-stack-boundary=num"
13277Attempt to keep the stack boundary aligned to a 2 raised to \fInum\fR
13278byte boundary. If \fB\-mpreferred\-stack\-boundary\fR is not specified,
13279the 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
13283used to keep the stack boundary aligned to 8 byte boundary. Since
13284x86\-64 \s-1ABI\s0 require 16 byte stack alignment, this is \s-1ABI\s0 incompatible and
13285intended to be used in controlled environment where stack space is
13286important limitation. This option will lead to wrong code when functions
13287compiled with 16 byte stack alignment (such as functions from a standard
13288library) are called with misaligned stack. In this case, \s-1SSE\s0
13289instructions may lead to misaligned memory access traps. In addition,
13290variable arguments will be handled incorrectly for 16 byte aligned
13291objects (including x87 long double and _\|_int128), leading to wrong
13292results. You must build all modules with
13293\&\fB\-mpreferred\-stack\-boundary=3\fR, including any libraries. This
13294includes the system libraries and startup modules.
13295.IP "\fB\-mincoming\-stack\-boundary=\fR\fInum\fR" 4
13296.IX Item "-mincoming-stack-boundary=num"
13297Assume the incoming stack is aligned to a 2 raised to \fInum\fR byte
13298boundary. If \fB\-mincoming\-stack\-boundary\fR is not specified,
13299the one specified by \fB\-mpreferred\-stack\-boundary\fR is used.
13300.Sp
13301On Pentium and Pentium Pro, \f(CW\*(C`double\*(C'\fR and \f(CW\*(C`long double\*(C'\fR values
13302should be aligned to an 8\-byte boundary (see \fB\-malign\-double\fR) or
13303suffer significant run time performance penalties. On Pentium \s-1III\s0, the
13304Streaming \s-1SIMD\s0 Extension (\s-1SSE\s0) data type \f(CW\*(C`_\|_m128\*(C'\fR may not work
13305properly if it is not 16\-byte aligned.
13306.Sp
13307To ensure proper alignment of this values on the stack, the stack boundary
13308must be as aligned as that required by any value stored on the stack.
13309Further, every function must be generated such that it keeps the stack
13310aligned. Thus calling a function compiled with a higher preferred
13311stack boundary from a function compiled with a lower preferred stack
13312boundary most likely misaligns the stack. It is recommended that
13313libraries that use callbacks always use the default setting.
13314.Sp
13315This extra alignment does consume extra stack space, and generally
13316increases code size. Code that is sensitive to stack space usage, such
13317as embedded systems and operating system kernels, may want to reduce the
13318preferred 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
13431These 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!
13434extended instruction sets.
13435These extensions are also available as built-in functions: see
13436\&\fBX86 Built-in Functions\fR, for details of the functions enabled and
13437disabled by these switches.
13438.Sp
13439To generate \s-1SSE/SSE2\s0 instructions automatically from floating-point
13440code (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
13443generates new \s-1AVX\s0 instructions or \s-1AVX\s0 equivalence for all SSEx instructions
13444when needed.
13445.Sp
13446These options enable \s-1GCC\s0 to use these extended instructions in
13447generated code, even without \fB\-mfpmath=sse\fR. Applications that
13448perform run-time \s-1CPU\s0 detection must compile separate files for each
13449supported architecture, using the appropriate flags. In particular,
13450the file containing the \s-1CPU\s0 detection code should be compiled without
13451these options.
13452.IP "\fB\-mcld\fR" 4
13453.IX Item "-mcld"
13454This option instructs \s-1GCC\s0 to emit a \f(CW\*(C`cld\*(C'\fR instruction in the prologue
13455of functions that use string instructions. String instructions depend on
13456the \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
13458systems violate this specification by not clearing the \s-1DF\s0 flag in their
13459exception dispatchers. The exception handler can be invoked with the \s-1DF\s0 flag
13460set, which leads to wrong direction mode when string instructions are used.
13461This 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
13463instructions can be suppressed with the \fB\-mno\-cld\fR compiler option
13464in this case.
13465.IP "\fB\-mvzeroupper\fR" 4
13466.IX Item "-mvzeroupper"
13467This option instructs \s-1GCC\s0 to emit a \f(CW\*(C`vzeroupper\*(C'\fR instruction
13468before a transfer of control flow out of the function to minimize
13469the \s-1AVX\s0 to \s-1SSE\s0 transition penalty as well as remove unnecessary \f(CW\*(C`zeroupper\*(C'\fR
13470intrinsics.
13471.IP "\fB\-mprefer\-avx128\fR" 4
13472.IX Item "-mprefer-avx128"
13473This option instructs \s-1GCC\s0 to use 128\-bit \s-1AVX\s0 instructions instead of
13474256\-bit \s-1AVX\s0 instructions in the auto-vectorizer.
13475.IP "\fB\-mcx16\fR" 4
13476.IX Item "-mcx16"
13477This 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.
13480This is useful for high-resolution counters that can be updated
13481by multiple processors (or cores). This instruction is generated as part of
13482atomic 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"
13486This option enables generation of \f(CW\*(C`SAHF\*(C'\fR instructions in 64\-bit code.
13487Early Intel Pentium 4 CPUs with Intel 64 support,
13488prior to the introduction of Pentium 4 G1 step in December 2005,
13489lacked the \f(CW\*(C`LAHF\*(C'\fR and \f(CW\*(C`SAHF\*(C'\fR instructions
13490which were supported by \s-1AMD64\s0.
13491These are load and store instructions, respectively, for certain status flags.
13492In 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;
13494see \fBOther Builtins\fR for details.
13495.IP "\fB\-mmovbe\fR" 4
13496.IX Item "-mmovbe"
13497This 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"
13501This 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"
13506This 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)
13508with an additional Newton-Raphson step
13509to increase precision instead of \f(CW\*(C`DIVSS\*(C'\fR and \f(CW\*(C`SQRTSS\*(C'\fR
13510(and their vectorized
13511variants) for single-precision floating-point arguments. These instructions
13512are generated only when \fB\-funsafe\-math\-optimizations\fR is enabled
13513together with \fB\-finite\-math\-only\fR and \fB\-fno\-trapping\-math\fR.
13514Note that while the throughput of the sequence is higher than the throughput
13515of the non-reciprocal instruction, the precision of the sequence can be
13516decreased by up to 2 ulp (i.e. the inverse of 1.0 equals 0.99999994).
13517.Sp
13518Note 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
13520combination), and doesn't need \fB\-mrecip\fR.
13521.Sp
13522Also note that \s-1GCC\s0 emits the above sequence with additional Newton-Raphson step
13523for vectorized single-float division and vectorized \f(CW\*(C`sqrtf(\f(CIx\f(CW)\*(C'\fR
13524already with \fB\-ffast\-math\fR (or the above option combination), and
13525doesn't need \fB\-mrecip\fR.
13526.IP "\fB\-mrecip=\fR\fIopt\fR" 4
13527.IX Item "-mrecip=opt"
13528This option controls which reciprocal estimate instructions
13529may be used. \fIopt\fR is a comma-separated list of options, which may
13530be preceded by a \fB!\fR to invert the option:
13531.RS 4
13532.IP "\fBall\fR" 4
13533.IX Item "all"
13534Enable all estimate instructions.
13535.IP "\fBdefault\fR" 4
13536.IX Item "default"
13537Enable the default instructions, equivalent to \fB\-mrecip\fR.
13538.IP "\fBnone\fR" 4
13539.IX Item "none"
13540Disable all estimate instructions, equivalent to \fB\-mno\-recip\fR.
13541.IP "\fBdiv\fR" 4
13542.IX Item "div"
13543Enable the approximation for scalar division.
13544.IP "\fBvec-div\fR" 4
13545.IX Item "vec-div"
13546Enable the approximation for vectorized division.
13547.IP "\fBsqrt\fR" 4
13548.IX Item "sqrt"
13549Enable the approximation for scalar square root.
13550.IP "\fBvec-sqrt\fR" 4
13551.IX Item "vec-sqrt"
13552Enable the approximation for vectorized square root.
13553.RE
13554.RS 4
13555.Sp
13556So, for example, \fB\-mrecip=all,!sqrt\fR enables
13557all of the reciprocal approximations, except for square root.
13558.RE
13559.IP "\fB\-mveclibabi=\fR\fItype\fR" 4
13560.IX Item "-mveclibabi=type"
13561Specifies the \s-1ABI\s0 type to use for vectorizing intrinsics using an
13562external library. Supported values for \fItype\fR are \fBsvml\fR
13563for the Intel short
13564vector math library and \fBacml\fR for the \s-1AMD\s0 math core library.
13565To 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
13567ABI-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
13579function 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
13584when \fB\-mveclibabi=acml\fR is used.
13585.IP "\fB\-mabi=\fR\fIname\fR" 4
13586.IX Item "-mabi=name"
13587Generate code for the specified calling convention. Permissible values
13588are \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.
13591You can control this behavior for a specific function by
13592using the function attribute \fBms_abi\fR/\fBsysv_abi\fR.
13593.IP "\fB\-mtls\-dialect=\fR\fItype\fR" 4
13594.IX Item "-mtls-dialect=type"
13595Generate 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
13598requirements 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
13605Use \s-1PUSH\s0 operations to store outgoing parameters. This method is shorter
13606and usually equally fast as method using \s-1SUB/MOV\s0 operations and is enabled
13607by default. In some cases disabling it may improve performance because of
13608improved scheduling and reduced dependencies.
13609.IP "\fB\-maccumulate\-outgoing\-args\fR" 4
13610.IX Item "-maccumulate-outgoing-args"
13611If enabled, the maximum amount of space required for outgoing arguments is
13612computed in the function prologue. This is faster on most modern CPUs
13613because of reduced dependencies, improved scheduling and reduced stack usage
13614when the preferred stack boundary is not equal to 2. The drawback is a notable
13615increase in code size. This switch implies \fB\-mno\-push\-args\fR.
13616.IP "\fB\-mthreads\fR" 4
13617.IX Item "-mthreads"
13618Support thread-safe exception handling on MinGW. Programs that rely
13619on 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"
13625Do not align the destination of inlined string operations. This switch reduces
13626code size and improves performance in case the destination is already aligned,
13627but \s-1GCC\s0 doesn't know about it.
13628.IP "\fB\-minline\-all\-stringops\fR" 4
13629.IX Item "-minline-all-stringops"
13630By default \s-1GCC\s0 inlines string operations only when the destination is
13631known to be aligned to least a 4\-byte boundary.
13632This enables more inlining and increases code
13633size, but may improve performance of code that depends on fast
13634\&\f(CW\*(C`memcpy\*(C'\fR, \f(CW\*(C`strlen\*(C'\fR,
13635and \f(CW\*(C`memset\*(C'\fR for short lengths.
13636.IP "\fB\-minline\-stringops\-dynamically\fR" 4
13637.IX Item "-minline-stringops-dynamically"
13638For string operations of unknown size, use run-time checks with
13639inline 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"
13642Override the internal decision heuristic for the particular algorithm to use
13643for 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
13653Expand 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
13662Expand into an inline loop.
13663.IP "\fBlibcall\fR" 4
13664.IX Item "libcall"
13665Always 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"
13671Don't keep the frame pointer in a register for leaf functions. This
13672avoids the instructions to save, set up, and restore frame pointers and
13673makes an extra register available in leaf functions. The option
13674\&\fB\-fomit\-leaf\-frame\-pointer\fR removes the frame pointer for leaf functions,
13675which 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
13682Controls 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),
13684or whether the thread base pointer must be added. Whether or not this
13685is valid depends on the operating system, and whether it maps the
13686segment to cover the entire \s-1TLS\s0 area.
13687.Sp
13688For 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
13695Specify that the assembler should encode \s-1SSE\s0 instructions with \s-1VEX\s0
13696prefix. 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
13703If profiling is active (\fB\-pg\fR), put the profiling
13704counter call before the prologue.
13705Note: On x86 architectures the attribute \f(CW\*(C`ms_hook_prologue\*(C'\fR
13706isn'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
13713On some processors, like Intel Atom, 8\-bit unsigned integer divide is
13714much faster than 32\-bit/64\-bit integer divide. This option generates a
13715run-time check. If both dividend and divisor are within range of 0
13716to 255, 8\-bit unsigned integer divide is used instead of
1371732\-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
13724Split 32\-byte \s-1AVX\s0 unaligned load and store.
13725.PP
13726These \fB\-m\fR switches are supported in addition to the above
13727on 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
13736Generate code for a 32\-bit or 64\-bit environment.
13737The \fB\-m32\fR option sets \f(CW\*(C`int\*(C'\fR, \f(CW\*(C`long\*(C'\fR, and pointer types
13738to 32 bits, and
13739generates code that runs on any i386 system.
13740.Sp
13741The \fB\-m64\fR option sets \f(CW\*(C`int\*(C'\fR to 32 bits and \f(CW\*(C`long\*(C'\fR and pointer
13742types to 64 bits, and generates code for the x86\-64 architecture.
13743For Darwin only the \fB\-m64\fR option also turns off the \fB\-fno\-pic\fR
13744and \fB\-mdynamic\-no\-pic\fR options.
13745.Sp
13746The \fB\-mx32\fR option sets \f(CW\*(C`int\*(C'\fR, \f(CW\*(C`long\*(C'\fR, and pointer types
13747to 32 bits, and
13748generates code for the x86\-64 architecture.
13749.IP "\fB\-mno\-red\-zone\fR" 4
13750.IX Item "-mno-red-zone"
13751Do not use a so-called \*(L"red zone\*(R" for x86\-64 code. The red zone is mandated
13752by the x86\-64 \s-1ABI\s0; it is a 128\-byte area beyond the location of the
13753stack pointer that is not modified by signal or interrupt handlers
13754and therefore can be used for temporary data without adjusting the stack
13755pointer. The flag \fB\-mno\-red\-zone\fR disables this red zone.
13756.IP "\fB\-mcmodel=small\fR" 4
13757.IX Item "-mcmodel=small"
13758Generate code for the small code model: the program and its symbols must
13759be linked in the lower 2 \s-1GB\s0 of the address space. Pointers are 64 bits.
13760Programs can be statically or dynamically linked. This is the default
13761code model.
13762.IP "\fB\-mcmodel=kernel\fR" 4
13763.IX Item "-mcmodel=kernel"
13764Generate code for the kernel code model. The kernel runs in the
13765negative 2 \s-1GB\s0 of the address space.
13766This model has to be used for Linux kernel code.
13767.IP "\fB\-mcmodel=medium\fR" 4
13768.IX Item "-mcmodel=medium"
13769Generate 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
13771with sizes larger than \fB\-mlarge\-data\-threshold\fR are put into
13772large data or \s-1BSS\s0 sections and can be located above 2GB. Programs can
13773be statically or dynamically linked.
13774.IP "\fB\-mcmodel=large\fR" 4
13775.IX Item "-mcmodel=large"
13776Generate code for the large model. This model makes no assumptions
13777about addresses and sizes of sections.
13778.IP "\fB\-maddress\-mode=long\fR" 4
13779.IX Item "-maddress-mode=long"
13780Generate code for long address mode. This is only supported for 64\-bit
13781and x32 environments. It is the default address mode for 64\-bit
13782environments.
13783.IP "\fB\-maddress\-mode=short\fR" 4
13784.IX Item "-maddress-mode=short"
13785Generate code for short address mode. This is only supported for 32\-bit
13786and x32 environments. It is the default address mode for 32\-bit and
13787x32 environments.
13788.PP
13789\fIi386 and x86\-64 Windows Options\fR
13790.IX Subsection "i386 and x86-64 Windows Options"
13791.PP
13792These additional options are available for Microsoft Windows targets:
13793.IP "\fB\-mconsole\fR" 4
13794.IX Item "-mconsole"
13795This option
13796specifies that a console application is to be generated, by
13797instructing the linker to set the \s-1PE\s0 header subsystem type
13798required for console applications.
13799This option is available for Cygwin and MinGW targets and is
13800enabled by default on those targets.
13801.IP "\fB\-mdll\fR" 4
13802.IX Item "-mdll"
13803This option is available for Cygwin and MinGW targets. It
13804specifies that a DLL\-\-\-a dynamic link library\-\-\-is to be
13805generated, enabling the selection of the required runtime
13806startup object and entry point.
13807.IP "\fB\-mnop\-fun\-dllimport\fR" 4
13808.IX Item "-mnop-fun-dllimport"
13809This option is available for Cygwin and MinGW targets. It
13810specifies that the \f(CW\*(C`dllimport\*(C'\fR attribute should be ignored.
13811.IP "\fB\-mthread\fR" 4
13812.IX Item "-mthread"
13813This option is available for MinGW targets. It specifies
13814that MinGW-specific thread support is to be used.
13815.IP "\fB\-municode\fR" 4
13816.IX Item "-municode"
13817This option is available for MinGW\-w64 targets. It causes
13818the \f(CW\*(C`UNICODE\*(C'\fR preprocessor macro to be predefined, and
13819chooses Unicode-capable runtime startup code.
13820.IP "\fB\-mwin32\fR" 4
13821.IX Item "-mwin32"
13822This option is available for Cygwin and MinGW targets. It
13823specifies that the typical Microsoft Windows predefined macros are to
13824be set in the pre-processor, but does not influence the choice
13825of runtime library/startup code.
13826.IP "\fB\-mwindows\fR" 4
13827.IX Item "-mwindows"
13828This option is available for Cygwin and MinGW targets. It
13829specifies that a \s-1GUI\s0 application is to be generated by
13830instructing the linker to set the \s-1PE\s0 header subsystem type
13831appropriately.
13832.IP "\fB\-fno\-set\-stack\-executable\fR" 4
13833.IX Item "-fno-set-stack-executable"
13834This option is available for MinGW targets. It specifies that
13835the executable flag for the stack used by nested functions isn't
13836set. This is necessary for binaries running in kernel mode of
13837Microsoft Windows, as there the User32 \s-1API\s0, which is used to set executable
13838privileges, isn't available.
13839.IP "\fB\-fwritable\-relocated\-rdata\fR" 4
13840.IX Item "-fwritable-relocated-rdata"
13841This option is available for MinGW and Cygwin targets. It specifies
13842that relocated-data in read-only section is put into .data
13843section. This is a necessary for older runtimes not supporting
13844modification of .rdata sections for pseudo-relocation.
13845.IP "\fB\-mpe\-aligned\-commons\fR" 4
13846.IX Item "-mpe-aligned-commons"
13847This option is available for Cygwin and MinGW targets. It
13848specifies that the \s-1GNU\s0 extension to the \s-1PE\s0 file format that
13849permits the correct alignment of \s-1COMMON\s0 variables should be
13850used when generating code. It is enabled by default if
13851\&\s-1GCC\s0 detects that the target assembler found during configuration
13852supports the feature.
13853.PP
13854See 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
13859These 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"
13862Generate 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"
13865Generate code for a little-endian target. This is the default for \s-1AIX5\s0
13866and 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
13873Generate (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
13880Generate (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"
13883Generate code that does not use a global pointer register. The result
13884is 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
13891Generate (or don't) a stop bit immediately before and after volatile asm
13892statements.
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
13899Generate (or don't) \fBin\fR, \fBloc\fR, and \fBout\fR register names for
13900the 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
13907Disable (or enable) optimizations that use the small data section. This may
13908be useful for working around optimizer bugs.
13909.IP "\fB\-mconstant\-gp\fR" 4
13910.IX Item "-mconstant-gp"
13911Generate code that uses a single constant global pointer value. This is
13912useful when compiling kernel code.
13913.IP "\fB\-mauto\-pic\fR" 4
13914.IX Item "-mauto-pic"
13915Generate code that is self-relocatable. This implies \fB\-mconstant\-gp\fR.
13916This is useful when compiling firmware code.
13917.IP "\fB\-minline\-float\-divide\-min\-latency\fR" 4
13918.IX Item "-minline-float-divide-min-latency"
13919Generate code for inline divides of floating-point values
13920using the minimum latency algorithm.
13921.IP "\fB\-minline\-float\-divide\-max\-throughput\fR" 4
13922.IX Item "-minline-float-divide-max-throughput"
13923Generate code for inline divides of floating-point values
13924using the maximum throughput algorithm.
13925.IP "\fB\-mno\-inline\-float\-divide\fR" 4
13926.IX Item "-mno-inline-float-divide"
13927Do 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"
13930Generate code for inline divides of integer values
13931using the minimum latency algorithm.
13932.IP "\fB\-minline\-int\-divide\-max\-throughput\fR" 4
13933.IX Item "-minline-int-divide-max-throughput"
13934Generate code for inline divides of integer values
13935using the maximum throughput algorithm.
13936.IP "\fB\-mno\-inline\-int\-divide\fR" 4
13937.IX Item "-mno-inline-int-divide"
13938Do 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"
13941Generate code for inline square roots
13942using the minimum latency algorithm.
13943.IP "\fB\-minline\-sqrt\-max\-throughput\fR" 4
13944.IX Item "-minline-sqrt-max-throughput"
13945Generate code for inline square roots
13946using the maximum throughput algorithm.
13947.IP "\fB\-mno\-inline\-sqrt\fR" 4
13948.IX Item "-mno-inline-sqrt"
13949Do 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
13956Do (don't) generate code that uses the fused multiply/add or multiply/subtract
13957instructions. 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
13964Don't (or do) generate assembler code for the \s-1DWARF\s0 2 line number debugging
13965info. 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
13972Allow stop bits to be placed earlier than immediately preceding the
13973instruction that triggered the stop bit. This can improve instruction
13974scheduling, but does not always do so.
13975.IP "\fB\-mfixed\-range=\fR\fIregister-range\fR" 4
13976.IX Item "-mfixed-range=register-range"
13977Generate code treating the given register range as fixed registers.
13978A fixed register is one that the register allocator cannot use. This is
13979useful when compiling kernel code. A register range is specified as
13980two registers separated by a dash. Multiple register ranges can be
13981specified separated by a comma.
13982.IP "\fB\-mtls\-size=\fR\fItls-size\fR" 4
13983.IX Item "-mtls-size=tls-size"
13984Specify bit size of immediate \s-1TLS\s0 offsets. Valid values are 14, 22, and
1398564.
13986.IP "\fB\-mtune=\fR\fIcpu-type\fR" 4
13987.IX Item "-mtune=cpu-type"
13988Tune the instruction scheduling for a particular \s-1CPU\s0, Valid values are
13989\&\fBitanium\fR, \fBitanium1\fR, \fBmerced\fR, \fBitanium2\fR,
13990and \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
13997Generate code for a 32\-bit or 64\-bit environment.
13998The 32\-bit environment sets int, long and pointer to 32 bits.
13999The 64\-bit environment sets int to 32 bits and long and pointer
14000to 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.
14008This results in generation of \f(CW\*(C`ld.a\*(C'\fR instructions and
14009the corresponding check instructions (\f(CW\*(C`ld.c\*(C'\fR / \f(CW\*(C`chk.a\*(C'\fR).
14010The 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.
14018This results in generation of \f(CW\*(C`ld.a\*(C'\fR instructions and
14019the corresponding check instructions (\f(CW\*(C`ld.c\*(C'\fR / \f(CW\*(C`chk.a\*(C'\fR).
14020The 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
14028available only during region scheduling (i.e. before reload).
14029This results in generation of the \f(CW\*(C`ld.s\*(C'\fR instructions and
14030the corresponding check instructions \f(CW\*(C`chk.s\*(C'\fR.
14031The 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
14039are dependent on the data speculative loads before reload.
14040This is effective only with \fB\-msched\-br\-data\-spec\fR enabled.
14041The 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
14049are dependent on the data speculative loads after reload.
14050This is effective only with \fB\-msched\-ar\-data\-spec\fR enabled.
14051The 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
14059are dependent on the control speculative loads.
14060This is effective only with \fB\-msched\-control\-spec\fR enabled.
14061The 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
14068If enabled, data-speculative instructions are chosen for schedule
14069only if there are no other choices at the moment. This makes
14070the use of the data speculation much more conservative.
14071The 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
14078If enabled, control-speculative instructions are chosen for schedule
14079only if there are no other choices at the moment. This makes
14080the use of the control speculation much more conservative.
14081The 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
14088If enabled, speculative dependencies are considered during
14089computation of the instructions priorities. This makes the use of the
14090speculation a bit more conservative.
14091The default is 'disable'.
14092.IP "\fB\-msched\-spec\-ldc\fR" 4
14093.IX Item "-msched-spec-ldc"
14094Use 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"
14097Use 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"
14100Place a stop bit after every cycle when scheduling. This option is on
14101by default.
14102.IP "\fB\-msched\-fp\-mem\-deps\-zero\-cost\fR" 4
14103.IX Item "-msched-fp-mem-deps-zero-cost"
14104Assume that floating-point stores and loads are not likely to cause a conflict
14105when placed into the same instruction group. This option is disabled by
14106default.
14107.IP "\fB\-msel\-sched\-dont\-check\-control\-spec\fR" 4
14108.IX Item "-msel-sched-dont-check-control-spec"
14109Generate checks for control speculation in selective scheduling.
14110This 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"
14113Limit on the number of memory insns per instruction group, giving lower
14114priority to subsequent memory insns attempting to schedule in the same
14115instruction group. Frequently useful to prevent cache bank conflicts.
14116The default value is 1.
14117.IP "\fB\-msched\-max\-memory\-insns\-hard\-limit\fR" 4
14118.IX Item "-msched-max-memory-insns-hard-limit"
14119Makes the limit specified by \fBmsched-max-memory-insns\fR a hard limit,
14120disallowing more than that number in an instruction group.
14121Otherwise, the limit is \*(L"soft\*(R", meaning that non-memory operations
14122are preferred when the limit is reached, but memory operations may still
14123be scheduled.
14124.PP
14125\fI\s-1LM32\s0 Options\fR
14126.IX Subsection "LM32 Options"
14127.PP
14128These \fB\-m\fR options are defined for the LatticeMico32 architecture:
14129.IP "\fB\-mbarrel\-shift\-enabled\fR" 4
14130.IX Item "-mbarrel-shift-enabled"
14131Enable barrel-shift instructions.
14132.IP "\fB\-mdivide\-enabled\fR" 4
14133.IX Item "-mdivide-enabled"
14134Enable divide and modulus instructions.
14135.IP "\fB\-mmultiply\-enabled\fR" 4
14136.IX Item "-mmultiply-enabled"
14137Enable multiply instructions.
14138.IP "\fB\-msign\-extend\-enabled\fR" 4
14139.IX Item "-msign-extend-enabled"
14140Enable sign extend instructions.
14141.IP "\fB\-muser\-enabled\fR" 4
14142.IX Item "-muser-enabled"
14143Enable 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"
14149Select 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
14152the M32C/80 series.
14153.IP "\fB\-msim\fR" 4
14154.IX Item "-msim"
14155Specifies that the program will be run on the simulator. This causes
14156an alternate runtime library to be linked in which supports, for
14157example, file I/O. You must not use this option when generating
14158programs that will run on real hardware; you must provide your own
14159runtime library for whatever I/O functions are needed.
14160.IP "\fB\-memregs=\fR\fInumber\fR" 4
14161.IX Item "-memregs=number"
14162Specifies the number of memory-based pseudo-registers \s-1GCC\s0 uses
14163during code generation. These pseudo-registers are used like real
14164registers, so there is a tradeoff between \s-1GCC\s0's ability to fit the
14165code into available registers, and the performance penalty of using
14166memory instead of registers. Note that all modules in a program must
14167be compiled with the same value for this option. Because of that, you
14168must 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
14173These \fB\-m\fR options are defined for Renesas M32R/D architectures:
14174.IP "\fB\-m32r2\fR" 4
14175.IX Item "-m32r2"
14176Generate code for the M32R/2.
14177.IP "\fB\-m32rx\fR" 4
14178.IX Item "-m32rx"
14179Generate code for the M32R/X.
14180.IP "\fB\-m32r\fR" 4
14181.IX Item "-m32r"
14182Generate code for the M32R. This is the default.
14183.IP "\fB\-mmodel=small\fR" 4
14184.IX Item "-mmodel=small"
14185Assume all objects live in the lower 16MB of memory (so that their addresses
14186can be loaded with the \f(CW\*(C`ld24\*(C'\fR instruction), and assume all subroutines
14187are reachable with the \f(CW\*(C`bl\*(C'\fR instruction.
14188This is the default.
14189.Sp
14190The 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"
14194Assume objects may be anywhere in the 32\-bit address space (the compiler
14195generates \f(CW\*(C`seth/add3\*(C'\fR instructions to load their addresses), and
14196assume 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"
14199Assume objects may be anywhere in the 32\-bit address space (the compiler
14200generates \f(CW\*(C`seth/add3\*(C'\fR instructions to load their addresses), and
14201assume 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
14203instruction sequence).
14204.IP "\fB\-msdata=none\fR" 4
14205.IX Item "-msdata=none"
14206Disable use of the small data area. Variables are put into
14207one of \fB.data\fR, \fB.bss\fR, or \fB.rodata\fR (unless the
14208\&\f(CW\*(C`section\*(C'\fR attribute has been specified).
14209This is the default.
14210.Sp
14211The small data area consists of sections \fB.sdata\fR and \fB.sbss\fR.
14212Objects 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"
14216Put small global and static data in the small data area, but do not
14217generate special code to reference them.
14218.IP "\fB\-msdata=use\fR" 4
14219.IX Item "-msdata=use"
14220Put small global and static data in the small data area, and generate
14221special instructions to reference them.
14222.IP "\fB\-G\fR \fInum\fR" 4
14223.IX Item "-G num"
14224Put global and static objects less than or equal to \fInum\fR bytes
14225into the small data or \s-1BSS\s0 sections instead of the normal data or \s-1BSS\s0
14226sections. The default value of \fInum\fR is 8.
14227The \fB\-msdata\fR option must be set to one of \fBsdata\fR or \fBuse\fR
14228for this option to have any effect.
14229.Sp
14230All modules should be compiled with the same \fB\-G\fR \fInum\fR value.
14231Compiling with different values of \fInum\fR may or may not work; if it
14232doesn't the linker gives an error message\-\-\-incorrect code is not
14233generated.
14234.IP "\fB\-mdebug\fR" 4
14235.IX Item "-mdebug"
14236Makes the M32R\-specific code in the compiler display some statistics
14237that might help in debugging programs.
14238.IP "\fB\-malign\-loops\fR" 4
14239.IX Item "-malign-loops"
14240Align all loops to a 32\-byte boundary.
14241.IP "\fB\-mno\-align\-loops\fR" 4
14242.IX Item "-mno-align-loops"
14243Do 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"
14246Issue \fInumber\fR instructions per cycle. \fInumber\fR can only be 1
14247or 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
14251preferred 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"
14254Specifies the trap number to use to flush the cache. The default is
1425512. Valid numbers are between 0 and 15 inclusive.
14256.IP "\fB\-mno\-flush\-trap\fR" 4
14257.IX Item "-mno-flush-trap"
14258Specifies 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"
14261Specifies the name of the operating system function to call to flush
14262the cache. The default is \fI_flush_cache\fR, but a function call
14263is only used if a trap is not available.
14264.IP "\fB\-mno\-flush\-func\fR" 4
14265.IX Item "-mno-flush-func"
14266Indicates 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
14271These are the \fB\-m\fR options defined for M680x0 and ColdFire processors.
14272The default settings depend on which architecture was selected when
14273the compiler was configured; the defaults for the most common choices
14274are given below.
14275.IP "\fB\-march=\fR\fIarch\fR" 4
14276.IX Item "-march=arch"
14277Generate code for a specific M680x0 or ColdFire instruction set
14278architecture. Permissible values of \fIarch\fR for M680x0
14279architectures are: \fB68000\fR, \fB68010\fR, \fB68020\fR,
14280\&\fB68030\fR, \fB68040\fR, \fB68060\fR and \fBcpu32\fR. ColdFire
14281architectures are selected according to Freescale's \s-1ISA\s0 classification
14282and 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
14286code for a ColdFire target. The \fIarch\fR in this macro is one of the
14287\&\fB\-march\fR arguments given above.
14288.Sp
14289When used together, \fB\-march\fR and \fB\-mtune\fR select code
14290that runs on a family of similar processors but that is optimized
14291for a particular microarchitecture.
14292.IP "\fB\-mcpu=\fR\fIcpu\fR" 4
14293.IX Item "-mcpu=cpu"
14294Generate code for a specific M680x0 or ColdFire processor.
14295The M680x0 \fIcpu\fRs are: \fB68000\fR, \fB68010\fR, \fB68020\fR,
14296\&\fB68030\fR, \fB68040\fR, \fB68060\fR, \fB68302\fR, \fB68332\fR
14297and \fBcpu32\fR. The ColdFire \fIcpu\fRs are given by the table
14298below, 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,
14359where 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"
14363Tune the code for a particular microarchitecture within the
14364constraints set by \fB\-march\fR and \fB\-mcpu\fR.
14365The M680x0 microarchitectures are: \fB68000\fR, \fB68010\fR,
14366\&\fB68020\fR, \fB68030\fR, \fB68040\fR, \fB68060\fR
14367and \fBcpu32\fR. The ColdFire microarchitectures
14368are: \fBcfv1\fR, \fBcfv2\fR, \fBcfv3\fR, \fBcfv4\fR and \fBcfv4e\fR.
14369.Sp
14370You can also use \fB\-mtune=68020\-40\fR for code that needs
14371to run relatively well on 68020, 68030 and 68040 targets.
14372\&\fB\-mtune=68020\-60\fR is similar but includes 68060 targets
14373as 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
14377when 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
14379option is used. If \s-1GCC\s0 is tuning for a range of architectures,
14380as selected by \fB\-mtune=68020\-40\fR or \fB\-mtune=68020\-60\fR,
14381it 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
14384ColdFire microarchitecture \fIuarch\fR, where \fIuarch\fR is one
14385of 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
14392Generate output for a 68000. This is the default
14393when the compiler is configured for 68000\-based systems.
14394It is equivalent to \fB\-march=68000\fR.
14395.Sp
14396Use this option for microcontrollers with a 68000 or \s-1EC000\s0 core,
14397including the 68008, 68302, 68306, 68307, 68322, 68328 and 68356.
14398.IP "\fB\-m68010\fR" 4
14399.IX Item "-m68010"
14400Generate output for a 68010. This is the default
14401when the compiler is configured for 68010\-based systems.
14402It 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
14409Generate output for a 68020. This is the default
14410when the compiler is configured for 68020\-based systems.
14411It is equivalent to \fB\-march=68020\fR.
14412.IP "\fB\-m68030\fR" 4
14413.IX Item "-m68030"
14414Generate output for a 68030. This is the default when the compiler is
14415configured for 68030\-based systems. It is equivalent to
14416\&\fB\-march=68030\fR.
14417.IP "\fB\-m68040\fR" 4
14418.IX Item "-m68040"
14419Generate output for a 68040. This is the default when the compiler is
14420configured for 68040\-based systems. It is equivalent to
14421\&\fB\-march=68040\fR.
14422.Sp
14423This option inhibits the use of 68881/68882 instructions that have to be
14424emulated by software on the 68040. Use this option if your 68040 does not
14425have code to emulate those instructions.
14426.IP "\fB\-m68060\fR" 4
14427.IX Item "-m68060"
14428Generate output for a 68060. This is the default when the compiler is
14429configured for 68060\-based systems. It is equivalent to
14430\&\fB\-march=68060\fR.
14431.Sp
14432This option inhibits the use of 68020 and 68881/68882 instructions that
14433have to be emulated by software on the 68060. Use this option if your 68060
14434does not have code to emulate those instructions.
14435.IP "\fB\-mcpu32\fR" 4
14436.IX Item "-mcpu32"
14437Generate output for a \s-1CPU32\s0. This is the default
14438when the compiler is configured for CPU32\-based systems.
14439It is equivalent to \fB\-march=cpu32\fR.
14440.Sp
14441Use this option for microcontrollers with a
14442\&\s-1CPU32\s0 or \s-1CPU32+\s0 core, including the 68330, 68331, 68332, 68333, 68334,
1444368336, 68340, 68341, 68349 and 68360.
14444.IP "\fB\-m5200\fR" 4
14445.IX Item "-m5200"
14446Generate output for a 520X ColdFire \s-1CPU\s0. This is the default
14447when the compiler is configured for 520X\-based systems.
14448It is equivalent to \fB\-mcpu=5206\fR, and is now deprecated
14449in favor of that option.
14450.Sp
14451Use this option for microcontroller with a 5200 core, including
14452the \s-1MCF5202\s0, \s-1MCF5203\s0, \s-1MCF5204\s0 and \s-1MCF5206\s0.
14453.IP "\fB\-m5206e\fR" 4
14454.IX Item "-m5206e"
14455Generate output for a 5206e ColdFire \s-1CPU\s0. The option is now
14456deprecated in favor of the equivalent \fB\-mcpu=5206e\fR.
14457.IP "\fB\-m528x\fR" 4
14458.IX Item "-m528x"
14459Generate output for a member of the ColdFire 528X family.
14460The option is now deprecated in favor of the equivalent
14461\&\fB\-mcpu=528x\fR.
14462.IP "\fB\-m5307\fR" 4
14463.IX Item "-m5307"
14464Generate output for a ColdFire 5307 \s-1CPU\s0. The option is now deprecated
14465in favor of the equivalent \fB\-mcpu=5307\fR.
14466.IP "\fB\-m5407\fR" 4
14467.IX Item "-m5407"
14468Generate output for a ColdFire 5407 \s-1CPU\s0. The option is now deprecated
14469in favor of the equivalent \fB\-mcpu=5407\fR.
14470.IP "\fB\-mcfv4e\fR" 4
14471.IX Item "-mcfv4e"
14472Generate output for a ColdFire V4e family \s-1CPU\s0 (e.g. 547x/548x).
14473This includes use of hardware floating-point instructions.
14474The option is equivalent to \fB\-mcpu=547x\fR, and is now
14475deprecated in favor of that option.
14476.IP "\fB\-m68020\-40\fR" 4
14477.IX Item "-m68020-40"
14478Generate output for a 68040, without using any of the new instructions.
14479This results in code that can run relatively efficiently on either a
1448068020/68881 or a 68030 or a 68040. The generated code does use the
1448168881 instructions that are emulated on the 68040.
14482.Sp
14483The 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"
14486Generate output for a 68060, without using any of the new instructions.
14487This results in code that can run relatively efficiently on either a
1448868020/68881 or a 68030 or a 68040. The generated code does use the
1448968881 instructions that are emulated on the 68060.
14490.Sp
14491The 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
14498Generate floating-point instructions. This is the default for 68020
14499and above, and for ColdFire devices that have an \s-1FPU\s0. It defines the
14500macro \fB_\|_HAVE_68881_\|_\fR on M680x0 targets and \fB_\|_mcffpu_\|_\fR
14501on ColdFire targets.
14502.IP "\fB\-msoft\-float\fR" 4
14503.IX Item "-msoft-float"
14504Do not generate floating-point instructions; use library calls instead.
14505This is the default for 68000, 68010, and 68832 targets. It is also
14506the 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
14513Generate (do not generate) ColdFire hardware divide and remainder
14514instructions. If \fB\-march\fR is used without \fB\-mcpu\fR,
14515the default is \*(L"on\*(R" for ColdFire architectures and \*(L"off\*(R" for M680x0
14516architectures. 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
14518example, 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"
14524Consider type \f(CW\*(C`int\*(C'\fR to be 16 bits wide, like \f(CW\*(C`short int\*(C'\fR.
14525Additionally, parameters passed on the stack are also aligned to a
1452616\-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"
14529Do 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
14536Do not use the bit-field instructions. The \fB\-m68000\fR, \fB\-mcpu32\fR
14537and \fB\-m5200\fR options imply \fB\-mnobitfield\fR.
14538.IP "\fB\-mbitfield\fR" 4
14539.IX Item "-mbitfield"
14540Do use the bit-field instructions. The \fB\-m68020\fR option implies
14541\&\fB\-mbitfield\fR. This is the default if you use a configuration
14542designed for a 68020.
14543.IP "\fB\-mrtd\fR" 4
14544.IX Item "-mrtd"
14545Use a different function-calling convention, in which functions
14546that take a fixed number of arguments return with the \f(CW\*(C`rtd\*(C'\fR
14547instruction, which pops their arguments while returning. This
14548saves one instruction in the caller since there is no need to pop
14549the arguments there.
14550.Sp
14551This calling convention is incompatible with the one normally
14552used on Unix, so you cannot use it if you need to call libraries
14553compiled with the Unix compiler.
14554.Sp
14555Also, you must provide function prototypes for all functions that
14556take variable numbers of arguments (including \f(CW\*(C`printf\*(C'\fR);
14557otherwise incorrect code is generated for calls to those
14558functions.
14559.Sp
14560In addition, seriously incorrect code results if you call a
14561function with too many arguments. (Normally, extra arguments are
14562harmlessly ignored.)
14563.Sp
14564The \f(CW\*(C`rtd\*(C'\fR instruction is supported by the 68010, 68020, 68030,
1456568040, 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"
14568Do not use the calling conventions selected by \fB\-mrtd\fR.
14569This 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
14576Control 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
14578boundary (\fB\-malign\-int\fR) or a 16\-bit boundary (\fB\-mno\-align\-int\fR).
14579Aligning variables on 32\-bit boundaries produces code that runs somewhat
14580faster 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
14583aligns structures containing the above types differently than
14584most published application binary interface specifications for the m68k.
14585.IP "\fB\-mpcrel\fR" 4
14586.IX Item "-mpcrel"
14587Use the pc-relative addressing mode of the 68000 directly, instead of
14588using a global offset table. At present, this option implies \fB\-fpic\fR,
14589allowing at most a 16\-bit offset for pc-relative addressing. \fB\-fPIC\fR is
14590not presently supported with \fB\-mpcrel\fR, though this could be supported for
1459168020 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
14598Do not (do) assume that unaligned memory references are handled by
14599the system.
14600.IP "\fB\-msep\-data\fR" 4
14601.IX Item "-msep-data"
14602Generate code that allows the data segment to be located in a different
14603area of memory from the text segment. This allows for execute-in-place in
14604an 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"
14608Generate code that assumes that the data segment follows the text segment.
14609This is the default.
14610.IP "\fB\-mid\-shared\-library\fR" 4
14611.IX Item "-mid-shared-library"
14612Generate code that supports shared libraries via the library \s-1ID\s0 method.
14613This allows for execute-in-place and shared libraries in an environment
14614without 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"
14617Generate code that doesn't assume ID-based shared libraries are being used.
14618This is the default.
14619.IP "\fB\-mshared\-library\-id=n\fR" 4
14620.IX Item "-mshared-library-id=n"
14621Specifies the identification number of the ID-based shared library being
14622compiled. Specifying a value of 0 generates more compact code; specifying
14623other values forces the allocation of that number to the current
14624library, 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
14631When generating position-independent code for ColdFire, generate code
14632that works if the \s-1GOT\s0 has more than 8192 entries. This code is
14633larger and slower than code generated without this option. On M680x0
14634processors, 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.
14637While this is relatively efficient, it only works if the \s-1GOT\s0
14638is smaller than about 64k. Anything larger causes the linker
14639to report an error such as:
14640.Sp
14641.Vb 1
14642\& relocation truncated to fit: R_68K_GOT16O foobar
14643.Ve
14644.Sp
14645If this happens, you should recompile your code with \fB\-mxgot\fR.
14646It 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
14648the value of a global symbol.
14649.Sp
14650Note that some linkers, including newer versions of the \s-1GNU\s0 linker,
14651can create multiple GOTs and sort \s-1GOT\s0 entries. If you have such a linker,
14652you should only need to use \fB\-mxgot\fR when compiling a single
14653object file that accesses more than 8192 \s-1GOT\s0 entries. Very few do.
14654.Sp
14655These options have no effect unless \s-1GCC\s0 is generating
14656position-independent code.
14657.PP
14658\fIMCore Options\fR
14659.IX Subsection "MCore Options"
14660.PP
14661These are the \fB\-m\fR options defined for the Motorola M*Core
14662processors.
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
14669Inline constants into the code stream if it can be done in two
14670instructions 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
14677Use 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
14684Allow 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
14691Always 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
14698Force 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
14705Emit 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
14712Prefer 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
14719Generate 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
14726Generate code for the 210 processor.
14727.IP "\fB\-mno\-lsim\fR" 4
14728.IX Item "-mno-lsim"
14729Assume that runtime support has been provided and so omit the
14730simulator library (\fIlibsim.a)\fR from the linker command line.
14731.IP "\fB\-mstack\-increment=\fR\fIsize\fR" 4
14732.IX Item "-mstack-increment=size"
14733Set the maximum amount for a single stack increment operation. Large
14734values can increase the speed of programs that contain functions
14735that need a large amount of stack space, but they can also trigger a
14736segmentation fault if the stack is extended too much. The default
14737value is 0x1000.
14738.PP
14739\fIMeP Options\fR
14740.IX Subsection "MeP Options"
14741.IP "\fB\-mabsdiff\fR" 4
14742.IX Item "-mabsdiff"
14743Enables the \f(CW\*(C`abs\*(C'\fR instruction, which is the absolute difference
14744between two registers.
14745.IP "\fB\-mall\-opts\fR" 4
14746.IX Item "-mall-opts"
14747Enables all the optional instructions\-\-\-average, multiply, divide, bit
14748operations, leading zero, absolute difference, min/max, clip, and
14749saturation.
14750.IP "\fB\-maverage\fR" 4
14751.IX Item "-maverage"
14752Enables the \f(CW\*(C`ave\*(C'\fR instruction, which computes the average of two
14753registers.
14754.IP "\fB\-mbased=\fR\fIn\fR" 4
14755.IX Item "-mbased=n"
14756Variables 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
14758register 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"
14762Enables 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
14764test-and-set (\f(CW\*(C`tas\*(C'\fR).
14765.IP "\fB\-mc=\fR\fIname\fR" 4
14766.IX Item "-mc=name"
14767Selects which section constant data is placed in. \fIname\fR may
14768be \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"
14771Enables the \f(CW\*(C`clip\*(C'\fR instruction. Note that \f(CW\*(C`\-mclip\*(C'\fR is not
14772useful unless you also provide \f(CW\*(C`\-mminmax\*(C'\fR.
14773.IP "\fB\-mconfig=\fR\fIname\fR" 4
14774.IX Item "-mconfig=name"
14775Selects one of the built-in core configurations. Each MeP chip has
14776one or more modules in it; each module has a core \s-1CPU\s0 and a variety of
14777coprocessors, optional instructions, and peripherals. The
14778\&\f(CW\*(C`MeP\-Integrator\*(C'\fR tool, not part of \s-1GCC\s0, provides these
14779configurations through this option; using this option is the same as
14780using all the corresponding command-line options. The default
14781configuration is \f(CW\*(C`default\*(C'\fR.
14782.IP "\fB\-mcop\fR" 4
14783.IX Item "-mcop"
14784Enables the coprocessor instructions. By default, this is a 32\-bit
14785coprocessor. 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"
14789Enables the 32\-bit coprocessor's instructions.
14790.IP "\fB\-mcop64\fR" 4
14791.IX Item "-mcop64"
14792Enables the 64\-bit coprocessor's instructions.
14793.IP "\fB\-mivc2\fR" 4
14794.IX Item "-mivc2"
14795Enables \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"
14798Causes constant variables to be placed in the \f(CW\*(C`.near\*(C'\fR section.
14799.IP "\fB\-mdiv\fR" 4
14800.IX Item "-mdiv"
14801Enables 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"
14804Generate big-endian code.
14805.IP "\fB\-mel\fR" 4
14806.IX Item "-mel"
14807Generate little-endian code.
14808.IP "\fB\-mio\-volatile\fR" 4
14809.IX Item "-mio-volatile"
14810Tells the compiler that any variable marked with the \f(CW\*(C`io\*(C'\fR
14811attribute is to be considered volatile.
14812.IP "\fB\-ml\fR" 4
14813.IX Item "-ml"
14814Causes 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"
14817Enables the \f(CW\*(C`leadz\*(C'\fR (leading zero) instruction.
14818.IP "\fB\-mm\fR" 4
14819.IX Item "-mm"
14820Causes 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"
14823Enables 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"
14826Enables the multiplication and multiply-accumulate instructions.
14827.IP "\fB\-mno\-opts\fR" 4
14828.IX Item "-mno-opts"
14829Disables all the optional instructions enabled by \f(CW\*(C`\-mall\-opts\*(C'\fR.
14830.IP "\fB\-mrepeat\fR" 4
14831.IX Item "-mrepeat"
14832Enables the \f(CW\*(C`repeat\*(C'\fR and \f(CW\*(C`erepeat\*(C'\fR instructions, used for
14833low-overhead looping.
14834.IP "\fB\-ms\fR" 4
14835.IX Item "-ms"
14836Causes all variables to default to the \f(CW\*(C`.tiny\*(C'\fR section. Note
14837that there is a 65536\-byte limit to this section. Accesses to these
14838variables use the \f(CW%gp\fR base register.
14839.IP "\fB\-msatur\fR" 4
14840.IX Item "-msatur"
14841Enables the saturation instructions. Note that the compiler does not
14842currently generate these itself, but this option is included for
14843compatibility with other tools, like \f(CW\*(C`as\*(C'\fR.
14844.IP "\fB\-msdram\fR" 4
14845.IX Item "-msdram"
14846Link the SDRAM-based runtime instead of the default ROM-based runtime.
14847.IP "\fB\-msim\fR" 4
14848.IX Item "-msim"
14849Link the simulator runtime libraries.
14850.IP "\fB\-msimnovec\fR" 4
14851.IX Item "-msimnovec"
14852Link the simulator runtime libraries, excluding built-in support
14853for reset and exception vectors and tables.
14854.IP "\fB\-mtf\fR" 4
14855.IX Item "-mtf"
14856Causes all functions to default to the \f(CW\*(C`.far\*(C'\fR section. Without
14857this 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"
14860Variables 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
14862register. The default for this option is 4, but note that there's a
1486365536\-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"
14869Use software emulation for floating point (default).
14870.IP "\fB\-mhard\-float\fR" 4
14871.IX Item "-mhard-float"
14872Use hardware floating-point instructions.
14873.IP "\fB\-mmemcpy\fR" 4
14874.IX Item "-mmemcpy"
14875Do not optimize block moves, use \f(CW\*(C`memcpy\*(C'\fR.
14876.IP "\fB\-mno\-clearbss\fR" 4
14877.IX Item "-mno-clearbss"
14878This 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"
14881Use features of, and schedule code for, the given \s-1CPU\s0.
14882Supported values are in the format \fBv\fR\fIX\fR\fB.\fR\fI\s-1YY\s0\fR\fB.\fR\fIZ\fR,
14883where \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"
14888Use software multiply emulation (default).
14889.IP "\fB\-mxl\-soft\-div\fR" 4
14890.IX Item "-mxl-soft-div"
14891Use software emulation for divides (default).
14892.IP "\fB\-mxl\-barrel\-shift\fR" 4
14893.IX Item "-mxl-barrel-shift"
14894Use the hardware barrel shifter.
14895.IP "\fB\-mxl\-pattern\-compare\fR" 4
14896.IX Item "-mxl-pattern-compare"
14897Use pattern compare instructions.
14898.IP "\fB\-msmall\-divides\fR" 4
14899.IX Item "-msmall-divides"
14900Use table lookup optimization for small signed integer divisions.
14901.IP "\fB\-mxl\-stack\-check\fR" 4
14902.IX Item "-mxl-stack-check"
14903This option is deprecated. Use \fB\-fstack\-check\fR instead.
14904.IP "\fB\-mxl\-gp\-opt\fR" 4
14905.IX Item "-mxl-gp-opt"
14906Use 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"
14909Use multiply high instructions for high part of 32x32 multiply.
14910.IP "\fB\-mxl\-float\-convert\fR" 4
14911.IX Item "-mxl-float-convert"
14912Use hardware floating-point conversion instructions.
14913.IP "\fB\-mxl\-float\-sqrt\fR" 4
14914.IX Item "-mxl-float-sqrt"
14915Use hardware floating-point square root instruction.
14916.IP "\fB\-mbig\-endian\fR" 4
14917.IX Item "-mbig-endian"
14918Generate code for a big-endian target.
14919.IP "\fB\-mlittle\-endian\fR" 4
14920.IX Item "-mlittle-endian"
14921Generate code for a little-endian target.
14922.IP "\fB\-mxl\-reorder\fR" 4
14923.IX Item "-mxl-reorder"
14924Use 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"
14927Select application model \fIapp-model\fR. Valid models are
14928.RS 4
14929.IP "\fBexecutable\fR" 4
14930.IX Item "executable"
14931normal executable (default), uses startup code \fIcrt0.o\fR.
14932.IP "\fBxmdstub\fR" 4
14933.IX Item "xmdstub"
14934for use with Xilinx Microprocessor Debugger (\s-1XMD\s0) based
14935software 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"
14939for applications that are loaded using a bootloader.
14940This model uses startup file \fIcrt2.o\fR which does not contain a processor
14941reset vector handler. This is suitable for transferring control on a
14942processor reset to the bootloader rather than the application.
14943.IP "\fBnovectors\fR" 4
14944.IX Item "novectors"
14945for applications that do not require any of the
14946MicroBlaze vectors. This option may be useful for applications running
14947within a monitoring application. This model uses \fIcrt3.o\fR as a startup file.
14948.RE
14949.RS 4
14950.Sp
14951Option \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"
14959Generate big-endian code.
14960.IP "\fB\-EL\fR" 4
14961.IX Item "-EL"
14962Generate little-endian code. This is the default for \fBmips*el\-*\-*\fR
14963configurations.
14964.IP "\fB\-march=\fR\fIarch\fR" 4
14965.IX Item "-march=arch"
14966Generate code that runs on \fIarch\fR, which can be the name of a
14967generic \s-1MIPS\s0 \s-1ISA\s0, or the name of a particular processor.
14968The \s-1ISA\s0 names are:
14969\&\fBmips1\fR, \fBmips2\fR, \fBmips3\fR, \fBmips4\fR,
14970\&\fBmips32\fR, \fBmips32r2\fR, \fBmips64\fR and \fBmips64r2\fR.
14971The 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.
14994The special value \fBfrom-abi\fR selects the
14995most 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
14998The native Linux/GNU toolchain also supports the value \fBnative\fR,
14999which selects the best architecture option for the host processor.
15000\&\fB\-march=native\fR has no effect if \s-1GCC\s0 does not recognize
15001the processor.
15002.Sp
15003In 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
15007Names of the form \fIn\fR\fBf2_1\fR refer to processors with
15008FPUs 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
15010rate as the core, and names of the form \fIn\fR\fBf3_2\fR refer to
15011processors with FPUs clocked a ratio of 3:2 with respect to the core.
15012For compatibility reasons, \fIn\fR\fBf\fR is accepted as a synonym
15013for \fIn\fR\fBf2_1\fR while \fIn\fR\fBx\fR and \fIb\fR\fBfx\fR are
15014accepted 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
15017is \fB_MIPS_ARCH\fR, which gives the name of target architecture, as
15018a string. The second has the form \fB_MIPS_ARCH_\fR\fIfoo\fR,
15019where \fIfoo\fR is the capitalized value of \fB_MIPS_ARCH\fR.
15020For example, \fB\-march=r2000\fR sets \fB_MIPS_ARCH\fR
15021to \fB\*(L"r2000\*(R"\fR and defines the macro \fB_MIPS_ARCH_R2000\fR.
15022.Sp
15023Note that the \fB_MIPS_ARCH\fR macro uses the processor names given
15024above. In other words, it has the full prefix and does not
15025abbreviate \fB000\fR as \fBk\fR. In the case of \fBfrom-abi\fR,
15026the 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"
15031Optimize for \fIarch\fR. Among other things, this option controls
15032the way instructions are scheduled, and the perceived cost of arithmetic
15033operations. The list of \fIarch\fR values is the same as for
15034\&\fB\-march\fR.
15035.Sp
15036When this option is not used, \s-1GCC\s0 optimizes for the processor
15037specified by \fB\-march\fR. By using \fB\-march\fR and
15038\&\fB\-mtune\fR together, it is possible to generate code that
15039runs on a family of processors, but optimize the code for one
15040particular 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"
15047Equivalent to \fB\-march=mips1\fR.
15048.IP "\fB\-mips2\fR" 4
15049.IX Item "-mips2"
15050Equivalent to \fB\-march=mips2\fR.
15051.IP "\fB\-mips3\fR" 4
15052.IX Item "-mips3"
15053Equivalent to \fB\-march=mips3\fR.
15054.IP "\fB\-mips4\fR" 4
15055.IX Item "-mips4"
15056Equivalent to \fB\-march=mips4\fR.
15057.IP "\fB\-mips32\fR" 4
15058.IX Item "-mips32"
15059Equivalent to \fB\-march=mips32\fR.
15060.IP "\fB\-mips32r2\fR" 4
15061.IX Item "-mips32r2"
15062Equivalent to \fB\-march=mips32r2\fR.
15063.IP "\fB\-mips64\fR" 4
15064.IX Item "-mips64"
15065Equivalent to \fB\-march=mips64\fR.
15066.IP "\fB\-mips64r2\fR" 4
15067.IX Item "-mips64r2"
15068Equivalent 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
15075Generate (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
15079by 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"
15082Generate \s-1MIPS16\s0 code on alternating functions. This option is provided
15083for regression testing of mixed MIPS16/non\-MIPS16 code generation, and is
15084not 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
15091Require (do not require) that non\-MIPS16 code be link-compatible with
15092\&\s-1MIPS16\s0 code.
15093.Sp
15094For example, non\-MIPS16 code cannot jump directly to \s-1MIPS16\s0 code;
15095it must either use a call or an indirect jump. \fB\-minterlink\-mips16\fR
15096therefore disables direct jumps unless \s-1GCC\s0 knows that the target of the
15097jump 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
15110Generate code for the given \s-1ABI\s0.
15111.Sp
15112Note that the \s-1EABI\s0 has a 32\-bit and a 64\-bit variant. \s-1GCC\s0 normally
15113generates 64\-bit code when you select a 64\-bit architecture, but you
15114can use \fB\-mgp32\fR to get 32\-bit code instead.
15115.Sp
15116For 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
15120are 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
15122and \f(CW\*(C`mfhc1\*(C'\fR instructions and is therefore only supported for
15123\&\s-1MIPS32R2\s0 processors.
15124.Sp
15125The register assignments for arguments and return values remain the
15126same, but each scalar value is passed in a single 64\-bit register
15127rather than a pair of 32\-bit registers. For example, scalar
15128floating-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
15130remains 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
15137Generate (do not generate) code that is suitable for SVR4\-style
15138dynamic objects. \fB\-mabicalls\fR is the default for SVR4\-based
15139systems.
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
15146Generate (do not generate) code that is fully position-independent,
15147and that can therefore be linked into shared libraries. This option
15148only affects \fB\-mabicalls\fR.
15149.Sp
15150All \fB\-mabicalls\fR code has traditionally been position-independent,
15151regardless of options like \fB\-fPIC\fR and \fB\-fpic\fR. However,
15152as an extension, the \s-1GNU\s0 toolchain allows executables to use absolute
15153accesses for locally-binding symbols. It can also use shorter \s-1GP\s0
15154initialization sequences and generate direct calls to locally-defined
15155functions. 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
15158objects that can only be linked by the \s-1GNU\s0 linker. However, the option
15159does not affect the \s-1ABI\s0 of the final executable; it only affects the \s-1ABI\s0
15160of relocatable objects. Using \fB\-mno\-shared\fR generally makes
15161executables 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
15170Assume (do not assume) that the static and dynamic linkers
15171support PLTs and copy relocations. This option only affects
15172\&\fB\-mno\-shared \-mabicalls\fR. For the n64 \s-1ABI\s0, this option
15173has no effect without \fB\-msym32\fR.
15174.Sp
15175You 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
15184Lift (do not lift) the usual restrictions on the size of the global
15185offset table.
15186.Sp
15187\&\s-1GCC\s0 normally uses a single instruction to load values from the \s-1GOT\s0.
15188While this is relatively efficient, it only works if the \s-1GOT\s0
15189is smaller than about 64k. Anything larger causes the linker
15190to report an error such as:
15191.Sp
15192.Vb 1
15193\& relocation truncated to fit: R_MIPS_GOT16 foobar
15194.Ve
15195.Sp
15196If this happens, you should recompile your code with \fB\-mxgot\fR.
15197This works with very large GOTs, although the code is also
15198less efficient, since it takes three instructions to fetch the
15199value of a global symbol.
15200.Sp
15201Note that some linkers can create multiple GOTs. If you have such a
15202linker, you should only need to use \fB\-mxgot\fR when a single object
15203file accesses more than 64k's worth of \s-1GOT\s0 entries. Very few do.
15204.Sp
15205These options have no effect unless \s-1GCC\s0 is generating position
15206independent code.
15207.IP "\fB\-mgp32\fR" 4
15208.IX Item "-mgp32"
15209Assume that general-purpose registers are 32 bits wide.
15210.IP "\fB\-mgp64\fR" 4
15211.IX Item "-mgp64"
15212Assume that general-purpose registers are 64 bits wide.
15213.IP "\fB\-mfp32\fR" 4
15214.IX Item "-mfp32"
15215Assume that floating-point registers are 32 bits wide.
15216.IP "\fB\-mfp64\fR" 4
15217.IX Item "-mfp64"
15218Assume that floating-point registers are 64 bits wide.
15219.IP "\fB\-mhard\-float\fR" 4
15220.IX Item "-mhard-float"
15221Use floating-point coprocessor instructions.
15222.IP "\fB\-msoft\-float\fR" 4
15223.IX Item "-msoft-float"
15224Do not use floating-point coprocessor instructions. Implement
15225floating-point calculations using library calls instead.
15226.IP "\fB\-mno\-float\fR" 4
15227.IX Item "-mno-float"
15228Equivalent to \fB\-msoft\-float\fR, but additionally asserts that the
15229program being compiled does not perform any floating-point operations.
15230This option is presently supported only by some bare-metal \s-1MIPS\s0
15231configurations, where it may select a special set of libraries
15232that lack all floating-point support (including, for example, the
15233floating-point \f(CW\*(C`printf\*(C'\fR formats).
15234If code compiled with \f(CW\*(C`\-mno\-float\*(C'\fR accidentally contains
15235floating-point operations, it is likely to suffer a link-time
15236or run-time failure.
15237.IP "\fB\-msingle\-float\fR" 4
15238.IX Item "-msingle-float"
15239Assume that the floating-point coprocessor only supports single-precision
15240operations.
15241.IP "\fB\-mdouble\-float\fR" 4
15242.IX Item "-mdouble-float"
15243Assume that the floating-point coprocessor supports double-precision
15244operations. 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
15251Use (do not use) \fBll\fR, \fBsc\fR, and \fBsync\fR instructions to
15252implement atomic memory built-in functions. When neither option is
15253specified, \s-1GCC\s0 uses the instructions if the target architecture
15254supports them.
15255.Sp
15256\&\fB\-mllsc\fR is useful if the runtime environment can emulate the
15257instructions and \fB\-mno\-llsc\fR can be useful when compiling for
15258nonstandard ISAs. You can make either option the default by
15259configuring \s-1GCC\s0 with \fB\-\-with\-llsc\fR and \fB\-\-without\-llsc\fR
15260respectively. \fB\-\-with\-llsc\fR is the default for some
15261configurations; 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
15268Use (do not use) revision 1 of the \s-1MIPS\s0 \s-1DSP\s0 \s-1ASE\s0.
15269 This option defines the
15270preprocessor 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
15278Use (do not use) revision 2 of the \s-1MIPS\s0 \s-1DSP\s0 \s-1ASE\s0.
15279 This option defines the
15280preprocessor macros \fB_\|_mips_dsp\fR and \fB_\|_mips_dspr2\fR.
15281It 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
15288Use (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
15295Use (do not use) paired-single floating-point instructions.
15296 This option requires
15297hardware 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
15304Use (do not use) \s-1MIPS\s0 Digital Media Extension instructions.
15305This option can only be used when generating 64\-bit code and requires
15306hardware 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
15313Use (do not use) the \s-1MIPS\-3D\s0 \s-1ASE\s0.
15314The 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
15321Use (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
15328Use (do not use) the \s-1MIPS\s0 \s-1MCU\s0 \s-1ASE\s0 instructions.
15329.IP "\fB\-mlong64\fR" 4
15330.IX Item "-mlong64"
15331Force \f(CW\*(C`long\*(C'\fR types to be 64 bits wide. See \fB\-mlong32\fR for
15332an explanation of the default and the way that the pointer size is
15333determined.
15334.IP "\fB\-mlong32\fR" 4
15335.IX Item "-mlong32"
15336Force \f(CW\*(C`long\*(C'\fR, \f(CW\*(C`int\*(C'\fR, and pointer types to be 32 bits wide.
15337.Sp
15338The default size of \f(CW\*(C`int\*(C'\fRs, \f(CW\*(C`long\*(C'\fRs and pointers depends on
15339the \s-1ABI\s0. All the supported ABIs use 32\-bit \f(CW\*(C`int\*(C'\fRs. The n64 \s-1ABI\s0
15340uses 64\-bit \f(CW\*(C`long\*(C'\fRs, as does the 64\-bit \s-1EABI\s0; the others use
1534132\-bit \f(CW\*(C`long\*(C'\fRs. Pointers are the same size as \f(CW\*(C`long\*(C'\fRs,
15342or 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
15349Assume (do not assume) that all symbols have 32\-bit values, regardless
15350of 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
15352to generate shorter and faster references to symbolic addresses.
15353.IP "\fB\-G\fR \fInum\fR" 4
15354.IX Item "-G num"
15355Put definitions of externally-visible data in a small data section
15356if that data is no bigger than \fInum\fR bytes. \s-1GCC\s0 can then generate
15357more efficient accesses to the data; see \fB\-mgpopt\fR for details.
15358.Sp
15359The 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
15366Extend (do not extend) the \fB\-G\fR behavior to local data too,
15367such as to static variables in C. \fB\-mlocal\-sdata\fR is the
15368default for all configurations.
15369.Sp
15370If the linker complains that an application is using too much small data,
15371you might want to try rebuilding the less performance-critical parts with
15372\&\fB\-mno\-local\-sdata\fR. You might also want to build large
15373libraries with \fB\-mno\-local\-sdata\fR, so that the libraries leave
15374more 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
15381Assume (do not assume) that externally-defined data is in
15382a 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
15385If 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
15387that is no bigger than \fInum\fR bytes, you must make sure that \fIVar\fR
15388is placed in a small data section. If \fIVar\fR is defined by another
15389module, 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
15391definition. If \fIVar\fR is common, you must link the application
15392with a high-enough \fB\-G\fR setting.
15393.Sp
15394The easiest way of satisfying these restrictions is to compile
15395and link every module with the same \fB\-G\fR option. However,
15396you may wish to build a library that supports several different
15397small data limits. You can do this by compiling the library with
15398the highest supported \fB\-G\fR setting and additionally using
15399\&\fB\-mno\-extern\-sdata\fR to stop the library from making assumptions
15400about 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
15407Use (do not use) GP-relative accesses for symbols that are known to be
15408in 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
15410configurations.
15411.Sp
15412\&\fB\-mno\-gpopt\fR is useful for cases where the \f(CW$gp\fR register
15413might not hold the value of \f(CW\*(C`_gp\*(C'\fR. For example, if the code is
15414part of a library that might be used in a boot monitor, programs that
15415call boot monitor routines pass an unknown value in \f(CW$gp\fR.
15416(In such situations, the boot monitor itself is usually compiled
15417with \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
15427Allocate variables to the read-only data section first if possible, then
15428next in the small data section if possible, otherwise in data. This gives
15429slightly slower code than the default, but reduces the amount of \s-1RAM\s0 required
15430when 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
15437Put uninitialized \f(CW\*(C`const\*(C'\fR variables in the read-only data section.
15438This 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"
15441Specify whether \s-1GCC\s0 may generate code that reads from executable sections.
15442There are three possible settings:
15443.RS 4
15444.IP "\fB\-mcode\-readable=yes\fR" 4
15445.IX Item "-mcode-readable=yes"
15446Instructions may freely access executable sections. This is the
15447default 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,
15451but other instructions must not do so. This option is useful on 4KSc
15452and 4KSd processors when the code TLBs have the Read Inhibit bit set.
15453It is also useful on processors that can be configured to have a dual
15454instruction/data \s-1SRAM\s0 interface and that, like the M4K, automatically
15455redirect PC-relative loads to the instruction \s-1RAM\s0.
15456.IP "\fB\-mcode\-readable=no\fR" 4
15457.IX Item "-mcode-readable=no"
15458Instructions must not access executable sections. This option can be
15459useful 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
15461PC-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
15471Enable (disable) use of the \f(CW\*(C`%hi()\*(C'\fR and \f(CW\*(C`%lo()\*(C'\fR assembler
15472relocation 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
15480Use (do not use) assembler relocation operators when dealing with symbolic
15481addresses. The alternative, selected by \fB\-mno\-explicit\-relocs\fR,
15482is to use assembler macros instead.
15483.Sp
15484\&\fB\-mexplicit\-relocs\fR is the default if \s-1GCC\s0 was configured
15485to 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
15492Trap (do not trap) on integer division by zero.
15493.Sp
15494The 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
15502conditional trap or a break instruction. Using traps results in
15503smaller code, but is only supported on \s-1MIPS\s0 \s-1II\s0 and later. Also, some
15504versions of the Linux kernel have a bug that prevents trap from
15505generating the proper signal (\f(CW\*(C`SIGFPE\*(C'\fR). Use \fB\-mdivide\-traps\fR to
15506allow conditional traps on architectures that support them and
15507\&\fB\-mdivide\-breaks\fR to force the use of breaks.
15508.Sp
15509The default is usually \fB\-mdivide\-traps\fR, but this can be
15510overridden at configure time using \fB\-\-with\-divide=breaks\fR.
15511Divide-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
15519Force (do not force) the use of \f(CW\*(C`memcpy()\*(C'\fR for non-trivial block
15520moves. The default is \fB\-mno\-memcpy\fR, which allows \s-1GCC\s0 to inline
15521most 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
15528Disable (do not disable) use of the \f(CW\*(C`jal\*(C'\fR instruction. Calling
15529functions using \f(CW\*(C`jal\*(C'\fR is more efficient but requires the caller
15530and callee to be in the same 256 megabyte segment.
15531.Sp
15532This 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
15540Enable (disable) use of the \f(CW\*(C`mad\*(C'\fR, \f(CW\*(C`madu\*(C'\fR and \f(CW\*(C`mul\*(C'\fR
15541instructions, 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
15548Enable (disable) use of the floating-point multiply-accumulate
15549instructions, when they are available. The default is
15550\&\fB\-mfused\-madd\fR.
15551.Sp
15552On the R8000 \s-1CPU\s0 when multiply-accumulate instructions are used,
15553the intermediate product is calculated to infinite precision
15554and is not subject to the \s-1FCSR\s0 Flush to Zero bit. This may be
15555undesirable in some circumstances. On other processors the result
15556is numerically identical to the equivalent computation using
15557separate multiply, add, subtract and negate instructions.
15558.IP "\fB\-nocpp\fR" 4
15559.IX Item "-nocpp"
15560Tell the \s-1MIPS\s0 assembler to not run its preprocessor over user
15561assembler 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
15568Work around the 24K E48 (lost data on stores during refill) errata.
15569The 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
15576Work around certain R4000 \s-1CPU\s0 errata:
15577.RS 4
15578.IP "\-" 4
15579A double-word or a variable shift may give an incorrect result if executed
15580immediately after starting an integer division.
15581.IP "\-" 4
15582A double-word or a variable shift may give an incorrect result if executed
15583while an integer multiplication is in progress.
15584.IP "\-" 4
15585An integer division may give an incorrect result if started in a delay slot
15586of 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
15596Work around certain R4400 \s-1CPU\s0 errata:
15597.RS 4
15598.IP "\-" 4
15599A double-word or a variable shift may give an incorrect result if executed
15600immediately 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
15610Work 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
15614prior to 3.0. They may deadlock on revisions 2.6 and earlier.
15615.RE
15616.RS 4
15617.Sp
15618This option can only be used if the target architecture supports
15619branch-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
15621otherwise.
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
15629Work 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
15635of the operands is negative.
15636.RE
15637.RS 4
15638.Sp
15639The workarounds for the division errata rely on special functions in
15640\&\fIlibgcc.a\fR. At present, these functions are only provided by
15641the \f(CW\*(C`mips64vr*\-elf\*(C'\fR configurations.
15642.Sp
15643Other \s-1VR4120\s0 errata require a \s-1NOP\s0 to be inserted between certain pairs of
15644instructions. 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"
15648Work around the \s-1VR4130\s0 \f(CW\*(C`mflo\*(C'\fR/\f(CW\*(C`mfhi\*(C'\fR errata. The
15649workarounds are implemented by the assembler rather than by \s-1GCC\s0,
15650although \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
15652instructions 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
15659Work 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"
15664Specify whether \s-1GCC\s0 should insert cache barriers to avoid the
15665side-effects of speculation on R10K processors.
15666.Sp
15667In common with many processors, the R10K tries to predict the outcome
15668of a conditional branch and speculatively executes instructions from
15669the \*(L"taken\*(R" branch. It later aborts these instructions if the
15670predicted outcome is wrong. However, on the R10K, even aborted
15671instructions can have side effects.
15672.Sp
15673This problem only affects kernel stores and, depending on the system,
15674kernel loads. As an example, a speculatively-executed store may load
15675the target memory into cache and mark the cache line as dirty, even if
15676the store itself is later aborted. If a \s-1DMA\s0 operation writes to the
15677same area of memory before the \*(L"dirty\*(R" line is flushed, the cached
15678data overwrites the DMA-ed data. See the R10K processor manual
15679for a full description, including other potential problems.
15680.Sp
15681One workaround is to insert cache barrier instructions before every memory
15682access that might be speculatively executed and that might have side
15683effects even if aborted. \fB\-mr10k\-cache\-barrier=\fR\fIsetting\fR
15684controls \s-1GCC\s0's implementation of this workaround. It assumes that
15685aborted accesses to any byte in the following regions does not have
15686side effects:
15687.RS 4
15688.IP "1." 4
15689the memory occupied by the current function's stack frame;
15690.IP "2." 4
15691the memory occupied by an incoming stack argument;
15692.IP "3." 4
15693the memory occupied by an object with a link-time-constant address.
15694.RE
15695.RS 4
15696.Sp
15697It is the kernel's responsibility to ensure that speculative
15698accesses to these regions are indeed safe.
15699.Sp
15700If the input program contains a function declaration such as:
15701.Sp
15702.Vb 1
15703\& void foo (void);
15704.Ve
15705.Sp
15706then 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
15708restriction for functions it compiles itself. It expects non-GCC
15709functions (such as hand-written assembly code) to do the same.
15710.Sp
15711The option has three forms:
15712.IP "\fB\-mr10k\-cache\-barrier=load\-store\fR" 4
15713.IX Item "-mr10k-cache-barrier=load-store"
15714Insert a cache barrier before a load or store that might be
15715speculatively executed and that might have side effects even
15716if aborted.
15717.IP "\fB\-mr10k\-cache\-barrier=store\fR" 4
15718.IX Item "-mr10k-cache-barrier=store"
15719Insert a cache barrier before a store that might be speculatively
15720executed 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"
15723Disable 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
15733Specifies the function to call to flush the I and D caches, or to not
15734call any such function. If called, the function must take the same
15735arguments as the common \f(CW\*(C`_flush_func()\*(C'\fR, that is, the address of the
15736memory range for which the cache is being flushed, the size of the
15737memory range, and the number 3 (to flush both caches). The default
15738depends 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"
15742Set the cost of branches to roughly \fInum\fR \*(L"simple\*(R" instructions.
15743This cost is only a heuristic and is not guaranteed to produce
15744consistent results across releases. A zero cost redundantly selects
15745the 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
15752Enable or disable use of Branch Likely instructions, regardless of the
15753default for the selected architecture. By default, Branch Likely
15754instructions may be generated if they are supported by the selected
15755architecture. An exception is for the \s-1MIPS32\s0 and \s-1MIPS64\s0 architectures
15756and processors that implement those architectures; for those, Branch
15757Likely instructions are not be generated by default because the \s-1MIPS32\s0
15758and \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
15765Specifies whether \s-1FP\s0 exceptions are enabled. This affects how
15766\&\s-1FP\s0 instructions are scheduled for some processors.
15767The default is that \s-1FP\s0 exceptions are
15768enabled.
15769.Sp
15770For instance, on the \s-1SB\-1\s0, if \s-1FP\s0 exceptions are disabled, and we are emitting
1577164\-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
15779The \s-1VR4130\s0 pipeline is two-way superscalar, but can only issue two
15780instructions together if the first one is 8\-byte aligned. When this
15781option is enabled, \s-1GCC\s0 aligns pairs of instructions that it
15782thinks should execute in parallel.
15783.Sp
15784This option only has an effect when optimizing for the \s-1VR4130\s0.
15785It normally makes code faster, but at the expense of making it bigger.
15786It 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
15793Enable (disable) generation of \f(CW\*(C`synci\*(C'\fR instructions on
15794architectures that support it. The \f(CW\*(C`synci\*(C'\fR instructions (if
15795enabled) are generated when \f(CW\*(C`_\|_builtin_\|_\|_clear_cache()\*(C'\fR is
15796compiled.
15797.Sp
15798This option defaults to \f(CW\*(C`\-mno\-synci\*(C'\fR, but the default can be
15799overridden by configuring with \f(CW\*(C`\-\-with\-synci\*(C'\fR.
15800.Sp
15801When compiling code for single processor systems, it is generally safe
15802to use \f(CW\*(C`synci\*(C'\fR. However, on many multi-core (\s-1SMP\s0) systems, it
15803does not invalidate the instruction caches on all cores and may lead
15804to 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
15811Try 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
15813resolve the destination at link-time and if the destination is within
15814range for a direct call.
15815.Sp
15816\&\fB\-mrelax\-pic\-calls\fR is the default if \s-1GCC\s0 was configured to use
15817an assembler and a linker that support the \f(CW\*(C`.reloc\*(C'\fR assembly
15818directive 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
15820assembler 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
15827Emit (do not emit) code that allows \f(CW\*(C`_mcount\*(C'\fR to modify the
15828calling function's return address. When enabled, this option extends
15829the usual \f(CW\*(C`_mcount\*(C'\fR interface with a new \fIra-address\fR
15830parameter, 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
15832doing both of the following:
15833.RS 4
15834.IP "\(bu" 4
15835Returning the new address in register \f(CW$31\fR.
15836.IP "\(bu" 4
15837Storing the new address in \f(CW\*(C`*\f(CIra\-address\f(CW\*(C'\fR,
15838if \fIra-address\fR is nonnull.
15839.RE
15840.RS 4
15841.Sp
15842The 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
15848These 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
15855Specify that intrinsic library functions are being compiled, passing all
15856values 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
15863Generate floating-point comparison instructions that compare with respect
15864to 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
15871Generate code that passes function parameters and return values that (in
15872the called function) are seen as registers \f(CW$0\fR and up, as opposed to
15873the \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
15880When reading data from memory in sizes shorter than 64 bits, use (do not
15881use) zero-extending load instructions by default, rather than
15882sign-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
15889Make the result of a division yielding a remainder have the same sign as
15890the divisor. With the default, \fB\-mno\-knuthdiv\fR, the sign of the
15891remainder follows the sign of the dividend. Both methods are
15892arithmetically 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
15899Prepend (do not prepend) a \fB:\fR to all global symbols, so the assembly
15900code can be used with the \f(CW\*(C`PREFIX\*(C'\fR assembly directive.
15901.IP "\fB\-melf\fR" 4
15902.IX Item "-melf"
15903Generate 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
15911Use (do not use) the probable-branch instructions, when static branch
15912prediction 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
15919Generate (do not generate) code that uses \fIbase addresses\fR. Using a
15920base address automatically generates a request (handled by the assembler
15921and the linker) for a constant to be set up in a global register. The
15922register is used for one or more base address requests within the range 0
15923to 255 from the value held in the register. The generally leads to short
15924and fast code, but the number of different data items that can be
15925addressed is limited. This means that a program that uses lots of static
15926data 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
15933Force (do not force) generated code to have a single exit point in each
15934function.
15935.PP
15936\fI\s-1MN10300\s0 Options\fR
15937.IX Subsection "MN10300 Options"
15938.PP
15939These \fB\-m\fR options are defined for Matsushita \s-1MN10300\s0 architectures:
15940.IP "\fB\-mmult\-bug\fR" 4
15941.IX Item "-mmult-bug"
15942Generate code to avoid bugs in the multiply instructions for the \s-1MN10300\s0
15943processors. This is the default.
15944.IP "\fB\-mno\-mult\-bug\fR" 4
15945.IX Item "-mno-mult-bug"
15946Do 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"
15950Generate code using features specific to the \s-1AM33\s0 processor.
15951.IP "\fB\-mno\-am33\fR" 4
15952.IX Item "-mno-am33"
15953Do not generate code using features specific to the \s-1AM33\s0 processor. This
15954is the default.
15955.IP "\fB\-mam33\-2\fR" 4
15956.IX Item "-mam33-2"
15957Generate code using features specific to the \s-1AM33/2\s0.0 processor.
15958.IP "\fB\-mam34\fR" 4
15959.IX Item "-mam34"
15960Generate 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"
15963Use the timing characteristics of the indicated \s-1CPU\s0 type when
15964scheduling instructions. This does not change the targeted processor
15965type. 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"
15969When generating a function that returns a pointer, return the pointer
15970in both \f(CW\*(C`a0\*(C'\fR and \f(CW\*(C`d0\*(C'\fR. Otherwise, the pointer is returned
15971only in \f(CW\*(C`a0\*(C'\fR, and attempts to call such functions without a prototype
15972result 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"
15976Do not link in the C run-time initialization object file.
15977.IP "\fB\-mrelax\fR" 4
15978.IX Item "-mrelax"
15979Indicate to the linker that it should perform a relaxation optimization pass
15980to shorten branches, calls and absolute memory addresses. This option only
15981has an effect when used on the command line for the final link step.
15982.Sp
15983This option makes symbolic debugging impossible.
15984.IP "\fB\-mliw\fR" 4
15985.IX Item "-mliw"
15986Allow the compiler to generate \fILong Instruction Word\fR
15987instructions if the target is the \fB\s-1AM33\s0\fR or later. This is the
15988default. This option defines the preprocessor macro \fB_\|_LIW_\|_\fR.
15989.IP "\fB\-mnoliw\fR" 4
15990.IX Item "-mnoliw"
15991Do not allow the compiler to generate \fILong Instruction Word\fR
15992instructions. This option defines the preprocessor macro
15993\&\fB_\|_NO_LIW_\|_\fR.
15994.IP "\fB\-msetlb\fR" 4
15995.IX Item "-msetlb"
15996Allow the compiler to generate the \fI\s-1SETLB\s0\fR and \fILcc\fR
15997instructions if the target is the \fB\s-1AM33\s0\fR or later. This is the
15998default. This option defines the preprocessor macro \fB_\|_SETLB_\|_\fR.
15999.IP "\fB\-mnosetlb\fR" 4
16000.IX Item "-mnosetlb"
16001Do not allow the compiler to generate \fI\s-1SETLB\s0\fR or \fILcc\fR
16002instructions. 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"
16009Generate big-endian code. This is the default for \fBmoxie\-*\-*\fR
16010configurations.
16011.IP "\fB\-mel\fR" 4
16012.IX Item "-mel"
16013Generate little-endian code.
16014.IP "\fB\-mno\-crt0\fR" 4
16015.IX Item "-mno-crt0"
16016Do 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
16021These options are defined for the \s-1PDP\-11:\s0
16022.IP "\fB\-mfpu\fR" 4
16023.IX Item "-mfpu"
16024Use hardware \s-1FPP\s0 floating point. This is the default. (\s-1FIS\s0 floating
16025point on the \s-1PDP\-11/40\s0 is not supported.)
16026.IP "\fB\-msoft\-float\fR" 4
16027.IX Item "-msoft-float"
16028Do not use hardware floating point.
16029.IP "\fB\-mac0\fR" 4
16030.IX Item "-mac0"
16031Return floating-point results in ac0 (fr0 in Unix assembler syntax).
16032.IP "\fB\-mno\-ac0\fR" 4
16033.IX Item "-mno-ac0"
16034Return floating-point results in memory. This is the default.
16035.IP "\fB\-m40\fR" 4
16036.IX Item "-m40"
16037Generate code for a \s-1PDP\-11/40\s0.
16038.IP "\fB\-m45\fR" 4
16039.IX Item "-m45"
16040Generate code for a \s-1PDP\-11/45\s0. This is the default.
16041.IP "\fB\-m10\fR" 4
16042.IX Item "-m10"
16043Generate code for a \s-1PDP\-11/10\s0.
16044.IP "\fB\-mbcopy\-builtin\fR" 4
16045.IX Item "-mbcopy-builtin"
16046Use inline \f(CW\*(C`movmemhi\*(C'\fR patterns for copying memory. This is the
16047default.
16048.IP "\fB\-mbcopy\fR" 4
16049.IX Item "-mbcopy"
16050Do 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
16057Use 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
16064Use 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
16071Use 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
16078Use 32\-bit \f(CW\*(C`float\*(C'\fR.
16079.IP "\fB\-mabshi\fR" 4
16080.IX Item "-mabshi"
16081Use \f(CW\*(C`abshi2\*(C'\fR pattern. This is the default.
16082.IP "\fB\-mno\-abshi\fR" 4
16083.IX Item "-mno-abshi"
16084Do not use \f(CW\*(C`abshi2\*(C'\fR pattern.
16085.IP "\fB\-mbranch\-expensive\fR" 4
16086.IX Item "-mbranch-expensive"
16087Pretend that branches are expensive. This is for experimenting with
16088code generation only.
16089.IP "\fB\-mbranch\-cheap\fR" 4
16090.IX Item "-mbranch-cheap"
16091Do not pretend that branches are expensive. This is the default.
16092.IP "\fB\-munix\-asm\fR" 4
16093.IX Item "-munix-asm"
16094Use 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"
16098Use \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
16104These \fB\-m\fR options are defined for picoChip implementations:
16105.IP "\fB\-mae=\fR\fIae_type\fR" 4
16106.IX Item "-mae=ae_type"
16107Set the instruction set, register set, and instruction scheduling
16108parameters for array element type \fIae_type\fR. Supported values
16109for \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
16112generated with this option runs on any of the other \s-1AE\s0 types. The
16113code 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
16115work 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
16118for 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
16121option may suffer from poor performance of byte (char) manipulation,
16122since 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"
16125Enable the compiler to directly use a symbol name as an address in a
16126load/store instruction, without first loading it into a
16127register. Typically, the use of this option generates larger
16128programs, which run faster than when the option isn't used. However, the
16129results vary from program to program, so it is left as a user option,
16130rather than being permanently enabled.
16131.IP "\fB\-mno\-inefficient\-warnings\fR" 4
16132.IX Item "-mno-inefficient-warnings"
16133Disables warnings about the generation of inefficient code. These
16134warnings can be generated, for example, when compiling code that
16135performs byte-level memory operations on the \s-1MAC\s0 \s-1AE\s0 type. The \s-1MAC\s0 \s-1AE\s0 has
16136no hardware support for byte-level memory operations, so all byte
16137load/stores must be synthesized from word load/store operations. This is
16138inefficient and a warning is generated to indicate
16139that you should rewrite the code to avoid byte operations, or to target
16140an \s-1AE\s0 type that has the necessary hardware support. This option disables
16141these warnings.
16142.PP
16143\fIPowerPC Options\fR
16144.IX Subsection "PowerPC Options"
16145.PP
16146These 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"
16152Links in additional target libraries to support operation within a
16153simulator.
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
16162Specifies the type of hardware multiplication support to be used. The
16163default is \f(CW\*(C`none\*(C'\fR, which uses software multiplication functions.
16164The \f(CW\*(C`g13\*(C'\fR option is for the hardware multiply/divide peripheral
16165only on the \s-1RL78/G13\s0 targets. The \f(CW\*(C`rl78\*(C'\fR option is for the
16166standard 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
16171These \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
16214You use these options to specify which instructions are available on the
16215processor you are using. The default value of these options is
16216determined when configuring \s-1GCC\s0. Specifying the
16217\&\fB\-mcpu=\fR\fIcpu_type\fR overrides the specification of these
16218options. We recommend you use the \fB\-mcpu=\fR\fIcpu_type\fR option
16219rather than the options listed above.
16220.Sp
16221Specifying \fB\-mpowerpc\-gpopt\fR allows
16222\&\s-1GCC\s0 to use the optional PowerPC architecture instructions in the
16223General Purpose group, including floating-point square root. Specifying
16224\&\fB\-mpowerpc\-gfxopt\fR allows \s-1GCC\s0 to
16225use the optional PowerPC architecture instructions in the Graphics
16226group, including floating-point select.
16227.Sp
16228The \fB\-mmfcrf\fR option allows \s-1GCC\s0 to generate the move from
16229condition register field instruction implemented on the \s-1POWER4\s0
16230processor and other processors that support the PowerPC V2.01
16231architecture.
16232The \fB\-mpopcntb\fR option allows \s-1GCC\s0 to generate the popcount and
16233double-precision \s-1FP\s0 reciprocal estimate instruction implemented on the
16234\&\s-1POWER5\s0 processor and other processors that support the PowerPC V2.02
16235architecture.
16236The \fB\-mpopcntd\fR option allows \s-1GCC\s0 to generate the popcount
16237instruction implemented on the \s-1POWER7\s0 processor and other processors
16238that support the PowerPC V2.06 architecture.
16239The \fB\-mfprnd\fR option allows \s-1GCC\s0 to generate the \s-1FP\s0 round to
16240integer instructions implemented on the \s-1POWER5+\s0 processor and other
16241processors that support the PowerPC V2.03 architecture.
16242The \fB\-mcmpb\fR option allows \s-1GCC\s0 to generate the compare bytes
16243instruction implemented on the \s-1POWER6\s0 processor and other processors
16244that support the PowerPC V2.05 architecture.
16245The \fB\-mmfpgpr\fR option allows \s-1GCC\s0 to generate the \s-1FP\s0 move to/from
16246general-purpose register instructions implemented on the \s-1POWER6X\s0
16247processor and other processors that support the extended PowerPC V2.05
16248architecture.
16249The \fB\-mhard\-dfp\fR option allows \s-1GCC\s0 to generate the decimal
16250floating-point instructions implemented on some \s-1POWER\s0 processors.
16251.Sp
16252The \fB\-mpowerpc64\fR option allows \s-1GCC\s0 to generate the additional
1625364\-bit instructions that are found in the full PowerPC64 architecture
16254and 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"
16258Set architecture type, register usage, and
16259instruction scheduling parameters for machine type \fIcpu_type\fR.
16260Supported 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
16273PowerPC and 64\-bit PowerPC architecture machine
16274types, with an appropriate, generic processor model assumed for
16275scheduling purposes.
16276.Sp
16277The other options specify a specific processor. Code generated under
16278those options runs best on that processor, and may not run at all on
16279others.
16280.Sp
16281The \fB\-mcpu\fR options automatically enable or disable the
16282following 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
16289The particular options set for any particular \s-1CPU\s0 varies between
16290compiler versions, depending on what setting seems to produce optimal
16291code for that \s-1CPU\s0; it doesn't necessarily reflect the actual hardware's
16292capabilities. If you wish to set an individual option to a particular
16293value, you may specify it after the \fB\-mcpu\fR option, like
16294\&\fB\-mcpu=970 \-mno\-altivec\fR.
16295.Sp
16296On \s-1AIX\s0, the \fB\-maltivec\fR and \fB\-mpowerpc64\fR options are
16297not 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
16299enable or disable them individually if you're sure it'll work in your
16300environment.
16301.IP "\fB\-mtune=\fR\fIcpu_type\fR" 4
16302.IX Item "-mtune=cpu_type"
16303Set the instruction scheduling parameters for machine type
16304\&\fIcpu_type\fR, but do not set the architecture type or register usage,
16305as \fB\-mcpu=\fR\fIcpu_type\fR does. The same
16306values 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
16308architecture and registers set by \fB\-mcpu\fR, but the
16309scheduling parameters set by \fB\-mtune\fR.
16310.IP "\fB\-mcmodel=small\fR" 4
16311.IX Item "-mcmodel=small"
16312Generate PowerPC64 code for the small model: The \s-1TOC\s0 is limited to
1631364k.
16314.IP "\fB\-mcmodel=medium\fR" 4
16315.IX Item "-mcmodel=medium"
16316Generate PowerPC64 code for the medium model: The \s-1TOC\s0 and other static
16317data may be up to a total of 4G in size.
16318.IP "\fB\-mcmodel=large\fR" 4
16319.IX Item "-mcmodel=large"
16320Generate PowerPC64 code for the large model: The \s-1TOC\s0 may be up to 4G
16321in size. Other data and code is only limited by the 64\-bit address
16322space.
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
16329Generate code that uses (does not use) AltiVec instructions, and also
16330enable the use of built-in functions that allow more direct access to
16331the 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
16333enhancements.
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
16340Generate \s-1VRSAVE\s0 instructions when generating AltiVec code.
16341.IP "\fB\-mgen\-cell\-microcode\fR" 4
16342.IX Item "-mgen-cell-microcode"
16343Generate Cell microcode instructions.
16344.IP "\fB\-mwarn\-cell\-microcode\fR" 4
16345.IX Item "-mwarn-cell-microcode"
16346Warn when a Cell microcode instruction is emitted. An example
16347of a Cell microcode instruction is a variable shift.
16348.IP "\fB\-msecure\-plt\fR" 4
16349.IX Item "-msecure-plt"
16350Generate code that allows \fBld\fR and \fBld.so\fR
16351to build executables and shared
16352libraries with non-executable \f(CW\*(C`.plt\*(C'\fR and \f(CW\*(C`.got\*(C'\fR sections.
16353This is a PowerPC
1635432\-bit \s-1SYSV\s0 \s-1ABI\s0 option.
16355.IP "\fB\-mbss\-plt\fR" 4
16356.IX Item "-mbss-plt"
16357Generate code that uses a \s-1BSS\s0 \f(CW\*(C`.plt\*(C'\fR section that \fBld.so\fR
16358fills in, and
16359requires \f(CW\*(C`.plt\*(C'\fR and \f(CW\*(C`.got\*(C'\fR
16360sections that are both writable and executable.
16361This 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
16368This 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"
16371This 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
16379This switch enables or disables the generation of \s-1SPE\s0 simd
16380instructions.
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
16387This switch enables or disables the generation of \s-1PAIRED\s0 simd
16388instructions.
16389.IP "\fB\-mspe=\fR\fIyes/no\fR" 4
16390.IX Item "-mspe=yes/no"
16391This 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
16399Generate code that uses (does not use) vector/scalar (\s-1VSX\s0)
16400instructions, and also enable the use of built-in functions that allow
16401more 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
16408This switch enables or disables the generation of floating-point
16409operations on the general-purpose registers for architectures that
16410support it.
16411.Sp
16412The argument \fIyes\fR or \fIsingle\fR enables the use of
16413single-precision floating-point operations.
16414.Sp
16415The argument \fIdouble\fR enables the use of single and
16416double-precision floating-point operations.
16417.Sp
16418The argument \fIno\fR disables floating-point operations on the
16419general-purpose registers.
16420.Sp
16421This 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
16428Generate code for 32\-bit or 64\-bit environments of Darwin and \s-1SVR4\s0
16429targets (including GNU/Linux). The 32\-bit environment sets int, long
16430and pointer to 32 bits and generates code that runs on any PowerPC
16431variant. The 64\-bit environment sets int to 32 bits and long and
16432pointer 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
16444Modify generation of the \s-1TOC\s0 (Table Of Contents), which is created for
16445every executable file. The \fB\-mfull\-toc\fR option is selected by
16446default. In that case, \s-1GCC\s0 allocates at least one \s-1TOC\s0 entry for
16447each unique non-automatic variable reference in your program. \s-1GCC\s0
16448also places floating-point constants in the \s-1TOC\s0. However, only
1644916,384 entries are available in the \s-1TOC\s0.
16450.Sp
16451If you receive a linker error message that saying you have overflowed
16452the available \s-1TOC\s0 space, you can reduce the amount of \s-1TOC\s0 space used
16453with 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
16455constants in the \s-1TOC\s0 and \fB\-mno\-sum\-in\-toc\fR forces \s-1GCC\s0 to
16456generate code to calculate the sum of an address and a constant at
16457run time instead of putting that sum into the \s-1TOC\s0. You may specify one
16458or both of these options. Each causes \s-1GCC\s0 to produce very slightly
16459slower and larger code at the expense of conserving \s-1TOC\s0 space.
16460.Sp
16461If you still run out of space in the \s-1TOC\s0 even when you specify both of
16462these 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
16464option, \s-1GCC\s0 produces code that is slower and larger but which
16465uses extremely little \s-1TOC\s0 space. You may wish to use this option
16466only 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
16473Enable 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.
16475Specifying \fB\-maix64\fR implies \fB\-mpowerpc64\fR,
16476while \fB\-maix32\fR disables the 64\-bit \s-1ABI\s0 and
16477implies \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
16484Produce code that conforms more closely to \s-1IBM\s0 \s-1XL\s0 compiler semantics
16485when using AIX-compatible \s-1ABI\s0. Pass floating-point arguments to
16486prototyped functions beyond the register save area (\s-1RSA\s0) on the stack
16487in addition to argument FPRs. Do not assume that most significant
16488double in 128\-bit long double value is properly rounded when comparing
16489values and converting to double. Use \s-1XL\s0 symbol names for long double
16490support routines.
16491.Sp
16492The \s-1AIX\s0 calling convention was extended but not initially documented to
16493handle an obscure K&R C case of calling a function that takes the
16494address of its arguments with fewer arguments than declared. \s-1IBM\s0 \s-1XL\s0
16495compilers access floating-point arguments that do not fit in the
16496\&\s-1RSA\s0 from the stack when a subroutine is compiled without
16497optimization. Because always storing floating-point arguments on the
16498stack is inefficient and rarely needed, this option is not enabled by
16499default 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"
16503Support \fI\s-1IBM\s0 \s-1RS/6000\s0 \s-1SP\s0\fR \fIParallel Environment\fR (\s-1PE\s0). Link an
16504application written to use message passing with special startup code to
16505enable the application to run. The system must have \s-1PE\s0 installed in the
16506standard location (\fI/usr/lpp/ppe.poe/\fR), or the \fIspecs\fR file
16507must be overridden with the \fB\-specs=\fR option to specify the
16508appropriate directory location. The Parallel Environment does not
16509support threads, so the \fB\-mpe\fR option and the \fB\-pthread\fR
16510option 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
16517On \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
16519types, such as floating-point doubles, on their natural size-based boundary.
16520The option \fB\-malign\-power\fR instructs \s-1GCC\s0 to follow the ABI-specified
16521alignment rules. \s-1GCC\s0 defaults to the standard alignment defined in the \s-1ABI\s0.
16522.Sp
16523On 64\-bit Darwin, natural alignment is the default, and \fB\-malign\-power\fR
16524is 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
16531Generate code that does not use (uses) the floating-point register set.
16532Software 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
16540Generate 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"
16544Do not generate \f(CW\*(C`sqrt\*(C'\fR and \f(CW\*(C`div\*(C'\fR instructions for hardware
16545floating-point unit.
16546.IP "\fB\-mfpu=\fR\fIname\fR" 4
16547.IX Item "-mfpu=name"
16548Specify 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),
16552and \fBdp_full\fR (equivalent to \fB\-mdouble\-float\fR).
16553.IP "\fB\-mxilinx\-fpu\fR" 4
16554.IX Item "-mxilinx-fpu"
16555Perform 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
16562Generate code that uses (does not use) the load multiple word
16563instructions and the store multiple word instructions. These
16564instructions are generated by default on \s-1POWER\s0 systems, and not
16565generated on PowerPC systems. Do not use \fB\-mmultiple\fR on little-endian
16566PowerPC systems, since those instructions do not work when the
16567processor 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
16575Generate code that uses (does not use) the load string instructions
16576and the store string word instructions to save multiple registers and
16577do 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
16580instructions do not work when the processor is in little-endian mode.
16581The exceptions are \s-1PPC740\s0 and \s-1PPC750\s0 which permit these instructions
16582in 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
16589Generate code that uses (does not use) the load or store instructions
16590that update the base register to the address of the calculated memory
16591location. These instructions are generated by default. If you use
16592\&\fB\-mno\-update\fR, there is a small window between the time that the
16593stack pointer is updated and the address of the previous frame is
16594stored, which means code that walks the stack frame across interrupts or
16595signals 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
16602Generate code that tries to avoid (not avoid) the use of indexed load
16603or store instructions. These instructions can incur a performance
16604penalty on Power6 processors in certain situations, such as when
16605stepping through large arrays that cross a 16M boundary. This option
16606is 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
16613Generate code that uses (does not use) the floating-point multiply and
16614accumulate instructions. These instructions are generated by default
16615if 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
16618mapped 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
16625Generate code that uses (does not use) the half-word multiply and
16626multiply-accumulate instructions on the \s-1IBM\s0 405, 440, 464 and 476 processors.
16627These instructions are generated by default when targeting those
16628processors.
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
16635Generate code that uses (does not use) the string-search \fBdlmzb\fR
16636instruction on the \s-1IBM\s0 405, 440, 464 and 476 processors. This instruction is
16637generated 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
16644On System V.4 and embedded PowerPC systems do not (do) force structures
16645and unions that contain bit-fields to be aligned to the base type of the
16646bit-field.
16647.Sp
16648For 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
16650boundary and has a size of 4 bytes. By using \fB\-mno\-bit\-align\fR,
16651the structure is aligned to a 1\-byte boundary and is 1 byte in
16652size.
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
16659On System V.4 and embedded PowerPC systems do not (do) assume that
16660unaligned 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
16667Generate code that allows (does not allow) a static executable to be
16668relocated to a different address at run time. A simple embedded
16669PowerPC 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,
16671a table of 32\-bit addresses generated by this option. For this to
16672work, 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
16681Like \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
16683run time, but \fB\-mrelocatable\-lib\fR does not use the smaller stack
16684alignment of \fB\-mrelocatable\fR. Objects compiled with
16685\&\fB\-mrelocatable\-lib\fR may be linked with objects compiled with
16686any 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
16693On System V.4 and embedded PowerPC systems do not (do) assume that
16694register 2 contains a pointer to a global area pointing to the addresses
16695used 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
16702On System V.4 and embedded PowerPC systems compile code for the
16703processor in little-endian mode. The \fB\-mlittle\-endian\fR option is
16704the 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
16711On System V.4 and embedded PowerPC systems compile code for the
16712processor in big-endian mode. The \fB\-mbig\-endian\fR option is
16713the same as \fB\-mbig\fR.
16714.IP "\fB\-mdynamic\-no\-pic\fR" 4
16715.IX Item "-mdynamic-no-pic"
16716On Darwin and Mac \s-1OS\s0 X systems, compile code so that it is not
16717relocatable, but that its external references are relocatable. The
16718resulting code is suitable for applications, but not shared
16719libraries.
16720.IP "\fB\-msingle\-pic\-base\fR" 4
16721.IX Item "-msingle-pic-base"
16722Treat the register used for \s-1PIC\s0 addressing as read-only, rather than
16723loading it in the prologue for each function. The runtime system is
16724responsible for initializing this register with an appropriate value
16725before execution begins.
16726.IP "\fB\-mprioritize\-restricted\-insns=\fR\fIpriority\fR" 4
16727.IX Item "-mprioritize-restricted-insns=priority"
16728This option controls the priority that is assigned to
16729dispatch-slot restricted instructions during the second scheduling
16730pass. The argument \fIpriority\fR takes the value \fB0\fR, \fB1\fR,
16731or \fB2\fR to assign no, highest, or second-highest (respectively)
16732priority to dispatch-slot restricted
16733instructions.
16734.IP "\fB\-msched\-costly\-dep=\fR\fIdependence_type\fR" 4
16735.IX Item "-msched-costly-dep=dependence_type"
16736This option controls which dependences are considered costly
16737by 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"
16742No dependence is costly.
16743.IP "\fBall\fR" 4
16744.IX Item "all"
16745All dependences are costly.
16746.IP "\fBtrue_store_to_load\fR" 4
16747.IX Item "true_store_to_load"
16748A true dependence from store to load is costly.
16749.IP "\fBstore_to_load\fR" 4
16750.IX Item "store_to_load"
16751Any dependence from store to load is costly.
16752.IP "\fInumber\fR" 4
16753.IX Item "number"
16754Any 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"
16761This option controls which \s-1NOP\s0 insertion scheme is used during
16762the second scheduling pass. The argument \fIscheme\fR takes one of the
16763following values:
16764.RS 4
16765.IP "\fBno\fR" 4
16766.IX Item "no"
16767Don't insert NOPs.
16768.IP "\fBpad\fR" 4
16769.IX Item "pad"
16770Pad with NOPs any dispatch group that has vacant issue slots,
16771according to the scheduler's grouping.
16772.IP "\fBregroup_exact\fR" 4
16773.IX Item "regroup_exact"
16774Insert NOPs to force costly dependent insns into
16775separate groups. Insert exactly as many NOPs as needed to force an insn
16776to a new group, according to the estimated processor grouping.
16777.IP "\fInumber\fR" 4
16778.IX Item "number"
16779Insert NOPs to force costly dependent insns into
16780separate 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"
16786On System V.4 and embedded PowerPC systems compile code using calling
16787conventions that adhere to the March 1995 draft of the System V
16788Application Binary Interface, PowerPC processor supplement. This is the
16789default 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
16796Specify both \fB\-mcall\-sysv\fR and \fB\-meabi\fR options.
16797.IP "\fB\-mcall\-sysv\-noeabi\fR" 4
16798.IX Item "-mcall-sysv-noeabi"
16799Specify both \fB\-mcall\-sysv\fR and \fB\-mno\-eabi\fR options.
16800.IP "\fB\-mcall\-aixdesc\fR" 4
16801.IX Item "-mcall-aixdesc"
16802On System V.4 and embedded PowerPC systems compile code for the \s-1AIX\s0
16803operating system.
16804.IP "\fB\-mcall\-linux\fR" 4
16805.IX Item "-mcall-linux"
16806On System V.4 and embedded PowerPC systems compile code for the
16807Linux-based \s-1GNU\s0 system.
16808.IP "\fB\-mcall\-freebsd\fR" 4
16809.IX Item "-mcall-freebsd"
16810On System V.4 and embedded PowerPC systems compile code for the
16811FreeBSD operating system.
16812.IP "\fB\-mcall\-netbsd\fR" 4
16813.IX Item "-mcall-netbsd"
16814On System V.4 and embedded PowerPC systems compile code for the
16815NetBSD operating system.
16816.IP "\fB\-mcall\-openbsd\fR" 4
16817.IX Item "-mcall-openbsd"
16818On System V.4 and embedded PowerPC systems compile code for the
16819OpenBSD operating system.
16820.IP "\fB\-maix\-struct\-return\fR" 4
16821.IX Item "-maix-struct-return"
16822Return 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"
16825Return 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"
16829Extend the current \s-1ABI\s0 with a particular extension, or remove such extension.
16830Valid 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"
16834Extend the current \s-1ABI\s0 with \s-1SPE\s0 \s-1ABI\s0 extensions. This does not change
16835the 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"
16839Disable 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"
16842Change the current \s-1ABI\s0 to use \s-1IBM\s0 extended-precision long double.
16843This is a PowerPC 32\-bit \s-1SYSV\s0 \s-1ABI\s0 option.
16844.IP "\fB\-mabi=ieeelongdouble\fR" 4
16845.IX Item "-mabi=ieeelongdouble"
16846Change the current \s-1ABI\s0 to use \s-1IEEE\s0 extended-precision long double.
16847This 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
16854On System V.4 and embedded PowerPC systems assume that all calls to
16855variable argument functions are properly prototyped. Otherwise, the
16856compiler must insert an instruction before every non-prototyped call to
16857set or clear bit 6 of the condition code register (\fI\s-1CR\s0\fR) to
16858indicate whether floating-point values are passed in the floating-point
16859registers in case the function takes variable arguments. With
16860\&\fB\-mprototype\fR, only calls to prototyped variable argument functions
16861set or clear the bit.
16862.IP "\fB\-msim\fR" 4
16863.IX Item "-msim"
16864On 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
16867configurations.
16868.IP "\fB\-mmvme\fR" 4
16869.IX Item "-mmvme"
16870On 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"
16875On 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"
16880On 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"
16885On System V.4 and embedded PowerPC systems, specify that you are
16886compiling for a VxWorks system.
16887.IP "\fB\-memb\fR" 4
16888.IX Item "-memb"
16889On embedded PowerPC systems, set the \fI\s-1PPC_EMB\s0\fR bit in the \s-1ELF\s0 flags
16890header 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
16897On System V.4 and embedded PowerPC systems do (do not) adhere to the
16898Embedded Applications Binary Interface (\s-1EABI\s0), which is a set of
16899modifications to the System V.4 specifications. Selecting \fB\-meabi\fR
16900means 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
16902environment, 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,
16905no \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
16907small data area. The \fB\-meabi\fR option is on by default if you
16908configured \s-1GCC\s0 using one of the \fBpowerpc*\-*\-eabi*\fR options.
16909.IP "\fB\-msdata=eabi\fR" 4
16910.IX Item "-msdata=eabi"
16911On 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
16913is pointed to by register \f(CW\*(C`r2\*(C'\fR. Put small initialized
16914non\-\f(CW\*(C`const\*(C'\fR global and static data in the \fB.sdata\fR section,
16915which is pointed to by register \f(CW\*(C`r13\*(C'\fR. Put small uninitialized
16916global and static data in the \fB.sbss\fR section, which is adjacent to
16917the \fB.sdata\fR section. The \fB\-msdata=eabi\fR option is
16918incompatible 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"
16922On System V.4 and embedded PowerPC systems, put small global and static
16923data 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.
16926The \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
16934On System V.4 and embedded PowerPC systems, if \fB\-meabi\fR is used,
16935compile code the same as \fB\-msdata=eabi\fR, otherwise compile code the
16936same as \fB\-msdata=sysv\fR.
16937.IP "\fB\-msdata=data\fR" 4
16938.IX Item "-msdata=data"
16939On System V.4 and embedded PowerPC systems, put small global
16940data in the \fB.sdata\fR section. Put small uninitialized global
16941data in the \fB.sbss\fR section. Do not use register \f(CW\*(C`r13\*(C'\fR
16942to address small data however. This is the default behavior unless
16943other \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
16950On embedded PowerPC systems, put all initialized global and static data
16951in 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"
16955Inline all block moves (such as calls to \f(CW\*(C`memcpy\*(C'\fR or structure
16956copies) 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
16958targets. The default value is target-specific.
16959.IP "\fB\-G\fR \fInum\fR" 4
16960.IX Item "-G num"
16961On embedded PowerPC systems, put global and static items less than or
16962equal to \fInum\fR bytes into the small data or \s-1BSS\s0 sections instead of
16963the 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.
16965All 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
16972On System V.4 and embedded PowerPC systems do (do not) emit register
16973names 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
16980By default assume that all calls are far away so that a longer and more
16981expensive calling sequence is required. This is required for calls
16982farther than 32 megabytes (33,554,432 bytes) from the current location.
16983A short call is generated if the compiler knows
16984the call cannot be that far away. This setting can be overridden by
16985the \f(CW\*(C`shortcall\*(C'\fR function attribute, or by \f(CW\*(C`#pragma
16986longcall(0)\*(C'\fR.
16987.Sp
16988Some linkers are capable of detecting out-of-range calls and generating
16989glue code on the fly. On these systems, long calls are unnecessary and
16990generate slower code. As of this writing, the \s-1AIX\s0 linker can do this,
16991as can the \s-1GNU\s0 linker for PowerPC/64. It is planned to add this feature
16992to the \s-1GNU\s0 linker for 32\-bit PowerPC systems as well.
16993.Sp
16994On Darwin/PPC systems, \f(CW\*(C`#pragma longcall\*(C'\fR generates \f(CW\*(C`jbsr
16995callee, L42\*(C'\fR, plus a \fIbranch island\fR (glue code). The two target
16996addresses represent the callee and the branch island. The
16997Darwin/PPC linker prefers the first address and generates a \f(CW\*(C`bl
16998callee\*(C'\fR if the \s-1PPC\s0 \f(CW\*(C`bl\*(C'\fR instruction reaches the callee directly;
16999otherwise, the linker generates \f(CW\*(C`bl L42\*(C'\fR to call the branch
17000island. The branch island is appended to the body of the
17001calling function; it computes the full 32\-bit address of the callee
17002and jumps to it.
17003.Sp
17004On Mach-O (Darwin) systems, this option directs the compiler emit to
17005the glue for every direct call, and the Darwin linker decides whether
17006to use or discard it.
17007.Sp
17008In the future, \s-1GCC\s0 may ignore all longcall specifications
17009when 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
17016Mark (do not mark) calls to \f(CW\*(C`_\|_tls_get_addr\*(C'\fR with a relocation
17017specifying the function argument. The relocation allows the linker to
17018reliably associate function call with argument setup instructions for
17019\&\s-1TLS\s0 optimization, which in turn allows \s-1GCC\s0 to better schedule the
17020sequence.
17021.IP "\fB\-pthread\fR" 4
17022.IX Item "-pthread"
17023Adds support for multithreading with the \fIpthreads\fR library.
17024This 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
17031This option enables use of the reciprocal estimate and
17032reciprocal square root estimate instructions with additional
17033Newton-Raphson steps to increase precision instead of doing a divide or
17034square root and divide for floating-point arguments. You should use
17035the \fB\-ffast\-math\fR option when using \fB\-mrecip\fR (or at
17036least \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
17039sequence is generally higher than the throughput of the non-reciprocal
17040instruction, the precision of the sequence can be decreased by up to 2
17041ulp (i.e. the inverse of 1.0 equals 0.99999994) for reciprocal square
17042roots.
17043.IP "\fB\-mrecip=\fR\fIopt\fR" 4
17044.IX Item "-mrecip=opt"
17045This option controls which reciprocal estimate instructions
17046may be used. \fIopt\fR is a comma-separated list of options, which may
17047be 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
17058So, for example, \fB\-mrecip=all,!rsqrtd\fR enables
17059all 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
17061which 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
17068Assume (do not assume) that the reciprocal estimate instructions
17069provide 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.
17072The double-precision square root estimate instructions are not generated by
17073default on low-precision machines, since they do not provide an
17074estimate that converges after three steps.
17075.IP "\fB\-mveclibabi=\fR\fItype\fR" 4
17076.IX Item "-mveclibabi=type"
17077Specifies the \s-1ABI\s0 type to use for vectorizing intrinsics using an
17078external library. The only type supported at present is \f(CW\*(C`mass\*(C'\fR,
17079which 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
17095for power7. Both \fB\-ftree\-vectorize\fR and
17096\&\fB\-funsafe\-math\-optimizations\fR must also be enabled. The \s-1MASS\s0
17097libraries 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
17104Generate (do not generate) the \f(CW\*(C`friz\*(C'\fR instruction when the
17105\&\fB\-funsafe\-math\-optimizations\fR option is used to optimize
17106rounding of floating-point values to 64\-bit integer and back to floating
17107point. The \f(CW\*(C`friz\*(C'\fR instruction does not return the same value if
17108the 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
17115Generate (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
17117systems where a function pointer points to a 3\-word descriptor giving
17118the function address, \s-1TOC\s0 value to be loaded in register \fIr2\fR, and
17119static chain value to be loaded in register \fIr11\fR. The
17120\&\fB\-mpointers\-to\-nested\-functions\fR is on by default. You cannot
17121call through pointers to nested functions or pointers
17122to functions compiled in other languages that use the static chain if
17123you 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
17130Generate (do not generate) code to save the \s-1TOC\s0 value in the reserved
17131stack location in the function prologue if the function calls through
17132a pointer on \s-1AIX\s0 and 64\-bit Linux systems. If the \s-1TOC\s0 value is not
17133saved in the prologue, it is saved just before the call through the
17134pointer. 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
17139These 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
17146Make the \f(CW\*(C`double\*(C'\fR data type be 64 bits (\fB\-m64bit\-doubles\fR)
17147or 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
17149works 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
17157Enables (\fB\-fpu\fR) or disables (\fB\-nofpu\fR) the use of \s-1RX\s0
17158floating-point hardware. The default is enabled for the \fI\s-1RX600\s0\fR
17159series and disabled for the \fI\s-1RX200\s0\fR series.
17160.Sp
17161Floating-point instructions are only generated for 32\-bit floating-point
17162values, 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.
17167This 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"
17170Selects the type of \s-1RX\s0 \s-1CPU\s0 to be targeted. Currently three types are
17171supported, the generic \fI\s-1RX600\s0\fR and \fI\s-1RX200\s0\fR series hardware and
17172the specific \fI\s-1RX610\s0\fR \s-1CPU\s0. The default is \fI\s-1RX600\s0\fR.
17173.Sp
17174The 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
17177The \fI\s-1RX200\s0\fR series does not have a hardware floating-point unit
17178and so \fB\-nofpu\fR is enabled by default when this type is
17179selected.
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
17186Store 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
17188format.
17189.IP "\fB\-msmall\-data\-limit=\fR\fIN\fR" 4
17190.IX Item "-msmall-data-limit=N"
17191Specifies the maximum size in bytes of global and static variables
17192which can be placed into the small data area. Using the small data
17193area can lead to smaller and faster code, but the size of area is
17194limited and it is up to the programmer to ensure that the area does
17195not overflow. Also when the small data area is used one of the \s-1RX\s0's
17196registers (usually \f(CW\*(C`r13\*(C'\fR) is reserved for use pointing to this
17197area, so it is no longer available for use by the compiler. This
17198could result in slower and/or larger code if variables are pushed onto
17199the stack instead of being held in this register.
17200.Sp
17201Note, common variables (variables that have not been initialized) and
17202constants are not placed into the small data area as they are assigned
17203to other sections in the output executable.
17204.Sp
17205The default value is zero, which disables this feature. Note, this
17206feature is not enabled by default with higher optimization levels
17207(\fB\-O2\fR etc) because of the potentially detrimental effects of
17208reserving a register. It is up to the programmer to experiment and
17209discover whether this feature is of benefit to their program. See the
17210description of the \fB\-mpid\fR option for a description of how the
17211actual 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
17218Use the simulator runtime. The default is to use the libgloss
17219board-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
17226When generating assembler output use a syntax that is compatible with
17227Renesas's \s-1AS100\s0 assembler. This syntax can also be handled by the \s-1GAS\s0
17228assembler, 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"
17231Specifies the maximum size, in bytes, of a constant that can be used as
17232an operand in a \s-1RX\s0 instruction. Although the \s-1RX\s0 instruction set does
17233allow constants of up to 4 bytes in length to be used in instructions,
17234a longer value equates to a longer instruction. Thus in some
17235circumstances it can be beneficial to restrict the size of constants
17236that are used in instructions. Constants that are too big are instead
17237placed into a constant pool and referenced via register indirection.
17238.Sp
17239The value \fIN\fR can be between 0 and 4. A value of 0 (the default)
17240or 4 means that constants of any size are allowed.
17241.IP "\fB\-mrelax\fR" 4
17242.IX Item "-mrelax"
17243Enable linker relaxation. Linker relaxation is a process whereby the
17244linker attempts to reduce the size of a program by finding shorter
17245versions of various instructions. Disabled by default.
17246.IP "\fB\-mint\-register=\fR\fIN\fR" 4
17247.IX Item "-mint-register=N"
17248Specify the number of registers to reserve for fast interrupt handler
17249functions. The value \fIN\fR can be between 0 and 4. A value of 1
17250means that register \f(CW\*(C`r13\*(C'\fR is reserved for the exclusive use
17251of 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.
17254A 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"
17257Specifies that interrupt handler functions should preserve the
17258accumulator register. This is only necessary if normal code might use
17259the accumulator register, for example because it performs 64\-bit
17260multiplications. The default is to ignore the accumulator as this
17261makes 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
17268Enables the generation of position independent data. When enabled any
17269access to constant data is done via an offset from a base address
17270held in a register. This allows the location of constant data to be
17271determined at run time without requiring the executable to be
17272relocated, which is a benefit to embedded applications with tight
17273memory constraints. Data that can be modified is not affected by this
17274option.
17275.Sp
17276Note, using this feature reserves a register, usually \f(CW\*(C`r13\*(C'\fR, for
17277the constant data base address. This can result in slower and/or
17278larger code, especially in complicated functions.
17279.Sp
17280The actual register chosen to hold the constant data base address
17281depends upon whether the \fB\-msmall\-data\-limit\fR and/or the
17282\&\fB\-mint\-register\fR command-line options are enabled. Starting
17283with register \f(CW\*(C`r13\*(C'\fR and proceeding downwards, registers are
17284allocated first to satisfy the requirements of \fB\-mint\-register\fR,
17285then \fB\-mpid\fR and finally \fB\-msmall\-data\-limit\fR. Thus it
17286is 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
17288command line.
17289.Sp
17290By default this feature is not enabled. The default can be restored
17291via 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
17298Prevents \s-1GCC\s0 from issuing a warning message if it finds more than one
17299fast interrupt handler when it is compiling a file. The default is to
17300issue a warning for each extra fast interrupt handler found, as the \s-1RX\s0
17301only supports one such interrupt.
17302.PP
17303\&\fINote:\fR The generic \s-1GCC\s0 command-line option \fB\-ffixed\-\fR\fIreg\fR
17304has 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
17306function intended to process fast interrupts. \s-1GCC\s0 ensures
17307that it only uses the registers \f(CW\*(C`r10\*(C'\fR, \f(CW\*(C`r11\*(C'\fR, \f(CW\*(C`r12\*(C'\fR
17308and/or \f(CW\*(C`r13\*(C'\fR and only provided that the normal use of the
17309corresponding registers have been restricted via the
17310\&\fB\-ffixed\-\fR\fIreg\fR or \fB\-mint\-register\fR command-line
17311options.
17312.PP
17313\fIS/390 and zSeries Options\fR
17314.IX Subsection "S/390 and zSeries Options"
17315.PP
17316These 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
17323Use (do not use) the hardware floating-point instructions and registers
17324for floating-point operations. When \fB\-msoft\-float\fR is specified,
17325functions in \fIlibgcc.a\fR are used to perform floating-point
17326operations. When \fB\-mhard\-float\fR is specified, the compiler
17327generates \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
17334Use (do not use) the hardware decimal-floating-point instructions for
17335decimal-floating-point operations. When \fB\-mno\-hard\-dfp\fR is
17336specified, functions in \fIlibgcc.a\fR are used to perform
17337decimal-floating-point operations. When \fB\-mhard\-dfp\fR is
17338specified, the compiler generates decimal-floating-point hardware
17339instructions. 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
17346These switches control the size of \f(CW\*(C`long double\*(C'\fR type. A size
17347of 64 bits makes the \f(CW\*(C`long double\*(C'\fR type equivalent to the \f(CW\*(C`double\*(C'\fR
17348type. 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
17355Store (do not store) the address of the caller's frame as backchain pointer
17356into the callee's stack frame.
17357A backchain may be needed to allow debugging using tools that do not understand
17358\&\s-1DWARF\s0 2 call frame information.
17359When \fB\-mno\-packed\-stack\fR is in effect, the backchain pointer is stored
17360at the bottom of the stack frame; when \fB\-mpacked\-stack\fR is in effect,
17361the backchain is placed into the topmost word of the 96/160 byte register
17362save area.
17363.Sp
17364In general, code compiled with \fB\-mbackchain\fR is call-compatible with
17365code compiled with \fB\-mmo\-backchain\fR; however, use of the backchain
17366for 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
17369to build a linux kernel use \fB\-msoft\-float\fR.
17370.Sp
17371The 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
17378Use (do not use) the packed stack layout. When \fB\-mno\-packed\-stack\fR is
17379specified, the compiler uses the all fields of the 96/160 byte register save
17380area only for their default purpose; unused fields still take up stack space.
17381When \fB\-mpacked\-stack\fR is specified, register save slots are densely
17382packed at the top of the register save area; unused space is reused for other
17383purposes, allowing for more efficient use of the available stack space.
17384However, when \fB\-mbackchain\fR is also in effect, the topmost word of
17385the save area is always used to store the backchain, and the return address
17386register is always saved two words below the backchain.
17387.Sp
17388As 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
17391S/390 or zSeries generated code that uses the stack frame backchain at run
17392time, not just for debugging purposes. Such code is not call-compatible
17393with code compiled with \fB\-mpacked\-stack\fR. Also, note that the
17394combination of \fB\-mbackchain\fR,
17395\&\fB\-mpacked\-stack\fR and \fB\-mhard\-float\fR is not supported. In order
17396to build a linux kernel use \fB\-msoft\-float\fR.
17397.Sp
17398The 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
17405Generate (or do not generate) code using the \f(CW\*(C`bras\*(C'\fR instruction
17406to do subroutine calls.
17407This only works reliably if the total executable size does not
17408exceed 64k. The default is to use the \f(CW\*(C`basr\*(C'\fR instruction instead,
17409which 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
17416When \fB\-m31\fR is specified, generate code compliant to the
17417GNU/Linux for S/390 \s-1ABI\s0. When \fB\-m64\fR is specified, generate
17418code compliant to the GNU/Linux for zSeries \s-1ABI\s0. This allows \s-1GCC\s0 in
17419particular to generate 64\-bit instructions. For the \fBs390\fR
17420targets, the default is \fB\-m31\fR, while the \fBs390x\fR
17421targets 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
17428When \fB\-mzarch\fR is specified, generate code using the
17429instructions available on z/Architecture.
17430When \fB\-mesa\fR is specified, generate code using the
17431instructions available on \s-1ESA/390\s0. Note that \fB\-mesa\fR is
17432not possible with \fB\-m64\fR.
17433When generating code compliant to the GNU/Linux for S/390 \s-1ABI\s0,
17434the default is \fB\-mesa\fR. When generating code compliant
17435to 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
17442Generate (or do not generate) code using the \f(CW\*(C`mvcle\*(C'\fR instruction
17443to perform block moves. When \fB\-mno\-mvcle\fR is specified,
17444use a \f(CW\*(C`mvc\*(C'\fR loop instead. This is the default unless optimizing for
17445size.
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
17452Print (or do not print) additional debug information when compiling.
17453The default is to not print debug information.
17454.IP "\fB\-march=\fR\fIcpu-type\fR" 4
17455.IX Item "-march=cpu-type"
17456Generate code that runs on \fIcpu-type\fR, which is the name of a system
17457representing 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.
17460When generating code using the instructions available on z/Architecture,
17461the 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"
17465Tune to \fIcpu-type\fR everything applicable about the generated code,
17466except for the \s-1ABI\s0 and the set of available instructions.
17467The list of \fIcpu-type\fR values is the same as for \fB\-march\fR.
17468The 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
17475Generate code that adds (does not add) in \s-1TPF\s0 \s-1OS\s0 specific branches to trace
17476routines in the operating system. This option is off by default, even
17477when 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
17484Generate code that uses (does not use) the floating-point multiply and
17485accumulate instructions. These instructions are generated by default if
17486hardware floating point is used.
17487.IP "\fB\-mwarn\-framesize=\fR\fIframesize\fR" 4
17488.IX Item "-mwarn-framesize=framesize"
17489Emit a warning if the current function exceeds the given frame size. Because
17490this is a compile-time check it doesn't need to be a real problem when the program
17491runs. It is intended to identify functions that most probably cause
17492a stack overflow. It is useful to be used in an environment with limited stack
17493size e.g. the linux kernel.
17494.IP "\fB\-mwarn\-dynamicstack\fR" 4
17495.IX Item "-mwarn-dynamicstack"
17496Emit a warning if the function calls \f(CW\*(C`alloca\*(C'\fR or uses dynamically-sized
17497arrays. 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
17504If these options are provided the S/390 back end emits additional instructions in
17505the function prologue that trigger a trap if the stack size is \fIstack-guard\fR
17506bytes above the \fIstack-size\fR (remember that the stack on S/390 grows downward).
17507If the \fIstack-guard\fR option is omitted the smallest power of 2 larger than
17508the frame size of the compiled function is chosen.
17509These options are intended to be used to help debugging stack overflow problems.
17510The additionally emitted code causes only little overhead and hence can also be
17511used in production-like systems without greater performance degradation. The given
17512values have to be exact powers of 2 and \fIstack-size\fR has to be greater than
17513\&\fIstack-guard\fR without exceeding 64k.
17514In order to be efficient the extra code makes the assumption that the stack starts
17515at an address aligned to the value given by \fIstack-size\fR.
17516The \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
17521These options are defined for Score implementations:
17522.IP "\fB\-meb\fR" 4
17523.IX Item "-meb"
17524Compile code for big-endian mode. This is the default.
17525.IP "\fB\-mel\fR" 4
17526.IX Item "-mel"
17527Compile code for little-endian mode.
17528.IP "\fB\-mnhwloop\fR" 4
17529.IX Item "-mnhwloop"
17530Disable generation of \f(CW\*(C`bcnz\*(C'\fR instructions.
17531.IP "\fB\-muls\fR" 4
17532.IX Item "-muls"
17533Enable generation of unaligned load and store instructions.
17534.IP "\fB\-mmac\fR" 4
17535.IX Item "-mmac"
17536Enable the use of multiply-accumulate instructions. Disabled by default.
17537.IP "\fB\-mscore5\fR" 4
17538.IX Item "-mscore5"
17539Specify the \s-1SCORE5\s0 as the target architecture.
17540.IP "\fB\-mscore5u\fR" 4
17541.IX Item "-mscore5u"
17542Specify the \s-1SCORE5U\s0 of the target architecture.
17543.IP "\fB\-mscore7\fR" 4
17544.IX Item "-mscore7"
17545Specify the \s-1SCORE7\s0 as the target architecture. This is the default.
17546.IP "\fB\-mscore7d\fR" 4
17547.IX Item "-mscore7d"
17548Specify the \s-1SCORE7D\s0 as the target architecture.
17549.PP
17550\fI\s-1SH\s0 Options\fR
17551.IX Subsection "SH Options"
17552.PP
17553These \fB\-m\fR options are defined for the \s-1SH\s0 implementations:
17554.IP "\fB\-m1\fR" 4
17555.IX Item "-m1"
17556Generate code for the \s-1SH1\s0.
17557.IP "\fB\-m2\fR" 4
17558.IX Item "-m2"
17559Generate code for the \s-1SH2\s0.
17560.IP "\fB\-m2e\fR" 4
17561.IX Item "-m2e"
17562Generate code for the SH2e.
17563.IP "\fB\-m2a\-nofpu\fR" 4
17564.IX Item "-m2a-nofpu"
17565Generate code for the SH2a without \s-1FPU\s0, or for a SH2a\-FPU in such a way
17566that the floating-point unit is not used.
17567.IP "\fB\-m2a\-single\-only\fR" 4
17568.IX Item "-m2a-single-only"
17569Generate code for the SH2a\-FPU, in such a way that no double-precision
17570floating-point operations are used.
17571.IP "\fB\-m2a\-single\fR" 4
17572.IX Item "-m2a-single"
17573Generate code for the SH2a\-FPU assuming the floating-point unit is in
17574single-precision mode by default.
17575.IP "\fB\-m2a\fR" 4
17576.IX Item "-m2a"
17577Generate code for the SH2a\-FPU assuming the floating-point unit is in
17578double-precision mode by default.
17579.IP "\fB\-m3\fR" 4
17580.IX Item "-m3"
17581Generate code for the \s-1SH3\s0.
17582.IP "\fB\-m3e\fR" 4
17583.IX Item "-m3e"
17584Generate code for the SH3e.
17585.IP "\fB\-m4\-nofpu\fR" 4
17586.IX Item "-m4-nofpu"
17587Generate 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"
17590Generate code for the \s-1SH4\s0 with a floating-point unit that only
17591supports single-precision arithmetic.
17592.IP "\fB\-m4\-single\fR" 4
17593.IX Item "-m4-single"
17594Generate code for the \s-1SH4\s0 assuming the floating-point unit is in
17595single-precision mode by default.
17596.IP "\fB\-m4\fR" 4
17597.IX Item "-m4"
17598Generate code for the \s-1SH4\s0.
17599.IP "\fB\-m4a\-nofpu\fR" 4
17600.IX Item "-m4a-nofpu"
17601Generate code for the SH4al\-dsp, or for a SH4a in such a way that the
17602floating-point unit is not used.
17603.IP "\fB\-m4a\-single\-only\fR" 4
17604.IX Item "-m4a-single-only"
17605Generate code for the SH4a, in such a way that no double-precision
17606floating-point operations are used.
17607.IP "\fB\-m4a\-single\fR" 4
17608.IX Item "-m4a-single"
17609Generate code for the SH4a assuming the floating-point unit is in
17610single-precision mode by default.
17611.IP "\fB\-m4a\fR" 4
17612.IX Item "-m4a"
17613Generate code for the SH4a.
17614.IP "\fB\-m4al\fR" 4
17615.IX Item "-m4al"
17616Same 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
17618instructions at the moment.
17619.IP "\fB\-mb\fR" 4
17620.IX Item "-mb"
17621Compile code for the processor in big-endian mode.
17622.IP "\fB\-ml\fR" 4
17623.IX Item "-ml"
17624Compile code for the processor in little-endian mode.
17625.IP "\fB\-mdalign\fR" 4
17626.IX Item "-mdalign"
17627Align doubles at 64\-bit boundaries. Note that this changes the calling
17628conventions, and thus some functions from the standard C library do
17629not work unless you recompile it first with \fB\-mdalign\fR.
17630.IP "\fB\-mrelax\fR" 4
17631.IX Item "-mrelax"
17632Shorten some address references at link time, when possible; uses the
17633linker option \fB\-relax\fR.
17634.IP "\fB\-mbigtable\fR" 4
17635.IX Item "-mbigtable"
17636Use 32\-bit offsets in \f(CW\*(C`switch\*(C'\fR tables. The default is to use
1763716\-bit offsets.
17638.IP "\fB\-mbitops\fR" 4
17639.IX Item "-mbitops"
17640Enable the use of bit manipulation instructions on \s-1SH2A\s0.
17641.IP "\fB\-mfmovd\fR" 4
17642.IX Item "-mfmovd"
17643Enable the use of the instruction \f(CW\*(C`fmovd\*(C'\fR. Check \fB\-mdalign\fR for
17644alignment constraints.
17645.IP "\fB\-mhitachi\fR" 4
17646.IX Item "-mhitachi"
17647Comply with the calling conventions defined by Renesas.
17648.IP "\fB\-mrenesas\fR" 4
17649.IX Item "-mrenesas"
17650Comply with the calling conventions defined by Renesas.
17651.IP "\fB\-mno\-renesas\fR" 4
17652.IX Item "-mno-renesas"
17653Comply with the calling conventions defined for \s-1GCC\s0 before the Renesas
17654conventions were available. This option is the default for all
17655targets of the \s-1SH\s0 toolchain.
17656.IP "\fB\-mnomacsave\fR" 4
17657.IX Item "-mnomacsave"
17658Mark 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
17666Control the \s-1IEEE\s0 compliance of floating-point comparisons, which affects the
17667handling 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
17669enabled \fB\-mno\-ieee\fR is implicitly set, which results in faster
17670floating-point greater-equal and less-equal comparisons. The implcit settings
17671can 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"
17674Inline code to invalidate instruction cache entries after setting up
17675nested function trampolines.
17676This option has no effect if \fB\-musermode\fR is in effect and the selected
17677code generation option (e.g. \fB\-m4\fR) does not allow the use of the \f(CW\*(C`icbi\*(C'\fR
17678instruction.
17679If the selected code generation option does not allow the use of the \f(CW\*(C`icbi\*(C'\fR
17680instruction, and \fB\-musermode\fR is not in effect, the inlined code
17681manipulates the instruction cache address array directly with an associative
17682write. This not only requires privileged mode at run time, but it also
17683fails 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"
17686Dump instruction size and location in the assembly code.
17687.IP "\fB\-mpadstruct\fR" 4
17688.IX Item "-mpadstruct"
17689This option is deprecated. It pads structures to multiple of 4 bytes,
17690which 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"
17693Sets the model of atomic operations and additional parameters as a comma
17694separated 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"
17699Disable compiler generated atomic sequences and emit library calls for atomic
17700operations. 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"
17703Generate GNU/Linux compatible gUSA software atomic sequences for the atomic
17704built-in functions. The generated atomic sequences require additional support
17705from the interrupt/exception handling code of the system and are only suitable
17706for SH3* and SH4* single-core systems. This option is enabled by default when
17707the target is \f(CW\*(C`sh\-*\-linux*\*(C'\fR and SH3* or SH4*. When the target is \s-1SH4A\s0,
17708this 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"
17713Generate software atomic sequences that use a variable in the thread control
17714block. This is a variation of the gUSA sequences which can also be used on
17715SH1* and SH2* targets. The generated atomic sequences require additional
17716support from the interrupt/exception handling code of the system and are only
17717suitable for single-core systems. When using this model, the \fBgbr\-offset=\fR
17718parameter has to be specified as well.
17719.IP "\fBsoft-imask\fR" 4
17720.IX Item "soft-imask"
17721Generate software atomic sequences that temporarily disable interrupts by
17722setting \f(CW\*(C`SR.IMASK = 1111\*(C'\fR. This model works only when the program runs
17723in privileged mode and is only suitable for single-core systems. Additional
17724support from the interrupt/exception handling code of the system is not
17725required. 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"
17729Generate hardware atomic sequences using the \f(CW\*(C`movli.l\*(C'\fR and \f(CW\*(C`movco.l\*(C'\fR
17730instructions only. This is only available on \s-1SH4A\s0 and is suitable for
17731multi-core systems. Since the hardware instructions support only 32 bit atomic
17732variables access to 8 or 16 bit variables is emulated with 32 bit accesses.
17733Code compiled with this option will also be compatible with other software
17734atomic model interrupt/exception handling systems if executed on an \s-1SH4A\s0
17735system. Additional support from the interrupt/exception handling code of the
17736system is not required for this model.
17737.IP "\fBgbr\-offset=\fR" 4
17738.IX Item "gbr-offset="
17739This parameter specifies the offset in bytes of the variable in the thread
17740control block structure that should be used by the generated atomic sequences
17741when the \fBsoft-tcb\fR model has been selected. For other models this
17742parameter is ignored. The specified value must be an integer multiple of four
17743and in the range 0\-1020.
17744.IP "\fBstrict\fR" 4
17745.IX Item "strict"
17746This parameter prevents mixed usage of multiple atomic models, even though they
17747would be compatible, and will make the compiler generate atomic sequences of the
17748specified model only.
17749.RE
17750.RS 4
17751.RE
17752.IP "\fB\-mtas\fR" 4
17753.IX Item "-mtas"
17754Generate the \f(CW\*(C`tas.b\*(C'\fR opcode for \f(CW\*(C`_\|_atomic_test_and_set\*(C'\fR.
17755Notice that depending on the particular hardware and software configuration
17756this can degrade overall performance due to the operand cache line flushes
17757that are implied by the \f(CW\*(C`tas.b\*(C'\fR instruction. On multi-core \s-1SH4A\s0
17758processors the \f(CW\*(C`tas.b\*(C'\fR instruction must be used with caution since it
17759can result in data corruption for certain cache configurations.
17760.IP "\fB\-mspace\fR" 4
17761.IX Item "-mspace"
17762Optimize for space instead of speed. Implied by \fB\-Os\fR.
17763.IP "\fB\-mprefergot\fR" 4
17764.IX Item "-mprefergot"
17765When generating position-independent code, emit function calls using
17766the Global Offset Table instead of the Procedure Linkage Table.
17767.IP "\fB\-musermode\fR" 4
17768.IX Item "-musermode"
17769Don't generate privileged mode only code. This option
17770implies \fB\-mno\-inline\-ic_invalidate\fR
17771if the inlined code would not work in user mode.
17772This 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"
17775Set the cost to assume for a multiply insn.
17776.IP "\fB\-mdiv=\fR\fIstrategy\fR" 4
17777.IX Item "-mdiv=strategy"
17778Set the division strategy to be used for integer division operations.
17779For SHmedia \fIstrategy\fR can be one of:
17780.RS 4
17781.IP "\fBfp\fR" 4
17782.IX Item "fp"
17783Performs the operation in floating point. This has a very high latency,
17784but needs only a few instructions, so it might be a good choice if
17785your code has enough easily-exploitable \s-1ILP\s0 to allow the compiler to
17786schedule the floating-point instructions together with other instructions.
17787Division by zero causes a floating-point exception.
17788.IP "\fBinv\fR" 4
17789.IX Item "inv"
17790Uses integer operations to calculate the inverse of the divisor,
17791and then multiplies the dividend with the inverse. This strategy allows
17792\&\s-1CSE\s0 and hoisting of the inverse calculation. Division by zero calculates
17793an unspecified result, but does not trap.
17794.IP "\fBinv:minlat\fR" 4
17795.IX Item "inv:minlat"
17796A variant of \fBinv\fR where, if no \s-1CSE\s0 or hoisting opportunities
17797have been found, or if the entire operation has been hoisted to the same
17798place, the last stages of the inverse calculation are intertwined with the
17799final multiply to reduce the overall latency, at the expense of using a few
17800more instructions, and thus offering fewer scheduling opportunities with
17801other code.
17802.IP "\fBcall\fR" 4
17803.IX Item "call"
17804Calls a library function that usually implements the \fBinv:minlat\fR
17805strategy.
17806This gives high code density for \f(CW\*(C`m5\-*media\-nofpu\*(C'\fR compilations.
17807.IP "\fBcall2\fR" 4
17808.IX Item "call2"
17809Uses a different entry point of the same library function, where it
17810assumes that a pointer to a lookup table has already been set up, which
17811exposes 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
17820Use the \fBinv\fR algorithm for initial
17821code generation, but if the code stays unoptimized, revert to the \fBcall\fR,
17822\&\fBcall2\fR, or \fBfp\fR strategies, respectively. Note that the
17823potentially-trapping side effect of division by zero is carried by a
17824separate instruction, so it is possible that all the integer instructions
17825are hoisted out, but the marker for the side effect stays where it is.
17826A recombination to floating-point operations or a call is not possible
17827in 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
17834Variants of the \fBinv:minlat\fR strategy. In the case
17835that the inverse calculation is not separated from the multiply, they speed
17836up division where the dividend fits into 20 bits (plus sign where applicable)
17837by inserting a test to skip a number of operations in this case; this test
17838slows down the case of larger dividends. \fBinv20u\fR assumes the case of a such
17839a small dividend to be unlikely, and \fBinv20l\fR assumes it to be likely.
17840.RE
17841.RS 4
17842.Sp
17843For targets other than SHmedia \fIstrategy\fR can be one of:
17844.IP "\fBcall\-div1\fR" 4
17845.IX Item "call-div1"
17846Calls 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
17848unspecified 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"
17852Calls a library function that performs the operation in double precision
17853floating point. Division by zero causes a floating-point exception. This is
17854the default for SHcompact with \s-1FPU\s0. Specifying this for targets that do not
17855have 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"
17858Calls a library function that uses a lookup table for small divisors and
17859the \f(CW\*(C`div1\*(C'\fR instruction with case distinction for larger divisors. Division
17860by zero calculates an unspecified result and does not trap. This is the default
17861for \s-1SH4\s0. Specifying this for targets that do not have dynamic shift
17862instructions will default to \f(CW\*(C`call\-div1\*(C'\fR.
17863.RE
17864.RS 4
17865.Sp
17866When a division strategy has not been specified the default strategy will be
17867selected based on the current target. For \s-1SH2A\s0 the default strategy is to
17868use the \f(CW\*(C`divs\*(C'\fR and \f(CW\*(C`divu\*(C'\fR instructions instead of library function
17869calls.
17870.RE
17871.IP "\fB\-maccumulate\-outgoing\-args\fR" 4
17872.IX Item "-maccumulate-outgoing-args"
17873Reserve space once for outgoing arguments in the function prologue rather
17874than around each call. Generally beneficial for performance and size. Also
17875needed 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"
17878Set the name of the library function used for 32\-bit signed division to
17879\&\fIname\fR.
17880This only affects the name used in the \fBcall\fR and \fBinv:call\fR
17881division strategies, and the compiler still expects the same
17882sets 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"
17885Generate code treating the given register range as fixed registers.
17886A fixed register is one that the register allocator can not use. This is
17887useful when compiling kernel code. A register range is specified as
17888two registers separated by a dash. Multiple register ranges can be
17889specified separated by a comma.
17890.IP "\fB\-mindexed\-addressing\fR" 4
17891.IX Item "-mindexed-addressing"
17892Enable the use of the indexed addressing mode for SHmedia32/SHcompact.
17893This is only safe if the hardware and/or \s-1OS\s0 implement 32\-bit wrap-around
17894semantics for the indexed addressing mode. The architecture allows the
17895implementation of processors with 64\-bit \s-1MMU\s0, which the \s-1OS\s0 could use to
17896get 32\-bit addressing, but since no current hardware implementation supports
17897this or any other way to make the indexed addressing mode safe to use in
17898the 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"
17901Set the cost assumed for the \f(CW\*(C`gettr\*(C'\fR instruction to \fInumber\fR.
17902The 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"
17905Assume \f(CW\*(C`pt*\*(C'\fR instructions won't trap. This generally generates
17906better-scheduled code, but is unsafe on current hardware.
17907The current architecture
17908definition says that \f(CW\*(C`ptabs\*(C'\fR and \f(CW\*(C`ptrel\*(C'\fR trap when the target
17909anded with 3 is 3.
17910This has the unintentional effect of making it unsafe to schedule these
17911instructions 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
17913that runs constructors at program
17914startup, 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.
17916That means that all the constructors run a bit more quickly, but when
17917the loop comes to the end of the list, the program crashes because \f(CW\*(C`ptabs\*(C'\fR
17918loads \-1 into a target register.
17919.Sp
17920Since this option is unsafe for any
17921hardware implementing the current architecture specification, the default
17922is \fB\-mno\-pt\-fixed\fR. Unless specified explicitly with
17923\&\fB\-mgettrcost\fR, \fB\-mno\-pt\-fixed\fR also implies \fB\-mgettrcost=100\fR;
17924this deters register allocation from using target registers for storing
17925ordinary integers.
17926.IP "\fB\-minvalid\-symbols\fR" 4
17927.IX Item "-minvalid-symbols"
17928Assume symbols might be invalid. Ordinary function symbols generated by
17929the 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,
17932but with assembler and/or linker tricks it is possible
17933to generate symbols that cause \f(CW\*(C`ptabs\*(C'\fR or \f(CW\*(C`ptrel\*(C'\fR to trap.
17934This option is only meaningful when \fB\-mno\-pt\-fixed\fR is in effect.
17935It prevents cross-basic-block \s-1CSE\s0, hoisting and most scheduling
17936of 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"
17939Assume \fInum\fR to be the cost for a branch instruction. Higher numbers
17940make the compiler try to generate more branch-free code if possible.
17941If not specified the value is selected depending on the processor type that
17942is 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
17949Assume (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
17951compiler will try to prefer zero displacement branch code sequences. This is
17952enabled by default when generating code for \s-1SH4\s0 and \s-1SH4A\s0. It can be explicitly
17953disabled by specifying \fB\-mno\-zdcbranch\fR.
17954.IP "\fB\-mcbranchdi\fR" 4
17955.IX Item "-mcbranchdi"
17956Enable the \f(CW\*(C`cbranchdi4\*(C'\fR instruction pattern.
17957.IP "\fB\-mcmpeqdi\fR" 4
17958.IX Item "-mcmpeqdi"
17959Emit the \f(CW\*(C`cmpeqdi_t\*(C'\fR instruction pattern even when \fB\-mcbranchdi\fR
17960is 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
17967Generate code that uses (does not use) the floating-point multiply and
17968accumulate instructions. These instructions are generated by default
17969if 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
17972mapped 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
17979Allow or disallow the compiler to emit the \f(CW\*(C`fsca\*(C'\fR instruction for sine
17980and cosine approximations. The option \f(CW\*(C`\-mfsca\*(C'\fR must be used in
17981combination with \f(CW\*(C`\-funsafe\-math\-optimizations\*(C'\fR. It is enabled by default
17982when generating code for \s-1SH4A\s0. Using \f(CW\*(C`\-mno\-fsca\*(C'\fR disables sine and cosine
17983approximations 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
17990Allow or disallow the compiler to emit the \f(CW\*(C`fsrra\*(C'\fR instruction for
17991reciprocal square root approximations. The option \f(CW\*(C`\-mfsrra\*(C'\fR must be used
17992in 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
17995even if \f(CW\*(C`\-funsafe\-math\-optimizations\*(C'\fR and \f(CW\*(C`\-ffinite\-math\-only\*(C'\fR are
17996in effect.
17997.IP "\fB\-mpretend\-cmove\fR" 4
17998.IX Item "-mpretend-cmove"
17999Prefer zero-displacement conditional branches for conditional move instruction
18000patterns. 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
18005These \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
18009the compiler to not pass \fB\-z text\fR to the linker when linking a
18010shared object. Using this option, you can link position-dependent
18011code into a shared object.
18012.Sp
18013\&\fB\-mimpure\-text\fR suppresses the \*(L"relocations remain against
18014allocatable but non-writable sections\*(R" linker error message.
18015However, the necessary relocations trigger copy-on-write, and the
18016shared object is not actually shared across processes. Instead of
18017using \fB\-mimpure\-text\fR, you should compile all source code with
18018\&\fB\-fpic\fR or \fB\-fPIC\fR.
18019.PP
18020These switches are supported in addition to the above on Solaris 2:
18021.IP "\fB\-pthreads\fR" 4
18022.IX Item "-pthreads"
18023Add support for multithreading using the \s-1POSIX\s0 threads library. This
18024option sets flags for both the preprocessor and linker. This option does
18025not affect the thread safety of object code produced by the compiler or
18026that of libraries supplied with it.
18027.IP "\fB\-pthread\fR" 4
18028.IX Item "-pthread"
18029This is a synonym for \fB\-pthreads\fR.
18030.PP
18031\fI\s-1SPARC\s0 Options\fR
18032.IX Subsection "SPARC Options"
18033.PP
18034These \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
18041Specify \fB\-mapp\-regs\fR to generate output using the global registers
180422 through 4, which the \s-1SPARC\s0 \s-1SVR4\s0 \s-1ABI\s0 reserves for applications. This
18043is the default.
18044.Sp
18045To be fully \s-1SVR4\s0 ABI-compliant at the cost of some performance loss,
18046specify \fB\-mno\-app\-regs\fR. You should compile libraries and system
18047software 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
18054With \fB\-mflat\fR, the compiler does not generate save/restore instructions
18055and uses a \*(L"flat\*(R" or single register window model. This model is compatible
18056with the regular register window model. The local registers and the input
18057registers (0\-\-5) are still treated as \*(L"call-saved\*(R" registers and are
18058saved on the stack as needed.
18059.Sp
18060With \fB\-mno\-flat\fR (the default), the compiler generates save/restore
18061instructions (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
18068Generate output containing floating-point instructions. This is the
18069default.
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
18076Generate output containing library calls for floating point.
18077\&\fBWarning:\fR the requisite libraries are not available for all \s-1SPARC\s0
18078targets. Normally the facilities of the machine's usual C compiler are
18079used, but this cannot be done directly in cross-compilation. You must make
18080your own arrangements to provide suitable library functions for
18081cross-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;
18085therefore, it is only useful if you compile \fIall\fR of a program with
18086this option. In particular, you need to compile \fIlibgcc.a\fR, the
18087library that comes with \s-1GCC\s0, with \fB\-msoft\-float\fR in order for
18088this to work.
18089.IP "\fB\-mhard\-quad\-float\fR" 4
18090.IX Item "-mhard-quad-float"
18091Generate output containing quad-word (long double) floating-point
18092instructions.
18093.IP "\fB\-msoft\-quad\-float\fR" 4
18094.IX Item "-msoft-quad-float"
18095Generate output containing library calls for quad-word (long double)
18096floating-point instructions. The functions called are those specified
18097in the \s-1SPARC\s0 \s-1ABI\s0. This is the default.
18098.Sp
18099As of this writing, there are no \s-1SPARC\s0 implementations that have hardware
18100support for the quad-word floating-point instructions. They all invoke
18101a trap handler for one of these instructions, and then the trap handler
18102emulates the effect of the instruction. Because of the trap handler overhead,
18103this 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
18111Assume that doubles have 8\-byte alignment. This is the default.
18112.Sp
18113With \fB\-munaligned\-doubles\fR, \s-1GCC\s0 assumes that doubles have 8\-byte
18114alignment only if they are contained in another type, or if they have an
18115absolute address. Otherwise, it assumes they have 4\-byte alignment.
18116Specifying this option avoids some rare compatibility problems with code
18117generated by other compilers. It is not the default because it results
18118in 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
18125With \fB\-mfaster\-structs\fR, the compiler assumes that structures
18126should 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
18128assignment, in place of twice as many \f(CW\*(C`ld\*(C'\fR and \f(CW\*(C`st\*(C'\fR pairs.
18129However, 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
18131acknowledges that their resulting code is not directly in line with
18132the rules of the \s-1ABI\s0.
18133.IP "\fB\-mcpu=\fR\fIcpu_type\fR" 4
18134.IX Item "-mcpu=cpu_type"
18135Set the instruction set, register set, and instruction scheduling parameters
18136for 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,
18141and \fBniagara4\fR.
18142.Sp
18143Native Solaris and GNU/Linux toolchains also support the value \fBnative\fR,
18144which selects the best architecture option for the host processor.
18145\&\fB\-mcpu=native\fR has no effect if \s-1GCC\s0 does not recognize
18146the processor.
18147.Sp
18148Default instruction scheduling parameters are used for values that select
18149an architecture and not an implementation. These are \fBv7\fR, \fBv8\fR,
18150\&\fBsparclite\fR, \fBsparclet\fR, \fBv9\fR.
18151.Sp
18152Here is a list of each supported architecture and their supported
18153implementations.
18154.RS 4
18155.IP "v7" 4
18156.IX Item "v7"
18157cypress
18158.IP "v8" 4
18159.IX Item "v8"
18160supersparc, hypersparc, leon
18161.IP "sparclite" 4
18162.IX Item "sparclite"
18163f930, f934, sparclite86x
18164.IP "sparclet" 4
18165.IX Item "sparclet"
18166tsc701
18167.IP "v9" 4
18168.IX Item "v9"
18169ultrasparc, ultrasparc3, niagara, niagara2, niagara3, niagara4
18170.RE
18171.RS 4
18172.Sp
18173By default (unless configured otherwise), \s-1GCC\s0 generates code for the V7
18174variant of the \s-1SPARC\s0 architecture. With \fB\-mcpu=cypress\fR, the compiler
18175additionally optimizes it for the Cypress \s-1CY7C602\s0 chip, as used in the
18176SPARCStation/SPARCServer 3xx series. This is also appropriate for the older
18177SPARCStation 1, 2, \s-1IPX\s0 etc.
18178.Sp
18179With \fB\-mcpu=v8\fR, \s-1GCC\s0 generates code for the V8 variant of the \s-1SPARC\s0
18180architecture. The only difference from V7 code is that the compiler emits
18181the integer multiply and integer divide instructions which exist in \s-1SPARC\-V8\s0
18182but not in \s-1SPARC\-V7\s0. With \fB\-mcpu=supersparc\fR, the compiler additionally
18183optimizes it for the SuperSPARC chip, as used in the SPARCStation 10, 1000 and
181842000 series.
18185.Sp
18186With \fB\-mcpu=sparclite\fR, \s-1GCC\s0 generates code for the SPARClite variant of
18187the \s-1SPARC\s0 architecture. This adds the integer multiply, integer divide step
18188and scan (\f(CW\*(C`ffs\*(C'\fR) instructions which exist in SPARClite but not in \s-1SPARC\-V7\s0.
18189With \fB\-mcpu=f930\fR, the compiler additionally optimizes it for the
18190Fujitsu \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
18194With \fB\-mcpu=sparclet\fR, \s-1GCC\s0 generates code for the SPARClet variant of
18195the \s-1SPARC\s0 architecture. This adds the integer multiply, multiply/accumulate,
18196integer divide step and scan (\f(CW\*(C`ffs\*(C'\fR) instructions which exist in SPARClet
18197but not in \s-1SPARC\-V7\s0. With \fB\-mcpu=tsc701\fR, the compiler additionally
18198optimizes it for the \s-1TEMIC\s0 SPARClet chip.
18199.Sp
18200With \fB\-mcpu=v9\fR, \s-1GCC\s0 generates code for the V9 variant of the \s-1SPARC\s0
18201architecture. This adds 64\-bit integer and floating-point move instructions,
182023 additional floating-point condition code registers and conditional move
18203instructions. With \fB\-mcpu=ultrasparc\fR, the compiler additionally
18204optimizes it for the Sun UltraSPARC I/II/IIi chips. With
18205\&\fB\-mcpu=ultrasparc3\fR, the compiler additionally optimizes it for the
18206Sun UltraSPARC III/III+/IIIi/IIIi+/IV/IV+ chips. With
18207\&\fB\-mcpu=niagara\fR, the compiler additionally optimizes it for
18208Sun UltraSPARC T1 chips. With \fB\-mcpu=niagara2\fR, the compiler
18209additionally optimizes it for Sun UltraSPARC T2 chips. With
18210\&\fB\-mcpu=niagara3\fR, the compiler additionally optimizes it for Sun
18211UltraSPARC T3 chips. With \fB\-mcpu=niagara4\fR, the compiler
18212additionally optimizes it for Sun UltraSPARC T4 chips.
18213.RE
18214.IP "\fB\-mtune=\fR\fIcpu_type\fR" 4
18215.IX Item "-mtune=cpu_type"
18216Set the instruction scheduling parameters for machine type
18217\&\fIcpu_type\fR, but do not set the instruction set or register set that the
18218option \fB\-mcpu=\fR\fIcpu_type\fR does.
18219.Sp
18220The 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
18222that 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
18226native 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
18233With \fB\-mv8plus\fR, \s-1GCC\s0 generates code for the \s-1SPARC\-V8+\s0 \s-1ABI\s0. The
18234difference from the V8 \s-1ABI\s0 is that the global and out registers are
18235considered 64 bits wide. This is enabled by default on Solaris in 32\-bit
18236mode 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
18243With \fB\-mvis\fR, \s-1GCC\s0 generates code that takes advantage of the UltraSPARC
18244Visual 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
18251With \fB\-mvis2\fR, \s-1GCC\s0 generates code that takes advantage of
18252version 2.0 of the UltraSPARC Visual Instruction Set extensions. The
18253default is \fB\-mvis2\fR when targeting a cpu that supports such
18254instructions, such as UltraSPARC-III and later. Setting \fB\-mvis2\fR
18255also 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
18262With \fB\-mvis3\fR, \s-1GCC\s0 generates code that takes advantage of
18263version 3.0 of the UltraSPARC Visual Instruction Set extensions. The
18264default is \fB\-mvis3\fR when targeting a cpu that supports such
18265instructions, such as niagara\-3 and later. Setting \fB\-mvis3\fR
18266also 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
18273With \fB\-mcbcond\fR, \s-1GCC\s0 generates code that takes advantage of
18274compare-and-branch instructions, as defined in the Sparc Architecture 2011.
18275The default is \fB\-mcbcond\fR when targeting a cpu that supports such
18276instructions, 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
18283With \fB\-mpopc\fR, \s-1GCC\s0 generates code that takes advantage of the UltraSPARC
18284population count instruction. The default is \fB\-mpopc\fR
18285when targeting a cpu that supports such instructions, such as Niagara\-2 and
18286later.
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
18293With \fB\-mfmaf\fR, \s-1GCC\s0 generates code that takes advantage of the UltraSPARC
18294Fused Multiply-Add Floating-point extensions. The default is \fB\-mfmaf\fR
18295when targeting a cpu that supports such instructions, such as Niagara\-3 and
18296later.
18297.IP "\fB\-mfix\-at697f\fR" 4
18298.IX Item "-mfix-at697f"
18299Enable the documented workaround for the single erratum of the Atmel \s-1AT697F\s0
18300processor (which corresponds to erratum #13 of the \s-1AT697E\s0 processor).
18301.PP
18302These \fB\-m\fR options are supported in addition to the above
18303on \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
18310Generate code for a 32\-bit or 64\-bit environment.
18311The 32\-bit environment sets int, long and pointer to 32 bits.
18312The 64\-bit environment sets int to 32 bits and long and pointer
18313to 64 bits.
18314.IP "\fB\-mcmodel=\fR\fIwhich\fR" 4
18315.IX Item "-mcmodel=which"
18316Set the code model to one of
18317.RS 4
18318.IP "\fBmedlow\fR" 4
18319.IX Item "medlow"
18320The Medium/Low code model: 64\-bit addresses, programs
18321must be linked in the low 32 bits of memory. Programs can be statically
18322or dynamically linked.
18323.IP "\fBmedmid\fR" 4
18324.IX Item "medmid"
18325The Medium/Middle code model: 64\-bit addresses, programs
18326must be linked in the low 44 bits of memory, the text and data segments must
18327be less than 2GB in size and the data segment must be located within 2GB of
18328the text segment.
18329.IP "\fBmedany\fR" 4
18330.IX Item "medany"
18331The Medium/Anywhere code model: 64\-bit addresses, programs
18332may be linked anywhere in memory, the text and data segments must be less
18333than 2GB in size and the data segment must be located within 2GB of the
18334text segment.
18335.IP "\fBembmedany\fR" 4
18336.IX Item "embmedany"
18337The Medium/Anywhere code model for embedded systems:
1833864\-bit addresses, the text and data segments must be less than 2GB in
18339size, both starting anywhere in memory (determined at link time). The
18340global register \f(CW%g4\fR points to the base of the data segment. Programs
18341are 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"
18347Set the memory model in force on the processor to one of
18348.RS 4
18349.IP "\fBdefault\fR" 4
18350.IX Item "default"
18351The default memory model for the processor and operating system.
18352.IP "\fBrmo\fR" 4
18353.IX Item "rmo"
18354Relaxed Memory Order
18355.IP "\fBpso\fR" 4
18356.IX Item "pso"
18357Partial Store Order
18358.IP "\fBtso\fR" 4
18359.IX Item "tso"
18360Total Store Order
18361.IP "\fBsc\fR" 4
18362.IX Item "sc"
18363Sequential Consistency
18364.RE
18365.RS 4
18366.Sp
18367These memory models are formally defined in Appendix D of the Sparc V9
18368architecture 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
18376With \fB\-mstack\-bias\fR, \s-1GCC\s0 assumes that the stack pointer, and
18377frame pointer if present, are offset by \-2047 which must be added back
18378when making stack frame references. This is the default in 64\-bit mode.
18379Otherwise, assume no such offset is present.
18380.PP
18381\fI\s-1SPU\s0 Options\fR
18382.IX Subsection "SPU Options"
18383.PP
18384These \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
18391The loader for \s-1SPU\s0 does not handle dynamic relocations. By default, \s-1GCC\s0
18392gives an error when it generates code that requires a dynamic
18393relocation. \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
18401Instructions that initiate or test completion of \s-1DMA\s0 must not be
18402reordered with respect to loads and stores of the memory that is being
18403accessed.
18404With \fB\-munsafe\-dma\fR you must use the \f(CW\*(C`volatile\*(C'\fR keyword to protect
18405memory accesses, but that can lead to inefficient code in places where the
18406memory is known to not change. Rather than mark the memory as volatile,
18407you can use \fB\-msafe\-dma\fR to tell the compiler to treat
18408the \s-1DMA\s0 instructions as potentially affecting all memory.
18409.IP "\fB\-mbranch\-hints\fR" 4
18410.IX Item "-mbranch-hints"
18411By default, \s-1GCC\s0 generates a branch hint instruction to avoid
18412pipeline stalls for always-taken or probably-taken branches. A hint
18413is not generated closer than 8 instructions away from its branch.
18414There is little reason to disable them, except for debugging purposes,
18415or 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
18422By default, \s-1GCC\s0 generates code assuming that addresses are never larger
18423than 18 bits. With \fB\-mlarge\-mem\fR code is generated that assumes
18424a full 32\-bit address.
18425.IP "\fB\-mstdmain\fR" 4
18426.IX Item "-mstdmain"
18427By default, \s-1GCC\s0 links against startup code that assumes the SPU-style
18428main function interface (which has an unconventional parameter list).
18429With \fB\-mstdmain\fR, \s-1GCC\s0 links your program against startup
18430code that assumes a C99\-style interface to \f(CW\*(C`main\*(C'\fR, including a
18431local 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"
18434Generate code treating the given register range as fixed registers.
18435A fixed register is one that the register allocator cannot use. This is
18436useful when compiling kernel code. A register range is specified as
18437two registers separated by a dash. Multiple register ranges can be
18438specified 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
18445Compile code assuming that pointers to the \s-1PPU\s0 address space accessed
18446via the \f(CW\*(C`_\|_ea\*(C'\fR named address space qualifier are either 32 or 64
18447bits wide. The default is 32 bits. As this is an ABI-changing option,
18448all 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
18455Allow/disallow treating the \f(CW\*(C`_\|_ea\*(C'\fR address space as superset
18456of the generic address space. This enables explicit type casts
18457between \f(CW\*(C`_\|_ea\*(C'\fR and generic pointer as well as implicit
18458conversions of generic pointers to \f(CW\*(C`_\|_ea\*(C'\fR pointers. The
18459default is to allow address space pointer conversions.
18460.IP "\fB\-mcache\-size=\fR\fIcache-size\fR" 4
18461.IX Item "-mcache-size=cache-size"
18462This option controls the version of libgcc that the compiler links to an
18463executable and selects a software-managed cache for accessing variables
18464in the \f(CW\*(C`_\|_ea\*(C'\fR address space with a particular cache size. Possible
18465options for \fIcache-size\fR are \fB8\fR, \fB16\fR, \fB32\fR, \fB64\fR
18466and \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
18473This option controls the version of libgcc that the compiler links to an
18474executable and selects whether atomic updates to the software-managed
18475cache of PPU-side variables are used. If you use atomic updates, changes
18476to a \s-1PPU\s0 variable from \s-1SPU\s0 code using the \f(CW\*(C`_\|_ea\*(C'\fR named address space
18477qualifier do not interfere with changes to other \s-1PPU\s0 variables residing
18478in the same cache line from \s-1PPU\s0 code. If you do not use atomic updates,
18479such interference may occur; however, writing back cache lines is
18480more 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
18487By default, \s-1GCC\s0 inserts nops to increase dual issue when it expects
18488it to increase performance. \fIn\fR can be a value from 0 to 10. A
18489smaller \fIn\fR inserts fewer nops. 10 is the default, 0 is the
18490same 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"
18493Maximum number of nops to insert for a branch hint. A branch hint must
18494be at least 8 instructions away from the branch it is affecting. \s-1GCC\s0
18495inserts up to \fIn\fR nops to enforce this, otherwise it does not
18496generate the branch hint.
18497.IP "\fB\-mhint\-max\-distance=\fR\fIn\fR" 4
18498.IX Item "-mhint-max-distance=n"
18499The encoding of the branch hint instruction limits the hint to be within
18500256 instructions of the branch it is affecting. By default, \s-1GCC\s0 makes
18501sure it is within 125.
18502.IP "\fB\-msafe\-hints\fR" 4
18503.IX Item "-msafe-hints"
18504Work around a hardware bug that causes the \s-1SPU\s0 to stall indefinitely.
18505By default, \s-1GCC\s0 inserts the \f(CW\*(C`hbrp\*(C'\fR instruction to make sure
18506this stall won't happen.
18507.PP
18508\fIOptions for System V\fR
18509.IX Subsection "Options for System V"
18510.PP
18511These additional options are available on System V Release 4 for
18512compatibility with other compilers on those systems:
18513.IP "\fB\-G\fR" 4
18514.IX Item "-G"
18515Create a shared object.
18516It is recommended that \fB\-symbolic\fR or \fB\-shared\fR be used instead.
18517.IP "\fB\-Qy\fR" 4
18518.IX Item "-Qy"
18519Identify 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"
18523Refrain from adding \f(CW\*(C`.ident\*(C'\fR directives to the output file (this is
18524the default).
18525.IP "\fB\-YP,\fR\fIdirs\fR" 4
18526.IX Item "-YP,dirs"
18527Search the directories \fIdirs\fR, and no others, for libraries
18528specified with \fB\-l\fR.
18529.IP "\fB\-Ym,\fR\fIdir\fR" 4
18530.IX Item "-Ym,dir"
18531Look in the directory \fIdir\fR to find the M4 preprocessor.
18532The assembler uses this option.
18533.PP
18534\fITILE-Gx Options\fR
18535.IX Subsection "TILE-Gx Options"
18536.PP
18537These \fB\-m\fR options are supported on the TILE-Gx:
18538.IP "\fB\-mcmodel=small\fR" 4
18539.IX Item "-mcmodel=small"
18540Generate code for the small model. The distance for direct calls is
18541limited to 500M in either direction. PC-relative addresses are 32
18542bits. Absolute addresses support the full address range.
18543.IP "\fB\-mcmodel=large\fR" 4
18544.IX Item "-mcmodel=large"
18545Generate code for the large model. There is no limitation on call
18546distance, pc-relative addresses, or absolute addresses.
18547.IP "\fB\-mcpu=\fR\fIname\fR" 4
18548.IX Item "-mcpu=name"
18549Selects the type of \s-1CPU\s0 to be targeted. Currently the only supported
18550type 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
18557Generate code for a 32\-bit or 64\-bit environment. The 32\-bit
18558environment sets int, long, and pointer to 32 bits. The 64\-bit
18559environment 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
18564These \fB\-m\fR options are supported on the TILEPro:
18565.IP "\fB\-mcpu=\fR\fIname\fR" 4
18566.IX Item "-mcpu=name"
18567Selects the type of \s-1CPU\s0 to be targeted. Currently the only supported
18568type is \fBtilepro\fR.
18569.IP "\fB\-m32\fR" 4
18570.IX Item "-m32"
18571Generate code for a 32\-bit environment, which sets int, long, and
18572pointer to 32 bits. This is the only supported behavior so the flag
18573is essentially ignored.
18574.PP
18575\fIV850 Options\fR
18576.IX Subsection "V850 Options"
18577.PP
18578These \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
18585Treat all calls as being far away (near). If calls are assumed to be
18586far away, the compiler always loads the function's address into a
18587register, 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
18594Do not optimize (do optimize) basic blocks that use the same index
18595pointer 4 or more times to copy pointer into the \f(CW\*(C`ep\*(C'\fR register, and
18596use the shorter \f(CW\*(C`sld\*(C'\fR and \f(CW\*(C`sst\*(C'\fR instructions. The \fB\-mep\fR
18597option 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
18604Do not use (do use) external functions to save and restore registers
18605at the prologue and epilogue of a function. The external functions
18606are slower, but use less code space if more than one function saves
18607the same number of registers. The \fB\-mprolog\-function\fR option
18608is on by default if you optimize.
18609.IP "\fB\-mspace\fR" 4
18610.IX Item "-mspace"
18611Try to make the code as small as possible. At present, this just turns
18612on the \fB\-mep\fR and \fB\-mprolog\-function\fR options.
18613.IP "\fB\-mtda=\fR\fIn\fR" 4
18614.IX Item "-mtda=n"
18615Put static or global variables whose size is \fIn\fR bytes or less into
18616the tiny data area that register \f(CW\*(C`ep\*(C'\fR points to. The tiny data
18617area 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"
18620Put static or global variables whose size is \fIn\fR bytes or less into
18621the small data area that register \f(CW\*(C`gp\*(C'\fR points to. The small data
18622area can hold up to 64 kilobytes.
18623.IP "\fB\-mzda=\fR\fIn\fR" 4
18624.IX Item "-mzda=n"
18625Put static or global variables whose size is \fIn\fR bytes or less into
18626the first 32 kilobytes of memory.
18627.IP "\fB\-mv850\fR" 4
18628.IX Item "-mv850"
18629Specify that the target processor is the V850.
18630.IP "\fB\-mv850e3v5\fR" 4
18631.IX Item "-mv850e3v5"
18632Specify that the target processor is the V850E3V5. The preprocessor
18633constant \fB_\|_v850e3v5_\|_\fR is defined if this option is used.
18634.IP "\fB\-mv850e2v4\fR" 4
18635.IX Item "-mv850e2v4"
18636Specify that the target processor is the V850E3V5. This is an alias for
18637the \fB\-mv850e3v5\fR option.
18638.IP "\fB\-mv850e2v3\fR" 4
18639.IX Item "-mv850e2v3"
18640Specify that the target processor is the V850E2V3. The preprocessor
18641constant \fB_\|_v850e2v3_\|_\fR is defined if this option is used.
18642.IP "\fB\-mv850e2\fR" 4
18643.IX Item "-mv850e2"
18644Specify that the target processor is the V850E2. The preprocessor
18645constant \fB_\|_v850e2_\|_\fR is defined if this option is used.
18646.IP "\fB\-mv850e1\fR" 4
18647.IX Item "-mv850e1"
18648Specify that the target processor is the V850E1. The preprocessor
18649constants \fB_\|_v850e1_\|_\fR and \fB_\|_v850e_\|_\fR are defined if
18650this option is used.
18651.IP "\fB\-mv850es\fR" 4
18652.IX Item "-mv850es"
18653Specify that the target processor is the V850ES. This is an alias for
18654the \fB\-mv850e1\fR option.
18655.IP "\fB\-mv850e\fR" 4
18656.IX Item "-mv850e"
18657Specify that the target processor is the V850E. The preprocessor
18658constant \fB_\|_v850e_\|_\fR is defined if this option is used.
18659.Sp
18660If neither \fB\-mv850\fR nor \fB\-mv850e\fR nor \fB\-mv850e1\fR
18661nor \fB\-mv850e2\fR nor \fB\-mv850e2v3\fR nor \fB\-mv850e3v5\fR
18662are defined then a default target processor is chosen and the
18663relevant \fB_\|_v850*_\|_\fR preprocessor constant is defined.
18664.Sp
18665The preprocessor constants \fB_\|_v850\fR and \fB_\|_v851_\|_\fR are always
18666defined, 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
18673This option suppresses generation of the \f(CW\*(C`CALLT\*(C'\fR instruction for the
18674v850e, v850e1, v850e2, v850e2v3 and v850e3v5 flavors of the v850
18675architecture.
18676.Sp
18677This option is enabled by default when the \s-1RH850\s0 \s-1ABI\s0 is
18678in 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
18680then 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
18687Pass on (or do not pass on) the \fB\-mrelax\fR command line option
18688to 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
18695Disable (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
18702Disable (or re-enable) the generation of hardware floating point
18703instructions. This option is only significant when the target
18704architecture is \fBV850E2V3\fR or higher. If hardware floating point
18705instructions 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"
18710Enables the use of the e3v5 \s-1LOOP\s0 instruction. The use of this
18711instruction is not enabled by default when the e3v5 architecture is
18712selected 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
18719Enables support for the \s-1RH850\s0 version of the V850 \s-1ABI\s0. This is the
18720default. With this version of the \s-1ABI\s0 the following rules apply:
18721.RS 4
18722.IP "\(bu" 4
18723Integer sized structures and unions are returned via a memory pointer
18724rather than a register.
18725.IP "\(bu" 4
18726Large structures and unions (more than 8 bytes in size) are passed by
18727value.
18728.IP "\(bu" 4
18729Functions are aligned to 16\-bit boundaries.
18730.IP "\(bu" 4
18731The \fB\-m8byte\-align\fR command line option is supported.
18732.IP "\(bu" 4
18733The \fB\-mdisable\-callt\fR command line option is enabled by
18734default. The \fB\-mno\-disable\-callt\fR command line option is not
18735supported.
18736.RE
18737.RS 4
18738.Sp
18739When 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"
18744Enables support for the old \s-1GCC\s0 version of the V850 \s-1ABI\s0. With this
18745version of the \s-1ABI\s0 the following rules apply:
18746.RS 4
18747.IP "\(bu" 4
18748Integer sized structures and unions are returned in register \f(CW\*(C`r10\*(C'\fR.
18749.IP "\(bu" 4
18750Large structures and unions (more than 8 bytes in size) are passed by
18751reference.
18752.IP "\(bu" 4
18753Functions are aligned to 32\-bit boundaries, unless optimizing for
18754size.
18755.IP "\(bu" 4
18756The \fB\-m8byte\-align\fR command line option is not supported.
18757.IP "\(bu" 4
18758The \fB\-mdisable\-callt\fR command line option is supported but not
18759enabled by default.
18760.RE
18761.RS 4
18762.Sp
18763When 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
18772Enables support for \f(CW\*(C`doubles\*(C'\fR and \f(CW\*(C`long long\*(C'\fR types to be
18773aligned on 8\-byte boundaries. The default is to restrict the
18774alignment 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"
18779Generate code suitable for big switch tables. Use this option only if
18780the assembler/linker complain about out of range branches within a switch
18781table.
18782.IP "\fB\-mapp\-regs\fR" 4
18783.IX Item "-mapp-regs"
18784This option causes r2 and r5 to be used in the code generated by
18785the compiler. This setting is the default.
18786.IP "\fB\-mno\-app\-regs\fR" 4
18787.IX Item "-mno-app-regs"
18788This 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
18793These \fB\-m\fR options are defined for the \s-1VAX:\s0
18794.IP "\fB\-munix\fR" 4
18795.IX Item "-munix"
18796Do not output certain jump instructions (\f(CW\*(C`aobleq\*(C'\fR and so on)
18797that the Unix assembler for the \s-1VAX\s0 cannot handle across long
18798ranges.
18799.IP "\fB\-mgnu\fR" 4
18800.IX Item "-mgnu"
18801Do 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"
18805Output 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
18810These \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"
18813Return \s-1VMS\s0 condition codes from \f(CW\*(C`main\*(C'\fR. The default is to return POSIX-style
18814condition (e.g. error) codes.
18815.IP "\fB\-mdebug\-main=\fR\fIprefix\fR" 4
18816.IX Item "-mdebug-main=prefix"
18817Flag the first routine whose name starts with \fIprefix\fR as the main
18818routine for the debugger.
18819.IP "\fB\-mmalloc64\fR" 4
18820.IX Item "-mmalloc64"
18821Default to 64\-bit memory allocation routines.
18822.IP "\fB\-mpointer\-size=\fR\fIsize\fR" 4
18823.IX Item "-mpointer-size=size"
18824Set 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
18826for 64 bit pointers, and \fBno\fR for supporting only 32 bit pointers.
18827The later option disables \f(CW\*(C`pragma pointer_size\*(C'\fR.
18828.PP
18829\fIVxWorks Options\fR
18830.IX Subsection "VxWorks Options"
18831.PP
18832The options in this section are defined for all VxWorks targets.
18833Options specific to the target hardware are listed with the other
18834options 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
18839defines the preprocessor macro \f(CW\*(C`_\|_RTP_\|_\*(C'\fR.
18840.IP "\fB\-non\-static\fR" 4
18841.IX Item "-non-static"
18842Link an \s-1RTP\s0 executable against shared libraries rather than static
18843libraries. The options \fB\-static\fR and \fB\-shared\fR can
18844also be used for RTPs; \fB\-static\fR
18845is 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
18852These options are passed down to the linker. They are defined for
18853compatibility with Diab.
18854.IP "\fB\-Xbind\-lazy\fR" 4
18855.IX Item "-Xbind-lazy"
18856Enable 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"
18860Disable lazy binding of function calls. This option is the default and
18861is defined for compatibility with Diab.
18862.PP
18863\fIx86\-64 Options\fR
18864.IX Subsection "x86-64 Options"
18865.PP
18866These are listed under
18867.PP
18868\fIXstormy16 Options\fR
18869.IX Subsection "Xstormy16 Options"
18870.PP
18871These options are defined for Xstormy16:
18872.IP "\fB\-msim\fR" 4
18873.IX Item "-msim"
18874Choose startup files and linker script suitable for the simulator.
18875.PP
18876\fIXtensa Options\fR
18877.IX Subsection "Xtensa Options"
18878.PP
18879These 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
18886Enable or disable use of \f(CW\*(C`CONST16\*(C'\fR instructions for loading
18887constant values. The \f(CW\*(C`CONST16\*(C'\fR instruction is currently not a
18888standard option from Tensilica. When enabled, \f(CW\*(C`CONST16\*(C'\fR
18889instructions are always used in place of the standard \f(CW\*(C`L32R\*(C'\fR
18890instructions. The use of \f(CW\*(C`CONST16\*(C'\fR is enabled by default only if
18891the \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
18898Enable or disable use of fused multiply/add and multiply/subtract
18899instructions in the floating-point option. This has no effect if the
18900floating-point option is not also enabled. Disabling fused multiply/add
18901and multiply/subtract instructions forces the compiler to use separate
18902instructions for the multiply and add/subtract operations. This may be
18903desirable in some cases where strict \s-1IEEE\s0 754\-compliant results are
18904required: the fused multiply add/subtract instructions do not round the
18905intermediate result, thereby producing results with \fImore\fR bits of
18906precision than specified by the \s-1IEEE\s0 standard. Disabling fused multiply
18907add/subtract instructions also ensures that the program output is not
18908sensitive to the compiler's ability to combine multiply and add/subtract
18909operations.
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
18916When 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.
18918The 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"
18922For targets, like GNU/Linux, where all user-mode Xtensa code must be
18923position-independent code (\s-1PIC\s0), this option disables \s-1PIC\s0 for compiling
18924kernel 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
18931Control the treatment of literal pools. The default is
18932\&\fB\-mno\-text\-section\-literals\fR, which places literals in a separate
18933section in the output file. This allows the literal pool to be placed
18934in a data \s-1RAM/ROM\s0, and it also allows the linker to combine literal
18935pools from separate object files to remove redundant literals and
18936improve code size. With \fB\-mtext\-section\-literals\fR, the literals
18937are interspersed in the text section in order to keep them as close as
18938possible to their references. This may be necessary for large assembly
18939files.
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
18946When this option is enabled, \s-1GCC\s0 instructs the assembler to
18947automatically align instructions to reduce branch penalties at the
18948expense of some code density. The assembler attempts to widen density
18949instructions to align branch targets and the instructions following call
18950instructions. If there are not enough preceding safe density
18951instructions to align a target, no widening is performed. The
18952default is \fB\-mtarget\-align\fR. These options do not affect the
18953treatment of auto-aligned instructions like \f(CW\*(C`LOOP\*(C'\fR, which the
18954assembler always aligns, either by widening density instructions or
18955by 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
18962When this option is enabled, \s-1GCC\s0 instructs the assembler to translate
18963direct calls to indirect calls unless it can determine that the target
18964of a direct call is in the range allowed by the call instruction. This
18965translation typically occurs for calls to functions in other source
18966files. Specifically, the assembler translates a direct \f(CW\*(C`CALL\*(C'\fR
18967instruction into an \f(CW\*(C`L32R\*(C'\fR followed by a \f(CW\*(C`CALLX\*(C'\fR instruction.
18968The default is \fB\-mno\-longcalls\fR. This option should be used in
18969programs where the call target can potentially be out of range. This
18970option is implemented in the assembler, not the compiler, so the
18971assembly code generated by \s-1GCC\s0 still shows direct call
18972instructions\-\-\-look at the disassembled object code to see the actual
18973instructions. Note that the assembler uses an indirect call for
18974every 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
18979These are listed under
18980.SS "Options for Code Generation Conventions"
18981.IX Subsection "Options for Code Generation Conventions"
18982These machine-independent options control the interface conventions
18983used in code generation.
18984.PP
18985Most of them have both positive and negative forms; the negative form
18986of \fB\-ffoo\fR is \fB\-fno\-foo\fR. In the table below, only
18987one of the forms is listed\-\-\-the one that is not the default. You
18988can figure out the other form by either removing \fBno\-\fR or adding
18989it.
18990.IP "\fB\-fbounds\-check\fR" 4
18991.IX Item "-fbounds-check"
18992For front ends that support it, generate additional code to check that
18993indices used to access arrays are within the declared range. This is
18994currently only supported by the Java and Fortran front ends, where
18995this option defaults to true and false respectively.
18996.IP "\fB\-fstack\-reuse=\fR\fIreuse-level\fR" 4
18997.IX Item "-fstack-reuse=reuse-level"
18998This option controls stack space reuse for user declared local/auto variables
18999and compiler generated temporaries. \fIreuse_level\fR can be \fBall\fR,
19000\&\fBnamed_vars\fR, or \fBnone\fR. \fBall\fR enables stack reuse for all
19001local variables and temporaries, \fBnamed_vars\fR enables the reuse only for
19002user defined local variables with names, and \fBnone\fR disables stack reuse
19003completely. The default value is \fBall\fR. The option is needed when the
19004program extends the lifetime of a scoped local variable or a compiler generated
19005temporary beyond the end point defined by the language. When a lifetime of
19006a variable ends, and if the variable lives in memory, the optimizing compiler
19007has the freedom to reuse its stack space with other temporaries or scoped
19008local variables whose live range does not overlap with it. Legacy code extending
19009local lifetime will likely to break with the stack reuse optimization.
19010.Sp
19011For 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
19034Another 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
19064The lifetime of a compiler generated temporary is well defined by the \*(C+
19065standard. When a lifetime of a temporary ends, and if the temporary lives
19066in memory, the optimizing compiler has the freedom to reuse its stack
19067space with other temporaries or scoped local variables whose live range
19068does not overlap with it. However some of the legacy code relies on
19069the behavior of older compilers in which temporaries' stack space is
19070not reused, the aggressive stack reuse can lead to runtime errors. This
19071option is used to control the temporary stack reuse optimization.
19072.IP "\fB\-ftrapv\fR" 4
19073.IX Item "-ftrapv"
19074This option generates traps for signed overflow on addition, subtraction,
19075multiplication operations.
19076.IP "\fB\-fwrapv\fR" 4
19077.IX Item "-fwrapv"
19078This option instructs the compiler to assume that signed arithmetic
19079overflow of addition, subtraction and multiplication wraps around
19080using twos-complement representation. This flag enables some optimizations
19081and disables others. This option is enabled by default for the Java
19082front end, as required by the Java language specification.
19083.IP "\fB\-fexceptions\fR" 4
19084.IX Item "-fexceptions"
19085Enable exception handling. Generates extra code needed to propagate
19086exceptions. For some targets, this implies \s-1GCC\s0 generates frame
19087unwind information for all functions, which can produce significant data
19088size overhead, although it does not affect execution. If you do not
19089specify this option, \s-1GCC\s0 enables it by default for languages like
19090\&\*(C+ that normally require exception handling, and disables it for
19091languages like C that do not normally require it. However, you may need
19092to enable this option when compiling C code that needs to interoperate
19093properly with exception handlers written in \*(C+. You may also wish to
19094disable this option if you are compiling older \*(C+ programs that don't
19095use exception handling.
19096.IP "\fB\-fnon\-call\-exceptions\fR" 4
19097.IX Item "-fnon-call-exceptions"
19098Generate code that allows trapping instructions to throw exceptions.
19099Note that this requires platform-specific runtime support that does
19100not exist everywhere. Moreover, it only allows \fItrapping\fR
19101instructions to throw exceptions, i.e. memory references or floating-point
19102instructions. It does not allow exceptions to be thrown from
19103arbitrary signal handlers such as \f(CW\*(C`SIGALRM\*(C'\fR.
19104.IP "\fB\-fdelete\-dead\-exceptions\fR" 4
19105.IX Item "-fdelete-dead-exceptions"
19106Consider that instructions that may throw exceptions but don't otherwise
19107contribute to the execution of the program can be optimized away.
19108This option is enabled by default for the Ada front end, as permitted by
19109the Ada language specification.
19110Optimization 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"
19113Similar to \fB\-fexceptions\fR, except that it just generates any needed
19114static data, but does not affect the generated code in any other way.
19115You normally do not need to enable this option; instead, a language processor
19116that needs this handling enables it on your behalf.
19117.IP "\fB\-fasynchronous\-unwind\-tables\fR" 4
19118.IX Item "-fasynchronous-unwind-tables"
19119Generate unwind table in \s-1DWARF\s0 2 format, if supported by target machine. The
19120table is exact at each instruction boundary, so it can be used for stack
19121unwinding from asynchronous events (such as debugger or garbage collector).
19122.IP "\fB\-fpcc\-struct\-return\fR" 4
19123.IX Item "-fpcc-struct-return"
19124Return \*(L"short\*(R" \f(CW\*(C`struct\*(C'\fR and \f(CW\*(C`union\*(C'\fR values in memory like
19125longer ones, rather than in registers. This convention is less
19126efficient, but it has the advantage of allowing intercallability between
19127GCC-compiled files and files compiled with other compilers, particularly
19128the Portable C Compiler (pcc).
19129.Sp
19130The precise convention for returning structures in memory depends
19131on the target configuration macros.
19132.Sp
19133Short structures and unions are those whose size and alignment match
19134that of some integer type.
19135.Sp
19136\&\fBWarning:\fR code compiled with the \fB\-fpcc\-struct\-return\fR
19137switch is not binary compatible with code compiled with the
19138\&\fB\-freg\-struct\-return\fR switch.
19139Use it to conform to a non-default application binary interface.
19140.IP "\fB\-freg\-struct\-return\fR" 4
19141.IX Item "-freg-struct-return"
19142Return \f(CW\*(C`struct\*(C'\fR and \f(CW\*(C`union\*(C'\fR values in registers when possible.
19143This is more efficient for small structures than
19144\&\fB\-fpcc\-struct\-return\fR.
19145.Sp
19146If you specify neither \fB\-fpcc\-struct\-return\fR nor
19147\&\fB\-freg\-struct\-return\fR, \s-1GCC\s0 defaults to whichever convention is
19148standard for the target. If there is no standard convention, \s-1GCC\s0
19149defaults to \fB\-fpcc\-struct\-return\fR, except on targets where \s-1GCC\s0 is
19150the principal compiler. In those cases, we can choose the standard, and
19151we chose the more efficient register return alternative.
19152.Sp
19153\&\fBWarning:\fR code compiled with the \fB\-freg\-struct\-return\fR
19154switch is not binary compatible with code compiled with the
19155\&\fB\-fpcc\-struct\-return\fR switch.
19156Use it to conform to a non-default application binary interface.
19157.IP "\fB\-fshort\-enums\fR" 4
19158.IX Item "-fshort-enums"
19159Allocate to an \f(CW\*(C`enum\*(C'\fR type only as many bytes as it needs for the
19160declared range of possible values. Specifically, the \f(CW\*(C`enum\*(C'\fR type
19161is 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
19164code that is not binary compatible with code generated without that switch.
19165Use it to conform to a non-default application binary interface.
19166.IP "\fB\-fshort\-double\fR" 4
19167.IX Item "-fshort-double"
19168Use 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
19171code that is not binary compatible with code generated without that switch.
19172Use it to conform to a non-default application binary interface.
19173.IP "\fB\-fshort\-wchar\fR" 4
19174.IX Item "-fshort-wchar"
19175Override the underlying type for \fBwchar_t\fR to be \fBshort
19176unsigned int\fR instead of the default for the target. This option is
19177useful 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
19180code that is not binary compatible with code generated without that switch.
19181Use it to conform to a non-default application binary interface.
19182.IP "\fB\-fno\-common\fR" 4
19183.IX Item "-fno-common"
19184In C code, controls the placement of uninitialized global variables.
19185Unix C compilers have traditionally permitted multiple definitions of
19186such variables in different compilation units by placing the variables
19187in a common block.
19188This is the behavior specified by \fB\-fcommon\fR, and is the default
19189for \s-1GCC\s0 on most targets.
19190On the other hand, this behavior is not required by \s-1ISO\s0 C, and on some
19191targets may carry a speed or code size penalty on variable references.
19192The \fB\-fno\-common\fR option specifies that the compiler should place
19193uninitialized global variables in the data section of the object file,
19194rather than generating them as common blocks.
19195This has the effect that if the same variable is declared
19196(without \f(CW\*(C`extern\*(C'\fR) in two different compilations,
19197you get a multiple-definition error when you link them.
19198In this case, you must compile with \fB\-fcommon\fR instead.
19199Compiling with \fB\-fno\-common\fR is useful on targets for which
19200it provides better performance, or if you wish to verify that the
19201program will work on other systems that always treat uninitialized
19202variable declarations this way.
19203.IP "\fB\-fno\-ident\fR" 4
19204.IX Item "-fno-ident"
19205Ignore the \fB#ident\fR directive.
19206.IP "\fB\-finhibit\-size\-directive\fR" 4
19207.IX Item "-finhibit-size-directive"
19208Don't output a \f(CW\*(C`.size\*(C'\fR assembler directive, or anything else that
19209would cause trouble if the function is split in the middle, and the
19210two halves are placed at locations far apart in memory. This option is
19211used when compiling \fIcrtstuff.c\fR; you should not need to use it
19212for anything else.
19213.IP "\fB\-fverbose\-asm\fR" 4
19214.IX Item "-fverbose-asm"
19215Put extra commentary information in the generated assembly code to
19216make it more readable. This option is generally only of use to those
19217who actually need to read the generated assembly code (perhaps while
19218debugging the compiler itself).
19219.Sp
19220\&\fB\-fno\-verbose\-asm\fR, the default, causes the
19221extra information to be omitted and is useful when comparing two assembler
19222files.
19223.IP "\fB\-frecord\-gcc\-switches\fR" 4
19224.IX Item "-frecord-gcc-switches"
19225This switch causes the command line used to invoke the
19226compiler to be recorded into the object file that is being created.
19227This switch is only implemented on some targets and the exact format
19228of the recording is target and binary file format dependent, but it
19229usually takes the form of a section containing \s-1ASCII\s0 text. This
19230switch is related to the \fB\-fverbose\-asm\fR switch, but that
19231switch only records information in the assembler output file as
19232comments, so it never reaches the object file.
19233See also \fB\-grecord\-gcc\-switches\fR for another
19234way of storing compiler options into the object file.
19235.IP "\fB\-fpic\fR" 4
19236.IX Item "-fpic"
19237Generate position-independent code (\s-1PIC\s0) suitable for use in a shared
19238library, if supported for the target machine. Such code accesses all
19239constant addresses through a global offset table (\s-1GOT\s0). The dynamic
19240loader resolves the \s-1GOT\s0 entries when the program starts (the dynamic
19241loader is not part of \s-1GCC\s0; it is part of the operating system). If
19242the \s-1GOT\s0 size for the linked executable exceeds a machine-specific
19243maximum 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
19245instead. (These maximums are 8k on the \s-1SPARC\s0 and 32k
19246on the m68k and \s-1RS/6000\s0. The 386 has no such limit.)
19247.Sp
19248Position-independent code requires special support, and therefore works
19249only on certain machines. For the 386, \s-1GCC\s0 supports \s-1PIC\s0 for System V
19250but not for the Sun 386i. Code generated for the \s-1IBM\s0 \s-1RS/6000\s0 is always
19251position-independent.
19252.Sp
19253When this flag is set, the macros \f(CW\*(C`_\|_pic_\|_\*(C'\fR and \f(CW\*(C`_\|_PIC_\|_\*(C'\fR
19254are defined to 1.
19255.IP "\fB\-fPIC\fR" 4
19256.IX Item "-fPIC"
19257If supported for the target machine, emit position-independent code,
19258suitable for dynamic linking and avoiding any limit on the size of the
19259global offset table. This option makes a difference on the m68k,
19260PowerPC and \s-1SPARC\s0.
19261.Sp
19262Position-independent code requires special support, and therefore works
19263only on certain machines.
19264.Sp
19265When this flag is set, the macros \f(CW\*(C`_\|_pic_\|_\*(C'\fR and \f(CW\*(C`_\|_PIC_\|_\*(C'\fR
19266are 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
19273These options are similar to \fB\-fpic\fR and \fB\-fPIC\fR, but
19274generated position independent code can be only linked into executables.
19275Usually these options are used when \fB\-pie\fR \s-1GCC\s0 option is
19276used 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
19280for \fB\-fpie\fR and 2 for \fB\-fPIE\fR.
19281.IP "\fB\-fno\-jump\-tables\fR" 4
19282.IX Item "-fno-jump-tables"
19283Do not use jump tables for switch statements even where it would be
19284more efficient than other code generation strategies. This option is
19285of use in conjunction with \fB\-fpic\fR or \fB\-fPIC\fR for
19286building code that forms part of a dynamic linker and cannot
19287reference the address of a jump table. On some targets, jump tables
19288do 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"
19291Treat the register named \fIreg\fR as a fixed register; generated code
19292should never refer to it (except perhaps as a stack pointer, frame
19293pointer or in some other fixed role).
19294.Sp
19295\&\fIreg\fR must be the name of a register. The register names accepted
19296are machine-specific and are defined in the \f(CW\*(C`REGISTER_NAMES\*(C'\fR
19297macro in the machine description macro file.
19298.Sp
19299This flag does not have a negative form, because it specifies a
19300three-way choice.
19301.IP "\fB\-fcall\-used\-\fR\fIreg\fR" 4
19302.IX Item "-fcall-used-reg"
19303Treat the register named \fIreg\fR as an allocable register that is
19304clobbered by function calls. It may be allocated for temporaries or
19305variables that do not live across a call. Functions compiled this way
19306do not save and restore the register \fIreg\fR.
19307.Sp
19308It is an error to use this flag with the frame pointer or stack pointer.
19309Use of this flag for other registers that have fixed pervasive roles in
19310the machine's execution model produces disastrous results.
19311.Sp
19312This flag does not have a negative form, because it specifies a
19313three-way choice.
19314.IP "\fB\-fcall\-saved\-\fR\fIreg\fR" 4
19315.IX Item "-fcall-saved-reg"
19316Treat the register named \fIreg\fR as an allocable register saved by
19317functions. It may be allocated even for temporaries or variables that
19318live across a call. Functions compiled this way save and restore
19319the register \fIreg\fR if they use it.
19320.Sp
19321It is an error to use this flag with the frame pointer or stack pointer.
19322Use of this flag for other registers that have fixed pervasive roles in
19323the machine's execution model produces disastrous results.
19324.Sp
19325A different sort of disaster results from the use of this flag for
19326a register in which function values may be returned.
19327.Sp
19328This flag does not have a negative form, because it specifies a
19329three-way choice.
19330.IP "\fB\-fpack\-struct[=\fR\fIn\fR\fB]\fR" 4
19331.IX Item "-fpack-struct[=n]"
19332Without a value specified, pack all structure members together without
19333holes. When a value is specified (which must be a small power of two), pack
19334structure members according to this value, representing the maximum
19335alignment (that is, objects with default alignment requirements larger than
19336this 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
19339code that is not binary compatible with code generated without that switch.
19340Additionally, it makes the code suboptimal.
19341Use it to conform to a non-default application binary interface.
19342.IP "\fB\-finstrument\-functions\fR" 4
19343.IX Item "-finstrument-functions"
19344Generate instrumentation calls for entry and exit to functions. Just
19345after function entry and just before function exit, the following
19346profiling functions are called with the address of the current
19347function and its call site. (On some platforms,
19348\&\f(CW\*(C`_\|_builtin_return_address\*(C'\fR does not work beyond the current
19349function, so the call site information may not be available to the
19350profiling 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
19359The first argument is the address of the start of the current function,
19360which may be looked up exactly in the symbol table.
19361.Sp
19362This instrumentation is also done for functions expanded inline in other
19363functions. The profiling calls indicate where, conceptually, the
19364inline function is entered and exited. This means that addressable
19365versions of such functions must be available. If all your uses of a
19366function are expanded inline, this may mean an additional expansion of
19367code size. If you use \fBextern inline\fR in your C code, an
19368addressable version of such functions must be provided. (This is
19369normally the case anyway, but if you get lucky and the optimizer always
19370expands the functions inline, you might have gotten away without
19371providing static copies.)
19372.Sp
19373A function may be given the attribute \f(CW\*(C`no_instrument_function\*(C'\fR, in
19374which case this instrumentation is not done. This can be used, for
19375example, for the profiling functions listed above, high-priority
19376interrupt routines, and any functions from which the profiling functions
19377cannot safely be called (perhaps signal handlers, if the profiling
19378routines 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,..."
19381Set the list of functions that are excluded from instrumentation (see
19382the description of \f(CW\*(C`\-finstrument\-functions\*(C'\fR). If the file that
19383contains a function definition matches with one of \fIfile\fR, then
19384that function is not instrumented. The match is done on substrings:
19385if the \fIfile\fR parameter is a substring of the file name, it is
19386considered to be a match.
19387.Sp
19388For example:
19389.Sp
19390.Vb 1
19391\& \-finstrument\-functions\-exclude\-file\-list=/bits/stl,include/sys
19392.Ve
19393.Sp
19394excludes any inline function defined in files whose pathnames
19395contain \f(CW\*(C`/bits/stl\*(C'\fR or \f(CW\*(C`include/sys\*(C'\fR.
19396.Sp
19397If, 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,..."
19403This is similar to \f(CW\*(C`\-finstrument\-functions\-exclude\-file\-list\*(C'\fR,
19404but this option sets the list of function names to be excluded from
19405instrumentation. The function name to be matched is its user-visible
19406name, such as \f(CW\*(C`vector<int> blah(const vector<int> &)\*(C'\fR, not the
19407internal mangled name (e.g., \f(CW\*(C`_Z4blahRSt6vectorIiSaIiEE\*(C'\fR). The
19408match is done on substrings: if the \fIsym\fR parameter is a substring
19409of the function name, it is considered to be a match. For C99 and \*(C+
19410extended identifiers, the function name must be given in \s-1UTF\-8\s0, not
19411using universal character names.
19412.IP "\fB\-fstack\-check\fR" 4
19413.IX Item "-fstack-check"
19414Generate code to verify that you do not go beyond the boundary of the
19415stack. You should specify this flag if you are running in an
19416environment with multiple threads, but you only rarely need to specify it in
19417a single-threaded environment since stack overflow is automatically
19418detected on nearly all systems if there is only one stack.
19419.Sp
19420Note that this switch does not actually cause checking to be done; the
19421operating system or the language runtime must do that. The switch causes
19422generation of code to ensure that they see the stack being extended.
19423.Sp
19424You can additionally specify a string parameter: \f(CW\*(C`no\*(C'\fR means no
19425checking, \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
19427to bare \fB\-fstack\-check\fR.
19428.Sp
19429Old-style checking is a generic mechanism that requires no specific
19430target support in the compiler but comes with the following drawbacks:
19431.RS 4
19432.IP "1." 4
19433Modified allocation strategy for large objects: they are always
19434allocated dynamically if their size exceeds a fixed threshold.
19435.IP "2." 4
19436Fixed limit on the size of the static frame of functions: when it is
19437topped by a particular function, stack checking is not reliable and
19438a warning is issued by the compiler.
19439.IP "3." 4
19440Inefficiency: because of both the modified allocation strategy and the
19441generic implementation, code performance is hampered.
19442.RE
19443.RS 4
19444.Sp
19445Note 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
19456Generate code to ensure that the stack does not grow beyond a certain value,
19457either the value of a register or the address of a symbol. If a larger
19458stack is required, a signal is raised at run time. For most targets,
19459the signal is raised before the stack overruns the boundary, so
19460it is possible to catch the signal without taking special precautions.
19461.Sp
19462For instance, if the stack starts at absolute address \fB0x80000000\fR
19463and 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
19466of 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"
19469Generate code to automatically split the stack before it overflows.
19470The resulting program has a discontiguous stack which can only
19471overflow if the program is unable to allocate any more memory. This
19472is most useful when running threaded programs, as it is no longer
19473necessary to calculate a good stack size to use for each thread. This
19474is currently only implemented for the i386 and x86_64 back ends running
19475GNU/Linux.
19476.Sp
19477When code compiled with \fB\-fsplit\-stack\fR calls code compiled
19478without \fB\-fsplit\-stack\fR, there may not be much stack space
19479available for the latter code to run. If compiling all code,
19480including library code, with \fB\-fsplit\-stack\fR is not an option,
19481then the linker can fix up these calls so that the code compiled
19482without \fB\-fsplit\-stack\fR always has a large stack. Support for
19483this is implemented in the gold linker in \s-1GNU\s0 binutils release 2.21
19484and later.
19485.IP "\fB\-fleading\-underscore\fR" 4
19486.IX Item "-fleading-underscore"
19487This option and its counterpart, \fB\-fno\-leading\-underscore\fR, forcibly
19488change the way C symbols are represented in the object file. One use
19489is to help link with legacy assembly code.
19490.Sp
19491\&\fBWarning:\fR the \fB\-fleading\-underscore\fR switch causes \s-1GCC\s0 to
19492generate code that is not binary compatible with code generated without that
19493switch. Use it to conform to a non-default application binary interface.
19494Not all targets provide complete support for this switch.
19495.IP "\fB\-ftls\-model=\fR\fImodel\fR" 4
19496.IX Item "-ftls-model=model"
19497Alter the thread-local storage model to be used.
19498The \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
19501The 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"
19505Set the default \s-1ELF\s0 image symbol visibility to the specified option\-\-\-all
19506symbols are marked with this unless overridden within the code.
19507Using this feature can very substantially improve linking and
19508load times of shared object libraries, produce more optimized
19509code, provide near-perfect \s-1API\s0 export and prevent symbol clashes.
19510It is \fBstrongly\fR recommended that you use this in any shared objects
19511you distribute.
19512.Sp
19513Despite the nomenclature, \f(CW\*(C`default\*(C'\fR always means public; i.e.,
19514available 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
19516usage so the only other commonly used option is \f(CW\*(C`hidden\*(C'\fR.
19517The default if \fB\-fvisibility\fR isn't specified is
19518\&\f(CW\*(C`default\*(C'\fR, i.e., make every
19519symbol public\-\-\-this causes the same behavior as previous versions of
19520\&\s-1GCC\s0.
19521.Sp
19522A good explanation of the benefits offered by ensuring \s-1ELF\s0
19523symbols have the correct visibility is given by \*(L"How To Write
19524Shared Libraries\*(R" by Ulrich Drepper (which can be found at
19525<\fBhttp://people.redhat.com/~drepper/\fR>)\-\-\-however a superior
19526solution made possible by this option to marking things hidden when
19527the default is public is to make the default hidden and mark things
19528public. This is the norm with DLLs on Windows and with \fB\-fvisibility=hidden\fR
19529and \f(CW\*(C`_\|_attribute_\|_ ((visibility("default")))\*(C'\fR instead of
19530\&\f(CW\*(C`_\|_declspec(dllexport)\*(C'\fR you get almost identical semantics with
19531identical syntax. This is a great boon to those working with
19532cross-platform projects.
19533.Sp
19534For 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
19536the 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.
19539Bear in mind that symbol visibility should be viewed \fBas
19540part of the \s-1API\s0 interface contract\fR and thus all new code should
19541always specify visibility when it is not the default; i.e., declarations
19542only for use within the local \s-1DSO\s0 should \fBalways\fR be marked explicitly
19543as hidden as so to avoid \s-1PLT\s0 indirection overheads\-\-\-making this
19544abundantly clear also aids readability and self-documentation of the code.
19545Note 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
19548Be aware that headers from outside your project, in particular system
19549headers and headers from any other library you use, may not be
19550expecting to be compiled with visibility other than the default. You
19551may need to explicitly say \fB#pragma \s-1GCC\s0 visibility push(default)\fR
19552before including any such headers.
19553.Sp
19554\&\fBextern\fR declarations are not affected by \fB\-fvisibility\fR, so
19555a lot of code can be recompiled with \fB\-fvisibility=hidden\fR with
19556no modifications. However, this means that calls to \f(CW\*(C`extern\*(C'\fR
19557functions with no explicit visibility use the \s-1PLT\s0, so it is more
19558effective 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
19560declarations should be treated as hidden.
19561.Sp
19562Note that \fB\-fvisibility\fR does affect \*(C+ vague linkage
19563entities. This means that, for instance, an exception class that is
19564be thrown between DSOs must be explicitly marked with default
19565visibility so that the \fBtype_info\fR nodes are unified between
19566the DSOs.
19567.Sp
19568An overview of these techniques, their benefits and how to use them
19569is at <\fBhttp://gcc.gnu.org/wiki/Visibility\fR>.
19570.IP "\fB\-fstrict\-volatile\-bitfields\fR" 4
19571.IX Item "-fstrict-volatile-bitfields"
19572This option should be used if accesses to volatile bit-fields (or other
19573structure fields, although the compiler usually honors those types
19574anyway) should use a single access of the width of the
19575field's type, aligned to a natural alignment if possible. For
19576example, targets with memory-mapped peripheral registers might require
19577all such accesses to be 16 bits wide; with this flag you can
19578declare all peripheral bit-fields as \f(CW\*(C`unsigned short\*(C'\fR (assuming short
19579is 16 bits on these targets) to force \s-1GCC\s0 to use 16\-bit accesses
19580instead of, perhaps, a more efficient 32\-bit access.
19581.Sp
19582If this option is disabled, the compiler uses the most efficient
19583instruction. In the previous example, that might be a 32\-bit load
19584instruction, even though that accesses bytes that do not contain
19585any portion of the bit-field, or memory-mapped registers unrelated to
19586the one being updated.
19587.Sp
19588If the target requires strict alignment, and honoring the field
19589type would require violating this alignment, a warning is issued.
19590If the field has \f(CW\*(C`packed\*(C'\fR attribute, the access is done without
19591honoring the field type. If the field doesn't have \f(CW\*(C`packed\*(C'\fR
19592attribute, 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
19594that it is unaware of.
19595.Sp
19596The default value of this option is determined by the application binary
19597interface for the target processor.
19598.IP "\fB\-fsync\-libcalls\fR" 4
19599.IX Item "-fsync-libcalls"
19600This option controls whether any out-of-line instance of the \f(CW\*(C`_\|_sync\*(C'\fR
19601family of functions may be used to implement the \*(C+11 \f(CW\*(C`_\|_atomic\*(C'\fR
19602family of functions.
19603.Sp
19604The default value of this option is enabled, thus the only useful form
19605of the option is \fB\-fno\-sync\-libcalls\fR. This option is used in
19606the implementation of the \fIlibatomic\fR runtime library.
19607.SH "ENVIRONMENT"
19608.IX Header "ENVIRONMENT"
19609This section describes several environment variables that affect how \s-1GCC\s0
19610operates. Some of them work by specifying directories or prefixes to use
19611when searching for various kinds of files. Some are used to specify other
19612aspects of the compilation environment.
19613.PP
19614Note that you can also specify places to search using options such as
19615\&\fB\-B\fR, \fB\-I\fR and \fB\-L\fR. These
19616take precedence over places specified using environment variables, which
19617in 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
19628These environment variables control the way that \s-1GCC\s0 uses
19629localization information which allows \s-1GCC\s0 to work with different
19630national 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
19632so. These locale categories can be set to any value supported by your
19633installation. A typical value is \fBen_GB.UTF\-8\fR for English in the United
19634Kingdom encoded in \s-1UTF\-8\s0.
19635.Sp
19636The \fB\s-1LC_CTYPE\s0\fR environment variable specifies character
19637classification. \s-1GCC\s0 uses it to determine the character boundaries in
19638a string; this is needed for some multibyte encodings that contain quote
19639and escape characters that are otherwise interpreted as a string
19640end or escape.
19641.Sp
19642The \fB\s-1LC_MESSAGES\s0\fR environment variable specifies the language to
19643use in diagnostic messages.
19644.Sp
19645If the \fB\s-1LC_ALL\s0\fR environment variable is set, it overrides the value
19646of \fB\s-1LC_CTYPE\s0\fR and \fB\s-1LC_MESSAGES\s0\fR; otherwise, \fB\s-1LC_CTYPE\s0\fR
19647and \fB\s-1LC_MESSAGES\s0\fR default to the value of the \fB\s-1LANG\s0\fR
19648environment variable. If none of these variables are set, \s-1GCC\s0
19649defaults to traditional C English behavior.
19650.IP "\fB\s-1TMPDIR\s0\fR" 4
19651.IX Item "TMPDIR"
19652If \fB\s-1TMPDIR\s0\fR is set, it specifies the directory to use for temporary
19653files. \s-1GCC\s0 uses temporary files to hold the output of one stage of
19654compilation which is to be used as input to the next stage: for example,
19655the output of the preprocessor, which is the input to the compiler
19656proper.
19657.IP "\fB\s-1GCC_COMPARE_DEBUG\s0\fR" 4
19658.IX Item "GCC_COMPARE_DEBUG"
19659Setting \fB\s-1GCC_COMPARE_DEBUG\s0\fR is nearly equivalent to passing
19660\&\fB\-fcompare\-debug\fR to the compiler driver. See the documentation
19661of this option for more details.
19662.IP "\fB\s-1GCC_EXEC_PREFIX\s0\fR" 4
19663.IX Item "GCC_EXEC_PREFIX"
19664If \fB\s-1GCC_EXEC_PREFIX\s0\fR is set, it specifies a prefix to use in the
19665names of the subprograms executed by the compiler. No slash is added
19666when this prefix is combined with the name of a subprogram, but you can
19667specify a prefix that ends with a slash if you wish.
19668.Sp
19669If \fB\s-1GCC_EXEC_PREFIX\s0\fR is not set, \s-1GCC\s0 attempts to figure out
19670an appropriate prefix to use based on the pathname it is invoked with.
19671.Sp
19672If \s-1GCC\s0 cannot find the subprogram using the specified prefix, it
19673tries looking in the usual places for the subprogram.
19674.Sp
19675The 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
19677the installed compiler. In many cases \fIprefix\fR is the value
19678of \f(CW\*(C`prefix\*(C'\fR when you ran the \fIconfigure\fR script.
19679.Sp
19680Other prefixes specified with \fB\-B\fR take precedence over this prefix.
19681.Sp
19682This prefix is also used for finding files such as \fIcrt0.o\fR that are
19683used for linking.
19684.Sp
19685In addition, the prefix is used in an unusual way in finding the
19686directories to search for header files. For each of the standard
19687directories 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
19689replacing that beginning with the specified prefix to produce an
19690alternate 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.
19693If 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"
19698The value of \fB\s-1COMPILER_PATH\s0\fR is a colon-separated list of
19699directories, much like \fB\s-1PATH\s0\fR. \s-1GCC\s0 tries the directories thus
19700specified when searching for subprograms, if it can't find the
19701subprograms using \fB\s-1GCC_EXEC_PREFIX\s0\fR.
19702.IP "\fB\s-1LIBRARY_PATH\s0\fR" 4
19703.IX Item "LIBRARY_PATH"
19704The value of \fB\s-1LIBRARY_PATH\s0\fR is a colon-separated list of
19705directories, 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
19707linker files, if it can't find them using \fB\s-1GCC_EXEC_PREFIX\s0\fR. Linking
19708using \s-1GCC\s0 also uses these directories when searching for ordinary
19709libraries 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"
19713This variable is used to pass locale information to the compiler. One way in
19714which this information is used is to determine the character set to be used
19715when character literals, string literals and comments are parsed in C and \*(C+.
19716When the compiler is configured to allow multibyte characters,
19717the following values for \fB\s-1LANG\s0\fR are recognized:
19718.RS 4
19719.IP "\fBC\-JIS\fR" 4
19720.IX Item "C-JIS"
19721Recognize \s-1JIS\s0 characters.
19722.IP "\fBC\-SJIS\fR" 4
19723.IX Item "C-SJIS"
19724Recognize \s-1SJIS\s0 characters.
19725.IP "\fBC\-EUCJP\fR" 4
19726.IX Item "C-EUCJP"
19727Recognize \s-1EUCJP\s0 characters.
19728.RE
19729.RS 4
19730.Sp
19731If \fB\s-1LANG\s0\fR is not defined, or if it has some other value, then the
19732compiler uses \f(CW\*(C`mblen\*(C'\fR and \f(CW\*(C`mbtowc\*(C'\fR as defined by the default locale to
19733recognize and translate multibyte characters.
19734.RE
19735.PP
19736Some additional environment variables affect the behavior of the
19737preprocessor.
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
19748Each variable's value is a list of directories separated by a special
19749character, much like \fB\s-1PATH\s0\fR, in which to look for header files.
19750The special character, \f(CW\*(C`PATH_SEPARATOR\*(C'\fR, is target-dependent and
19751determined at \s-1GCC\s0 build time. For Microsoft Windows-based targets it is a
19752semicolon, 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
19755specified with \fB\-I\fR, but after any paths given with \fB\-I\fR
19756options on the command line. This environment variable is used
19757regardless of which language is being preprocessed.
19758.Sp
19759The remaining environment variables apply only when preprocessing the
19760particular language indicated. Each specifies a list of directories
19761to be searched as if specified with \fB\-isystem\fR, but after any
19762paths given with \fB\-isystem\fR options on the command line.
19763.Sp
19764In all these variables, an empty element instructs the compiler to
19765search its current working directory. Empty elements can appear at the
19766beginning 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
19768effect as \fB\-I.\ \-I/special/include\fR.
19769.IP "\fB\s-1DEPENDENCIES_OUTPUT\s0\fR" 4
19770.IX Item "DEPENDENCIES_OUTPUT"
19771If this variable is set, its value specifies how to output
19772dependencies for Make based on the non-system header files processed
19773by the compiler. System header files are ignored in the dependency
19774output.
19775.Sp
19776The value of \fB\s-1DEPENDENCIES_OUTPUT\s0\fR can be just a file name, in
19777which case the Make rules are written to that file, guessing the target
19778name 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
19780file \fIfile\fR using \fItarget\fR as the target name.
19781.Sp
19782In other words, this environment variable is equivalent to combining
19783the options \fB\-MM\fR and \fB\-MF\fR,
19784with an optional \fB\-MT\fR switch too.
19785.IP "\fB\s-1SUNPRO_DEPENDENCIES\s0\fR" 4
19786.IX Item "SUNPRO_DEPENDENCIES"
19787This variable is the same as \fB\s-1DEPENDENCIES_OUTPUT\s0\fR (see above),
19788except that system header files are not ignored, so it implies
19789\&\fB\-M\fR rather than \fB\-MM\fR. However, the dependence on the
19790main input file is omitted.
19791.SH "BUGS"
19792.IX Header "BUGS"
19793For instructions on reporting bugs, see
19794<\fBhttp://gcc.gnu.org/bugs.html\fR>.
19795.SH "FOOTNOTES"
19796.IX Header "FOOTNOTES"
19797.IP "1." 4
19798On some systems, \fBgcc \-shared\fR
19799needs to build supplementary stub code for constructors to work. On
19800multi-libbed systems, \fBgcc \-shared\fR must select the correct support
19801libraries to link against. Failing to supply the correct flags may lead
19802to subtle defects. Supplying them in cases where they are not necessary
19803is 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)
19808and 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"
19812See the Info entry for \fBgcc\fR, or
19813<\fBhttp://gcc.gnu.org/onlinedocs/gcc/Contributors.html\fR>,
19814for contributors to \s-1GCC\s0.
19815.SH "COPYRIGHT"
19816.IX Header "COPYRIGHT"
19817Copyright (c) 1988\-2013 Free Software Foundation, Inc.
19818.PP
19819Permission is granted to copy, distribute and/or modify this document
19820under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3 or
19821any later version published by the Free Software Foundation; with the
19822Invariant Sections being \*(L"\s-1GNU\s0 General Public License\*(R" and \*(L"Funding
19823Free Software\*(R", the Front-Cover texts being (a) (see below), and with
19824the Back-Cover Texts being (b) (see below). A copy of the license is
19825included 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