1 |
284 |
jeremybenn |
.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05)
|
2 |
|
|
.\"
|
3 |
|
|
.\" Standard preamble:
|
4 |
|
|
.\" ========================================================================
|
5 |
|
|
.de Sh \" Subsection heading
|
6 |
|
|
.br
|
7 |
|
|
.if t .Sp
|
8 |
|
|
.ne 5
|
9 |
|
|
.PP
|
10 |
|
|
\fB\\$1\fR
|
11 |
|
|
.PP
|
12 |
|
|
..
|
13 |
|
|
.de Sp \" Vertical space (when we can't use .PP)
|
14 |
|
|
.if t .sp .5v
|
15 |
|
|
.if n .sp
|
16 |
|
|
..
|
17 |
|
|
.de Vb \" Begin verbatim text
|
18 |
|
|
.ft CW
|
19 |
|
|
.nf
|
20 |
|
|
.ne \\$1
|
21 |
|
|
..
|
22 |
|
|
.de Ve \" End verbatim text
|
23 |
|
|
.ft R
|
24 |
|
|
.fi
|
25 |
|
|
..
|
26 |
|
|
.\" Set up some character translations and predefined strings. \*(-- will
|
27 |
|
|
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
28 |
|
|
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
29 |
|
|
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
30 |
|
|
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
31 |
|
|
.\" nothing in troff, for use with C<>.
|
32 |
|
|
.tr \(*W-
|
33 |
|
|
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
34 |
|
|
.ie n \{\
|
35 |
|
|
. ds -- \(*W-
|
36 |
|
|
. ds PI pi
|
37 |
|
|
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
38 |
|
|
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
39 |
|
|
. ds L" ""
|
40 |
|
|
. ds R" ""
|
41 |
|
|
. ds C` ""
|
42 |
|
|
. ds C' ""
|
43 |
|
|
'br\}
|
44 |
|
|
.el\{\
|
45 |
|
|
. ds -- \|\(em\|
|
46 |
|
|
. ds PI \(*p
|
47 |
|
|
. ds L" ``
|
48 |
|
|
. ds R" ''
|
49 |
|
|
'br\}
|
50 |
|
|
.\"
|
51 |
|
|
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
52 |
|
|
.ie \n(.g .ds Aq \(aq
|
53 |
|
|
.el .ds Aq '
|
54 |
|
|
.\"
|
55 |
|
|
.\" If the F register is turned on, we'll generate index entries on stderr for
|
56 |
|
|
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
|
57 |
|
|
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
58 |
|
|
.\" output yourself in some meaningful fashion.
|
59 |
|
|
.ie \nF \{\
|
60 |
|
|
. de IX
|
61 |
|
|
. tm Index:\\$1\t\\n%\t"\\$2"
|
62 |
|
|
..
|
63 |
|
|
. nr % 0
|
64 |
|
|
. rr F
|
65 |
|
|
.\}
|
66 |
|
|
.el \{\
|
67 |
|
|
. de IX
|
68 |
|
|
..
|
69 |
|
|
.\}
|
70 |
|
|
.\"
|
71 |
|
|
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
72 |
|
|
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
73 |
|
|
. \" fudge factors for nroff and troff
|
74 |
|
|
.if n \{\
|
75 |
|
|
. ds #H 0
|
76 |
|
|
. ds #V .8m
|
77 |
|
|
. ds #F .3m
|
78 |
|
|
. ds #[ \f1
|
79 |
|
|
. ds #] \fP
|
80 |
|
|
.\}
|
81 |
|
|
.if t \{\
|
82 |
|
|
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
83 |
|
|
. ds #V .6m
|
84 |
|
|
. ds #F 0
|
85 |
|
|
. ds #[ \&
|
86 |
|
|
. ds #] \&
|
87 |
|
|
.\}
|
88 |
|
|
. \" simple accents for nroff and troff
|
89 |
|
|
.if n \{\
|
90 |
|
|
. ds ' \&
|
91 |
|
|
. ds ` \&
|
92 |
|
|
. ds ^ \&
|
93 |
|
|
. ds , \&
|
94 |
|
|
. ds ~ ~
|
95 |
|
|
. ds /
|
96 |
|
|
.\}
|
97 |
|
|
.if t \{\
|
98 |
|
|
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
99 |
|
|
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
100 |
|
|
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
101 |
|
|
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
102 |
|
|
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
103 |
|
|
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
104 |
|
|
.\}
|
105 |
|
|
. \" troff and (daisy-wheel) nroff accents
|
106 |
|
|
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
107 |
|
|
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
108 |
|
|
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
109 |
|
|
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
110 |
|
|
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
111 |
|
|
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
112 |
|
|
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
113 |
|
|
.ds ae a\h'-(\w'a'u*4/10)'e
|
114 |
|
|
.ds Ae A\h'-(\w'A'u*4/10)'E
|
115 |
|
|
. \" corrections for vroff
|
116 |
|
|
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
117 |
|
|
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
118 |
|
|
. \" for low resolution devices (crt and lpr)
|
119 |
|
|
.if \n(.H>23 .if \n(.V>19 \
|
120 |
|
|
\{\
|
121 |
|
|
. ds : e
|
122 |
|
|
. ds 8 ss
|
123 |
|
|
. ds o a
|
124 |
|
|
. ds d- d\h'-1'\(ga
|
125 |
|
|
. ds D- D\h'-1'\(hy
|
126 |
|
|
. ds th \o'bp'
|
127 |
|
|
. ds Th \o'LP'
|
128 |
|
|
. ds ae ae
|
129 |
|
|
. ds Ae AE
|
130 |
|
|
.\}
|
131 |
|
|
.rm #[ #] #H #V #F C
|
132 |
|
|
.\" ========================================================================
|
133 |
|
|
.\"
|
134 |
|
|
.IX Title "GCC 1"
|
135 |
|
|
.TH GCC 1 "2010-07-31" "gcc-4.5.1" "GNU"
|
136 |
|
|
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
137 |
|
|
.\" way too many mistakes in technical documents.
|
138 |
|
|
.if n .ad l
|
139 |
|
|
.nh
|
140 |
|
|
.SH "NAME"
|
141 |
|
|
gcc \- GNU project C and C++ compiler
|
142 |
|
|
.SH "SYNOPSIS"
|
143 |
|
|
.IX Header "SYNOPSIS"
|
144 |
|
|
gcc [\fB\-c\fR|\fB\-S\fR|\fB\-E\fR] [\fB\-std=\fR\fIstandard\fR]
|
145 |
|
|
[\fB\-g\fR] [\fB\-pg\fR] [\fB\-O\fR\fIlevel\fR]
|
146 |
|
|
[\fB\-W\fR\fIwarn\fR...] [\fB\-pedantic\fR]
|
147 |
|
|
[\fB\-I\fR\fIdir\fR...] [\fB\-L\fR\fIdir\fR...]
|
148 |
|
|
[\fB\-D\fR\fImacro\fR[=\fIdefn\fR]...] [\fB\-U\fR\fImacro\fR]
|
149 |
|
|
[\fB\-f\fR\fIoption\fR...] [\fB\-m\fR\fImachine-option\fR...]
|
150 |
|
|
[\fB\-o\fR \fIoutfile\fR] [@\fIfile\fR] \fIinfile\fR...
|
151 |
|
|
.PP
|
152 |
|
|
Only the most useful options are listed here; see below for the
|
153 |
|
|
remainder. \fBg++\fR accepts mostly the same options as \fBgcc\fR.
|
154 |
|
|
.SH "DESCRIPTION"
|
155 |
|
|
.IX Header "DESCRIPTION"
|
156 |
|
|
When you invoke \s-1GCC\s0, it normally does preprocessing, compilation,
|
157 |
|
|
assembly and linking. The \*(L"overall options\*(R" allow you to stop this
|
158 |
|
|
process at an intermediate stage. For example, the \fB\-c\fR option
|
159 |
|
|
says not to run the linker. Then the output consists of object files
|
160 |
|
|
output by the assembler.
|
161 |
|
|
.PP
|
162 |
|
|
Other options are passed on to one stage of processing. Some options
|
163 |
|
|
control the preprocessor and others the compiler itself. Yet other
|
164 |
|
|
options control the assembler and linker; most of these are not
|
165 |
|
|
documented here, since you rarely need to use any of them.
|
166 |
|
|
.PP
|
167 |
|
|
Most of the command line options that you can use with \s-1GCC\s0 are useful
|
168 |
|
|
for C programs; when an option is only useful with another language
|
169 |
|
|
(usually \*(C+), the explanation says so explicitly. If the description
|
170 |
|
|
for a particular option does not mention a source language, you can use
|
171 |
|
|
that option with all supported languages.
|
172 |
|
|
.PP
|
173 |
|
|
The \fBgcc\fR program accepts options and file names as operands. Many
|
174 |
|
|
options have multi-letter names; therefore multiple single-letter options
|
175 |
|
|
may \fInot\fR be grouped: \fB\-dv\fR is very different from \fB\-d\ \-v\fR.
|
176 |
|
|
.PP
|
177 |
|
|
You can mix options and other arguments. For the most part, the order
|
178 |
|
|
you use doesn't matter. Order does matter when you use several
|
179 |
|
|
options of the same kind; for example, if you specify \fB\-L\fR more
|
180 |
|
|
than once, the directories are searched in the order specified. Also,
|
181 |
|
|
the placement of the \fB\-l\fR option is significant.
|
182 |
|
|
.PP
|
183 |
|
|
Many options have long names starting with \fB\-f\fR or with
|
184 |
|
|
\&\fB\-W\fR\-\-\-for example,
|
185 |
|
|
\&\fB\-fmove\-loop\-invariants\fR, \fB\-Wformat\fR and so on. Most of
|
186 |
|
|
these have both positive and negative forms; the negative form of
|
187 |
|
|
\&\fB\-ffoo\fR would be \fB\-fno\-foo\fR. This manual documents
|
188 |
|
|
only one of these two forms, whichever one is not the default.
|
189 |
|
|
.SH "OPTIONS"
|
190 |
|
|
.IX Header "OPTIONS"
|
191 |
|
|
.Sh "Option Summary"
|
192 |
|
|
.IX Subsection "Option Summary"
|
193 |
|
|
Here is a summary of all the options, grouped by type. Explanations are
|
194 |
|
|
in the following sections.
|
195 |
|
|
.IP "\fIOverall Options\fR" 4
|
196 |
|
|
.IX Item "Overall Options"
|
197 |
|
|
\&\fB\-c \-S \-E \-o\fR \fIfile\fR \fB\-combine \-no\-canonical\-prefixes
|
198 |
|
|
\&\-pipe \-pass\-exit\-codes
|
199 |
|
|
\&\-x\fR \fIlanguage\fR \fB\-v \-### \-\-help\fR[\fB=\fR\fIclass\fR[\fB,...\fR]] \fB\-\-target\-help
|
200 |
|
|
\&\-\-version \-wrapper@\fR\fIfile\fR \fB\-fplugin=\fR\fIfile\fR \fB\-fplugin\-arg\-\fR\fIname\fR\fB=\fR\fIarg\fR
|
201 |
|
|
.IP "\fIC Language Options\fR" 4
|
202 |
|
|
.IX Item "C Language Options"
|
203 |
|
|
\&\fB\-ansi \-std=\fR\fIstandard\fR \fB\-fgnu89\-inline
|
204 |
|
|
\&\-aux\-info\fR \fIfilename\fR
|
205 |
|
|
\&\fB\-fno\-asm \-fno\-builtin \-fno\-builtin\-\fR\fIfunction\fR
|
206 |
|
|
\&\fB\-fhosted \-ffreestanding \-fopenmp \-fms\-extensions
|
207 |
|
|
\&\-trigraphs \-no\-integrated\-cpp \-traditional \-traditional\-cpp
|
208 |
|
|
\&\-fallow\-single\-precision \-fcond\-mismatch \-flax\-vector\-conversions
|
209 |
|
|
\&\-fsigned\-bitfields \-fsigned\-char
|
210 |
|
|
\&\-funsigned\-bitfields \-funsigned\-char\fR
|
211 |
|
|
.IP "\fI\*(C+ Language Options\fR" 4
|
212 |
|
|
.IX Item " Language Options"
|
213 |
|
|
\&\fB\-fabi\-version=\fR\fIn\fR \fB\-fno\-access\-control \-fcheck\-new
|
214 |
|
|
\&\-fconserve\-space \-ffriend\-injection
|
215 |
|
|
\&\-fno\-elide\-constructors
|
216 |
|
|
\&\-fno\-enforce\-eh\-specs
|
217 |
|
|
\&\-ffor\-scope \-fno\-for\-scope \-fno\-gnu\-keywords
|
218 |
|
|
\&\-fno\-implicit\-templates
|
219 |
|
|
\&\-fno\-implicit\-inline\-templates
|
220 |
|
|
\&\-fno\-implement\-inlines \-fms\-extensions
|
221 |
|
|
\&\-fno\-nonansi\-builtins \-fno\-operator\-names
|
222 |
|
|
\&\-fno\-optional\-diags \-fpermissive
|
223 |
|
|
\&\-fno\-pretty\-templates
|
224 |
|
|
\&\-frepo \-fno\-rtti \-fstats \-ftemplate\-depth=\fR\fIn\fR
|
225 |
|
|
\&\fB\-fno\-threadsafe\-statics \-fuse\-cxa\-atexit \-fno\-weak \-nostdinc++
|
226 |
|
|
\&\-fno\-default\-inline \-fvisibility\-inlines\-hidden
|
227 |
|
|
\&\-fvisibility\-ms\-compat
|
228 |
|
|
\&\-Wabi \-Wconversion\-null \-Wctor\-dtor\-privacy
|
229 |
|
|
\&\-Wnon\-virtual\-dtor \-Wreorder
|
230 |
|
|
\&\-Weffc++ \-Wstrict\-null\-sentinel
|
231 |
|
|
\&\-Wno\-non\-template\-friend \-Wold\-style\-cast
|
232 |
|
|
\&\-Woverloaded\-virtual \-Wno\-pmf\-conversions
|
233 |
|
|
\&\-Wsign\-promo\fR
|
234 |
|
|
.IP "\fIObjective-C and Objective\-\*(C+ Language Options\fR" 4
|
235 |
|
|
.IX Item "Objective-C and Objective- Language Options"
|
236 |
|
|
\&\fB\-fconstant\-string\-class=\fR\fIclass-name\fR
|
237 |
|
|
\&\fB\-fgnu\-runtime \-fnext\-runtime
|
238 |
|
|
\&\-fno\-nil\-receivers
|
239 |
|
|
\&\-fobjc\-call\-cxx\-cdtors
|
240 |
|
|
\&\-fobjc\-direct\-dispatch
|
241 |
|
|
\&\-fobjc\-exceptions
|
242 |
|
|
\&\-fobjc\-gc
|
243 |
|
|
\&\-freplace\-objc\-classes
|
244 |
|
|
\&\-fzero\-link
|
245 |
|
|
\&\-gen\-decls
|
246 |
|
|
\&\-Wassign\-intercept
|
247 |
|
|
\&\-Wno\-protocol \-Wselector
|
248 |
|
|
\&\-Wstrict\-selector\-match
|
249 |
|
|
\&\-Wundeclared\-selector\fR
|
250 |
|
|
.IP "\fILanguage Independent Options\fR" 4
|
251 |
|
|
.IX Item "Language Independent Options"
|
252 |
|
|
\&\fB\-fmessage\-length=\fR\fIn\fR
|
253 |
|
|
\&\fB\-fdiagnostics\-show\-location=\fR[\fBonce\fR|\fBevery-line\fR]
|
254 |
|
|
\&\fB\-fdiagnostics\-show\-option\fR
|
255 |
|
|
.IP "\fIWarning Options\fR" 4
|
256 |
|
|
.IX Item "Warning Options"
|
257 |
|
|
\&\fB\-fsyntax\-only \-pedantic \-pedantic\-errors
|
258 |
|
|
\&\-w \-Wextra \-Wall \-Waddress \-Waggregate\-return \-Warray\-bounds
|
259 |
|
|
\&\-Wno\-attributes \-Wno\-builtin\-macro\-redefined
|
260 |
|
|
\&\-Wc++\-compat \-Wc++0x\-compat \-Wcast\-align \-Wcast\-qual
|
261 |
|
|
\&\-Wchar\-subscripts \-Wclobbered \-Wcomment
|
262 |
|
|
\&\-Wconversion \-Wcoverage\-mismatch \-Wno\-deprecated
|
263 |
|
|
\&\-Wno\-deprecated\-declarations \-Wdisabled\-optimization
|
264 |
|
|
\&\-Wno\-div\-by\-zero \-Wempty\-body \-Wenum\-compare \-Wno\-endif\-labels
|
265 |
|
|
\&\-Werror \-Werror=*
|
266 |
|
|
\&\-Wfatal\-errors \-Wfloat\-equal \-Wformat \-Wformat=2
|
267 |
|
|
\&\-Wno\-format\-contains\-nul \-Wno\-format\-extra\-args \-Wformat\-nonliteral
|
268 |
|
|
\&\-Wformat\-security \-Wformat\-y2k
|
269 |
|
|
\&\-Wframe\-larger\-than=\fR\fIlen\fR \fB\-Wjump\-misses\-init \-Wignored\-qualifiers
|
270 |
|
|
\&\-Wimplicit \-Wimplicit\-function\-declaration \-Wimplicit\-int
|
271 |
|
|
\&\-Winit\-self \-Winline
|
272 |
|
|
\&\-Wno\-int\-to\-pointer\-cast \-Wno\-invalid\-offsetof
|
273 |
|
|
\&\-Winvalid\-pch \-Wlarger\-than=\fR\fIlen\fR \fB\-Wunsafe\-loop\-optimizations
|
274 |
|
|
\&\-Wlogical\-op \-Wlong\-long
|
275 |
|
|
\&\-Wmain \-Wmissing\-braces \-Wmissing\-field\-initializers
|
276 |
|
|
\&\-Wmissing\-format\-attribute \-Wmissing\-include\-dirs
|
277 |
|
|
\&\-Wmissing\-noreturn \-Wno\-mudflap
|
278 |
|
|
\&\-Wno\-multichar \-Wnonnull \-Wno\-overflow
|
279 |
|
|
\&\-Woverlength\-strings \-Wpacked \-Wpacked\-bitfield\-compat \-Wpadded
|
280 |
|
|
\&\-Wparentheses \-Wpedantic\-ms\-format \-Wno\-pedantic\-ms\-format
|
281 |
|
|
\&\-Wpointer\-arith \-Wno\-pointer\-to\-int\-cast
|
282 |
|
|
\&\-Wredundant\-decls
|
283 |
|
|
\&\-Wreturn\-type \-Wsequence\-point \-Wshadow
|
284 |
|
|
\&\-Wsign\-compare \-Wsign\-conversion \-Wstack\-protector
|
285 |
|
|
\&\-Wstrict\-aliasing \-Wstrict\-aliasing=n
|
286 |
|
|
\&\-Wstrict\-overflow \-Wstrict\-overflow=\fR\fIn\fR
|
287 |
|
|
\&\fB\-Wswitch \-Wswitch\-default \-Wswitch\-enum \-Wsync\-nand
|
288 |
|
|
\&\-Wsystem\-headers \-Wtrigraphs \-Wtype\-limits \-Wundef \-Wuninitialized
|
289 |
|
|
\&\-Wunknown\-pragmas \-Wno\-pragmas
|
290 |
|
|
\&\-Wunsuffixed\-float\-constants \-Wunused \-Wunused\-function
|
291 |
|
|
\&\-Wunused\-label \-Wunused\-parameter \-Wno\-unused\-result \-Wunused\-value \-Wunused\-variable
|
292 |
|
|
\&\-Wvariadic\-macros \-Wvla
|
293 |
|
|
\&\-Wvolatile\-register\-var \-Wwrite\-strings\fR
|
294 |
|
|
.IP "\fIC and Objective-C-only Warning Options\fR" 4
|
295 |
|
|
.IX Item "C and Objective-C-only Warning Options"
|
296 |
|
|
\&\fB\-Wbad\-function\-cast \-Wmissing\-declarations
|
297 |
|
|
\&\-Wmissing\-parameter\-type \-Wmissing\-prototypes \-Wnested\-externs
|
298 |
|
|
\&\-Wold\-style\-declaration \-Wold\-style\-definition
|
299 |
|
|
\&\-Wstrict\-prototypes \-Wtraditional \-Wtraditional\-conversion
|
300 |
|
|
\&\-Wdeclaration\-after\-statement \-Wpointer\-sign\fR
|
301 |
|
|
.IP "\fIDebugging Options\fR" 4
|
302 |
|
|
.IX Item "Debugging Options"
|
303 |
|
|
\&\fB\-d\fR\fIletters\fR \fB\-dumpspecs \-dumpmachine \-dumpversion
|
304 |
|
|
\&\-fdbg\-cnt\-list \-fdbg\-cnt=\fR\fIcounter-value-list\fR
|
305 |
|
|
\&\fB\-fdump\-noaddr \-fdump\-unnumbered \-fdump\-unnumbered\-links
|
306 |
|
|
\&\-fdump\-translation\-unit\fR[\fB\-\fR\fIn\fR]
|
307 |
|
|
\&\fB\-fdump\-class\-hierarchy\fR[\fB\-\fR\fIn\fR]
|
308 |
|
|
\&\fB\-fdump\-ipa\-all \-fdump\-ipa\-cgraph \-fdump\-ipa\-inline
|
309 |
|
|
\&\-fdump\-statistics
|
310 |
|
|
\&\-fdump\-tree\-all
|
311 |
|
|
\&\-fdump\-tree\-original\fR[\fB\-\fR\fIn\fR]
|
312 |
|
|
\&\fB\-fdump\-tree\-optimized\fR[\fB\-\fR\fIn\fR]
|
313 |
|
|
\&\fB\-fdump\-tree\-cfg \-fdump\-tree\-vcg \-fdump\-tree\-alias
|
314 |
|
|
\&\-fdump\-tree\-ch
|
315 |
|
|
\&\-fdump\-tree\-ssa\fR[\fB\-\fR\fIn\fR] \fB\-fdump\-tree\-pre\fR[\fB\-\fR\fIn\fR]
|
316 |
|
|
\&\fB\-fdump\-tree\-ccp\fR[\fB\-\fR\fIn\fR] \fB\-fdump\-tree\-dce\fR[\fB\-\fR\fIn\fR]
|
317 |
|
|
\&\fB\-fdump\-tree\-gimple\fR[\fB\-raw\fR] \fB\-fdump\-tree\-mudflap\fR[\fB\-\fR\fIn\fR]
|
318 |
|
|
\&\fB\-fdump\-tree\-dom\fR[\fB\-\fR\fIn\fR]
|
319 |
|
|
\&\fB\-fdump\-tree\-dse\fR[\fB\-\fR\fIn\fR]
|
320 |
|
|
\&\fB\-fdump\-tree\-phiprop\fR[\fB\-\fR\fIn\fR]
|
321 |
|
|
\&\fB\-fdump\-tree\-phiopt\fR[\fB\-\fR\fIn\fR]
|
322 |
|
|
\&\fB\-fdump\-tree\-forwprop\fR[\fB\-\fR\fIn\fR]
|
323 |
|
|
\&\fB\-fdump\-tree\-copyrename\fR[\fB\-\fR\fIn\fR]
|
324 |
|
|
\&\fB\-fdump\-tree\-nrv \-fdump\-tree\-vect
|
325 |
|
|
\&\-fdump\-tree\-sink
|
326 |
|
|
\&\-fdump\-tree\-sra\fR[\fB\-\fR\fIn\fR]
|
327 |
|
|
\&\fB\-fdump\-tree\-forwprop\fR[\fB\-\fR\fIn\fR]
|
328 |
|
|
\&\fB\-fdump\-tree\-fre\fR[\fB\-\fR\fIn\fR]
|
329 |
|
|
\&\fB\-fdump\-tree\-vrp\fR[\fB\-\fR\fIn\fR]
|
330 |
|
|
\&\fB\-ftree\-vectorizer\-verbose=\fR\fIn\fR
|
331 |
|
|
\&\fB\-fdump\-tree\-storeccp\fR[\fB\-\fR\fIn\fR]
|
332 |
|
|
\&\fB\-fdump\-final\-insns=\fR\fIfile\fR
|
333 |
|
|
\&\fB\-fcompare\-debug\fR[\fB=\fR\fIopts\fR] \fB\-fcompare\-debug\-second
|
334 |
|
|
\&\-feliminate\-dwarf2\-dups \-feliminate\-unused\-debug\-types
|
335 |
|
|
\&\-feliminate\-unused\-debug\-symbols \-femit\-class\-debug\-always
|
336 |
|
|
\&\-fenable\-icf\-debug
|
337 |
|
|
\&\-fmem\-report \-fpre\-ipa\-mem\-report \-fpost\-ipa\-mem\-report \-fprofile\-arcs
|
338 |
|
|
\&\-frandom\-seed=\fR\fIstring\fR \fB\-fsched\-verbose=\fR\fIn\fR
|
339 |
|
|
\&\fB\-fsel\-sched\-verbose \-fsel\-sched\-dump\-cfg \-fsel\-sched\-pipelining\-verbose
|
340 |
|
|
\&\-ftest\-coverage \-ftime\-report \-fvar\-tracking
|
341 |
|
|
\&\-fvar\-tracking\-assignments \-fvar\-tracking\-assignments\-toggle
|
342 |
|
|
\&\-g \-g\fR\fIlevel\fR \fB\-gtoggle \-gcoff \-gdwarf\-\fR\fIversion\fR
|
343 |
|
|
\&\fB\-ggdb \-gstabs \-gstabs+ \-gstrict\-dwarf \-gno\-strict\-dwarf
|
344 |
|
|
\&\-gvms \-gxcoff \-gxcoff+
|
345 |
|
|
\&\-fno\-merge\-debug\-strings \-fno\-dwarf2\-cfi\-asm
|
346 |
|
|
\&\-fdebug\-prefix\-map=\fR\fIold\fR\fB=\fR\fInew\fR
|
347 |
|
|
\&\fB\-femit\-struct\-debug\-baseonly \-femit\-struct\-debug\-reduced
|
348 |
|
|
\&\-femit\-struct\-debug\-detailed\fR[\fB=\fR\fIspec-list\fR]
|
349 |
|
|
\&\fB\-p \-pg \-print\-file\-name=\fR\fIlibrary\fR \fB\-print\-libgcc\-file\-name
|
350 |
|
|
\&\-print\-multi\-directory \-print\-multi\-lib \-print\-multi\-os\-directory
|
351 |
|
|
\&\-print\-prog\-name=\fR\fIprogram\fR \fB\-print\-search\-dirs \-Q
|
352 |
|
|
\&\-print\-sysroot \-print\-sysroot\-headers\-suffix
|
353 |
|
|
\&\-save\-temps \-save\-temps=cwd \-save\-temps=obj \-time\fR[\fB=\fR\fIfile\fR]
|
354 |
|
|
.IP "\fIOptimization Options\fR" 4
|
355 |
|
|
.IX Item "Optimization Options"
|
356 |
|
|
\&\fB\-falign\-functions[=\fR\fIn\fR\fB] \-falign\-jumps[=\fR\fIn\fR\fB]
|
357 |
|
|
\&\-falign\-labels[=\fR\fIn\fR\fB] \-falign\-loops[=\fR\fIn\fR\fB] \-fassociative\-math
|
358 |
|
|
\&\-fauto\-inc\-dec \-fbranch\-probabilities \-fbranch\-target\-load\-optimize
|
359 |
|
|
\&\-fbranch\-target\-load\-optimize2 \-fbtr\-bb\-exclusive \-fcaller\-saves
|
360 |
|
|
\&\-fcheck\-data\-deps \-fconserve\-stack \-fcprop\-registers \-fcrossjumping
|
361 |
|
|
\&\-fcse\-follow\-jumps \-fcse\-skip\-blocks \-fcx\-fortran\-rules \-fcx\-limited\-range
|
362 |
|
|
\&\-fdata\-sections \-fdce \-fdce
|
363 |
|
|
\&\-fdelayed\-branch \-fdelete\-null\-pointer\-checks \-fdse \-fdse
|
364 |
|
|
\&\-fearly\-inlining \-fipa\-sra \-fexpensive\-optimizations \-ffast\-math
|
365 |
|
|
\&\-ffinite\-math\-only \-ffloat\-store \-fexcess\-precision=\fR\fIstyle\fR
|
366 |
|
|
\&\fB\-fforward\-propagate \-ffunction\-sections
|
367 |
|
|
\&\-fgcse \-fgcse\-after\-reload \-fgcse\-las \-fgcse\-lm
|
368 |
|
|
\&\-fgcse\-sm \-fif\-conversion \-fif\-conversion2 \-findirect\-inlining
|
369 |
|
|
\&\-finline\-functions \-finline\-functions\-called\-once \-finline\-limit=\fR\fIn\fR
|
370 |
|
|
\&\fB\-finline\-small\-functions \-fipa\-cp \-fipa\-cp\-clone \-fipa\-matrix\-reorg \-fipa\-pta
|
371 |
|
|
\&\-fipa\-pure\-const \-fipa\-reference \-fipa\-struct\-reorg
|
372 |
|
|
\&\-fipa\-type\-escape \-fira\-algorithm=\fR\fIalgorithm\fR
|
373 |
|
|
\&\fB\-fira\-region=\fR\fIregion\fR \fB\-fira\-coalesce
|
374 |
|
|
\&\-fira\-loop\-pressure \-fno\-ira\-share\-save\-slots
|
375 |
|
|
\&\-fno\-ira\-share\-spill\-slots \-fira\-verbose=\fR\fIn\fR
|
376 |
|
|
\&\fB\-fivopts \-fkeep\-inline\-functions \-fkeep\-static\-consts
|
377 |
|
|
\&\-floop\-block \-floop\-interchange \-floop\-strip\-mine \-fgraphite\-identity
|
378 |
|
|
\&\-floop\-parallelize\-all \-flto \-flto\-compression\-level \-flto\-report \-fltrans
|
379 |
|
|
\&\-fltrans\-output\-list \-fmerge\-all\-constants \-fmerge\-constants \-fmodulo\-sched
|
380 |
|
|
\&\-fmodulo\-sched\-allow\-regmoves \-fmove\-loop\-invariants \-fmudflap
|
381 |
|
|
\&\-fmudflapir \-fmudflapth \-fno\-branch\-count\-reg \-fno\-default\-inline
|
382 |
|
|
\&\-fno\-defer\-pop \-fno\-function\-cse \-fno\-guess\-branch\-probability
|
383 |
|
|
\&\-fno\-inline \-fno\-math\-errno \-fno\-peephole \-fno\-peephole2
|
384 |
|
|
\&\-fno\-sched\-interblock \-fno\-sched\-spec \-fno\-signed\-zeros
|
385 |
|
|
\&\-fno\-toplevel\-reorder \-fno\-trapping\-math \-fno\-zero\-initialized\-in\-bss
|
386 |
|
|
\&\-fomit\-frame\-pointer \-foptimize\-register\-move \-foptimize\-sibling\-calls
|
387 |
|
|
\&\-fpeel\-loops \-fpredictive\-commoning \-fprefetch\-loop\-arrays
|
388 |
|
|
\&\-fprofile\-correction \-fprofile\-dir=\fR\fIpath\fR \fB\-fprofile\-generate
|
389 |
|
|
\&\-fprofile\-generate=\fR\fIpath\fR
|
390 |
|
|
\&\fB\-fprofile\-use \-fprofile\-use=\fR\fIpath\fR \fB\-fprofile\-values
|
391 |
|
|
\&\-freciprocal\-math \-fregmove \-frename\-registers \-freorder\-blocks
|
392 |
|
|
\&\-freorder\-blocks\-and\-partition \-freorder\-functions
|
393 |
|
|
\&\-frerun\-cse\-after\-loop \-freschedule\-modulo\-scheduled\-loops
|
394 |
|
|
\&\-frounding\-math \-fsched2\-use\-superblocks \-fsched\-pressure
|
395 |
|
|
\&\-fsched\-spec\-load \-fsched\-spec\-load\-dangerous
|
396 |
|
|
\&\-fsched\-stalled\-insns\-dep[=\fR\fIn\fR\fB] \-fsched\-stalled\-insns[=\fR\fIn\fR\fB]
|
397 |
|
|
\&\-fsched\-group\-heuristic \-fsched\-critical\-path\-heuristic
|
398 |
|
|
\&\-fsched\-spec\-insn\-heuristic \-fsched\-rank\-heuristic
|
399 |
|
|
\&\-fsched\-last\-insn\-heuristic \-fsched\-dep\-count\-heuristic
|
400 |
|
|
\&\-fschedule\-insns \-fschedule\-insns2 \-fsection\-anchors
|
401 |
|
|
\&\-fselective\-scheduling \-fselective\-scheduling2
|
402 |
|
|
\&\-fsel\-sched\-pipelining \-fsel\-sched\-pipelining\-outer\-loops
|
403 |
|
|
\&\-fsignaling\-nans \-fsingle\-precision\-constant \-fsplit\-ivs\-in\-unroller
|
404 |
|
|
\&\-fsplit\-wide\-types \-fstack\-protector \-fstack\-protector\-all
|
405 |
|
|
\&\-fstrict\-aliasing \-fstrict\-overflow \-fthread\-jumps \-ftracer
|
406 |
|
|
\&\-ftree\-builtin\-call\-dce \-ftree\-ccp \-ftree\-ch \-ftree\-copy\-prop
|
407 |
|
|
\&\-ftree\-copyrename \-ftree\-dce
|
408 |
|
|
\&\-ftree\-dominator\-opts \-ftree\-dse \-ftree\-forwprop \-ftree\-fre \-ftree\-loop\-im
|
409 |
|
|
\&\-ftree\-phiprop \-ftree\-loop\-distribution
|
410 |
|
|
\&\-ftree\-loop\-ivcanon \-ftree\-loop\-linear \-ftree\-loop\-optimize
|
411 |
|
|
\&\-ftree\-parallelize\-loops=\fR\fIn\fR \fB\-ftree\-pre \-ftree\-pta \-ftree\-reassoc
|
412 |
|
|
\&\-ftree\-sink \-ftree\-sra \-ftree\-switch\-conversion
|
413 |
|
|
\&\-ftree\-ter \-ftree\-vect\-loop\-version \-ftree\-vectorize \-ftree\-vrp
|
414 |
|
|
\&\-funit\-at\-a\-time \-funroll\-all\-loops \-funroll\-loops
|
415 |
|
|
\&\-funsafe\-loop\-optimizations \-funsafe\-math\-optimizations \-funswitch\-loops
|
416 |
|
|
\&\-fvariable\-expansion\-in\-unroller \-fvect\-cost\-model \-fvpt \-fweb
|
417 |
|
|
\&\-fwhole\-program \-fwhopr \-fwpa \-fuse\-linker\-plugin
|
418 |
|
|
\&\-\-param\fR \fIname\fR\fB=\fR\fIvalue\fR
|
419 |
|
|
\&\fB\-O \-O0 \-O1 \-O2 \-O3 \-Os\fR
|
420 |
|
|
.IP "\fIPreprocessor Options\fR" 4
|
421 |
|
|
.IX Item "Preprocessor Options"
|
422 |
|
|
\&\fB\-A\fR\fIquestion\fR\fB=\fR\fIanswer\fR
|
423 |
|
|
\&\fB\-A\-\fR\fIquestion\fR[\fB=\fR\fIanswer\fR]
|
424 |
|
|
\&\fB\-C \-dD \-dI \-dM \-dN
|
425 |
|
|
\&\-D\fR\fImacro\fR[\fB=\fR\fIdefn\fR] \fB\-E \-H
|
426 |
|
|
\&\-idirafter\fR \fIdir\fR
|
427 |
|
|
\&\fB\-include\fR \fIfile\fR \fB\-imacros\fR \fIfile\fR
|
428 |
|
|
\&\fB\-iprefix\fR \fIfile\fR \fB\-iwithprefix\fR \fIdir\fR
|
429 |
|
|
\&\fB\-iwithprefixbefore\fR \fIdir\fR \fB\-isystem\fR \fIdir\fR
|
430 |
|
|
\&\fB\-imultilib\fR \fIdir\fR \fB\-isysroot\fR \fIdir\fR
|
431 |
|
|
\&\fB\-M \-MM \-MF \-MG \-MP \-MQ \-MT \-nostdinc
|
432 |
|
|
\&\-P \-fworking\-directory \-remap
|
433 |
|
|
\&\-trigraphs \-undef \-U\fR\fImacro\fR \fB\-Wp,\fR\fIoption\fR
|
434 |
|
|
\&\fB\-Xpreprocessor\fR \fIoption\fR
|
435 |
|
|
.IP "\fIAssembler Option\fR" 4
|
436 |
|
|
.IX Item "Assembler Option"
|
437 |
|
|
\&\fB\-Wa,\fR\fIoption\fR \fB\-Xassembler\fR \fIoption\fR
|
438 |
|
|
.IP "\fILinker Options\fR" 4
|
439 |
|
|
.IX Item "Linker Options"
|
440 |
|
|
\&\fIobject-file-name\fR \fB\-l\fR\fIlibrary\fR
|
441 |
|
|
\&\fB\-nostartfiles \-nodefaultlibs \-nostdlib \-pie \-rdynamic
|
442 |
|
|
\&\-s \-static \-static\-libgcc \-static\-libstdc++ \-shared
|
443 |
|
|
\&\-shared\-libgcc \-symbolic
|
444 |
|
|
\&\-T\fR \fIscript\fR \fB\-Wl,\fR\fIoption\fR \fB\-Xlinker\fR \fIoption\fR
|
445 |
|
|
\&\fB\-u\fR \fIsymbol\fR
|
446 |
|
|
.IP "\fIDirectory Options\fR" 4
|
447 |
|
|
.IX Item "Directory Options"
|
448 |
|
|
\&\fB\-B\fR\fIprefix\fR \fB\-I\fR\fIdir\fR \fB\-iquote\fR\fIdir\fR \fB\-L\fR\fIdir\fR
|
449 |
|
|
\&\fB\-specs=\fR\fIfile\fR \fB\-I\- \-\-sysroot=\fR\fIdir\fR
|
450 |
|
|
.IP "\fITarget Options\fR" 4
|
451 |
|
|
.IX Item "Target Options"
|
452 |
|
|
\&\fB\-V\fR \fIversion\fR \fB\-b\fR \fImachine\fR
|
453 |
|
|
.IP "\fIMachine Dependent Options\fR" 4
|
454 |
|
|
.IX Item "Machine Dependent Options"
|
455 |
|
|
\&\fI\s-1ARC\s0 Options\fR
|
456 |
|
|
\&\fB\-EB \-EL
|
457 |
|
|
\&\-mmangle\-cpu \-mcpu=\fR\fIcpu\fR \fB\-mtext=\fR\fItext-section\fR
|
458 |
|
|
\&\fB\-mdata=\fR\fIdata-section\fR \fB\-mrodata=\fR\fIreadonly-data-section\fR
|
459 |
|
|
.Sp
|
460 |
|
|
\&\fI\s-1ARM\s0 Options\fR
|
461 |
|
|
\&\fB\-mapcs\-frame \-mno\-apcs\-frame
|
462 |
|
|
\&\-mabi=\fR\fIname\fR
|
463 |
|
|
\&\fB\-mapcs\-stack\-check \-mno\-apcs\-stack\-check
|
464 |
|
|
\&\-mapcs\-float \-mno\-apcs\-float
|
465 |
|
|
\&\-mapcs\-reentrant \-mno\-apcs\-reentrant
|
466 |
|
|
\&\-msched\-prolog \-mno\-sched\-prolog
|
467 |
|
|
\&\-mlittle\-endian \-mbig\-endian \-mwords\-little\-endian
|
468 |
|
|
\&\-mfloat\-abi=\fR\fIname\fR \fB\-msoft\-float \-mhard\-float \-mfpe
|
469 |
|
|
\&\-mfp16\-format=\fR\fIname\fR
|
470 |
|
|
\&\fB\-mthumb\-interwork \-mno\-thumb\-interwork
|
471 |
|
|
\&\-mcpu=\fR\fIname\fR \fB\-march=\fR\fIname\fR \fB\-mfpu=\fR\fIname\fR
|
472 |
|
|
\&\fB\-mstructure\-size\-boundary=\fR\fIn\fR
|
473 |
|
|
\&\fB\-mabort\-on\-noreturn
|
474 |
|
|
\&\-mlong\-calls \-mno\-long\-calls
|
475 |
|
|
\&\-msingle\-pic\-base \-mno\-single\-pic\-base
|
476 |
|
|
\&\-mpic\-register=\fR\fIreg\fR
|
477 |
|
|
\&\fB\-mnop\-fun\-dllimport
|
478 |
|
|
\&\-mcirrus\-fix\-invalid\-insns \-mno\-cirrus\-fix\-invalid\-insns
|
479 |
|
|
\&\-mpoke\-function\-name
|
480 |
|
|
\&\-mthumb \-marm
|
481 |
|
|
\&\-mtpcs\-frame \-mtpcs\-leaf\-frame
|
482 |
|
|
\&\-mcaller\-super\-interworking \-mcallee\-super\-interworking
|
483 |
|
|
\&\-mtp=\fR\fIname\fR
|
484 |
|
|
\&\fB\-mword\-relocations
|
485 |
|
|
\&\-mfix\-cortex\-m3\-ldrd\fR
|
486 |
|
|
.Sp
|
487 |
|
|
\&\fI\s-1AVR\s0 Options\fR
|
488 |
|
|
\&\fB\-mmcu=\fR\fImcu\fR \fB\-mno\-interrupts
|
489 |
|
|
\&\-mcall\-prologues \-mtiny\-stack \-mint8\fR
|
490 |
|
|
.Sp
|
491 |
|
|
\&\fIBlackfin Options\fR
|
492 |
|
|
\&\fB\-mcpu=\fR\fIcpu\fR[\fB\-\fR\fIsirevision\fR]
|
493 |
|
|
\&\fB\-msim \-momit\-leaf\-frame\-pointer \-mno\-omit\-leaf\-frame\-pointer
|
494 |
|
|
\&\-mspecld\-anomaly \-mno\-specld\-anomaly \-mcsync\-anomaly \-mno\-csync\-anomaly
|
495 |
|
|
\&\-mlow\-64k \-mno\-low64k \-mstack\-check\-l1 \-mid\-shared\-library
|
496 |
|
|
\&\-mno\-id\-shared\-library \-mshared\-library\-id=\fR\fIn\fR
|
497 |
|
|
\&\fB\-mleaf\-id\-shared\-library \-mno\-leaf\-id\-shared\-library
|
498 |
|
|
\&\-msep\-data \-mno\-sep\-data \-mlong\-calls \-mno\-long\-calls
|
499 |
|
|
\&\-mfast\-fp \-minline\-plt \-mmulticore \-mcorea \-mcoreb \-msdram
|
500 |
|
|
\&\-micplb\fR
|
501 |
|
|
.Sp
|
502 |
|
|
\&\fI\s-1CRIS\s0 Options\fR
|
503 |
|
|
\&\fB\-mcpu=\fR\fIcpu\fR \fB\-march=\fR\fIcpu\fR \fB\-mtune=\fR\fIcpu\fR
|
504 |
|
|
\&\fB\-mmax\-stack\-frame=\fR\fIn\fR \fB\-melinux\-stacksize=\fR\fIn\fR
|
505 |
|
|
\&\fB\-metrax4 \-metrax100 \-mpdebug \-mcc\-init \-mno\-side\-effects
|
506 |
|
|
\&\-mstack\-align \-mdata\-align \-mconst\-align
|
507 |
|
|
\&\-m32\-bit \-m16\-bit \-m8\-bit \-mno\-prologue\-epilogue \-mno\-gotplt
|
508 |
|
|
\&\-melf \-maout \-melinux \-mlinux \-sim \-sim2
|
509 |
|
|
\&\-mmul\-bug\-workaround \-mno\-mul\-bug\-workaround\fR
|
510 |
|
|
.Sp
|
511 |
|
|
\&\fI\s-1CRX\s0 Options\fR
|
512 |
|
|
\&\fB\-mmac \-mpush\-args\fR
|
513 |
|
|
.Sp
|
514 |
|
|
\&\fIDarwin Options\fR
|
515 |
|
|
\&\fB\-all_load \-allowable_client \-arch \-arch_errors_fatal
|
516 |
|
|
\&\-arch_only \-bind_at_load \-bundle \-bundle_loader
|
517 |
|
|
\&\-client_name \-compatibility_version \-current_version
|
518 |
|
|
\&\-dead_strip
|
519 |
|
|
\&\-dependency\-file \-dylib_file \-dylinker_install_name
|
520 |
|
|
\&\-dynamic \-dynamiclib \-exported_symbols_list
|
521 |
|
|
\&\-filelist \-flat_namespace \-force_cpusubtype_ALL
|
522 |
|
|
\&\-force_flat_namespace \-headerpad_max_install_names
|
523 |
|
|
\&\-iframework
|
524 |
|
|
\&\-image_base \-init \-install_name \-keep_private_externs
|
525 |
|
|
\&\-multi_module \-multiply_defined \-multiply_defined_unused
|
526 |
|
|
\&\-noall_load \-no_dead_strip_inits_and_terms
|
527 |
|
|
\&\-nofixprebinding \-nomultidefs \-noprebind \-noseglinkedit
|
528 |
|
|
\&\-pagezero_size \-prebind \-prebind_all_twolevel_modules
|
529 |
|
|
\&\-private_bundle \-read_only_relocs \-sectalign
|
530 |
|
|
\&\-sectobjectsymbols \-whyload \-seg1addr
|
531 |
|
|
\&\-sectcreate \-sectobjectsymbols \-sectorder
|
532 |
|
|
\&\-segaddr \-segs_read_only_addr \-segs_read_write_addr
|
533 |
|
|
\&\-seg_addr_table \-seg_addr_table_filename \-seglinkedit
|
534 |
|
|
\&\-segprot \-segs_read_only_addr \-segs_read_write_addr
|
535 |
|
|
\&\-single_module \-static \-sub_library \-sub_umbrella
|
536 |
|
|
\&\-twolevel_namespace \-umbrella \-undefined
|
537 |
|
|
\&\-unexported_symbols_list \-weak_reference_mismatches
|
538 |
|
|
\&\-whatsloaded \-F \-gused \-gfull \-mmacosx\-version\-min=\fR\fIversion\fR
|
539 |
|
|
\&\fB\-mkernel \-mone\-byte\-bool\fR
|
540 |
|
|
.Sp
|
541 |
|
|
\&\fI\s-1DEC\s0 Alpha Options\fR
|
542 |
|
|
\&\fB\-mno\-fp\-regs \-msoft\-float \-malpha\-as \-mgas
|
543 |
|
|
\&\-mieee \-mieee\-with\-inexact \-mieee\-conformant
|
544 |
|
|
\&\-mfp\-trap\-mode=\fR\fImode\fR \fB\-mfp\-rounding\-mode=\fR\fImode\fR
|
545 |
|
|
\&\fB\-mtrap\-precision=\fR\fImode\fR \fB\-mbuild\-constants
|
546 |
|
|
\&\-mcpu=\fR\fIcpu-type\fR \fB\-mtune=\fR\fIcpu-type\fR
|
547 |
|
|
\&\fB\-mbwx \-mmax \-mfix \-mcix
|
548 |
|
|
\&\-mfloat\-vax \-mfloat\-ieee
|
549 |
|
|
\&\-mexplicit\-relocs \-msmall\-data \-mlarge\-data
|
550 |
|
|
\&\-msmall\-text \-mlarge\-text
|
551 |
|
|
\&\-mmemory\-latency=\fR\fItime\fR
|
552 |
|
|
.Sp
|
553 |
|
|
\&\fI\s-1DEC\s0 Alpha/VMS Options\fR
|
554 |
|
|
\&\fB\-mvms\-return\-codes \-mdebug\-main=\fR\fIprefix\fR \fB\-mmalloc64\fR
|
555 |
|
|
.Sp
|
556 |
|
|
\&\fI\s-1FR30\s0 Options\fR
|
557 |
|
|
\&\fB\-msmall\-model \-mno\-lsim\fR
|
558 |
|
|
.Sp
|
559 |
|
|
\&\fI\s-1FRV\s0 Options\fR
|
560 |
|
|
\&\fB\-mgpr\-32 \-mgpr\-64 \-mfpr\-32 \-mfpr\-64
|
561 |
|
|
\&\-mhard\-float \-msoft\-float
|
562 |
|
|
\&\-malloc\-cc \-mfixed\-cc \-mdword \-mno\-dword
|
563 |
|
|
\&\-mdouble \-mno\-double
|
564 |
|
|
\&\-mmedia \-mno\-media \-mmuladd \-mno\-muladd
|
565 |
|
|
\&\-mfdpic \-minline\-plt \-mgprel\-ro \-multilib\-library\-pic
|
566 |
|
|
\&\-mlinked\-fp \-mlong\-calls \-malign\-labels
|
567 |
|
|
\&\-mlibrary\-pic \-macc\-4 \-macc\-8
|
568 |
|
|
\&\-mpack \-mno\-pack \-mno\-eflags \-mcond\-move \-mno\-cond\-move
|
569 |
|
|
\&\-moptimize\-membar \-mno\-optimize\-membar
|
570 |
|
|
\&\-mscc \-mno\-scc \-mcond\-exec \-mno\-cond\-exec
|
571 |
|
|
\&\-mvliw\-branch \-mno\-vliw\-branch
|
572 |
|
|
\&\-mmulti\-cond\-exec \-mno\-multi\-cond\-exec \-mnested\-cond\-exec
|
573 |
|
|
\&\-mno\-nested\-cond\-exec \-mtomcat\-stats
|
574 |
|
|
\&\-mTLS \-mtls
|
575 |
|
|
\&\-mcpu=\fR\fIcpu\fR
|
576 |
|
|
.Sp
|
577 |
|
|
\&\fIGNU/Linux Options\fR
|
578 |
|
|
\&\fB\-muclibc\fR
|
579 |
|
|
.Sp
|
580 |
|
|
\&\fIH8/300 Options\fR
|
581 |
|
|
\&\fB\-mrelax \-mh \-ms \-mn \-mint32 \-malign\-300\fR
|
582 |
|
|
.Sp
|
583 |
|
|
\&\fI\s-1HPPA\s0 Options\fR
|
584 |
|
|
\&\fB\-march=\fR\fIarchitecture-type\fR
|
585 |
|
|
\&\fB\-mbig\-switch \-mdisable\-fpregs \-mdisable\-indexing
|
586 |
|
|
\&\-mfast\-indirect\-calls \-mgas \-mgnu\-ld \-mhp\-ld
|
587 |
|
|
\&\-mfixed\-range=\fR\fIregister-range\fR
|
588 |
|
|
\&\fB\-mjump\-in\-delay \-mlinker\-opt \-mlong\-calls
|
589 |
|
|
\&\-mlong\-load\-store \-mno\-big\-switch \-mno\-disable\-fpregs
|
590 |
|
|
\&\-mno\-disable\-indexing \-mno\-fast\-indirect\-calls \-mno\-gas
|
591 |
|
|
\&\-mno\-jump\-in\-delay \-mno\-long\-load\-store
|
592 |
|
|
\&\-mno\-portable\-runtime \-mno\-soft\-float
|
593 |
|
|
\&\-mno\-space\-regs \-msoft\-float \-mpa\-risc\-1\-0
|
594 |
|
|
\&\-mpa\-risc\-1\-1 \-mpa\-risc\-2\-0 \-mportable\-runtime
|
595 |
|
|
\&\-mschedule=\fR\fIcpu-type\fR \fB\-mspace\-regs \-msio \-mwsio
|
596 |
|
|
\&\-munix=\fR\fIunix-std\fR \fB\-nolibdld \-static \-threads\fR
|
597 |
|
|
.Sp
|
598 |
|
|
\&\fIi386 and x86\-64 Options\fR
|
599 |
|
|
\&\fB\-mtune=\fR\fIcpu-type\fR \fB\-march=\fR\fIcpu-type\fR
|
600 |
|
|
\&\fB\-mfpmath=\fR\fIunit\fR
|
601 |
|
|
\&\fB\-masm=\fR\fIdialect\fR \fB\-mno\-fancy\-math\-387
|
602 |
|
|
\&\-mno\-fp\-ret\-in\-387 \-msoft\-float
|
603 |
|
|
\&\-mno\-wide\-multiply \-mrtd \-malign\-double
|
604 |
|
|
\&\-mpreferred\-stack\-boundary=\fR\fInum\fR
|
605 |
|
|
\&\fB\-mincoming\-stack\-boundary=\fR\fInum\fR
|
606 |
|
|
\&\fB\-mcld \-mcx16 \-msahf \-mmovbe \-mcrc32 \-mrecip
|
607 |
|
|
\&\-mmmx \-msse \-msse2 \-msse3 \-mssse3 \-msse4.1 \-msse4.2 \-msse4 \-mavx
|
608 |
|
|
\&\-maes \-mpclmul \-mfused\-madd
|
609 |
|
|
\&\-msse4a \-m3dnow \-mpopcnt \-mabm \-mfma4 \-mxop \-mlwp
|
610 |
|
|
\&\-mthreads \-mno\-align\-stringops \-minline\-all\-stringops
|
611 |
|
|
\&\-minline\-stringops\-dynamically \-mstringop\-strategy=\fR\fIalg\fR
|
612 |
|
|
\&\fB\-mpush\-args \-maccumulate\-outgoing\-args \-m128bit\-long\-double
|
613 |
|
|
\&\-m96bit\-long\-double \-mregparm=\fR\fInum\fR \fB\-msseregparm
|
614 |
|
|
\&\-mveclibabi=\fR\fItype\fR \fB\-mpc32 \-mpc64 \-mpc80 \-mstackrealign
|
615 |
|
|
\&\-momit\-leaf\-frame\-pointer \-mno\-red\-zone \-mno\-tls\-direct\-seg\-refs
|
616 |
|
|
\&\-mcmodel=\fR\fIcode-model\fR \fB\-mabi=\fR\fIname\fR
|
617 |
|
|
\&\fB\-m32 \-m64 \-mlarge\-data\-threshold=\fR\fInum\fR
|
618 |
|
|
\&\fB\-msse2avx\fR
|
619 |
|
|
.Sp
|
620 |
|
|
\&\fI\s-1IA\-64\s0 Options\fR
|
621 |
|
|
\&\fB\-mbig\-endian \-mlittle\-endian \-mgnu\-as \-mgnu\-ld \-mno\-pic
|
622 |
|
|
\&\-mvolatile\-asm\-stop \-mregister\-names \-msdata \-mno\-sdata
|
623 |
|
|
\&\-mconstant\-gp \-mauto\-pic \-mfused\-madd
|
624 |
|
|
\&\-minline\-float\-divide\-min\-latency
|
625 |
|
|
\&\-minline\-float\-divide\-max\-throughput
|
626 |
|
|
\&\-mno\-inline\-float\-divide
|
627 |
|
|
\&\-minline\-int\-divide\-min\-latency
|
628 |
|
|
\&\-minline\-int\-divide\-max\-throughput
|
629 |
|
|
\&\-mno\-inline\-int\-divide
|
630 |
|
|
\&\-minline\-sqrt\-min\-latency \-minline\-sqrt\-max\-throughput
|
631 |
|
|
\&\-mno\-inline\-sqrt
|
632 |
|
|
\&\-mdwarf2\-asm \-mearly\-stop\-bits
|
633 |
|
|
\&\-mfixed\-range=\fR\fIregister-range\fR \fB\-mtls\-size=\fR\fItls-size\fR
|
634 |
|
|
\&\fB\-mtune=\fR\fIcpu-type\fR \fB\-milp32 \-mlp64
|
635 |
|
|
\&\-msched\-br\-data\-spec \-msched\-ar\-data\-spec \-msched\-control\-spec
|
636 |
|
|
\&\-msched\-br\-in\-data\-spec \-msched\-ar\-in\-data\-spec \-msched\-in\-control\-spec
|
637 |
|
|
\&\-msched\-spec\-ldc \-msched\-spec\-control\-ldc
|
638 |
|
|
\&\-msched\-prefer\-non\-data\-spec\-insns \-msched\-prefer\-non\-control\-spec\-insns
|
639 |
|
|
\&\-msched\-stop\-bits\-after\-every\-cycle \-msched\-count\-spec\-in\-critical\-path
|
640 |
|
|
\&\-msel\-sched\-dont\-check\-control\-spec \-msched\-fp\-mem\-deps\-zero\-cost
|
641 |
|
|
\&\-msched\-max\-memory\-insns\-hard\-limit \-msched\-max\-memory\-insns=\fR\fImax-insns\fR
|
642 |
|
|
.Sp
|
643 |
|
|
\&\fI\s-1IA\-64/VMS\s0 Options\fR
|
644 |
|
|
\&\fB\-mvms\-return\-codes \-mdebug\-main=\fR\fIprefix\fR \fB\-mmalloc64\fR
|
645 |
|
|
.Sp
|
646 |
|
|
\&\fI\s-1LM32\s0 Options\fR
|
647 |
|
|
\&\fB\-mbarrel\-shift\-enabled \-mdivide\-enabled \-mmultiply\-enabled
|
648 |
|
|
\&\-msign\-extend\-enabled \-muser\-enabled\fR
|
649 |
|
|
.Sp
|
650 |
|
|
\&\fIM32R/D Options\fR
|
651 |
|
|
\&\fB\-m32r2 \-m32rx \-m32r
|
652 |
|
|
\&\-mdebug
|
653 |
|
|
\&\-malign\-loops \-mno\-align\-loops
|
654 |
|
|
\&\-missue\-rate=\fR\fInumber\fR
|
655 |
|
|
\&\fB\-mbranch\-cost=\fR\fInumber\fR
|
656 |
|
|
\&\fB\-mmodel=\fR\fIcode-size-model-type\fR
|
657 |
|
|
\&\fB\-msdata=\fR\fIsdata-type\fR
|
658 |
|
|
\&\fB\-mno\-flush\-func \-mflush\-func=\fR\fIname\fR
|
659 |
|
|
\&\fB\-mno\-flush\-trap \-mflush\-trap=\fR\fInumber\fR
|
660 |
|
|
\&\fB\-G\fR \fInum\fR
|
661 |
|
|
.Sp
|
662 |
|
|
\&\fIM32C Options\fR
|
663 |
|
|
\&\fB\-mcpu=\fR\fIcpu\fR \fB\-msim \-memregs=\fR\fInumber\fR
|
664 |
|
|
.Sp
|
665 |
|
|
\&\fIM680x0 Options\fR
|
666 |
|
|
\&\fB\-march=\fR\fIarch\fR \fB\-mcpu=\fR\fIcpu\fR \fB\-mtune=\fR\fItune\fR
|
667 |
|
|
\&\fB\-m68000 \-m68020 \-m68020\-40 \-m68020\-60 \-m68030 \-m68040
|
668 |
|
|
\&\-m68060 \-mcpu32 \-m5200 \-m5206e \-m528x \-m5307 \-m5407
|
669 |
|
|
\&\-mcfv4e \-mbitfield \-mno\-bitfield \-mc68000 \-mc68020
|
670 |
|
|
\&\-mnobitfield \-mrtd \-mno\-rtd \-mdiv \-mno\-div \-mshort
|
671 |
|
|
\&\-mno\-short \-mhard\-float \-m68881 \-msoft\-float \-mpcrel
|
672 |
|
|
\&\-malign\-int \-mstrict\-align \-msep\-data \-mno\-sep\-data
|
673 |
|
|
\&\-mshared\-library\-id=n \-mid\-shared\-library \-mno\-id\-shared\-library
|
674 |
|
|
\&\-mxgot \-mno\-xgot\fR
|
675 |
|
|
.Sp
|
676 |
|
|
\&\fIM68hc1x Options\fR
|
677 |
|
|
\&\fB\-m6811 \-m6812 \-m68hc11 \-m68hc12 \-m68hcs12
|
678 |
|
|
\&\-mauto\-incdec \-minmax \-mlong\-calls \-mshort
|
679 |
|
|
\&\-msoft\-reg\-count=\fR\fIcount\fR
|
680 |
|
|
.Sp
|
681 |
|
|
\&\fIMCore Options\fR
|
682 |
|
|
\&\fB\-mhardlit \-mno\-hardlit \-mdiv \-mno\-div \-mrelax\-immediates
|
683 |
|
|
\&\-mno\-relax\-immediates \-mwide\-bitfields \-mno\-wide\-bitfields
|
684 |
|
|
\&\-m4byte\-functions \-mno\-4byte\-functions \-mcallgraph\-data
|
685 |
|
|
\&\-mno\-callgraph\-data \-mslow\-bytes \-mno\-slow\-bytes \-mno\-lsim
|
686 |
|
|
\&\-mlittle\-endian \-mbig\-endian \-m210 \-m340 \-mstack\-increment\fR
|
687 |
|
|
.Sp
|
688 |
|
|
\&\fIMeP Options\fR
|
689 |
|
|
\&\fB\-mabsdiff \-mall\-opts \-maverage \-mbased=\fR\fIn\fR \fB\-mbitops
|
690 |
|
|
\&\-mc=\fR\fIn\fR \fB\-mclip \-mconfig=\fR\fIname\fR \fB\-mcop \-mcop32 \-mcop64 \-mivc2
|
691 |
|
|
\&\-mdc \-mdiv \-meb \-mel \-mio\-volatile \-ml \-mleadz \-mm \-mminmax
|
692 |
|
|
\&\-mmult \-mno\-opts \-mrepeat \-ms \-msatur \-msdram \-msim \-msimnovec \-mtf
|
693 |
|
|
\&\-mtiny=\fR\fIn\fR
|
694 |
|
|
.Sp
|
695 |
|
|
\&\fI\s-1MIPS\s0 Options\fR
|
696 |
|
|
\&\fB\-EL \-EB \-march=\fR\fIarch\fR \fB\-mtune=\fR\fIarch\fR
|
697 |
|
|
\&\fB\-mips1 \-mips2 \-mips3 \-mips4 \-mips32 \-mips32r2
|
698 |
|
|
\&\-mips64 \-mips64r2
|
699 |
|
|
\&\-mips16 \-mno\-mips16 \-mflip\-mips16
|
700 |
|
|
\&\-minterlink\-mips16 \-mno\-interlink\-mips16
|
701 |
|
|
\&\-mabi=\fR\fIabi\fR \fB\-mabicalls \-mno\-abicalls
|
702 |
|
|
\&\-mshared \-mno\-shared \-mplt \-mno\-plt \-mxgot \-mno\-xgot
|
703 |
|
|
\&\-mgp32 \-mgp64 \-mfp32 \-mfp64 \-mhard\-float \-msoft\-float
|
704 |
|
|
\&\-msingle\-float \-mdouble\-float \-mdsp \-mno\-dsp \-mdspr2 \-mno\-dspr2
|
705 |
|
|
\&\-mfpu=\fR\fIfpu-type\fR
|
706 |
|
|
\&\fB\-msmartmips \-mno\-smartmips
|
707 |
|
|
\&\-mpaired\-single \-mno\-paired\-single \-mdmx \-mno\-mdmx
|
708 |
|
|
\&\-mips3d \-mno\-mips3d \-mmt \-mno\-mt \-mllsc \-mno\-llsc
|
709 |
|
|
\&\-mlong64 \-mlong32 \-msym32 \-mno\-sym32
|
710 |
|
|
\&\-G\fR\fInum\fR \fB\-mlocal\-sdata \-mno\-local\-sdata
|
711 |
|
|
\&\-mextern\-sdata \-mno\-extern\-sdata \-mgpopt \-mno\-gopt
|
712 |
|
|
\&\-membedded\-data \-mno\-embedded\-data
|
713 |
|
|
\&\-muninit\-const\-in\-rodata \-mno\-uninit\-const\-in\-rodata
|
714 |
|
|
\&\-mcode\-readable=\fR\fIsetting\fR
|
715 |
|
|
\&\fB\-msplit\-addresses \-mno\-split\-addresses
|
716 |
|
|
\&\-mexplicit\-relocs \-mno\-explicit\-relocs
|
717 |
|
|
\&\-mcheck\-zero\-division \-mno\-check\-zero\-division
|
718 |
|
|
\&\-mdivide\-traps \-mdivide\-breaks
|
719 |
|
|
\&\-mmemcpy \-mno\-memcpy \-mlong\-calls \-mno\-long\-calls
|
720 |
|
|
\&\-mmad \-mno\-mad \-mfused\-madd \-mno\-fused\-madd \-nocpp
|
721 |
|
|
\&\-mfix\-r4000 \-mno\-fix\-r4000 \-mfix\-r4400 \-mno\-fix\-r4400
|
722 |
|
|
\&\-mfix\-r10000 \-mno\-fix\-r10000 \-mfix\-vr4120 \-mno\-fix\-vr4120
|
723 |
|
|
\&\-mfix\-vr4130 \-mno\-fix\-vr4130 \-mfix\-sb1 \-mno\-fix\-sb1
|
724 |
|
|
\&\-mflush\-func=\fR\fIfunc\fR \fB\-mno\-flush\-func
|
725 |
|
|
\&\-mbranch\-cost=\fR\fInum\fR \fB\-mbranch\-likely \-mno\-branch\-likely
|
726 |
|
|
\&\-mfp\-exceptions \-mno\-fp\-exceptions
|
727 |
|
|
\&\-mvr4130\-align \-mno\-vr4130\-align \-msynci \-mno\-synci
|
728 |
|
|
\&\-mrelax\-pic\-calls \-mno\-relax\-pic\-calls \-mmcount\-ra\-address\fR
|
729 |
|
|
.Sp
|
730 |
|
|
\&\fI\s-1MMIX\s0 Options\fR
|
731 |
|
|
\&\fB\-mlibfuncs \-mno\-libfuncs \-mepsilon \-mno\-epsilon \-mabi=gnu
|
732 |
|
|
\&\-mabi=mmixware \-mzero\-extend \-mknuthdiv \-mtoplevel\-symbols
|
733 |
|
|
\&\-melf \-mbranch\-predict \-mno\-branch\-predict \-mbase\-addresses
|
734 |
|
|
\&\-mno\-base\-addresses \-msingle\-exit \-mno\-single\-exit\fR
|
735 |
|
|
.Sp
|
736 |
|
|
\&\fI\s-1MN10300\s0 Options\fR
|
737 |
|
|
\&\fB\-mmult\-bug \-mno\-mult\-bug
|
738 |
|
|
\&\-mam33 \-mno\-am33
|
739 |
|
|
\&\-mam33\-2 \-mno\-am33\-2
|
740 |
|
|
\&\-mreturn\-pointer\-on\-d0
|
741 |
|
|
\&\-mno\-crt0 \-mrelax\fR
|
742 |
|
|
.Sp
|
743 |
|
|
\&\fI\s-1PDP\-11\s0 Options\fR
|
744 |
|
|
\&\fB\-mfpu \-msoft\-float \-mac0 \-mno\-ac0 \-m40 \-m45 \-m10
|
745 |
|
|
\&\-mbcopy \-mbcopy\-builtin \-mint32 \-mno\-int16
|
746 |
|
|
\&\-mint16 \-mno\-int32 \-mfloat32 \-mno\-float64
|
747 |
|
|
\&\-mfloat64 \-mno\-float32 \-mabshi \-mno\-abshi
|
748 |
|
|
\&\-mbranch\-expensive \-mbranch\-cheap
|
749 |
|
|
\&\-msplit \-mno\-split \-munix\-asm \-mdec\-asm\fR
|
750 |
|
|
.Sp
|
751 |
|
|
\&\fIpicoChip Options\fR
|
752 |
|
|
\&\fB\-mae=\fR\fIae_type\fR \fB\-mvliw\-lookahead=\fR\fIN\fR
|
753 |
|
|
\&\fB\-msymbol\-as\-address \-mno\-inefficient\-warnings\fR
|
754 |
|
|
.Sp
|
755 |
|
|
\&\fIPowerPC Options\fR
|
756 |
|
|
See \s-1RS/6000\s0 and PowerPC Options.
|
757 |
|
|
.Sp
|
758 |
|
|
\&\fI\s-1RS/6000\s0 and PowerPC Options\fR
|
759 |
|
|
\&\fB\-mcpu=\fR\fIcpu-type\fR
|
760 |
|
|
\&\fB\-mtune=\fR\fIcpu-type\fR
|
761 |
|
|
\&\fB\-mpower \-mno\-power \-mpower2 \-mno\-power2
|
762 |
|
|
\&\-mpowerpc \-mpowerpc64 \-mno\-powerpc
|
763 |
|
|
\&\-maltivec \-mno\-altivec
|
764 |
|
|
\&\-mpowerpc\-gpopt \-mno\-powerpc\-gpopt
|
765 |
|
|
\&\-mpowerpc\-gfxopt \-mno\-powerpc\-gfxopt
|
766 |
|
|
\&\-mmfcrf \-mno\-mfcrf \-mpopcntb \-mno\-popcntb \-mpopcntd \-mno\-popcntd
|
767 |
|
|
\&\-mfprnd \-mno\-fprnd
|
768 |
|
|
\&\-mcmpb \-mno\-cmpb \-mmfpgpr \-mno\-mfpgpr \-mhard\-dfp \-mno\-hard\-dfp
|
769 |
|
|
\&\-mnew\-mnemonics \-mold\-mnemonics
|
770 |
|
|
\&\-mfull\-toc \-mminimal\-toc \-mno\-fp\-in\-toc \-mno\-sum\-in\-toc
|
771 |
|
|
\&\-m64 \-m32 \-mxl\-compat \-mno\-xl\-compat \-mpe
|
772 |
|
|
\&\-malign\-power \-malign\-natural
|
773 |
|
|
\&\-msoft\-float \-mhard\-float \-mmultiple \-mno\-multiple
|
774 |
|
|
\&\-msingle\-float \-mdouble\-float \-msimple\-fpu
|
775 |
|
|
\&\-mstring \-mno\-string \-mupdate \-mno\-update
|
776 |
|
|
\&\-mavoid\-indexed\-addresses \-mno\-avoid\-indexed\-addresses
|
777 |
|
|
\&\-mfused\-madd \-mno\-fused\-madd \-mbit\-align \-mno\-bit\-align
|
778 |
|
|
\&\-mstrict\-align \-mno\-strict\-align \-mrelocatable
|
779 |
|
|
\&\-mno\-relocatable \-mrelocatable\-lib \-mno\-relocatable\-lib
|
780 |
|
|
\&\-mtoc \-mno\-toc \-mlittle \-mlittle\-endian \-mbig \-mbig\-endian
|
781 |
|
|
\&\-mdynamic\-no\-pic \-maltivec \-mswdiv
|
782 |
|
|
\&\-mprioritize\-restricted\-insns=\fR\fIpriority\fR
|
783 |
|
|
\&\fB\-msched\-costly\-dep=\fR\fIdependence_type\fR
|
784 |
|
|
\&\fB\-minsert\-sched\-nops=\fR\fIscheme\fR
|
785 |
|
|
\&\fB\-mcall\-sysv \-mcall\-netbsd
|
786 |
|
|
\&\-maix\-struct\-return \-msvr4\-struct\-return
|
787 |
|
|
\&\-mabi=\fR\fIabi-type\fR \fB\-msecure\-plt \-mbss\-plt
|
788 |
|
|
\&\-misel \-mno\-isel
|
789 |
|
|
\&\-misel=yes \-misel=no
|
790 |
|
|
\&\-mspe \-mno\-spe
|
791 |
|
|
\&\-mspe=yes \-mspe=no
|
792 |
|
|
\&\-mpaired
|
793 |
|
|
\&\-mgen\-cell\-microcode \-mwarn\-cell\-microcode
|
794 |
|
|
\&\-mvrsave \-mno\-vrsave
|
795 |
|
|
\&\-mmulhw \-mno\-mulhw
|
796 |
|
|
\&\-mdlmzb \-mno\-dlmzb
|
797 |
|
|
\&\-mfloat\-gprs=yes \-mfloat\-gprs=no \-mfloat\-gprs=single \-mfloat\-gprs=double
|
798 |
|
|
\&\-mprototype \-mno\-prototype
|
799 |
|
|
\&\-msim \-mmvme \-mads \-myellowknife \-memb \-msdata
|
800 |
|
|
\&\-msdata=\fR\fIopt\fR \fB\-mvxworks \-G\fR \fInum\fR \fB\-pthread\fR
|
801 |
|
|
.Sp
|
802 |
|
|
\&\fI\s-1RX\s0 Options\fR
|
803 |
|
|
\&\fB\-m64bit\-doubles \-m32bit\-doubles \-fpu \-nofpu
|
804 |
|
|
\&\-mcpu= \-patch=
|
805 |
|
|
\&\-mbig\-endian\-data \-mlittle\-endian\-data
|
806 |
|
|
\&\-msmall\-data
|
807 |
|
|
\&\-msim \-mno\-sim
|
808 |
|
|
\&\-mas100\-syntax \-mno\-as100\-syntax
|
809 |
|
|
\&\-mrelax
|
810 |
|
|
\&\-mmax\-constant\-size=
|
811 |
|
|
\&\-mint\-register=
|
812 |
|
|
\&\-msave\-acc\-in\-interrupts\fR
|
813 |
|
|
.Sp
|
814 |
|
|
\&\fIS/390 and zSeries Options\fR
|
815 |
|
|
\&\fB\-mtune=\fR\fIcpu-type\fR \fB\-march=\fR\fIcpu-type\fR
|
816 |
|
|
\&\fB\-mhard\-float \-msoft\-float \-mhard\-dfp \-mno\-hard\-dfp
|
817 |
|
|
\&\-mlong\-double\-64 \-mlong\-double\-128
|
818 |
|
|
\&\-mbackchain \-mno\-backchain \-mpacked\-stack \-mno\-packed\-stack
|
819 |
|
|
\&\-msmall\-exec \-mno\-small\-exec \-mmvcle \-mno\-mvcle
|
820 |
|
|
\&\-m64 \-m31 \-mdebug \-mno\-debug \-mesa \-mzarch
|
821 |
|
|
\&\-mtpf\-trace \-mno\-tpf\-trace \-mfused\-madd \-mno\-fused\-madd
|
822 |
|
|
\&\-mwarn\-framesize \-mwarn\-dynamicstack \-mstack\-size \-mstack\-guard\fR
|
823 |
|
|
.Sp
|
824 |
|
|
\&\fIScore Options\fR
|
825 |
|
|
\&\fB\-meb \-mel
|
826 |
|
|
\&\-mnhwloop
|
827 |
|
|
\&\-muls
|
828 |
|
|
\&\-mmac
|
829 |
|
|
\&\-mscore5 \-mscore5u \-mscore7 \-mscore7d\fR
|
830 |
|
|
.Sp
|
831 |
|
|
\&\fI\s-1SH\s0 Options\fR
|
832 |
|
|
\&\fB\-m1 \-m2 \-m2e
|
833 |
|
|
\&\-m2a\-nofpu \-m2a\-single\-only \-m2a\-single \-m2a
|
834 |
|
|
\&\-m3 \-m3e
|
835 |
|
|
\&\-m4\-nofpu \-m4\-single\-only \-m4\-single \-m4
|
836 |
|
|
\&\-m4a\-nofpu \-m4a\-single\-only \-m4a\-single \-m4a \-m4al
|
837 |
|
|
\&\-m5\-64media \-m5\-64media\-nofpu
|
838 |
|
|
\&\-m5\-32media \-m5\-32media\-nofpu
|
839 |
|
|
\&\-m5\-compact \-m5\-compact\-nofpu
|
840 |
|
|
\&\-mb \-ml \-mdalign \-mrelax
|
841 |
|
|
\&\-mbigtable \-mfmovd \-mhitachi \-mrenesas \-mno\-renesas \-mnomacsave
|
842 |
|
|
\&\-mieee \-mbitops \-misize \-minline\-ic_invalidate \-mpadstruct \-mspace
|
843 |
|
|
\&\-mprefergot \-musermode \-multcost=\fR\fInumber\fR \fB\-mdiv=\fR\fIstrategy\fR
|
844 |
|
|
\&\fB\-mdivsi3_libfunc=\fR\fIname\fR \fB\-mfixed\-range=\fR\fIregister-range\fR
|
845 |
|
|
\&\fB\-madjust\-unroll \-mindexed\-addressing \-mgettrcost=\fR\fInumber\fR \fB\-mpt\-fixed
|
846 |
|
|
\&\-minvalid\-symbols\fR
|
847 |
|
|
.Sp
|
848 |
|
|
\&\fI\s-1SPARC\s0 Options\fR
|
849 |
|
|
\&\fB\-mcpu=\fR\fIcpu-type\fR
|
850 |
|
|
\&\fB\-mtune=\fR\fIcpu-type\fR
|
851 |
|
|
\&\fB\-mcmodel=\fR\fIcode-model\fR
|
852 |
|
|
\&\fB\-m32 \-m64 \-mapp\-regs \-mno\-app\-regs
|
853 |
|
|
\&\-mfaster\-structs \-mno\-faster\-structs
|
854 |
|
|
\&\-mfpu \-mno\-fpu \-mhard\-float \-msoft\-float
|
855 |
|
|
\&\-mhard\-quad\-float \-msoft\-quad\-float
|
856 |
|
|
\&\-mimpure\-text \-mno\-impure\-text \-mlittle\-endian
|
857 |
|
|
\&\-mstack\-bias \-mno\-stack\-bias
|
858 |
|
|
\&\-munaligned\-doubles \-mno\-unaligned\-doubles
|
859 |
|
|
\&\-mv8plus \-mno\-v8plus \-mvis \-mno\-vis
|
860 |
|
|
\&\-threads \-pthreads \-pthread\fR
|
861 |
|
|
.Sp
|
862 |
|
|
\&\fI\s-1SPU\s0 Options\fR
|
863 |
|
|
\&\fB\-mwarn\-reloc \-merror\-reloc
|
864 |
|
|
\&\-msafe\-dma \-munsafe\-dma
|
865 |
|
|
\&\-mbranch\-hints
|
866 |
|
|
\&\-msmall\-mem \-mlarge\-mem \-mstdmain
|
867 |
|
|
\&\-mfixed\-range=\fR\fIregister-range\fR
|
868 |
|
|
\&\fB\-mea32 \-mea64
|
869 |
|
|
\&\-maddress\-space\-conversion \-mno\-address\-space\-conversion
|
870 |
|
|
\&\-mcache\-size=\fR\fIcache-size\fR
|
871 |
|
|
\&\fB\-matomic\-updates \-mno\-atomic\-updates\fR
|
872 |
|
|
.Sp
|
873 |
|
|
\&\fISystem V Options\fR
|
874 |
|
|
\&\fB\-Qy \-Qn \-YP,\fR\fIpaths\fR \fB\-Ym,\fR\fIdir\fR
|
875 |
|
|
.Sp
|
876 |
|
|
\&\fIV850 Options\fR
|
877 |
|
|
\&\fB\-mlong\-calls \-mno\-long\-calls \-mep \-mno\-ep
|
878 |
|
|
\&\-mprolog\-function \-mno\-prolog\-function \-mspace
|
879 |
|
|
\&\-mtda=\fR\fIn\fR \fB\-msda=\fR\fIn\fR \fB\-mzda=\fR\fIn\fR
|
880 |
|
|
\&\fB\-mapp\-regs \-mno\-app\-regs
|
881 |
|
|
\&\-mdisable\-callt \-mno\-disable\-callt
|
882 |
|
|
\&\-mv850e1
|
883 |
|
|
\&\-mv850e
|
884 |
|
|
\&\-mv850 \-mbig\-switch\fR
|
885 |
|
|
.Sp
|
886 |
|
|
\&\fI\s-1VAX\s0 Options\fR
|
887 |
|
|
\&\fB\-mg \-mgnu \-munix\fR
|
888 |
|
|
.Sp
|
889 |
|
|
\&\fIVxWorks Options\fR
|
890 |
|
|
\&\fB\-mrtp \-non\-static \-Bstatic \-Bdynamic
|
891 |
|
|
\&\-Xbind\-lazy \-Xbind\-now\fR
|
892 |
|
|
.Sp
|
893 |
|
|
\&\fIx86\-64 Options\fR
|
894 |
|
|
See i386 and x86\-64 Options.
|
895 |
|
|
.Sp
|
896 |
|
|
\&\fIi386 and x86\-64 Windows Options\fR
|
897 |
|
|
\&\fB\-mconsole \-mcygwin \-mno\-cygwin \-mdll
|
898 |
|
|
\&\-mnop\-fun\-dllimport \-mthread \-municode \-mwin32 \-mwindows
|
899 |
|
|
\&\-fno\-set\-stack\-executable\fR
|
900 |
|
|
.Sp
|
901 |
|
|
\&\fIXstormy16 Options\fR
|
902 |
|
|
\&\fB\-msim\fR
|
903 |
|
|
.Sp
|
904 |
|
|
\&\fIXtensa Options\fR
|
905 |
|
|
\&\fB\-mconst16 \-mno\-const16
|
906 |
|
|
\&\-mfused\-madd \-mno\-fused\-madd
|
907 |
|
|
\&\-mserialize\-volatile \-mno\-serialize\-volatile
|
908 |
|
|
\&\-mtext\-section\-literals \-mno\-text\-section\-literals
|
909 |
|
|
\&\-mtarget\-align \-mno\-target\-align
|
910 |
|
|
\&\-mlongcalls \-mno\-longcalls\fR
|
911 |
|
|
.Sp
|
912 |
|
|
\&\fIzSeries Options\fR
|
913 |
|
|
See S/390 and zSeries Options.
|
914 |
|
|
.IP "\fICode Generation Options\fR" 4
|
915 |
|
|
.IX Item "Code Generation Options"
|
916 |
|
|
\&\fB\-fcall\-saved\-\fR\fIreg\fR \fB\-fcall\-used\-\fR\fIreg\fR
|
917 |
|
|
\&\fB\-ffixed\-\fR\fIreg\fR \fB\-fexceptions
|
918 |
|
|
\&\-fnon\-call\-exceptions \-funwind\-tables
|
919 |
|
|
\&\-fasynchronous\-unwind\-tables
|
920 |
|
|
\&\-finhibit\-size\-directive \-finstrument\-functions
|
921 |
|
|
\&\-finstrument\-functions\-exclude\-function\-list=\fR\fIsym\fR\fB,\fR\fIsym\fR\fB,...
|
922 |
|
|
\&\-finstrument\-functions\-exclude\-file\-list=\fR\fIfile\fR\fB,\fR\fIfile\fR\fB,...
|
923 |
|
|
\&\-fno\-common \-fno\-ident
|
924 |
|
|
\&\-fpcc\-struct\-return \-fpic \-fPIC \-fpie \-fPIE
|
925 |
|
|
\&\-fno\-jump\-tables
|
926 |
|
|
\&\-frecord\-gcc\-switches
|
927 |
|
|
\&\-freg\-struct\-return \-fshort\-enums
|
928 |
|
|
\&\-fshort\-double \-fshort\-wchar
|
929 |
|
|
\&\-fverbose\-asm \-fpack\-struct[=\fR\fIn\fR\fB] \-fstack\-check
|
930 |
|
|
\&\-fstack\-limit\-register=\fR\fIreg\fR \fB\-fstack\-limit\-symbol=\fR\fIsym\fR
|
931 |
|
|
\&\fB\-fno\-stack\-limit \-fargument\-alias \-fargument\-noalias
|
932 |
|
|
\&\-fargument\-noalias\-global \-fargument\-noalias\-anything
|
933 |
|
|
\&\-fleading\-underscore \-ftls\-model=\fR\fImodel\fR
|
934 |
|
|
\&\fB\-ftrapv \-fwrapv \-fbounds\-check
|
935 |
|
|
\&\-fvisibility\fR
|
936 |
|
|
.Sh "Options Controlling the Kind of Output"
|
937 |
|
|
.IX Subsection "Options Controlling the Kind of Output"
|
938 |
|
|
Compilation can involve up to four stages: preprocessing, compilation
|
939 |
|
|
proper, assembly and linking, always in that order. \s-1GCC\s0 is capable of
|
940 |
|
|
preprocessing and compiling several files either into several
|
941 |
|
|
assembler input files, or into one assembler input file; then each
|
942 |
|
|
assembler input file produces an object file, and linking combines all
|
943 |
|
|
the object files (those newly compiled, and those specified as input)
|
944 |
|
|
into an executable file.
|
945 |
|
|
.PP
|
946 |
|
|
For any given input file, the file name suffix determines what kind of
|
947 |
|
|
compilation is done:
|
948 |
|
|
.IP "\fIfile\fR\fB.c\fR" 4
|
949 |
|
|
.IX Item "file.c"
|
950 |
|
|
C source code which must be preprocessed.
|
951 |
|
|
.IP "\fIfile\fR\fB.i\fR" 4
|
952 |
|
|
.IX Item "file.i"
|
953 |
|
|
C source code which should not be preprocessed.
|
954 |
|
|
.IP "\fIfile\fR\fB.ii\fR" 4
|
955 |
|
|
.IX Item "file.ii"
|
956 |
|
|
\&\*(C+ source code which should not be preprocessed.
|
957 |
|
|
.IP "\fIfile\fR\fB.m\fR" 4
|
958 |
|
|
.IX Item "file.m"
|
959 |
|
|
Objective-C source code. Note that you must link with the \fIlibobjc\fR
|
960 |
|
|
library to make an Objective-C program work.
|
961 |
|
|
.IP "\fIfile\fR\fB.mi\fR" 4
|
962 |
|
|
.IX Item "file.mi"
|
963 |
|
|
Objective-C source code which should not be preprocessed.
|
964 |
|
|
.IP "\fIfile\fR\fB.mm\fR" 4
|
965 |
|
|
.IX Item "file.mm"
|
966 |
|
|
.PD 0
|
967 |
|
|
.IP "\fIfile\fR\fB.M\fR" 4
|
968 |
|
|
.IX Item "file.M"
|
969 |
|
|
.PD
|
970 |
|
|
Objective\-\*(C+ source code. Note that you must link with the \fIlibobjc\fR
|
971 |
|
|
library to make an Objective\-\*(C+ program work. Note that \fB.M\fR refers
|
972 |
|
|
to a literal capital M.
|
973 |
|
|
.IP "\fIfile\fR\fB.mii\fR" 4
|
974 |
|
|
.IX Item "file.mii"
|
975 |
|
|
Objective\-\*(C+ source code which should not be preprocessed.
|
976 |
|
|
.IP "\fIfile\fR\fB.h\fR" 4
|
977 |
|
|
.IX Item "file.h"
|
978 |
|
|
C, \*(C+, Objective-C or Objective\-\*(C+ header file to be turned into a
|
979 |
|
|
precompiled header.
|
980 |
|
|
.IP "\fIfile\fR\fB.cc\fR" 4
|
981 |
|
|
.IX Item "file.cc"
|
982 |
|
|
.PD 0
|
983 |
|
|
.IP "\fIfile\fR\fB.cp\fR" 4
|
984 |
|
|
.IX Item "file.cp"
|
985 |
|
|
.IP "\fIfile\fR\fB.cxx\fR" 4
|
986 |
|
|
.IX Item "file.cxx"
|
987 |
|
|
.IP "\fIfile\fR\fB.cpp\fR" 4
|
988 |
|
|
.IX Item "file.cpp"
|
989 |
|
|
.IP "\fIfile\fR\fB.CPP\fR" 4
|
990 |
|
|
.IX Item "file.CPP"
|
991 |
|
|
.IP "\fIfile\fR\fB.c++\fR" 4
|
992 |
|
|
.IX Item "file.c++"
|
993 |
|
|
.IP "\fIfile\fR\fB.C\fR" 4
|
994 |
|
|
.IX Item "file.C"
|
995 |
|
|
.PD
|
996 |
|
|
\&\*(C+ source code which must be preprocessed. Note that in \fB.cxx\fR,
|
997 |
|
|
the last two letters must both be literally \fBx\fR. Likewise,
|
998 |
|
|
\&\fB.C\fR refers to a literal capital C.
|
999 |
|
|
.IP "\fIfile\fR\fB.mm\fR" 4
|
1000 |
|
|
.IX Item "file.mm"
|
1001 |
|
|
.PD 0
|
1002 |
|
|
.IP "\fIfile\fR\fB.M\fR" 4
|
1003 |
|
|
.IX Item "file.M"
|
1004 |
|
|
.PD
|
1005 |
|
|
Objective\-\*(C+ source code which must be preprocessed.
|
1006 |
|
|
.IP "\fIfile\fR\fB.mii\fR" 4
|
1007 |
|
|
.IX Item "file.mii"
|
1008 |
|
|
Objective\-\*(C+ source code which should not be preprocessed.
|
1009 |
|
|
.IP "\fIfile\fR\fB.hh\fR" 4
|
1010 |
|
|
.IX Item "file.hh"
|
1011 |
|
|
.PD 0
|
1012 |
|
|
.IP "\fIfile\fR\fB.H\fR" 4
|
1013 |
|
|
.IX Item "file.H"
|
1014 |
|
|
.IP "\fIfile\fR\fB.hp\fR" 4
|
1015 |
|
|
.IX Item "file.hp"
|
1016 |
|
|
.IP "\fIfile\fR\fB.hxx\fR" 4
|
1017 |
|
|
.IX Item "file.hxx"
|
1018 |
|
|
.IP "\fIfile\fR\fB.hpp\fR" 4
|
1019 |
|
|
.IX Item "file.hpp"
|
1020 |
|
|
.IP "\fIfile\fR\fB.HPP\fR" 4
|
1021 |
|
|
.IX Item "file.HPP"
|
1022 |
|
|
.IP "\fIfile\fR\fB.h++\fR" 4
|
1023 |
|
|
.IX Item "file.h++"
|
1024 |
|
|
.IP "\fIfile\fR\fB.tcc\fR" 4
|
1025 |
|
|
.IX Item "file.tcc"
|
1026 |
|
|
.PD
|
1027 |
|
|
\&\*(C+ header file to be turned into a precompiled header.
|
1028 |
|
|
.IP "\fIfile\fR\fB.f\fR" 4
|
1029 |
|
|
.IX Item "file.f"
|
1030 |
|
|
.PD 0
|
1031 |
|
|
.IP "\fIfile\fR\fB.for\fR" 4
|
1032 |
|
|
.IX Item "file.for"
|
1033 |
|
|
.IP "\fIfile\fR\fB.ftn\fR" 4
|
1034 |
|
|
.IX Item "file.ftn"
|
1035 |
|
|
.PD
|
1036 |
|
|
Fixed form Fortran source code which should not be preprocessed.
|
1037 |
|
|
.IP "\fIfile\fR\fB.F\fR" 4
|
1038 |
|
|
.IX Item "file.F"
|
1039 |
|
|
.PD 0
|
1040 |
|
|
.IP "\fIfile\fR\fB.FOR\fR" 4
|
1041 |
|
|
.IX Item "file.FOR"
|
1042 |
|
|
.IP "\fIfile\fR\fB.fpp\fR" 4
|
1043 |
|
|
.IX Item "file.fpp"
|
1044 |
|
|
.IP "\fIfile\fR\fB.FPP\fR" 4
|
1045 |
|
|
.IX Item "file.FPP"
|
1046 |
|
|
.IP "\fIfile\fR\fB.FTN\fR" 4
|
1047 |
|
|
.IX Item "file.FTN"
|
1048 |
|
|
.PD
|
1049 |
|
|
Fixed form Fortran source code which must be preprocessed (with the traditional
|
1050 |
|
|
preprocessor).
|
1051 |
|
|
.IP "\fIfile\fR\fB.f90\fR" 4
|
1052 |
|
|
.IX Item "file.f90"
|
1053 |
|
|
.PD 0
|
1054 |
|
|
.IP "\fIfile\fR\fB.f95\fR" 4
|
1055 |
|
|
.IX Item "file.f95"
|
1056 |
|
|
.IP "\fIfile\fR\fB.f03\fR" 4
|
1057 |
|
|
.IX Item "file.f03"
|
1058 |
|
|
.IP "\fIfile\fR\fB.f08\fR" 4
|
1059 |
|
|
.IX Item "file.f08"
|
1060 |
|
|
.PD
|
1061 |
|
|
Free form Fortran source code which should not be preprocessed.
|
1062 |
|
|
.IP "\fIfile\fR\fB.F90\fR" 4
|
1063 |
|
|
.IX Item "file.F90"
|
1064 |
|
|
.PD 0
|
1065 |
|
|
.IP "\fIfile\fR\fB.F95\fR" 4
|
1066 |
|
|
.IX Item "file.F95"
|
1067 |
|
|
.IP "\fIfile\fR\fB.F03\fR" 4
|
1068 |
|
|
.IX Item "file.F03"
|
1069 |
|
|
.IP "\fIfile\fR\fB.F08\fR" 4
|
1070 |
|
|
.IX Item "file.F08"
|
1071 |
|
|
.PD
|
1072 |
|
|
Free form Fortran source code which must be preprocessed (with the
|
1073 |
|
|
traditional preprocessor).
|
1074 |
|
|
.IP "\fIfile\fR\fB.ads\fR" 4
|
1075 |
|
|
.IX Item "file.ads"
|
1076 |
|
|
Ada source code file which contains a library unit declaration (a
|
1077 |
|
|
declaration of a package, subprogram, or generic, or a generic
|
1078 |
|
|
instantiation), or a library unit renaming declaration (a package,
|
1079 |
|
|
generic, or subprogram renaming declaration). Such files are also
|
1080 |
|
|
called \fIspecs\fR.
|
1081 |
|
|
.IP "\fIfile\fR\fB.adb\fR" 4
|
1082 |
|
|
.IX Item "file.adb"
|
1083 |
|
|
Ada source code file containing a library unit body (a subprogram or
|
1084 |
|
|
package body). Such files are also called \fIbodies\fR.
|
1085 |
|
|
.IP "\fIfile\fR\fB.s\fR" 4
|
1086 |
|
|
.IX Item "file.s"
|
1087 |
|
|
Assembler code.
|
1088 |
|
|
.IP "\fIfile\fR\fB.S\fR" 4
|
1089 |
|
|
.IX Item "file.S"
|
1090 |
|
|
.PD 0
|
1091 |
|
|
.IP "\fIfile\fR\fB.sx\fR" 4
|
1092 |
|
|
.IX Item "file.sx"
|
1093 |
|
|
.PD
|
1094 |
|
|
Assembler code which must be preprocessed.
|
1095 |
|
|
.IP "\fIother\fR" 4
|
1096 |
|
|
.IX Item "other"
|
1097 |
|
|
An object file to be fed straight into linking.
|
1098 |
|
|
Any file name with no recognized suffix is treated this way.
|
1099 |
|
|
.PP
|
1100 |
|
|
You can specify the input language explicitly with the \fB\-x\fR option:
|
1101 |
|
|
.IP "\fB\-x\fR \fIlanguage\fR" 4
|
1102 |
|
|
.IX Item "-x language"
|
1103 |
|
|
Specify explicitly the \fIlanguage\fR for the following input files
|
1104 |
|
|
(rather than letting the compiler choose a default based on the file
|
1105 |
|
|
name suffix). This option applies to all following input files until
|
1106 |
|
|
the next \fB\-x\fR option. Possible values for \fIlanguage\fR are:
|
1107 |
|
|
.Sp
|
1108 |
|
|
.Vb 8
|
1109 |
|
|
\& c c\-header c\-cpp\-output
|
1110 |
|
|
\& c++ c++\-header c++\-cpp\-output
|
1111 |
|
|
\& objective\-c objective\-c\-header objective\-c\-cpp\-output
|
1112 |
|
|
\& objective\-c++ objective\-c++\-header objective\-c++\-cpp\-output
|
1113 |
|
|
\& assembler assembler\-with\-cpp
|
1114 |
|
|
\& ada
|
1115 |
|
|
\& f77 f77\-cpp\-input f95 f95\-cpp\-input
|
1116 |
|
|
\& java
|
1117 |
|
|
.Ve
|
1118 |
|
|
.IP "\fB\-x none\fR" 4
|
1119 |
|
|
.IX Item "-x none"
|
1120 |
|
|
Turn off any specification of a language, so that subsequent files are
|
1121 |
|
|
handled according to their file name suffixes (as they are if \fB\-x\fR
|
1122 |
|
|
has not been used at all).
|
1123 |
|
|
.IP "\fB\-pass\-exit\-codes\fR" 4
|
1124 |
|
|
.IX Item "-pass-exit-codes"
|
1125 |
|
|
Normally the \fBgcc\fR program will exit with the code of 1 if any
|
1126 |
|
|
phase of the compiler returns a non-success return code. If you specify
|
1127 |
|
|
\&\fB\-pass\-exit\-codes\fR, the \fBgcc\fR program will instead return with
|
1128 |
|
|
numerically highest error produced by any phase that returned an error
|
1129 |
|
|
indication. The C, \*(C+, and Fortran frontends return 4, if an internal
|
1130 |
|
|
compiler error is encountered.
|
1131 |
|
|
.PP
|
1132 |
|
|
If you only want some of the stages of compilation, you can use
|
1133 |
|
|
\&\fB\-x\fR (or filename suffixes) to tell \fBgcc\fR where to start, and
|
1134 |
|
|
one of the options \fB\-c\fR, \fB\-S\fR, or \fB\-E\fR to say where
|
1135 |
|
|
\&\fBgcc\fR is to stop. Note that some combinations (for example,
|
1136 |
|
|
\&\fB\-x cpp-output \-E\fR) instruct \fBgcc\fR to do nothing at all.
|
1137 |
|
|
.IP "\fB\-c\fR" 4
|
1138 |
|
|
.IX Item "-c"
|
1139 |
|
|
Compile or assemble the source files, but do not link. The linking
|
1140 |
|
|
stage simply is not done. The ultimate output is in the form of an
|
1141 |
|
|
object file for each source file.
|
1142 |
|
|
.Sp
|
1143 |
|
|
By default, the object file name for a source file is made by replacing
|
1144 |
|
|
the suffix \fB.c\fR, \fB.i\fR, \fB.s\fR, etc., with \fB.o\fR.
|
1145 |
|
|
.Sp
|
1146 |
|
|
Unrecognized input files, not requiring compilation or assembly, are
|
1147 |
|
|
ignored.
|
1148 |
|
|
.IP "\fB\-S\fR" 4
|
1149 |
|
|
.IX Item "-S"
|
1150 |
|
|
Stop after the stage of compilation proper; do not assemble. The output
|
1151 |
|
|
is in the form of an assembler code file for each non-assembler input
|
1152 |
|
|
file specified.
|
1153 |
|
|
.Sp
|
1154 |
|
|
By default, the assembler file name for a source file is made by
|
1155 |
|
|
replacing the suffix \fB.c\fR, \fB.i\fR, etc., with \fB.s\fR.
|
1156 |
|
|
.Sp
|
1157 |
|
|
Input files that don't require compilation are ignored.
|
1158 |
|
|
.IP "\fB\-E\fR" 4
|
1159 |
|
|
.IX Item "-E"
|
1160 |
|
|
Stop after the preprocessing stage; do not run the compiler proper. The
|
1161 |
|
|
output is in the form of preprocessed source code, which is sent to the
|
1162 |
|
|
standard output.
|
1163 |
|
|
.Sp
|
1164 |
|
|
Input files which don't require preprocessing are ignored.
|
1165 |
|
|
.IP "\fB\-o\fR \fIfile\fR" 4
|
1166 |
|
|
.IX Item "-o file"
|
1167 |
|
|
Place output in file \fIfile\fR. This applies regardless to whatever
|
1168 |
|
|
sort of output is being produced, whether it be an executable file,
|
1169 |
|
|
an object file, an assembler file or preprocessed C code.
|
1170 |
|
|
.Sp
|
1171 |
|
|
If \fB\-o\fR is not specified, the default is to put an executable
|
1172 |
|
|
file in \fIa.out\fR, the object file for
|
1173 |
|
|
\&\fI\fIsource\fI.\fIsuffix\fI\fR in \fI\fIsource\fI.o\fR, its
|
1174 |
|
|
assembler file in \fI\fIsource\fI.s\fR, a precompiled header file in
|
1175 |
|
|
\&\fI\fIsource\fI.\fIsuffix\fI.gch\fR, and all preprocessed C source on
|
1176 |
|
|
standard output.
|
1177 |
|
|
.IP "\fB\-v\fR" 4
|
1178 |
|
|
.IX Item "-v"
|
1179 |
|
|
Print (on standard error output) the commands executed to run the stages
|
1180 |
|
|
of compilation. Also print the version number of the compiler driver
|
1181 |
|
|
program and of the preprocessor and the compiler proper.
|
1182 |
|
|
.IP "\fB\-###\fR" 4
|
1183 |
|
|
.IX Item "-###"
|
1184 |
|
|
Like \fB\-v\fR except the commands are not executed and all command
|
1185 |
|
|
arguments are quoted. This is useful for shell scripts to capture the
|
1186 |
|
|
driver-generated command lines.
|
1187 |
|
|
.IP "\fB\-pipe\fR" 4
|
1188 |
|
|
.IX Item "-pipe"
|
1189 |
|
|
Use pipes rather than temporary files for communication between the
|
1190 |
|
|
various stages of compilation. This fails to work on some systems where
|
1191 |
|
|
the assembler is unable to read from a pipe; but the \s-1GNU\s0 assembler has
|
1192 |
|
|
no trouble.
|
1193 |
|
|
.IP "\fB\-combine\fR" 4
|
1194 |
|
|
.IX Item "-combine"
|
1195 |
|
|
If you are compiling multiple source files, this option tells the driver
|
1196 |
|
|
to pass all the source files to the compiler at once (for those
|
1197 |
|
|
languages for which the compiler can handle this). This will allow
|
1198 |
|
|
intermodule analysis (\s-1IMA\s0) to be performed by the compiler. Currently the only
|
1199 |
|
|
language for which this is supported is C. If you pass source files for
|
1200 |
|
|
multiple languages to the driver, using this option, the driver will invoke
|
1201 |
|
|
the compiler(s) that support \s-1IMA\s0 once each, passing each compiler all the
|
1202 |
|
|
source files appropriate for it. For those languages that do not support
|
1203 |
|
|
\&\s-1IMA\s0 this option will be ignored, and the compiler will be invoked once for
|
1204 |
|
|
each source file in that language. If you use this option in conjunction
|
1205 |
|
|
with \fB\-save\-temps\fR, the compiler will generate multiple
|
1206 |
|
|
pre-processed files
|
1207 |
|
|
(one for each source file), but only one (combined) \fI.o\fR or
|
1208 |
|
|
\&\fI.s\fR file.
|
1209 |
|
|
.IP "\fB\-\-help\fR" 4
|
1210 |
|
|
.IX Item "--help"
|
1211 |
|
|
Print (on the standard output) a description of the command line options
|
1212 |
|
|
understood by \fBgcc\fR. If the \fB\-v\fR option is also specified
|
1213 |
|
|
then \fB\-\-help\fR will also be passed on to the various processes
|
1214 |
|
|
invoked by \fBgcc\fR, so that they can display the command line options
|
1215 |
|
|
they accept. If the \fB\-Wextra\fR option has also been specified
|
1216 |
|
|
(prior to the \fB\-\-help\fR option), then command line options which
|
1217 |
|
|
have no documentation associated with them will also be displayed.
|
1218 |
|
|
.IP "\fB\-\-target\-help\fR" 4
|
1219 |
|
|
.IX Item "--target-help"
|
1220 |
|
|
Print (on the standard output) a description of target-specific command
|
1221 |
|
|
line options for each tool. For some targets extra target-specific
|
1222 |
|
|
information may also be printed.
|
1223 |
|
|
.IP "\fB\-\-help={\fR\fIclass\fR|[\fB^\fR]\fIqualifier\fR\fB}\fR[\fB,...\fR]" 4
|
1224 |
|
|
.IX Item "--help={class|[^]qualifier}[,...]"
|
1225 |
|
|
Print (on the standard output) a description of the command line
|
1226 |
|
|
options understood by the compiler that fit into all specified classes
|
1227 |
|
|
and qualifiers. These are the supported classes:
|
1228 |
|
|
.RS 4
|
1229 |
|
|
.IP "\fBoptimizers\fR" 4
|
1230 |
|
|
.IX Item "optimizers"
|
1231 |
|
|
This will display all of the optimization options supported by the
|
1232 |
|
|
compiler.
|
1233 |
|
|
.IP "\fBwarnings\fR" 4
|
1234 |
|
|
.IX Item "warnings"
|
1235 |
|
|
This will display all of the options controlling warning messages
|
1236 |
|
|
produced by the compiler.
|
1237 |
|
|
.IP "\fBtarget\fR" 4
|
1238 |
|
|
.IX Item "target"
|
1239 |
|
|
This will display target-specific options. Unlike the
|
1240 |
|
|
\&\fB\-\-target\-help\fR option however, target-specific options of the
|
1241 |
|
|
linker and assembler will not be displayed. This is because those
|
1242 |
|
|
tools do not currently support the extended \fB\-\-help=\fR syntax.
|
1243 |
|
|
.IP "\fBparams\fR" 4
|
1244 |
|
|
.IX Item "params"
|
1245 |
|
|
This will display the values recognized by the \fB\-\-param\fR
|
1246 |
|
|
option.
|
1247 |
|
|
.IP "\fIlanguage\fR" 4
|
1248 |
|
|
.IX Item "language"
|
1249 |
|
|
This will display the options supported for \fIlanguage\fR, where
|
1250 |
|
|
\&\fIlanguage\fR is the name of one of the languages supported in this
|
1251 |
|
|
version of \s-1GCC\s0.
|
1252 |
|
|
.IP "\fBcommon\fR" 4
|
1253 |
|
|
.IX Item "common"
|
1254 |
|
|
This will display the options that are common to all languages.
|
1255 |
|
|
.RE
|
1256 |
|
|
.RS 4
|
1257 |
|
|
.Sp
|
1258 |
|
|
These are the supported qualifiers:
|
1259 |
|
|
.IP "\fBundocumented\fR" 4
|
1260 |
|
|
.IX Item "undocumented"
|
1261 |
|
|
Display only those options which are undocumented.
|
1262 |
|
|
.IP "\fBjoined\fR" 4
|
1263 |
|
|
.IX Item "joined"
|
1264 |
|
|
Display options which take an argument that appears after an equal
|
1265 |
|
|
sign in the same continuous piece of text, such as:
|
1266 |
|
|
\&\fB\-\-help=target\fR.
|
1267 |
|
|
.IP "\fBseparate\fR" 4
|
1268 |
|
|
.IX Item "separate"
|
1269 |
|
|
Display options which take an argument that appears as a separate word
|
1270 |
|
|
following the original option, such as: \fB\-o output-file\fR.
|
1271 |
|
|
.RE
|
1272 |
|
|
.RS 4
|
1273 |
|
|
.Sp
|
1274 |
|
|
Thus for example to display all the undocumented target-specific
|
1275 |
|
|
switches supported by the compiler the following can be used:
|
1276 |
|
|
.Sp
|
1277 |
|
|
.Vb 1
|
1278 |
|
|
\& \-\-help=target,undocumented
|
1279 |
|
|
.Ve
|
1280 |
|
|
.Sp
|
1281 |
|
|
The sense of a qualifier can be inverted by prefixing it with the
|
1282 |
|
|
\&\fB^\fR character, so for example to display all binary warning
|
1283 |
|
|
options (i.e., ones that are either on or off and that do not take an
|
1284 |
|
|
argument), which have a description the following can be used:
|
1285 |
|
|
.Sp
|
1286 |
|
|
.Vb 1
|
1287 |
|
|
\& \-\-help=warnings,^joined,^undocumented
|
1288 |
|
|
.Ve
|
1289 |
|
|
.Sp
|
1290 |
|
|
The argument to \fB\-\-help=\fR should not consist solely of inverted
|
1291 |
|
|
qualifiers.
|
1292 |
|
|
.Sp
|
1293 |
|
|
Combining several classes is possible, although this usually
|
1294 |
|
|
restricts the output by so much that there is nothing to display. One
|
1295 |
|
|
case where it does work however is when one of the classes is
|
1296 |
|
|
\&\fItarget\fR. So for example to display all the target-specific
|
1297 |
|
|
optimization options the following can be used:
|
1298 |
|
|
.Sp
|
1299 |
|
|
.Vb 1
|
1300 |
|
|
\& \-\-help=target,optimizers
|
1301 |
|
|
.Ve
|
1302 |
|
|
.Sp
|
1303 |
|
|
The \fB\-\-help=\fR option can be repeated on the command line. Each
|
1304 |
|
|
successive use will display its requested class of options, skipping
|
1305 |
|
|
those that have already been displayed.
|
1306 |
|
|
.Sp
|
1307 |
|
|
If the \fB\-Q\fR option appears on the command line before the
|
1308 |
|
|
\&\fB\-\-help=\fR option, then the descriptive text displayed by
|
1309 |
|
|
\&\fB\-\-help=\fR is changed. Instead of describing the displayed
|
1310 |
|
|
options, an indication is given as to whether the option is enabled,
|
1311 |
|
|
disabled or set to a specific value (assuming that the compiler
|
1312 |
|
|
knows this at the point where the \fB\-\-help=\fR option is used).
|
1313 |
|
|
.Sp
|
1314 |
|
|
Here is a truncated example from the \s-1ARM\s0 port of \fBgcc\fR:
|
1315 |
|
|
.Sp
|
1316 |
|
|
.Vb 5
|
1317 |
|
|
\& % gcc \-Q \-mabi=2 \-\-help=target \-c
|
1318 |
|
|
\& The following options are target specific:
|
1319 |
|
|
\& \-mabi= 2
|
1320 |
|
|
\& \-mabort\-on\-noreturn [disabled]
|
1321 |
|
|
\& \-mapcs [disabled]
|
1322 |
|
|
.Ve
|
1323 |
|
|
.Sp
|
1324 |
|
|
The output is sensitive to the effects of previous command line
|
1325 |
|
|
options, so for example it is possible to find out which optimizations
|
1326 |
|
|
are enabled at \fB\-O2\fR by using:
|
1327 |
|
|
.Sp
|
1328 |
|
|
.Vb 1
|
1329 |
|
|
\& \-Q \-O2 \-\-help=optimizers
|
1330 |
|
|
.Ve
|
1331 |
|
|
.Sp
|
1332 |
|
|
Alternatively you can discover which binary optimizations are enabled
|
1333 |
|
|
by \fB\-O3\fR by using:
|
1334 |
|
|
.Sp
|
1335 |
|
|
.Vb 3
|
1336 |
|
|
\& gcc \-c \-Q \-O3 \-\-help=optimizers > /tmp/O3\-opts
|
1337 |
|
|
\& gcc \-c \-Q \-O2 \-\-help=optimizers > /tmp/O2\-opts
|
1338 |
|
|
\& diff /tmp/O2\-opts /tmp/O3\-opts | grep enabled
|
1339 |
|
|
.Ve
|
1340 |
|
|
.RE
|
1341 |
|
|
.IP "\fB\-no\-canonical\-prefixes\fR" 4
|
1342 |
|
|
.IX Item "-no-canonical-prefixes"
|
1343 |
|
|
Do not expand any symbolic links, resolve references to \fB/../\fR
|
1344 |
|
|
or \fB/./\fR, or make the path absolute when generating a relative
|
1345 |
|
|
prefix.
|
1346 |
|
|
.IP "\fB\-\-version\fR" 4
|
1347 |
|
|
.IX Item "--version"
|
1348 |
|
|
Display the version number and copyrights of the invoked \s-1GCC\s0.
|
1349 |
|
|
.IP "\fB\-wrapper\fR" 4
|
1350 |
|
|
.IX Item "-wrapper"
|
1351 |
|
|
Invoke all subcommands under a wrapper program. It takes a single
|
1352 |
|
|
comma separated list as an argument, which will be used to invoke
|
1353 |
|
|
the wrapper:
|
1354 |
|
|
.Sp
|
1355 |
|
|
.Vb 1
|
1356 |
|
|
\& gcc \-c t.c \-wrapper gdb,\-\-args
|
1357 |
|
|
.Ve
|
1358 |
|
|
.Sp
|
1359 |
|
|
This will invoke all subprograms of gcc under \*(L"gdb \-\-args\*(R",
|
1360 |
|
|
thus cc1 invocation will be \*(L"gdb \-\-args cc1 ...\*(R".
|
1361 |
|
|
.IP "\fB\-fplugin=\fR\fIname\fR\fB.so\fR" 4
|
1362 |
|
|
.IX Item "-fplugin=name.so"
|
1363 |
|
|
Load the plugin code in file \fIname\fR.so, assumed to be a
|
1364 |
|
|
shared object to be dlopen'd by the compiler. The base name of
|
1365 |
|
|
the shared object file is used to identify the plugin for the
|
1366 |
|
|
purposes of argument parsing (See
|
1367 |
|
|
\&\fB\-fplugin\-arg\-\fR\fIname\fR\fB\-\fR\fIkey\fR\fB=\fR\fIvalue\fR below).
|
1368 |
|
|
Each plugin should define the callback functions specified in the
|
1369 |
|
|
Plugins \s-1API\s0.
|
1370 |
|
|
.IP "\fB\-fplugin\-arg\-\fR\fIname\fR\fB\-\fR\fIkey\fR\fB=\fR\fIvalue\fR" 4
|
1371 |
|
|
.IX Item "-fplugin-arg-name-key=value"
|
1372 |
|
|
Define an argument called \fIkey\fR with a value of \fIvalue\fR
|
1373 |
|
|
for the plugin called \fIname\fR.
|
1374 |
|
|
.IP "\fB@\fR\fIfile\fR" 4
|
1375 |
|
|
.IX Item "@file"
|
1376 |
|
|
Read command-line options from \fIfile\fR. The options read are
|
1377 |
|
|
inserted in place of the original @\fIfile\fR option. If \fIfile\fR
|
1378 |
|
|
does not exist, or cannot be read, then the option will be treated
|
1379 |
|
|
literally, and not removed.
|
1380 |
|
|
.Sp
|
1381 |
|
|
Options in \fIfile\fR are separated by whitespace. A whitespace
|
1382 |
|
|
character may be included in an option by surrounding the entire
|
1383 |
|
|
option in either single or double quotes. Any character (including a
|
1384 |
|
|
backslash) may be included by prefixing the character to be included
|
1385 |
|
|
with a backslash. The \fIfile\fR may itself contain additional
|
1386 |
|
|
@\fIfile\fR options; any such options will be processed recursively.
|
1387 |
|
|
.Sh "Compiling \*(C+ Programs"
|
1388 |
|
|
.IX Subsection "Compiling Programs"
|
1389 |
|
|
\&\*(C+ source files conventionally use one of the suffixes \fB.C\fR,
|
1390 |
|
|
\&\fB.cc\fR, \fB.cpp\fR, \fB.CPP\fR, \fB.c++\fR, \fB.cp\fR, or
|
1391 |
|
|
\&\fB.cxx\fR; \*(C+ header files often use \fB.hh\fR, \fB.hpp\fR,
|
1392 |
|
|
\&\fB.H\fR, or (for shared template code) \fB.tcc\fR; and
|
1393 |
|
|
preprocessed \*(C+ files use the suffix \fB.ii\fR. \s-1GCC\s0 recognizes
|
1394 |
|
|
files with these names and compiles them as \*(C+ programs even if you
|
1395 |
|
|
call the compiler the same way as for compiling C programs (usually
|
1396 |
|
|
with the name \fBgcc\fR).
|
1397 |
|
|
.PP
|
1398 |
|
|
However, the use of \fBgcc\fR does not add the \*(C+ library.
|
1399 |
|
|
\&\fBg++\fR is a program that calls \s-1GCC\s0 and treats \fB.c\fR,
|
1400 |
|
|
\&\fB.h\fR and \fB.i\fR files as \*(C+ source files instead of C source
|
1401 |
|
|
files unless \fB\-x\fR is used, and automatically specifies linking
|
1402 |
|
|
against the \*(C+ library. This program is also useful when
|
1403 |
|
|
precompiling a C header file with a \fB.h\fR extension for use in \*(C+
|
1404 |
|
|
compilations. On many systems, \fBg++\fR is also installed with
|
1405 |
|
|
the name \fBc++\fR.
|
1406 |
|
|
.PP
|
1407 |
|
|
When you compile \*(C+ programs, you may specify many of the same
|
1408 |
|
|
command-line options that you use for compiling programs in any
|
1409 |
|
|
language; or command-line options meaningful for C and related
|
1410 |
|
|
languages; or options that are meaningful only for \*(C+ programs.
|
1411 |
|
|
.Sh "Options Controlling C Dialect"
|
1412 |
|
|
.IX Subsection "Options Controlling C Dialect"
|
1413 |
|
|
The following options control the dialect of C (or languages derived
|
1414 |
|
|
from C, such as \*(C+, Objective-C and Objective\-\*(C+) that the compiler
|
1415 |
|
|
accepts:
|
1416 |
|
|
.IP "\fB\-ansi\fR" 4
|
1417 |
|
|
.IX Item "-ansi"
|
1418 |
|
|
In C mode, this is equivalent to \fB\-std=c90\fR. In \*(C+ mode, it is
|
1419 |
|
|
equivalent to \fB\-std=c++98\fR.
|
1420 |
|
|
.Sp
|
1421 |
|
|
This turns off certain features of \s-1GCC\s0 that are incompatible with \s-1ISO\s0
|
1422 |
|
|
C90 (when compiling C code), or of standard \*(C+ (when compiling \*(C+ code),
|
1423 |
|
|
such as the \f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`typeof\*(C'\fR keywords, and
|
1424 |
|
|
predefined macros such as \f(CW\*(C`unix\*(C'\fR and \f(CW\*(C`vax\*(C'\fR that identify the
|
1425 |
|
|
type of system you are using. It also enables the undesirable and
|
1426 |
|
|
rarely used \s-1ISO\s0 trigraph feature. For the C compiler,
|
1427 |
|
|
it disables recognition of \*(C+ style \fB//\fR comments as well as
|
1428 |
|
|
the \f(CW\*(C`inline\*(C'\fR keyword.
|
1429 |
|
|
.Sp
|
1430 |
|
|
The alternate keywords \f(CW\*(C`_\|_asm_\|_\*(C'\fR, \f(CW\*(C`_\|_extension_\|_\*(C'\fR,
|
1431 |
|
|
\&\f(CW\*(C`_\|_inline_\|_\*(C'\fR and \f(CW\*(C`_\|_typeof_\|_\*(C'\fR continue to work despite
|
1432 |
|
|
\&\fB\-ansi\fR. You would not want to use them in an \s-1ISO\s0 C program, of
|
1433 |
|
|
course, but it is useful to put them in header files that might be included
|
1434 |
|
|
in compilations done with \fB\-ansi\fR. Alternate predefined macros
|
1435 |
|
|
such as \f(CW\*(C`_\|_unix_\|_\*(C'\fR and \f(CW\*(C`_\|_vax_\|_\*(C'\fR are also available, with or
|
1436 |
|
|
without \fB\-ansi\fR.
|
1437 |
|
|
.Sp
|
1438 |
|
|
The \fB\-ansi\fR option does not cause non-ISO programs to be
|
1439 |
|
|
rejected gratuitously. For that, \fB\-pedantic\fR is required in
|
1440 |
|
|
addition to \fB\-ansi\fR.
|
1441 |
|
|
.Sp
|
1442 |
|
|
The macro \f(CW\*(C`_\|_STRICT_ANSI_\|_\*(C'\fR is predefined when the \fB\-ansi\fR
|
1443 |
|
|
option is used. Some header files may notice this macro and refrain
|
1444 |
|
|
from declaring certain functions or defining certain macros that the
|
1445 |
|
|
\&\s-1ISO\s0 standard doesn't call for; this is to avoid interfering with any
|
1446 |
|
|
programs that might use these names for other things.
|
1447 |
|
|
.Sp
|
1448 |
|
|
Functions that would normally be built in but do not have semantics
|
1449 |
|
|
defined by \s-1ISO\s0 C (such as \f(CW\*(C`alloca\*(C'\fR and \f(CW\*(C`ffs\*(C'\fR) are not built-in
|
1450 |
|
|
functions when \fB\-ansi\fR is used.
|
1451 |
|
|
.IP "\fB\-std=\fR" 4
|
1452 |
|
|
.IX Item "-std="
|
1453 |
|
|
Determine the language standard. This option
|
1454 |
|
|
is currently only supported when compiling C or \*(C+.
|
1455 |
|
|
.Sp
|
1456 |
|
|
The compiler can accept several base standards, such as \fBc90\fR or
|
1457 |
|
|
\&\fBc++98\fR, and \s-1GNU\s0 dialects of those standards, such as
|
1458 |
|
|
\&\fBgnu90\fR or \fBgnu++98\fR. By specifying a base standard, the
|
1459 |
|
|
compiler will accept all programs following that standard and those
|
1460 |
|
|
using \s-1GNU\s0 extensions that do not contradict it. For example,
|
1461 |
|
|
\&\fB\-std=c90\fR turns off certain features of \s-1GCC\s0 that are
|
1462 |
|
|
incompatible with \s-1ISO\s0 C90, such as the \f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`typeof\*(C'\fR
|
1463 |
|
|
keywords, but not other \s-1GNU\s0 extensions that do not have a meaning in
|
1464 |
|
|
\&\s-1ISO\s0 C90, such as omitting the middle term of a \f(CW\*(C`?:\*(C'\fR
|
1465 |
|
|
expression. On the other hand, by specifying a \s-1GNU\s0 dialect of a
|
1466 |
|
|
standard, all features the compiler support are enabled, even when
|
1467 |
|
|
those features change the meaning of the base standard and some
|
1468 |
|
|
strict-conforming programs may be rejected. The particular standard
|
1469 |
|
|
is used by \fB\-pedantic\fR to identify which features are \s-1GNU\s0
|
1470 |
|
|
extensions given that version of the standard. For example
|
1471 |
|
|
\&\fB\-std=gnu90 \-pedantic\fR would warn about \*(C+ style \fB//\fR
|
1472 |
|
|
comments, while \fB\-std=gnu99 \-pedantic\fR would not.
|
1473 |
|
|
.Sp
|
1474 |
|
|
A value for this option must be provided; possible values are
|
1475 |
|
|
.RS 4
|
1476 |
|
|
.IP "\fBc90\fR" 4
|
1477 |
|
|
.IX Item "c90"
|
1478 |
|
|
.PD 0
|
1479 |
|
|
.IP "\fBc89\fR" 4
|
1480 |
|
|
.IX Item "c89"
|
1481 |
|
|
.IP "\fBiso9899:1990\fR" 4
|
1482 |
|
|
.IX Item "iso9899:1990"
|
1483 |
|
|
.PD
|
1484 |
|
|
Support all \s-1ISO\s0 C90 programs (certain \s-1GNU\s0 extensions that conflict
|
1485 |
|
|
with \s-1ISO\s0 C90 are disabled). Same as \fB\-ansi\fR for C code.
|
1486 |
|
|
.IP "\fBiso9899:199409\fR" 4
|
1487 |
|
|
.IX Item "iso9899:199409"
|
1488 |
|
|
\&\s-1ISO\s0 C90 as modified in amendment 1.
|
1489 |
|
|
.IP "\fBc99\fR" 4
|
1490 |
|
|
.IX Item "c99"
|
1491 |
|
|
.PD 0
|
1492 |
|
|
.IP "\fBc9x\fR" 4
|
1493 |
|
|
.IX Item "c9x"
|
1494 |
|
|
.IP "\fBiso9899:1999\fR" 4
|
1495 |
|
|
.IX Item "iso9899:1999"
|
1496 |
|
|
.IP "\fBiso9899:199x\fR" 4
|
1497 |
|
|
.IX Item "iso9899:199x"
|
1498 |
|
|
.PD
|
1499 |
|
|
\&\s-1ISO\s0 C99. Note that this standard is not yet fully supported; see
|
1500 |
|
|
<\fBhttp://gcc.gnu.org/gcc\-4.5/c99status.html\fR> for more information. The
|
1501 |
|
|
names \fBc9x\fR and \fBiso9899:199x\fR are deprecated.
|
1502 |
|
|
.IP "\fBgnu90\fR" 4
|
1503 |
|
|
.IX Item "gnu90"
|
1504 |
|
|
.PD 0
|
1505 |
|
|
.IP "\fBgnu89\fR" 4
|
1506 |
|
|
.IX Item "gnu89"
|
1507 |
|
|
.PD
|
1508 |
|
|
\&\s-1GNU\s0 dialect of \s-1ISO\s0 C90 (including some C99 features). This
|
1509 |
|
|
is the default for C code.
|
1510 |
|
|
.IP "\fBgnu99\fR" 4
|
1511 |
|
|
.IX Item "gnu99"
|
1512 |
|
|
.PD 0
|
1513 |
|
|
.IP "\fBgnu9x\fR" 4
|
1514 |
|
|
.IX Item "gnu9x"
|
1515 |
|
|
.PD
|
1516 |
|
|
\&\s-1GNU\s0 dialect of \s-1ISO\s0 C99. When \s-1ISO\s0 C99 is fully implemented in \s-1GCC\s0,
|
1517 |
|
|
this will become the default. The name \fBgnu9x\fR is deprecated.
|
1518 |
|
|
.IP "\fBc++98\fR" 4
|
1519 |
|
|
.IX Item "c++98"
|
1520 |
|
|
The 1998 \s-1ISO\s0 \*(C+ standard plus amendments. Same as \fB\-ansi\fR for
|
1521 |
|
|
\&\*(C+ code.
|
1522 |
|
|
.IP "\fBgnu++98\fR" 4
|
1523 |
|
|
.IX Item "gnu++98"
|
1524 |
|
|
\&\s-1GNU\s0 dialect of \fB\-std=c++98\fR. This is the default for
|
1525 |
|
|
\&\*(C+ code.
|
1526 |
|
|
.IP "\fBc++0x\fR" 4
|
1527 |
|
|
.IX Item "c++0x"
|
1528 |
|
|
The working draft of the upcoming \s-1ISO\s0 \*(C+0x standard. This option
|
1529 |
|
|
enables experimental features that are likely to be included in
|
1530 |
|
|
\&\*(C+0x. The working draft is constantly changing, and any feature that is
|
1531 |
|
|
enabled by this flag may be removed from future versions of \s-1GCC\s0 if it is
|
1532 |
|
|
not part of the \*(C+0x standard.
|
1533 |
|
|
.IP "\fBgnu++0x\fR" 4
|
1534 |
|
|
.IX Item "gnu++0x"
|
1535 |
|
|
\&\s-1GNU\s0 dialect of \fB\-std=c++0x\fR. This option enables
|
1536 |
|
|
experimental features that may be removed in future versions of \s-1GCC\s0.
|
1537 |
|
|
.RE
|
1538 |
|
|
.RS 4
|
1539 |
|
|
.RE
|
1540 |
|
|
.IP "\fB\-fgnu89\-inline\fR" 4
|
1541 |
|
|
.IX Item "-fgnu89-inline"
|
1542 |
|
|
The option \fB\-fgnu89\-inline\fR tells \s-1GCC\s0 to use the traditional
|
1543 |
|
|
\&\s-1GNU\s0 semantics for \f(CW\*(C`inline\*(C'\fR functions when in C99 mode.
|
1544 |
|
|
This option
|
1545 |
|
|
is accepted and ignored by \s-1GCC\s0 versions 4.1.3 up to but not including
|
1546 |
|
|
4.3. In \s-1GCC\s0 versions 4.3 and later it changes the behavior of \s-1GCC\s0 in
|
1547 |
|
|
C99 mode. Using this option is roughly equivalent to adding the
|
1548 |
|
|
\&\f(CW\*(C`gnu_inline\*(C'\fR function attribute to all inline functions.
|
1549 |
|
|
.Sp
|
1550 |
|
|
The option \fB\-fno\-gnu89\-inline\fR explicitly tells \s-1GCC\s0 to use the
|
1551 |
|
|
C99 semantics for \f(CW\*(C`inline\*(C'\fR when in C99 or gnu99 mode (i.e., it
|
1552 |
|
|
specifies the default behavior). This option was first supported in
|
1553 |
|
|
\&\s-1GCC\s0 4.3. This option is not supported in \fB\-std=c90\fR or
|
1554 |
|
|
\&\fB\-std=gnu90\fR mode.
|
1555 |
|
|
.Sp
|
1556 |
|
|
The preprocessor macros \f(CW\*(C`_\|_GNUC_GNU_INLINE_\|_\*(C'\fR and
|
1557 |
|
|
\&\f(CW\*(C`_\|_GNUC_STDC_INLINE_\|_\*(C'\fR may be used to check which semantics are
|
1558 |
|
|
in effect for \f(CW\*(C`inline\*(C'\fR functions.
|
1559 |
|
|
.IP "\fB\-aux\-info\fR \fIfilename\fR" 4
|
1560 |
|
|
.IX Item "-aux-info filename"
|
1561 |
|
|
Output to the given filename prototyped declarations for all functions
|
1562 |
|
|
declared and/or defined in a translation unit, including those in header
|
1563 |
|
|
files. This option is silently ignored in any language other than C.
|
1564 |
|
|
.Sp
|
1565 |
|
|
Besides declarations, the file indicates, in comments, the origin of
|
1566 |
|
|
each declaration (source file and line), whether the declaration was
|
1567 |
|
|
implicit, prototyped or unprototyped (\fBI\fR, \fBN\fR for new or
|
1568 |
|
|
\&\fBO\fR for old, respectively, in the first character after the line
|
1569 |
|
|
number and the colon), and whether it came from a declaration or a
|
1570 |
|
|
definition (\fBC\fR or \fBF\fR, respectively, in the following
|
1571 |
|
|
character). In the case of function definitions, a K&R\-style list of
|
1572 |
|
|
arguments followed by their declarations is also provided, inside
|
1573 |
|
|
comments, after the declaration.
|
1574 |
|
|
.IP "\fB\-fno\-asm\fR" 4
|
1575 |
|
|
.IX Item "-fno-asm"
|
1576 |
|
|
Do not recognize \f(CW\*(C`asm\*(C'\fR, \f(CW\*(C`inline\*(C'\fR or \f(CW\*(C`typeof\*(C'\fR as a
|
1577 |
|
|
keyword, so that code can use these words as identifiers. You can use
|
1578 |
|
|
the keywords \f(CW\*(C`_\|_asm_\|_\*(C'\fR, \f(CW\*(C`_\|_inline_\|_\*(C'\fR and \f(CW\*(C`_\|_typeof_\|_\*(C'\fR
|
1579 |
|
|
instead. \fB\-ansi\fR implies \fB\-fno\-asm\fR.
|
1580 |
|
|
.Sp
|
1581 |
|
|
In \*(C+, this switch only affects the \f(CW\*(C`typeof\*(C'\fR keyword, since
|
1582 |
|
|
\&\f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`inline\*(C'\fR are standard keywords. You may want to
|
1583 |
|
|
use the \fB\-fno\-gnu\-keywords\fR flag instead, which has the same
|
1584 |
|
|
effect. In C99 mode (\fB\-std=c99\fR or \fB\-std=gnu99\fR), this
|
1585 |
|
|
switch only affects the \f(CW\*(C`asm\*(C'\fR and \f(CW\*(C`typeof\*(C'\fR keywords, since
|
1586 |
|
|
\&\f(CW\*(C`inline\*(C'\fR is a standard keyword in \s-1ISO\s0 C99.
|
1587 |
|
|
.IP "\fB\-fno\-builtin\fR" 4
|
1588 |
|
|
.IX Item "-fno-builtin"
|
1589 |
|
|
.PD 0
|
1590 |
|
|
.IP "\fB\-fno\-builtin\-\fR\fIfunction\fR" 4
|
1591 |
|
|
.IX Item "-fno-builtin-function"
|
1592 |
|
|
.PD
|
1593 |
|
|
Don't recognize built-in functions that do not begin with
|
1594 |
|
|
\&\fB_\|_builtin_\fR as prefix.
|
1595 |
|
|
.Sp
|
1596 |
|
|
\&\s-1GCC\s0 normally generates special code to handle certain built-in functions
|
1597 |
|
|
more efficiently; for instance, calls to \f(CW\*(C`alloca\*(C'\fR may become single
|
1598 |
|
|
instructions that adjust the stack directly, and calls to \f(CW\*(C`memcpy\*(C'\fR
|
1599 |
|
|
may become inline copy loops. The resulting code is often both smaller
|
1600 |
|
|
and faster, but since the function calls no longer appear as such, you
|
1601 |
|
|
cannot set a breakpoint on those calls, nor can you change the behavior
|
1602 |
|
|
of the functions by linking with a different library. In addition,
|
1603 |
|
|
when a function is recognized as a built-in function, \s-1GCC\s0 may use
|
1604 |
|
|
information about that function to warn about problems with calls to
|
1605 |
|
|
that function, or to generate more efficient code, even if the
|
1606 |
|
|
resulting code still contains calls to that function. For example,
|
1607 |
|
|
warnings are given with \fB\-Wformat\fR for bad calls to
|
1608 |
|
|
\&\f(CW\*(C`printf\*(C'\fR, when \f(CW\*(C`printf\*(C'\fR is built in, and \f(CW\*(C`strlen\*(C'\fR is
|
1609 |
|
|
known not to modify global memory.
|
1610 |
|
|
.Sp
|
1611 |
|
|
With the \fB\-fno\-builtin\-\fR\fIfunction\fR option
|
1612 |
|
|
only the built-in function \fIfunction\fR is
|
1613 |
|
|
disabled. \fIfunction\fR must not begin with \fB_\|_builtin_\fR. If a
|
1614 |
|
|
function is named that is not built-in in this version of \s-1GCC\s0, this
|
1615 |
|
|
option is ignored. There is no corresponding
|
1616 |
|
|
\&\fB\-fbuiltin\-\fR\fIfunction\fR option; if you wish to enable
|
1617 |
|
|
built-in functions selectively when using \fB\-fno\-builtin\fR or
|
1618 |
|
|
\&\fB\-ffreestanding\fR, you may define macros such as:
|
1619 |
|
|
.Sp
|
1620 |
|
|
.Vb 2
|
1621 |
|
|
\& #define abs(n) _\|_builtin_abs ((n))
|
1622 |
|
|
\& #define strcpy(d, s) _\|_builtin_strcpy ((d), (s))
|
1623 |
|
|
.Ve
|
1624 |
|
|
.IP "\fB\-fhosted\fR" 4
|
1625 |
|
|
.IX Item "-fhosted"
|
1626 |
|
|
Assert that compilation takes place in a hosted environment. This implies
|
1627 |
|
|
\&\fB\-fbuiltin\fR. A hosted environment is one in which the
|
1628 |
|
|
entire standard library is available, and in which \f(CW\*(C`main\*(C'\fR has a return
|
1629 |
|
|
type of \f(CW\*(C`int\*(C'\fR. Examples are nearly everything except a kernel.
|
1630 |
|
|
This is equivalent to \fB\-fno\-freestanding\fR.
|
1631 |
|
|
.IP "\fB\-ffreestanding\fR" 4
|
1632 |
|
|
.IX Item "-ffreestanding"
|
1633 |
|
|
Assert that compilation takes place in a freestanding environment. This
|
1634 |
|
|
implies \fB\-fno\-builtin\fR. A freestanding environment
|
1635 |
|
|
is one in which the standard library may not exist, and program startup may
|
1636 |
|
|
not necessarily be at \f(CW\*(C`main\*(C'\fR. The most obvious example is an \s-1OS\s0 kernel.
|
1637 |
|
|
This is equivalent to \fB\-fno\-hosted\fR.
|
1638 |
|
|
.IP "\fB\-fopenmp\fR" 4
|
1639 |
|
|
.IX Item "-fopenmp"
|
1640 |
|
|
Enable handling of OpenMP directives \f(CW\*(C`#pragma omp\*(C'\fR in C/\*(C+ and
|
1641 |
|
|
\&\f(CW\*(C`!$omp\*(C'\fR in Fortran. When \fB\-fopenmp\fR is specified, the
|
1642 |
|
|
compiler generates parallel code according to the OpenMP Application
|
1643 |
|
|
Program Interface v3.0 <\fBhttp://www.openmp.org/\fR>. This option
|
1644 |
|
|
implies \fB\-pthread\fR, and thus is only supported on targets that
|
1645 |
|
|
have support for \fB\-pthread\fR.
|
1646 |
|
|
.IP "\fB\-fms\-extensions\fR" 4
|
1647 |
|
|
.IX Item "-fms-extensions"
|
1648 |
|
|
Accept some non-standard constructs used in Microsoft header files.
|
1649 |
|
|
.Sp
|
1650 |
|
|
Some cases of unnamed fields in structures and unions are only
|
1651 |
|
|
accepted with this option.
|
1652 |
|
|
.IP "\fB\-trigraphs\fR" 4
|
1653 |
|
|
.IX Item "-trigraphs"
|
1654 |
|
|
Support \s-1ISO\s0 C trigraphs. The \fB\-ansi\fR option (and \fB\-std\fR
|
1655 |
|
|
options for strict \s-1ISO\s0 C conformance) implies \fB\-trigraphs\fR.
|
1656 |
|
|
.IP "\fB\-no\-integrated\-cpp\fR" 4
|
1657 |
|
|
.IX Item "-no-integrated-cpp"
|
1658 |
|
|
Performs a compilation in two passes: preprocessing and compiling. This
|
1659 |
|
|
option allows a user supplied \*(L"cc1\*(R", \*(L"cc1plus\*(R", or \*(L"cc1obj\*(R" via the
|
1660 |
|
|
\&\fB\-B\fR option. The user supplied compilation step can then add in
|
1661 |
|
|
an additional preprocessing step after normal preprocessing but before
|
1662 |
|
|
compiling. The default is to use the integrated cpp (internal cpp)
|
1663 |
|
|
.Sp
|
1664 |
|
|
The semantics of this option will change if \*(L"cc1\*(R", \*(L"cc1plus\*(R", and
|
1665 |
|
|
\&\*(L"cc1obj\*(R" are merged.
|
1666 |
|
|
.IP "\fB\-traditional\fR" 4
|
1667 |
|
|
.IX Item "-traditional"
|
1668 |
|
|
.PD 0
|
1669 |
|
|
.IP "\fB\-traditional\-cpp\fR" 4
|
1670 |
|
|
.IX Item "-traditional-cpp"
|
1671 |
|
|
.PD
|
1672 |
|
|
Formerly, these options caused \s-1GCC\s0 to attempt to emulate a pre-standard
|
1673 |
|
|
C compiler. They are now only supported with the \fB\-E\fR switch.
|
1674 |
|
|
The preprocessor continues to support a pre-standard mode. See the \s-1GNU\s0
|
1675 |
|
|
\&\s-1CPP\s0 manual for details.
|
1676 |
|
|
.IP "\fB\-fcond\-mismatch\fR" 4
|
1677 |
|
|
.IX Item "-fcond-mismatch"
|
1678 |
|
|
Allow conditional expressions with mismatched types in the second and
|
1679 |
|
|
third arguments. The value of such an expression is void. This option
|
1680 |
|
|
is not supported for \*(C+.
|
1681 |
|
|
.IP "\fB\-flax\-vector\-conversions\fR" 4
|
1682 |
|
|
.IX Item "-flax-vector-conversions"
|
1683 |
|
|
Allow implicit conversions between vectors with differing numbers of
|
1684 |
|
|
elements and/or incompatible element types. This option should not be
|
1685 |
|
|
used for new code.
|
1686 |
|
|
.IP "\fB\-funsigned\-char\fR" 4
|
1687 |
|
|
.IX Item "-funsigned-char"
|
1688 |
|
|
Let the type \f(CW\*(C`char\*(C'\fR be unsigned, like \f(CW\*(C`unsigned char\*(C'\fR.
|
1689 |
|
|
.Sp
|
1690 |
|
|
Each kind of machine has a default for what \f(CW\*(C`char\*(C'\fR should
|
1691 |
|
|
be. It is either like \f(CW\*(C`unsigned char\*(C'\fR by default or like
|
1692 |
|
|
\&\f(CW\*(C`signed char\*(C'\fR by default.
|
1693 |
|
|
.Sp
|
1694 |
|
|
Ideally, a portable program should always use \f(CW\*(C`signed char\*(C'\fR or
|
1695 |
|
|
\&\f(CW\*(C`unsigned char\*(C'\fR when it depends on the signedness of an object.
|
1696 |
|
|
But many programs have been written to use plain \f(CW\*(C`char\*(C'\fR and
|
1697 |
|
|
expect it to be signed, or expect it to be unsigned, depending on the
|
1698 |
|
|
machines they were written for. This option, and its inverse, let you
|
1699 |
|
|
make such a program work with the opposite default.
|
1700 |
|
|
.Sp
|
1701 |
|
|
The type \f(CW\*(C`char\*(C'\fR is always a distinct type from each of
|
1702 |
|
|
\&\f(CW\*(C`signed char\*(C'\fR or \f(CW\*(C`unsigned char\*(C'\fR, even though its behavior
|
1703 |
|
|
is always just like one of those two.
|
1704 |
|
|
.IP "\fB\-fsigned\-char\fR" 4
|
1705 |
|
|
.IX Item "-fsigned-char"
|
1706 |
|
|
Let the type \f(CW\*(C`char\*(C'\fR be signed, like \f(CW\*(C`signed char\*(C'\fR.
|
1707 |
|
|
.Sp
|
1708 |
|
|
Note that this is equivalent to \fB\-fno\-unsigned\-char\fR, which is
|
1709 |
|
|
the negative form of \fB\-funsigned\-char\fR. Likewise, the option
|
1710 |
|
|
\&\fB\-fno\-signed\-char\fR is equivalent to \fB\-funsigned\-char\fR.
|
1711 |
|
|
.IP "\fB\-fsigned\-bitfields\fR" 4
|
1712 |
|
|
.IX Item "-fsigned-bitfields"
|
1713 |
|
|
.PD 0
|
1714 |
|
|
.IP "\fB\-funsigned\-bitfields\fR" 4
|
1715 |
|
|
.IX Item "-funsigned-bitfields"
|
1716 |
|
|
.IP "\fB\-fno\-signed\-bitfields\fR" 4
|
1717 |
|
|
.IX Item "-fno-signed-bitfields"
|
1718 |
|
|
.IP "\fB\-fno\-unsigned\-bitfields\fR" 4
|
1719 |
|
|
.IX Item "-fno-unsigned-bitfields"
|
1720 |
|
|
.PD
|
1721 |
|
|
These options control whether a bit-field is signed or unsigned, when the
|
1722 |
|
|
declaration does not use either \f(CW\*(C`signed\*(C'\fR or \f(CW\*(C`unsigned\*(C'\fR. By
|
1723 |
|
|
default, such a bit-field is signed, because this is consistent: the
|
1724 |
|
|
basic integer types such as \f(CW\*(C`int\*(C'\fR are signed types.
|
1725 |
|
|
.Sh "Options Controlling \*(C+ Dialect"
|
1726 |
|
|
.IX Subsection "Options Controlling Dialect"
|
1727 |
|
|
This section describes the command-line options that are only meaningful
|
1728 |
|
|
for \*(C+ programs; but you can also use most of the \s-1GNU\s0 compiler options
|
1729 |
|
|
regardless of what language your program is in. For example, you
|
1730 |
|
|
might compile a file \f(CW\*(C`firstClass.C\*(C'\fR like this:
|
1731 |
|
|
.PP
|
1732 |
|
|
.Vb 1
|
1733 |
|
|
\& g++ \-g \-frepo \-O \-c firstClass.C
|
1734 |
|
|
.Ve
|
1735 |
|
|
.PP
|
1736 |
|
|
In this example, only \fB\-frepo\fR is an option meant
|
1737 |
|
|
only for \*(C+ programs; you can use the other options with any
|
1738 |
|
|
language supported by \s-1GCC\s0.
|
1739 |
|
|
.PP
|
1740 |
|
|
Here is a list of options that are \fIonly\fR for compiling \*(C+ programs:
|
1741 |
|
|
.IP "\fB\-fabi\-version=\fR\fIn\fR" 4
|
1742 |
|
|
.IX Item "-fabi-version=n"
|
1743 |
|
|
Use version \fIn\fR of the \*(C+ \s-1ABI\s0. Version 2 is the version of the
|
1744 |
|
|
\&\*(C+ \s-1ABI\s0 that first appeared in G++ 3.4. Version 1 is the version of
|
1745 |
|
|
the \*(C+ \s-1ABI\s0 that first appeared in G++ 3.2. Version 0 will always be
|
1746 |
|
|
the version that conforms most closely to the \*(C+ \s-1ABI\s0 specification.
|
1747 |
|
|
Therefore, the \s-1ABI\s0 obtained using version 0 will change as \s-1ABI\s0 bugs
|
1748 |
|
|
are fixed.
|
1749 |
|
|
.Sp
|
1750 |
|
|
The default is version 2.
|
1751 |
|
|
.Sp
|
1752 |
|
|
Version 3 corrects an error in mangling a constant address as a
|
1753 |
|
|
template argument.
|
1754 |
|
|
.Sp
|
1755 |
|
|
Version 4 implements a standard mangling for vector types.
|
1756 |
|
|
.Sp
|
1757 |
|
|
See also \fB\-Wabi\fR.
|
1758 |
|
|
.IP "\fB\-fno\-access\-control\fR" 4
|
1759 |
|
|
.IX Item "-fno-access-control"
|
1760 |
|
|
Turn off all access checking. This switch is mainly useful for working
|
1761 |
|
|
around bugs in the access control code.
|
1762 |
|
|
.IP "\fB\-fcheck\-new\fR" 4
|
1763 |
|
|
.IX Item "-fcheck-new"
|
1764 |
|
|
Check that the pointer returned by \f(CW\*(C`operator new\*(C'\fR is non-null
|
1765 |
|
|
before attempting to modify the storage allocated. This check is
|
1766 |
|
|
normally unnecessary because the \*(C+ standard specifies that
|
1767 |
|
|
\&\f(CW\*(C`operator new\*(C'\fR will only return \f(CW0\fR if it is declared
|
1768 |
|
|
\&\fB\f(BIthrow()\fB\fR, in which case the compiler will always check the
|
1769 |
|
|
return value even without this option. In all other cases, when
|
1770 |
|
|
\&\f(CW\*(C`operator new\*(C'\fR has a non-empty exception specification, memory
|
1771 |
|
|
exhaustion is signalled by throwing \f(CW\*(C`std::bad_alloc\*(C'\fR. See also
|
1772 |
|
|
\&\fBnew (nothrow)\fR.
|
1773 |
|
|
.IP "\fB\-fconserve\-space\fR" 4
|
1774 |
|
|
.IX Item "-fconserve-space"
|
1775 |
|
|
Put uninitialized or runtime-initialized global variables into the
|
1776 |
|
|
common segment, as C does. This saves space in the executable at the
|
1777 |
|
|
cost of not diagnosing duplicate definitions. If you compile with this
|
1778 |
|
|
flag and your program mysteriously crashes after \f(CW\*(C`main()\*(C'\fR has
|
1779 |
|
|
completed, you may have an object that is being destroyed twice because
|
1780 |
|
|
two definitions were merged.
|
1781 |
|
|
.Sp
|
1782 |
|
|
This option is no longer useful on most targets, now that support has
|
1783 |
|
|
been added for putting variables into \s-1BSS\s0 without making them common.
|
1784 |
|
|
.IP "\fB\-fno\-deduce\-init\-list\fR" 4
|
1785 |
|
|
.IX Item "-fno-deduce-init-list"
|
1786 |
|
|
Disable deduction of a template type parameter as
|
1787 |
|
|
std::initializer_list from a brace-enclosed initializer list, i.e.
|
1788 |
|
|
.Sp
|
1789 |
|
|
.Vb 4
|
1790 |
|
|
\& template auto forward(T t) \-> decltype (realfn (t))
|
1791 |
|
|
\& {
|
1792 |
|
|
\& return realfn (t);
|
1793 |
|
|
\& }
|
1794 |
|
|
\&
|
1795 |
|
|
\& void f()
|
1796 |
|
|
\& {
|
1797 |
|
|
\& forward({1,2}); // call forward>
|
1798 |
|
|
\& }
|
1799 |
|
|
.Ve
|
1800 |
|
|
.Sp
|
1801 |
|
|
This option is present because this deduction is an extension to the
|
1802 |
|
|
current specification in the \*(C+0x working draft, and there was
|
1803 |
|
|
some concern about potential overload resolution problems.
|
1804 |
|
|
.IP "\fB\-ffriend\-injection\fR" 4
|
1805 |
|
|
.IX Item "-ffriend-injection"
|
1806 |
|
|
Inject friend functions into the enclosing namespace, so that they are
|
1807 |
|
|
visible outside the scope of the class in which they are declared.
|
1808 |
|
|
Friend functions were documented to work this way in the old Annotated
|
1809 |
|
|
\&\*(C+ Reference Manual, and versions of G++ before 4.1 always worked
|
1810 |
|
|
that way. However, in \s-1ISO\s0 \*(C+ a friend function which is not declared
|
1811 |
|
|
in an enclosing scope can only be found using argument dependent
|
1812 |
|
|
lookup. This option causes friends to be injected as they were in
|
1813 |
|
|
earlier releases.
|
1814 |
|
|
.Sp
|
1815 |
|
|
This option is for compatibility, and may be removed in a future
|
1816 |
|
|
release of G++.
|
1817 |
|
|
.IP "\fB\-fno\-elide\-constructors\fR" 4
|
1818 |
|
|
.IX Item "-fno-elide-constructors"
|
1819 |
|
|
The \*(C+ standard allows an implementation to omit creating a temporary
|
1820 |
|
|
which is only used to initialize another object of the same type.
|
1821 |
|
|
Specifying this option disables that optimization, and forces G++ to
|
1822 |
|
|
call the copy constructor in all cases.
|
1823 |
|
|
.IP "\fB\-fno\-enforce\-eh\-specs\fR" 4
|
1824 |
|
|
.IX Item "-fno-enforce-eh-specs"
|
1825 |
|
|
Don't generate code to check for violation of exception specifications
|
1826 |
|
|
at runtime. This option violates the \*(C+ standard, but may be useful
|
1827 |
|
|
for reducing code size in production builds, much like defining
|
1828 |
|
|
\&\fB\s-1NDEBUG\s0\fR. This does not give user code permission to throw
|
1829 |
|
|
exceptions in violation of the exception specifications; the compiler
|
1830 |
|
|
will still optimize based on the specifications, so throwing an
|
1831 |
|
|
unexpected exception will result in undefined behavior.
|
1832 |
|
|
.IP "\fB\-ffor\-scope\fR" 4
|
1833 |
|
|
.IX Item "-ffor-scope"
|
1834 |
|
|
.PD 0
|
1835 |
|
|
.IP "\fB\-fno\-for\-scope\fR" 4
|
1836 |
|
|
.IX Item "-fno-for-scope"
|
1837 |
|
|
.PD
|
1838 |
|
|
If \fB\-ffor\-scope\fR is specified, the scope of variables declared in
|
1839 |
|
|
a \fIfor-init-statement\fR is limited to the \fBfor\fR loop itself,
|
1840 |
|
|
as specified by the \*(C+ standard.
|
1841 |
|
|
If \fB\-fno\-for\-scope\fR is specified, the scope of variables declared in
|
1842 |
|
|
a \fIfor-init-statement\fR extends to the end of the enclosing scope,
|
1843 |
|
|
as was the case in old versions of G++, and other (traditional)
|
1844 |
|
|
implementations of \*(C+.
|
1845 |
|
|
.Sp
|
1846 |
|
|
The default if neither flag is given to follow the standard,
|
1847 |
|
|
but to allow and give a warning for old-style code that would
|
1848 |
|
|
otherwise be invalid, or have different behavior.
|
1849 |
|
|
.IP "\fB\-fno\-gnu\-keywords\fR" 4
|
1850 |
|
|
.IX Item "-fno-gnu-keywords"
|
1851 |
|
|
Do not recognize \f(CW\*(C`typeof\*(C'\fR as a keyword, so that code can use this
|
1852 |
|
|
word as an identifier. You can use the keyword \f(CW\*(C`_\|_typeof_\|_\*(C'\fR instead.
|
1853 |
|
|
\&\fB\-ansi\fR implies \fB\-fno\-gnu\-keywords\fR.
|
1854 |
|
|
.IP "\fB\-fno\-implicit\-templates\fR" 4
|
1855 |
|
|
.IX Item "-fno-implicit-templates"
|
1856 |
|
|
Never emit code for non-inline templates which are instantiated
|
1857 |
|
|
implicitly (i.e. by use); only emit code for explicit instantiations.
|
1858 |
|
|
.IP "\fB\-fno\-implicit\-inline\-templates\fR" 4
|
1859 |
|
|
.IX Item "-fno-implicit-inline-templates"
|
1860 |
|
|
Don't emit code for implicit instantiations of inline templates, either.
|
1861 |
|
|
The default is to handle inlines differently so that compiles with and
|
1862 |
|
|
without optimization will need the same set of explicit instantiations.
|
1863 |
|
|
.IP "\fB\-fno\-implement\-inlines\fR" 4
|
1864 |
|
|
.IX Item "-fno-implement-inlines"
|
1865 |
|
|
To save space, do not emit out-of-line copies of inline functions
|
1866 |
|
|
controlled by \fB#pragma implementation\fR. This will cause linker
|
1867 |
|
|
errors if these functions are not inlined everywhere they are called.
|
1868 |
|
|
.IP "\fB\-fms\-extensions\fR" 4
|
1869 |
|
|
.IX Item "-fms-extensions"
|
1870 |
|
|
Disable pedantic warnings about constructs used in \s-1MFC\s0, such as implicit
|
1871 |
|
|
int and getting a pointer to member function via non-standard syntax.
|
1872 |
|
|
.IP "\fB\-fno\-nonansi\-builtins\fR" 4
|
1873 |
|
|
.IX Item "-fno-nonansi-builtins"
|
1874 |
|
|
Disable built-in declarations of functions that are not mandated by
|
1875 |
|
|
\&\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,
|
1876 |
|
|
\&\f(CW\*(C`index\*(C'\fR, \f(CW\*(C`bzero\*(C'\fR, \f(CW\*(C`conjf\*(C'\fR, and other related functions.
|
1877 |
|
|
.IP "\fB\-fno\-operator\-names\fR" 4
|
1878 |
|
|
.IX Item "-fno-operator-names"
|
1879 |
|
|
Do not treat the operator name keywords \f(CW\*(C`and\*(C'\fR, \f(CW\*(C`bitand\*(C'\fR,
|
1880 |
|
|
\&\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
|
1881 |
|
|
synonyms as keywords.
|
1882 |
|
|
.IP "\fB\-fno\-optional\-diags\fR" 4
|
1883 |
|
|
.IX Item "-fno-optional-diags"
|
1884 |
|
|
Disable diagnostics that the standard says a compiler does not need to
|
1885 |
|
|
issue. Currently, the only such diagnostic issued by G++ is the one for
|
1886 |
|
|
a name having multiple meanings within a class.
|
1887 |
|
|
.IP "\fB\-fpermissive\fR" 4
|
1888 |
|
|
.IX Item "-fpermissive"
|
1889 |
|
|
Downgrade some diagnostics about nonconformant code from errors to
|
1890 |
|
|
warnings. Thus, using \fB\-fpermissive\fR will allow some
|
1891 |
|
|
nonconforming code to compile.
|
1892 |
|
|
.IP "\fB\-fno\-pretty\-templates\fR" 4
|
1893 |
|
|
.IX Item "-fno-pretty-templates"
|
1894 |
|
|
When an error message refers to a specialization of a function
|
1895 |
|
|
template, the compiler will normally print the signature of the
|
1896 |
|
|
template followed by the template arguments and any typedefs or
|
1897 |
|
|
typenames in the signature (e.g. \f(CW\*(C`void f(T) [with T = int]\*(C'\fR
|
1898 |
|
|
rather than \f(CW\*(C`void f(int)\*(C'\fR) so that it's clear which template is
|
1899 |
|
|
involved. When an error message refers to a specialization of a class
|
1900 |
|
|
template, the compiler will omit any template arguments which match
|
1901 |
|
|
the default template arguments for that template. If either of these
|
1902 |
|
|
behaviors make it harder to understand the error message rather than
|
1903 |
|
|
easier, using \fB\-fno\-pretty\-templates\fR will disable them.
|
1904 |
|
|
.IP "\fB\-frepo\fR" 4
|
1905 |
|
|
.IX Item "-frepo"
|
1906 |
|
|
Enable automatic template instantiation at link time. This option also
|
1907 |
|
|
implies \fB\-fno\-implicit\-templates\fR.
|
1908 |
|
|
.IP "\fB\-fno\-rtti\fR" 4
|
1909 |
|
|
.IX Item "-fno-rtti"
|
1910 |
|
|
Disable generation of information about every class with virtual
|
1911 |
|
|
functions for use by the \*(C+ runtime type identification features
|
1912 |
|
|
(\fBdynamic_cast\fR and \fBtypeid\fR). If you don't use those parts
|
1913 |
|
|
of the language, you can save some space by using this flag. Note that
|
1914 |
|
|
exception handling uses the same information, but it will generate it as
|
1915 |
|
|
needed. The \fBdynamic_cast\fR operator can still be used for casts that
|
1916 |
|
|
do not require runtime type information, i.e. casts to \f(CW\*(C`void *\*(C'\fR or to
|
1917 |
|
|
unambiguous base classes.
|
1918 |
|
|
.IP "\fB\-fstats\fR" 4
|
1919 |
|
|
.IX Item "-fstats"
|
1920 |
|
|
Emit statistics about front-end processing at the end of the compilation.
|
1921 |
|
|
This information is generally only useful to the G++ development team.
|
1922 |
|
|
.IP "\fB\-ftemplate\-depth=\fR\fIn\fR" 4
|
1923 |
|
|
.IX Item "-ftemplate-depth=n"
|
1924 |
|
|
Set the maximum instantiation depth for template classes to \fIn\fR.
|
1925 |
|
|
A limit on the template instantiation depth is needed to detect
|
1926 |
|
|
endless recursions during template class instantiation. \s-1ANSI/ISO\s0 \*(C+
|
1927 |
|
|
conforming programs must not rely on a maximum depth greater than 17
|
1928 |
|
|
(changed to 1024 in \*(C+0x).
|
1929 |
|
|
.IP "\fB\-fno\-threadsafe\-statics\fR" 4
|
1930 |
|
|
.IX Item "-fno-threadsafe-statics"
|
1931 |
|
|
Do not emit the extra code to use the routines specified in the \*(C+
|
1932 |
|
|
\&\s-1ABI\s0 for thread-safe initialization of local statics. You can use this
|
1933 |
|
|
option to reduce code size slightly in code that doesn't need to be
|
1934 |
|
|
thread-safe.
|
1935 |
|
|
.IP "\fB\-fuse\-cxa\-atexit\fR" 4
|
1936 |
|
|
.IX Item "-fuse-cxa-atexit"
|
1937 |
|
|
Register destructors for objects with static storage duration with the
|
1938 |
|
|
\&\f(CW\*(C`_\|_cxa_atexit\*(C'\fR function rather than the \f(CW\*(C`atexit\*(C'\fR function.
|
1939 |
|
|
This option is required for fully standards-compliant handling of static
|
1940 |
|
|
destructors, but will only work if your C library supports
|
1941 |
|
|
\&\f(CW\*(C`_\|_cxa_atexit\*(C'\fR.
|
1942 |
|
|
.IP "\fB\-fno\-use\-cxa\-get\-exception\-ptr\fR" 4
|
1943 |
|
|
.IX Item "-fno-use-cxa-get-exception-ptr"
|
1944 |
|
|
Don't use the \f(CW\*(C`_\|_cxa_get_exception_ptr\*(C'\fR runtime routine. This
|
1945 |
|
|
will cause \f(CW\*(C`std::uncaught_exception\*(C'\fR to be incorrect, but is necessary
|
1946 |
|
|
if the runtime routine is not available.
|
1947 |
|
|
.IP "\fB\-fvisibility\-inlines\-hidden\fR" 4
|
1948 |
|
|
.IX Item "-fvisibility-inlines-hidden"
|
1949 |
|
|
This switch declares that the user does not attempt to compare
|
1950 |
|
|
pointers to inline methods where the addresses of the two functions
|
1951 |
|
|
were taken in different shared objects.
|
1952 |
|
|
.Sp
|
1953 |
|
|
The effect of this is that \s-1GCC\s0 may, effectively, mark inline methods with
|
1954 |
|
|
\&\f(CW\*(C`_\|_attribute_\|_ ((visibility ("hidden")))\*(C'\fR so that they do not
|
1955 |
|
|
appear in the export table of a \s-1DSO\s0 and do not require a \s-1PLT\s0 indirection
|
1956 |
|
|
when used within the \s-1DSO\s0. Enabling this option can have a dramatic effect
|
1957 |
|
|
on load and link times of a \s-1DSO\s0 as it massively reduces the size of the
|
1958 |
|
|
dynamic export table when the library makes heavy use of templates.
|
1959 |
|
|
.Sp
|
1960 |
|
|
The behavior of this switch is not quite the same as marking the
|
1961 |
|
|
methods as hidden directly, because it does not affect static variables
|
1962 |
|
|
local to the function or cause the compiler to deduce that
|
1963 |
|
|
the function is defined in only one shared object.
|
1964 |
|
|
.Sp
|
1965 |
|
|
You may mark a method as having a visibility explicitly to negate the
|
1966 |
|
|
effect of the switch for that method. For example, if you do want to
|
1967 |
|
|
compare pointers to a particular inline method, you might mark it as
|
1968 |
|
|
having default visibility. Marking the enclosing class with explicit
|
1969 |
|
|
visibility will have no effect.
|
1970 |
|
|
.Sp
|
1971 |
|
|
Explicitly instantiated inline methods are unaffected by this option
|
1972 |
|
|
as their linkage might otherwise cross a shared library boundary.
|
1973 |
|
|
.IP "\fB\-fvisibility\-ms\-compat\fR" 4
|
1974 |
|
|
.IX Item "-fvisibility-ms-compat"
|
1975 |
|
|
This flag attempts to use visibility settings to make \s-1GCC\s0's \*(C+
|
1976 |
|
|
linkage model compatible with that of Microsoft Visual Studio.
|
1977 |
|
|
.Sp
|
1978 |
|
|
The flag makes these changes to \s-1GCC\s0's linkage model:
|
1979 |
|
|
.RS 4
|
1980 |
|
|
.IP "1." 4
|
1981 |
|
|
It sets the default visibility to \f(CW\*(C`hidden\*(C'\fR, like
|
1982 |
|
|
\&\fB\-fvisibility=hidden\fR.
|
1983 |
|
|
.IP "2." 4
|
1984 |
|
|
Types, but not their members, are not hidden by default.
|
1985 |
|
|
.IP "3." 4
|
1986 |
|
|
The One Definition Rule is relaxed for types without explicit
|
1987 |
|
|
visibility specifications which are defined in more than one different
|
1988 |
|
|
shared object: those declarations are permitted if they would have
|
1989 |
|
|
been permitted when this option was not used.
|
1990 |
|
|
.RE
|
1991 |
|
|
.RS 4
|
1992 |
|
|
.Sp
|
1993 |
|
|
In new code it is better to use \fB\-fvisibility=hidden\fR and
|
1994 |
|
|
export those classes which are intended to be externally visible.
|
1995 |
|
|
Unfortunately it is possible for code to rely, perhaps accidentally,
|
1996 |
|
|
on the Visual Studio behavior.
|
1997 |
|
|
.Sp
|
1998 |
|
|
Among the consequences of these changes are that static data members
|
1999 |
|
|
of the same type with the same name but defined in different shared
|
2000 |
|
|
objects will be different, so changing one will not change the other;
|
2001 |
|
|
and that pointers to function members defined in different shared
|
2002 |
|
|
objects may not compare equal. When this flag is given, it is a
|
2003 |
|
|
violation of the \s-1ODR\s0 to define types with the same name differently.
|
2004 |
|
|
.RE
|
2005 |
|
|
.IP "\fB\-fno\-weak\fR" 4
|
2006 |
|
|
.IX Item "-fno-weak"
|
2007 |
|
|
Do not use weak symbol support, even if it is provided by the linker.
|
2008 |
|
|
By default, G++ will use weak symbols if they are available. This
|
2009 |
|
|
option exists only for testing, and should not be used by end-users;
|
2010 |
|
|
it will result in inferior code and has no benefits. This option may
|
2011 |
|
|
be removed in a future release of G++.
|
2012 |
|
|
.IP "\fB\-nostdinc++\fR" 4
|
2013 |
|
|
.IX Item "-nostdinc++"
|
2014 |
|
|
Do not search for header files in the standard directories specific to
|
2015 |
|
|
\&\*(C+, but do still search the other standard directories. (This option
|
2016 |
|
|
is used when building the \*(C+ library.)
|
2017 |
|
|
.PP
|
2018 |
|
|
In addition, these optimization, warning, and code generation options
|
2019 |
|
|
have meanings only for \*(C+ programs:
|
2020 |
|
|
.IP "\fB\-fno\-default\-inline\fR" 4
|
2021 |
|
|
.IX Item "-fno-default-inline"
|
2022 |
|
|
Do not assume \fBinline\fR for functions defined inside a class scope.
|
2023 |
|
|
Note that these
|
2024 |
|
|
functions will have linkage like inline functions; they just won't be
|
2025 |
|
|
inlined by default.
|
2026 |
|
|
.IP "\fB\-Wabi\fR (C, Objective-C, \*(C+ and Objective\-\*(C+ only)" 4
|
2027 |
|
|
.IX Item "-Wabi (C, Objective-C, and Objective- only)"
|
2028 |
|
|
Warn when G++ generates code that is probably not compatible with the
|
2029 |
|
|
vendor-neutral \*(C+ \s-1ABI\s0. Although an effort has been made to warn about
|
2030 |
|
|
all such cases, there are probably some cases that are not warned about,
|
2031 |
|
|
even though G++ is generating incompatible code. There may also be
|
2032 |
|
|
cases where warnings are emitted even though the code that is generated
|
2033 |
|
|
will be compatible.
|
2034 |
|
|
.Sp
|
2035 |
|
|
You should rewrite your code to avoid these warnings if you are
|
2036 |
|
|
concerned about the fact that code generated by G++ may not be binary
|
2037 |
|
|
compatible with code generated by other compilers.
|
2038 |
|
|
.Sp
|
2039 |
|
|
The known incompatibilities in \fB\-fabi\-version=2\fR (the default) include:
|
2040 |
|
|
.RS 4
|
2041 |
|
|
.IP "\(bu" 4
|
2042 |
|
|
A template with a non-type template parameter of reference type is
|
2043 |
|
|
mangled incorrectly:
|
2044 |
|
|
.Sp
|
2045 |
|
|
.Vb 3
|
2046 |
|
|
\& extern int N;
|
2047 |
|
|
\& template struct S {};
|
2048 |
|
|
\& void n (S) {2}
|
2049 |
|
|
.Ve
|
2050 |
|
|
.Sp
|
2051 |
|
|
This is fixed in \fB\-fabi\-version=3\fR.
|
2052 |
|
|
.IP "\(bu" 4
|
2053 |
|
|
\&\s-1SIMD\s0 vector types declared using \f(CW\*(C`_\|_attribute ((vector_size))\*(C'\fR are
|
2054 |
|
|
mangled in a non-standard way that does not allow for overloading of
|
2055 |
|
|
functions taking vectors of different sizes.
|
2056 |
|
|
.Sp
|
2057 |
|
|
The mangling is changed in \fB\-fabi\-version=4\fR.
|
2058 |
|
|
.RE
|
2059 |
|
|
.RS 4
|
2060 |
|
|
.Sp
|
2061 |
|
|
The known incompatibilities in \fB\-fabi\-version=1\fR include:
|
2062 |
|
|
.IP "\(bu" 4
|
2063 |
|
|
Incorrect handling of tail-padding for bit-fields. G++ may attempt to
|
2064 |
|
|
pack data into the same byte as a base class. For example:
|
2065 |
|
|
.Sp
|
2066 |
|
|
.Vb 2
|
2067 |
|
|
\& struct A { virtual void f(); int f1 : 1; };
|
2068 |
|
|
\& struct B : public A { int f2 : 1; };
|
2069 |
|
|
.Ve
|
2070 |
|
|
.Sp
|
2071 |
|
|
In this case, G++ will place \f(CW\*(C`B::f2\*(C'\fR into the same byte
|
2072 |
|
|
as\f(CW\*(C`A::f1\*(C'\fR; other compilers will not. You can avoid this problem
|
2073 |
|
|
by explicitly padding \f(CW\*(C`A\*(C'\fR so that its size is a multiple of the
|
2074 |
|
|
byte size on your platform; that will cause G++ and other compilers to
|
2075 |
|
|
layout \f(CW\*(C`B\*(C'\fR identically.
|
2076 |
|
|
.IP "\(bu" 4
|
2077 |
|
|
Incorrect handling of tail-padding for virtual bases. G++ does not use
|
2078 |
|
|
tail padding when laying out virtual bases. For example:
|
2079 |
|
|
.Sp
|
2080 |
|
|
.Vb 3
|
2081 |
|
|
\& struct A { virtual void f(); char c1; };
|
2082 |
|
|
\& struct B { B(); char c2; };
|
2083 |
|
|
\& struct C : public A, public virtual B {};
|
2084 |
|
|
.Ve
|
2085 |
|
|
.Sp
|
2086 |
|
|
In this case, G++ will not place \f(CW\*(C`B\*(C'\fR into the tail-padding for
|
2087 |
|
|
\&\f(CW\*(C`A\*(C'\fR; other compilers will. You can avoid this problem by
|
2088 |
|
|
explicitly padding \f(CW\*(C`A\*(C'\fR so that its size is a multiple of its
|
2089 |
|
|
alignment (ignoring virtual base classes); that will cause G++ and other
|
2090 |
|
|
compilers to layout \f(CW\*(C`C\*(C'\fR identically.
|
2091 |
|
|
.IP "\(bu" 4
|
2092 |
|
|
Incorrect handling of bit-fields with declared widths greater than that
|
2093 |
|
|
of their underlying types, when the bit-fields appear in a union. For
|
2094 |
|
|
example:
|
2095 |
|
|
.Sp
|
2096 |
|
|
.Vb 1
|
2097 |
|
|
\& union U { int i : 4096; };
|
2098 |
|
|
.Ve
|
2099 |
|
|
.Sp
|
2100 |
|
|
Assuming that an \f(CW\*(C`int\*(C'\fR does not have 4096 bits, G++ will make the
|
2101 |
|
|
union too small by the number of bits in an \f(CW\*(C`int\*(C'\fR.
|
2102 |
|
|
.IP "\(bu" 4
|
2103 |
|
|
Empty classes can be placed at incorrect offsets. For example:
|
2104 |
|
|
.Sp
|
2105 |
|
|
.Vb 1
|
2106 |
|
|
\& struct A {};
|
2107 |
|
|
\&
|
2108 |
|
|
\& struct B {
|
2109 |
|
|
\& A a;
|
2110 |
|
|
\& virtual void f ();
|
2111 |
|
|
\& };
|
2112 |
|
|
\&
|
2113 |
|
|
\& struct C : public B, public A {};
|
2114 |
|
|
.Ve
|
2115 |
|
|
.Sp
|
2116 |
|
|
G++ will place the \f(CW\*(C`A\*(C'\fR base class of \f(CW\*(C`C\*(C'\fR at a nonzero offset;
|
2117 |
|
|
it should be placed at offset zero. G++ mistakenly believes that the
|
2118 |
|
|
\&\f(CW\*(C`A\*(C'\fR data member of \f(CW\*(C`B\*(C'\fR is already at offset zero.
|
2119 |
|
|
.IP "\(bu" 4
|
2120 |
|
|
Names of template functions whose types involve \f(CW\*(C`typename\*(C'\fR or
|
2121 |
|
|
template template parameters can be mangled incorrectly.
|
2122 |
|
|
.Sp
|
2123 |
|
|
.Vb 2
|
2124 |
|
|
\& template
|
2125 |
|
|
\& void f(typename Q::X) {}
|
2126 |
|
|
\&
|
2127 |
|
|
\& template class Q>
|
2128 |
|
|
\& void f(typename Q::X) {}
|
2129 |
|
|
.Ve
|
2130 |
|
|
.Sp
|
2131 |
|
|
Instantiations of these templates may be mangled incorrectly.
|
2132 |
|
|
.RE
|
2133 |
|
|
.RS 4
|
2134 |
|
|
.Sp
|
2135 |
|
|
It also warns psABI related changes. The known psABI changes at this
|
2136 |
|
|
point include:
|
2137 |
|
|
.IP "\(bu" 4
|
2138 |
|
|
For SYSV/x86\-64, when passing union with long double, it is changed to
|
2139 |
|
|
pass in memory as specified in psABI. For example:
|
2140 |
|
|
.Sp
|
2141 |
|
|
.Vb 4
|
2142 |
|
|
\& union U {
|
2143 |
|
|
\& long double ld;
|
2144 |
|
|
\& int i;
|
2145 |
|
|
\& };
|
2146 |
|
|
.Ve
|
2147 |
|
|
.Sp
|
2148 |
|
|
\&\f(CW\*(C`union U\*(C'\fR will always be passed in memory.
|
2149 |
|
|
.RE
|
2150 |
|
|
.RS 4
|
2151 |
|
|
.RE
|
2152 |
|
|
.IP "\fB\-Wctor\-dtor\-privacy\fR (\*(C+ and Objective\-\*(C+ only)" 4
|
2153 |
|
|
.IX Item "-Wctor-dtor-privacy ( and Objective- only)"
|
2154 |
|
|
Warn when a class seems unusable because all the constructors or
|
2155 |
|
|
destructors in that class are private, and it has neither friends nor
|
2156 |
|
|
public static member functions.
|
2157 |
|
|
.IP "\fB\-Wnon\-virtual\-dtor\fR (\*(C+ and Objective\-\*(C+ only)" 4
|
2158 |
|
|
.IX Item "-Wnon-virtual-dtor ( and Objective- only)"
|
2159 |
|
|
Warn when a class has virtual functions and accessible non-virtual
|
2160 |
|
|
destructor, in which case it would be possible but unsafe to delete
|
2161 |
|
|
an instance of a derived class through a pointer to the base class.
|
2162 |
|
|
This warning is also enabled if \-Weffc++ is specified.
|
2163 |
|
|
.IP "\fB\-Wreorder\fR (\*(C+ and Objective\-\*(C+ only)" 4
|
2164 |
|
|
.IX Item "-Wreorder ( and Objective- only)"
|
2165 |
|
|
Warn when the order of member initializers given in the code does not
|
2166 |
|
|
match the order in which they must be executed. For instance:
|
2167 |
|
|
.Sp
|
2168 |
|
|
.Vb 5
|
2169 |
|
|
\& struct A {
|
2170 |
|
|
\& int i;
|
2171 |
|
|
\& int j;
|
2172 |
|
|
\& A(): j (0), i (1) { }
|
2173 |
|
|
\& };
|
2174 |
|
|
.Ve
|
2175 |
|
|
.Sp
|
2176 |
|
|
The compiler will rearrange the member initializers for \fBi\fR
|
2177 |
|
|
and \fBj\fR to match the declaration order of the members, emitting
|
2178 |
|
|
a warning to that effect. This warning is enabled by \fB\-Wall\fR.
|
2179 |
|
|
.PP
|
2180 |
|
|
The following \fB\-W...\fR options are not affected by \fB\-Wall\fR.
|
2181 |
|
|
.IP "\fB\-Weffc++\fR (\*(C+ and Objective\-\*(C+ only)" 4
|
2182 |
|
|
.IX Item "-Weffc++ ( and Objective- only)"
|
2183 |
|
|
Warn about violations of the following style guidelines from Scott Meyers'
|
2184 |
|
|
\&\fIEffective \*(C+\fR book:
|
2185 |
|
|
.RS 4
|
2186 |
|
|
.IP "\(bu" 4
|
2187 |
|
|
Item 11: Define a copy constructor and an assignment operator for classes
|
2188 |
|
|
with dynamically allocated memory.
|
2189 |
|
|
.IP "\(bu" 4
|
2190 |
|
|
Item 12: Prefer initialization to assignment in constructors.
|
2191 |
|
|
.IP "\(bu" 4
|
2192 |
|
|
Item 14: Make destructors virtual in base classes.
|
2193 |
|
|
.IP "\(bu" 4
|
2194 |
|
|
Item 15: Have \f(CW\*(C`operator=\*(C'\fR return a reference to \f(CW*this\fR.
|
2195 |
|
|
.IP "\(bu" 4
|
2196 |
|
|
Item 23: Don't try to return a reference when you must return an object.
|
2197 |
|
|
.RE
|
2198 |
|
|
.RS 4
|
2199 |
|
|
.Sp
|
2200 |
|
|
Also warn about violations of the following style guidelines from
|
2201 |
|
|
Scott Meyers' \fIMore Effective \*(C+\fR book:
|
2202 |
|
|
.IP "\(bu" 4
|
2203 |
|
|
Item 6: Distinguish between prefix and postfix forms of increment and
|
2204 |
|
|
decrement operators.
|
2205 |
|
|
.IP "\(bu" 4
|
2206 |
|
|
Item 7: Never overload \f(CW\*(C`&&\*(C'\fR, \f(CW\*(C`||\*(C'\fR, or \f(CW\*(C`,\*(C'\fR.
|
2207 |
|
|
.RE
|
2208 |
|
|
.RS 4
|
2209 |
|
|
.Sp
|
2210 |
|
|
When selecting this option, be aware that the standard library
|
2211 |
|
|
headers do not obey all of these guidelines; use \fBgrep \-v\fR
|
2212 |
|
|
to filter out those warnings.
|
2213 |
|
|
.RE
|
2214 |
|
|
.IP "\fB\-Wstrict\-null\-sentinel\fR (\*(C+ and Objective\-\*(C+ only)" 4
|
2215 |
|
|
.IX Item "-Wstrict-null-sentinel ( and Objective- only)"
|
2216 |
|
|
Warn also about the use of an uncasted \f(CW\*(C`NULL\*(C'\fR as sentinel. When
|
2217 |
|
|
compiling only with \s-1GCC\s0 this is a valid sentinel, as \f(CW\*(C`NULL\*(C'\fR is defined
|
2218 |
|
|
to \f(CW\*(C`_\|_null\*(C'\fR. Although it is a null pointer constant not a null pointer,
|
2219 |
|
|
it is guaranteed to be of the same size as a pointer. But this use is
|
2220 |
|
|
not portable across different compilers.
|
2221 |
|
|
.IP "\fB\-Wno\-non\-template\-friend\fR (\*(C+ and Objective\-\*(C+ only)" 4
|
2222 |
|
|
.IX Item "-Wno-non-template-friend ( and Objective- only)"
|
2223 |
|
|
Disable warnings when non-templatized friend functions are declared
|
2224 |
|
|
within a template. Since the advent of explicit template specification
|
2225 |
|
|
support in G++, if the name of the friend is an unqualified-id (i.e.,
|
2226 |
|
|
\&\fBfriend foo(int)\fR), the \*(C+ language specification demands that the
|
2227 |
|
|
friend declare or define an ordinary, nontemplate function. (Section
|
2228 |
|
|
14.5.3). Before G++ implemented explicit specification, unqualified-ids
|
2229 |
|
|
could be interpreted as a particular specialization of a templatized
|
2230 |
|
|
function. Because this non-conforming behavior is no longer the default
|
2231 |
|
|
behavior for G++, \fB\-Wnon\-template\-friend\fR allows the compiler to
|
2232 |
|
|
check existing code for potential trouble spots and is on by default.
|
2233 |
|
|
This new compiler behavior can be turned off with
|
2234 |
|
|
\&\fB\-Wno\-non\-template\-friend\fR which keeps the conformant compiler code
|
2235 |
|
|
but disables the helpful warning.
|
2236 |
|
|
.IP "\fB\-Wold\-style\-cast\fR (\*(C+ and Objective\-\*(C+ only)" 4
|
2237 |
|
|
.IX Item "-Wold-style-cast ( and Objective- only)"
|
2238 |
|
|
Warn if an old-style (C\-style) cast to a non-void type is used within
|
2239 |
|
|
a \*(C+ program. The new-style casts (\fBdynamic_cast\fR,
|
2240 |
|
|
\&\fBstatic_cast\fR, \fBreinterpret_cast\fR, and \fBconst_cast\fR) are
|
2241 |
|
|
less vulnerable to unintended effects and much easier to search for.
|
2242 |
|
|
.IP "\fB\-Woverloaded\-virtual\fR (\*(C+ and Objective\-\*(C+ only)" 4
|
2243 |
|
|
.IX Item "-Woverloaded-virtual ( and Objective- only)"
|
2244 |
|
|
Warn when a function declaration hides virtual functions from a
|
2245 |
|
|
base class. For example, in:
|
2246 |
|
|
.Sp
|
2247 |
|
|
.Vb 3
|
2248 |
|
|
\& struct A {
|
2249 |
|
|
\& virtual void f();
|
2250 |
|
|
\& };
|
2251 |
|
|
\&
|
2252 |
|
|
\& struct B: public A {
|
2253 |
|
|
\& void f(int);
|
2254 |
|
|
\& };
|
2255 |
|
|
.Ve
|
2256 |
|
|
.Sp
|
2257 |
|
|
the \f(CW\*(C`A\*(C'\fR class version of \f(CW\*(C`f\*(C'\fR is hidden in \f(CW\*(C`B\*(C'\fR, and code
|
2258 |
|
|
like:
|
2259 |
|
|
.Sp
|
2260 |
|
|
.Vb 2
|
2261 |
|
|
\& B* b;
|
2262 |
|
|
\& b\->f();
|
2263 |
|
|
.Ve
|
2264 |
|
|
.Sp
|
2265 |
|
|
will fail to compile.
|
2266 |
|
|
.IP "\fB\-Wno\-pmf\-conversions\fR (\*(C+ and Objective\-\*(C+ only)" 4
|
2267 |
|
|
.IX Item "-Wno-pmf-conversions ( and Objective- only)"
|
2268 |
|
|
Disable the diagnostic for converting a bound pointer to member function
|
2269 |
|
|
to a plain pointer.
|
2270 |
|
|
.IP "\fB\-Wsign\-promo\fR (\*(C+ and Objective\-\*(C+ only)" 4
|
2271 |
|
|
.IX Item "-Wsign-promo ( and Objective- only)"
|
2272 |
|
|
Warn when overload resolution chooses a promotion from unsigned or
|
2273 |
|
|
enumerated type to a signed type, over a conversion to an unsigned type of
|
2274 |
|
|
the same size. Previous versions of G++ would try to preserve
|
2275 |
|
|
unsignedness, but the standard mandates the current behavior.
|
2276 |
|
|
.Sp
|
2277 |
|
|
.Vb 4
|
2278 |
|
|
\& struct A {
|
2279 |
|
|
\& operator int ();
|
2280 |
|
|
\& A& operator = (int);
|
2281 |
|
|
\& };
|
2282 |
|
|
\&
|
2283 |
|
|
\& main ()
|
2284 |
|
|
\& {
|
2285 |
|
|
\& A a,b;
|
2286 |
|
|
\& a = b;
|
2287 |
|
|
\& }
|
2288 |
|
|
.Ve
|
2289 |
|
|
.Sp
|
2290 |
|
|
In this example, G++ will synthesize a default \fBA& operator =
|
2291 |
|
|
(const A&);\fR, while cfront will use the user-defined \fBoperator =\fR.
|
2292 |
|
|
.Sh "Options Controlling Objective-C and Objective\-\*(C+ Dialects"
|
2293 |
|
|
.IX Subsection "Options Controlling Objective-C and Objective- Dialects"
|
2294 |
|
|
(\s-1NOTE:\s0 This manual does not describe the Objective-C and Objective\-\*(C+
|
2295 |
|
|
languages themselves. See
|
2296 |
|
|
.PP
|
2297 |
|
|
This section describes the command-line options that are only meaningful
|
2298 |
|
|
for Objective-C and Objective\-\*(C+ programs, but you can also use most of
|
2299 |
|
|
the language-independent \s-1GNU\s0 compiler options.
|
2300 |
|
|
For example, you might compile a file \f(CW\*(C`some_class.m\*(C'\fR like this:
|
2301 |
|
|
.PP
|
2302 |
|
|
.Vb 1
|
2303 |
|
|
\& gcc \-g \-fgnu\-runtime \-O \-c some_class.m
|
2304 |
|
|
.Ve
|
2305 |
|
|
.PP
|
2306 |
|
|
In this example, \fB\-fgnu\-runtime\fR is an option meant only for
|
2307 |
|
|
Objective-C and Objective\-\*(C+ programs; you can use the other options with
|
2308 |
|
|
any language supported by \s-1GCC\s0.
|
2309 |
|
|
.PP
|
2310 |
|
|
Note that since Objective-C is an extension of the C language, Objective-C
|
2311 |
|
|
compilations may also use options specific to the C front-end (e.g.,
|
2312 |
|
|
\&\fB\-Wtraditional\fR). Similarly, Objective\-\*(C+ compilations may use
|
2313 |
|
|
\&\*(C+\-specific options (e.g., \fB\-Wabi\fR).
|
2314 |
|
|
.PP
|
2315 |
|
|
Here is a list of options that are \fIonly\fR for compiling Objective-C
|
2316 |
|
|
and Objective\-\*(C+ programs:
|
2317 |
|
|
.IP "\fB\-fconstant\-string\-class=\fR\fIclass-name\fR" 4
|
2318 |
|
|
.IX Item "-fconstant-string-class=class-name"
|
2319 |
|
|
Use \fIclass-name\fR as the name of the class to instantiate for each
|
2320 |
|
|
literal string specified with the syntax \f(CW\*(C`@"..."\*(C'\fR. The default
|
2321 |
|
|
class name is \f(CW\*(C`NXConstantString\*(C'\fR if the \s-1GNU\s0 runtime is being used, and
|
2322 |
|
|
\&\f(CW\*(C`NSConstantString\*(C'\fR if the NeXT runtime is being used (see below). The
|
2323 |
|
|
\&\fB\-fconstant\-cfstrings\fR option, if also present, will override the
|
2324 |
|
|
\&\fB\-fconstant\-string\-class\fR setting and cause \f(CW\*(C`@"..."\*(C'\fR literals
|
2325 |
|
|
to be laid out as constant CoreFoundation strings.
|
2326 |
|
|
.IP "\fB\-fgnu\-runtime\fR" 4
|
2327 |
|
|
.IX Item "-fgnu-runtime"
|
2328 |
|
|
Generate object code compatible with the standard \s-1GNU\s0 Objective-C
|
2329 |
|
|
runtime. This is the default for most types of systems.
|
2330 |
|
|
.IP "\fB\-fnext\-runtime\fR" 4
|
2331 |
|
|
.IX Item "-fnext-runtime"
|
2332 |
|
|
Generate output compatible with the NeXT runtime. This is the default
|
2333 |
|
|
for NeXT-based systems, including Darwin and Mac \s-1OS\s0 X. The macro
|
2334 |
|
|
\&\f(CW\*(C`_\|_NEXT_RUNTIME_\|_\*(C'\fR is predefined if (and only if) this option is
|
2335 |
|
|
used.
|
2336 |
|
|
.IP "\fB\-fno\-nil\-receivers\fR" 4
|
2337 |
|
|
.IX Item "-fno-nil-receivers"
|
2338 |
|
|
Assume that all Objective-C message dispatches (e.g.,
|
2339 |
|
|
\&\f(CW\*(C`[receiver message:arg]\*(C'\fR) in this translation unit ensure that the receiver
|
2340 |
|
|
is not \f(CW\*(C`nil\*(C'\fR. This allows for more efficient entry points in the runtime
|
2341 |
|
|
to be used. Currently, this option is only available in conjunction with
|
2342 |
|
|
the NeXT runtime on Mac \s-1OS\s0 X 10.3 and later.
|
2343 |
|
|
.IP "\fB\-fobjc\-call\-cxx\-cdtors\fR" 4
|
2344 |
|
|
.IX Item "-fobjc-call-cxx-cdtors"
|
2345 |
|
|
For each Objective-C class, check if any of its instance variables is a
|
2346 |
|
|
\&\*(C+ object with a non-trivial default constructor. If so, synthesize a
|
2347 |
|
|
special \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR instance method that will run
|
2348 |
|
|
non-trivial default constructors on any such instance variables, in order,
|
2349 |
|
|
and then return \f(CW\*(C`self\*(C'\fR. Similarly, check if any instance variable
|
2350 |
|
|
is a \*(C+ object with a non-trivial destructor, and if so, synthesize a
|
2351 |
|
|
special \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR method that will run
|
2352 |
|
|
all such default destructors, in reverse order.
|
2353 |
|
|
.Sp
|
2354 |
|
|
The \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR and/or \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR methods
|
2355 |
|
|
thusly generated will only operate on instance variables declared in the
|
2356 |
|
|
current Objective-C class, and not those inherited from superclasses. It
|
2357 |
|
|
is the responsibility of the Objective-C runtime to invoke all such methods
|
2358 |
|
|
in an object's inheritance hierarchy. The \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR methods
|
2359 |
|
|
will be invoked by the runtime immediately after a new object
|
2360 |
|
|
instance is allocated; the \f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR methods will
|
2361 |
|
|
be invoked immediately before the runtime deallocates an object instance.
|
2362 |
|
|
.Sp
|
2363 |
|
|
As of this writing, only the NeXT runtime on Mac \s-1OS\s0 X 10.4 and later has
|
2364 |
|
|
support for invoking the \f(CW\*(C`\- (id) .cxx_construct\*(C'\fR and
|
2365 |
|
|
\&\f(CW\*(C`\- (void) .cxx_destruct\*(C'\fR methods.
|
2366 |
|
|
.IP "\fB\-fobjc\-direct\-dispatch\fR" 4
|
2367 |
|
|
.IX Item "-fobjc-direct-dispatch"
|
2368 |
|
|
Allow fast jumps to the message dispatcher. On Darwin this is
|
2369 |
|
|
accomplished via the comm page.
|
2370 |
|
|
.IP "\fB\-fobjc\-exceptions\fR" 4
|
2371 |
|
|
.IX Item "-fobjc-exceptions"
|
2372 |
|
|
Enable syntactic support for structured exception handling in Objective-C,
|
2373 |
|
|
similar to what is offered by \*(C+ and Java. This option is
|
2374 |
|
|
unavailable in conjunction with the NeXT runtime on Mac \s-1OS\s0 X 10.2 and
|
2375 |
|
|
earlier.
|
2376 |
|
|
.Sp
|
2377 |
|
|
.Vb 10
|
2378 |
|
|
\& @try {
|
2379 |
|
|
\& ...
|
2380 |
|
|
\& @throw expr;
|
2381 |
|
|
\& ...
|
2382 |
|
|
\& }
|
2383 |
|
|
\& @catch (AnObjCClass *exc) {
|
2384 |
|
|
\& ...
|
2385 |
|
|
\& @throw expr;
|
2386 |
|
|
\& ...
|
2387 |
|
|
\& @throw;
|
2388 |
|
|
\& ...
|
2389 |
|
|
\& }
|
2390 |
|
|
\& @catch (AnotherClass *exc) {
|
2391 |
|
|
\& ...
|
2392 |
|
|
\& }
|
2393 |
|
|
\& @catch (id allOthers) {
|
2394 |
|
|
\& ...
|
2395 |
|
|
\& }
|
2396 |
|
|
\& @finally {
|
2397 |
|
|
\& ...
|
2398 |
|
|
\& @throw expr;
|
2399 |
|
|
\& ...
|
2400 |
|
|
\& }
|
2401 |
|
|
.Ve
|
2402 |
|
|
.Sp
|
2403 |
|
|
The \f(CW@throw\fR statement may appear anywhere in an Objective-C or
|
2404 |
|
|
Objective\-\*(C+ program; when used inside of a \f(CW@catch\fR block, the
|
2405 |
|
|
\&\f(CW@throw\fR may appear without an argument (as shown above), in which case
|
2406 |
|
|
the object caught by the \f(CW@catch\fR will be rethrown.
|
2407 |
|
|
.Sp
|
2408 |
|
|
Note that only (pointers to) Objective-C objects may be thrown and
|
2409 |
|
|
caught using this scheme. When an object is thrown, it will be caught
|
2410 |
|
|
by the nearest \f(CW@catch\fR clause capable of handling objects of that type,
|
2411 |
|
|
analogously to how \f(CW\*(C`catch\*(C'\fR blocks work in \*(C+ and Java. A
|
2412 |
|
|
\&\f(CW\*(C`@catch(id ...)\*(C'\fR clause (as shown above) may also be provided to catch
|
2413 |
|
|
any and all Objective-C exceptions not caught by previous \f(CW@catch\fR
|
2414 |
|
|
clauses (if any).
|
2415 |
|
|
.Sp
|
2416 |
|
|
The \f(CW@finally\fR clause, if present, will be executed upon exit from the
|
2417 |
|
|
immediately preceding \f(CW\*(C`@try ... @catch\*(C'\fR section. This will happen
|
2418 |
|
|
regardless of whether any exceptions are thrown, caught or rethrown
|
2419 |
|
|
inside the \f(CW\*(C`@try ... @catch\*(C'\fR section, analogously to the behavior
|
2420 |
|
|
of the \f(CW\*(C`finally\*(C'\fR clause in Java.
|
2421 |
|
|
.Sp
|
2422 |
|
|
There are several caveats to using the new exception mechanism:
|
2423 |
|
|
.RS 4
|
2424 |
|
|
.IP "\(bu" 4
|
2425 |
|
|
Although currently designed to be binary compatible with \f(CW\*(C`NS_HANDLER\*(C'\fR\-style
|
2426 |
|
|
idioms provided by the \f(CW\*(C`NSException\*(C'\fR class, the new
|
2427 |
|
|
exceptions can only be used on Mac \s-1OS\s0 X 10.3 (Panther) and later
|
2428 |
|
|
systems, due to additional functionality needed in the (NeXT) Objective-C
|
2429 |
|
|
runtime.
|
2430 |
|
|
.IP "\(bu" 4
|
2431 |
|
|
As mentioned above, the new exceptions do not support handling
|
2432 |
|
|
types other than Objective-C objects. Furthermore, when used from
|
2433 |
|
|
Objective\-\*(C+, the Objective-C exception model does not interoperate with \*(C+
|
2434 |
|
|
exceptions at this time. This means you cannot \f(CW@throw\fR an exception
|
2435 |
|
|
from Objective-C and \f(CW\*(C`catch\*(C'\fR it in \*(C+, or vice versa
|
2436 |
|
|
(i.e., \f(CW\*(C`throw ... @catch\*(C'\fR).
|
2437 |
|
|
.RE
|
2438 |
|
|
.RS 4
|
2439 |
|
|
.Sp
|
2440 |
|
|
The \fB\-fobjc\-exceptions\fR switch also enables the use of synchronization
|
2441 |
|
|
blocks for thread-safe execution:
|
2442 |
|
|
.Sp
|
2443 |
|
|
.Vb 3
|
2444 |
|
|
\& @synchronized (ObjCClass *guard) {
|
2445 |
|
|
\& ...
|
2446 |
|
|
\& }
|
2447 |
|
|
.Ve
|
2448 |
|
|
.Sp
|
2449 |
|
|
Upon entering the \f(CW@synchronized\fR block, a thread of execution shall
|
2450 |
|
|
first check whether a lock has been placed on the corresponding \f(CW\*(C`guard\*(C'\fR
|
2451 |
|
|
object by another thread. If it has, the current thread shall wait until
|
2452 |
|
|
the other thread relinquishes its lock. Once \f(CW\*(C`guard\*(C'\fR becomes available,
|
2453 |
|
|
the current thread will place its own lock on it, execute the code contained in
|
2454 |
|
|
the \f(CW@synchronized\fR block, and finally relinquish the lock (thereby
|
2455 |
|
|
making \f(CW\*(C`guard\*(C'\fR available to other threads).
|
2456 |
|
|
.Sp
|
2457 |
|
|
Unlike Java, Objective-C does not allow for entire methods to be marked
|
2458 |
|
|
\&\f(CW@synchronized\fR. Note that throwing exceptions out of
|
2459 |
|
|
\&\f(CW@synchronized\fR blocks is allowed, and will cause the guarding object
|
2460 |
|
|
to be unlocked properly.
|
2461 |
|
|
.RE
|
2462 |
|
|
.IP "\fB\-fobjc\-gc\fR" 4
|
2463 |
|
|
.IX Item "-fobjc-gc"
|
2464 |
|
|
Enable garbage collection (\s-1GC\s0) in Objective-C and Objective\-\*(C+ programs.
|
2465 |
|
|
.IP "\fB\-freplace\-objc\-classes\fR" 4
|
2466 |
|
|
.IX Item "-freplace-objc-classes"
|
2467 |
|
|
Emit a special marker instructing \fB\f(BIld\fB\|(1)\fR not to statically link in
|
2468 |
|
|
the resulting object file, and allow \fB\f(BIdyld\fB\|(1)\fR to load it in at
|
2469 |
|
|
run time instead. This is used in conjunction with the Fix-and-Continue
|
2470 |
|
|
debugging mode, where the object file in question may be recompiled and
|
2471 |
|
|
dynamically reloaded in the course of program execution, without the need
|
2472 |
|
|
to restart the program itself. Currently, Fix-and-Continue functionality
|
2473 |
|
|
is only available in conjunction with the NeXT runtime on Mac \s-1OS\s0 X 10.3
|
2474 |
|
|
and later.
|
2475 |
|
|
.IP "\fB\-fzero\-link\fR" 4
|
2476 |
|
|
.IX Item "-fzero-link"
|
2477 |
|
|
When compiling for the NeXT runtime, the compiler ordinarily replaces calls
|
2478 |
|
|
to \f(CW\*(C`objc_getClass("...")\*(C'\fR (when the name of the class is known at
|
2479 |
|
|
compile time) with static class references that get initialized at load time,
|
2480 |
|
|
which improves run-time performance. Specifying the \fB\-fzero\-link\fR flag
|
2481 |
|
|
suppresses this behavior and causes calls to \f(CW\*(C`objc_getClass("...")\*(C'\fR
|
2482 |
|
|
to be retained. This is useful in Zero-Link debugging mode, since it allows
|
2483 |
|
|
for individual class implementations to be modified during program execution.
|
2484 |
|
|
.IP "\fB\-gen\-decls\fR" 4
|
2485 |
|
|
.IX Item "-gen-decls"
|
2486 |
|
|
Dump interface declarations for all classes seen in the source file to a
|
2487 |
|
|
file named \fI\fIsourcename\fI.decl\fR.
|
2488 |
|
|
.IP "\fB\-Wassign\-intercept\fR (Objective-C and Objective\-\*(C+ only)" 4
|
2489 |
|
|
.IX Item "-Wassign-intercept (Objective-C and Objective- only)"
|
2490 |
|
|
Warn whenever an Objective-C assignment is being intercepted by the
|
2491 |
|
|
garbage collector.
|
2492 |
|
|
.IP "\fB\-Wno\-protocol\fR (Objective-C and Objective\-\*(C+ only)" 4
|
2493 |
|
|
.IX Item "-Wno-protocol (Objective-C and Objective- only)"
|
2494 |
|
|
If a class is declared to implement a protocol, a warning is issued for
|
2495 |
|
|
every method in the protocol that is not implemented by the class. The
|
2496 |
|
|
default behavior is to issue a warning for every method not explicitly
|
2497 |
|
|
implemented in the class, even if a method implementation is inherited
|
2498 |
|
|
from the superclass. If you use the \fB\-Wno\-protocol\fR option, then
|
2499 |
|
|
methods inherited from the superclass are considered to be implemented,
|
2500 |
|
|
and no warning is issued for them.
|
2501 |
|
|
.IP "\fB\-Wselector\fR (Objective-C and Objective\-\*(C+ only)" 4
|
2502 |
|
|
.IX Item "-Wselector (Objective-C and Objective- only)"
|
2503 |
|
|
Warn if multiple methods of different types for the same selector are
|
2504 |
|
|
found during compilation. The check is performed on the list of methods
|
2505 |
|
|
in the final stage of compilation. Additionally, a check is performed
|
2506 |
|
|
for each selector appearing in a \f(CW\*(C`@selector(...)\*(C'\fR
|
2507 |
|
|
expression, and a corresponding method for that selector has been found
|
2508 |
|
|
during compilation. Because these checks scan the method table only at
|
2509 |
|
|
the end of compilation, these warnings are not produced if the final
|
2510 |
|
|
stage of compilation is not reached, for example because an error is
|
2511 |
|
|
found during compilation, or because the \fB\-fsyntax\-only\fR option is
|
2512 |
|
|
being used.
|
2513 |
|
|
.IP "\fB\-Wstrict\-selector\-match\fR (Objective-C and Objective\-\*(C+ only)" 4
|
2514 |
|
|
.IX Item "-Wstrict-selector-match (Objective-C and Objective- only)"
|
2515 |
|
|
Warn if multiple methods with differing argument and/or return types are
|
2516 |
|
|
found for a given selector when attempting to send a message using this
|
2517 |
|
|
selector to a receiver of type \f(CW\*(C`id\*(C'\fR or \f(CW\*(C`Class\*(C'\fR. When this flag
|
2518 |
|
|
is off (which is the default behavior), the compiler will omit such warnings
|
2519 |
|
|
if any differences found are confined to types which share the same size
|
2520 |
|
|
and alignment.
|
2521 |
|
|
.IP "\fB\-Wundeclared\-selector\fR (Objective-C and Objective\-\*(C+ only)" 4
|
2522 |
|
|
.IX Item "-Wundeclared-selector (Objective-C and Objective- only)"
|
2523 |
|
|
Warn if a \f(CW\*(C`@selector(...)\*(C'\fR expression referring to an
|
2524 |
|
|
undeclared selector is found. A selector is considered undeclared if no
|
2525 |
|
|
method with that name has been declared before the
|
2526 |
|
|
\&\f(CW\*(C`@selector(...)\*(C'\fR expression, either explicitly in an
|
2527 |
|
|
\&\f(CW@interface\fR or \f(CW@protocol\fR declaration, or implicitly in
|
2528 |
|
|
an \f(CW@implementation\fR section. This option always performs its
|
2529 |
|
|
checks as soon as a \f(CW\*(C`@selector(...)\*(C'\fR expression is found,
|
2530 |
|
|
while \fB\-Wselector\fR only performs its checks in the final stage of
|
2531 |
|
|
compilation. This also enforces the coding style convention
|
2532 |
|
|
that methods and selectors must be declared before being used.
|
2533 |
|
|
.IP "\fB\-print\-objc\-runtime\-info\fR" 4
|
2534 |
|
|
.IX Item "-print-objc-runtime-info"
|
2535 |
|
|
Generate C header describing the largest structure that is passed by
|
2536 |
|
|
value, if any.
|
2537 |
|
|
.Sh "Options to Control Diagnostic Messages Formatting"
|
2538 |
|
|
.IX Subsection "Options to Control Diagnostic Messages Formatting"
|
2539 |
|
|
Traditionally, diagnostic messages have been formatted irrespective of
|
2540 |
|
|
the output device's aspect (e.g. its width, ...). The options described
|
2541 |
|
|
below can be used to control the diagnostic messages formatting
|
2542 |
|
|
algorithm, e.g. how many characters per line, how often source location
|
2543 |
|
|
information should be reported. Right now, only the \*(C+ front end can
|
2544 |
|
|
honor these options. However it is expected, in the near future, that
|
2545 |
|
|
the remaining front ends would be able to digest them correctly.
|
2546 |
|
|
.IP "\fB\-fmessage\-length=\fR\fIn\fR" 4
|
2547 |
|
|
.IX Item "-fmessage-length=n"
|
2548 |
|
|
Try to format error messages so that they fit on lines of about \fIn\fR
|
2549 |
|
|
characters. The default is 72 characters for \fBg++\fR and 0 for the rest of
|
2550 |
|
|
the front ends supported by \s-1GCC\s0. If \fIn\fR is zero, then no
|
2551 |
|
|
line-wrapping will be done; each error message will appear on a single
|
2552 |
|
|
line.
|
2553 |
|
|
.IP "\fB\-fdiagnostics\-show\-location=once\fR" 4
|
2554 |
|
|
.IX Item "-fdiagnostics-show-location=once"
|
2555 |
|
|
Only meaningful in line-wrapping mode. Instructs the diagnostic messages
|
2556 |
|
|
reporter to emit \fIonce\fR source location information; that is, in
|
2557 |
|
|
case the message is too long to fit on a single physical line and has to
|
2558 |
|
|
be wrapped, the source location won't be emitted (as prefix) again,
|
2559 |
|
|
over and over, in subsequent continuation lines. This is the default
|
2560 |
|
|
behavior.
|
2561 |
|
|
.IP "\fB\-fdiagnostics\-show\-location=every\-line\fR" 4
|
2562 |
|
|
.IX Item "-fdiagnostics-show-location=every-line"
|
2563 |
|
|
Only meaningful in line-wrapping mode. Instructs the diagnostic
|
2564 |
|
|
messages reporter to emit the same source location information (as
|
2565 |
|
|
prefix) for physical lines that result from the process of breaking
|
2566 |
|
|
a message which is too long to fit on a single line.
|
2567 |
|
|
.IP "\fB\-fdiagnostics\-show\-option\fR" 4
|
2568 |
|
|
.IX Item "-fdiagnostics-show-option"
|
2569 |
|
|
This option instructs the diagnostic machinery to add text to each
|
2570 |
|
|
diagnostic emitted, which indicates which command line option directly
|
2571 |
|
|
controls that diagnostic, when such an option is known to the
|
2572 |
|
|
diagnostic machinery.
|
2573 |
|
|
.IP "\fB\-Wcoverage\-mismatch\fR" 4
|
2574 |
|
|
.IX Item "-Wcoverage-mismatch"
|
2575 |
|
|
Warn if feedback profiles do not match when using the
|
2576 |
|
|
\&\fB\-fprofile\-use\fR option.
|
2577 |
|
|
If a source file was changed between \fB\-fprofile\-gen\fR and
|
2578 |
|
|
\&\fB\-fprofile\-use\fR, the files with the profile feedback can fail
|
2579 |
|
|
to match the source file and \s-1GCC\s0 can not use the profile feedback
|
2580 |
|
|
information. By default, \s-1GCC\s0 emits an error message in this case.
|
2581 |
|
|
The option \fB\-Wcoverage\-mismatch\fR emits a warning instead of an
|
2582 |
|
|
error. \s-1GCC\s0 does not use appropriate feedback profiles, so using this
|
2583 |
|
|
option can result in poorly optimized code. This option is useful
|
2584 |
|
|
only in the case of very minor changes such as bug fixes to an
|
2585 |
|
|
existing code-base.
|
2586 |
|
|
.Sh "Options to Request or Suppress Warnings"
|
2587 |
|
|
.IX Subsection "Options to Request or Suppress Warnings"
|
2588 |
|
|
Warnings are diagnostic messages that report constructions which
|
2589 |
|
|
are not inherently erroneous but which are risky or suggest there
|
2590 |
|
|
may have been an error.
|
2591 |
|
|
.PP
|
2592 |
|
|
The following language-independent options do not enable specific
|
2593 |
|
|
warnings but control the kinds of diagnostics produced by \s-1GCC\s0.
|
2594 |
|
|
.IP "\fB\-fsyntax\-only\fR" 4
|
2595 |
|
|
.IX Item "-fsyntax-only"
|
2596 |
|
|
Check the code for syntax errors, but don't do anything beyond that.
|
2597 |
|
|
.IP "\fB\-w\fR" 4
|
2598 |
|
|
.IX Item "-w"
|
2599 |
|
|
Inhibit all warning messages.
|
2600 |
|
|
.IP "\fB\-Werror\fR" 4
|
2601 |
|
|
.IX Item "-Werror"
|
2602 |
|
|
Make all warnings into errors.
|
2603 |
|
|
.IP "\fB\-Werror=\fR" 4
|
2604 |
|
|
.IX Item "-Werror="
|
2605 |
|
|
Make the specified warning into an error. The specifier for a warning
|
2606 |
|
|
is appended, for example \fB\-Werror=switch\fR turns the warnings
|
2607 |
|
|
controlled by \fB\-Wswitch\fR into errors. This switch takes a
|
2608 |
|
|
negative form, to be used to negate \fB\-Werror\fR for specific
|
2609 |
|
|
warnings, for example \fB\-Wno\-error=switch\fR makes
|
2610 |
|
|
\&\fB\-Wswitch\fR warnings not be errors, even when \fB\-Werror\fR
|
2611 |
|
|
is in effect. You can use the \fB\-fdiagnostics\-show\-option\fR
|
2612 |
|
|
option to have each controllable warning amended with the option which
|
2613 |
|
|
controls it, to determine what to use with this option.
|
2614 |
|
|
.Sp
|
2615 |
|
|
Note that specifying \fB\-Werror=\fR\fIfoo\fR automatically implies
|
2616 |
|
|
\&\fB\-W\fR\fIfoo\fR. However, \fB\-Wno\-error=\fR\fIfoo\fR does not
|
2617 |
|
|
imply anything.
|
2618 |
|
|
.IP "\fB\-Wfatal\-errors\fR" 4
|
2619 |
|
|
.IX Item "-Wfatal-errors"
|
2620 |
|
|
This option causes the compiler to abort compilation on the first error
|
2621 |
|
|
occurred rather than trying to keep going and printing further error
|
2622 |
|
|
messages.
|
2623 |
|
|
.PP
|
2624 |
|
|
You can request many specific warnings with options beginning
|
2625 |
|
|
\&\fB\-W\fR, for example \fB\-Wimplicit\fR to request warnings on
|
2626 |
|
|
implicit declarations. Each of these specific warning options also
|
2627 |
|
|
has a negative form beginning \fB\-Wno\-\fR to turn off warnings; for
|
2628 |
|
|
example, \fB\-Wno\-implicit\fR. This manual lists only one of the
|
2629 |
|
|
two forms, whichever is not the default. For further,
|
2630 |
|
|
language-specific options also refer to \fB\*(C+ Dialect Options\fR and
|
2631 |
|
|
\&\fBObjective-C and Objective\-\*(C+ Dialect Options\fR.
|
2632 |
|
|
.IP "\fB\-pedantic\fR" 4
|
2633 |
|
|
.IX Item "-pedantic"
|
2634 |
|
|
Issue all the warnings demanded by strict \s-1ISO\s0 C and \s-1ISO\s0 \*(C+;
|
2635 |
|
|
reject all programs that use forbidden extensions, and some other
|
2636 |
|
|
programs that do not follow \s-1ISO\s0 C and \s-1ISO\s0 \*(C+. For \s-1ISO\s0 C, follows the
|
2637 |
|
|
version of the \s-1ISO\s0 C standard specified by any \fB\-std\fR option used.
|
2638 |
|
|
.Sp
|
2639 |
|
|
Valid \s-1ISO\s0 C and \s-1ISO\s0 \*(C+ programs should compile properly with or without
|
2640 |
|
|
this option (though a rare few will require \fB\-ansi\fR or a
|
2641 |
|
|
\&\fB\-std\fR option specifying the required version of \s-1ISO\s0 C). However,
|
2642 |
|
|
without this option, certain \s-1GNU\s0 extensions and traditional C and \*(C+
|
2643 |
|
|
features are supported as well. With this option, they are rejected.
|
2644 |
|
|
.Sp
|
2645 |
|
|
\&\fB\-pedantic\fR does not cause warning messages for use of the
|
2646 |
|
|
alternate keywords whose names begin and end with \fB_\|_\fR. Pedantic
|
2647 |
|
|
warnings are also disabled in the expression that follows
|
2648 |
|
|
\&\f(CW\*(C`_\|_extension_\|_\*(C'\fR. However, only system header files should use
|
2649 |
|
|
these escape routes; application programs should avoid them.
|
2650 |
|
|
.Sp
|
2651 |
|
|
Some users try to use \fB\-pedantic\fR to check programs for strict \s-1ISO\s0
|
2652 |
|
|
C conformance. They soon find that it does not do quite what they want:
|
2653 |
|
|
it finds some non-ISO practices, but not all\-\-\-only those for which
|
2654 |
|
|
\&\s-1ISO\s0 C \fIrequires\fR a diagnostic, and some others for which
|
2655 |
|
|
diagnostics have been added.
|
2656 |
|
|
.Sp
|
2657 |
|
|
A feature to report any failure to conform to \s-1ISO\s0 C might be useful in
|
2658 |
|
|
some instances, but would require considerable additional work and would
|
2659 |
|
|
be quite different from \fB\-pedantic\fR. We don't have plans to
|
2660 |
|
|
support such a feature in the near future.
|
2661 |
|
|
.Sp
|
2662 |
|
|
Where the standard specified with \fB\-std\fR represents a \s-1GNU\s0
|
2663 |
|
|
extended dialect of C, such as \fBgnu90\fR or \fBgnu99\fR, there is a
|
2664 |
|
|
corresponding \fIbase standard\fR, the version of \s-1ISO\s0 C on which the \s-1GNU\s0
|
2665 |
|
|
extended dialect is based. Warnings from \fB\-pedantic\fR are given
|
2666 |
|
|
where they are required by the base standard. (It would not make sense
|
2667 |
|
|
for such warnings to be given only for features not in the specified \s-1GNU\s0
|
2668 |
|
|
C dialect, since by definition the \s-1GNU\s0 dialects of C include all
|
2669 |
|
|
features the compiler supports with the given option, and there would be
|
2670 |
|
|
nothing to warn about.)
|
2671 |
|
|
.IP "\fB\-pedantic\-errors\fR" 4
|
2672 |
|
|
.IX Item "-pedantic-errors"
|
2673 |
|
|
Like \fB\-pedantic\fR, except that errors are produced rather than
|
2674 |
|
|
warnings.
|
2675 |
|
|
.IP "\fB\-Wall\fR" 4
|
2676 |
|
|
.IX Item "-Wall"
|
2677 |
|
|
This enables all the warnings about constructions that some users
|
2678 |
|
|
consider questionable, and that are easy to avoid (or modify to
|
2679 |
|
|
prevent the warning), even in conjunction with macros. This also
|
2680 |
|
|
enables some language-specific warnings described in \fB\*(C+ Dialect
|
2681 |
|
|
Options\fR and \fBObjective-C and Objective\-\*(C+ Dialect Options\fR.
|
2682 |
|
|
.Sp
|
2683 |
|
|
\&\fB\-Wall\fR turns on the following warning flags:
|
2684 |
|
|
.Sp
|
2685 |
|
|
\&\fB\-Waddress
|
2686 |
|
|
\&\-Warray\-bounds\fR (only with\fB \fR\fB\-O2\fR)
|
2687 |
|
|
\&\fB\-Wc++0x\-compat
|
2688 |
|
|
\&\-Wchar\-subscripts
|
2689 |
|
|
\&\-Wenum\-compare\fR (in C/Objc; this is on by default in \*(C+)
|
2690 |
|
|
\&\fB\-Wimplicit\-int
|
2691 |
|
|
\&\-Wimplicit\-function\-declaration
|
2692 |
|
|
\&\-Wcomment
|
2693 |
|
|
\&\-Wformat
|
2694 |
|
|
\&\-Wmain\fR (only for C/ObjC and unless\fB \fR\fB\-ffreestanding\fR)
|
2695 |
|
|
\&\fB\-Wmissing\-braces
|
2696 |
|
|
\&\-Wnonnull
|
2697 |
|
|
\&\-Wparentheses
|
2698 |
|
|
\&\-Wpointer\-sign
|
2699 |
|
|
\&\-Wreorder
|
2700 |
|
|
\&\-Wreturn\-type
|
2701 |
|
|
\&\-Wsequence\-point
|
2702 |
|
|
\&\-Wsign\-compare\fR (only in \*(C+)
|
2703 |
|
|
\&\fB\-Wstrict\-aliasing
|
2704 |
|
|
\&\-Wstrict\-overflow=1
|
2705 |
|
|
\&\-Wswitch
|
2706 |
|
|
\&\-Wtrigraphs
|
2707 |
|
|
\&\-Wuninitialized
|
2708 |
|
|
\&\-Wunknown\-pragmas
|
2709 |
|
|
\&\-Wunused\-function
|
2710 |
|
|
\&\-Wunused\-label
|
2711 |
|
|
\&\-Wunused\-value
|
2712 |
|
|
\&\-Wunused\-variable
|
2713 |
|
|
\&\-Wvolatile\-register\-var\fR
|
2714 |
|
|
.Sp
|
2715 |
|
|
Note that some warning flags are not implied by \fB\-Wall\fR. Some of
|
2716 |
|
|
them warn about constructions that users generally do not consider
|
2717 |
|
|
questionable, but which occasionally you might wish to check for;
|
2718 |
|
|
others warn about constructions that are necessary or hard to avoid in
|
2719 |
|
|
some cases, and there is no simple way to modify the code to suppress
|
2720 |
|
|
the warning. Some of them are enabled by \fB\-Wextra\fR but many of
|
2721 |
|
|
them must be enabled individually.
|
2722 |
|
|
.IP "\fB\-Wextra\fR" 4
|
2723 |
|
|
.IX Item "-Wextra"
|
2724 |
|
|
This enables some extra warning flags that are not enabled by
|
2725 |
|
|
\&\fB\-Wall\fR. (This option used to be called \fB\-W\fR. The older
|
2726 |
|
|
name is still supported, but the newer name is more descriptive.)
|
2727 |
|
|
.Sp
|
2728 |
|
|
\&\fB\-Wclobbered
|
2729 |
|
|
\&\-Wempty\-body
|
2730 |
|
|
\&\-Wignored\-qualifiers
|
2731 |
|
|
\&\-Wmissing\-field\-initializers
|
2732 |
|
|
\&\-Wmissing\-parameter\-type\fR (C only)
|
2733 |
|
|
\&\fB\-Wold\-style\-declaration\fR (C only)
|
2734 |
|
|
\&\fB\-Woverride\-init
|
2735 |
|
|
\&\-Wsign\-compare
|
2736 |
|
|
\&\-Wtype\-limits
|
2737 |
|
|
\&\-Wuninitialized
|
2738 |
|
|
\&\-Wunused\-parameter\fR (only with\fB \fR\fB\-Wunused\fR\fB \fRor\fB \fR\fB\-Wall\fR) \fB \fR
|
2739 |
|
|
.Sp
|
2740 |
|
|
The option \fB\-Wextra\fR also prints warning messages for the
|
2741 |
|
|
following cases:
|
2742 |
|
|
.RS 4
|
2743 |
|
|
.IP "\(bu" 4
|
2744 |
|
|
A pointer is compared against integer zero with \fB<\fR, \fB<=\fR,
|
2745 |
|
|
\&\fB>\fR, or \fB>=\fR.
|
2746 |
|
|
.IP "\(bu" 4
|
2747 |
|
|
(\*(C+ only) An enumerator and a non-enumerator both appear in a
|
2748 |
|
|
conditional expression.
|
2749 |
|
|
.IP "\(bu" 4
|
2750 |
|
|
(\*(C+ only) Ambiguous virtual bases.
|
2751 |
|
|
.IP "\(bu" 4
|
2752 |
|
|
(\*(C+ only) Subscripting an array which has been declared \fBregister\fR.
|
2753 |
|
|
.IP "\(bu" 4
|
2754 |
|
|
(\*(C+ only) Taking the address of a variable which has been declared
|
2755 |
|
|
\&\fBregister\fR.
|
2756 |
|
|
.IP "\(bu" 4
|
2757 |
|
|
(\*(C+ only) A base class is not initialized in a derived class' copy
|
2758 |
|
|
constructor.
|
2759 |
|
|
.RE
|
2760 |
|
|
.RS 4
|
2761 |
|
|
.RE
|
2762 |
|
|
.IP "\fB\-Wchar\-subscripts\fR" 4
|
2763 |
|
|
.IX Item "-Wchar-subscripts"
|
2764 |
|
|
Warn if an array subscript has type \f(CW\*(C`char\*(C'\fR. This is a common cause
|
2765 |
|
|
of error, as programmers often forget that this type is signed on some
|
2766 |
|
|
machines.
|
2767 |
|
|
This warning is enabled by \fB\-Wall\fR.
|
2768 |
|
|
.IP "\fB\-Wcomment\fR" 4
|
2769 |
|
|
.IX Item "-Wcomment"
|
2770 |
|
|
Warn whenever a comment-start sequence \fB/*\fR appears in a \fB/*\fR
|
2771 |
|
|
comment, or whenever a Backslash-Newline appears in a \fB//\fR comment.
|
2772 |
|
|
This warning is enabled by \fB\-Wall\fR.
|
2773 |
|
|
.IP "\fB\-Wformat\fR" 4
|
2774 |
|
|
.IX Item "-Wformat"
|
2775 |
|
|
Check calls to \f(CW\*(C`printf\*(C'\fR and \f(CW\*(C`scanf\*(C'\fR, etc., to make sure that
|
2776 |
|
|
the arguments supplied have types appropriate to the format string
|
2777 |
|
|
specified, and that the conversions specified in the format string make
|
2778 |
|
|
sense. This includes standard functions, and others specified by format
|
2779 |
|
|
attributes, in the \f(CW\*(C`printf\*(C'\fR,
|
2780 |
|
|
\&\f(CW\*(C`scanf\*(C'\fR, \f(CW\*(C`strftime\*(C'\fR and \f(CW\*(C`strfmon\*(C'\fR (an X/Open extension,
|
2781 |
|
|
not in the C standard) families (or other target-specific families).
|
2782 |
|
|
Which functions are checked without format attributes having been
|
2783 |
|
|
specified depends on the standard version selected, and such checks of
|
2784 |
|
|
functions without the attribute specified are disabled by
|
2785 |
|
|
\&\fB\-ffreestanding\fR or \fB\-fno\-builtin\fR.
|
2786 |
|
|
.Sp
|
2787 |
|
|
The formats are checked against the format features supported by \s-1GNU\s0
|
2788 |
|
|
libc version 2.2. These include all \s-1ISO\s0 C90 and C99 features, as well
|
2789 |
|
|
as features from the Single Unix Specification and some \s-1BSD\s0 and \s-1GNU\s0
|
2790 |
|
|
extensions. Other library implementations may not support all these
|
2791 |
|
|
features; \s-1GCC\s0 does not support warning about features that go beyond a
|
2792 |
|
|
particular library's limitations. However, if \fB\-pedantic\fR is used
|
2793 |
|
|
with \fB\-Wformat\fR, warnings will be given about format features not
|
2794 |
|
|
in the selected standard version (but not for \f(CW\*(C`strfmon\*(C'\fR formats,
|
2795 |
|
|
since those are not in any version of the C standard).
|
2796 |
|
|
.Sp
|
2797 |
|
|
Since \fB\-Wformat\fR also checks for null format arguments for
|
2798 |
|
|
several functions, \fB\-Wformat\fR also implies \fB\-Wnonnull\fR.
|
2799 |
|
|
.Sp
|
2800 |
|
|
\&\fB\-Wformat\fR is included in \fB\-Wall\fR. For more control over some
|
2801 |
|
|
aspects of format checking, the options \fB\-Wformat\-y2k\fR,
|
2802 |
|
|
\&\fB\-Wno\-format\-extra\-args\fR, \fB\-Wno\-format\-zero\-length\fR,
|
2803 |
|
|
\&\fB\-Wformat\-nonliteral\fR, \fB\-Wformat\-security\fR, and
|
2804 |
|
|
\&\fB\-Wformat=2\fR are available, but are not included in \fB\-Wall\fR.
|
2805 |
|
|
.IP "\fB\-Wformat\-y2k\fR" 4
|
2806 |
|
|
.IX Item "-Wformat-y2k"
|
2807 |
|
|
If \fB\-Wformat\fR is specified, also warn about \f(CW\*(C`strftime\*(C'\fR
|
2808 |
|
|
formats which may yield only a two-digit year.
|
2809 |
|
|
.IP "\fB\-Wno\-format\-contains\-nul\fR" 4
|
2810 |
|
|
.IX Item "-Wno-format-contains-nul"
|
2811 |
|
|
If \fB\-Wformat\fR is specified, do not warn about format strings that
|
2812 |
|
|
contain \s-1NUL\s0 bytes.
|
2813 |
|
|
.IP "\fB\-Wno\-format\-extra\-args\fR" 4
|
2814 |
|
|
.IX Item "-Wno-format-extra-args"
|
2815 |
|
|
If \fB\-Wformat\fR is specified, do not warn about excess arguments to a
|
2816 |
|
|
\&\f(CW\*(C`printf\*(C'\fR or \f(CW\*(C`scanf\*(C'\fR format function. The C standard specifies
|
2817 |
|
|
that such arguments are ignored.
|
2818 |
|
|
.Sp
|
2819 |
|
|
Where the unused arguments lie between used arguments that are
|
2820 |
|
|
specified with \fB$\fR operand number specifications, normally
|
2821 |
|
|
warnings are still given, since the implementation could not know what
|
2822 |
|
|
type to pass to \f(CW\*(C`va_arg\*(C'\fR to skip the unused arguments. However,
|
2823 |
|
|
in the case of \f(CW\*(C`scanf\*(C'\fR formats, this option will suppress the
|
2824 |
|
|
warning if the unused arguments are all pointers, since the Single
|
2825 |
|
|
Unix Specification says that such unused arguments are allowed.
|
2826 |
|
|
.IP "\fB\-Wno\-format\-zero\-length\fR (C and Objective-C only)" 4
|
2827 |
|
|
.IX Item "-Wno-format-zero-length (C and Objective-C only)"
|
2828 |
|
|
If \fB\-Wformat\fR is specified, do not warn about zero-length formats.
|
2829 |
|
|
The C standard specifies that zero-length formats are allowed.
|
2830 |
|
|
.IP "\fB\-Wformat\-nonliteral\fR" 4
|
2831 |
|
|
.IX Item "-Wformat-nonliteral"
|
2832 |
|
|
If \fB\-Wformat\fR is specified, also warn if the format string is not a
|
2833 |
|
|
string literal and so cannot be checked, unless the format function
|
2834 |
|
|
takes its format arguments as a \f(CW\*(C`va_list\*(C'\fR.
|
2835 |
|
|
.IP "\fB\-Wformat\-security\fR" 4
|
2836 |
|
|
.IX Item "-Wformat-security"
|
2837 |
|
|
If \fB\-Wformat\fR is specified, also warn about uses of format
|
2838 |
|
|
functions that represent possible security problems. At present, this
|
2839 |
|
|
warns about calls to \f(CW\*(C`printf\*(C'\fR and \f(CW\*(C`scanf\*(C'\fR functions where the
|
2840 |
|
|
format string is not a string literal and there are no format arguments,
|
2841 |
|
|
as in \f(CW\*(C`printf (foo);\*(C'\fR. This may be a security hole if the format
|
2842 |
|
|
string came from untrusted input and contains \fB\f(CB%n\fB\fR. (This is
|
2843 |
|
|
currently a subset of what \fB\-Wformat\-nonliteral\fR warns about, but
|
2844 |
|
|
in future warnings may be added to \fB\-Wformat\-security\fR that are not
|
2845 |
|
|
included in \fB\-Wformat\-nonliteral\fR.)
|
2846 |
|
|
.IP "\fB\-Wformat=2\fR" 4
|
2847 |
|
|
.IX Item "-Wformat=2"
|
2848 |
|
|
Enable \fB\-Wformat\fR plus format checks not included in
|
2849 |
|
|
\&\fB\-Wformat\fR. Currently equivalent to \fB\-Wformat
|
2850 |
|
|
\&\-Wformat\-nonliteral \-Wformat\-security \-Wformat\-y2k\fR.
|
2851 |
|
|
.IP "\fB\-Wnonnull\fR (C and Objective-C only)" 4
|
2852 |
|
|
.IX Item "-Wnonnull (C and Objective-C only)"
|
2853 |
|
|
Warn about passing a null pointer for arguments marked as
|
2854 |
|
|
requiring a non-null value by the \f(CW\*(C`nonnull\*(C'\fR function attribute.
|
2855 |
|
|
.Sp
|
2856 |
|
|
\&\fB\-Wnonnull\fR is included in \fB\-Wall\fR and \fB\-Wformat\fR. It
|
2857 |
|
|
can be disabled with the \fB\-Wno\-nonnull\fR option.
|
2858 |
|
|
.IP "\fB\-Winit\-self\fR (C, \*(C+, Objective-C and Objective\-\*(C+ only)" 4
|
2859 |
|
|
.IX Item "-Winit-self (C, , Objective-C and Objective- only)"
|
2860 |
|
|
Warn about uninitialized variables which are initialized with themselves.
|
2861 |
|
|
Note this option can only be used with the \fB\-Wuninitialized\fR option.
|
2862 |
|
|
.Sp
|
2863 |
|
|
For example, \s-1GCC\s0 will warn about \f(CW\*(C`i\*(C'\fR being uninitialized in the
|
2864 |
|
|
following snippet only when \fB\-Winit\-self\fR has been specified:
|
2865 |
|
|
.Sp
|
2866 |
|
|
.Vb 5
|
2867 |
|
|
\& int f()
|
2868 |
|
|
\& {
|
2869 |
|
|
\& int i = i;
|
2870 |
|
|
\& return i;
|
2871 |
|
|
\& }
|
2872 |
|
|
.Ve
|
2873 |
|
|
.IP "\fB\-Wimplicit\-int\fR (C and Objective-C only)" 4
|
2874 |
|
|
.IX Item "-Wimplicit-int (C and Objective-C only)"
|
2875 |
|
|
Warn when a declaration does not specify a type.
|
2876 |
|
|
This warning is enabled by \fB\-Wall\fR.
|
2877 |
|
|
.IP "\fB\-Wimplicit\-function\-declaration\fR (C and Objective-C only)" 4
|
2878 |
|
|
.IX Item "-Wimplicit-function-declaration (C and Objective-C only)"
|
2879 |
|
|
Give a warning whenever a function is used before being declared. In
|
2880 |
|
|
C99 mode (\fB\-std=c99\fR or \fB\-std=gnu99\fR), this warning is
|
2881 |
|
|
enabled by default and it is made into an error by
|
2882 |
|
|
\&\fB\-pedantic\-errors\fR. This warning is also enabled by
|
2883 |
|
|
\&\fB\-Wall\fR.
|
2884 |
|
|
.IP "\fB\-Wimplicit\fR" 4
|
2885 |
|
|
.IX Item "-Wimplicit"
|
2886 |
|
|
Same as \fB\-Wimplicit\-int\fR and \fB\-Wimplicit\-function\-declaration\fR.
|
2887 |
|
|
This warning is enabled by \fB\-Wall\fR.
|
2888 |
|
|
.IP "\fB\-Wignored\-qualifiers\fR (C and \*(C+ only)" 4
|
2889 |
|
|
.IX Item "-Wignored-qualifiers (C and only)"
|
2890 |
|
|
Warn if the return type of a function has a type qualifier
|
2891 |
|
|
such as \f(CW\*(C`const\*(C'\fR. For \s-1ISO\s0 C such a type qualifier has no effect,
|
2892 |
|
|
since the value returned by a function is not an lvalue.
|
2893 |
|
|
For \*(C+, the warning is only emitted for scalar types or \f(CW\*(C`void\*(C'\fR.
|
2894 |
|
|
\&\s-1ISO\s0 C prohibits qualified \f(CW\*(C`void\*(C'\fR return types on function
|
2895 |
|
|
definitions, so such return types always receive a warning
|
2896 |
|
|
even without this option.
|
2897 |
|
|
.Sp
|
2898 |
|
|
This warning is also enabled by \fB\-Wextra\fR.
|
2899 |
|
|
.IP "\fB\-Wmain\fR" 4
|
2900 |
|
|
.IX Item "-Wmain"
|
2901 |
|
|
Warn if the type of \fBmain\fR is suspicious. \fBmain\fR should be
|
2902 |
|
|
a function with external linkage, returning int, taking either zero
|
2903 |
|
|
arguments, two, or three arguments of appropriate types. This warning
|
2904 |
|
|
is enabled by default in \*(C+ and is enabled by either \fB\-Wall\fR
|
2905 |
|
|
or \fB\-pedantic\fR.
|
2906 |
|
|
.IP "\fB\-Wmissing\-braces\fR" 4
|
2907 |
|
|
.IX Item "-Wmissing-braces"
|
2908 |
|
|
Warn if an aggregate or union initializer is not fully bracketed. In
|
2909 |
|
|
the following example, the initializer for \fBa\fR is not fully
|
2910 |
|
|
bracketed, but that for \fBb\fR is fully bracketed.
|
2911 |
|
|
.Sp
|
2912 |
|
|
.Vb 2
|
2913 |
|
|
\& int a[2][2] = { 0, 1, 2, 3 };
|
2914 |
|
|
\& int b[2][2] = { { 0, 1 }, { 2, 3 } };
|
2915 |
|
|
.Ve
|
2916 |
|
|
.Sp
|
2917 |
|
|
This warning is enabled by \fB\-Wall\fR.
|
2918 |
|
|
.IP "\fB\-Wmissing\-include\-dirs\fR (C, \*(C+, Objective-C and Objective\-\*(C+ only)" 4
|
2919 |
|
|
.IX Item "-Wmissing-include-dirs (C, , Objective-C and Objective- only)"
|
2920 |
|
|
Warn if a user-supplied include directory does not exist.
|
2921 |
|
|
.IP "\fB\-Wparentheses\fR" 4
|
2922 |
|
|
.IX Item "-Wparentheses"
|
2923 |
|
|
Warn if parentheses are omitted in certain contexts, such
|
2924 |
|
|
as when there is an assignment in a context where a truth value
|
2925 |
|
|
is expected, or when operators are nested whose precedence people
|
2926 |
|
|
often get confused about.
|
2927 |
|
|
.Sp
|
2928 |
|
|
Also warn if a comparison like \fBx<=y<=z\fR appears; this is
|
2929 |
|
|
equivalent to \fB(x<=y ? 1 : 0) <= z\fR, which is a different
|
2930 |
|
|
interpretation from that of ordinary mathematical notation.
|
2931 |
|
|
.Sp
|
2932 |
|
|
Also warn about constructions where there may be confusion to which
|
2933 |
|
|
\&\f(CW\*(C`if\*(C'\fR statement an \f(CW\*(C`else\*(C'\fR branch belongs. Here is an example of
|
2934 |
|
|
such a case:
|
2935 |
|
|
.Sp
|
2936 |
|
|
.Vb 7
|
2937 |
|
|
\& {
|
2938 |
|
|
\& if (a)
|
2939 |
|
|
\& if (b)
|
2940 |
|
|
\& foo ();
|
2941 |
|
|
\& else
|
2942 |
|
|
\& bar ();
|
2943 |
|
|
\& }
|
2944 |
|
|
.Ve
|
2945 |
|
|
.Sp
|
2946 |
|
|
In C/\*(C+, every \f(CW\*(C`else\*(C'\fR branch belongs to the innermost possible
|
2947 |
|
|
\&\f(CW\*(C`if\*(C'\fR statement, which in this example is \f(CW\*(C`if (b)\*(C'\fR. This is
|
2948 |
|
|
often not what the programmer expected, as illustrated in the above
|
2949 |
|
|
example by indentation the programmer chose. When there is the
|
2950 |
|
|
potential for this confusion, \s-1GCC\s0 will issue a warning when this flag
|
2951 |
|
|
is specified. To eliminate the warning, add explicit braces around
|
2952 |
|
|
the innermost \f(CW\*(C`if\*(C'\fR statement so there is no way the \f(CW\*(C`else\*(C'\fR
|
2953 |
|
|
could belong to the enclosing \f(CW\*(C`if\*(C'\fR. The resulting code would
|
2954 |
|
|
look like this:
|
2955 |
|
|
.Sp
|
2956 |
|
|
.Vb 9
|
2957 |
|
|
\& {
|
2958 |
|
|
\& if (a)
|
2959 |
|
|
\& {
|
2960 |
|
|
\& if (b)
|
2961 |
|
|
\& foo ();
|
2962 |
|
|
\& else
|
2963 |
|
|
\& bar ();
|
2964 |
|
|
\& }
|
2965 |
|
|
\& }
|
2966 |
|
|
.Ve
|
2967 |
|
|
.Sp
|
2968 |
|
|
This warning is enabled by \fB\-Wall\fR.
|
2969 |
|
|
.IP "\fB\-Wsequence\-point\fR" 4
|
2970 |
|
|
.IX Item "-Wsequence-point"
|
2971 |
|
|
Warn about code that may have undefined semantics because of violations
|
2972 |
|
|
of sequence point rules in the C and \*(C+ standards.
|
2973 |
|
|
.Sp
|
2974 |
|
|
The C and \*(C+ standards defines the order in which expressions in a C/\*(C+
|
2975 |
|
|
program are evaluated in terms of \fIsequence points\fR, which represent
|
2976 |
|
|
a partial ordering between the execution of parts of the program: those
|
2977 |
|
|
executed before the sequence point, and those executed after it. These
|
2978 |
|
|
occur after the evaluation of a full expression (one which is not part
|
2979 |
|
|
of a larger expression), after the evaluation of the first operand of a
|
2980 |
|
|
\&\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
|
2981 |
|
|
function is called (but after the evaluation of its arguments and the
|
2982 |
|
|
expression denoting the called function), and in certain other places.
|
2983 |
|
|
Other than as expressed by the sequence point rules, the order of
|
2984 |
|
|
evaluation of subexpressions of an expression is not specified. All
|
2985 |
|
|
these rules describe only a partial order rather than a total order,
|
2986 |
|
|
since, for example, if two functions are called within one expression
|
2987 |
|
|
with no sequence point between them, the order in which the functions
|
2988 |
|
|
are called is not specified. However, the standards committee have
|
2989 |
|
|
ruled that function calls do not overlap.
|
2990 |
|
|
.Sp
|
2991 |
|
|
It is not specified when between sequence points modifications to the
|
2992 |
|
|
values of objects take effect. Programs whose behavior depends on this
|
2993 |
|
|
have undefined behavior; the C and \*(C+ standards specify that \*(L"Between
|
2994 |
|
|
the previous and next sequence point an object shall have its stored
|
2995 |
|
|
value modified at most once by the evaluation of an expression.
|
2996 |
|
|
Furthermore, the prior value shall be read only to determine the value
|
2997 |
|
|
to be stored.\*(R". If a program breaks these rules, the results on any
|
2998 |
|
|
particular implementation are entirely unpredictable.
|
2999 |
|
|
.Sp
|
3000 |
|
|
Examples of code with undefined behavior are \f(CW\*(C`a = a++;\*(C'\fR, \f(CW\*(C`a[n]
|
3001 |
|
|
= b[n++]\*(C'\fR and \f(CW\*(C`a[i++] = i;\*(C'\fR. Some more complicated cases are not
|
3002 |
|
|
diagnosed by this option, and it may give an occasional false positive
|
3003 |
|
|
result, but in general it has been found fairly effective at detecting
|
3004 |
|
|
this sort of problem in programs.
|
3005 |
|
|
.Sp
|
3006 |
|
|
The standard is worded confusingly, therefore there is some debate
|
3007 |
|
|
over the precise meaning of the sequence point rules in subtle cases.
|
3008 |
|
|
Links to discussions of the problem, including proposed formal
|
3009 |
|
|
definitions, may be found on the \s-1GCC\s0 readings page, at
|
3010 |
|
|
<\fBhttp://gcc.gnu.org/readings.html\fR>.
|
3011 |
|
|
.Sp
|
3012 |
|
|
This warning is enabled by \fB\-Wall\fR for C and \*(C+.
|
3013 |
|
|
.IP "\fB\-Wreturn\-type\fR" 4
|
3014 |
|
|
.IX Item "-Wreturn-type"
|
3015 |
|
|
Warn whenever a function is defined with a return-type that defaults
|
3016 |
|
|
to \f(CW\*(C`int\*(C'\fR. Also warn about any \f(CW\*(C`return\*(C'\fR statement with no
|
3017 |
|
|
return-value in a function whose return-type is not \f(CW\*(C`void\*(C'\fR
|
3018 |
|
|
(falling off the end of the function body is considered returning
|
3019 |
|
|
without a value), and about a \f(CW\*(C`return\*(C'\fR statement with an
|
3020 |
|
|
expression in a function whose return-type is \f(CW\*(C`void\*(C'\fR.
|
3021 |
|
|
.Sp
|
3022 |
|
|
For \*(C+, a function without return type always produces a diagnostic
|
3023 |
|
|
message, even when \fB\-Wno\-return\-type\fR is specified. The only
|
3024 |
|
|
exceptions are \fBmain\fR and functions defined in system headers.
|
3025 |
|
|
.Sp
|
3026 |
|
|
This warning is enabled by \fB\-Wall\fR.
|
3027 |
|
|
.IP "\fB\-Wswitch\fR" 4
|
3028 |
|
|
.IX Item "-Wswitch"
|
3029 |
|
|
Warn whenever a \f(CW\*(C`switch\*(C'\fR statement has an index of enumerated type
|
3030 |
|
|
and lacks a \f(CW\*(C`case\*(C'\fR for one or more of the named codes of that
|
3031 |
|
|
enumeration. (The presence of a \f(CW\*(C`default\*(C'\fR label prevents this
|
3032 |
|
|
warning.) \f(CW\*(C`case\*(C'\fR labels outside the enumeration range also
|
3033 |
|
|
provoke warnings when this option is used (even if there is a
|
3034 |
|
|
\&\f(CW\*(C`default\*(C'\fR label).
|
3035 |
|
|
This warning is enabled by \fB\-Wall\fR.
|
3036 |
|
|
.IP "\fB\-Wswitch\-default\fR" 4
|
3037 |
|
|
.IX Item "-Wswitch-default"
|
3038 |
|
|
Warn whenever a \f(CW\*(C`switch\*(C'\fR statement does not have a \f(CW\*(C`default\*(C'\fR
|
3039 |
|
|
case.
|
3040 |
|
|
.IP "\fB\-Wswitch\-enum\fR" 4
|
3041 |
|
|
.IX Item "-Wswitch-enum"
|
3042 |
|
|
Warn whenever a \f(CW\*(C`switch\*(C'\fR statement has an index of enumerated type
|
3043 |
|
|
and lacks a \f(CW\*(C`case\*(C'\fR for one or more of the named codes of that
|
3044 |
|
|
enumeration. \f(CW\*(C`case\*(C'\fR labels outside the enumeration range also
|
3045 |
|
|
provoke warnings when this option is used. The only difference
|
3046 |
|
|
between \fB\-Wswitch\fR and this option is that this option gives a
|
3047 |
|
|
warning about an omitted enumeration code even if there is a
|
3048 |
|
|
\&\f(CW\*(C`default\*(C'\fR label.
|
3049 |
|
|
.IP "\fB\-Wsync\-nand\fR (C and \*(C+ only)" 4
|
3050 |
|
|
.IX Item "-Wsync-nand (C and only)"
|
3051 |
|
|
Warn when \f(CW\*(C`_\|_sync_fetch_and_nand\*(C'\fR and \f(CW\*(C`_\|_sync_nand_and_fetch\*(C'\fR
|
3052 |
|
|
built-in functions are used. These functions changed semantics in \s-1GCC\s0 4.4.
|
3053 |
|
|
.IP "\fB\-Wtrigraphs\fR" 4
|
3054 |
|
|
.IX Item "-Wtrigraphs"
|
3055 |
|
|
Warn if any trigraphs are encountered that might change the meaning of
|
3056 |
|
|
the program (trigraphs within comments are not warned about).
|
3057 |
|
|
This warning is enabled by \fB\-Wall\fR.
|
3058 |
|
|
.IP "\fB\-Wunused\-function\fR" 4
|
3059 |
|
|
.IX Item "-Wunused-function"
|
3060 |
|
|
Warn whenever a static function is declared but not defined or a
|
3061 |
|
|
non-inline static function is unused.
|
3062 |
|
|
This warning is enabled by \fB\-Wall\fR.
|
3063 |
|
|
.IP "\fB\-Wunused\-label\fR" 4
|
3064 |
|
|
.IX Item "-Wunused-label"
|
3065 |
|
|
Warn whenever a label is declared but not used.
|
3066 |
|
|
This warning is enabled by \fB\-Wall\fR.
|
3067 |
|
|
.Sp
|
3068 |
|
|
To suppress this warning use the \fBunused\fR attribute.
|
3069 |
|
|
.IP "\fB\-Wunused\-parameter\fR" 4
|
3070 |
|
|
.IX Item "-Wunused-parameter"
|
3071 |
|
|
Warn whenever a function parameter is unused aside from its declaration.
|
3072 |
|
|
.Sp
|
3073 |
|
|
To suppress this warning use the \fBunused\fR attribute.
|
3074 |
|
|
.IP "\fB\-Wno\-unused\-result\fR" 4
|
3075 |
|
|
.IX Item "-Wno-unused-result"
|
3076 |
|
|
Do not warn if a caller of a function marked with attribute
|
3077 |
|
|
\&\f(CW\*(C`warn_unused_result\*(C'\fR does not use
|
3078 |
|
|
its return value. The default is \fB\-Wunused\-result\fR.
|
3079 |
|
|
.IP "\fB\-Wunused\-variable\fR" 4
|
3080 |
|
|
.IX Item "-Wunused-variable"
|
3081 |
|
|
Warn whenever a local variable or non-constant static variable is unused
|
3082 |
|
|
aside from its declaration.
|
3083 |
|
|
This warning is enabled by \fB\-Wall\fR.
|
3084 |
|
|
.Sp
|
3085 |
|
|
To suppress this warning use the \fBunused\fR attribute.
|
3086 |
|
|
.IP "\fB\-Wunused\-value\fR" 4
|
3087 |
|
|
.IX Item "-Wunused-value"
|
3088 |
|
|
Warn whenever a statement computes a result that is explicitly not
|
3089 |
|
|
used. To suppress this warning cast the unused expression to
|
3090 |
|
|
\&\fBvoid\fR. This includes an expression-statement or the left-hand
|
3091 |
|
|
side of a comma expression that contains no side effects. For example,
|
3092 |
|
|
an expression such as \fBx[i,j]\fR will cause a warning, while
|
3093 |
|
|
\&\fBx[(void)i,j]\fR will not.
|
3094 |
|
|
.Sp
|
3095 |
|
|
This warning is enabled by \fB\-Wall\fR.
|
3096 |
|
|
.IP "\fB\-Wunused\fR" 4
|
3097 |
|
|
.IX Item "-Wunused"
|
3098 |
|
|
All the above \fB\-Wunused\fR options combined.
|
3099 |
|
|
.Sp
|
3100 |
|
|
In order to get a warning about an unused function parameter, you must
|
3101 |
|
|
either specify \fB\-Wextra \-Wunused\fR (note that \fB\-Wall\fR implies
|
3102 |
|
|
\&\fB\-Wunused\fR), or separately specify \fB\-Wunused\-parameter\fR.
|
3103 |
|
|
.IP "\fB\-Wuninitialized\fR" 4
|
3104 |
|
|
.IX Item "-Wuninitialized"
|
3105 |
|
|
Warn if an automatic variable is used without first being initialized
|
3106 |
|
|
or if a variable may be clobbered by a \f(CW\*(C`setjmp\*(C'\fR call. In \*(C+,
|
3107 |
|
|
warn if a non-static reference or non-static \fBconst\fR member
|
3108 |
|
|
appears in a class without constructors.
|
3109 |
|
|
.Sp
|
3110 |
|
|
If you want to warn about code which uses the uninitialized value of the
|
3111 |
|
|
variable in its own initializer, use the \fB\-Winit\-self\fR option.
|
3112 |
|
|
.Sp
|
3113 |
|
|
These warnings occur for individual uninitialized or clobbered
|
3114 |
|
|
elements of structure, union or array variables as well as for
|
3115 |
|
|
variables which are uninitialized or clobbered as a whole. They do
|
3116 |
|
|
not occur for variables or elements declared \f(CW\*(C`volatile\*(C'\fR. Because
|
3117 |
|
|
these warnings depend on optimization, the exact variables or elements
|
3118 |
|
|
for which there are warnings will depend on the precise optimization
|
3119 |
|
|
options and version of \s-1GCC\s0 used.
|
3120 |
|
|
.Sp
|
3121 |
|
|
Note that there may be no warning about a variable that is used only
|
3122 |
|
|
to compute a value that itself is never used, because such
|
3123 |
|
|
computations may be deleted by data flow analysis before the warnings
|
3124 |
|
|
are printed.
|
3125 |
|
|
.Sp
|
3126 |
|
|
These warnings are made optional because \s-1GCC\s0 is not smart
|
3127 |
|
|
enough to see all the reasons why the code might be correct
|
3128 |
|
|
despite appearing to have an error. Here is one example of how
|
3129 |
|
|
this can happen:
|
3130 |
|
|
.Sp
|
3131 |
|
|
.Vb 12
|
3132 |
|
|
\& {
|
3133 |
|
|
\& int x;
|
3134 |
|
|
\& switch (y)
|
3135 |
|
|
\& {
|
3136 |
|
|
\& case 1: x = 1;
|
3137 |
|
|
\& break;
|
3138 |
|
|
\& case 2: x = 4;
|
3139 |
|
|
\& break;
|
3140 |
|
|
\& case 3: x = 5;
|
3141 |
|
|
\& }
|
3142 |
|
|
\& foo (x);
|
3143 |
|
|
\& }
|
3144 |
|
|
.Ve
|
3145 |
|
|
.Sp
|
3146 |
|
|
If the value of \f(CW\*(C`y\*(C'\fR is always 1, 2 or 3, then \f(CW\*(C`x\*(C'\fR is
|
3147 |
|
|
always initialized, but \s-1GCC\s0 doesn't know this. Here is
|
3148 |
|
|
another common case:
|
3149 |
|
|
.Sp
|
3150 |
|
|
.Vb 6
|
3151 |
|
|
\& {
|
3152 |
|
|
\& int save_y;
|
3153 |
|
|
\& if (change_y) save_y = y, y = new_y;
|
3154 |
|
|
\& ...
|
3155 |
|
|
\& if (change_y) y = save_y;
|
3156 |
|
|
\& }
|
3157 |
|
|
.Ve
|
3158 |
|
|
.Sp
|
3159 |
|
|
This has no bug because \f(CW\*(C`save_y\*(C'\fR is used only if it is set.
|
3160 |
|
|
.Sp
|
3161 |
|
|
This option also warns when a non-volatile automatic variable might be
|
3162 |
|
|
changed by a call to \f(CW\*(C`longjmp\*(C'\fR. These warnings as well are possible
|
3163 |
|
|
only in optimizing compilation.
|
3164 |
|
|
.Sp
|
3165 |
|
|
The compiler sees only the calls to \f(CW\*(C`setjmp\*(C'\fR. It cannot know
|
3166 |
|
|
where \f(CW\*(C`longjmp\*(C'\fR will be called; in fact, a signal handler could
|
3167 |
|
|
call it at any point in the code. As a result, you may get a warning
|
3168 |
|
|
even when there is in fact no problem because \f(CW\*(C`longjmp\*(C'\fR cannot
|
3169 |
|
|
in fact be called at the place which would cause a problem.
|
3170 |
|
|
.Sp
|
3171 |
|
|
Some spurious warnings can be avoided if you declare all the functions
|
3172 |
|
|
you use that never return as \f(CW\*(C`noreturn\*(C'\fR.
|
3173 |
|
|
.Sp
|
3174 |
|
|
This warning is enabled by \fB\-Wall\fR or \fB\-Wextra\fR.
|
3175 |
|
|
.IP "\fB\-Wunknown\-pragmas\fR" 4
|
3176 |
|
|
.IX Item "-Wunknown-pragmas"
|
3177 |
|
|
Warn when a #pragma directive is encountered which is not understood by
|
3178 |
|
|
\&\s-1GCC\s0. If this command line option is used, warnings will even be issued
|
3179 |
|
|
for unknown pragmas in system header files. This is not the case if
|
3180 |
|
|
the warnings were only enabled by the \fB\-Wall\fR command line option.
|
3181 |
|
|
.IP "\fB\-Wno\-pragmas\fR" 4
|
3182 |
|
|
.IX Item "-Wno-pragmas"
|
3183 |
|
|
Do not warn about misuses of pragmas, such as incorrect parameters,
|
3184 |
|
|
invalid syntax, or conflicts between pragmas. See also
|
3185 |
|
|
\&\fB\-Wunknown\-pragmas\fR.
|
3186 |
|
|
.IP "\fB\-Wstrict\-aliasing\fR" 4
|
3187 |
|
|
.IX Item "-Wstrict-aliasing"
|
3188 |
|
|
This option is only active when \fB\-fstrict\-aliasing\fR is active.
|
3189 |
|
|
It warns about code which might break the strict aliasing rules that the
|
3190 |
|
|
compiler is using for optimization. The warning does not catch all
|
3191 |
|
|
cases, but does attempt to catch the more common pitfalls. It is
|
3192 |
|
|
included in \fB\-Wall\fR.
|
3193 |
|
|
It is equivalent to \fB\-Wstrict\-aliasing=3\fR
|
3194 |
|
|
.IP "\fB\-Wstrict\-aliasing=n\fR" 4
|
3195 |
|
|
.IX Item "-Wstrict-aliasing=n"
|
3196 |
|
|
This option is only active when \fB\-fstrict\-aliasing\fR is active.
|
3197 |
|
|
It warns about code which might break the strict aliasing rules that the
|
3198 |
|
|
compiler is using for optimization.
|
3199 |
|
|
Higher levels correspond to higher accuracy (fewer false positives).
|
3200 |
|
|
Higher levels also correspond to more effort, similar to the way \-O works.
|
3201 |
|
|
\&\fB\-Wstrict\-aliasing\fR is equivalent to \fB\-Wstrict\-aliasing=n\fR,
|
3202 |
|
|
with n=3.
|
3203 |
|
|
.Sp
|
3204 |
|
|
Level 1: Most aggressive, quick, least accurate.
|
3205 |
|
|
Possibly useful when higher levels
|
3206 |
|
|
do not warn but \-fstrict\-aliasing still breaks the code, as it has very few
|
3207 |
|
|
false negatives. However, it has many false positives.
|
3208 |
|
|
Warns for all pointer conversions between possibly incompatible types,
|
3209 |
|
|
even if never dereferenced. Runs in the frontend only.
|
3210 |
|
|
.Sp
|
3211 |
|
|
Level 2: Aggressive, quick, not too precise.
|
3212 |
|
|
May still have many false positives (not as many as level 1 though),
|
3213 |
|
|
and few false negatives (but possibly more than level 1).
|
3214 |
|
|
Unlike level 1, it only warns when an address is taken. Warns about
|
3215 |
|
|
incomplete types. Runs in the frontend only.
|
3216 |
|
|
.Sp
|
3217 |
|
|
Level 3 (default for \fB\-Wstrict\-aliasing\fR):
|
3218 |
|
|
Should have very few false positives and few false
|
3219 |
|
|
negatives. Slightly slower than levels 1 or 2 when optimization is enabled.
|
3220 |
|
|
Takes care of the common pun+dereference pattern in the frontend:
|
3221 |
|
|
\&\f(CW\*(C`*(int*)&some_float\*(C'\fR.
|
3222 |
|
|
If optimization is enabled, it also runs in the backend, where it deals
|
3223 |
|
|
with multiple statement cases using flow-sensitive points-to information.
|
3224 |
|
|
Only warns when the converted pointer is dereferenced.
|
3225 |
|
|
Does not warn about incomplete types.
|
3226 |
|
|
.IP "\fB\-Wstrict\-overflow\fR" 4
|
3227 |
|
|
.IX Item "-Wstrict-overflow"
|
3228 |
|
|
.PD 0
|
3229 |
|
|
.IP "\fB\-Wstrict\-overflow=\fR\fIn\fR" 4
|
3230 |
|
|
.IX Item "-Wstrict-overflow=n"
|
3231 |
|
|
.PD
|
3232 |
|
|
This option is only active when \fB\-fstrict\-overflow\fR is active.
|
3233 |
|
|
It warns about cases where the compiler optimizes based on the
|
3234 |
|
|
assumption that signed overflow does not occur. Note that it does not
|
3235 |
|
|
warn about all cases where the code might overflow: it only warns
|
3236 |
|
|
about cases where the compiler implements some optimization. Thus
|
3237 |
|
|
this warning depends on the optimization level.
|
3238 |
|
|
.Sp
|
3239 |
|
|
An optimization which assumes that signed overflow does not occur is
|
3240 |
|
|
perfectly safe if the values of the variables involved are such that
|
3241 |
|
|
overflow never does, in fact, occur. Therefore this warning can
|
3242 |
|
|
easily give a false positive: a warning about code which is not
|
3243 |
|
|
actually a problem. To help focus on important issues, several
|
3244 |
|
|
warning levels are defined. No warnings are issued for the use of
|
3245 |
|
|
undefined signed overflow when estimating how many iterations a loop
|
3246 |
|
|
will require, in particular when determining whether a loop will be
|
3247 |
|
|
executed at all.
|
3248 |
|
|
.RS 4
|
3249 |
|
|
.IP "\fB\-Wstrict\-overflow=1\fR" 4
|
3250 |
|
|
.IX Item "-Wstrict-overflow=1"
|
3251 |
|
|
Warn about cases which are both questionable and easy to avoid. For
|
3252 |
|
|
example: \f(CW\*(C`x + 1 > x\*(C'\fR; with \fB\-fstrict\-overflow\fR, the
|
3253 |
|
|
compiler will simplify this to \f(CW1\fR. This level of
|
3254 |
|
|
\&\fB\-Wstrict\-overflow\fR is enabled by \fB\-Wall\fR; higher levels
|
3255 |
|
|
are not, and must be explicitly requested.
|
3256 |
|
|
.IP "\fB\-Wstrict\-overflow=2\fR" 4
|
3257 |
|
|
.IX Item "-Wstrict-overflow=2"
|
3258 |
|
|
Also warn about other cases where a comparison is simplified to a
|
3259 |
|
|
constant. For example: \f(CW\*(C`abs (x) >= 0\*(C'\fR. This can only be
|
3260 |
|
|
simplified when \fB\-fstrict\-overflow\fR is in effect, because
|
3261 |
|
|
\&\f(CW\*(C`abs (INT_MIN)\*(C'\fR overflows to \f(CW\*(C`INT_MIN\*(C'\fR, which is less than
|
3262 |
|
|
zero. \fB\-Wstrict\-overflow\fR (with no level) is the same as
|
3263 |
|
|
\&\fB\-Wstrict\-overflow=2\fR.
|
3264 |
|
|
.IP "\fB\-Wstrict\-overflow=3\fR" 4
|
3265 |
|
|
.IX Item "-Wstrict-overflow=3"
|
3266 |
|
|
Also warn about other cases where a comparison is simplified. For
|
3267 |
|
|
example: \f(CW\*(C`x + 1 > 1\*(C'\fR will be simplified to \f(CW\*(C`x > 0\*(C'\fR.
|
3268 |
|
|
.IP "\fB\-Wstrict\-overflow=4\fR" 4
|
3269 |
|
|
.IX Item "-Wstrict-overflow=4"
|
3270 |
|
|
Also warn about other simplifications not covered by the above cases.
|
3271 |
|
|
For example: \f(CW\*(C`(x * 10) / 5\*(C'\fR will be simplified to \f(CW\*(C`x * 2\*(C'\fR.
|
3272 |
|
|
.IP "\fB\-Wstrict\-overflow=5\fR" 4
|
3273 |
|
|
.IX Item "-Wstrict-overflow=5"
|
3274 |
|
|
Also warn about cases where the compiler reduces the magnitude of a
|
3275 |
|
|
constant involved in a comparison. For example: \f(CW\*(C`x + 2 > y\*(C'\fR will
|
3276 |
|
|
be simplified to \f(CW\*(C`x + 1 >= y\*(C'\fR. This is reported only at the
|
3277 |
|
|
highest warning level because this simplification applies to many
|
3278 |
|
|
comparisons, so this warning level will give a very large number of
|
3279 |
|
|
false positives.
|
3280 |
|
|
.RE
|
3281 |
|
|
.RS 4
|
3282 |
|
|
.RE
|
3283 |
|
|
.IP "\fB\-Warray\-bounds\fR" 4
|
3284 |
|
|
.IX Item "-Warray-bounds"
|
3285 |
|
|
This option is only active when \fB\-ftree\-vrp\fR is active
|
3286 |
|
|
(default for \-O2 and above). It warns about subscripts to arrays
|
3287 |
|
|
that are always out of bounds. This warning is enabled by \fB\-Wall\fR.
|
3288 |
|
|
.IP "\fB\-Wno\-div\-by\-zero\fR" 4
|
3289 |
|
|
.IX Item "-Wno-div-by-zero"
|
3290 |
|
|
Do not warn about compile-time integer division by zero. Floating point
|
3291 |
|
|
division by zero is not warned about, as it can be a legitimate way of
|
3292 |
|
|
obtaining infinities and NaNs.
|
3293 |
|
|
.IP "\fB\-Wsystem\-headers\fR" 4
|
3294 |
|
|
.IX Item "-Wsystem-headers"
|
3295 |
|
|
Print warning messages for constructs found in system header files.
|
3296 |
|
|
Warnings from system headers are normally suppressed, on the assumption
|
3297 |
|
|
that they usually do not indicate real problems and would only make the
|
3298 |
|
|
compiler output harder to read. Using this command line option tells
|
3299 |
|
|
\&\s-1GCC\s0 to emit warnings from system headers as if they occurred in user
|
3300 |
|
|
code. However, note that using \fB\-Wall\fR in conjunction with this
|
3301 |
|
|
option will \fInot\fR warn about unknown pragmas in system
|
3302 |
|
|
headers\-\-\-for that, \fB\-Wunknown\-pragmas\fR must also be used.
|
3303 |
|
|
.IP "\fB\-Wfloat\-equal\fR" 4
|
3304 |
|
|
.IX Item "-Wfloat-equal"
|
3305 |
|
|
Warn if floating point values are used in equality comparisons.
|
3306 |
|
|
.Sp
|
3307 |
|
|
The idea behind this is that sometimes it is convenient (for the
|
3308 |
|
|
programmer) to consider floating-point values as approximations to
|
3309 |
|
|
infinitely precise real numbers. If you are doing this, then you need
|
3310 |
|
|
to compute (by analyzing the code, or in some other way) the maximum or
|
3311 |
|
|
likely maximum error that the computation introduces, and allow for it
|
3312 |
|
|
when performing comparisons (and when producing output, but that's a
|
3313 |
|
|
different problem). In particular, instead of testing for equality, you
|
3314 |
|
|
would check to see whether the two values have ranges that overlap; and
|
3315 |
|
|
this is done with the relational operators, so equality comparisons are
|
3316 |
|
|
probably mistaken.
|
3317 |
|
|
.IP "\fB\-Wtraditional\fR (C and Objective-C only)" 4
|
3318 |
|
|
.IX Item "-Wtraditional (C and Objective-C only)"
|
3319 |
|
|
Warn about certain constructs that behave differently in traditional and
|
3320 |
|
|
\&\s-1ISO\s0 C. Also warn about \s-1ISO\s0 C constructs that have no traditional C
|
3321 |
|
|
equivalent, and/or problematic constructs which should be avoided.
|
3322 |
|
|
.RS 4
|
3323 |
|
|
.IP "\(bu" 4
|
3324 |
|
|
Macro parameters that appear within string literals in the macro body.
|
3325 |
|
|
In traditional C macro replacement takes place within string literals,
|
3326 |
|
|
but does not in \s-1ISO\s0 C.
|
3327 |
|
|
.IP "\(bu" 4
|
3328 |
|
|
In traditional C, some preprocessor directives did not exist.
|
3329 |
|
|
Traditional preprocessors would only consider a line to be a directive
|
3330 |
|
|
if the \fB#\fR appeared in column 1 on the line. Therefore
|
3331 |
|
|
\&\fB\-Wtraditional\fR warns about directives that traditional C
|
3332 |
|
|
understands but would ignore because the \fB#\fR does not appear as the
|
3333 |
|
|
first character on the line. It also suggests you hide directives like
|
3334 |
|
|
\&\fB#pragma\fR not understood by traditional C by indenting them. Some
|
3335 |
|
|
traditional implementations would not recognize \fB#elif\fR, so it
|
3336 |
|
|
suggests avoiding it altogether.
|
3337 |
|
|
.IP "\(bu" 4
|
3338 |
|
|
A function-like macro that appears without arguments.
|
3339 |
|
|
.IP "\(bu" 4
|
3340 |
|
|
The unary plus operator.
|
3341 |
|
|
.IP "\(bu" 4
|
3342 |
|
|
The \fBU\fR integer constant suffix, or the \fBF\fR or \fBL\fR floating point
|
3343 |
|
|
constant suffixes. (Traditional C does support the \fBL\fR suffix on integer
|
3344 |
|
|
constants.) Note, these suffixes appear in macros defined in the system
|
3345 |
|
|
headers of most modern systems, e.g. the \fB_MIN\fR/\fB_MAX\fR macros in \f(CW\*(C`\*(C'\fR.
|
3346 |
|
|
Use of these macros in user code might normally lead to spurious
|
3347 |
|
|
warnings, however \s-1GCC\s0's integrated preprocessor has enough context to
|
3348 |
|
|
avoid warning in these cases.
|
3349 |
|
|
.IP "\(bu" 4
|
3350 |
|
|
A function declared external in one block and then used after the end of
|
3351 |
|
|
the block.
|
3352 |
|
|
.IP "\(bu" 4
|
3353 |
|
|
A \f(CW\*(C`switch\*(C'\fR statement has an operand of type \f(CW\*(C`long\*(C'\fR.
|
3354 |
|
|
.IP "\(bu" 4
|
3355 |
|
|
A non\-\f(CW\*(C`static\*(C'\fR function declaration follows a \f(CW\*(C`static\*(C'\fR one.
|
3356 |
|
|
This construct is not accepted by some traditional C compilers.
|
3357 |
|
|
.IP "\(bu" 4
|
3358 |
|
|
The \s-1ISO\s0 type of an integer constant has a different width or
|
3359 |
|
|
signedness from its traditional type. This warning is only issued if
|
3360 |
|
|
the base of the constant is ten. I.e. hexadecimal or octal values, which
|
3361 |
|
|
typically represent bit patterns, are not warned about.
|
3362 |
|
|
.IP "\(bu" 4
|
3363 |
|
|
Usage of \s-1ISO\s0 string concatenation is detected.
|
3364 |
|
|
.IP "\(bu" 4
|
3365 |
|
|
Initialization of automatic aggregates.
|
3366 |
|
|
.IP "\(bu" 4
|
3367 |
|
|
Identifier conflicts with labels. Traditional C lacks a separate
|
3368 |
|
|
namespace for labels.
|
3369 |
|
|
.IP "\(bu" 4
|
3370 |
|
|
Initialization of unions. If the initializer is zero, the warning is
|
3371 |
|
|
omitted. This is done under the assumption that the zero initializer in
|
3372 |
|
|
user code appears conditioned on e.g. \f(CW\*(C`_\|_STDC_\|_\*(C'\fR to avoid missing
|
3373 |
|
|
initializer warnings and relies on default initialization to zero in the
|
3374 |
|
|
traditional C case.
|
3375 |
|
|
.IP "\(bu" 4
|
3376 |
|
|
Conversions by prototypes between fixed/floating point values and vice
|
3377 |
|
|
versa. The absence of these prototypes when compiling with traditional
|
3378 |
|
|
C would cause serious problems. This is a subset of the possible
|
3379 |
|
|
conversion warnings, for the full set use \fB\-Wtraditional\-conversion\fR.
|
3380 |
|
|
.IP "\(bu" 4
|
3381 |
|
|
Use of \s-1ISO\s0 C style function definitions. This warning intentionally is
|
3382 |
|
|
\&\fInot\fR issued for prototype declarations or variadic functions
|
3383 |
|
|
because these \s-1ISO\s0 C features will appear in your code when using
|
3384 |
|
|
libiberty's traditional C compatibility macros, \f(CW\*(C`PARAMS\*(C'\fR and
|
3385 |
|
|
\&\f(CW\*(C`VPARAMS\*(C'\fR. This warning is also bypassed for nested functions
|
3386 |
|
|
because that feature is already a \s-1GCC\s0 extension and thus not relevant to
|
3387 |
|
|
traditional C compatibility.
|
3388 |
|
|
.RE
|
3389 |
|
|
.RS 4
|
3390 |
|
|
.RE
|
3391 |
|
|
.IP "\fB\-Wtraditional\-conversion\fR (C and Objective-C only)" 4
|
3392 |
|
|
.IX Item "-Wtraditional-conversion (C and Objective-C only)"
|
3393 |
|
|
Warn if a prototype causes a type conversion that is different from what
|
3394 |
|
|
would happen to the same argument in the absence of a prototype. This
|
3395 |
|
|
includes conversions of fixed point to floating and vice versa, and
|
3396 |
|
|
conversions changing the width or signedness of a fixed point argument
|
3397 |
|
|
except when the same as the default promotion.
|
3398 |
|
|
.IP "\fB\-Wdeclaration\-after\-statement\fR (C and Objective-C only)" 4
|
3399 |
|
|
.IX Item "-Wdeclaration-after-statement (C and Objective-C only)"
|
3400 |
|
|
Warn when a declaration is found after a statement in a block. This
|
3401 |
|
|
construct, known from \*(C+, was introduced with \s-1ISO\s0 C99 and is by default
|
3402 |
|
|
allowed in \s-1GCC\s0. It is not supported by \s-1ISO\s0 C90 and was not supported by
|
3403 |
|
|
\&\s-1GCC\s0 versions before \s-1GCC\s0 3.0.
|
3404 |
|
|
.IP "\fB\-Wundef\fR" 4
|
3405 |
|
|
.IX Item "-Wundef"
|
3406 |
|
|
Warn if an undefined identifier is evaluated in an \fB#if\fR directive.
|
3407 |
|
|
.IP "\fB\-Wno\-endif\-labels\fR" 4
|
3408 |
|
|
.IX Item "-Wno-endif-labels"
|
3409 |
|
|
Do not warn whenever an \fB#else\fR or an \fB#endif\fR are followed by text.
|
3410 |
|
|
.IP "\fB\-Wshadow\fR" 4
|
3411 |
|
|
.IX Item "-Wshadow"
|
3412 |
|
|
Warn whenever a local variable shadows another local variable, parameter or
|
3413 |
|
|
global variable or whenever a built-in function is shadowed.
|
3414 |
|
|
.IP "\fB\-Wlarger\-than=\fR\fIlen\fR" 4
|
3415 |
|
|
.IX Item "-Wlarger-than=len"
|
3416 |
|
|
Warn whenever an object of larger than \fIlen\fR bytes is defined.
|
3417 |
|
|
.IP "\fB\-Wframe\-larger\-than=\fR\fIlen\fR" 4
|
3418 |
|
|
.IX Item "-Wframe-larger-than=len"
|
3419 |
|
|
Warn if the size of a function frame is larger than \fIlen\fR bytes.
|
3420 |
|
|
The computation done to determine the stack frame size is approximate
|
3421 |
|
|
and not conservative.
|
3422 |
|
|
The actual requirements may be somewhat greater than \fIlen\fR
|
3423 |
|
|
even if you do not get a warning. In addition, any space allocated
|
3424 |
|
|
via \f(CW\*(C`alloca\*(C'\fR, variable-length arrays, or related constructs
|
3425 |
|
|
is not included by the compiler when determining
|
3426 |
|
|
whether or not to issue a warning.
|
3427 |
|
|
.IP "\fB\-Wunsafe\-loop\-optimizations\fR" 4
|
3428 |
|
|
.IX Item "-Wunsafe-loop-optimizations"
|
3429 |
|
|
Warn if the loop cannot be optimized because the compiler could not
|
3430 |
|
|
assume anything on the bounds of the loop indices. With
|
3431 |
|
|
\&\fB\-funsafe\-loop\-optimizations\fR warn if the compiler made
|
3432 |
|
|
such assumptions.
|
3433 |
|
|
.IP "\fB\-Wno\-pedantic\-ms\-format\fR (MinGW targets only)" 4
|
3434 |
|
|
.IX Item "-Wno-pedantic-ms-format (MinGW targets only)"
|
3435 |
|
|
Disables the warnings about non-ISO \f(CW\*(C`printf\*(C'\fR / \f(CW\*(C`scanf\*(C'\fR format
|
3436 |
|
|
width specifiers \f(CW\*(C`I32\*(C'\fR, \f(CW\*(C`I64\*(C'\fR, and \f(CW\*(C`I\*(C'\fR used on Windows targets
|
3437 |
|
|
depending on the \s-1MS\s0 runtime, when you are using the options \fB\-Wformat\fR
|
3438 |
|
|
and \fB\-pedantic\fR without gnu-extensions.
|
3439 |
|
|
.IP "\fB\-Wpointer\-arith\fR" 4
|
3440 |
|
|
.IX Item "-Wpointer-arith"
|
3441 |
|
|
Warn about anything that depends on the \*(L"size of\*(R" a function type or
|
3442 |
|
|
of \f(CW\*(C`void\*(C'\fR. \s-1GNU\s0 C assigns these types a size of 1, for
|
3443 |
|
|
convenience in calculations with \f(CW\*(C`void *\*(C'\fR pointers and pointers
|
3444 |
|
|
to functions. In \*(C+, warn also when an arithmetic operation involves
|
3445 |
|
|
\&\f(CW\*(C`NULL\*(C'\fR. This warning is also enabled by \fB\-pedantic\fR.
|
3446 |
|
|
.IP "\fB\-Wtype\-limits\fR" 4
|
3447 |
|
|
.IX Item "-Wtype-limits"
|
3448 |
|
|
Warn if a comparison is always true or always false due to the limited
|
3449 |
|
|
range of the data type, but do not warn for constant expressions. For
|
3450 |
|
|
example, warn if an unsigned variable is compared against zero with
|
3451 |
|
|
\&\fB<\fR or \fB>=\fR. This warning is also enabled by
|
3452 |
|
|
\&\fB\-Wextra\fR.
|
3453 |
|
|
.IP "\fB\-Wbad\-function\-cast\fR (C and Objective-C only)" 4
|
3454 |
|
|
.IX Item "-Wbad-function-cast (C and Objective-C only)"
|
3455 |
|
|
Warn whenever a function call is cast to a non-matching type.
|
3456 |
|
|
For example, warn if \f(CW\*(C`int malloc()\*(C'\fR is cast to \f(CW\*(C`anything *\*(C'\fR.
|
3457 |
|
|
.IP "\fB\-Wc++\-compat\fR (C and Objective-C only)" 4
|
3458 |
|
|
.IX Item "-Wc++-compat (C and Objective-C only)"
|
3459 |
|
|
Warn about \s-1ISO\s0 C constructs that are outside of the common subset of
|
3460 |
|
|
\&\s-1ISO\s0 C and \s-1ISO\s0 \*(C+, e.g. request for implicit conversion from
|
3461 |
|
|
\&\f(CW\*(C`void *\*(C'\fR to a pointer to non\-\f(CW\*(C`void\*(C'\fR type.
|
3462 |
|
|
.IP "\fB\-Wc++0x\-compat\fR (\*(C+ and Objective\-\*(C+ only)" 4
|
3463 |
|
|
.IX Item "-Wc++0x-compat ( and Objective- only)"
|
3464 |
|
|
Warn about \*(C+ constructs whose meaning differs between \s-1ISO\s0 \*(C+ 1998 and
|
3465 |
|
|
\&\s-1ISO\s0 \*(C+ 200x, e.g., identifiers in \s-1ISO\s0 \*(C+ 1998 that will become keywords
|
3466 |
|
|
in \s-1ISO\s0 \*(C+ 200x. This warning is enabled by \fB\-Wall\fR.
|
3467 |
|
|
.IP "\fB\-Wcast\-qual\fR" 4
|
3468 |
|
|
.IX Item "-Wcast-qual"
|
3469 |
|
|
Warn whenever a pointer is cast so as to remove a type qualifier from
|
3470 |
|
|
the target type. For example, warn if a \f(CW\*(C`const char *\*(C'\fR is cast
|
3471 |
|
|
to an ordinary \f(CW\*(C`char *\*(C'\fR.
|
3472 |
|
|
.Sp
|
3473 |
|
|
Also warn when making a cast which introduces a type qualifier in an
|
3474 |
|
|
unsafe way. For example, casting \f(CW\*(C`char **\*(C'\fR to \f(CW\*(C`const char **\*(C'\fR
|
3475 |
|
|
is unsafe, as in this example:
|
3476 |
|
|
.Sp
|
3477 |
|
|
.Vb 6
|
3478 |
|
|
\& /* p is char ** value. */
|
3479 |
|
|
\& const char **q = (const char **) p;
|
3480 |
|
|
\& /* Assignment of readonly string to const char * is OK. */
|
3481 |
|
|
\& *q = "string";
|
3482 |
|
|
\& /* Now char** pointer points to read\-only memory. */
|
3483 |
|
|
\& **p = \*(Aqb\*(Aq;
|
3484 |
|
|
.Ve
|
3485 |
|
|
.IP "\fB\-Wcast\-align\fR" 4
|
3486 |
|
|
.IX Item "-Wcast-align"
|
3487 |
|
|
Warn whenever a pointer is cast such that the required alignment of the
|
3488 |
|
|
target is increased. For example, warn if a \f(CW\*(C`char *\*(C'\fR is cast to
|
3489 |
|
|
an \f(CW\*(C`int *\*(C'\fR on machines where integers can only be accessed at
|
3490 |
|
|
two\- or four-byte boundaries.
|
3491 |
|
|
.IP "\fB\-Wwrite\-strings\fR" 4
|
3492 |
|
|
.IX Item "-Wwrite-strings"
|
3493 |
|
|
When compiling C, give string constants the type \f(CW\*(C`const
|
3494 |
|
|
char[\f(CIlength\f(CW]\*(C'\fR so that copying the address of one into a
|
3495 |
|
|
non\-\f(CW\*(C`const\*(C'\fR \f(CW\*(C`char *\*(C'\fR pointer will get a warning. These
|
3496 |
|
|
warnings will help you find at compile time code that can try to write
|
3497 |
|
|
into a string constant, but only if you have been very careful about
|
3498 |
|
|
using \f(CW\*(C`const\*(C'\fR in declarations and prototypes. Otherwise, it will
|
3499 |
|
|
just be a nuisance. This is why we did not make \fB\-Wall\fR request
|
3500 |
|
|
these warnings.
|
3501 |
|
|
.Sp
|
3502 |
|
|
When compiling \*(C+, warn about the deprecated conversion from string
|
3503 |
|
|
literals to \f(CW\*(C`char *\*(C'\fR. This warning is enabled by default for \*(C+
|
3504 |
|
|
programs.
|
3505 |
|
|
.IP "\fB\-Wclobbered\fR" 4
|
3506 |
|
|
.IX Item "-Wclobbered"
|
3507 |
|
|
Warn for variables that might be changed by \fBlongjmp\fR or
|
3508 |
|
|
\&\fBvfork\fR. This warning is also enabled by \fB\-Wextra\fR.
|
3509 |
|
|
.IP "\fB\-Wconversion\fR" 4
|
3510 |
|
|
.IX Item "-Wconversion"
|
3511 |
|
|
Warn for implicit conversions that may alter a value. This includes
|
3512 |
|
|
conversions between real and integer, like \f(CW\*(C`abs (x)\*(C'\fR when
|
3513 |
|
|
\&\f(CW\*(C`x\*(C'\fR is \f(CW\*(C`double\*(C'\fR; conversions between signed and unsigned,
|
3514 |
|
|
like \f(CW\*(C`unsigned ui = \-1\*(C'\fR; and conversions to smaller types, like
|
3515 |
|
|
\&\f(CW\*(C`sqrtf (M_PI)\*(C'\fR. Do not warn for explicit casts like \f(CW\*(C`abs
|
3516 |
|
|
((int) x)\*(C'\fR and \f(CW\*(C`ui = (unsigned) \-1\*(C'\fR, or if the value is not
|
3517 |
|
|
changed by the conversion like in \f(CW\*(C`abs (2.0)\*(C'\fR. Warnings about
|
3518 |
|
|
conversions between signed and unsigned integers can be disabled by
|
3519 |
|
|
using \fB\-Wno\-sign\-conversion\fR.
|
3520 |
|
|
.Sp
|
3521 |
|
|
For \*(C+, also warn for confusing overload resolution for user-defined
|
3522 |
|
|
conversions; and conversions that will never use a type conversion
|
3523 |
|
|
operator: conversions to \f(CW\*(C`void\*(C'\fR, the same type, a base class or a
|
3524 |
|
|
reference to them. Warnings about conversions between signed and
|
3525 |
|
|
unsigned integers are disabled by default in \*(C+ unless
|
3526 |
|
|
\&\fB\-Wsign\-conversion\fR is explicitly enabled.
|
3527 |
|
|
.IP "\fB\-Wno\-conversion\-null\fR (\*(C+ and Objective\-\*(C+ only)" 4
|
3528 |
|
|
.IX Item "-Wno-conversion-null ( and Objective- only)"
|
3529 |
|
|
Do not warn for conversions between \f(CW\*(C`NULL\*(C'\fR and non-pointer
|
3530 |
|
|
types. \fB\-Wconversion\-null\fR is enabled by default.
|
3531 |
|
|
.IP "\fB\-Wempty\-body\fR" 4
|
3532 |
|
|
.IX Item "-Wempty-body"
|
3533 |
|
|
Warn if an empty body occurs in an \fBif\fR, \fBelse\fR or \fBdo
|
3534 |
|
|
while\fR statement. This warning is also enabled by \fB\-Wextra\fR.
|
3535 |
|
|
.IP "\fB\-Wenum\-compare\fR" 4
|
3536 |
|
|
.IX Item "-Wenum-compare"
|
3537 |
|
|
Warn about a comparison between values of different enum types. In \*(C+
|
3538 |
|
|
this warning is enabled by default. In C this warning is enabled by
|
3539 |
|
|
\&\fB\-Wall\fR.
|
3540 |
|
|
.IP "\fB\-Wjump\-misses\-init\fR (C, Objective-C only)" 4
|
3541 |
|
|
.IX Item "-Wjump-misses-init (C, Objective-C only)"
|
3542 |
|
|
Warn if a \f(CW\*(C`goto\*(C'\fR statement or a \f(CW\*(C`switch\*(C'\fR statement jumps
|
3543 |
|
|
forward across the initialization of a variable, or jumps backward to a
|
3544 |
|
|
label after the variable has been initialized. This only warns about
|
3545 |
|
|
variables which are initialized when they are declared. This warning is
|
3546 |
|
|
only supported for C and Objective C; in \*(C+ this sort of branch is an
|
3547 |
|
|
error in any case.
|
3548 |
|
|
.Sp
|
3549 |
|
|
\&\fB\-Wjump\-misses\-init\fR is included in \fB\-Wc++\-compat\fR. It
|
3550 |
|
|
can be disabled with the \fB\-Wno\-jump\-misses\-init\fR option.
|
3551 |
|
|
.IP "\fB\-Wsign\-compare\fR" 4
|
3552 |
|
|
.IX Item "-Wsign-compare"
|
3553 |
|
|
Warn when a comparison between signed and unsigned values could produce
|
3554 |
|
|
an incorrect result when the signed value is converted to unsigned.
|
3555 |
|
|
This warning is also enabled by \fB\-Wextra\fR; to get the other warnings
|
3556 |
|
|
of \fB\-Wextra\fR without this warning, use \fB\-Wextra \-Wno\-sign\-compare\fR.
|
3557 |
|
|
.IP "\fB\-Wsign\-conversion\fR" 4
|
3558 |
|
|
.IX Item "-Wsign-conversion"
|
3559 |
|
|
Warn for implicit conversions that may change the sign of an integer
|
3560 |
|
|
value, like assigning a signed integer expression to an unsigned
|
3561 |
|
|
integer variable. An explicit cast silences the warning. In C, this
|
3562 |
|
|
option is enabled also by \fB\-Wconversion\fR.
|
3563 |
|
|
.IP "\fB\-Waddress\fR" 4
|
3564 |
|
|
.IX Item "-Waddress"
|
3565 |
|
|
Warn about suspicious uses of memory addresses. These include using
|
3566 |
|
|
the address of a function in a conditional expression, such as
|
3567 |
|
|
\&\f(CW\*(C`void func(void); if (func)\*(C'\fR, and comparisons against the memory
|
3568 |
|
|
address of a string literal, such as \f(CW\*(C`if (x == "abc")\*(C'\fR. Such
|
3569 |
|
|
uses typically indicate a programmer error: the address of a function
|
3570 |
|
|
always evaluates to true, so their use in a conditional usually
|
3571 |
|
|
indicate that the programmer forgot the parentheses in a function
|
3572 |
|
|
call; and comparisons against string literals result in unspecified
|
3573 |
|
|
behavior and are not portable in C, so they usually indicate that the
|
3574 |
|
|
programmer intended to use \f(CW\*(C`strcmp\*(C'\fR. This warning is enabled by
|
3575 |
|
|
\&\fB\-Wall\fR.
|
3576 |
|
|
.IP "\fB\-Wlogical\-op\fR" 4
|
3577 |
|
|
.IX Item "-Wlogical-op"
|
3578 |
|
|
Warn about suspicious uses of logical operators in expressions.
|
3579 |
|
|
This includes using logical operators in contexts where a
|
3580 |
|
|
bit-wise operator is likely to be expected.
|
3581 |
|
|
.IP "\fB\-Waggregate\-return\fR" 4
|
3582 |
|
|
.IX Item "-Waggregate-return"
|
3583 |
|
|
Warn if any functions that return structures or unions are defined or
|
3584 |
|
|
called. (In languages where you can return an array, this also elicits
|
3585 |
|
|
a warning.)
|
3586 |
|
|
.IP "\fB\-Wno\-attributes\fR" 4
|
3587 |
|
|
.IX Item "-Wno-attributes"
|
3588 |
|
|
Do not warn if an unexpected \f(CW\*(C`_\|_attribute_\|_\*(C'\fR is used, such as
|
3589 |
|
|
unrecognized attributes, function attributes applied to variables,
|
3590 |
|
|
etc. This will not stop errors for incorrect use of supported
|
3591 |
|
|
attributes.
|
3592 |
|
|
.IP "\fB\-Wno\-builtin\-macro\-redefined\fR" 4
|
3593 |
|
|
.IX Item "-Wno-builtin-macro-redefined"
|
3594 |
|
|
Do not warn if certain built-in macros are redefined. This suppresses
|
3595 |
|
|
warnings for redefinition of \f(CW\*(C`_\|_TIMESTAMP_\|_\*(C'\fR, \f(CW\*(C`_\|_TIME_\|_\*(C'\fR,
|
3596 |
|
|
\&\f(CW\*(C`_\|_DATE_\|_\*(C'\fR, \f(CW\*(C`_\|_FILE_\|_\*(C'\fR, and \f(CW\*(C`_\|_BASE_FILE_\|_\*(C'\fR.
|
3597 |
|
|
.IP "\fB\-Wstrict\-prototypes\fR (C and Objective-C only)" 4
|
3598 |
|
|
.IX Item "-Wstrict-prototypes (C and Objective-C only)"
|
3599 |
|
|
Warn if a function is declared or defined without specifying the
|
3600 |
|
|
argument types. (An old-style function definition is permitted without
|
3601 |
|
|
a warning if preceded by a declaration which specifies the argument
|
3602 |
|
|
types.)
|
3603 |
|
|
.IP "\fB\-Wold\-style\-declaration\fR (C and Objective-C only)" 4
|
3604 |
|
|
.IX Item "-Wold-style-declaration (C and Objective-C only)"
|
3605 |
|
|
Warn for obsolescent usages, according to the C Standard, in a
|
3606 |
|
|
declaration. For example, warn if storage-class specifiers like
|
3607 |
|
|
\&\f(CW\*(C`static\*(C'\fR are not the first things in a declaration. This warning
|
3608 |
|
|
is also enabled by \fB\-Wextra\fR.
|
3609 |
|
|
.IP "\fB\-Wold\-style\-definition\fR (C and Objective-C only)" 4
|
3610 |
|
|
.IX Item "-Wold-style-definition (C and Objective-C only)"
|
3611 |
|
|
Warn if an old-style function definition is used. A warning is given
|
3612 |
|
|
even if there is a previous prototype.
|
3613 |
|
|
.IP "\fB\-Wmissing\-parameter\-type\fR (C and Objective-C only)" 4
|
3614 |
|
|
.IX Item "-Wmissing-parameter-type (C and Objective-C only)"
|
3615 |
|
|
A function parameter is declared without a type specifier in K&R\-style
|
3616 |
|
|
functions:
|
3617 |
|
|
.Sp
|
3618 |
|
|
.Vb 1
|
3619 |
|
|
\& void foo(bar) { }
|
3620 |
|
|
.Ve
|
3621 |
|
|
.Sp
|
3622 |
|
|
This warning is also enabled by \fB\-Wextra\fR.
|
3623 |
|
|
.IP "\fB\-Wmissing\-prototypes\fR (C and Objective-C only)" 4
|
3624 |
|
|
.IX Item "-Wmissing-prototypes (C and Objective-C only)"
|
3625 |
|
|
Warn if a global function is defined without a previous prototype
|
3626 |
|
|
declaration. This warning is issued even if the definition itself
|
3627 |
|
|
provides a prototype. The aim is to detect global functions that fail
|
3628 |
|
|
to be declared in header files.
|
3629 |
|
|
.IP "\fB\-Wmissing\-declarations\fR" 4
|
3630 |
|
|
.IX Item "-Wmissing-declarations"
|
3631 |
|
|
Warn if a global function is defined without a previous declaration.
|
3632 |
|
|
Do so even if the definition itself provides a prototype.
|
3633 |
|
|
Use this option to detect global functions that are not declared in
|
3634 |
|
|
header files. In \*(C+, no warnings are issued for function templates,
|
3635 |
|
|
or for inline functions, or for functions in anonymous namespaces.
|
3636 |
|
|
.IP "\fB\-Wmissing\-field\-initializers\fR" 4
|
3637 |
|
|
.IX Item "-Wmissing-field-initializers"
|
3638 |
|
|
Warn if a structure's initializer has some fields missing. For
|
3639 |
|
|
example, the following code would cause such a warning, because
|
3640 |
|
|
\&\f(CW\*(C`x.h\*(C'\fR is implicitly zero:
|
3641 |
|
|
.Sp
|
3642 |
|
|
.Vb 2
|
3643 |
|
|
\& struct s { int f, g, h; };
|
3644 |
|
|
\& struct s x = { 3, 4 };
|
3645 |
|
|
.Ve
|
3646 |
|
|
.Sp
|
3647 |
|
|
This option does not warn about designated initializers, so the following
|
3648 |
|
|
modification would not trigger a warning:
|
3649 |
|
|
.Sp
|
3650 |
|
|
.Vb 2
|
3651 |
|
|
\& struct s { int f, g, h; };
|
3652 |
|
|
\& struct s x = { .f = 3, .g = 4 };
|
3653 |
|
|
.Ve
|
3654 |
|
|
.Sp
|
3655 |
|
|
This warning is included in \fB\-Wextra\fR. To get other \fB\-Wextra\fR
|
3656 |
|
|
warnings without this one, use \fB\-Wextra \-Wno\-missing\-field\-initializers\fR.
|
3657 |
|
|
.IP "\fB\-Wmissing\-noreturn\fR" 4
|
3658 |
|
|
.IX Item "-Wmissing-noreturn"
|
3659 |
|
|
Warn about functions which might be candidates for attribute \f(CW\*(C`noreturn\*(C'\fR.
|
3660 |
|
|
Note these are only possible candidates, not absolute ones. Care should
|
3661 |
|
|
be taken to manually verify functions actually do not ever return before
|
3662 |
|
|
adding the \f(CW\*(C`noreturn\*(C'\fR attribute, otherwise subtle code generation
|
3663 |
|
|
bugs could be introduced. You will not get a warning for \f(CW\*(C`main\*(C'\fR in
|
3664 |
|
|
hosted C environments.
|
3665 |
|
|
.IP "\fB\-Wmissing\-format\-attribute\fR" 4
|
3666 |
|
|
.IX Item "-Wmissing-format-attribute"
|
3667 |
|
|
Warn about function pointers which might be candidates for \f(CW\*(C`format\*(C'\fR
|
3668 |
|
|
attributes. Note these are only possible candidates, not absolute ones.
|
3669 |
|
|
\&\s-1GCC\s0 will guess that function pointers with \f(CW\*(C`format\*(C'\fR attributes that
|
3670 |
|
|
are used in assignment, initialization, parameter passing or return
|
3671 |
|
|
statements should have a corresponding \f(CW\*(C`format\*(C'\fR attribute in the
|
3672 |
|
|
resulting type. I.e. the left-hand side of the assignment or
|
3673 |
|
|
initialization, the type of the parameter variable, or the return type
|
3674 |
|
|
of the containing function respectively should also have a \f(CW\*(C`format\*(C'\fR
|
3675 |
|
|
attribute to avoid the warning.
|
3676 |
|
|
.Sp
|
3677 |
|
|
\&\s-1GCC\s0 will also warn about function definitions which might be
|
3678 |
|
|
candidates for \f(CW\*(C`format\*(C'\fR attributes. Again, these are only
|
3679 |
|
|
possible candidates. \s-1GCC\s0 will guess that \f(CW\*(C`format\*(C'\fR attributes
|
3680 |
|
|
might be appropriate for any function that calls a function like
|
3681 |
|
|
\&\f(CW\*(C`vprintf\*(C'\fR or \f(CW\*(C`vscanf\*(C'\fR, but this might not always be the
|
3682 |
|
|
case, and some functions for which \f(CW\*(C`format\*(C'\fR attributes are
|
3683 |
|
|
appropriate may not be detected.
|
3684 |
|
|
.IP "\fB\-Wno\-multichar\fR" 4
|
3685 |
|
|
.IX Item "-Wno-multichar"
|
3686 |
|
|
Do not warn if a multicharacter constant (\fB'\s-1FOOF\s0'\fR) is used.
|
3687 |
|
|
Usually they indicate a typo in the user's code, as they have
|
3688 |
|
|
implementation-defined values, and should not be used in portable code.
|
3689 |
|
|
.IP "\fB\-Wnormalized=\fR" 4
|
3690 |
|
|
.IX Item "-Wnormalized="
|
3691 |
|
|
In \s-1ISO\s0 C and \s-1ISO\s0 \*(C+, two identifiers are different if they are
|
3692 |
|
|
different sequences of characters. However, sometimes when characters
|
3693 |
|
|
outside the basic \s-1ASCII\s0 character set are used, you can have two
|
3694 |
|
|
different character sequences that look the same. To avoid confusion,
|
3695 |
|
|
the \s-1ISO\s0 10646 standard sets out some \fInormalization rules\fR which
|
3696 |
|
|
when applied ensure that two sequences that look the same are turned into
|
3697 |
|
|
the same sequence. \s-1GCC\s0 can warn you if you are using identifiers which
|
3698 |
|
|
have not been normalized; this option controls that warning.
|
3699 |
|
|
.Sp
|
3700 |
|
|
There are four levels of warning that \s-1GCC\s0 supports. The default is
|
3701 |
|
|
\&\fB\-Wnormalized=nfc\fR, which warns about any identifier which is
|
3702 |
|
|
not in the \s-1ISO\s0 10646 \*(L"C\*(R" normalized form, \fI\s-1NFC\s0\fR. \s-1NFC\s0 is the
|
3703 |
|
|
recommended form for most uses.
|
3704 |
|
|
.Sp
|
3705 |
|
|
Unfortunately, there are some characters which \s-1ISO\s0 C and \s-1ISO\s0 \*(C+ allow
|
3706 |
|
|
in identifiers that when turned into \s-1NFC\s0 aren't allowable as
|
3707 |
|
|
identifiers. That is, there's no way to use these symbols in portable
|
3708 |
|
|
\&\s-1ISO\s0 C or \*(C+ and have all your identifiers in \s-1NFC\s0.
|
3709 |
|
|
\&\fB\-Wnormalized=id\fR suppresses the warning for these characters.
|
3710 |
|
|
It is hoped that future versions of the standards involved will correct
|
3711 |
|
|
this, which is why this option is not the default.
|
3712 |
|
|
.Sp
|
3713 |
|
|
You can switch the warning off for all characters by writing
|
3714 |
|
|
\&\fB\-Wnormalized=none\fR. You would only want to do this if you
|
3715 |
|
|
were using some other normalization scheme (like \*(L"D\*(R"), because
|
3716 |
|
|
otherwise you can easily create bugs that are literally impossible to see.
|
3717 |
|
|
.Sp
|
3718 |
|
|
Some characters in \s-1ISO\s0 10646 have distinct meanings but look identical
|
3719 |
|
|
in some fonts or display methodologies, especially once formatting has
|
3720 |
|
|
been applied. For instance \f(CW\*(C`\eu207F\*(C'\fR, \*(L"\s-1SUPERSCRIPT\s0 \s-1LATIN\s0 \s-1SMALL\s0
|
3721 |
|
|
\&\s-1LETTER\s0 N\*(R", will display just like a regular \f(CW\*(C`n\*(C'\fR which has been
|
3722 |
|
|
placed in a superscript. \s-1ISO\s0 10646 defines the \fI\s-1NFKC\s0\fR
|
3723 |
|
|
normalization scheme to convert all these into a standard form as
|
3724 |
|
|
well, and \s-1GCC\s0 will warn if your code is not in \s-1NFKC\s0 if you use
|
3725 |
|
|
\&\fB\-Wnormalized=nfkc\fR. This warning is comparable to warning
|
3726 |
|
|
about every identifier that contains the letter O because it might be
|
3727 |
|
|
confused with the digit 0, and so is not the default, but may be
|
3728 |
|
|
useful as a local coding convention if the programming environment is
|
3729 |
|
|
unable to be fixed to display these characters distinctly.
|
3730 |
|
|
.IP "\fB\-Wno\-deprecated\fR" 4
|
3731 |
|
|
.IX Item "-Wno-deprecated"
|
3732 |
|
|
Do not warn about usage of deprecated features.
|
3733 |
|
|
.IP "\fB\-Wno\-deprecated\-declarations\fR" 4
|
3734 |
|
|
.IX Item "-Wno-deprecated-declarations"
|
3735 |
|
|
Do not warn about uses of functions,
|
3736 |
|
|
variables, and types marked as deprecated by using the \f(CW\*(C`deprecated\*(C'\fR
|
3737 |
|
|
attribute.
|
3738 |
|
|
.IP "\fB\-Wno\-overflow\fR" 4
|
3739 |
|
|
.IX Item "-Wno-overflow"
|
3740 |
|
|
Do not warn about compile-time overflow in constant expressions.
|
3741 |
|
|
.IP "\fB\-Woverride\-init\fR (C and Objective-C only)" 4
|
3742 |
|
|
.IX Item "-Woverride-init (C and Objective-C only)"
|
3743 |
|
|
Warn if an initialized field without side effects is overridden when
|
3744 |
|
|
using designated initializers.
|
3745 |
|
|
.Sp
|
3746 |
|
|
This warning is included in \fB\-Wextra\fR. To get other
|
3747 |
|
|
\&\fB\-Wextra\fR warnings without this one, use \fB\-Wextra
|
3748 |
|
|
\&\-Wno\-override\-init\fR.
|
3749 |
|
|
.IP "\fB\-Wpacked\fR" 4
|
3750 |
|
|
.IX Item "-Wpacked"
|
3751 |
|
|
Warn if a structure is given the packed attribute, but the packed
|
3752 |
|
|
attribute has no effect on the layout or size of the structure.
|
3753 |
|
|
Such structures may be mis-aligned for little benefit. For
|
3754 |
|
|
instance, in this code, the variable \f(CW\*(C`f.x\*(C'\fR in \f(CW\*(C`struct bar\*(C'\fR
|
3755 |
|
|
will be misaligned even though \f(CW\*(C`struct bar\*(C'\fR does not itself
|
3756 |
|
|
have the packed attribute:
|
3757 |
|
|
.Sp
|
3758 |
|
|
.Vb 8
|
3759 |
|
|
\& struct foo {
|
3760 |
|
|
\& int x;
|
3761 |
|
|
\& char a, b, c, d;
|
3762 |
|
|
\& } _\|_attribute_\|_((packed));
|
3763 |
|
|
\& struct bar {
|
3764 |
|
|
\& char z;
|
3765 |
|
|
\& struct foo f;
|
3766 |
|
|
\& };
|
3767 |
|
|
.Ve
|
3768 |
|
|
.IP "\fB\-Wpacked\-bitfield\-compat\fR" 4
|
3769 |
|
|
.IX Item "-Wpacked-bitfield-compat"
|
3770 |
|
|
The 4.1, 4.2 and 4.3 series of \s-1GCC\s0 ignore the \f(CW\*(C`packed\*(C'\fR attribute
|
3771 |
|
|
on bit-fields of type \f(CW\*(C`char\*(C'\fR. This has been fixed in \s-1GCC\s0 4.4 but
|
3772 |
|
|
the change can lead to differences in the structure layout. \s-1GCC\s0
|
3773 |
|
|
informs you when the offset of such a field has changed in \s-1GCC\s0 4.4.
|
3774 |
|
|
For example there is no longer a 4\-bit padding between field \f(CW\*(C`a\*(C'\fR
|
3775 |
|
|
and \f(CW\*(C`b\*(C'\fR in this structure:
|
3776 |
|
|
.Sp
|
3777 |
|
|
.Vb 5
|
3778 |
|
|
\& struct foo
|
3779 |
|
|
\& {
|
3780 |
|
|
\& char a:4;
|
3781 |
|
|
\& char b:8;
|
3782 |
|
|
\& } _\|_attribute_\|_ ((packed));
|
3783 |
|
|
.Ve
|
3784 |
|
|
.Sp
|
3785 |
|
|
This warning is enabled by default. Use
|
3786 |
|
|
\&\fB\-Wno\-packed\-bitfield\-compat\fR to disable this warning.
|
3787 |
|
|
.IP "\fB\-Wpadded\fR" 4
|
3788 |
|
|
.IX Item "-Wpadded"
|
3789 |
|
|
Warn if padding is included in a structure, either to align an element
|
3790 |
|
|
of the structure or to align the whole structure. Sometimes when this
|
3791 |
|
|
happens it is possible to rearrange the fields of the structure to
|
3792 |
|
|
reduce the padding and so make the structure smaller.
|
3793 |
|
|
.IP "\fB\-Wredundant\-decls\fR" 4
|
3794 |
|
|
.IX Item "-Wredundant-decls"
|
3795 |
|
|
Warn if anything is declared more than once in the same scope, even in
|
3796 |
|
|
cases where multiple declaration is valid and changes nothing.
|
3797 |
|
|
.IP "\fB\-Wnested\-externs\fR (C and Objective-C only)" 4
|
3798 |
|
|
.IX Item "-Wnested-externs (C and Objective-C only)"
|
3799 |
|
|
Warn if an \f(CW\*(C`extern\*(C'\fR declaration is encountered within a function.
|
3800 |
|
|
.IP "\fB\-Winline\fR" 4
|
3801 |
|
|
.IX Item "-Winline"
|
3802 |
|
|
Warn if a function can not be inlined and it was declared as inline.
|
3803 |
|
|
Even with this option, the compiler will not warn about failures to
|
3804 |
|
|
inline functions declared in system headers.
|
3805 |
|
|
.Sp
|
3806 |
|
|
The compiler uses a variety of heuristics to determine whether or not
|
3807 |
|
|
to inline a function. For example, the compiler takes into account
|
3808 |
|
|
the size of the function being inlined and the amount of inlining
|
3809 |
|
|
that has already been done in the current function. Therefore,
|
3810 |
|
|
seemingly insignificant changes in the source program can cause the
|
3811 |
|
|
warnings produced by \fB\-Winline\fR to appear or disappear.
|
3812 |
|
|
.IP "\fB\-Wno\-invalid\-offsetof\fR (\*(C+ and Objective\-\*(C+ only)" 4
|
3813 |
|
|
.IX Item "-Wno-invalid-offsetof ( and Objective- only)"
|
3814 |
|
|
Suppress warnings from applying the \fBoffsetof\fR macro to a non-POD
|
3815 |
|
|
type. According to the 1998 \s-1ISO\s0 \*(C+ standard, applying \fBoffsetof\fR
|
3816 |
|
|
to a non-POD type is undefined. In existing \*(C+ implementations,
|
3817 |
|
|
however, \fBoffsetof\fR typically gives meaningful results even when
|
3818 |
|
|
applied to certain kinds of non-POD types. (Such as a simple
|
3819 |
|
|
\&\fBstruct\fR that fails to be a \s-1POD\s0 type only by virtue of having a
|
3820 |
|
|
constructor.) This flag is for users who are aware that they are
|
3821 |
|
|
writing nonportable code and who have deliberately chosen to ignore the
|
3822 |
|
|
warning about it.
|
3823 |
|
|
.Sp
|
3824 |
|
|
The restrictions on \fBoffsetof\fR may be relaxed in a future version
|
3825 |
|
|
of the \*(C+ standard.
|
3826 |
|
|
.IP "\fB\-Wno\-int\-to\-pointer\-cast\fR (C and Objective-C only)" 4
|
3827 |
|
|
.IX Item "-Wno-int-to-pointer-cast (C and Objective-C only)"
|
3828 |
|
|
Suppress warnings from casts to pointer type of an integer of a
|
3829 |
|
|
different size.
|
3830 |
|
|
.IP "\fB\-Wno\-pointer\-to\-int\-cast\fR (C and Objective-C only)" 4
|
3831 |
|
|
.IX Item "-Wno-pointer-to-int-cast (C and Objective-C only)"
|
3832 |
|
|
Suppress warnings from casts from a pointer to an integer type of a
|
3833 |
|
|
different size.
|
3834 |
|
|
.IP "\fB\-Winvalid\-pch\fR" 4
|
3835 |
|
|
.IX Item "-Winvalid-pch"
|
3836 |
|
|
Warn if a precompiled header is found in
|
3837 |
|
|
the search path but can't be used.
|
3838 |
|
|
.IP "\fB\-Wlong\-long\fR" 4
|
3839 |
|
|
.IX Item "-Wlong-long"
|
3840 |
|
|
Warn if \fBlong long\fR type is used. This is enabled by either
|
3841 |
|
|
\&\fB\-pedantic\fR or \fB\-Wtraditional\fR in \s-1ISO\s0 C90 and \*(C+98
|
3842 |
|
|
modes. To inhibit the warning messages, use \fB\-Wno\-long\-long\fR.
|
3843 |
|
|
.IP "\fB\-Wvariadic\-macros\fR" 4
|
3844 |
|
|
.IX Item "-Wvariadic-macros"
|
3845 |
|
|
Warn if variadic macros are used in pedantic \s-1ISO\s0 C90 mode, or the \s-1GNU\s0
|
3846 |
|
|
alternate syntax when in pedantic \s-1ISO\s0 C99 mode. This is default.
|
3847 |
|
|
To inhibit the warning messages, use \fB\-Wno\-variadic\-macros\fR.
|
3848 |
|
|
.IP "\fB\-Wvla\fR" 4
|
3849 |
|
|
.IX Item "-Wvla"
|
3850 |
|
|
Warn if variable length array is used in the code.
|
3851 |
|
|
\&\fB\-Wno\-vla\fR will prevent the \fB\-pedantic\fR warning of
|
3852 |
|
|
the variable length array.
|
3853 |
|
|
.IP "\fB\-Wvolatile\-register\-var\fR" 4
|
3854 |
|
|
.IX Item "-Wvolatile-register-var"
|
3855 |
|
|
Warn if a register variable is declared volatile. The volatile
|
3856 |
|
|
modifier does not inhibit all optimizations that may eliminate reads
|
3857 |
|
|
and/or writes to register variables. This warning is enabled by
|
3858 |
|
|
\&\fB\-Wall\fR.
|
3859 |
|
|
.IP "\fB\-Wdisabled\-optimization\fR" 4
|
3860 |
|
|
.IX Item "-Wdisabled-optimization"
|
3861 |
|
|
Warn if a requested optimization pass is disabled. This warning does
|
3862 |
|
|
not generally indicate that there is anything wrong with your code; it
|
3863 |
|
|
merely indicates that \s-1GCC\s0's optimizers were unable to handle the code
|
3864 |
|
|
effectively. Often, the problem is that your code is too big or too
|
3865 |
|
|
complex; \s-1GCC\s0 will refuse to optimize programs when the optimization
|
3866 |
|
|
itself is likely to take inordinate amounts of time.
|
3867 |
|
|
.IP "\fB\-Wpointer\-sign\fR (C and Objective-C only)" 4
|
3868 |
|
|
.IX Item "-Wpointer-sign (C and Objective-C only)"
|
3869 |
|
|
Warn for pointer argument passing or assignment with different signedness.
|
3870 |
|
|
This option is only supported for C and Objective-C. It is implied by
|
3871 |
|
|
\&\fB\-Wall\fR and by \fB\-pedantic\fR, which can be disabled with
|
3872 |
|
|
\&\fB\-Wno\-pointer\-sign\fR.
|
3873 |
|
|
.IP "\fB\-Wstack\-protector\fR" 4
|
3874 |
|
|
.IX Item "-Wstack-protector"
|
3875 |
|
|
This option is only active when \fB\-fstack\-protector\fR is active. It
|
3876 |
|
|
warns about functions that will not be protected against stack smashing.
|
3877 |
|
|
.IP "\fB\-Wno\-mudflap\fR" 4
|
3878 |
|
|
.IX Item "-Wno-mudflap"
|
3879 |
|
|
Suppress warnings about constructs that cannot be instrumented by
|
3880 |
|
|
\&\fB\-fmudflap\fR.
|
3881 |
|
|
.IP "\fB\-Woverlength\-strings\fR" 4
|
3882 |
|
|
.IX Item "-Woverlength-strings"
|
3883 |
|
|
Warn about string constants which are longer than the \*(L"minimum
|
3884 |
|
|
maximum\*(R" length specified in the C standard. Modern compilers
|
3885 |
|
|
generally allow string constants which are much longer than the
|
3886 |
|
|
standard's minimum limit, but very portable programs should avoid
|
3887 |
|
|
using longer strings.
|
3888 |
|
|
.Sp
|
3889 |
|
|
The limit applies \fIafter\fR string constant concatenation, and does
|
3890 |
|
|
not count the trailing \s-1NUL\s0. In C90, the limit was 509 characters; in
|
3891 |
|
|
C99, it was raised to 4095. \*(C+98 does not specify a normative
|
3892 |
|
|
minimum maximum, so we do not diagnose overlength strings in \*(C+.
|
3893 |
|
|
.Sp
|
3894 |
|
|
This option is implied by \fB\-pedantic\fR, and can be disabled with
|
3895 |
|
|
\&\fB\-Wno\-overlength\-strings\fR.
|
3896 |
|
|
.IP "\fB\-Wunsuffixed\-float\-constants\fR (C and Objective-C only)" 4
|
3897 |
|
|
.IX Item "-Wunsuffixed-float-constants (C and Objective-C only)"
|
3898 |
|
|
\&\s-1GCC\s0 will issue a warning for any floating constant that does not have
|
3899 |
|
|
a suffix. When used together with \fB\-Wsystem\-headers\fR it will
|
3900 |
|
|
warn about such constants in system header files. This can be useful
|
3901 |
|
|
when preparing code to use with the \f(CW\*(C`FLOAT_CONST_DECIMAL64\*(C'\fR pragma
|
3902 |
|
|
from the decimal floating-point extension to C99.
|
3903 |
|
|
.Sh "Options for Debugging Your Program or \s-1GCC\s0"
|
3904 |
|
|
.IX Subsection "Options for Debugging Your Program or GCC"
|
3905 |
|
|
\&\s-1GCC\s0 has various special options that are used for debugging
|
3906 |
|
|
either your program or \s-1GCC:\s0
|
3907 |
|
|
.IP "\fB\-g\fR" 4
|
3908 |
|
|
.IX Item "-g"
|
3909 |
|
|
Produce debugging information in the operating system's native format
|
3910 |
|
|
(stabs, \s-1COFF\s0, \s-1XCOFF\s0, or \s-1DWARF\s0 2). \s-1GDB\s0 can work with this debugging
|
3911 |
|
|
information.
|
3912 |
|
|
.Sp
|
3913 |
|
|
On most systems that use stabs format, \fB\-g\fR enables use of extra
|
3914 |
|
|
debugging information that only \s-1GDB\s0 can use; this extra information
|
3915 |
|
|
makes debugging work better in \s-1GDB\s0 but will probably make other debuggers
|
3916 |
|
|
crash or
|
3917 |
|
|
refuse to read the program. If you want to control for certain whether
|
3918 |
|
|
to generate the extra information, use \fB\-gstabs+\fR, \fB\-gstabs\fR,
|
3919 |
|
|
\&\fB\-gxcoff+\fR, \fB\-gxcoff\fR, or \fB\-gvms\fR (see below).
|
3920 |
|
|
.Sp
|
3921 |
|
|
\&\s-1GCC\s0 allows you to use \fB\-g\fR with
|
3922 |
|
|
\&\fB\-O\fR. The shortcuts taken by optimized code may occasionally
|
3923 |
|
|
produce surprising results: some variables you declared may not exist
|
3924 |
|
|
at all; flow of control may briefly move where you did not expect it;
|
3925 |
|
|
some statements may not be executed because they compute constant
|
3926 |
|
|
results or their values were already at hand; some statements may
|
3927 |
|
|
execute in different places because they were moved out of loops.
|
3928 |
|
|
.Sp
|
3929 |
|
|
Nevertheless it proves possible to debug optimized output. This makes
|
3930 |
|
|
it reasonable to use the optimizer for programs that might have bugs.
|
3931 |
|
|
.Sp
|
3932 |
|
|
The following options are useful when \s-1GCC\s0 is generated with the
|
3933 |
|
|
capability for more than one debugging format.
|
3934 |
|
|
.IP "\fB\-ggdb\fR" 4
|
3935 |
|
|
.IX Item "-ggdb"
|
3936 |
|
|
Produce debugging information for use by \s-1GDB\s0. This means to use the
|
3937 |
|
|
most expressive format available (\s-1DWARF\s0 2, stabs, or the native format
|
3938 |
|
|
if neither of those are supported), including \s-1GDB\s0 extensions if at all
|
3939 |
|
|
possible.
|
3940 |
|
|
.IP "\fB\-gstabs\fR" 4
|
3941 |
|
|
.IX Item "-gstabs"
|
3942 |
|
|
Produce debugging information in stabs format (if that is supported),
|
3943 |
|
|
without \s-1GDB\s0 extensions. This is the format used by \s-1DBX\s0 on most \s-1BSD\s0
|
3944 |
|
|
systems. On \s-1MIPS\s0, Alpha and System V Release 4 systems this option
|
3945 |
|
|
produces stabs debugging output which is not understood by \s-1DBX\s0 or \s-1SDB\s0.
|
3946 |
|
|
On System V Release 4 systems this option requires the \s-1GNU\s0 assembler.
|
3947 |
|
|
.IP "\fB\-feliminate\-unused\-debug\-symbols\fR" 4
|
3948 |
|
|
.IX Item "-feliminate-unused-debug-symbols"
|
3949 |
|
|
Produce debugging information in stabs format (if that is supported),
|
3950 |
|
|
for only symbols that are actually used.
|
3951 |
|
|
.IP "\fB\-femit\-class\-debug\-always\fR" 4
|
3952 |
|
|
.IX Item "-femit-class-debug-always"
|
3953 |
|
|
Instead of emitting debugging information for a \*(C+ class in only one
|
3954 |
|
|
object file, emit it in all object files using the class. This option
|
3955 |
|
|
should be used only with debuggers that are unable to handle the way \s-1GCC\s0
|
3956 |
|
|
normally emits debugging information for classes because using this
|
3957 |
|
|
option will increase the size of debugging information by as much as a
|
3958 |
|
|
factor of two.
|
3959 |
|
|
.IP "\fB\-gstabs+\fR" 4
|
3960 |
|
|
.IX Item "-gstabs+"
|
3961 |
|
|
Produce debugging information in stabs format (if that is supported),
|
3962 |
|
|
using \s-1GNU\s0 extensions understood only by the \s-1GNU\s0 debugger (\s-1GDB\s0). The
|
3963 |
|
|
use of these extensions is likely to make other debuggers crash or
|
3964 |
|
|
refuse to read the program.
|
3965 |
|
|
.IP "\fB\-gcoff\fR" 4
|
3966 |
|
|
.IX Item "-gcoff"
|
3967 |
|
|
Produce debugging information in \s-1COFF\s0 format (if that is supported).
|
3968 |
|
|
This is the format used by \s-1SDB\s0 on most System V systems prior to
|
3969 |
|
|
System V Release 4.
|
3970 |
|
|
.IP "\fB\-gxcoff\fR" 4
|
3971 |
|
|
.IX Item "-gxcoff"
|
3972 |
|
|
Produce debugging information in \s-1XCOFF\s0 format (if that is supported).
|
3973 |
|
|
This is the format used by the \s-1DBX\s0 debugger on \s-1IBM\s0 \s-1RS/6000\s0 systems.
|
3974 |
|
|
.IP "\fB\-gxcoff+\fR" 4
|
3975 |
|
|
.IX Item "-gxcoff+"
|
3976 |
|
|
Produce debugging information in \s-1XCOFF\s0 format (if that is supported),
|
3977 |
|
|
using \s-1GNU\s0 extensions understood only by the \s-1GNU\s0 debugger (\s-1GDB\s0). The
|
3978 |
|
|
use of these extensions is likely to make other debuggers crash or
|
3979 |
|
|
refuse to read the program, and may cause assemblers other than the \s-1GNU\s0
|
3980 |
|
|
assembler (\s-1GAS\s0) to fail with an error.
|
3981 |
|
|
.IP "\fB\-gdwarf\-\fR\fIversion\fR" 4
|
3982 |
|
|
.IX Item "-gdwarf-version"
|
3983 |
|
|
Produce debugging information in \s-1DWARF\s0 format (if that is
|
3984 |
|
|
supported). This is the format used by \s-1DBX\s0 on \s-1IRIX\s0 6. The value
|
3985 |
|
|
of \fIversion\fR may be either 2, 3 or 4; the default version is 2.
|
3986 |
|
|
.Sp
|
3987 |
|
|
Note that with \s-1DWARF\s0 version 2 some ports require, and will always
|
3988 |
|
|
use, some non-conflicting \s-1DWARF\s0 3 extensions in the unwind tables.
|
3989 |
|
|
.Sp
|
3990 |
|
|
Version 4 may require \s-1GDB\s0 7.0 and \fB\-fvar\-tracking\-assignments\fR
|
3991 |
|
|
for maximum benefit.
|
3992 |
|
|
.IP "\fB\-gstrict\-dwarf\fR" 4
|
3993 |
|
|
.IX Item "-gstrict-dwarf"
|
3994 |
|
|
Disallow using extensions of later \s-1DWARF\s0 standard version than selected
|
3995 |
|
|
with \fB\-gdwarf\-\fR\fIversion\fR. On most targets using non-conflicting
|
3996 |
|
|
\&\s-1DWARF\s0 extensions from later standard versions is allowed.
|
3997 |
|
|
.IP "\fB\-gno\-strict\-dwarf\fR" 4
|
3998 |
|
|
.IX Item "-gno-strict-dwarf"
|
3999 |
|
|
Allow using extensions of later \s-1DWARF\s0 standard version than selected with
|
4000 |
|
|
\&\fB\-gdwarf\-\fR\fIversion\fR.
|
4001 |
|
|
.IP "\fB\-gvms\fR" 4
|
4002 |
|
|
.IX Item "-gvms"
|
4003 |
|
|
Produce debugging information in \s-1VMS\s0 debug format (if that is
|
4004 |
|
|
supported). This is the format used by \s-1DEBUG\s0 on \s-1VMS\s0 systems.
|
4005 |
|
|
.IP "\fB\-g\fR\fIlevel\fR" 4
|
4006 |
|
|
.IX Item "-glevel"
|
4007 |
|
|
.PD 0
|
4008 |
|
|
.IP "\fB\-ggdb\fR\fIlevel\fR" 4
|
4009 |
|
|
.IX Item "-ggdblevel"
|
4010 |
|
|
.IP "\fB\-gstabs\fR\fIlevel\fR" 4
|
4011 |
|
|
.IX Item "-gstabslevel"
|
4012 |
|
|
.IP "\fB\-gcoff\fR\fIlevel\fR" 4
|
4013 |
|
|
.IX Item "-gcofflevel"
|
4014 |
|
|
.IP "\fB\-gxcoff\fR\fIlevel\fR" 4
|
4015 |
|
|
.IX Item "-gxcofflevel"
|
4016 |
|
|
.IP "\fB\-gvms\fR\fIlevel\fR" 4
|
4017 |
|
|
.IX Item "-gvmslevel"
|
4018 |
|
|
.PD
|
4019 |
|
|
Request debugging information and also use \fIlevel\fR to specify how
|
4020 |
|
|
much information. The default level is 2.
|
4021 |
|
|
.Sp
|
4022 |
|
|
Level 0 produces no debug information at all. Thus, \fB\-g0\fR negates
|
4023 |
|
|
\&\fB\-g\fR.
|
4024 |
|
|
.Sp
|
4025 |
|
|
Level 1 produces minimal information, enough for making backtraces in
|
4026 |
|
|
parts of the program that you don't plan to debug. This includes
|
4027 |
|
|
descriptions of functions and external variables, but no information
|
4028 |
|
|
about local variables and no line numbers.
|
4029 |
|
|
.Sp
|
4030 |
|
|
Level 3 includes extra information, such as all the macro definitions
|
4031 |
|
|
present in the program. Some debuggers support macro expansion when
|
4032 |
|
|
you use \fB\-g3\fR.
|
4033 |
|
|
.Sp
|
4034 |
|
|
\&\fB\-gdwarf\-2\fR does not accept a concatenated debug level, because
|
4035 |
|
|
\&\s-1GCC\s0 used to support an option \fB\-gdwarf\fR that meant to generate
|
4036 |
|
|
debug information in version 1 of the \s-1DWARF\s0 format (which is very
|
4037 |
|
|
different from version 2), and it would have been too confusing. That
|
4038 |
|
|
debug format is long obsolete, but the option cannot be changed now.
|
4039 |
|
|
Instead use an additional \fB\-g\fR\fIlevel\fR option to change the
|
4040 |
|
|
debug level for \s-1DWARF\s0.
|
4041 |
|
|
.IP "\fB\-gtoggle\fR" 4
|
4042 |
|
|
.IX Item "-gtoggle"
|
4043 |
|
|
Turn off generation of debug info, if leaving out this option would have
|
4044 |
|
|
generated it, or turn it on at level 2 otherwise. The position of this
|
4045 |
|
|
argument in the command line does not matter, it takes effect after all
|
4046 |
|
|
other options are processed, and it does so only once, no matter how
|
4047 |
|
|
many times it is given. This is mainly intended to be used with
|
4048 |
|
|
\&\fB\-fcompare\-debug\fR.
|
4049 |
|
|
.IP "\fB\-fdump\-final\-insns\fR[\fB=\fR\fIfile\fR]" 4
|
4050 |
|
|
.IX Item "-fdump-final-insns[=file]"
|
4051 |
|
|
Dump the final internal representation (\s-1RTL\s0) to \fIfile\fR. If the
|
4052 |
|
|
optional argument is omitted (or if \fIfile\fR is \f(CW\*(C`.\*(C'\fR), the name
|
4053 |
|
|
of the dump file will be determined by appending \f(CW\*(C`.gkd\*(C'\fR to the
|
4054 |
|
|
compilation output file name.
|
4055 |
|
|
.IP "\fB\-fcompare\-debug\fR[\fB=\fR\fIopts\fR]" 4
|
4056 |
|
|
.IX Item "-fcompare-debug[=opts]"
|
4057 |
|
|
If no error occurs during compilation, run the compiler a second time,
|
4058 |
|
|
adding \fIopts\fR and \fB\-fcompare\-debug\-second\fR to the arguments
|
4059 |
|
|
passed to the second compilation. Dump the final internal
|
4060 |
|
|
representation in both compilations, and print an error if they differ.
|
4061 |
|
|
.Sp
|
4062 |
|
|
If the equal sign is omitted, the default \fB\-gtoggle\fR is used.
|
4063 |
|
|
.Sp
|
4064 |
|
|
The environment variable \fB\s-1GCC_COMPARE_DEBUG\s0\fR, if defined, non-empty
|
4065 |
|
|
and nonzero, implicitly enables \fB\-fcompare\-debug\fR. If
|
4066 |
|
|
\&\fB\s-1GCC_COMPARE_DEBUG\s0\fR is defined to a string starting with a dash,
|
4067 |
|
|
then it is used for \fIopts\fR, otherwise the default \fB\-gtoggle\fR
|
4068 |
|
|
is used.
|
4069 |
|
|
.Sp
|
4070 |
|
|
\&\fB\-fcompare\-debug=\fR, with the equal sign but without \fIopts\fR,
|
4071 |
|
|
is equivalent to \fB\-fno\-compare\-debug\fR, which disables the dumping
|
4072 |
|
|
of the final representation and the second compilation, preventing even
|
4073 |
|
|
\&\fB\s-1GCC_COMPARE_DEBUG\s0\fR from taking effect.
|
4074 |
|
|
.Sp
|
4075 |
|
|
To verify full coverage during \fB\-fcompare\-debug\fR testing, set
|
4076 |
|
|
\&\fB\s-1GCC_COMPARE_DEBUG\s0\fR to say \fB\-fcompare\-debug\-not\-overridden\fR,
|
4077 |
|
|
which \s-1GCC\s0 will reject as an invalid option in any actual compilation
|
4078 |
|
|
(rather than preprocessing, assembly or linking). To get just a
|
4079 |
|
|
warning, setting \fB\s-1GCC_COMPARE_DEBUG\s0\fR to \fB\-w%n\-fcompare\-debug
|
4080 |
|
|
not overridden\fR will do.
|
4081 |
|
|
.IP "\fB\-fcompare\-debug\-second\fR" 4
|
4082 |
|
|
.IX Item "-fcompare-debug-second"
|
4083 |
|
|
This option is implicitly passed to the compiler for the second
|
4084 |
|
|
compilation requested by \fB\-fcompare\-debug\fR, along with options to
|
4085 |
|
|
silence warnings, and omitting other options that would cause
|
4086 |
|
|
side-effect compiler outputs to files or to the standard output. Dump
|
4087 |
|
|
files and preserved temporary files are renamed so as to contain the
|
4088 |
|
|
\&\f(CW\*(C`.gk\*(C'\fR additional extension during the second compilation, to avoid
|
4089 |
|
|
overwriting those generated by the first.
|
4090 |
|
|
.Sp
|
4091 |
|
|
When this option is passed to the compiler driver, it causes the
|
4092 |
|
|
\&\fIfirst\fR compilation to be skipped, which makes it useful for little
|
4093 |
|
|
other than debugging the compiler proper.
|
4094 |
|
|
.IP "\fB\-feliminate\-dwarf2\-dups\fR" 4
|
4095 |
|
|
.IX Item "-feliminate-dwarf2-dups"
|
4096 |
|
|
Compress \s-1DWARF2\s0 debugging information by eliminating duplicated
|
4097 |
|
|
information about each symbol. This option only makes sense when
|
4098 |
|
|
generating \s-1DWARF2\s0 debugging information with \fB\-gdwarf\-2\fR.
|
4099 |
|
|
.IP "\fB\-femit\-struct\-debug\-baseonly\fR" 4
|
4100 |
|
|
.IX Item "-femit-struct-debug-baseonly"
|
4101 |
|
|
Emit debug information for struct-like types
|
4102 |
|
|
only when the base name of the compilation source file
|
4103 |
|
|
matches the base name of file in which the struct was defined.
|
4104 |
|
|
.Sp
|
4105 |
|
|
This option substantially reduces the size of debugging information,
|
4106 |
|
|
but at significant potential loss in type information to the debugger.
|
4107 |
|
|
See \fB\-femit\-struct\-debug\-reduced\fR for a less aggressive option.
|
4108 |
|
|
See \fB\-femit\-struct\-debug\-detailed\fR for more detailed control.
|
4109 |
|
|
.Sp
|
4110 |
|
|
This option works only with \s-1DWARF\s0 2.
|
4111 |
|
|
.IP "\fB\-femit\-struct\-debug\-reduced\fR" 4
|
4112 |
|
|
.IX Item "-femit-struct-debug-reduced"
|
4113 |
|
|
Emit debug information for struct-like types
|
4114 |
|
|
only when the base name of the compilation source file
|
4115 |
|
|
matches the base name of file in which the type was defined,
|
4116 |
|
|
unless the struct is a template or defined in a system header.
|
4117 |
|
|
.Sp
|
4118 |
|
|
This option significantly reduces the size of debugging information,
|
4119 |
|
|
with some potential loss in type information to the debugger.
|
4120 |
|
|
See \fB\-femit\-struct\-debug\-baseonly\fR for a more aggressive option.
|
4121 |
|
|
See \fB\-femit\-struct\-debug\-detailed\fR for more detailed control.
|
4122 |
|
|
.Sp
|
4123 |
|
|
This option works only with \s-1DWARF\s0 2.
|
4124 |
|
|
.IP "\fB\-femit\-struct\-debug\-detailed\fR[\fB=\fR\fIspec-list\fR]" 4
|
4125 |
|
|
.IX Item "-femit-struct-debug-detailed[=spec-list]"
|
4126 |
|
|
Specify the struct-like types
|
4127 |
|
|
for which the compiler will generate debug information.
|
4128 |
|
|
The intent is to reduce duplicate struct debug information
|
4129 |
|
|
between different object files within the same program.
|
4130 |
|
|
.Sp
|
4131 |
|
|
This option is a detailed version of
|
4132 |
|
|
\&\fB\-femit\-struct\-debug\-reduced\fR and \fB\-femit\-struct\-debug\-baseonly\fR,
|
4133 |
|
|
which will serve for most needs.
|
4134 |
|
|
.Sp
|
4135 |
|
|
A specification has the syntax
|
4136 |
|
|
[\fBdir:\fR|\fBind:\fR][\fBord:\fR|\fBgen:\fR](\fBany\fR|\fBsys\fR|\fBbase\fR|\fBnone\fR)
|
4137 |
|
|
.Sp
|
4138 |
|
|
The optional first word limits the specification to
|
4139 |
|
|
structs that are used directly (\fBdir:\fR) or used indirectly (\fBind:\fR).
|
4140 |
|
|
A struct type is used directly when it is the type of a variable, member.
|
4141 |
|
|
Indirect uses arise through pointers to structs.
|
4142 |
|
|
That is, when use of an incomplete struct would be legal, the use is indirect.
|
4143 |
|
|
An example is
|
4144 |
|
|
\&\fBstruct one direct; struct two * indirect;\fR.
|
4145 |
|
|
.Sp
|
4146 |
|
|
The optional second word limits the specification to
|
4147 |
|
|
ordinary structs (\fBord:\fR) or generic structs (\fBgen:\fR).
|
4148 |
|
|
Generic structs are a bit complicated to explain.
|
4149 |
|
|
For \*(C+, these are non-explicit specializations of template classes,
|
4150 |
|
|
or non-template classes within the above.
|
4151 |
|
|
Other programming languages have generics,
|
4152 |
|
|
but \fB\-femit\-struct\-debug\-detailed\fR does not yet implement them.
|
4153 |
|
|
.Sp
|
4154 |
|
|
The third word specifies the source files for those
|
4155 |
|
|
structs for which the compiler will emit debug information.
|
4156 |
|
|
The values \fBnone\fR and \fBany\fR have the normal meaning.
|
4157 |
|
|
The value \fBbase\fR means that
|
4158 |
|
|
the base of name of the file in which the type declaration appears
|
4159 |
|
|
must match the base of the name of the main compilation file.
|
4160 |
|
|
In practice, this means that
|
4161 |
|
|
types declared in \fIfoo.c\fR and \fIfoo.h\fR will have debug information,
|
4162 |
|
|
but types declared in other header will not.
|
4163 |
|
|
The value \fBsys\fR means those types satisfying \fBbase\fR
|
4164 |
|
|
or declared in system or compiler headers.
|
4165 |
|
|
.Sp
|
4166 |
|
|
You may need to experiment to determine the best settings for your application.
|
4167 |
|
|
.Sp
|
4168 |
|
|
The default is \fB\-femit\-struct\-debug\-detailed=all\fR.
|
4169 |
|
|
.Sp
|
4170 |
|
|
This option works only with \s-1DWARF\s0 2.
|
4171 |
|
|
.IP "\fB\-fenable\-icf\-debug\fR" 4
|
4172 |
|
|
.IX Item "-fenable-icf-debug"
|
4173 |
|
|
Generate additional debug information to support identical code folding (\s-1ICF\s0).
|
4174 |
|
|
This option only works with \s-1DWARF\s0 version 2 or higher.
|
4175 |
|
|
.IP "\fB\-fno\-merge\-debug\-strings\fR" 4
|
4176 |
|
|
.IX Item "-fno-merge-debug-strings"
|
4177 |
|
|
Direct the linker to not merge together strings in the debugging
|
4178 |
|
|
information which are identical in different object files. Merging is
|
4179 |
|
|
not supported by all assemblers or linkers. Merging decreases the size
|
4180 |
|
|
of the debug information in the output file at the cost of increasing
|
4181 |
|
|
link processing time. Merging is enabled by default.
|
4182 |
|
|
.IP "\fB\-fdebug\-prefix\-map=\fR\fIold\fR\fB=\fR\fInew\fR" 4
|
4183 |
|
|
.IX Item "-fdebug-prefix-map=old=new"
|
4184 |
|
|
When compiling files in directory \fI\fIold\fI\fR, record debugging
|
4185 |
|
|
information describing them as in \fI\fInew\fI\fR instead.
|
4186 |
|
|
.IP "\fB\-fno\-dwarf2\-cfi\-asm\fR" 4
|
4187 |
|
|
.IX Item "-fno-dwarf2-cfi-asm"
|
4188 |
|
|
Emit \s-1DWARF\s0 2 unwind info as compiler generated \f(CW\*(C`.eh_frame\*(C'\fR section
|
4189 |
|
|
instead of using \s-1GAS\s0 \f(CW\*(C`.cfi_*\*(C'\fR directives.
|
4190 |
|
|
.IP "\fB\-p\fR" 4
|
4191 |
|
|
.IX Item "-p"
|
4192 |
|
|
Generate extra code to write profile information suitable for the
|
4193 |
|
|
analysis program \fBprof\fR. You must use this option when compiling
|
4194 |
|
|
the source files you want data about, and you must also use it when
|
4195 |
|
|
linking.
|
4196 |
|
|
.IP "\fB\-pg\fR" 4
|
4197 |
|
|
.IX Item "-pg"
|
4198 |
|
|
Generate extra code to write profile information suitable for the
|
4199 |
|
|
analysis program \fBgprof\fR. You must use this option when compiling
|
4200 |
|
|
the source files you want data about, and you must also use it when
|
4201 |
|
|
linking.
|
4202 |
|
|
.IP "\fB\-Q\fR" 4
|
4203 |
|
|
.IX Item "-Q"
|
4204 |
|
|
Makes the compiler print out each function name as it is compiled, and
|
4205 |
|
|
print some statistics about each pass when it finishes.
|
4206 |
|
|
.IP "\fB\-ftime\-report\fR" 4
|
4207 |
|
|
.IX Item "-ftime-report"
|
4208 |
|
|
Makes the compiler print some statistics about the time consumed by each
|
4209 |
|
|
pass when it finishes.
|
4210 |
|
|
.IP "\fB\-fmem\-report\fR" 4
|
4211 |
|
|
.IX Item "-fmem-report"
|
4212 |
|
|
Makes the compiler print some statistics about permanent memory
|
4213 |
|
|
allocation when it finishes.
|
4214 |
|
|
.IP "\fB\-fpre\-ipa\-mem\-report\fR" 4
|
4215 |
|
|
.IX Item "-fpre-ipa-mem-report"
|
4216 |
|
|
.PD 0
|
4217 |
|
|
.IP "\fB\-fpost\-ipa\-mem\-report\fR" 4
|
4218 |
|
|
.IX Item "-fpost-ipa-mem-report"
|
4219 |
|
|
.PD
|
4220 |
|
|
Makes the compiler print some statistics about permanent memory
|
4221 |
|
|
allocation before or after interprocedural optimization.
|
4222 |
|
|
.IP "\fB\-fprofile\-arcs\fR" 4
|
4223 |
|
|
.IX Item "-fprofile-arcs"
|
4224 |
|
|
Add code so that program flow \fIarcs\fR are instrumented. During
|
4225 |
|
|
execution the program records how many times each branch and call is
|
4226 |
|
|
executed and how many times it is taken or returns. When the compiled
|
4227 |
|
|
program exits it saves this data to a file called
|
4228 |
|
|
\&\fI\fIauxname\fI.gcda\fR for each source file. The data may be used for
|
4229 |
|
|
profile-directed optimizations (\fB\-fbranch\-probabilities\fR), or for
|
4230 |
|
|
test coverage analysis (\fB\-ftest\-coverage\fR). Each object file's
|
4231 |
|
|
\&\fIauxname\fR is generated from the name of the output file, if
|
4232 |
|
|
explicitly specified and it is not the final executable, otherwise it is
|
4233 |
|
|
the basename of the source file. In both cases any suffix is removed
|
4234 |
|
|
(e.g. \fIfoo.gcda\fR for input file \fIdir/foo.c\fR, or
|
4235 |
|
|
\&\fIdir/foo.gcda\fR for output file specified as \fB\-o dir/foo.o\fR).
|
4236 |
|
|
.IP "\fB\-\-coverage\fR" 4
|
4237 |
|
|
.IX Item "--coverage"
|
4238 |
|
|
This option is used to compile and link code instrumented for coverage
|
4239 |
|
|
analysis. The option is a synonym for \fB\-fprofile\-arcs\fR
|
4240 |
|
|
\&\fB\-ftest\-coverage\fR (when compiling) and \fB\-lgcov\fR (when
|
4241 |
|
|
linking). See the documentation for those options for more details.
|
4242 |
|
|
.RS 4
|
4243 |
|
|
.IP "\(bu" 4
|
4244 |
|
|
Compile the source files with \fB\-fprofile\-arcs\fR plus optimization
|
4245 |
|
|
and code generation options. For test coverage analysis, use the
|
4246 |
|
|
additional \fB\-ftest\-coverage\fR option. You do not need to profile
|
4247 |
|
|
every source file in a program.
|
4248 |
|
|
.IP "\(bu" 4
|
4249 |
|
|
Link your object files with \fB\-lgcov\fR or \fB\-fprofile\-arcs\fR
|
4250 |
|
|
(the latter implies the former).
|
4251 |
|
|
.IP "\(bu" 4
|
4252 |
|
|
Run the program on a representative workload to generate the arc profile
|
4253 |
|
|
information. This may be repeated any number of times. You can run
|
4254 |
|
|
concurrent instances of your program, and provided that the file system
|
4255 |
|
|
supports locking, the data files will be correctly updated. Also
|
4256 |
|
|
\&\f(CW\*(C`fork\*(C'\fR calls are detected and correctly handled (double counting
|
4257 |
|
|
will not happen).
|
4258 |
|
|
.IP "\(bu" 4
|
4259 |
|
|
For profile-directed optimizations, compile the source files again with
|
4260 |
|
|
the same optimization and code generation options plus
|
4261 |
|
|
\&\fB\-fbranch\-probabilities\fR.
|
4262 |
|
|
.IP "\(bu" 4
|
4263 |
|
|
For test coverage analysis, use \fBgcov\fR to produce human readable
|
4264 |
|
|
information from the \fI.gcno\fR and \fI.gcda\fR files. Refer to the
|
4265 |
|
|
\&\fBgcov\fR documentation for further information.
|
4266 |
|
|
.RE
|
4267 |
|
|
.RS 4
|
4268 |
|
|
.Sp
|
4269 |
|
|
With \fB\-fprofile\-arcs\fR, for each function of your program \s-1GCC\s0
|
4270 |
|
|
creates a program flow graph, then finds a spanning tree for the graph.
|
4271 |
|
|
Only arcs that are not on the spanning tree have to be instrumented: the
|
4272 |
|
|
compiler adds code to count the number of times that these arcs are
|
4273 |
|
|
executed. When an arc is the only exit or only entrance to a block, the
|
4274 |
|
|
instrumentation code can be added to the block; otherwise, a new basic
|
4275 |
|
|
block must be created to hold the instrumentation code.
|
4276 |
|
|
.RE
|
4277 |
|
|
.IP "\fB\-ftest\-coverage\fR" 4
|
4278 |
|
|
.IX Item "-ftest-coverage"
|
4279 |
|
|
Produce a notes file that the \fBgcov\fR code-coverage utility can use to
|
4280 |
|
|
show program coverage. Each source file's note file is called
|
4281 |
|
|
\&\fI\fIauxname\fI.gcno\fR. Refer to the \fB\-fprofile\-arcs\fR option
|
4282 |
|
|
above for a description of \fIauxname\fR and instructions on how to
|
4283 |
|
|
generate test coverage data. Coverage data will match the source files
|
4284 |
|
|
more closely, if you do not optimize.
|
4285 |
|
|
.IP "\fB\-fdbg\-cnt\-list\fR" 4
|
4286 |
|
|
.IX Item "-fdbg-cnt-list"
|
4287 |
|
|
Print the name and the counter upperbound for all debug counters.
|
4288 |
|
|
.IP "\fB\-fdbg\-cnt=\fR\fIcounter-value-list\fR" 4
|
4289 |
|
|
.IX Item "-fdbg-cnt=counter-value-list"
|
4290 |
|
|
Set the internal debug counter upperbound. \fIcounter-value-list\fR
|
4291 |
|
|
is a comma-separated list of \fIname\fR:\fIvalue\fR pairs
|
4292 |
|
|
which sets the upperbound of each debug counter \fIname\fR to \fIvalue\fR.
|
4293 |
|
|
All debug counters have the initial upperbound of \fI\s-1UINT_MAX\s0\fR,
|
4294 |
|
|
thus \fIdbg_cnt()\fR returns true always unless the upperbound is set by this option.
|
4295 |
|
|
e.g. With \-fdbg\-cnt=dce:10,tail_call:0
|
4296 |
|
|
dbg_cnt(dce) will return true only for first 10 invocations
|
4297 |
|
|
and dbg_cnt(tail_call) will return false always.
|
4298 |
|
|
.IP "\fB\-d\fR\fIletters\fR" 4
|
4299 |
|
|
.IX Item "-dletters"
|
4300 |
|
|
.PD 0
|
4301 |
|
|
.IP "\fB\-fdump\-rtl\-\fR\fIpass\fR" 4
|
4302 |
|
|
.IX Item "-fdump-rtl-pass"
|
4303 |
|
|
.PD
|
4304 |
|
|
Says to make debugging dumps during compilation at times specified by
|
4305 |
|
|
\&\fIletters\fR. This is used for debugging the RTL-based passes of the
|
4306 |
|
|
compiler. The file names for most of the dumps are made by appending
|
4307 |
|
|
a pass number and a word to the \fIdumpname\fR, and the files are
|
4308 |
|
|
created in the directory of the output file. \fIdumpname\fR is
|
4309 |
|
|
generated from the name of the output file, if explicitly specified
|
4310 |
|
|
and it is not an executable, otherwise it is the basename of the
|
4311 |
|
|
source file. These switches may have different effects when
|
4312 |
|
|
\&\fB\-E\fR is used for preprocessing.
|
4313 |
|
|
.Sp
|
4314 |
|
|
Debug dumps can be enabled with a \fB\-fdump\-rtl\fR switch or some
|
4315 |
|
|
\&\fB\-d\fR option \fIletters\fR. Here are the possible
|
4316 |
|
|
letters for use in \fIpass\fR and \fIletters\fR, and their meanings:
|
4317 |
|
|
.RS 4
|
4318 |
|
|
.IP "\fB\-fdump\-rtl\-alignments\fR" 4
|
4319 |
|
|
.IX Item "-fdump-rtl-alignments"
|
4320 |
|
|
Dump after branch alignments have been computed.
|
4321 |
|
|
.IP "\fB\-fdump\-rtl\-asmcons\fR" 4
|
4322 |
|
|
.IX Item "-fdump-rtl-asmcons"
|
4323 |
|
|
Dump after fixing rtl statements that have unsatisfied in/out constraints.
|
4324 |
|
|
.IP "\fB\-fdump\-rtl\-auto_inc_dec\fR" 4
|
4325 |
|
|
.IX Item "-fdump-rtl-auto_inc_dec"
|
4326 |
|
|
Dump after auto-inc-dec discovery. This pass is only run on
|
4327 |
|
|
architectures that have auto inc or auto dec instructions.
|
4328 |
|
|
.IP "\fB\-fdump\-rtl\-barriers\fR" 4
|
4329 |
|
|
.IX Item "-fdump-rtl-barriers"
|
4330 |
|
|
Dump after cleaning up the barrier instructions.
|
4331 |
|
|
.IP "\fB\-fdump\-rtl\-bbpart\fR" 4
|
4332 |
|
|
.IX Item "-fdump-rtl-bbpart"
|
4333 |
|
|
Dump after partitioning hot and cold basic blocks.
|
4334 |
|
|
.IP "\fB\-fdump\-rtl\-bbro\fR" 4
|
4335 |
|
|
.IX Item "-fdump-rtl-bbro"
|
4336 |
|
|
Dump after block reordering.
|
4337 |
|
|
.IP "\fB\-fdump\-rtl\-btl1\fR" 4
|
4338 |
|
|
.IX Item "-fdump-rtl-btl1"
|
4339 |
|
|
.PD 0
|
4340 |
|
|
.IP "\fB\-fdump\-rtl\-btl2\fR" 4
|
4341 |
|
|
.IX Item "-fdump-rtl-btl2"
|
4342 |
|
|
.PD
|
4343 |
|
|
\&\fB\-fdump\-rtl\-btl1\fR and \fB\-fdump\-rtl\-btl2\fR enable dumping
|
4344 |
|
|
after the two branch
|
4345 |
|
|
target load optimization passes.
|
4346 |
|
|
.IP "\fB\-fdump\-rtl\-bypass\fR" 4
|
4347 |
|
|
.IX Item "-fdump-rtl-bypass"
|
4348 |
|
|
Dump after jump bypassing and control flow optimizations.
|
4349 |
|
|
.IP "\fB\-fdump\-rtl\-combine\fR" 4
|
4350 |
|
|
.IX Item "-fdump-rtl-combine"
|
4351 |
|
|
Dump after the \s-1RTL\s0 instruction combination pass.
|
4352 |
|
|
.IP "\fB\-fdump\-rtl\-compgotos\fR" 4
|
4353 |
|
|
.IX Item "-fdump-rtl-compgotos"
|
4354 |
|
|
Dump after duplicating the computed gotos.
|
4355 |
|
|
.IP "\fB\-fdump\-rtl\-ce1\fR" 4
|
4356 |
|
|
.IX Item "-fdump-rtl-ce1"
|
4357 |
|
|
.PD 0
|
4358 |
|
|
.IP "\fB\-fdump\-rtl\-ce2\fR" 4
|
4359 |
|
|
.IX Item "-fdump-rtl-ce2"
|
4360 |
|
|
.IP "\fB\-fdump\-rtl\-ce3\fR" 4
|
4361 |
|
|
.IX Item "-fdump-rtl-ce3"
|
4362 |
|
|
.PD
|
4363 |
|
|
\&\fB\-fdump\-rtl\-ce1\fR, \fB\-fdump\-rtl\-ce2\fR, and
|
4364 |
|
|
\&\fB\-fdump\-rtl\-ce3\fR enable dumping after the three
|
4365 |
|
|
if conversion passes.
|
4366 |
|
|
.IP "\fB\-fdump\-rtl\-cprop_hardreg\fR" 4
|
4367 |
|
|
.IX Item "-fdump-rtl-cprop_hardreg"
|
4368 |
|
|
Dump after hard register copy propagation.
|
4369 |
|
|
.IP "\fB\-fdump\-rtl\-csa\fR" 4
|
4370 |
|
|
.IX Item "-fdump-rtl-csa"
|
4371 |
|
|
Dump after combining stack adjustments.
|
4372 |
|
|
.IP "\fB\-fdump\-rtl\-cse1\fR" 4
|
4373 |
|
|
.IX Item "-fdump-rtl-cse1"
|
4374 |
|
|
.PD 0
|
4375 |
|
|
.IP "\fB\-fdump\-rtl\-cse2\fR" 4
|
4376 |
|
|
.IX Item "-fdump-rtl-cse2"
|
4377 |
|
|
.PD
|
4378 |
|
|
\&\fB\-fdump\-rtl\-cse1\fR and \fB\-fdump\-rtl\-cse2\fR enable dumping after
|
4379 |
|
|
the two common sub-expression elimination passes.
|
4380 |
|
|
.IP "\fB\-fdump\-rtl\-dce\fR" 4
|
4381 |
|
|
.IX Item "-fdump-rtl-dce"
|
4382 |
|
|
Dump after the standalone dead code elimination passes.
|
4383 |
|
|
.IP "\fB\-fdump\-rtl\-dbr\fR" 4
|
4384 |
|
|
.IX Item "-fdump-rtl-dbr"
|
4385 |
|
|
Dump after delayed branch scheduling.
|
4386 |
|
|
.IP "\fB\-fdump\-rtl\-dce1\fR" 4
|
4387 |
|
|
.IX Item "-fdump-rtl-dce1"
|
4388 |
|
|
.PD 0
|
4389 |
|
|
.IP "\fB\-fdump\-rtl\-dce2\fR" 4
|
4390 |
|
|
.IX Item "-fdump-rtl-dce2"
|
4391 |
|
|
.PD
|
4392 |
|
|
\&\fB\-fdump\-rtl\-dce1\fR and \fB\-fdump\-rtl\-dce2\fR enable dumping after
|
4393 |
|
|
the two dead store elimination passes.
|
4394 |
|
|
.IP "\fB\-fdump\-rtl\-eh\fR" 4
|
4395 |
|
|
.IX Item "-fdump-rtl-eh"
|
4396 |
|
|
Dump after finalization of \s-1EH\s0 handling code.
|
4397 |
|
|
.IP "\fB\-fdump\-rtl\-eh_ranges\fR" 4
|
4398 |
|
|
.IX Item "-fdump-rtl-eh_ranges"
|
4399 |
|
|
Dump after conversion of \s-1EH\s0 handling range regions.
|
4400 |
|
|
.IP "\fB\-fdump\-rtl\-expand\fR" 4
|
4401 |
|
|
.IX Item "-fdump-rtl-expand"
|
4402 |
|
|
Dump after \s-1RTL\s0 generation.
|
4403 |
|
|
.IP "\fB\-fdump\-rtl\-fwprop1\fR" 4
|
4404 |
|
|
.IX Item "-fdump-rtl-fwprop1"
|
4405 |
|
|
.PD 0
|
4406 |
|
|
.IP "\fB\-fdump\-rtl\-fwprop2\fR" 4
|
4407 |
|
|
.IX Item "-fdump-rtl-fwprop2"
|
4408 |
|
|
.PD
|
4409 |
|
|
\&\fB\-fdump\-rtl\-fwprop1\fR and \fB\-fdump\-rtl\-fwprop2\fR enable
|
4410 |
|
|
dumping after the two forward propagation passes.
|
4411 |
|
|
.IP "\fB\-fdump\-rtl\-gcse1\fR" 4
|
4412 |
|
|
.IX Item "-fdump-rtl-gcse1"
|
4413 |
|
|
.PD 0
|
4414 |
|
|
.IP "\fB\-fdump\-rtl\-gcse2\fR" 4
|
4415 |
|
|
.IX Item "-fdump-rtl-gcse2"
|
4416 |
|
|
.PD
|
4417 |
|
|
\&\fB\-fdump\-rtl\-gcse1\fR and \fB\-fdump\-rtl\-gcse2\fR enable dumping
|
4418 |
|
|
after global common subexpression elimination.
|
4419 |
|
|
.IP "\fB\-fdump\-rtl\-init\-regs\fR" 4
|
4420 |
|
|
.IX Item "-fdump-rtl-init-regs"
|
4421 |
|
|
Dump after the initialization of the registers.
|
4422 |
|
|
.IP "\fB\-fdump\-rtl\-initvals\fR" 4
|
4423 |
|
|
.IX Item "-fdump-rtl-initvals"
|
4424 |
|
|
Dump after the computation of the initial value sets.
|
4425 |
|
|
.IP "\fB\-fdump\-rtl\-into_cfglayout\fR" 4
|
4426 |
|
|
.IX Item "-fdump-rtl-into_cfglayout"
|
4427 |
|
|
Dump after converting to cfglayout mode.
|
4428 |
|
|
.IP "\fB\-fdump\-rtl\-ira\fR" 4
|
4429 |
|
|
.IX Item "-fdump-rtl-ira"
|
4430 |
|
|
Dump after iterated register allocation.
|
4431 |
|
|
.IP "\fB\-fdump\-rtl\-jump\fR" 4
|
4432 |
|
|
.IX Item "-fdump-rtl-jump"
|
4433 |
|
|
Dump after the second jump optimization.
|
4434 |
|
|
.IP "\fB\-fdump\-rtl\-loop2\fR" 4
|
4435 |
|
|
.IX Item "-fdump-rtl-loop2"
|
4436 |
|
|
\&\fB\-fdump\-rtl\-loop2\fR enables dumping after the rtl
|
4437 |
|
|
loop optimization passes.
|
4438 |
|
|
.IP "\fB\-fdump\-rtl\-mach\fR" 4
|
4439 |
|
|
.IX Item "-fdump-rtl-mach"
|
4440 |
|
|
Dump after performing the machine dependent reorganization pass, if that
|
4441 |
|
|
pass exists.
|
4442 |
|
|
.IP "\fB\-fdump\-rtl\-mode_sw\fR" 4
|
4443 |
|
|
.IX Item "-fdump-rtl-mode_sw"
|
4444 |
|
|
Dump after removing redundant mode switches.
|
4445 |
|
|
.IP "\fB\-fdump\-rtl\-rnreg\fR" 4
|
4446 |
|
|
.IX Item "-fdump-rtl-rnreg"
|
4447 |
|
|
Dump after register renumbering.
|
4448 |
|
|
.IP "\fB\-fdump\-rtl\-outof_cfglayout\fR" 4
|
4449 |
|
|
.IX Item "-fdump-rtl-outof_cfglayout"
|
4450 |
|
|
Dump after converting from cfglayout mode.
|
4451 |
|
|
.IP "\fB\-fdump\-rtl\-peephole2\fR" 4
|
4452 |
|
|
.IX Item "-fdump-rtl-peephole2"
|
4453 |
|
|
Dump after the peephole pass.
|
4454 |
|
|
.IP "\fB\-fdump\-rtl\-postreload\fR" 4
|
4455 |
|
|
.IX Item "-fdump-rtl-postreload"
|
4456 |
|
|
Dump after post-reload optimizations.
|
4457 |
|
|
.IP "\fB\-fdump\-rtl\-pro_and_epilogue\fR" 4
|
4458 |
|
|
.IX Item "-fdump-rtl-pro_and_epilogue"
|
4459 |
|
|
Dump after generating the function pro and epilogues.
|
4460 |
|
|
.IP "\fB\-fdump\-rtl\-regmove\fR" 4
|
4461 |
|
|
.IX Item "-fdump-rtl-regmove"
|
4462 |
|
|
Dump after the register move pass.
|
4463 |
|
|
.IP "\fB\-fdump\-rtl\-sched1\fR" 4
|
4464 |
|
|
.IX Item "-fdump-rtl-sched1"
|
4465 |
|
|
.PD 0
|
4466 |
|
|
.IP "\fB\-fdump\-rtl\-sched2\fR" 4
|
4467 |
|
|
.IX Item "-fdump-rtl-sched2"
|
4468 |
|
|
.PD
|
4469 |
|
|
\&\fB\-fdump\-rtl\-sched1\fR and \fB\-fdump\-rtl\-sched2\fR enable dumping
|
4470 |
|
|
after the basic block scheduling passes.
|
4471 |
|
|
.IP "\fB\-fdump\-rtl\-see\fR" 4
|
4472 |
|
|
.IX Item "-fdump-rtl-see"
|
4473 |
|
|
Dump after sign extension elimination.
|
4474 |
|
|
.IP "\fB\-fdump\-rtl\-seqabstr\fR" 4
|
4475 |
|
|
.IX Item "-fdump-rtl-seqabstr"
|
4476 |
|
|
Dump after common sequence discovery.
|
4477 |
|
|
.IP "\fB\-fdump\-rtl\-shorten\fR" 4
|
4478 |
|
|
.IX Item "-fdump-rtl-shorten"
|
4479 |
|
|
Dump after shortening branches.
|
4480 |
|
|
.IP "\fB\-fdump\-rtl\-sibling\fR" 4
|
4481 |
|
|
.IX Item "-fdump-rtl-sibling"
|
4482 |
|
|
Dump after sibling call optimizations.
|
4483 |
|
|
.IP "\fB\-fdump\-rtl\-split1\fR" 4
|
4484 |
|
|
.IX Item "-fdump-rtl-split1"
|
4485 |
|
|
.PD 0
|
4486 |
|
|
.IP "\fB\-fdump\-rtl\-split2\fR" 4
|
4487 |
|
|
.IX Item "-fdump-rtl-split2"
|
4488 |
|
|
.IP "\fB\-fdump\-rtl\-split3\fR" 4
|
4489 |
|
|
.IX Item "-fdump-rtl-split3"
|
4490 |
|
|
.IP "\fB\-fdump\-rtl\-split4\fR" 4
|
4491 |
|
|
.IX Item "-fdump-rtl-split4"
|
4492 |
|
|
.IP "\fB\-fdump\-rtl\-split5\fR" 4
|
4493 |
|
|
.IX Item "-fdump-rtl-split5"
|
4494 |
|
|
.PD
|
4495 |
|
|
\&\fB\-fdump\-rtl\-split1\fR, \fB\-fdump\-rtl\-split2\fR,
|
4496 |
|
|
\&\fB\-fdump\-rtl\-split3\fR, \fB\-fdump\-rtl\-split4\fR and
|
4497 |
|
|
\&\fB\-fdump\-rtl\-split5\fR enable dumping after five rounds of
|
4498 |
|
|
instruction splitting.
|
4499 |
|
|
.IP "\fB\-fdump\-rtl\-sms\fR" 4
|
4500 |
|
|
.IX Item "-fdump-rtl-sms"
|
4501 |
|
|
Dump after modulo scheduling. This pass is only run on some
|
4502 |
|
|
architectures.
|
4503 |
|
|
.IP "\fB\-fdump\-rtl\-stack\fR" 4
|
4504 |
|
|
.IX Item "-fdump-rtl-stack"
|
4505 |
|
|
Dump after conversion from \s-1GCC\s0's \*(L"flat register file\*(R" registers to the
|
4506 |
|
|
x87's stack-like registers. This pass is only run on x86 variants.
|
4507 |
|
|
.IP "\fB\-fdump\-rtl\-subreg1\fR" 4
|
4508 |
|
|
.IX Item "-fdump-rtl-subreg1"
|
4509 |
|
|
.PD 0
|
4510 |
|
|
.IP "\fB\-fdump\-rtl\-subreg2\fR" 4
|
4511 |
|
|
.IX Item "-fdump-rtl-subreg2"
|
4512 |
|
|
.PD
|
4513 |
|
|
\&\fB\-fdump\-rtl\-subreg1\fR and \fB\-fdump\-rtl\-subreg2\fR enable dumping after
|
4514 |
|
|
the two subreg expansion passes.
|
4515 |
|
|
.IP "\fB\-fdump\-rtl\-unshare\fR" 4
|
4516 |
|
|
.IX Item "-fdump-rtl-unshare"
|
4517 |
|
|
Dump after all rtl has been unshared.
|
4518 |
|
|
.IP "\fB\-fdump\-rtl\-vartrack\fR" 4
|
4519 |
|
|
.IX Item "-fdump-rtl-vartrack"
|
4520 |
|
|
Dump after variable tracking.
|
4521 |
|
|
.IP "\fB\-fdump\-rtl\-vregs\fR" 4
|
4522 |
|
|
.IX Item "-fdump-rtl-vregs"
|
4523 |
|
|
Dump after converting virtual registers to hard registers.
|
4524 |
|
|
.IP "\fB\-fdump\-rtl\-web\fR" 4
|
4525 |
|
|
.IX Item "-fdump-rtl-web"
|
4526 |
|
|
Dump after live range splitting.
|
4527 |
|
|
.IP "\fB\-fdump\-rtl\-regclass\fR" 4
|
4528 |
|
|
.IX Item "-fdump-rtl-regclass"
|
4529 |
|
|
.PD 0
|
4530 |
|
|
.IP "\fB\-fdump\-rtl\-subregs_of_mode_init\fR" 4
|
4531 |
|
|
.IX Item "-fdump-rtl-subregs_of_mode_init"
|
4532 |
|
|
.IP "\fB\-fdump\-rtl\-subregs_of_mode_finish\fR" 4
|
4533 |
|
|
.IX Item "-fdump-rtl-subregs_of_mode_finish"
|
4534 |
|
|
.IP "\fB\-fdump\-rtl\-dfinit\fR" 4
|
4535 |
|
|
.IX Item "-fdump-rtl-dfinit"
|
4536 |
|
|
.IP "\fB\-fdump\-rtl\-dfinish\fR" 4
|
4537 |
|
|
.IX Item "-fdump-rtl-dfinish"
|
4538 |
|
|
.PD
|
4539 |
|
|
These dumps are defined but always produce empty files.
|
4540 |
|
|
.IP "\fB\-fdump\-rtl\-all\fR" 4
|
4541 |
|
|
.IX Item "-fdump-rtl-all"
|
4542 |
|
|
Produce all the dumps listed above.
|
4543 |
|
|
.IP "\fB\-dA\fR" 4
|
4544 |
|
|
.IX Item "-dA"
|
4545 |
|
|
Annotate the assembler output with miscellaneous debugging information.
|
4546 |
|
|
.IP "\fB\-dD\fR" 4
|
4547 |
|
|
.IX Item "-dD"
|
4548 |
|
|
Dump all macro definitions, at the end of preprocessing, in addition to
|
4549 |
|
|
normal output.
|
4550 |
|
|
.IP "\fB\-dH\fR" 4
|
4551 |
|
|
.IX Item "-dH"
|
4552 |
|
|
Produce a core dump whenever an error occurs.
|
4553 |
|
|
.IP "\fB\-dm\fR" 4
|
4554 |
|
|
.IX Item "-dm"
|
4555 |
|
|
Print statistics on memory usage, at the end of the run, to
|
4556 |
|
|
standard error.
|
4557 |
|
|
.IP "\fB\-dp\fR" 4
|
4558 |
|
|
.IX Item "-dp"
|
4559 |
|
|
Annotate the assembler output with a comment indicating which
|
4560 |
|
|
pattern and alternative was used. The length of each instruction is
|
4561 |
|
|
also printed.
|
4562 |
|
|
.IP "\fB\-dP\fR" 4
|
4563 |
|
|
.IX Item "-dP"
|
4564 |
|
|
Dump the \s-1RTL\s0 in the assembler output as a comment before each instruction.
|
4565 |
|
|
Also turns on \fB\-dp\fR annotation.
|
4566 |
|
|
.IP "\fB\-dv\fR" 4
|
4567 |
|
|
.IX Item "-dv"
|
4568 |
|
|
For each of the other indicated dump files (\fB\-fdump\-rtl\-\fR\fIpass\fR),
|
4569 |
|
|
dump a representation of the control flow graph suitable for viewing with \s-1VCG\s0
|
4570 |
|
|
to \fI\fIfile\fI.\fIpass\fI.vcg\fR.
|
4571 |
|
|
.IP "\fB\-dx\fR" 4
|
4572 |
|
|
.IX Item "-dx"
|
4573 |
|
|
Just generate \s-1RTL\s0 for a function instead of compiling it. Usually used
|
4574 |
|
|
with \fB\-fdump\-rtl\-expand\fR.
|
4575 |
|
|
.IP "\fB\-dy\fR" 4
|
4576 |
|
|
.IX Item "-dy"
|
4577 |
|
|
Dump debugging information during parsing, to standard error.
|
4578 |
|
|
.RE
|
4579 |
|
|
.RS 4
|
4580 |
|
|
.RE
|
4581 |
|
|
.IP "\fB\-fdump\-noaddr\fR" 4
|
4582 |
|
|
.IX Item "-fdump-noaddr"
|
4583 |
|
|
When doing debugging dumps, suppress address output. This makes it more
|
4584 |
|
|
feasible to use diff on debugging dumps for compiler invocations with
|
4585 |
|
|
different compiler binaries and/or different
|
4586 |
|
|
text / bss / data / heap / stack / dso start locations.
|
4587 |
|
|
.IP "\fB\-fdump\-unnumbered\fR" 4
|
4588 |
|
|
.IX Item "-fdump-unnumbered"
|
4589 |
|
|
When doing debugging dumps, suppress instruction numbers and address output.
|
4590 |
|
|
This makes it more feasible to use diff on debugging dumps for compiler
|
4591 |
|
|
invocations with different options, in particular with and without
|
4592 |
|
|
\&\fB\-g\fR.
|
4593 |
|
|
.IP "\fB\-fdump\-unnumbered\-links\fR" 4
|
4594 |
|
|
.IX Item "-fdump-unnumbered-links"
|
4595 |
|
|
When doing debugging dumps (see \fB\-d\fR option above), suppress
|
4596 |
|
|
instruction numbers for the links to the previous and next instructions
|
4597 |
|
|
in a sequence.
|
4598 |
|
|
.IP "\fB\-fdump\-translation\-unit\fR (\*(C+ only)" 4
|
4599 |
|
|
.IX Item "-fdump-translation-unit ( only)"
|
4600 |
|
|
.PD 0
|
4601 |
|
|
.IP "\fB\-fdump\-translation\-unit\-\fR\fIoptions\fR\fB \fR(\*(C+ only)" 4
|
4602 |
|
|
.IX Item "-fdump-translation-unit-options ( only)"
|
4603 |
|
|
.PD
|
4604 |
|
|
Dump a representation of the tree structure for the entire translation
|
4605 |
|
|
unit to a file. The file name is made by appending \fI.tu\fR to the
|
4606 |
|
|
source file name, and the file is created in the same directory as the
|
4607 |
|
|
output file. If the \fB\-\fR\fIoptions\fR form is used, \fIoptions\fR
|
4608 |
|
|
controls the details of the dump as described for the
|
4609 |
|
|
\&\fB\-fdump\-tree\fR options.
|
4610 |
|
|
.IP "\fB\-fdump\-class\-hierarchy\fR (\*(C+ only)" 4
|
4611 |
|
|
.IX Item "-fdump-class-hierarchy ( only)"
|
4612 |
|
|
.PD 0
|
4613 |
|
|
.IP "\fB\-fdump\-class\-hierarchy\-\fR\fIoptions\fR\fB \fR(\*(C+ only)" 4
|
4614 |
|
|
.IX Item "-fdump-class-hierarchy-options ( only)"
|
4615 |
|
|
.PD
|
4616 |
|
|
Dump a representation of each class's hierarchy and virtual function
|
4617 |
|
|
table layout to a file. The file name is made by appending
|
4618 |
|
|
\&\fI.class\fR to the source file name, and the file is created in the
|
4619 |
|
|
same directory as the output file. If the \fB\-\fR\fIoptions\fR form
|
4620 |
|
|
is used, \fIoptions\fR controls the details of the dump as described
|
4621 |
|
|
for the \fB\-fdump\-tree\fR options.
|
4622 |
|
|
.IP "\fB\-fdump\-ipa\-\fR\fIswitch\fR" 4
|
4623 |
|
|
.IX Item "-fdump-ipa-switch"
|
4624 |
|
|
Control the dumping at various stages of inter-procedural analysis
|
4625 |
|
|
language tree to a file. The file name is generated by appending a
|
4626 |
|
|
switch specific suffix to the source file name, and the file is created
|
4627 |
|
|
in the same directory as the output file. The following dumps are
|
4628 |
|
|
possible:
|
4629 |
|
|
.RS 4
|
4630 |
|
|
.IP "\fBall\fR" 4
|
4631 |
|
|
.IX Item "all"
|
4632 |
|
|
Enables all inter-procedural analysis dumps.
|
4633 |
|
|
.IP "\fBcgraph\fR" 4
|
4634 |
|
|
.IX Item "cgraph"
|
4635 |
|
|
Dumps information about call-graph optimization, unused function removal,
|
4636 |
|
|
and inlining decisions.
|
4637 |
|
|
.IP "\fBinline\fR" 4
|
4638 |
|
|
.IX Item "inline"
|
4639 |
|
|
Dump after function inlining.
|
4640 |
|
|
.RE
|
4641 |
|
|
.RS 4
|
4642 |
|
|
.RE
|
4643 |
|
|
.IP "\fB\-fdump\-statistics\-\fR\fIoption\fR" 4
|
4644 |
|
|
.IX Item "-fdump-statistics-option"
|
4645 |
|
|
Enable and control dumping of pass statistics in a separate file. The
|
4646 |
|
|
file name is generated by appending a suffix ending in
|
4647 |
|
|
\&\fB.statistics\fR to the source file name, and the file is created in
|
4648 |
|
|
the same directory as the output file. If the \fB\-\fR\fIoption\fR
|
4649 |
|
|
form is used, \fB\-stats\fR will cause counters to be summed over the
|
4650 |
|
|
whole compilation unit while \fB\-details\fR will dump every event as
|
4651 |
|
|
the passes generate them. The default with no option is to sum
|
4652 |
|
|
counters for each function compiled.
|
4653 |
|
|
.IP "\fB\-fdump\-tree\-\fR\fIswitch\fR" 4
|
4654 |
|
|
.IX Item "-fdump-tree-switch"
|
4655 |
|
|
.PD 0
|
4656 |
|
|
.IP "\fB\-fdump\-tree\-\fR\fIswitch\fR\fB\-\fR\fIoptions\fR" 4
|
4657 |
|
|
.IX Item "-fdump-tree-switch-options"
|
4658 |
|
|
.PD
|
4659 |
|
|
Control the dumping at various stages of processing the intermediate
|
4660 |
|
|
language tree to a file. The file name is generated by appending a
|
4661 |
|
|
switch specific suffix to the source file name, and the file is
|
4662 |
|
|
created in the same directory as the output file. If the
|
4663 |
|
|
\&\fB\-\fR\fIoptions\fR form is used, \fIoptions\fR is a list of
|
4664 |
|
|
\&\fB\-\fR separated options that control the details of the dump. Not
|
4665 |
|
|
all options are applicable to all dumps, those which are not
|
4666 |
|
|
meaningful will be ignored. The following options are available
|
4667 |
|
|
.RS 4
|
4668 |
|
|
.IP "\fBaddress\fR" 4
|
4669 |
|
|
.IX Item "address"
|
4670 |
|
|
Print the address of each node. Usually this is not meaningful as it
|
4671 |
|
|
changes according to the environment and source file. Its primary use
|
4672 |
|
|
is for tying up a dump file with a debug environment.
|
4673 |
|
|
.IP "\fBasmname\fR" 4
|
4674 |
|
|
.IX Item "asmname"
|
4675 |
|
|
If \f(CW\*(C`DECL_ASSEMBLER_NAME\*(C'\fR has been set for a given decl, use that
|
4676 |
|
|
in the dump instead of \f(CW\*(C`DECL_NAME\*(C'\fR. Its primary use is ease of
|
4677 |
|
|
use working backward from mangled names in the assembly file.
|
4678 |
|
|
.IP "\fBslim\fR" 4
|
4679 |
|
|
.IX Item "slim"
|
4680 |
|
|
Inhibit dumping of members of a scope or body of a function merely
|
4681 |
|
|
because that scope has been reached. Only dump such items when they
|
4682 |
|
|
are directly reachable by some other path. When dumping pretty-printed
|
4683 |
|
|
trees, this option inhibits dumping the bodies of control structures.
|
4684 |
|
|
.IP "\fBraw\fR" 4
|
4685 |
|
|
.IX Item "raw"
|
4686 |
|
|
Print a raw representation of the tree. By default, trees are
|
4687 |
|
|
pretty-printed into a C\-like representation.
|
4688 |
|
|
.IP "\fBdetails\fR" 4
|
4689 |
|
|
.IX Item "details"
|
4690 |
|
|
Enable more detailed dumps (not honored by every dump option).
|
4691 |
|
|
.IP "\fBstats\fR" 4
|
4692 |
|
|
.IX Item "stats"
|
4693 |
|
|
Enable dumping various statistics about the pass (not honored by every dump
|
4694 |
|
|
option).
|
4695 |
|
|
.IP "\fBblocks\fR" 4
|
4696 |
|
|
.IX Item "blocks"
|
4697 |
|
|
Enable showing basic block boundaries (disabled in raw dumps).
|
4698 |
|
|
.IP "\fBvops\fR" 4
|
4699 |
|
|
.IX Item "vops"
|
4700 |
|
|
Enable showing virtual operands for every statement.
|
4701 |
|
|
.IP "\fBlineno\fR" 4
|
4702 |
|
|
.IX Item "lineno"
|
4703 |
|
|
Enable showing line numbers for statements.
|
4704 |
|
|
.IP "\fBuid\fR" 4
|
4705 |
|
|
.IX Item "uid"
|
4706 |
|
|
Enable showing the unique \s-1ID\s0 (\f(CW\*(C`DECL_UID\*(C'\fR) for each variable.
|
4707 |
|
|
.IP "\fBverbose\fR" 4
|
4708 |
|
|
.IX Item "verbose"
|
4709 |
|
|
Enable showing the tree dump for each statement.
|
4710 |
|
|
.IP "\fBeh\fR" 4
|
4711 |
|
|
.IX Item "eh"
|
4712 |
|
|
Enable showing the \s-1EH\s0 region number holding each statement.
|
4713 |
|
|
.IP "\fBall\fR" 4
|
4714 |
|
|
.IX Item "all"
|
4715 |
|
|
Turn on all options, except \fBraw\fR, \fBslim\fR, \fBverbose\fR
|
4716 |
|
|
and \fBlineno\fR.
|
4717 |
|
|
.RE
|
4718 |
|
|
.RS 4
|
4719 |
|
|
.Sp
|
4720 |
|
|
The following tree dumps are possible:
|
4721 |
|
|
.IP "\fBoriginal\fR" 4
|
4722 |
|
|
.IX Item "original"
|
4723 |
|
|
Dump before any tree based optimization, to \fI\fIfile\fI.original\fR.
|
4724 |
|
|
.IP "\fBoptimized\fR" 4
|
4725 |
|
|
.IX Item "optimized"
|
4726 |
|
|
Dump after all tree based optimization, to \fI\fIfile\fI.optimized\fR.
|
4727 |
|
|
.IP "\fBgimple\fR" 4
|
4728 |
|
|
.IX Item "gimple"
|
4729 |
|
|
Dump each function before and after the gimplification pass to a file. The
|
4730 |
|
|
file name is made by appending \fI.gimple\fR to the source file name.
|
4731 |
|
|
.IP "\fBcfg\fR" 4
|
4732 |
|
|
.IX Item "cfg"
|
4733 |
|
|
Dump the control flow graph of each function to a file. The file name is
|
4734 |
|
|
made by appending \fI.cfg\fR to the source file name.
|
4735 |
|
|
.IP "\fBvcg\fR" 4
|
4736 |
|
|
.IX Item "vcg"
|
4737 |
|
|
Dump the control flow graph of each function to a file in \s-1VCG\s0 format. The
|
4738 |
|
|
file name is made by appending \fI.vcg\fR to the source file name. Note
|
4739 |
|
|
that if the file contains more than one function, the generated file cannot
|
4740 |
|
|
be used directly by \s-1VCG\s0. You will need to cut and paste each function's
|
4741 |
|
|
graph into its own separate file first.
|
4742 |
|
|
.IP "\fBch\fR" 4
|
4743 |
|
|
.IX Item "ch"
|
4744 |
|
|
Dump each function after copying loop headers. The file name is made by
|
4745 |
|
|
appending \fI.ch\fR to the source file name.
|
4746 |
|
|
.IP "\fBssa\fR" 4
|
4747 |
|
|
.IX Item "ssa"
|
4748 |
|
|
Dump \s-1SSA\s0 related information to a file. The file name is made by appending
|
4749 |
|
|
\&\fI.ssa\fR to the source file name.
|
4750 |
|
|
.IP "\fBalias\fR" 4
|
4751 |
|
|
.IX Item "alias"
|
4752 |
|
|
Dump aliasing information for each function. The file name is made by
|
4753 |
|
|
appending \fI.alias\fR to the source file name.
|
4754 |
|
|
.IP "\fBccp\fR" 4
|
4755 |
|
|
.IX Item "ccp"
|
4756 |
|
|
Dump each function after \s-1CCP\s0. The file name is made by appending
|
4757 |
|
|
\&\fI.ccp\fR to the source file name.
|
4758 |
|
|
.IP "\fBstoreccp\fR" 4
|
4759 |
|
|
.IX Item "storeccp"
|
4760 |
|
|
Dump each function after STORE-CCP. The file name is made by appending
|
4761 |
|
|
\&\fI.storeccp\fR to the source file name.
|
4762 |
|
|
.IP "\fBpre\fR" 4
|
4763 |
|
|
.IX Item "pre"
|
4764 |
|
|
Dump trees after partial redundancy elimination. The file name is made
|
4765 |
|
|
by appending \fI.pre\fR to the source file name.
|
4766 |
|
|
.IP "\fBfre\fR" 4
|
4767 |
|
|
.IX Item "fre"
|
4768 |
|
|
Dump trees after full redundancy elimination. The file name is made
|
4769 |
|
|
by appending \fI.fre\fR to the source file name.
|
4770 |
|
|
.IP "\fBcopyprop\fR" 4
|
4771 |
|
|
.IX Item "copyprop"
|
4772 |
|
|
Dump trees after copy propagation. The file name is made
|
4773 |
|
|
by appending \fI.copyprop\fR to the source file name.
|
4774 |
|
|
.IP "\fBstore_copyprop\fR" 4
|
4775 |
|
|
.IX Item "store_copyprop"
|
4776 |
|
|
Dump trees after store copy-propagation. The file name is made
|
4777 |
|
|
by appending \fI.store_copyprop\fR to the source file name.
|
4778 |
|
|
.IP "\fBdce\fR" 4
|
4779 |
|
|
.IX Item "dce"
|
4780 |
|
|
Dump each function after dead code elimination. The file name is made by
|
4781 |
|
|
appending \fI.dce\fR to the source file name.
|
4782 |
|
|
.IP "\fBmudflap\fR" 4
|
4783 |
|
|
.IX Item "mudflap"
|
4784 |
|
|
Dump each function after adding mudflap instrumentation. The file name is
|
4785 |
|
|
made by appending \fI.mudflap\fR to the source file name.
|
4786 |
|
|
.IP "\fBsra\fR" 4
|
4787 |
|
|
.IX Item "sra"
|
4788 |
|
|
Dump each function after performing scalar replacement of aggregates. The
|
4789 |
|
|
file name is made by appending \fI.sra\fR to the source file name.
|
4790 |
|
|
.IP "\fBsink\fR" 4
|
4791 |
|
|
.IX Item "sink"
|
4792 |
|
|
Dump each function after performing code sinking. The file name is made
|
4793 |
|
|
by appending \fI.sink\fR to the source file name.
|
4794 |
|
|
.IP "\fBdom\fR" 4
|
4795 |
|
|
.IX Item "dom"
|
4796 |
|
|
Dump each function after applying dominator tree optimizations. The file
|
4797 |
|
|
name is made by appending \fI.dom\fR to the source file name.
|
4798 |
|
|
.IP "\fBdse\fR" 4
|
4799 |
|
|
.IX Item "dse"
|
4800 |
|
|
Dump each function after applying dead store elimination. The file
|
4801 |
|
|
name is made by appending \fI.dse\fR to the source file name.
|
4802 |
|
|
.IP "\fBphiopt\fR" 4
|
4803 |
|
|
.IX Item "phiopt"
|
4804 |
|
|
Dump each function after optimizing \s-1PHI\s0 nodes into straightline code. The file
|
4805 |
|
|
name is made by appending \fI.phiopt\fR to the source file name.
|
4806 |
|
|
.IP "\fBforwprop\fR" 4
|
4807 |
|
|
.IX Item "forwprop"
|
4808 |
|
|
Dump each function after forward propagating single use variables. The file
|
4809 |
|
|
name is made by appending \fI.forwprop\fR to the source file name.
|
4810 |
|
|
.IP "\fBcopyrename\fR" 4
|
4811 |
|
|
.IX Item "copyrename"
|
4812 |
|
|
Dump each function after applying the copy rename optimization. The file
|
4813 |
|
|
name is made by appending \fI.copyrename\fR to the source file name.
|
4814 |
|
|
.IP "\fBnrv\fR" 4
|
4815 |
|
|
.IX Item "nrv"
|
4816 |
|
|
Dump each function after applying the named return value optimization on
|
4817 |
|
|
generic trees. The file name is made by appending \fI.nrv\fR to the source
|
4818 |
|
|
file name.
|
4819 |
|
|
.IP "\fBvect\fR" 4
|
4820 |
|
|
.IX Item "vect"
|
4821 |
|
|
Dump each function after applying vectorization of loops. The file name is
|
4822 |
|
|
made by appending \fI.vect\fR to the source file name.
|
4823 |
|
|
.IP "\fBslp\fR" 4
|
4824 |
|
|
.IX Item "slp"
|
4825 |
|
|
Dump each function after applying vectorization of basic blocks. The file name
|
4826 |
|
|
is made by appending \fI.slp\fR to the source file name.
|
4827 |
|
|
.IP "\fBvrp\fR" 4
|
4828 |
|
|
.IX Item "vrp"
|
4829 |
|
|
Dump each function after Value Range Propagation (\s-1VRP\s0). The file name
|
4830 |
|
|
is made by appending \fI.vrp\fR to the source file name.
|
4831 |
|
|
.IP "\fBall\fR" 4
|
4832 |
|
|
.IX Item "all"
|
4833 |
|
|
Enable all the available tree dumps with the flags provided in this option.
|
4834 |
|
|
.RE
|
4835 |
|
|
.RS 4
|
4836 |
|
|
.RE
|
4837 |
|
|
.IP "\fB\-ftree\-vectorizer\-verbose=\fR\fIn\fR" 4
|
4838 |
|
|
.IX Item "-ftree-vectorizer-verbose=n"
|
4839 |
|
|
This option controls the amount of debugging output the vectorizer prints.
|
4840 |
|
|
This information is written to standard error, unless
|
4841 |
|
|
\&\fB\-fdump\-tree\-all\fR or \fB\-fdump\-tree\-vect\fR is specified,
|
4842 |
|
|
in which case it is output to the usual dump listing file, \fI.vect\fR.
|
4843 |
|
|
For \fIn\fR=0 no diagnostic information is reported.
|
4844 |
|
|
If \fIn\fR=1 the vectorizer reports each loop that got vectorized,
|
4845 |
|
|
and the total number of loops that got vectorized.
|
4846 |
|
|
If \fIn\fR=2 the vectorizer also reports non-vectorized loops that passed
|
4847 |
|
|
the first analysis phase (vect_analyze_loop_form) \- i.e. countable,
|
4848 |
|
|
inner-most, single-bb, single\-entry/exit loops. This is the same verbosity
|
4849 |
|
|
level that \fB\-fdump\-tree\-vect\-stats\fR uses.
|
4850 |
|
|
Higher verbosity levels mean either more information dumped for each
|
4851 |
|
|
reported loop, or same amount of information reported for more loops:
|
4852 |
|
|
if \fIn\fR=3, vectorizer cost model information is reported.
|
4853 |
|
|
If \fIn\fR=4, alignment related information is added to the reports.
|
4854 |
|
|
If \fIn\fR=5, data-references related information (e.g. memory dependences,
|
4855 |
|
|
memory access-patterns) is added to the reports.
|
4856 |
|
|
If \fIn\fR=6, the vectorizer reports also non-vectorized inner-most loops
|
4857 |
|
|
that did not pass the first analysis phase (i.e., may not be countable, or
|
4858 |
|
|
may have complicated control-flow).
|
4859 |
|
|
If \fIn\fR=7, the vectorizer reports also non-vectorized nested loops.
|
4860 |
|
|
If \fIn\fR=8, \s-1SLP\s0 related information is added to the reports.
|
4861 |
|
|
For \fIn\fR=9, all the information the vectorizer generates during its
|
4862 |
|
|
analysis and transformation is reported. This is the same verbosity level
|
4863 |
|
|
that \fB\-fdump\-tree\-vect\-details\fR uses.
|
4864 |
|
|
.IP "\fB\-frandom\-seed=\fR\fIstring\fR" 4
|
4865 |
|
|
.IX Item "-frandom-seed=string"
|
4866 |
|
|
This option provides a seed that \s-1GCC\s0 uses when it would otherwise use
|
4867 |
|
|
random numbers. It is used to generate certain symbol names
|
4868 |
|
|
that have to be different in every compiled file. It is also used to
|
4869 |
|
|
place unique stamps in coverage data files and the object files that
|
4870 |
|
|
produce them. You can use the \fB\-frandom\-seed\fR option to produce
|
4871 |
|
|
reproducibly identical object files.
|
4872 |
|
|
.Sp
|
4873 |
|
|
The \fIstring\fR should be different for every file you compile.
|
4874 |
|
|
.IP "\fB\-fsched\-verbose=\fR\fIn\fR" 4
|
4875 |
|
|
.IX Item "-fsched-verbose=n"
|
4876 |
|
|
On targets that use instruction scheduling, this option controls the
|
4877 |
|
|
amount of debugging output the scheduler prints. This information is
|
4878 |
|
|
written to standard error, unless \fB\-fdump\-rtl\-sched1\fR or
|
4879 |
|
|
\&\fB\-fdump\-rtl\-sched2\fR is specified, in which case it is output
|
4880 |
|
|
to the usual dump listing file, \fI.sched1\fR or \fI.sched2\fR
|
4881 |
|
|
respectively. However for \fIn\fR greater than nine, the output is
|
4882 |
|
|
always printed to standard error.
|
4883 |
|
|
.Sp
|
4884 |
|
|
For \fIn\fR greater than zero, \fB\-fsched\-verbose\fR outputs the
|
4885 |
|
|
same information as \fB\-fdump\-rtl\-sched1\fR and \fB\-fdump\-rtl\-sched2\fR.
|
4886 |
|
|
For \fIn\fR greater than one, it also output basic block probabilities,
|
4887 |
|
|
detailed ready list information and unit/insn info. For \fIn\fR greater
|
4888 |
|
|
than two, it includes \s-1RTL\s0 at abort point, control-flow and regions info.
|
4889 |
|
|
And for \fIn\fR over four, \fB\-fsched\-verbose\fR also includes
|
4890 |
|
|
dependence info.
|
4891 |
|
|
.IP "\fB\-save\-temps\fR" 4
|
4892 |
|
|
.IX Item "-save-temps"
|
4893 |
|
|
.PD 0
|
4894 |
|
|
.IP "\fB\-save\-temps=cwd\fR" 4
|
4895 |
|
|
.IX Item "-save-temps=cwd"
|
4896 |
|
|
.PD
|
4897 |
|
|
Store the usual \*(L"temporary\*(R" intermediate files permanently; place them
|
4898 |
|
|
in the current directory and name them based on the source file. Thus,
|
4899 |
|
|
compiling \fIfoo.c\fR with \fB\-c \-save\-temps\fR would produce files
|
4900 |
|
|
\&\fIfoo.i\fR and \fIfoo.s\fR, as well as \fIfoo.o\fR. This creates a
|
4901 |
|
|
preprocessed \fIfoo.i\fR output file even though the compiler now
|
4902 |
|
|
normally uses an integrated preprocessor.
|
4903 |
|
|
.Sp
|
4904 |
|
|
When used in combination with the \fB\-x\fR command line option,
|
4905 |
|
|
\&\fB\-save\-temps\fR is sensible enough to avoid over writing an
|
4906 |
|
|
input source file with the same extension as an intermediate file.
|
4907 |
|
|
The corresponding intermediate file may be obtained by renaming the
|
4908 |
|
|
source file before using \fB\-save\-temps\fR.
|
4909 |
|
|
.Sp
|
4910 |
|
|
If you invoke \s-1GCC\s0 in parallel, compiling several different source
|
4911 |
|
|
files that share a common base name in different subdirectories or the
|
4912 |
|
|
same source file compiled for multiple output destinations, it is
|
4913 |
|
|
likely that the different parallel compilers will interfere with each
|
4914 |
|
|
other, and overwrite the temporary files. For instance:
|
4915 |
|
|
.Sp
|
4916 |
|
|
.Vb 2
|
4917 |
|
|
\& gcc \-save\-temps \-o outdir1/foo.o indir1/foo.c&
|
4918 |
|
|
\& gcc \-save\-temps \-o outdir2/foo.o indir2/foo.c&
|
4919 |
|
|
.Ve
|
4920 |
|
|
.Sp
|
4921 |
|
|
may result in \fIfoo.i\fR and \fIfoo.o\fR being written to
|
4922 |
|
|
simultaneously by both compilers.
|
4923 |
|
|
.IP "\fB\-save\-temps=obj\fR" 4
|
4924 |
|
|
.IX Item "-save-temps=obj"
|
4925 |
|
|
Store the usual \*(L"temporary\*(R" intermediate files permanently. If the
|
4926 |
|
|
\&\fB\-o\fR option is used, the temporary files are based on the
|
4927 |
|
|
object file. If the \fB\-o\fR option is not used, the
|
4928 |
|
|
\&\fB\-save\-temps=obj\fR switch behaves like \fB\-save\-temps\fR.
|
4929 |
|
|
.Sp
|
4930 |
|
|
For example:
|
4931 |
|
|
.Sp
|
4932 |
|
|
.Vb 3
|
4933 |
|
|
\& gcc \-save\-temps=obj \-c foo.c
|
4934 |
|
|
\& gcc \-save\-temps=obj \-c bar.c \-o dir/xbar.o
|
4935 |
|
|
\& gcc \-save\-temps=obj foobar.c \-o dir2/yfoobar
|
4936 |
|
|
.Ve
|
4937 |
|
|
.Sp
|
4938 |
|
|
would create \fIfoo.i\fR, \fIfoo.s\fR, \fIdir/xbar.i\fR,
|
4939 |
|
|
\&\fIdir/xbar.s\fR, \fIdir2/yfoobar.i\fR, \fIdir2/yfoobar.s\fR, and
|
4940 |
|
|
\&\fIdir2/yfoobar.o\fR.
|
4941 |
|
|
.IP "\fB\-time\fR[\fB=\fR\fIfile\fR]" 4
|
4942 |
|
|
.IX Item "-time[=file]"
|
4943 |
|
|
Report the \s-1CPU\s0 time taken by each subprocess in the compilation
|
4944 |
|
|
sequence. For C source files, this is the compiler proper and assembler
|
4945 |
|
|
(plus the linker if linking is done).
|
4946 |
|
|
.Sp
|
4947 |
|
|
Without the specification of an output file, the output looks like this:
|
4948 |
|
|
.Sp
|
4949 |
|
|
.Vb 2
|
4950 |
|
|
\& # cc1 0.12 0.01
|
4951 |
|
|
\& # as 0.00 0.01
|
4952 |
|
|
.Ve
|
4953 |
|
|
.Sp
|
4954 |
|
|
The first number on each line is the \*(L"user time\*(R", that is time spent
|
4955 |
|
|
executing the program itself. The second number is \*(L"system time\*(R",
|
4956 |
|
|
time spent executing operating system routines on behalf of the program.
|
4957 |
|
|
Both numbers are in seconds.
|
4958 |
|
|
.Sp
|
4959 |
|
|
With the specification of an output file, the output is appended to the
|
4960 |
|
|
named file, and it looks like this:
|
4961 |
|
|
.Sp
|
4962 |
|
|
.Vb 2
|
4963 |
|
|
\& 0.12 0.01 cc1
|
4964 |
|
|
\& 0.00 0.01 as
|
4965 |
|
|
.Ve
|
4966 |
|
|
.Sp
|
4967 |
|
|
The \*(L"user time\*(R" and the \*(L"system time\*(R" are moved before the program
|
4968 |
|
|
name, and the options passed to the program are displayed, so that one
|
4969 |
|
|
can later tell what file was being compiled, and with which options.
|
4970 |
|
|
.IP "\fB\-fvar\-tracking\fR" 4
|
4971 |
|
|
.IX Item "-fvar-tracking"
|
4972 |
|
|
Run variable tracking pass. It computes where variables are stored at each
|
4973 |
|
|
position in code. Better debugging information is then generated
|
4974 |
|
|
(if the debugging information format supports this information).
|
4975 |
|
|
.Sp
|
4976 |
|
|
It is enabled by default when compiling with optimization (\fB\-Os\fR,
|
4977 |
|
|
\&\fB\-O\fR, \fB\-O2\fR, ...), debugging information (\fB\-g\fR) and
|
4978 |
|
|
the debug info format supports it.
|
4979 |
|
|
.IP "\fB\-fvar\-tracking\-assignments\fR" 4
|
4980 |
|
|
.IX Item "-fvar-tracking-assignments"
|
4981 |
|
|
Annotate assignments to user variables early in the compilation and
|
4982 |
|
|
attempt to carry the annotations over throughout the compilation all the
|
4983 |
|
|
way to the end, in an attempt to improve debug information while
|
4984 |
|
|
optimizing. Use of \fB\-gdwarf\-4\fR is recommended along with it.
|
4985 |
|
|
.Sp
|
4986 |
|
|
It can be enabled even if var-tracking is disabled, in which case
|
4987 |
|
|
annotations will be created and maintained, but discarded at the end.
|
4988 |
|
|
.IP "\fB\-fvar\-tracking\-assignments\-toggle\fR" 4
|
4989 |
|
|
.IX Item "-fvar-tracking-assignments-toggle"
|
4990 |
|
|
Toggle \fB\-fvar\-tracking\-assignments\fR, in the same way that
|
4991 |
|
|
\&\fB\-gtoggle\fR toggles \fB\-g\fR.
|
4992 |
|
|
.IP "\fB\-print\-file\-name=\fR\fIlibrary\fR" 4
|
4993 |
|
|
.IX Item "-print-file-name=library"
|
4994 |
|
|
Print the full absolute name of the library file \fIlibrary\fR that
|
4995 |
|
|
would be used when linking\-\-\-and don't do anything else. With this
|
4996 |
|
|
option, \s-1GCC\s0 does not compile or link anything; it just prints the
|
4997 |
|
|
file name.
|
4998 |
|
|
.IP "\fB\-print\-multi\-directory\fR" 4
|
4999 |
|
|
.IX Item "-print-multi-directory"
|
5000 |
|
|
Print the directory name corresponding to the multilib selected by any
|
5001 |
|
|
other switches present in the command line. This directory is supposed
|
5002 |
|
|
to exist in \fB\s-1GCC_EXEC_PREFIX\s0\fR.
|
5003 |
|
|
.IP "\fB\-print\-multi\-lib\fR" 4
|
5004 |
|
|
.IX Item "-print-multi-lib"
|
5005 |
|
|
Print the mapping from multilib directory names to compiler switches
|
5006 |
|
|
that enable them. The directory name is separated from the switches by
|
5007 |
|
|
\&\fB;\fR, and each switch starts with an \fB@} instead of the
|
5008 |
|
|
\&\f(CB@samp\fB{\-\fR, without spaces between multiple switches. This is supposed to
|
5009 |
|
|
ease shell-processing.
|
5010 |
|
|
.IP "\fB\-print\-multi\-os\-directory\fR" 4
|
5011 |
|
|
.IX Item "-print-multi-os-directory"
|
5012 |
|
|
Print the path to \s-1OS\s0 libraries for the selected
|
5013 |
|
|
multilib, relative to some \fIlib\fR subdirectory. If \s-1OS\s0 libraries are
|
5014 |
|
|
present in the \fIlib\fR subdirectory and no multilibs are used, this is
|
5015 |
|
|
usually just \fI.\fR, if \s-1OS\s0 libraries are present in \fIlib\fIsuffix\fI\fR
|
5016 |
|
|
sibling directories this prints e.g. \fI../lib64\fR, \fI../lib\fR or
|
5017 |
|
|
\&\fI../lib32\fR, or if \s-1OS\s0 libraries are present in \fIlib/\fIsubdir\fI\fR
|
5018 |
|
|
subdirectories it prints e.g. \fIamd64\fR, \fIsparcv9\fR or \fIev6\fR.
|
5019 |
|
|
.IP "\fB\-print\-prog\-name=\fR\fIprogram\fR" 4
|
5020 |
|
|
.IX Item "-print-prog-name=program"
|
5021 |
|
|
Like \fB\-print\-file\-name\fR, but searches for a program such as \fBcpp\fR.
|
5022 |
|
|
.IP "\fB\-print\-libgcc\-file\-name\fR" 4
|
5023 |
|
|
.IX Item "-print-libgcc-file-name"
|
5024 |
|
|
Same as \fB\-print\-file\-name=libgcc.a\fR.
|
5025 |
|
|
.Sp
|
5026 |
|
|
This is useful when you use \fB\-nostdlib\fR or \fB\-nodefaultlibs\fR
|
5027 |
|
|
but you do want to link with \fIlibgcc.a\fR. You can do
|
5028 |
|
|
.Sp
|
5029 |
|
|
.Vb 1
|
5030 |
|
|
\& gcc \-nostdlib ... \`gcc \-print\-libgcc\-file\-name\`
|
5031 |
|
|
.Ve
|
5032 |
|
|
.IP "\fB\-print\-search\-dirs\fR" 4
|
5033 |
|
|
.IX Item "-print-search-dirs"
|
5034 |
|
|
Print the name of the configured installation directory and a list of
|
5035 |
|
|
program and library directories \fBgcc\fR will search\-\-\-and don't do anything else.
|
5036 |
|
|
.Sp
|
5037 |
|
|
This is useful when \fBgcc\fR prints the error message
|
5038 |
|
|
\&\fBinstallation problem, cannot exec cpp0: No such file or directory\fR.
|
5039 |
|
|
To resolve this you either need to put \fIcpp0\fR and the other compiler
|
5040 |
|
|
components where \fBgcc\fR expects to find them, or you can set the environment
|
5041 |
|
|
variable \fB\s-1GCC_EXEC_PREFIX\s0\fR to the directory where you installed them.
|
5042 |
|
|
Don't forget the trailing \fB/\fR.
|
5043 |
|
|
.IP "\fB\-print\-sysroot\fR" 4
|
5044 |
|
|
.IX Item "-print-sysroot"
|
5045 |
|
|
Print the target sysroot directory that will be used during
|
5046 |
|
|
compilation. This is the target sysroot specified either at configure
|
5047 |
|
|
time or using the \fB\-\-sysroot\fR option, possibly with an extra
|
5048 |
|
|
suffix that depends on compilation options. If no target sysroot is
|
5049 |
|
|
specified, the option prints nothing.
|
5050 |
|
|
.IP "\fB\-print\-sysroot\-headers\-suffix\fR" 4
|
5051 |
|
|
.IX Item "-print-sysroot-headers-suffix"
|
5052 |
|
|
Print the suffix added to the target sysroot when searching for
|
5053 |
|
|
headers, or give an error if the compiler is not configured with such
|
5054 |
|
|
a suffix\-\-\-and don't do anything else.
|
5055 |
|
|
.IP "\fB\-dumpmachine\fR" 4
|
5056 |
|
|
.IX Item "-dumpmachine"
|
5057 |
|
|
Print the compiler's target machine (for example,
|
5058 |
|
|
\&\fBi686\-pc\-linux\-gnu\fR)\-\-\-and don't do anything else.
|
5059 |
|
|
.IP "\fB\-dumpversion\fR" 4
|
5060 |
|
|
.IX Item "-dumpversion"
|
5061 |
|
|
Print the compiler version (for example, \fB3.0\fR)\-\-\-and don't do
|
5062 |
|
|
anything else.
|
5063 |
|
|
.IP "\fB\-dumpspecs\fR" 4
|
5064 |
|
|
.IX Item "-dumpspecs"
|
5065 |
|
|
Print the compiler's built-in specs\-\-\-and don't do anything else. (This
|
5066 |
|
|
is used when \s-1GCC\s0 itself is being built.)
|
5067 |
|
|
.IP "\fB\-feliminate\-unused\-debug\-types\fR" 4
|
5068 |
|
|
.IX Item "-feliminate-unused-debug-types"
|
5069 |
|
|
Normally, when producing \s-1DWARF2\s0 output, \s-1GCC\s0 will emit debugging
|
5070 |
|
|
information for all types declared in a compilation
|
5071 |
|
|
unit, regardless of whether or not they are actually used
|
5072 |
|
|
in that compilation unit. Sometimes this is useful, such as
|
5073 |
|
|
if, in the debugger, you want to cast a value to a type that is
|
5074 |
|
|
not actually used in your program (but is declared). More often,
|
5075 |
|
|
however, this results in a significant amount of wasted space.
|
5076 |
|
|
With this option, \s-1GCC\s0 will avoid producing debug symbol output
|
5077 |
|
|
for types that are nowhere used in the source file being compiled.
|
5078 |
|
|
.Sh "Options That Control Optimization"
|
5079 |
|
|
.IX Subsection "Options That Control Optimization"
|
5080 |
|
|
These options control various sorts of optimizations.
|
5081 |
|
|
.PP
|
5082 |
|
|
Without any optimization option, the compiler's goal is to reduce the
|
5083 |
|
|
cost of compilation and to make debugging produce the expected
|
5084 |
|
|
results. Statements are independent: if you stop the program with a
|
5085 |
|
|
breakpoint between statements, you can then assign a new value to any
|
5086 |
|
|
variable or change the program counter to any other statement in the
|
5087 |
|
|
function and get exactly the results you would expect from the source
|
5088 |
|
|
code.
|
5089 |
|
|
.PP
|
5090 |
|
|
Turning on optimization flags makes the compiler attempt to improve
|
5091 |
|
|
the performance and/or code size at the expense of compilation time
|
5092 |
|
|
and possibly the ability to debug the program.
|
5093 |
|
|
.PP
|
5094 |
|
|
The compiler performs optimization based on the knowledge it has of the
|
5095 |
|
|
program. Compiling multiple files at once to a single output file mode allows
|
5096 |
|
|
the compiler to use information gained from all of the files when compiling
|
5097 |
|
|
each of them.
|
5098 |
|
|
.PP
|
5099 |
|
|
Not all optimizations are controlled directly by a flag. Only
|
5100 |
|
|
optimizations that have a flag are listed in this section.
|
5101 |
|
|
.PP
|
5102 |
|
|
Most optimizations are only enabled if an \fB\-O\fR level is set on
|
5103 |
|
|
the command line. Otherwise they are disabled, even if individual
|
5104 |
|
|
optimization flags are specified.
|
5105 |
|
|
.PP
|
5106 |
|
|
Depending on the target and how \s-1GCC\s0 was configured, a slightly different
|
5107 |
|
|
set of optimizations may be enabled at each \fB\-O\fR level than
|
5108 |
|
|
those listed here. You can invoke \s-1GCC\s0 with \fB\-Q \-\-help=optimizers\fR
|
5109 |
|
|
to find out the exact set of optimizations that are enabled at each level.
|
5110 |
|
|
.IP "\fB\-O\fR" 4
|
5111 |
|
|
.IX Item "-O"
|
5112 |
|
|
.PD 0
|
5113 |
|
|
.IP "\fB\-O1\fR" 4
|
5114 |
|
|
.IX Item "-O1"
|
5115 |
|
|
.PD
|
5116 |
|
|
Optimize. Optimizing compilation takes somewhat more time, and a lot
|
5117 |
|
|
more memory for a large function.
|
5118 |
|
|
.Sp
|
5119 |
|
|
With \fB\-O\fR, the compiler tries to reduce code size and execution
|
5120 |
|
|
time, without performing any optimizations that take a great deal of
|
5121 |
|
|
compilation time.
|
5122 |
|
|
.Sp
|
5123 |
|
|
\&\fB\-O\fR turns on the following optimization flags:
|
5124 |
|
|
.Sp
|
5125 |
|
|
\&\fB\-fauto\-inc\-dec
|
5126 |
|
|
\&\-fcprop\-registers
|
5127 |
|
|
\&\-fdce
|
5128 |
|
|
\&\-fdefer\-pop
|
5129 |
|
|
\&\-fdelayed\-branch
|
5130 |
|
|
\&\-fdse
|
5131 |
|
|
\&\-fguess\-branch\-probability
|
5132 |
|
|
\&\-fif\-conversion2
|
5133 |
|
|
\&\-fif\-conversion
|
5134 |
|
|
\&\-fipa\-pure\-const
|
5135 |
|
|
\&\-fipa\-reference
|
5136 |
|
|
\&\-fmerge\-constants
|
5137 |
|
|
\&\-fsplit\-wide\-types
|
5138 |
|
|
\&\-ftree\-builtin\-call\-dce
|
5139 |
|
|
\&\-ftree\-ccp
|
5140 |
|
|
\&\-ftree\-ch
|
5141 |
|
|
\&\-ftree\-copyrename
|
5142 |
|
|
\&\-ftree\-dce
|
5143 |
|
|
\&\-ftree\-dominator\-opts
|
5144 |
|
|
\&\-ftree\-dse
|
5145 |
|
|
\&\-ftree\-forwprop
|
5146 |
|
|
\&\-ftree\-fre
|
5147 |
|
|
\&\-ftree\-phiprop
|
5148 |
|
|
\&\-ftree\-sra
|
5149 |
|
|
\&\-ftree\-pta
|
5150 |
|
|
\&\-ftree\-ter
|
5151 |
|
|
\&\-funit\-at\-a\-time\fR
|
5152 |
|
|
.Sp
|
5153 |
|
|
\&\fB\-O\fR also turns on \fB\-fomit\-frame\-pointer\fR on machines
|
5154 |
|
|
where doing so does not interfere with debugging.
|
5155 |
|
|
.IP "\fB\-O2\fR" 4
|
5156 |
|
|
.IX Item "-O2"
|
5157 |
|
|
Optimize even more. \s-1GCC\s0 performs nearly all supported optimizations
|
5158 |
|
|
that do not involve a space-speed tradeoff.
|
5159 |
|
|
As compared to \fB\-O\fR, this option increases both compilation time
|
5160 |
|
|
and the performance of the generated code.
|
5161 |
|
|
.Sp
|
5162 |
|
|
\&\fB\-O2\fR turns on all optimization flags specified by \fB\-O\fR. It
|
5163 |
|
|
also turns on the following optimization flags:
|
5164 |
|
|
\&\fB\-fthread\-jumps
|
5165 |
|
|
\&\-falign\-functions \-falign\-jumps
|
5166 |
|
|
\&\-falign\-loops \-falign\-labels
|
5167 |
|
|
\&\-fcaller\-saves
|
5168 |
|
|
\&\-fcrossjumping
|
5169 |
|
|
\&\-fcse\-follow\-jumps \-fcse\-skip\-blocks
|
5170 |
|
|
\&\-fdelete\-null\-pointer\-checks
|
5171 |
|
|
\&\-fexpensive\-optimizations
|
5172 |
|
|
\&\-fgcse \-fgcse\-lm
|
5173 |
|
|
\&\-finline\-small\-functions
|
5174 |
|
|
\&\-findirect\-inlining
|
5175 |
|
|
\&\-fipa\-sra
|
5176 |
|
|
\&\-foptimize\-sibling\-calls
|
5177 |
|
|
\&\-fpeephole2
|
5178 |
|
|
\&\-fregmove
|
5179 |
|
|
\&\-freorder\-blocks \-freorder\-functions
|
5180 |
|
|
\&\-frerun\-cse\-after\-loop
|
5181 |
|
|
\&\-fsched\-interblock \-fsched\-spec
|
5182 |
|
|
\&\-fschedule\-insns \-fschedule\-insns2
|
5183 |
|
|
\&\-fstrict\-aliasing \-fstrict\-overflow
|
5184 |
|
|
\&\-ftree\-switch\-conversion
|
5185 |
|
|
\&\-ftree\-pre
|
5186 |
|
|
\&\-ftree\-vrp\fR
|
5187 |
|
|
.Sp
|
5188 |
|
|
Please note the warning under \fB\-fgcse\fR about
|
5189 |
|
|
invoking \fB\-O2\fR on programs that use computed gotos.
|
5190 |
|
|
.IP "\fB\-O3\fR" 4
|
5191 |
|
|
.IX Item "-O3"
|
5192 |
|
|
Optimize yet more. \fB\-O3\fR turns on all optimizations specified
|
5193 |
|
|
by \fB\-O2\fR and also turns on the \fB\-finline\-functions\fR,
|
5194 |
|
|
\&\fB\-funswitch\-loops\fR, \fB\-fpredictive\-commoning\fR,
|
5195 |
|
|
\&\fB\-fgcse\-after\-reload\fR and \fB\-ftree\-vectorize\fR options.
|
5196 |
|
|
.IP "\fB\-O0\fR" 4
|
5197 |
|
|
.IX Item "-O0"
|
5198 |
|
|
Reduce compilation time and make debugging produce the expected
|
5199 |
|
|
results. This is the default.
|
5200 |
|
|
.IP "\fB\-Os\fR" 4
|
5201 |
|
|
.IX Item "-Os"
|
5202 |
|
|
Optimize for size. \fB\-Os\fR enables all \fB\-O2\fR optimizations that
|
5203 |
|
|
do not typically increase code size. It also performs further
|
5204 |
|
|
optimizations designed to reduce code size.
|
5205 |
|
|
.Sp
|
5206 |
|
|
\&\fB\-Os\fR disables the following optimization flags:
|
5207 |
|
|
\&\fB\-falign\-functions \-falign\-jumps \-falign\-loops
|
5208 |
|
|
\&\-falign\-labels \-freorder\-blocks \-freorder\-blocks\-and\-partition
|
5209 |
|
|
\&\-fprefetch\-loop\-arrays \-ftree\-vect\-loop\-version\fR
|
5210 |
|
|
.Sp
|
5211 |
|
|
If you use multiple \fB\-O\fR options, with or without level numbers,
|
5212 |
|
|
the last such option is the one that is effective.
|
5213 |
|
|
.PP
|
5214 |
|
|
Options of the form \fB\-f\fR\fIflag\fR specify machine-independent
|
5215 |
|
|
flags. Most flags have both positive and negative forms; the negative
|
5216 |
|
|
form of \fB\-ffoo\fR would be \fB\-fno\-foo\fR. In the table
|
5217 |
|
|
below, only one of the forms is listed\-\-\-the one you typically will
|
5218 |
|
|
use. You can figure out the other form by either removing \fBno\-\fR
|
5219 |
|
|
or adding it.
|
5220 |
|
|
.PP
|
5221 |
|
|
The following options control specific optimizations. They are either
|
5222 |
|
|
activated by \fB\-O\fR options or are related to ones that are. You
|
5223 |
|
|
can use the following flags in the rare cases when \*(L"fine-tuning\*(R" of
|
5224 |
|
|
optimizations to be performed is desired.
|
5225 |
|
|
.IP "\fB\-fno\-default\-inline\fR" 4
|
5226 |
|
|
.IX Item "-fno-default-inline"
|
5227 |
|
|
Do not make member functions inline by default merely because they are
|
5228 |
|
|
defined inside the class scope (\*(C+ only). Otherwise, when you specify
|
5229 |
|
|
\&\fB\-O\fR, member functions defined inside class scope are compiled
|
5230 |
|
|
inline by default; i.e., you don't need to add \fBinline\fR in front of
|
5231 |
|
|
the member function name.
|
5232 |
|
|
.IP "\fB\-fno\-defer\-pop\fR" 4
|
5233 |
|
|
.IX Item "-fno-defer-pop"
|
5234 |
|
|
Always pop the arguments to each function call as soon as that function
|
5235 |
|
|
returns. For machines which must pop arguments after a function call,
|
5236 |
|
|
the compiler normally lets arguments accumulate on the stack for several
|
5237 |
|
|
function calls and pops them all at once.
|
5238 |
|
|
.Sp
|
5239 |
|
|
Disabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5240 |
|
|
.IP "\fB\-fforward\-propagate\fR" 4
|
5241 |
|
|
.IX Item "-fforward-propagate"
|
5242 |
|
|
Perform a forward propagation pass on \s-1RTL\s0. The pass tries to combine two
|
5243 |
|
|
instructions and checks if the result can be simplified. If loop unrolling
|
5244 |
|
|
is active, two passes are performed and the second is scheduled after
|
5245 |
|
|
loop unrolling.
|
5246 |
|
|
.Sp
|
5247 |
|
|
This option is enabled by default at optimization levels \fB\-O\fR,
|
5248 |
|
|
\&\fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5249 |
|
|
.IP "\fB\-fomit\-frame\-pointer\fR" 4
|
5250 |
|
|
.IX Item "-fomit-frame-pointer"
|
5251 |
|
|
Don't keep the frame pointer in a register for functions that
|
5252 |
|
|
don't need one. This avoids the instructions to save, set up and
|
5253 |
|
|
restore frame pointers; it also makes an extra register available
|
5254 |
|
|
in many functions. \fBIt also makes debugging impossible on
|
5255 |
|
|
some machines.\fR
|
5256 |
|
|
.Sp
|
5257 |
|
|
On some machines, such as the \s-1VAX\s0, this flag has no effect, because
|
5258 |
|
|
the standard calling sequence automatically handles the frame pointer
|
5259 |
|
|
and nothing is saved by pretending it doesn't exist. The
|
5260 |
|
|
machine-description macro \f(CW\*(C`FRAME_POINTER_REQUIRED\*(C'\fR controls
|
5261 |
|
|
whether a target machine supports this flag.
|
5262 |
|
|
.Sp
|
5263 |
|
|
Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5264 |
|
|
.IP "\fB\-foptimize\-sibling\-calls\fR" 4
|
5265 |
|
|
.IX Item "-foptimize-sibling-calls"
|
5266 |
|
|
Optimize sibling and tail recursive calls.
|
5267 |
|
|
.Sp
|
5268 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5269 |
|
|
.IP "\fB\-fno\-inline\fR" 4
|
5270 |
|
|
.IX Item "-fno-inline"
|
5271 |
|
|
Don't pay attention to the \f(CW\*(C`inline\*(C'\fR keyword. Normally this option
|
5272 |
|
|
is used to keep the compiler from expanding any functions inline.
|
5273 |
|
|
Note that if you are not optimizing, no functions can be expanded inline.
|
5274 |
|
|
.IP "\fB\-finline\-small\-functions\fR" 4
|
5275 |
|
|
.IX Item "-finline-small-functions"
|
5276 |
|
|
Integrate functions into their callers when their body is smaller than expected
|
5277 |
|
|
function call code (so overall size of program gets smaller). The compiler
|
5278 |
|
|
heuristically decides which functions are simple enough to be worth integrating
|
5279 |
|
|
in this way.
|
5280 |
|
|
.Sp
|
5281 |
|
|
Enabled at level \fB\-O2\fR.
|
5282 |
|
|
.IP "\fB\-findirect\-inlining\fR" 4
|
5283 |
|
|
.IX Item "-findirect-inlining"
|
5284 |
|
|
Inline also indirect calls that are discovered to be known at compile
|
5285 |
|
|
time thanks to previous inlining. This option has any effect only
|
5286 |
|
|
when inlining itself is turned on by the \fB\-finline\-functions\fR
|
5287 |
|
|
or \fB\-finline\-small\-functions\fR options.
|
5288 |
|
|
.Sp
|
5289 |
|
|
Enabled at level \fB\-O2\fR.
|
5290 |
|
|
.IP "\fB\-finline\-functions\fR" 4
|
5291 |
|
|
.IX Item "-finline-functions"
|
5292 |
|
|
Integrate all simple functions into their callers. The compiler
|
5293 |
|
|
heuristically decides which functions are simple enough to be worth
|
5294 |
|
|
integrating in this way.
|
5295 |
|
|
.Sp
|
5296 |
|
|
If all calls to a given function are integrated, and the function is
|
5297 |
|
|
declared \f(CW\*(C`static\*(C'\fR, then the function is normally not output as
|
5298 |
|
|
assembler code in its own right.
|
5299 |
|
|
.Sp
|
5300 |
|
|
Enabled at level \fB\-O3\fR.
|
5301 |
|
|
.IP "\fB\-finline\-functions\-called\-once\fR" 4
|
5302 |
|
|
.IX Item "-finline-functions-called-once"
|
5303 |
|
|
Consider all \f(CW\*(C`static\*(C'\fR functions called once for inlining into their
|
5304 |
|
|
caller even if they are not marked \f(CW\*(C`inline\*(C'\fR. If a call to a given
|
5305 |
|
|
function is integrated, then the function is not output as assembler code
|
5306 |
|
|
in its own right.
|
5307 |
|
|
.Sp
|
5308 |
|
|
Enabled at levels \fB\-O1\fR, \fB\-O2\fR, \fB\-O3\fR and \fB\-Os\fR.
|
5309 |
|
|
.IP "\fB\-fearly\-inlining\fR" 4
|
5310 |
|
|
.IX Item "-fearly-inlining"
|
5311 |
|
|
Inline functions marked by \f(CW\*(C`always_inline\*(C'\fR and functions whose body seems
|
5312 |
|
|
smaller than the function call overhead early before doing
|
5313 |
|
|
\&\fB\-fprofile\-generate\fR instrumentation and real inlining pass. Doing so
|
5314 |
|
|
makes profiling significantly cheaper and usually inlining faster on programs
|
5315 |
|
|
having large chains of nested wrapper functions.
|
5316 |
|
|
.Sp
|
5317 |
|
|
Enabled by default.
|
5318 |
|
|
.IP "\fB\-fipa\-sra\fR" 4
|
5319 |
|
|
.IX Item "-fipa-sra"
|
5320 |
|
|
Perform interprocedural scalar replacement of aggregates, removal of
|
5321 |
|
|
unused parameters and replacement of parameters passed by reference
|
5322 |
|
|
by parameters passed by value.
|
5323 |
|
|
.Sp
|
5324 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR and \fB\-Os\fR.
|
5325 |
|
|
.IP "\fB\-finline\-limit=\fR\fIn\fR" 4
|
5326 |
|
|
.IX Item "-finline-limit=n"
|
5327 |
|
|
By default, \s-1GCC\s0 limits the size of functions that can be inlined. This flag
|
5328 |
|
|
allows coarse control of this limit. \fIn\fR is the size of functions that
|
5329 |
|
|
can be inlined in number of pseudo instructions.
|
5330 |
|
|
.Sp
|
5331 |
|
|
Inlining is actually controlled by a number of parameters, which may be
|
5332 |
|
|
specified individually by using \fB\-\-param\fR \fIname\fR\fB=\fR\fIvalue\fR.
|
5333 |
|
|
The \fB\-finline\-limit=\fR\fIn\fR option sets some of these parameters
|
5334 |
|
|
as follows:
|
5335 |
|
|
.RS 4
|
5336 |
|
|
.IP "\fBmax-inline-insns-single\fR" 4
|
5337 |
|
|
.IX Item "max-inline-insns-single"
|
5338 |
|
|
is set to \fIn\fR/2.
|
5339 |
|
|
.IP "\fBmax-inline-insns-auto\fR" 4
|
5340 |
|
|
.IX Item "max-inline-insns-auto"
|
5341 |
|
|
is set to \fIn\fR/2.
|
5342 |
|
|
.RE
|
5343 |
|
|
.RS 4
|
5344 |
|
|
.Sp
|
5345 |
|
|
See below for a documentation of the individual
|
5346 |
|
|
parameters controlling inlining and for the defaults of these parameters.
|
5347 |
|
|
.Sp
|
5348 |
|
|
\&\fINote:\fR there may be no value to \fB\-finline\-limit\fR that results
|
5349 |
|
|
in default behavior.
|
5350 |
|
|
.Sp
|
5351 |
|
|
\&\fINote:\fR pseudo instruction represents, in this particular context, an
|
5352 |
|
|
abstract measurement of function's size. In no way does it represent a count
|
5353 |
|
|
of assembly instructions and as such its exact meaning might change from one
|
5354 |
|
|
release to an another.
|
5355 |
|
|
.RE
|
5356 |
|
|
.IP "\fB\-fkeep\-inline\-functions\fR" 4
|
5357 |
|
|
.IX Item "-fkeep-inline-functions"
|
5358 |
|
|
In C, emit \f(CW\*(C`static\*(C'\fR functions that are declared \f(CW\*(C`inline\*(C'\fR
|
5359 |
|
|
into the object file, even if the function has been inlined into all
|
5360 |
|
|
of its callers. This switch does not affect functions using the
|
5361 |
|
|
\&\f(CW\*(C`extern inline\*(C'\fR extension in \s-1GNU\s0 C90. In \*(C+, emit any and all
|
5362 |
|
|
inline functions into the object file.
|
5363 |
|
|
.IP "\fB\-fkeep\-static\-consts\fR" 4
|
5364 |
|
|
.IX Item "-fkeep-static-consts"
|
5365 |
|
|
Emit variables declared \f(CW\*(C`static const\*(C'\fR when optimization isn't turned
|
5366 |
|
|
on, even if the variables aren't referenced.
|
5367 |
|
|
.Sp
|
5368 |
|
|
\&\s-1GCC\s0 enables this option by default. If you want to force the compiler to
|
5369 |
|
|
check if the variable was referenced, regardless of whether or not
|
5370 |
|
|
optimization is turned on, use the \fB\-fno\-keep\-static\-consts\fR option.
|
5371 |
|
|
.IP "\fB\-fmerge\-constants\fR" 4
|
5372 |
|
|
.IX Item "-fmerge-constants"
|
5373 |
|
|
Attempt to merge identical constants (string constants and floating point
|
5374 |
|
|
constants) across compilation units.
|
5375 |
|
|
.Sp
|
5376 |
|
|
This option is the default for optimized compilation if the assembler and
|
5377 |
|
|
linker support it. Use \fB\-fno\-merge\-constants\fR to inhibit this
|
5378 |
|
|
behavior.
|
5379 |
|
|
.Sp
|
5380 |
|
|
Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5381 |
|
|
.IP "\fB\-fmerge\-all\-constants\fR" 4
|
5382 |
|
|
.IX Item "-fmerge-all-constants"
|
5383 |
|
|
Attempt to merge identical constants and identical variables.
|
5384 |
|
|
.Sp
|
5385 |
|
|
This option implies \fB\-fmerge\-constants\fR. In addition to
|
5386 |
|
|
\&\fB\-fmerge\-constants\fR this considers e.g. even constant initialized
|
5387 |
|
|
arrays or initialized constant variables with integral or floating point
|
5388 |
|
|
types. Languages like C or \*(C+ require each variable, including multiple
|
5389 |
|
|
instances of the same variable in recursive calls, to have distinct locations,
|
5390 |
|
|
so using this option will result in non-conforming
|
5391 |
|
|
behavior.
|
5392 |
|
|
.IP "\fB\-fmodulo\-sched\fR" 4
|
5393 |
|
|
.IX Item "-fmodulo-sched"
|
5394 |
|
|
Perform swing modulo scheduling immediately before the first scheduling
|
5395 |
|
|
pass. This pass looks at innermost loops and reorders their
|
5396 |
|
|
instructions by overlapping different iterations.
|
5397 |
|
|
.IP "\fB\-fmodulo\-sched\-allow\-regmoves\fR" 4
|
5398 |
|
|
.IX Item "-fmodulo-sched-allow-regmoves"
|
5399 |
|
|
Perform more aggressive \s-1SMS\s0 based modulo scheduling with register moves
|
5400 |
|
|
allowed. By setting this flag certain anti-dependences edges will be
|
5401 |
|
|
deleted which will trigger the generation of reg-moves based on the
|
5402 |
|
|
life-range analysis. This option is effective only with
|
5403 |
|
|
\&\fB\-fmodulo\-sched\fR enabled.
|
5404 |
|
|
.IP "\fB\-fno\-branch\-count\-reg\fR" 4
|
5405 |
|
|
.IX Item "-fno-branch-count-reg"
|
5406 |
|
|
Do not use \*(L"decrement and branch\*(R" instructions on a count register,
|
5407 |
|
|
but instead generate a sequence of instructions that decrement a
|
5408 |
|
|
register, compare it against zero, then branch based upon the result.
|
5409 |
|
|
This option is only meaningful on architectures that support such
|
5410 |
|
|
instructions, which include x86, PowerPC, \s-1IA\-64\s0 and S/390.
|
5411 |
|
|
.Sp
|
5412 |
|
|
The default is \fB\-fbranch\-count\-reg\fR.
|
5413 |
|
|
.IP "\fB\-fno\-function\-cse\fR" 4
|
5414 |
|
|
.IX Item "-fno-function-cse"
|
5415 |
|
|
Do not put function addresses in registers; make each instruction that
|
5416 |
|
|
calls a constant function contain the function's address explicitly.
|
5417 |
|
|
.Sp
|
5418 |
|
|
This option results in less efficient code, but some strange hacks
|
5419 |
|
|
that alter the assembler output may be confused by the optimizations
|
5420 |
|
|
performed when this option is not used.
|
5421 |
|
|
.Sp
|
5422 |
|
|
The default is \fB\-ffunction\-cse\fR
|
5423 |
|
|
.IP "\fB\-fno\-zero\-initialized\-in\-bss\fR" 4
|
5424 |
|
|
.IX Item "-fno-zero-initialized-in-bss"
|
5425 |
|
|
If the target supports a \s-1BSS\s0 section, \s-1GCC\s0 by default puts variables that
|
5426 |
|
|
are initialized to zero into \s-1BSS\s0. This can save space in the resulting
|
5427 |
|
|
code.
|
5428 |
|
|
.Sp
|
5429 |
|
|
This option turns off this behavior because some programs explicitly
|
5430 |
|
|
rely on variables going to the data section. E.g., so that the
|
5431 |
|
|
resulting executable can find the beginning of that section and/or make
|
5432 |
|
|
assumptions based on that.
|
5433 |
|
|
.Sp
|
5434 |
|
|
The default is \fB\-fzero\-initialized\-in\-bss\fR.
|
5435 |
|
|
.IP "\fB\-fmudflap \-fmudflapth \-fmudflapir\fR" 4
|
5436 |
|
|
.IX Item "-fmudflap -fmudflapth -fmudflapir"
|
5437 |
|
|
For front-ends that support it (C and \*(C+), instrument all risky
|
5438 |
|
|
pointer/array dereferencing operations, some standard library
|
5439 |
|
|
string/heap functions, and some other associated constructs with
|
5440 |
|
|
range/validity tests. Modules so instrumented should be immune to
|
5441 |
|
|
buffer overflows, invalid heap use, and some other classes of C/\*(C+
|
5442 |
|
|
programming errors. The instrumentation relies on a separate runtime
|
5443 |
|
|
library (\fIlibmudflap\fR), which will be linked into a program if
|
5444 |
|
|
\&\fB\-fmudflap\fR is given at link time. Run-time behavior of the
|
5445 |
|
|
instrumented program is controlled by the \fB\s-1MUDFLAP_OPTIONS\s0\fR
|
5446 |
|
|
environment variable. See \f(CW\*(C`env MUDFLAP_OPTIONS=\-help a.out\*(C'\fR
|
5447 |
|
|
for its options.
|
5448 |
|
|
.Sp
|
5449 |
|
|
Use \fB\-fmudflapth\fR instead of \fB\-fmudflap\fR to compile and to
|
5450 |
|
|
link if your program is multi-threaded. Use \fB\-fmudflapir\fR, in
|
5451 |
|
|
addition to \fB\-fmudflap\fR or \fB\-fmudflapth\fR, if
|
5452 |
|
|
instrumentation should ignore pointer reads. This produces less
|
5453 |
|
|
instrumentation (and therefore faster execution) and still provides
|
5454 |
|
|
some protection against outright memory corrupting writes, but allows
|
5455 |
|
|
erroneously read data to propagate within a program.
|
5456 |
|
|
.IP "\fB\-fthread\-jumps\fR" 4
|
5457 |
|
|
.IX Item "-fthread-jumps"
|
5458 |
|
|
Perform optimizations where we check to see if a jump branches to a
|
5459 |
|
|
location where another comparison subsumed by the first is found. If
|
5460 |
|
|
so, the first branch is redirected to either the destination of the
|
5461 |
|
|
second branch or a point immediately following it, depending on whether
|
5462 |
|
|
the condition is known to be true or false.
|
5463 |
|
|
.Sp
|
5464 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5465 |
|
|
.IP "\fB\-fsplit\-wide\-types\fR" 4
|
5466 |
|
|
.IX Item "-fsplit-wide-types"
|
5467 |
|
|
When using a type that occupies multiple registers, such as \f(CW\*(C`long
|
5468 |
|
|
long\*(C'\fR on a 32\-bit system, split the registers apart and allocate them
|
5469 |
|
|
independently. This normally generates better code for those types,
|
5470 |
|
|
but may make debugging more difficult.
|
5471 |
|
|
.Sp
|
5472 |
|
|
Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR,
|
5473 |
|
|
\&\fB\-Os\fR.
|
5474 |
|
|
.IP "\fB\-fcse\-follow\-jumps\fR" 4
|
5475 |
|
|
.IX Item "-fcse-follow-jumps"
|
5476 |
|
|
In common subexpression elimination (\s-1CSE\s0), scan through jump instructions
|
5477 |
|
|
when the target of the jump is not reached by any other path. For
|
5478 |
|
|
example, when \s-1CSE\s0 encounters an \f(CW\*(C`if\*(C'\fR statement with an
|
5479 |
|
|
\&\f(CW\*(C`else\*(C'\fR clause, \s-1CSE\s0 will follow the jump when the condition
|
5480 |
|
|
tested is false.
|
5481 |
|
|
.Sp
|
5482 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5483 |
|
|
.IP "\fB\-fcse\-skip\-blocks\fR" 4
|
5484 |
|
|
.IX Item "-fcse-skip-blocks"
|
5485 |
|
|
This is similar to \fB\-fcse\-follow\-jumps\fR, but causes \s-1CSE\s0 to
|
5486 |
|
|
follow jumps which conditionally skip over blocks. When \s-1CSE\s0
|
5487 |
|
|
encounters a simple \f(CW\*(C`if\*(C'\fR statement with no else clause,
|
5488 |
|
|
\&\fB\-fcse\-skip\-blocks\fR causes \s-1CSE\s0 to follow the jump around the
|
5489 |
|
|
body of the \f(CW\*(C`if\*(C'\fR.
|
5490 |
|
|
.Sp
|
5491 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5492 |
|
|
.IP "\fB\-frerun\-cse\-after\-loop\fR" 4
|
5493 |
|
|
.IX Item "-frerun-cse-after-loop"
|
5494 |
|
|
Re-run common subexpression elimination after loop optimizations has been
|
5495 |
|
|
performed.
|
5496 |
|
|
.Sp
|
5497 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5498 |
|
|
.IP "\fB\-fgcse\fR" 4
|
5499 |
|
|
.IX Item "-fgcse"
|
5500 |
|
|
Perform a global common subexpression elimination pass.
|
5501 |
|
|
This pass also performs global constant and copy propagation.
|
5502 |
|
|
.Sp
|
5503 |
|
|
\&\fINote:\fR When compiling a program using computed gotos, a \s-1GCC\s0
|
5504 |
|
|
extension, you may get better runtime performance if you disable
|
5505 |
|
|
the global common subexpression elimination pass by adding
|
5506 |
|
|
\&\fB\-fno\-gcse\fR to the command line.
|
5507 |
|
|
.Sp
|
5508 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5509 |
|
|
.IP "\fB\-fgcse\-lm\fR" 4
|
5510 |
|
|
.IX Item "-fgcse-lm"
|
5511 |
|
|
When \fB\-fgcse\-lm\fR is enabled, global common subexpression elimination will
|
5512 |
|
|
attempt to move loads which are only killed by stores into themselves. This
|
5513 |
|
|
allows a loop containing a load/store sequence to be changed to a load outside
|
5514 |
|
|
the loop, and a copy/store within the loop.
|
5515 |
|
|
.Sp
|
5516 |
|
|
Enabled by default when gcse is enabled.
|
5517 |
|
|
.IP "\fB\-fgcse\-sm\fR" 4
|
5518 |
|
|
.IX Item "-fgcse-sm"
|
5519 |
|
|
When \fB\-fgcse\-sm\fR is enabled, a store motion pass is run after
|
5520 |
|
|
global common subexpression elimination. This pass will attempt to move
|
5521 |
|
|
stores out of loops. When used in conjunction with \fB\-fgcse\-lm\fR,
|
5522 |
|
|
loops containing a load/store sequence can be changed to a load before
|
5523 |
|
|
the loop and a store after the loop.
|
5524 |
|
|
.Sp
|
5525 |
|
|
Not enabled at any optimization level.
|
5526 |
|
|
.IP "\fB\-fgcse\-las\fR" 4
|
5527 |
|
|
.IX Item "-fgcse-las"
|
5528 |
|
|
When \fB\-fgcse\-las\fR is enabled, the global common subexpression
|
5529 |
|
|
elimination pass eliminates redundant loads that come after stores to the
|
5530 |
|
|
same memory location (both partial and full redundancies).
|
5531 |
|
|
.Sp
|
5532 |
|
|
Not enabled at any optimization level.
|
5533 |
|
|
.IP "\fB\-fgcse\-after\-reload\fR" 4
|
5534 |
|
|
.IX Item "-fgcse-after-reload"
|
5535 |
|
|
When \fB\-fgcse\-after\-reload\fR is enabled, a redundant load elimination
|
5536 |
|
|
pass is performed after reload. The purpose of this pass is to cleanup
|
5537 |
|
|
redundant spilling.
|
5538 |
|
|
.IP "\fB\-funsafe\-loop\-optimizations\fR" 4
|
5539 |
|
|
.IX Item "-funsafe-loop-optimizations"
|
5540 |
|
|
If given, the loop optimizer will assume that loop indices do not
|
5541 |
|
|
overflow, and that the loops with nontrivial exit condition are not
|
5542 |
|
|
infinite. This enables a wider range of loop optimizations even if
|
5543 |
|
|
the loop optimizer itself cannot prove that these assumptions are valid.
|
5544 |
|
|
Using \fB\-Wunsafe\-loop\-optimizations\fR, the compiler will warn you
|
5545 |
|
|
if it finds this kind of loop.
|
5546 |
|
|
.IP "\fB\-fcrossjumping\fR" 4
|
5547 |
|
|
.IX Item "-fcrossjumping"
|
5548 |
|
|
Perform cross-jumping transformation. This transformation unifies equivalent code and save code size. The
|
5549 |
|
|
resulting code may or may not perform better than without cross-jumping.
|
5550 |
|
|
.Sp
|
5551 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5552 |
|
|
.IP "\fB\-fauto\-inc\-dec\fR" 4
|
5553 |
|
|
.IX Item "-fauto-inc-dec"
|
5554 |
|
|
Combine increments or decrements of addresses with memory accesses.
|
5555 |
|
|
This pass is always skipped on architectures that do not have
|
5556 |
|
|
instructions to support this. Enabled by default at \fB\-O\fR and
|
5557 |
|
|
higher on architectures that support this.
|
5558 |
|
|
.IP "\fB\-fdce\fR" 4
|
5559 |
|
|
.IX Item "-fdce"
|
5560 |
|
|
Perform dead code elimination (\s-1DCE\s0) on \s-1RTL\s0.
|
5561 |
|
|
Enabled by default at \fB\-O\fR and higher.
|
5562 |
|
|
.IP "\fB\-fdse\fR" 4
|
5563 |
|
|
.IX Item "-fdse"
|
5564 |
|
|
Perform dead store elimination (\s-1DSE\s0) on \s-1RTL\s0.
|
5565 |
|
|
Enabled by default at \fB\-O\fR and higher.
|
5566 |
|
|
.IP "\fB\-fif\-conversion\fR" 4
|
5567 |
|
|
.IX Item "-fif-conversion"
|
5568 |
|
|
Attempt to transform conditional jumps into branch-less equivalents. This
|
5569 |
|
|
include use of conditional moves, min, max, set flags and abs instructions, and
|
5570 |
|
|
some tricks doable by standard arithmetics. The use of conditional execution
|
5571 |
|
|
on chips where it is available is controlled by \f(CW\*(C`if\-conversion2\*(C'\fR.
|
5572 |
|
|
.Sp
|
5573 |
|
|
Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5574 |
|
|
.IP "\fB\-fif\-conversion2\fR" 4
|
5575 |
|
|
.IX Item "-fif-conversion2"
|
5576 |
|
|
Use conditional execution (where available) to transform conditional jumps into
|
5577 |
|
|
branch-less equivalents.
|
5578 |
|
|
.Sp
|
5579 |
|
|
Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5580 |
|
|
.IP "\fB\-fdelete\-null\-pointer\-checks\fR" 4
|
5581 |
|
|
.IX Item "-fdelete-null-pointer-checks"
|
5582 |
|
|
Assume that programs cannot safely dereference null pointers, and that
|
5583 |
|
|
no code or data element resides there. This enables simple constant
|
5584 |
|
|
folding optimizations at all optimization levels. In addition, other
|
5585 |
|
|
optimization passes in \s-1GCC\s0 use this flag to control global dataflow
|
5586 |
|
|
analyses that eliminate useless checks for null pointers; these assume
|
5587 |
|
|
that if a pointer is checked after it has already been dereferenced,
|
5588 |
|
|
it cannot be null.
|
5589 |
|
|
.Sp
|
5590 |
|
|
Note however that in some environments this assumption is not true.
|
5591 |
|
|
Use \fB\-fno\-delete\-null\-pointer\-checks\fR to disable this optimization
|
5592 |
|
|
for programs which depend on that behavior.
|
5593 |
|
|
.Sp
|
5594 |
|
|
Some targets, especially embedded ones, disable this option at all levels.
|
5595 |
|
|
Otherwise it is enabled at all levels: \fB\-O0\fR, \fB\-O1\fR,
|
5596 |
|
|
\&\fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR. Passes that use the information
|
5597 |
|
|
are enabled independently at different optimization levels.
|
5598 |
|
|
.IP "\fB\-fexpensive\-optimizations\fR" 4
|
5599 |
|
|
.IX Item "-fexpensive-optimizations"
|
5600 |
|
|
Perform a number of minor optimizations that are relatively expensive.
|
5601 |
|
|
.Sp
|
5602 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5603 |
|
|
.IP "\fB\-foptimize\-register\-move\fR" 4
|
5604 |
|
|
.IX Item "-foptimize-register-move"
|
5605 |
|
|
.PD 0
|
5606 |
|
|
.IP "\fB\-fregmove\fR" 4
|
5607 |
|
|
.IX Item "-fregmove"
|
5608 |
|
|
.PD
|
5609 |
|
|
Attempt to reassign register numbers in move instructions and as
|
5610 |
|
|
operands of other simple instructions in order to maximize the amount of
|
5611 |
|
|
register tying. This is especially helpful on machines with two-operand
|
5612 |
|
|
instructions.
|
5613 |
|
|
.Sp
|
5614 |
|
|
Note \fB\-fregmove\fR and \fB\-foptimize\-register\-move\fR are the same
|
5615 |
|
|
optimization.
|
5616 |
|
|
.Sp
|
5617 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5618 |
|
|
.IP "\fB\-fira\-algorithm=\fR\fIalgorithm\fR" 4
|
5619 |
|
|
.IX Item "-fira-algorithm=algorithm"
|
5620 |
|
|
Use specified coloring algorithm for the integrated register
|
5621 |
|
|
allocator. The \fIalgorithm\fR argument should be \f(CW\*(C`priority\*(C'\fR or
|
5622 |
|
|
\&\f(CW\*(C`CB\*(C'\fR. The first algorithm specifies Chow's priority coloring,
|
5623 |
|
|
the second one specifies Chaitin-Briggs coloring. The second
|
5624 |
|
|
algorithm can be unimplemented for some architectures. If it is
|
5625 |
|
|
implemented, it is the default because Chaitin-Briggs coloring as a
|
5626 |
|
|
rule generates a better code.
|
5627 |
|
|
.IP "\fB\-fira\-region=\fR\fIregion\fR" 4
|
5628 |
|
|
.IX Item "-fira-region=region"
|
5629 |
|
|
Use specified regions for the integrated register allocator. The
|
5630 |
|
|
\&\fIregion\fR argument should be one of \f(CW\*(C`all\*(C'\fR, \f(CW\*(C`mixed\*(C'\fR, or
|
5631 |
|
|
\&\f(CW\*(C`one\*(C'\fR. The first value means using all loops as register
|
5632 |
|
|
allocation regions, the second value which is the default means using
|
5633 |
|
|
all loops except for loops with small register pressure as the
|
5634 |
|
|
regions, and third one means using all function as a single region.
|
5635 |
|
|
The first value can give best result for machines with small size and
|
5636 |
|
|
irregular register set, the third one results in faster and generates
|
5637 |
|
|
decent code and the smallest size code, and the default value usually
|
5638 |
|
|
give the best results in most cases and for most architectures.
|
5639 |
|
|
.IP "\fB\-fira\-coalesce\fR" 4
|
5640 |
|
|
.IX Item "-fira-coalesce"
|
5641 |
|
|
Do optimistic register coalescing. This option might be profitable for
|
5642 |
|
|
architectures with big regular register files.
|
5643 |
|
|
.IP "\fB\-fira\-loop\-pressure\fR" 4
|
5644 |
|
|
.IX Item "-fira-loop-pressure"
|
5645 |
|
|
Use \s-1IRA\s0 to evaluate register pressure in loops for decision to move
|
5646 |
|
|
loop invariants. Usage of this option usually results in generation
|
5647 |
|
|
of faster and smaller code on machines with big register files (>= 32
|
5648 |
|
|
registers) but it can slow compiler down.
|
5649 |
|
|
.Sp
|
5650 |
|
|
This option is enabled at level \fB\-O3\fR for some targets.
|
5651 |
|
|
.IP "\fB\-fno\-ira\-share\-save\-slots\fR" 4
|
5652 |
|
|
.IX Item "-fno-ira-share-save-slots"
|
5653 |
|
|
Switch off sharing stack slots used for saving call used hard
|
5654 |
|
|
registers living through a call. Each hard register will get a
|
5655 |
|
|
separate stack slot and as a result function stack frame will be
|
5656 |
|
|
bigger.
|
5657 |
|
|
.IP "\fB\-fno\-ira\-share\-spill\-slots\fR" 4
|
5658 |
|
|
.IX Item "-fno-ira-share-spill-slots"
|
5659 |
|
|
Switch off sharing stack slots allocated for pseudo-registers. Each
|
5660 |
|
|
pseudo-register which did not get a hard register will get a separate
|
5661 |
|
|
stack slot and as a result function stack frame will be bigger.
|
5662 |
|
|
.IP "\fB\-fira\-verbose=\fR\fIn\fR" 4
|
5663 |
|
|
.IX Item "-fira-verbose=n"
|
5664 |
|
|
Set up how verbose dump file for the integrated register allocator
|
5665 |
|
|
will be. Default value is 5. If the value is greater or equal to 10,
|
5666 |
|
|
the dump file will be stderr as if the value were \fIn\fR minus 10.
|
5667 |
|
|
.IP "\fB\-fdelayed\-branch\fR" 4
|
5668 |
|
|
.IX Item "-fdelayed-branch"
|
5669 |
|
|
If supported for the target machine, attempt to reorder instructions
|
5670 |
|
|
to exploit instruction slots available after delayed branch
|
5671 |
|
|
instructions.
|
5672 |
|
|
.Sp
|
5673 |
|
|
Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5674 |
|
|
.IP "\fB\-fschedule\-insns\fR" 4
|
5675 |
|
|
.IX Item "-fschedule-insns"
|
5676 |
|
|
If supported for the target machine, attempt to reorder instructions to
|
5677 |
|
|
eliminate execution stalls due to required data being unavailable. This
|
5678 |
|
|
helps machines that have slow floating point or memory load instructions
|
5679 |
|
|
by allowing other instructions to be issued until the result of the load
|
5680 |
|
|
or floating point instruction is required.
|
5681 |
|
|
.Sp
|
5682 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR.
|
5683 |
|
|
.IP "\fB\-fschedule\-insns2\fR" 4
|
5684 |
|
|
.IX Item "-fschedule-insns2"
|
5685 |
|
|
Similar to \fB\-fschedule\-insns\fR, but requests an additional pass of
|
5686 |
|
|
instruction scheduling after register allocation has been done. This is
|
5687 |
|
|
especially useful on machines with a relatively small number of
|
5688 |
|
|
registers and where memory load instructions take more than one cycle.
|
5689 |
|
|
.Sp
|
5690 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5691 |
|
|
.IP "\fB\-fno\-sched\-interblock\fR" 4
|
5692 |
|
|
.IX Item "-fno-sched-interblock"
|
5693 |
|
|
Don't schedule instructions across basic blocks. This is normally
|
5694 |
|
|
enabled by default when scheduling before register allocation, i.e.
|
5695 |
|
|
with \fB\-fschedule\-insns\fR or at \fB\-O2\fR or higher.
|
5696 |
|
|
.IP "\fB\-fno\-sched\-spec\fR" 4
|
5697 |
|
|
.IX Item "-fno-sched-spec"
|
5698 |
|
|
Don't allow speculative motion of non-load instructions. This is normally
|
5699 |
|
|
enabled by default when scheduling before register allocation, i.e.
|
5700 |
|
|
with \fB\-fschedule\-insns\fR or at \fB\-O2\fR or higher.
|
5701 |
|
|
.IP "\fB\-fsched\-pressure\fR" 4
|
5702 |
|
|
.IX Item "-fsched-pressure"
|
5703 |
|
|
Enable register pressure sensitive insn scheduling before the register
|
5704 |
|
|
allocation. This only makes sense when scheduling before register
|
5705 |
|
|
allocation is enabled, i.e. with \fB\-fschedule\-insns\fR or at
|
5706 |
|
|
\&\fB\-O2\fR or higher. Usage of this option can improve the
|
5707 |
|
|
generated code and decrease its size by preventing register pressure
|
5708 |
|
|
increase above the number of available hard registers and as a
|
5709 |
|
|
consequence register spills in the register allocation.
|
5710 |
|
|
.IP "\fB\-fsched\-spec\-load\fR" 4
|
5711 |
|
|
.IX Item "-fsched-spec-load"
|
5712 |
|
|
Allow speculative motion of some load instructions. This only makes
|
5713 |
|
|
sense when scheduling before register allocation, i.e. with
|
5714 |
|
|
\&\fB\-fschedule\-insns\fR or at \fB\-O2\fR or higher.
|
5715 |
|
|
.IP "\fB\-fsched\-spec\-load\-dangerous\fR" 4
|
5716 |
|
|
.IX Item "-fsched-spec-load-dangerous"
|
5717 |
|
|
Allow speculative motion of more load instructions. This only makes
|
5718 |
|
|
sense when scheduling before register allocation, i.e. with
|
5719 |
|
|
\&\fB\-fschedule\-insns\fR or at \fB\-O2\fR or higher.
|
5720 |
|
|
.IP "\fB\-fsched\-stalled\-insns\fR" 4
|
5721 |
|
|
.IX Item "-fsched-stalled-insns"
|
5722 |
|
|
.PD 0
|
5723 |
|
|
.IP "\fB\-fsched\-stalled\-insns=\fR\fIn\fR" 4
|
5724 |
|
|
.IX Item "-fsched-stalled-insns=n"
|
5725 |
|
|
.PD
|
5726 |
|
|
Define how many insns (if any) can be moved prematurely from the queue
|
5727 |
|
|
of stalled insns into the ready list, during the second scheduling pass.
|
5728 |
|
|
\&\fB\-fno\-sched\-stalled\-insns\fR means that no insns will be moved
|
5729 |
|
|
prematurely, \fB\-fsched\-stalled\-insns=0\fR means there is no limit
|
5730 |
|
|
on how many queued insns can be moved prematurely.
|
5731 |
|
|
\&\fB\-fsched\-stalled\-insns\fR without a value is equivalent to
|
5732 |
|
|
\&\fB\-fsched\-stalled\-insns=1\fR.
|
5733 |
|
|
.IP "\fB\-fsched\-stalled\-insns\-dep\fR" 4
|
5734 |
|
|
.IX Item "-fsched-stalled-insns-dep"
|
5735 |
|
|
.PD 0
|
5736 |
|
|
.IP "\fB\-fsched\-stalled\-insns\-dep=\fR\fIn\fR" 4
|
5737 |
|
|
.IX Item "-fsched-stalled-insns-dep=n"
|
5738 |
|
|
.PD
|
5739 |
|
|
Define how many insn groups (cycles) will be examined for a dependency
|
5740 |
|
|
on a stalled insn that is candidate for premature removal from the queue
|
5741 |
|
|
of stalled insns. This has an effect only during the second scheduling pass,
|
5742 |
|
|
and only if \fB\-fsched\-stalled\-insns\fR is used.
|
5743 |
|
|
\&\fB\-fno\-sched\-stalled\-insns\-dep\fR is equivalent to
|
5744 |
|
|
\&\fB\-fsched\-stalled\-insns\-dep=0\fR.
|
5745 |
|
|
\&\fB\-fsched\-stalled\-insns\-dep\fR without a value is equivalent to
|
5746 |
|
|
\&\fB\-fsched\-stalled\-insns\-dep=1\fR.
|
5747 |
|
|
.IP "\fB\-fsched2\-use\-superblocks\fR" 4
|
5748 |
|
|
.IX Item "-fsched2-use-superblocks"
|
5749 |
|
|
When scheduling after register allocation, do use superblock scheduling
|
5750 |
|
|
algorithm. Superblock scheduling allows motion across basic block boundaries
|
5751 |
|
|
resulting on faster schedules. This option is experimental, as not all machine
|
5752 |
|
|
descriptions used by \s-1GCC\s0 model the \s-1CPU\s0 closely enough to avoid unreliable
|
5753 |
|
|
results from the algorithm.
|
5754 |
|
|
.Sp
|
5755 |
|
|
This only makes sense when scheduling after register allocation, i.e. with
|
5756 |
|
|
\&\fB\-fschedule\-insns2\fR or at \fB\-O2\fR or higher.
|
5757 |
|
|
.IP "\fB\-fsched\-group\-heuristic\fR" 4
|
5758 |
|
|
.IX Item "-fsched-group-heuristic"
|
5759 |
|
|
Enable the group heuristic in the scheduler. This heuristic favors
|
5760 |
|
|
the instruction that belongs to a schedule group. This is enabled
|
5761 |
|
|
by default when scheduling is enabled, i.e. with \fB\-fschedule\-insns\fR
|
5762 |
|
|
or \fB\-fschedule\-insns2\fR or at \fB\-O2\fR or higher.
|
5763 |
|
|
.IP "\fB\-fsched\-critical\-path\-heuristic\fR" 4
|
5764 |
|
|
.IX Item "-fsched-critical-path-heuristic"
|
5765 |
|
|
Enable the critical-path heuristic in the scheduler. This heuristic favors
|
5766 |
|
|
instructions on the critical path. This is enabled by default when
|
5767 |
|
|
scheduling is enabled, i.e. with \fB\-fschedule\-insns\fR
|
5768 |
|
|
or \fB\-fschedule\-insns2\fR or at \fB\-O2\fR or higher.
|
5769 |
|
|
.IP "\fB\-fsched\-spec\-insn\-heuristic\fR" 4
|
5770 |
|
|
.IX Item "-fsched-spec-insn-heuristic"
|
5771 |
|
|
Enable the speculative instruction heuristic in the scheduler. This
|
5772 |
|
|
heuristic favors speculative instructions with greater dependency weakness.
|
5773 |
|
|
This is enabled by default when scheduling is enabled, i.e.
|
5774 |
|
|
with \fB\-fschedule\-insns\fR or \fB\-fschedule\-insns2\fR
|
5775 |
|
|
or at \fB\-O2\fR or higher.
|
5776 |
|
|
.IP "\fB\-fsched\-rank\-heuristic\fR" 4
|
5777 |
|
|
.IX Item "-fsched-rank-heuristic"
|
5778 |
|
|
Enable the rank heuristic in the scheduler. This heuristic favors
|
5779 |
|
|
the instruction belonging to a basic block with greater size or frequency.
|
5780 |
|
|
This is enabled by default when scheduling is enabled, i.e.
|
5781 |
|
|
with \fB\-fschedule\-insns\fR or \fB\-fschedule\-insns2\fR or
|
5782 |
|
|
at \fB\-O2\fR or higher.
|
5783 |
|
|
.IP "\fB\-fsched\-last\-insn\-heuristic\fR" 4
|
5784 |
|
|
.IX Item "-fsched-last-insn-heuristic"
|
5785 |
|
|
Enable the last-instruction heuristic in the scheduler. This heuristic
|
5786 |
|
|
favors the instruction that is less dependent on the last instruction
|
5787 |
|
|
scheduled. This is enabled by default when scheduling is enabled,
|
5788 |
|
|
i.e. with \fB\-fschedule\-insns\fR or \fB\-fschedule\-insns2\fR or
|
5789 |
|
|
at \fB\-O2\fR or higher.
|
5790 |
|
|
.IP "\fB\-fsched\-dep\-count\-heuristic\fR" 4
|
5791 |
|
|
.IX Item "-fsched-dep-count-heuristic"
|
5792 |
|
|
Enable the dependent-count heuristic in the scheduler. This heuristic
|
5793 |
|
|
favors the instruction that has more instructions depending on it.
|
5794 |
|
|
This is enabled by default when scheduling is enabled, i.e.
|
5795 |
|
|
with \fB\-fschedule\-insns\fR or \fB\-fschedule\-insns2\fR or
|
5796 |
|
|
at \fB\-O2\fR or higher.
|
5797 |
|
|
.IP "\fB\-freschedule\-modulo\-scheduled\-loops\fR" 4
|
5798 |
|
|
.IX Item "-freschedule-modulo-scheduled-loops"
|
5799 |
|
|
The modulo scheduling comes before the traditional scheduling, if a loop
|
5800 |
|
|
was modulo scheduled we may want to prevent the later scheduling passes
|
5801 |
|
|
from changing its schedule, we use this option to control that.
|
5802 |
|
|
.IP "\fB\-fselective\-scheduling\fR" 4
|
5803 |
|
|
.IX Item "-fselective-scheduling"
|
5804 |
|
|
Schedule instructions using selective scheduling algorithm. Selective
|
5805 |
|
|
scheduling runs instead of the first scheduler pass.
|
5806 |
|
|
.IP "\fB\-fselective\-scheduling2\fR" 4
|
5807 |
|
|
.IX Item "-fselective-scheduling2"
|
5808 |
|
|
Schedule instructions using selective scheduling algorithm. Selective
|
5809 |
|
|
scheduling runs instead of the second scheduler pass.
|
5810 |
|
|
.IP "\fB\-fsel\-sched\-pipelining\fR" 4
|
5811 |
|
|
.IX Item "-fsel-sched-pipelining"
|
5812 |
|
|
Enable software pipelining of innermost loops during selective scheduling.
|
5813 |
|
|
This option has no effect until one of \fB\-fselective\-scheduling\fR or
|
5814 |
|
|
\&\fB\-fselective\-scheduling2\fR is turned on.
|
5815 |
|
|
.IP "\fB\-fsel\-sched\-pipelining\-outer\-loops\fR" 4
|
5816 |
|
|
.IX Item "-fsel-sched-pipelining-outer-loops"
|
5817 |
|
|
When pipelining loops during selective scheduling, also pipeline outer loops.
|
5818 |
|
|
This option has no effect until \fB\-fsel\-sched\-pipelining\fR is turned on.
|
5819 |
|
|
.IP "\fB\-fcaller\-saves\fR" 4
|
5820 |
|
|
.IX Item "-fcaller-saves"
|
5821 |
|
|
Enable values to be allocated in registers that will be clobbered by
|
5822 |
|
|
function calls, by emitting extra instructions to save and restore the
|
5823 |
|
|
registers around such calls. Such allocation is done only when it
|
5824 |
|
|
seems to result in better code than would otherwise be produced.
|
5825 |
|
|
.Sp
|
5826 |
|
|
This option is always enabled by default on certain machines, usually
|
5827 |
|
|
those which have no call-preserved registers to use instead.
|
5828 |
|
|
.Sp
|
5829 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
5830 |
|
|
.IP "\fB\-fconserve\-stack\fR" 4
|
5831 |
|
|
.IX Item "-fconserve-stack"
|
5832 |
|
|
Attempt to minimize stack usage. The compiler will attempt to use less
|
5833 |
|
|
stack space, even if that makes the program slower. This option
|
5834 |
|
|
implies setting the \fBlarge-stack-frame\fR parameter to 100
|
5835 |
|
|
and the \fBlarge-stack-frame-growth\fR parameter to 400.
|
5836 |
|
|
.IP "\fB\-ftree\-reassoc\fR" 4
|
5837 |
|
|
.IX Item "-ftree-reassoc"
|
5838 |
|
|
Perform reassociation on trees. This flag is enabled by default
|
5839 |
|
|
at \fB\-O\fR and higher.
|
5840 |
|
|
.IP "\fB\-ftree\-pre\fR" 4
|
5841 |
|
|
.IX Item "-ftree-pre"
|
5842 |
|
|
Perform partial redundancy elimination (\s-1PRE\s0) on trees. This flag is
|
5843 |
|
|
enabled by default at \fB\-O2\fR and \fB\-O3\fR.
|
5844 |
|
|
.IP "\fB\-ftree\-forwprop\fR" 4
|
5845 |
|
|
.IX Item "-ftree-forwprop"
|
5846 |
|
|
Perform forward propagation on trees. This flag is enabled by default
|
5847 |
|
|
at \fB\-O\fR and higher.
|
5848 |
|
|
.IP "\fB\-ftree\-fre\fR" 4
|
5849 |
|
|
.IX Item "-ftree-fre"
|
5850 |
|
|
Perform full redundancy elimination (\s-1FRE\s0) on trees. The difference
|
5851 |
|
|
between \s-1FRE\s0 and \s-1PRE\s0 is that \s-1FRE\s0 only considers expressions
|
5852 |
|
|
that are computed on all paths leading to the redundant computation.
|
5853 |
|
|
This analysis is faster than \s-1PRE\s0, though it exposes fewer redundancies.
|
5854 |
|
|
This flag is enabled by default at \fB\-O\fR and higher.
|
5855 |
|
|
.IP "\fB\-ftree\-phiprop\fR" 4
|
5856 |
|
|
.IX Item "-ftree-phiprop"
|
5857 |
|
|
Perform hoisting of loads from conditional pointers on trees. This
|
5858 |
|
|
pass is enabled by default at \fB\-O\fR and higher.
|
5859 |
|
|
.IP "\fB\-ftree\-copy\-prop\fR" 4
|
5860 |
|
|
.IX Item "-ftree-copy-prop"
|
5861 |
|
|
Perform copy propagation on trees. This pass eliminates unnecessary
|
5862 |
|
|
copy operations. This flag is enabled by default at \fB\-O\fR and
|
5863 |
|
|
higher.
|
5864 |
|
|
.IP "\fB\-fipa\-pure\-const\fR" 4
|
5865 |
|
|
.IX Item "-fipa-pure-const"
|
5866 |
|
|
Discover which functions are pure or constant.
|
5867 |
|
|
Enabled by default at \fB\-O\fR and higher.
|
5868 |
|
|
.IP "\fB\-fipa\-reference\fR" 4
|
5869 |
|
|
.IX Item "-fipa-reference"
|
5870 |
|
|
Discover which static variables do not escape cannot escape the
|
5871 |
|
|
compilation unit.
|
5872 |
|
|
Enabled by default at \fB\-O\fR and higher.
|
5873 |
|
|
.IP "\fB\-fipa\-struct\-reorg\fR" 4
|
5874 |
|
|
.IX Item "-fipa-struct-reorg"
|
5875 |
|
|
Perform structure reorganization optimization, that change C\-like structures
|
5876 |
|
|
layout in order to better utilize spatial locality. This transformation is
|
5877 |
|
|
affective for programs containing arrays of structures. Available in two
|
5878 |
|
|
compilation modes: profile-based (enabled with \fB\-fprofile\-generate\fR)
|
5879 |
|
|
or static (which uses built-in heuristics). Require \fB\-fipa\-type\-escape\fR
|
5880 |
|
|
to provide the safety of this transformation. It works only in whole program
|
5881 |
|
|
mode, so it requires \fB\-fwhole\-program\fR and \fB\-combine\fR to be
|
5882 |
|
|
enabled. Structures considered \fBcold\fR by this transformation are not
|
5883 |
|
|
affected (see \fB\-\-param struct\-reorg\-cold\-struct\-ratio=\fR\fIvalue\fR).
|
5884 |
|
|
.Sp
|
5885 |
|
|
With this flag, the program debug info reflects a new structure layout.
|
5886 |
|
|
.IP "\fB\-fipa\-pta\fR" 4
|
5887 |
|
|
.IX Item "-fipa-pta"
|
5888 |
|
|
Perform interprocedural pointer analysis. This option is experimental
|
5889 |
|
|
and does not affect generated code.
|
5890 |
|
|
.IP "\fB\-fipa\-cp\fR" 4
|
5891 |
|
|
.IX Item "-fipa-cp"
|
5892 |
|
|
Perform interprocedural constant propagation.
|
5893 |
|
|
This optimization analyzes the program to determine when values passed
|
5894 |
|
|
to functions are constants and then optimizes accordingly.
|
5895 |
|
|
This optimization can substantially increase performance
|
5896 |
|
|
if the application has constants passed to functions.
|
5897 |
|
|
This flag is enabled by default at \fB\-O2\fR, \fB\-Os\fR and \fB\-O3\fR.
|
5898 |
|
|
.IP "\fB\-fipa\-cp\-clone\fR" 4
|
5899 |
|
|
.IX Item "-fipa-cp-clone"
|
5900 |
|
|
Perform function cloning to make interprocedural constant propagation stronger.
|
5901 |
|
|
When enabled, interprocedural constant propagation will perform function cloning
|
5902 |
|
|
when externally visible function can be called with constant arguments.
|
5903 |
|
|
Because this optimization can create multiple copies of functions,
|
5904 |
|
|
it may significantly increase code size
|
5905 |
|
|
(see \fB\-\-param ipcp\-unit\-growth=\fR\fIvalue\fR).
|
5906 |
|
|
This flag is enabled by default at \fB\-O3\fR.
|
5907 |
|
|
.IP "\fB\-fipa\-matrix\-reorg\fR" 4
|
5908 |
|
|
.IX Item "-fipa-matrix-reorg"
|
5909 |
|
|
Perform matrix flattening and transposing.
|
5910 |
|
|
Matrix flattening tries to replace an m\-dimensional matrix
|
5911 |
|
|
with its equivalent n\-dimensional matrix, where n < m.
|
5912 |
|
|
This reduces the level of indirection needed for accessing the elements
|
5913 |
|
|
of the matrix. The second optimization is matrix transposing that
|
5914 |
|
|
attempts to change the order of the matrix's dimensions in order to
|
5915 |
|
|
improve cache locality.
|
5916 |
|
|
Both optimizations need the \fB\-fwhole\-program\fR flag.
|
5917 |
|
|
Transposing is enabled only if profiling information is available.
|
5918 |
|
|
.IP "\fB\-ftree\-sink\fR" 4
|
5919 |
|
|
.IX Item "-ftree-sink"
|
5920 |
|
|
Perform forward store motion on trees. This flag is
|
5921 |
|
|
enabled by default at \fB\-O\fR and higher.
|
5922 |
|
|
.IP "\fB\-ftree\-ccp\fR" 4
|
5923 |
|
|
.IX Item "-ftree-ccp"
|
5924 |
|
|
Perform sparse conditional constant propagation (\s-1CCP\s0) on trees. This
|
5925 |
|
|
pass only operates on local scalar variables and is enabled by default
|
5926 |
|
|
at \fB\-O\fR and higher.
|
5927 |
|
|
.IP "\fB\-ftree\-switch\-conversion\fR" 4
|
5928 |
|
|
.IX Item "-ftree-switch-conversion"
|
5929 |
|
|
Perform conversion of simple initializations in a switch to
|
5930 |
|
|
initializations from a scalar array. This flag is enabled by default
|
5931 |
|
|
at \fB\-O2\fR and higher.
|
5932 |
|
|
.IP "\fB\-ftree\-dce\fR" 4
|
5933 |
|
|
.IX Item "-ftree-dce"
|
5934 |
|
|
Perform dead code elimination (\s-1DCE\s0) on trees. This flag is enabled by
|
5935 |
|
|
default at \fB\-O\fR and higher.
|
5936 |
|
|
.IP "\fB\-ftree\-builtin\-call\-dce\fR" 4
|
5937 |
|
|
.IX Item "-ftree-builtin-call-dce"
|
5938 |
|
|
Perform conditional dead code elimination (\s-1DCE\s0) for calls to builtin functions
|
5939 |
|
|
that may set \f(CW\*(C`errno\*(C'\fR but are otherwise side-effect free. This flag is
|
5940 |
|
|
enabled by default at \fB\-O2\fR and higher if \fB\-Os\fR is not also
|
5941 |
|
|
specified.
|
5942 |
|
|
.IP "\fB\-ftree\-dominator\-opts\fR" 4
|
5943 |
|
|
.IX Item "-ftree-dominator-opts"
|
5944 |
|
|
Perform a variety of simple scalar cleanups (constant/copy
|
5945 |
|
|
propagation, redundancy elimination, range propagation and expression
|
5946 |
|
|
simplification) based on a dominator tree traversal. This also
|
5947 |
|
|
performs jump threading (to reduce jumps to jumps). This flag is
|
5948 |
|
|
enabled by default at \fB\-O\fR and higher.
|
5949 |
|
|
.IP "\fB\-ftree\-dse\fR" 4
|
5950 |
|
|
.IX Item "-ftree-dse"
|
5951 |
|
|
Perform dead store elimination (\s-1DSE\s0) on trees. A dead store is a store into
|
5952 |
|
|
a memory location which will later be overwritten by another store without
|
5953 |
|
|
any intervening loads. In this case the earlier store can be deleted. This
|
5954 |
|
|
flag is enabled by default at \fB\-O\fR and higher.
|
5955 |
|
|
.IP "\fB\-ftree\-ch\fR" 4
|
5956 |
|
|
.IX Item "-ftree-ch"
|
5957 |
|
|
Perform loop header copying on trees. This is beneficial since it increases
|
5958 |
|
|
effectiveness of code motion optimizations. It also saves one jump. This flag
|
5959 |
|
|
is enabled by default at \fB\-O\fR and higher. It is not enabled
|
5960 |
|
|
for \fB\-Os\fR, since it usually increases code size.
|
5961 |
|
|
.IP "\fB\-ftree\-loop\-optimize\fR" 4
|
5962 |
|
|
.IX Item "-ftree-loop-optimize"
|
5963 |
|
|
Perform loop optimizations on trees. This flag is enabled by default
|
5964 |
|
|
at \fB\-O\fR and higher.
|
5965 |
|
|
.IP "\fB\-ftree\-loop\-linear\fR" 4
|
5966 |
|
|
.IX Item "-ftree-loop-linear"
|
5967 |
|
|
Perform linear loop transformations on tree. This flag can improve cache
|
5968 |
|
|
performance and allow further loop optimizations to take place.
|
5969 |
|
|
.IP "\fB\-floop\-interchange\fR" 4
|
5970 |
|
|
.IX Item "-floop-interchange"
|
5971 |
|
|
Perform loop interchange transformations on loops. Interchanging two
|
5972 |
|
|
nested loops switches the inner and outer loops. For example, given a
|
5973 |
|
|
loop like:
|
5974 |
|
|
.Sp
|
5975 |
|
|
.Vb 5
|
5976 |
|
|
\& DO J = 1, M
|
5977 |
|
|
\& DO I = 1, N
|
5978 |
|
|
\& A(J, I) = A(J, I) * C
|
5979 |
|
|
\& ENDDO
|
5980 |
|
|
\& ENDDO
|
5981 |
|
|
.Ve
|
5982 |
|
|
.Sp
|
5983 |
|
|
loop interchange will transform the loop as if the user had written:
|
5984 |
|
|
.Sp
|
5985 |
|
|
.Vb 5
|
5986 |
|
|
\& DO I = 1, N
|
5987 |
|
|
\& DO J = 1, M
|
5988 |
|
|
\& A(J, I) = A(J, I) * C
|
5989 |
|
|
\& ENDDO
|
5990 |
|
|
\& ENDDO
|
5991 |
|
|
.Ve
|
5992 |
|
|
.Sp
|
5993 |
|
|
which can be beneficial when \f(CW\*(C`N\*(C'\fR is larger than the caches,
|
5994 |
|
|
because in Fortran, the elements of an array are stored in memory
|
5995 |
|
|
contiguously by column, and the original loop iterates over rows,
|
5996 |
|
|
potentially creating at each access a cache miss. This optimization
|
5997 |
|
|
applies to all the languages supported by \s-1GCC\s0 and is not limited to
|
5998 |
|
|
Fortran. To use this code transformation, \s-1GCC\s0 has to be configured
|
5999 |
|
|
with \fB\-\-with\-ppl\fR and \fB\-\-with\-cloog\fR to enable the
|
6000 |
|
|
Graphite loop transformation infrastructure.
|
6001 |
|
|
.IP "\fB\-floop\-strip\-mine\fR" 4
|
6002 |
|
|
.IX Item "-floop-strip-mine"
|
6003 |
|
|
Perform loop strip mining transformations on loops. Strip mining
|
6004 |
|
|
splits a loop into two nested loops. The outer loop has strides
|
6005 |
|
|
equal to the strip size and the inner loop has strides of the
|
6006 |
|
|
original loop within a strip. The strip length can be changed
|
6007 |
|
|
using the \fBloop-block-tile-size\fR parameter. For example,
|
6008 |
|
|
given a loop like:
|
6009 |
|
|
.Sp
|
6010 |
|
|
.Vb 3
|
6011 |
|
|
\& DO I = 1, N
|
6012 |
|
|
\& A(I) = A(I) + C
|
6013 |
|
|
\& ENDDO
|
6014 |
|
|
.Ve
|
6015 |
|
|
.Sp
|
6016 |
|
|
loop strip mining will transform the loop as if the user had written:
|
6017 |
|
|
.Sp
|
6018 |
|
|
.Vb 5
|
6019 |
|
|
\& DO II = 1, N, 51
|
6020 |
|
|
\& DO I = II, min (II + 50, N)
|
6021 |
|
|
\& A(I) = A(I) + C
|
6022 |
|
|
\& ENDDO
|
6023 |
|
|
\& ENDDO
|
6024 |
|
|
.Ve
|
6025 |
|
|
.Sp
|
6026 |
|
|
This optimization applies to all the languages supported by \s-1GCC\s0 and is
|
6027 |
|
|
not limited to Fortran. To use this code transformation, \s-1GCC\s0 has to
|
6028 |
|
|
be configured with \fB\-\-with\-ppl\fR and \fB\-\-with\-cloog\fR to
|
6029 |
|
|
enable the Graphite loop transformation infrastructure.
|
6030 |
|
|
.IP "\fB\-floop\-block\fR" 4
|
6031 |
|
|
.IX Item "-floop-block"
|
6032 |
|
|
Perform loop blocking transformations on loops. Blocking strip mines
|
6033 |
|
|
each loop in the loop nest such that the memory accesses of the
|
6034 |
|
|
element loops fit inside caches. The strip length can be changed
|
6035 |
|
|
using the \fBloop-block-tile-size\fR parameter. For example, given
|
6036 |
|
|
a loop like:
|
6037 |
|
|
.Sp
|
6038 |
|
|
.Vb 5
|
6039 |
|
|
\& DO I = 1, N
|
6040 |
|
|
\& DO J = 1, M
|
6041 |
|
|
\& A(J, I) = B(I) + C(J)
|
6042 |
|
|
\& ENDDO
|
6043 |
|
|
\& ENDDO
|
6044 |
|
|
.Ve
|
6045 |
|
|
.Sp
|
6046 |
|
|
loop blocking will transform the loop as if the user had written:
|
6047 |
|
|
.Sp
|
6048 |
|
|
.Vb 9
|
6049 |
|
|
\& DO II = 1, N, 51
|
6050 |
|
|
\& DO JJ = 1, M, 51
|
6051 |
|
|
\& DO I = II, min (II + 50, N)
|
6052 |
|
|
\& DO J = JJ, min (JJ + 50, M)
|
6053 |
|
|
\& A(J, I) = B(I) + C(J)
|
6054 |
|
|
\& ENDDO
|
6055 |
|
|
\& ENDDO
|
6056 |
|
|
\& ENDDO
|
6057 |
|
|
\& ENDDO
|
6058 |
|
|
.Ve
|
6059 |
|
|
.Sp
|
6060 |
|
|
which can be beneficial when \f(CW\*(C`M\*(C'\fR is larger than the caches,
|
6061 |
|
|
because the innermost loop will iterate over a smaller amount of data
|
6062 |
|
|
that can be kept in the caches. This optimization applies to all the
|
6063 |
|
|
languages supported by \s-1GCC\s0 and is not limited to Fortran. To use this
|
6064 |
|
|
code transformation, \s-1GCC\s0 has to be configured with \fB\-\-with\-ppl\fR
|
6065 |
|
|
and \fB\-\-with\-cloog\fR to enable the Graphite loop transformation
|
6066 |
|
|
infrastructure.
|
6067 |
|
|
.IP "\fB\-fgraphite\-identity\fR" 4
|
6068 |
|
|
.IX Item "-fgraphite-identity"
|
6069 |
|
|
Enable the identity transformation for graphite. For every SCoP we generate
|
6070 |
|
|
the polyhedral representation and transform it back to gimple. Using
|
6071 |
|
|
\&\fB\-fgraphite\-identity\fR we can check the costs or benefits of the
|
6072 |
|
|
\&\s-1GIMPLE\s0 \-> \s-1GRAPHITE\s0 \-> \s-1GIMPLE\s0 transformation. Some minimal optimizations
|
6073 |
|
|
are also performed by the code generator CLooG, like index splitting and
|
6074 |
|
|
dead code elimination in loops.
|
6075 |
|
|
.IP "\fB\-floop\-parallelize\-all\fR" 4
|
6076 |
|
|
.IX Item "-floop-parallelize-all"
|
6077 |
|
|
Use the Graphite data dependence analysis to identify loops that can
|
6078 |
|
|
be parallelized. Parallelize all the loops that can be analyzed to
|
6079 |
|
|
not contain loop carried dependences without checking that it is
|
6080 |
|
|
profitable to parallelize the loops.
|
6081 |
|
|
.IP "\fB\-fcheck\-data\-deps\fR" 4
|
6082 |
|
|
.IX Item "-fcheck-data-deps"
|
6083 |
|
|
Compare the results of several data dependence analyzers. This option
|
6084 |
|
|
is used for debugging the data dependence analyzers.
|
6085 |
|
|
.IP "\fB\-ftree\-loop\-distribution\fR" 4
|
6086 |
|
|
.IX Item "-ftree-loop-distribution"
|
6087 |
|
|
Perform loop distribution. This flag can improve cache performance on
|
6088 |
|
|
big loop bodies and allow further loop optimizations, like
|
6089 |
|
|
parallelization or vectorization, to take place. For example, the loop
|
6090 |
|
|
.Sp
|
6091 |
|
|
.Vb 4
|
6092 |
|
|
\& DO I = 1, N
|
6093 |
|
|
\& A(I) = B(I) + C
|
6094 |
|
|
\& D(I) = E(I) * F
|
6095 |
|
|
\& ENDDO
|
6096 |
|
|
.Ve
|
6097 |
|
|
.Sp
|
6098 |
|
|
is transformed to
|
6099 |
|
|
.Sp
|
6100 |
|
|
.Vb 6
|
6101 |
|
|
\& DO I = 1, N
|
6102 |
|
|
\& A(I) = B(I) + C
|
6103 |
|
|
\& ENDDO
|
6104 |
|
|
\& DO I = 1, N
|
6105 |
|
|
\& D(I) = E(I) * F
|
6106 |
|
|
\& ENDDO
|
6107 |
|
|
.Ve
|
6108 |
|
|
.IP "\fB\-ftree\-loop\-im\fR" 4
|
6109 |
|
|
.IX Item "-ftree-loop-im"
|
6110 |
|
|
Perform loop invariant motion on trees. This pass moves only invariants that
|
6111 |
|
|
would be hard to handle at \s-1RTL\s0 level (function calls, operations that expand to
|
6112 |
|
|
nontrivial sequences of insns). With \fB\-funswitch\-loops\fR it also moves
|
6113 |
|
|
operands of conditions that are invariant out of the loop, so that we can use
|
6114 |
|
|
just trivial invariantness analysis in loop unswitching. The pass also includes
|
6115 |
|
|
store motion.
|
6116 |
|
|
.IP "\fB\-ftree\-loop\-ivcanon\fR" 4
|
6117 |
|
|
.IX Item "-ftree-loop-ivcanon"
|
6118 |
|
|
Create a canonical counter for number of iterations in the loop for that
|
6119 |
|
|
determining number of iterations requires complicated analysis. Later
|
6120 |
|
|
optimizations then may determine the number easily. Useful especially
|
6121 |
|
|
in connection with unrolling.
|
6122 |
|
|
.IP "\fB\-fivopts\fR" 4
|
6123 |
|
|
.IX Item "-fivopts"
|
6124 |
|
|
Perform induction variable optimizations (strength reduction, induction
|
6125 |
|
|
variable merging and induction variable elimination) on trees.
|
6126 |
|
|
.IP "\fB\-ftree\-parallelize\-loops=n\fR" 4
|
6127 |
|
|
.IX Item "-ftree-parallelize-loops=n"
|
6128 |
|
|
Parallelize loops, i.e., split their iteration space to run in n threads.
|
6129 |
|
|
This is only possible for loops whose iterations are independent
|
6130 |
|
|
and can be arbitrarily reordered. The optimization is only
|
6131 |
|
|
profitable on multiprocessor machines, for loops that are CPU-intensive,
|
6132 |
|
|
rather than constrained e.g. by memory bandwidth. This option
|
6133 |
|
|
implies \fB\-pthread\fR, and thus is only supported on targets
|
6134 |
|
|
that have support for \fB\-pthread\fR.
|
6135 |
|
|
.IP "\fB\-ftree\-pta\fR" 4
|
6136 |
|
|
.IX Item "-ftree-pta"
|
6137 |
|
|
Perform function-local points-to analysis on trees. This flag is
|
6138 |
|
|
enabled by default at \fB\-O\fR and higher.
|
6139 |
|
|
.IP "\fB\-ftree\-sra\fR" 4
|
6140 |
|
|
.IX Item "-ftree-sra"
|
6141 |
|
|
Perform scalar replacement of aggregates. This pass replaces structure
|
6142 |
|
|
references with scalars to prevent committing structures to memory too
|
6143 |
|
|
early. This flag is enabled by default at \fB\-O\fR and higher.
|
6144 |
|
|
.IP "\fB\-ftree\-copyrename\fR" 4
|
6145 |
|
|
.IX Item "-ftree-copyrename"
|
6146 |
|
|
Perform copy renaming on trees. This pass attempts to rename compiler
|
6147 |
|
|
temporaries to other variables at copy locations, usually resulting in
|
6148 |
|
|
variable names which more closely resemble the original variables. This flag
|
6149 |
|
|
is enabled by default at \fB\-O\fR and higher.
|
6150 |
|
|
.IP "\fB\-ftree\-ter\fR" 4
|
6151 |
|
|
.IX Item "-ftree-ter"
|
6152 |
|
|
Perform temporary expression replacement during the \s-1SSA\-\s0>normal phase. Single
|
6153 |
|
|
use/single def temporaries are replaced at their use location with their
|
6154 |
|
|
defining expression. This results in non-GIMPLE code, but gives the expanders
|
6155 |
|
|
much more complex trees to work on resulting in better \s-1RTL\s0 generation. This is
|
6156 |
|
|
enabled by default at \fB\-O\fR and higher.
|
6157 |
|
|
.IP "\fB\-ftree\-vectorize\fR" 4
|
6158 |
|
|
.IX Item "-ftree-vectorize"
|
6159 |
|
|
Perform loop vectorization on trees. This flag is enabled by default at
|
6160 |
|
|
\&\fB\-O3\fR.
|
6161 |
|
|
.IP "\fB\-ftree\-slp\-vectorize\fR" 4
|
6162 |
|
|
.IX Item "-ftree-slp-vectorize"
|
6163 |
|
|
Perform basic block vectorization on trees. This flag is enabled by default at
|
6164 |
|
|
\&\fB\-O3\fR and when \fB\-ftree\-vectorize\fR is enabled.
|
6165 |
|
|
.IP "\fB\-ftree\-vect\-loop\-version\fR" 4
|
6166 |
|
|
.IX Item "-ftree-vect-loop-version"
|
6167 |
|
|
Perform loop versioning when doing loop vectorization on trees. When a loop
|
6168 |
|
|
appears to be vectorizable except that data alignment or data dependence cannot
|
6169 |
|
|
be determined at compile time then vectorized and non-vectorized versions of
|
6170 |
|
|
the loop are generated along with runtime checks for alignment or dependence
|
6171 |
|
|
to control which version is executed. This option is enabled by default
|
6172 |
|
|
except at level \fB\-Os\fR where it is disabled.
|
6173 |
|
|
.IP "\fB\-fvect\-cost\-model\fR" 4
|
6174 |
|
|
.IX Item "-fvect-cost-model"
|
6175 |
|
|
Enable cost model for vectorization.
|
6176 |
|
|
.IP "\fB\-ftree\-vrp\fR" 4
|
6177 |
|
|
.IX Item "-ftree-vrp"
|
6178 |
|
|
Perform Value Range Propagation on trees. This is similar to the
|
6179 |
|
|
constant propagation pass, but instead of values, ranges of values are
|
6180 |
|
|
propagated. This allows the optimizers to remove unnecessary range
|
6181 |
|
|
checks like array bound checks and null pointer checks. This is
|
6182 |
|
|
enabled by default at \fB\-O2\fR and higher. Null pointer check
|
6183 |
|
|
elimination is only done if \fB\-fdelete\-null\-pointer\-checks\fR is
|
6184 |
|
|
enabled.
|
6185 |
|
|
.IP "\fB\-ftracer\fR" 4
|
6186 |
|
|
.IX Item "-ftracer"
|
6187 |
|
|
Perform tail duplication to enlarge superblock size. This transformation
|
6188 |
|
|
simplifies the control flow of the function allowing other optimizations to do
|
6189 |
|
|
better job.
|
6190 |
|
|
.IP "\fB\-funroll\-loops\fR" 4
|
6191 |
|
|
.IX Item "-funroll-loops"
|
6192 |
|
|
Unroll loops whose number of iterations can be determined at compile
|
6193 |
|
|
time or upon entry to the loop. \fB\-funroll\-loops\fR implies
|
6194 |
|
|
\&\fB\-frerun\-cse\-after\-loop\fR. This option makes code larger,
|
6195 |
|
|
and may or may not make it run faster.
|
6196 |
|
|
.IP "\fB\-funroll\-all\-loops\fR" 4
|
6197 |
|
|
.IX Item "-funroll-all-loops"
|
6198 |
|
|
Unroll all loops, even if their number of iterations is uncertain when
|
6199 |
|
|
the loop is entered. This usually makes programs run more slowly.
|
6200 |
|
|
\&\fB\-funroll\-all\-loops\fR implies the same options as
|
6201 |
|
|
\&\fB\-funroll\-loops\fR,
|
6202 |
|
|
.IP "\fB\-fsplit\-ivs\-in\-unroller\fR" 4
|
6203 |
|
|
.IX Item "-fsplit-ivs-in-unroller"
|
6204 |
|
|
Enables expressing of values of induction variables in later iterations
|
6205 |
|
|
of the unrolled loop using the value in the first iteration. This breaks
|
6206 |
|
|
long dependency chains, thus improving efficiency of the scheduling passes.
|
6207 |
|
|
.Sp
|
6208 |
|
|
Combination of \fB\-fweb\fR and \s-1CSE\s0 is often sufficient to obtain the
|
6209 |
|
|
same effect. However in cases the loop body is more complicated than
|
6210 |
|
|
a single basic block, this is not reliable. It also does not work at all
|
6211 |
|
|
on some of the architectures due to restrictions in the \s-1CSE\s0 pass.
|
6212 |
|
|
.Sp
|
6213 |
|
|
This optimization is enabled by default.
|
6214 |
|
|
.IP "\fB\-fvariable\-expansion\-in\-unroller\fR" 4
|
6215 |
|
|
.IX Item "-fvariable-expansion-in-unroller"
|
6216 |
|
|
With this option, the compiler will create multiple copies of some
|
6217 |
|
|
local variables when unrolling a loop which can result in superior code.
|
6218 |
|
|
.IP "\fB\-fpredictive\-commoning\fR" 4
|
6219 |
|
|
.IX Item "-fpredictive-commoning"
|
6220 |
|
|
Perform predictive commoning optimization, i.e., reusing computations
|
6221 |
|
|
(especially memory loads and stores) performed in previous
|
6222 |
|
|
iterations of loops.
|
6223 |
|
|
.Sp
|
6224 |
|
|
This option is enabled at level \fB\-O3\fR.
|
6225 |
|
|
.IP "\fB\-fprefetch\-loop\-arrays\fR" 4
|
6226 |
|
|
.IX Item "-fprefetch-loop-arrays"
|
6227 |
|
|
If supported by the target machine, generate instructions to prefetch
|
6228 |
|
|
memory to improve the performance of loops that access large arrays.
|
6229 |
|
|
.Sp
|
6230 |
|
|
This option may generate better or worse code; results are highly
|
6231 |
|
|
dependent on the structure of loops within the source code.
|
6232 |
|
|
.Sp
|
6233 |
|
|
Disabled at level \fB\-Os\fR.
|
6234 |
|
|
.IP "\fB\-fno\-peephole\fR" 4
|
6235 |
|
|
.IX Item "-fno-peephole"
|
6236 |
|
|
.PD 0
|
6237 |
|
|
.IP "\fB\-fno\-peephole2\fR" 4
|
6238 |
|
|
.IX Item "-fno-peephole2"
|
6239 |
|
|
.PD
|
6240 |
|
|
Disable any machine-specific peephole optimizations. The difference
|
6241 |
|
|
between \fB\-fno\-peephole\fR and \fB\-fno\-peephole2\fR is in how they
|
6242 |
|
|
are implemented in the compiler; some targets use one, some use the
|
6243 |
|
|
other, a few use both.
|
6244 |
|
|
.Sp
|
6245 |
|
|
\&\fB\-fpeephole\fR is enabled by default.
|
6246 |
|
|
\&\fB\-fpeephole2\fR enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
6247 |
|
|
.IP "\fB\-fno\-guess\-branch\-probability\fR" 4
|
6248 |
|
|
.IX Item "-fno-guess-branch-probability"
|
6249 |
|
|
Do not guess branch probabilities using heuristics.
|
6250 |
|
|
.Sp
|
6251 |
|
|
\&\s-1GCC\s0 will use heuristics to guess branch probabilities if they are
|
6252 |
|
|
not provided by profiling feedback (\fB\-fprofile\-arcs\fR). These
|
6253 |
|
|
heuristics are based on the control flow graph. If some branch probabilities
|
6254 |
|
|
are specified by \fB_\|_builtin_expect\fR, then the heuristics will be
|
6255 |
|
|
used to guess branch probabilities for the rest of the control flow graph,
|
6256 |
|
|
taking the \fB_\|_builtin_expect\fR info into account. The interactions
|
6257 |
|
|
between the heuristics and \fB_\|_builtin_expect\fR can be complex, and in
|
6258 |
|
|
some cases, it may be useful to disable the heuristics so that the effects
|
6259 |
|
|
of \fB_\|_builtin_expect\fR are easier to understand.
|
6260 |
|
|
.Sp
|
6261 |
|
|
The default is \fB\-fguess\-branch\-probability\fR at levels
|
6262 |
|
|
\&\fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
6263 |
|
|
.IP "\fB\-freorder\-blocks\fR" 4
|
6264 |
|
|
.IX Item "-freorder-blocks"
|
6265 |
|
|
Reorder basic blocks in the compiled function in order to reduce number of
|
6266 |
|
|
taken branches and improve code locality.
|
6267 |
|
|
.Sp
|
6268 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR.
|
6269 |
|
|
.IP "\fB\-freorder\-blocks\-and\-partition\fR" 4
|
6270 |
|
|
.IX Item "-freorder-blocks-and-partition"
|
6271 |
|
|
In addition to reordering basic blocks in the compiled function, in order
|
6272 |
|
|
to reduce number of taken branches, partitions hot and cold basic blocks
|
6273 |
|
|
into separate sections of the assembly and .o files, to improve
|
6274 |
|
|
paging and cache locality performance.
|
6275 |
|
|
.Sp
|
6276 |
|
|
This optimization is automatically turned off in the presence of
|
6277 |
|
|
exception handling, for linkonce sections, for functions with a user-defined
|
6278 |
|
|
section attribute and on any architecture that does not support named
|
6279 |
|
|
sections.
|
6280 |
|
|
.IP "\fB\-freorder\-functions\fR" 4
|
6281 |
|
|
.IX Item "-freorder-functions"
|
6282 |
|
|
Reorder functions in the object file in order to
|
6283 |
|
|
improve code locality. This is implemented by using special
|
6284 |
|
|
subsections \f(CW\*(C`.text.hot\*(C'\fR for most frequently executed functions and
|
6285 |
|
|
\&\f(CW\*(C`.text.unlikely\*(C'\fR for unlikely executed functions. Reordering is done by
|
6286 |
|
|
the linker so object file format must support named sections and linker must
|
6287 |
|
|
place them in a reasonable way.
|
6288 |
|
|
.Sp
|
6289 |
|
|
Also profile feedback must be available in to make this option effective. See
|
6290 |
|
|
\&\fB\-fprofile\-arcs\fR for details.
|
6291 |
|
|
.Sp
|
6292 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
6293 |
|
|
.IP "\fB\-fstrict\-aliasing\fR" 4
|
6294 |
|
|
.IX Item "-fstrict-aliasing"
|
6295 |
|
|
Allow the compiler to assume the strictest aliasing rules applicable to
|
6296 |
|
|
the language being compiled. For C (and \*(C+), this activates
|
6297 |
|
|
optimizations based on the type of expressions. In particular, an
|
6298 |
|
|
object of one type is assumed never to reside at the same address as an
|
6299 |
|
|
object of a different type, unless the types are almost the same. For
|
6300 |
|
|
example, an \f(CW\*(C`unsigned int\*(C'\fR can alias an \f(CW\*(C`int\*(C'\fR, but not a
|
6301 |
|
|
\&\f(CW\*(C`void*\*(C'\fR or a \f(CW\*(C`double\*(C'\fR. A character type may alias any other
|
6302 |
|
|
type.
|
6303 |
|
|
.Sp
|
6304 |
|
|
Pay special attention to code like this:
|
6305 |
|
|
.Sp
|
6306 |
|
|
.Vb 4
|
6307 |
|
|
\& union a_union {
|
6308 |
|
|
\& int i;
|
6309 |
|
|
\& double d;
|
6310 |
|
|
\& };
|
6311 |
|
|
\&
|
6312 |
|
|
\& int f() {
|
6313 |
|
|
\& union a_union t;
|
6314 |
|
|
\& t.d = 3.0;
|
6315 |
|
|
\& return t.i;
|
6316 |
|
|
\& }
|
6317 |
|
|
.Ve
|
6318 |
|
|
.Sp
|
6319 |
|
|
The practice of reading from a different union member than the one most
|
6320 |
|
|
recently written to (called \*(L"type-punning\*(R") is common. Even with
|
6321 |
|
|
\&\fB\-fstrict\-aliasing\fR, type-punning is allowed, provided the memory
|
6322 |
|
|
is accessed through the union type. So, the code above will work as
|
6323 |
|
|
expected. However, this code might not:
|
6324 |
|
|
.Sp
|
6325 |
|
|
.Vb 7
|
6326 |
|
|
\& int f() {
|
6327 |
|
|
\& union a_union t;
|
6328 |
|
|
\& int* ip;
|
6329 |
|
|
\& t.d = 3.0;
|
6330 |
|
|
\& ip = &t.i;
|
6331 |
|
|
\& return *ip;
|
6332 |
|
|
\& }
|
6333 |
|
|
.Ve
|
6334 |
|
|
.Sp
|
6335 |
|
|
Similarly, access by taking the address, casting the resulting pointer
|
6336 |
|
|
and dereferencing the result has undefined behavior, even if the cast
|
6337 |
|
|
uses a union type, e.g.:
|
6338 |
|
|
.Sp
|
6339 |
|
|
.Vb 4
|
6340 |
|
|
\& int f() {
|
6341 |
|
|
\& double d = 3.0;
|
6342 |
|
|
\& return ((union a_union *) &d)\->i;
|
6343 |
|
|
\& }
|
6344 |
|
|
.Ve
|
6345 |
|
|
.Sp
|
6346 |
|
|
The \fB\-fstrict\-aliasing\fR option is enabled at levels
|
6347 |
|
|
\&\fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
6348 |
|
|
.IP "\fB\-fstrict\-overflow\fR" 4
|
6349 |
|
|
.IX Item "-fstrict-overflow"
|
6350 |
|
|
Allow the compiler to assume strict signed overflow rules, depending
|
6351 |
|
|
on the language being compiled. For C (and \*(C+) this means that
|
6352 |
|
|
overflow when doing arithmetic with signed numbers is undefined, which
|
6353 |
|
|
means that the compiler may assume that it will not happen. This
|
6354 |
|
|
permits various optimizations. For example, the compiler will assume
|
6355 |
|
|
that an expression like \f(CW\*(C`i + 10 > i\*(C'\fR will always be true for
|
6356 |
|
|
signed \f(CW\*(C`i\*(C'\fR. This assumption is only valid if signed overflow is
|
6357 |
|
|
undefined, as the expression is false if \f(CW\*(C`i + 10\*(C'\fR overflows when
|
6358 |
|
|
using twos complement arithmetic. When this option is in effect any
|
6359 |
|
|
attempt to determine whether an operation on signed numbers will
|
6360 |
|
|
overflow must be written carefully to not actually involve overflow.
|
6361 |
|
|
.Sp
|
6362 |
|
|
This option also allows the compiler to assume strict pointer
|
6363 |
|
|
semantics: given a pointer to an object, if adding an offset to that
|
6364 |
|
|
pointer does not produce a pointer to the same object, the addition is
|
6365 |
|
|
undefined. This permits the compiler to conclude that \f(CW\*(C`p + u >
|
6366 |
|
|
p\*(C'\fR is always true for a pointer \f(CW\*(C`p\*(C'\fR and unsigned integer
|
6367 |
|
|
\&\f(CW\*(C`u\*(C'\fR. This assumption is only valid because pointer wraparound is
|
6368 |
|
|
undefined, as the expression is false if \f(CW\*(C`p + u\*(C'\fR overflows using
|
6369 |
|
|
twos complement arithmetic.
|
6370 |
|
|
.Sp
|
6371 |
|
|
See also the \fB\-fwrapv\fR option. Using \fB\-fwrapv\fR means
|
6372 |
|
|
that integer signed overflow is fully defined: it wraps. When
|
6373 |
|
|
\&\fB\-fwrapv\fR is used, there is no difference between
|
6374 |
|
|
\&\fB\-fstrict\-overflow\fR and \fB\-fno\-strict\-overflow\fR for
|
6375 |
|
|
integers. With \fB\-fwrapv\fR certain types of overflow are
|
6376 |
|
|
permitted. For example, if the compiler gets an overflow when doing
|
6377 |
|
|
arithmetic on constants, the overflowed value can still be used with
|
6378 |
|
|
\&\fB\-fwrapv\fR, but not otherwise.
|
6379 |
|
|
.Sp
|
6380 |
|
|
The \fB\-fstrict\-overflow\fR option is enabled at levels
|
6381 |
|
|
\&\fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
6382 |
|
|
.IP "\fB\-falign\-functions\fR" 4
|
6383 |
|
|
.IX Item "-falign-functions"
|
6384 |
|
|
.PD 0
|
6385 |
|
|
.IP "\fB\-falign\-functions=\fR\fIn\fR" 4
|
6386 |
|
|
.IX Item "-falign-functions=n"
|
6387 |
|
|
.PD
|
6388 |
|
|
Align the start of functions to the next power-of-two greater than
|
6389 |
|
|
\&\fIn\fR, skipping up to \fIn\fR bytes. For instance,
|
6390 |
|
|
\&\fB\-falign\-functions=32\fR aligns functions to the next 32\-byte
|
6391 |
|
|
boundary, but \fB\-falign\-functions=24\fR would align to the next
|
6392 |
|
|
32\-byte boundary only if this can be done by skipping 23 bytes or less.
|
6393 |
|
|
.Sp
|
6394 |
|
|
\&\fB\-fno\-align\-functions\fR and \fB\-falign\-functions=1\fR are
|
6395 |
|
|
equivalent and mean that functions will not be aligned.
|
6396 |
|
|
.Sp
|
6397 |
|
|
Some assemblers only support this flag when \fIn\fR is a power of two;
|
6398 |
|
|
in that case, it is rounded up.
|
6399 |
|
|
.Sp
|
6400 |
|
|
If \fIn\fR is not specified or is zero, use a machine-dependent default.
|
6401 |
|
|
.Sp
|
6402 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR.
|
6403 |
|
|
.IP "\fB\-falign\-labels\fR" 4
|
6404 |
|
|
.IX Item "-falign-labels"
|
6405 |
|
|
.PD 0
|
6406 |
|
|
.IP "\fB\-falign\-labels=\fR\fIn\fR" 4
|
6407 |
|
|
.IX Item "-falign-labels=n"
|
6408 |
|
|
.PD
|
6409 |
|
|
Align all branch targets to a power-of-two boundary, skipping up to
|
6410 |
|
|
\&\fIn\fR bytes like \fB\-falign\-functions\fR. This option can easily
|
6411 |
|
|
make code slower, because it must insert dummy operations for when the
|
6412 |
|
|
branch target is reached in the usual flow of the code.
|
6413 |
|
|
.Sp
|
6414 |
|
|
\&\fB\-fno\-align\-labels\fR and \fB\-falign\-labels=1\fR are
|
6415 |
|
|
equivalent and mean that labels will not be aligned.
|
6416 |
|
|
.Sp
|
6417 |
|
|
If \fB\-falign\-loops\fR or \fB\-falign\-jumps\fR are applicable and
|
6418 |
|
|
are greater than this value, then their values are used instead.
|
6419 |
|
|
.Sp
|
6420 |
|
|
If \fIn\fR is not specified or is zero, use a machine-dependent default
|
6421 |
|
|
which is very likely to be \fB1\fR, meaning no alignment.
|
6422 |
|
|
.Sp
|
6423 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR.
|
6424 |
|
|
.IP "\fB\-falign\-loops\fR" 4
|
6425 |
|
|
.IX Item "-falign-loops"
|
6426 |
|
|
.PD 0
|
6427 |
|
|
.IP "\fB\-falign\-loops=\fR\fIn\fR" 4
|
6428 |
|
|
.IX Item "-falign-loops=n"
|
6429 |
|
|
.PD
|
6430 |
|
|
Align loops to a power-of-two boundary, skipping up to \fIn\fR bytes
|
6431 |
|
|
like \fB\-falign\-functions\fR. The hope is that the loop will be
|
6432 |
|
|
executed many times, which will make up for any execution of the dummy
|
6433 |
|
|
operations.
|
6434 |
|
|
.Sp
|
6435 |
|
|
\&\fB\-fno\-align\-loops\fR and \fB\-falign\-loops=1\fR are
|
6436 |
|
|
equivalent and mean that loops will not be aligned.
|
6437 |
|
|
.Sp
|
6438 |
|
|
If \fIn\fR is not specified or is zero, use a machine-dependent default.
|
6439 |
|
|
.Sp
|
6440 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR.
|
6441 |
|
|
.IP "\fB\-falign\-jumps\fR" 4
|
6442 |
|
|
.IX Item "-falign-jumps"
|
6443 |
|
|
.PD 0
|
6444 |
|
|
.IP "\fB\-falign\-jumps=\fR\fIn\fR" 4
|
6445 |
|
|
.IX Item "-falign-jumps=n"
|
6446 |
|
|
.PD
|
6447 |
|
|
Align branch targets to a power-of-two boundary, for branch targets
|
6448 |
|
|
where the targets can only be reached by jumping, skipping up to \fIn\fR
|
6449 |
|
|
bytes like \fB\-falign\-functions\fR. In this case, no dummy operations
|
6450 |
|
|
need be executed.
|
6451 |
|
|
.Sp
|
6452 |
|
|
\&\fB\-fno\-align\-jumps\fR and \fB\-falign\-jumps=1\fR are
|
6453 |
|
|
equivalent and mean that loops will not be aligned.
|
6454 |
|
|
.Sp
|
6455 |
|
|
If \fIn\fR is not specified or is zero, use a machine-dependent default.
|
6456 |
|
|
.Sp
|
6457 |
|
|
Enabled at levels \fB\-O2\fR, \fB\-O3\fR.
|
6458 |
|
|
.IP "\fB\-funit\-at\-a\-time\fR" 4
|
6459 |
|
|
.IX Item "-funit-at-a-time"
|
6460 |
|
|
This option is left for compatibility reasons. \fB\-funit\-at\-a\-time\fR
|
6461 |
|
|
has no effect, while \fB\-fno\-unit\-at\-a\-time\fR implies
|
6462 |
|
|
\&\fB\-fno\-toplevel\-reorder\fR and \fB\-fno\-section\-anchors\fR.
|
6463 |
|
|
.Sp
|
6464 |
|
|
Enabled by default.
|
6465 |
|
|
.IP "\fB\-fno\-toplevel\-reorder\fR" 4
|
6466 |
|
|
.IX Item "-fno-toplevel-reorder"
|
6467 |
|
|
Do not reorder top-level functions, variables, and \f(CW\*(C`asm\*(C'\fR
|
6468 |
|
|
statements. Output them in the same order that they appear in the
|
6469 |
|
|
input file. When this option is used, unreferenced static variables
|
6470 |
|
|
will not be removed. This option is intended to support existing code
|
6471 |
|
|
which relies on a particular ordering. For new code, it is better to
|
6472 |
|
|
use attributes.
|
6473 |
|
|
.Sp
|
6474 |
|
|
Enabled at level \fB\-O0\fR. When disabled explicitly, it also imply
|
6475 |
|
|
\&\fB\-fno\-section\-anchors\fR that is otherwise enabled at \fB\-O0\fR on some
|
6476 |
|
|
targets.
|
6477 |
|
|
.IP "\fB\-fweb\fR" 4
|
6478 |
|
|
.IX Item "-fweb"
|
6479 |
|
|
Constructs webs as commonly used for register allocation purposes and assign
|
6480 |
|
|
each web individual pseudo register. This allows the register allocation pass
|
6481 |
|
|
to operate on pseudos directly, but also strengthens several other optimization
|
6482 |
|
|
passes, such as \s-1CSE\s0, loop optimizer and trivial dead code remover. It can,
|
6483 |
|
|
however, make debugging impossible, since variables will no longer stay in a
|
6484 |
|
|
\&\*(L"home register\*(R".
|
6485 |
|
|
.Sp
|
6486 |
|
|
Enabled by default with \fB\-funroll\-loops\fR.
|
6487 |
|
|
.IP "\fB\-fwhole\-program\fR" 4
|
6488 |
|
|
.IX Item "-fwhole-program"
|
6489 |
|
|
Assume that the current compilation unit represents the whole program being
|
6490 |
|
|
compiled. All public functions and variables with the exception of \f(CW\*(C`main\*(C'\fR
|
6491 |
|
|
and those merged by attribute \f(CW\*(C`externally_visible\*(C'\fR become static functions
|
6492 |
|
|
and in effect are optimized more aggressively by interprocedural optimizers.
|
6493 |
|
|
While this option is equivalent to proper use of the \f(CW\*(C`static\*(C'\fR keyword for
|
6494 |
|
|
programs consisting of a single file, in combination with option
|
6495 |
|
|
\&\fB\-combine\fR, \fB\-flto\fR or \fB\-fwhopr\fR this flag can be used to
|
6496 |
|
|
compile many smaller scale programs since the functions and variables become
|
6497 |
|
|
local for the whole combined compilation unit, not for the single source file
|
6498 |
|
|
itself.
|
6499 |
|
|
.Sp
|
6500 |
|
|
This option implies \fB\-fwhole\-file\fR for Fortran programs.
|
6501 |
|
|
.IP "\fB\-flto\fR" 4
|
6502 |
|
|
.IX Item "-flto"
|
6503 |
|
|
This option runs the standard link-time optimizer. When invoked
|
6504 |
|
|
with source code, it generates \s-1GIMPLE\s0 (one of \s-1GCC\s0's internal
|
6505 |
|
|
representations) and writes it to special \s-1ELF\s0 sections in the object
|
6506 |
|
|
file. When the object files are linked together, all the function
|
6507 |
|
|
bodies are read from these \s-1ELF\s0 sections and instantiated as if they
|
6508 |
|
|
had been part of the same translation unit.
|
6509 |
|
|
.Sp
|
6510 |
|
|
To use the link-timer optimizer, \fB\-flto\fR needs to be specified at
|
6511 |
|
|
compile time and during the final link. For example,
|
6512 |
|
|
.Sp
|
6513 |
|
|
.Vb 3
|
6514 |
|
|
\& gcc \-c \-O2 \-flto foo.c
|
6515 |
|
|
\& gcc \-c \-O2 \-flto bar.c
|
6516 |
|
|
\& gcc \-o myprog \-flto \-O2 foo.o bar.o
|
6517 |
|
|
.Ve
|
6518 |
|
|
.Sp
|
6519 |
|
|
The first two invocations to \s-1GCC\s0 will save a bytecode representation
|
6520 |
|
|
of \s-1GIMPLE\s0 into special \s-1ELF\s0 sections inside \fIfoo.o\fR and
|
6521 |
|
|
\&\fIbar.o\fR. The final invocation will read the \s-1GIMPLE\s0 bytecode from
|
6522 |
|
|
\&\fIfoo.o\fR and \fIbar.o\fR, merge the two files into a single
|
6523 |
|
|
internal image, and compile the result as usual. Since both
|
6524 |
|
|
\&\fIfoo.o\fR and \fIbar.o\fR are merged into a single image, this
|
6525 |
|
|
causes all the inter-procedural analyses and optimizations in \s-1GCC\s0 to
|
6526 |
|
|
work across the two files as if they were a single one. This means,
|
6527 |
|
|
for example, that the inliner will be able to inline functions in
|
6528 |
|
|
\&\fIbar.o\fR into functions in \fIfoo.o\fR and vice-versa.
|
6529 |
|
|
.Sp
|
6530 |
|
|
Another (simpler) way to enable link-time optimization is,
|
6531 |
|
|
.Sp
|
6532 |
|
|
.Vb 1
|
6533 |
|
|
\& gcc \-o myprog \-flto \-O2 foo.c bar.c
|
6534 |
|
|
.Ve
|
6535 |
|
|
.Sp
|
6536 |
|
|
The above will generate bytecode for \fIfoo.c\fR and \fIbar.c\fR,
|
6537 |
|
|
merge them together into a single \s-1GIMPLE\s0 representation and optimize
|
6538 |
|
|
them as usual to produce \fImyprog\fR.
|
6539 |
|
|
.Sp
|
6540 |
|
|
The only important thing to keep in mind is that to enable link-time
|
6541 |
|
|
optimizations the \fB\-flto\fR flag needs to be passed to both the
|
6542 |
|
|
compile and the link commands.
|
6543 |
|
|
.Sp
|
6544 |
|
|
Note that when a file is compiled with \fB\-flto\fR, the generated
|
6545 |
|
|
object file will be larger than a regular object file because it will
|
6546 |
|
|
contain \s-1GIMPLE\s0 bytecodes and the usual final code. This means that
|
6547 |
|
|
object files with \s-1LTO\s0 information can be linked as a normal object
|
6548 |
|
|
file. So, in the previous example, if the final link is done with
|
6549 |
|
|
.Sp
|
6550 |
|
|
.Vb 1
|
6551 |
|
|
\& gcc \-o myprog foo.o bar.o
|
6552 |
|
|
.Ve
|
6553 |
|
|
.Sp
|
6554 |
|
|
The only difference will be that no inter-procedural optimizations
|
6555 |
|
|
will be applied to produce \fImyprog\fR. The two object files
|
6556 |
|
|
\&\fIfoo.o\fR and \fIbar.o\fR will be simply sent to the regular
|
6557 |
|
|
linker.
|
6558 |
|
|
.Sp
|
6559 |
|
|
Additionally, the optimization flags used to compile individual files
|
6560 |
|
|
are not necessarily related to those used at link-time. For instance,
|
6561 |
|
|
.Sp
|
6562 |
|
|
.Vb 3
|
6563 |
|
|
\& gcc \-c \-O0 \-flto foo.c
|
6564 |
|
|
\& gcc \-c \-O0 \-flto bar.c
|
6565 |
|
|
\& gcc \-o myprog \-flto \-O3 foo.o bar.o
|
6566 |
|
|
.Ve
|
6567 |
|
|
.Sp
|
6568 |
|
|
This will produce individual object files with unoptimized assembler
|
6569 |
|
|
code, but the resulting binary \fImyprog\fR will be optimized at
|
6570 |
|
|
\&\fB\-O3\fR. Now, if the final binary is generated without
|
6571 |
|
|
\&\fB\-flto\fR, then \fImyprog\fR will not be optimized.
|
6572 |
|
|
.Sp
|
6573 |
|
|
When producing the final binary with \fB\-flto\fR, \s-1GCC\s0 will only
|
6574 |
|
|
apply link-time optimizations to those files that contain bytecode.
|
6575 |
|
|
Therefore, you can mix and match object files and libraries with
|
6576 |
|
|
\&\s-1GIMPLE\s0 bytecodes and final object code. \s-1GCC\s0 will automatically select
|
6577 |
|
|
which files to optimize in \s-1LTO\s0 mode and which files to link without
|
6578 |
|
|
further processing.
|
6579 |
|
|
.Sp
|
6580 |
|
|
There are some code generation flags that \s-1GCC\s0 will preserve when
|
6581 |
|
|
generating bytecodes, as they need to be used during the final link
|
6582 |
|
|
stage. Currently, the following options are saved into the \s-1GIMPLE\s0
|
6583 |
|
|
bytecode files: \fB\-fPIC\fR, \fB\-fcommon\fR and all the
|
6584 |
|
|
\&\fB\-m\fR target flags.
|
6585 |
|
|
.Sp
|
6586 |
|
|
At link time, these options are read-in and reapplied. Note that the
|
6587 |
|
|
current implementation makes no attempt at recognizing conflicting
|
6588 |
|
|
values for these options. If two or more files have a conflicting
|
6589 |
|
|
value (e.g., one file is compiled with \fB\-fPIC\fR and another
|
6590 |
|
|
isn't), the compiler will simply use the last value read from the
|
6591 |
|
|
bytecode files. It is recommended, then, that all the files
|
6592 |
|
|
participating in the same link be compiled with the same options.
|
6593 |
|
|
.Sp
|
6594 |
|
|
Another feature of \s-1LTO\s0 is that it is possible to apply interprocedural
|
6595 |
|
|
optimizations on files written in different languages. This requires
|
6596 |
|
|
some support in the language front end. Currently, the C, \*(C+ and
|
6597 |
|
|
Fortran front ends are capable of emitting \s-1GIMPLE\s0 bytecodes, so
|
6598 |
|
|
something like this should work
|
6599 |
|
|
.Sp
|
6600 |
|
|
.Vb 4
|
6601 |
|
|
\& gcc \-c \-flto foo.c
|
6602 |
|
|
\& g++ \-c \-flto bar.cc
|
6603 |
|
|
\& gfortran \-c \-flto baz.f90
|
6604 |
|
|
\& g++ \-o myprog \-flto \-O3 foo.o bar.o baz.o \-lgfortran
|
6605 |
|
|
.Ve
|
6606 |
|
|
.Sp
|
6607 |
|
|
Notice that the final link is done with \fBg++\fR to get the \*(C+
|
6608 |
|
|
runtime libraries and \fB\-lgfortran\fR is added to get the Fortran
|
6609 |
|
|
runtime libraries. In general, when mixing languages in \s-1LTO\s0 mode, you
|
6610 |
|
|
should use the same link command used when mixing languages in a
|
6611 |
|
|
regular (non-LTO) compilation. This means that if your build process
|
6612 |
|
|
was mixing languages before, all you need to add is \fB\-flto\fR to
|
6613 |
|
|
all the compile and link commands.
|
6614 |
|
|
.Sp
|
6615 |
|
|
If \s-1LTO\s0 encounters objects with C linkage declared with incompatible
|
6616 |
|
|
types in separate translation units to be linked together (undefined
|
6617 |
|
|
behavior according to \s-1ISO\s0 C99 6.2.7), a non-fatal diagnostic may be
|
6618 |
|
|
issued. The behavior is still undefined at runtime.
|
6619 |
|
|
.Sp
|
6620 |
|
|
If object files containing \s-1GIMPLE\s0 bytecode are stored in a library
|
6621 |
|
|
archive, say \fIlibfoo.a\fR, it is possible to extract and use them
|
6622 |
|
|
in an \s-1LTO\s0 link if you are using \fBgold\fR as the linker (which,
|
6623 |
|
|
in turn requires \s-1GCC\s0 to be configured with \fB\-\-enable\-gold\fR).
|
6624 |
|
|
To enable this feature, use the flag \fB\-fuse\-linker\-plugin\fR at
|
6625 |
|
|
link-time:
|
6626 |
|
|
.Sp
|
6627 |
|
|
.Vb 1
|
6628 |
|
|
\& gcc \-o myprog \-O2 \-flto \-fuse\-linker\-plugin a.o b.o \-lfoo
|
6629 |
|
|
.Ve
|
6630 |
|
|
.Sp
|
6631 |
|
|
With the linker plugin enabled, \fBgold\fR will extract the needed
|
6632 |
|
|
\&\s-1GIMPLE\s0 files from \fIlibfoo.a\fR and pass them on to the running \s-1GCC\s0
|
6633 |
|
|
to make them part of the aggregated \s-1GIMPLE\s0 image to be optimized.
|
6634 |
|
|
.Sp
|
6635 |
|
|
If you are not using \fBgold\fR and/or do not specify
|
6636 |
|
|
\&\fB\-fuse\-linker\-plugin\fR then the objects inside \fIlibfoo.a\fR
|
6637 |
|
|
will be extracted and linked as usual, but they will not participate
|
6638 |
|
|
in the \s-1LTO\s0 optimization process.
|
6639 |
|
|
.Sp
|
6640 |
|
|
Link time optimizations do not require the presence of the whole
|
6641 |
|
|
program to operate. If the program does not require any symbols to
|
6642 |
|
|
be exported, it is possible to combine \fB\-flto\fR and
|
6643 |
|
|
\&\fB\-fwhopr\fR with \fB\-fwhole\-program\fR to allow the
|
6644 |
|
|
interprocedural optimizers to use more aggressive assumptions which
|
6645 |
|
|
may lead to improved optimization opportunities.
|
6646 |
|
|
.Sp
|
6647 |
|
|
Regarding portability: the current implementation of \s-1LTO\s0 makes no
|
6648 |
|
|
attempt at generating bytecode that can be ported between different
|
6649 |
|
|
types of hosts. The bytecode files are versioned and there is a
|
6650 |
|
|
strict version check, so bytecode files generated in one version of
|
6651 |
|
|
\&\s-1GCC\s0 will not work with an older/newer version of \s-1GCC\s0.
|
6652 |
|
|
.Sp
|
6653 |
|
|
Link time optimization does not play well with generating debugging
|
6654 |
|
|
information. Combining \fB\-flto\fR or \fB\-fwhopr\fR with
|
6655 |
|
|
\&\fB\-g\fR is experimental.
|
6656 |
|
|
.Sp
|
6657 |
|
|
This option is disabled by default.
|
6658 |
|
|
.IP "\fB\-fwhopr\fR" 4
|
6659 |
|
|
.IX Item "-fwhopr"
|
6660 |
|
|
This option is identical in functionality to \fB\-flto\fR but it
|
6661 |
|
|
differs in how the final link stage is executed. Instead of loading
|
6662 |
|
|
all the function bodies in memory, the callgraph is analyzed and
|
6663 |
|
|
optimization decisions are made (whole program analysis or \s-1WPA\s0). Once
|
6664 |
|
|
optimization decisions are made, the callgraph is partitioned and the
|
6665 |
|
|
different sections are compiled separately (local transformations or
|
6666 |
|
|
\&\s-1LTRANS\s0). This process allows optimizations on very large programs
|
6667 |
|
|
that otherwise would not fit in memory. This option enables
|
6668 |
|
|
\&\fB\-fwpa\fR and \fB\-fltrans\fR automatically.
|
6669 |
|
|
.Sp
|
6670 |
|
|
Disabled by default.
|
6671 |
|
|
.Sp
|
6672 |
|
|
This option is experimental.
|
6673 |
|
|
.IP "\fB\-fwpa\fR" 4
|
6674 |
|
|
.IX Item "-fwpa"
|
6675 |
|
|
This is an internal option used by \s-1GCC\s0 when compiling with
|
6676 |
|
|
\&\fB\-fwhopr\fR. You should never need to use it.
|
6677 |
|
|
.Sp
|
6678 |
|
|
This option runs the link-time optimizer in the whole-program-analysis
|
6679 |
|
|
(\s-1WPA\s0) mode, which reads in summary information from all inputs and
|
6680 |
|
|
performs a whole-program analysis based on summary information only.
|
6681 |
|
|
It generates object files for subsequent runs of the link-time
|
6682 |
|
|
optimizer where individual object files are optimized using both
|
6683 |
|
|
summary information from the \s-1WPA\s0 mode and the actual function bodies.
|
6684 |
|
|
It then drives the \s-1LTRANS\s0 phase.
|
6685 |
|
|
.Sp
|
6686 |
|
|
Disabled by default.
|
6687 |
|
|
.IP "\fB\-fltrans\fR" 4
|
6688 |
|
|
.IX Item "-fltrans"
|
6689 |
|
|
This is an internal option used by \s-1GCC\s0 when compiling with
|
6690 |
|
|
\&\fB\-fwhopr\fR. You should never need to use it.
|
6691 |
|
|
.Sp
|
6692 |
|
|
This option runs the link-time optimizer in the local-transformation (\s-1LTRANS\s0)
|
6693 |
|
|
mode, which reads in output from a previous run of the \s-1LTO\s0 in \s-1WPA\s0 mode.
|
6694 |
|
|
In the \s-1LTRANS\s0 mode, \s-1LTO\s0 optimizes an object and produces the final assembly.
|
6695 |
|
|
.Sp
|
6696 |
|
|
Disabled by default.
|
6697 |
|
|
.IP "\fB\-fltrans\-output\-list=\fR\fIfile\fR" 4
|
6698 |
|
|
.IX Item "-fltrans-output-list=file"
|
6699 |
|
|
This is an internal option used by \s-1GCC\s0 when compiling with
|
6700 |
|
|
\&\fB\-fwhopr\fR. You should never need to use it.
|
6701 |
|
|
.Sp
|
6702 |
|
|
This option specifies a file to which the names of \s-1LTRANS\s0 output files are
|
6703 |
|
|
written. This option is only meaningful in conjunction with \fB\-fwpa\fR.
|
6704 |
|
|
.Sp
|
6705 |
|
|
Disabled by default.
|
6706 |
|
|
.IP "\fB\-flto\-compression\-level=\fR\fIn\fR" 4
|
6707 |
|
|
.IX Item "-flto-compression-level=n"
|
6708 |
|
|
This option specifies the level of compression used for intermediate
|
6709 |
|
|
language written to \s-1LTO\s0 object files, and is only meaningful in
|
6710 |
|
|
conjunction with \s-1LTO\s0 mode (\fB\-fwhopr\fR, \fB\-flto\fR). Valid
|
6711 |
|
|
values are 0 (no compression) to 9 (maximum compression). Values
|
6712 |
|
|
outside this range are clamped to either 0 or 9. If the option is not
|
6713 |
|
|
given, a default balanced compression setting is used.
|
6714 |
|
|
.IP "\fB\-flto\-report\fR" 4
|
6715 |
|
|
.IX Item "-flto-report"
|
6716 |
|
|
Prints a report with internal details on the workings of the link-time
|
6717 |
|
|
optimizer. The contents of this report vary from version to version,
|
6718 |
|
|
it is meant to be useful to \s-1GCC\s0 developers when processing object
|
6719 |
|
|
files in \s-1LTO\s0 mode (via \fB\-fwhopr\fR or \fB\-flto\fR).
|
6720 |
|
|
.Sp
|
6721 |
|
|
Disabled by default.
|
6722 |
|
|
.IP "\fB\-fuse\-linker\-plugin\fR" 4
|
6723 |
|
|
.IX Item "-fuse-linker-plugin"
|
6724 |
|
|
Enables the extraction of objects with \s-1GIMPLE\s0 bytecode information
|
6725 |
|
|
from library archives. This option relies on features available only
|
6726 |
|
|
in \fBgold\fR, so to use this you must configure \s-1GCC\s0 with
|
6727 |
|
|
\&\fB\-\-enable\-gold\fR. See \fB\-flto\fR for a description on the
|
6728 |
|
|
effect of this flag and how to use it.
|
6729 |
|
|
.Sp
|
6730 |
|
|
Disabled by default.
|
6731 |
|
|
.IP "\fB\-fcprop\-registers\fR" 4
|
6732 |
|
|
.IX Item "-fcprop-registers"
|
6733 |
|
|
After register allocation and post-register allocation instruction splitting,
|
6734 |
|
|
we perform a copy-propagation pass to try to reduce scheduling dependencies
|
6735 |
|
|
and occasionally eliminate the copy.
|
6736 |
|
|
.Sp
|
6737 |
|
|
Enabled at levels \fB\-O\fR, \fB\-O2\fR, \fB\-O3\fR, \fB\-Os\fR.
|
6738 |
|
|
.IP "\fB\-fprofile\-correction\fR" 4
|
6739 |
|
|
.IX Item "-fprofile-correction"
|
6740 |
|
|
Profiles collected using an instrumented binary for multi-threaded programs may
|
6741 |
|
|
be inconsistent due to missed counter updates. When this option is specified,
|
6742 |
|
|
\&\s-1GCC\s0 will use heuristics to correct or smooth out such inconsistencies. By
|
6743 |
|
|
default, \s-1GCC\s0 will emit an error message when an inconsistent profile is detected.
|
6744 |
|
|
.IP "\fB\-fprofile\-dir=\fR\fIpath\fR" 4
|
6745 |
|
|
.IX Item "-fprofile-dir=path"
|
6746 |
|
|
Set the directory to search the profile data files in to \fIpath\fR.
|
6747 |
|
|
This option affects only the profile data generated by
|
6748 |
|
|
\&\fB\-fprofile\-generate\fR, \fB\-ftest\-coverage\fR, \fB\-fprofile\-arcs\fR
|
6749 |
|
|
and used by \fB\-fprofile\-use\fR and \fB\-fbranch\-probabilities\fR
|
6750 |
|
|
and its related options.
|
6751 |
|
|
By default, \s-1GCC\s0 will use the current directory as \fIpath\fR
|
6752 |
|
|
thus the profile data file will appear in the same directory as the object file.
|
6753 |
|
|
.IP "\fB\-fprofile\-generate\fR" 4
|
6754 |
|
|
.IX Item "-fprofile-generate"
|
6755 |
|
|
.PD 0
|
6756 |
|
|
.IP "\fB\-fprofile\-generate=\fR\fIpath\fR" 4
|
6757 |
|
|
.IX Item "-fprofile-generate=path"
|
6758 |
|
|
.PD
|
6759 |
|
|
Enable options usually used for instrumenting application to produce
|
6760 |
|
|
profile useful for later recompilation with profile feedback based
|
6761 |
|
|
optimization. You must use \fB\-fprofile\-generate\fR both when
|
6762 |
|
|
compiling and when linking your program.
|
6763 |
|
|
.Sp
|
6764 |
|
|
The following options are enabled: \f(CW\*(C`\-fprofile\-arcs\*(C'\fR, \f(CW\*(C`\-fprofile\-values\*(C'\fR, \f(CW\*(C`\-fvpt\*(C'\fR.
|
6765 |
|
|
.Sp
|
6766 |
|
|
If \fIpath\fR is specified, \s-1GCC\s0 will look at the \fIpath\fR to find
|
6767 |
|
|
the profile feedback data files. See \fB\-fprofile\-dir\fR.
|
6768 |
|
|
.IP "\fB\-fprofile\-use\fR" 4
|
6769 |
|
|
.IX Item "-fprofile-use"
|
6770 |
|
|
.PD 0
|
6771 |
|
|
.IP "\fB\-fprofile\-use=\fR\fIpath\fR" 4
|
6772 |
|
|
.IX Item "-fprofile-use=path"
|
6773 |
|
|
.PD
|
6774 |
|
|
Enable profile feedback directed optimizations, and optimizations
|
6775 |
|
|
generally profitable only with profile feedback available.
|
6776 |
|
|
.Sp
|
6777 |
|
|
The following options are enabled: \f(CW\*(C`\-fbranch\-probabilities\*(C'\fR, \f(CW\*(C`\-fvpt\*(C'\fR,
|
6778 |
|
|
\&\f(CW\*(C`\-funroll\-loops\*(C'\fR, \f(CW\*(C`\-fpeel\-loops\*(C'\fR, \f(CW\*(C`\-ftracer\*(C'\fR
|
6779 |
|
|
.Sp
|
6780 |
|
|
By default, \s-1GCC\s0 emits an error message if the feedback profiles do not
|
6781 |
|
|
match the source code. This error can be turned into a warning by using
|
6782 |
|
|
\&\fB\-Wcoverage\-mismatch\fR. Note this may result in poorly optimized
|
6783 |
|
|
code.
|
6784 |
|
|
.Sp
|
6785 |
|
|
If \fIpath\fR is specified, \s-1GCC\s0 will look at the \fIpath\fR to find
|
6786 |
|
|
the profile feedback data files. See \fB\-fprofile\-dir\fR.
|
6787 |
|
|
.PP
|
6788 |
|
|
The following options control compiler behavior regarding floating
|
6789 |
|
|
point arithmetic. These options trade off between speed and
|
6790 |
|
|
correctness. All must be specifically enabled.
|
6791 |
|
|
.IP "\fB\-ffloat\-store\fR" 4
|
6792 |
|
|
.IX Item "-ffloat-store"
|
6793 |
|
|
Do not store floating point variables in registers, and inhibit other
|
6794 |
|
|
options that might change whether a floating point value is taken from a
|
6795 |
|
|
register or memory.
|
6796 |
|
|
.Sp
|
6797 |
|
|
This option prevents undesirable excess precision on machines such as
|
6798 |
|
|
the 68000 where the floating registers (of the 68881) keep more
|
6799 |
|
|
precision than a \f(CW\*(C`double\*(C'\fR is supposed to have. Similarly for the
|
6800 |
|
|
x86 architecture. For most programs, the excess precision does only
|
6801 |
|
|
good, but a few programs rely on the precise definition of \s-1IEEE\s0 floating
|
6802 |
|
|
point. Use \fB\-ffloat\-store\fR for such programs, after modifying
|
6803 |
|
|
them to store all pertinent intermediate computations into variables.
|
6804 |
|
|
.IP "\fB\-fexcess\-precision=\fR\fIstyle\fR" 4
|
6805 |
|
|
.IX Item "-fexcess-precision=style"
|
6806 |
|
|
This option allows further control over excess precision on machines
|
6807 |
|
|
where floating-point registers have more precision than the \s-1IEEE\s0
|
6808 |
|
|
\&\f(CW\*(C`float\*(C'\fR and \f(CW\*(C`double\*(C'\fR types and the processor does not
|
6809 |
|
|
support operations rounding to those types. By default,
|
6810 |
|
|
\&\fB\-fexcess\-precision=fast\fR is in effect; this means that
|
6811 |
|
|
operations are carried out in the precision of the registers and that
|
6812 |
|
|
it is unpredictable when rounding to the types specified in the source
|
6813 |
|
|
code takes place. When compiling C, if
|
6814 |
|
|
\&\fB\-fexcess\-precision=standard\fR is specified then excess
|
6815 |
|
|
precision will follow the rules specified in \s-1ISO\s0 C99; in particular,
|
6816 |
|
|
both casts and assignments cause values to be rounded to their
|
6817 |
|
|
semantic types (whereas \fB\-ffloat\-store\fR only affects
|
6818 |
|
|
assignments). This option is enabled by default for C if a strict
|
6819 |
|
|
conformance option such as \fB\-std=c99\fR is used.
|
6820 |
|
|
.Sp
|
6821 |
|
|
\&\fB\-fexcess\-precision=standard\fR is not implemented for languages
|
6822 |
|
|
other than C, and has no effect if
|
6823 |
|
|
\&\fB\-funsafe\-math\-optimizations\fR or \fB\-ffast\-math\fR is
|
6824 |
|
|
specified. On the x86, it also has no effect if \fB\-mfpmath=sse\fR
|
6825 |
|
|
or \fB\-mfpmath=sse+387\fR is specified; in the former case, \s-1IEEE\s0
|
6826 |
|
|
semantics apply without excess precision, and in the latter, rounding
|
6827 |
|
|
is unpredictable.
|
6828 |
|
|
.IP "\fB\-ffast\-math\fR" 4
|
6829 |
|
|
.IX Item "-ffast-math"
|
6830 |
|
|
Sets \fB\-fno\-math\-errno\fR, \fB\-funsafe\-math\-optimizations\fR,
|
6831 |
|
|
\&\fB\-ffinite\-math\-only\fR, \fB\-fno\-rounding\-math\fR,
|
6832 |
|
|
\&\fB\-fno\-signaling\-nans\fR and \fB\-fcx\-limited\-range\fR.
|
6833 |
|
|
.Sp
|
6834 |
|
|
This option causes the preprocessor macro \f(CW\*(C`_\|_FAST_MATH_\|_\*(C'\fR to be defined.
|
6835 |
|
|
.Sp
|
6836 |
|
|
This option is not turned on by any \fB\-O\fR option since
|
6837 |
|
|
it can result in incorrect output for programs which depend on
|
6838 |
|
|
an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications for
|
6839 |
|
|
math functions. It may, however, yield faster code for programs
|
6840 |
|
|
that do not require the guarantees of these specifications.
|
6841 |
|
|
.IP "\fB\-fno\-math\-errno\fR" 4
|
6842 |
|
|
.IX Item "-fno-math-errno"
|
6843 |
|
|
Do not set \s-1ERRNO\s0 after calling math functions that are executed
|
6844 |
|
|
with a single instruction, e.g., sqrt. A program that relies on
|
6845 |
|
|
\&\s-1IEEE\s0 exceptions for math error handling may want to use this flag
|
6846 |
|
|
for speed while maintaining \s-1IEEE\s0 arithmetic compatibility.
|
6847 |
|
|
.Sp
|
6848 |
|
|
This option is not turned on by any \fB\-O\fR option since
|
6849 |
|
|
it can result in incorrect output for programs which depend on
|
6850 |
|
|
an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications for
|
6851 |
|
|
math functions. It may, however, yield faster code for programs
|
6852 |
|
|
that do not require the guarantees of these specifications.
|
6853 |
|
|
.Sp
|
6854 |
|
|
The default is \fB\-fmath\-errno\fR.
|
6855 |
|
|
.Sp
|
6856 |
|
|
On Darwin systems, the math library never sets \f(CW\*(C`errno\*(C'\fR. There is
|
6857 |
|
|
therefore no reason for the compiler to consider the possibility that
|
6858 |
|
|
it might, and \fB\-fno\-math\-errno\fR is the default.
|
6859 |
|
|
.IP "\fB\-funsafe\-math\-optimizations\fR" 4
|
6860 |
|
|
.IX Item "-funsafe-math-optimizations"
|
6861 |
|
|
Allow optimizations for floating-point arithmetic that (a) assume
|
6862 |
|
|
that arguments and results are valid and (b) may violate \s-1IEEE\s0 or
|
6863 |
|
|
\&\s-1ANSI\s0 standards. When used at link-time, it may include libraries
|
6864 |
|
|
or startup files that change the default \s-1FPU\s0 control word or other
|
6865 |
|
|
similar optimizations.
|
6866 |
|
|
.Sp
|
6867 |
|
|
This option is not turned on by any \fB\-O\fR option since
|
6868 |
|
|
it can result in incorrect output for programs which depend on
|
6869 |
|
|
an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications for
|
6870 |
|
|
math functions. It may, however, yield faster code for programs
|
6871 |
|
|
that do not require the guarantees of these specifications.
|
6872 |
|
|
Enables \fB\-fno\-signed\-zeros\fR, \fB\-fno\-trapping\-math\fR,
|
6873 |
|
|
\&\fB\-fassociative\-math\fR and \fB\-freciprocal\-math\fR.
|
6874 |
|
|
.Sp
|
6875 |
|
|
The default is \fB\-fno\-unsafe\-math\-optimizations\fR.
|
6876 |
|
|
.IP "\fB\-fassociative\-math\fR" 4
|
6877 |
|
|
.IX Item "-fassociative-math"
|
6878 |
|
|
Allow re-association of operands in series of floating-point operations.
|
6879 |
|
|
This violates the \s-1ISO\s0 C and \*(C+ language standard by possibly changing
|
6880 |
|
|
computation result. \s-1NOTE:\s0 re-ordering may change the sign of zero as
|
6881 |
|
|
well as ignore NaNs and inhibit or create underflow or overflow (and
|
6882 |
|
|
thus cannot be used on a code which relies on rounding behavior like
|
6883 |
|
|
\&\f(CW\*(C`(x + 2**52) \- 2**52)\*(C'\fR. May also reorder floating-point comparisons
|
6884 |
|
|
and thus may not be used when ordered comparisons are required.
|
6885 |
|
|
This option requires that both \fB\-fno\-signed\-zeros\fR and
|
6886 |
|
|
\&\fB\-fno\-trapping\-math\fR be in effect. Moreover, it doesn't make
|
6887 |
|
|
much sense with \fB\-frounding\-math\fR. For Fortran the option
|
6888 |
|
|
is automatically enabled when both \fB\-fno\-signed\-zeros\fR and
|
6889 |
|
|
\&\fB\-fno\-trapping\-math\fR are in effect.
|
6890 |
|
|
.Sp
|
6891 |
|
|
The default is \fB\-fno\-associative\-math\fR.
|
6892 |
|
|
.IP "\fB\-freciprocal\-math\fR" 4
|
6893 |
|
|
.IX Item "-freciprocal-math"
|
6894 |
|
|
Allow the reciprocal of a value to be used instead of dividing by
|
6895 |
|
|
the value if this enables optimizations. For example \f(CW\*(C`x / y\*(C'\fR
|
6896 |
|
|
can be replaced with \f(CW\*(C`x * (1/y)\*(C'\fR which is useful if \f(CW\*(C`(1/y)\*(C'\fR
|
6897 |
|
|
is subject to common subexpression elimination. Note that this loses
|
6898 |
|
|
precision and increases the number of flops operating on the value.
|
6899 |
|
|
.Sp
|
6900 |
|
|
The default is \fB\-fno\-reciprocal\-math\fR.
|
6901 |
|
|
.IP "\fB\-ffinite\-math\-only\fR" 4
|
6902 |
|
|
.IX Item "-ffinite-math-only"
|
6903 |
|
|
Allow optimizations for floating-point arithmetic that assume
|
6904 |
|
|
that arguments and results are not NaNs or +\-Infs.
|
6905 |
|
|
.Sp
|
6906 |
|
|
This option is not turned on by any \fB\-O\fR option since
|
6907 |
|
|
it can result in incorrect output for programs which depend on
|
6908 |
|
|
an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications for
|
6909 |
|
|
math functions. It may, however, yield faster code for programs
|
6910 |
|
|
that do not require the guarantees of these specifications.
|
6911 |
|
|
.Sp
|
6912 |
|
|
The default is \fB\-fno\-finite\-math\-only\fR.
|
6913 |
|
|
.IP "\fB\-fno\-signed\-zeros\fR" 4
|
6914 |
|
|
.IX Item "-fno-signed-zeros"
|
6915 |
|
|
Allow optimizations for floating point arithmetic that ignore the
|
6916 |
|
|
signedness of zero. \s-1IEEE\s0 arithmetic specifies the behavior of
|
6917 |
|
|
distinct +0.0 and \-0.0 values, which then prohibits simplification
|
6918 |
|
|
of expressions such as x+0.0 or 0.0*x (even with \fB\-ffinite\-math\-only\fR).
|
6919 |
|
|
This option implies that the sign of a zero result isn't significant.
|
6920 |
|
|
.Sp
|
6921 |
|
|
The default is \fB\-fsigned\-zeros\fR.
|
6922 |
|
|
.IP "\fB\-fno\-trapping\-math\fR" 4
|
6923 |
|
|
.IX Item "-fno-trapping-math"
|
6924 |
|
|
Compile code assuming that floating-point operations cannot generate
|
6925 |
|
|
user-visible traps. These traps include division by zero, overflow,
|
6926 |
|
|
underflow, inexact result and invalid operation. This option requires
|
6927 |
|
|
that \fB\-fno\-signaling\-nans\fR be in effect. Setting this option may
|
6928 |
|
|
allow faster code if one relies on \*(L"non-stop\*(R" \s-1IEEE\s0 arithmetic, for example.
|
6929 |
|
|
.Sp
|
6930 |
|
|
This option should never be turned on by any \fB\-O\fR option since
|
6931 |
|
|
it can result in incorrect output for programs which depend on
|
6932 |
|
|
an exact implementation of \s-1IEEE\s0 or \s-1ISO\s0 rules/specifications for
|
6933 |
|
|
math functions.
|
6934 |
|
|
.Sp
|
6935 |
|
|
The default is \fB\-ftrapping\-math\fR.
|
6936 |
|
|
.IP "\fB\-frounding\-math\fR" 4
|
6937 |
|
|
.IX Item "-frounding-math"
|
6938 |
|
|
Disable transformations and optimizations that assume default floating
|
6939 |
|
|
point rounding behavior. This is round-to-zero for all floating point
|
6940 |
|
|
to integer conversions, and round-to-nearest for all other arithmetic
|
6941 |
|
|
truncations. This option should be specified for programs that change
|
6942 |
|
|
the \s-1FP\s0 rounding mode dynamically, or that may be executed with a
|
6943 |
|
|
non-default rounding mode. This option disables constant folding of
|
6944 |
|
|
floating point expressions at compile-time (which may be affected by
|
6945 |
|
|
rounding mode) and arithmetic transformations that are unsafe in the
|
6946 |
|
|
presence of sign-dependent rounding modes.
|
6947 |
|
|
.Sp
|
6948 |
|
|
The default is \fB\-fno\-rounding\-math\fR.
|
6949 |
|
|
.Sp
|
6950 |
|
|
This option is experimental and does not currently guarantee to
|
6951 |
|
|
disable all \s-1GCC\s0 optimizations that are affected by rounding mode.
|
6952 |
|
|
Future versions of \s-1GCC\s0 may provide finer control of this setting
|
6953 |
|
|
using C99's \f(CW\*(C`FENV_ACCESS\*(C'\fR pragma. This command line option
|
6954 |
|
|
will be used to specify the default state for \f(CW\*(C`FENV_ACCESS\*(C'\fR.
|
6955 |
|
|
.IP "\fB\-fsignaling\-nans\fR" 4
|
6956 |
|
|
.IX Item "-fsignaling-nans"
|
6957 |
|
|
Compile code assuming that \s-1IEEE\s0 signaling NaNs may generate user-visible
|
6958 |
|
|
traps during floating-point operations. Setting this option disables
|
6959 |
|
|
optimizations that may change the number of exceptions visible with
|
6960 |
|
|
signaling NaNs. This option implies \fB\-ftrapping\-math\fR.
|
6961 |
|
|
.Sp
|
6962 |
|
|
This option causes the preprocessor macro \f(CW\*(C`_\|_SUPPORT_SNAN_\|_\*(C'\fR to
|
6963 |
|
|
be defined.
|
6964 |
|
|
.Sp
|
6965 |
|
|
The default is \fB\-fno\-signaling\-nans\fR.
|
6966 |
|
|
.Sp
|
6967 |
|
|
This option is experimental and does not currently guarantee to
|
6968 |
|
|
disable all \s-1GCC\s0 optimizations that affect signaling NaN behavior.
|
6969 |
|
|
.IP "\fB\-fsingle\-precision\-constant\fR" 4
|
6970 |
|
|
.IX Item "-fsingle-precision-constant"
|
6971 |
|
|
Treat floating point constant as single precision constant instead of
|
6972 |
|
|
implicitly converting it to double precision constant.
|
6973 |
|
|
.IP "\fB\-fcx\-limited\-range\fR" 4
|
6974 |
|
|
.IX Item "-fcx-limited-range"
|
6975 |
|
|
When enabled, this option states that a range reduction step is not
|
6976 |
|
|
needed when performing complex division. Also, there is no checking
|
6977 |
|
|
whether the result of a complex multiplication or division is \f(CW\*(C`NaN
|
6978 |
|
|
+ I*NaN\*(C'\fR, with an attempt to rescue the situation in that case. The
|
6979 |
|
|
default is \fB\-fno\-cx\-limited\-range\fR, but is enabled by
|
6980 |
|
|
\&\fB\-ffast\-math\fR.
|
6981 |
|
|
.Sp
|
6982 |
|
|
This option controls the default setting of the \s-1ISO\s0 C99
|
6983 |
|
|
\&\f(CW\*(C`CX_LIMITED_RANGE\*(C'\fR pragma. Nevertheless, the option applies to
|
6984 |
|
|
all languages.
|
6985 |
|
|
.IP "\fB\-fcx\-fortran\-rules\fR" 4
|
6986 |
|
|
.IX Item "-fcx-fortran-rules"
|
6987 |
|
|
Complex multiplication and division follow Fortran rules. Range
|
6988 |
|
|
reduction is done as part of complex division, but there is no checking
|
6989 |
|
|
whether the result of a complex multiplication or division is \f(CW\*(C`NaN
|
6990 |
|
|
+ I*NaN\*(C'\fR, with an attempt to rescue the situation in that case.
|
6991 |
|
|
.Sp
|
6992 |
|
|
The default is \fB\-fno\-cx\-fortran\-rules\fR.
|
6993 |
|
|
.PP
|
6994 |
|
|
The following options control optimizations that may improve
|
6995 |
|
|
performance, but are not enabled by any \fB\-O\fR options. This
|
6996 |
|
|
section includes experimental options that may produce broken code.
|
6997 |
|
|
.IP "\fB\-fbranch\-probabilities\fR" 4
|
6998 |
|
|
.IX Item "-fbranch-probabilities"
|
6999 |
|
|
After running a program compiled with \fB\-fprofile\-arcs\fR, you can compile it a second time using
|
7000 |
|
|
\&\fB\-fbranch\-probabilities\fR, to improve optimizations based on
|
7001 |
|
|
the number of times each branch was taken. When the program
|
7002 |
|
|
compiled with \fB\-fprofile\-arcs\fR exits it saves arc execution
|
7003 |
|
|
counts to a file called \fI\fIsourcename\fI.gcda\fR for each source
|
7004 |
|
|
file. The information in this data file is very dependent on the
|
7005 |
|
|
structure of the generated code, so you must use the same source code
|
7006 |
|
|
and the same optimization options for both compilations.
|
7007 |
|
|
.Sp
|
7008 |
|
|
With \fB\-fbranch\-probabilities\fR, \s-1GCC\s0 puts a
|
7009 |
|
|
\&\fB\s-1REG_BR_PROB\s0\fR note on each \fB\s-1JUMP_INSN\s0\fR and \fB\s-1CALL_INSN\s0\fR.
|
7010 |
|
|
These can be used to improve optimization. Currently, they are only
|
7011 |
|
|
used in one place: in \fIreorg.c\fR, instead of guessing which path a
|
7012 |
|
|
branch is mostly to take, the \fB\s-1REG_BR_PROB\s0\fR values are used to
|
7013 |
|
|
exactly determine which path is taken more often.
|
7014 |
|
|
.IP "\fB\-fprofile\-values\fR" 4
|
7015 |
|
|
.IX Item "-fprofile-values"
|
7016 |
|
|
If combined with \fB\-fprofile\-arcs\fR, it adds code so that some
|
7017 |
|
|
data about values of expressions in the program is gathered.
|
7018 |
|
|
.Sp
|
7019 |
|
|
With \fB\-fbranch\-probabilities\fR, it reads back the data gathered
|
7020 |
|
|
from profiling values of expressions and adds \fB\s-1REG_VALUE_PROFILE\s0\fR
|
7021 |
|
|
notes to instructions for their later usage in optimizations.
|
7022 |
|
|
.Sp
|
7023 |
|
|
Enabled with \fB\-fprofile\-generate\fR and \fB\-fprofile\-use\fR.
|
7024 |
|
|
.IP "\fB\-fvpt\fR" 4
|
7025 |
|
|
.IX Item "-fvpt"
|
7026 |
|
|
If combined with \fB\-fprofile\-arcs\fR, it instructs the compiler to add
|
7027 |
|
|
a code to gather information about values of expressions.
|
7028 |
|
|
.Sp
|
7029 |
|
|
With \fB\-fbranch\-probabilities\fR, it reads back the data gathered
|
7030 |
|
|
and actually performs the optimizations based on them.
|
7031 |
|
|
Currently the optimizations include specialization of division operation
|
7032 |
|
|
using the knowledge about the value of the denominator.
|
7033 |
|
|
.IP "\fB\-frename\-registers\fR" 4
|
7034 |
|
|
.IX Item "-frename-registers"
|
7035 |
|
|
Attempt to avoid false dependencies in scheduled code by making use
|
7036 |
|
|
of registers left over after register allocation. This optimization
|
7037 |
|
|
will most benefit processors with lots of registers. Depending on the
|
7038 |
|
|
debug information format adopted by the target, however, it can
|
7039 |
|
|
make debugging impossible, since variables will no longer stay in
|
7040 |
|
|
a \*(L"home register\*(R".
|
7041 |
|
|
.Sp
|
7042 |
|
|
Enabled by default with \fB\-funroll\-loops\fR and \fB\-fpeel\-loops\fR.
|
7043 |
|
|
.IP "\fB\-ftracer\fR" 4
|
7044 |
|
|
.IX Item "-ftracer"
|
7045 |
|
|
Perform tail duplication to enlarge superblock size. This transformation
|
7046 |
|
|
simplifies the control flow of the function allowing other optimizations to do
|
7047 |
|
|
better job.
|
7048 |
|
|
.Sp
|
7049 |
|
|
Enabled with \fB\-fprofile\-use\fR.
|
7050 |
|
|
.IP "\fB\-funroll\-loops\fR" 4
|
7051 |
|
|
.IX Item "-funroll-loops"
|
7052 |
|
|
Unroll loops whose number of iterations can be determined at compile time or
|
7053 |
|
|
upon entry to the loop. \fB\-funroll\-loops\fR implies
|
7054 |
|
|
\&\fB\-frerun\-cse\-after\-loop\fR, \fB\-fweb\fR and \fB\-frename\-registers\fR.
|
7055 |
|
|
It also turns on complete loop peeling (i.e. complete removal of loops with
|
7056 |
|
|
small constant number of iterations). This option makes code larger, and may
|
7057 |
|
|
or may not make it run faster.
|
7058 |
|
|
.Sp
|
7059 |
|
|
Enabled with \fB\-fprofile\-use\fR.
|
7060 |
|
|
.IP "\fB\-funroll\-all\-loops\fR" 4
|
7061 |
|
|
.IX Item "-funroll-all-loops"
|
7062 |
|
|
Unroll all loops, even if their number of iterations is uncertain when
|
7063 |
|
|
the loop is entered. This usually makes programs run more slowly.
|
7064 |
|
|
\&\fB\-funroll\-all\-loops\fR implies the same options as
|
7065 |
|
|
\&\fB\-funroll\-loops\fR.
|
7066 |
|
|
.IP "\fB\-fpeel\-loops\fR" 4
|
7067 |
|
|
.IX Item "-fpeel-loops"
|
7068 |
|
|
Peels the loops for that there is enough information that they do not
|
7069 |
|
|
roll much (from profile feedback). It also turns on complete loop peeling
|
7070 |
|
|
(i.e. complete removal of loops with small constant number of iterations).
|
7071 |
|
|
.Sp
|
7072 |
|
|
Enabled with \fB\-fprofile\-use\fR.
|
7073 |
|
|
.IP "\fB\-fmove\-loop\-invariants\fR" 4
|
7074 |
|
|
.IX Item "-fmove-loop-invariants"
|
7075 |
|
|
Enables the loop invariant motion pass in the \s-1RTL\s0 loop optimizer. Enabled
|
7076 |
|
|
at level \fB\-O1\fR
|
7077 |
|
|
.IP "\fB\-funswitch\-loops\fR" 4
|
7078 |
|
|
.IX Item "-funswitch-loops"
|
7079 |
|
|
Move branches with loop invariant conditions out of the loop, with duplicates
|
7080 |
|
|
of the loop on both branches (modified according to result of the condition).
|
7081 |
|
|
.IP "\fB\-ffunction\-sections\fR" 4
|
7082 |
|
|
.IX Item "-ffunction-sections"
|
7083 |
|
|
.PD 0
|
7084 |
|
|
.IP "\fB\-fdata\-sections\fR" 4
|
7085 |
|
|
.IX Item "-fdata-sections"
|
7086 |
|
|
.PD
|
7087 |
|
|
Place each function or data item into its own section in the output
|
7088 |
|
|
file if the target supports arbitrary sections. The name of the
|
7089 |
|
|
function or the name of the data item determines the section's name
|
7090 |
|
|
in the output file.
|
7091 |
|
|
.Sp
|
7092 |
|
|
Use these options on systems where the linker can perform optimizations
|
7093 |
|
|
to improve locality of reference in the instruction space. Most systems
|
7094 |
|
|
using the \s-1ELF\s0 object format and \s-1SPARC\s0 processors running Solaris 2 have
|
7095 |
|
|
linkers with such optimizations. \s-1AIX\s0 may have these optimizations in
|
7096 |
|
|
the future.
|
7097 |
|
|
.Sp
|
7098 |
|
|
Only use these options when there are significant benefits from doing
|
7099 |
|
|
so. When you specify these options, the assembler and linker will
|
7100 |
|
|
create larger object and executable files and will also be slower.
|
7101 |
|
|
You will not be able to use \f(CW\*(C`gprof\*(C'\fR on all systems if you
|
7102 |
|
|
specify this option and you may have problems with debugging if
|
7103 |
|
|
you specify both this option and \fB\-g\fR.
|
7104 |
|
|
.IP "\fB\-fbranch\-target\-load\-optimize\fR" 4
|
7105 |
|
|
.IX Item "-fbranch-target-load-optimize"
|
7106 |
|
|
Perform branch target register load optimization before prologue / epilogue
|
7107 |
|
|
threading.
|
7108 |
|
|
The use of target registers can typically be exposed only during reload,
|
7109 |
|
|
thus hoisting loads out of loops and doing inter-block scheduling needs
|
7110 |
|
|
a separate optimization pass.
|
7111 |
|
|
.IP "\fB\-fbranch\-target\-load\-optimize2\fR" 4
|
7112 |
|
|
.IX Item "-fbranch-target-load-optimize2"
|
7113 |
|
|
Perform branch target register load optimization after prologue / epilogue
|
7114 |
|
|
threading.
|
7115 |
|
|
.IP "\fB\-fbtr\-bb\-exclusive\fR" 4
|
7116 |
|
|
.IX Item "-fbtr-bb-exclusive"
|
7117 |
|
|
When performing branch target register load optimization, don't reuse
|
7118 |
|
|
branch target registers in within any basic block.
|
7119 |
|
|
.IP "\fB\-fstack\-protector\fR" 4
|
7120 |
|
|
.IX Item "-fstack-protector"
|
7121 |
|
|
Emit extra code to check for buffer overflows, such as stack smashing
|
7122 |
|
|
attacks. This is done by adding a guard variable to functions with
|
7123 |
|
|
vulnerable objects. This includes functions that call alloca, and
|
7124 |
|
|
functions with buffers larger than 8 bytes. The guards are initialized
|
7125 |
|
|
when a function is entered and then checked when the function exits.
|
7126 |
|
|
If a guard check fails, an error message is printed and the program exits.
|
7127 |
|
|
.IP "\fB\-fstack\-protector\-all\fR" 4
|
7128 |
|
|
.IX Item "-fstack-protector-all"
|
7129 |
|
|
Like \fB\-fstack\-protector\fR except that all functions are protected.
|
7130 |
|
|
.IP "\fB\-fsection\-anchors\fR" 4
|
7131 |
|
|
.IX Item "-fsection-anchors"
|
7132 |
|
|
Try to reduce the number of symbolic address calculations by using
|
7133 |
|
|
shared \*(L"anchor\*(R" symbols to address nearby objects. This transformation
|
7134 |
|
|
can help to reduce the number of \s-1GOT\s0 entries and \s-1GOT\s0 accesses on some
|
7135 |
|
|
targets.
|
7136 |
|
|
.Sp
|
7137 |
|
|
For example, the implementation of the following function \f(CW\*(C`foo\*(C'\fR:
|
7138 |
|
|
.Sp
|
7139 |
|
|
.Vb 2
|
7140 |
|
|
\& static int a, b, c;
|
7141 |
|
|
\& int foo (void) { return a + b + c; }
|
7142 |
|
|
.Ve
|
7143 |
|
|
.Sp
|
7144 |
|
|
would usually calculate the addresses of all three variables, but if you
|
7145 |
|
|
compile it with \fB\-fsection\-anchors\fR, it will access the variables
|
7146 |
|
|
from a common anchor point instead. The effect is similar to the
|
7147 |
|
|
following pseudocode (which isn't valid C):
|
7148 |
|
|
.Sp
|
7149 |
|
|
.Vb 5
|
7150 |
|
|
\& int foo (void)
|
7151 |
|
|
\& {
|
7152 |
|
|
\& register int *xr = &x;
|
7153 |
|
|
\& return xr[&a \- &x] + xr[&b \- &x] + xr[&c \- &x];
|
7154 |
|
|
\& }
|
7155 |
|
|
.Ve
|
7156 |
|
|
.Sp
|
7157 |
|
|
Not all targets support this option.
|
7158 |
|
|
.IP "\fB\-\-param\fR \fIname\fR\fB=\fR\fIvalue\fR" 4
|
7159 |
|
|
.IX Item "--param name=value"
|
7160 |
|
|
In some places, \s-1GCC\s0 uses various constants to control the amount of
|
7161 |
|
|
optimization that is done. For example, \s-1GCC\s0 will not inline functions
|
7162 |
|
|
that contain more that a certain number of instructions. You can
|
7163 |
|
|
control some of these constants on the command-line using the
|
7164 |
|
|
\&\fB\-\-param\fR option.
|
7165 |
|
|
.Sp
|
7166 |
|
|
The names of specific parameters, and the meaning of the values, are
|
7167 |
|
|
tied to the internals of the compiler, and are subject to change
|
7168 |
|
|
without notice in future releases.
|
7169 |
|
|
.Sp
|
7170 |
|
|
In each case, the \fIvalue\fR is an integer. The allowable choices for
|
7171 |
|
|
\&\fIname\fR are given in the following table:
|
7172 |
|
|
.RS 4
|
7173 |
|
|
.IP "\fBstruct-reorg-cold-struct-ratio\fR" 4
|
7174 |
|
|
.IX Item "struct-reorg-cold-struct-ratio"
|
7175 |
|
|
The threshold ratio (as a percentage) between a structure frequency
|
7176 |
|
|
and the frequency of the hottest structure in the program. This parameter
|
7177 |
|
|
is used by struct-reorg optimization enabled by \fB\-fipa\-struct\-reorg\fR.
|
7178 |
|
|
We say that if the ratio of a structure frequency, calculated by profiling,
|
7179 |
|
|
to the hottest structure frequency in the program is less than this
|
7180 |
|
|
parameter, then structure reorganization is not applied to this structure.
|
7181 |
|
|
The default is 10.
|
7182 |
|
|
.IP "\fBpredictable-branch-outcome\fR" 4
|
7183 |
|
|
.IX Item "predictable-branch-outcome"
|
7184 |
|
|
When branch is predicted to be taken with probability lower than this threshold
|
7185 |
|
|
(in percent), then it is considered well predictable. The default is 10.
|
7186 |
|
|
.IP "\fBmax-crossjump-edges\fR" 4
|
7187 |
|
|
.IX Item "max-crossjump-edges"
|
7188 |
|
|
The maximum number of incoming edges to consider for crossjumping.
|
7189 |
|
|
The algorithm used by \fB\-fcrossjumping\fR is O(N^2) in
|
7190 |
|
|
the number of edges incoming to each block. Increasing values mean
|
7191 |
|
|
more aggressive optimization, making the compile time increase with
|
7192 |
|
|
probably small improvement in executable size.
|
7193 |
|
|
.IP "\fBmin-crossjump-insns\fR" 4
|
7194 |
|
|
.IX Item "min-crossjump-insns"
|
7195 |
|
|
The minimum number of instructions which must be matched at the end
|
7196 |
|
|
of two blocks before crossjumping will be performed on them. This
|
7197 |
|
|
value is ignored in the case where all instructions in the block being
|
7198 |
|
|
crossjumped from are matched. The default value is 5.
|
7199 |
|
|
.IP "\fBmax-grow-copy-bb-insns\fR" 4
|
7200 |
|
|
.IX Item "max-grow-copy-bb-insns"
|
7201 |
|
|
The maximum code size expansion factor when copying basic blocks
|
7202 |
|
|
instead of jumping. The expansion is relative to a jump instruction.
|
7203 |
|
|
The default value is 8.
|
7204 |
|
|
.IP "\fBmax-goto-duplication-insns\fR" 4
|
7205 |
|
|
.IX Item "max-goto-duplication-insns"
|
7206 |
|
|
The maximum number of instructions to duplicate to a block that jumps
|
7207 |
|
|
to a computed goto. To avoid O(N^2) behavior in a number of
|
7208 |
|
|
passes, \s-1GCC\s0 factors computed gotos early in the compilation process,
|
7209 |
|
|
and unfactors them as late as possible. Only computed jumps at the
|
7210 |
|
|
end of a basic blocks with no more than max-goto-duplication-insns are
|
7211 |
|
|
unfactored. The default value is 8.
|
7212 |
|
|
.IP "\fBmax-delay-slot-insn-search\fR" 4
|
7213 |
|
|
.IX Item "max-delay-slot-insn-search"
|
7214 |
|
|
The maximum number of instructions to consider when looking for an
|
7215 |
|
|
instruction to fill a delay slot. If more than this arbitrary number of
|
7216 |
|
|
instructions is searched, the time savings from filling the delay slot
|
7217 |
|
|
will be minimal so stop searching. Increasing values mean more
|
7218 |
|
|
aggressive optimization, making the compile time increase with probably
|
7219 |
|
|
small improvement in executable run time.
|
7220 |
|
|
.IP "\fBmax-delay-slot-live-search\fR" 4
|
7221 |
|
|
.IX Item "max-delay-slot-live-search"
|
7222 |
|
|
When trying to fill delay slots, the maximum number of instructions to
|
7223 |
|
|
consider when searching for a block with valid live register
|
7224 |
|
|
information. Increasing this arbitrarily chosen value means more
|
7225 |
|
|
aggressive optimization, increasing the compile time. This parameter
|
7226 |
|
|
should be removed when the delay slot code is rewritten to maintain the
|
7227 |
|
|
control-flow graph.
|
7228 |
|
|
.IP "\fBmax-gcse-memory\fR" 4
|
7229 |
|
|
.IX Item "max-gcse-memory"
|
7230 |
|
|
The approximate maximum amount of memory that will be allocated in
|
7231 |
|
|
order to perform the global common subexpression elimination
|
7232 |
|
|
optimization. If more memory than specified is required, the
|
7233 |
|
|
optimization will not be done.
|
7234 |
|
|
.IP "\fBmax-pending-list-length\fR" 4
|
7235 |
|
|
.IX Item "max-pending-list-length"
|
7236 |
|
|
The maximum number of pending dependencies scheduling will allow
|
7237 |
|
|
before flushing the current state and starting over. Large functions
|
7238 |
|
|
with few branches or calls can create excessively large lists which
|
7239 |
|
|
needlessly consume memory and resources.
|
7240 |
|
|
.IP "\fBmax-inline-insns-single\fR" 4
|
7241 |
|
|
.IX Item "max-inline-insns-single"
|
7242 |
|
|
Several parameters control the tree inliner used in gcc.
|
7243 |
|
|
This number sets the maximum number of instructions (counted in \s-1GCC\s0's
|
7244 |
|
|
internal representation) in a single function that the tree inliner
|
7245 |
|
|
will consider for inlining. This only affects functions declared
|
7246 |
|
|
inline and methods implemented in a class declaration (\*(C+).
|
7247 |
|
|
The default value is 300.
|
7248 |
|
|
.IP "\fBmax-inline-insns-auto\fR" 4
|
7249 |
|
|
.IX Item "max-inline-insns-auto"
|
7250 |
|
|
When you use \fB\-finline\-functions\fR (included in \fB\-O3\fR),
|
7251 |
|
|
a lot of functions that would otherwise not be considered for inlining
|
7252 |
|
|
by the compiler will be investigated. To those functions, a different
|
7253 |
|
|
(more restrictive) limit compared to functions declared inline can
|
7254 |
|
|
be applied.
|
7255 |
|
|
The default value is 50.
|
7256 |
|
|
.IP "\fBlarge-function-insns\fR" 4
|
7257 |
|
|
.IX Item "large-function-insns"
|
7258 |
|
|
The limit specifying really large functions. For functions larger than this
|
7259 |
|
|
limit after inlining, inlining is constrained by
|
7260 |
|
|
\&\fB\-\-param large-function-growth\fR. This parameter is useful primarily
|
7261 |
|
|
to avoid extreme compilation time caused by non-linear algorithms used by the
|
7262 |
|
|
backend.
|
7263 |
|
|
The default value is 2700.
|
7264 |
|
|
.IP "\fBlarge-function-growth\fR" 4
|
7265 |
|
|
.IX Item "large-function-growth"
|
7266 |
|
|
Specifies maximal growth of large function caused by inlining in percents.
|
7267 |
|
|
The default value is 100 which limits large function growth to 2.0 times
|
7268 |
|
|
the original size.
|
7269 |
|
|
.IP "\fBlarge-unit-insns\fR" 4
|
7270 |
|
|
.IX Item "large-unit-insns"
|
7271 |
|
|
The limit specifying large translation unit. Growth caused by inlining of
|
7272 |
|
|
units larger than this limit is limited by \fB\-\-param inline-unit-growth\fR.
|
7273 |
|
|
For small units this might be too tight (consider unit consisting of function A
|
7274 |
|
|
that is inline and B that just calls A three time. If B is small relative to
|
7275 |
|
|
A, the growth of unit is 300\e% and yet such inlining is very sane. For very
|
7276 |
|
|
large units consisting of small inlineable functions however the overall unit
|
7277 |
|
|
growth limit is needed to avoid exponential explosion of code size. Thus for
|
7278 |
|
|
smaller units, the size is increased to \fB\-\-param large-unit-insns\fR
|
7279 |
|
|
before applying \fB\-\-param inline-unit-growth\fR. The default is 10000
|
7280 |
|
|
.IP "\fBinline-unit-growth\fR" 4
|
7281 |
|
|
.IX Item "inline-unit-growth"
|
7282 |
|
|
Specifies maximal overall growth of the compilation unit caused by inlining.
|
7283 |
|
|
The default value is 30 which limits unit growth to 1.3 times the original
|
7284 |
|
|
size.
|
7285 |
|
|
.IP "\fBipcp-unit-growth\fR" 4
|
7286 |
|
|
.IX Item "ipcp-unit-growth"
|
7287 |
|
|
Specifies maximal overall growth of the compilation unit caused by
|
7288 |
|
|
interprocedural constant propagation. The default value is 10 which limits
|
7289 |
|
|
unit growth to 1.1 times the original size.
|
7290 |
|
|
.IP "\fBlarge-stack-frame\fR" 4
|
7291 |
|
|
.IX Item "large-stack-frame"
|
7292 |
|
|
The limit specifying large stack frames. While inlining the algorithm is trying
|
7293 |
|
|
to not grow past this limit too much. Default value is 256 bytes.
|
7294 |
|
|
.IP "\fBlarge-stack-frame-growth\fR" 4
|
7295 |
|
|
.IX Item "large-stack-frame-growth"
|
7296 |
|
|
Specifies maximal growth of large stack frames caused by inlining in percents.
|
7297 |
|
|
The default value is 1000 which limits large stack frame growth to 11 times
|
7298 |
|
|
the original size.
|
7299 |
|
|
.IP "\fBmax-inline-insns-recursive\fR" 4
|
7300 |
|
|
.IX Item "max-inline-insns-recursive"
|
7301 |
|
|
.PD 0
|
7302 |
|
|
.IP "\fBmax-inline-insns-recursive-auto\fR" 4
|
7303 |
|
|
.IX Item "max-inline-insns-recursive-auto"
|
7304 |
|
|
.PD
|
7305 |
|
|
Specifies maximum number of instructions out-of-line copy of self recursive inline
|
7306 |
|
|
function can grow into by performing recursive inlining.
|
7307 |
|
|
.Sp
|
7308 |
|
|
For functions declared inline \fB\-\-param max-inline-insns-recursive\fR is
|
7309 |
|
|
taken into account. For function not declared inline, recursive inlining
|
7310 |
|
|
happens only when \fB\-finline\-functions\fR (included in \fB\-O3\fR) is
|
7311 |
|
|
enabled and \fB\-\-param max-inline-insns-recursive-auto\fR is used. The
|
7312 |
|
|
default value is 450.
|
7313 |
|
|
.IP "\fBmax-inline-recursive-depth\fR" 4
|
7314 |
|
|
.IX Item "max-inline-recursive-depth"
|
7315 |
|
|
.PD 0
|
7316 |
|
|
.IP "\fBmax-inline-recursive-depth-auto\fR" 4
|
7317 |
|
|
.IX Item "max-inline-recursive-depth-auto"
|
7318 |
|
|
.PD
|
7319 |
|
|
Specifies maximum recursion depth used by the recursive inlining.
|
7320 |
|
|
.Sp
|
7321 |
|
|
For functions declared inline \fB\-\-param max-inline-recursive-depth\fR is
|
7322 |
|
|
taken into account. For function not declared inline, recursive inlining
|
7323 |
|
|
happens only when \fB\-finline\-functions\fR (included in \fB\-O3\fR) is
|
7324 |
|
|
enabled and \fB\-\-param max-inline-recursive-depth-auto\fR is used. The
|
7325 |
|
|
default value is 8.
|
7326 |
|
|
.IP "\fBmin-inline-recursive-probability\fR" 4
|
7327 |
|
|
.IX Item "min-inline-recursive-probability"
|
7328 |
|
|
Recursive inlining is profitable only for function having deep recursion
|
7329 |
|
|
in average and can hurt for function having little recursion depth by
|
7330 |
|
|
increasing the prologue size or complexity of function body to other
|
7331 |
|
|
optimizers.
|
7332 |
|
|
.Sp
|
7333 |
|
|
When profile feedback is available (see \fB\-fprofile\-generate\fR) the actual
|
7334 |
|
|
recursion depth can be guessed from probability that function will recurse via
|
7335 |
|
|
given call expression. This parameter limits inlining only to call expression
|
7336 |
|
|
whose probability exceeds given threshold (in percents). The default value is
|
7337 |
|
|
10.
|
7338 |
|
|
.IP "\fBearly-inlining-insns\fR" 4
|
7339 |
|
|
.IX Item "early-inlining-insns"
|
7340 |
|
|
Specify growth that early inliner can make. In effect it increases amount of
|
7341 |
|
|
inlining for code having large abstraction penalty. The default value is 8.
|
7342 |
|
|
.IP "\fBmax-early-inliner-iterations\fR" 4
|
7343 |
|
|
.IX Item "max-early-inliner-iterations"
|
7344 |
|
|
.PD 0
|
7345 |
|
|
.IP "\fBmax-early-inliner-iterations\fR" 4
|
7346 |
|
|
.IX Item "max-early-inliner-iterations"
|
7347 |
|
|
.PD
|
7348 |
|
|
Limit of iterations of early inliner. This basically bounds number of nested
|
7349 |
|
|
indirect calls early inliner can resolve. Deeper chains are still handled by
|
7350 |
|
|
late inlining.
|
7351 |
|
|
.IP "\fBmin-vect-loop-bound\fR" 4
|
7352 |
|
|
.IX Item "min-vect-loop-bound"
|
7353 |
|
|
The minimum number of iterations under which a loop will not get vectorized
|
7354 |
|
|
when \fB\-ftree\-vectorize\fR is used. The number of iterations after
|
7355 |
|
|
vectorization needs to be greater than the value specified by this option
|
7356 |
|
|
to allow vectorization. The default value is 0.
|
7357 |
|
|
.IP "\fBmax-unrolled-insns\fR" 4
|
7358 |
|
|
.IX Item "max-unrolled-insns"
|
7359 |
|
|
The maximum number of instructions that a loop should have if that loop
|
7360 |
|
|
is unrolled, and if the loop is unrolled, it determines how many times
|
7361 |
|
|
the loop code is unrolled.
|
7362 |
|
|
.IP "\fBmax-average-unrolled-insns\fR" 4
|
7363 |
|
|
.IX Item "max-average-unrolled-insns"
|
7364 |
|
|
The maximum number of instructions biased by probabilities of their execution
|
7365 |
|
|
that a loop should have if that loop is unrolled, and if the loop is unrolled,
|
7366 |
|
|
it determines how many times the loop code is unrolled.
|
7367 |
|
|
.IP "\fBmax-unroll-times\fR" 4
|
7368 |
|
|
.IX Item "max-unroll-times"
|
7369 |
|
|
The maximum number of unrollings of a single loop.
|
7370 |
|
|
.IP "\fBmax-peeled-insns\fR" 4
|
7371 |
|
|
.IX Item "max-peeled-insns"
|
7372 |
|
|
The maximum number of instructions that a loop should have if that loop
|
7373 |
|
|
is peeled, and if the loop is peeled, it determines how many times
|
7374 |
|
|
the loop code is peeled.
|
7375 |
|
|
.IP "\fBmax-peel-times\fR" 4
|
7376 |
|
|
.IX Item "max-peel-times"
|
7377 |
|
|
The maximum number of peelings of a single loop.
|
7378 |
|
|
.IP "\fBmax-completely-peeled-insns\fR" 4
|
7379 |
|
|
.IX Item "max-completely-peeled-insns"
|
7380 |
|
|
The maximum number of insns of a completely peeled loop.
|
7381 |
|
|
.IP "\fBmax-completely-peel-times\fR" 4
|
7382 |
|
|
.IX Item "max-completely-peel-times"
|
7383 |
|
|
The maximum number of iterations of a loop to be suitable for complete peeling.
|
7384 |
|
|
.IP "\fBmax-completely-peel-loop-nest-depth\fR" 4
|
7385 |
|
|
.IX Item "max-completely-peel-loop-nest-depth"
|
7386 |
|
|
The maximum depth of a loop nest suitable for complete peeling.
|
7387 |
|
|
.IP "\fBmax-unswitch-insns\fR" 4
|
7388 |
|
|
.IX Item "max-unswitch-insns"
|
7389 |
|
|
The maximum number of insns of an unswitched loop.
|
7390 |
|
|
.IP "\fBmax-unswitch-level\fR" 4
|
7391 |
|
|
.IX Item "max-unswitch-level"
|
7392 |
|
|
The maximum number of branches unswitched in a single loop.
|
7393 |
|
|
.IP "\fBlim-expensive\fR" 4
|
7394 |
|
|
.IX Item "lim-expensive"
|
7395 |
|
|
The minimum cost of an expensive expression in the loop invariant motion.
|
7396 |
|
|
.IP "\fBiv-consider-all-candidates-bound\fR" 4
|
7397 |
|
|
.IX Item "iv-consider-all-candidates-bound"
|
7398 |
|
|
Bound on number of candidates for induction variables below that
|
7399 |
|
|
all candidates are considered for each use in induction variable
|
7400 |
|
|
optimizations. Only the most relevant candidates are considered
|
7401 |
|
|
if there are more candidates, to avoid quadratic time complexity.
|
7402 |
|
|
.IP "\fBiv-max-considered-uses\fR" 4
|
7403 |
|
|
.IX Item "iv-max-considered-uses"
|
7404 |
|
|
The induction variable optimizations give up on loops that contain more
|
7405 |
|
|
induction variable uses.
|
7406 |
|
|
.IP "\fBiv-always-prune-cand-set-bound\fR" 4
|
7407 |
|
|
.IX Item "iv-always-prune-cand-set-bound"
|
7408 |
|
|
If number of candidates in the set is smaller than this value,
|
7409 |
|
|
we always try to remove unnecessary ivs from the set during its
|
7410 |
|
|
optimization when a new iv is added to the set.
|
7411 |
|
|
.IP "\fBscev-max-expr-size\fR" 4
|
7412 |
|
|
.IX Item "scev-max-expr-size"
|
7413 |
|
|
Bound on size of expressions used in the scalar evolutions analyzer.
|
7414 |
|
|
Large expressions slow the analyzer.
|
7415 |
|
|
.IP "\fBomega-max-vars\fR" 4
|
7416 |
|
|
.IX Item "omega-max-vars"
|
7417 |
|
|
The maximum number of variables in an Omega constraint system.
|
7418 |
|
|
The default value is 128.
|
7419 |
|
|
.IP "\fBomega-max-geqs\fR" 4
|
7420 |
|
|
.IX Item "omega-max-geqs"
|
7421 |
|
|
The maximum number of inequalities in an Omega constraint system.
|
7422 |
|
|
The default value is 256.
|
7423 |
|
|
.IP "\fBomega-max-eqs\fR" 4
|
7424 |
|
|
.IX Item "omega-max-eqs"
|
7425 |
|
|
The maximum number of equalities in an Omega constraint system.
|
7426 |
|
|
The default value is 128.
|
7427 |
|
|
.IP "\fBomega-max-wild-cards\fR" 4
|
7428 |
|
|
.IX Item "omega-max-wild-cards"
|
7429 |
|
|
The maximum number of wildcard variables that the Omega solver will
|
7430 |
|
|
be able to insert. The default value is 18.
|
7431 |
|
|
.IP "\fBomega-hash-table-size\fR" 4
|
7432 |
|
|
.IX Item "omega-hash-table-size"
|
7433 |
|
|
The size of the hash table in the Omega solver. The default value is
|
7434 |
|
|
550.
|
7435 |
|
|
.IP "\fBomega-max-keys\fR" 4
|
7436 |
|
|
.IX Item "omega-max-keys"
|
7437 |
|
|
The maximal number of keys used by the Omega solver. The default
|
7438 |
|
|
value is 500.
|
7439 |
|
|
.IP "\fBomega-eliminate-redundant-constraints\fR" 4
|
7440 |
|
|
.IX Item "omega-eliminate-redundant-constraints"
|
7441 |
|
|
When set to 1, use expensive methods to eliminate all redundant
|
7442 |
|
|
constraints. The default value is 0.
|
7443 |
|
|
.IP "\fBvect-max-version-for-alignment-checks\fR" 4
|
7444 |
|
|
.IX Item "vect-max-version-for-alignment-checks"
|
7445 |
|
|
The maximum number of runtime checks that can be performed when
|
7446 |
|
|
doing loop versioning for alignment in the vectorizer. See option
|
7447 |
|
|
ftree-vect-loop-version for more information.
|
7448 |
|
|
.IP "\fBvect-max-version-for-alias-checks\fR" 4
|
7449 |
|
|
.IX Item "vect-max-version-for-alias-checks"
|
7450 |
|
|
The maximum number of runtime checks that can be performed when
|
7451 |
|
|
doing loop versioning for alias in the vectorizer. See option
|
7452 |
|
|
ftree-vect-loop-version for more information.
|
7453 |
|
|
.IP "\fBmax-iterations-to-track\fR" 4
|
7454 |
|
|
.IX Item "max-iterations-to-track"
|
7455 |
|
|
The maximum number of iterations of a loop the brute force algorithm
|
7456 |
|
|
for analysis of # of iterations of the loop tries to evaluate.
|
7457 |
|
|
.IP "\fBhot-bb-count-fraction\fR" 4
|
7458 |
|
|
.IX Item "hot-bb-count-fraction"
|
7459 |
|
|
Select fraction of the maximal count of repetitions of basic block in program
|
7460 |
|
|
given basic block needs to have to be considered hot.
|
7461 |
|
|
.IP "\fBhot-bb-frequency-fraction\fR" 4
|
7462 |
|
|
.IX Item "hot-bb-frequency-fraction"
|
7463 |
|
|
Select fraction of the maximal frequency of executions of basic block in
|
7464 |
|
|
function given basic block needs to have to be considered hot
|
7465 |
|
|
.IP "\fBmax-predicted-iterations\fR" 4
|
7466 |
|
|
.IX Item "max-predicted-iterations"
|
7467 |
|
|
The maximum number of loop iterations we predict statically. This is useful
|
7468 |
|
|
in cases where function contain single loop with known bound and other loop
|
7469 |
|
|
with unknown. We predict the known number of iterations correctly, while
|
7470 |
|
|
the unknown number of iterations average to roughly 10. This means that the
|
7471 |
|
|
loop without bounds would appear artificially cold relative to the other one.
|
7472 |
|
|
.IP "\fBalign-threshold\fR" 4
|
7473 |
|
|
.IX Item "align-threshold"
|
7474 |
|
|
Select fraction of the maximal frequency of executions of basic block in
|
7475 |
|
|
function given basic block will get aligned.
|
7476 |
|
|
.IP "\fBalign-loop-iterations\fR" 4
|
7477 |
|
|
.IX Item "align-loop-iterations"
|
7478 |
|
|
A loop expected to iterate at lest the selected number of iterations will get
|
7479 |
|
|
aligned.
|
7480 |
|
|
.IP "\fBtracer-dynamic-coverage\fR" 4
|
7481 |
|
|
.IX Item "tracer-dynamic-coverage"
|
7482 |
|
|
.PD 0
|
7483 |
|
|
.IP "\fBtracer-dynamic-coverage-feedback\fR" 4
|
7484 |
|
|
.IX Item "tracer-dynamic-coverage-feedback"
|
7485 |
|
|
.PD
|
7486 |
|
|
This value is used to limit superblock formation once the given percentage of
|
7487 |
|
|
executed instructions is covered. This limits unnecessary code size
|
7488 |
|
|
expansion.
|
7489 |
|
|
.Sp
|
7490 |
|
|
The \fBtracer-dynamic-coverage-feedback\fR is used only when profile
|
7491 |
|
|
feedback is available. The real profiles (as opposed to statically estimated
|
7492 |
|
|
ones) are much less balanced allowing the threshold to be larger value.
|
7493 |
|
|
.IP "\fBtracer-max-code-growth\fR" 4
|
7494 |
|
|
.IX Item "tracer-max-code-growth"
|
7495 |
|
|
Stop tail duplication once code growth has reached given percentage. This is
|
7496 |
|
|
rather hokey argument, as most of the duplicates will be eliminated later in
|
7497 |
|
|
cross jumping, so it may be set to much higher values than is the desired code
|
7498 |
|
|
growth.
|
7499 |
|
|
.IP "\fBtracer-min-branch-ratio\fR" 4
|
7500 |
|
|
.IX Item "tracer-min-branch-ratio"
|
7501 |
|
|
Stop reverse growth when the reverse probability of best edge is less than this
|
7502 |
|
|
threshold (in percent).
|
7503 |
|
|
.IP "\fBtracer-min-branch-ratio\fR" 4
|
7504 |
|
|
.IX Item "tracer-min-branch-ratio"
|
7505 |
|
|
.PD 0
|
7506 |
|
|
.IP "\fBtracer-min-branch-ratio-feedback\fR" 4
|
7507 |
|
|
.IX Item "tracer-min-branch-ratio-feedback"
|
7508 |
|
|
.PD
|
7509 |
|
|
Stop forward growth if the best edge do have probability lower than this
|
7510 |
|
|
threshold.
|
7511 |
|
|
.Sp
|
7512 |
|
|
Similarly to \fBtracer-dynamic-coverage\fR two values are present, one for
|
7513 |
|
|
compilation for profile feedback and one for compilation without. The value
|
7514 |
|
|
for compilation with profile feedback needs to be more conservative (higher) in
|
7515 |
|
|
order to make tracer effective.
|
7516 |
|
|
.IP "\fBmax-cse-path-length\fR" 4
|
7517 |
|
|
.IX Item "max-cse-path-length"
|
7518 |
|
|
Maximum number of basic blocks on path that cse considers. The default is 10.
|
7519 |
|
|
.IP "\fBmax-cse-insns\fR" 4
|
7520 |
|
|
.IX Item "max-cse-insns"
|
7521 |
|
|
The maximum instructions \s-1CSE\s0 process before flushing. The default is 1000.
|
7522 |
|
|
.IP "\fBggc-min-expand\fR" 4
|
7523 |
|
|
.IX Item "ggc-min-expand"
|
7524 |
|
|
\&\s-1GCC\s0 uses a garbage collector to manage its own memory allocation. This
|
7525 |
|
|
parameter specifies the minimum percentage by which the garbage
|
7526 |
|
|
collector's heap should be allowed to expand between collections.
|
7527 |
|
|
Tuning this may improve compilation speed; it has no effect on code
|
7528 |
|
|
generation.
|
7529 |
|
|
.Sp
|
7530 |
|
|
The default is 30% + 70% * (\s-1RAM/1GB\s0) with an upper bound of 100% when
|
7531 |
|
|
\&\s-1RAM\s0 >= 1GB. If \f(CW\*(C`getrlimit\*(C'\fR is available, the notion of \*(L"\s-1RAM\s0\*(R" is
|
7532 |
|
|
the smallest of actual \s-1RAM\s0 and \f(CW\*(C`RLIMIT_DATA\*(C'\fR or \f(CW\*(C`RLIMIT_AS\*(C'\fR. If
|
7533 |
|
|
\&\s-1GCC\s0 is not able to calculate \s-1RAM\s0 on a particular platform, the lower
|
7534 |
|
|
bound of 30% is used. Setting this parameter and
|
7535 |
|
|
\&\fBggc-min-heapsize\fR to zero causes a full collection to occur at
|
7536 |
|
|
every opportunity. This is extremely slow, but can be useful for
|
7537 |
|
|
debugging.
|
7538 |
|
|
.IP "\fBggc-min-heapsize\fR" 4
|
7539 |
|
|
.IX Item "ggc-min-heapsize"
|
7540 |
|
|
Minimum size of the garbage collector's heap before it begins bothering
|
7541 |
|
|
to collect garbage. The first collection occurs after the heap expands
|
7542 |
|
|
by \fBggc-min-expand\fR% beyond \fBggc-min-heapsize\fR. Again,
|
7543 |
|
|
tuning this may improve compilation speed, and has no effect on code
|
7544 |
|
|
generation.
|
7545 |
|
|
.Sp
|
7546 |
|
|
The default is the smaller of \s-1RAM/8\s0, \s-1RLIMIT_RSS\s0, or a limit which
|
7547 |
|
|
tries to ensure that \s-1RLIMIT_DATA\s0 or \s-1RLIMIT_AS\s0 are not exceeded, but
|
7548 |
|
|
with a lower bound of 4096 (four megabytes) and an upper bound of
|
7549 |
|
|
131072 (128 megabytes). If \s-1GCC\s0 is not able to calculate \s-1RAM\s0 on a
|
7550 |
|
|
particular platform, the lower bound is used. Setting this parameter
|
7551 |
|
|
very large effectively disables garbage collection. Setting this
|
7552 |
|
|
parameter and \fBggc-min-expand\fR to zero causes a full collection
|
7553 |
|
|
to occur at every opportunity.
|
7554 |
|
|
.IP "\fBmax-reload-search-insns\fR" 4
|
7555 |
|
|
.IX Item "max-reload-search-insns"
|
7556 |
|
|
The maximum number of instruction reload should look backward for equivalent
|
7557 |
|
|
register. Increasing values mean more aggressive optimization, making the
|
7558 |
|
|
compile time increase with probably slightly better performance. The default
|
7559 |
|
|
value is 100.
|
7560 |
|
|
.IP "\fBmax-cselib-memory-locations\fR" 4
|
7561 |
|
|
.IX Item "max-cselib-memory-locations"
|
7562 |
|
|
The maximum number of memory locations cselib should take into account.
|
7563 |
|
|
Increasing values mean more aggressive optimization, making the compile time
|
7564 |
|
|
increase with probably slightly better performance. The default value is 500.
|
7565 |
|
|
.IP "\fBreorder-blocks-duplicate\fR" 4
|
7566 |
|
|
.IX Item "reorder-blocks-duplicate"
|
7567 |
|
|
.PD 0
|
7568 |
|
|
.IP "\fBreorder-blocks-duplicate-feedback\fR" 4
|
7569 |
|
|
.IX Item "reorder-blocks-duplicate-feedback"
|
7570 |
|
|
.PD
|
7571 |
|
|
Used by basic block reordering pass to decide whether to use unconditional
|
7572 |
|
|
branch or duplicate the code on its destination. Code is duplicated when its
|
7573 |
|
|
estimated size is smaller than this value multiplied by the estimated size of
|
7574 |
|
|
unconditional jump in the hot spots of the program.
|
7575 |
|
|
.Sp
|
7576 |
|
|
The \fBreorder-block-duplicate-feedback\fR is used only when profile
|
7577 |
|
|
feedback is available and may be set to higher values than
|
7578 |
|
|
\&\fBreorder-block-duplicate\fR since information about the hot spots is more
|
7579 |
|
|
accurate.
|
7580 |
|
|
.IP "\fBmax-sched-ready-insns\fR" 4
|
7581 |
|
|
.IX Item "max-sched-ready-insns"
|
7582 |
|
|
The maximum number of instructions ready to be issued the scheduler should
|
7583 |
|
|
consider at any given time during the first scheduling pass. Increasing
|
7584 |
|
|
values mean more thorough searches, making the compilation time increase
|
7585 |
|
|
with probably little benefit. The default value is 100.
|
7586 |
|
|
.IP "\fBmax-sched-region-blocks\fR" 4
|
7587 |
|
|
.IX Item "max-sched-region-blocks"
|
7588 |
|
|
The maximum number of blocks in a region to be considered for
|
7589 |
|
|
interblock scheduling. The default value is 10.
|
7590 |
|
|
.IP "\fBmax-pipeline-region-blocks\fR" 4
|
7591 |
|
|
.IX Item "max-pipeline-region-blocks"
|
7592 |
|
|
The maximum number of blocks in a region to be considered for
|
7593 |
|
|
pipelining in the selective scheduler. The default value is 15.
|
7594 |
|
|
.IP "\fBmax-sched-region-insns\fR" 4
|
7595 |
|
|
.IX Item "max-sched-region-insns"
|
7596 |
|
|
The maximum number of insns in a region to be considered for
|
7597 |
|
|
interblock scheduling. The default value is 100.
|
7598 |
|
|
.IP "\fBmax-pipeline-region-insns\fR" 4
|
7599 |
|
|
.IX Item "max-pipeline-region-insns"
|
7600 |
|
|
The maximum number of insns in a region to be considered for
|
7601 |
|
|
pipelining in the selective scheduler. The default value is 200.
|
7602 |
|
|
.IP "\fBmin-spec-prob\fR" 4
|
7603 |
|
|
.IX Item "min-spec-prob"
|
7604 |
|
|
The minimum probability (in percents) of reaching a source block
|
7605 |
|
|
for interblock speculative scheduling. The default value is 40.
|
7606 |
|
|
.IP "\fBmax-sched-extend-regions-iters\fR" 4
|
7607 |
|
|
.IX Item "max-sched-extend-regions-iters"
|
7608 |
|
|
The maximum number of iterations through \s-1CFG\s0 to extend regions.
|
7609 |
|
|
|
7610 |
|
|
N \- do at most N iterations.
|
7611 |
|
|
The default value is 0.
|
7612 |
|
|
.IP "\fBmax-sched-insn-conflict-delay\fR" 4
|
7613 |
|
|
.IX Item "max-sched-insn-conflict-delay"
|
7614 |
|
|
The maximum conflict delay for an insn to be considered for speculative motion.
|
7615 |
|
|
The default value is 3.
|
7616 |
|
|
.IP "\fBsched-spec-prob-cutoff\fR" 4
|
7617 |
|
|
.IX Item "sched-spec-prob-cutoff"
|
7618 |
|
|
The minimal probability of speculation success (in percents), so that
|
7619 |
|
|
speculative insn will be scheduled.
|
7620 |
|
|
The default value is 40.
|
7621 |
|
|
.IP "\fBsched-mem-true-dep-cost\fR" 4
|
7622 |
|
|
.IX Item "sched-mem-true-dep-cost"
|
7623 |
|
|
Minimal distance (in \s-1CPU\s0 cycles) between store and load targeting same
|
7624 |
|
|
memory locations. The default value is 1.
|
7625 |
|
|
.IP "\fBselsched-max-lookahead\fR" 4
|
7626 |
|
|
.IX Item "selsched-max-lookahead"
|
7627 |
|
|
The maximum size of the lookahead window of selective scheduling. It is a
|
7628 |
|
|
depth of search for available instructions.
|
7629 |
|
|
The default value is 50.
|
7630 |
|
|
.IP "\fBselsched-max-sched-times\fR" 4
|
7631 |
|
|
.IX Item "selsched-max-sched-times"
|
7632 |
|
|
The maximum number of times that an instruction will be scheduled during
|
7633 |
|
|
selective scheduling. This is the limit on the number of iterations
|
7634 |
|
|
through which the instruction may be pipelined. The default value is 2.
|
7635 |
|
|
.IP "\fBselsched-max-insns-to-rename\fR" 4
|
7636 |
|
|
.IX Item "selsched-max-insns-to-rename"
|
7637 |
|
|
The maximum number of best instructions in the ready list that are considered
|
7638 |
|
|
for renaming in the selective scheduler. The default value is 2.
|
7639 |
|
|
.IP "\fBmax-last-value-rtl\fR" 4
|
7640 |
|
|
.IX Item "max-last-value-rtl"
|
7641 |
|
|
The maximum size measured as number of RTLs that can be recorded in an expression
|
7642 |
|
|
in combiner for a pseudo register as last known value of that register. The default
|
7643 |
|
|
is 10000.
|
7644 |
|
|
.IP "\fBinteger-share-limit\fR" 4
|
7645 |
|
|
.IX Item "integer-share-limit"
|
7646 |
|
|
Small integer constants can use a shared data structure, reducing the
|
7647 |
|
|
compiler's memory usage and increasing its speed. This sets the maximum
|
7648 |
|
|
value of a shared integer constant. The default value is 256.
|
7649 |
|
|
.IP "\fBmin-virtual-mappings\fR" 4
|
7650 |
|
|
.IX Item "min-virtual-mappings"
|
7651 |
|
|
Specifies the minimum number of virtual mappings in the incremental
|
7652 |
|
|
\&\s-1SSA\s0 updater that should be registered to trigger the virtual mappings
|
7653 |
|
|
heuristic defined by virtual-mappings-ratio. The default value is
|
7654 |
|
|
100.
|
7655 |
|
|
.IP "\fBvirtual-mappings-ratio\fR" 4
|
7656 |
|
|
.IX Item "virtual-mappings-ratio"
|
7657 |
|
|
If the number of virtual mappings is virtual-mappings-ratio bigger
|
7658 |
|
|
than the number of virtual symbols to be updated, then the incremental
|
7659 |
|
|
\&\s-1SSA\s0 updater switches to a full update for those symbols. The default
|
7660 |
|
|
ratio is 3.
|
7661 |
|
|
.IP "\fBssp-buffer-size\fR" 4
|
7662 |
|
|
.IX Item "ssp-buffer-size"
|
7663 |
|
|
The minimum size of buffers (i.e. arrays) that will receive stack smashing
|
7664 |
|
|
protection when \fB\-fstack\-protection\fR is used.
|
7665 |
|
|
.IP "\fBmax-jump-thread-duplication-stmts\fR" 4
|
7666 |
|
|
.IX Item "max-jump-thread-duplication-stmts"
|
7667 |
|
|
Maximum number of statements allowed in a block that needs to be
|
7668 |
|
|
duplicated when threading jumps.
|
7669 |
|
|
.IP "\fBmax-fields-for-field-sensitive\fR" 4
|
7670 |
|
|
.IX Item "max-fields-for-field-sensitive"
|
7671 |
|
|
Maximum number of fields in a structure we will treat in
|
7672 |
|
|
a field sensitive manner during pointer analysis. The default is zero
|
7673 |
|
|
for \-O0, and \-O1 and 100 for \-Os, \-O2, and \-O3.
|
7674 |
|
|
.IP "\fBprefetch-latency\fR" 4
|
7675 |
|
|
.IX Item "prefetch-latency"
|
7676 |
|
|
Estimate on average number of instructions that are executed before
|
7677 |
|
|
prefetch finishes. The distance we prefetch ahead is proportional
|
7678 |
|
|
to this constant. Increasing this number may also lead to less
|
7679 |
|
|
streams being prefetched (see \fBsimultaneous-prefetches\fR).
|
7680 |
|
|
.IP "\fBsimultaneous-prefetches\fR" 4
|
7681 |
|
|
.IX Item "simultaneous-prefetches"
|
7682 |
|
|
Maximum number of prefetches that can run at the same time.
|
7683 |
|
|
.IP "\fBl1\-cache\-line\-size\fR" 4
|
7684 |
|
|
.IX Item "l1-cache-line-size"
|
7685 |
|
|
The size of cache line in L1 cache, in bytes.
|
7686 |
|
|
.IP "\fBl1\-cache\-size\fR" 4
|
7687 |
|
|
.IX Item "l1-cache-size"
|
7688 |
|
|
The size of L1 cache, in kilobytes.
|
7689 |
|
|
.IP "\fBl2\-cache\-size\fR" 4
|
7690 |
|
|
.IX Item "l2-cache-size"
|
7691 |
|
|
The size of L2 cache, in kilobytes.
|
7692 |
|
|
.IP "\fBmin-insn-to-prefetch-ratio\fR" 4
|
7693 |
|
|
.IX Item "min-insn-to-prefetch-ratio"
|
7694 |
|
|
The minimum ratio between the number of instructions and the
|
7695 |
|
|
number of prefetches to enable prefetching in a loop with an
|
7696 |
|
|
unknown trip count.
|
7697 |
|
|
.IP "\fBprefetch-min-insn-to-mem-ratio\fR" 4
|
7698 |
|
|
.IX Item "prefetch-min-insn-to-mem-ratio"
|
7699 |
|
|
The minimum ratio between the number of instructions and the
|
7700 |
|
|
number of memory references to enable prefetching in a loop.
|
7701 |
|
|
.IP "\fBuse-canonical-types\fR" 4
|
7702 |
|
|
.IX Item "use-canonical-types"
|
7703 |
|
|
Whether the compiler should use the \*(L"canonical\*(R" type system. By
|
7704 |
|
|
default, this should always be 1, which uses a more efficient internal
|
7705 |
|
|
mechanism for comparing types in \*(C+ and Objective\-\*(C+. However, if
|
7706 |
|
|
bugs in the canonical type system are causing compilation failures,
|
7707 |
|
|
set this value to 0 to disable canonical types.
|
7708 |
|
|
.IP "\fBswitch-conversion-max-branch-ratio\fR" 4
|
7709 |
|
|
.IX Item "switch-conversion-max-branch-ratio"
|
7710 |
|
|
Switch initialization conversion will refuse to create arrays that are
|
7711 |
|
|
bigger than \fBswitch-conversion-max-branch-ratio\fR times the number of
|
7712 |
|
|
branches in the switch.
|
7713 |
|
|
.IP "\fBmax-partial-antic-length\fR" 4
|
7714 |
|
|
.IX Item "max-partial-antic-length"
|
7715 |
|
|
Maximum length of the partial antic set computed during the tree
|
7716 |
|
|
partial redundancy elimination optimization (\fB\-ftree\-pre\fR) when
|
7717 |
|
|
optimizing at \fB\-O3\fR and above. For some sorts of source code
|
7718 |
|
|
the enhanced partial redundancy elimination optimization can run away,
|
7719 |
|
|
consuming all of the memory available on the host machine. This
|
7720 |
|
|
parameter sets a limit on the length of the sets that are computed,
|
7721 |
|
|
which prevents the runaway behavior. Setting a value of 0 for
|
7722 |
|
|
this parameter will allow an unlimited set length.
|
7723 |
|
|
.IP "\fBsccvn-max-scc-size\fR" 4
|
7724 |
|
|
.IX Item "sccvn-max-scc-size"
|
7725 |
|
|
Maximum size of a strongly connected component (\s-1SCC\s0) during \s-1SCCVN\s0
|
7726 |
|
|
processing. If this limit is hit, \s-1SCCVN\s0 processing for the whole
|
7727 |
|
|
function will not be done and optimizations depending on it will
|
7728 |
|
|
be disabled. The default maximum \s-1SCC\s0 size is 10000.
|
7729 |
|
|
.IP "\fBira-max-loops-num\fR" 4
|
7730 |
|
|
.IX Item "ira-max-loops-num"
|
7731 |
|
|
\&\s-1IRA\s0 uses a regional register allocation by default. If a function
|
7732 |
|
|
contains loops more than number given by the parameter, only at most
|
7733 |
|
|
given number of the most frequently executed loops will form regions
|
7734 |
|
|
for the regional register allocation. The default value of the
|
7735 |
|
|
parameter is 100.
|
7736 |
|
|
.IP "\fBira-max-conflict-table-size\fR" 4
|
7737 |
|
|
.IX Item "ira-max-conflict-table-size"
|
7738 |
|
|
Although \s-1IRA\s0 uses a sophisticated algorithm of compression conflict
|
7739 |
|
|
table, the table can be still big for huge functions. If the conflict
|
7740 |
|
|
table for a function could be more than size in \s-1MB\s0 given by the
|
7741 |
|
|
parameter, the conflict table is not built and faster, simpler, and
|
7742 |
|
|
lower quality register allocation algorithm will be used. The
|
7743 |
|
|
algorithm do not use pseudo-register conflicts. The default value of
|
7744 |
|
|
the parameter is 2000.
|
7745 |
|
|
.IP "\fBira-loop-reserved-regs\fR" 4
|
7746 |
|
|
.IX Item "ira-loop-reserved-regs"
|
7747 |
|
|
\&\s-1IRA\s0 can be used to evaluate more accurate register pressure in loops
|
7748 |
|
|
for decision to move loop invariants (see \fB\-O3\fR). The number
|
7749 |
|
|
of available registers reserved for some other purposes is described
|
7750 |
|
|
by this parameter. The default value of the parameter is 2 which is
|
7751 |
|
|
minimal number of registers needed for execution of typical
|
7752 |
|
|
instruction. This value is the best found from numerous experiments.
|
7753 |
|
|
.IP "\fBloop-invariant-max-bbs-in-loop\fR" 4
|
7754 |
|
|
.IX Item "loop-invariant-max-bbs-in-loop"
|
7755 |
|
|
Loop invariant motion can be very expensive, both in compile time and
|
7756 |
|
|
in amount of needed compile time memory, with very large loops. Loops
|
7757 |
|
|
with more basic blocks than this parameter won't have loop invariant
|
7758 |
|
|
motion optimization performed on them. The default value of the
|
7759 |
|
|
parameter is 1000 for \-O1 and 10000 for \-O2 and above.
|
7760 |
|
|
.IP "\fBmax-vartrack-size\fR" 4
|
7761 |
|
|
.IX Item "max-vartrack-size"
|
7762 |
|
|
Sets a maximum number of hash table slots to use during variable
|
7763 |
|
|
tracking dataflow analysis of any function. If this limit is exceeded
|
7764 |
|
|
with variable tracking at assignments enabled, analysis for that
|
7765 |
|
|
function is retried without it, after removing all debug insns from
|
7766 |
|
|
the function. If the limit is exceeded even without debug insns, var
|
7767 |
|
|
tracking analysis is completely disabled for the function. Setting
|
7768 |
|
|
the parameter to zero makes it unlimited.
|
7769 |
|
|
.IP "\fBmin-nondebug-insn-uid\fR" 4
|
7770 |
|
|
.IX Item "min-nondebug-insn-uid"
|
7771 |
|
|
Use uids starting at this parameter for nondebug insns. The range below
|
7772 |
|
|
the parameter is reserved exclusively for debug insns created by
|
7773 |
|
|
\&\fB\-fvar\-tracking\-assignments\fR, but debug insns may get
|
7774 |
|
|
(non-overlapping) uids above it if the reserved range is exhausted.
|
7775 |
|
|
.IP "\fBipa-sra-ptr-growth-factor\fR" 4
|
7776 |
|
|
.IX Item "ipa-sra-ptr-growth-factor"
|
7777 |
|
|
IPA-SRA will replace a pointer to an aggregate with one or more new
|
7778 |
|
|
parameters only when their cumulative size is less or equal to
|
7779 |
|
|
\&\fBipa-sra-ptr-growth-factor\fR times the size of the original
|
7780 |
|
|
pointer parameter.
|
7781 |
|
|
.IP "\fBgraphite-max-nb-scop-params\fR" 4
|
7782 |
|
|
.IX Item "graphite-max-nb-scop-params"
|
7783 |
|
|
To avoid exponential effects in the Graphite loop transforms, the
|
7784 |
|
|
number of parameters in a Static Control Part (SCoP) is bounded. The
|
7785 |
|
|
default value is 10 parameters. A variable whose value is unknown at
|
7786 |
|
|
compile time and defined outside a SCoP is a parameter of the SCoP.
|
7787 |
|
|
.IP "\fBgraphite-max-bbs-per-function\fR" 4
|
7788 |
|
|
.IX Item "graphite-max-bbs-per-function"
|
7789 |
|
|
To avoid exponential effects in the detection of SCoPs, the size of
|
7790 |
|
|
the functions analyzed by Graphite is bounded. The default value is
|
7791 |
|
|
100 basic blocks.
|
7792 |
|
|
.IP "\fBloop-block-tile-size\fR" 4
|
7793 |
|
|
.IX Item "loop-block-tile-size"
|
7794 |
|
|
Loop blocking or strip mining transforms, enabled with
|
7795 |
|
|
\&\fB\-floop\-block\fR or \fB\-floop\-strip\-mine\fR, strip mine each
|
7796 |
|
|
loop in the loop nest by a given number of iterations. The strip
|
7797 |
|
|
length can be changed using the \fBloop-block-tile-size\fR
|
7798 |
|
|
parameter. The default value is 51 iterations.
|
7799 |
|
|
.RE
|
7800 |
|
|
.RS 4
|
7801 |
|
|
.RE
|
7802 |
|
|
.Sh "Options Controlling the Preprocessor"
|
7803 |
|
|
.IX Subsection "Options Controlling the Preprocessor"
|
7804 |
|
|
These options control the C preprocessor, which is run on each C source
|
7805 |
|
|
file before actual compilation.
|
7806 |
|
|
.PP
|
7807 |
|
|
If you use the \fB\-E\fR option, nothing is done except preprocessing.
|
7808 |
|
|
Some of these options make sense only together with \fB\-E\fR because
|
7809 |
|
|
they cause the preprocessor output to be unsuitable for actual
|
7810 |
|
|
compilation.
|
7811 |
|
|
.IP "\fB\-Wp,\fR\fIoption\fR" 4
|
7812 |
|
|
.IX Item "-Wp,option"
|
7813 |
|
|
You can use \fB\-Wp,\fR\fIoption\fR to bypass the compiler driver
|
7814 |
|
|
and pass \fIoption\fR directly through to the preprocessor. If
|
7815 |
|
|
\&\fIoption\fR contains commas, it is split into multiple options at the
|
7816 |
|
|
commas. However, many options are modified, translated or interpreted
|
7817 |
|
|
by the compiler driver before being passed to the preprocessor, and
|
7818 |
|
|
\&\fB\-Wp\fR forcibly bypasses this phase. The preprocessor's direct
|
7819 |
|
|
interface is undocumented and subject to change, so whenever possible
|
7820 |
|
|
you should avoid using \fB\-Wp\fR and let the driver handle the
|
7821 |
|
|
options instead.
|
7822 |
|
|
.IP "\fB\-Xpreprocessor\fR \fIoption\fR" 4
|
7823 |
|
|
.IX Item "-Xpreprocessor option"
|
7824 |
|
|
Pass \fIoption\fR as an option to the preprocessor. You can use this to
|
7825 |
|
|
supply system-specific preprocessor options which \s-1GCC\s0 does not know how to
|
7826 |
|
|
recognize.
|
7827 |
|
|
.Sp
|
7828 |
|
|
If you want to pass an option that takes an argument, you must use
|
7829 |
|
|
\&\fB\-Xpreprocessor\fR twice, once for the option and once for the argument.
|
7830 |
|
|
.IP "\fB\-D\fR \fIname\fR" 4
|
7831 |
|
|
.IX Item "-D name"
|
7832 |
|
|
Predefine \fIname\fR as a macro, with definition \f(CW1\fR.
|
7833 |
|
|
.IP "\fB\-D\fR \fIname\fR\fB=\fR\fIdefinition\fR" 4
|
7834 |
|
|
.IX Item "-D name=definition"
|
7835 |
|
|
The contents of \fIdefinition\fR are tokenized and processed as if
|
7836 |
|
|
they appeared during translation phase three in a \fB#define\fR
|
7837 |
|
|
directive. In particular, the definition will be truncated by
|
7838 |
|
|
embedded newline characters.
|
7839 |
|
|
.Sp
|
7840 |
|
|
If you are invoking the preprocessor from a shell or shell-like
|
7841 |
|
|
program you may need to use the shell's quoting syntax to protect
|
7842 |
|
|
characters such as spaces that have a meaning in the shell syntax.
|
7843 |
|
|
.Sp
|
7844 |
|
|
If you wish to define a function-like macro on the command line, write
|
7845 |
|
|
its argument list with surrounding parentheses before the equals sign
|
7846 |
|
|
(if any). Parentheses are meaningful to most shells, so you will need
|
7847 |
|
|
to quote the option. With \fBsh\fR and \fBcsh\fR,
|
7848 |
|
|
\&\fB\-D'\fR\fIname\fR\fB(\fR\fIargs...\fR\fB)=\fR\fIdefinition\fR\fB'\fR works.
|
7849 |
|
|
.Sp
|
7850 |
|
|
\&\fB\-D\fR and \fB\-U\fR options are processed in the order they
|
7851 |
|
|
are given on the command line. All \fB\-imacros\fR \fIfile\fR and
|
7852 |
|
|
\&\fB\-include\fR \fIfile\fR options are processed after all
|
7853 |
|
|
\&\fB\-D\fR and \fB\-U\fR options.
|
7854 |
|
|
.IP "\fB\-U\fR \fIname\fR" 4
|
7855 |
|
|
.IX Item "-U name"
|
7856 |
|
|
Cancel any previous definition of \fIname\fR, either built in or
|
7857 |
|
|
provided with a \fB\-D\fR option.
|
7858 |
|
|
.IP "\fB\-undef\fR" 4
|
7859 |
|
|
.IX Item "-undef"
|
7860 |
|
|
Do not predefine any system-specific or GCC-specific macros. The
|
7861 |
|
|
standard predefined macros remain defined.
|
7862 |
|
|
.IP "\fB\-I\fR \fIdir\fR" 4
|
7863 |
|
|
.IX Item "-I dir"
|
7864 |
|
|
Add the directory \fIdir\fR to the list of directories to be searched
|
7865 |
|
|
for header files.
|
7866 |
|
|
Directories named by \fB\-I\fR are searched before the standard
|
7867 |
|
|
system include directories. If the directory \fIdir\fR is a standard
|
7868 |
|
|
system include directory, the option is ignored to ensure that the
|
7869 |
|
|
default search order for system directories and the special treatment
|
7870 |
|
|
of system headers are not defeated
|
7871 |
|
|
\&.
|
7872 |
|
|
If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
|
7873 |
|
|
by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
|
7874 |
|
|
.IP "\fB\-o\fR \fIfile\fR" 4
|
7875 |
|
|
.IX Item "-o file"
|
7876 |
|
|
Write output to \fIfile\fR. This is the same as specifying \fIfile\fR
|
7877 |
|
|
as the second non-option argument to \fBcpp\fR. \fBgcc\fR has a
|
7878 |
|
|
different interpretation of a second non-option argument, so you must
|
7879 |
|
|
use \fB\-o\fR to specify the output file.
|
7880 |
|
|
.IP "\fB\-Wall\fR" 4
|
7881 |
|
|
.IX Item "-Wall"
|
7882 |
|
|
Turns on all optional warnings which are desirable for normal code.
|
7883 |
|
|
At present this is \fB\-Wcomment\fR, \fB\-Wtrigraphs\fR,
|
7884 |
|
|
\&\fB\-Wmultichar\fR and a warning about integer promotion causing a
|
7885 |
|
|
change of sign in \f(CW\*(C`#if\*(C'\fR expressions. Note that many of the
|
7886 |
|
|
preprocessor's warnings are on by default and have no options to
|
7887 |
|
|
control them.
|
7888 |
|
|
.IP "\fB\-Wcomment\fR" 4
|
7889 |
|
|
.IX Item "-Wcomment"
|
7890 |
|
|
.PD 0
|
7891 |
|
|
.IP "\fB\-Wcomments\fR" 4
|
7892 |
|
|
.IX Item "-Wcomments"
|
7893 |
|
|
.PD
|
7894 |
|
|
Warn whenever a comment-start sequence \fB/*\fR appears in a \fB/*\fR
|
7895 |
|
|
comment, or whenever a backslash-newline appears in a \fB//\fR comment.
|
7896 |
|
|
(Both forms have the same effect.)
|
7897 |
|
|
.IP "\fB\-Wtrigraphs\fR" 4
|
7898 |
|
|
.IX Item "-Wtrigraphs"
|
7899 |
|
|
Most trigraphs in comments cannot affect the meaning of the program.
|
7900 |
|
|
However, a trigraph that would form an escaped newline (\fB??/\fR at
|
7901 |
|
|
the end of a line) can, by changing where the comment begins or ends.
|
7902 |
|
|
Therefore, only trigraphs that would form escaped newlines produce
|
7903 |
|
|
warnings inside a comment.
|
7904 |
|
|
.Sp
|
7905 |
|
|
This option is implied by \fB\-Wall\fR. If \fB\-Wall\fR is not
|
7906 |
|
|
given, this option is still enabled unless trigraphs are enabled. To
|
7907 |
|
|
get trigraph conversion without warnings, but get the other
|
7908 |
|
|
\&\fB\-Wall\fR warnings, use \fB\-trigraphs \-Wall \-Wno\-trigraphs\fR.
|
7909 |
|
|
.IP "\fB\-Wtraditional\fR" 4
|
7910 |
|
|
.IX Item "-Wtraditional"
|
7911 |
|
|
Warn about certain constructs that behave differently in traditional and
|
7912 |
|
|
\&\s-1ISO\s0 C. Also warn about \s-1ISO\s0 C constructs that have no traditional C
|
7913 |
|
|
equivalent, and problematic constructs which should be avoided.
|
7914 |
|
|
.IP "\fB\-Wundef\fR" 4
|
7915 |
|
|
.IX Item "-Wundef"
|
7916 |
|
|
Warn whenever an identifier which is not a macro is encountered in an
|
7917 |
|
|
\&\fB#if\fR directive, outside of \fBdefined\fR. Such identifiers are
|
7918 |
|
|
replaced with zero.
|
7919 |
|
|
.IP "\fB\-Wunused\-macros\fR" 4
|
7920 |
|
|
.IX Item "-Wunused-macros"
|
7921 |
|
|
Warn about macros defined in the main file that are unused. A macro
|
7922 |
|
|
is \fIused\fR if it is expanded or tested for existence at least once.
|
7923 |
|
|
The preprocessor will also warn if the macro has not been used at the
|
7924 |
|
|
time it is redefined or undefined.
|
7925 |
|
|
.Sp
|
7926 |
|
|
Built-in macros, macros defined on the command line, and macros
|
7927 |
|
|
defined in include files are not warned about.
|
7928 |
|
|
.Sp
|
7929 |
|
|
\&\fINote:\fR If a macro is actually used, but only used in skipped
|
7930 |
|
|
conditional blocks, then \s-1CPP\s0 will report it as unused. To avoid the
|
7931 |
|
|
warning in such a case, you might improve the scope of the macro's
|
7932 |
|
|
definition by, for example, moving it into the first skipped block.
|
7933 |
|
|
Alternatively, you could provide a dummy use with something like:
|
7934 |
|
|
.Sp
|
7935 |
|
|
.Vb 2
|
7936 |
|
|
\& #if defined the_macro_causing_the_warning
|
7937 |
|
|
\& #endif
|
7938 |
|
|
.Ve
|
7939 |
|
|
.IP "\fB\-Wendif\-labels\fR" 4
|
7940 |
|
|
.IX Item "-Wendif-labels"
|
7941 |
|
|
Warn whenever an \fB#else\fR or an \fB#endif\fR are followed by text.
|
7942 |
|
|
This usually happens in code of the form
|
7943 |
|
|
.Sp
|
7944 |
|
|
.Vb 5
|
7945 |
|
|
\& #if FOO
|
7946 |
|
|
\& ...
|
7947 |
|
|
\& #else FOO
|
7948 |
|
|
\& ...
|
7949 |
|
|
\& #endif FOO
|
7950 |
|
|
.Ve
|
7951 |
|
|
.Sp
|
7952 |
|
|
The second and third \f(CW\*(C`FOO\*(C'\fR should be in comments, but often are not
|
7953 |
|
|
in older programs. This warning is on by default.
|
7954 |
|
|
.IP "\fB\-Werror\fR" 4
|
7955 |
|
|
.IX Item "-Werror"
|
7956 |
|
|
Make all warnings into hard errors. Source code which triggers warnings
|
7957 |
|
|
will be rejected.
|
7958 |
|
|
.IP "\fB\-Wsystem\-headers\fR" 4
|
7959 |
|
|
.IX Item "-Wsystem-headers"
|
7960 |
|
|
Issue warnings for code in system headers. These are normally unhelpful
|
7961 |
|
|
in finding bugs in your own code, therefore suppressed. If you are
|
7962 |
|
|
responsible for the system library, you may want to see them.
|
7963 |
|
|
.IP "\fB\-w\fR" 4
|
7964 |
|
|
.IX Item "-w"
|
7965 |
|
|
Suppress all warnings, including those which \s-1GNU\s0 \s-1CPP\s0 issues by default.
|
7966 |
|
|
.IP "\fB\-pedantic\fR" 4
|
7967 |
|
|
.IX Item "-pedantic"
|
7968 |
|
|
Issue all the mandatory diagnostics listed in the C standard. Some of
|
7969 |
|
|
them are left out by default, since they trigger frequently on harmless
|
7970 |
|
|
code.
|
7971 |
|
|
.IP "\fB\-pedantic\-errors\fR" 4
|
7972 |
|
|
.IX Item "-pedantic-errors"
|
7973 |
|
|
Issue all the mandatory diagnostics, and make all mandatory diagnostics
|
7974 |
|
|
into errors. This includes mandatory diagnostics that \s-1GCC\s0 issues
|
7975 |
|
|
without \fB\-pedantic\fR but treats as warnings.
|
7976 |
|
|
.IP "\fB\-M\fR" 4
|
7977 |
|
|
.IX Item "-M"
|
7978 |
|
|
Instead of outputting the result of preprocessing, output a rule
|
7979 |
|
|
suitable for \fBmake\fR describing the dependencies of the main
|
7980 |
|
|
source file. The preprocessor outputs one \fBmake\fR rule containing
|
7981 |
|
|
the object file name for that source file, a colon, and the names of all
|
7982 |
|
|
the included files, including those coming from \fB\-include\fR or
|
7983 |
|
|
\&\fB\-imacros\fR command line options.
|
7984 |
|
|
.Sp
|
7985 |
|
|
Unless specified explicitly (with \fB\-MT\fR or \fB\-MQ\fR), the
|
7986 |
|
|
object file name consists of the name of the source file with any
|
7987 |
|
|
suffix replaced with object file suffix and with any leading directory
|
7988 |
|
|
parts removed. If there are many included files then the rule is
|
7989 |
|
|
split into several lines using \fB\e\fR\-newline. The rule has no
|
7990 |
|
|
commands.
|
7991 |
|
|
.Sp
|
7992 |
|
|
This option does not suppress the preprocessor's debug output, such as
|
7993 |
|
|
\&\fB\-dM\fR. To avoid mixing such debug output with the dependency
|
7994 |
|
|
rules you should explicitly specify the dependency output file with
|
7995 |
|
|
\&\fB\-MF\fR, or use an environment variable like
|
7996 |
|
|
\&\fB\s-1DEPENDENCIES_OUTPUT\s0\fR. Debug output
|
7997 |
|
|
will still be sent to the regular output stream as normal.
|
7998 |
|
|
.Sp
|
7999 |
|
|
Passing \fB\-M\fR to the driver implies \fB\-E\fR, and suppresses
|
8000 |
|
|
warnings with an implicit \fB\-w\fR.
|
8001 |
|
|
.IP "\fB\-MM\fR" 4
|
8002 |
|
|
.IX Item "-MM"
|
8003 |
|
|
Like \fB\-M\fR but do not mention header files that are found in
|
8004 |
|
|
system header directories, nor header files that are included,
|
8005 |
|
|
directly or indirectly, from such a header.
|
8006 |
|
|
.Sp
|
8007 |
|
|
This implies that the choice of angle brackets or double quotes in an
|
8008 |
|
|
\&\fB#include\fR directive does not in itself determine whether that
|
8009 |
|
|
header will appear in \fB\-MM\fR dependency output. This is a
|
8010 |
|
|
slight change in semantics from \s-1GCC\s0 versions 3.0 and earlier.
|
8011 |
|
|
.IP "\fB\-MF\fR \fIfile\fR" 4
|
8012 |
|
|
.IX Item "-MF file"
|
8013 |
|
|
When used with \fB\-M\fR or \fB\-MM\fR, specifies a
|
8014 |
|
|
file to write the dependencies to. If no \fB\-MF\fR switch is given
|
8015 |
|
|
the preprocessor sends the rules to the same place it would have sent
|
8016 |
|
|
preprocessed output.
|
8017 |
|
|
.Sp
|
8018 |
|
|
When used with the driver options \fB\-MD\fR or \fB\-MMD\fR,
|
8019 |
|
|
\&\fB\-MF\fR overrides the default dependency output file.
|
8020 |
|
|
.IP "\fB\-MG\fR" 4
|
8021 |
|
|
.IX Item "-MG"
|
8022 |
|
|
In conjunction with an option such as \fB\-M\fR requesting
|
8023 |
|
|
dependency generation, \fB\-MG\fR assumes missing header files are
|
8024 |
|
|
generated files and adds them to the dependency list without raising
|
8025 |
|
|
an error. The dependency filename is taken directly from the
|
8026 |
|
|
\&\f(CW\*(C`#include\*(C'\fR directive without prepending any path. \fB\-MG\fR
|
8027 |
|
|
also suppresses preprocessed output, as a missing header file renders
|
8028 |
|
|
this useless.
|
8029 |
|
|
.Sp
|
8030 |
|
|
This feature is used in automatic updating of makefiles.
|
8031 |
|
|
.IP "\fB\-MP\fR" 4
|
8032 |
|
|
.IX Item "-MP"
|
8033 |
|
|
This option instructs \s-1CPP\s0 to add a phony target for each dependency
|
8034 |
|
|
other than the main file, causing each to depend on nothing. These
|
8035 |
|
|
dummy rules work around errors \fBmake\fR gives if you remove header
|
8036 |
|
|
files without updating the \fIMakefile\fR to match.
|
8037 |
|
|
.Sp
|
8038 |
|
|
This is typical output:
|
8039 |
|
|
.Sp
|
8040 |
|
|
.Vb 1
|
8041 |
|
|
\& test.o: test.c test.h
|
8042 |
|
|
\&
|
8043 |
|
|
\& test.h:
|
8044 |
|
|
.Ve
|
8045 |
|
|
.IP "\fB\-MT\fR \fItarget\fR" 4
|
8046 |
|
|
.IX Item "-MT target"
|
8047 |
|
|
Change the target of the rule emitted by dependency generation. By
|
8048 |
|
|
default \s-1CPP\s0 takes the name of the main input file, deletes any
|
8049 |
|
|
directory components and any file suffix such as \fB.c\fR, and
|
8050 |
|
|
appends the platform's usual object suffix. The result is the target.
|
8051 |
|
|
.Sp
|
8052 |
|
|
An \fB\-MT\fR option will set the target to be exactly the string you
|
8053 |
|
|
specify. If you want multiple targets, you can specify them as a single
|
8054 |
|
|
argument to \fB\-MT\fR, or use multiple \fB\-MT\fR options.
|
8055 |
|
|
.Sp
|
8056 |
|
|
For example, \fB\-MT\ '$(objpfx)foo.o'\fR might give
|
8057 |
|
|
.Sp
|
8058 |
|
|
.Vb 1
|
8059 |
|
|
\& $(objpfx)foo.o: foo.c
|
8060 |
|
|
.Ve
|
8061 |
|
|
.IP "\fB\-MQ\fR \fItarget\fR" 4
|
8062 |
|
|
.IX Item "-MQ target"
|
8063 |
|
|
Same as \fB\-MT\fR, but it quotes any characters which are special to
|
8064 |
|
|
Make. \fB\-MQ\ '$(objpfx)foo.o'\fR gives
|
8065 |
|
|
.Sp
|
8066 |
|
|
.Vb 1
|
8067 |
|
|
\& $$(objpfx)foo.o: foo.c
|
8068 |
|
|
.Ve
|
8069 |
|
|
.Sp
|
8070 |
|
|
The default target is automatically quoted, as if it were given with
|
8071 |
|
|
\&\fB\-MQ\fR.
|
8072 |
|
|
.IP "\fB\-MD\fR" 4
|
8073 |
|
|
.IX Item "-MD"
|
8074 |
|
|
\&\fB\-MD\fR is equivalent to \fB\-M \-MF\fR \fIfile\fR, except that
|
8075 |
|
|
\&\fB\-E\fR is not implied. The driver determines \fIfile\fR based on
|
8076 |
|
|
whether an \fB\-o\fR option is given. If it is, the driver uses its
|
8077 |
|
|
argument but with a suffix of \fI.d\fR, otherwise it takes the name
|
8078 |
|
|
of the input file, removes any directory components and suffix, and
|
8079 |
|
|
applies a \fI.d\fR suffix.
|
8080 |
|
|
.Sp
|
8081 |
|
|
If \fB\-MD\fR is used in conjunction with \fB\-E\fR, any
|
8082 |
|
|
\&\fB\-o\fR switch is understood to specify the dependency output file, but if used without \fB\-E\fR, each \fB\-o\fR
|
8083 |
|
|
is understood to specify a target object file.
|
8084 |
|
|
.Sp
|
8085 |
|
|
Since \fB\-E\fR is not implied, \fB\-MD\fR can be used to generate
|
8086 |
|
|
a dependency output file as a side-effect of the compilation process.
|
8087 |
|
|
.IP "\fB\-MMD\fR" 4
|
8088 |
|
|
.IX Item "-MMD"
|
8089 |
|
|
Like \fB\-MD\fR except mention only user header files, not system
|
8090 |
|
|
header files.
|
8091 |
|
|
.IP "\fB\-fpch\-deps\fR" 4
|
8092 |
|
|
.IX Item "-fpch-deps"
|
8093 |
|
|
When using precompiled headers, this flag
|
8094 |
|
|
will cause the dependency-output flags to also list the files from the
|
8095 |
|
|
precompiled header's dependencies. If not specified only the
|
8096 |
|
|
precompiled header would be listed and not the files that were used to
|
8097 |
|
|
create it because those files are not consulted when a precompiled
|
8098 |
|
|
header is used.
|
8099 |
|
|
.IP "\fB\-fpch\-preprocess\fR" 4
|
8100 |
|
|
.IX Item "-fpch-preprocess"
|
8101 |
|
|
This option allows use of a precompiled header together with \fB\-E\fR. It inserts a special \f(CW\*(C`#pragma\*(C'\fR,
|
8102 |
|
|
\&\f(CW\*(C`#pragma GCC pch_preprocess ""\*(C'\fR in the output to mark
|
8103 |
|
|
the place where the precompiled header was found, and its filename. When
|
8104 |
|
|
\&\fB\-fpreprocessed\fR is in use, \s-1GCC\s0 recognizes this \f(CW\*(C`#pragma\*(C'\fR and
|
8105 |
|
|
loads the \s-1PCH\s0.
|
8106 |
|
|
.Sp
|
8107 |
|
|
This option is off by default, because the resulting preprocessed output
|
8108 |
|
|
is only really suitable as input to \s-1GCC\s0. It is switched on by
|
8109 |
|
|
\&\fB\-save\-temps\fR.
|
8110 |
|
|
.Sp
|
8111 |
|
|
You should not write this \f(CW\*(C`#pragma\*(C'\fR in your own code, but it is
|
8112 |
|
|
safe to edit the filename if the \s-1PCH\s0 file is available in a different
|
8113 |
|
|
location. The filename may be absolute or it may be relative to \s-1GCC\s0's
|
8114 |
|
|
current directory.
|
8115 |
|
|
.IP "\fB\-x c\fR" 4
|
8116 |
|
|
.IX Item "-x c"
|
8117 |
|
|
.PD 0
|
8118 |
|
|
.IP "\fB\-x c++\fR" 4
|
8119 |
|
|
.IX Item "-x c++"
|
8120 |
|
|
.IP "\fB\-x objective-c\fR" 4
|
8121 |
|
|
.IX Item "-x objective-c"
|
8122 |
|
|
.IP "\fB\-x assembler-with-cpp\fR" 4
|
8123 |
|
|
.IX Item "-x assembler-with-cpp"
|
8124 |
|
|
.PD
|
8125 |
|
|
Specify the source language: C, \*(C+, Objective-C, or assembly. This has
|
8126 |
|
|
nothing to do with standards conformance or extensions; it merely
|
8127 |
|
|
selects which base syntax to expect. If you give none of these options,
|
8128 |
|
|
cpp will deduce the language from the extension of the source file:
|
8129 |
|
|
\&\fB.c\fR, \fB.cc\fR, \fB.m\fR, or \fB.S\fR. Some other common
|
8130 |
|
|
extensions for \*(C+ and assembly are also recognized. If cpp does not
|
8131 |
|
|
recognize the extension, it will treat the file as C; this is the most
|
8132 |
|
|
generic mode.
|
8133 |
|
|
.Sp
|
8134 |
|
|
\&\fINote:\fR Previous versions of cpp accepted a \fB\-lang\fR option
|
8135 |
|
|
which selected both the language and the standards conformance level.
|
8136 |
|
|
This option has been removed, because it conflicts with the \fB\-l\fR
|
8137 |
|
|
option.
|
8138 |
|
|
.IP "\fB\-std=\fR\fIstandard\fR" 4
|
8139 |
|
|
.IX Item "-std=standard"
|
8140 |
|
|
.PD 0
|
8141 |
|
|
.IP "\fB\-ansi\fR" 4
|
8142 |
|
|
.IX Item "-ansi"
|
8143 |
|
|
.PD
|
8144 |
|
|
Specify the standard to which the code should conform. Currently \s-1CPP\s0
|
8145 |
|
|
knows about C and \*(C+ standards; others may be added in the future.
|
8146 |
|
|
.Sp
|
8147 |
|
|
\&\fIstandard\fR
|
8148 |
|
|
may be one of:
|
8149 |
|
|
.RS 4
|
8150 |
|
|
.ie n .IP """c90""" 4
|
8151 |
|
|
.el .IP "\f(CWc90\fR" 4
|
8152 |
|
|
.IX Item "c90"
|
8153 |
|
|
.PD 0
|
8154 |
|
|
.ie n .IP """c89""" 4
|
8155 |
|
|
.el .IP "\f(CWc89\fR" 4
|
8156 |
|
|
.IX Item "c89"
|
8157 |
|
|
.ie n .IP """iso9899:1990""" 4
|
8158 |
|
|
.el .IP "\f(CWiso9899:1990\fR" 4
|
8159 |
|
|
.IX Item "iso9899:1990"
|
8160 |
|
|
.PD
|
8161 |
|
|
The \s-1ISO\s0 C standard from 1990. \fBc90\fR is the customary shorthand for
|
8162 |
|
|
this version of the standard.
|
8163 |
|
|
.Sp
|
8164 |
|
|
The \fB\-ansi\fR option is equivalent to \fB\-std=c90\fR.
|
8165 |
|
|
.ie n .IP """iso9899:199409""" 4
|
8166 |
|
|
.el .IP "\f(CWiso9899:199409\fR" 4
|
8167 |
|
|
.IX Item "iso9899:199409"
|
8168 |
|
|
The 1990 C standard, as amended in 1994.
|
8169 |
|
|
.ie n .IP """iso9899:1999""" 4
|
8170 |
|
|
.el .IP "\f(CWiso9899:1999\fR" 4
|
8171 |
|
|
.IX Item "iso9899:1999"
|
8172 |
|
|
.PD 0
|
8173 |
|
|
.ie n .IP """c99""" 4
|
8174 |
|
|
.el .IP "\f(CWc99\fR" 4
|
8175 |
|
|
.IX Item "c99"
|
8176 |
|
|
.ie n .IP """iso9899:199x""" 4
|
8177 |
|
|
.el .IP "\f(CWiso9899:199x\fR" 4
|
8178 |
|
|
.IX Item "iso9899:199x"
|
8179 |
|
|
.ie n .IP """c9x""" 4
|
8180 |
|
|
.el .IP "\f(CWc9x\fR" 4
|
8181 |
|
|
.IX Item "c9x"
|
8182 |
|
|
.PD
|
8183 |
|
|
The revised \s-1ISO\s0 C standard, published in December 1999. Before
|
8184 |
|
|
publication, this was known as C9X.
|
8185 |
|
|
.ie n .IP """gnu90""" 4
|
8186 |
|
|
.el .IP "\f(CWgnu90\fR" 4
|
8187 |
|
|
.IX Item "gnu90"
|
8188 |
|
|
.PD 0
|
8189 |
|
|
.ie n .IP """gnu89""" 4
|
8190 |
|
|
.el .IP "\f(CWgnu89\fR" 4
|
8191 |
|
|
.IX Item "gnu89"
|
8192 |
|
|
.PD
|
8193 |
|
|
The 1990 C standard plus \s-1GNU\s0 extensions. This is the default.
|
8194 |
|
|
.ie n .IP """gnu99""" 4
|
8195 |
|
|
.el .IP "\f(CWgnu99\fR" 4
|
8196 |
|
|
.IX Item "gnu99"
|
8197 |
|
|
.PD 0
|
8198 |
|
|
.ie n .IP """gnu9x""" 4
|
8199 |
|
|
.el .IP "\f(CWgnu9x\fR" 4
|
8200 |
|
|
.IX Item "gnu9x"
|
8201 |
|
|
.PD
|
8202 |
|
|
The 1999 C standard plus \s-1GNU\s0 extensions.
|
8203 |
|
|
.ie n .IP """c++98""" 4
|
8204 |
|
|
.el .IP "\f(CWc++98\fR" 4
|
8205 |
|
|
.IX Item "c++98"
|
8206 |
|
|
The 1998 \s-1ISO\s0 \*(C+ standard plus amendments.
|
8207 |
|
|
.ie n .IP """gnu++98""" 4
|
8208 |
|
|
.el .IP "\f(CWgnu++98\fR" 4
|
8209 |
|
|
.IX Item "gnu++98"
|
8210 |
|
|
The same as \fB\-std=c++98\fR plus \s-1GNU\s0 extensions. This is the
|
8211 |
|
|
default for \*(C+ code.
|
8212 |
|
|
.RE
|
8213 |
|
|
.RS 4
|
8214 |
|
|
.RE
|
8215 |
|
|
.IP "\fB\-I\-\fR" 4
|
8216 |
|
|
.IX Item "-I-"
|
8217 |
|
|
Split the include path. Any directories specified with \fB\-I\fR
|
8218 |
|
|
options before \fB\-I\-\fR are searched only for headers requested with
|
8219 |
|
|
\&\f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR; they are not searched for
|
8220 |
|
|
\&\f(CW\*(C`#include\ <\f(CIfile\f(CW>\*(C'\fR. If additional directories are
|
8221 |
|
|
specified with \fB\-I\fR options after the \fB\-I\-\fR, those
|
8222 |
|
|
directories are searched for all \fB#include\fR directives.
|
8223 |
|
|
.Sp
|
8224 |
|
|
In addition, \fB\-I\-\fR inhibits the use of the directory of the current
|
8225 |
|
|
file directory as the first search directory for \f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR.
|
8226 |
|
|
This option has been deprecated.
|
8227 |
|
|
.IP "\fB\-nostdinc\fR" 4
|
8228 |
|
|
.IX Item "-nostdinc"
|
8229 |
|
|
Do not search the standard system directories for header files.
|
8230 |
|
|
Only the directories you have specified with \fB\-I\fR options
|
8231 |
|
|
(and the directory of the current file, if appropriate) are searched.
|
8232 |
|
|
.IP "\fB\-nostdinc++\fR" 4
|
8233 |
|
|
.IX Item "-nostdinc++"
|
8234 |
|
|
Do not search for header files in the \*(C+\-specific standard directories,
|
8235 |
|
|
but do still search the other standard directories. (This option is
|
8236 |
|
|
used when building the \*(C+ library.)
|
8237 |
|
|
.IP "\fB\-include\fR \fIfile\fR" 4
|
8238 |
|
|
.IX Item "-include file"
|
8239 |
|
|
Process \fIfile\fR as if \f(CW\*(C`#include "file"\*(C'\fR appeared as the first
|
8240 |
|
|
line of the primary source file. However, the first directory searched
|
8241 |
|
|
for \fIfile\fR is the preprocessor's working directory \fIinstead of\fR
|
8242 |
|
|
the directory containing the main source file. If not found there, it
|
8243 |
|
|
is searched for in the remainder of the \f(CW\*(C`#include "..."\*(C'\fR search
|
8244 |
|
|
chain as normal.
|
8245 |
|
|
.Sp
|
8246 |
|
|
If multiple \fB\-include\fR options are given, the files are included
|
8247 |
|
|
in the order they appear on the command line.
|
8248 |
|
|
.IP "\fB\-imacros\fR \fIfile\fR" 4
|
8249 |
|
|
.IX Item "-imacros file"
|
8250 |
|
|
Exactly like \fB\-include\fR, except that any output produced by
|
8251 |
|
|
scanning \fIfile\fR is thrown away. Macros it defines remain defined.
|
8252 |
|
|
This allows you to acquire all the macros from a header without also
|
8253 |
|
|
processing its declarations.
|
8254 |
|
|
.Sp
|
8255 |
|
|
All files specified by \fB\-imacros\fR are processed before all files
|
8256 |
|
|
specified by \fB\-include\fR.
|
8257 |
|
|
.IP "\fB\-idirafter\fR \fIdir\fR" 4
|
8258 |
|
|
.IX Item "-idirafter dir"
|
8259 |
|
|
Search \fIdir\fR for header files, but do it \fIafter\fR all
|
8260 |
|
|
directories specified with \fB\-I\fR and the standard system directories
|
8261 |
|
|
have been exhausted. \fIdir\fR is treated as a system include directory.
|
8262 |
|
|
If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
|
8263 |
|
|
by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
|
8264 |
|
|
.IP "\fB\-iprefix\fR \fIprefix\fR" 4
|
8265 |
|
|
.IX Item "-iprefix prefix"
|
8266 |
|
|
Specify \fIprefix\fR as the prefix for subsequent \fB\-iwithprefix\fR
|
8267 |
|
|
options. If the prefix represents a directory, you should include the
|
8268 |
|
|
final \fB/\fR.
|
8269 |
|
|
.IP "\fB\-iwithprefix\fR \fIdir\fR" 4
|
8270 |
|
|
.IX Item "-iwithprefix dir"
|
8271 |
|
|
.PD 0
|
8272 |
|
|
.IP "\fB\-iwithprefixbefore\fR \fIdir\fR" 4
|
8273 |
|
|
.IX Item "-iwithprefixbefore dir"
|
8274 |
|
|
.PD
|
8275 |
|
|
Append \fIdir\fR to the prefix specified previously with
|
8276 |
|
|
\&\fB\-iprefix\fR, and add the resulting directory to the include search
|
8277 |
|
|
path. \fB\-iwithprefixbefore\fR puts it in the same place \fB\-I\fR
|
8278 |
|
|
would; \fB\-iwithprefix\fR puts it where \fB\-idirafter\fR would.
|
8279 |
|
|
.IP "\fB\-isysroot\fR \fIdir\fR" 4
|
8280 |
|
|
.IX Item "-isysroot dir"
|
8281 |
|
|
This option is like the \fB\-\-sysroot\fR option, but applies only to
|
8282 |
|
|
header files. See the \fB\-\-sysroot\fR option for more information.
|
8283 |
|
|
.IP "\fB\-imultilib\fR \fIdir\fR" 4
|
8284 |
|
|
.IX Item "-imultilib dir"
|
8285 |
|
|
Use \fIdir\fR as a subdirectory of the directory containing
|
8286 |
|
|
target-specific \*(C+ headers.
|
8287 |
|
|
.IP "\fB\-isystem\fR \fIdir\fR" 4
|
8288 |
|
|
.IX Item "-isystem dir"
|
8289 |
|
|
Search \fIdir\fR for header files, after all directories specified by
|
8290 |
|
|
\&\fB\-I\fR but before the standard system directories. Mark it
|
8291 |
|
|
as a system directory, so that it gets the same special treatment as
|
8292 |
|
|
is applied to the standard system directories.
|
8293 |
|
|
If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
|
8294 |
|
|
by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
|
8295 |
|
|
.IP "\fB\-iquote\fR \fIdir\fR" 4
|
8296 |
|
|
.IX Item "-iquote dir"
|
8297 |
|
|
Search \fIdir\fR only for header files requested with
|
8298 |
|
|
\&\f(CW\*(C`#include\ "\f(CIfile\f(CW"\*(C'\fR; they are not searched for
|
8299 |
|
|
\&\f(CW\*(C`#include\ <\f(CIfile\f(CW>\*(C'\fR, before all directories specified by
|
8300 |
|
|
\&\fB\-I\fR and before the standard system directories.
|
8301 |
|
|
If \fIdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
|
8302 |
|
|
by the sysroot prefix; see \fB\-\-sysroot\fR and \fB\-isysroot\fR.
|
8303 |
|
|
.IP "\fB\-fdirectives\-only\fR" 4
|
8304 |
|
|
.IX Item "-fdirectives-only"
|
8305 |
|
|
When preprocessing, handle directives, but do not expand macros.
|
8306 |
|
|
.Sp
|
8307 |
|
|
The option's behavior depends on the \fB\-E\fR and \fB\-fpreprocessed\fR
|
8308 |
|
|
options.
|
8309 |
|
|
.Sp
|
8310 |
|
|
With \fB\-E\fR, preprocessing is limited to the handling of directives
|
8311 |
|
|
such as \f(CW\*(C`#define\*(C'\fR, \f(CW\*(C`#ifdef\*(C'\fR, and \f(CW\*(C`#error\*(C'\fR. Other
|
8312 |
|
|
preprocessor operations, such as macro expansion and trigraph
|
8313 |
|
|
conversion are not performed. In addition, the \fB\-dD\fR option is
|
8314 |
|
|
implicitly enabled.
|
8315 |
|
|
.Sp
|
8316 |
|
|
With \fB\-fpreprocessed\fR, predefinition of command line and most
|
8317 |
|
|
builtin macros is disabled. Macros such as \f(CW\*(C`_\|_LINE_\|_\*(C'\fR, which are
|
8318 |
|
|
contextually dependent, are handled normally. This enables compilation of
|
8319 |
|
|
files previously preprocessed with \f(CW\*(C`\-E \-fdirectives\-only\*(C'\fR.
|
8320 |
|
|
.Sp
|
8321 |
|
|
With both \fB\-E\fR and \fB\-fpreprocessed\fR, the rules for
|
8322 |
|
|
\&\fB\-fpreprocessed\fR take precedence. This enables full preprocessing of
|
8323 |
|
|
files previously preprocessed with \f(CW\*(C`\-E \-fdirectives\-only\*(C'\fR.
|
8324 |
|
|
.IP "\fB\-fdollars\-in\-identifiers\fR" 4
|
8325 |
|
|
.IX Item "-fdollars-in-identifiers"
|
8326 |
|
|
Accept \fB$\fR in identifiers.
|
8327 |
|
|
.IP "\fB\-fextended\-identifiers\fR" 4
|
8328 |
|
|
.IX Item "-fextended-identifiers"
|
8329 |
|
|
Accept universal character names in identifiers. This option is
|
8330 |
|
|
experimental; in a future version of \s-1GCC\s0, it will be enabled by
|
8331 |
|
|
default for C99 and \*(C+.
|
8332 |
|
|
.IP "\fB\-fpreprocessed\fR" 4
|
8333 |
|
|
.IX Item "-fpreprocessed"
|
8334 |
|
|
Indicate to the preprocessor that the input file has already been
|
8335 |
|
|
preprocessed. This suppresses things like macro expansion, trigraph
|
8336 |
|
|
conversion, escaped newline splicing, and processing of most directives.
|
8337 |
|
|
The preprocessor still recognizes and removes comments, so that you can
|
8338 |
|
|
pass a file preprocessed with \fB\-C\fR to the compiler without
|
8339 |
|
|
problems. In this mode the integrated preprocessor is little more than
|
8340 |
|
|
a tokenizer for the front ends.
|
8341 |
|
|
.Sp
|
8342 |
|
|
\&\fB\-fpreprocessed\fR is implicit if the input file has one of the
|
8343 |
|
|
extensions \fB.i\fR, \fB.ii\fR or \fB.mi\fR. These are the
|
8344 |
|
|
extensions that \s-1GCC\s0 uses for preprocessed files created by
|
8345 |
|
|
\&\fB\-save\-temps\fR.
|
8346 |
|
|
.IP "\fB\-ftabstop=\fR\fIwidth\fR" 4
|
8347 |
|
|
.IX Item "-ftabstop=width"
|
8348 |
|
|
Set the distance between tab stops. This helps the preprocessor report
|
8349 |
|
|
correct column numbers in warnings or errors, even if tabs appear on the
|
8350 |
|
|
line. If the value is less than 1 or greater than 100, the option is
|
8351 |
|
|
ignored. The default is 8.
|
8352 |
|
|
.IP "\fB\-fexec\-charset=\fR\fIcharset\fR" 4
|
8353 |
|
|
.IX Item "-fexec-charset=charset"
|
8354 |
|
|
Set the execution character set, used for string and character
|
8355 |
|
|
constants. The default is \s-1UTF\-8\s0. \fIcharset\fR can be any encoding
|
8356 |
|
|
supported by the system's \f(CW\*(C`iconv\*(C'\fR library routine.
|
8357 |
|
|
.IP "\fB\-fwide\-exec\-charset=\fR\fIcharset\fR" 4
|
8358 |
|
|
.IX Item "-fwide-exec-charset=charset"
|
8359 |
|
|
Set the wide execution character set, used for wide string and
|
8360 |
|
|
character constants. The default is \s-1UTF\-32\s0 or \s-1UTF\-16\s0, whichever
|
8361 |
|
|
corresponds to the width of \f(CW\*(C`wchar_t\*(C'\fR. As with
|
8362 |
|
|
\&\fB\-fexec\-charset\fR, \fIcharset\fR can be any encoding supported
|
8363 |
|
|
by the system's \f(CW\*(C`iconv\*(C'\fR library routine; however, you will have
|
8364 |
|
|
problems with encodings that do not fit exactly in \f(CW\*(C`wchar_t\*(C'\fR.
|
8365 |
|
|
.IP "\fB\-finput\-charset=\fR\fIcharset\fR" 4
|
8366 |
|
|
.IX Item "-finput-charset=charset"
|
8367 |
|
|
Set the input character set, used for translation from the character
|
8368 |
|
|
set of the input file to the source character set used by \s-1GCC\s0. If the
|
8369 |
|
|
locale does not specify, or \s-1GCC\s0 cannot get this information from the
|
8370 |
|
|
locale, the default is \s-1UTF\-8\s0. This can be overridden by either the locale
|
8371 |
|
|
or this command line option. Currently the command line option takes
|
8372 |
|
|
precedence if there's a conflict. \fIcharset\fR can be any encoding
|
8373 |
|
|
supported by the system's \f(CW\*(C`iconv\*(C'\fR library routine.
|
8374 |
|
|
.IP "\fB\-fworking\-directory\fR" 4
|
8375 |
|
|
.IX Item "-fworking-directory"
|
8376 |
|
|
Enable generation of linemarkers in the preprocessor output that will
|
8377 |
|
|
let the compiler know the current working directory at the time of
|
8378 |
|
|
preprocessing. When this option is enabled, the preprocessor will
|
8379 |
|
|
emit, after the initial linemarker, a second linemarker with the
|
8380 |
|
|
current working directory followed by two slashes. \s-1GCC\s0 will use this
|
8381 |
|
|
directory, when it's present in the preprocessed input, as the
|
8382 |
|
|
directory emitted as the current working directory in some debugging
|
8383 |
|
|
information formats. This option is implicitly enabled if debugging
|
8384 |
|
|
information is enabled, but this can be inhibited with the negated
|
8385 |
|
|
form \fB\-fno\-working\-directory\fR. If the \fB\-P\fR flag is
|
8386 |
|
|
present in the command line, this option has no effect, since no
|
8387 |
|
|
\&\f(CW\*(C`#line\*(C'\fR directives are emitted whatsoever.
|
8388 |
|
|
.IP "\fB\-fno\-show\-column\fR" 4
|
8389 |
|
|
.IX Item "-fno-show-column"
|
8390 |
|
|
Do not print column numbers in diagnostics. This may be necessary if
|
8391 |
|
|
diagnostics are being scanned by a program that does not understand the
|
8392 |
|
|
column numbers, such as \fBdejagnu\fR.
|
8393 |
|
|
.IP "\fB\-A\fR \fIpredicate\fR\fB=\fR\fIanswer\fR" 4
|
8394 |
|
|
.IX Item "-A predicate=answer"
|
8395 |
|
|
Make an assertion with the predicate \fIpredicate\fR and answer
|
8396 |
|
|
\&\fIanswer\fR. This form is preferred to the older form \fB\-A\fR
|
8397 |
|
|
\&\fIpredicate\fR\fB(\fR\fIanswer\fR\fB)\fR, which is still supported, because
|
8398 |
|
|
it does not use shell special characters.
|
8399 |
|
|
.IP "\fB\-A \-\fR\fIpredicate\fR\fB=\fR\fIanswer\fR" 4
|
8400 |
|
|
.IX Item "-A -predicate=answer"
|
8401 |
|
|
Cancel an assertion with the predicate \fIpredicate\fR and answer
|
8402 |
|
|
\&\fIanswer\fR.
|
8403 |
|
|
.IP "\fB\-dCHARS\fR" 4
|
8404 |
|
|
.IX Item "-dCHARS"
|
8405 |
|
|
\&\fI\s-1CHARS\s0\fR is a sequence of one or more of the following characters,
|
8406 |
|
|
and must not be preceded by a space. Other characters are interpreted
|
8407 |
|
|
by the compiler proper, or reserved for future versions of \s-1GCC\s0, and so
|
8408 |
|
|
are silently ignored. If you specify characters whose behavior
|
8409 |
|
|
conflicts, the result is undefined.
|
8410 |
|
|
.RS 4
|
8411 |
|
|
.IP "\fBM\fR" 4
|
8412 |
|
|
.IX Item "M"
|
8413 |
|
|
Instead of the normal output, generate a list of \fB#define\fR
|
8414 |
|
|
directives for all the macros defined during the execution of the
|
8415 |
|
|
preprocessor, including predefined macros. This gives you a way of
|
8416 |
|
|
finding out what is predefined in your version of the preprocessor.
|
8417 |
|
|
Assuming you have no file \fIfoo.h\fR, the command
|
8418 |
|
|
.Sp
|
8419 |
|
|
.Vb 1
|
8420 |
|
|
\& touch foo.h; cpp \-dM foo.h
|
8421 |
|
|
.Ve
|
8422 |
|
|
.Sp
|
8423 |
|
|
will show all the predefined macros.
|
8424 |
|
|
.Sp
|
8425 |
|
|
If you use \fB\-dM\fR without the \fB\-E\fR option, \fB\-dM\fR is
|
8426 |
|
|
interpreted as a synonym for \fB\-fdump\-rtl\-mach\fR.
|
8427 |
|
|
.IP "\fBD\fR" 4
|
8428 |
|
|
.IX Item "D"
|
8429 |
|
|
Like \fBM\fR except in two respects: it does \fInot\fR include the
|
8430 |
|
|
predefined macros, and it outputs \fIboth\fR the \fB#define\fR
|
8431 |
|
|
directives and the result of preprocessing. Both kinds of output go to
|
8432 |
|
|
the standard output file.
|
8433 |
|
|
.IP "\fBN\fR" 4
|
8434 |
|
|
.IX Item "N"
|
8435 |
|
|
Like \fBD\fR, but emit only the macro names, not their expansions.
|
8436 |
|
|
.IP "\fBI\fR" 4
|
8437 |
|
|
.IX Item "I"
|
8438 |
|
|
Output \fB#include\fR directives in addition to the result of
|
8439 |
|
|
preprocessing.
|
8440 |
|
|
.IP "\fBU\fR" 4
|
8441 |
|
|
.IX Item "U"
|
8442 |
|
|
Like \fBD\fR except that only macros that are expanded, or whose
|
8443 |
|
|
definedness is tested in preprocessor directives, are output; the
|
8444 |
|
|
output is delayed until the use or test of the macro; and
|
8445 |
|
|
\&\fB#undef\fR directives are also output for macros tested but
|
8446 |
|
|
undefined at the time.
|
8447 |
|
|
.RE
|
8448 |
|
|
.RS 4
|
8449 |
|
|
.RE
|
8450 |
|
|
.IP "\fB\-P\fR" 4
|
8451 |
|
|
.IX Item "-P"
|
8452 |
|
|
Inhibit generation of linemarkers in the output from the preprocessor.
|
8453 |
|
|
This might be useful when running the preprocessor on something that is
|
8454 |
|
|
not C code, and will be sent to a program which might be confused by the
|
8455 |
|
|
linemarkers.
|
8456 |
|
|
.IP "\fB\-C\fR" 4
|
8457 |
|
|
.IX Item "-C"
|
8458 |
|
|
Do not discard comments. All comments are passed through to the output
|
8459 |
|
|
file, except for comments in processed directives, which are deleted
|
8460 |
|
|
along with the directive.
|
8461 |
|
|
.Sp
|
8462 |
|
|
You should be prepared for side effects when using \fB\-C\fR; it
|
8463 |
|
|
causes the preprocessor to treat comments as tokens in their own right.
|
8464 |
|
|
For example, comments appearing at the start of what would be a
|
8465 |
|
|
directive line have the effect of turning that line into an ordinary
|
8466 |
|
|
source line, since the first token on the line is no longer a \fB#\fR.
|
8467 |
|
|
.IP "\fB\-CC\fR" 4
|
8468 |
|
|
.IX Item "-CC"
|
8469 |
|
|
Do not discard comments, including during macro expansion. This is
|
8470 |
|
|
like \fB\-C\fR, except that comments contained within macros are
|
8471 |
|
|
also passed through to the output file where the macro is expanded.
|
8472 |
|
|
.Sp
|
8473 |
|
|
In addition to the side-effects of the \fB\-C\fR option, the
|
8474 |
|
|
\&\fB\-CC\fR option causes all \*(C+\-style comments inside a macro
|
8475 |
|
|
to be converted to C\-style comments. This is to prevent later use
|
8476 |
|
|
of that macro from inadvertently commenting out the remainder of
|
8477 |
|
|
the source line.
|
8478 |
|
|
.Sp
|
8479 |
|
|
The \fB\-CC\fR option is generally used to support lint comments.
|
8480 |
|
|
.IP "\fB\-traditional\-cpp\fR" 4
|
8481 |
|
|
.IX Item "-traditional-cpp"
|
8482 |
|
|
Try to imitate the behavior of old-fashioned C preprocessors, as
|
8483 |
|
|
opposed to \s-1ISO\s0 C preprocessors.
|
8484 |
|
|
.IP "\fB\-trigraphs\fR" 4
|
8485 |
|
|
.IX Item "-trigraphs"
|
8486 |
|
|
Process trigraph sequences.
|
8487 |
|
|
These are three-character sequences, all starting with \fB??\fR, that
|
8488 |
|
|
are defined by \s-1ISO\s0 C to stand for single characters. For example,
|
8489 |
|
|
\&\fB??/\fR stands for \fB\e\fR, so \fB'??/n'\fR is a character
|
8490 |
|
|
constant for a newline. By default, \s-1GCC\s0 ignores trigraphs, but in
|
8491 |
|
|
standard-conforming modes it converts them. See the \fB\-std\fR and
|
8492 |
|
|
\&\fB\-ansi\fR options.
|
8493 |
|
|
.Sp
|
8494 |
|
|
The nine trigraphs and their replacements are
|
8495 |
|
|
.Sp
|
8496 |
|
|
.Vb 2
|
8497 |
|
|
\& Trigraph: ??( ??) ??< ??> ??= ??/ ??\*(Aq ??! ??\-
|
8498 |
|
|
\& Replacement: [ ] { } # \e ^ | ~
|
8499 |
|
|
.Ve
|
8500 |
|
|
.IP "\fB\-remap\fR" 4
|
8501 |
|
|
.IX Item "-remap"
|
8502 |
|
|
Enable special code to work around file systems which only permit very
|
8503 |
|
|
short file names, such as MS-DOS.
|
8504 |
|
|
.IP "\fB\-\-help\fR" 4
|
8505 |
|
|
.IX Item "--help"
|
8506 |
|
|
.PD 0
|
8507 |
|
|
.IP "\fB\-\-target\-help\fR" 4
|
8508 |
|
|
.IX Item "--target-help"
|
8509 |
|
|
.PD
|
8510 |
|
|
Print text describing all the command line options instead of
|
8511 |
|
|
preprocessing anything.
|
8512 |
|
|
.IP "\fB\-v\fR" 4
|
8513 |
|
|
.IX Item "-v"
|
8514 |
|
|
Verbose mode. Print out \s-1GNU\s0 \s-1CPP\s0's version number at the beginning of
|
8515 |
|
|
execution, and report the final form of the include path.
|
8516 |
|
|
.IP "\fB\-H\fR" 4
|
8517 |
|
|
.IX Item "-H"
|
8518 |
|
|
Print the name of each header file used, in addition to other normal
|
8519 |
|
|
activities. Each name is indented to show how deep in the
|
8520 |
|
|
\&\fB#include\fR stack it is. Precompiled header files are also
|
8521 |
|
|
printed, even if they are found to be invalid; an invalid precompiled
|
8522 |
|
|
header file is printed with \fB...x\fR and a valid one with \fB...!\fR .
|
8523 |
|
|
.IP "\fB\-version\fR" 4
|
8524 |
|
|
.IX Item "-version"
|
8525 |
|
|
.PD 0
|
8526 |
|
|
.IP "\fB\-\-version\fR" 4
|
8527 |
|
|
.IX Item "--version"
|
8528 |
|
|
.PD
|
8529 |
|
|
Print out \s-1GNU\s0 \s-1CPP\s0's version number. With one dash, proceed to
|
8530 |
|
|
preprocess as normal. With two dashes, exit immediately.
|
8531 |
|
|
.Sh "Passing Options to the Assembler"
|
8532 |
|
|
.IX Subsection "Passing Options to the Assembler"
|
8533 |
|
|
You can pass options to the assembler.
|
8534 |
|
|
.IP "\fB\-Wa,\fR\fIoption\fR" 4
|
8535 |
|
|
.IX Item "-Wa,option"
|
8536 |
|
|
Pass \fIoption\fR as an option to the assembler. If \fIoption\fR
|
8537 |
|
|
contains commas, it is split into multiple options at the commas.
|
8538 |
|
|
.IP "\fB\-Xassembler\fR \fIoption\fR" 4
|
8539 |
|
|
.IX Item "-Xassembler option"
|
8540 |
|
|
Pass \fIoption\fR as an option to the assembler. You can use this to
|
8541 |
|
|
supply system-specific assembler options which \s-1GCC\s0 does not know how to
|
8542 |
|
|
recognize.
|
8543 |
|
|
.Sp
|
8544 |
|
|
If you want to pass an option that takes an argument, you must use
|
8545 |
|
|
\&\fB\-Xassembler\fR twice, once for the option and once for the argument.
|
8546 |
|
|
.Sh "Options for Linking"
|
8547 |
|
|
.IX Subsection "Options for Linking"
|
8548 |
|
|
These options come into play when the compiler links object files into
|
8549 |
|
|
an executable output file. They are meaningless if the compiler is
|
8550 |
|
|
not doing a link step.
|
8551 |
|
|
.IP "\fIobject-file-name\fR" 4
|
8552 |
|
|
.IX Item "object-file-name"
|
8553 |
|
|
A file name that does not end in a special recognized suffix is
|
8554 |
|
|
considered to name an object file or library. (Object files are
|
8555 |
|
|
distinguished from libraries by the linker according to the file
|
8556 |
|
|
contents.) If linking is done, these object files are used as input
|
8557 |
|
|
to the linker.
|
8558 |
|
|
.IP "\fB\-c\fR" 4
|
8559 |
|
|
.IX Item "-c"
|
8560 |
|
|
.PD 0
|
8561 |
|
|
.IP "\fB\-S\fR" 4
|
8562 |
|
|
.IX Item "-S"
|
8563 |
|
|
.IP "\fB\-E\fR" 4
|
8564 |
|
|
.IX Item "-E"
|
8565 |
|
|
.PD
|
8566 |
|
|
If any of these options is used, then the linker is not run, and
|
8567 |
|
|
object file names should not be used as arguments.
|
8568 |
|
|
.IP "\fB\-l\fR\fIlibrary\fR" 4
|
8569 |
|
|
.IX Item "-llibrary"
|
8570 |
|
|
.PD 0
|
8571 |
|
|
.IP "\fB\-l\fR \fIlibrary\fR" 4
|
8572 |
|
|
.IX Item "-l library"
|
8573 |
|
|
.PD
|
8574 |
|
|
Search the library named \fIlibrary\fR when linking. (The second
|
8575 |
|
|
alternative with the library as a separate argument is only for
|
8576 |
|
|
\&\s-1POSIX\s0 compliance and is not recommended.)
|
8577 |
|
|
.Sp
|
8578 |
|
|
It makes a difference where in the command you write this option; the
|
8579 |
|
|
linker searches and processes libraries and object files in the order they
|
8580 |
|
|
are specified. Thus, \fBfoo.o \-lz bar.o\fR searches library \fBz\fR
|
8581 |
|
|
after file \fIfoo.o\fR but before \fIbar.o\fR. If \fIbar.o\fR refers
|
8582 |
|
|
to functions in \fBz\fR, those functions may not be loaded.
|
8583 |
|
|
.Sp
|
8584 |
|
|
The linker searches a standard list of directories for the library,
|
8585 |
|
|
which is actually a file named \fIlib\fIlibrary\fI.a\fR. The linker
|
8586 |
|
|
then uses this file as if it had been specified precisely by name.
|
8587 |
|
|
.Sp
|
8588 |
|
|
The directories searched include several standard system directories
|
8589 |
|
|
plus any that you specify with \fB\-L\fR.
|
8590 |
|
|
.Sp
|
8591 |
|
|
Normally the files found this way are library files\-\-\-archive files
|
8592 |
|
|
whose members are object files. The linker handles an archive file by
|
8593 |
|
|
scanning through it for members which define symbols that have so far
|
8594 |
|
|
been referenced but not defined. But if the file that is found is an
|
8595 |
|
|
ordinary object file, it is linked in the usual fashion. The only
|
8596 |
|
|
difference between using an \fB\-l\fR option and specifying a file name
|
8597 |
|
|
is that \fB\-l\fR surrounds \fIlibrary\fR with \fBlib\fR and \fB.a\fR
|
8598 |
|
|
and searches several directories.
|
8599 |
|
|
.IP "\fB\-lobjc\fR" 4
|
8600 |
|
|
.IX Item "-lobjc"
|
8601 |
|
|
You need this special case of the \fB\-l\fR option in order to
|
8602 |
|
|
link an Objective-C or Objective\-\*(C+ program.
|
8603 |
|
|
.IP "\fB\-nostartfiles\fR" 4
|
8604 |
|
|
.IX Item "-nostartfiles"
|
8605 |
|
|
Do not use the standard system startup files when linking.
|
8606 |
|
|
The standard system libraries are used normally, unless \fB\-nostdlib\fR
|
8607 |
|
|
or \fB\-nodefaultlibs\fR is used.
|
8608 |
|
|
.IP "\fB\-nodefaultlibs\fR" 4
|
8609 |
|
|
.IX Item "-nodefaultlibs"
|
8610 |
|
|
Do not use the standard system libraries when linking.
|
8611 |
|
|
Only the libraries you specify will be passed to the linker, options
|
8612 |
|
|
specifying linkage of the system libraries, such as \f(CW\*(C`\-static\-libgcc\*(C'\fR
|
8613 |
|
|
or \f(CW\*(C`\-shared\-libgcc\*(C'\fR, will be ignored.
|
8614 |
|
|
The standard startup files are used normally, unless \fB\-nostartfiles\fR
|
8615 |
|
|
is used. The compiler may generate calls to \f(CW\*(C`memcmp\*(C'\fR,
|
8616 |
|
|
\&\f(CW\*(C`memset\*(C'\fR, \f(CW\*(C`memcpy\*(C'\fR and \f(CW\*(C`memmove\*(C'\fR.
|
8617 |
|
|
These entries are usually resolved by entries in
|
8618 |
|
|
libc. These entry points should be supplied through some other
|
8619 |
|
|
mechanism when this option is specified.
|
8620 |
|
|
.IP "\fB\-nostdlib\fR" 4
|
8621 |
|
|
.IX Item "-nostdlib"
|
8622 |
|
|
Do not use the standard system startup files or libraries when linking.
|
8623 |
|
|
No startup files and only the libraries you specify will be passed to
|
8624 |
|
|
the linker, options specifying linkage of the system libraries, such as
|
8625 |
|
|
\&\f(CW\*(C`\-static\-libgcc\*(C'\fR or \f(CW\*(C`\-shared\-libgcc\*(C'\fR, will be ignored.
|
8626 |
|
|
The compiler may generate calls to \f(CW\*(C`memcmp\*(C'\fR, \f(CW\*(C`memset\*(C'\fR,
|
8627 |
|
|
\&\f(CW\*(C`memcpy\*(C'\fR and \f(CW\*(C`memmove\*(C'\fR.
|
8628 |
|
|
These entries are usually resolved by entries in
|
8629 |
|
|
libc. These entry points should be supplied through some other
|
8630 |
|
|
mechanism when this option is specified.
|
8631 |
|
|
.Sp
|
8632 |
|
|
One of the standard libraries bypassed by \fB\-nostdlib\fR and
|
8633 |
|
|
\&\fB\-nodefaultlibs\fR is \fIlibgcc.a\fR, a library of internal subroutines
|
8634 |
|
|
that \s-1GCC\s0 uses to overcome shortcomings of particular machines, or special
|
8635 |
|
|
needs for some languages.
|
8636 |
|
|
.Sp
|
8637 |
|
|
In most cases, you need \fIlibgcc.a\fR even when you want to avoid
|
8638 |
|
|
other standard libraries. In other words, when you specify \fB\-nostdlib\fR
|
8639 |
|
|
or \fB\-nodefaultlibs\fR you should usually specify \fB\-lgcc\fR as well.
|
8640 |
|
|
This ensures that you have no unresolved references to internal \s-1GCC\s0
|
8641 |
|
|
library subroutines. (For example, \fB_\|_main\fR, used to ensure \*(C+
|
8642 |
|
|
constructors will be called.)
|
8643 |
|
|
.IP "\fB\-pie\fR" 4
|
8644 |
|
|
.IX Item "-pie"
|
8645 |
|
|
Produce a position independent executable on targets which support it.
|
8646 |
|
|
For predictable results, you must also specify the same set of options
|
8647 |
|
|
that were used to generate code (\fB\-fpie\fR, \fB\-fPIE\fR,
|
8648 |
|
|
or model suboptions) when you specify this option.
|
8649 |
|
|
.IP "\fB\-rdynamic\fR" 4
|
8650 |
|
|
.IX Item "-rdynamic"
|
8651 |
|
|
Pass the flag \fB\-export\-dynamic\fR to the \s-1ELF\s0 linker, on targets
|
8652 |
|
|
that support it. This instructs the linker to add all symbols, not
|
8653 |
|
|
only used ones, to the dynamic symbol table. This option is needed
|
8654 |
|
|
for some uses of \f(CW\*(C`dlopen\*(C'\fR or to allow obtaining backtraces
|
8655 |
|
|
from within a program.
|
8656 |
|
|
.IP "\fB\-s\fR" 4
|
8657 |
|
|
.IX Item "-s"
|
8658 |
|
|
Remove all symbol table and relocation information from the executable.
|
8659 |
|
|
.IP "\fB\-static\fR" 4
|
8660 |
|
|
.IX Item "-static"
|
8661 |
|
|
On systems that support dynamic linking, this prevents linking with the shared
|
8662 |
|
|
libraries. On other systems, this option has no effect.
|
8663 |
|
|
.IP "\fB\-shared\fR" 4
|
8664 |
|
|
.IX Item "-shared"
|
8665 |
|
|
Produce a shared object which can then be linked with other objects to
|
8666 |
|
|
form an executable. Not all systems support this option. For predictable
|
8667 |
|
|
results, you must also specify the same set of options that were used to
|
8668 |
|
|
generate code (\fB\-fpic\fR, \fB\-fPIC\fR, or model suboptions)
|
8669 |
|
|
when you specify this option.[1]
|
8670 |
|
|
.IP "\fB\-shared\-libgcc\fR" 4
|
8671 |
|
|
.IX Item "-shared-libgcc"
|
8672 |
|
|
.PD 0
|
8673 |
|
|
.IP "\fB\-static\-libgcc\fR" 4
|
8674 |
|
|
.IX Item "-static-libgcc"
|
8675 |
|
|
.PD
|
8676 |
|
|
On systems that provide \fIlibgcc\fR as a shared library, these options
|
8677 |
|
|
force the use of either the shared or static version respectively.
|
8678 |
|
|
If no shared version of \fIlibgcc\fR was built when the compiler was
|
8679 |
|
|
configured, these options have no effect.
|
8680 |
|
|
.Sp
|
8681 |
|
|
There are several situations in which an application should use the
|
8682 |
|
|
shared \fIlibgcc\fR instead of the static version. The most common
|
8683 |
|
|
of these is when the application wishes to throw and catch exceptions
|
8684 |
|
|
across different shared libraries. In that case, each of the libraries
|
8685 |
|
|
as well as the application itself should use the shared \fIlibgcc\fR.
|
8686 |
|
|
.Sp
|
8687 |
|
|
Therefore, the G++ and \s-1GCJ\s0 drivers automatically add
|
8688 |
|
|
\&\fB\-shared\-libgcc\fR whenever you build a shared library or a main
|
8689 |
|
|
executable, because \*(C+ and Java programs typically use exceptions, so
|
8690 |
|
|
this is the right thing to do.
|
8691 |
|
|
.Sp
|
8692 |
|
|
If, instead, you use the \s-1GCC\s0 driver to create shared libraries, you may
|
8693 |
|
|
find that they will not always be linked with the shared \fIlibgcc\fR.
|
8694 |
|
|
If \s-1GCC\s0 finds, at its configuration time, that you have a non-GNU linker
|
8695 |
|
|
or a \s-1GNU\s0 linker that does not support option \fB\-\-eh\-frame\-hdr\fR,
|
8696 |
|
|
it will link the shared version of \fIlibgcc\fR into shared libraries
|
8697 |
|
|
by default. Otherwise, it will take advantage of the linker and optimize
|
8698 |
|
|
away the linking with the shared version of \fIlibgcc\fR, linking with
|
8699 |
|
|
the static version of libgcc by default. This allows exceptions to
|
8700 |
|
|
propagate through such shared libraries, without incurring relocation
|
8701 |
|
|
costs at library load time.
|
8702 |
|
|
.Sp
|
8703 |
|
|
However, if a library or main executable is supposed to throw or catch
|
8704 |
|
|
exceptions, you must link it using the G++ or \s-1GCJ\s0 driver, as appropriate
|
8705 |
|
|
for the languages used in the program, or using the option
|
8706 |
|
|
\&\fB\-shared\-libgcc\fR, such that it is linked with the shared
|
8707 |
|
|
\&\fIlibgcc\fR.
|
8708 |
|
|
.IP "\fB\-static\-libstdc++\fR" 4
|
8709 |
|
|
.IX Item "-static-libstdc++"
|
8710 |
|
|
When the \fBg++\fR program is used to link a \*(C+ program, it will
|
8711 |
|
|
normally automatically link against \fBlibstdc++\fR. If
|
8712 |
|
|
\&\fIlibstdc++\fR is available as a shared library, and the
|
8713 |
|
|
\&\fB\-static\fR option is not used, then this will link against the
|
8714 |
|
|
shared version of \fIlibstdc++\fR. That is normally fine. However, it
|
8715 |
|
|
is sometimes useful to freeze the version of \fIlibstdc++\fR used by
|
8716 |
|
|
the program without going all the way to a fully static link. The
|
8717 |
|
|
\&\fB\-static\-libstdc++\fR option directs the \fBg++\fR driver to
|
8718 |
|
|
link \fIlibstdc++\fR statically, without necessarily linking other
|
8719 |
|
|
libraries statically.
|
8720 |
|
|
.IP "\fB\-symbolic\fR" 4
|
8721 |
|
|
.IX Item "-symbolic"
|
8722 |
|
|
Bind references to global symbols when building a shared object. Warn
|
8723 |
|
|
about any unresolved references (unless overridden by the link editor
|
8724 |
|
|
option \fB\-Xlinker \-z \-Xlinker defs\fR). Only a few systems support
|
8725 |
|
|
this option.
|
8726 |
|
|
.IP "\fB\-T\fR \fIscript\fR" 4
|
8727 |
|
|
.IX Item "-T script"
|
8728 |
|
|
Use \fIscript\fR as the linker script. This option is supported by most
|
8729 |
|
|
systems using the \s-1GNU\s0 linker. On some targets, such as bare-board
|
8730 |
|
|
targets without an operating system, the \fB\-T\fR option may be required
|
8731 |
|
|
when linking to avoid references to undefined symbols.
|
8732 |
|
|
.IP "\fB\-Xlinker\fR \fIoption\fR" 4
|
8733 |
|
|
.IX Item "-Xlinker option"
|
8734 |
|
|
Pass \fIoption\fR as an option to the linker. You can use this to
|
8735 |
|
|
supply system-specific linker options which \s-1GCC\s0 does not know how to
|
8736 |
|
|
recognize.
|
8737 |
|
|
.Sp
|
8738 |
|
|
If you want to pass an option that takes a separate argument, you must use
|
8739 |
|
|
\&\fB\-Xlinker\fR twice, once for the option and once for the argument.
|
8740 |
|
|
For example, to pass \fB\-assert definitions\fR, you must write
|
8741 |
|
|
\&\fB\-Xlinker \-assert \-Xlinker definitions\fR. It does not work to write
|
8742 |
|
|
\&\fB\-Xlinker \*(L"\-assert definitions\*(R"\fR, because this passes the entire
|
8743 |
|
|
string as a single argument, which is not what the linker expects.
|
8744 |
|
|
.Sp
|
8745 |
|
|
When using the \s-1GNU\s0 linker, it is usually more convenient to pass
|
8746 |
|
|
arguments to linker options using the \fIoption\fR\fB=\fR\fIvalue\fR
|
8747 |
|
|
syntax than as separate arguments. For example, you can specify
|
8748 |
|
|
\&\fB\-Xlinker \-Map=output.map\fR rather than
|
8749 |
|
|
\&\fB\-Xlinker \-Map \-Xlinker output.map\fR. Other linkers may not support
|
8750 |
|
|
this syntax for command-line options.
|
8751 |
|
|
.IP "\fB\-Wl,\fR\fIoption\fR" 4
|
8752 |
|
|
.IX Item "-Wl,option"
|
8753 |
|
|
Pass \fIoption\fR as an option to the linker. If \fIoption\fR contains
|
8754 |
|
|
commas, it is split into multiple options at the commas. You can use this
|
8755 |
|
|
syntax to pass an argument to the option.
|
8756 |
|
|
For example, \fB\-Wl,\-Map,output.map\fR passes \fB\-Map output.map\fR to the
|
8757 |
|
|
linker. When using the \s-1GNU\s0 linker, you can also get the same effect with
|
8758 |
|
|
\&\fB\-Wl,\-Map=output.map\fR.
|
8759 |
|
|
.IP "\fB\-u\fR \fIsymbol\fR" 4
|
8760 |
|
|
.IX Item "-u symbol"
|
8761 |
|
|
Pretend the symbol \fIsymbol\fR is undefined, to force linking of
|
8762 |
|
|
library modules to define it. You can use \fB\-u\fR multiple times with
|
8763 |
|
|
different symbols to force loading of additional library modules.
|
8764 |
|
|
.Sh "Options for Directory Search"
|
8765 |
|
|
.IX Subsection "Options for Directory Search"
|
8766 |
|
|
These options specify directories to search for header files, for
|
8767 |
|
|
libraries and for parts of the compiler:
|
8768 |
|
|
.IP "\fB\-I\fR\fIdir\fR" 4
|
8769 |
|
|
.IX Item "-Idir"
|
8770 |
|
|
Add the directory \fIdir\fR to the head of the list of directories to be
|
8771 |
|
|
searched for header files. This can be used to override a system header
|
8772 |
|
|
file, substituting your own version, since these directories are
|
8773 |
|
|
searched before the system header file directories. However, you should
|
8774 |
|
|
not use this option to add directories that contain vendor-supplied
|
8775 |
|
|
system header files (use \fB\-isystem\fR for that). If you use more than
|
8776 |
|
|
one \fB\-I\fR option, the directories are scanned in left-to-right
|
8777 |
|
|
order; the standard system directories come after.
|
8778 |
|
|
.Sp
|
8779 |
|
|
If a standard system include directory, or a directory specified with
|
8780 |
|
|
\&\fB\-isystem\fR, is also specified with \fB\-I\fR, the \fB\-I\fR
|
8781 |
|
|
option will be ignored. The directory will still be searched but as a
|
8782 |
|
|
system directory at its normal position in the system include chain.
|
8783 |
|
|
This is to ensure that \s-1GCC\s0's procedure to fix buggy system headers and
|
8784 |
|
|
the ordering for the include_next directive are not inadvertently changed.
|
8785 |
|
|
If you really need to change the search order for system directories,
|
8786 |
|
|
use the \fB\-nostdinc\fR and/or \fB\-isystem\fR options.
|
8787 |
|
|
.IP "\fB\-iquote\fR\fIdir\fR" 4
|
8788 |
|
|
.IX Item "-iquotedir"
|
8789 |
|
|
Add the directory \fIdir\fR to the head of the list of directories to
|
8790 |
|
|
be searched for header files only for the case of \fB#include
|
8791 |
|
|
"\fR\fIfile\fR\fB"\fR; they are not searched for \fB#include <\fR\fIfile\fR\fB>\fR,
|
8792 |
|
|
otherwise just like \fB\-I\fR.
|
8793 |
|
|
.IP "\fB\-L\fR\fIdir\fR" 4
|
8794 |
|
|
.IX Item "-Ldir"
|
8795 |
|
|
Add directory \fIdir\fR to the list of directories to be searched
|
8796 |
|
|
for \fB\-l\fR.
|
8797 |
|
|
.IP "\fB\-B\fR\fIprefix\fR" 4
|
8798 |
|
|
.IX Item "-Bprefix"
|
8799 |
|
|
This option specifies where to find the executables, libraries,
|
8800 |
|
|
include files, and data files of the compiler itself.
|
8801 |
|
|
.Sp
|
8802 |
|
|
The compiler driver program runs one or more of the subprograms
|
8803 |
|
|
\&\fIcpp\fR, \fIcc1\fR, \fIas\fR and \fIld\fR. It tries
|
8804 |
|
|
\&\fIprefix\fR as a prefix for each program it tries to run, both with and
|
8805 |
|
|
without \fImachine\fR\fB/\fR\fIversion\fR\fB/\fR.
|
8806 |
|
|
.Sp
|
8807 |
|
|
For each subprogram to be run, the compiler driver first tries the
|
8808 |
|
|
\&\fB\-B\fR prefix, if any. If that name is not found, or if \fB\-B\fR
|
8809 |
|
|
was not specified, the driver tries two standard prefixes, which are
|
8810 |
|
|
\&\fI/usr/lib/gcc/\fR and \fI/usr/local/lib/gcc/\fR. If neither of
|
8811 |
|
|
those results in a file name that is found, the unmodified program
|
8812 |
|
|
name is searched for using the directories specified in your
|
8813 |
|
|
\&\fB\s-1PATH\s0\fR environment variable.
|
8814 |
|
|
.Sp
|
8815 |
|
|
The compiler will check to see if the path provided by the \fB\-B\fR
|
8816 |
|
|
refers to a directory, and if necessary it will add a directory
|
8817 |
|
|
separator character at the end of the path.
|
8818 |
|
|
.Sp
|
8819 |
|
|
\&\fB\-B\fR prefixes that effectively specify directory names also apply
|
8820 |
|
|
to libraries in the linker, because the compiler translates these
|
8821 |
|
|
options into \fB\-L\fR options for the linker. They also apply to
|
8822 |
|
|
includes files in the preprocessor, because the compiler translates these
|
8823 |
|
|
options into \fB\-isystem\fR options for the preprocessor. In this case,
|
8824 |
|
|
the compiler appends \fBinclude\fR to the prefix.
|
8825 |
|
|
.Sp
|
8826 |
|
|
The run-time support file \fIlibgcc.a\fR can also be searched for using
|
8827 |
|
|
the \fB\-B\fR prefix, if needed. If it is not found there, the two
|
8828 |
|
|
standard prefixes above are tried, and that is all. The file is left
|
8829 |
|
|
out of the link if it is not found by those means.
|
8830 |
|
|
.Sp
|
8831 |
|
|
Another way to specify a prefix much like the \fB\-B\fR prefix is to use
|
8832 |
|
|
the environment variable \fB\s-1GCC_EXEC_PREFIX\s0\fR.
|
8833 |
|
|
.Sp
|
8834 |
|
|
As a special kludge, if the path provided by \fB\-B\fR is
|
8835 |
|
|
\&\fI[dir/]stage\fIN\fI/\fR, where \fIN\fR is a number in the range 0 to
|
8836 |
|
|
9, then it will be replaced by \fI[dir/]include\fR. This is to help
|
8837 |
|
|
with boot-strapping the compiler.
|
8838 |
|
|
.IP "\fB\-specs=\fR\fIfile\fR" 4
|
8839 |
|
|
.IX Item "-specs=file"
|
8840 |
|
|
Process \fIfile\fR after the compiler reads in the standard \fIspecs\fR
|
8841 |
|
|
file, in order to override the defaults that the \fIgcc\fR driver
|
8842 |
|
|
program uses when determining what switches to pass to \fIcc1\fR,
|
8843 |
|
|
\&\fIcc1plus\fR, \fIas\fR, \fIld\fR, etc. More than one
|
8844 |
|
|
\&\fB\-specs=\fR\fIfile\fR can be specified on the command line, and they
|
8845 |
|
|
are processed in order, from left to right.
|
8846 |
|
|
.IP "\fB\-\-sysroot=\fR\fIdir\fR" 4
|
8847 |
|
|
.IX Item "--sysroot=dir"
|
8848 |
|
|
Use \fIdir\fR as the logical root directory for headers and libraries.
|
8849 |
|
|
For example, if the compiler would normally search for headers in
|
8850 |
|
|
\&\fI/usr/include\fR and libraries in \fI/usr/lib\fR, it will instead
|
8851 |
|
|
search \fI\fIdir\fI/usr/include\fR and \fI\fIdir\fI/usr/lib\fR.
|
8852 |
|
|
.Sp
|
8853 |
|
|
If you use both this option and the \fB\-isysroot\fR option, then
|
8854 |
|
|
the \fB\-\-sysroot\fR option will apply to libraries, but the
|
8855 |
|
|
\&\fB\-isysroot\fR option will apply to header files.
|
8856 |
|
|
.Sp
|
8857 |
|
|
The \s-1GNU\s0 linker (beginning with version 2.16) has the necessary support
|
8858 |
|
|
for this option. If your linker does not support this option, the
|
8859 |
|
|
header file aspect of \fB\-\-sysroot\fR will still work, but the
|
8860 |
|
|
library aspect will not.
|
8861 |
|
|
.IP "\fB\-I\-\fR" 4
|
8862 |
|
|
.IX Item "-I-"
|
8863 |
|
|
This option has been deprecated. Please use \fB\-iquote\fR instead for
|
8864 |
|
|
\&\fB\-I\fR directories before the \fB\-I\-\fR and remove the \fB\-I\-\fR.
|
8865 |
|
|
Any directories you specify with \fB\-I\fR options before the \fB\-I\-\fR
|
8866 |
|
|
option are searched only for the case of \fB#include "\fR\fIfile\fR\fB"\fR;
|
8867 |
|
|
they are not searched for \fB#include <\fR\fIfile\fR\fB>\fR.
|
8868 |
|
|
.Sp
|
8869 |
|
|
If additional directories are specified with \fB\-I\fR options after
|
8870 |
|
|
the \fB\-I\-\fR, these directories are searched for all \fB#include\fR
|
8871 |
|
|
directives. (Ordinarily \fIall\fR \fB\-I\fR directories are used
|
8872 |
|
|
this way.)
|
8873 |
|
|
.Sp
|
8874 |
|
|
In addition, the \fB\-I\-\fR option inhibits the use of the current
|
8875 |
|
|
directory (where the current input file came from) as the first search
|
8876 |
|
|
directory for \fB#include "\fR\fIfile\fR\fB"\fR. There is no way to
|
8877 |
|
|
override this effect of \fB\-I\-\fR. With \fB\-I.\fR you can specify
|
8878 |
|
|
searching the directory which was current when the compiler was
|
8879 |
|
|
invoked. That is not exactly the same as what the preprocessor does
|
8880 |
|
|
by default, but it is often satisfactory.
|
8881 |
|
|
.Sp
|
8882 |
|
|
\&\fB\-I\-\fR does not inhibit the use of the standard system directories
|
8883 |
|
|
for header files. Thus, \fB\-I\-\fR and \fB\-nostdinc\fR are
|
8884 |
|
|
independent.
|
8885 |
|
|
.Sh "Specifying Target Machine and Compiler Version"
|
8886 |
|
|
.IX Subsection "Specifying Target Machine and Compiler Version"
|
8887 |
|
|
The usual way to run \s-1GCC\s0 is to run the executable called \fIgcc\fR, or
|
8888 |
|
|
\&\fI\-gcc\fR when cross-compiling, or
|
8889 |
|
|
\&\fI\-gcc\-\fR to run a version other than the one that
|
8890 |
|
|
was installed last. Sometimes this is inconvenient, so \s-1GCC\s0 provides
|
8891 |
|
|
options that will switch to another cross-compiler or version.
|
8892 |
|
|
.IP "\fB\-b\fR \fImachine\fR" 4
|
8893 |
|
|
.IX Item "-b machine"
|
8894 |
|
|
The argument \fImachine\fR specifies the target machine for compilation.
|
8895 |
|
|
.Sp
|
8896 |
|
|
The value to use for \fImachine\fR is the same as was specified as the
|
8897 |
|
|
machine type when configuring \s-1GCC\s0 as a cross-compiler. For
|
8898 |
|
|
example, if a cross-compiler was configured with \fBconfigure
|
8899 |
|
|
arm-elf\fR, meaning to compile for an arm processor with elf binaries,
|
8900 |
|
|
then you would specify \fB\-b arm-elf\fR to run that cross compiler.
|
8901 |
|
|
Because there are other options beginning with \fB\-b\fR, the
|
8902 |
|
|
configuration must contain a hyphen, or \fB\-b\fR alone should be one
|
8903 |
|
|
argument followed by the configuration in the next argument.
|
8904 |
|
|
.IP "\fB\-V\fR \fIversion\fR" 4
|
8905 |
|
|
.IX Item "-V version"
|
8906 |
|
|
The argument \fIversion\fR specifies which version of \s-1GCC\s0 to run.
|
8907 |
|
|
This is useful when multiple versions are installed. For example,
|
8908 |
|
|
\&\fIversion\fR might be \fB4.0\fR, meaning to run \s-1GCC\s0 version 4.0.
|
8909 |
|
|
.PP
|
8910 |
|
|
The \fB\-V\fR and \fB\-b\fR options work by running the
|
8911 |
|
|
\&\fI\-gcc\-\fR executable, so there's no real reason to
|
8912 |
|
|
use them if you can just run that directly.
|
8913 |
|
|
.Sh "Hardware Models and Configurations"
|
8914 |
|
|
.IX Subsection "Hardware Models and Configurations"
|
8915 |
|
|
Earlier we discussed the standard option \fB\-b\fR which chooses among
|
8916 |
|
|
different installed compilers for completely different target
|
8917 |
|
|
machines, such as \s-1VAX\s0 vs. 68000 vs. 80386.
|
8918 |
|
|
.PP
|
8919 |
|
|
In addition, each of these target machine types can have its own
|
8920 |
|
|
special options, starting with \fB\-m\fR, to choose among various
|
8921 |
|
|
hardware models or configurations\-\-\-for example, 68010 vs 68020,
|
8922 |
|
|
floating coprocessor or none. A single installed version of the
|
8923 |
|
|
compiler can compile for any model or configuration, according to the
|
8924 |
|
|
options specified.
|
8925 |
|
|
.PP
|
8926 |
|
|
Some configurations of the compiler also support additional special
|
8927 |
|
|
options, usually for compatibility with other compilers on the same
|
8928 |
|
|
platform.
|
8929 |
|
|
.PP
|
8930 |
|
|
\fI\s-1ARC\s0 Options\fR
|
8931 |
|
|
.IX Subsection "ARC Options"
|
8932 |
|
|
.PP
|
8933 |
|
|
These options are defined for \s-1ARC\s0 implementations:
|
8934 |
|
|
.IP "\fB\-EL\fR" 4
|
8935 |
|
|
.IX Item "-EL"
|
8936 |
|
|
Compile code for little endian mode. This is the default.
|
8937 |
|
|
.IP "\fB\-EB\fR" 4
|
8938 |
|
|
.IX Item "-EB"
|
8939 |
|
|
Compile code for big endian mode.
|
8940 |
|
|
.IP "\fB\-mmangle\-cpu\fR" 4
|
8941 |
|
|
.IX Item "-mmangle-cpu"
|
8942 |
|
|
Prepend the name of the cpu to all public symbol names.
|
8943 |
|
|
In multiple-processor systems, there are many \s-1ARC\s0 variants with different
|
8944 |
|
|
instruction and register set characteristics. This flag prevents code
|
8945 |
|
|
compiled for one cpu to be linked with code compiled for another.
|
8946 |
|
|
No facility exists for handling variants that are \*(L"almost identical\*(R".
|
8947 |
|
|
This is an all or nothing option.
|
8948 |
|
|
.IP "\fB\-mcpu=\fR\fIcpu\fR" 4
|
8949 |
|
|
.IX Item "-mcpu=cpu"
|
8950 |
|
|
Compile code for \s-1ARC\s0 variant \fIcpu\fR.
|
8951 |
|
|
Which variants are supported depend on the configuration.
|
8952 |
|
|
All variants support \fB\-mcpu=base\fR, this is the default.
|
8953 |
|
|
.IP "\fB\-mtext=\fR\fItext-section\fR" 4
|
8954 |
|
|
.IX Item "-mtext=text-section"
|
8955 |
|
|
.PD 0
|
8956 |
|
|
.IP "\fB\-mdata=\fR\fIdata-section\fR" 4
|
8957 |
|
|
.IX Item "-mdata=data-section"
|
8958 |
|
|
.IP "\fB\-mrodata=\fR\fIreadonly-data-section\fR" 4
|
8959 |
|
|
.IX Item "-mrodata=readonly-data-section"
|
8960 |
|
|
.PD
|
8961 |
|
|
Put functions, data, and readonly data in \fItext-section\fR,
|
8962 |
|
|
\&\fIdata-section\fR, and \fIreadonly-data-section\fR respectively
|
8963 |
|
|
by default. This can be overridden with the \f(CW\*(C`section\*(C'\fR attribute.
|
8964 |
|
|
.IP "\fB\-mfix\-cortex\-m3\-ldrd\fR" 4
|
8965 |
|
|
.IX Item "-mfix-cortex-m3-ldrd"
|
8966 |
|
|
Some Cortex\-M3 cores can cause data corruption when \f(CW\*(C`ldrd\*(C'\fR instructions
|
8967 |
|
|
with overlapping destination and base registers are used. This option avoids
|
8968 |
|
|
generating these instructions. This option is enabled by default when
|
8969 |
|
|
\&\fB\-mcpu=cortex\-m3\fR is specified.
|
8970 |
|
|
.PP
|
8971 |
|
|
\fI\s-1ARM\s0 Options\fR
|
8972 |
|
|
.IX Subsection "ARM Options"
|
8973 |
|
|
.PP
|
8974 |
|
|
These \fB\-m\fR options are defined for Advanced \s-1RISC\s0 Machines (\s-1ARM\s0)
|
8975 |
|
|
architectures:
|
8976 |
|
|
.IP "\fB\-mabi=\fR\fIname\fR" 4
|
8977 |
|
|
.IX Item "-mabi=name"
|
8978 |
|
|
Generate code for the specified \s-1ABI\s0. Permissible values are: \fBapcs-gnu\fR,
|
8979 |
|
|
\&\fBatpcs\fR, \fBaapcs\fR, \fBaapcs-linux\fR and \fBiwmmxt\fR.
|
8980 |
|
|
.IP "\fB\-mapcs\-frame\fR" 4
|
8981 |
|
|
.IX Item "-mapcs-frame"
|
8982 |
|
|
Generate a stack frame that is compliant with the \s-1ARM\s0 Procedure Call
|
8983 |
|
|
Standard for all functions, even if this is not strictly necessary for
|
8984 |
|
|
correct execution of the code. Specifying \fB\-fomit\-frame\-pointer\fR
|
8985 |
|
|
with this option will cause the stack frames not to be generated for
|
8986 |
|
|
leaf functions. The default is \fB\-mno\-apcs\-frame\fR.
|
8987 |
|
|
.IP "\fB\-mapcs\fR" 4
|
8988 |
|
|
.IX Item "-mapcs"
|
8989 |
|
|
This is a synonym for \fB\-mapcs\-frame\fR.
|
8990 |
|
|
.IP "\fB\-mthumb\-interwork\fR" 4
|
8991 |
|
|
.IX Item "-mthumb-interwork"
|
8992 |
|
|
Generate code which supports calling between the \s-1ARM\s0 and Thumb
|
8993 |
|
|
instruction sets. Without this option the two instruction sets cannot
|
8994 |
|
|
be reliably used inside one program. The default is
|
8995 |
|
|
\&\fB\-mno\-thumb\-interwork\fR, since slightly larger code is generated
|
8996 |
|
|
when \fB\-mthumb\-interwork\fR is specified.
|
8997 |
|
|
.IP "\fB\-mno\-sched\-prolog\fR" 4
|
8998 |
|
|
.IX Item "-mno-sched-prolog"
|
8999 |
|
|
Prevent the reordering of instructions in the function prolog, or the
|
9000 |
|
|
merging of those instruction with the instructions in the function's
|
9001 |
|
|
body. This means that all functions will start with a recognizable set
|
9002 |
|
|
of instructions (or in fact one of a choice from a small set of
|
9003 |
|
|
different function prologues), and this information can be used to
|
9004 |
|
|
locate the start if functions inside an executable piece of code. The
|
9005 |
|
|
default is \fB\-msched\-prolog\fR.
|
9006 |
|
|
.IP "\fB\-mfloat\-abi=\fR\fIname\fR" 4
|
9007 |
|
|
.IX Item "-mfloat-abi=name"
|
9008 |
|
|
Specifies which floating-point \s-1ABI\s0 to use. Permissible values
|
9009 |
|
|
are: \fBsoft\fR, \fBsoftfp\fR and \fBhard\fR.
|
9010 |
|
|
.Sp
|
9011 |
|
|
Specifying \fBsoft\fR causes \s-1GCC\s0 to generate output containing
|
9012 |
|
|
library calls for floating-point operations.
|
9013 |
|
|
\&\fBsoftfp\fR allows the generation of code using hardware floating-point
|
9014 |
|
|
instructions, but still uses the soft-float calling conventions.
|
9015 |
|
|
\&\fBhard\fR allows generation of floating-point instructions
|
9016 |
|
|
and uses FPU-specific calling conventions.
|
9017 |
|
|
.Sp
|
9018 |
|
|
The default depends on the specific target configuration. Note that
|
9019 |
|
|
the hard-float and soft-float ABIs are not link-compatible; you must
|
9020 |
|
|
compile your entire program with the same \s-1ABI\s0, and link with a
|
9021 |
|
|
compatible set of libraries.
|
9022 |
|
|
.IP "\fB\-mhard\-float\fR" 4
|
9023 |
|
|
.IX Item "-mhard-float"
|
9024 |
|
|
Equivalent to \fB\-mfloat\-abi=hard\fR.
|
9025 |
|
|
.IP "\fB\-msoft\-float\fR" 4
|
9026 |
|
|
.IX Item "-msoft-float"
|
9027 |
|
|
Equivalent to \fB\-mfloat\-abi=soft\fR.
|
9028 |
|
|
.IP "\fB\-mlittle\-endian\fR" 4
|
9029 |
|
|
.IX Item "-mlittle-endian"
|
9030 |
|
|
Generate code for a processor running in little-endian mode. This is
|
9031 |
|
|
the default for all standard configurations.
|
9032 |
|
|
.IP "\fB\-mbig\-endian\fR" 4
|
9033 |
|
|
.IX Item "-mbig-endian"
|
9034 |
|
|
Generate code for a processor running in big-endian mode; the default is
|
9035 |
|
|
to compile code for a little-endian processor.
|
9036 |
|
|
.IP "\fB\-mwords\-little\-endian\fR" 4
|
9037 |
|
|
.IX Item "-mwords-little-endian"
|
9038 |
|
|
This option only applies when generating code for big-endian processors.
|
9039 |
|
|
Generate code for a little-endian word order but a big-endian byte
|
9040 |
|
|
order. That is, a byte order of the form \fB32107654\fR. Note: this
|
9041 |
|
|
option should only be used if you require compatibility with code for
|
9042 |
|
|
big-endian \s-1ARM\s0 processors generated by versions of the compiler prior to
|
9043 |
|
|
2.8.
|
9044 |
|
|
.IP "\fB\-mcpu=\fR\fIname\fR" 4
|
9045 |
|
|
.IX Item "-mcpu=name"
|
9046 |
|
|
This specifies the name of the target \s-1ARM\s0 processor. \s-1GCC\s0 uses this name
|
9047 |
|
|
to determine what kind of instructions it can emit when generating
|
9048 |
|
|
assembly code. Permissible names are: \fBarm2\fR, \fBarm250\fR,
|
9049 |
|
|
\&\fBarm3\fR, \fBarm6\fR, \fBarm60\fR, \fBarm600\fR, \fBarm610\fR,
|
9050 |
|
|
\&\fBarm620\fR, \fBarm7\fR, \fBarm7m\fR, \fBarm7d\fR, \fBarm7dm\fR,
|
9051 |
|
|
\&\fBarm7di\fR, \fBarm7dmi\fR, \fBarm70\fR, \fBarm700\fR,
|
9052 |
|
|
\&\fBarm700i\fR, \fBarm710\fR, \fBarm710c\fR, \fBarm7100\fR,
|
9053 |
|
|
\&\fBarm720\fR,
|
9054 |
|
|
\&\fBarm7500\fR, \fBarm7500fe\fR, \fBarm7tdmi\fR, \fBarm7tdmi\-s\fR,
|
9055 |
|
|
\&\fBarm710t\fR, \fBarm720t\fR, \fBarm740t\fR,
|
9056 |
|
|
\&\fBstrongarm\fR, \fBstrongarm110\fR, \fBstrongarm1100\fR,
|
9057 |
|
|
\&\fBstrongarm1110\fR,
|
9058 |
|
|
\&\fBarm8\fR, \fBarm810\fR, \fBarm9\fR, \fBarm9e\fR, \fBarm920\fR,
|
9059 |
|
|
\&\fBarm920t\fR, \fBarm922t\fR, \fBarm946e\-s\fR, \fBarm966e\-s\fR,
|
9060 |
|
|
\&\fBarm968e\-s\fR, \fBarm926ej\-s\fR, \fBarm940t\fR, \fBarm9tdmi\fR,
|
9061 |
|
|
\&\fBarm10tdmi\fR, \fBarm1020t\fR, \fBarm1026ej\-s\fR,
|
9062 |
|
|
\&\fBarm10e\fR, \fBarm1020e\fR, \fBarm1022e\fR,
|
9063 |
|
|
\&\fBarm1136j\-s\fR, \fBarm1136jf\-s\fR, \fBmpcore\fR, \fBmpcorenovfp\fR,
|
9064 |
|
|
\&\fBarm1156t2\-s\fR, \fBarm1156t2f\-s\fR, \fBarm1176jz\-s\fR, \fBarm1176jzf\-s\fR,
|
9065 |
|
|
\&\fBcortex\-a5\fR, \fBcortex\-a8\fR, \fBcortex\-a9\fR,
|
9066 |
|
|
\&\fBcortex\-r4\fR, \fBcortex\-r4f\fR, \fBcortex\-m3\fR,
|
9067 |
|
|
\&\fBcortex\-m1\fR,
|
9068 |
|
|
\&\fBcortex\-m0\fR,
|
9069 |
|
|
\&\fBxscale\fR, \fBiwmmxt\fR, \fBiwmmxt2\fR, \fBep9312\fR.
|
9070 |
|
|
.IP "\fB\-mtune=\fR\fIname\fR" 4
|
9071 |
|
|
.IX Item "-mtune=name"
|
9072 |
|
|
This option is very similar to the \fB\-mcpu=\fR option, except that
|
9073 |
|
|
instead of specifying the actual target processor type, and hence
|
9074 |
|
|
restricting which instructions can be used, it specifies that \s-1GCC\s0 should
|
9075 |
|
|
tune the performance of the code as if the target were of the type
|
9076 |
|
|
specified in this option, but still choosing the instructions that it
|
9077 |
|
|
will generate based on the cpu specified by a \fB\-mcpu=\fR option.
|
9078 |
|
|
For some \s-1ARM\s0 implementations better performance can be obtained by using
|
9079 |
|
|
this option.
|
9080 |
|
|
.IP "\fB\-march=\fR\fIname\fR" 4
|
9081 |
|
|
.IX Item "-march=name"
|
9082 |
|
|
This specifies the name of the target \s-1ARM\s0 architecture. \s-1GCC\s0 uses this
|
9083 |
|
|
name to determine what kind of instructions it can emit when generating
|
9084 |
|
|
assembly code. This option can be used in conjunction with or instead
|
9085 |
|
|
of the \fB\-mcpu=\fR option. Permissible names are: \fBarmv2\fR,
|
9086 |
|
|
\&\fBarmv2a\fR, \fBarmv3\fR, \fBarmv3m\fR, \fBarmv4\fR, \fBarmv4t\fR,
|
9087 |
|
|
\&\fBarmv5\fR, \fBarmv5t\fR, \fBarmv5e\fR, \fBarmv5te\fR,
|
9088 |
|
|
\&\fBarmv6\fR, \fBarmv6j\fR,
|
9089 |
|
|
\&\fBarmv6t2\fR, \fBarmv6z\fR, \fBarmv6zk\fR, \fBarmv6\-m\fR,
|
9090 |
|
|
\&\fBarmv7\fR, \fBarmv7\-a\fR, \fBarmv7\-r\fR, \fBarmv7\-m\fR,
|
9091 |
|
|
\&\fBiwmmxt\fR, \fBiwmmxt2\fR, \fBep9312\fR.
|
9092 |
|
|
.IP "\fB\-mfpu=\fR\fIname\fR" 4
|
9093 |
|
|
.IX Item "-mfpu=name"
|
9094 |
|
|
.PD 0
|
9095 |
|
|
.IP "\fB\-mfpe=\fR\fInumber\fR" 4
|
9096 |
|
|
.IX Item "-mfpe=number"
|
9097 |
|
|
.IP "\fB\-mfp=\fR\fInumber\fR" 4
|
9098 |
|
|
.IX Item "-mfp=number"
|
9099 |
|
|
.PD
|
9100 |
|
|
This specifies what floating point hardware (or hardware emulation) is
|
9101 |
|
|
available on the target. Permissible names are: \fBfpa\fR, \fBfpe2\fR,
|
9102 |
|
|
\&\fBfpe3\fR, \fBmaverick\fR, \fBvfp\fR, \fBvfpv3\fR, \fBvfpv3\-fp16\fR,
|
9103 |
|
|
\&\fBvfpv3\-d16\fR, \fBvfpv3\-d16\-fp16\fR, \fBvfpv3xd\fR, \fBvfpv3xd\-fp16\fR,
|
9104 |
|
|
\&\fBneon\fR, \fBneon\-fp16\fR, \fBvfpv4\fR, \fBvfpv4\-d16\fR,
|
9105 |
|
|
\&\fBfpv4\-sp\-d16\fR and \fBneon\-vfpv4\fR.
|
9106 |
|
|
\&\fB\-mfp\fR and \fB\-mfpe\fR are synonyms for
|
9107 |
|
|
\&\fB\-mfpu\fR=\fBfpe\fR\fInumber\fR, for compatibility with older versions
|
9108 |
|
|
of \s-1GCC\s0.
|
9109 |
|
|
.Sp
|
9110 |
|
|
If \fB\-msoft\-float\fR is specified this specifies the format of
|
9111 |
|
|
floating point values.
|
9112 |
|
|
.IP "\fB\-mfp16\-format=\fR\fIname\fR" 4
|
9113 |
|
|
.IX Item "-mfp16-format=name"
|
9114 |
|
|
Specify the format of the \f(CW\*(C`_\|_fp16\*(C'\fR half-precision floating-point type.
|
9115 |
|
|
Permissible names are \fBnone\fR, \fBieee\fR, and \fBalternative\fR;
|
9116 |
|
|
the default is \fBnone\fR, in which case the \f(CW\*(C`_\|_fp16\*(C'\fR type is not
|
9117 |
|
|
defined.
|
9118 |
|
|
.IP "\fB\-mstructure\-size\-boundary=\fR\fIn\fR" 4
|
9119 |
|
|
.IX Item "-mstructure-size-boundary=n"
|
9120 |
|
|
The size of all structures and unions will be rounded up to a multiple
|
9121 |
|
|
of the number of bits set by this option. Permissible values are 8, 32
|
9122 |
|
|
and 64. The default value varies for different toolchains. For the \s-1COFF\s0
|
9123 |
|
|
targeted toolchain the default value is 8. A value of 64 is only allowed
|
9124 |
|
|
if the underlying \s-1ABI\s0 supports it.
|
9125 |
|
|
.Sp
|
9126 |
|
|
Specifying the larger number can produce faster, more efficient code, but
|
9127 |
|
|
can also increase the size of the program. Different values are potentially
|
9128 |
|
|
incompatible. Code compiled with one value cannot necessarily expect to
|
9129 |
|
|
work with code or libraries compiled with another value, if they exchange
|
9130 |
|
|
information using structures or unions.
|
9131 |
|
|
.IP "\fB\-mabort\-on\-noreturn\fR" 4
|
9132 |
|
|
.IX Item "-mabort-on-noreturn"
|
9133 |
|
|
Generate a call to the function \f(CW\*(C`abort\*(C'\fR at the end of a
|
9134 |
|
|
\&\f(CW\*(C`noreturn\*(C'\fR function. It will be executed if the function tries to
|
9135 |
|
|
return.
|
9136 |
|
|
.IP "\fB\-mlong\-calls\fR" 4
|
9137 |
|
|
.IX Item "-mlong-calls"
|
9138 |
|
|
.PD 0
|
9139 |
|
|
.IP "\fB\-mno\-long\-calls\fR" 4
|
9140 |
|
|
.IX Item "-mno-long-calls"
|
9141 |
|
|
.PD
|
9142 |
|
|
Tells the compiler to perform function calls by first loading the
|
9143 |
|
|
address of the function into a register and then performing a subroutine
|
9144 |
|
|
call on this register. This switch is needed if the target function
|
9145 |
|
|
will lie outside of the 64 megabyte addressing range of the offset based
|
9146 |
|
|
version of subroutine call instruction.
|
9147 |
|
|
.Sp
|
9148 |
|
|
Even if this switch is enabled, not all function calls will be turned
|
9149 |
|
|
into long calls. The heuristic is that static functions, functions
|
9150 |
|
|
which have the \fBshort-call\fR attribute, functions that are inside
|
9151 |
|
|
the scope of a \fB#pragma no_long_calls\fR directive and functions whose
|
9152 |
|
|
definitions have already been compiled within the current compilation
|
9153 |
|
|
unit, will not be turned into long calls. The exception to this rule is
|
9154 |
|
|
that weak function definitions, functions with the \fBlong-call\fR
|
9155 |
|
|
attribute or the \fBsection\fR attribute, and functions that are within
|
9156 |
|
|
the scope of a \fB#pragma long_calls\fR directive, will always be
|
9157 |
|
|
turned into long calls.
|
9158 |
|
|
.Sp
|
9159 |
|
|
This feature is not enabled by default. Specifying
|
9160 |
|
|
\&\fB\-mno\-long\-calls\fR will restore the default behavior, as will
|
9161 |
|
|
placing the function calls within the scope of a \fB#pragma
|
9162 |
|
|
long_calls_off\fR directive. Note these switches have no effect on how
|
9163 |
|
|
the compiler generates code to handle function calls via function
|
9164 |
|
|
pointers.
|
9165 |
|
|
.IP "\fB\-msingle\-pic\-base\fR" 4
|
9166 |
|
|
.IX Item "-msingle-pic-base"
|
9167 |
|
|
Treat the register used for \s-1PIC\s0 addressing as read-only, rather than
|
9168 |
|
|
loading it in the prologue for each function. The run-time system is
|
9169 |
|
|
responsible for initializing this register with an appropriate value
|
9170 |
|
|
before execution begins.
|
9171 |
|
|
.IP "\fB\-mpic\-register=\fR\fIreg\fR" 4
|
9172 |
|
|
.IX Item "-mpic-register=reg"
|
9173 |
|
|
Specify the register to be used for \s-1PIC\s0 addressing. The default is R10
|
9174 |
|
|
unless stack-checking is enabled, when R9 is used.
|
9175 |
|
|
.IP "\fB\-mcirrus\-fix\-invalid\-insns\fR" 4
|
9176 |
|
|
.IX Item "-mcirrus-fix-invalid-insns"
|
9177 |
|
|
Insert NOPs into the instruction stream to in order to work around
|
9178 |
|
|
problems with invalid Maverick instruction combinations. This option
|
9179 |
|
|
is only valid if the \fB\-mcpu=ep9312\fR option has been used to
|
9180 |
|
|
enable generation of instructions for the Cirrus Maverick floating
|
9181 |
|
|
point co-processor. This option is not enabled by default, since the
|
9182 |
|
|
problem is only present in older Maverick implementations. The default
|
9183 |
|
|
can be re-enabled by use of the \fB\-mno\-cirrus\-fix\-invalid\-insns\fR
|
9184 |
|
|
switch.
|
9185 |
|
|
.IP "\fB\-mpoke\-function\-name\fR" 4
|
9186 |
|
|
.IX Item "-mpoke-function-name"
|
9187 |
|
|
Write the name of each function into the text section, directly
|
9188 |
|
|
preceding the function prologue. The generated code is similar to this:
|
9189 |
|
|
.Sp
|
9190 |
|
|
.Vb 9
|
9191 |
|
|
\& t0
|
9192 |
|
|
\& .ascii "arm_poke_function_name", 0
|
9193 |
|
|
\& .align
|
9194 |
|
|
\& t1
|
9195 |
|
|
\& .word 0xff000000 + (t1 \- t0)
|
9196 |
|
|
\& arm_poke_function_name
|
9197 |
|
|
\& mov ip, sp
|
9198 |
|
|
\& stmfd sp!, {fp, ip, lr, pc}
|
9199 |
|
|
\& sub fp, ip, #4
|
9200 |
|
|
.Ve
|
9201 |
|
|
.Sp
|
9202 |
|
|
When performing a stack backtrace, code can inspect the value of
|
9203 |
|
|
\&\f(CW\*(C`pc\*(C'\fR stored at \f(CW\*(C`fp + 0\*(C'\fR. If the trace function then looks at
|
9204 |
|
|
location \f(CW\*(C`pc \- 12\*(C'\fR and the top 8 bits are set, then we know that
|
9205 |
|
|
there is a function name embedded immediately preceding this location
|
9206 |
|
|
and has length \f(CW\*(C`((pc[\-3]) & 0xff000000)\*(C'\fR.
|
9207 |
|
|
.IP "\fB\-mthumb\fR" 4
|
9208 |
|
|
.IX Item "-mthumb"
|
9209 |
|
|
Generate code for the Thumb instruction set. The default is to
|
9210 |
|
|
use the 32\-bit \s-1ARM\s0 instruction set.
|
9211 |
|
|
This option automatically enables either 16\-bit Thumb\-1 or
|
9212 |
|
|
mixed 16/32\-bit Thumb\-2 instructions based on the \fB\-mcpu=\fR\fIname\fR
|
9213 |
|
|
and \fB\-march=\fR\fIname\fR options. This option is not passed to the
|
9214 |
|
|
assembler. If you want to force assembler files to be interpreted as Thumb code,
|
9215 |
|
|
either add a \fB.thumb\fR directive to the source or pass the \fB\-mthumb\fR
|
9216 |
|
|
option directly to the assembler by prefixing it with \fB\-Wa\fR.
|
9217 |
|
|
.IP "\fB\-mtpcs\-frame\fR" 4
|
9218 |
|
|
.IX Item "-mtpcs-frame"
|
9219 |
|
|
Generate a stack frame that is compliant with the Thumb Procedure Call
|
9220 |
|
|
Standard for all non-leaf functions. (A leaf function is one that does
|
9221 |
|
|
not call any other functions.) The default is \fB\-mno\-tpcs\-frame\fR.
|
9222 |
|
|
.IP "\fB\-mtpcs\-leaf\-frame\fR" 4
|
9223 |
|
|
.IX Item "-mtpcs-leaf-frame"
|
9224 |
|
|
Generate a stack frame that is compliant with the Thumb Procedure Call
|
9225 |
|
|
Standard for all leaf functions. (A leaf function is one that does
|
9226 |
|
|
not call any other functions.) The default is \fB\-mno\-apcs\-leaf\-frame\fR.
|
9227 |
|
|
.IP "\fB\-mcallee\-super\-interworking\fR" 4
|
9228 |
|
|
.IX Item "-mcallee-super-interworking"
|
9229 |
|
|
Gives all externally visible functions in the file being compiled an \s-1ARM\s0
|
9230 |
|
|
instruction set header which switches to Thumb mode before executing the
|
9231 |
|
|
rest of the function. This allows these functions to be called from
|
9232 |
|
|
non-interworking code. This option is not valid in \s-1AAPCS\s0 configurations
|
9233 |
|
|
because interworking is enabled by default.
|
9234 |
|
|
.IP "\fB\-mcaller\-super\-interworking\fR" 4
|
9235 |
|
|
.IX Item "-mcaller-super-interworking"
|
9236 |
|
|
Allows calls via function pointers (including virtual functions) to
|
9237 |
|
|
execute correctly regardless of whether the target code has been
|
9238 |
|
|
compiled for interworking or not. There is a small overhead in the cost
|
9239 |
|
|
of executing a function pointer if this option is enabled. This option
|
9240 |
|
|
is not valid in \s-1AAPCS\s0 configurations because interworking is enabled
|
9241 |
|
|
by default.
|
9242 |
|
|
.IP "\fB\-mtp=\fR\fIname\fR" 4
|
9243 |
|
|
.IX Item "-mtp=name"
|
9244 |
|
|
Specify the access model for the thread local storage pointer. The valid
|
9245 |
|
|
models are \fBsoft\fR, which generates calls to \f(CW\*(C`_\|_aeabi_read_tp\*(C'\fR,
|
9246 |
|
|
\&\fBcp15\fR, which fetches the thread pointer from \f(CW\*(C`cp15\*(C'\fR directly
|
9247 |
|
|
(supported in the arm6k architecture), and \fBauto\fR, which uses the
|
9248 |
|
|
best available method for the selected processor. The default setting is
|
9249 |
|
|
\&\fBauto\fR.
|
9250 |
|
|
.IP "\fB\-mword\-relocations\fR" 4
|
9251 |
|
|
.IX Item "-mword-relocations"
|
9252 |
|
|
Only generate absolute relocations on word sized values (i.e. R_ARM_ABS32).
|
9253 |
|
|
This is enabled by default on targets (uClinux, SymbianOS) where the runtime
|
9254 |
|
|
loader imposes this restriction, and when \fB\-fpic\fR or \fB\-fPIC\fR
|
9255 |
|
|
is specified.
|
9256 |
|
|
.PP
|
9257 |
|
|
\fI\s-1AVR\s0 Options\fR
|
9258 |
|
|
.IX Subsection "AVR Options"
|
9259 |
|
|
.PP
|
9260 |
|
|
These options are defined for \s-1AVR\s0 implementations:
|
9261 |
|
|
.IP "\fB\-mmcu=\fR\fImcu\fR" 4
|
9262 |
|
|
.IX Item "-mmcu=mcu"
|
9263 |
|
|
Specify \s-1ATMEL\s0 \s-1AVR\s0 instruction set or \s-1MCU\s0 type.
|
9264 |
|
|
.Sp
|
9265 |
|
|
Instruction set avr1 is for the minimal \s-1AVR\s0 core, not supported by the C
|
9266 |
|
|
compiler, only for assembler programs (\s-1MCU\s0 types: at90s1200, attiny10,
|
9267 |
|
|
attiny11, attiny12, attiny15, attiny28).
|
9268 |
|
|
.Sp
|
9269 |
|
|
Instruction set avr2 (default) is for the classic \s-1AVR\s0 core with up to
|
9270 |
|
|
8K program memory space (\s-1MCU\s0 types: at90s2313, at90s2323, attiny22,
|
9271 |
|
|
at90s2333, at90s2343, at90s4414, at90s4433, at90s4434, at90s8515,
|
9272 |
|
|
at90c8534, at90s8535).
|
9273 |
|
|
.Sp
|
9274 |
|
|
Instruction set avr3 is for the classic \s-1AVR\s0 core with up to 128K program
|
9275 |
|
|
memory space (\s-1MCU\s0 types: atmega103, atmega603, at43usb320, at76c711).
|
9276 |
|
|
.Sp
|
9277 |
|
|
Instruction set avr4 is for the enhanced \s-1AVR\s0 core with up to 8K program
|
9278 |
|
|
memory space (\s-1MCU\s0 types: atmega8, atmega83, atmega85).
|
9279 |
|
|
.Sp
|
9280 |
|
|
Instruction set avr5 is for the enhanced \s-1AVR\s0 core with up to 128K program
|
9281 |
|
|
memory space (\s-1MCU\s0 types: atmega16, atmega161, atmega163, atmega32, atmega323,
|
9282 |
|
|
atmega64, atmega128, at43usb355, at94k).
|
9283 |
|
|
.IP "\fB\-mno\-interrupts\fR" 4
|
9284 |
|
|
.IX Item "-mno-interrupts"
|
9285 |
|
|
Generated code is not compatible with hardware interrupts.
|
9286 |
|
|
Code size will be smaller.
|
9287 |
|
|
.IP "\fB\-mcall\-prologues\fR" 4
|
9288 |
|
|
.IX Item "-mcall-prologues"
|
9289 |
|
|
Functions prologues/epilogues expanded as call to appropriate
|
9290 |
|
|
subroutines. Code size will be smaller.
|
9291 |
|
|
.IP "\fB\-mtiny\-stack\fR" 4
|
9292 |
|
|
.IX Item "-mtiny-stack"
|
9293 |
|
|
Change only the low 8 bits of the stack pointer.
|
9294 |
|
|
.IP "\fB\-mint8\fR" 4
|
9295 |
|
|
.IX Item "-mint8"
|
9296 |
|
|
Assume int to be 8 bit integer. This affects the sizes of all types: A
|
9297 |
|
|
char will be 1 byte, an int will be 1 byte, a long will be 2 bytes
|
9298 |
|
|
and long long will be 4 bytes. Please note that this option does not
|
9299 |
|
|
comply to the C standards, but it will provide you with smaller code
|
9300 |
|
|
size.
|
9301 |
|
|
.PP
|
9302 |
|
|
\fIBlackfin Options\fR
|
9303 |
|
|
.IX Subsection "Blackfin Options"
|
9304 |
|
|
.IP "\fB\-mcpu=\fR\fIcpu\fR[\fB\-\fR\fIsirevision\fR]" 4
|
9305 |
|
|
.IX Item "-mcpu=cpu[-sirevision]"
|
9306 |
|
|
Specifies the name of the target Blackfin processor. Currently, \fIcpu\fR
|
9307 |
|
|
can be one of \fBbf512\fR, \fBbf514\fR, \fBbf516\fR, \fBbf518\fR,
|
9308 |
|
|
\&\fBbf522\fR, \fBbf523\fR, \fBbf524\fR, \fBbf525\fR, \fBbf526\fR,
|
9309 |
|
|
\&\fBbf527\fR, \fBbf531\fR, \fBbf532\fR, \fBbf533\fR,
|
9310 |
|
|
\&\fBbf534\fR, \fBbf536\fR, \fBbf537\fR, \fBbf538\fR, \fBbf539\fR,
|
9311 |
|
|
\&\fBbf542\fR, \fBbf544\fR, \fBbf547\fR, \fBbf548\fR, \fBbf549\fR,
|
9312 |
|
|
\&\fBbf542m\fR, \fBbf544m\fR, \fBbf547m\fR, \fBbf548m\fR, \fBbf549m\fR,
|
9313 |
|
|
\&\fBbf561\fR.
|
9314 |
|
|
The optional \fIsirevision\fR specifies the silicon revision of the target
|
9315 |
|
|
Blackfin processor. Any workarounds available for the targeted silicon revision
|
9316 |
|
|
will be enabled. If \fIsirevision\fR is \fBnone\fR, no workarounds are enabled.
|
9317 |
|
|
If \fIsirevision\fR is \fBany\fR, all workarounds for the targeted processor
|
9318 |
|
|
will be enabled. The \f(CW\*(C`_\|_SILICON_REVISION_\|_\*(C'\fR macro is defined to two
|
9319 |
|
|
hexadecimal digits representing the major and minor numbers in the silicon
|
9320 |
|
|
revision. If \fIsirevision\fR is \fBnone\fR, the \f(CW\*(C`_\|_SILICON_REVISION_\|_\*(C'\fR
|
9321 |
|
|
is not defined. If \fIsirevision\fR is \fBany\fR, the
|
9322 |
|
|
\&\f(CW\*(C`_\|_SILICON_REVISION_\|_\*(C'\fR is defined to be \f(CW0xffff\fR.
|
9323 |
|
|
If this optional \fIsirevision\fR is not used, \s-1GCC\s0 assumes the latest known
|
9324 |
|
|
silicon revision of the targeted Blackfin processor.
|
9325 |
|
|
.Sp
|
9326 |
|
|
Support for \fBbf561\fR is incomplete. For \fBbf561\fR,
|
9327 |
|
|
Only the processor macro is defined.
|
9328 |
|
|
Without this option, \fBbf532\fR is used as the processor by default.
|
9329 |
|
|
The corresponding predefined processor macros for \fIcpu\fR is to
|
9330 |
|
|
be defined. And for \fBbfin-elf\fR toolchain, this causes the hardware \s-1BSP\s0
|
9331 |
|
|
provided by libgloss to be linked in if \fB\-msim\fR is not given.
|
9332 |
|
|
.IP "\fB\-msim\fR" 4
|
9333 |
|
|
.IX Item "-msim"
|
9334 |
|
|
Specifies that the program will be run on the simulator. This causes
|
9335 |
|
|
the simulator \s-1BSP\s0 provided by libgloss to be linked in. This option
|
9336 |
|
|
has effect only for \fBbfin-elf\fR toolchain.
|
9337 |
|
|
Certain other options, such as \fB\-mid\-shared\-library\fR and
|
9338 |
|
|
\&\fB\-mfdpic\fR, imply \fB\-msim\fR.
|
9339 |
|
|
.IP "\fB\-momit\-leaf\-frame\-pointer\fR" 4
|
9340 |
|
|
.IX Item "-momit-leaf-frame-pointer"
|
9341 |
|
|
Don't keep the frame pointer in a register for leaf functions. This
|
9342 |
|
|
avoids the instructions to save, set up and restore frame pointers and
|
9343 |
|
|
makes an extra register available in leaf functions. The option
|
9344 |
|
|
\&\fB\-fomit\-frame\-pointer\fR removes the frame pointer for all functions
|
9345 |
|
|
which might make debugging harder.
|
9346 |
|
|
.IP "\fB\-mspecld\-anomaly\fR" 4
|
9347 |
|
|
.IX Item "-mspecld-anomaly"
|
9348 |
|
|
When enabled, the compiler will ensure that the generated code does not
|
9349 |
|
|
contain speculative loads after jump instructions. If this option is used,
|
9350 |
|
|
\&\f(CW\*(C`_\|_WORKAROUND_SPECULATIVE_LOADS\*(C'\fR is defined.
|
9351 |
|
|
.IP "\fB\-mno\-specld\-anomaly\fR" 4
|
9352 |
|
|
.IX Item "-mno-specld-anomaly"
|
9353 |
|
|
Don't generate extra code to prevent speculative loads from occurring.
|
9354 |
|
|
.IP "\fB\-mcsync\-anomaly\fR" 4
|
9355 |
|
|
.IX Item "-mcsync-anomaly"
|
9356 |
|
|
When enabled, the compiler will ensure that the generated code does not
|
9357 |
|
|
contain \s-1CSYNC\s0 or \s-1SSYNC\s0 instructions too soon after conditional branches.
|
9358 |
|
|
If this option is used, \f(CW\*(C`_\|_WORKAROUND_SPECULATIVE_SYNCS\*(C'\fR is defined.
|
9359 |
|
|
.IP "\fB\-mno\-csync\-anomaly\fR" 4
|
9360 |
|
|
.IX Item "-mno-csync-anomaly"
|
9361 |
|
|
Don't generate extra code to prevent \s-1CSYNC\s0 or \s-1SSYNC\s0 instructions from
|
9362 |
|
|
occurring too soon after a conditional branch.
|
9363 |
|
|
.IP "\fB\-mlow\-64k\fR" 4
|
9364 |
|
|
.IX Item "-mlow-64k"
|
9365 |
|
|
When enabled, the compiler is free to take advantage of the knowledge that
|
9366 |
|
|
the entire program fits into the low 64k of memory.
|
9367 |
|
|
.IP "\fB\-mno\-low\-64k\fR" 4
|
9368 |
|
|
.IX Item "-mno-low-64k"
|
9369 |
|
|
Assume that the program is arbitrarily large. This is the default.
|
9370 |
|
|
.IP "\fB\-mstack\-check\-l1\fR" 4
|
9371 |
|
|
.IX Item "-mstack-check-l1"
|
9372 |
|
|
Do stack checking using information placed into L1 scratchpad memory by the
|
9373 |
|
|
uClinux kernel.
|
9374 |
|
|
.IP "\fB\-mid\-shared\-library\fR" 4
|
9375 |
|
|
.IX Item "-mid-shared-library"
|
9376 |
|
|
Generate code that supports shared libraries via the library \s-1ID\s0 method.
|
9377 |
|
|
This allows for execute in place and shared libraries in an environment
|
9378 |
|
|
without virtual memory management. This option implies \fB\-fPIC\fR.
|
9379 |
|
|
With a \fBbfin-elf\fR target, this option implies \fB\-msim\fR.
|
9380 |
|
|
.IP "\fB\-mno\-id\-shared\-library\fR" 4
|
9381 |
|
|
.IX Item "-mno-id-shared-library"
|
9382 |
|
|
Generate code that doesn't assume \s-1ID\s0 based shared libraries are being used.
|
9383 |
|
|
This is the default.
|
9384 |
|
|
.IP "\fB\-mleaf\-id\-shared\-library\fR" 4
|
9385 |
|
|
.IX Item "-mleaf-id-shared-library"
|
9386 |
|
|
Generate code that supports shared libraries via the library \s-1ID\s0 method,
|
9387 |
|
|
but assumes that this library or executable won't link against any other
|
9388 |
|
|
\&\s-1ID\s0 shared libraries. That allows the compiler to use faster code for jumps
|
9389 |
|
|
and calls.
|
9390 |
|
|
.IP "\fB\-mno\-leaf\-id\-shared\-library\fR" 4
|
9391 |
|
|
.IX Item "-mno-leaf-id-shared-library"
|
9392 |
|
|
Do not assume that the code being compiled won't link against any \s-1ID\s0 shared
|
9393 |
|
|
libraries. Slower code will be generated for jump and call insns.
|
9394 |
|
|
.IP "\fB\-mshared\-library\-id=n\fR" 4
|
9395 |
|
|
.IX Item "-mshared-library-id=n"
|
9396 |
|
|
Specified the identification number of the \s-1ID\s0 based shared library being
|
9397 |
|
|
compiled. Specifying a value of 0 will generate more compact code, specifying
|
9398 |
|
|
other values will force the allocation of that number to the current
|
9399 |
|
|
library but is no more space or time efficient than omitting this option.
|
9400 |
|
|
.IP "\fB\-msep\-data\fR" 4
|
9401 |
|
|
.IX Item "-msep-data"
|
9402 |
|
|
Generate code that allows the data segment to be located in a different
|
9403 |
|
|
area of memory from the text segment. This allows for execute in place in
|
9404 |
|
|
an environment without virtual memory management by eliminating relocations
|
9405 |
|
|
against the text section.
|
9406 |
|
|
.IP "\fB\-mno\-sep\-data\fR" 4
|
9407 |
|
|
.IX Item "-mno-sep-data"
|
9408 |
|
|
Generate code that assumes that the data segment follows the text segment.
|
9409 |
|
|
This is the default.
|
9410 |
|
|
.IP "\fB\-mlong\-calls\fR" 4
|
9411 |
|
|
.IX Item "-mlong-calls"
|
9412 |
|
|
.PD 0
|
9413 |
|
|
.IP "\fB\-mno\-long\-calls\fR" 4
|
9414 |
|
|
.IX Item "-mno-long-calls"
|
9415 |
|
|
.PD
|
9416 |
|
|
Tells the compiler to perform function calls by first loading the
|
9417 |
|
|
address of the function into a register and then performing a subroutine
|
9418 |
|
|
call on this register. This switch is needed if the target function
|
9419 |
|
|
will lie outside of the 24 bit addressing range of the offset based
|
9420 |
|
|
version of subroutine call instruction.
|
9421 |
|
|
.Sp
|
9422 |
|
|
This feature is not enabled by default. Specifying
|
9423 |
|
|
\&\fB\-mno\-long\-calls\fR will restore the default behavior. Note these
|
9424 |
|
|
switches have no effect on how the compiler generates code to handle
|
9425 |
|
|
function calls via function pointers.
|
9426 |
|
|
.IP "\fB\-mfast\-fp\fR" 4
|
9427 |
|
|
.IX Item "-mfast-fp"
|
9428 |
|
|
Link with the fast floating-point library. This library relaxes some of
|
9429 |
|
|
the \s-1IEEE\s0 floating-point standard's rules for checking inputs against
|
9430 |
|
|
Not-a-Number (\s-1NAN\s0), in the interest of performance.
|
9431 |
|
|
.IP "\fB\-minline\-plt\fR" 4
|
9432 |
|
|
.IX Item "-minline-plt"
|
9433 |
|
|
Enable inlining of \s-1PLT\s0 entries in function calls to functions that are
|
9434 |
|
|
not known to bind locally. It has no effect without \fB\-mfdpic\fR.
|
9435 |
|
|
.IP "\fB\-mmulticore\fR" 4
|
9436 |
|
|
.IX Item "-mmulticore"
|
9437 |
|
|
Build standalone application for multicore Blackfin processor. Proper
|
9438 |
|
|
start files and link scripts will be used to support multicore.
|
9439 |
|
|
This option defines \f(CW\*(C`_\|_BFIN_MULTICORE\*(C'\fR. It can only be used with
|
9440 |
|
|
\&\fB\-mcpu=bf561\fR[\fB\-\fR\fIsirevision\fR]. It can be used with
|
9441 |
|
|
\&\fB\-mcorea\fR or \fB\-mcoreb\fR. If it's used without
|
9442 |
|
|
\&\fB\-mcorea\fR or \fB\-mcoreb\fR, single application/dual core
|
9443 |
|
|
programming model is used. In this model, the main function of Core B
|
9444 |
|
|
should be named as coreb_main. If it's used with \fB\-mcorea\fR or
|
9445 |
|
|
\&\fB\-mcoreb\fR, one application per core programming model is used.
|
9446 |
|
|
If this option is not used, single core application programming
|
9447 |
|
|
model is used.
|
9448 |
|
|
.IP "\fB\-mcorea\fR" 4
|
9449 |
|
|
.IX Item "-mcorea"
|
9450 |
|
|
Build standalone application for Core A of \s-1BF561\s0 when using
|
9451 |
|
|
one application per core programming model. Proper start files
|
9452 |
|
|
and link scripts will be used to support Core A. This option
|
9453 |
|
|
defines \f(CW\*(C`_\|_BFIN_COREA\*(C'\fR. It must be used with \fB\-mmulticore\fR.
|
9454 |
|
|
.IP "\fB\-mcoreb\fR" 4
|
9455 |
|
|
.IX Item "-mcoreb"
|
9456 |
|
|
Build standalone application for Core B of \s-1BF561\s0 when using
|
9457 |
|
|
one application per core programming model. Proper start files
|
9458 |
|
|
and link scripts will be used to support Core B. This option
|
9459 |
|
|
defines \f(CW\*(C`_\|_BFIN_COREB\*(C'\fR. When this option is used, coreb_main
|
9460 |
|
|
should be used instead of main. It must be used with
|
9461 |
|
|
\&\fB\-mmulticore\fR.
|
9462 |
|
|
.IP "\fB\-msdram\fR" 4
|
9463 |
|
|
.IX Item "-msdram"
|
9464 |
|
|
Build standalone application for \s-1SDRAM\s0. Proper start files and
|
9465 |
|
|
link scripts will be used to put the application into \s-1SDRAM\s0.
|
9466 |
|
|
Loader should initialize \s-1SDRAM\s0 before loading the application
|
9467 |
|
|
into \s-1SDRAM\s0. This option defines \f(CW\*(C`_\|_BFIN_SDRAM\*(C'\fR.
|
9468 |
|
|
.IP "\fB\-micplb\fR" 4
|
9469 |
|
|
.IX Item "-micplb"
|
9470 |
|
|
Assume that ICPLBs are enabled at runtime. This has an effect on certain
|
9471 |
|
|
anomaly workarounds. For Linux targets, the default is to assume ICPLBs
|
9472 |
|
|
are enabled; for standalone applications the default is off.
|
9473 |
|
|
.PP
|
9474 |
|
|
\fI\s-1CRIS\s0 Options\fR
|
9475 |
|
|
.IX Subsection "CRIS Options"
|
9476 |
|
|
.PP
|
9477 |
|
|
These options are defined specifically for the \s-1CRIS\s0 ports.
|
9478 |
|
|
.IP "\fB\-march=\fR\fIarchitecture-type\fR" 4
|
9479 |
|
|
.IX Item "-march=architecture-type"
|
9480 |
|
|
.PD 0
|
9481 |
|
|
.IP "\fB\-mcpu=\fR\fIarchitecture-type\fR" 4
|
9482 |
|
|
.IX Item "-mcpu=architecture-type"
|
9483 |
|
|
.PD
|
9484 |
|
|
Generate code for the specified architecture. The choices for
|
9485 |
|
|
\&\fIarchitecture-type\fR are \fBv3\fR, \fBv8\fR and \fBv10\fR for
|
9486 |
|
|
respectively \s-1ETRAX\s0\ 4, \s-1ETRAX\s0\ 100, and \s-1ETRAX\s0\ 100\ \s-1LX\s0.
|
9487 |
|
|
Default is \fBv0\fR except for cris-axis-linux-gnu, where the default is
|
9488 |
|
|
\&\fBv10\fR.
|
9489 |
|
|
.IP "\fB\-mtune=\fR\fIarchitecture-type\fR" 4
|
9490 |
|
|
.IX Item "-mtune=architecture-type"
|
9491 |
|
|
Tune to \fIarchitecture-type\fR everything applicable about the generated
|
9492 |
|
|
code, except for the \s-1ABI\s0 and the set of available instructions. The
|
9493 |
|
|
choices for \fIarchitecture-type\fR are the same as for
|
9494 |
|
|
\&\fB\-march=\fR\fIarchitecture-type\fR.
|
9495 |
|
|
.IP "\fB\-mmax\-stack\-frame=\fR\fIn\fR" 4
|
9496 |
|
|
.IX Item "-mmax-stack-frame=n"
|
9497 |
|
|
Warn when the stack frame of a function exceeds \fIn\fR bytes.
|
9498 |
|
|
.IP "\fB\-metrax4\fR" 4
|
9499 |
|
|
.IX Item "-metrax4"
|
9500 |
|
|
.PD 0
|
9501 |
|
|
.IP "\fB\-metrax100\fR" 4
|
9502 |
|
|
.IX Item "-metrax100"
|
9503 |
|
|
.PD
|
9504 |
|
|
The options \fB\-metrax4\fR and \fB\-metrax100\fR are synonyms for
|
9505 |
|
|
\&\fB\-march=v3\fR and \fB\-march=v8\fR respectively.
|
9506 |
|
|
.IP "\fB\-mmul\-bug\-workaround\fR" 4
|
9507 |
|
|
.IX Item "-mmul-bug-workaround"
|
9508 |
|
|
.PD 0
|
9509 |
|
|
.IP "\fB\-mno\-mul\-bug\-workaround\fR" 4
|
9510 |
|
|
.IX Item "-mno-mul-bug-workaround"
|
9511 |
|
|
.PD
|
9512 |
|
|
Work around a bug in the \f(CW\*(C`muls\*(C'\fR and \f(CW\*(C`mulu\*(C'\fR instructions for \s-1CPU\s0
|
9513 |
|
|
models where it applies. This option is active by default.
|
9514 |
|
|
.IP "\fB\-mpdebug\fR" 4
|
9515 |
|
|
.IX Item "-mpdebug"
|
9516 |
|
|
Enable CRIS-specific verbose debug-related information in the assembly
|
9517 |
|
|
code. This option also has the effect to turn off the \fB#NO_APP\fR
|
9518 |
|
|
formatted-code indicator to the assembler at the beginning of the
|
9519 |
|
|
assembly file.
|
9520 |
|
|
.IP "\fB\-mcc\-init\fR" 4
|
9521 |
|
|
.IX Item "-mcc-init"
|
9522 |
|
|
Do not use condition-code results from previous instruction; always emit
|
9523 |
|
|
compare and test instructions before use of condition codes.
|
9524 |
|
|
.IP "\fB\-mno\-side\-effects\fR" 4
|
9525 |
|
|
.IX Item "-mno-side-effects"
|
9526 |
|
|
Do not emit instructions with side-effects in addressing modes other than
|
9527 |
|
|
post-increment.
|
9528 |
|
|
.IP "\fB\-mstack\-align\fR" 4
|
9529 |
|
|
.IX Item "-mstack-align"
|
9530 |
|
|
.PD 0
|
9531 |
|
|
.IP "\fB\-mno\-stack\-align\fR" 4
|
9532 |
|
|
.IX Item "-mno-stack-align"
|
9533 |
|
|
.IP "\fB\-mdata\-align\fR" 4
|
9534 |
|
|
.IX Item "-mdata-align"
|
9535 |
|
|
.IP "\fB\-mno\-data\-align\fR" 4
|
9536 |
|
|
.IX Item "-mno-data-align"
|
9537 |
|
|
.IP "\fB\-mconst\-align\fR" 4
|
9538 |
|
|
.IX Item "-mconst-align"
|
9539 |
|
|
.IP "\fB\-mno\-const\-align\fR" 4
|
9540 |
|
|
.IX Item "-mno-const-align"
|
9541 |
|
|
.PD
|
9542 |
|
|
These options (no-options) arranges (eliminate arrangements) for the
|
9543 |
|
|
stack-frame, individual data and constants to be aligned for the maximum
|
9544 |
|
|
single data access size for the chosen \s-1CPU\s0 model. The default is to
|
9545 |
|
|
arrange for 32\-bit alignment. \s-1ABI\s0 details such as structure layout are
|
9546 |
|
|
not affected by these options.
|
9547 |
|
|
.IP "\fB\-m32\-bit\fR" 4
|
9548 |
|
|
.IX Item "-m32-bit"
|
9549 |
|
|
.PD 0
|
9550 |
|
|
.IP "\fB\-m16\-bit\fR" 4
|
9551 |
|
|
.IX Item "-m16-bit"
|
9552 |
|
|
.IP "\fB\-m8\-bit\fR" 4
|
9553 |
|
|
.IX Item "-m8-bit"
|
9554 |
|
|
.PD
|
9555 |
|
|
Similar to the stack\- data\- and const-align options above, these options
|
9556 |
|
|
arrange for stack-frame, writable data and constants to all be 32\-bit,
|
9557 |
|
|
16\-bit or 8\-bit aligned. The default is 32\-bit alignment.
|
9558 |
|
|
.IP "\fB\-mno\-prologue\-epilogue\fR" 4
|
9559 |
|
|
.IX Item "-mno-prologue-epilogue"
|
9560 |
|
|
.PD 0
|
9561 |
|
|
.IP "\fB\-mprologue\-epilogue\fR" 4
|
9562 |
|
|
.IX Item "-mprologue-epilogue"
|
9563 |
|
|
.PD
|
9564 |
|
|
With \fB\-mno\-prologue\-epilogue\fR, the normal function prologue and
|
9565 |
|
|
epilogue that sets up the stack-frame are omitted and no return
|
9566 |
|
|
instructions or return sequences are generated in the code. Use this
|
9567 |
|
|
option only together with visual inspection of the compiled code: no
|
9568 |
|
|
warnings or errors are generated when call-saved registers must be saved,
|
9569 |
|
|
or storage for local variable needs to be allocated.
|
9570 |
|
|
.IP "\fB\-mno\-gotplt\fR" 4
|
9571 |
|
|
.IX Item "-mno-gotplt"
|
9572 |
|
|
.PD 0
|
9573 |
|
|
.IP "\fB\-mgotplt\fR" 4
|
9574 |
|
|
.IX Item "-mgotplt"
|
9575 |
|
|
.PD
|
9576 |
|
|
With \fB\-fpic\fR and \fB\-fPIC\fR, don't generate (do generate)
|
9577 |
|
|
instruction sequences that load addresses for functions from the \s-1PLT\s0 part
|
9578 |
|
|
of the \s-1GOT\s0 rather than (traditional on other architectures) calls to the
|
9579 |
|
|
\&\s-1PLT\s0. The default is \fB\-mgotplt\fR.
|
9580 |
|
|
.IP "\fB\-melf\fR" 4
|
9581 |
|
|
.IX Item "-melf"
|
9582 |
|
|
Legacy no-op option only recognized with the cris-axis-elf and
|
9583 |
|
|
cris-axis-linux-gnu targets.
|
9584 |
|
|
.IP "\fB\-mlinux\fR" 4
|
9585 |
|
|
.IX Item "-mlinux"
|
9586 |
|
|
Legacy no-op option only recognized with the cris-axis-linux-gnu target.
|
9587 |
|
|
.IP "\fB\-sim\fR" 4
|
9588 |
|
|
.IX Item "-sim"
|
9589 |
|
|
This option, recognized for the cris-axis-elf arranges
|
9590 |
|
|
to link with input-output functions from a simulator library. Code,
|
9591 |
|
|
initialized data and zero-initialized data are allocated consecutively.
|
9592 |
|
|
.IP "\fB\-sim2\fR" 4
|
9593 |
|
|
.IX Item "-sim2"
|
9594 |
|
|
Like \fB\-sim\fR, but pass linker options to locate initialized data at
|
9595 |
|
|
0x40000000 and zero-initialized data at 0x80000000.
|
9596 |
|
|
.PP
|
9597 |
|
|
\fI\s-1CRX\s0 Options\fR
|
9598 |
|
|
.IX Subsection "CRX Options"
|
9599 |
|
|
.PP
|
9600 |
|
|
These options are defined specifically for the \s-1CRX\s0 ports.
|
9601 |
|
|
.IP "\fB\-mmac\fR" 4
|
9602 |
|
|
.IX Item "-mmac"
|
9603 |
|
|
Enable the use of multiply-accumulate instructions. Disabled by default.
|
9604 |
|
|
.IP "\fB\-mpush\-args\fR" 4
|
9605 |
|
|
.IX Item "-mpush-args"
|
9606 |
|
|
Push instructions will be used to pass outgoing arguments when functions
|
9607 |
|
|
are called. Enabled by default.
|
9608 |
|
|
.PP
|
9609 |
|
|
\fIDarwin Options\fR
|
9610 |
|
|
.IX Subsection "Darwin Options"
|
9611 |
|
|
.PP
|
9612 |
|
|
These options are defined for all architectures running the Darwin operating
|
9613 |
|
|
system.
|
9614 |
|
|
.PP
|
9615 |
|
|
\&\s-1FSF\s0 \s-1GCC\s0 on Darwin does not create \*(L"fat\*(R" object files; it will create
|
9616 |
|
|
an object file for the single architecture that it was built to
|
9617 |
|
|
target. Apple's \s-1GCC\s0 on Darwin does create \*(L"fat\*(R" files if multiple
|
9618 |
|
|
\&\fB\-arch\fR options are used; it does so by running the compiler or
|
9619 |
|
|
linker multiple times and joining the results together with
|
9620 |
|
|
\&\fIlipo\fR.
|
9621 |
|
|
.PP
|
9622 |
|
|
The subtype of the file created (like \fBppc7400\fR or \fBppc970\fR or
|
9623 |
|
|
\&\fBi686\fR) is determined by the flags that specify the \s-1ISA\s0
|
9624 |
|
|
that \s-1GCC\s0 is targetting, like \fB\-mcpu\fR or \fB\-march\fR. The
|
9625 |
|
|
\&\fB\-force_cpusubtype_ALL\fR option can be used to override this.
|
9626 |
|
|
.PP
|
9627 |
|
|
The Darwin tools vary in their behavior when presented with an \s-1ISA\s0
|
9628 |
|
|
mismatch. The assembler, \fIas\fR, will only permit instructions to
|
9629 |
|
|
be used that are valid for the subtype of the file it is generating,
|
9630 |
|
|
so you cannot put 64\-bit instructions in a \fBppc750\fR object file.
|
9631 |
|
|
The linker for shared libraries, \fI/usr/bin/libtool\fR, will fail
|
9632 |
|
|
and print an error if asked to create a shared library with a less
|
9633 |
|
|
restrictive subtype than its input files (for instance, trying to put
|
9634 |
|
|
a \fBppc970\fR object file in a \fBppc7400\fR library). The linker
|
9635 |
|
|
for executables, \fIld\fR, will quietly give the executable the most
|
9636 |
|
|
restrictive subtype of any of its input files.
|
9637 |
|
|
.IP "\fB\-F\fR\fIdir\fR" 4
|
9638 |
|
|
.IX Item "-Fdir"
|
9639 |
|
|
Add the framework directory \fIdir\fR to the head of the list of
|
9640 |
|
|
directories to be searched for header files. These directories are
|
9641 |
|
|
interleaved with those specified by \fB\-I\fR options and are
|
9642 |
|
|
scanned in a left-to-right order.
|
9643 |
|
|
.Sp
|
9644 |
|
|
A framework directory is a directory with frameworks in it. A
|
9645 |
|
|
framework is a directory with a \fB\*(L"Headers\*(R"\fR and/or
|
9646 |
|
|
\&\fB\*(L"PrivateHeaders\*(R"\fR directory contained directly in it that ends
|
9647 |
|
|
in \fB\*(L".framework\*(R"\fR. The name of a framework is the name of this
|
9648 |
|
|
directory excluding the \fB\*(L".framework\*(R"\fR. Headers associated with
|
9649 |
|
|
the framework are found in one of those two directories, with
|
9650 |
|
|
\&\fB\*(L"Headers\*(R"\fR being searched first. A subframework is a framework
|
9651 |
|
|
directory that is in a framework's \fB\*(L"Frameworks\*(R"\fR directory.
|
9652 |
|
|
Includes of subframework headers can only appear in a header of a
|
9653 |
|
|
framework that contains the subframework, or in a sibling subframework
|
9654 |
|
|
header. Two subframeworks are siblings if they occur in the same
|
9655 |
|
|
framework. A subframework should not have the same name as a
|
9656 |
|
|
framework, a warning will be issued if this is violated. Currently a
|
9657 |
|
|
subframework cannot have subframeworks, in the future, the mechanism
|
9658 |
|
|
may be extended to support this. The standard frameworks can be found
|
9659 |
|
|
in \fB\*(L"/System/Library/Frameworks\*(R"\fR and
|
9660 |
|
|
\&\fB\*(L"/Library/Frameworks\*(R"\fR. An example include looks like
|
9661 |
|
|
\&\f(CW\*(C`#include \*(C'\fR, where \fBFramework\fR denotes
|
9662 |
|
|
the name of the framework and header.h is found in the
|
9663 |
|
|
\&\fB\*(L"PrivateHeaders\*(R"\fR or \fB\*(L"Headers\*(R"\fR directory.
|
9664 |
|
|
.IP "\fB\-iframework\fR\fIdir\fR" 4
|
9665 |
|
|
.IX Item "-iframeworkdir"
|
9666 |
|
|
Like \fB\-F\fR except the directory is a treated as a system
|
9667 |
|
|
directory. The main difference between this \fB\-iframework\fR and
|
9668 |
|
|
\&\fB\-F\fR is that with \fB\-iframework\fR the compiler does not
|
9669 |
|
|
warn about constructs contained within header files found via
|
9670 |
|
|
\&\fIdir\fR. This option is valid only for the C family of languages.
|
9671 |
|
|
.IP "\fB\-gused\fR" 4
|
9672 |
|
|
.IX Item "-gused"
|
9673 |
|
|
Emit debugging information for symbols that are used. For \s-1STABS\s0
|
9674 |
|
|
debugging format, this enables \fB\-feliminate\-unused\-debug\-symbols\fR.
|
9675 |
|
|
This is by default \s-1ON\s0.
|
9676 |
|
|
.IP "\fB\-gfull\fR" 4
|
9677 |
|
|
.IX Item "-gfull"
|
9678 |
|
|
Emit debugging information for all symbols and types.
|
9679 |
|
|
.IP "\fB\-mmacosx\-version\-min=\fR\fIversion\fR" 4
|
9680 |
|
|
.IX Item "-mmacosx-version-min=version"
|
9681 |
|
|
The earliest version of MacOS X that this executable will run on
|
9682 |
|
|
is \fIversion\fR. Typical values of \fIversion\fR include \f(CW10.1\fR,
|
9683 |
|
|
\&\f(CW10.2\fR, and \f(CW10.3.9\fR.
|
9684 |
|
|
.Sp
|
9685 |
|
|
If the compiler was built to use the system's headers by default,
|
9686 |
|
|
then the default for this option is the system version on which the
|
9687 |
|
|
compiler is running, otherwise the default is to make choices which
|
9688 |
|
|
are compatible with as many systems and code bases as possible.
|
9689 |
|
|
.IP "\fB\-mkernel\fR" 4
|
9690 |
|
|
.IX Item "-mkernel"
|
9691 |
|
|
Enable kernel development mode. The \fB\-mkernel\fR option sets
|
9692 |
|
|
\&\fB\-static\fR, \fB\-fno\-common\fR, \fB\-fno\-cxa\-atexit\fR,
|
9693 |
|
|
\&\fB\-fno\-exceptions\fR, \fB\-fno\-non\-call\-exceptions\fR,
|
9694 |
|
|
\&\fB\-fapple\-kext\fR, \fB\-fno\-weak\fR and \fB\-fno\-rtti\fR where
|
9695 |
|
|
applicable. This mode also sets \fB\-mno\-altivec\fR,
|
9696 |
|
|
\&\fB\-msoft\-float\fR, \fB\-fno\-builtin\fR and
|
9697 |
|
|
\&\fB\-mlong\-branch\fR for PowerPC targets.
|
9698 |
|
|
.IP "\fB\-mone\-byte\-bool\fR" 4
|
9699 |
|
|
.IX Item "-mone-byte-bool"
|
9700 |
|
|
Override the defaults for \fBbool\fR so that \fBsizeof(bool)==1\fR.
|
9701 |
|
|
By default \fBsizeof(bool)\fR is \fB4\fR when compiling for
|
9702 |
|
|
Darwin/PowerPC and \fB1\fR when compiling for Darwin/x86, so this
|
9703 |
|
|
option has no effect on x86.
|
9704 |
|
|
.Sp
|
9705 |
|
|
\&\fBWarning:\fR The \fB\-mone\-byte\-bool\fR switch causes \s-1GCC\s0
|
9706 |
|
|
to generate code that is not binary compatible with code generated
|
9707 |
|
|
without that switch. Using this switch may require recompiling all
|
9708 |
|
|
other modules in a program, including system libraries. Use this
|
9709 |
|
|
switch to conform to a non-default data model.
|
9710 |
|
|
.IP "\fB\-mfix\-and\-continue\fR" 4
|
9711 |
|
|
.IX Item "-mfix-and-continue"
|
9712 |
|
|
.PD 0
|
9713 |
|
|
.IP "\fB\-ffix\-and\-continue\fR" 4
|
9714 |
|
|
.IX Item "-ffix-and-continue"
|
9715 |
|
|
.IP "\fB\-findirect\-data\fR" 4
|
9716 |
|
|
.IX Item "-findirect-data"
|
9717 |
|
|
.PD
|
9718 |
|
|
Generate code suitable for fast turn around development. Needed to
|
9719 |
|
|
enable gdb to dynamically load \f(CW\*(C`.o\*(C'\fR files into already running
|
9720 |
|
|
programs. \fB\-findirect\-data\fR and \fB\-ffix\-and\-continue\fR
|
9721 |
|
|
are provided for backwards compatibility.
|
9722 |
|
|
.IP "\fB\-all_load\fR" 4
|
9723 |
|
|
.IX Item "-all_load"
|
9724 |
|
|
Loads all members of static archive libraries.
|
9725 |
|
|
See man \fIld\fR\|(1) for more information.
|
9726 |
|
|
.IP "\fB\-arch_errors_fatal\fR" 4
|
9727 |
|
|
.IX Item "-arch_errors_fatal"
|
9728 |
|
|
Cause the errors having to do with files that have the wrong architecture
|
9729 |
|
|
to be fatal.
|
9730 |
|
|
.IP "\fB\-bind_at_load\fR" 4
|
9731 |
|
|
.IX Item "-bind_at_load"
|
9732 |
|
|
Causes the output file to be marked such that the dynamic linker will
|
9733 |
|
|
bind all undefined references when the file is loaded or launched.
|
9734 |
|
|
.IP "\fB\-bundle\fR" 4
|
9735 |
|
|
.IX Item "-bundle"
|
9736 |
|
|
Produce a Mach-o bundle format file.
|
9737 |
|
|
See man \fIld\fR\|(1) for more information.
|
9738 |
|
|
.IP "\fB\-bundle_loader\fR \fIexecutable\fR" 4
|
9739 |
|
|
.IX Item "-bundle_loader executable"
|
9740 |
|
|
This option specifies the \fIexecutable\fR that will be loading the build
|
9741 |
|
|
output file being linked. See man \fIld\fR\|(1) for more information.
|
9742 |
|
|
.IP "\fB\-dynamiclib\fR" 4
|
9743 |
|
|
.IX Item "-dynamiclib"
|
9744 |
|
|
When passed this option, \s-1GCC\s0 will produce a dynamic library instead of
|
9745 |
|
|
an executable when linking, using the Darwin \fIlibtool\fR command.
|
9746 |
|
|
.IP "\fB\-force_cpusubtype_ALL\fR" 4
|
9747 |
|
|
.IX Item "-force_cpusubtype_ALL"
|
9748 |
|
|
This causes \s-1GCC\s0's output file to have the \fI\s-1ALL\s0\fR subtype, instead of
|
9749 |
|
|
one controlled by the \fB\-mcpu\fR or \fB\-march\fR option.
|
9750 |
|
|
.IP "\fB\-allowable_client\fR \fIclient_name\fR" 4
|
9751 |
|
|
.IX Item "-allowable_client client_name"
|
9752 |
|
|
.PD 0
|
9753 |
|
|
.IP "\fB\-client_name\fR" 4
|
9754 |
|
|
.IX Item "-client_name"
|
9755 |
|
|
.IP "\fB\-compatibility_version\fR" 4
|
9756 |
|
|
.IX Item "-compatibility_version"
|
9757 |
|
|
.IP "\fB\-current_version\fR" 4
|
9758 |
|
|
.IX Item "-current_version"
|
9759 |
|
|
.IP "\fB\-dead_strip\fR" 4
|
9760 |
|
|
.IX Item "-dead_strip"
|
9761 |
|
|
.IP "\fB\-dependency\-file\fR" 4
|
9762 |
|
|
.IX Item "-dependency-file"
|
9763 |
|
|
.IP "\fB\-dylib_file\fR" 4
|
9764 |
|
|
.IX Item "-dylib_file"
|
9765 |
|
|
.IP "\fB\-dylinker_install_name\fR" 4
|
9766 |
|
|
.IX Item "-dylinker_install_name"
|
9767 |
|
|
.IP "\fB\-dynamic\fR" 4
|
9768 |
|
|
.IX Item "-dynamic"
|
9769 |
|
|
.IP "\fB\-exported_symbols_list\fR" 4
|
9770 |
|
|
.IX Item "-exported_symbols_list"
|
9771 |
|
|
.IP "\fB\-filelist\fR" 4
|
9772 |
|
|
.IX Item "-filelist"
|
9773 |
|
|
.IP "\fB\-flat_namespace\fR" 4
|
9774 |
|
|
.IX Item "-flat_namespace"
|
9775 |
|
|
.IP "\fB\-force_flat_namespace\fR" 4
|
9776 |
|
|
.IX Item "-force_flat_namespace"
|
9777 |
|
|
.IP "\fB\-headerpad_max_install_names\fR" 4
|
9778 |
|
|
.IX Item "-headerpad_max_install_names"
|
9779 |
|
|
.IP "\fB\-image_base\fR" 4
|
9780 |
|
|
.IX Item "-image_base"
|
9781 |
|
|
.IP "\fB\-init\fR" 4
|
9782 |
|
|
.IX Item "-init"
|
9783 |
|
|
.IP "\fB\-install_name\fR" 4
|
9784 |
|
|
.IX Item "-install_name"
|
9785 |
|
|
.IP "\fB\-keep_private_externs\fR" 4
|
9786 |
|
|
.IX Item "-keep_private_externs"
|
9787 |
|
|
.IP "\fB\-multi_module\fR" 4
|
9788 |
|
|
.IX Item "-multi_module"
|
9789 |
|
|
.IP "\fB\-multiply_defined\fR" 4
|
9790 |
|
|
.IX Item "-multiply_defined"
|
9791 |
|
|
.IP "\fB\-multiply_defined_unused\fR" 4
|
9792 |
|
|
.IX Item "-multiply_defined_unused"
|
9793 |
|
|
.IP "\fB\-noall_load\fR" 4
|
9794 |
|
|
.IX Item "-noall_load"
|
9795 |
|
|
.IP "\fB\-no_dead_strip_inits_and_terms\fR" 4
|
9796 |
|
|
.IX Item "-no_dead_strip_inits_and_terms"
|
9797 |
|
|
.IP "\fB\-nofixprebinding\fR" 4
|
9798 |
|
|
.IX Item "-nofixprebinding"
|
9799 |
|
|
.IP "\fB\-nomultidefs\fR" 4
|
9800 |
|
|
.IX Item "-nomultidefs"
|
9801 |
|
|
.IP "\fB\-noprebind\fR" 4
|
9802 |
|
|
.IX Item "-noprebind"
|
9803 |
|
|
.IP "\fB\-noseglinkedit\fR" 4
|
9804 |
|
|
.IX Item "-noseglinkedit"
|
9805 |
|
|
.IP "\fB\-pagezero_size\fR" 4
|
9806 |
|
|
.IX Item "-pagezero_size"
|
9807 |
|
|
.IP "\fB\-prebind\fR" 4
|
9808 |
|
|
.IX Item "-prebind"
|
9809 |
|
|
.IP "\fB\-prebind_all_twolevel_modules\fR" 4
|
9810 |
|
|
.IX Item "-prebind_all_twolevel_modules"
|
9811 |
|
|
.IP "\fB\-private_bundle\fR" 4
|
9812 |
|
|
.IX Item "-private_bundle"
|
9813 |
|
|
.IP "\fB\-read_only_relocs\fR" 4
|
9814 |
|
|
.IX Item "-read_only_relocs"
|
9815 |
|
|
.IP "\fB\-sectalign\fR" 4
|
9816 |
|
|
.IX Item "-sectalign"
|
9817 |
|
|
.IP "\fB\-sectobjectsymbols\fR" 4
|
9818 |
|
|
.IX Item "-sectobjectsymbols"
|
9819 |
|
|
.IP "\fB\-whyload\fR" 4
|
9820 |
|
|
.IX Item "-whyload"
|
9821 |
|
|
.IP "\fB\-seg1addr\fR" 4
|
9822 |
|
|
.IX Item "-seg1addr"
|
9823 |
|
|
.IP "\fB\-sectcreate\fR" 4
|
9824 |
|
|
.IX Item "-sectcreate"
|
9825 |
|
|
.IP "\fB\-sectobjectsymbols\fR" 4
|
9826 |
|
|
.IX Item "-sectobjectsymbols"
|
9827 |
|
|
.IP "\fB\-sectorder\fR" 4
|
9828 |
|
|
.IX Item "-sectorder"
|
9829 |
|
|
.IP "\fB\-segaddr\fR" 4
|
9830 |
|
|
.IX Item "-segaddr"
|
9831 |
|
|
.IP "\fB\-segs_read_only_addr\fR" 4
|
9832 |
|
|
.IX Item "-segs_read_only_addr"
|
9833 |
|
|
.IP "\fB\-segs_read_write_addr\fR" 4
|
9834 |
|
|
.IX Item "-segs_read_write_addr"
|
9835 |
|
|
.IP "\fB\-seg_addr_table\fR" 4
|
9836 |
|
|
.IX Item "-seg_addr_table"
|
9837 |
|
|
.IP "\fB\-seg_addr_table_filename\fR" 4
|
9838 |
|
|
.IX Item "-seg_addr_table_filename"
|
9839 |
|
|
.IP "\fB\-seglinkedit\fR" 4
|
9840 |
|
|
.IX Item "-seglinkedit"
|
9841 |
|
|
.IP "\fB\-segprot\fR" 4
|
9842 |
|
|
.IX Item "-segprot"
|
9843 |
|
|
.IP "\fB\-segs_read_only_addr\fR" 4
|
9844 |
|
|
.IX Item "-segs_read_only_addr"
|
9845 |
|
|
.IP "\fB\-segs_read_write_addr\fR" 4
|
9846 |
|
|
.IX Item "-segs_read_write_addr"
|
9847 |
|
|
.IP "\fB\-single_module\fR" 4
|
9848 |
|
|
.IX Item "-single_module"
|
9849 |
|
|
.IP "\fB\-static\fR" 4
|
9850 |
|
|
.IX Item "-static"
|
9851 |
|
|
.IP "\fB\-sub_library\fR" 4
|
9852 |
|
|
.IX Item "-sub_library"
|
9853 |
|
|
.IP "\fB\-sub_umbrella\fR" 4
|
9854 |
|
|
.IX Item "-sub_umbrella"
|
9855 |
|
|
.IP "\fB\-twolevel_namespace\fR" 4
|
9856 |
|
|
.IX Item "-twolevel_namespace"
|
9857 |
|
|
.IP "\fB\-umbrella\fR" 4
|
9858 |
|
|
.IX Item "-umbrella"
|
9859 |
|
|
.IP "\fB\-undefined\fR" 4
|
9860 |
|
|
.IX Item "-undefined"
|
9861 |
|
|
.IP "\fB\-unexported_symbols_list\fR" 4
|
9862 |
|
|
.IX Item "-unexported_symbols_list"
|
9863 |
|
|
.IP "\fB\-weak_reference_mismatches\fR" 4
|
9864 |
|
|
.IX Item "-weak_reference_mismatches"
|
9865 |
|
|
.IP "\fB\-whatsloaded\fR" 4
|
9866 |
|
|
.IX Item "-whatsloaded"
|
9867 |
|
|
.PD
|
9868 |
|
|
These options are passed to the Darwin linker. The Darwin linker man page
|
9869 |
|
|
describes them in detail.
|
9870 |
|
|
.PP
|
9871 |
|
|
\fI\s-1DEC\s0 Alpha Options\fR
|
9872 |
|
|
.IX Subsection "DEC Alpha Options"
|
9873 |
|
|
.PP
|
9874 |
|
|
These \fB\-m\fR options are defined for the \s-1DEC\s0 Alpha implementations:
|
9875 |
|
|
.IP "\fB\-mno\-soft\-float\fR" 4
|
9876 |
|
|
.IX Item "-mno-soft-float"
|
9877 |
|
|
.PD 0
|
9878 |
|
|
.IP "\fB\-msoft\-float\fR" 4
|
9879 |
|
|
.IX Item "-msoft-float"
|
9880 |
|
|
.PD
|
9881 |
|
|
Use (do not use) the hardware floating-point instructions for
|
9882 |
|
|
floating-point operations. When \fB\-msoft\-float\fR is specified,
|
9883 |
|
|
functions in \fIlibgcc.a\fR will be used to perform floating-point
|
9884 |
|
|
operations. Unless they are replaced by routines that emulate the
|
9885 |
|
|
floating-point operations, or compiled in such a way as to call such
|
9886 |
|
|
emulations routines, these routines will issue floating-point
|
9887 |
|
|
operations. If you are compiling for an Alpha without floating-point
|
9888 |
|
|
operations, you must ensure that the library is built so as not to call
|
9889 |
|
|
them.
|
9890 |
|
|
.Sp
|
9891 |
|
|
Note that Alpha implementations without floating-point operations are
|
9892 |
|
|
required to have floating-point registers.
|
9893 |
|
|
.IP "\fB\-mfp\-reg\fR" 4
|
9894 |
|
|
.IX Item "-mfp-reg"
|
9895 |
|
|
.PD 0
|
9896 |
|
|
.IP "\fB\-mno\-fp\-regs\fR" 4
|
9897 |
|
|
.IX Item "-mno-fp-regs"
|
9898 |
|
|
.PD
|
9899 |
|
|
Generate code that uses (does not use) the floating-point register set.
|
9900 |
|
|
\&\fB\-mno\-fp\-regs\fR implies \fB\-msoft\-float\fR. If the floating-point
|
9901 |
|
|
register set is not used, floating point operands are passed in integer
|
9902 |
|
|
registers as if they were integers and floating-point results are passed
|
9903 |
|
|
in \f(CW$0\fR instead of \f(CW$f0\fR. This is a non-standard calling sequence,
|
9904 |
|
|
so any function with a floating-point argument or return value called by code
|
9905 |
|
|
compiled with \fB\-mno\-fp\-regs\fR must also be compiled with that
|
9906 |
|
|
option.
|
9907 |
|
|
.Sp
|
9908 |
|
|
A typical use of this option is building a kernel that does not use,
|
9909 |
|
|
and hence need not save and restore, any floating-point registers.
|
9910 |
|
|
.IP "\fB\-mieee\fR" 4
|
9911 |
|
|
.IX Item "-mieee"
|
9912 |
|
|
The Alpha architecture implements floating-point hardware optimized for
|
9913 |
|
|
maximum performance. It is mostly compliant with the \s-1IEEE\s0 floating
|
9914 |
|
|
point standard. However, for full compliance, software assistance is
|
9915 |
|
|
required. This option generates code fully \s-1IEEE\s0 compliant code
|
9916 |
|
|
\&\fIexcept\fR that the \fIinexact-flag\fR is not maintained (see below).
|
9917 |
|
|
If this option is turned on, the preprocessor macro \f(CW\*(C`_IEEE_FP\*(C'\fR is
|
9918 |
|
|
defined during compilation. The resulting code is less efficient but is
|
9919 |
|
|
able to correctly support denormalized numbers and exceptional \s-1IEEE\s0
|
9920 |
|
|
values such as not-a-number and plus/minus infinity. Other Alpha
|
9921 |
|
|
compilers call this option \fB\-ieee_with_no_inexact\fR.
|
9922 |
|
|
.IP "\fB\-mieee\-with\-inexact\fR" 4
|
9923 |
|
|
.IX Item "-mieee-with-inexact"
|
9924 |
|
|
This is like \fB\-mieee\fR except the generated code also maintains
|
9925 |
|
|
the \s-1IEEE\s0 \fIinexact-flag\fR. Turning on this option causes the
|
9926 |
|
|
generated code to implement fully-compliant \s-1IEEE\s0 math. In addition to
|
9927 |
|
|
\&\f(CW\*(C`_IEEE_FP\*(C'\fR, \f(CW\*(C`_IEEE_FP_EXACT\*(C'\fR is defined as a preprocessor
|
9928 |
|
|
macro. On some Alpha implementations the resulting code may execute
|
9929 |
|
|
significantly slower than the code generated by default. Since there is
|
9930 |
|
|
very little code that depends on the \fIinexact-flag\fR, you should
|
9931 |
|
|
normally not specify this option. Other Alpha compilers call this
|
9932 |
|
|
option \fB\-ieee_with_inexact\fR.
|
9933 |
|
|
.IP "\fB\-mfp\-trap\-mode=\fR\fItrap-mode\fR" 4
|
9934 |
|
|
.IX Item "-mfp-trap-mode=trap-mode"
|
9935 |
|
|
This option controls what floating-point related traps are enabled.
|
9936 |
|
|
Other Alpha compilers call this option \fB\-fptm\fR \fItrap-mode\fR.
|
9937 |
|
|
The trap mode can be set to one of four values:
|
9938 |
|
|
.RS 4
|
9939 |
|
|
.IP "\fBn\fR" 4
|
9940 |
|
|
.IX Item "n"
|
9941 |
|
|
This is the default (normal) setting. The only traps that are enabled
|
9942 |
|
|
are the ones that cannot be disabled in software (e.g., division by zero
|
9943 |
|
|
trap).
|
9944 |
|
|
.IP "\fBu\fR" 4
|
9945 |
|
|
.IX Item "u"
|
9946 |
|
|
In addition to the traps enabled by \fBn\fR, underflow traps are enabled
|
9947 |
|
|
as well.
|
9948 |
|
|
.IP "\fBsu\fR" 4
|
9949 |
|
|
.IX Item "su"
|
9950 |
|
|
Like \fBu\fR, but the instructions are marked to be safe for software
|
9951 |
|
|
completion (see Alpha architecture manual for details).
|
9952 |
|
|
.IP "\fBsui\fR" 4
|
9953 |
|
|
.IX Item "sui"
|
9954 |
|
|
Like \fBsu\fR, but inexact traps are enabled as well.
|
9955 |
|
|
.RE
|
9956 |
|
|
.RS 4
|
9957 |
|
|
.RE
|
9958 |
|
|
.IP "\fB\-mfp\-rounding\-mode=\fR\fIrounding-mode\fR" 4
|
9959 |
|
|
.IX Item "-mfp-rounding-mode=rounding-mode"
|
9960 |
|
|
Selects the \s-1IEEE\s0 rounding mode. Other Alpha compilers call this option
|
9961 |
|
|
\&\fB\-fprm\fR \fIrounding-mode\fR. The \fIrounding-mode\fR can be one
|
9962 |
|
|
of:
|
9963 |
|
|
.RS 4
|
9964 |
|
|
.IP "\fBn\fR" 4
|
9965 |
|
|
.IX Item "n"
|
9966 |
|
|
Normal \s-1IEEE\s0 rounding mode. Floating point numbers are rounded towards
|
9967 |
|
|
the nearest machine number or towards the even machine number in case
|
9968 |
|
|
of a tie.
|
9969 |
|
|
.IP "\fBm\fR" 4
|
9970 |
|
|
.IX Item "m"
|
9971 |
|
|
Round towards minus infinity.
|
9972 |
|
|
.IP "\fBc\fR" 4
|
9973 |
|
|
.IX Item "c"
|
9974 |
|
|
Chopped rounding mode. Floating point numbers are rounded towards zero.
|
9975 |
|
|
.IP "\fBd\fR" 4
|
9976 |
|
|
.IX Item "d"
|
9977 |
|
|
Dynamic rounding mode. A field in the floating point control register
|
9978 |
|
|
(\fIfpcr\fR, see Alpha architecture reference manual) controls the
|
9979 |
|
|
rounding mode in effect. The C library initializes this register for
|
9980 |
|
|
rounding towards plus infinity. Thus, unless your program modifies the
|
9981 |
|
|
\&\fIfpcr\fR, \fBd\fR corresponds to round towards plus infinity.
|
9982 |
|
|
.RE
|
9983 |
|
|
.RS 4
|
9984 |
|
|
.RE
|
9985 |
|
|
.IP "\fB\-mtrap\-precision=\fR\fItrap-precision\fR" 4
|
9986 |
|
|
.IX Item "-mtrap-precision=trap-precision"
|
9987 |
|
|
In the Alpha architecture, floating point traps are imprecise. This
|
9988 |
|
|
means without software assistance it is impossible to recover from a
|
9989 |
|
|
floating trap and program execution normally needs to be terminated.
|
9990 |
|
|
\&\s-1GCC\s0 can generate code that can assist operating system trap handlers
|
9991 |
|
|
in determining the exact location that caused a floating point trap.
|
9992 |
|
|
Depending on the requirements of an application, different levels of
|
9993 |
|
|
precisions can be selected:
|
9994 |
|
|
.RS 4
|
9995 |
|
|
.IP "\fBp\fR" 4
|
9996 |
|
|
.IX Item "p"
|
9997 |
|
|
Program precision. This option is the default and means a trap handler
|
9998 |
|
|
can only identify which program caused a floating point exception.
|
9999 |
|
|
.IP "\fBf\fR" 4
|
10000 |
|
|
.IX Item "f"
|
10001 |
|
|
Function precision. The trap handler can determine the function that
|
10002 |
|
|
caused a floating point exception.
|
10003 |
|
|
.IP "\fBi\fR" 4
|
10004 |
|
|
.IX Item "i"
|
10005 |
|
|
Instruction precision. The trap handler can determine the exact
|
10006 |
|
|
instruction that caused a floating point exception.
|
10007 |
|
|
.RE
|
10008 |
|
|
.RS 4
|
10009 |
|
|
.Sp
|
10010 |
|
|
Other Alpha compilers provide the equivalent options called
|
10011 |
|
|
\&\fB\-scope_safe\fR and \fB\-resumption_safe\fR.
|
10012 |
|
|
.RE
|
10013 |
|
|
.IP "\fB\-mieee\-conformant\fR" 4
|
10014 |
|
|
.IX Item "-mieee-conformant"
|
10015 |
|
|
This option marks the generated code as \s-1IEEE\s0 conformant. You must not
|
10016 |
|
|
use this option unless you also specify \fB\-mtrap\-precision=i\fR and either
|
10017 |
|
|
\&\fB\-mfp\-trap\-mode=su\fR or \fB\-mfp\-trap\-mode=sui\fR. Its only effect
|
10018 |
|
|
is to emit the line \fB.eflag 48\fR in the function prologue of the
|
10019 |
|
|
generated assembly file. Under \s-1DEC\s0 Unix, this has the effect that
|
10020 |
|
|
IEEE-conformant math library routines will be linked in.
|
10021 |
|
|
.IP "\fB\-mbuild\-constants\fR" 4
|
10022 |
|
|
.IX Item "-mbuild-constants"
|
10023 |
|
|
Normally \s-1GCC\s0 examines a 32\- or 64\-bit integer constant to
|
10024 |
|
|
see if it can construct it from smaller constants in two or three
|
10025 |
|
|
instructions. If it cannot, it will output the constant as a literal and
|
10026 |
|
|
generate code to load it from the data segment at runtime.
|
10027 |
|
|
.Sp
|
10028 |
|
|
Use this option to require \s-1GCC\s0 to construct \fIall\fR integer constants
|
10029 |
|
|
using code, even if it takes more instructions (the maximum is six).
|
10030 |
|
|
.Sp
|
10031 |
|
|
You would typically use this option to build a shared library dynamic
|
10032 |
|
|
loader. Itself a shared library, it must relocate itself in memory
|
10033 |
|
|
before it can find the variables and constants in its own data segment.
|
10034 |
|
|
.IP "\fB\-malpha\-as\fR" 4
|
10035 |
|
|
.IX Item "-malpha-as"
|
10036 |
|
|
.PD 0
|
10037 |
|
|
.IP "\fB\-mgas\fR" 4
|
10038 |
|
|
.IX Item "-mgas"
|
10039 |
|
|
.PD
|
10040 |
|
|
Select whether to generate code to be assembled by the vendor-supplied
|
10041 |
|
|
assembler (\fB\-malpha\-as\fR) or by the \s-1GNU\s0 assembler \fB\-mgas\fR.
|
10042 |
|
|
.IP "\fB\-mbwx\fR" 4
|
10043 |
|
|
.IX Item "-mbwx"
|
10044 |
|
|
.PD 0
|
10045 |
|
|
.IP "\fB\-mno\-bwx\fR" 4
|
10046 |
|
|
.IX Item "-mno-bwx"
|
10047 |
|
|
.IP "\fB\-mcix\fR" 4
|
10048 |
|
|
.IX Item "-mcix"
|
10049 |
|
|
.IP "\fB\-mno\-cix\fR" 4
|
10050 |
|
|
.IX Item "-mno-cix"
|
10051 |
|
|
.IP "\fB\-mfix\fR" 4
|
10052 |
|
|
.IX Item "-mfix"
|
10053 |
|
|
.IP "\fB\-mno\-fix\fR" 4
|
10054 |
|
|
.IX Item "-mno-fix"
|
10055 |
|
|
.IP "\fB\-mmax\fR" 4
|
10056 |
|
|
.IX Item "-mmax"
|
10057 |
|
|
.IP "\fB\-mno\-max\fR" 4
|
10058 |
|
|
.IX Item "-mno-max"
|
10059 |
|
|
.PD
|
10060 |
|
|
Indicate whether \s-1GCC\s0 should generate code to use the optional \s-1BWX\s0,
|
10061 |
|
|
\&\s-1CIX\s0, \s-1FIX\s0 and \s-1MAX\s0 instruction sets. The default is to use the instruction
|
10062 |
|
|
sets supported by the \s-1CPU\s0 type specified via \fB\-mcpu=\fR option or that
|
10063 |
|
|
of the \s-1CPU\s0 on which \s-1GCC\s0 was built if none was specified.
|
10064 |
|
|
.IP "\fB\-mfloat\-vax\fR" 4
|
10065 |
|
|
.IX Item "-mfloat-vax"
|
10066 |
|
|
.PD 0
|
10067 |
|
|
.IP "\fB\-mfloat\-ieee\fR" 4
|
10068 |
|
|
.IX Item "-mfloat-ieee"
|
10069 |
|
|
.PD
|
10070 |
|
|
Generate code that uses (does not use) \s-1VAX\s0 F and G floating point
|
10071 |
|
|
arithmetic instead of \s-1IEEE\s0 single and double precision.
|
10072 |
|
|
.IP "\fB\-mexplicit\-relocs\fR" 4
|
10073 |
|
|
.IX Item "-mexplicit-relocs"
|
10074 |
|
|
.PD 0
|
10075 |
|
|
.IP "\fB\-mno\-explicit\-relocs\fR" 4
|
10076 |
|
|
.IX Item "-mno-explicit-relocs"
|
10077 |
|
|
.PD
|
10078 |
|
|
Older Alpha assemblers provided no way to generate symbol relocations
|
10079 |
|
|
except via assembler macros. Use of these macros does not allow
|
10080 |
|
|
optimal instruction scheduling. \s-1GNU\s0 binutils as of version 2.12
|
10081 |
|
|
supports a new syntax that allows the compiler to explicitly mark
|
10082 |
|
|
which relocations should apply to which instructions. This option
|
10083 |
|
|
is mostly useful for debugging, as \s-1GCC\s0 detects the capabilities of
|
10084 |
|
|
the assembler when it is built and sets the default accordingly.
|
10085 |
|
|
.IP "\fB\-msmall\-data\fR" 4
|
10086 |
|
|
.IX Item "-msmall-data"
|
10087 |
|
|
.PD 0
|
10088 |
|
|
.IP "\fB\-mlarge\-data\fR" 4
|
10089 |
|
|
.IX Item "-mlarge-data"
|
10090 |
|
|
.PD
|
10091 |
|
|
When \fB\-mexplicit\-relocs\fR is in effect, static data is
|
10092 |
|
|
accessed via \fIgp-relative\fR relocations. When \fB\-msmall\-data\fR
|
10093 |
|
|
is used, objects 8 bytes long or smaller are placed in a \fIsmall data area\fR
|
10094 |
|
|
(the \f(CW\*(C`.sdata\*(C'\fR and \f(CW\*(C`.sbss\*(C'\fR sections) and are accessed via
|
10095 |
|
|
16\-bit relocations off of the \f(CW$gp\fR register. This limits the
|
10096 |
|
|
size of the small data area to 64KB, but allows the variables to be
|
10097 |
|
|
directly accessed via a single instruction.
|
10098 |
|
|
.Sp
|
10099 |
|
|
The default is \fB\-mlarge\-data\fR. With this option the data area
|
10100 |
|
|
is limited to just below 2GB. Programs that require more than 2GB of
|
10101 |
|
|
data must use \f(CW\*(C`malloc\*(C'\fR or \f(CW\*(C`mmap\*(C'\fR to allocate the data in the
|
10102 |
|
|
heap instead of in the program's data segment.
|
10103 |
|
|
.Sp
|
10104 |
|
|
When generating code for shared libraries, \fB\-fpic\fR implies
|
10105 |
|
|
\&\fB\-msmall\-data\fR and \fB\-fPIC\fR implies \fB\-mlarge\-data\fR.
|
10106 |
|
|
.IP "\fB\-msmall\-text\fR" 4
|
10107 |
|
|
.IX Item "-msmall-text"
|
10108 |
|
|
.PD 0
|
10109 |
|
|
.IP "\fB\-mlarge\-text\fR" 4
|
10110 |
|
|
.IX Item "-mlarge-text"
|
10111 |
|
|
.PD
|
10112 |
|
|
When \fB\-msmall\-text\fR is used, the compiler assumes that the
|
10113 |
|
|
code of the entire program (or shared library) fits in 4MB, and is
|
10114 |
|
|
thus reachable with a branch instruction. When \fB\-msmall\-data\fR
|
10115 |
|
|
is used, the compiler can assume that all local symbols share the
|
10116 |
|
|
same \f(CW$gp\fR value, and thus reduce the number of instructions
|
10117 |
|
|
required for a function call from 4 to 1.
|
10118 |
|
|
.Sp
|
10119 |
|
|
The default is \fB\-mlarge\-text\fR.
|
10120 |
|
|
.IP "\fB\-mcpu=\fR\fIcpu_type\fR" 4
|
10121 |
|
|
.IX Item "-mcpu=cpu_type"
|
10122 |
|
|
Set the instruction set and instruction scheduling parameters for
|
10123 |
|
|
machine type \fIcpu_type\fR. You can specify either the \fB\s-1EV\s0\fR
|
10124 |
|
|
style name or the corresponding chip number. \s-1GCC\s0 supports scheduling
|
10125 |
|
|
parameters for the \s-1EV4\s0, \s-1EV5\s0 and \s-1EV6\s0 family of processors and will
|
10126 |
|
|
choose the default values for the instruction set from the processor
|
10127 |
|
|
you specify. If you do not specify a processor type, \s-1GCC\s0 will default
|
10128 |
|
|
to the processor on which the compiler was built.
|
10129 |
|
|
.Sp
|
10130 |
|
|
Supported values for \fIcpu_type\fR are
|
10131 |
|
|
.RS 4
|
10132 |
|
|
.IP "\fBev4\fR" 4
|
10133 |
|
|
.IX Item "ev4"
|
10134 |
|
|
.PD 0
|
10135 |
|
|
.IP "\fBev45\fR" 4
|
10136 |
|
|
.IX Item "ev45"
|
10137 |
|
|
.IP "\fB21064\fR" 4
|
10138 |
|
|
.IX Item "21064"
|
10139 |
|
|
.PD
|
10140 |
|
|
Schedules as an \s-1EV4\s0 and has no instruction set extensions.
|
10141 |
|
|
.IP "\fBev5\fR" 4
|
10142 |
|
|
.IX Item "ev5"
|
10143 |
|
|
.PD 0
|
10144 |
|
|
.IP "\fB21164\fR" 4
|
10145 |
|
|
.IX Item "21164"
|
10146 |
|
|
.PD
|
10147 |
|
|
Schedules as an \s-1EV5\s0 and has no instruction set extensions.
|
10148 |
|
|
.IP "\fBev56\fR" 4
|
10149 |
|
|
.IX Item "ev56"
|
10150 |
|
|
.PD 0
|
10151 |
|
|
.IP "\fB21164a\fR" 4
|
10152 |
|
|
.IX Item "21164a"
|
10153 |
|
|
.PD
|
10154 |
|
|
Schedules as an \s-1EV5\s0 and supports the \s-1BWX\s0 extension.
|
10155 |
|
|
.IP "\fBpca56\fR" 4
|
10156 |
|
|
.IX Item "pca56"
|
10157 |
|
|
.PD 0
|
10158 |
|
|
.IP "\fB21164pc\fR" 4
|
10159 |
|
|
.IX Item "21164pc"
|
10160 |
|
|
.IP "\fB21164PC\fR" 4
|
10161 |
|
|
.IX Item "21164PC"
|
10162 |
|
|
.PD
|
10163 |
|
|
Schedules as an \s-1EV5\s0 and supports the \s-1BWX\s0 and \s-1MAX\s0 extensions.
|
10164 |
|
|
.IP "\fBev6\fR" 4
|
10165 |
|
|
.IX Item "ev6"
|
10166 |
|
|
.PD 0
|
10167 |
|
|
.IP "\fB21264\fR" 4
|
10168 |
|
|
.IX Item "21264"
|
10169 |
|
|
.PD
|
10170 |
|
|
Schedules as an \s-1EV6\s0 and supports the \s-1BWX\s0, \s-1FIX\s0, and \s-1MAX\s0 extensions.
|
10171 |
|
|
.IP "\fBev67\fR" 4
|
10172 |
|
|
.IX Item "ev67"
|
10173 |
|
|
.PD 0
|
10174 |
|
|
.IP "\fB21264a\fR" 4
|
10175 |
|
|
.IX Item "21264a"
|
10176 |
|
|
.PD
|
10177 |
|
|
Schedules as an \s-1EV6\s0 and supports the \s-1BWX\s0, \s-1CIX\s0, \s-1FIX\s0, and \s-1MAX\s0 extensions.
|
10178 |
|
|
.RE
|
10179 |
|
|
.RS 4
|
10180 |
|
|
.Sp
|
10181 |
|
|
Native Linux/GNU toolchains also support the value \fBnative\fR,
|
10182 |
|
|
which selects the best architecture option for the host processor.
|
10183 |
|
|
\&\fB\-mcpu=native\fR has no effect if \s-1GCC\s0 does not recognize
|
10184 |
|
|
the processor.
|
10185 |
|
|
.RE
|
10186 |
|
|
.IP "\fB\-mtune=\fR\fIcpu_type\fR" 4
|
10187 |
|
|
.IX Item "-mtune=cpu_type"
|
10188 |
|
|
Set only the instruction scheduling parameters for machine type
|
10189 |
|
|
\&\fIcpu_type\fR. The instruction set is not changed.
|
10190 |
|
|
.Sp
|
10191 |
|
|
Native Linux/GNU toolchains also support the value \fBnative\fR,
|
10192 |
|
|
which selects the best architecture option for the host processor.
|
10193 |
|
|
\&\fB\-mtune=native\fR has no effect if \s-1GCC\s0 does not recognize
|
10194 |
|
|
the processor.
|
10195 |
|
|
.IP "\fB\-mmemory\-latency=\fR\fItime\fR" 4
|
10196 |
|
|
.IX Item "-mmemory-latency=time"
|
10197 |
|
|
Sets the latency the scheduler should assume for typical memory
|
10198 |
|
|
references as seen by the application. This number is highly
|
10199 |
|
|
dependent on the memory access patterns used by the application
|
10200 |
|
|
and the size of the external cache on the machine.
|
10201 |
|
|
.Sp
|
10202 |
|
|
Valid options for \fItime\fR are
|
10203 |
|
|
.RS 4
|
10204 |
|
|
.IP "\fInumber\fR" 4
|
10205 |
|
|
.IX Item "number"
|
10206 |
|
|
A decimal number representing clock cycles.
|
10207 |
|
|
.IP "\fBL1\fR" 4
|
10208 |
|
|
.IX Item "L1"
|
10209 |
|
|
.PD 0
|
10210 |
|
|
.IP "\fBL2\fR" 4
|
10211 |
|
|
.IX Item "L2"
|
10212 |
|
|
.IP "\fBL3\fR" 4
|
10213 |
|
|
.IX Item "L3"
|
10214 |
|
|
.IP "\fBmain\fR" 4
|
10215 |
|
|
.IX Item "main"
|
10216 |
|
|
.PD
|
10217 |
|
|
The compiler contains estimates of the number of clock cycles for
|
10218 |
|
|
\&\*(L"typical\*(R" \s-1EV4\s0 & \s-1EV5\s0 hardware for the Level 1, 2 & 3 caches
|
10219 |
|
|
(also called Dcache, Scache, and Bcache), as well as to main memory.
|
10220 |
|
|
Note that L3 is only valid for \s-1EV5\s0.
|
10221 |
|
|
.RE
|
10222 |
|
|
.RS 4
|
10223 |
|
|
.RE
|
10224 |
|
|
.PP
|
10225 |
|
|
\fI\s-1DEC\s0 Alpha/VMS Options\fR
|
10226 |
|
|
.IX Subsection "DEC Alpha/VMS Options"
|
10227 |
|
|
.PP
|
10228 |
|
|
These \fB\-m\fR options are defined for the \s-1DEC\s0 Alpha/VMS implementations:
|
10229 |
|
|
.IP "\fB\-mvms\-return\-codes\fR" 4
|
10230 |
|
|
.IX Item "-mvms-return-codes"
|
10231 |
|
|
Return \s-1VMS\s0 condition codes from main. The default is to return \s-1POSIX\s0
|
10232 |
|
|
style condition (e.g. error) codes.
|
10233 |
|
|
.IP "\fB\-mdebug\-main=\fR\fIprefix\fR" 4
|
10234 |
|
|
.IX Item "-mdebug-main=prefix"
|
10235 |
|
|
Flag the first routine whose name starts with \fIprefix\fR as the main
|
10236 |
|
|
routine for the debugger.
|
10237 |
|
|
.IP "\fB\-mmalloc64\fR" 4
|
10238 |
|
|
.IX Item "-mmalloc64"
|
10239 |
|
|
Default to 64bit memory allocation routines.
|
10240 |
|
|
.PP
|
10241 |
|
|
\fI\s-1FR30\s0 Options\fR
|
10242 |
|
|
.IX Subsection "FR30 Options"
|
10243 |
|
|
.PP
|
10244 |
|
|
These options are defined specifically for the \s-1FR30\s0 port.
|
10245 |
|
|
.IP "\fB\-msmall\-model\fR" 4
|
10246 |
|
|
.IX Item "-msmall-model"
|
10247 |
|
|
Use the small address space model. This can produce smaller code, but
|
10248 |
|
|
it does assume that all symbolic values and addresses will fit into a
|
10249 |
|
|
20\-bit range.
|
10250 |
|
|
.IP "\fB\-mno\-lsim\fR" 4
|
10251 |
|
|
.IX Item "-mno-lsim"
|
10252 |
|
|
Assume that run-time support has been provided and so there is no need
|
10253 |
|
|
to include the simulator library (\fIlibsim.a\fR) on the linker
|
10254 |
|
|
command line.
|
10255 |
|
|
.PP
|
10256 |
|
|
\fI\s-1FRV\s0 Options\fR
|
10257 |
|
|
.IX Subsection "FRV Options"
|
10258 |
|
|
.IP "\fB\-mgpr\-32\fR" 4
|
10259 |
|
|
.IX Item "-mgpr-32"
|
10260 |
|
|
Only use the first 32 general purpose registers.
|
10261 |
|
|
.IP "\fB\-mgpr\-64\fR" 4
|
10262 |
|
|
.IX Item "-mgpr-64"
|
10263 |
|
|
Use all 64 general purpose registers.
|
10264 |
|
|
.IP "\fB\-mfpr\-32\fR" 4
|
10265 |
|
|
.IX Item "-mfpr-32"
|
10266 |
|
|
Use only the first 32 floating point registers.
|
10267 |
|
|
.IP "\fB\-mfpr\-64\fR" 4
|
10268 |
|
|
.IX Item "-mfpr-64"
|
10269 |
|
|
Use all 64 floating point registers
|
10270 |
|
|
.IP "\fB\-mhard\-float\fR" 4
|
10271 |
|
|
.IX Item "-mhard-float"
|
10272 |
|
|
Use hardware instructions for floating point operations.
|
10273 |
|
|
.IP "\fB\-msoft\-float\fR" 4
|
10274 |
|
|
.IX Item "-msoft-float"
|
10275 |
|
|
Use library routines for floating point operations.
|
10276 |
|
|
.IP "\fB\-malloc\-cc\fR" 4
|
10277 |
|
|
.IX Item "-malloc-cc"
|
10278 |
|
|
Dynamically allocate condition code registers.
|
10279 |
|
|
.IP "\fB\-mfixed\-cc\fR" 4
|
10280 |
|
|
.IX Item "-mfixed-cc"
|
10281 |
|
|
Do not try to dynamically allocate condition code registers, only
|
10282 |
|
|
use \f(CW\*(C`icc0\*(C'\fR and \f(CW\*(C`fcc0\*(C'\fR.
|
10283 |
|
|
.IP "\fB\-mdword\fR" 4
|
10284 |
|
|
.IX Item "-mdword"
|
10285 |
|
|
Change \s-1ABI\s0 to use double word insns.
|
10286 |
|
|
.IP "\fB\-mno\-dword\fR" 4
|
10287 |
|
|
.IX Item "-mno-dword"
|
10288 |
|
|
Do not use double word instructions.
|
10289 |
|
|
.IP "\fB\-mdouble\fR" 4
|
10290 |
|
|
.IX Item "-mdouble"
|
10291 |
|
|
Use floating point double instructions.
|
10292 |
|
|
.IP "\fB\-mno\-double\fR" 4
|
10293 |
|
|
.IX Item "-mno-double"
|
10294 |
|
|
Do not use floating point double instructions.
|
10295 |
|
|
.IP "\fB\-mmedia\fR" 4
|
10296 |
|
|
.IX Item "-mmedia"
|
10297 |
|
|
Use media instructions.
|
10298 |
|
|
.IP "\fB\-mno\-media\fR" 4
|
10299 |
|
|
.IX Item "-mno-media"
|
10300 |
|
|
Do not use media instructions.
|
10301 |
|
|
.IP "\fB\-mmuladd\fR" 4
|
10302 |
|
|
.IX Item "-mmuladd"
|
10303 |
|
|
Use multiply and add/subtract instructions.
|
10304 |
|
|
.IP "\fB\-mno\-muladd\fR" 4
|
10305 |
|
|
.IX Item "-mno-muladd"
|
10306 |
|
|
Do not use multiply and add/subtract instructions.
|
10307 |
|
|
.IP "\fB\-mfdpic\fR" 4
|
10308 |
|
|
.IX Item "-mfdpic"
|
10309 |
|
|
Select the \s-1FDPIC\s0 \s-1ABI\s0, that uses function descriptors to represent
|
10310 |
|
|
pointers to functions. Without any PIC/PIE\-related options, it
|
10311 |
|
|
implies \fB\-fPIE\fR. With \fB\-fpic\fR or \fB\-fpie\fR, it
|
10312 |
|
|
assumes \s-1GOT\s0 entries and small data are within a 12\-bit range from the
|
10313 |
|
|
\&\s-1GOT\s0 base address; with \fB\-fPIC\fR or \fB\-fPIE\fR, \s-1GOT\s0 offsets
|
10314 |
|
|
are computed with 32 bits.
|
10315 |
|
|
With a \fBbfin-elf\fR target, this option implies \fB\-msim\fR.
|
10316 |
|
|
.IP "\fB\-minline\-plt\fR" 4
|
10317 |
|
|
.IX Item "-minline-plt"
|
10318 |
|
|
Enable inlining of \s-1PLT\s0 entries in function calls to functions that are
|
10319 |
|
|
not known to bind locally. It has no effect without \fB\-mfdpic\fR.
|
10320 |
|
|
It's enabled by default if optimizing for speed and compiling for
|
10321 |
|
|
shared libraries (i.e., \fB\-fPIC\fR or \fB\-fpic\fR), or when an
|
10322 |
|
|
optimization option such as \fB\-O3\fR or above is present in the
|
10323 |
|
|
command line.
|
10324 |
|
|
.IP "\fB\-mTLS\fR" 4
|
10325 |
|
|
.IX Item "-mTLS"
|
10326 |
|
|
Assume a large \s-1TLS\s0 segment when generating thread-local code.
|
10327 |
|
|
.IP "\fB\-mtls\fR" 4
|
10328 |
|
|
.IX Item "-mtls"
|
10329 |
|
|
Do not assume a large \s-1TLS\s0 segment when generating thread-local code.
|
10330 |
|
|
.IP "\fB\-mgprel\-ro\fR" 4
|
10331 |
|
|
.IX Item "-mgprel-ro"
|
10332 |
|
|
Enable the use of \f(CW\*(C`GPREL\*(C'\fR relocations in the \s-1FDPIC\s0 \s-1ABI\s0 for data
|
10333 |
|
|
that is known to be in read-only sections. It's enabled by default,
|
10334 |
|
|
except for \fB\-fpic\fR or \fB\-fpie\fR: even though it may help
|
10335 |
|
|
make the global offset table smaller, it trades 1 instruction for 4.
|
10336 |
|
|
With \fB\-fPIC\fR or \fB\-fPIE\fR, it trades 3 instructions for 4,
|
10337 |
|
|
one of which may be shared by multiple symbols, and it avoids the need
|
10338 |
|
|
for a \s-1GOT\s0 entry for the referenced symbol, so it's more likely to be a
|
10339 |
|
|
win. If it is not, \fB\-mno\-gprel\-ro\fR can be used to disable it.
|
10340 |
|
|
.IP "\fB\-multilib\-library\-pic\fR" 4
|
10341 |
|
|
.IX Item "-multilib-library-pic"
|
10342 |
|
|
Link with the (library, not \s-1FD\s0) pic libraries. It's implied by
|
10343 |
|
|
\&\fB\-mlibrary\-pic\fR, as well as by \fB\-fPIC\fR and
|
10344 |
|
|
\&\fB\-fpic\fR without \fB\-mfdpic\fR. You should never have to use
|
10345 |
|
|
it explicitly.
|
10346 |
|
|
.IP "\fB\-mlinked\-fp\fR" 4
|
10347 |
|
|
.IX Item "-mlinked-fp"
|
10348 |
|
|
Follow the \s-1EABI\s0 requirement of always creating a frame pointer whenever
|
10349 |
|
|
a stack frame is allocated. This option is enabled by default and can
|
10350 |
|
|
be disabled with \fB\-mno\-linked\-fp\fR.
|
10351 |
|
|
.IP "\fB\-mlong\-calls\fR" 4
|
10352 |
|
|
.IX Item "-mlong-calls"
|
10353 |
|
|
Use indirect addressing to call functions outside the current
|
10354 |
|
|
compilation unit. This allows the functions to be placed anywhere
|
10355 |
|
|
within the 32\-bit address space.
|
10356 |
|
|
.IP "\fB\-malign\-labels\fR" 4
|
10357 |
|
|
.IX Item "-malign-labels"
|
10358 |
|
|
Try to align labels to an 8\-byte boundary by inserting nops into the
|
10359 |
|
|
previous packet. This option only has an effect when \s-1VLIW\s0 packing
|
10360 |
|
|
is enabled. It doesn't create new packets; it merely adds nops to
|
10361 |
|
|
existing ones.
|
10362 |
|
|
.IP "\fB\-mlibrary\-pic\fR" 4
|
10363 |
|
|
.IX Item "-mlibrary-pic"
|
10364 |
|
|
Generate position-independent \s-1EABI\s0 code.
|
10365 |
|
|
.IP "\fB\-macc\-4\fR" 4
|
10366 |
|
|
.IX Item "-macc-4"
|
10367 |
|
|
Use only the first four media accumulator registers.
|
10368 |
|
|
.IP "\fB\-macc\-8\fR" 4
|
10369 |
|
|
.IX Item "-macc-8"
|
10370 |
|
|
Use all eight media accumulator registers.
|
10371 |
|
|
.IP "\fB\-mpack\fR" 4
|
10372 |
|
|
.IX Item "-mpack"
|
10373 |
|
|
Pack \s-1VLIW\s0 instructions.
|
10374 |
|
|
.IP "\fB\-mno\-pack\fR" 4
|
10375 |
|
|
.IX Item "-mno-pack"
|
10376 |
|
|
Do not pack \s-1VLIW\s0 instructions.
|
10377 |
|
|
.IP "\fB\-mno\-eflags\fR" 4
|
10378 |
|
|
.IX Item "-mno-eflags"
|
10379 |
|
|
Do not mark \s-1ABI\s0 switches in e_flags.
|
10380 |
|
|
.IP "\fB\-mcond\-move\fR" 4
|
10381 |
|
|
.IX Item "-mcond-move"
|
10382 |
|
|
Enable the use of conditional-move instructions (default).
|
10383 |
|
|
.Sp
|
10384 |
|
|
This switch is mainly for debugging the compiler and will likely be removed
|
10385 |
|
|
in a future version.
|
10386 |
|
|
.IP "\fB\-mno\-cond\-move\fR" 4
|
10387 |
|
|
.IX Item "-mno-cond-move"
|
10388 |
|
|
Disable the use of conditional-move instructions.
|
10389 |
|
|
.Sp
|
10390 |
|
|
This switch is mainly for debugging the compiler and will likely be removed
|
10391 |
|
|
in a future version.
|
10392 |
|
|
.IP "\fB\-mscc\fR" 4
|
10393 |
|
|
.IX Item "-mscc"
|
10394 |
|
|
Enable the use of conditional set instructions (default).
|
10395 |
|
|
.Sp
|
10396 |
|
|
This switch is mainly for debugging the compiler and will likely be removed
|
10397 |
|
|
in a future version.
|
10398 |
|
|
.IP "\fB\-mno\-scc\fR" 4
|
10399 |
|
|
.IX Item "-mno-scc"
|
10400 |
|
|
Disable the use of conditional set instructions.
|
10401 |
|
|
.Sp
|
10402 |
|
|
This switch is mainly for debugging the compiler and will likely be removed
|
10403 |
|
|
in a future version.
|
10404 |
|
|
.IP "\fB\-mcond\-exec\fR" 4
|
10405 |
|
|
.IX Item "-mcond-exec"
|
10406 |
|
|
Enable the use of conditional execution (default).
|
10407 |
|
|
.Sp
|
10408 |
|
|
This switch is mainly for debugging the compiler and will likely be removed
|
10409 |
|
|
in a future version.
|
10410 |
|
|
.IP "\fB\-mno\-cond\-exec\fR" 4
|
10411 |
|
|
.IX Item "-mno-cond-exec"
|
10412 |
|
|
Disable the use of conditional execution.
|
10413 |
|
|
.Sp
|
10414 |
|
|
This switch is mainly for debugging the compiler and will likely be removed
|
10415 |
|
|
in a future version.
|
10416 |
|
|
.IP "\fB\-mvliw\-branch\fR" 4
|
10417 |
|
|
.IX Item "-mvliw-branch"
|
10418 |
|
|
Run a pass to pack branches into \s-1VLIW\s0 instructions (default).
|
10419 |
|
|
.Sp
|
10420 |
|
|
This switch is mainly for debugging the compiler and will likely be removed
|
10421 |
|
|
in a future version.
|
10422 |
|
|
.IP "\fB\-mno\-vliw\-branch\fR" 4
|
10423 |
|
|
.IX Item "-mno-vliw-branch"
|
10424 |
|
|
Do not run a pass to pack branches into \s-1VLIW\s0 instructions.
|
10425 |
|
|
.Sp
|
10426 |
|
|
This switch is mainly for debugging the compiler and will likely be removed
|
10427 |
|
|
in a future version.
|
10428 |
|
|
.IP "\fB\-mmulti\-cond\-exec\fR" 4
|
10429 |
|
|
.IX Item "-mmulti-cond-exec"
|
10430 |
|
|
Enable optimization of \f(CW\*(C`&&\*(C'\fR and \f(CW\*(C`||\*(C'\fR in conditional execution
|
10431 |
|
|
(default).
|
10432 |
|
|
.Sp
|
10433 |
|
|
This switch is mainly for debugging the compiler and will likely be removed
|
10434 |
|
|
in a future version.
|
10435 |
|
|
.IP "\fB\-mno\-multi\-cond\-exec\fR" 4
|
10436 |
|
|
.IX Item "-mno-multi-cond-exec"
|
10437 |
|
|
Disable optimization of \f(CW\*(C`&&\*(C'\fR and \f(CW\*(C`||\*(C'\fR in conditional execution.
|
10438 |
|
|
.Sp
|
10439 |
|
|
This switch is mainly for debugging the compiler and will likely be removed
|
10440 |
|
|
in a future version.
|
10441 |
|
|
.IP "\fB\-mnested\-cond\-exec\fR" 4
|
10442 |
|
|
.IX Item "-mnested-cond-exec"
|
10443 |
|
|
Enable nested conditional execution optimizations (default).
|
10444 |
|
|
.Sp
|
10445 |
|
|
This switch is mainly for debugging the compiler and will likely be removed
|
10446 |
|
|
in a future version.
|
10447 |
|
|
.IP "\fB\-mno\-nested\-cond\-exec\fR" 4
|
10448 |
|
|
.IX Item "-mno-nested-cond-exec"
|
10449 |
|
|
Disable nested conditional execution optimizations.
|
10450 |
|
|
.Sp
|
10451 |
|
|
This switch is mainly for debugging the compiler and will likely be removed
|
10452 |
|
|
in a future version.
|
10453 |
|
|
.IP "\fB\-moptimize\-membar\fR" 4
|
10454 |
|
|
.IX Item "-moptimize-membar"
|
10455 |
|
|
This switch removes redundant \f(CW\*(C`membar\*(C'\fR instructions from the
|
10456 |
|
|
compiler generated code. It is enabled by default.
|
10457 |
|
|
.IP "\fB\-mno\-optimize\-membar\fR" 4
|
10458 |
|
|
.IX Item "-mno-optimize-membar"
|
10459 |
|
|
This switch disables the automatic removal of redundant \f(CW\*(C`membar\*(C'\fR
|
10460 |
|
|
instructions from the generated code.
|
10461 |
|
|
.IP "\fB\-mtomcat\-stats\fR" 4
|
10462 |
|
|
.IX Item "-mtomcat-stats"
|
10463 |
|
|
Cause gas to print out tomcat statistics.
|
10464 |
|
|
.IP "\fB\-mcpu=\fR\fIcpu\fR" 4
|
10465 |
|
|
.IX Item "-mcpu=cpu"
|
10466 |
|
|
Select the processor type for which to generate code. Possible values are
|
10467 |
|
|
\&\fBfrv\fR, \fBfr550\fR, \fBtomcat\fR, \fBfr500\fR, \fBfr450\fR,
|
10468 |
|
|
\&\fBfr405\fR, \fBfr400\fR, \fBfr300\fR and \fBsimple\fR.
|
10469 |
|
|
.PP
|
10470 |
|
|
\fIGNU/Linux Options\fR
|
10471 |
|
|
.IX Subsection "GNU/Linux Options"
|
10472 |
|
|
.PP
|
10473 |
|
|
These \fB\-m\fR options are defined for GNU/Linux targets:
|
10474 |
|
|
.IP "\fB\-mglibc\fR" 4
|
10475 |
|
|
.IX Item "-mglibc"
|
10476 |
|
|
Use the \s-1GNU\s0 C library instead of uClibc. This is the default except
|
10477 |
|
|
on \fB*\-*\-linux\-*uclibc*\fR targets.
|
10478 |
|
|
.IP "\fB\-muclibc\fR" 4
|
10479 |
|
|
.IX Item "-muclibc"
|
10480 |
|
|
Use uClibc instead of the \s-1GNU\s0 C library. This is the default on
|
10481 |
|
|
\&\fB*\-*\-linux\-*uclibc*\fR targets.
|
10482 |
|
|
.PP
|
10483 |
|
|
\fIH8/300 Options\fR
|
10484 |
|
|
.IX Subsection "H8/300 Options"
|
10485 |
|
|
.PP
|
10486 |
|
|
These \fB\-m\fR options are defined for the H8/300 implementations:
|
10487 |
|
|
.IP "\fB\-mrelax\fR" 4
|
10488 |
|
|
.IX Item "-mrelax"
|
10489 |
|
|
Shorten some address references at link time, when possible; uses the
|
10490 |
|
|
linker option \fB\-relax\fR.
|
10491 |
|
|
.IP "\fB\-mh\fR" 4
|
10492 |
|
|
.IX Item "-mh"
|
10493 |
|
|
Generate code for the H8/300H.
|
10494 |
|
|
.IP "\fB\-ms\fR" 4
|
10495 |
|
|
.IX Item "-ms"
|
10496 |
|
|
Generate code for the H8S.
|
10497 |
|
|
.IP "\fB\-mn\fR" 4
|
10498 |
|
|
.IX Item "-mn"
|
10499 |
|
|
Generate code for the H8S and H8/300H in the normal mode. This switch
|
10500 |
|
|
must be used either with \fB\-mh\fR or \fB\-ms\fR.
|
10501 |
|
|
.IP "\fB\-ms2600\fR" 4
|
10502 |
|
|
.IX Item "-ms2600"
|
10503 |
|
|
Generate code for the H8S/2600. This switch must be used with \fB\-ms\fR.
|
10504 |
|
|
.IP "\fB\-mint32\fR" 4
|
10505 |
|
|
.IX Item "-mint32"
|
10506 |
|
|
Make \f(CW\*(C`int\*(C'\fR data 32 bits by default.
|
10507 |
|
|
.IP "\fB\-malign\-300\fR" 4
|
10508 |
|
|
.IX Item "-malign-300"
|
10509 |
|
|
On the H8/300H and H8S, use the same alignment rules as for the H8/300.
|
10510 |
|
|
The default for the H8/300H and H8S is to align longs and floats on 4
|
10511 |
|
|
byte boundaries.
|
10512 |
|
|
\&\fB\-malign\-300\fR causes them to be aligned on 2 byte boundaries.
|
10513 |
|
|
This option has no effect on the H8/300.
|
10514 |
|
|
.PP
|
10515 |
|
|
\fI\s-1HPPA\s0 Options\fR
|
10516 |
|
|
.IX Subsection "HPPA Options"
|
10517 |
|
|
.PP
|
10518 |
|
|
These \fB\-m\fR options are defined for the \s-1HPPA\s0 family of computers:
|
10519 |
|
|
.IP "\fB\-march=\fR\fIarchitecture-type\fR" 4
|
10520 |
|
|
.IX Item "-march=architecture-type"
|
10521 |
|
|
Generate code for the specified architecture. The choices for
|
10522 |
|
|
\&\fIarchitecture-type\fR are \fB1.0\fR for \s-1PA\s0 1.0, \fB1.1\fR for \s-1PA\s0
|
10523 |
|
|
1.1, and \fB2.0\fR for \s-1PA\s0 2.0 processors. Refer to
|
10524 |
|
|
\&\fI/usr/lib/sched.models\fR on an HP-UX system to determine the proper
|
10525 |
|
|
architecture option for your machine. Code compiled for lower numbered
|
10526 |
|
|
architectures will run on higher numbered architectures, but not the
|
10527 |
|
|
other way around.
|
10528 |
|
|
.IP "\fB\-mpa\-risc\-1\-0\fR" 4
|
10529 |
|
|
.IX Item "-mpa-risc-1-0"
|
10530 |
|
|
.PD 0
|
10531 |
|
|
.IP "\fB\-mpa\-risc\-1\-1\fR" 4
|
10532 |
|
|
.IX Item "-mpa-risc-1-1"
|
10533 |
|
|
.IP "\fB\-mpa\-risc\-2\-0\fR" 4
|
10534 |
|
|
.IX Item "-mpa-risc-2-0"
|
10535 |
|
|
.PD
|
10536 |
|
|
Synonyms for \fB\-march=1.0\fR, \fB\-march=1.1\fR, and \fB\-march=2.0\fR respectively.
|
10537 |
|
|
.IP "\fB\-mbig\-switch\fR" 4
|
10538 |
|
|
.IX Item "-mbig-switch"
|
10539 |
|
|
Generate code suitable for big switch tables. Use this option only if
|
10540 |
|
|
the assembler/linker complain about out of range branches within a switch
|
10541 |
|
|
table.
|
10542 |
|
|
.IP "\fB\-mjump\-in\-delay\fR" 4
|
10543 |
|
|
.IX Item "-mjump-in-delay"
|
10544 |
|
|
Fill delay slots of function calls with unconditional jump instructions
|
10545 |
|
|
by modifying the return pointer for the function call to be the target
|
10546 |
|
|
of the conditional jump.
|
10547 |
|
|
.IP "\fB\-mdisable\-fpregs\fR" 4
|
10548 |
|
|
.IX Item "-mdisable-fpregs"
|
10549 |
|
|
Prevent floating point registers from being used in any manner. This is
|
10550 |
|
|
necessary for compiling kernels which perform lazy context switching of
|
10551 |
|
|
floating point registers. If you use this option and attempt to perform
|
10552 |
|
|
floating point operations, the compiler will abort.
|
10553 |
|
|
.IP "\fB\-mdisable\-indexing\fR" 4
|
10554 |
|
|
.IX Item "-mdisable-indexing"
|
10555 |
|
|
Prevent the compiler from using indexing address modes. This avoids some
|
10556 |
|
|
rather obscure problems when compiling \s-1MIG\s0 generated code under \s-1MACH\s0.
|
10557 |
|
|
.IP "\fB\-mno\-space\-regs\fR" 4
|
10558 |
|
|
.IX Item "-mno-space-regs"
|
10559 |
|
|
Generate code that assumes the target has no space registers. This allows
|
10560 |
|
|
\&\s-1GCC\s0 to generate faster indirect calls and use unscaled index address modes.
|
10561 |
|
|
.Sp
|
10562 |
|
|
Such code is suitable for level 0 \s-1PA\s0 systems and kernels.
|
10563 |
|
|
.IP "\fB\-mfast\-indirect\-calls\fR" 4
|
10564 |
|
|
.IX Item "-mfast-indirect-calls"
|
10565 |
|
|
Generate code that assumes calls never cross space boundaries. This
|
10566 |
|
|
allows \s-1GCC\s0 to emit code which performs faster indirect calls.
|
10567 |
|
|
.Sp
|
10568 |
|
|
This option will not work in the presence of shared libraries or nested
|
10569 |
|
|
functions.
|
10570 |
|
|
.IP "\fB\-mfixed\-range=\fR\fIregister-range\fR" 4
|
10571 |
|
|
.IX Item "-mfixed-range=register-range"
|
10572 |
|
|
Generate code treating the given register range as fixed registers.
|
10573 |
|
|
A fixed register is one that the register allocator can not use. This is
|
10574 |
|
|
useful when compiling kernel code. A register range is specified as
|
10575 |
|
|
two registers separated by a dash. Multiple register ranges can be
|
10576 |
|
|
specified separated by a comma.
|
10577 |
|
|
.IP "\fB\-mlong\-load\-store\fR" 4
|
10578 |
|
|
.IX Item "-mlong-load-store"
|
10579 |
|
|
Generate 3\-instruction load and store sequences as sometimes required by
|
10580 |
|
|
the HP-UX 10 linker. This is equivalent to the \fB+k\fR option to
|
10581 |
|
|
the \s-1HP\s0 compilers.
|
10582 |
|
|
.IP "\fB\-mportable\-runtime\fR" 4
|
10583 |
|
|
.IX Item "-mportable-runtime"
|
10584 |
|
|
Use the portable calling conventions proposed by \s-1HP\s0 for \s-1ELF\s0 systems.
|
10585 |
|
|
.IP "\fB\-mgas\fR" 4
|
10586 |
|
|
.IX Item "-mgas"
|
10587 |
|
|
Enable the use of assembler directives only \s-1GAS\s0 understands.
|
10588 |
|
|
.IP "\fB\-mschedule=\fR\fIcpu-type\fR" 4
|
10589 |
|
|
.IX Item "-mschedule=cpu-type"
|
10590 |
|
|
Schedule code according to the constraints for the machine type
|
10591 |
|
|
\&\fIcpu-type\fR. The choices for \fIcpu-type\fR are \fB700\fR
|
10592 |
|
|
\&\fB7100\fR, \fB7100LC\fR, \fB7200\fR, \fB7300\fR and \fB8000\fR. Refer
|
10593 |
|
|
to \fI/usr/lib/sched.models\fR on an HP-UX system to determine the
|
10594 |
|
|
proper scheduling option for your machine. The default scheduling is
|
10595 |
|
|
\&\fB8000\fR.
|
10596 |
|
|
.IP "\fB\-mlinker\-opt\fR" 4
|
10597 |
|
|
.IX Item "-mlinker-opt"
|
10598 |
|
|
Enable the optimization pass in the HP-UX linker. Note this makes symbolic
|
10599 |
|
|
debugging impossible. It also triggers a bug in the HP-UX 8 and HP-UX 9
|
10600 |
|
|
linkers in which they give bogus error messages when linking some programs.
|
10601 |
|
|
.IP "\fB\-msoft\-float\fR" 4
|
10602 |
|
|
.IX Item "-msoft-float"
|
10603 |
|
|
Generate output containing library calls for floating point.
|
10604 |
|
|
\&\fBWarning:\fR the requisite libraries are not available for all \s-1HPPA\s0
|
10605 |
|
|
targets. Normally the facilities of the machine's usual C compiler are
|
10606 |
|
|
used, but this cannot be done directly in cross-compilation. You must make
|
10607 |
|
|
your own arrangements to provide suitable library functions for
|
10608 |
|
|
cross-compilation.
|
10609 |
|
|
.Sp
|
10610 |
|
|
\&\fB\-msoft\-float\fR changes the calling convention in the output file;
|
10611 |
|
|
therefore, it is only useful if you compile \fIall\fR of a program with
|
10612 |
|
|
this option. In particular, you need to compile \fIlibgcc.a\fR, the
|
10613 |
|
|
library that comes with \s-1GCC\s0, with \fB\-msoft\-float\fR in order for
|
10614 |
|
|
this to work.
|
10615 |
|
|
.IP "\fB\-msio\fR" 4
|
10616 |
|
|
.IX Item "-msio"
|
10617 |
|
|
Generate the predefine, \f(CW\*(C`_SIO\*(C'\fR, for server \s-1IO\s0. The default is
|
10618 |
|
|
\&\fB\-mwsio\fR. This generates the predefines, \f(CW\*(C`_\|_hp9000s700\*(C'\fR,
|
10619 |
|
|
\&\f(CW\*(C`_\|_hp9000s700_\|_\*(C'\fR and \f(CW\*(C`_WSIO\*(C'\fR, for workstation \s-1IO\s0. These
|
10620 |
|
|
options are available under HP-UX and HI-UX.
|
10621 |
|
|
.IP "\fB\-mgnu\-ld\fR" 4
|
10622 |
|
|
.IX Item "-mgnu-ld"
|
10623 |
|
|
Use \s-1GNU\s0 ld specific options. This passes \fB\-shared\fR to ld when
|
10624 |
|
|
building a shared library. It is the default when \s-1GCC\s0 is configured,
|
10625 |
|
|
explicitly or implicitly, with the \s-1GNU\s0 linker. This option does not
|
10626 |
|
|
have any affect on which ld is called, it only changes what parameters
|
10627 |
|
|
are passed to that ld. The ld that is called is determined by the
|
10628 |
|
|
\&\fB\-\-with\-ld\fR configure option, \s-1GCC\s0's program search path, and
|
10629 |
|
|
finally by the user's \fB\s-1PATH\s0\fR. The linker used by \s-1GCC\s0 can be printed
|
10630 |
|
|
using \fBwhich `gcc \-print\-prog\-name=ld`\fR. This option is only available
|
10631 |
|
|
on the 64 bit HP-UX \s-1GCC\s0, i.e. configured with \fBhppa*64*\-*\-hpux*\fR.
|
10632 |
|
|
.IP "\fB\-mhp\-ld\fR" 4
|
10633 |
|
|
.IX Item "-mhp-ld"
|
10634 |
|
|
Use \s-1HP\s0 ld specific options. This passes \fB\-b\fR to ld when building
|
10635 |
|
|
a shared library and passes \fB+Accept TypeMismatch\fR to ld on all
|
10636 |
|
|
links. It is the default when \s-1GCC\s0 is configured, explicitly or
|
10637 |
|
|
implicitly, with the \s-1HP\s0 linker. This option does not have any affect on
|
10638 |
|
|
which ld is called, it only changes what parameters are passed to that
|
10639 |
|
|
ld. The ld that is called is determined by the \fB\-\-with\-ld\fR
|
10640 |
|
|
configure option, \s-1GCC\s0's program search path, and finally by the user's
|
10641 |
|
|
\&\fB\s-1PATH\s0\fR. The linker used by \s-1GCC\s0 can be printed using \fBwhich
|
10642 |
|
|
`gcc \-print\-prog\-name=ld`\fR. This option is only available on the 64 bit
|
10643 |
|
|
HP-UX \s-1GCC\s0, i.e. configured with \fBhppa*64*\-*\-hpux*\fR.
|
10644 |
|
|
.IP "\fB\-mlong\-calls\fR" 4
|
10645 |
|
|
.IX Item "-mlong-calls"
|
10646 |
|
|
Generate code that uses long call sequences. This ensures that a call
|
10647 |
|
|
is always able to reach linker generated stubs. The default is to generate
|
10648 |
|
|
long calls only when the distance from the call site to the beginning
|
10649 |
|
|
of the function or translation unit, as the case may be, exceeds a
|
10650 |
|
|
predefined limit set by the branch type being used. The limits for
|
10651 |
|
|
normal calls are 7,600,000 and 240,000 bytes, respectively for the
|
10652 |
|
|
\&\s-1PA\s0 2.0 and \s-1PA\s0 1.X architectures. Sibcalls are always limited at
|
10653 |
|
|
240,000 bytes.
|
10654 |
|
|
.Sp
|
10655 |
|
|
Distances are measured from the beginning of functions when using the
|
10656 |
|
|
\&\fB\-ffunction\-sections\fR option, or when using the \fB\-mgas\fR
|
10657 |
|
|
and \fB\-mno\-portable\-runtime\fR options together under HP-UX with
|
10658 |
|
|
the \s-1SOM\s0 linker.
|
10659 |
|
|
.Sp
|
10660 |
|
|
It is normally not desirable to use this option as it will degrade
|
10661 |
|
|
performance. However, it may be useful in large applications,
|
10662 |
|
|
particularly when partial linking is used to build the application.
|
10663 |
|
|
.Sp
|
10664 |
|
|
The types of long calls used depends on the capabilities of the
|
10665 |
|
|
assembler and linker, and the type of code being generated. The
|
10666 |
|
|
impact on systems that support long absolute calls, and long pic
|
10667 |
|
|
symbol-difference or pc-relative calls should be relatively small.
|
10668 |
|
|
However, an indirect call is used on 32\-bit \s-1ELF\s0 systems in pic code
|
10669 |
|
|
and it is quite long.
|
10670 |
|
|
.IP "\fB\-munix=\fR\fIunix-std\fR" 4
|
10671 |
|
|
.IX Item "-munix=unix-std"
|
10672 |
|
|
Generate compiler predefines and select a startfile for the specified
|
10673 |
|
|
\&\s-1UNIX\s0 standard. The choices for \fIunix-std\fR are \fB93\fR, \fB95\fR
|
10674 |
|
|
and \fB98\fR. \fB93\fR is supported on all HP-UX versions. \fB95\fR
|
10675 |
|
|
is available on HP-UX 10.10 and later. \fB98\fR is available on HP-UX
|
10676 |
|
|
11.11 and later. The default values are \fB93\fR for HP-UX 10.00,
|
10677 |
|
|
\&\fB95\fR for HP-UX 10.10 though to 11.00, and \fB98\fR for HP-UX 11.11
|
10678 |
|
|
and later.
|
10679 |
|
|
.Sp
|
10680 |
|
|
\&\fB\-munix=93\fR provides the same predefines as \s-1GCC\s0 3.3 and 3.4.
|
10681 |
|
|
\&\fB\-munix=95\fR provides additional predefines for \f(CW\*(C`XOPEN_UNIX\*(C'\fR
|
10682 |
|
|
and \f(CW\*(C`_XOPEN_SOURCE_EXTENDED\*(C'\fR, and the startfile \fIunix95.o\fR.
|
10683 |
|
|
\&\fB\-munix=98\fR provides additional predefines for \f(CW\*(C`_XOPEN_UNIX\*(C'\fR,
|
10684 |
|
|
\&\f(CW\*(C`_XOPEN_SOURCE_EXTENDED\*(C'\fR, \f(CW\*(C`_INCLUDE_\|_STDC_A1_SOURCE\*(C'\fR and
|
10685 |
|
|
\&\f(CW\*(C`_INCLUDE_XOPEN_SOURCE_500\*(C'\fR, and the startfile \fIunix98.o\fR.
|
10686 |
|
|
.Sp
|
10687 |
|
|
It is \fIimportant\fR to note that this option changes the interfaces
|
10688 |
|
|
for various library routines. It also affects the operational behavior
|
10689 |
|
|
of the C library. Thus, \fIextreme\fR care is needed in using this
|
10690 |
|
|
option.
|
10691 |
|
|
.Sp
|
10692 |
|
|
Library code that is intended to operate with more than one \s-1UNIX\s0
|
10693 |
|
|
standard must test, set and restore the variable \fI_\|_xpg4_extended_mask\fR
|
10694 |
|
|
as appropriate. Most \s-1GNU\s0 software doesn't provide this capability.
|
10695 |
|
|
.IP "\fB\-nolibdld\fR" 4
|
10696 |
|
|
.IX Item "-nolibdld"
|
10697 |
|
|
Suppress the generation of link options to search libdld.sl when the
|
10698 |
|
|
\&\fB\-static\fR option is specified on HP-UX 10 and later.
|
10699 |
|
|
.IP "\fB\-static\fR" 4
|
10700 |
|
|
.IX Item "-static"
|
10701 |
|
|
The HP-UX implementation of setlocale in libc has a dependency on
|
10702 |
|
|
libdld.sl. There isn't an archive version of libdld.sl. Thus,
|
10703 |
|
|
when the \fB\-static\fR option is specified, special link options
|
10704 |
|
|
are needed to resolve this dependency.
|
10705 |
|
|
.Sp
|
10706 |
|
|
On HP-UX 10 and later, the \s-1GCC\s0 driver adds the necessary options to
|
10707 |
|
|
link with libdld.sl when the \fB\-static\fR option is specified.
|
10708 |
|
|
This causes the resulting binary to be dynamic. On the 64\-bit port,
|
10709 |
|
|
the linkers generate dynamic binaries by default in any case. The
|
10710 |
|
|
\&\fB\-nolibdld\fR option can be used to prevent the \s-1GCC\s0 driver from
|
10711 |
|
|
adding these link options.
|
10712 |
|
|
.IP "\fB\-threads\fR" 4
|
10713 |
|
|
.IX Item "-threads"
|
10714 |
|
|
Add support for multithreading with the \fIdce thread\fR library
|
10715 |
|
|
under HP-UX. This option sets flags for both the preprocessor and
|
10716 |
|
|
linker.
|
10717 |
|
|
.PP
|
10718 |
|
|
\fIIntel 386 and \s-1AMD\s0 x86\-64 Options\fR
|
10719 |
|
|
.IX Subsection "Intel 386 and AMD x86-64 Options"
|
10720 |
|
|
.PP
|
10721 |
|
|
These \fB\-m\fR options are defined for the i386 and x86\-64 family of
|
10722 |
|
|
computers:
|
10723 |
|
|
.IP "\fB\-mtune=\fR\fIcpu-type\fR" 4
|
10724 |
|
|
.IX Item "-mtune=cpu-type"
|
10725 |
|
|
Tune to \fIcpu-type\fR everything applicable about the generated code, except
|
10726 |
|
|
for the \s-1ABI\s0 and the set of available instructions. The choices for
|
10727 |
|
|
\&\fIcpu-type\fR are:
|
10728 |
|
|
.RS 4
|
10729 |
|
|
.IP "\fIgeneric\fR" 4
|
10730 |
|
|
.IX Item "generic"
|
10731 |
|
|
Produce code optimized for the most common \s-1IA32/AMD64/EM64T\s0 processors.
|
10732 |
|
|
If you know the \s-1CPU\s0 on which your code will run, then you should use
|
10733 |
|
|
the corresponding \fB\-mtune\fR option instead of
|
10734 |
|
|
\&\fB\-mtune=generic\fR. But, if you do not know exactly what \s-1CPU\s0 users
|
10735 |
|
|
of your application will have, then you should use this option.
|
10736 |
|
|
.Sp
|
10737 |
|
|
As new processors are deployed in the marketplace, the behavior of this
|
10738 |
|
|
option will change. Therefore, if you upgrade to a newer version of
|
10739 |
|
|
\&\s-1GCC\s0, the code generated option will change to reflect the processors
|
10740 |
|
|
that were most common when that version of \s-1GCC\s0 was released.
|
10741 |
|
|
.Sp
|
10742 |
|
|
There is no \fB\-march=generic\fR option because \fB\-march\fR
|
10743 |
|
|
indicates the instruction set the compiler can use, and there is no
|
10744 |
|
|
generic instruction set applicable to all processors. In contrast,
|
10745 |
|
|
\&\fB\-mtune\fR indicates the processor (or, in this case, collection of
|
10746 |
|
|
processors) for which the code is optimized.
|
10747 |
|
|
.IP "\fInative\fR" 4
|
10748 |
|
|
.IX Item "native"
|
10749 |
|
|
This selects the \s-1CPU\s0 to tune for at compilation time by determining
|
10750 |
|
|
the processor type of the compiling machine. Using \fB\-mtune=native\fR
|
10751 |
|
|
will produce code optimized for the local machine under the constraints
|
10752 |
|
|
of the selected instruction set. Using \fB\-march=native\fR will
|
10753 |
|
|
enable all instruction subsets supported by the local machine (hence
|
10754 |
|
|
the result might not run on different machines).
|
10755 |
|
|
.IP "\fIi386\fR" 4
|
10756 |
|
|
.IX Item "i386"
|
10757 |
|
|
Original Intel's i386 \s-1CPU\s0.
|
10758 |
|
|
.IP "\fIi486\fR" 4
|
10759 |
|
|
.IX Item "i486"
|
10760 |
|
|
Intel's i486 \s-1CPU\s0. (No scheduling is implemented for this chip.)
|
10761 |
|
|
.IP "\fIi586, pentium\fR" 4
|
10762 |
|
|
.IX Item "i586, pentium"
|
10763 |
|
|
Intel Pentium \s-1CPU\s0 with no \s-1MMX\s0 support.
|
10764 |
|
|
.IP "\fIpentium-mmx\fR" 4
|
10765 |
|
|
.IX Item "pentium-mmx"
|
10766 |
|
|
Intel PentiumMMX \s-1CPU\s0 based on Pentium core with \s-1MMX\s0 instruction set support.
|
10767 |
|
|
.IP "\fIpentiumpro\fR" 4
|
10768 |
|
|
.IX Item "pentiumpro"
|
10769 |
|
|
Intel PentiumPro \s-1CPU\s0.
|
10770 |
|
|
.IP "\fIi686\fR" 4
|
10771 |
|
|
.IX Item "i686"
|
10772 |
|
|
Same as \f(CW\*(C`generic\*(C'\fR, but when used as \f(CW\*(C`march\*(C'\fR option, PentiumPro
|
10773 |
|
|
instruction set will be used, so the code will run on all i686 family chips.
|
10774 |
|
|
.IP "\fIpentium2\fR" 4
|
10775 |
|
|
.IX Item "pentium2"
|
10776 |
|
|
Intel Pentium2 \s-1CPU\s0 based on PentiumPro core with \s-1MMX\s0 instruction set support.
|
10777 |
|
|
.IP "\fIpentium3, pentium3m\fR" 4
|
10778 |
|
|
.IX Item "pentium3, pentium3m"
|
10779 |
|
|
Intel Pentium3 \s-1CPU\s0 based on PentiumPro core with \s-1MMX\s0 and \s-1SSE\s0 instruction set
|
10780 |
|
|
support.
|
10781 |
|
|
.IP "\fIpentium-m\fR" 4
|
10782 |
|
|
.IX Item "pentium-m"
|
10783 |
|
|
Low power version of Intel Pentium3 \s-1CPU\s0 with \s-1MMX\s0, \s-1SSE\s0 and \s-1SSE2\s0 instruction set
|
10784 |
|
|
support. Used by Centrino notebooks.
|
10785 |
|
|
.IP "\fIpentium4, pentium4m\fR" 4
|
10786 |
|
|
.IX Item "pentium4, pentium4m"
|
10787 |
|
|
Intel Pentium4 \s-1CPU\s0 with \s-1MMX\s0, \s-1SSE\s0 and \s-1SSE2\s0 instruction set support.
|
10788 |
|
|
.IP "\fIprescott\fR" 4
|
10789 |
|
|
.IX Item "prescott"
|
10790 |
|
|
Improved version of Intel Pentium4 \s-1CPU\s0 with \s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0 and \s-1SSE3\s0 instruction
|
10791 |
|
|
set support.
|
10792 |
|
|
.IP "\fInocona\fR" 4
|
10793 |
|
|
.IX Item "nocona"
|
10794 |
|
|
Improved version of Intel Pentium4 \s-1CPU\s0 with 64\-bit extensions, \s-1MMX\s0, \s-1SSE\s0,
|
10795 |
|
|
\&\s-1SSE2\s0 and \s-1SSE3\s0 instruction set support.
|
10796 |
|
|
.IP "\fIcore2\fR" 4
|
10797 |
|
|
.IX Item "core2"
|
10798 |
|
|
Intel Core2 \s-1CPU\s0 with 64\-bit extensions, \s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0, \s-1SSE3\s0 and \s-1SSSE3\s0
|
10799 |
|
|
instruction set support.
|
10800 |
|
|
.IP "\fIatom\fR" 4
|
10801 |
|
|
.IX Item "atom"
|
10802 |
|
|
Intel Atom \s-1CPU\s0 with 64\-bit extensions, \s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0, \s-1SSE3\s0 and \s-1SSSE3\s0
|
10803 |
|
|
instruction set support.
|
10804 |
|
|
.IP "\fIk6\fR" 4
|
10805 |
|
|
.IX Item "k6"
|
10806 |
|
|
\&\s-1AMD\s0 K6 \s-1CPU\s0 with \s-1MMX\s0 instruction set support.
|
10807 |
|
|
.IP "\fIk6\-2, k6\-3\fR" 4
|
10808 |
|
|
.IX Item "k6-2, k6-3"
|
10809 |
|
|
Improved versions of \s-1AMD\s0 K6 \s-1CPU\s0 with \s-1MMX\s0 and 3DNow! instruction set support.
|
10810 |
|
|
.IP "\fIathlon, athlon-tbird\fR" 4
|
10811 |
|
|
.IX Item "athlon, athlon-tbird"
|
10812 |
|
|
\&\s-1AMD\s0 Athlon \s-1CPU\s0 with \s-1MMX\s0, 3dNOW!, enhanced 3DNow! and \s-1SSE\s0 prefetch instructions
|
10813 |
|
|
support.
|
10814 |
|
|
.IP "\fIathlon\-4, athlon-xp, athlon-mp\fR" 4
|
10815 |
|
|
.IX Item "athlon-4, athlon-xp, athlon-mp"
|
10816 |
|
|
Improved \s-1AMD\s0 Athlon \s-1CPU\s0 with \s-1MMX\s0, 3DNow!, enhanced 3DNow! and full \s-1SSE\s0
|
10817 |
|
|
instruction set support.
|
10818 |
|
|
.IP "\fIk8, opteron, athlon64, athlon-fx\fR" 4
|
10819 |
|
|
.IX Item "k8, opteron, athlon64, athlon-fx"
|
10820 |
|
|
\&\s-1AMD\s0 K8 core based CPUs with x86\-64 instruction set support. (This supersets
|
10821 |
|
|
\&\s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0, 3DNow!, enhanced 3DNow! and 64\-bit instruction set extensions.)
|
10822 |
|
|
.IP "\fIk8\-sse3, opteron\-sse3, athlon64\-sse3\fR" 4
|
10823 |
|
|
.IX Item "k8-sse3, opteron-sse3, athlon64-sse3"
|
10824 |
|
|
Improved versions of k8, opteron and athlon64 with \s-1SSE3\s0 instruction set support.
|
10825 |
|
|
.IP "\fIamdfam10, barcelona\fR" 4
|
10826 |
|
|
.IX Item "amdfam10, barcelona"
|
10827 |
|
|
\&\s-1AMD\s0 Family 10h core based CPUs with x86\-64 instruction set support. (This
|
10828 |
|
|
supersets \s-1MMX\s0, \s-1SSE\s0, \s-1SSE2\s0, \s-1SSE3\s0, \s-1SSE4A\s0, 3DNow!, enhanced 3DNow!, \s-1ABM\s0 and 64\-bit
|
10829 |
|
|
instruction set extensions.)
|
10830 |
|
|
.IP "\fIwinchip\-c6\fR" 4
|
10831 |
|
|
.IX Item "winchip-c6"
|
10832 |
|
|
\&\s-1IDT\s0 Winchip C6 \s-1CPU\s0, dealt in same way as i486 with additional \s-1MMX\s0 instruction
|
10833 |
|
|
set support.
|
10834 |
|
|
.IP "\fIwinchip2\fR" 4
|
10835 |
|
|
.IX Item "winchip2"
|
10836 |
|
|
\&\s-1IDT\s0 Winchip2 \s-1CPU\s0, dealt in same way as i486 with additional \s-1MMX\s0 and 3DNow!
|
10837 |
|
|
instruction set support.
|
10838 |
|
|
.IP "\fIc3\fR" 4
|
10839 |
|
|
.IX Item "c3"
|
10840 |
|
|
Via C3 \s-1CPU\s0 with \s-1MMX\s0 and 3DNow! instruction set support. (No scheduling is
|
10841 |
|
|
implemented for this chip.)
|
10842 |
|
|
.IP "\fIc3\-2\fR" 4
|
10843 |
|
|
.IX Item "c3-2"
|
10844 |
|
|
Via C3\-2 \s-1CPU\s0 with \s-1MMX\s0 and \s-1SSE\s0 instruction set support. (No scheduling is
|
10845 |
|
|
implemented for this chip.)
|
10846 |
|
|
.IP "\fIgeode\fR" 4
|
10847 |
|
|
.IX Item "geode"
|
10848 |
|
|
Embedded \s-1AMD\s0 \s-1CPU\s0 with \s-1MMX\s0 and 3DNow! instruction set support.
|
10849 |
|
|
.RE
|
10850 |
|
|
.RS 4
|
10851 |
|
|
.Sp
|
10852 |
|
|
While picking a specific \fIcpu-type\fR will schedule things appropriately
|
10853 |
|
|
for that particular chip, the compiler will not generate any code that
|
10854 |
|
|
does not run on the i386 without the \fB\-march=\fR\fIcpu-type\fR option
|
10855 |
|
|
being used.
|
10856 |
|
|
.RE
|
10857 |
|
|
.IP "\fB\-march=\fR\fIcpu-type\fR" 4
|
10858 |
|
|
.IX Item "-march=cpu-type"
|
10859 |
|
|
Generate instructions for the machine type \fIcpu-type\fR. The choices
|
10860 |
|
|
for \fIcpu-type\fR are the same as for \fB\-mtune\fR. Moreover,
|
10861 |
|
|
specifying \fB\-march=\fR\fIcpu-type\fR implies \fB\-mtune=\fR\fIcpu-type\fR.
|
10862 |
|
|
.IP "\fB\-mcpu=\fR\fIcpu-type\fR" 4
|
10863 |
|
|
.IX Item "-mcpu=cpu-type"
|
10864 |
|
|
A deprecated synonym for \fB\-mtune\fR.
|
10865 |
|
|
.IP "\fB\-mfpmath=\fR\fIunit\fR" 4
|
10866 |
|
|
.IX Item "-mfpmath=unit"
|
10867 |
|
|
Generate floating point arithmetics for selected unit \fIunit\fR. The choices
|
10868 |
|
|
for \fIunit\fR are:
|
10869 |
|
|
.RS 4
|
10870 |
|
|
.IP "\fB387\fR" 4
|
10871 |
|
|
.IX Item "387"
|
10872 |
|
|
Use the standard 387 floating point coprocessor present majority of chips and
|
10873 |
|
|
emulated otherwise. Code compiled with this option will run almost everywhere.
|
10874 |
|
|
The temporary results are computed in 80bit precision instead of precision
|
10875 |
|
|
specified by the type resulting in slightly different results compared to most
|
10876 |
|
|
of other chips. See \fB\-ffloat\-store\fR for more detailed description.
|
10877 |
|
|
.Sp
|
10878 |
|
|
This is the default choice for i386 compiler.
|
10879 |
|
|
.IP "\fBsse\fR" 4
|
10880 |
|
|
.IX Item "sse"
|
10881 |
|
|
Use scalar floating point instructions present in the \s-1SSE\s0 instruction set.
|
10882 |
|
|
This instruction set is supported by Pentium3 and newer chips, in the \s-1AMD\s0 line
|
10883 |
|
|
by Athlon\-4, Athlon-xp and Athlon-mp chips. The earlier version of \s-1SSE\s0
|
10884 |
|
|
instruction set supports only single precision arithmetics, thus the double and
|
10885 |
|
|
extended precision arithmetics is still done using 387. Later version, present
|
10886 |
|
|
only in Pentium4 and the future \s-1AMD\s0 x86\-64 chips supports double precision
|
10887 |
|
|
arithmetics too.
|
10888 |
|
|
.Sp
|
10889 |
|
|
For the i386 compiler, you need to use \fB\-march=\fR\fIcpu-type\fR, \fB\-msse\fR
|
10890 |
|
|
or \fB\-msse2\fR switches to enable \s-1SSE\s0 extensions and make this option
|
10891 |
|
|
effective. For the x86\-64 compiler, these extensions are enabled by default.
|
10892 |
|
|
.Sp
|
10893 |
|
|
The resulting code should be considerably faster in the majority of cases and avoid
|
10894 |
|
|
the numerical instability problems of 387 code, but may break some existing
|
10895 |
|
|
code that expects temporaries to be 80bit.
|
10896 |
|
|
.Sp
|
10897 |
|
|
This is the default choice for the x86\-64 compiler.
|
10898 |
|
|
.IP "\fBsse,387\fR" 4
|
10899 |
|
|
.IX Item "sse,387"
|
10900 |
|
|
.PD 0
|
10901 |
|
|
.IP "\fBsse+387\fR" 4
|
10902 |
|
|
.IX Item "sse+387"
|
10903 |
|
|
.IP "\fBboth\fR" 4
|
10904 |
|
|
.IX Item "both"
|
10905 |
|
|
.PD
|
10906 |
|
|
Attempt to utilize both instruction sets at once. This effectively double the
|
10907 |
|
|
amount of available registers and on chips with separate execution units for
|
10908 |
|
|
387 and \s-1SSE\s0 the execution resources too. Use this option with care, as it is
|
10909 |
|
|
still experimental, because the \s-1GCC\s0 register allocator does not model separate
|
10910 |
|
|
functional units well resulting in instable performance.
|
10911 |
|
|
.RE
|
10912 |
|
|
.RS 4
|
10913 |
|
|
.RE
|
10914 |
|
|
.IP "\fB\-masm=\fR\fIdialect\fR" 4
|
10915 |
|
|
.IX Item "-masm=dialect"
|
10916 |
|
|
Output asm instructions using selected \fIdialect\fR. Supported
|
10917 |
|
|
choices are \fBintel\fR or \fBatt\fR (the default one). Darwin does
|
10918 |
|
|
not support \fBintel\fR.
|
10919 |
|
|
.IP "\fB\-mieee\-fp\fR" 4
|
10920 |
|
|
.IX Item "-mieee-fp"
|
10921 |
|
|
.PD 0
|
10922 |
|
|
.IP "\fB\-mno\-ieee\-fp\fR" 4
|
10923 |
|
|
.IX Item "-mno-ieee-fp"
|
10924 |
|
|
.PD
|
10925 |
|
|
Control whether or not the compiler uses \s-1IEEE\s0 floating point
|
10926 |
|
|
comparisons. These handle correctly the case where the result of a
|
10927 |
|
|
comparison is unordered.
|
10928 |
|
|
.IP "\fB\-msoft\-float\fR" 4
|
10929 |
|
|
.IX Item "-msoft-float"
|
10930 |
|
|
Generate output containing library calls for floating point.
|
10931 |
|
|
\&\fBWarning:\fR the requisite libraries are not part of \s-1GCC\s0.
|
10932 |
|
|
Normally the facilities of the machine's usual C compiler are used, but
|
10933 |
|
|
this can't be done directly in cross-compilation. You must make your
|
10934 |
|
|
own arrangements to provide suitable library functions for
|
10935 |
|
|
cross-compilation.
|
10936 |
|
|
.Sp
|
10937 |
|
|
On machines where a function returns floating point results in the 80387
|
10938 |
|
|
register stack, some floating point opcodes may be emitted even if
|
10939 |
|
|
\&\fB\-msoft\-float\fR is used.
|
10940 |
|
|
.IP "\fB\-mno\-fp\-ret\-in\-387\fR" 4
|
10941 |
|
|
.IX Item "-mno-fp-ret-in-387"
|
10942 |
|
|
Do not use the \s-1FPU\s0 registers for return values of functions.
|
10943 |
|
|
.Sp
|
10944 |
|
|
The usual calling convention has functions return values of types
|
10945 |
|
|
\&\f(CW\*(C`float\*(C'\fR and \f(CW\*(C`double\*(C'\fR in an \s-1FPU\s0 register, even if there
|
10946 |
|
|
is no \s-1FPU\s0. The idea is that the operating system should emulate
|
10947 |
|
|
an \s-1FPU\s0.
|
10948 |
|
|
.Sp
|
10949 |
|
|
The option \fB\-mno\-fp\-ret\-in\-387\fR causes such values to be returned
|
10950 |
|
|
in ordinary \s-1CPU\s0 registers instead.
|
10951 |
|
|
.IP "\fB\-mno\-fancy\-math\-387\fR" 4
|
10952 |
|
|
.IX Item "-mno-fancy-math-387"
|
10953 |
|
|
Some 387 emulators do not support the \f(CW\*(C`sin\*(C'\fR, \f(CW\*(C`cos\*(C'\fR and
|
10954 |
|
|
\&\f(CW\*(C`sqrt\*(C'\fR instructions for the 387. Specify this option to avoid
|
10955 |
|
|
generating those instructions. This option is the default on FreeBSD,
|
10956 |
|
|
OpenBSD and NetBSD. This option is overridden when \fB\-march\fR
|
10957 |
|
|
indicates that the target cpu will always have an \s-1FPU\s0 and so the
|
10958 |
|
|
instruction will not need emulation. As of revision 2.6.1, these
|
10959 |
|
|
instructions are not generated unless you also use the
|
10960 |
|
|
\&\fB\-funsafe\-math\-optimizations\fR switch.
|
10961 |
|
|
.IP "\fB\-malign\-double\fR" 4
|
10962 |
|
|
.IX Item "-malign-double"
|
10963 |
|
|
.PD 0
|
10964 |
|
|
.IP "\fB\-mno\-align\-double\fR" 4
|
10965 |
|
|
.IX Item "-mno-align-double"
|
10966 |
|
|
.PD
|
10967 |
|
|
Control whether \s-1GCC\s0 aligns \f(CW\*(C`double\*(C'\fR, \f(CW\*(C`long double\*(C'\fR, and
|
10968 |
|
|
\&\f(CW\*(C`long long\*(C'\fR variables on a two word boundary or a one word
|
10969 |
|
|
boundary. Aligning \f(CW\*(C`double\*(C'\fR variables on a two word boundary will
|
10970 |
|
|
produce code that runs somewhat faster on a \fBPentium\fR at the
|
10971 |
|
|
expense of more memory.
|
10972 |
|
|
.Sp
|
10973 |
|
|
On x86\-64, \fB\-malign\-double\fR is enabled by default.
|
10974 |
|
|
.Sp
|
10975 |
|
|
\&\fBWarning:\fR if you use the \fB\-malign\-double\fR switch,
|
10976 |
|
|
structures containing the above types will be aligned differently than
|
10977 |
|
|
the published application binary interface specifications for the 386
|
10978 |
|
|
and will not be binary compatible with structures in code compiled
|
10979 |
|
|
without that switch.
|
10980 |
|
|
.IP "\fB\-m96bit\-long\-double\fR" 4
|
10981 |
|
|
.IX Item "-m96bit-long-double"
|
10982 |
|
|
.PD 0
|
10983 |
|
|
.IP "\fB\-m128bit\-long\-double\fR" 4
|
10984 |
|
|
.IX Item "-m128bit-long-double"
|
10985 |
|
|
.PD
|
10986 |
|
|
These switches control the size of \f(CW\*(C`long double\*(C'\fR type. The i386
|
10987 |
|
|
application binary interface specifies the size to be 96 bits,
|
10988 |
|
|
so \fB\-m96bit\-long\-double\fR is the default in 32 bit mode.
|
10989 |
|
|
.Sp
|
10990 |
|
|
Modern architectures (Pentium and newer) would prefer \f(CW\*(C`long double\*(C'\fR
|
10991 |
|
|
to be aligned to an 8 or 16 byte boundary. In arrays or structures
|
10992 |
|
|
conforming to the \s-1ABI\s0, this would not be possible. So specifying a
|
10993 |
|
|
\&\fB\-m128bit\-long\-double\fR will align \f(CW\*(C`long double\*(C'\fR
|
10994 |
|
|
to a 16 byte boundary by padding the \f(CW\*(C`long double\*(C'\fR with an additional
|
10995 |
|
|
32 bit zero.
|
10996 |
|
|
.Sp
|
10997 |
|
|
In the x86\-64 compiler, \fB\-m128bit\-long\-double\fR is the default choice as
|
10998 |
|
|
its \s-1ABI\s0 specifies that \f(CW\*(C`long double\*(C'\fR is to be aligned on 16 byte boundary.
|
10999 |
|
|
.Sp
|
11000 |
|
|
Notice that neither of these options enable any extra precision over the x87
|
11001 |
|
|
standard of 80 bits for a \f(CW\*(C`long double\*(C'\fR.
|
11002 |
|
|
.Sp
|
11003 |
|
|
\&\fBWarning:\fR if you override the default value for your target \s-1ABI\s0, the
|
11004 |
|
|
structures and arrays containing \f(CW\*(C`long double\*(C'\fR variables will change
|
11005 |
|
|
their size as well as function calling convention for function taking
|
11006 |
|
|
\&\f(CW\*(C`long double\*(C'\fR will be modified. Hence they will not be binary
|
11007 |
|
|
compatible with arrays or structures in code compiled without that switch.
|
11008 |
|
|
.IP "\fB\-mlarge\-data\-threshold=\fR\fInumber\fR" 4
|
11009 |
|
|
.IX Item "-mlarge-data-threshold=number"
|
11010 |
|
|
When \fB\-mcmodel=medium\fR is specified, the data greater than
|
11011 |
|
|
\&\fIthreshold\fR are placed in large data section. This value must be the
|
11012 |
|
|
same across all object linked into the binary and defaults to 65535.
|
11013 |
|
|
.IP "\fB\-mrtd\fR" 4
|
11014 |
|
|
.IX Item "-mrtd"
|
11015 |
|
|
Use a different function-calling convention, in which functions that
|
11016 |
|
|
take a fixed number of arguments return with the \f(CW\*(C`ret\*(C'\fR \fInum\fR
|
11017 |
|
|
instruction, which pops their arguments while returning. This saves one
|
11018 |
|
|
instruction in the caller since there is no need to pop the arguments
|
11019 |
|
|
there.
|
11020 |
|
|
.Sp
|
11021 |
|
|
You can specify that an individual function is called with this calling
|
11022 |
|
|
sequence with the function attribute \fBstdcall\fR. You can also
|
11023 |
|
|
override the \fB\-mrtd\fR option by using the function attribute
|
11024 |
|
|
\&\fBcdecl\fR.
|
11025 |
|
|
.Sp
|
11026 |
|
|
\&\fBWarning:\fR this calling convention is incompatible with the one
|
11027 |
|
|
normally used on Unix, so you cannot use it if you need to call
|
11028 |
|
|
libraries compiled with the Unix compiler.
|
11029 |
|
|
.Sp
|
11030 |
|
|
Also, you must provide function prototypes for all functions that
|
11031 |
|
|
take variable numbers of arguments (including \f(CW\*(C`printf\*(C'\fR);
|
11032 |
|
|
otherwise incorrect code will be generated for calls to those
|
11033 |
|
|
functions.
|
11034 |
|
|
.Sp
|
11035 |
|
|
In addition, seriously incorrect code will result if you call a
|
11036 |
|
|
function with too many arguments. (Normally, extra arguments are
|
11037 |
|
|
harmlessly ignored.)
|
11038 |
|
|
.IP "\fB\-mregparm=\fR\fInum\fR" 4
|
11039 |
|
|
.IX Item "-mregparm=num"
|
11040 |
|
|
Control how many registers are used to pass integer arguments. By
|
11041 |
|
|
default, no registers are used to pass arguments, and at most 3
|
11042 |
|
|
registers can be used. You can control this behavior for a specific
|
11043 |
|
|
function by using the function attribute \fBregparm\fR.
|
11044 |
|
|
.Sp
|
11045 |
|
|
\&\fBWarning:\fR if you use this switch, and
|
11046 |
|
|
\&\fInum\fR is nonzero, then you must build all modules with the same
|
11047 |
|
|
value, including any libraries. This includes the system libraries and
|
11048 |
|
|
startup modules.
|
11049 |
|
|
.IP "\fB\-msseregparm\fR" 4
|
11050 |
|
|
.IX Item "-msseregparm"
|
11051 |
|
|
Use \s-1SSE\s0 register passing conventions for float and double arguments
|
11052 |
|
|
and return values. You can control this behavior for a specific
|
11053 |
|
|
function by using the function attribute \fBsseregparm\fR.
|
11054 |
|
|
.Sp
|
11055 |
|
|
\&\fBWarning:\fR if you use this switch then you must build all
|
11056 |
|
|
modules with the same value, including any libraries. This includes
|
11057 |
|
|
the system libraries and startup modules.
|
11058 |
|
|
.IP "\fB\-mpc32\fR" 4
|
11059 |
|
|
.IX Item "-mpc32"
|
11060 |
|
|
.PD 0
|
11061 |
|
|
.IP "\fB\-mpc64\fR" 4
|
11062 |
|
|
.IX Item "-mpc64"
|
11063 |
|
|
.IP "\fB\-mpc80\fR" 4
|
11064 |
|
|
.IX Item "-mpc80"
|
11065 |
|
|
.PD
|
11066 |
|
|
Set 80387 floating-point precision to 32, 64 or 80 bits. When \fB\-mpc32\fR
|
11067 |
|
|
is specified, the significands of results of floating-point operations are
|
11068 |
|
|
rounded to 24 bits (single precision); \fB\-mpc64\fR rounds the
|
11069 |
|
|
significands of results of floating-point operations to 53 bits (double
|
11070 |
|
|
precision) and \fB\-mpc80\fR rounds the significands of results of
|
11071 |
|
|
floating-point operations to 64 bits (extended double precision), which is
|
11072 |
|
|
the default. When this option is used, floating-point operations in higher
|
11073 |
|
|
precisions are not available to the programmer without setting the \s-1FPU\s0
|
11074 |
|
|
control word explicitly.
|
11075 |
|
|
.Sp
|
11076 |
|
|
Setting the rounding of floating-point operations to less than the default
|
11077 |
|
|
80 bits can speed some programs by 2% or more. Note that some mathematical
|
11078 |
|
|
libraries assume that extended precision (80 bit) floating-point operations
|
11079 |
|
|
are enabled by default; routines in such libraries could suffer significant
|
11080 |
|
|
loss of accuracy, typically through so-called \*(L"catastrophic cancellation\*(R",
|
11081 |
|
|
when this option is used to set the precision to less than extended precision.
|
11082 |
|
|
.IP "\fB\-mstackrealign\fR" 4
|
11083 |
|
|
.IX Item "-mstackrealign"
|
11084 |
|
|
Realign the stack at entry. On the Intel x86, the \fB\-mstackrealign\fR
|
11085 |
|
|
option will generate an alternate prologue and epilogue that realigns the
|
11086 |
|
|
runtime stack if necessary. This supports mixing legacy codes that keep
|
11087 |
|
|
a 4\-byte aligned stack with modern codes that keep a 16\-byte stack for
|
11088 |
|
|
\&\s-1SSE\s0 compatibility. See also the attribute \f(CW\*(C`force_align_arg_pointer\*(C'\fR,
|
11089 |
|
|
applicable to individual functions.
|
11090 |
|
|
.IP "\fB\-mpreferred\-stack\-boundary=\fR\fInum\fR" 4
|
11091 |
|
|
.IX Item "-mpreferred-stack-boundary=num"
|
11092 |
|
|
Attempt to keep the stack boundary aligned to a 2 raised to \fInum\fR
|
11093 |
|
|
byte boundary. If \fB\-mpreferred\-stack\-boundary\fR is not specified,
|
11094 |
|
|
the default is 4 (16 bytes or 128 bits).
|
11095 |
|
|
.IP "\fB\-mincoming\-stack\-boundary=\fR\fInum\fR" 4
|
11096 |
|
|
.IX Item "-mincoming-stack-boundary=num"
|
11097 |
|
|
Assume the incoming stack is aligned to a 2 raised to \fInum\fR byte
|
11098 |
|
|
boundary. If \fB\-mincoming\-stack\-boundary\fR is not specified,
|
11099 |
|
|
the one specified by \fB\-mpreferred\-stack\-boundary\fR will be used.
|
11100 |
|
|
.Sp
|
11101 |
|
|
On Pentium and PentiumPro, \f(CW\*(C`double\*(C'\fR and \f(CW\*(C`long double\*(C'\fR values
|
11102 |
|
|
should be aligned to an 8 byte boundary (see \fB\-malign\-double\fR) or
|
11103 |
|
|
suffer significant run time performance penalties. On Pentium \s-1III\s0, the
|
11104 |
|
|
Streaming \s-1SIMD\s0 Extension (\s-1SSE\s0) data type \f(CW\*(C`_\|_m128\*(C'\fR may not work
|
11105 |
|
|
properly if it is not 16 byte aligned.
|
11106 |
|
|
.Sp
|
11107 |
|
|
To ensure proper alignment of this values on the stack, the stack boundary
|
11108 |
|
|
must be as aligned as that required by any value stored on the stack.
|
11109 |
|
|
Further, every function must be generated such that it keeps the stack
|
11110 |
|
|
aligned. Thus calling a function compiled with a higher preferred
|
11111 |
|
|
stack boundary from a function compiled with a lower preferred stack
|
11112 |
|
|
boundary will most likely misalign the stack. It is recommended that
|
11113 |
|
|
libraries that use callbacks always use the default setting.
|
11114 |
|
|
.Sp
|
11115 |
|
|
This extra alignment does consume extra stack space, and generally
|
11116 |
|
|
increases code size. Code that is sensitive to stack space usage, such
|
11117 |
|
|
as embedded systems and operating system kernels, may want to reduce the
|
11118 |
|
|
preferred alignment to \fB\-mpreferred\-stack\-boundary=2\fR.
|
11119 |
|
|
.IP "\fB\-mmmx\fR" 4
|
11120 |
|
|
.IX Item "-mmmx"
|
11121 |
|
|
.PD 0
|
11122 |
|
|
.IP "\fB\-mno\-mmx\fR" 4
|
11123 |
|
|
.IX Item "-mno-mmx"
|
11124 |
|
|
.IP "\fB\-msse\fR" 4
|
11125 |
|
|
.IX Item "-msse"
|
11126 |
|
|
.IP "\fB\-mno\-sse\fR" 4
|
11127 |
|
|
.IX Item "-mno-sse"
|
11128 |
|
|
.IP "\fB\-msse2\fR" 4
|
11129 |
|
|
.IX Item "-msse2"
|
11130 |
|
|
.IP "\fB\-mno\-sse2\fR" 4
|
11131 |
|
|
.IX Item "-mno-sse2"
|
11132 |
|
|
.IP "\fB\-msse3\fR" 4
|
11133 |
|
|
.IX Item "-msse3"
|
11134 |
|
|
.IP "\fB\-mno\-sse3\fR" 4
|
11135 |
|
|
.IX Item "-mno-sse3"
|
11136 |
|
|
.IP "\fB\-mssse3\fR" 4
|
11137 |
|
|
.IX Item "-mssse3"
|
11138 |
|
|
.IP "\fB\-mno\-ssse3\fR" 4
|
11139 |
|
|
.IX Item "-mno-ssse3"
|
11140 |
|
|
.IP "\fB\-msse4.1\fR" 4
|
11141 |
|
|
.IX Item "-msse4.1"
|
11142 |
|
|
.IP "\fB\-mno\-sse4.1\fR" 4
|
11143 |
|
|
.IX Item "-mno-sse4.1"
|
11144 |
|
|
.IP "\fB\-msse4.2\fR" 4
|
11145 |
|
|
.IX Item "-msse4.2"
|
11146 |
|
|
.IP "\fB\-mno\-sse4.2\fR" 4
|
11147 |
|
|
.IX Item "-mno-sse4.2"
|
11148 |
|
|
.IP "\fB\-msse4\fR" 4
|
11149 |
|
|
.IX Item "-msse4"
|
11150 |
|
|
.IP "\fB\-mno\-sse4\fR" 4
|
11151 |
|
|
.IX Item "-mno-sse4"
|
11152 |
|
|
.IP "\fB\-mavx\fR" 4
|
11153 |
|
|
.IX Item "-mavx"
|
11154 |
|
|
.IP "\fB\-mno\-avx\fR" 4
|
11155 |
|
|
.IX Item "-mno-avx"
|
11156 |
|
|
.IP "\fB\-maes\fR" 4
|
11157 |
|
|
.IX Item "-maes"
|
11158 |
|
|
.IP "\fB\-mno\-aes\fR" 4
|
11159 |
|
|
.IX Item "-mno-aes"
|
11160 |
|
|
.IP "\fB\-mpclmul\fR" 4
|
11161 |
|
|
.IX Item "-mpclmul"
|
11162 |
|
|
.IP "\fB\-mno\-pclmul\fR" 4
|
11163 |
|
|
.IX Item "-mno-pclmul"
|
11164 |
|
|
.IP "\fB\-msse4a\fR" 4
|
11165 |
|
|
.IX Item "-msse4a"
|
11166 |
|
|
.IP "\fB\-mno\-sse4a\fR" 4
|
11167 |
|
|
.IX Item "-mno-sse4a"
|
11168 |
|
|
.IP "\fB\-mfma4\fR" 4
|
11169 |
|
|
.IX Item "-mfma4"
|
11170 |
|
|
.IP "\fB\-mno\-fma4\fR" 4
|
11171 |
|
|
.IX Item "-mno-fma4"
|
11172 |
|
|
.IP "\fB\-mxop\fR" 4
|
11173 |
|
|
.IX Item "-mxop"
|
11174 |
|
|
.IP "\fB\-mno\-xop\fR" 4
|
11175 |
|
|
.IX Item "-mno-xop"
|
11176 |
|
|
.IP "\fB\-mlwp\fR" 4
|
11177 |
|
|
.IX Item "-mlwp"
|
11178 |
|
|
.IP "\fB\-mno\-lwp\fR" 4
|
11179 |
|
|
.IX Item "-mno-lwp"
|
11180 |
|
|
.IP "\fB\-m3dnow\fR" 4
|
11181 |
|
|
.IX Item "-m3dnow"
|
11182 |
|
|
.IP "\fB\-mno\-3dnow\fR" 4
|
11183 |
|
|
.IX Item "-mno-3dnow"
|
11184 |
|
|
.IP "\fB\-mpopcnt\fR" 4
|
11185 |
|
|
.IX Item "-mpopcnt"
|
11186 |
|
|
.IP "\fB\-mno\-popcnt\fR" 4
|
11187 |
|
|
.IX Item "-mno-popcnt"
|
11188 |
|
|
.IP "\fB\-mabm\fR" 4
|
11189 |
|
|
.IX Item "-mabm"
|
11190 |
|
|
.IP "\fB\-mno\-abm\fR" 4
|
11191 |
|
|
.IX Item "-mno-abm"
|
11192 |
|
|
.PD
|
11193 |
|
|
These switches enable or disable the use of instructions in the \s-1MMX\s0,
|
11194 |
|
|
\&\s-1SSE\s0, \s-1SSE2\s0, \s-1SSE3\s0, \s-1SSSE3\s0, \s-1SSE4\s0.1, \s-1AVX\s0, \s-1AES\s0, \s-1PCLMUL\s0, \s-1SSE4A\s0, \s-1FMA4\s0, \s-1XOP\s0,
|
11195 |
|
|
\&\s-1LWP\s0, \s-1ABM\s0 or 3DNow! extended instruction sets.
|
11196 |
|
|
These extensions are also available as built-in functions: see
|
11197 |
|
|
\&\fBX86 Built-in Functions\fR, for details of the functions enabled and
|
11198 |
|
|
disabled by these switches.
|
11199 |
|
|
.Sp
|
11200 |
|
|
To have \s-1SSE/SSE2\s0 instructions generated automatically from floating-point
|
11201 |
|
|
code (as opposed to 387 instructions), see \fB\-mfpmath=sse\fR.
|
11202 |
|
|
.Sp
|
11203 |
|
|
\&\s-1GCC\s0 depresses SSEx instructions when \fB\-mavx\fR is used. Instead, it
|
11204 |
|
|
generates new \s-1AVX\s0 instructions or \s-1AVX\s0 equivalence for all SSEx instructions
|
11205 |
|
|
when needed.
|
11206 |
|
|
.Sp
|
11207 |
|
|
These options will enable \s-1GCC\s0 to use these extended instructions in
|
11208 |
|
|
generated code, even without \fB\-mfpmath=sse\fR. Applications which
|
11209 |
|
|
perform runtime \s-1CPU\s0 detection must compile separate files for each
|
11210 |
|
|
supported architecture, using the appropriate flags. In particular,
|
11211 |
|
|
the file containing the \s-1CPU\s0 detection code should be compiled without
|
11212 |
|
|
these options.
|
11213 |
|
|
.IP "\fB\-mfused\-madd\fR" 4
|
11214 |
|
|
.IX Item "-mfused-madd"
|
11215 |
|
|
.PD 0
|
11216 |
|
|
.IP "\fB\-mno\-fused\-madd\fR" 4
|
11217 |
|
|
.IX Item "-mno-fused-madd"
|
11218 |
|
|
.PD
|
11219 |
|
|
Do (don't) generate code that uses the fused multiply/add or multiply/subtract
|
11220 |
|
|
instructions. The default is to use these instructions.
|
11221 |
|
|
.IP "\fB\-mcld\fR" 4
|
11222 |
|
|
.IX Item "-mcld"
|
11223 |
|
|
This option instructs \s-1GCC\s0 to emit a \f(CW\*(C`cld\*(C'\fR instruction in the prologue
|
11224 |
|
|
of functions that use string instructions. String instructions depend on
|
11225 |
|
|
the \s-1DF\s0 flag to select between autoincrement or autodecrement mode. While the
|
11226 |
|
|
\&\s-1ABI\s0 specifies the \s-1DF\s0 flag to be cleared on function entry, some operating
|
11227 |
|
|
systems violate this specification by not clearing the \s-1DF\s0 flag in their
|
11228 |
|
|
exception dispatchers. The exception handler can be invoked with the \s-1DF\s0 flag
|
11229 |
|
|
set which leads to wrong direction mode, when string instructions are used.
|
11230 |
|
|
This option can be enabled by default on 32\-bit x86 targets by configuring
|
11231 |
|
|
\&\s-1GCC\s0 with the \fB\-\-enable\-cld\fR configure option. Generation of \f(CW\*(C`cld\*(C'\fR
|
11232 |
|
|
instructions can be suppressed with the \fB\-mno\-cld\fR compiler option
|
11233 |
|
|
in this case.
|
11234 |
|
|
.IP "\fB\-mcx16\fR" 4
|
11235 |
|
|
.IX Item "-mcx16"
|
11236 |
|
|
This option will enable \s-1GCC\s0 to use \s-1CMPXCHG16B\s0 instruction in generated code.
|
11237 |
|
|
\&\s-1CMPXCHG16B\s0 allows for atomic operations on 128\-bit double quadword (or oword)
|
11238 |
|
|
data types. This is useful for high resolution counters that could be updated
|
11239 |
|
|
by multiple processors (or cores). This instruction is generated as part of
|
11240 |
|
|
atomic built-in functions: see \fBAtomic Builtins\fR for details.
|
11241 |
|
|
.IP "\fB\-msahf\fR" 4
|
11242 |
|
|
.IX Item "-msahf"
|
11243 |
|
|
This option will enable \s-1GCC\s0 to use \s-1SAHF\s0 instruction in generated 64\-bit code.
|
11244 |
|
|
Early Intel CPUs with Intel 64 lacked \s-1LAHF\s0 and \s-1SAHF\s0 instructions supported
|
11245 |
|
|
by \s-1AMD64\s0 until introduction of Pentium 4 G1 step in December 2005. \s-1LAHF\s0 and
|
11246 |
|
|
\&\s-1SAHF\s0 are load and store instructions, respectively, for certain status flags.
|
11247 |
|
|
In 64\-bit mode, \s-1SAHF\s0 instruction is used to optimize \f(CW\*(C`fmod\*(C'\fR, \f(CW\*(C`drem\*(C'\fR
|
11248 |
|
|
or \f(CW\*(C`remainder\*(C'\fR built-in functions: see \fBOther Builtins\fR for details.
|
11249 |
|
|
.IP "\fB\-mmovbe\fR" 4
|
11250 |
|
|
.IX Item "-mmovbe"
|
11251 |
|
|
This option will enable \s-1GCC\s0 to use movbe instruction to implement
|
11252 |
|
|
\&\f(CW\*(C`_\|_builtin_bswap32\*(C'\fR and \f(CW\*(C`_\|_builtin_bswap64\*(C'\fR.
|
11253 |
|
|
.IP "\fB\-mcrc32\fR" 4
|
11254 |
|
|
.IX Item "-mcrc32"
|
11255 |
|
|
This option will enable built-in functions, \f(CW\*(C`_\|_builtin_ia32_crc32qi\*(C'\fR,
|
11256 |
|
|
\&\f(CW\*(C`_\|_builtin_ia32_crc32hi\*(C'\fR. \f(CW\*(C`_\|_builtin_ia32_crc32si\*(C'\fR and
|
11257 |
|
|
\&\f(CW\*(C`_\|_builtin_ia32_crc32di\*(C'\fR to generate the crc32 machine instruction.
|
11258 |
|
|
.IP "\fB\-mrecip\fR" 4
|
11259 |
|
|
.IX Item "-mrecip"
|
11260 |
|
|
This option will enable \s-1GCC\s0 to use \s-1RCPSS\s0 and \s-1RSQRTSS\s0 instructions (and their
|
11261 |
|
|
vectorized variants \s-1RCPPS\s0 and \s-1RSQRTPS\s0) with an additional Newton-Raphson step
|
11262 |
|
|
to increase precision instead of \s-1DIVSS\s0 and \s-1SQRTSS\s0 (and their vectorized
|
11263 |
|
|
variants) for single precision floating point arguments. These instructions
|
11264 |
|
|
are generated only when \fB\-funsafe\-math\-optimizations\fR is enabled
|
11265 |
|
|
together with \fB\-finite\-math\-only\fR and \fB\-fno\-trapping\-math\fR.
|
11266 |
|
|
Note that while the throughput of the sequence is higher than the throughput
|
11267 |
|
|
of the non-reciprocal instruction, the precision of the sequence can be
|
11268 |
|
|
decreased by up to 2 ulp (i.e. the inverse of 1.0 equals 0.99999994).
|
11269 |
|
|
.Sp
|
11270 |
|
|
Note that \s-1GCC\s0 implements 1.0f/sqrtf(x) in terms of \s-1RSQRTSS\s0 (or \s-1RSQRTPS\s0)
|
11271 |
|
|
already with \fB\-ffast\-math\fR (or the above option combination), and
|
11272 |
|
|
doesn't need \fB\-mrecip\fR.
|
11273 |
|
|
.IP "\fB\-mveclibabi=\fR\fItype\fR" 4
|
11274 |
|
|
.IX Item "-mveclibabi=type"
|
11275 |
|
|
Specifies the \s-1ABI\s0 type to use for vectorizing intrinsics using an
|
11276 |
|
|
external library. Supported types are \f(CW\*(C`svml\*(C'\fR for the Intel short
|
11277 |
|
|
vector math library and \f(CW\*(C`acml\*(C'\fR for the \s-1AMD\s0 math core library style
|
11278 |
|
|
of interfacing. \s-1GCC\s0 will currently emit calls to \f(CW\*(C`vmldExp2\*(C'\fR,
|
11279 |
|
|
\&\f(CW\*(C`vmldLn2\*(C'\fR, \f(CW\*(C`vmldLog102\*(C'\fR, \f(CW\*(C`vmldLog102\*(C'\fR, \f(CW\*(C`vmldPow2\*(C'\fR,
|
11280 |
|
|
\&\f(CW\*(C`vmldTanh2\*(C'\fR, \f(CW\*(C`vmldTan2\*(C'\fR, \f(CW\*(C`vmldAtan2\*(C'\fR, \f(CW\*(C`vmldAtanh2\*(C'\fR,
|
11281 |
|
|
\&\f(CW\*(C`vmldCbrt2\*(C'\fR, \f(CW\*(C`vmldSinh2\*(C'\fR, \f(CW\*(C`vmldSin2\*(C'\fR, \f(CW\*(C`vmldAsinh2\*(C'\fR,
|
11282 |
|
|
\&\f(CW\*(C`vmldAsin2\*(C'\fR, \f(CW\*(C`vmldCosh2\*(C'\fR, \f(CW\*(C`vmldCos2\*(C'\fR, \f(CW\*(C`vmldAcosh2\*(C'\fR,
|
11283 |
|
|
\&\f(CW\*(C`vmldAcos2\*(C'\fR, \f(CW\*(C`vmlsExp4\*(C'\fR, \f(CW\*(C`vmlsLn4\*(C'\fR, \f(CW\*(C`vmlsLog104\*(C'\fR,
|
11284 |
|
|
\&\f(CW\*(C`vmlsLog104\*(C'\fR, \f(CW\*(C`vmlsPow4\*(C'\fR, \f(CW\*(C`vmlsTanh4\*(C'\fR, \f(CW\*(C`vmlsTan4\*(C'\fR,
|
11285 |
|
|
\&\f(CW\*(C`vmlsAtan4\*(C'\fR, \f(CW\*(C`vmlsAtanh4\*(C'\fR, \f(CW\*(C`vmlsCbrt4\*(C'\fR, \f(CW\*(C`vmlsSinh4\*(C'\fR,
|
11286 |
|
|
\&\f(CW\*(C`vmlsSin4\*(C'\fR, \f(CW\*(C`vmlsAsinh4\*(C'\fR, \f(CW\*(C`vmlsAsin4\*(C'\fR, \f(CW\*(C`vmlsCosh4\*(C'\fR,
|
11287 |
|
|
\&\f(CW\*(C`vmlsCos4\*(C'\fR, \f(CW\*(C`vmlsAcosh4\*(C'\fR and \f(CW\*(C`vmlsAcos4\*(C'\fR for corresponding
|
11288 |
|
|
function type when \fB\-mveclibabi=svml\fR is used and \f(CW\*(C`_\|_vrd2_sin\*(C'\fR,
|
11289 |
|
|
\&\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,
|
11290 |
|
|
\&\f(CW\*(C`_\|_vrd2_log10\*(C'\fR, \f(CW\*(C`_\|_vrs4_sinf\*(C'\fR, \f(CW\*(C`_\|_vrs4_cosf\*(C'\fR,
|
11291 |
|
|
\&\f(CW\*(C`_\|_vrs4_expf\*(C'\fR, \f(CW\*(C`_\|_vrs4_logf\*(C'\fR, \f(CW\*(C`_\|_vrs4_log2f\*(C'\fR,
|
11292 |
|
|
\&\f(CW\*(C`_\|_vrs4_log10f\*(C'\fR and \f(CW\*(C`_\|_vrs4_powf\*(C'\fR for corresponding function type
|
11293 |
|
|
when \fB\-mveclibabi=acml\fR is used. Both \fB\-ftree\-vectorize\fR and
|
11294 |
|
|
\&\fB\-funsafe\-math\-optimizations\fR have to be enabled. A \s-1SVML\s0 or \s-1ACML\s0 \s-1ABI\s0
|
11295 |
|
|
compatible library will have to be specified at link time.
|
11296 |
|
|
.IP "\fB\-mabi=\fR\fIname\fR" 4
|
11297 |
|
|
.IX Item "-mabi=name"
|
11298 |
|
|
Generate code for the specified calling convention. Permissible values
|
11299 |
|
|
are: \fBsysv\fR for the \s-1ABI\s0 used on GNU/Linux and other systems and
|
11300 |
|
|
\&\fBms\fR for the Microsoft \s-1ABI\s0. The default is to use the Microsoft
|
11301 |
|
|
\&\s-1ABI\s0 when targeting Windows. On all other systems, the default is the
|
11302 |
|
|
\&\s-1SYSV\s0 \s-1ABI\s0. You can control this behavior for a specific function by
|
11303 |
|
|
using the function attribute \fBms_abi\fR/\fBsysv_abi\fR.
|
11304 |
|
|
.IP "\fB\-mpush\-args\fR" 4
|
11305 |
|
|
.IX Item "-mpush-args"
|
11306 |
|
|
.PD 0
|
11307 |
|
|
.IP "\fB\-mno\-push\-args\fR" 4
|
11308 |
|
|
.IX Item "-mno-push-args"
|
11309 |
|
|
.PD
|
11310 |
|
|
Use \s-1PUSH\s0 operations to store outgoing parameters. This method is shorter
|
11311 |
|
|
and usually equally fast as method using \s-1SUB/MOV\s0 operations and is enabled
|
11312 |
|
|
by default. In some cases disabling it may improve performance because of
|
11313 |
|
|
improved scheduling and reduced dependencies.
|
11314 |
|
|
.IP "\fB\-maccumulate\-outgoing\-args\fR" 4
|
11315 |
|
|
.IX Item "-maccumulate-outgoing-args"
|
11316 |
|
|
If enabled, the maximum amount of space required for outgoing arguments will be
|
11317 |
|
|
computed in the function prologue. This is faster on most modern CPUs
|
11318 |
|
|
because of reduced dependencies, improved scheduling and reduced stack usage
|
11319 |
|
|
when preferred stack boundary is not equal to 2. The drawback is a notable
|
11320 |
|
|
increase in code size. This switch implies \fB\-mno\-push\-args\fR.
|
11321 |
|
|
.IP "\fB\-mthreads\fR" 4
|
11322 |
|
|
.IX Item "-mthreads"
|
11323 |
|
|
Support thread-safe exception handling on \fBMingw32\fR. Code that relies
|
11324 |
|
|
on thread-safe exception handling must compile and link all code with the
|
11325 |
|
|
\&\fB\-mthreads\fR option. When compiling, \fB\-mthreads\fR defines
|
11326 |
|
|
\&\fB\-D_MT\fR; when linking, it links in a special thread helper library
|
11327 |
|
|
\&\fB\-lmingwthrd\fR which cleans up per thread exception handling data.
|
11328 |
|
|
.IP "\fB\-mno\-align\-stringops\fR" 4
|
11329 |
|
|
.IX Item "-mno-align-stringops"
|
11330 |
|
|
Do not align destination of inlined string operations. This switch reduces
|
11331 |
|
|
code size and improves performance in case the destination is already aligned,
|
11332 |
|
|
but \s-1GCC\s0 doesn't know about it.
|
11333 |
|
|
.IP "\fB\-minline\-all\-stringops\fR" 4
|
11334 |
|
|
.IX Item "-minline-all-stringops"
|
11335 |
|
|
By default \s-1GCC\s0 inlines string operations only when destination is known to be
|
11336 |
|
|
aligned at least to 4 byte boundary. This enables more inlining, increase code
|
11337 |
|
|
size, but may improve performance of code that depends on fast memcpy, strlen
|
11338 |
|
|
and memset for short lengths.
|
11339 |
|
|
.IP "\fB\-minline\-stringops\-dynamically\fR" 4
|
11340 |
|
|
.IX Item "-minline-stringops-dynamically"
|
11341 |
|
|
For string operation of unknown size, inline runtime checks so for small
|
11342 |
|
|
blocks inline code is used, while for large blocks library call is used.
|
11343 |
|
|
.IP "\fB\-mstringop\-strategy=\fR\fIalg\fR" 4
|
11344 |
|
|
.IX Item "-mstringop-strategy=alg"
|
11345 |
|
|
Overwrite internal decision heuristic about particular algorithm to inline
|
11346 |
|
|
string operation with. The allowed values are \f(CW\*(C`rep_byte\*(C'\fR,
|
11347 |
|
|
\&\f(CW\*(C`rep_4byte\*(C'\fR, \f(CW\*(C`rep_8byte\*(C'\fR for expanding using i386 \f(CW\*(C`rep\*(C'\fR prefix
|
11348 |
|
|
of specified size, \f(CW\*(C`byte_loop\*(C'\fR, \f(CW\*(C`loop\*(C'\fR, \f(CW\*(C`unrolled_loop\*(C'\fR for
|
11349 |
|
|
expanding inline loop, \f(CW\*(C`libcall\*(C'\fR for always expanding library call.
|
11350 |
|
|
.IP "\fB\-momit\-leaf\-frame\-pointer\fR" 4
|
11351 |
|
|
.IX Item "-momit-leaf-frame-pointer"
|
11352 |
|
|
Don't keep the frame pointer in a register for leaf functions. This
|
11353 |
|
|
avoids the instructions to save, set up and restore frame pointers and
|
11354 |
|
|
makes an extra register available in leaf functions. The option
|
11355 |
|
|
\&\fB\-fomit\-frame\-pointer\fR removes the frame pointer for all functions
|
11356 |
|
|
which might make debugging harder.
|
11357 |
|
|
.IP "\fB\-mtls\-direct\-seg\-refs\fR" 4
|
11358 |
|
|
.IX Item "-mtls-direct-seg-refs"
|
11359 |
|
|
.PD 0
|
11360 |
|
|
.IP "\fB\-mno\-tls\-direct\-seg\-refs\fR" 4
|
11361 |
|
|
.IX Item "-mno-tls-direct-seg-refs"
|
11362 |
|
|
.PD
|
11363 |
|
|
Controls whether \s-1TLS\s0 variables may be accessed with offsets from the
|
11364 |
|
|
\&\s-1TLS\s0 segment register (\f(CW%gs\fR for 32\-bit, \f(CW%fs\fR for 64\-bit),
|
11365 |
|
|
or whether the thread base pointer must be added. Whether or not this
|
11366 |
|
|
is legal depends on the operating system, and whether it maps the
|
11367 |
|
|
segment to cover the entire \s-1TLS\s0 area.
|
11368 |
|
|
.Sp
|
11369 |
|
|
For systems that use \s-1GNU\s0 libc, the default is on.
|
11370 |
|
|
.IP "\fB\-msse2avx\fR" 4
|
11371 |
|
|
.IX Item "-msse2avx"
|
11372 |
|
|
.PD 0
|
11373 |
|
|
.IP "\fB\-mno\-sse2avx\fR" 4
|
11374 |
|
|
.IX Item "-mno-sse2avx"
|
11375 |
|
|
.PD
|
11376 |
|
|
Specify that the assembler should encode \s-1SSE\s0 instructions with \s-1VEX\s0
|
11377 |
|
|
prefix. The option \fB\-mavx\fR turns this on by default.
|
11378 |
|
|
.PP
|
11379 |
|
|
These \fB\-m\fR switches are supported in addition to the above
|
11380 |
|
|
on \s-1AMD\s0 x86\-64 processors in 64\-bit environments.
|
11381 |
|
|
.IP "\fB\-m32\fR" 4
|
11382 |
|
|
.IX Item "-m32"
|
11383 |
|
|
.PD 0
|
11384 |
|
|
.IP "\fB\-m64\fR" 4
|
11385 |
|
|
.IX Item "-m64"
|
11386 |
|
|
.PD
|
11387 |
|
|
Generate code for a 32\-bit or 64\-bit environment.
|
11388 |
|
|
The 32\-bit environment sets int, long and pointer to 32 bits and
|
11389 |
|
|
generates code that runs on any i386 system.
|
11390 |
|
|
The 64\-bit environment sets int to 32 bits and long and pointer
|
11391 |
|
|
to 64 bits and generates code for \s-1AMD\s0's x86\-64 architecture. For
|
11392 |
|
|
darwin only the \-m64 option turns off the \fB\-fno\-pic\fR and
|
11393 |
|
|
\&\fB\-mdynamic\-no\-pic\fR options.
|
11394 |
|
|
.IP "\fB\-mno\-red\-zone\fR" 4
|
11395 |
|
|
.IX Item "-mno-red-zone"
|
11396 |
|
|
Do not use a so called red zone for x86\-64 code. The red zone is mandated
|
11397 |
|
|
by the x86\-64 \s-1ABI\s0, it is a 128\-byte area beyond the location of the
|
11398 |
|
|
stack pointer that will not be modified by signal or interrupt handlers
|
11399 |
|
|
and therefore can be used for temporary data without adjusting the stack
|
11400 |
|
|
pointer. The flag \fB\-mno\-red\-zone\fR disables this red zone.
|
11401 |
|
|
.IP "\fB\-mcmodel=small\fR" 4
|
11402 |
|
|
.IX Item "-mcmodel=small"
|
11403 |
|
|
Generate code for the small code model: the program and its symbols must
|
11404 |
|
|
be linked in the lower 2 \s-1GB\s0 of the address space. Pointers are 64 bits.
|
11405 |
|
|
Programs can be statically or dynamically linked. This is the default
|
11406 |
|
|
code model.
|
11407 |
|
|
.IP "\fB\-mcmodel=kernel\fR" 4
|
11408 |
|
|
.IX Item "-mcmodel=kernel"
|
11409 |
|
|
Generate code for the kernel code model. The kernel runs in the
|
11410 |
|
|
negative 2 \s-1GB\s0 of the address space.
|
11411 |
|
|
This model has to be used for Linux kernel code.
|
11412 |
|
|
.IP "\fB\-mcmodel=medium\fR" 4
|
11413 |
|
|
.IX Item "-mcmodel=medium"
|
11414 |
|
|
Generate code for the medium model: The program is linked in the lower 2
|
11415 |
|
|
\&\s-1GB\s0 of the address space. Small symbols are also placed there. Symbols
|
11416 |
|
|
with sizes larger than \fB\-mlarge\-data\-threshold\fR are put into
|
11417 |
|
|
large data or bss sections and can be located above 2GB. Programs can
|
11418 |
|
|
be statically or dynamically linked.
|
11419 |
|
|
.IP "\fB\-mcmodel=large\fR" 4
|
11420 |
|
|
.IX Item "-mcmodel=large"
|
11421 |
|
|
Generate code for the large model: This model makes no assumptions
|
11422 |
|
|
about addresses and sizes of sections.
|
11423 |
|
|
.PP
|
11424 |
|
|
\fI\s-1IA\-64\s0 Options\fR
|
11425 |
|
|
.IX Subsection "IA-64 Options"
|
11426 |
|
|
.PP
|
11427 |
|
|
These are the \fB\-m\fR options defined for the Intel \s-1IA\-64\s0 architecture.
|
11428 |
|
|
.IP "\fB\-mbig\-endian\fR" 4
|
11429 |
|
|
.IX Item "-mbig-endian"
|
11430 |
|
|
Generate code for a big endian target. This is the default for HP-UX.
|
11431 |
|
|
.IP "\fB\-mlittle\-endian\fR" 4
|
11432 |
|
|
.IX Item "-mlittle-endian"
|
11433 |
|
|
Generate code for a little endian target. This is the default for \s-1AIX5\s0
|
11434 |
|
|
and GNU/Linux.
|
11435 |
|
|
.IP "\fB\-mgnu\-as\fR" 4
|
11436 |
|
|
.IX Item "-mgnu-as"
|
11437 |
|
|
.PD 0
|
11438 |
|
|
.IP "\fB\-mno\-gnu\-as\fR" 4
|
11439 |
|
|
.IX Item "-mno-gnu-as"
|
11440 |
|
|
.PD
|
11441 |
|
|
Generate (or don't) code for the \s-1GNU\s0 assembler. This is the default.
|
11442 |
|
|
.IP "\fB\-mgnu\-ld\fR" 4
|
11443 |
|
|
.IX Item "-mgnu-ld"
|
11444 |
|
|
.PD 0
|
11445 |
|
|
.IP "\fB\-mno\-gnu\-ld\fR" 4
|
11446 |
|
|
.IX Item "-mno-gnu-ld"
|
11447 |
|
|
.PD
|
11448 |
|
|
Generate (or don't) code for the \s-1GNU\s0 linker. This is the default.
|
11449 |
|
|
.IP "\fB\-mno\-pic\fR" 4
|
11450 |
|
|
.IX Item "-mno-pic"
|
11451 |
|
|
Generate code that does not use a global pointer register. The result
|
11452 |
|
|
is not position independent code, and violates the \s-1IA\-64\s0 \s-1ABI\s0.
|
11453 |
|
|
.IP "\fB\-mvolatile\-asm\-stop\fR" 4
|
11454 |
|
|
.IX Item "-mvolatile-asm-stop"
|
11455 |
|
|
.PD 0
|
11456 |
|
|
.IP "\fB\-mno\-volatile\-asm\-stop\fR" 4
|
11457 |
|
|
.IX Item "-mno-volatile-asm-stop"
|
11458 |
|
|
.PD
|
11459 |
|
|
Generate (or don't) a stop bit immediately before and after volatile asm
|
11460 |
|
|
statements.
|
11461 |
|
|
.IP "\fB\-mregister\-names\fR" 4
|
11462 |
|
|
.IX Item "-mregister-names"
|
11463 |
|
|
.PD 0
|
11464 |
|
|
.IP "\fB\-mno\-register\-names\fR" 4
|
11465 |
|
|
.IX Item "-mno-register-names"
|
11466 |
|
|
.PD
|
11467 |
|
|
Generate (or don't) \fBin\fR, \fBloc\fR, and \fBout\fR register names for
|
11468 |
|
|
the stacked registers. This may make assembler output more readable.
|
11469 |
|
|
.IP "\fB\-mno\-sdata\fR" 4
|
11470 |
|
|
.IX Item "-mno-sdata"
|
11471 |
|
|
.PD 0
|
11472 |
|
|
.IP "\fB\-msdata\fR" 4
|
11473 |
|
|
.IX Item "-msdata"
|
11474 |
|
|
.PD
|
11475 |
|
|
Disable (or enable) optimizations that use the small data section. This may
|
11476 |
|
|
be useful for working around optimizer bugs.
|
11477 |
|
|
.IP "\fB\-mconstant\-gp\fR" 4
|
11478 |
|
|
.IX Item "-mconstant-gp"
|
11479 |
|
|
Generate code that uses a single constant global pointer value. This is
|
11480 |
|
|
useful when compiling kernel code.
|
11481 |
|
|
.IP "\fB\-mauto\-pic\fR" 4
|
11482 |
|
|
.IX Item "-mauto-pic"
|
11483 |
|
|
Generate code that is self-relocatable. This implies \fB\-mconstant\-gp\fR.
|
11484 |
|
|
This is useful when compiling firmware code.
|
11485 |
|
|
.IP "\fB\-minline\-float\-divide\-min\-latency\fR" 4
|
11486 |
|
|
.IX Item "-minline-float-divide-min-latency"
|
11487 |
|
|
Generate code for inline divides of floating point values
|
11488 |
|
|
using the minimum latency algorithm.
|
11489 |
|
|
.IP "\fB\-minline\-float\-divide\-max\-throughput\fR" 4
|
11490 |
|
|
.IX Item "-minline-float-divide-max-throughput"
|
11491 |
|
|
Generate code for inline divides of floating point values
|
11492 |
|
|
using the maximum throughput algorithm.
|
11493 |
|
|
.IP "\fB\-mno\-inline\-float\-divide\fR" 4
|
11494 |
|
|
.IX Item "-mno-inline-float-divide"
|
11495 |
|
|
Do not generate inline code for divides of floating point values.
|
11496 |
|
|
.IP "\fB\-minline\-int\-divide\-min\-latency\fR" 4
|
11497 |
|
|
.IX Item "-minline-int-divide-min-latency"
|
11498 |
|
|
Generate code for inline divides of integer values
|
11499 |
|
|
using the minimum latency algorithm.
|
11500 |
|
|
.IP "\fB\-minline\-int\-divide\-max\-throughput\fR" 4
|
11501 |
|
|
.IX Item "-minline-int-divide-max-throughput"
|
11502 |
|
|
Generate code for inline divides of integer values
|
11503 |
|
|
using the maximum throughput algorithm.
|
11504 |
|
|
.IP "\fB\-mno\-inline\-int\-divide\fR" 4
|
11505 |
|
|
.IX Item "-mno-inline-int-divide"
|
11506 |
|
|
Do not generate inline code for divides of integer values.
|
11507 |
|
|
.IP "\fB\-minline\-sqrt\-min\-latency\fR" 4
|
11508 |
|
|
.IX Item "-minline-sqrt-min-latency"
|
11509 |
|
|
Generate code for inline square roots
|
11510 |
|
|
using the minimum latency algorithm.
|
11511 |
|
|
.IP "\fB\-minline\-sqrt\-max\-throughput\fR" 4
|
11512 |
|
|
.IX Item "-minline-sqrt-max-throughput"
|
11513 |
|
|
Generate code for inline square roots
|
11514 |
|
|
using the maximum throughput algorithm.
|
11515 |
|
|
.IP "\fB\-mno\-inline\-sqrt\fR" 4
|
11516 |
|
|
.IX Item "-mno-inline-sqrt"
|
11517 |
|
|
Do not generate inline code for sqrt.
|
11518 |
|
|
.IP "\fB\-mfused\-madd\fR" 4
|
11519 |
|
|
.IX Item "-mfused-madd"
|
11520 |
|
|
.PD 0
|
11521 |
|
|
.IP "\fB\-mno\-fused\-madd\fR" 4
|
11522 |
|
|
.IX Item "-mno-fused-madd"
|
11523 |
|
|
.PD
|
11524 |
|
|
Do (don't) generate code that uses the fused multiply/add or multiply/subtract
|
11525 |
|
|
instructions. The default is to use these instructions.
|
11526 |
|
|
.IP "\fB\-mno\-dwarf2\-asm\fR" 4
|
11527 |
|
|
.IX Item "-mno-dwarf2-asm"
|
11528 |
|
|
.PD 0
|
11529 |
|
|
.IP "\fB\-mdwarf2\-asm\fR" 4
|
11530 |
|
|
.IX Item "-mdwarf2-asm"
|
11531 |
|
|
.PD
|
11532 |
|
|
Don't (or do) generate assembler code for the \s-1DWARF2\s0 line number debugging
|
11533 |
|
|
info. This may be useful when not using the \s-1GNU\s0 assembler.
|
11534 |
|
|
.IP "\fB\-mearly\-stop\-bits\fR" 4
|
11535 |
|
|
.IX Item "-mearly-stop-bits"
|
11536 |
|
|
.PD 0
|
11537 |
|
|
.IP "\fB\-mno\-early\-stop\-bits\fR" 4
|
11538 |
|
|
.IX Item "-mno-early-stop-bits"
|
11539 |
|
|
.PD
|
11540 |
|
|
Allow stop bits to be placed earlier than immediately preceding the
|
11541 |
|
|
instruction that triggered the stop bit. This can improve instruction
|
11542 |
|
|
scheduling, but does not always do so.
|
11543 |
|
|
.IP "\fB\-mfixed\-range=\fR\fIregister-range\fR" 4
|
11544 |
|
|
.IX Item "-mfixed-range=register-range"
|
11545 |
|
|
Generate code treating the given register range as fixed registers.
|
11546 |
|
|
A fixed register is one that the register allocator can not use. This is
|
11547 |
|
|
useful when compiling kernel code. A register range is specified as
|
11548 |
|
|
two registers separated by a dash. Multiple register ranges can be
|
11549 |
|
|
specified separated by a comma.
|
11550 |
|
|
.IP "\fB\-mtls\-size=\fR\fItls-size\fR" 4
|
11551 |
|
|
.IX Item "-mtls-size=tls-size"
|
11552 |
|
|
Specify bit size of immediate \s-1TLS\s0 offsets. Valid values are 14, 22, and
|
11553 |
|
|
64.
|
11554 |
|
|
.IP "\fB\-mtune=\fR\fIcpu-type\fR" 4
|
11555 |
|
|
.IX Item "-mtune=cpu-type"
|
11556 |
|
|
Tune the instruction scheduling for a particular \s-1CPU\s0, Valid values are
|
11557 |
|
|
itanium, itanium1, merced, itanium2, and mckinley.
|
11558 |
|
|
.IP "\fB\-milp32\fR" 4
|
11559 |
|
|
.IX Item "-milp32"
|
11560 |
|
|
.PD 0
|
11561 |
|
|
.IP "\fB\-mlp64\fR" 4
|
11562 |
|
|
.IX Item "-mlp64"
|
11563 |
|
|
.PD
|
11564 |
|
|
Generate code for a 32\-bit or 64\-bit environment.
|
11565 |
|
|
The 32\-bit environment sets int, long and pointer to 32 bits.
|
11566 |
|
|
The 64\-bit environment sets int to 32 bits and long and pointer
|
11567 |
|
|
to 64 bits. These are HP-UX specific flags.
|
11568 |
|
|
.IP "\fB\-mno\-sched\-br\-data\-spec\fR" 4
|
11569 |
|
|
.IX Item "-mno-sched-br-data-spec"
|
11570 |
|
|
.PD 0
|
11571 |
|
|
.IP "\fB\-msched\-br\-data\-spec\fR" 4
|
11572 |
|
|
.IX Item "-msched-br-data-spec"
|
11573 |
|
|
.PD
|
11574 |
|
|
(Dis/En)able data speculative scheduling before reload.
|
11575 |
|
|
This will result in generation of the ld.a instructions and
|
11576 |
|
|
the corresponding check instructions (ld.c / chk.a).
|
11577 |
|
|
The default is 'disable'.
|
11578 |
|
|
.IP "\fB\-msched\-ar\-data\-spec\fR" 4
|
11579 |
|
|
.IX Item "-msched-ar-data-spec"
|
11580 |
|
|
.PD 0
|
11581 |
|
|
.IP "\fB\-mno\-sched\-ar\-data\-spec\fR" 4
|
11582 |
|
|
.IX Item "-mno-sched-ar-data-spec"
|
11583 |
|
|
.PD
|
11584 |
|
|
(En/Dis)able data speculative scheduling after reload.
|
11585 |
|
|
This will result in generation of the ld.a instructions and
|
11586 |
|
|
the corresponding check instructions (ld.c / chk.a).
|
11587 |
|
|
The default is 'enable'.
|
11588 |
|
|
.IP "\fB\-mno\-sched\-control\-spec\fR" 4
|
11589 |
|
|
.IX Item "-mno-sched-control-spec"
|
11590 |
|
|
.PD 0
|
11591 |
|
|
.IP "\fB\-msched\-control\-spec\fR" 4
|
11592 |
|
|
.IX Item "-msched-control-spec"
|
11593 |
|
|
.PD
|
11594 |
|
|
(Dis/En)able control speculative scheduling. This feature is
|
11595 |
|
|
available only during region scheduling (i.e. before reload).
|
11596 |
|
|
This will result in generation of the ld.s instructions and
|
11597 |
|
|
the corresponding check instructions chk.s .
|
11598 |
|
|
The default is 'disable'.
|
11599 |
|
|
.IP "\fB\-msched\-br\-in\-data\-spec\fR" 4
|
11600 |
|
|
.IX Item "-msched-br-in-data-spec"
|
11601 |
|
|
.PD 0
|
11602 |
|
|
.IP "\fB\-mno\-sched\-br\-in\-data\-spec\fR" 4
|
11603 |
|
|
.IX Item "-mno-sched-br-in-data-spec"
|
11604 |
|
|
.PD
|
11605 |
|
|
(En/Dis)able speculative scheduling of the instructions that
|
11606 |
|
|
are dependent on the data speculative loads before reload.
|
11607 |
|
|
This is effective only with \fB\-msched\-br\-data\-spec\fR enabled.
|
11608 |
|
|
The default is 'enable'.
|
11609 |
|
|
.IP "\fB\-msched\-ar\-in\-data\-spec\fR" 4
|
11610 |
|
|
.IX Item "-msched-ar-in-data-spec"
|
11611 |
|
|
.PD 0
|
11612 |
|
|
.IP "\fB\-mno\-sched\-ar\-in\-data\-spec\fR" 4
|
11613 |
|
|
.IX Item "-mno-sched-ar-in-data-spec"
|
11614 |
|
|
.PD
|
11615 |
|
|
(En/Dis)able speculative scheduling of the instructions that
|
11616 |
|
|
are dependent on the data speculative loads after reload.
|
11617 |
|
|
This is effective only with \fB\-msched\-ar\-data\-spec\fR enabled.
|
11618 |
|
|
The default is 'enable'.
|
11619 |
|
|
.IP "\fB\-msched\-in\-control\-spec\fR" 4
|
11620 |
|
|
.IX Item "-msched-in-control-spec"
|
11621 |
|
|
.PD 0
|
11622 |
|
|
.IP "\fB\-mno\-sched\-in\-control\-spec\fR" 4
|
11623 |
|
|
.IX Item "-mno-sched-in-control-spec"
|
11624 |
|
|
.PD
|
11625 |
|
|
(En/Dis)able speculative scheduling of the instructions that
|
11626 |
|
|
are dependent on the control speculative loads.
|
11627 |
|
|
This is effective only with \fB\-msched\-control\-spec\fR enabled.
|
11628 |
|
|
The default is 'enable'.
|
11629 |
|
|
.IP "\fB\-mno\-sched\-prefer\-non\-data\-spec\-insns\fR" 4
|
11630 |
|
|
.IX Item "-mno-sched-prefer-non-data-spec-insns"
|
11631 |
|
|
.PD 0
|
11632 |
|
|
.IP "\fB\-msched\-prefer\-non\-data\-spec\-insns\fR" 4
|
11633 |
|
|
.IX Item "-msched-prefer-non-data-spec-insns"
|
11634 |
|
|
.PD
|
11635 |
|
|
If enabled, data speculative instructions will be chosen for schedule
|
11636 |
|
|
only if there are no other choices at the moment. This will make
|
11637 |
|
|
the use of the data speculation much more conservative.
|
11638 |
|
|
The default is 'disable'.
|
11639 |
|
|
.IP "\fB\-mno\-sched\-prefer\-non\-control\-spec\-insns\fR" 4
|
11640 |
|
|
.IX Item "-mno-sched-prefer-non-control-spec-insns"
|
11641 |
|
|
.PD 0
|
11642 |
|
|
.IP "\fB\-msched\-prefer\-non\-control\-spec\-insns\fR" 4
|
11643 |
|
|
.IX Item "-msched-prefer-non-control-spec-insns"
|
11644 |
|
|
.PD
|
11645 |
|
|
If enabled, control speculative instructions will be chosen for schedule
|
11646 |
|
|
only if there are no other choices at the moment. This will make
|
11647 |
|
|
the use of the control speculation much more conservative.
|
11648 |
|
|
The default is 'disable'.
|
11649 |
|
|
.IP "\fB\-mno\-sched\-count\-spec\-in\-critical\-path\fR" 4
|
11650 |
|
|
.IX Item "-mno-sched-count-spec-in-critical-path"
|
11651 |
|
|
.PD 0
|
11652 |
|
|
.IP "\fB\-msched\-count\-spec\-in\-critical\-path\fR" 4
|
11653 |
|
|
.IX Item "-msched-count-spec-in-critical-path"
|
11654 |
|
|
.PD
|
11655 |
|
|
If enabled, speculative dependencies will be considered during
|
11656 |
|
|
computation of the instructions priorities. This will make the use of the
|
11657 |
|
|
speculation a bit more conservative.
|
11658 |
|
|
The default is 'disable'.
|
11659 |
|
|
.IP "\fB\-msched\-spec\-ldc\fR" 4
|
11660 |
|
|
.IX Item "-msched-spec-ldc"
|
11661 |
|
|
Use a simple data speculation check. This option is on by default.
|
11662 |
|
|
.IP "\fB\-msched\-control\-spec\-ldc\fR" 4
|
11663 |
|
|
.IX Item "-msched-control-spec-ldc"
|
11664 |
|
|
Use a simple check for control speculation. This option is on by default.
|
11665 |
|
|
.IP "\fB\-msched\-stop\-bits\-after\-every\-cycle\fR" 4
|
11666 |
|
|
.IX Item "-msched-stop-bits-after-every-cycle"
|
11667 |
|
|
Place a stop bit after every cycle when scheduling. This option is on
|
11668 |
|
|
by default.
|
11669 |
|
|
.IP "\fB\-msched\-fp\-mem\-deps\-zero\-cost\fR" 4
|
11670 |
|
|
.IX Item "-msched-fp-mem-deps-zero-cost"
|
11671 |
|
|
Assume that floating-point stores and loads are not likely to cause a conflict
|
11672 |
|
|
when placed into the same instruction group. This option is disabled by
|
11673 |
|
|
default.
|
11674 |
|
|
.IP "\fB\-msel\-sched\-dont\-check\-control\-spec\fR" 4
|
11675 |
|
|
.IX Item "-msel-sched-dont-check-control-spec"
|
11676 |
|
|
Generate checks for control speculation in selective scheduling.
|
11677 |
|
|
This flag is disabled by default.
|
11678 |
|
|
.IP "\fB\-msched\-max\-memory\-insns=\fR\fImax-insns\fR" 4
|
11679 |
|
|
.IX Item "-msched-max-memory-insns=max-insns"
|
11680 |
|
|
Limit on the number of memory insns per instruction group, giving lower
|
11681 |
|
|
priority to subsequent memory insns attempting to schedule in the same
|
11682 |
|
|
instruction group. Frequently useful to prevent cache bank conflicts.
|
11683 |
|
|
The default value is 1.
|
11684 |
|
|
.IP "\fB\-msched\-max\-memory\-insns\-hard\-limit\fR" 4
|
11685 |
|
|
.IX Item "-msched-max-memory-insns-hard-limit"
|
11686 |
|
|
Disallow more than `msched\-max\-memory\-insns' in instruction group.
|
11687 |
|
|
Otherwise, limit is `soft' meaning that we would prefer non-memory operations
|
11688 |
|
|
when limit is reached but may still schedule memory operations.
|
11689 |
|
|
.PP
|
11690 |
|
|
\fI\s-1IA\-64/VMS\s0 Options\fR
|
11691 |
|
|
.IX Subsection "IA-64/VMS Options"
|
11692 |
|
|
.PP
|
11693 |
|
|
These \fB\-m\fR options are defined for the \s-1IA\-64/VMS\s0 implementations:
|
11694 |
|
|
.IP "\fB\-mvms\-return\-codes\fR" 4
|
11695 |
|
|
.IX Item "-mvms-return-codes"
|
11696 |
|
|
Return \s-1VMS\s0 condition codes from main. The default is to return \s-1POSIX\s0
|
11697 |
|
|
style condition (e.g. error) codes.
|
11698 |
|
|
.IP "\fB\-mdebug\-main=\fR\fIprefix\fR" 4
|
11699 |
|
|
.IX Item "-mdebug-main=prefix"
|
11700 |
|
|
Flag the first routine whose name starts with \fIprefix\fR as the main
|
11701 |
|
|
routine for the debugger.
|
11702 |
|
|
.IP "\fB\-mmalloc64\fR" 4
|
11703 |
|
|
.IX Item "-mmalloc64"
|
11704 |
|
|
Default to 64bit memory allocation routines.
|
11705 |
|
|
.PP
|
11706 |
|
|
\fI\s-1LM32\s0 Options\fR
|
11707 |
|
|
.IX Subsection "LM32 Options"
|
11708 |
|
|
.PP
|
11709 |
|
|
These \fB\-m\fR options are defined for the Lattice Mico32 architecture:
|
11710 |
|
|
.IP "\fB\-mbarrel\-shift\-enabled\fR" 4
|
11711 |
|
|
.IX Item "-mbarrel-shift-enabled"
|
11712 |
|
|
Enable barrel-shift instructions.
|
11713 |
|
|
.IP "\fB\-mdivide\-enabled\fR" 4
|
11714 |
|
|
.IX Item "-mdivide-enabled"
|
11715 |
|
|
Enable divide and modulus instructions.
|
11716 |
|
|
.IP "\fB\-mmultiply\-enabled\fR" 4
|
11717 |
|
|
.IX Item "-mmultiply-enabled"
|
11718 |
|
|
Enable multiply instructions.
|
11719 |
|
|
.IP "\fB\-msign\-extend\-enabled\fR" 4
|
11720 |
|
|
.IX Item "-msign-extend-enabled"
|
11721 |
|
|
Enable sign extend instructions.
|
11722 |
|
|
.IP "\fB\-muser\-enabled\fR" 4
|
11723 |
|
|
.IX Item "-muser-enabled"
|
11724 |
|
|
Enable user-defined instructions.
|
11725 |
|
|
.PP
|
11726 |
|
|
\fIM32C Options\fR
|
11727 |
|
|
.IX Subsection "M32C Options"
|
11728 |
|
|
.IP "\fB\-mcpu=\fR\fIname\fR" 4
|
11729 |
|
|
.IX Item "-mcpu=name"
|
11730 |
|
|
Select the \s-1CPU\s0 for which code is generated. \fIname\fR may be one of
|
11731 |
|
|
\&\fBr8c\fR for the R8C/Tiny series, \fBm16c\fR for the M16C (up to
|
11732 |
|
|
/60) series, \fBm32cm\fR for the M16C/80 series, or \fBm32c\fR for
|
11733 |
|
|
the M32C/80 series.
|
11734 |
|
|
.IP "\fB\-msim\fR" 4
|
11735 |
|
|
.IX Item "-msim"
|
11736 |
|
|
Specifies that the program will be run on the simulator. This causes
|
11737 |
|
|
an alternate runtime library to be linked in which supports, for
|
11738 |
|
|
example, file I/O. You must not use this option when generating
|
11739 |
|
|
programs that will run on real hardware; you must provide your own
|
11740 |
|
|
runtime library for whatever I/O functions are needed.
|
11741 |
|
|
.IP "\fB\-memregs=\fR\fInumber\fR" 4
|
11742 |
|
|
.IX Item "-memregs=number"
|
11743 |
|
|
Specifies the number of memory-based pseudo-registers \s-1GCC\s0 will use
|
11744 |
|
|
during code generation. These pseudo-registers will be used like real
|
11745 |
|
|
registers, so there is a tradeoff between \s-1GCC\s0's ability to fit the
|
11746 |
|
|
code into available registers, and the performance penalty of using
|
11747 |
|
|
memory instead of registers. Note that all modules in a program must
|
11748 |
|
|
be compiled with the same value for this option. Because of that, you
|
11749 |
|
|
must not use this option with the default runtime libraries gcc
|
11750 |
|
|
builds.
|
11751 |
|
|
.PP
|
11752 |
|
|
\fIM32R/D Options\fR
|
11753 |
|
|
.IX Subsection "M32R/D Options"
|
11754 |
|
|
.PP
|
11755 |
|
|
These \fB\-m\fR options are defined for Renesas M32R/D architectures:
|
11756 |
|
|
.IP "\fB\-m32r2\fR" 4
|
11757 |
|
|
.IX Item "-m32r2"
|
11758 |
|
|
Generate code for the M32R/2.
|
11759 |
|
|
.IP "\fB\-m32rx\fR" 4
|
11760 |
|
|
.IX Item "-m32rx"
|
11761 |
|
|
Generate code for the M32R/X.
|
11762 |
|
|
.IP "\fB\-m32r\fR" 4
|
11763 |
|
|
.IX Item "-m32r"
|
11764 |
|
|
Generate code for the M32R. This is the default.
|
11765 |
|
|
.IP "\fB\-mmodel=small\fR" 4
|
11766 |
|
|
.IX Item "-mmodel=small"
|
11767 |
|
|
Assume all objects live in the lower 16MB of memory (so that their addresses
|
11768 |
|
|
can be loaded with the \f(CW\*(C`ld24\*(C'\fR instruction), and assume all subroutines
|
11769 |
|
|
are reachable with the \f(CW\*(C`bl\*(C'\fR instruction.
|
11770 |
|
|
This is the default.
|
11771 |
|
|
.Sp
|
11772 |
|
|
The addressability of a particular object can be set with the
|
11773 |
|
|
\&\f(CW\*(C`model\*(C'\fR attribute.
|
11774 |
|
|
.IP "\fB\-mmodel=medium\fR" 4
|
11775 |
|
|
.IX Item "-mmodel=medium"
|
11776 |
|
|
Assume objects may be anywhere in the 32\-bit address space (the compiler
|
11777 |
|
|
will generate \f(CW\*(C`seth/add3\*(C'\fR instructions to load their addresses), and
|
11778 |
|
|
assume all subroutines are reachable with the \f(CW\*(C`bl\*(C'\fR instruction.
|
11779 |
|
|
.IP "\fB\-mmodel=large\fR" 4
|
11780 |
|
|
.IX Item "-mmodel=large"
|
11781 |
|
|
Assume objects may be anywhere in the 32\-bit address space (the compiler
|
11782 |
|
|
will generate \f(CW\*(C`seth/add3\*(C'\fR instructions to load their addresses), and
|
11783 |
|
|
assume subroutines may not be reachable with the \f(CW\*(C`bl\*(C'\fR instruction
|
11784 |
|
|
(the compiler will generate the much slower \f(CW\*(C`seth/add3/jl\*(C'\fR
|
11785 |
|
|
instruction sequence).
|
11786 |
|
|
.IP "\fB\-msdata=none\fR" 4
|
11787 |
|
|
.IX Item "-msdata=none"
|
11788 |
|
|
Disable use of the small data area. Variables will be put into
|
11789 |
|
|
one of \fB.data\fR, \fBbss\fR, or \fB.rodata\fR (unless the
|
11790 |
|
|
\&\f(CW\*(C`section\*(C'\fR attribute has been specified).
|
11791 |
|
|
This is the default.
|
11792 |
|
|
.Sp
|
11793 |
|
|
The small data area consists of sections \fB.sdata\fR and \fB.sbss\fR.
|
11794 |
|
|
Objects may be explicitly put in the small data area with the
|
11795 |
|
|
\&\f(CW\*(C`section\*(C'\fR attribute using one of these sections.
|
11796 |
|
|
.IP "\fB\-msdata=sdata\fR" 4
|
11797 |
|
|
.IX Item "-msdata=sdata"
|
11798 |
|
|
Put small global and static data in the small data area, but do not
|
11799 |
|
|
generate special code to reference them.
|
11800 |
|
|
.IP "\fB\-msdata=use\fR" 4
|
11801 |
|
|
.IX Item "-msdata=use"
|
11802 |
|
|
Put small global and static data in the small data area, and generate
|
11803 |
|
|
special instructions to reference them.
|
11804 |
|
|
.IP "\fB\-G\fR \fInum\fR" 4
|
11805 |
|
|
.IX Item "-G num"
|
11806 |
|
|
Put global and static objects less than or equal to \fInum\fR bytes
|
11807 |
|
|
into the small data or bss sections instead of the normal data or bss
|
11808 |
|
|
sections. The default value of \fInum\fR is 8.
|
11809 |
|
|
The \fB\-msdata\fR option must be set to one of \fBsdata\fR or \fBuse\fR
|
11810 |
|
|
for this option to have any effect.
|
11811 |
|
|
.Sp
|
11812 |
|
|
All modules should be compiled with the same \fB\-G\fR \fInum\fR value.
|
11813 |
|
|
Compiling with different values of \fInum\fR may or may not work; if it
|
11814 |
|
|
doesn't the linker will give an error message\-\-\-incorrect code will not be
|
11815 |
|
|
generated.
|
11816 |
|
|
.IP "\fB\-mdebug\fR" 4
|
11817 |
|
|
.IX Item "-mdebug"
|
11818 |
|
|
Makes the M32R specific code in the compiler display some statistics
|
11819 |
|
|
that might help in debugging programs.
|
11820 |
|
|
.IP "\fB\-malign\-loops\fR" 4
|
11821 |
|
|
.IX Item "-malign-loops"
|
11822 |
|
|
Align all loops to a 32\-byte boundary.
|
11823 |
|
|
.IP "\fB\-mno\-align\-loops\fR" 4
|
11824 |
|
|
.IX Item "-mno-align-loops"
|
11825 |
|
|
Do not enforce a 32\-byte alignment for loops. This is the default.
|
11826 |
|
|
.IP "\fB\-missue\-rate=\fR\fInumber\fR" 4
|
11827 |
|
|
.IX Item "-missue-rate=number"
|
11828 |
|
|
Issue \fInumber\fR instructions per cycle. \fInumber\fR can only be 1
|
11829 |
|
|
or 2.
|
11830 |
|
|
.IP "\fB\-mbranch\-cost=\fR\fInumber\fR" 4
|
11831 |
|
|
.IX Item "-mbranch-cost=number"
|
11832 |
|
|
\&\fInumber\fR can only be 1 or 2. If it is 1 then branches will be
|
11833 |
|
|
preferred over conditional code, if it is 2, then the opposite will
|
11834 |
|
|
apply.
|
11835 |
|
|
.IP "\fB\-mflush\-trap=\fR\fInumber\fR" 4
|
11836 |
|
|
.IX Item "-mflush-trap=number"
|
11837 |
|
|
Specifies the trap number to use to flush the cache. The default is
|
11838 |
|
|
12. Valid numbers are between 0 and 15 inclusive.
|
11839 |
|
|
.IP "\fB\-mno\-flush\-trap\fR" 4
|
11840 |
|
|
.IX Item "-mno-flush-trap"
|
11841 |
|
|
Specifies that the cache cannot be flushed by using a trap.
|
11842 |
|
|
.IP "\fB\-mflush\-func=\fR\fIname\fR" 4
|
11843 |
|
|
.IX Item "-mflush-func=name"
|
11844 |
|
|
Specifies the name of the operating system function to call to flush
|
11845 |
|
|
the cache. The default is \fI_flush_cache\fR, but a function call
|
11846 |
|
|
will only be used if a trap is not available.
|
11847 |
|
|
.IP "\fB\-mno\-flush\-func\fR" 4
|
11848 |
|
|
.IX Item "-mno-flush-func"
|
11849 |
|
|
Indicates that there is no \s-1OS\s0 function for flushing the cache.
|
11850 |
|
|
.PP
|
11851 |
|
|
\fIM680x0 Options\fR
|
11852 |
|
|
.IX Subsection "M680x0 Options"
|
11853 |
|
|
.PP
|
11854 |
|
|
These are the \fB\-m\fR options defined for M680x0 and ColdFire processors.
|
11855 |
|
|
The default settings depend on which architecture was selected when
|
11856 |
|
|
the compiler was configured; the defaults for the most common choices
|
11857 |
|
|
are given below.
|
11858 |
|
|
.IP "\fB\-march=\fR\fIarch\fR" 4
|
11859 |
|
|
.IX Item "-march=arch"
|
11860 |
|
|
Generate code for a specific M680x0 or ColdFire instruction set
|
11861 |
|
|
architecture. Permissible values of \fIarch\fR for M680x0
|
11862 |
|
|
architectures are: \fB68000\fR, \fB68010\fR, \fB68020\fR,
|
11863 |
|
|
\&\fB68030\fR, \fB68040\fR, \fB68060\fR and \fBcpu32\fR. ColdFire
|
11864 |
|
|
architectures are selected according to Freescale's \s-1ISA\s0 classification
|
11865 |
|
|
and the permissible values are: \fBisaa\fR, \fBisaaplus\fR,
|
11866 |
|
|
\&\fBisab\fR and \fBisac\fR.
|
11867 |
|
|
.Sp
|
11868 |
|
|
gcc defines a macro \fB_\|_mcf\fR\fIarch\fR\fB_\|_\fR whenever it is generating
|
11869 |
|
|
code for a ColdFire target. The \fIarch\fR in this macro is one of the
|
11870 |
|
|
\&\fB\-march\fR arguments given above.
|
11871 |
|
|
.Sp
|
11872 |
|
|
When used together, \fB\-march\fR and \fB\-mtune\fR select code
|
11873 |
|
|
that runs on a family of similar processors but that is optimized
|
11874 |
|
|
for a particular microarchitecture.
|
11875 |
|
|
.IP "\fB\-mcpu=\fR\fIcpu\fR" 4
|
11876 |
|
|
.IX Item "-mcpu=cpu"
|
11877 |
|
|
Generate code for a specific M680x0 or ColdFire processor.
|
11878 |
|
|
The M680x0 \fIcpu\fRs are: \fB68000\fR, \fB68010\fR, \fB68020\fR,
|
11879 |
|
|
\&\fB68030\fR, \fB68040\fR, \fB68060\fR, \fB68302\fR, \fB68332\fR
|
11880 |
|
|
and \fBcpu32\fR. The ColdFire \fIcpu\fRs are given by the table
|
11881 |
|
|
below, which also classifies the CPUs into families:
|
11882 |
|
|
.RS 4
|
11883 |
|
|
.IP "Family : \fB\-mcpu\fR arguments" 4
|
11884 |
|
|
.IX Item "Family : -mcpu arguments"
|
11885 |
|
|
.PD 0
|
11886 |
|
|
.IP "\fB51\fR : \fB51\fR \fB51ac\fR \fB51cn\fR \fB51em\fR \fB51qe\fR" 4
|
11887 |
|
|
.IX Item "51 : 51 51ac 51cn 51em 51qe"
|
11888 |
|
|
.IP "\fB5206\fR : \fB5202\fR \fB5204\fR \fB5206\fR" 4
|
11889 |
|
|
.IX Item "5206 : 5202 5204 5206"
|
11890 |
|
|
.IP "\fB5206e\fR : \fB5206e\fR" 4
|
11891 |
|
|
.IX Item "5206e : 5206e"
|
11892 |
|
|
.IP "\fB5208\fR : \fB5207\fR \fB5208\fR" 4
|
11893 |
|
|
.IX Item "5208 : 5207 5208"
|
11894 |
|
|
.IP "\fB5211a\fR : \fB5210a\fR \fB5211a\fR" 4
|
11895 |
|
|
.IX Item "5211a : 5210a 5211a"
|
11896 |
|
|
.IP "\fB5213\fR : \fB5211\fR \fB5212\fR \fB5213\fR" 4
|
11897 |
|
|
.IX Item "5213 : 5211 5212 5213"
|
11898 |
|
|
.IP "\fB5216\fR : \fB5214\fR \fB5216\fR" 4
|
11899 |
|
|
.IX Item "5216 : 5214 5216"
|
11900 |
|
|
.IP "\fB52235\fR : \fB52230\fR \fB52231\fR \fB52232\fR \fB52233\fR \fB52234\fR \fB52235\fR" 4
|
11901 |
|
|
.IX Item "52235 : 52230 52231 52232 52233 52234 52235"
|
11902 |
|
|
.IP "\fB5225\fR : \fB5224\fR \fB5225\fR" 4
|
11903 |
|
|
.IX Item "5225 : 5224 5225"
|
11904 |
|
|
.IP "\fB52259\fR : \fB52252\fR \fB52254\fR \fB52255\fR \fB52256\fR \fB52258\fR \fB52259\fR" 4
|
11905 |
|
|
.IX Item "52259 : 52252 52254 52255 52256 52258 52259"
|
11906 |
|
|
.IP "\fB5235\fR : \fB5232\fR \fB5233\fR \fB5234\fR \fB5235\fR \fB523x\fR" 4
|
11907 |
|
|
.IX Item "5235 : 5232 5233 5234 5235 523x"
|
11908 |
|
|
.IP "\fB5249\fR : \fB5249\fR" 4
|
11909 |
|
|
.IX Item "5249 : 5249"
|
11910 |
|
|
.IP "\fB5250\fR : \fB5250\fR" 4
|
11911 |
|
|
.IX Item "5250 : 5250"
|
11912 |
|
|
.IP "\fB5271\fR : \fB5270\fR \fB5271\fR" 4
|
11913 |
|
|
.IX Item "5271 : 5270 5271"
|
11914 |
|
|
.IP "\fB5272\fR : \fB5272\fR" 4
|
11915 |
|
|
.IX Item "5272 : 5272"
|
11916 |
|
|
.IP "\fB5275\fR : \fB5274\fR \fB5275\fR" 4
|
11917 |
|
|
.IX Item "5275 : 5274 5275"
|
11918 |
|
|
.IP "\fB5282\fR : \fB5280\fR \fB5281\fR \fB5282\fR \fB528x\fR" 4
|
11919 |
|
|
.IX Item "5282 : 5280 5281 5282 528x"
|
11920 |
|
|
.IP "\fB53017\fR : \fB53011\fR \fB53012\fR \fB53013\fR \fB53014\fR \fB53015\fR \fB53016\fR \fB53017\fR" 4
|
11921 |
|
|
.IX Item "53017 : 53011 53012 53013 53014 53015 53016 53017"
|
11922 |
|
|
.IP "\fB5307\fR : \fB5307\fR" 4
|
11923 |
|
|
.IX Item "5307 : 5307"
|
11924 |
|
|
.IP "\fB5329\fR : \fB5327\fR \fB5328\fR \fB5329\fR \fB532x\fR" 4
|
11925 |
|
|
.IX Item "5329 : 5327 5328 5329 532x"
|
11926 |
|
|
.IP "\fB5373\fR : \fB5372\fR \fB5373\fR \fB537x\fR" 4
|
11927 |
|
|
.IX Item "5373 : 5372 5373 537x"
|
11928 |
|
|
.IP "\fB5407\fR : \fB5407\fR" 4
|
11929 |
|
|
.IX Item "5407 : 5407"
|
11930 |
|
|
.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
|
11931 |
|
|
.IX Item "5475 : 5470 5471 5472 5473 5474 5475 547x 5480 5481 5482 5483 5484 5485"
|
11932 |
|
|
.RE
|
11933 |
|
|
.RS 4
|
11934 |
|
|
.PD
|
11935 |
|
|
.Sp
|
11936 |
|
|
\&\fB\-mcpu=\fR\fIcpu\fR overrides \fB\-march=\fR\fIarch\fR if
|
11937 |
|
|
\&\fIarch\fR is compatible with \fIcpu\fR. Other combinations of
|
11938 |
|
|
\&\fB\-mcpu\fR and \fB\-march\fR are rejected.
|
11939 |
|
|
.Sp
|
11940 |
|
|
gcc defines the macro \fB_\|_mcf_cpu_\fR\fIcpu\fR when ColdFire target
|
11941 |
|
|
\&\fIcpu\fR is selected. It also defines \fB_\|_mcf_family_\fR\fIfamily\fR,
|
11942 |
|
|
where the value of \fIfamily\fR is given by the table above.
|
11943 |
|
|
.RE
|
11944 |
|
|
.IP "\fB\-mtune=\fR\fItune\fR" 4
|
11945 |
|
|
.IX Item "-mtune=tune"
|
11946 |
|
|
Tune the code for a particular microarchitecture, within the
|
11947 |
|
|
constraints set by \fB\-march\fR and \fB\-mcpu\fR.
|
11948 |
|
|
The M680x0 microarchitectures are: \fB68000\fR, \fB68010\fR,
|
11949 |
|
|
\&\fB68020\fR, \fB68030\fR, \fB68040\fR, \fB68060\fR
|
11950 |
|
|
and \fBcpu32\fR. The ColdFire microarchitectures
|
11951 |
|
|
are: \fBcfv1\fR, \fBcfv2\fR, \fBcfv3\fR, \fBcfv4\fR and \fBcfv4e\fR.
|
11952 |
|
|
.Sp
|
11953 |
|
|
You can also use \fB\-mtune=68020\-40\fR for code that needs
|
11954 |
|
|
to run relatively well on 68020, 68030 and 68040 targets.
|
11955 |
|
|
\&\fB\-mtune=68020\-60\fR is similar but includes 68060 targets
|
11956 |
|
|
as well. These two options select the same tuning decisions as
|
11957 |
|
|
\&\fB\-m68020\-40\fR and \fB\-m68020\-60\fR respectively.
|
11958 |
|
|
.Sp
|
11959 |
|
|
gcc defines the macros \fB_\|_mc\fR\fIarch\fR and \fB_\|_mc\fR\fIarch\fR\fB_\|_\fR
|
11960 |
|
|
when tuning for 680x0 architecture \fIarch\fR. It also defines
|
11961 |
|
|
\&\fBmc\fR\fIarch\fR unless either \fB\-ansi\fR or a non-GNU \fB\-std\fR
|
11962 |
|
|
option is used. If gcc is tuning for a range of architectures,
|
11963 |
|
|
as selected by \fB\-mtune=68020\-40\fR or \fB\-mtune=68020\-60\fR,
|
11964 |
|
|
it defines the macros for every architecture in the range.
|
11965 |
|
|
.Sp
|
11966 |
|
|
gcc also defines the macro \fB_\|_m\fR\fIuarch\fR\fB_\|_\fR when tuning for
|
11967 |
|
|
ColdFire microarchitecture \fIuarch\fR, where \fIuarch\fR is one
|
11968 |
|
|
of the arguments given above.
|
11969 |
|
|
.IP "\fB\-m68000\fR" 4
|
11970 |
|
|
.IX Item "-m68000"
|
11971 |
|
|
.PD 0
|
11972 |
|
|
.IP "\fB\-mc68000\fR" 4
|
11973 |
|
|
.IX Item "-mc68000"
|
11974 |
|
|
.PD
|
11975 |
|
|
Generate output for a 68000. This is the default
|
11976 |
|
|
when the compiler is configured for 68000\-based systems.
|
11977 |
|
|
It is equivalent to \fB\-march=68000\fR.
|
11978 |
|
|
.Sp
|
11979 |
|
|
Use this option for microcontrollers with a 68000 or \s-1EC000\s0 core,
|
11980 |
|
|
including the 68008, 68302, 68306, 68307, 68322, 68328 and 68356.
|
11981 |
|
|
.IP "\fB\-m68010\fR" 4
|
11982 |
|
|
.IX Item "-m68010"
|
11983 |
|
|
Generate output for a 68010. This is the default
|
11984 |
|
|
when the compiler is configured for 68010\-based systems.
|
11985 |
|
|
It is equivalent to \fB\-march=68010\fR.
|
11986 |
|
|
.IP "\fB\-m68020\fR" 4
|
11987 |
|
|
.IX Item "-m68020"
|
11988 |
|
|
.PD 0
|
11989 |
|
|
.IP "\fB\-mc68020\fR" 4
|
11990 |
|
|
.IX Item "-mc68020"
|
11991 |
|
|
.PD
|
11992 |
|
|
Generate output for a 68020. This is the default
|
11993 |
|
|
when the compiler is configured for 68020\-based systems.
|
11994 |
|
|
It is equivalent to \fB\-march=68020\fR.
|
11995 |
|
|
.IP "\fB\-m68030\fR" 4
|
11996 |
|
|
.IX Item "-m68030"
|
11997 |
|
|
Generate output for a 68030. This is the default when the compiler is
|
11998 |
|
|
configured for 68030\-based systems. It is equivalent to
|
11999 |
|
|
\&\fB\-march=68030\fR.
|
12000 |
|
|
.IP "\fB\-m68040\fR" 4
|
12001 |
|
|
.IX Item "-m68040"
|
12002 |
|
|
Generate output for a 68040. This is the default when the compiler is
|
12003 |
|
|
configured for 68040\-based systems. It is equivalent to
|
12004 |
|
|
\&\fB\-march=68040\fR.
|
12005 |
|
|
.Sp
|
12006 |
|
|
This option inhibits the use of 68881/68882 instructions that have to be
|
12007 |
|
|
emulated by software on the 68040. Use this option if your 68040 does not
|
12008 |
|
|
have code to emulate those instructions.
|
12009 |
|
|
.IP "\fB\-m68060\fR" 4
|
12010 |
|
|
.IX Item "-m68060"
|
12011 |
|
|
Generate output for a 68060. This is the default when the compiler is
|
12012 |
|
|
configured for 68060\-based systems. It is equivalent to
|
12013 |
|
|
\&\fB\-march=68060\fR.
|
12014 |
|
|
.Sp
|
12015 |
|
|
This option inhibits the use of 68020 and 68881/68882 instructions that
|
12016 |
|
|
have to be emulated by software on the 68060. Use this option if your 68060
|
12017 |
|
|
does not have code to emulate those instructions.
|
12018 |
|
|
.IP "\fB\-mcpu32\fR" 4
|
12019 |
|
|
.IX Item "-mcpu32"
|
12020 |
|
|
Generate output for a \s-1CPU32\s0. This is the default
|
12021 |
|
|
when the compiler is configured for CPU32\-based systems.
|
12022 |
|
|
It is equivalent to \fB\-march=cpu32\fR.
|
12023 |
|
|
.Sp
|
12024 |
|
|
Use this option for microcontrollers with a
|
12025 |
|
|
\&\s-1CPU32\s0 or \s-1CPU32+\s0 core, including the 68330, 68331, 68332, 68333, 68334,
|
12026 |
|
|
68336, 68340, 68341, 68349 and 68360.
|
12027 |
|
|
.IP "\fB\-m5200\fR" 4
|
12028 |
|
|
.IX Item "-m5200"
|
12029 |
|
|
Generate output for a 520X ColdFire \s-1CPU\s0. This is the default
|
12030 |
|
|
when the compiler is configured for 520X\-based systems.
|
12031 |
|
|
It is equivalent to \fB\-mcpu=5206\fR, and is now deprecated
|
12032 |
|
|
in favor of that option.
|
12033 |
|
|
.Sp
|
12034 |
|
|
Use this option for microcontroller with a 5200 core, including
|
12035 |
|
|
the \s-1MCF5202\s0, \s-1MCF5203\s0, \s-1MCF5204\s0 and \s-1MCF5206\s0.
|
12036 |
|
|
.IP "\fB\-m5206e\fR" 4
|
12037 |
|
|
.IX Item "-m5206e"
|
12038 |
|
|
Generate output for a 5206e ColdFire \s-1CPU\s0. The option is now
|
12039 |
|
|
deprecated in favor of the equivalent \fB\-mcpu=5206e\fR.
|
12040 |
|
|
.IP "\fB\-m528x\fR" 4
|
12041 |
|
|
.IX Item "-m528x"
|
12042 |
|
|
Generate output for a member of the ColdFire 528X family.
|
12043 |
|
|
The option is now deprecated in favor of the equivalent
|
12044 |
|
|
\&\fB\-mcpu=528x\fR.
|
12045 |
|
|
.IP "\fB\-m5307\fR" 4
|
12046 |
|
|
.IX Item "-m5307"
|
12047 |
|
|
Generate output for a ColdFire 5307 \s-1CPU\s0. The option is now deprecated
|
12048 |
|
|
in favor of the equivalent \fB\-mcpu=5307\fR.
|
12049 |
|
|
.IP "\fB\-m5407\fR" 4
|
12050 |
|
|
.IX Item "-m5407"
|
12051 |
|
|
Generate output for a ColdFire 5407 \s-1CPU\s0. The option is now deprecated
|
12052 |
|
|
in favor of the equivalent \fB\-mcpu=5407\fR.
|
12053 |
|
|
.IP "\fB\-mcfv4e\fR" 4
|
12054 |
|
|
.IX Item "-mcfv4e"
|
12055 |
|
|
Generate output for a ColdFire V4e family \s-1CPU\s0 (e.g. 547x/548x).
|
12056 |
|
|
This includes use of hardware floating point instructions.
|
12057 |
|
|
The option is equivalent to \fB\-mcpu=547x\fR, and is now
|
12058 |
|
|
deprecated in favor of that option.
|
12059 |
|
|
.IP "\fB\-m68020\-40\fR" 4
|
12060 |
|
|
.IX Item "-m68020-40"
|
12061 |
|
|
Generate output for a 68040, without using any of the new instructions.
|
12062 |
|
|
This results in code which can run relatively efficiently on either a
|
12063 |
|
|
68020/68881 or a 68030 or a 68040. The generated code does use the
|
12064 |
|
|
68881 instructions that are emulated on the 68040.
|
12065 |
|
|
.Sp
|
12066 |
|
|
The option is equivalent to \fB\-march=68020\fR \fB\-mtune=68020\-40\fR.
|
12067 |
|
|
.IP "\fB\-m68020\-60\fR" 4
|
12068 |
|
|
.IX Item "-m68020-60"
|
12069 |
|
|
Generate output for a 68060, without using any of the new instructions.
|
12070 |
|
|
This results in code which can run relatively efficiently on either a
|
12071 |
|
|
68020/68881 or a 68030 or a 68040. The generated code does use the
|
12072 |
|
|
68881 instructions that are emulated on the 68060.
|
12073 |
|
|
.Sp
|
12074 |
|
|
The option is equivalent to \fB\-march=68020\fR \fB\-mtune=68020\-60\fR.
|
12075 |
|
|
.IP "\fB\-mhard\-float\fR" 4
|
12076 |
|
|
.IX Item "-mhard-float"
|
12077 |
|
|
.PD 0
|
12078 |
|
|
.IP "\fB\-m68881\fR" 4
|
12079 |
|
|
.IX Item "-m68881"
|
12080 |
|
|
.PD
|
12081 |
|
|
Generate floating-point instructions. This is the default for 68020
|
12082 |
|
|
and above, and for ColdFire devices that have an \s-1FPU\s0. It defines the
|
12083 |
|
|
macro \fB_\|_HAVE_68881_\|_\fR on M680x0 targets and \fB_\|_mcffpu_\|_\fR
|
12084 |
|
|
on ColdFire targets.
|
12085 |
|
|
.IP "\fB\-msoft\-float\fR" 4
|
12086 |
|
|
.IX Item "-msoft-float"
|
12087 |
|
|
Do not generate floating-point instructions; use library calls instead.
|
12088 |
|
|
This is the default for 68000, 68010, and 68832 targets. It is also
|
12089 |
|
|
the default for ColdFire devices that have no \s-1FPU\s0.
|
12090 |
|
|
.IP "\fB\-mdiv\fR" 4
|
12091 |
|
|
.IX Item "-mdiv"
|
12092 |
|
|
.PD 0
|
12093 |
|
|
.IP "\fB\-mno\-div\fR" 4
|
12094 |
|
|
.IX Item "-mno-div"
|
12095 |
|
|
.PD
|
12096 |
|
|
Generate (do not generate) ColdFire hardware divide and remainder
|
12097 |
|
|
instructions. If \fB\-march\fR is used without \fB\-mcpu\fR,
|
12098 |
|
|
the default is \*(L"on\*(R" for ColdFire architectures and \*(L"off\*(R" for M680x0
|
12099 |
|
|
architectures. Otherwise, the default is taken from the target \s-1CPU\s0
|
12100 |
|
|
(either the default \s-1CPU\s0, or the one specified by \fB\-mcpu\fR). For
|
12101 |
|
|
example, the default is \*(L"off\*(R" for \fB\-mcpu=5206\fR and \*(L"on\*(R" for
|
12102 |
|
|
\&\fB\-mcpu=5206e\fR.
|
12103 |
|
|
.Sp
|
12104 |
|
|
gcc defines the macro \fB_\|_mcfhwdiv_\|_\fR when this option is enabled.
|
12105 |
|
|
.IP "\fB\-mshort\fR" 4
|
12106 |
|
|
.IX Item "-mshort"
|
12107 |
|
|
Consider type \f(CW\*(C`int\*(C'\fR to be 16 bits wide, like \f(CW\*(C`short int\*(C'\fR.
|
12108 |
|
|
Additionally, parameters passed on the stack are also aligned to a
|
12109 |
|
|
16\-bit boundary even on targets whose \s-1API\s0 mandates promotion to 32\-bit.
|
12110 |
|
|
.IP "\fB\-mno\-short\fR" 4
|
12111 |
|
|
.IX Item "-mno-short"
|
12112 |
|
|
Do not consider type \f(CW\*(C`int\*(C'\fR to be 16 bits wide. This is the default.
|
12113 |
|
|
.IP "\fB\-mnobitfield\fR" 4
|
12114 |
|
|
.IX Item "-mnobitfield"
|
12115 |
|
|
.PD 0
|
12116 |
|
|
.IP "\fB\-mno\-bitfield\fR" 4
|
12117 |
|
|
.IX Item "-mno-bitfield"
|
12118 |
|
|
.PD
|
12119 |
|
|
Do not use the bit-field instructions. The \fB\-m68000\fR, \fB\-mcpu32\fR
|
12120 |
|
|
and \fB\-m5200\fR options imply \fB\-mnobitfield\fR.
|
12121 |
|
|
.IP "\fB\-mbitfield\fR" 4
|
12122 |
|
|
.IX Item "-mbitfield"
|
12123 |
|
|
Do use the bit-field instructions. The \fB\-m68020\fR option implies
|
12124 |
|
|
\&\fB\-mbitfield\fR. This is the default if you use a configuration
|
12125 |
|
|
designed for a 68020.
|
12126 |
|
|
.IP "\fB\-mrtd\fR" 4
|
12127 |
|
|
.IX Item "-mrtd"
|
12128 |
|
|
Use a different function-calling convention, in which functions
|
12129 |
|
|
that take a fixed number of arguments return with the \f(CW\*(C`rtd\*(C'\fR
|
12130 |
|
|
instruction, which pops their arguments while returning. This
|
12131 |
|
|
saves one instruction in the caller since there is no need to pop
|
12132 |
|
|
the arguments there.
|
12133 |
|
|
.Sp
|
12134 |
|
|
This calling convention is incompatible with the one normally
|
12135 |
|
|
used on Unix, so you cannot use it if you need to call libraries
|
12136 |
|
|
compiled with the Unix compiler.
|
12137 |
|
|
.Sp
|
12138 |
|
|
Also, you must provide function prototypes for all functions that
|
12139 |
|
|
take variable numbers of arguments (including \f(CW\*(C`printf\*(C'\fR);
|
12140 |
|
|
otherwise incorrect code will be generated for calls to those
|
12141 |
|
|
functions.
|
12142 |
|
|
.Sp
|
12143 |
|
|
In addition, seriously incorrect code will result if you call a
|
12144 |
|
|
function with too many arguments. (Normally, extra arguments are
|
12145 |
|
|
harmlessly ignored.)
|
12146 |
|
|
.Sp
|
12147 |
|
|
The \f(CW\*(C`rtd\*(C'\fR instruction is supported by the 68010, 68020, 68030,
|
12148 |
|
|
68040, 68060 and \s-1CPU32\s0 processors, but not by the 68000 or 5200.
|
12149 |
|
|
.IP "\fB\-mno\-rtd\fR" 4
|
12150 |
|
|
.IX Item "-mno-rtd"
|
12151 |
|
|
Do not use the calling conventions selected by \fB\-mrtd\fR.
|
12152 |
|
|
This is the default.
|
12153 |
|
|
.IP "\fB\-malign\-int\fR" 4
|
12154 |
|
|
.IX Item "-malign-int"
|
12155 |
|
|
.PD 0
|
12156 |
|
|
.IP "\fB\-mno\-align\-int\fR" 4
|
12157 |
|
|
.IX Item "-mno-align-int"
|
12158 |
|
|
.PD
|
12159 |
|
|
Control whether \s-1GCC\s0 aligns \f(CW\*(C`int\*(C'\fR, \f(CW\*(C`long\*(C'\fR, \f(CW\*(C`long long\*(C'\fR,
|
12160 |
|
|
\&\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
|
12161 |
|
|
boundary (\fB\-malign\-int\fR) or a 16\-bit boundary (\fB\-mno\-align\-int\fR).
|
12162 |
|
|
Aligning variables on 32\-bit boundaries produces code that runs somewhat
|
12163 |
|
|
faster on processors with 32\-bit busses at the expense of more memory.
|
12164 |
|
|
.Sp
|
12165 |
|
|
\&\fBWarning:\fR if you use the \fB\-malign\-int\fR switch, \s-1GCC\s0 will
|
12166 |
|
|
align structures containing the above types differently than
|
12167 |
|
|
most published application binary interface specifications for the m68k.
|
12168 |
|
|
.IP "\fB\-mpcrel\fR" 4
|
12169 |
|
|
.IX Item "-mpcrel"
|
12170 |
|
|
Use the pc-relative addressing mode of the 68000 directly, instead of
|
12171 |
|
|
using a global offset table. At present, this option implies \fB\-fpic\fR,
|
12172 |
|
|
allowing at most a 16\-bit offset for pc-relative addressing. \fB\-fPIC\fR is
|
12173 |
|
|
not presently supported with \fB\-mpcrel\fR, though this could be supported for
|
12174 |
|
|
68020 and higher processors.
|
12175 |
|
|
.IP "\fB\-mno\-strict\-align\fR" 4
|
12176 |
|
|
.IX Item "-mno-strict-align"
|
12177 |
|
|
.PD 0
|
12178 |
|
|
.IP "\fB\-mstrict\-align\fR" 4
|
12179 |
|
|
.IX Item "-mstrict-align"
|
12180 |
|
|
.PD
|
12181 |
|
|
Do not (do) assume that unaligned memory references will be handled by
|
12182 |
|
|
the system.
|
12183 |
|
|
.IP "\fB\-msep\-data\fR" 4
|
12184 |
|
|
.IX Item "-msep-data"
|
12185 |
|
|
Generate code that allows the data segment to be located in a different
|
12186 |
|
|
area of memory from the text segment. This allows for execute in place in
|
12187 |
|
|
an environment without virtual memory management. This option implies
|
12188 |
|
|
\&\fB\-fPIC\fR.
|
12189 |
|
|
.IP "\fB\-mno\-sep\-data\fR" 4
|
12190 |
|
|
.IX Item "-mno-sep-data"
|
12191 |
|
|
Generate code that assumes that the data segment follows the text segment.
|
12192 |
|
|
This is the default.
|
12193 |
|
|
.IP "\fB\-mid\-shared\-library\fR" 4
|
12194 |
|
|
.IX Item "-mid-shared-library"
|
12195 |
|
|
Generate code that supports shared libraries via the library \s-1ID\s0 method.
|
12196 |
|
|
This allows for execute in place and shared libraries in an environment
|
12197 |
|
|
without virtual memory management. This option implies \fB\-fPIC\fR.
|
12198 |
|
|
.IP "\fB\-mno\-id\-shared\-library\fR" 4
|
12199 |
|
|
.IX Item "-mno-id-shared-library"
|
12200 |
|
|
Generate code that doesn't assume \s-1ID\s0 based shared libraries are being used.
|
12201 |
|
|
This is the default.
|
12202 |
|
|
.IP "\fB\-mshared\-library\-id=n\fR" 4
|
12203 |
|
|
.IX Item "-mshared-library-id=n"
|
12204 |
|
|
Specified the identification number of the \s-1ID\s0 based shared library being
|
12205 |
|
|
compiled. Specifying a value of 0 will generate more compact code, specifying
|
12206 |
|
|
other values will force the allocation of that number to the current
|
12207 |
|
|
library but is no more space or time efficient than omitting this option.
|
12208 |
|
|
.IP "\fB\-mxgot\fR" 4
|
12209 |
|
|
.IX Item "-mxgot"
|
12210 |
|
|
.PD 0
|
12211 |
|
|
.IP "\fB\-mno\-xgot\fR" 4
|
12212 |
|
|
.IX Item "-mno-xgot"
|
12213 |
|
|
.PD
|
12214 |
|
|
When generating position-independent code for ColdFire, generate code
|
12215 |
|
|
that works if the \s-1GOT\s0 has more than 8192 entries. This code is
|
12216 |
|
|
larger and slower than code generated without this option. On M680x0
|
12217 |
|
|
processors, this option is not needed; \fB\-fPIC\fR suffices.
|
12218 |
|
|
.Sp
|
12219 |
|
|
\&\s-1GCC\s0 normally uses a single instruction to load values from the \s-1GOT\s0.
|
12220 |
|
|
While this is relatively efficient, it only works if the \s-1GOT\s0
|
12221 |
|
|
is smaller than about 64k. Anything larger causes the linker
|
12222 |
|
|
to report an error such as:
|
12223 |
|
|
.Sp
|
12224 |
|
|
.Vb 1
|
12225 |
|
|
\& relocation truncated to fit: R_68K_GOT16O foobar
|
12226 |
|
|
.Ve
|
12227 |
|
|
.Sp
|
12228 |
|
|
If this happens, you should recompile your code with \fB\-mxgot\fR.
|
12229 |
|
|
It should then work with very large GOTs. However, code generated with
|
12230 |
|
|
\&\fB\-mxgot\fR is less efficient, since it takes 4 instructions to fetch
|
12231 |
|
|
the value of a global symbol.
|
12232 |
|
|
.Sp
|
12233 |
|
|
Note that some linkers, including newer versions of the \s-1GNU\s0 linker,
|
12234 |
|
|
can create multiple GOTs and sort \s-1GOT\s0 entries. If you have such a linker,
|
12235 |
|
|
you should only need to use \fB\-mxgot\fR when compiling a single
|
12236 |
|
|
object file that accesses more than 8192 \s-1GOT\s0 entries. Very few do.
|
12237 |
|
|
.Sp
|
12238 |
|
|
These options have no effect unless \s-1GCC\s0 is generating
|
12239 |
|
|
position-independent code.
|
12240 |
|
|
.PP
|
12241 |
|
|
\fIM68hc1x Options\fR
|
12242 |
|
|
.IX Subsection "M68hc1x Options"
|
12243 |
|
|
.PP
|
12244 |
|
|
These are the \fB\-m\fR options defined for the 68hc11 and 68hc12
|
12245 |
|
|
microcontrollers. The default values for these options depends on
|
12246 |
|
|
which style of microcontroller was selected when the compiler was configured;
|
12247 |
|
|
the defaults for the most common choices are given below.
|
12248 |
|
|
.IP "\fB\-m6811\fR" 4
|
12249 |
|
|
.IX Item "-m6811"
|
12250 |
|
|
.PD 0
|
12251 |
|
|
.IP "\fB\-m68hc11\fR" 4
|
12252 |
|
|
.IX Item "-m68hc11"
|
12253 |
|
|
.PD
|
12254 |
|
|
Generate output for a 68HC11. This is the default
|
12255 |
|
|
when the compiler is configured for 68HC11\-based systems.
|
12256 |
|
|
.IP "\fB\-m6812\fR" 4
|
12257 |
|
|
.IX Item "-m6812"
|
12258 |
|
|
.PD 0
|
12259 |
|
|
.IP "\fB\-m68hc12\fR" 4
|
12260 |
|
|
.IX Item "-m68hc12"
|
12261 |
|
|
.PD
|
12262 |
|
|
Generate output for a 68HC12. This is the default
|
12263 |
|
|
when the compiler is configured for 68HC12\-based systems.
|
12264 |
|
|
.IP "\fB\-m68S12\fR" 4
|
12265 |
|
|
.IX Item "-m68S12"
|
12266 |
|
|
.PD 0
|
12267 |
|
|
.IP "\fB\-m68hcs12\fR" 4
|
12268 |
|
|
.IX Item "-m68hcs12"
|
12269 |
|
|
.PD
|
12270 |
|
|
Generate output for a 68HCS12.
|
12271 |
|
|
.IP "\fB\-mauto\-incdec\fR" 4
|
12272 |
|
|
.IX Item "-mauto-incdec"
|
12273 |
|
|
Enable the use of 68HC12 pre and post auto-increment and auto-decrement
|
12274 |
|
|
addressing modes.
|
12275 |
|
|
.IP "\fB\-minmax\fR" 4
|
12276 |
|
|
.IX Item "-minmax"
|
12277 |
|
|
.PD 0
|
12278 |
|
|
.IP "\fB\-mnominmax\fR" 4
|
12279 |
|
|
.IX Item "-mnominmax"
|
12280 |
|
|
.PD
|
12281 |
|
|
Enable the use of 68HC12 min and max instructions.
|
12282 |
|
|
.IP "\fB\-mlong\-calls\fR" 4
|
12283 |
|
|
.IX Item "-mlong-calls"
|
12284 |
|
|
.PD 0
|
12285 |
|
|
.IP "\fB\-mno\-long\-calls\fR" 4
|
12286 |
|
|
.IX Item "-mno-long-calls"
|
12287 |
|
|
.PD
|
12288 |
|
|
Treat all calls as being far away (near). If calls are assumed to be
|
12289 |
|
|
far away, the compiler will use the \f(CW\*(C`call\*(C'\fR instruction to
|
12290 |
|
|
call a function and the \f(CW\*(C`rtc\*(C'\fR instruction for returning.
|
12291 |
|
|
.IP "\fB\-mshort\fR" 4
|
12292 |
|
|
.IX Item "-mshort"
|
12293 |
|
|
Consider type \f(CW\*(C`int\*(C'\fR to be 16 bits wide, like \f(CW\*(C`short int\*(C'\fR.
|
12294 |
|
|
.IP "\fB\-msoft\-reg\-count=\fR\fIcount\fR" 4
|
12295 |
|
|
.IX Item "-msoft-reg-count=count"
|
12296 |
|
|
Specify the number of pseudo-soft registers which are used for the
|
12297 |
|
|
code generation. The maximum number is 32. Using more pseudo-soft
|
12298 |
|
|
register may or may not result in better code depending on the program.
|
12299 |
|
|
The default is 4 for 68HC11 and 2 for 68HC12.
|
12300 |
|
|
.PP
|
12301 |
|
|
\fIMCore Options\fR
|
12302 |
|
|
.IX Subsection "MCore Options"
|
12303 |
|
|
.PP
|
12304 |
|
|
These are the \fB\-m\fR options defined for the Motorola M*Core
|
12305 |
|
|
processors.
|
12306 |
|
|
.IP "\fB\-mhardlit\fR" 4
|
12307 |
|
|
.IX Item "-mhardlit"
|
12308 |
|
|
.PD 0
|
12309 |
|
|
.IP "\fB\-mno\-hardlit\fR" 4
|
12310 |
|
|
.IX Item "-mno-hardlit"
|
12311 |
|
|
.PD
|
12312 |
|
|
Inline constants into the code stream if it can be done in two
|
12313 |
|
|
instructions or less.
|
12314 |
|
|
.IP "\fB\-mdiv\fR" 4
|
12315 |
|
|
.IX Item "-mdiv"
|
12316 |
|
|
.PD 0
|
12317 |
|
|
.IP "\fB\-mno\-div\fR" 4
|
12318 |
|
|
.IX Item "-mno-div"
|
12319 |
|
|
.PD
|
12320 |
|
|
Use the divide instruction. (Enabled by default).
|
12321 |
|
|
.IP "\fB\-mrelax\-immediate\fR" 4
|
12322 |
|
|
.IX Item "-mrelax-immediate"
|
12323 |
|
|
.PD 0
|
12324 |
|
|
.IP "\fB\-mno\-relax\-immediate\fR" 4
|
12325 |
|
|
.IX Item "-mno-relax-immediate"
|
12326 |
|
|
.PD
|
12327 |
|
|
Allow arbitrary sized immediates in bit operations.
|
12328 |
|
|
.IP "\fB\-mwide\-bitfields\fR" 4
|
12329 |
|
|
.IX Item "-mwide-bitfields"
|
12330 |
|
|
.PD 0
|
12331 |
|
|
.IP "\fB\-mno\-wide\-bitfields\fR" 4
|
12332 |
|
|
.IX Item "-mno-wide-bitfields"
|
12333 |
|
|
.PD
|
12334 |
|
|
Always treat bit-fields as int-sized.
|
12335 |
|
|
.IP "\fB\-m4byte\-functions\fR" 4
|
12336 |
|
|
.IX Item "-m4byte-functions"
|
12337 |
|
|
.PD 0
|
12338 |
|
|
.IP "\fB\-mno\-4byte\-functions\fR" 4
|
12339 |
|
|
.IX Item "-mno-4byte-functions"
|
12340 |
|
|
.PD
|
12341 |
|
|
Force all functions to be aligned to a four byte boundary.
|
12342 |
|
|
.IP "\fB\-mcallgraph\-data\fR" 4
|
12343 |
|
|
.IX Item "-mcallgraph-data"
|
12344 |
|
|
.PD 0
|
12345 |
|
|
.IP "\fB\-mno\-callgraph\-data\fR" 4
|
12346 |
|
|
.IX Item "-mno-callgraph-data"
|
12347 |
|
|
.PD
|
12348 |
|
|
Emit callgraph information.
|
12349 |
|
|
.IP "\fB\-mslow\-bytes\fR" 4
|
12350 |
|
|
.IX Item "-mslow-bytes"
|
12351 |
|
|
.PD 0
|
12352 |
|
|
.IP "\fB\-mno\-slow\-bytes\fR" 4
|
12353 |
|
|
.IX Item "-mno-slow-bytes"
|
12354 |
|
|
.PD
|
12355 |
|
|
Prefer word access when reading byte quantities.
|
12356 |
|
|
.IP "\fB\-mlittle\-endian\fR" 4
|
12357 |
|
|
.IX Item "-mlittle-endian"
|
12358 |
|
|
.PD 0
|
12359 |
|
|
.IP "\fB\-mbig\-endian\fR" 4
|
12360 |
|
|
.IX Item "-mbig-endian"
|
12361 |
|
|
.PD
|
12362 |
|
|
Generate code for a little endian target.
|
12363 |
|
|
.IP "\fB\-m210\fR" 4
|
12364 |
|
|
.IX Item "-m210"
|
12365 |
|
|
.PD 0
|
12366 |
|
|
.IP "\fB\-m340\fR" 4
|
12367 |
|
|
.IX Item "-m340"
|
12368 |
|
|
.PD
|
12369 |
|
|
Generate code for the 210 processor.
|
12370 |
|
|
.IP "\fB\-mno\-lsim\fR" 4
|
12371 |
|
|
.IX Item "-mno-lsim"
|
12372 |
|
|
Assume that run-time support has been provided and so omit the
|
12373 |
|
|
simulator library (\fIlibsim.a)\fR from the linker command line.
|
12374 |
|
|
.IP "\fB\-mstack\-increment=\fR\fIsize\fR" 4
|
12375 |
|
|
.IX Item "-mstack-increment=size"
|
12376 |
|
|
Set the maximum amount for a single stack increment operation. Large
|
12377 |
|
|
values can increase the speed of programs which contain functions
|
12378 |
|
|
that need a large amount of stack space, but they can also trigger a
|
12379 |
|
|
segmentation fault if the stack is extended too much. The default
|
12380 |
|
|
value is 0x1000.
|
12381 |
|
|
.PP
|
12382 |
|
|
\fIMeP Options\fR
|
12383 |
|
|
.IX Subsection "MeP Options"
|
12384 |
|
|
.IP "\fB\-mabsdiff\fR" 4
|
12385 |
|
|
.IX Item "-mabsdiff"
|
12386 |
|
|
Enables the \f(CW\*(C`abs\*(C'\fR instruction, which is the absolute difference
|
12387 |
|
|
between two registers.
|
12388 |
|
|
.IP "\fB\-mall\-opts\fR" 4
|
12389 |
|
|
.IX Item "-mall-opts"
|
12390 |
|
|
Enables all the optional instructions \- average, multiply, divide, bit
|
12391 |
|
|
operations, leading zero, absolute difference, min/max, clip, and
|
12392 |
|
|
saturation.
|
12393 |
|
|
.IP "\fB\-maverage\fR" 4
|
12394 |
|
|
.IX Item "-maverage"
|
12395 |
|
|
Enables the \f(CW\*(C`ave\*(C'\fR instruction, which computes the average of two
|
12396 |
|
|
registers.
|
12397 |
|
|
.IP "\fB\-mbased=\fR\fIn\fR" 4
|
12398 |
|
|
.IX Item "-mbased=n"
|
12399 |
|
|
Variables of size \fIn\fR bytes or smaller will be placed in the
|
12400 |
|
|
\&\f(CW\*(C`.based\*(C'\fR section by default. Based variables use the \f(CW$tp\fR
|
12401 |
|
|
register as a base register, and there is a 128 byte limit to the
|
12402 |
|
|
\&\f(CW\*(C`.based\*(C'\fR section.
|
12403 |
|
|
.IP "\fB\-mbitops\fR" 4
|
12404 |
|
|
.IX Item "-mbitops"
|
12405 |
|
|
Enables the bit operation instructions \- bit test (\f(CW\*(C`btstm\*(C'\fR), set
|
12406 |
|
|
(\f(CW\*(C`bsetm\*(C'\fR), clear (\f(CW\*(C`bclrm\*(C'\fR), invert (\f(CW\*(C`bnotm\*(C'\fR), and
|
12407 |
|
|
test-and-set (\f(CW\*(C`tas\*(C'\fR).
|
12408 |
|
|
.IP "\fB\-mc=\fR\fIname\fR" 4
|
12409 |
|
|
.IX Item "-mc=name"
|
12410 |
|
|
Selects which section constant data will be placed in. \fIname\fR may
|
12411 |
|
|
be \f(CW\*(C`tiny\*(C'\fR, \f(CW\*(C`near\*(C'\fR, or \f(CW\*(C`far\*(C'\fR.
|
12412 |
|
|
.IP "\fB\-mclip\fR" 4
|
12413 |
|
|
.IX Item "-mclip"
|
12414 |
|
|
Enables the \f(CW\*(C`clip\*(C'\fR instruction. Note that \f(CW\*(C`\-mclip\*(C'\fR is not
|
12415 |
|
|
useful unless you also provide \f(CW\*(C`\-mminmax\*(C'\fR.
|
12416 |
|
|
.IP "\fB\-mconfig=\fR\fIname\fR" 4
|
12417 |
|
|
.IX Item "-mconfig=name"
|
12418 |
|
|
Selects one of the build-in core configurations. Each MeP chip has
|
12419 |
|
|
one or more modules in it; each module has a core \s-1CPU\s0 and a variety of
|
12420 |
|
|
coprocessors, optional instructions, and peripherals. The
|
12421 |
|
|
\&\f(CW\*(C`MeP\-Integrator\*(C'\fR tool, not part of \s-1GCC\s0, provides these
|
12422 |
|
|
configurations through this option; using this option is the same as
|
12423 |
|
|
using all the corresponding command line options. The default
|
12424 |
|
|
configuration is \f(CW\*(C`default\*(C'\fR.
|
12425 |
|
|
.IP "\fB\-mcop\fR" 4
|
12426 |
|
|
.IX Item "-mcop"
|
12427 |
|
|
Enables the coprocessor instructions. By default, this is a 32\-bit
|
12428 |
|
|
coprocessor. Note that the coprocessor is normally enabled via the
|
12429 |
|
|
\&\f(CW\*(C`\-mconfig=\*(C'\fR option.
|
12430 |
|
|
.IP "\fB\-mcop32\fR" 4
|
12431 |
|
|
.IX Item "-mcop32"
|
12432 |
|
|
Enables the 32\-bit coprocessor's instructions.
|
12433 |
|
|
.IP "\fB\-mcop64\fR" 4
|
12434 |
|
|
.IX Item "-mcop64"
|
12435 |
|
|
Enables the 64\-bit coprocessor's instructions.
|
12436 |
|
|
.IP "\fB\-mivc2\fR" 4
|
12437 |
|
|
.IX Item "-mivc2"
|
12438 |
|
|
Enables \s-1IVC2\s0 scheduling. \s-1IVC2\s0 is a 64\-bit \s-1VLIW\s0 coprocessor.
|
12439 |
|
|
.IP "\fB\-mdc\fR" 4
|
12440 |
|
|
.IX Item "-mdc"
|
12441 |
|
|
Causes constant variables to be placed in the \f(CW\*(C`.near\*(C'\fR section.
|
12442 |
|
|
.IP "\fB\-mdiv\fR" 4
|
12443 |
|
|
.IX Item "-mdiv"
|
12444 |
|
|
Enables the \f(CW\*(C`div\*(C'\fR and \f(CW\*(C`divu\*(C'\fR instructions.
|
12445 |
|
|
.IP "\fB\-meb\fR" 4
|
12446 |
|
|
.IX Item "-meb"
|
12447 |
|
|
Generate big-endian code.
|
12448 |
|
|
.IP "\fB\-mel\fR" 4
|
12449 |
|
|
.IX Item "-mel"
|
12450 |
|
|
Generate little-endian code.
|
12451 |
|
|
.IP "\fB\-mio\-volatile\fR" 4
|
12452 |
|
|
.IX Item "-mio-volatile"
|
12453 |
|
|
Tells the compiler that any variable marked with the \f(CW\*(C`io\*(C'\fR
|
12454 |
|
|
attribute is to be considered volatile.
|
12455 |
|
|
.IP "\fB\-ml\fR" 4
|
12456 |
|
|
.IX Item "-ml"
|
12457 |
|
|
Causes variables to be assigned to the \f(CW\*(C`.far\*(C'\fR section by default.
|
12458 |
|
|
.IP "\fB\-mleadz\fR" 4
|
12459 |
|
|
.IX Item "-mleadz"
|
12460 |
|
|
Enables the \f(CW\*(C`leadz\*(C'\fR (leading zero) instruction.
|
12461 |
|
|
.IP "\fB\-mm\fR" 4
|
12462 |
|
|
.IX Item "-mm"
|
12463 |
|
|
Causes variables to be assigned to the \f(CW\*(C`.near\*(C'\fR section by default.
|
12464 |
|
|
.IP "\fB\-mminmax\fR" 4
|
12465 |
|
|
.IX Item "-mminmax"
|
12466 |
|
|
Enables the \f(CW\*(C`min\*(C'\fR and \f(CW\*(C`max\*(C'\fR instructions.
|
12467 |
|
|
.IP "\fB\-mmult\fR" 4
|
12468 |
|
|
.IX Item "-mmult"
|
12469 |
|
|
Enables the multiplication and multiply-accumulate instructions.
|
12470 |
|
|
.IP "\fB\-mno\-opts\fR" 4
|
12471 |
|
|
.IX Item "-mno-opts"
|
12472 |
|
|
Disables all the optional instructions enabled by \f(CW\*(C`\-mall\-opts\*(C'\fR.
|
12473 |
|
|
.IP "\fB\-mrepeat\fR" 4
|
12474 |
|
|
.IX Item "-mrepeat"
|
12475 |
|
|
Enables the \f(CW\*(C`repeat\*(C'\fR and \f(CW\*(C`erepeat\*(C'\fR instructions, used for
|
12476 |
|
|
low-overhead looping.
|
12477 |
|
|
.IP "\fB\-ms\fR" 4
|
12478 |
|
|
.IX Item "-ms"
|
12479 |
|
|
Causes all variables to default to the \f(CW\*(C`.tiny\*(C'\fR section. Note
|
12480 |
|
|
that there is a 65536 byte limit to this section. Accesses to these
|
12481 |
|
|
variables use the \f(CW%gp\fR base register.
|
12482 |
|
|
.IP "\fB\-msatur\fR" 4
|
12483 |
|
|
.IX Item "-msatur"
|
12484 |
|
|
Enables the saturation instructions. Note that the compiler does not
|
12485 |
|
|
currently generate these itself, but this option is included for
|
12486 |
|
|
compatibility with other tools, like \f(CW\*(C`as\*(C'\fR.
|
12487 |
|
|
.IP "\fB\-msdram\fR" 4
|
12488 |
|
|
.IX Item "-msdram"
|
12489 |
|
|
Link the SDRAM-based runtime instead of the default ROM-based runtime.
|
12490 |
|
|
.IP "\fB\-msim\fR" 4
|
12491 |
|
|
.IX Item "-msim"
|
12492 |
|
|
Link the simulator runtime libraries.
|
12493 |
|
|
.IP "\fB\-msimnovec\fR" 4
|
12494 |
|
|
.IX Item "-msimnovec"
|
12495 |
|
|
Link the simulator runtime libraries, excluding built-in support
|
12496 |
|
|
for reset and exception vectors and tables.
|
12497 |
|
|
.IP "\fB\-mtf\fR" 4
|
12498 |
|
|
.IX Item "-mtf"
|
12499 |
|
|
Causes all functions to default to the \f(CW\*(C`.far\*(C'\fR section. Without
|
12500 |
|
|
this option, functions default to the \f(CW\*(C`.near\*(C'\fR section.
|
12501 |
|
|
.IP "\fB\-mtiny=\fR\fIn\fR" 4
|
12502 |
|
|
.IX Item "-mtiny=n"
|
12503 |
|
|
Variables that are \fIn\fR bytes or smaller will be allocated to the
|
12504 |
|
|
\&\f(CW\*(C`.tiny\*(C'\fR section. These variables use the \f(CW$gp\fR base
|
12505 |
|
|
register. The default for this option is 4, but note that there's a
|
12506 |
|
|
65536 byte limit to the \f(CW\*(C`.tiny\*(C'\fR section.
|
12507 |
|
|
.PP
|
12508 |
|
|
\fI\s-1MIPS\s0 Options\fR
|
12509 |
|
|
.IX Subsection "MIPS Options"
|
12510 |
|
|
.IP "\fB\-EB\fR" 4
|
12511 |
|
|
.IX Item "-EB"
|
12512 |
|
|
Generate big-endian code.
|
12513 |
|
|
.IP "\fB\-EL\fR" 4
|
12514 |
|
|
.IX Item "-EL"
|
12515 |
|
|
Generate little-endian code. This is the default for \fBmips*el\-*\-*\fR
|
12516 |
|
|
configurations.
|
12517 |
|
|
.IP "\fB\-march=\fR\fIarch\fR" 4
|
12518 |
|
|
.IX Item "-march=arch"
|
12519 |
|
|
Generate code that will run on \fIarch\fR, which can be the name of a
|
12520 |
|
|
generic \s-1MIPS\s0 \s-1ISA\s0, or the name of a particular processor.
|
12521 |
|
|
The \s-1ISA\s0 names are:
|
12522 |
|
|
\&\fBmips1\fR, \fBmips2\fR, \fBmips3\fR, \fBmips4\fR,
|
12523 |
|
|
\&\fBmips32\fR, \fBmips32r2\fR, \fBmips64\fR and \fBmips64r2\fR.
|
12524 |
|
|
The processor names are:
|
12525 |
|
|
\&\fB4kc\fR, \fB4km\fR, \fB4kp\fR, \fB4ksc\fR,
|
12526 |
|
|
\&\fB4kec\fR, \fB4kem\fR, \fB4kep\fR, \fB4ksd\fR,
|
12527 |
|
|
\&\fB5kc\fR, \fB5kf\fR,
|
12528 |
|
|
\&\fB20kc\fR,
|
12529 |
|
|
\&\fB24kc\fR, \fB24kf2_1\fR, \fB24kf1_1\fR,
|
12530 |
|
|
\&\fB24kec\fR, \fB24kef2_1\fR, \fB24kef1_1\fR,
|
12531 |
|
|
\&\fB34kc\fR, \fB34kf2_1\fR, \fB34kf1_1\fR,
|
12532 |
|
|
\&\fB74kc\fR, \fB74kf2_1\fR, \fB74kf1_1\fR, \fB74kf3_2\fR,
|
12533 |
|
|
\&\fB1004kc\fR, \fB1004kf2_1\fR, \fB1004kf1_1\fR,
|
12534 |
|
|
\&\fBloongson2e\fR, \fBloongson2f\fR,
|
12535 |
|
|
\&\fBm4k\fR,
|
12536 |
|
|
\&\fBocteon\fR,
|
12537 |
|
|
\&\fBorion\fR,
|
12538 |
|
|
\&\fBr2000\fR, \fBr3000\fR, \fBr3900\fR, \fBr4000\fR, \fBr4400\fR,
|
12539 |
|
|
\&\fBr4600\fR, \fBr4650\fR, \fBr6000\fR, \fBr8000\fR,
|
12540 |
|
|
\&\fBrm7000\fR, \fBrm9000\fR,
|
12541 |
|
|
\&\fBr10000\fR, \fBr12000\fR, \fBr14000\fR, \fBr16000\fR,
|
12542 |
|
|
\&\fBsb1\fR,
|
12543 |
|
|
\&\fBsr71000\fR,
|
12544 |
|
|
\&\fBvr4100\fR, \fBvr4111\fR, \fBvr4120\fR, \fBvr4130\fR, \fBvr4300\fR,
|
12545 |
|
|
\&\fBvr5000\fR, \fBvr5400\fR, \fBvr5500\fR
|
12546 |
|
|
and \fBxlr\fR.
|
12547 |
|
|
The special value \fBfrom-abi\fR selects the
|
12548 |
|
|
most compatible architecture for the selected \s-1ABI\s0 (that is,
|
12549 |
|
|
\&\fBmips1\fR for 32\-bit ABIs and \fBmips3\fR for 64\-bit ABIs).
|
12550 |
|
|
.Sp
|
12551 |
|
|
Native Linux/GNU toolchains also support the value \fBnative\fR,
|
12552 |
|
|
which selects the best architecture option for the host processor.
|
12553 |
|
|
\&\fB\-march=native\fR has no effect if \s-1GCC\s0 does not recognize
|
12554 |
|
|
the processor.
|
12555 |
|
|
.Sp
|
12556 |
|
|
In processor names, a final \fB000\fR can be abbreviated as \fBk\fR
|
12557 |
|
|
(for example, \fB\-march=r2k\fR). Prefixes are optional, and
|
12558 |
|
|
\&\fBvr\fR may be written \fBr\fR.
|
12559 |
|
|
.Sp
|
12560 |
|
|
Names of the form \fIn\fR\fBf2_1\fR refer to processors with
|
12561 |
|
|
FPUs clocked at half the rate of the core, names of the form
|
12562 |
|
|
\&\fIn\fR\fBf1_1\fR refer to processors with FPUs clocked at the same
|
12563 |
|
|
rate as the core, and names of the form \fIn\fR\fBf3_2\fR refer to
|
12564 |
|
|
processors with FPUs clocked a ratio of 3:2 with respect to the core.
|
12565 |
|
|
For compatibility reasons, \fIn\fR\fBf\fR is accepted as a synonym
|
12566 |
|
|
for \fIn\fR\fBf2_1\fR while \fIn\fR\fBx\fR and \fIb\fR\fBfx\fR are
|
12567 |
|
|
accepted as synonyms for \fIn\fR\fBf1_1\fR.
|
12568 |
|
|
.Sp
|
12569 |
|
|
\&\s-1GCC\s0 defines two macros based on the value of this option. The first
|
12570 |
|
|
is \fB_MIPS_ARCH\fR, which gives the name of target architecture, as
|
12571 |
|
|
a string. The second has the form \fB_MIPS_ARCH_\fR\fIfoo\fR,
|
12572 |
|
|
where \fIfoo\fR is the capitalized value of \fB_MIPS_ARCH\fR.
|
12573 |
|
|
For example, \fB\-march=r2000\fR will set \fB_MIPS_ARCH\fR
|
12574 |
|
|
to \fB\*(L"r2000\*(R"\fR and define the macro \fB_MIPS_ARCH_R2000\fR.
|
12575 |
|
|
.Sp
|
12576 |
|
|
Note that the \fB_MIPS_ARCH\fR macro uses the processor names given
|
12577 |
|
|
above. In other words, it will have the full prefix and will not
|
12578 |
|
|
abbreviate \fB000\fR as \fBk\fR. In the case of \fBfrom-abi\fR,
|
12579 |
|
|
the macro names the resolved architecture (either \fB\*(L"mips1\*(R"\fR or
|
12580 |
|
|
\&\fB\*(L"mips3\*(R"\fR). It names the default architecture when no
|
12581 |
|
|
\&\fB\-march\fR option is given.
|
12582 |
|
|
.IP "\fB\-mtune=\fR\fIarch\fR" 4
|
12583 |
|
|
.IX Item "-mtune=arch"
|
12584 |
|
|
Optimize for \fIarch\fR. Among other things, this option controls
|
12585 |
|
|
the way instructions are scheduled, and the perceived cost of arithmetic
|
12586 |
|
|
operations. The list of \fIarch\fR values is the same as for
|
12587 |
|
|
\&\fB\-march\fR.
|
12588 |
|
|
.Sp
|
12589 |
|
|
When this option is not used, \s-1GCC\s0 will optimize for the processor
|
12590 |
|
|
specified by \fB\-march\fR. By using \fB\-march\fR and
|
12591 |
|
|
\&\fB\-mtune\fR together, it is possible to generate code that will
|
12592 |
|
|
run on a family of processors, but optimize the code for one
|
12593 |
|
|
particular member of that family.
|
12594 |
|
|
.Sp
|
12595 |
|
|
\&\fB\-mtune\fR defines the macros \fB_MIPS_TUNE\fR and
|
12596 |
|
|
\&\fB_MIPS_TUNE_\fR\fIfoo\fR, which work in the same way as the
|
12597 |
|
|
\&\fB\-march\fR ones described above.
|
12598 |
|
|
.IP "\fB\-mips1\fR" 4
|
12599 |
|
|
.IX Item "-mips1"
|
12600 |
|
|
Equivalent to \fB\-march=mips1\fR.
|
12601 |
|
|
.IP "\fB\-mips2\fR" 4
|
12602 |
|
|
.IX Item "-mips2"
|
12603 |
|
|
Equivalent to \fB\-march=mips2\fR.
|
12604 |
|
|
.IP "\fB\-mips3\fR" 4
|
12605 |
|
|
.IX Item "-mips3"
|
12606 |
|
|
Equivalent to \fB\-march=mips3\fR.
|
12607 |
|
|
.IP "\fB\-mips4\fR" 4
|
12608 |
|
|
.IX Item "-mips4"
|
12609 |
|
|
Equivalent to \fB\-march=mips4\fR.
|
12610 |
|
|
.IP "\fB\-mips32\fR" 4
|
12611 |
|
|
.IX Item "-mips32"
|
12612 |
|
|
Equivalent to \fB\-march=mips32\fR.
|
12613 |
|
|
.IP "\fB\-mips32r2\fR" 4
|
12614 |
|
|
.IX Item "-mips32r2"
|
12615 |
|
|
Equivalent to \fB\-march=mips32r2\fR.
|
12616 |
|
|
.IP "\fB\-mips64\fR" 4
|
12617 |
|
|
.IX Item "-mips64"
|
12618 |
|
|
Equivalent to \fB\-march=mips64\fR.
|
12619 |
|
|
.IP "\fB\-mips64r2\fR" 4
|
12620 |
|
|
.IX Item "-mips64r2"
|
12621 |
|
|
Equivalent to \fB\-march=mips64r2\fR.
|
12622 |
|
|
.IP "\fB\-mips16\fR" 4
|
12623 |
|
|
.IX Item "-mips16"
|
12624 |
|
|
.PD 0
|
12625 |
|
|
.IP "\fB\-mno\-mips16\fR" 4
|
12626 |
|
|
.IX Item "-mno-mips16"
|
12627 |
|
|
.PD
|
12628 |
|
|
Generate (do not generate) \s-1MIPS16\s0 code. If \s-1GCC\s0 is targetting a
|
12629 |
|
|
\&\s-1MIPS32\s0 or \s-1MIPS64\s0 architecture, it will make use of the MIPS16e \s-1ASE\s0.
|
12630 |
|
|
.Sp
|
12631 |
|
|
\&\s-1MIPS16\s0 code generation can also be controlled on a per-function basis
|
12632 |
|
|
by means of \f(CW\*(C`mips16\*(C'\fR and \f(CW\*(C`nomips16\*(C'\fR attributes.
|
12633 |
|
|
.IP "\fB\-mflip\-mips16\fR" 4
|
12634 |
|
|
.IX Item "-mflip-mips16"
|
12635 |
|
|
Generate \s-1MIPS16\s0 code on alternating functions. This option is provided
|
12636 |
|
|
for regression testing of mixed MIPS16/non\-MIPS16 code generation, and is
|
12637 |
|
|
not intended for ordinary use in compiling user code.
|
12638 |
|
|
.IP "\fB\-minterlink\-mips16\fR" 4
|
12639 |
|
|
.IX Item "-minterlink-mips16"
|
12640 |
|
|
.PD 0
|
12641 |
|
|
.IP "\fB\-mno\-interlink\-mips16\fR" 4
|
12642 |
|
|
.IX Item "-mno-interlink-mips16"
|
12643 |
|
|
.PD
|
12644 |
|
|
Require (do not require) that non\-MIPS16 code be link-compatible with
|
12645 |
|
|
\&\s-1MIPS16\s0 code.
|
12646 |
|
|
.Sp
|
12647 |
|
|
For example, non\-MIPS16 code cannot jump directly to \s-1MIPS16\s0 code;
|
12648 |
|
|
it must either use a call or an indirect jump. \fB\-minterlink\-mips16\fR
|
12649 |
|
|
therefore disables direct jumps unless \s-1GCC\s0 knows that the target of the
|
12650 |
|
|
jump is not \s-1MIPS16\s0.
|
12651 |
|
|
.IP "\fB\-mabi=32\fR" 4
|
12652 |
|
|
.IX Item "-mabi=32"
|
12653 |
|
|
.PD 0
|
12654 |
|
|
.IP "\fB\-mabi=o64\fR" 4
|
12655 |
|
|
.IX Item "-mabi=o64"
|
12656 |
|
|
.IP "\fB\-mabi=n32\fR" 4
|
12657 |
|
|
.IX Item "-mabi=n32"
|
12658 |
|
|
.IP "\fB\-mabi=64\fR" 4
|
12659 |
|
|
.IX Item "-mabi=64"
|
12660 |
|
|
.IP "\fB\-mabi=eabi\fR" 4
|
12661 |
|
|
.IX Item "-mabi=eabi"
|
12662 |
|
|
.PD
|
12663 |
|
|
Generate code for the given \s-1ABI\s0.
|
12664 |
|
|
.Sp
|
12665 |
|
|
Note that the \s-1EABI\s0 has a 32\-bit and a 64\-bit variant. \s-1GCC\s0 normally
|
12666 |
|
|
generates 64\-bit code when you select a 64\-bit architecture, but you
|
12667 |
|
|
can use \fB\-mgp32\fR to get 32\-bit code instead.
|
12668 |
|
|
.Sp
|
12669 |
|
|
For information about the O64 \s-1ABI\s0, see
|
12670 |
|
|
<\fBhttp://gcc.gnu.org/projects/mipso64\-abi.html\fR>.
|
12671 |
|
|
.Sp
|
12672 |
|
|
\&\s-1GCC\s0 supports a variant of the o32 \s-1ABI\s0 in which floating-point registers
|
12673 |
|
|
are 64 rather than 32 bits wide. You can select this combination with
|
12674 |
|
|
\&\fB\-mabi=32\fR \fB\-mfp64\fR. This \s-1ABI\s0 relies on the \fBmthc1\fR
|
12675 |
|
|
and \fBmfhc1\fR instructions and is therefore only supported for
|
12676 |
|
|
\&\s-1MIPS32R2\s0 processors.
|
12677 |
|
|
.Sp
|
12678 |
|
|
The register assignments for arguments and return values remain the
|
12679 |
|
|
same, but each scalar value is passed in a single 64\-bit register
|
12680 |
|
|
rather than a pair of 32\-bit registers. For example, scalar
|
12681 |
|
|
floating-point values are returned in \fB\f(CB$f0\fB\fR only, not a
|
12682 |
|
|
\&\fB\f(CB$f0\fB\fR/\fB\f(CB$f1\fB\fR pair. The set of call-saved registers also
|
12683 |
|
|
remains the same, but all 64 bits are saved.
|
12684 |
|
|
.IP "\fB\-mabicalls\fR" 4
|
12685 |
|
|
.IX Item "-mabicalls"
|
12686 |
|
|
.PD 0
|
12687 |
|
|
.IP "\fB\-mno\-abicalls\fR" 4
|
12688 |
|
|
.IX Item "-mno-abicalls"
|
12689 |
|
|
.PD
|
12690 |
|
|
Generate (do not generate) code that is suitable for SVR4\-style
|
12691 |
|
|
dynamic objects. \fB\-mabicalls\fR is the default for SVR4\-based
|
12692 |
|
|
systems.
|
12693 |
|
|
.IP "\fB\-mshared\fR" 4
|
12694 |
|
|
.IX Item "-mshared"
|
12695 |
|
|
.PD 0
|
12696 |
|
|
.IP "\fB\-mno\-shared\fR" 4
|
12697 |
|
|
.IX Item "-mno-shared"
|
12698 |
|
|
.PD
|
12699 |
|
|
Generate (do not generate) code that is fully position-independent,
|
12700 |
|
|
and that can therefore be linked into shared libraries. This option
|
12701 |
|
|
only affects \fB\-mabicalls\fR.
|
12702 |
|
|
.Sp
|
12703 |
|
|
All \fB\-mabicalls\fR code has traditionally been position-independent,
|
12704 |
|
|
regardless of options like \fB\-fPIC\fR and \fB\-fpic\fR. However,
|
12705 |
|
|
as an extension, the \s-1GNU\s0 toolchain allows executables to use absolute
|
12706 |
|
|
accesses for locally-binding symbols. It can also use shorter \s-1GP\s0
|
12707 |
|
|
initialization sequences and generate direct calls to locally-defined
|
12708 |
|
|
functions. This mode is selected by \fB\-mno\-shared\fR.
|
12709 |
|
|
.Sp
|
12710 |
|
|
\&\fB\-mno\-shared\fR depends on binutils 2.16 or higher and generates
|
12711 |
|
|
objects that can only be linked by the \s-1GNU\s0 linker. However, the option
|
12712 |
|
|
does not affect the \s-1ABI\s0 of the final executable; it only affects the \s-1ABI\s0
|
12713 |
|
|
of relocatable objects. Using \fB\-mno\-shared\fR will generally make
|
12714 |
|
|
executables both smaller and quicker.
|
12715 |
|
|
.Sp
|
12716 |
|
|
\&\fB\-mshared\fR is the default.
|
12717 |
|
|
.IP "\fB\-mplt\fR" 4
|
12718 |
|
|
.IX Item "-mplt"
|
12719 |
|
|
.PD 0
|
12720 |
|
|
.IP "\fB\-mno\-plt\fR" 4
|
12721 |
|
|
.IX Item "-mno-plt"
|
12722 |
|
|
.PD
|
12723 |
|
|
Assume (do not assume) that the static and dynamic linkers
|
12724 |
|
|
support PLTs and copy relocations. This option only affects
|
12725 |
|
|
\&\fB\-mno\-shared \-mabicalls\fR. For the n64 \s-1ABI\s0, this option
|
12726 |
|
|
has no effect without \fB\-msym32\fR.
|
12727 |
|
|
.Sp
|
12728 |
|
|
You can make \fB\-mplt\fR the default by configuring
|
12729 |
|
|
\&\s-1GCC\s0 with \fB\-\-with\-mips\-plt\fR. The default is
|
12730 |
|
|
\&\fB\-mno\-plt\fR otherwise.
|
12731 |
|
|
.IP "\fB\-mxgot\fR" 4
|
12732 |
|
|
.IX Item "-mxgot"
|
12733 |
|
|
.PD 0
|
12734 |
|
|
.IP "\fB\-mno\-xgot\fR" 4
|
12735 |
|
|
.IX Item "-mno-xgot"
|
12736 |
|
|
.PD
|
12737 |
|
|
Lift (do not lift) the usual restrictions on the size of the global
|
12738 |
|
|
offset table.
|
12739 |
|
|
.Sp
|
12740 |
|
|
\&\s-1GCC\s0 normally uses a single instruction to load values from the \s-1GOT\s0.
|
12741 |
|
|
While this is relatively efficient, it will only work if the \s-1GOT\s0
|
12742 |
|
|
is smaller than about 64k. Anything larger will cause the linker
|
12743 |
|
|
to report an error such as:
|
12744 |
|
|
.Sp
|
12745 |
|
|
.Vb 1
|
12746 |
|
|
\& relocation truncated to fit: R_MIPS_GOT16 foobar
|
12747 |
|
|
.Ve
|
12748 |
|
|
.Sp
|
12749 |
|
|
If this happens, you should recompile your code with \fB\-mxgot\fR.
|
12750 |
|
|
It should then work with very large GOTs, although it will also be
|
12751 |
|
|
less efficient, since it will take three instructions to fetch the
|
12752 |
|
|
value of a global symbol.
|
12753 |
|
|
.Sp
|
12754 |
|
|
Note that some linkers can create multiple GOTs. If you have such a
|
12755 |
|
|
linker, you should only need to use \fB\-mxgot\fR when a single object
|
12756 |
|
|
file accesses more than 64k's worth of \s-1GOT\s0 entries. Very few do.
|
12757 |
|
|
.Sp
|
12758 |
|
|
These options have no effect unless \s-1GCC\s0 is generating position
|
12759 |
|
|
independent code.
|
12760 |
|
|
.IP "\fB\-mgp32\fR" 4
|
12761 |
|
|
.IX Item "-mgp32"
|
12762 |
|
|
Assume that general-purpose registers are 32 bits wide.
|
12763 |
|
|
.IP "\fB\-mgp64\fR" 4
|
12764 |
|
|
.IX Item "-mgp64"
|
12765 |
|
|
Assume that general-purpose registers are 64 bits wide.
|
12766 |
|
|
.IP "\fB\-mfp32\fR" 4
|
12767 |
|
|
.IX Item "-mfp32"
|
12768 |
|
|
Assume that floating-point registers are 32 bits wide.
|
12769 |
|
|
.IP "\fB\-mfp64\fR" 4
|
12770 |
|
|
.IX Item "-mfp64"
|
12771 |
|
|
Assume that floating-point registers are 64 bits wide.
|
12772 |
|
|
.IP "\fB\-mhard\-float\fR" 4
|
12773 |
|
|
.IX Item "-mhard-float"
|
12774 |
|
|
Use floating-point coprocessor instructions.
|
12775 |
|
|
.IP "\fB\-msoft\-float\fR" 4
|
12776 |
|
|
.IX Item "-msoft-float"
|
12777 |
|
|
Do not use floating-point coprocessor instructions. Implement
|
12778 |
|
|
floating-point calculations using library calls instead.
|
12779 |
|
|
.IP "\fB\-msingle\-float\fR" 4
|
12780 |
|
|
.IX Item "-msingle-float"
|
12781 |
|
|
Assume that the floating-point coprocessor only supports single-precision
|
12782 |
|
|
operations.
|
12783 |
|
|
.IP "\fB\-mdouble\-float\fR" 4
|
12784 |
|
|
.IX Item "-mdouble-float"
|
12785 |
|
|
Assume that the floating-point coprocessor supports double-precision
|
12786 |
|
|
operations. This is the default.
|
12787 |
|
|
.IP "\fB\-mllsc\fR" 4
|
12788 |
|
|
.IX Item "-mllsc"
|
12789 |
|
|
.PD 0
|
12790 |
|
|
.IP "\fB\-mno\-llsc\fR" 4
|
12791 |
|
|
.IX Item "-mno-llsc"
|
12792 |
|
|
.PD
|
12793 |
|
|
Use (do not use) \fBll\fR, \fBsc\fR, and \fBsync\fR instructions to
|
12794 |
|
|
implement atomic memory built-in functions. When neither option is
|
12795 |
|
|
specified, \s-1GCC\s0 will use the instructions if the target architecture
|
12796 |
|
|
supports them.
|
12797 |
|
|
.Sp
|
12798 |
|
|
\&\fB\-mllsc\fR is useful if the runtime environment can emulate the
|
12799 |
|
|
instructions and \fB\-mno\-llsc\fR can be useful when compiling for
|
12800 |
|
|
nonstandard ISAs. You can make either option the default by
|
12801 |
|
|
configuring \s-1GCC\s0 with \fB\-\-with\-llsc\fR and \fB\-\-without\-llsc\fR
|
12802 |
|
|
respectively. \fB\-\-with\-llsc\fR is the default for some
|
12803 |
|
|
configurations; see the installation documentation for details.
|
12804 |
|
|
.IP "\fB\-mdsp\fR" 4
|
12805 |
|
|
.IX Item "-mdsp"
|
12806 |
|
|
.PD 0
|
12807 |
|
|
.IP "\fB\-mno\-dsp\fR" 4
|
12808 |
|
|
.IX Item "-mno-dsp"
|
12809 |
|
|
.PD
|
12810 |
|
|
Use (do not use) revision 1 of the \s-1MIPS\s0 \s-1DSP\s0 \s-1ASE\s0.
|
12811 |
|
|
This option defines the
|
12812 |
|
|
preprocessor macro \fB_\|_mips_dsp\fR. It also defines
|
12813 |
|
|
\&\fB_\|_mips_dsp_rev\fR to 1.
|
12814 |
|
|
.IP "\fB\-mdspr2\fR" 4
|
12815 |
|
|
.IX Item "-mdspr2"
|
12816 |
|
|
.PD 0
|
12817 |
|
|
.IP "\fB\-mno\-dspr2\fR" 4
|
12818 |
|
|
.IX Item "-mno-dspr2"
|
12819 |
|
|
.PD
|
12820 |
|
|
Use (do not use) revision 2 of the \s-1MIPS\s0 \s-1DSP\s0 \s-1ASE\s0.
|
12821 |
|
|
This option defines the
|
12822 |
|
|
preprocessor macros \fB_\|_mips_dsp\fR and \fB_\|_mips_dspr2\fR.
|
12823 |
|
|
It also defines \fB_\|_mips_dsp_rev\fR to 2.
|
12824 |
|
|
.IP "\fB\-msmartmips\fR" 4
|
12825 |
|
|
.IX Item "-msmartmips"
|
12826 |
|
|
.PD 0
|
12827 |
|
|
.IP "\fB\-mno\-smartmips\fR" 4
|
12828 |
|
|
.IX Item "-mno-smartmips"
|
12829 |
|
|
.PD
|
12830 |
|
|
Use (do not use) the \s-1MIPS\s0 SmartMIPS \s-1ASE\s0.
|
12831 |
|
|
.IP "\fB\-mpaired\-single\fR" 4
|
12832 |
|
|
.IX Item "-mpaired-single"
|
12833 |
|
|
.PD 0
|
12834 |
|
|
.IP "\fB\-mno\-paired\-single\fR" 4
|
12835 |
|
|
.IX Item "-mno-paired-single"
|
12836 |
|
|
.PD
|
12837 |
|
|
Use (do not use) paired-single floating-point instructions.
|
12838 |
|
|
This option requires
|
12839 |
|
|
hardware floating-point support to be enabled.
|
12840 |
|
|
.IP "\fB\-mdmx\fR" 4
|
12841 |
|
|
.IX Item "-mdmx"
|
12842 |
|
|
.PD 0
|
12843 |
|
|
.IP "\fB\-mno\-mdmx\fR" 4
|
12844 |
|
|
.IX Item "-mno-mdmx"
|
12845 |
|
|
.PD
|
12846 |
|
|
Use (do not use) \s-1MIPS\s0 Digital Media Extension instructions.
|
12847 |
|
|
This option can only be used when generating 64\-bit code and requires
|
12848 |
|
|
hardware floating-point support to be enabled.
|
12849 |
|
|
.IP "\fB\-mips3d\fR" 4
|
12850 |
|
|
.IX Item "-mips3d"
|
12851 |
|
|
.PD 0
|
12852 |
|
|
.IP "\fB\-mno\-mips3d\fR" 4
|
12853 |
|
|
.IX Item "-mno-mips3d"
|
12854 |
|
|
.PD
|
12855 |
|
|
Use (do not use) the \s-1MIPS\-3D\s0 \s-1ASE\s0.
|
12856 |
|
|
The option \fB\-mips3d\fR implies \fB\-mpaired\-single\fR.
|
12857 |
|
|
.IP "\fB\-mmt\fR" 4
|
12858 |
|
|
.IX Item "-mmt"
|
12859 |
|
|
.PD 0
|
12860 |
|
|
.IP "\fB\-mno\-mt\fR" 4
|
12861 |
|
|
.IX Item "-mno-mt"
|
12862 |
|
|
.PD
|
12863 |
|
|
Use (do not use) \s-1MT\s0 Multithreading instructions.
|
12864 |
|
|
.IP "\fB\-mlong64\fR" 4
|
12865 |
|
|
.IX Item "-mlong64"
|
12866 |
|
|
Force \f(CW\*(C`long\*(C'\fR types to be 64 bits wide. See \fB\-mlong32\fR for
|
12867 |
|
|
an explanation of the default and the way that the pointer size is
|
12868 |
|
|
determined.
|
12869 |
|
|
.IP "\fB\-mlong32\fR" 4
|
12870 |
|
|
.IX Item "-mlong32"
|
12871 |
|
|
Force \f(CW\*(C`long\*(C'\fR, \f(CW\*(C`int\*(C'\fR, and pointer types to be 32 bits wide.
|
12872 |
|
|
.Sp
|
12873 |
|
|
The default size of \f(CW\*(C`int\*(C'\fRs, \f(CW\*(C`long\*(C'\fRs and pointers depends on
|
12874 |
|
|
the \s-1ABI\s0. All the supported ABIs use 32\-bit \f(CW\*(C`int\*(C'\fRs. The n64 \s-1ABI\s0
|
12875 |
|
|
uses 64\-bit \f(CW\*(C`long\*(C'\fRs, as does the 64\-bit \s-1EABI\s0; the others use
|
12876 |
|
|
32\-bit \f(CW\*(C`long\*(C'\fRs. Pointers are the same size as \f(CW\*(C`long\*(C'\fRs,
|
12877 |
|
|
or the same size as integer registers, whichever is smaller.
|
12878 |
|
|
.IP "\fB\-msym32\fR" 4
|
12879 |
|
|
.IX Item "-msym32"
|
12880 |
|
|
.PD 0
|
12881 |
|
|
.IP "\fB\-mno\-sym32\fR" 4
|
12882 |
|
|
.IX Item "-mno-sym32"
|
12883 |
|
|
.PD
|
12884 |
|
|
Assume (do not assume) that all symbols have 32\-bit values, regardless
|
12885 |
|
|
of the selected \s-1ABI\s0. This option is useful in combination with
|
12886 |
|
|
\&\fB\-mabi=64\fR and \fB\-mno\-abicalls\fR because it allows \s-1GCC\s0
|
12887 |
|
|
to generate shorter and faster references to symbolic addresses.
|
12888 |
|
|
.IP "\fB\-G\fR \fInum\fR" 4
|
12889 |
|
|
.IX Item "-G num"
|
12890 |
|
|
Put definitions of externally-visible data in a small data section
|
12891 |
|
|
if that data is no bigger than \fInum\fR bytes. \s-1GCC\s0 can then access
|
12892 |
|
|
the data more efficiently; see \fB\-mgpopt\fR for details.
|
12893 |
|
|
.Sp
|
12894 |
|
|
The default \fB\-G\fR option depends on the configuration.
|
12895 |
|
|
.IP "\fB\-mlocal\-sdata\fR" 4
|
12896 |
|
|
.IX Item "-mlocal-sdata"
|
12897 |
|
|
.PD 0
|
12898 |
|
|
.IP "\fB\-mno\-local\-sdata\fR" 4
|
12899 |
|
|
.IX Item "-mno-local-sdata"
|
12900 |
|
|
.PD
|
12901 |
|
|
Extend (do not extend) the \fB\-G\fR behavior to local data too,
|
12902 |
|
|
such as to static variables in C. \fB\-mlocal\-sdata\fR is the
|
12903 |
|
|
default for all configurations.
|
12904 |
|
|
.Sp
|
12905 |
|
|
If the linker complains that an application is using too much small data,
|
12906 |
|
|
you might want to try rebuilding the less performance-critical parts with
|
12907 |
|
|
\&\fB\-mno\-local\-sdata\fR. You might also want to build large
|
12908 |
|
|
libraries with \fB\-mno\-local\-sdata\fR, so that the libraries leave
|
12909 |
|
|
more room for the main program.
|
12910 |
|
|
.IP "\fB\-mextern\-sdata\fR" 4
|
12911 |
|
|
.IX Item "-mextern-sdata"
|
12912 |
|
|
.PD 0
|
12913 |
|
|
.IP "\fB\-mno\-extern\-sdata\fR" 4
|
12914 |
|
|
.IX Item "-mno-extern-sdata"
|
12915 |
|
|
.PD
|
12916 |
|
|
Assume (do not assume) that externally-defined data will be in
|
12917 |
|
|
a small data section if that data is within the \fB\-G\fR limit.
|
12918 |
|
|
\&\fB\-mextern\-sdata\fR is the default for all configurations.
|
12919 |
|
|
.Sp
|
12920 |
|
|
If you compile a module \fIMod\fR with \fB\-mextern\-sdata\fR \fB\-G\fR
|
12921 |
|
|
\&\fInum\fR \fB\-mgpopt\fR, and \fIMod\fR references a variable \fIVar\fR
|
12922 |
|
|
that is no bigger than \fInum\fR bytes, you must make sure that \fIVar\fR
|
12923 |
|
|
is placed in a small data section. If \fIVar\fR is defined by another
|
12924 |
|
|
module, you must either compile that module with a high-enough
|
12925 |
|
|
\&\fB\-G\fR setting or attach a \f(CW\*(C`section\*(C'\fR attribute to \fIVar\fR's
|
12926 |
|
|
definition. If \fIVar\fR is common, you must link the application
|
12927 |
|
|
with a high-enough \fB\-G\fR setting.
|
12928 |
|
|
.Sp
|
12929 |
|
|
The easiest way of satisfying these restrictions is to compile
|
12930 |
|
|
and link every module with the same \fB\-G\fR option. However,
|
12931 |
|
|
you may wish to build a library that supports several different
|
12932 |
|
|
small data limits. You can do this by compiling the library with
|
12933 |
|
|
the highest supported \fB\-G\fR setting and additionally using
|
12934 |
|
|
\&\fB\-mno\-extern\-sdata\fR to stop the library from making assumptions
|
12935 |
|
|
about externally-defined data.
|
12936 |
|
|
.IP "\fB\-mgpopt\fR" 4
|
12937 |
|
|
.IX Item "-mgpopt"
|
12938 |
|
|
.PD 0
|
12939 |
|
|
.IP "\fB\-mno\-gpopt\fR" 4
|
12940 |
|
|
.IX Item "-mno-gpopt"
|
12941 |
|
|
.PD
|
12942 |
|
|
Use (do not use) GP-relative accesses for symbols that are known to be
|
12943 |
|
|
in a small data section; see \fB\-G\fR, \fB\-mlocal\-sdata\fR and
|
12944 |
|
|
\&\fB\-mextern\-sdata\fR. \fB\-mgpopt\fR is the default for all
|
12945 |
|
|
configurations.
|
12946 |
|
|
.Sp
|
12947 |
|
|
\&\fB\-mno\-gpopt\fR is useful for cases where the \f(CW$gp\fR register
|
12948 |
|
|
might not hold the value of \f(CW\*(C`_gp\*(C'\fR. For example, if the code is
|
12949 |
|
|
part of a library that might be used in a boot monitor, programs that
|
12950 |
|
|
call boot monitor routines will pass an unknown value in \f(CW$gp\fR.
|
12951 |
|
|
(In such situations, the boot monitor itself would usually be compiled
|
12952 |
|
|
with \fB\-G0\fR.)
|
12953 |
|
|
.Sp
|
12954 |
|
|
\&\fB\-mno\-gpopt\fR implies \fB\-mno\-local\-sdata\fR and
|
12955 |
|
|
\&\fB\-mno\-extern\-sdata\fR.
|
12956 |
|
|
.IP "\fB\-membedded\-data\fR" 4
|
12957 |
|
|
.IX Item "-membedded-data"
|
12958 |
|
|
.PD 0
|
12959 |
|
|
.IP "\fB\-mno\-embedded\-data\fR" 4
|
12960 |
|
|
.IX Item "-mno-embedded-data"
|
12961 |
|
|
.PD
|
12962 |
|
|
Allocate variables to the read-only data section first if possible, then
|
12963 |
|
|
next in the small data section if possible, otherwise in data. This gives
|
12964 |
|
|
slightly slower code than the default, but reduces the amount of \s-1RAM\s0 required
|
12965 |
|
|
when executing, and thus may be preferred for some embedded systems.
|
12966 |
|
|
.IP "\fB\-muninit\-const\-in\-rodata\fR" 4
|
12967 |
|
|
.IX Item "-muninit-const-in-rodata"
|
12968 |
|
|
.PD 0
|
12969 |
|
|
.IP "\fB\-mno\-uninit\-const\-in\-rodata\fR" 4
|
12970 |
|
|
.IX Item "-mno-uninit-const-in-rodata"
|
12971 |
|
|
.PD
|
12972 |
|
|
Put uninitialized \f(CW\*(C`const\*(C'\fR variables in the read-only data section.
|
12973 |
|
|
This option is only meaningful in conjunction with \fB\-membedded\-data\fR.
|
12974 |
|
|
.IP "\fB\-mcode\-readable=\fR\fIsetting\fR" 4
|
12975 |
|
|
.IX Item "-mcode-readable=setting"
|
12976 |
|
|
Specify whether \s-1GCC\s0 may generate code that reads from executable sections.
|
12977 |
|
|
There are three possible settings:
|
12978 |
|
|
.RS 4
|
12979 |
|
|
.IP "\fB\-mcode\-readable=yes\fR" 4
|
12980 |
|
|
.IX Item "-mcode-readable=yes"
|
12981 |
|
|
Instructions may freely access executable sections. This is the
|
12982 |
|
|
default setting.
|
12983 |
|
|
.IP "\fB\-mcode\-readable=pcrel\fR" 4
|
12984 |
|
|
.IX Item "-mcode-readable=pcrel"
|
12985 |
|
|
\&\s-1MIPS16\s0 PC-relative load instructions can access executable sections,
|
12986 |
|
|
but other instructions must not do so. This option is useful on 4KSc
|
12987 |
|
|
and 4KSd processors when the code TLBs have the Read Inhibit bit set.
|
12988 |
|
|
It is also useful on processors that can be configured to have a dual
|
12989 |
|
|
instruction/data \s-1SRAM\s0 interface and that, like the M4K, automatically
|
12990 |
|
|
redirect PC-relative loads to the instruction \s-1RAM\s0.
|
12991 |
|
|
.IP "\fB\-mcode\-readable=no\fR" 4
|
12992 |
|
|
.IX Item "-mcode-readable=no"
|
12993 |
|
|
Instructions must not access executable sections. This option can be
|
12994 |
|
|
useful on targets that are configured to have a dual instruction/data
|
12995 |
|
|
\&\s-1SRAM\s0 interface but that (unlike the M4K) do not automatically redirect
|
12996 |
|
|
PC-relative loads to the instruction \s-1RAM\s0.
|
12997 |
|
|
.RE
|
12998 |
|
|
.RS 4
|
12999 |
|
|
.RE
|
13000 |
|
|
.IP "\fB\-msplit\-addresses\fR" 4
|
13001 |
|
|
.IX Item "-msplit-addresses"
|
13002 |
|
|
.PD 0
|
13003 |
|
|
.IP "\fB\-mno\-split\-addresses\fR" 4
|
13004 |
|
|
.IX Item "-mno-split-addresses"
|
13005 |
|
|
.PD
|
13006 |
|
|
Enable (disable) use of the \f(CW\*(C`%hi()\*(C'\fR and \f(CW\*(C`%lo()\*(C'\fR assembler
|
13007 |
|
|
relocation operators. This option has been superseded by
|
13008 |
|
|
\&\fB\-mexplicit\-relocs\fR but is retained for backwards compatibility.
|
13009 |
|
|
.IP "\fB\-mexplicit\-relocs\fR" 4
|
13010 |
|
|
.IX Item "-mexplicit-relocs"
|
13011 |
|
|
.PD 0
|
13012 |
|
|
.IP "\fB\-mno\-explicit\-relocs\fR" 4
|
13013 |
|
|
.IX Item "-mno-explicit-relocs"
|
13014 |
|
|
.PD
|
13015 |
|
|
Use (do not use) assembler relocation operators when dealing with symbolic
|
13016 |
|
|
addresses. The alternative, selected by \fB\-mno\-explicit\-relocs\fR,
|
13017 |
|
|
is to use assembler macros instead.
|
13018 |
|
|
.Sp
|
13019 |
|
|
\&\fB\-mexplicit\-relocs\fR is the default if \s-1GCC\s0 was configured
|
13020 |
|
|
to use an assembler that supports relocation operators.
|
13021 |
|
|
.IP "\fB\-mcheck\-zero\-division\fR" 4
|
13022 |
|
|
.IX Item "-mcheck-zero-division"
|
13023 |
|
|
.PD 0
|
13024 |
|
|
.IP "\fB\-mno\-check\-zero\-division\fR" 4
|
13025 |
|
|
.IX Item "-mno-check-zero-division"
|
13026 |
|
|
.PD
|
13027 |
|
|
Trap (do not trap) on integer division by zero.
|
13028 |
|
|
.Sp
|
13029 |
|
|
The default is \fB\-mcheck\-zero\-division\fR.
|
13030 |
|
|
.IP "\fB\-mdivide\-traps\fR" 4
|
13031 |
|
|
.IX Item "-mdivide-traps"
|
13032 |
|
|
.PD 0
|
13033 |
|
|
.IP "\fB\-mdivide\-breaks\fR" 4
|
13034 |
|
|
.IX Item "-mdivide-breaks"
|
13035 |
|
|
.PD
|
13036 |
|
|
\&\s-1MIPS\s0 systems check for division by zero by generating either a
|
13037 |
|
|
conditional trap or a break instruction. Using traps results in
|
13038 |
|
|
smaller code, but is only supported on \s-1MIPS\s0 \s-1II\s0 and later. Also, some
|
13039 |
|
|
versions of the Linux kernel have a bug that prevents trap from
|
13040 |
|
|
generating the proper signal (\f(CW\*(C`SIGFPE\*(C'\fR). Use \fB\-mdivide\-traps\fR to
|
13041 |
|
|
allow conditional traps on architectures that support them and
|
13042 |
|
|
\&\fB\-mdivide\-breaks\fR to force the use of breaks.
|
13043 |
|
|
.Sp
|
13044 |
|
|
The default is usually \fB\-mdivide\-traps\fR, but this can be
|
13045 |
|
|
overridden at configure time using \fB\-\-with\-divide=breaks\fR.
|
13046 |
|
|
Divide-by-zero checks can be completely disabled using
|
13047 |
|
|
\&\fB\-mno\-check\-zero\-division\fR.
|
13048 |
|
|
.IP "\fB\-mmemcpy\fR" 4
|
13049 |
|
|
.IX Item "-mmemcpy"
|
13050 |
|
|
.PD 0
|
13051 |
|
|
.IP "\fB\-mno\-memcpy\fR" 4
|
13052 |
|
|
.IX Item "-mno-memcpy"
|
13053 |
|
|
.PD
|
13054 |
|
|
Force (do not force) the use of \f(CW\*(C`memcpy()\*(C'\fR for non-trivial block
|
13055 |
|
|
moves. The default is \fB\-mno\-memcpy\fR, which allows \s-1GCC\s0 to inline
|
13056 |
|
|
most constant-sized copies.
|
13057 |
|
|
.IP "\fB\-mlong\-calls\fR" 4
|
13058 |
|
|
.IX Item "-mlong-calls"
|
13059 |
|
|
.PD 0
|
13060 |
|
|
.IP "\fB\-mno\-long\-calls\fR" 4
|
13061 |
|
|
.IX Item "-mno-long-calls"
|
13062 |
|
|
.PD
|
13063 |
|
|
Disable (do not disable) use of the \f(CW\*(C`jal\*(C'\fR instruction. Calling
|
13064 |
|
|
functions using \f(CW\*(C`jal\*(C'\fR is more efficient but requires the caller
|
13065 |
|
|
and callee to be in the same 256 megabyte segment.
|
13066 |
|
|
.Sp
|
13067 |
|
|
This option has no effect on abicalls code. The default is
|
13068 |
|
|
\&\fB\-mno\-long\-calls\fR.
|
13069 |
|
|
.IP "\fB\-mmad\fR" 4
|
13070 |
|
|
.IX Item "-mmad"
|
13071 |
|
|
.PD 0
|
13072 |
|
|
.IP "\fB\-mno\-mad\fR" 4
|
13073 |
|
|
.IX Item "-mno-mad"
|
13074 |
|
|
.PD
|
13075 |
|
|
Enable (disable) use of the \f(CW\*(C`mad\*(C'\fR, \f(CW\*(C`madu\*(C'\fR and \f(CW\*(C`mul\*(C'\fR
|
13076 |
|
|
instructions, as provided by the R4650 \s-1ISA\s0.
|
13077 |
|
|
.IP "\fB\-mfused\-madd\fR" 4
|
13078 |
|
|
.IX Item "-mfused-madd"
|
13079 |
|
|
.PD 0
|
13080 |
|
|
.IP "\fB\-mno\-fused\-madd\fR" 4
|
13081 |
|
|
.IX Item "-mno-fused-madd"
|
13082 |
|
|
.PD
|
13083 |
|
|
Enable (disable) use of the floating point multiply-accumulate
|
13084 |
|
|
instructions, when they are available. The default is
|
13085 |
|
|
\&\fB\-mfused\-madd\fR.
|
13086 |
|
|
.Sp
|
13087 |
|
|
When multiply-accumulate instructions are used, the intermediate
|
13088 |
|
|
product is calculated to infinite precision and is not subject to
|
13089 |
|
|
the \s-1FCSR\s0 Flush to Zero bit. This may be undesirable in some
|
13090 |
|
|
circumstances.
|
13091 |
|
|
.IP "\fB\-nocpp\fR" 4
|
13092 |
|
|
.IX Item "-nocpp"
|
13093 |
|
|
Tell the \s-1MIPS\s0 assembler to not run its preprocessor over user
|
13094 |
|
|
assembler files (with a \fB.s\fR suffix) when assembling them.
|
13095 |
|
|
.IP "\fB\-mfix\-r4000\fR" 4
|
13096 |
|
|
.IX Item "-mfix-r4000"
|
13097 |
|
|
.PD 0
|
13098 |
|
|
.IP "\fB\-mno\-fix\-r4000\fR" 4
|
13099 |
|
|
.IX Item "-mno-fix-r4000"
|
13100 |
|
|
.PD
|
13101 |
|
|
Work around certain R4000 \s-1CPU\s0 errata:
|
13102 |
|
|
.RS 4
|
13103 |
|
|
.IP "\-" 4
|
13104 |
|
|
A double-word or a variable shift may give an incorrect result if executed
|
13105 |
|
|
immediately after starting an integer division.
|
13106 |
|
|
.IP "\-" 4
|
13107 |
|
|
A double-word or a variable shift may give an incorrect result if executed
|
13108 |
|
|
while an integer multiplication is in progress.
|
13109 |
|
|
.IP "\-" 4
|
13110 |
|
|
An integer division may give an incorrect result if started in a delay slot
|
13111 |
|
|
of a taken branch or a jump.
|
13112 |
|
|
.RE
|
13113 |
|
|
.RS 4
|
13114 |
|
|
.RE
|
13115 |
|
|
.IP "\fB\-mfix\-r4400\fR" 4
|
13116 |
|
|
.IX Item "-mfix-r4400"
|
13117 |
|
|
.PD 0
|
13118 |
|
|
.IP "\fB\-mno\-fix\-r4400\fR" 4
|
13119 |
|
|
.IX Item "-mno-fix-r4400"
|
13120 |
|
|
.PD
|
13121 |
|
|
Work around certain R4400 \s-1CPU\s0 errata:
|
13122 |
|
|
.RS 4
|
13123 |
|
|
.IP "\-" 4
|
13124 |
|
|
A double-word or a variable shift may give an incorrect result if executed
|
13125 |
|
|
immediately after starting an integer division.
|
13126 |
|
|
.RE
|
13127 |
|
|
.RS 4
|
13128 |
|
|
.RE
|
13129 |
|
|
.IP "\fB\-mfix\-r10000\fR" 4
|
13130 |
|
|
.IX Item "-mfix-r10000"
|
13131 |
|
|
.PD 0
|
13132 |
|
|
.IP "\fB\-mno\-fix\-r10000\fR" 4
|
13133 |
|
|
.IX Item "-mno-fix-r10000"
|
13134 |
|
|
.PD
|
13135 |
|
|
Work around certain R10000 errata:
|
13136 |
|
|
.RS 4
|
13137 |
|
|
.IP "\-" 4
|
13138 |
|
|
\&\f(CW\*(C`ll\*(C'\fR/\f(CW\*(C`sc\*(C'\fR sequences may not behave atomically on revisions
|
13139 |
|
|
prior to 3.0. They may deadlock on revisions 2.6 and earlier.
|
13140 |
|
|
.RE
|
13141 |
|
|
.RS 4
|
13142 |
|
|
.Sp
|
13143 |
|
|
This option can only be used if the target architecture supports
|
13144 |
|
|
branch-likely instructions. \fB\-mfix\-r10000\fR is the default when
|
13145 |
|
|
\&\fB\-march=r10000\fR is used; \fB\-mno\-fix\-r10000\fR is the default
|
13146 |
|
|
otherwise.
|
13147 |
|
|
.RE
|
13148 |
|
|
.IP "\fB\-mfix\-vr4120\fR" 4
|
13149 |
|
|
.IX Item "-mfix-vr4120"
|
13150 |
|
|
.PD 0
|
13151 |
|
|
.IP "\fB\-mno\-fix\-vr4120\fR" 4
|
13152 |
|
|
.IX Item "-mno-fix-vr4120"
|
13153 |
|
|
.PD
|
13154 |
|
|
Work around certain \s-1VR4120\s0 errata:
|
13155 |
|
|
.RS 4
|
13156 |
|
|
.IP "\-" 4
|
13157 |
|
|
\&\f(CW\*(C`dmultu\*(C'\fR does not always produce the correct result.
|
13158 |
|
|
.IP "\-" 4
|
13159 |
|
|
\&\f(CW\*(C`div\*(C'\fR and \f(CW\*(C`ddiv\*(C'\fR do not always produce the correct result if one
|
13160 |
|
|
of the operands is negative.
|
13161 |
|
|
.RE
|
13162 |
|
|
.RS 4
|
13163 |
|
|
.Sp
|
13164 |
|
|
The workarounds for the division errata rely on special functions in
|
13165 |
|
|
\&\fIlibgcc.a\fR. At present, these functions are only provided by
|
13166 |
|
|
the \f(CW\*(C`mips64vr*\-elf\*(C'\fR configurations.
|
13167 |
|
|
.Sp
|
13168 |
|
|
Other \s-1VR4120\s0 errata require a nop to be inserted between certain pairs of
|
13169 |
|
|
instructions. These errata are handled by the assembler, not by \s-1GCC\s0 itself.
|
13170 |
|
|
.RE
|
13171 |
|
|
.IP "\fB\-mfix\-vr4130\fR" 4
|
13172 |
|
|
.IX Item "-mfix-vr4130"
|
13173 |
|
|
Work around the \s-1VR4130\s0 \f(CW\*(C`mflo\*(C'\fR/\f(CW\*(C`mfhi\*(C'\fR errata. The
|
13174 |
|
|
workarounds are implemented by the assembler rather than by \s-1GCC\s0,
|
13175 |
|
|
although \s-1GCC\s0 will avoid using \f(CW\*(C`mflo\*(C'\fR and \f(CW\*(C`mfhi\*(C'\fR if the
|
13176 |
|
|
\&\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
|
13177 |
|
|
instructions are available instead.
|
13178 |
|
|
.IP "\fB\-mfix\-sb1\fR" 4
|
13179 |
|
|
.IX Item "-mfix-sb1"
|
13180 |
|
|
.PD 0
|
13181 |
|
|
.IP "\fB\-mno\-fix\-sb1\fR" 4
|
13182 |
|
|
.IX Item "-mno-fix-sb1"
|
13183 |
|
|
.PD
|
13184 |
|
|
Work around certain \s-1SB\-1\s0 \s-1CPU\s0 core errata.
|
13185 |
|
|
(This flag currently works around the \s-1SB\-1\s0 revision 2
|
13186 |
|
|
\&\*(L"F1\*(R" and \*(L"F2\*(R" floating point errata.)
|
13187 |
|
|
.IP "\fB\-mr10k\-cache\-barrier=\fR\fIsetting\fR" 4
|
13188 |
|
|
.IX Item "-mr10k-cache-barrier=setting"
|
13189 |
|
|
Specify whether \s-1GCC\s0 should insert cache barriers to avoid the
|
13190 |
|
|
side-effects of speculation on R10K processors.
|
13191 |
|
|
.Sp
|
13192 |
|
|
In common with many processors, the R10K tries to predict the outcome
|
13193 |
|
|
of a conditional branch and speculatively executes instructions from
|
13194 |
|
|
the \*(L"taken\*(R" branch. It later aborts these instructions if the
|
13195 |
|
|
predicted outcome was wrong. However, on the R10K, even aborted
|
13196 |
|
|
instructions can have side effects.
|
13197 |
|
|
.Sp
|
13198 |
|
|
This problem only affects kernel stores and, depending on the system,
|
13199 |
|
|
kernel loads. As an example, a speculatively-executed store may load
|
13200 |
|
|
the target memory into cache and mark the cache line as dirty, even if
|
13201 |
|
|
the store itself is later aborted. If a \s-1DMA\s0 operation writes to the
|
13202 |
|
|
same area of memory before the \*(L"dirty\*(R" line is flushed, the cached
|
13203 |
|
|
data will overwrite the DMA-ed data. See the R10K processor manual
|
13204 |
|
|
for a full description, including other potential problems.
|
13205 |
|
|
.Sp
|
13206 |
|
|
One workaround is to insert cache barrier instructions before every memory
|
13207 |
|
|
access that might be speculatively executed and that might have side
|
13208 |
|
|
effects even if aborted. \fB\-mr10k\-cache\-barrier=\fR\fIsetting\fR
|
13209 |
|
|
controls \s-1GCC\s0's implementation of this workaround. It assumes that
|
13210 |
|
|
aborted accesses to any byte in the following regions will not have
|
13211 |
|
|
side effects:
|
13212 |
|
|
.RS 4
|
13213 |
|
|
.IP "1." 4
|
13214 |
|
|
the memory occupied by the current function's stack frame;
|
13215 |
|
|
.IP "2." 4
|
13216 |
|
|
the memory occupied by an incoming stack argument;
|
13217 |
|
|
.IP "3." 4
|
13218 |
|
|
the memory occupied by an object with a link-time-constant address.
|
13219 |
|
|
.RE
|
13220 |
|
|
.RS 4
|
13221 |
|
|
.Sp
|
13222 |
|
|
It is the kernel's responsibility to ensure that speculative
|
13223 |
|
|
accesses to these regions are indeed safe.
|
13224 |
|
|
.Sp
|
13225 |
|
|
If the input program contains a function declaration such as:
|
13226 |
|
|
.Sp
|
13227 |
|
|
.Vb 1
|
13228 |
|
|
\& void foo (void);
|
13229 |
|
|
.Ve
|
13230 |
|
|
.Sp
|
13231 |
|
|
then the implementation of \f(CW\*(C`foo\*(C'\fR must allow \f(CW\*(C`j foo\*(C'\fR and
|
13232 |
|
|
\&\f(CW\*(C`jal foo\*(C'\fR to be executed speculatively. \s-1GCC\s0 honors this
|
13233 |
|
|
restriction for functions it compiles itself. It expects non-GCC
|
13234 |
|
|
functions (such as hand-written assembly code) to do the same.
|
13235 |
|
|
.Sp
|
13236 |
|
|
The option has three forms:
|
13237 |
|
|
.IP "\fB\-mr10k\-cache\-barrier=load\-store\fR" 4
|
13238 |
|
|
.IX Item "-mr10k-cache-barrier=load-store"
|
13239 |
|
|
Insert a cache barrier before a load or store that might be
|
13240 |
|
|
speculatively executed and that might have side effects even
|
13241 |
|
|
if aborted.
|
13242 |
|
|
.IP "\fB\-mr10k\-cache\-barrier=store\fR" 4
|
13243 |
|
|
.IX Item "-mr10k-cache-barrier=store"
|
13244 |
|
|
Insert a cache barrier before a store that might be speculatively
|
13245 |
|
|
executed and that might have side effects even if aborted.
|
13246 |
|
|
.IP "\fB\-mr10k\-cache\-barrier=none\fR" 4
|
13247 |
|
|
.IX Item "-mr10k-cache-barrier=none"
|
13248 |
|
|
Disable the insertion of cache barriers. This is the default setting.
|
13249 |
|
|
.RE
|
13250 |
|
|
.RS 4
|
13251 |
|
|
.RE
|
13252 |
|
|
.IP "\fB\-mflush\-func=\fR\fIfunc\fR" 4
|
13253 |
|
|
.IX Item "-mflush-func=func"
|
13254 |
|
|
.PD 0
|
13255 |
|
|
.IP "\fB\-mno\-flush\-func\fR" 4
|
13256 |
|
|
.IX Item "-mno-flush-func"
|
13257 |
|
|
.PD
|
13258 |
|
|
Specifies the function to call to flush the I and D caches, or to not
|
13259 |
|
|
call any such function. If called, the function must take the same
|
13260 |
|
|
arguments as the common \f(CW\*(C`_flush_func()\*(C'\fR, that is, the address of the
|
13261 |
|
|
memory range for which the cache is being flushed, the size of the
|
13262 |
|
|
memory range, and the number 3 (to flush both caches). The default
|
13263 |
|
|
depends on the target \s-1GCC\s0 was configured for, but commonly is either
|
13264 |
|
|
\&\fB_flush_func\fR or \fB_\|_cpu_flush\fR.
|
13265 |
|
|
.IP "\fBmbranch\-cost=\fR\fInum\fR" 4
|
13266 |
|
|
.IX Item "mbranch-cost=num"
|
13267 |
|
|
Set the cost of branches to roughly \fInum\fR \*(L"simple\*(R" instructions.
|
13268 |
|
|
This cost is only a heuristic and is not guaranteed to produce
|
13269 |
|
|
consistent results across releases. A zero cost redundantly selects
|
13270 |
|
|
the default, which is based on the \fB\-mtune\fR setting.
|
13271 |
|
|
.IP "\fB\-mbranch\-likely\fR" 4
|
13272 |
|
|
.IX Item "-mbranch-likely"
|
13273 |
|
|
.PD 0
|
13274 |
|
|
.IP "\fB\-mno\-branch\-likely\fR" 4
|
13275 |
|
|
.IX Item "-mno-branch-likely"
|
13276 |
|
|
.PD
|
13277 |
|
|
Enable or disable use of Branch Likely instructions, regardless of the
|
13278 |
|
|
default for the selected architecture. By default, Branch Likely
|
13279 |
|
|
instructions may be generated if they are supported by the selected
|
13280 |
|
|
architecture. An exception is for the \s-1MIPS32\s0 and \s-1MIPS64\s0 architectures
|
13281 |
|
|
and processors which implement those architectures; for those, Branch
|
13282 |
|
|
Likely instructions will not be generated by default because the \s-1MIPS32\s0
|
13283 |
|
|
and \s-1MIPS64\s0 architectures specifically deprecate their use.
|
13284 |
|
|
.IP "\fB\-mfp\-exceptions\fR" 4
|
13285 |
|
|
.IX Item "-mfp-exceptions"
|
13286 |
|
|
.PD 0
|
13287 |
|
|
.IP "\fB\-mno\-fp\-exceptions\fR" 4
|
13288 |
|
|
.IX Item "-mno-fp-exceptions"
|
13289 |
|
|
.PD
|
13290 |
|
|
Specifies whether \s-1FP\s0 exceptions are enabled. This affects how we schedule
|
13291 |
|
|
\&\s-1FP\s0 instructions for some processors. The default is that \s-1FP\s0 exceptions are
|
13292 |
|
|
enabled.
|
13293 |
|
|
.Sp
|
13294 |
|
|
For instance, on the \s-1SB\-1\s0, if \s-1FP\s0 exceptions are disabled, and we are emitting
|
13295 |
|
|
64\-bit code, then we can use both \s-1FP\s0 pipes. Otherwise, we can only use one
|
13296 |
|
|
\&\s-1FP\s0 pipe.
|
13297 |
|
|
.IP "\fB\-mvr4130\-align\fR" 4
|
13298 |
|
|
.IX Item "-mvr4130-align"
|
13299 |
|
|
.PD 0
|
13300 |
|
|
.IP "\fB\-mno\-vr4130\-align\fR" 4
|
13301 |
|
|
.IX Item "-mno-vr4130-align"
|
13302 |
|
|
.PD
|
13303 |
|
|
The \s-1VR4130\s0 pipeline is two-way superscalar, but can only issue two
|
13304 |
|
|
instructions together if the first one is 8\-byte aligned. When this
|
13305 |
|
|
option is enabled, \s-1GCC\s0 will align pairs of instructions that it
|
13306 |
|
|
thinks should execute in parallel.
|
13307 |
|
|
.Sp
|
13308 |
|
|
This option only has an effect when optimizing for the \s-1VR4130\s0.
|
13309 |
|
|
It normally makes code faster, but at the expense of making it bigger.
|
13310 |
|
|
It is enabled by default at optimization level \fB\-O3\fR.
|
13311 |
|
|
.IP "\fB\-msynci\fR" 4
|
13312 |
|
|
.IX Item "-msynci"
|
13313 |
|
|
.PD 0
|
13314 |
|
|
.IP "\fB\-mno\-synci\fR" 4
|
13315 |
|
|
.IX Item "-mno-synci"
|
13316 |
|
|
.PD
|
13317 |
|
|
Enable (disable) generation of \f(CW\*(C`synci\*(C'\fR instructions on
|
13318 |
|
|
architectures that support it. The \f(CW\*(C`synci\*(C'\fR instructions (if
|
13319 |
|
|
enabled) will be generated when \f(CW\*(C`_\|_builtin_\|_\|_clear_cache()\*(C'\fR is
|
13320 |
|
|
compiled.
|
13321 |
|
|
.Sp
|
13322 |
|
|
This option defaults to \f(CW\*(C`\-mno\-synci\*(C'\fR, but the default can be
|
13323 |
|
|
overridden by configuring with \f(CW\*(C`\-\-with\-synci\*(C'\fR.
|
13324 |
|
|
.Sp
|
13325 |
|
|
When compiling code for single processor systems, it is generally safe
|
13326 |
|
|
to use \f(CW\*(C`synci\*(C'\fR. However, on many multi-core (\s-1SMP\s0) systems, it
|
13327 |
|
|
will not invalidate the instruction caches on all cores and may lead
|
13328 |
|
|
to undefined behavior.
|
13329 |
|
|
.IP "\fB\-mrelax\-pic\-calls\fR" 4
|
13330 |
|
|
.IX Item "-mrelax-pic-calls"
|
13331 |
|
|
.PD 0
|
13332 |
|
|
.IP "\fB\-mno\-relax\-pic\-calls\fR" 4
|
13333 |
|
|
.IX Item "-mno-relax-pic-calls"
|
13334 |
|
|
.PD
|
13335 |
|
|
Try to turn \s-1PIC\s0 calls that are normally dispatched via register
|
13336 |
|
|
\&\f(CW$25\fR into direct calls. This is only possible if the linker can
|
13337 |
|
|
resolve the destination at link-time and if the destination is within
|
13338 |
|
|
range for a direct call.
|
13339 |
|
|
.Sp
|
13340 |
|
|
\&\fB\-mrelax\-pic\-calls\fR is the default if \s-1GCC\s0 was configured to use
|
13341 |
|
|
an assembler and a linker that supports the \f(CW\*(C`.reloc\*(C'\fR assembly
|
13342 |
|
|
directive and \f(CW\*(C`\-mexplicit\-relocs\*(C'\fR is in effect. With
|
13343 |
|
|
\&\f(CW\*(C`\-mno\-explicit\-relocs\*(C'\fR, this optimization can be performed by the
|
13344 |
|
|
assembler and the linker alone without help from the compiler.
|
13345 |
|
|
.IP "\fB\-mmcount\-ra\-address\fR" 4
|
13346 |
|
|
.IX Item "-mmcount-ra-address"
|
13347 |
|
|
.PD 0
|
13348 |
|
|
.IP "\fB\-mno\-mcount\-ra\-address\fR" 4
|
13349 |
|
|
.IX Item "-mno-mcount-ra-address"
|
13350 |
|
|
.PD
|
13351 |
|
|
Emit (do not emit) code that allows \f(CW\*(C`_mcount\*(C'\fR to modify the
|
13352 |
|
|
calling function's return address. When enabled, this option extends
|
13353 |
|
|
the usual \f(CW\*(C`_mcount\*(C'\fR interface with a new \fIra-address\fR
|
13354 |
|
|
parameter, which has type \f(CW\*(C`intptr_t *\*(C'\fR and is passed in register
|
13355 |
|
|
\&\f(CW$12\fR. \f(CW\*(C`_mcount\*(C'\fR can then modify the return address by
|
13356 |
|
|
doing both of the following:
|
13357 |
|
|
.RS 4
|
13358 |
|
|
.IP "\(bu" 4
|
13359 |
|
|
Returning the new address in register \f(CW$31\fR.
|
13360 |
|
|
.IP "\(bu" 4
|
13361 |
|
|
Storing the new address in \f(CW\*(C`*\f(CIra\-address\f(CW\*(C'\fR,
|
13362 |
|
|
if \fIra-address\fR is nonnull.
|
13363 |
|
|
.RE
|
13364 |
|
|
.RS 4
|
13365 |
|
|
.Sp
|
13366 |
|
|
The default is \fB\-mno\-mcount\-ra\-address\fR.
|
13367 |
|
|
.RE
|
13368 |
|
|
.PP
|
13369 |
|
|
\fI\s-1MMIX\s0 Options\fR
|
13370 |
|
|
.IX Subsection "MMIX Options"
|
13371 |
|
|
.PP
|
13372 |
|
|
These options are defined for the \s-1MMIX:\s0
|
13373 |
|
|
.IP "\fB\-mlibfuncs\fR" 4
|
13374 |
|
|
.IX Item "-mlibfuncs"
|
13375 |
|
|
.PD 0
|
13376 |
|
|
.IP "\fB\-mno\-libfuncs\fR" 4
|
13377 |
|
|
.IX Item "-mno-libfuncs"
|
13378 |
|
|
.PD
|
13379 |
|
|
Specify that intrinsic library functions are being compiled, passing all
|
13380 |
|
|
values in registers, no matter the size.
|
13381 |
|
|
.IP "\fB\-mepsilon\fR" 4
|
13382 |
|
|
.IX Item "-mepsilon"
|
13383 |
|
|
.PD 0
|
13384 |
|
|
.IP "\fB\-mno\-epsilon\fR" 4
|
13385 |
|
|
.IX Item "-mno-epsilon"
|
13386 |
|
|
.PD
|
13387 |
|
|
Generate floating-point comparison instructions that compare with respect
|
13388 |
|
|
to the \f(CW\*(C`rE\*(C'\fR epsilon register.
|
13389 |
|
|
.IP "\fB\-mabi=mmixware\fR" 4
|
13390 |
|
|
.IX Item "-mabi=mmixware"
|
13391 |
|
|
.PD 0
|
13392 |
|
|
.IP "\fB\-mabi=gnu\fR" 4
|
13393 |
|
|
.IX Item "-mabi=gnu"
|
13394 |
|
|
.PD
|
13395 |
|
|
Generate code that passes function parameters and return values that (in
|
13396 |
|
|
the called function) are seen as registers \f(CW$0\fR and up, as opposed to
|
13397 |
|
|
the \s-1GNU\s0 \s-1ABI\s0 which uses global registers \f(CW$231\fR and up.
|
13398 |
|
|
.IP "\fB\-mzero\-extend\fR" 4
|
13399 |
|
|
.IX Item "-mzero-extend"
|
13400 |
|
|
.PD 0
|
13401 |
|
|
.IP "\fB\-mno\-zero\-extend\fR" 4
|
13402 |
|
|
.IX Item "-mno-zero-extend"
|
13403 |
|
|
.PD
|
13404 |
|
|
When reading data from memory in sizes shorter than 64 bits, use (do not
|
13405 |
|
|
use) zero-extending load instructions by default, rather than
|
13406 |
|
|
sign-extending ones.
|
13407 |
|
|
.IP "\fB\-mknuthdiv\fR" 4
|
13408 |
|
|
.IX Item "-mknuthdiv"
|
13409 |
|
|
.PD 0
|
13410 |
|
|
.IP "\fB\-mno\-knuthdiv\fR" 4
|
13411 |
|
|
.IX Item "-mno-knuthdiv"
|
13412 |
|
|
.PD
|
13413 |
|
|
Make the result of a division yielding a remainder have the same sign as
|
13414 |
|
|
the divisor. With the default, \fB\-mno\-knuthdiv\fR, the sign of the
|
13415 |
|
|
remainder follows the sign of the dividend. Both methods are
|
13416 |
|
|
arithmetically valid, the latter being almost exclusively used.
|
13417 |
|
|
.IP "\fB\-mtoplevel\-symbols\fR" 4
|
13418 |
|
|
.IX Item "-mtoplevel-symbols"
|
13419 |
|
|
.PD 0
|
13420 |
|
|
.IP "\fB\-mno\-toplevel\-symbols\fR" 4
|
13421 |
|
|
.IX Item "-mno-toplevel-symbols"
|
13422 |
|
|
.PD
|
13423 |
|
|
Prepend (do not prepend) a \fB:\fR to all global symbols, so the assembly
|
13424 |
|
|
code can be used with the \f(CW\*(C`PREFIX\*(C'\fR assembly directive.
|
13425 |
|
|
.IP "\fB\-melf\fR" 4
|
13426 |
|
|
.IX Item "-melf"
|
13427 |
|
|
Generate an executable in the \s-1ELF\s0 format, rather than the default
|
13428 |
|
|
\&\fBmmo\fR format used by the \fBmmix\fR simulator.
|
13429 |
|
|
.IP "\fB\-mbranch\-predict\fR" 4
|
13430 |
|
|
.IX Item "-mbranch-predict"
|
13431 |
|
|
.PD 0
|
13432 |
|
|
.IP "\fB\-mno\-branch\-predict\fR" 4
|
13433 |
|
|
.IX Item "-mno-branch-predict"
|
13434 |
|
|
.PD
|
13435 |
|
|
Use (do not use) the probable-branch instructions, when static branch
|
13436 |
|
|
prediction indicates a probable branch.
|
13437 |
|
|
.IP "\fB\-mbase\-addresses\fR" 4
|
13438 |
|
|
.IX Item "-mbase-addresses"
|
13439 |
|
|
.PD 0
|
13440 |
|
|
.IP "\fB\-mno\-base\-addresses\fR" 4
|
13441 |
|
|
.IX Item "-mno-base-addresses"
|
13442 |
|
|
.PD
|
13443 |
|
|
Generate (do not generate) code that uses \fIbase addresses\fR. Using a
|
13444 |
|
|
base address automatically generates a request (handled by the assembler
|
13445 |
|
|
and the linker) for a constant to be set up in a global register. The
|
13446 |
|
|
register is used for one or more base address requests within the range 0
|
13447 |
|
|
to 255 from the value held in the register. The generally leads to short
|
13448 |
|
|
and fast code, but the number of different data items that can be
|
13449 |
|
|
addressed is limited. This means that a program that uses lots of static
|
13450 |
|
|
data may require \fB\-mno\-base\-addresses\fR.
|
13451 |
|
|
.IP "\fB\-msingle\-exit\fR" 4
|
13452 |
|
|
.IX Item "-msingle-exit"
|
13453 |
|
|
.PD 0
|
13454 |
|
|
.IP "\fB\-mno\-single\-exit\fR" 4
|
13455 |
|
|
.IX Item "-mno-single-exit"
|
13456 |
|
|
.PD
|
13457 |
|
|
Force (do not force) generated code to have a single exit point in each
|
13458 |
|
|
function.
|
13459 |
|
|
.PP
|
13460 |
|
|
\fI\s-1MN10300\s0 Options\fR
|
13461 |
|
|
.IX Subsection "MN10300 Options"
|
13462 |
|
|
.PP
|
13463 |
|
|
These \fB\-m\fR options are defined for Matsushita \s-1MN10300\s0 architectures:
|
13464 |
|
|
.IP "\fB\-mmult\-bug\fR" 4
|
13465 |
|
|
.IX Item "-mmult-bug"
|
13466 |
|
|
Generate code to avoid bugs in the multiply instructions for the \s-1MN10300\s0
|
13467 |
|
|
processors. This is the default.
|
13468 |
|
|
.IP "\fB\-mno\-mult\-bug\fR" 4
|
13469 |
|
|
.IX Item "-mno-mult-bug"
|
13470 |
|
|
Do not generate code to avoid bugs in the multiply instructions for the
|
13471 |
|
|
\&\s-1MN10300\s0 processors.
|
13472 |
|
|
.IP "\fB\-mam33\fR" 4
|
13473 |
|
|
.IX Item "-mam33"
|
13474 |
|
|
Generate code which uses features specific to the \s-1AM33\s0 processor.
|
13475 |
|
|
.IP "\fB\-mno\-am33\fR" 4
|
13476 |
|
|
.IX Item "-mno-am33"
|
13477 |
|
|
Do not generate code which uses features specific to the \s-1AM33\s0 processor. This
|
13478 |
|
|
is the default.
|
13479 |
|
|
.IP "\fB\-mreturn\-pointer\-on\-d0\fR" 4
|
13480 |
|
|
.IX Item "-mreturn-pointer-on-d0"
|
13481 |
|
|
When generating a function which returns a pointer, return the pointer
|
13482 |
|
|
in both \f(CW\*(C`a0\*(C'\fR and \f(CW\*(C`d0\*(C'\fR. Otherwise, the pointer is returned
|
13483 |
|
|
only in a0, and attempts to call such functions without a prototype
|
13484 |
|
|
would result in errors. Note that this option is on by default; use
|
13485 |
|
|
\&\fB\-mno\-return\-pointer\-on\-d0\fR to disable it.
|
13486 |
|
|
.IP "\fB\-mno\-crt0\fR" 4
|
13487 |
|
|
.IX Item "-mno-crt0"
|
13488 |
|
|
Do not link in the C run-time initialization object file.
|
13489 |
|
|
.IP "\fB\-mrelax\fR" 4
|
13490 |
|
|
.IX Item "-mrelax"
|
13491 |
|
|
Indicate to the linker that it should perform a relaxation optimization pass
|
13492 |
|
|
to shorten branches, calls and absolute memory addresses. This option only
|
13493 |
|
|
has an effect when used on the command line for the final link step.
|
13494 |
|
|
.Sp
|
13495 |
|
|
This option makes symbolic debugging impossible.
|
13496 |
|
|
.PP
|
13497 |
|
|
\fI\s-1PDP\-11\s0 Options\fR
|
13498 |
|
|
.IX Subsection "PDP-11 Options"
|
13499 |
|
|
.PP
|
13500 |
|
|
These options are defined for the \s-1PDP\-11:\s0
|
13501 |
|
|
.IP "\fB\-mfpu\fR" 4
|
13502 |
|
|
.IX Item "-mfpu"
|
13503 |
|
|
Use hardware \s-1FPP\s0 floating point. This is the default. (\s-1FIS\s0 floating
|
13504 |
|
|
point on the \s-1PDP\-11/40\s0 is not supported.)
|
13505 |
|
|
.IP "\fB\-msoft\-float\fR" 4
|
13506 |
|
|
.IX Item "-msoft-float"
|
13507 |
|
|
Do not use hardware floating point.
|
13508 |
|
|
.IP "\fB\-mac0\fR" 4
|
13509 |
|
|
.IX Item "-mac0"
|
13510 |
|
|
Return floating-point results in ac0 (fr0 in Unix assembler syntax).
|
13511 |
|
|
.IP "\fB\-mno\-ac0\fR" 4
|
13512 |
|
|
.IX Item "-mno-ac0"
|
13513 |
|
|
Return floating-point results in memory. This is the default.
|
13514 |
|
|
.IP "\fB\-m40\fR" 4
|
13515 |
|
|
.IX Item "-m40"
|
13516 |
|
|
Generate code for a \s-1PDP\-11/40\s0.
|
13517 |
|
|
.IP "\fB\-m45\fR" 4
|
13518 |
|
|
.IX Item "-m45"
|
13519 |
|
|
Generate code for a \s-1PDP\-11/45\s0. This is the default.
|
13520 |
|
|
.IP "\fB\-m10\fR" 4
|
13521 |
|
|
.IX Item "-m10"
|
13522 |
|
|
Generate code for a \s-1PDP\-11/10\s0.
|
13523 |
|
|
.IP "\fB\-mbcopy\-builtin\fR" 4
|
13524 |
|
|
.IX Item "-mbcopy-builtin"
|
13525 |
|
|
Use inline \f(CW\*(C`movmemhi\*(C'\fR patterns for copying memory. This is the
|
13526 |
|
|
default.
|
13527 |
|
|
.IP "\fB\-mbcopy\fR" 4
|
13528 |
|
|
.IX Item "-mbcopy"
|
13529 |
|
|
Do not use inline \f(CW\*(C`movmemhi\*(C'\fR patterns for copying memory.
|
13530 |
|
|
.IP "\fB\-mint16\fR" 4
|
13531 |
|
|
.IX Item "-mint16"
|
13532 |
|
|
.PD 0
|
13533 |
|
|
.IP "\fB\-mno\-int32\fR" 4
|
13534 |
|
|
.IX Item "-mno-int32"
|
13535 |
|
|
.PD
|
13536 |
|
|
Use 16\-bit \f(CW\*(C`int\*(C'\fR. This is the default.
|
13537 |
|
|
.IP "\fB\-mint32\fR" 4
|
13538 |
|
|
.IX Item "-mint32"
|
13539 |
|
|
.PD 0
|
13540 |
|
|
.IP "\fB\-mno\-int16\fR" 4
|
13541 |
|
|
.IX Item "-mno-int16"
|
13542 |
|
|
.PD
|
13543 |
|
|
Use 32\-bit \f(CW\*(C`int\*(C'\fR.
|
13544 |
|
|
.IP "\fB\-mfloat64\fR" 4
|
13545 |
|
|
.IX Item "-mfloat64"
|
13546 |
|
|
.PD 0
|
13547 |
|
|
.IP "\fB\-mno\-float32\fR" 4
|
13548 |
|
|
.IX Item "-mno-float32"
|
13549 |
|
|
.PD
|
13550 |
|
|
Use 64\-bit \f(CW\*(C`float\*(C'\fR. This is the default.
|
13551 |
|
|
.IP "\fB\-mfloat32\fR" 4
|
13552 |
|
|
.IX Item "-mfloat32"
|
13553 |
|
|
.PD 0
|
13554 |
|
|
.IP "\fB\-mno\-float64\fR" 4
|
13555 |
|
|
.IX Item "-mno-float64"
|
13556 |
|
|
.PD
|
13557 |
|
|
Use 32\-bit \f(CW\*(C`float\*(C'\fR.
|
13558 |
|
|
.IP "\fB\-mabshi\fR" 4
|
13559 |
|
|
.IX Item "-mabshi"
|
13560 |
|
|
Use \f(CW\*(C`abshi2\*(C'\fR pattern. This is the default.
|
13561 |
|
|
.IP "\fB\-mno\-abshi\fR" 4
|
13562 |
|
|
.IX Item "-mno-abshi"
|
13563 |
|
|
Do not use \f(CW\*(C`abshi2\*(C'\fR pattern.
|
13564 |
|
|
.IP "\fB\-mbranch\-expensive\fR" 4
|
13565 |
|
|
.IX Item "-mbranch-expensive"
|
13566 |
|
|
Pretend that branches are expensive. This is for experimenting with
|
13567 |
|
|
code generation only.
|
13568 |
|
|
.IP "\fB\-mbranch\-cheap\fR" 4
|
13569 |
|
|
.IX Item "-mbranch-cheap"
|
13570 |
|
|
Do not pretend that branches are expensive. This is the default.
|
13571 |
|
|
.IP "\fB\-msplit\fR" 4
|
13572 |
|
|
.IX Item "-msplit"
|
13573 |
|
|
Generate code for a system with split I&D.
|
13574 |
|
|
.IP "\fB\-mno\-split\fR" 4
|
13575 |
|
|
.IX Item "-mno-split"
|
13576 |
|
|
Generate code for a system without split I&D. This is the default.
|
13577 |
|
|
.IP "\fB\-munix\-asm\fR" 4
|
13578 |
|
|
.IX Item "-munix-asm"
|
13579 |
|
|
Use Unix assembler syntax. This is the default when configured for
|
13580 |
|
|
\&\fBpdp11\-*\-bsd\fR.
|
13581 |
|
|
.IP "\fB\-mdec\-asm\fR" 4
|
13582 |
|
|
.IX Item "-mdec-asm"
|
13583 |
|
|
Use \s-1DEC\s0 assembler syntax. This is the default when configured for any
|
13584 |
|
|
\&\s-1PDP\-11\s0 target other than \fBpdp11\-*\-bsd\fR.
|
13585 |
|
|
.PP
|
13586 |
|
|
\fIpicoChip Options\fR
|
13587 |
|
|
.IX Subsection "picoChip Options"
|
13588 |
|
|
.PP
|
13589 |
|
|
These \fB\-m\fR options are defined for picoChip implementations:
|
13590 |
|
|
.IP "\fB\-mae=\fR\fIae_type\fR" 4
|
13591 |
|
|
.IX Item "-mae=ae_type"
|
13592 |
|
|
Set the instruction set, register set, and instruction scheduling
|
13593 |
|
|
parameters for array element type \fIae_type\fR. Supported values
|
13594 |
|
|
for \fIae_type\fR are \fB\s-1ANY\s0\fR, \fB\s-1MUL\s0\fR, and \fB\s-1MAC\s0\fR.
|
13595 |
|
|
.Sp
|
13596 |
|
|
\&\fB\-mae=ANY\fR selects a completely generic \s-1AE\s0 type. Code
|
13597 |
|
|
generated with this option will run on any of the other \s-1AE\s0 types. The
|
13598 |
|
|
code will not be as efficient as it would be if compiled for a specific
|
13599 |
|
|
\&\s-1AE\s0 type, and some types of operation (e.g., multiplication) will not
|
13600 |
|
|
work properly on all types of \s-1AE\s0.
|
13601 |
|
|
.Sp
|
13602 |
|
|
\&\fB\-mae=MUL\fR selects a \s-1MUL\s0 \s-1AE\s0 type. This is the most useful \s-1AE\s0 type
|
13603 |
|
|
for compiled code, and is the default.
|
13604 |
|
|
.Sp
|
13605 |
|
|
\&\fB\-mae=MAC\fR selects a DSP-style \s-1MAC\s0 \s-1AE\s0. Code compiled with this
|
13606 |
|
|
option may suffer from poor performance of byte (char) manipulation,
|
13607 |
|
|
since the \s-1DSP\s0 \s-1AE\s0 does not provide hardware support for byte load/stores.
|
13608 |
|
|
.IP "\fB\-msymbol\-as\-address\fR" 4
|
13609 |
|
|
.IX Item "-msymbol-as-address"
|
13610 |
|
|
Enable the compiler to directly use a symbol name as an address in a
|
13611 |
|
|
load/store instruction, without first loading it into a
|
13612 |
|
|
register. Typically, the use of this option will generate larger
|
13613 |
|
|
programs, which run faster than when the option isn't used. However, the
|
13614 |
|
|
results vary from program to program, so it is left as a user option,
|
13615 |
|
|
rather than being permanently enabled.
|
13616 |
|
|
.IP "\fB\-mno\-inefficient\-warnings\fR" 4
|
13617 |
|
|
.IX Item "-mno-inefficient-warnings"
|
13618 |
|
|
Disables warnings about the generation of inefficient code. These
|
13619 |
|
|
warnings can be generated, for example, when compiling code which
|
13620 |
|
|
performs byte-level memory operations on the \s-1MAC\s0 \s-1AE\s0 type. The \s-1MAC\s0 \s-1AE\s0 has
|
13621 |
|
|
no hardware support for byte-level memory operations, so all byte
|
13622 |
|
|
load/stores must be synthesized from word load/store operations. This is
|
13623 |
|
|
inefficient and a warning will be generated indicating to the programmer
|
13624 |
|
|
that they should rewrite the code to avoid byte operations, or to target
|
13625 |
|
|
an \s-1AE\s0 type which has the necessary hardware support. This option enables
|
13626 |
|
|
the warning to be turned off.
|
13627 |
|
|
.PP
|
13628 |
|
|
\fIPowerPC Options\fR
|
13629 |
|
|
.IX Subsection "PowerPC Options"
|
13630 |
|
|
.PP
|
13631 |
|
|
These are listed under
|
13632 |
|
|
.PP
|
13633 |
|
|
\fI\s-1IBM\s0 \s-1RS/6000\s0 and PowerPC Options\fR
|
13634 |
|
|
.IX Subsection "IBM RS/6000 and PowerPC Options"
|
13635 |
|
|
.PP
|
13636 |
|
|
These \fB\-m\fR options are defined for the \s-1IBM\s0 \s-1RS/6000\s0 and PowerPC:
|
13637 |
|
|
.IP "\fB\-mpower\fR" 4
|
13638 |
|
|
.IX Item "-mpower"
|
13639 |
|
|
.PD 0
|
13640 |
|
|
.IP "\fB\-mno\-power\fR" 4
|
13641 |
|
|
.IX Item "-mno-power"
|
13642 |
|
|
.IP "\fB\-mpower2\fR" 4
|
13643 |
|
|
.IX Item "-mpower2"
|
13644 |
|
|
.IP "\fB\-mno\-power2\fR" 4
|
13645 |
|
|
.IX Item "-mno-power2"
|
13646 |
|
|
.IP "\fB\-mpowerpc\fR" 4
|
13647 |
|
|
.IX Item "-mpowerpc"
|
13648 |
|
|
.IP "\fB\-mno\-powerpc\fR" 4
|
13649 |
|
|
.IX Item "-mno-powerpc"
|
13650 |
|
|
.IP "\fB\-mpowerpc\-gpopt\fR" 4
|
13651 |
|
|
.IX Item "-mpowerpc-gpopt"
|
13652 |
|
|
.IP "\fB\-mno\-powerpc\-gpopt\fR" 4
|
13653 |
|
|
.IX Item "-mno-powerpc-gpopt"
|
13654 |
|
|
.IP "\fB\-mpowerpc\-gfxopt\fR" 4
|
13655 |
|
|
.IX Item "-mpowerpc-gfxopt"
|
13656 |
|
|
.IP "\fB\-mno\-powerpc\-gfxopt\fR" 4
|
13657 |
|
|
.IX Item "-mno-powerpc-gfxopt"
|
13658 |
|
|
.IP "\fB\-mpowerpc64\fR" 4
|
13659 |
|
|
.IX Item "-mpowerpc64"
|
13660 |
|
|
.IP "\fB\-mno\-powerpc64\fR" 4
|
13661 |
|
|
.IX Item "-mno-powerpc64"
|
13662 |
|
|
.IP "\fB\-mmfcrf\fR" 4
|
13663 |
|
|
.IX Item "-mmfcrf"
|
13664 |
|
|
.IP "\fB\-mno\-mfcrf\fR" 4
|
13665 |
|
|
.IX Item "-mno-mfcrf"
|
13666 |
|
|
.IP "\fB\-mpopcntb\fR" 4
|
13667 |
|
|
.IX Item "-mpopcntb"
|
13668 |
|
|
.IP "\fB\-mno\-popcntb\fR" 4
|
13669 |
|
|
.IX Item "-mno-popcntb"
|
13670 |
|
|
.IP "\fB\-mpopcntd\fR" 4
|
13671 |
|
|
.IX Item "-mpopcntd"
|
13672 |
|
|
.IP "\fB\-mno\-popcntd\fR" 4
|
13673 |
|
|
.IX Item "-mno-popcntd"
|
13674 |
|
|
.IP "\fB\-mfprnd\fR" 4
|
13675 |
|
|
.IX Item "-mfprnd"
|
13676 |
|
|
.IP "\fB\-mno\-fprnd\fR" 4
|
13677 |
|
|
.IX Item "-mno-fprnd"
|
13678 |
|
|
.IP "\fB\-mcmpb\fR" 4
|
13679 |
|
|
.IX Item "-mcmpb"
|
13680 |
|
|
.IP "\fB\-mno\-cmpb\fR" 4
|
13681 |
|
|
.IX Item "-mno-cmpb"
|
13682 |
|
|
.IP "\fB\-mmfpgpr\fR" 4
|
13683 |
|
|
.IX Item "-mmfpgpr"
|
13684 |
|
|
.IP "\fB\-mno\-mfpgpr\fR" 4
|
13685 |
|
|
.IX Item "-mno-mfpgpr"
|
13686 |
|
|
.IP "\fB\-mhard\-dfp\fR" 4
|
13687 |
|
|
.IX Item "-mhard-dfp"
|
13688 |
|
|
.IP "\fB\-mno\-hard\-dfp\fR" 4
|
13689 |
|
|
.IX Item "-mno-hard-dfp"
|
13690 |
|
|
.PD
|
13691 |
|
|
\&\s-1GCC\s0 supports two related instruction set architectures for the
|
13692 |
|
|
\&\s-1RS/6000\s0 and PowerPC. The \fI\s-1POWER\s0\fR instruction set are those
|
13693 |
|
|
instructions supported by the \fBrios\fR chip set used in the original
|
13694 |
|
|
\&\s-1RS/6000\s0 systems and the \fIPowerPC\fR instruction set is the
|
13695 |
|
|
architecture of the Freescale MPC5xx, MPC6xx, MPC8xx microprocessors, and
|
13696 |
|
|
the \s-1IBM\s0 4xx, 6xx, and follow-on microprocessors.
|
13697 |
|
|
.Sp
|
13698 |
|
|
Neither architecture is a subset of the other. However there is a
|
13699 |
|
|
large common subset of instructions supported by both. An \s-1MQ\s0
|
13700 |
|
|
register is included in processors supporting the \s-1POWER\s0 architecture.
|
13701 |
|
|
.Sp
|
13702 |
|
|
You use these options to specify which instructions are available on the
|
13703 |
|
|
processor you are using. The default value of these options is
|
13704 |
|
|
determined when configuring \s-1GCC\s0. Specifying the
|
13705 |
|
|
\&\fB\-mcpu=\fR\fIcpu_type\fR overrides the specification of these
|
13706 |
|
|
options. We recommend you use the \fB\-mcpu=\fR\fIcpu_type\fR option
|
13707 |
|
|
rather than the options listed above.
|
13708 |
|
|
.Sp
|
13709 |
|
|
The \fB\-mpower\fR option allows \s-1GCC\s0 to generate instructions that
|
13710 |
|
|
are found only in the \s-1POWER\s0 architecture and to use the \s-1MQ\s0 register.
|
13711 |
|
|
Specifying \fB\-mpower2\fR implies \fB\-power\fR and also allows \s-1GCC\s0
|
13712 |
|
|
to generate instructions that are present in the \s-1POWER2\s0 architecture but
|
13713 |
|
|
not the original \s-1POWER\s0 architecture.
|
13714 |
|
|
.Sp
|
13715 |
|
|
The \fB\-mpowerpc\fR option allows \s-1GCC\s0 to generate instructions that
|
13716 |
|
|
are found only in the 32\-bit subset of the PowerPC architecture.
|
13717 |
|
|
Specifying \fB\-mpowerpc\-gpopt\fR implies \fB\-mpowerpc\fR and also allows
|
13718 |
|
|
\&\s-1GCC\s0 to use the optional PowerPC architecture instructions in the
|
13719 |
|
|
General Purpose group, including floating-point square root. Specifying
|
13720 |
|
|
\&\fB\-mpowerpc\-gfxopt\fR implies \fB\-mpowerpc\fR and also allows \s-1GCC\s0 to
|
13721 |
|
|
use the optional PowerPC architecture instructions in the Graphics
|
13722 |
|
|
group, including floating-point select.
|
13723 |
|
|
.Sp
|
13724 |
|
|
The \fB\-mmfcrf\fR option allows \s-1GCC\s0 to generate the move from
|
13725 |
|
|
condition register field instruction implemented on the \s-1POWER4\s0
|
13726 |
|
|
processor and other processors that support the PowerPC V2.01
|
13727 |
|
|
architecture.
|
13728 |
|
|
The \fB\-mpopcntb\fR option allows \s-1GCC\s0 to generate the popcount and
|
13729 |
|
|
double precision \s-1FP\s0 reciprocal estimate instruction implemented on the
|
13730 |
|
|
\&\s-1POWER5\s0 processor and other processors that support the PowerPC V2.02
|
13731 |
|
|
architecture.
|
13732 |
|
|
The \fB\-mpopcntd\fR option allows \s-1GCC\s0 to generate the popcount
|
13733 |
|
|
instruction implemented on the \s-1POWER7\s0 processor and other processors
|
13734 |
|
|
that support the PowerPC V2.06 architecture.
|
13735 |
|
|
The \fB\-mfprnd\fR option allows \s-1GCC\s0 to generate the \s-1FP\s0 round to
|
13736 |
|
|
integer instructions implemented on the \s-1POWER5+\s0 processor and other
|
13737 |
|
|
processors that support the PowerPC V2.03 architecture.
|
13738 |
|
|
The \fB\-mcmpb\fR option allows \s-1GCC\s0 to generate the compare bytes
|
13739 |
|
|
instruction implemented on the \s-1POWER6\s0 processor and other processors
|
13740 |
|
|
that support the PowerPC V2.05 architecture.
|
13741 |
|
|
The \fB\-mmfpgpr\fR option allows \s-1GCC\s0 to generate the \s-1FP\s0 move to/from
|
13742 |
|
|
general purpose register instructions implemented on the \s-1POWER6X\s0
|
13743 |
|
|
processor and other processors that support the extended PowerPC V2.05
|
13744 |
|
|
architecture.
|
13745 |
|
|
The \fB\-mhard\-dfp\fR option allows \s-1GCC\s0 to generate the decimal floating
|
13746 |
|
|
point instructions implemented on some \s-1POWER\s0 processors.
|
13747 |
|
|
.Sp
|
13748 |
|
|
The \fB\-mpowerpc64\fR option allows \s-1GCC\s0 to generate the additional
|
13749 |
|
|
64\-bit instructions that are found in the full PowerPC64 architecture
|
13750 |
|
|
and to treat GPRs as 64\-bit, doubleword quantities. \s-1GCC\s0 defaults to
|
13751 |
|
|
\&\fB\-mno\-powerpc64\fR.
|
13752 |
|
|
.Sp
|
13753 |
|
|
If you specify both \fB\-mno\-power\fR and \fB\-mno\-powerpc\fR, \s-1GCC\s0
|
13754 |
|
|
will use only the instructions in the common subset of both
|
13755 |
|
|
architectures plus some special \s-1AIX\s0 common-mode calls, and will not use
|
13756 |
|
|
the \s-1MQ\s0 register. Specifying both \fB\-mpower\fR and \fB\-mpowerpc\fR
|
13757 |
|
|
permits \s-1GCC\s0 to use any instruction from either architecture and to
|
13758 |
|
|
allow use of the \s-1MQ\s0 register; specify this for the Motorola \s-1MPC601\s0.
|
13759 |
|
|
.IP "\fB\-mnew\-mnemonics\fR" 4
|
13760 |
|
|
.IX Item "-mnew-mnemonics"
|
13761 |
|
|
.PD 0
|
13762 |
|
|
.IP "\fB\-mold\-mnemonics\fR" 4
|
13763 |
|
|
.IX Item "-mold-mnemonics"
|
13764 |
|
|
.PD
|
13765 |
|
|
Select which mnemonics to use in the generated assembler code. With
|
13766 |
|
|
\&\fB\-mnew\-mnemonics\fR, \s-1GCC\s0 uses the assembler mnemonics defined for
|
13767 |
|
|
the PowerPC architecture. With \fB\-mold\-mnemonics\fR it uses the
|
13768 |
|
|
assembler mnemonics defined for the \s-1POWER\s0 architecture. Instructions
|
13769 |
|
|
defined in only one architecture have only one mnemonic; \s-1GCC\s0 uses that
|
13770 |
|
|
mnemonic irrespective of which of these options is specified.
|
13771 |
|
|
.Sp
|
13772 |
|
|
\&\s-1GCC\s0 defaults to the mnemonics appropriate for the architecture in
|
13773 |
|
|
use. Specifying \fB\-mcpu=\fR\fIcpu_type\fR sometimes overrides the
|
13774 |
|
|
value of these option. Unless you are building a cross-compiler, you
|
13775 |
|
|
should normally not specify either \fB\-mnew\-mnemonics\fR or
|
13776 |
|
|
\&\fB\-mold\-mnemonics\fR, but should instead accept the default.
|
13777 |
|
|
.IP "\fB\-mcpu=\fR\fIcpu_type\fR" 4
|
13778 |
|
|
.IX Item "-mcpu=cpu_type"
|
13779 |
|
|
Set architecture type, register usage, choice of mnemonics, and
|
13780 |
|
|
instruction scheduling parameters for machine type \fIcpu_type\fR.
|
13781 |
|
|
Supported values for \fIcpu_type\fR are \fB401\fR, \fB403\fR,
|
13782 |
|
|
\&\fB405\fR, \fB405fp\fR, \fB440\fR, \fB440fp\fR, \fB464\fR, \fB464fp\fR,
|
13783 |
|
|
\&\fB476\fR, \fB476fp\fR, \fB505\fR, \fB601\fR, \fB602\fR, \fB603\fR,
|
13784 |
|
|
\&\fB603e\fR, \fB604\fR, \fB604e\fR, \fB620\fR, \fB630\fR, \fB740\fR,
|
13785 |
|
|
\&\fB7400\fR, \fB7450\fR, \fB750\fR, \fB801\fR, \fB821\fR, \fB823\fR,
|
13786 |
|
|
\&\fB860\fR, \fB970\fR, \fB8540\fR, \fBa2\fR, \fBe300c2\fR,
|
13787 |
|
|
\&\fBe300c3\fR, \fBe500mc\fR, \fBe500mc64\fR, \fBec603e\fR, \fBG3\fR,
|
13788 |
|
|
\&\fBG4\fR, \fBG5\fR, \fBpower\fR, \fBpower2\fR, \fBpower3\fR,
|
13789 |
|
|
\&\fBpower4\fR, \fBpower5\fR, \fBpower5+\fR, \fBpower6\fR, \fBpower6x\fR,
|
13790 |
|
|
\&\fBpower7\fR, \fBcommon\fR, \fBpowerpc\fR, \fBpowerpc64\fR, \fBrios\fR,
|
13791 |
|
|
\&\fBrios1\fR, \fBrios2\fR, \fBrsc\fR, and \fBrs64\fR.
|
13792 |
|
|
.Sp
|
13793 |
|
|
\&\fB\-mcpu=common\fR selects a completely generic processor. Code
|
13794 |
|
|
generated under this option will run on any \s-1POWER\s0 or PowerPC processor.
|
13795 |
|
|
\&\s-1GCC\s0 will use only the instructions in the common subset of both
|
13796 |
|
|
architectures, and will not use the \s-1MQ\s0 register. \s-1GCC\s0 assumes a generic
|
13797 |
|
|
processor model for scheduling purposes.
|
13798 |
|
|
.Sp
|
13799 |
|
|
\&\fB\-mcpu=power\fR, \fB\-mcpu=power2\fR, \fB\-mcpu=powerpc\fR, and
|
13800 |
|
|
\&\fB\-mcpu=powerpc64\fR specify generic \s-1POWER\s0, \s-1POWER2\s0, pure 32\-bit
|
13801 |
|
|
PowerPC (i.e., not \s-1MPC601\s0), and 64\-bit PowerPC architecture machine
|
13802 |
|
|
types, with an appropriate, generic processor model assumed for
|
13803 |
|
|
scheduling purposes.
|
13804 |
|
|
.Sp
|
13805 |
|
|
The other options specify a specific processor. Code generated under
|
13806 |
|
|
those options will run best on that processor, and may not run at all on
|
13807 |
|
|
others.
|
13808 |
|
|
.Sp
|
13809 |
|
|
The \fB\-mcpu\fR options automatically enable or disable the
|
13810 |
|
|
following options:
|
13811 |
|
|
.Sp
|
13812 |
|
|
\&\fB\-maltivec \-mfprnd \-mhard\-float \-mmfcrf \-mmultiple
|
13813 |
|
|
\&\-mnew\-mnemonics \-mpopcntb \-mpopcntd \-mpower \-mpower2 \-mpowerpc64
|
13814 |
|
|
\&\-mpowerpc\-gpopt \-mpowerpc\-gfxopt \-msingle\-float \-mdouble\-float
|
13815 |
|
|
\&\-msimple\-fpu \-mstring \-mmulhw \-mdlmzb \-mmfpgpr \-mvsx\fR
|
13816 |
|
|
.Sp
|
13817 |
|
|
The particular options set for any particular \s-1CPU\s0 will vary between
|
13818 |
|
|
compiler versions, depending on what setting seems to produce optimal
|
13819 |
|
|
code for that \s-1CPU\s0; it doesn't necessarily reflect the actual hardware's
|
13820 |
|
|
capabilities. If you wish to set an individual option to a particular
|
13821 |
|
|
value, you may specify it after the \fB\-mcpu\fR option, like
|
13822 |
|
|
\&\fB\-mcpu=970 \-mno\-altivec\fR.
|
13823 |
|
|
.Sp
|
13824 |
|
|
On \s-1AIX\s0, the \fB\-maltivec\fR and \fB\-mpowerpc64\fR options are
|
13825 |
|
|
not enabled or disabled by the \fB\-mcpu\fR option at present because
|
13826 |
|
|
\&\s-1AIX\s0 does not have full support for these options. You may still
|
13827 |
|
|
enable or disable them individually if you're sure it'll work in your
|
13828 |
|
|
environment.
|
13829 |
|
|
.IP "\fB\-mtune=\fR\fIcpu_type\fR" 4
|
13830 |
|
|
.IX Item "-mtune=cpu_type"
|
13831 |
|
|
Set the instruction scheduling parameters for machine type
|
13832 |
|
|
\&\fIcpu_type\fR, but do not set the architecture type, register usage, or
|
13833 |
|
|
choice of mnemonics, as \fB\-mcpu=\fR\fIcpu_type\fR would. The same
|
13834 |
|
|
values for \fIcpu_type\fR are used for \fB\-mtune\fR as for
|
13835 |
|
|
\&\fB\-mcpu\fR. If both are specified, the code generated will use the
|
13836 |
|
|
architecture, registers, and mnemonics set by \fB\-mcpu\fR, but the
|
13837 |
|
|
scheduling parameters set by \fB\-mtune\fR.
|
13838 |
|
|
.IP "\fB\-mswdiv\fR" 4
|
13839 |
|
|
.IX Item "-mswdiv"
|
13840 |
|
|
.PD 0
|
13841 |
|
|
.IP "\fB\-mno\-swdiv\fR" 4
|
13842 |
|
|
.IX Item "-mno-swdiv"
|
13843 |
|
|
.PD
|
13844 |
|
|
Generate code to compute division as reciprocal estimate and iterative
|
13845 |
|
|
refinement, creating opportunities for increased throughput. This
|
13846 |
|
|
feature requires: optional PowerPC Graphics instruction set for single
|
13847 |
|
|
precision and \s-1FRE\s0 instruction for double precision, assuming divides
|
13848 |
|
|
cannot generate user-visible traps, and the domain values not include
|
13849 |
|
|
Infinities, denormals or zero denominator.
|
13850 |
|
|
.IP "\fB\-maltivec\fR" 4
|
13851 |
|
|
.IX Item "-maltivec"
|
13852 |
|
|
.PD 0
|
13853 |
|
|
.IP "\fB\-mno\-altivec\fR" 4
|
13854 |
|
|
.IX Item "-mno-altivec"
|
13855 |
|
|
.PD
|
13856 |
|
|
Generate code that uses (does not use) AltiVec instructions, and also
|
13857 |
|
|
enable the use of built-in functions that allow more direct access to
|
13858 |
|
|
the AltiVec instruction set. You may also need to set
|
13859 |
|
|
\&\fB\-mabi=altivec\fR to adjust the current \s-1ABI\s0 with AltiVec \s-1ABI\s0
|
13860 |
|
|
enhancements.
|
13861 |
|
|
.IP "\fB\-mvrsave\fR" 4
|
13862 |
|
|
.IX Item "-mvrsave"
|
13863 |
|
|
.PD 0
|
13864 |
|
|
.IP "\fB\-mno\-vrsave\fR" 4
|
13865 |
|
|
.IX Item "-mno-vrsave"
|
13866 |
|
|
.PD
|
13867 |
|
|
Generate \s-1VRSAVE\s0 instructions when generating AltiVec code.
|
13868 |
|
|
.IP "\fB\-mgen\-cell\-microcode\fR" 4
|
13869 |
|
|
.IX Item "-mgen-cell-microcode"
|
13870 |
|
|
Generate Cell microcode instructions
|
13871 |
|
|
.IP "\fB\-mwarn\-cell\-microcode\fR" 4
|
13872 |
|
|
.IX Item "-mwarn-cell-microcode"
|
13873 |
|
|
Warning when a Cell microcode instruction is going to emitted. An example
|
13874 |
|
|
of a Cell microcode instruction is a variable shift.
|
13875 |
|
|
.IP "\fB\-msecure\-plt\fR" 4
|
13876 |
|
|
.IX Item "-msecure-plt"
|
13877 |
|
|
Generate code that allows ld and ld.so to build executables and shared
|
13878 |
|
|
libraries with non-exec .plt and .got sections. This is a PowerPC
|
13879 |
|
|
32\-bit \s-1SYSV\s0 \s-1ABI\s0 option.
|
13880 |
|
|
.IP "\fB\-mbss\-plt\fR" 4
|
13881 |
|
|
.IX Item "-mbss-plt"
|
13882 |
|
|
Generate code that uses a \s-1BSS\s0 .plt section that ld.so fills in, and
|
13883 |
|
|
requires .plt and .got sections that are both writable and executable.
|
13884 |
|
|
This is a PowerPC 32\-bit \s-1SYSV\s0 \s-1ABI\s0 option.
|
13885 |
|
|
.IP "\fB\-misel\fR" 4
|
13886 |
|
|
.IX Item "-misel"
|
13887 |
|
|
.PD 0
|
13888 |
|
|
.IP "\fB\-mno\-isel\fR" 4
|
13889 |
|
|
.IX Item "-mno-isel"
|
13890 |
|
|
.PD
|
13891 |
|
|
This switch enables or disables the generation of \s-1ISEL\s0 instructions.
|
13892 |
|
|
.IP "\fB\-misel=\fR\fIyes/no\fR" 4
|
13893 |
|
|
.IX Item "-misel=yes/no"
|
13894 |
|
|
This switch has been deprecated. Use \fB\-misel\fR and
|
13895 |
|
|
\&\fB\-mno\-isel\fR instead.
|
13896 |
|
|
.IP "\fB\-mspe\fR" 4
|
13897 |
|
|
.IX Item "-mspe"
|
13898 |
|
|
.PD 0
|
13899 |
|
|
.IP "\fB\-mno\-spe\fR" 4
|
13900 |
|
|
.IX Item "-mno-spe"
|
13901 |
|
|
.PD
|
13902 |
|
|
This switch enables or disables the generation of \s-1SPE\s0 simd
|
13903 |
|
|
instructions.
|
13904 |
|
|
.IP "\fB\-mpaired\fR" 4
|
13905 |
|
|
.IX Item "-mpaired"
|
13906 |
|
|
.PD 0
|
13907 |
|
|
.IP "\fB\-mno\-paired\fR" 4
|
13908 |
|
|
.IX Item "-mno-paired"
|
13909 |
|
|
.PD
|
13910 |
|
|
This switch enables or disables the generation of \s-1PAIRED\s0 simd
|
13911 |
|
|
instructions.
|
13912 |
|
|
.IP "\fB\-mspe=\fR\fIyes/no\fR" 4
|
13913 |
|
|
.IX Item "-mspe=yes/no"
|
13914 |
|
|
This option has been deprecated. Use \fB\-mspe\fR and
|
13915 |
|
|
\&\fB\-mno\-spe\fR instead.
|
13916 |
|
|
.IP "\fB\-mvsx\fR" 4
|
13917 |
|
|
.IX Item "-mvsx"
|
13918 |
|
|
.PD 0
|
13919 |
|
|
.IP "\fB\-mno\-vsx\fR" 4
|
13920 |
|
|
.IX Item "-mno-vsx"
|
13921 |
|
|
.PD
|
13922 |
|
|
Generate code that uses (does not use) vector/scalar (\s-1VSX\s0)
|
13923 |
|
|
instructions, and also enable the use of built-in functions that allow
|
13924 |
|
|
more direct access to the \s-1VSX\s0 instruction set.
|
13925 |
|
|
.IP "\fB\-mfloat\-gprs=\fR\fIyes/single/double/no\fR" 4
|
13926 |
|
|
.IX Item "-mfloat-gprs=yes/single/double/no"
|
13927 |
|
|
.PD 0
|
13928 |
|
|
.IP "\fB\-mfloat\-gprs\fR" 4
|
13929 |
|
|
.IX Item "-mfloat-gprs"
|
13930 |
|
|
.PD
|
13931 |
|
|
This switch enables or disables the generation of floating point
|
13932 |
|
|
operations on the general purpose registers for architectures that
|
13933 |
|
|
support it.
|
13934 |
|
|
.Sp
|
13935 |
|
|
The argument \fIyes\fR or \fIsingle\fR enables the use of
|
13936 |
|
|
single-precision floating point operations.
|
13937 |
|
|
.Sp
|
13938 |
|
|
The argument \fIdouble\fR enables the use of single and
|
13939 |
|
|
double-precision floating point operations.
|
13940 |
|
|
.Sp
|
13941 |
|
|
The argument \fIno\fR disables floating point operations on the
|
13942 |
|
|
general purpose registers.
|
13943 |
|
|
.Sp
|
13944 |
|
|
This option is currently only available on the MPC854x.
|
13945 |
|
|
.IP "\fB\-m32\fR" 4
|
13946 |
|
|
.IX Item "-m32"
|
13947 |
|
|
.PD 0
|
13948 |
|
|
.IP "\fB\-m64\fR" 4
|
13949 |
|
|
.IX Item "-m64"
|
13950 |
|
|
.PD
|
13951 |
|
|
Generate code for 32\-bit or 64\-bit environments of Darwin and \s-1SVR4\s0
|
13952 |
|
|
targets (including GNU/Linux). The 32\-bit environment sets int, long
|
13953 |
|
|
and pointer to 32 bits and generates code that runs on any PowerPC
|
13954 |
|
|
variant. The 64\-bit environment sets int to 32 bits and long and
|
13955 |
|
|
pointer to 64 bits, and generates code for PowerPC64, as for
|
13956 |
|
|
\&\fB\-mpowerpc64\fR.
|
13957 |
|
|
.IP "\fB\-mfull\-toc\fR" 4
|
13958 |
|
|
.IX Item "-mfull-toc"
|
13959 |
|
|
.PD 0
|
13960 |
|
|
.IP "\fB\-mno\-fp\-in\-toc\fR" 4
|
13961 |
|
|
.IX Item "-mno-fp-in-toc"
|
13962 |
|
|
.IP "\fB\-mno\-sum\-in\-toc\fR" 4
|
13963 |
|
|
.IX Item "-mno-sum-in-toc"
|
13964 |
|
|
.IP "\fB\-mminimal\-toc\fR" 4
|
13965 |
|
|
.IX Item "-mminimal-toc"
|
13966 |
|
|
.PD
|
13967 |
|
|
Modify generation of the \s-1TOC\s0 (Table Of Contents), which is created for
|
13968 |
|
|
every executable file. The \fB\-mfull\-toc\fR option is selected by
|
13969 |
|
|
default. In that case, \s-1GCC\s0 will allocate at least one \s-1TOC\s0 entry for
|
13970 |
|
|
each unique non-automatic variable reference in your program. \s-1GCC\s0
|
13971 |
|
|
will also place floating-point constants in the \s-1TOC\s0. However, only
|
13972 |
|
|
16,384 entries are available in the \s-1TOC\s0.
|
13973 |
|
|
.Sp
|
13974 |
|
|
If you receive a linker error message that saying you have overflowed
|
13975 |
|
|
the available \s-1TOC\s0 space, you can reduce the amount of \s-1TOC\s0 space used
|
13976 |
|
|
with the \fB\-mno\-fp\-in\-toc\fR and \fB\-mno\-sum\-in\-toc\fR options.
|
13977 |
|
|
\&\fB\-mno\-fp\-in\-toc\fR prevents \s-1GCC\s0 from putting floating-point
|
13978 |
|
|
constants in the \s-1TOC\s0 and \fB\-mno\-sum\-in\-toc\fR forces \s-1GCC\s0 to
|
13979 |
|
|
generate code to calculate the sum of an address and a constant at
|
13980 |
|
|
run-time instead of putting that sum into the \s-1TOC\s0. You may specify one
|
13981 |
|
|
or both of these options. Each causes \s-1GCC\s0 to produce very slightly
|
13982 |
|
|
slower and larger code at the expense of conserving \s-1TOC\s0 space.
|
13983 |
|
|
.Sp
|
13984 |
|
|
If you still run out of space in the \s-1TOC\s0 even when you specify both of
|
13985 |
|
|
these options, specify \fB\-mminimal\-toc\fR instead. This option causes
|
13986 |
|
|
\&\s-1GCC\s0 to make only one \s-1TOC\s0 entry for every file. When you specify this
|
13987 |
|
|
option, \s-1GCC\s0 will produce code that is slower and larger but which
|
13988 |
|
|
uses extremely little \s-1TOC\s0 space. You may wish to use this option
|
13989 |
|
|
only on files that contain less frequently executed code.
|
13990 |
|
|
.IP "\fB\-maix64\fR" 4
|
13991 |
|
|
.IX Item "-maix64"
|
13992 |
|
|
.PD 0
|
13993 |
|
|
.IP "\fB\-maix32\fR" 4
|
13994 |
|
|
.IX Item "-maix32"
|
13995 |
|
|
.PD
|
13996 |
|
|
Enable 64\-bit \s-1AIX\s0 \s-1ABI\s0 and calling convention: 64\-bit pointers, 64\-bit
|
13997 |
|
|
\&\f(CW\*(C`long\*(C'\fR type, and the infrastructure needed to support them.
|
13998 |
|
|
Specifying \fB\-maix64\fR implies \fB\-mpowerpc64\fR and
|
13999 |
|
|
\&\fB\-mpowerpc\fR, while \fB\-maix32\fR disables the 64\-bit \s-1ABI\s0 and
|
14000 |
|
|
implies \fB\-mno\-powerpc64\fR. \s-1GCC\s0 defaults to \fB\-maix32\fR.
|
14001 |
|
|
.IP "\fB\-mxl\-compat\fR" 4
|
14002 |
|
|
.IX Item "-mxl-compat"
|
14003 |
|
|
.PD 0
|
14004 |
|
|
.IP "\fB\-mno\-xl\-compat\fR" 4
|
14005 |
|
|
.IX Item "-mno-xl-compat"
|
14006 |
|
|
.PD
|
14007 |
|
|
Produce code that conforms more closely to \s-1IBM\s0 \s-1XL\s0 compiler semantics
|
14008 |
|
|
when using AIX-compatible \s-1ABI\s0. Pass floating-point arguments to
|
14009 |
|
|
prototyped functions beyond the register save area (\s-1RSA\s0) on the stack
|
14010 |
|
|
in addition to argument FPRs. Do not assume that most significant
|
14011 |
|
|
double in 128\-bit long double value is properly rounded when comparing
|
14012 |
|
|
values and converting to double. Use \s-1XL\s0 symbol names for long double
|
14013 |
|
|
support routines.
|
14014 |
|
|
.Sp
|
14015 |
|
|
The \s-1AIX\s0 calling convention was extended but not initially documented to
|
14016 |
|
|
handle an obscure K&R C case of calling a function that takes the
|
14017 |
|
|
address of its arguments with fewer arguments than declared. \s-1IBM\s0 \s-1XL\s0
|
14018 |
|
|
compilers access floating point arguments which do not fit in the
|
14019 |
|
|
\&\s-1RSA\s0 from the stack when a subroutine is compiled without
|
14020 |
|
|
optimization. Because always storing floating-point arguments on the
|
14021 |
|
|
stack is inefficient and rarely needed, this option is not enabled by
|
14022 |
|
|
default and only is necessary when calling subroutines compiled by \s-1IBM\s0
|
14023 |
|
|
\&\s-1XL\s0 compilers without optimization.
|
14024 |
|
|
.IP "\fB\-mpe\fR" 4
|
14025 |
|
|
.IX Item "-mpe"
|
14026 |
|
|
Support \fI\s-1IBM\s0 \s-1RS/6000\s0 \s-1SP\s0\fR \fIParallel Environment\fR (\s-1PE\s0). Link an
|
14027 |
|
|
application written to use message passing with special startup code to
|
14028 |
|
|
enable the application to run. The system must have \s-1PE\s0 installed in the
|
14029 |
|
|
standard location (\fI/usr/lpp/ppe.poe/\fR), or the \fIspecs\fR file
|
14030 |
|
|
must be overridden with the \fB\-specs=\fR option to specify the
|
14031 |
|
|
appropriate directory location. The Parallel Environment does not
|
14032 |
|
|
support threads, so the \fB\-mpe\fR option and the \fB\-pthread\fR
|
14033 |
|
|
option are incompatible.
|
14034 |
|
|
.IP "\fB\-malign\-natural\fR" 4
|
14035 |
|
|
.IX Item "-malign-natural"
|
14036 |
|
|
.PD 0
|
14037 |
|
|
.IP "\fB\-malign\-power\fR" 4
|
14038 |
|
|
.IX Item "-malign-power"
|
14039 |
|
|
.PD
|
14040 |
|
|
On \s-1AIX\s0, 32\-bit Darwin, and 64\-bit PowerPC GNU/Linux, the option
|
14041 |
|
|
\&\fB\-malign\-natural\fR overrides the ABI-defined alignment of larger
|
14042 |
|
|
types, such as floating-point doubles, on their natural size-based boundary.
|
14043 |
|
|
The option \fB\-malign\-power\fR instructs \s-1GCC\s0 to follow the ABI-specified
|
14044 |
|
|
alignment rules. \s-1GCC\s0 defaults to the standard alignment defined in the \s-1ABI\s0.
|
14045 |
|
|
.Sp
|
14046 |
|
|
On 64\-bit Darwin, natural alignment is the default, and \fB\-malign\-power\fR
|
14047 |
|
|
is not supported.
|
14048 |
|
|
.IP "\fB\-msoft\-float\fR" 4
|
14049 |
|
|
.IX Item "-msoft-float"
|
14050 |
|
|
.PD 0
|
14051 |
|
|
.IP "\fB\-mhard\-float\fR" 4
|
14052 |
|
|
.IX Item "-mhard-float"
|
14053 |
|
|
.PD
|
14054 |
|
|
Generate code that does not use (uses) the floating-point register set.
|
14055 |
|
|
Software floating point emulation is provided if you use the
|
14056 |
|
|
\&\fB\-msoft\-float\fR option, and pass the option to \s-1GCC\s0 when linking.
|
14057 |
|
|
.IP "\fB\-msingle\-float\fR" 4
|
14058 |
|
|
.IX Item "-msingle-float"
|
14059 |
|
|
.PD 0
|
14060 |
|
|
.IP "\fB\-mdouble\-float\fR" 4
|
14061 |
|
|
.IX Item "-mdouble-float"
|
14062 |
|
|
.PD
|
14063 |
|
|
Generate code for single or double-precision floating point operations.
|
14064 |
|
|
\&\fB\-mdouble\-float\fR implies \fB\-msingle\-float\fR.
|
14065 |
|
|
.IP "\fB\-msimple\-fpu\fR" 4
|
14066 |
|
|
.IX Item "-msimple-fpu"
|
14067 |
|
|
Do not generate sqrt and div instructions for hardware floating point unit.
|
14068 |
|
|
.IP "\fB\-mfpu\fR" 4
|
14069 |
|
|
.IX Item "-mfpu"
|
14070 |
|
|
Specify type of floating point unit. Valid values are \fIsp_lite\fR
|
14071 |
|
|
(equivalent to \-msingle\-float \-msimple\-fpu), \fIdp_lite\fR (equivalent
|
14072 |
|
|
to \-mdouble\-float \-msimple\-fpu), \fIsp_full\fR (equivalent to \-msingle\-float),
|
14073 |
|
|
and \fIdp_full\fR (equivalent to \-mdouble\-float).
|
14074 |
|
|
.IP "\fB\-mxilinx\-fpu\fR" 4
|
14075 |
|
|
.IX Item "-mxilinx-fpu"
|
14076 |
|
|
Perform optimizations for floating point unit on Xilinx \s-1PPC\s0 405/440.
|
14077 |
|
|
.IP "\fB\-mmultiple\fR" 4
|
14078 |
|
|
.IX Item "-mmultiple"
|
14079 |
|
|
.PD 0
|
14080 |
|
|
.IP "\fB\-mno\-multiple\fR" 4
|
14081 |
|
|
.IX Item "-mno-multiple"
|
14082 |
|
|
.PD
|
14083 |
|
|
Generate code that uses (does not use) the load multiple word
|
14084 |
|
|
instructions and the store multiple word instructions. These
|
14085 |
|
|
instructions are generated by default on \s-1POWER\s0 systems, and not
|
14086 |
|
|
generated on PowerPC systems. Do not use \fB\-mmultiple\fR on little
|
14087 |
|
|
endian PowerPC systems, since those instructions do not work when the
|
14088 |
|
|
processor is in little endian mode. The exceptions are \s-1PPC740\s0 and
|
14089 |
|
|
\&\s-1PPC750\s0 which permit the instructions usage in little endian mode.
|
14090 |
|
|
.IP "\fB\-mstring\fR" 4
|
14091 |
|
|
.IX Item "-mstring"
|
14092 |
|
|
.PD 0
|
14093 |
|
|
.IP "\fB\-mno\-string\fR" 4
|
14094 |
|
|
.IX Item "-mno-string"
|
14095 |
|
|
.PD
|
14096 |
|
|
Generate code that uses (does not use) the load string instructions
|
14097 |
|
|
and the store string word instructions to save multiple registers and
|
14098 |
|
|
do small block moves. These instructions are generated by default on
|
14099 |
|
|
\&\s-1POWER\s0 systems, and not generated on PowerPC systems. Do not use
|
14100 |
|
|
\&\fB\-mstring\fR on little endian PowerPC systems, since those
|
14101 |
|
|
instructions do not work when the processor is in little endian mode.
|
14102 |
|
|
The exceptions are \s-1PPC740\s0 and \s-1PPC750\s0 which permit the instructions
|
14103 |
|
|
usage in little endian mode.
|
14104 |
|
|
.IP "\fB\-mupdate\fR" 4
|
14105 |
|
|
.IX Item "-mupdate"
|
14106 |
|
|
.PD 0
|
14107 |
|
|
.IP "\fB\-mno\-update\fR" 4
|
14108 |
|
|
.IX Item "-mno-update"
|
14109 |
|
|
.PD
|
14110 |
|
|
Generate code that uses (does not use) the load or store instructions
|
14111 |
|
|
that update the base register to the address of the calculated memory
|
14112 |
|
|
location. These instructions are generated by default. If you use
|
14113 |
|
|
\&\fB\-mno\-update\fR, there is a small window between the time that the
|
14114 |
|
|
stack pointer is updated and the address of the previous frame is
|
14115 |
|
|
stored, which means code that walks the stack frame across interrupts or
|
14116 |
|
|
signals may get corrupted data.
|
14117 |
|
|
.IP "\fB\-mavoid\-indexed\-addresses\fR" 4
|
14118 |
|
|
.IX Item "-mavoid-indexed-addresses"
|
14119 |
|
|
.PD 0
|
14120 |
|
|
.IP "\fB\-mno\-avoid\-indexed\-addresses\fR" 4
|
14121 |
|
|
.IX Item "-mno-avoid-indexed-addresses"
|
14122 |
|
|
.PD
|
14123 |
|
|
Generate code that tries to avoid (not avoid) the use of indexed load
|
14124 |
|
|
or store instructions. These instructions can incur a performance
|
14125 |
|
|
penalty on Power6 processors in certain situations, such as when
|
14126 |
|
|
stepping through large arrays that cross a 16M boundary. This option
|
14127 |
|
|
is enabled by default when targetting Power6 and disabled otherwise.
|
14128 |
|
|
.IP "\fB\-mfused\-madd\fR" 4
|
14129 |
|
|
.IX Item "-mfused-madd"
|
14130 |
|
|
.PD 0
|
14131 |
|
|
.IP "\fB\-mno\-fused\-madd\fR" 4
|
14132 |
|
|
.IX Item "-mno-fused-madd"
|
14133 |
|
|
.PD
|
14134 |
|
|
Generate code that uses (does not use) the floating point multiply and
|
14135 |
|
|
accumulate instructions. These instructions are generated by default if
|
14136 |
|
|
hardware floating is used.
|
14137 |
|
|
.IP "\fB\-mmulhw\fR" 4
|
14138 |
|
|
.IX Item "-mmulhw"
|
14139 |
|
|
.PD 0
|
14140 |
|
|
.IP "\fB\-mno\-mulhw\fR" 4
|
14141 |
|
|
.IX Item "-mno-mulhw"
|
14142 |
|
|
.PD
|
14143 |
|
|
Generate code that uses (does not use) the half-word multiply and
|
14144 |
|
|
multiply-accumulate instructions on the \s-1IBM\s0 405, 440, 464 and 476 processors.
|
14145 |
|
|
These instructions are generated by default when targetting those
|
14146 |
|
|
processors.
|
14147 |
|
|
.IP "\fB\-mdlmzb\fR" 4
|
14148 |
|
|
.IX Item "-mdlmzb"
|
14149 |
|
|
.PD 0
|
14150 |
|
|
.IP "\fB\-mno\-dlmzb\fR" 4
|
14151 |
|
|
.IX Item "-mno-dlmzb"
|
14152 |
|
|
.PD
|
14153 |
|
|
Generate code that uses (does not use) the string-search \fBdlmzb\fR
|
14154 |
|
|
instruction on the \s-1IBM\s0 405, 440, 464 and 476 processors. This instruction is
|
14155 |
|
|
generated by default when targetting those processors.
|
14156 |
|
|
.IP "\fB\-mno\-bit\-align\fR" 4
|
14157 |
|
|
.IX Item "-mno-bit-align"
|
14158 |
|
|
.PD 0
|
14159 |
|
|
.IP "\fB\-mbit\-align\fR" 4
|
14160 |
|
|
.IX Item "-mbit-align"
|
14161 |
|
|
.PD
|
14162 |
|
|
On System V.4 and embedded PowerPC systems do not (do) force structures
|
14163 |
|
|
and unions that contain bit-fields to be aligned to the base type of the
|
14164 |
|
|
bit-field.
|
14165 |
|
|
.Sp
|
14166 |
|
|
For example, by default a structure containing nothing but 8
|
14167 |
|
|
\&\f(CW\*(C`unsigned\*(C'\fR bit-fields of length 1 would be aligned to a 4 byte
|
14168 |
|
|
boundary and have a size of 4 bytes. By using \fB\-mno\-bit\-align\fR,
|
14169 |
|
|
the structure would be aligned to a 1 byte boundary and be one byte in
|
14170 |
|
|
size.
|
14171 |
|
|
.IP "\fB\-mno\-strict\-align\fR" 4
|
14172 |
|
|
.IX Item "-mno-strict-align"
|
14173 |
|
|
.PD 0
|
14174 |
|
|
.IP "\fB\-mstrict\-align\fR" 4
|
14175 |
|
|
.IX Item "-mstrict-align"
|
14176 |
|
|
.PD
|
14177 |
|
|
On System V.4 and embedded PowerPC systems do not (do) assume that
|
14178 |
|
|
unaligned memory references will be handled by the system.
|
14179 |
|
|
.IP "\fB\-mrelocatable\fR" 4
|
14180 |
|
|
.IX Item "-mrelocatable"
|
14181 |
|
|
.PD 0
|
14182 |
|
|
.IP "\fB\-mno\-relocatable\fR" 4
|
14183 |
|
|
.IX Item "-mno-relocatable"
|
14184 |
|
|
.PD
|
14185 |
|
|
On embedded PowerPC systems generate code that allows (does not allow)
|
14186 |
|
|
the program to be relocated to a different address at runtime. If you
|
14187 |
|
|
use \fB\-mrelocatable\fR on any module, all objects linked together must
|
14188 |
|
|
be compiled with \fB\-mrelocatable\fR or \fB\-mrelocatable\-lib\fR.
|
14189 |
|
|
.IP "\fB\-mrelocatable\-lib\fR" 4
|
14190 |
|
|
.IX Item "-mrelocatable-lib"
|
14191 |
|
|
.PD 0
|
14192 |
|
|
.IP "\fB\-mno\-relocatable\-lib\fR" 4
|
14193 |
|
|
.IX Item "-mno-relocatable-lib"
|
14194 |
|
|
.PD
|
14195 |
|
|
On embedded PowerPC systems generate code that allows (does not allow)
|
14196 |
|
|
the program to be relocated to a different address at runtime. Modules
|
14197 |
|
|
compiled with \fB\-mrelocatable\-lib\fR can be linked with either modules
|
14198 |
|
|
compiled without \fB\-mrelocatable\fR and \fB\-mrelocatable\-lib\fR or
|
14199 |
|
|
with modules compiled with the \fB\-mrelocatable\fR options.
|
14200 |
|
|
.IP "\fB\-mno\-toc\fR" 4
|
14201 |
|
|
.IX Item "-mno-toc"
|
14202 |
|
|
.PD 0
|
14203 |
|
|
.IP "\fB\-mtoc\fR" 4
|
14204 |
|
|
.IX Item "-mtoc"
|
14205 |
|
|
.PD
|
14206 |
|
|
On System V.4 and embedded PowerPC systems do not (do) assume that
|
14207 |
|
|
register 2 contains a pointer to a global area pointing to the addresses
|
14208 |
|
|
used in the program.
|
14209 |
|
|
.IP "\fB\-mlittle\fR" 4
|
14210 |
|
|
.IX Item "-mlittle"
|
14211 |
|
|
.PD 0
|
14212 |
|
|
.IP "\fB\-mlittle\-endian\fR" 4
|
14213 |
|
|
.IX Item "-mlittle-endian"
|
14214 |
|
|
.PD
|
14215 |
|
|
On System V.4 and embedded PowerPC systems compile code for the
|
14216 |
|
|
processor in little endian mode. The \fB\-mlittle\-endian\fR option is
|
14217 |
|
|
the same as \fB\-mlittle\fR.
|
14218 |
|
|
.IP "\fB\-mbig\fR" 4
|
14219 |
|
|
.IX Item "-mbig"
|
14220 |
|
|
.PD 0
|
14221 |
|
|
.IP "\fB\-mbig\-endian\fR" 4
|
14222 |
|
|
.IX Item "-mbig-endian"
|
14223 |
|
|
.PD
|
14224 |
|
|
On System V.4 and embedded PowerPC systems compile code for the
|
14225 |
|
|
processor in big endian mode. The \fB\-mbig\-endian\fR option is
|
14226 |
|
|
the same as \fB\-mbig\fR.
|
14227 |
|
|
.IP "\fB\-mdynamic\-no\-pic\fR" 4
|
14228 |
|
|
.IX Item "-mdynamic-no-pic"
|
14229 |
|
|
On Darwin and Mac \s-1OS\s0 X systems, compile code so that it is not
|
14230 |
|
|
relocatable, but that its external references are relocatable. The
|
14231 |
|
|
resulting code is suitable for applications, but not shared
|
14232 |
|
|
libraries.
|
14233 |
|
|
.IP "\fB\-mprioritize\-restricted\-insns=\fR\fIpriority\fR" 4
|
14234 |
|
|
.IX Item "-mprioritize-restricted-insns=priority"
|
14235 |
|
|
This option controls the priority that is assigned to
|
14236 |
|
|
dispatch-slot restricted instructions during the second scheduling
|
14237 |
|
|
pass. The argument \fIpriority\fR takes the value \fI0/1/2\fR to assign
|
14238 |
|
|
\&\fIno/highest/second\-highest\fR priority to dispatch slot restricted
|
14239 |
|
|
instructions.
|
14240 |
|
|
.IP "\fB\-msched\-costly\-dep=\fR\fIdependence_type\fR" 4
|
14241 |
|
|
.IX Item "-msched-costly-dep=dependence_type"
|
14242 |
|
|
This option controls which dependences are considered costly
|
14243 |
|
|
by the target during instruction scheduling. The argument
|
14244 |
|
|
\&\fIdependence_type\fR takes one of the following values:
|
14245 |
|
|
\&\fIno\fR: no dependence is costly,
|
14246 |
|
|
\&\fIall\fR: all dependences are costly,
|
14247 |
|
|
\&\fItrue_store_to_load\fR: a true dependence from store to load is costly,
|
14248 |
|
|
\&\fIstore_to_load\fR: any dependence from store to load is costly,
|
14249 |
|
|
\&\fInumber\fR: any dependence which latency >= \fInumber\fR is costly.
|
14250 |
|
|
.IP "\fB\-minsert\-sched\-nops=\fR\fIscheme\fR" 4
|
14251 |
|
|
.IX Item "-minsert-sched-nops=scheme"
|
14252 |
|
|
This option controls which nop insertion scheme will be used during
|
14253 |
|
|
the second scheduling pass. The argument \fIscheme\fR takes one of the
|
14254 |
|
|
following values:
|
14255 |
|
|
\&\fIno\fR: Don't insert nops.
|
14256 |
|
|
\&\fIpad\fR: Pad with nops any dispatch group which has vacant issue slots,
|
14257 |
|
|
according to the scheduler's grouping.
|
14258 |
|
|
\&\fIregroup_exact\fR: Insert nops to force costly dependent insns into
|
14259 |
|
|
separate groups. Insert exactly as many nops as needed to force an insn
|
14260 |
|
|
to a new group, according to the estimated processor grouping.
|
14261 |
|
|
\&\fInumber\fR: Insert nops to force costly dependent insns into
|
14262 |
|
|
separate groups. Insert \fInumber\fR nops to force an insn to a new group.
|
14263 |
|
|
.IP "\fB\-mcall\-sysv\fR" 4
|
14264 |
|
|
.IX Item "-mcall-sysv"
|
14265 |
|
|
On System V.4 and embedded PowerPC systems compile code using calling
|
14266 |
|
|
conventions that adheres to the March 1995 draft of the System V
|
14267 |
|
|
Application Binary Interface, PowerPC processor supplement. This is the
|
14268 |
|
|
default unless you configured \s-1GCC\s0 using \fBpowerpc\-*\-eabiaix\fR.
|
14269 |
|
|
.IP "\fB\-mcall\-sysv\-eabi\fR" 4
|
14270 |
|
|
.IX Item "-mcall-sysv-eabi"
|
14271 |
|
|
.PD 0
|
14272 |
|
|
.IP "\fB\-mcall\-eabi\fR" 4
|
14273 |
|
|
.IX Item "-mcall-eabi"
|
14274 |
|
|
.PD
|
14275 |
|
|
Specify both \fB\-mcall\-sysv\fR and \fB\-meabi\fR options.
|
14276 |
|
|
.IP "\fB\-mcall\-sysv\-noeabi\fR" 4
|
14277 |
|
|
.IX Item "-mcall-sysv-noeabi"
|
14278 |
|
|
Specify both \fB\-mcall\-sysv\fR and \fB\-mno\-eabi\fR options.
|
14279 |
|
|
.IP "\fB\-mcall\-aixdesc\fR" 4
|
14280 |
|
|
.IX Item "-mcall-aixdesc"
|
14281 |
|
|
On System V.4 and embedded PowerPC systems compile code for the \s-1AIX\s0
|
14282 |
|
|
operating system.
|
14283 |
|
|
.IP "\fB\-mcall\-linux\fR" 4
|
14284 |
|
|
.IX Item "-mcall-linux"
|
14285 |
|
|
On System V.4 and embedded PowerPC systems compile code for the
|
14286 |
|
|
Linux-based \s-1GNU\s0 system.
|
14287 |
|
|
.IP "\fB\-mcall\-gnu\fR" 4
|
14288 |
|
|
.IX Item "-mcall-gnu"
|
14289 |
|
|
On System V.4 and embedded PowerPC systems compile code for the
|
14290 |
|
|
Hurd-based \s-1GNU\s0 system.
|
14291 |
|
|
.IP "\fB\-mcall\-freebsd\fR" 4
|
14292 |
|
|
.IX Item "-mcall-freebsd"
|
14293 |
|
|
On System V.4 and embedded PowerPC systems compile code for the
|
14294 |
|
|
FreeBSD operating system.
|
14295 |
|
|
.IP "\fB\-mcall\-netbsd\fR" 4
|
14296 |
|
|
.IX Item "-mcall-netbsd"
|
14297 |
|
|
On System V.4 and embedded PowerPC systems compile code for the
|
14298 |
|
|
NetBSD operating system.
|
14299 |
|
|
.IP "\fB\-mcall\-openbsd\fR" 4
|
14300 |
|
|
.IX Item "-mcall-openbsd"
|
14301 |
|
|
On System V.4 and embedded PowerPC systems compile code for the
|
14302 |
|
|
OpenBSD operating system.
|
14303 |
|
|
.IP "\fB\-maix\-struct\-return\fR" 4
|
14304 |
|
|
.IX Item "-maix-struct-return"
|
14305 |
|
|
Return all structures in memory (as specified by the \s-1AIX\s0 \s-1ABI\s0).
|
14306 |
|
|
.IP "\fB\-msvr4\-struct\-return\fR" 4
|
14307 |
|
|
.IX Item "-msvr4-struct-return"
|
14308 |
|
|
Return structures smaller than 8 bytes in registers (as specified by the
|
14309 |
|
|
\&\s-1SVR4\s0 \s-1ABI\s0).
|
14310 |
|
|
.IP "\fB\-mabi=\fR\fIabi-type\fR" 4
|
14311 |
|
|
.IX Item "-mabi=abi-type"
|
14312 |
|
|
Extend the current \s-1ABI\s0 with a particular extension, or remove such extension.
|
14313 |
|
|
Valid values are \fIaltivec\fR, \fIno-altivec\fR, \fIspe\fR,
|
14314 |
|
|
\&\fIno-spe\fR, \fIibmlongdouble\fR, \fIieeelongdouble\fR.
|
14315 |
|
|
.IP "\fB\-mabi=spe\fR" 4
|
14316 |
|
|
.IX Item "-mabi=spe"
|
14317 |
|
|
Extend the current \s-1ABI\s0 with \s-1SPE\s0 \s-1ABI\s0 extensions. This does not change
|
14318 |
|
|
the default \s-1ABI\s0, instead it adds the \s-1SPE\s0 \s-1ABI\s0 extensions to the current
|
14319 |
|
|
\&\s-1ABI\s0.
|
14320 |
|
|
.IP "\fB\-mabi=no\-spe\fR" 4
|
14321 |
|
|
.IX Item "-mabi=no-spe"
|
14322 |
|
|
Disable Booke \s-1SPE\s0 \s-1ABI\s0 extensions for the current \s-1ABI\s0.
|
14323 |
|
|
.IP "\fB\-mabi=ibmlongdouble\fR" 4
|
14324 |
|
|
.IX Item "-mabi=ibmlongdouble"
|
14325 |
|
|
Change the current \s-1ABI\s0 to use \s-1IBM\s0 extended precision long double.
|
14326 |
|
|
This is a PowerPC 32\-bit \s-1SYSV\s0 \s-1ABI\s0 option.
|
14327 |
|
|
.IP "\fB\-mabi=ieeelongdouble\fR" 4
|
14328 |
|
|
.IX Item "-mabi=ieeelongdouble"
|
14329 |
|
|
Change the current \s-1ABI\s0 to use \s-1IEEE\s0 extended precision long double.
|
14330 |
|
|
This is a PowerPC 32\-bit Linux \s-1ABI\s0 option.
|
14331 |
|
|
.IP "\fB\-mprototype\fR" 4
|
14332 |
|
|
.IX Item "-mprototype"
|
14333 |
|
|
.PD 0
|
14334 |
|
|
.IP "\fB\-mno\-prototype\fR" 4
|
14335 |
|
|
.IX Item "-mno-prototype"
|
14336 |
|
|
.PD
|
14337 |
|
|
On System V.4 and embedded PowerPC systems assume that all calls to
|
14338 |
|
|
variable argument functions are properly prototyped. Otherwise, the
|
14339 |
|
|
compiler must insert an instruction before every non prototyped call to
|
14340 |
|
|
set or clear bit 6 of the condition code register (\fI\s-1CR\s0\fR) to
|
14341 |
|
|
indicate whether floating point values were passed in the floating point
|
14342 |
|
|
registers in case the function takes a variable arguments. With
|
14343 |
|
|
\&\fB\-mprototype\fR, only calls to prototyped variable argument functions
|
14344 |
|
|
will set or clear the bit.
|
14345 |
|
|
.IP "\fB\-msim\fR" 4
|
14346 |
|
|
.IX Item "-msim"
|
14347 |
|
|
On embedded PowerPC systems, assume that the startup module is called
|
14348 |
|
|
\&\fIsim\-crt0.o\fR and that the standard C libraries are \fIlibsim.a\fR and
|
14349 |
|
|
\&\fIlibc.a\fR. This is the default for \fBpowerpc\-*\-eabisim\fR
|
14350 |
|
|
configurations.
|
14351 |
|
|
.IP "\fB\-mmvme\fR" 4
|
14352 |
|
|
.IX Item "-mmvme"
|
14353 |
|
|
On embedded PowerPC systems, assume that the startup module is called
|
14354 |
|
|
\&\fIcrt0.o\fR and the standard C libraries are \fIlibmvme.a\fR and
|
14355 |
|
|
\&\fIlibc.a\fR.
|
14356 |
|
|
.IP "\fB\-mads\fR" 4
|
14357 |
|
|
.IX Item "-mads"
|
14358 |
|
|
On embedded PowerPC systems, assume that the startup module is called
|
14359 |
|
|
\&\fIcrt0.o\fR and the standard C libraries are \fIlibads.a\fR and
|
14360 |
|
|
\&\fIlibc.a\fR.
|
14361 |
|
|
.IP "\fB\-myellowknife\fR" 4
|
14362 |
|
|
.IX Item "-myellowknife"
|
14363 |
|
|
On embedded PowerPC systems, assume that the startup module is called
|
14364 |
|
|
\&\fIcrt0.o\fR and the standard C libraries are \fIlibyk.a\fR and
|
14365 |
|
|
\&\fIlibc.a\fR.
|
14366 |
|
|
.IP "\fB\-mvxworks\fR" 4
|
14367 |
|
|
.IX Item "-mvxworks"
|
14368 |
|
|
On System V.4 and embedded PowerPC systems, specify that you are
|
14369 |
|
|
compiling for a VxWorks system.
|
14370 |
|
|
.IP "\fB\-memb\fR" 4
|
14371 |
|
|
.IX Item "-memb"
|
14372 |
|
|
On embedded PowerPC systems, set the \fI\s-1PPC_EMB\s0\fR bit in the \s-1ELF\s0 flags
|
14373 |
|
|
header to indicate that \fBeabi\fR extended relocations are used.
|
14374 |
|
|
.IP "\fB\-meabi\fR" 4
|
14375 |
|
|
.IX Item "-meabi"
|
14376 |
|
|
.PD 0
|
14377 |
|
|
.IP "\fB\-mno\-eabi\fR" 4
|
14378 |
|
|
.IX Item "-mno-eabi"
|
14379 |
|
|
.PD
|
14380 |
|
|
On System V.4 and embedded PowerPC systems do (do not) adhere to the
|
14381 |
|
|
Embedded Applications Binary Interface (eabi) which is a set of
|
14382 |
|
|
modifications to the System V.4 specifications. Selecting \fB\-meabi\fR
|
14383 |
|
|
means that the stack is aligned to an 8 byte boundary, a function
|
14384 |
|
|
\&\f(CW\*(C`_\|_eabi\*(C'\fR is called to from \f(CW\*(C`main\*(C'\fR to set up the eabi
|
14385 |
|
|
environment, and the \fB\-msdata\fR option can use both \f(CW\*(C`r2\*(C'\fR and
|
14386 |
|
|
\&\f(CW\*(C`r13\*(C'\fR to point to two separate small data areas. Selecting
|
14387 |
|
|
\&\fB\-mno\-eabi\fR means that the stack is aligned to a 16 byte boundary,
|
14388 |
|
|
do not call an initialization function from \f(CW\*(C`main\*(C'\fR, and the
|
14389 |
|
|
\&\fB\-msdata\fR option will only use \f(CW\*(C`r13\*(C'\fR to point to a single
|
14390 |
|
|
small data area. The \fB\-meabi\fR option is on by default if you
|
14391 |
|
|
configured \s-1GCC\s0 using one of the \fBpowerpc*\-*\-eabi*\fR options.
|
14392 |
|
|
.IP "\fB\-msdata=eabi\fR" 4
|
14393 |
|
|
.IX Item "-msdata=eabi"
|
14394 |
|
|
On System V.4 and embedded PowerPC systems, put small initialized
|
14395 |
|
|
\&\f(CW\*(C`const\*(C'\fR global and static data in the \fB.sdata2\fR section, which
|
14396 |
|
|
is pointed to by register \f(CW\*(C`r2\*(C'\fR. Put small initialized
|
14397 |
|
|
non\-\f(CW\*(C`const\*(C'\fR global and static data in the \fB.sdata\fR section,
|
14398 |
|
|
which is pointed to by register \f(CW\*(C`r13\*(C'\fR. Put small uninitialized
|
14399 |
|
|
global and static data in the \fB.sbss\fR section, which is adjacent to
|
14400 |
|
|
the \fB.sdata\fR section. The \fB\-msdata=eabi\fR option is
|
14401 |
|
|
incompatible with the \fB\-mrelocatable\fR option. The
|
14402 |
|
|
\&\fB\-msdata=eabi\fR option also sets the \fB\-memb\fR option.
|
14403 |
|
|
.IP "\fB\-msdata=sysv\fR" 4
|
14404 |
|
|
.IX Item "-msdata=sysv"
|
14405 |
|
|
On System V.4 and embedded PowerPC systems, put small global and static
|
14406 |
|
|
data in the \fB.sdata\fR section, which is pointed to by register
|
14407 |
|
|
\&\f(CW\*(C`r13\*(C'\fR. Put small uninitialized global and static data in the
|
14408 |
|
|
\&\fB.sbss\fR section, which is adjacent to the \fB.sdata\fR section.
|
14409 |
|
|
The \fB\-msdata=sysv\fR option is incompatible with the
|
14410 |
|
|
\&\fB\-mrelocatable\fR option.
|
14411 |
|
|
.IP "\fB\-msdata=default\fR" 4
|
14412 |
|
|
.IX Item "-msdata=default"
|
14413 |
|
|
.PD 0
|
14414 |
|
|
.IP "\fB\-msdata\fR" 4
|
14415 |
|
|
.IX Item "-msdata"
|
14416 |
|
|
.PD
|
14417 |
|
|
On System V.4 and embedded PowerPC systems, if \fB\-meabi\fR is used,
|
14418 |
|
|
compile code the same as \fB\-msdata=eabi\fR, otherwise compile code the
|
14419 |
|
|
same as \fB\-msdata=sysv\fR.
|
14420 |
|
|
.IP "\fB\-msdata=data\fR" 4
|
14421 |
|
|
.IX Item "-msdata=data"
|
14422 |
|
|
On System V.4 and embedded PowerPC systems, put small global
|
14423 |
|
|
data in the \fB.sdata\fR section. Put small uninitialized global
|
14424 |
|
|
data in the \fB.sbss\fR section. Do not use register \f(CW\*(C`r13\*(C'\fR
|
14425 |
|
|
to address small data however. This is the default behavior unless
|
14426 |
|
|
other \fB\-msdata\fR options are used.
|
14427 |
|
|
.IP "\fB\-msdata=none\fR" 4
|
14428 |
|
|
.IX Item "-msdata=none"
|
14429 |
|
|
.PD 0
|
14430 |
|
|
.IP "\fB\-mno\-sdata\fR" 4
|
14431 |
|
|
.IX Item "-mno-sdata"
|
14432 |
|
|
.PD
|
14433 |
|
|
On embedded PowerPC systems, put all initialized global and static data
|
14434 |
|
|
in the \fB.data\fR section, and all uninitialized data in the
|
14435 |
|
|
\&\fB.bss\fR section.
|
14436 |
|
|
.IP "\fB\-G\fR \fInum\fR" 4
|
14437 |
|
|
.IX Item "-G num"
|
14438 |
|
|
On embedded PowerPC systems, put global and static items less than or
|
14439 |
|
|
equal to \fInum\fR bytes into the small data or bss sections instead of
|
14440 |
|
|
the normal data or bss section. By default, \fInum\fR is 8. The
|
14441 |
|
|
\&\fB\-G\fR \fInum\fR switch is also passed to the linker.
|
14442 |
|
|
All modules should be compiled with the same \fB\-G\fR \fInum\fR value.
|
14443 |
|
|
.IP "\fB\-mregnames\fR" 4
|
14444 |
|
|
.IX Item "-mregnames"
|
14445 |
|
|
.PD 0
|
14446 |
|
|
.IP "\fB\-mno\-regnames\fR" 4
|
14447 |
|
|
.IX Item "-mno-regnames"
|
14448 |
|
|
.PD
|
14449 |
|
|
On System V.4 and embedded PowerPC systems do (do not) emit register
|
14450 |
|
|
names in the assembly language output using symbolic forms.
|
14451 |
|
|
.IP "\fB\-mlongcall\fR" 4
|
14452 |
|
|
.IX Item "-mlongcall"
|
14453 |
|
|
.PD 0
|
14454 |
|
|
.IP "\fB\-mno\-longcall\fR" 4
|
14455 |
|
|
.IX Item "-mno-longcall"
|
14456 |
|
|
.PD
|
14457 |
|
|
By default assume that all calls are far away so that a longer more
|
14458 |
|
|
expensive calling sequence is required. This is required for calls
|
14459 |
|
|
further than 32 megabytes (33,554,432 bytes) from the current location.
|
14460 |
|
|
A short call will be generated if the compiler knows
|
14461 |
|
|
the call cannot be that far away. This setting can be overridden by
|
14462 |
|
|
the \f(CW\*(C`shortcall\*(C'\fR function attribute, or by \f(CW\*(C`#pragma
|
14463 |
|
|
longcall(0)\*(C'\fR.
|
14464 |
|
|
.Sp
|
14465 |
|
|
Some linkers are capable of detecting out-of-range calls and generating
|
14466 |
|
|
glue code on the fly. On these systems, long calls are unnecessary and
|
14467 |
|
|
generate slower code. As of this writing, the \s-1AIX\s0 linker can do this,
|
14468 |
|
|
as can the \s-1GNU\s0 linker for PowerPC/64. It is planned to add this feature
|
14469 |
|
|
to the \s-1GNU\s0 linker for 32\-bit PowerPC systems as well.
|
14470 |
|
|
.Sp
|
14471 |
|
|
On Darwin/PPC systems, \f(CW\*(C`#pragma longcall\*(C'\fR will generate \*(L"jbsr
|
14472 |
|
|
callee, L42\*(R", plus a \*(L"branch island\*(R" (glue code). The two target
|
14473 |
|
|
addresses represent the callee and the \*(L"branch island\*(R". The
|
14474 |
|
|
Darwin/PPC linker will prefer the first address and generate a \*(L"bl
|
14475 |
|
|
callee\*(R" if the \s-1PPC\s0 \*(L"bl\*(R" instruction will reach the callee directly;
|
14476 |
|
|
otherwise, the linker will generate \*(L"bl L42\*(R" to call the \*(L"branch
|
14477 |
|
|
island\*(R". The \*(L"branch island\*(R" is appended to the body of the
|
14478 |
|
|
calling function; it computes the full 32\-bit address of the callee
|
14479 |
|
|
and jumps to it.
|
14480 |
|
|
.Sp
|
14481 |
|
|
On Mach-O (Darwin) systems, this option directs the compiler emit to
|
14482 |
|
|
the glue for every direct call, and the Darwin linker decides whether
|
14483 |
|
|
to use or discard it.
|
14484 |
|
|
.Sp
|
14485 |
|
|
In the future, we may cause \s-1GCC\s0 to ignore all longcall specifications
|
14486 |
|
|
when the linker is known to generate glue.
|
14487 |
|
|
.IP "\fB\-mtls\-markers\fR" 4
|
14488 |
|
|
.IX Item "-mtls-markers"
|
14489 |
|
|
.PD 0
|
14490 |
|
|
.IP "\fB\-mno\-tls\-markers\fR" 4
|
14491 |
|
|
.IX Item "-mno-tls-markers"
|
14492 |
|
|
.PD
|
14493 |
|
|
Mark (do not mark) calls to \f(CW\*(C`_\|_tls_get_addr\*(C'\fR with a relocation
|
14494 |
|
|
specifying the function argument. The relocation allows ld to
|
14495 |
|
|
reliably associate function call with argument setup instructions for
|
14496 |
|
|
\&\s-1TLS\s0 optimization, which in turn allows gcc to better schedule the
|
14497 |
|
|
sequence.
|
14498 |
|
|
.IP "\fB\-pthread\fR" 4
|
14499 |
|
|
.IX Item "-pthread"
|
14500 |
|
|
Adds support for multithreading with the \fIpthreads\fR library.
|
14501 |
|
|
This option sets flags for both the preprocessor and linker.
|
14502 |
|
|
.PP
|
14503 |
|
|
\fI\s-1RX\s0 Options\fR
|
14504 |
|
|
.IX Subsection "RX Options"
|
14505 |
|
|
.PP
|
14506 |
|
|
These command line options are defined for \s-1RX\s0 targets:
|
14507 |
|
|
.IP "\fB\-m64bit\-doubles\fR" 4
|
14508 |
|
|
.IX Item "-m64bit-doubles"
|
14509 |
|
|
.PD 0
|
14510 |
|
|
.IP "\fB\-m32bit\-doubles\fR" 4
|
14511 |
|
|
.IX Item "-m32bit-doubles"
|
14512 |
|
|
.PD
|
14513 |
|
|
Make the \f(CW\*(C`double\*(C'\fR data type be 64\-bits (\fB\-m64bit\-doubles\fR)
|
14514 |
|
|
or 32\-bits (\fB\-m32bit\-doubles\fR) in size. The default is
|
14515 |
|
|
\&\fB\-m32bit\-doubles\fR. \fINote\fR \s-1RX\s0 floating point hardware only
|
14516 |
|
|
works on 32\-bit values, which is why the default is
|
14517 |
|
|
\&\fB\-m32bit\-doubles\fR.
|
14518 |
|
|
.IP "\fB\-fpu\fR" 4
|
14519 |
|
|
.IX Item "-fpu"
|
14520 |
|
|
.PD 0
|
14521 |
|
|
.IP "\fB\-nofpu\fR" 4
|
14522 |
|
|
.IX Item "-nofpu"
|
14523 |
|
|
.PD
|
14524 |
|
|
Enables (\fB\-fpu\fR) or disables (\fB\-nofpu\fR) the use of \s-1RX\s0
|
14525 |
|
|
floating point hardware. The default is enabled for the \fI\s-1RX600\s0\fR
|
14526 |
|
|
series and disabled for the \fI\s-1RX200\s0\fR series.
|
14527 |
|
|
.Sp
|
14528 |
|
|
Floating point instructions will only be generated for 32\-bit floating
|
14529 |
|
|
point values however, so if the \fB\-m64bit\-doubles\fR option is in
|
14530 |
|
|
use then the \s-1FPU\s0 hardware will not be used for doubles.
|
14531 |
|
|
.Sp
|
14532 |
|
|
\&\fINote\fR If the \fB\-fpu\fR option is enabled then
|
14533 |
|
|
\&\fB\-funsafe\-math\-optimizations\fR is also enabled automatically.
|
14534 |
|
|
This is because the \s-1RX\s0 \s-1FPU\s0 instructions are themselves unsafe.
|
14535 |
|
|
.IP "\fB\-mcpu=\fR\fIname\fR" 4
|
14536 |
|
|
.IX Item "-mcpu=name"
|
14537 |
|
|
.PD 0
|
14538 |
|
|
.IP "\fB\-patch=\fR\fIname\fR" 4
|
14539 |
|
|
.IX Item "-patch=name"
|
14540 |
|
|
.PD
|
14541 |
|
|
Selects the type of \s-1RX\s0 \s-1CPU\s0 to be targeted. Currently three types are
|
14542 |
|
|
supported, the generic \fI\s-1RX600\s0\fR and \fI\s-1RX200\s0\fR series hardware and
|
14543 |
|
|
the specific \fI\s-1RX610\s0\fR cpu. The default is \fI\s-1RX600\s0\fR.
|
14544 |
|
|
.Sp
|
14545 |
|
|
The only difference between \fI\s-1RX600\s0\fR and \fI\s-1RX610\s0\fR is that the
|
14546 |
|
|
\&\fI\s-1RX610\s0\fR does not support the \f(CW\*(C`MVTIPL\*(C'\fR instruction.
|
14547 |
|
|
.Sp
|
14548 |
|
|
The \fI\s-1RX200\s0\fR series does not have a hardware floating point unit
|
14549 |
|
|
and so \fB\-nofpu\fR is enabled by default when this type is
|
14550 |
|
|
selected.
|
14551 |
|
|
.IP "\fB\-mbig\-endian\-data\fR" 4
|
14552 |
|
|
.IX Item "-mbig-endian-data"
|
14553 |
|
|
.PD 0
|
14554 |
|
|
.IP "\fB\-mlittle\-endian\-data\fR" 4
|
14555 |
|
|
.IX Item "-mlittle-endian-data"
|
14556 |
|
|
.PD
|
14557 |
|
|
Store data (but not code) in the big-endian format. The default is
|
14558 |
|
|
\&\fB\-mlittle\-endian\-data\fR, ie to store data in the little endian
|
14559 |
|
|
format.
|
14560 |
|
|
.IP "\fB\-msmall\-data\-limit=\fR\fIN\fR" 4
|
14561 |
|
|
.IX Item "-msmall-data-limit=N"
|
14562 |
|
|
Specifies the maximum size in bytes of global and static variables
|
14563 |
|
|
which can be placed into the small data area. Using the small data
|
14564 |
|
|
area can lead to smaller and faster code, but the size of area is
|
14565 |
|
|
limited and it is up to the programmer to ensure that the area does
|
14566 |
|
|
not overflow. Also when the small data area is used one of the \s-1RX\s0's
|
14567 |
|
|
registers (\f(CW\*(C`r13\*(C'\fR) is reserved for use pointing to this area, so
|
14568 |
|
|
it is no longer available for use by the compiler. This could result
|
14569 |
|
|
in slower and/or larger code if variables which once could have been
|
14570 |
|
|
held in \f(CW\*(C`r13\*(C'\fR are now pushed onto the stack.
|
14571 |
|
|
.Sp
|
14572 |
|
|
Note, common variables (variables which have not been initialised) and
|
14573 |
|
|
constants are not placed into the small data area as they are assigned
|
14574 |
|
|
to other sections in the output executable.
|
14575 |
|
|
.Sp
|
14576 |
|
|
The default value is zero, which disables this feature. Note, this
|
14577 |
|
|
feature is not enabled by default with higher optimization levels
|
14578 |
|
|
(\fB\-O2\fR etc) because of the potentially detrimental effects of
|
14579 |
|
|
reserving register \f(CW\*(C`r13\*(C'\fR. It is up to the programmer to
|
14580 |
|
|
experiment and discover whether this feature is of benefit to their
|
14581 |
|
|
program.
|
14582 |
|
|
.IP "\fB\-msim\fR" 4
|
14583 |
|
|
.IX Item "-msim"
|
14584 |
|
|
.PD 0
|
14585 |
|
|
.IP "\fB\-mno\-sim\fR" 4
|
14586 |
|
|
.IX Item "-mno-sim"
|
14587 |
|
|
.PD
|
14588 |
|
|
Use the simulator runtime. The default is to use the libgloss board
|
14589 |
|
|
specific runtime.
|
14590 |
|
|
.IP "\fB\-mas100\-syntax\fR" 4
|
14591 |
|
|
.IX Item "-mas100-syntax"
|
14592 |
|
|
.PD 0
|
14593 |
|
|
.IP "\fB\-mno\-as100\-syntax\fR" 4
|
14594 |
|
|
.IX Item "-mno-as100-syntax"
|
14595 |
|
|
.PD
|
14596 |
|
|
When generating assembler output use a syntax that is compatible with
|
14597 |
|
|
Renesas's \s-1AS100\s0 assembler. This syntax can also be handled by the \s-1GAS\s0
|
14598 |
|
|
assembler but it has some restrictions so generating it is not the
|
14599 |
|
|
default option.
|
14600 |
|
|
.IP "\fB\-mmax\-constant\-size=\fR\fIN\fR" 4
|
14601 |
|
|
.IX Item "-mmax-constant-size=N"
|
14602 |
|
|
Specifies the maximum size, in bytes, of a constant that can be used as
|
14603 |
|
|
an operand in a \s-1RX\s0 instruction. Although the \s-1RX\s0 instruction set does
|
14604 |
|
|
allow constants of up to 4 bytes in length to be used in instructions,
|
14605 |
|
|
a longer value equates to a longer instruction. Thus in some
|
14606 |
|
|
circumstances it can be beneficial to restrict the size of constants
|
14607 |
|
|
that are used in instructions. Constants that are too big are instead
|
14608 |
|
|
placed into a constant pool and referenced via register indirection.
|
14609 |
|
|
.Sp
|
14610 |
|
|
The value \fIN\fR can be between 0 and 4. A value of 0 (the default)
|
14611 |
|
|
or 4 means that constants of any size are allowed.
|
14612 |
|
|
.IP "\fB\-mrelax\fR" 4
|
14613 |
|
|
.IX Item "-mrelax"
|
14614 |
|
|
Enable linker relaxation. Linker relaxation is a process whereby the
|
14615 |
|
|
linker will attempt to reduce the size of a program by finding shorter
|
14616 |
|
|
versions of various instructions. Disabled by default.
|
14617 |
|
|
.IP "\fB\-mint\-register=\fR\fIN\fR" 4
|
14618 |
|
|
.IX Item "-mint-register=N"
|
14619 |
|
|
Specify the number of registers to reserve for fast interrupt handler
|
14620 |
|
|
functions. The value \fIN\fR can be between 0 and 4. A value of 1
|
14621 |
|
|
means that register \f(CW\*(C`r13\*(C'\fR will be reserved for the exclusive use
|
14622 |
|
|
of fast interrupt handlers. A value of 2 reserves \f(CW\*(C`r13\*(C'\fR and
|
14623 |
|
|
\&\f(CW\*(C`r12\*(C'\fR. A value of 3 reserves \f(CW\*(C`r13\*(C'\fR, \f(CW\*(C`r12\*(C'\fR and
|
14624 |
|
|
\&\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.
|
14625 |
|
|
A value of 0, the default, does not reserve any registers.
|
14626 |
|
|
.IP "\fB\-msave\-acc\-in\-interrupts\fR" 4
|
14627 |
|
|
.IX Item "-msave-acc-in-interrupts"
|
14628 |
|
|
Specifies that interrupt handler functions should preserve the
|
14629 |
|
|
accumulator register. This is only necessary if normal code might use
|
14630 |
|
|
the accumulator register, for example because it performs 64\-bit
|
14631 |
|
|
multiplications. The default is to ignore the accumulator as this
|
14632 |
|
|
makes the interrupt handlers faster.
|
14633 |
|
|
.PP
|
14634 |
|
|
\&\fINote:\fR The generic \s-1GCC\s0 command line \fB\-ffixed\-\fR\fIreg\fR
|
14635 |
|
|
has special significance to the \s-1RX\s0 port when used with the
|
14636 |
|
|
\&\f(CW\*(C`interrupt\*(C'\fR function attribute. This attribute indicates a
|
14637 |
|
|
function intended to process fast interrupts. \s-1GCC\s0 will will ensure
|
14638 |
|
|
that it only uses the registers \f(CW\*(C`r10\*(C'\fR, \f(CW\*(C`r11\*(C'\fR, \f(CW\*(C`r12\*(C'\fR
|
14639 |
|
|
and/or \f(CW\*(C`r13\*(C'\fR and only provided that the normal use of the
|
14640 |
|
|
corresponding registers have been restricted via the
|
14641 |
|
|
\&\fB\-ffixed\-\fR\fIreg\fR or \fB\-mint\-register\fR command line
|
14642 |
|
|
options.
|
14643 |
|
|
.PP
|
14644 |
|
|
\fIS/390 and zSeries Options\fR
|
14645 |
|
|
.IX Subsection "S/390 and zSeries Options"
|
14646 |
|
|
.PP
|
14647 |
|
|
These are the \fB\-m\fR options defined for the S/390 and zSeries architecture.
|
14648 |
|
|
.IP "\fB\-mhard\-float\fR" 4
|
14649 |
|
|
.IX Item "-mhard-float"
|
14650 |
|
|
.PD 0
|
14651 |
|
|
.IP "\fB\-msoft\-float\fR" 4
|
14652 |
|
|
.IX Item "-msoft-float"
|
14653 |
|
|
.PD
|
14654 |
|
|
Use (do not use) the hardware floating-point instructions and registers
|
14655 |
|
|
for floating-point operations. When \fB\-msoft\-float\fR is specified,
|
14656 |
|
|
functions in \fIlibgcc.a\fR will be used to perform floating-point
|
14657 |
|
|
operations. When \fB\-mhard\-float\fR is specified, the compiler
|
14658 |
|
|
generates \s-1IEEE\s0 floating-point instructions. This is the default.
|
14659 |
|
|
.IP "\fB\-mhard\-dfp\fR" 4
|
14660 |
|
|
.IX Item "-mhard-dfp"
|
14661 |
|
|
.PD 0
|
14662 |
|
|
.IP "\fB\-mno\-hard\-dfp\fR" 4
|
14663 |
|
|
.IX Item "-mno-hard-dfp"
|
14664 |
|
|
.PD
|
14665 |
|
|
Use (do not use) the hardware decimal-floating-point instructions for
|
14666 |
|
|
decimal-floating-point operations. When \fB\-mno\-hard\-dfp\fR is
|
14667 |
|
|
specified, functions in \fIlibgcc.a\fR will be used to perform
|
14668 |
|
|
decimal-floating-point operations. When \fB\-mhard\-dfp\fR is
|
14669 |
|
|
specified, the compiler generates decimal-floating-point hardware
|
14670 |
|
|
instructions. This is the default for \fB\-march=z9\-ec\fR or higher.
|
14671 |
|
|
.IP "\fB\-mlong\-double\-64\fR" 4
|
14672 |
|
|
.IX Item "-mlong-double-64"
|
14673 |
|
|
.PD 0
|
14674 |
|
|
.IP "\fB\-mlong\-double\-128\fR" 4
|
14675 |
|
|
.IX Item "-mlong-double-128"
|
14676 |
|
|
.PD
|
14677 |
|
|
These switches control the size of \f(CW\*(C`long double\*(C'\fR type. A size
|
14678 |
|
|
of 64bit makes the \f(CW\*(C`long double\*(C'\fR type equivalent to the \f(CW\*(C`double\*(C'\fR
|
14679 |
|
|
type. This is the default.
|
14680 |
|
|
.IP "\fB\-mbackchain\fR" 4
|
14681 |
|
|
.IX Item "-mbackchain"
|
14682 |
|
|
.PD 0
|
14683 |
|
|
.IP "\fB\-mno\-backchain\fR" 4
|
14684 |
|
|
.IX Item "-mno-backchain"
|
14685 |
|
|
.PD
|
14686 |
|
|
Store (do not store) the address of the caller's frame as backchain pointer
|
14687 |
|
|
into the callee's stack frame.
|
14688 |
|
|
A backchain may be needed to allow debugging using tools that do not understand
|
14689 |
|
|
\&\s-1DWARF\-2\s0 call frame information.
|
14690 |
|
|
When \fB\-mno\-packed\-stack\fR is in effect, the backchain pointer is stored
|
14691 |
|
|
at the bottom of the stack frame; when \fB\-mpacked\-stack\fR is in effect,
|
14692 |
|
|
the backchain is placed into the topmost word of the 96/160 byte register
|
14693 |
|
|
save area.
|
14694 |
|
|
.Sp
|
14695 |
|
|
In general, code compiled with \fB\-mbackchain\fR is call-compatible with
|
14696 |
|
|
code compiled with \fB\-mmo\-backchain\fR; however, use of the backchain
|
14697 |
|
|
for debugging purposes usually requires that the whole binary is built with
|
14698 |
|
|
\&\fB\-mbackchain\fR. Note that the combination of \fB\-mbackchain\fR,
|
14699 |
|
|
\&\fB\-mpacked\-stack\fR and \fB\-mhard\-float\fR is not supported. In order
|
14700 |
|
|
to build a linux kernel use \fB\-msoft\-float\fR.
|
14701 |
|
|
.Sp
|
14702 |
|
|
The default is to not maintain the backchain.
|
14703 |
|
|
.IP "\fB\-mpacked\-stack\fR" 4
|
14704 |
|
|
.IX Item "-mpacked-stack"
|
14705 |
|
|
.PD 0
|
14706 |
|
|
.IP "\fB\-mno\-packed\-stack\fR" 4
|
14707 |
|
|
.IX Item "-mno-packed-stack"
|
14708 |
|
|
.PD
|
14709 |
|
|
Use (do not use) the packed stack layout. When \fB\-mno\-packed\-stack\fR is
|
14710 |
|
|
specified, the compiler uses the all fields of the 96/160 byte register save
|
14711 |
|
|
area only for their default purpose; unused fields still take up stack space.
|
14712 |
|
|
When \fB\-mpacked\-stack\fR is specified, register save slots are densely
|
14713 |
|
|
packed at the top of the register save area; unused space is reused for other
|
14714 |
|
|
purposes, allowing for more efficient use of the available stack space.
|
14715 |
|
|
However, when \fB\-mbackchain\fR is also in effect, the topmost word of
|
14716 |
|
|
the save area is always used to store the backchain, and the return address
|
14717 |
|
|
register is always saved two words below the backchain.
|
14718 |
|
|
.Sp
|
14719 |
|
|
As long as the stack frame backchain is not used, code generated with
|
14720 |
|
|
\&\fB\-mpacked\-stack\fR is call-compatible with code generated with
|
14721 |
|
|
\&\fB\-mno\-packed\-stack\fR. Note that some non-FSF releases of \s-1GCC\s0 2.95 for
|
14722 |
|
|
S/390 or zSeries generated code that uses the stack frame backchain at run
|
14723 |
|
|
time, not just for debugging purposes. Such code is not call-compatible
|
14724 |
|
|
with code compiled with \fB\-mpacked\-stack\fR. Also, note that the
|
14725 |
|
|
combination of \fB\-mbackchain\fR,
|
14726 |
|
|
\&\fB\-mpacked\-stack\fR and \fB\-mhard\-float\fR is not supported. In order
|
14727 |
|
|
to build a linux kernel use \fB\-msoft\-float\fR.
|
14728 |
|
|
.Sp
|
14729 |
|
|
The default is to not use the packed stack layout.
|
14730 |
|
|
.IP "\fB\-msmall\-exec\fR" 4
|
14731 |
|
|
.IX Item "-msmall-exec"
|
14732 |
|
|
.PD 0
|
14733 |
|
|
.IP "\fB\-mno\-small\-exec\fR" 4
|
14734 |
|
|
.IX Item "-mno-small-exec"
|
14735 |
|
|
.PD
|
14736 |
|
|
Generate (or do not generate) code using the \f(CW\*(C`bras\*(C'\fR instruction
|
14737 |
|
|
to do subroutine calls.
|
14738 |
|
|
This only works reliably if the total executable size does not
|
14739 |
|
|
exceed 64k. The default is to use the \f(CW\*(C`basr\*(C'\fR instruction instead,
|
14740 |
|
|
which does not have this limitation.
|
14741 |
|
|
.IP "\fB\-m64\fR" 4
|
14742 |
|
|
.IX Item "-m64"
|
14743 |
|
|
.PD 0
|
14744 |
|
|
.IP "\fB\-m31\fR" 4
|
14745 |
|
|
.IX Item "-m31"
|
14746 |
|
|
.PD
|
14747 |
|
|
When \fB\-m31\fR is specified, generate code compliant to the
|
14748 |
|
|
GNU/Linux for S/390 \s-1ABI\s0. When \fB\-m64\fR is specified, generate
|
14749 |
|
|
code compliant to the GNU/Linux for zSeries \s-1ABI\s0. This allows \s-1GCC\s0 in
|
14750 |
|
|
particular to generate 64\-bit instructions. For the \fBs390\fR
|
14751 |
|
|
targets, the default is \fB\-m31\fR, while the \fBs390x\fR
|
14752 |
|
|
targets default to \fB\-m64\fR.
|
14753 |
|
|
.IP "\fB\-mzarch\fR" 4
|
14754 |
|
|
.IX Item "-mzarch"
|
14755 |
|
|
.PD 0
|
14756 |
|
|
.IP "\fB\-mesa\fR" 4
|
14757 |
|
|
.IX Item "-mesa"
|
14758 |
|
|
.PD
|
14759 |
|
|
When \fB\-mzarch\fR is specified, generate code using the
|
14760 |
|
|
instructions available on z/Architecture.
|
14761 |
|
|
When \fB\-mesa\fR is specified, generate code using the
|
14762 |
|
|
instructions available on \s-1ESA/390\s0. Note that \fB\-mesa\fR is
|
14763 |
|
|
not possible with \fB\-m64\fR.
|
14764 |
|
|
When generating code compliant to the GNU/Linux for S/390 \s-1ABI\s0,
|
14765 |
|
|
the default is \fB\-mesa\fR. When generating code compliant
|
14766 |
|
|
to the GNU/Linux for zSeries \s-1ABI\s0, the default is \fB\-mzarch\fR.
|
14767 |
|
|
.IP "\fB\-mmvcle\fR" 4
|
14768 |
|
|
.IX Item "-mmvcle"
|
14769 |
|
|
.PD 0
|
14770 |
|
|
.IP "\fB\-mno\-mvcle\fR" 4
|
14771 |
|
|
.IX Item "-mno-mvcle"
|
14772 |
|
|
.PD
|
14773 |
|
|
Generate (or do not generate) code using the \f(CW\*(C`mvcle\*(C'\fR instruction
|
14774 |
|
|
to perform block moves. When \fB\-mno\-mvcle\fR is specified,
|
14775 |
|
|
use a \f(CW\*(C`mvc\*(C'\fR loop instead. This is the default unless optimizing for
|
14776 |
|
|
size.
|
14777 |
|
|
.IP "\fB\-mdebug\fR" 4
|
14778 |
|
|
.IX Item "-mdebug"
|
14779 |
|
|
.PD 0
|
14780 |
|
|
.IP "\fB\-mno\-debug\fR" 4
|
14781 |
|
|
.IX Item "-mno-debug"
|
14782 |
|
|
.PD
|
14783 |
|
|
Print (or do not print) additional debug information when compiling.
|
14784 |
|
|
The default is to not print debug information.
|
14785 |
|
|
.IP "\fB\-march=\fR\fIcpu-type\fR" 4
|
14786 |
|
|
.IX Item "-march=cpu-type"
|
14787 |
|
|
Generate code that will run on \fIcpu-type\fR, which is the name of a system
|
14788 |
|
|
representing a certain processor type. Possible values for
|
14789 |
|
|
\&\fIcpu-type\fR are \fBg5\fR, \fBg6\fR, \fBz900\fR, \fBz990\fR,
|
14790 |
|
|
\&\fBz9\-109\fR, \fBz9\-ec\fR and \fBz10\fR.
|
14791 |
|
|
When generating code using the instructions available on z/Architecture,
|
14792 |
|
|
the default is \fB\-march=z900\fR. Otherwise, the default is
|
14793 |
|
|
\&\fB\-march=g5\fR.
|
14794 |
|
|
.IP "\fB\-mtune=\fR\fIcpu-type\fR" 4
|
14795 |
|
|
.IX Item "-mtune=cpu-type"
|
14796 |
|
|
Tune to \fIcpu-type\fR everything applicable about the generated code,
|
14797 |
|
|
except for the \s-1ABI\s0 and the set of available instructions.
|
14798 |
|
|
The list of \fIcpu-type\fR values is the same as for \fB\-march\fR.
|
14799 |
|
|
The default is the value used for \fB\-march\fR.
|
14800 |
|
|
.IP "\fB\-mtpf\-trace\fR" 4
|
14801 |
|
|
.IX Item "-mtpf-trace"
|
14802 |
|
|
.PD 0
|
14803 |
|
|
.IP "\fB\-mno\-tpf\-trace\fR" 4
|
14804 |
|
|
.IX Item "-mno-tpf-trace"
|
14805 |
|
|
.PD
|
14806 |
|
|
Generate code that adds (does not add) in \s-1TPF\s0 \s-1OS\s0 specific branches to trace
|
14807 |
|
|
routines in the operating system. This option is off by default, even
|
14808 |
|
|
when compiling for the \s-1TPF\s0 \s-1OS\s0.
|
14809 |
|
|
.IP "\fB\-mfused\-madd\fR" 4
|
14810 |
|
|
.IX Item "-mfused-madd"
|
14811 |
|
|
.PD 0
|
14812 |
|
|
.IP "\fB\-mno\-fused\-madd\fR" 4
|
14813 |
|
|
.IX Item "-mno-fused-madd"
|
14814 |
|
|
.PD
|
14815 |
|
|
Generate code that uses (does not use) the floating point multiply and
|
14816 |
|
|
accumulate instructions. These instructions are generated by default if
|
14817 |
|
|
hardware floating point is used.
|
14818 |
|
|
.IP "\fB\-mwarn\-framesize=\fR\fIframesize\fR" 4
|
14819 |
|
|
.IX Item "-mwarn-framesize=framesize"
|
14820 |
|
|
Emit a warning if the current function exceeds the given frame size. Because
|
14821 |
|
|
this is a compile time check it doesn't need to be a real problem when the program
|
14822 |
|
|
runs. It is intended to identify functions which most probably cause
|
14823 |
|
|
a stack overflow. It is useful to be used in an environment with limited stack
|
14824 |
|
|
size e.g. the linux kernel.
|
14825 |
|
|
.IP "\fB\-mwarn\-dynamicstack\fR" 4
|
14826 |
|
|
.IX Item "-mwarn-dynamicstack"
|
14827 |
|
|
Emit a warning if the function calls alloca or uses dynamically
|
14828 |
|
|
sized arrays. This is generally a bad idea with a limited stack size.
|
14829 |
|
|
.IP "\fB\-mstack\-guard=\fR\fIstack-guard\fR" 4
|
14830 |
|
|
.IX Item "-mstack-guard=stack-guard"
|
14831 |
|
|
.PD 0
|
14832 |
|
|
.IP "\fB\-mstack\-size=\fR\fIstack-size\fR" 4
|
14833 |
|
|
.IX Item "-mstack-size=stack-size"
|
14834 |
|
|
.PD
|
14835 |
|
|
If these options are provided the s390 back end emits additional instructions in
|
14836 |
|
|
the function prologue which trigger a trap if the stack size is \fIstack-guard\fR
|
14837 |
|
|
bytes above the \fIstack-size\fR (remember that the stack on s390 grows downward).
|
14838 |
|
|
If the \fIstack-guard\fR option is omitted the smallest power of 2 larger than
|
14839 |
|
|
the frame size of the compiled function is chosen.
|
14840 |
|
|
These options are intended to be used to help debugging stack overflow problems.
|
14841 |
|
|
The additionally emitted code causes only little overhead and hence can also be
|
14842 |
|
|
used in production like systems without greater performance degradation. The given
|
14843 |
|
|
values have to be exact powers of 2 and \fIstack-size\fR has to be greater than
|
14844 |
|
|
\&\fIstack-guard\fR without exceeding 64k.
|
14845 |
|
|
In order to be efficient the extra code makes the assumption that the stack starts
|
14846 |
|
|
at an address aligned to the value given by \fIstack-size\fR.
|
14847 |
|
|
The \fIstack-guard\fR option can only be used in conjunction with \fIstack-size\fR.
|
14848 |
|
|
.PP
|
14849 |
|
|
\fIScore Options\fR
|
14850 |
|
|
.IX Subsection "Score Options"
|
14851 |
|
|
.PP
|
14852 |
|
|
These options are defined for Score implementations:
|
14853 |
|
|
.IP "\fB\-meb\fR" 4
|
14854 |
|
|
.IX Item "-meb"
|
14855 |
|
|
Compile code for big endian mode. This is the default.
|
14856 |
|
|
.IP "\fB\-mel\fR" 4
|
14857 |
|
|
.IX Item "-mel"
|
14858 |
|
|
Compile code for little endian mode.
|
14859 |
|
|
.IP "\fB\-mnhwloop\fR" 4
|
14860 |
|
|
.IX Item "-mnhwloop"
|
14861 |
|
|
Disable generate bcnz instruction.
|
14862 |
|
|
.IP "\fB\-muls\fR" 4
|
14863 |
|
|
.IX Item "-muls"
|
14864 |
|
|
Enable generate unaligned load and store instruction.
|
14865 |
|
|
.IP "\fB\-mmac\fR" 4
|
14866 |
|
|
.IX Item "-mmac"
|
14867 |
|
|
Enable the use of multiply-accumulate instructions. Disabled by default.
|
14868 |
|
|
.IP "\fB\-mscore5\fR" 4
|
14869 |
|
|
.IX Item "-mscore5"
|
14870 |
|
|
Specify the \s-1SCORE5\s0 as the target architecture.
|
14871 |
|
|
.IP "\fB\-mscore5u\fR" 4
|
14872 |
|
|
.IX Item "-mscore5u"
|
14873 |
|
|
Specify the \s-1SCORE5U\s0 of the target architecture.
|
14874 |
|
|
.IP "\fB\-mscore7\fR" 4
|
14875 |
|
|
.IX Item "-mscore7"
|
14876 |
|
|
Specify the \s-1SCORE7\s0 as the target architecture. This is the default.
|
14877 |
|
|
.IP "\fB\-mscore7d\fR" 4
|
14878 |
|
|
.IX Item "-mscore7d"
|
14879 |
|
|
Specify the \s-1SCORE7D\s0 as the target architecture.
|
14880 |
|
|
.PP
|
14881 |
|
|
\fI\s-1SH\s0 Options\fR
|
14882 |
|
|
.IX Subsection "SH Options"
|
14883 |
|
|
.PP
|
14884 |
|
|
These \fB\-m\fR options are defined for the \s-1SH\s0 implementations:
|
14885 |
|
|
.IP "\fB\-m1\fR" 4
|
14886 |
|
|
.IX Item "-m1"
|
14887 |
|
|
Generate code for the \s-1SH1\s0.
|
14888 |
|
|
.IP "\fB\-m2\fR" 4
|
14889 |
|
|
.IX Item "-m2"
|
14890 |
|
|
Generate code for the \s-1SH2\s0.
|
14891 |
|
|
.IP "\fB\-m2e\fR" 4
|
14892 |
|
|
.IX Item "-m2e"
|
14893 |
|
|
Generate code for the SH2e.
|
14894 |
|
|
.IP "\fB\-m2a\-nofpu\fR" 4
|
14895 |
|
|
.IX Item "-m2a-nofpu"
|
14896 |
|
|
Generate code for the SH2a without \s-1FPU\s0, or for a SH2a\-FPU in such a way
|
14897 |
|
|
that the floating-point unit is not used.
|
14898 |
|
|
.IP "\fB\-m2a\-single\-only\fR" 4
|
14899 |
|
|
.IX Item "-m2a-single-only"
|
14900 |
|
|
Generate code for the SH2a\-FPU, in such a way that no double-precision
|
14901 |
|
|
floating point operations are used.
|
14902 |
|
|
.IP "\fB\-m2a\-single\fR" 4
|
14903 |
|
|
.IX Item "-m2a-single"
|
14904 |
|
|
Generate code for the SH2a\-FPU assuming the floating-point unit is in
|
14905 |
|
|
single-precision mode by default.
|
14906 |
|
|
.IP "\fB\-m2a\fR" 4
|
14907 |
|
|
.IX Item "-m2a"
|
14908 |
|
|
Generate code for the SH2a\-FPU assuming the floating-point unit is in
|
14909 |
|
|
double-precision mode by default.
|
14910 |
|
|
.IP "\fB\-m3\fR" 4
|
14911 |
|
|
.IX Item "-m3"
|
14912 |
|
|
Generate code for the \s-1SH3\s0.
|
14913 |
|
|
.IP "\fB\-m3e\fR" 4
|
14914 |
|
|
.IX Item "-m3e"
|
14915 |
|
|
Generate code for the SH3e.
|
14916 |
|
|
.IP "\fB\-m4\-nofpu\fR" 4
|
14917 |
|
|
.IX Item "-m4-nofpu"
|
14918 |
|
|
Generate code for the \s-1SH4\s0 without a floating-point unit.
|
14919 |
|
|
.IP "\fB\-m4\-single\-only\fR" 4
|
14920 |
|
|
.IX Item "-m4-single-only"
|
14921 |
|
|
Generate code for the \s-1SH4\s0 with a floating-point unit that only
|
14922 |
|
|
supports single-precision arithmetic.
|
14923 |
|
|
.IP "\fB\-m4\-single\fR" 4
|
14924 |
|
|
.IX Item "-m4-single"
|
14925 |
|
|
Generate code for the \s-1SH4\s0 assuming the floating-point unit is in
|
14926 |
|
|
single-precision mode by default.
|
14927 |
|
|
.IP "\fB\-m4\fR" 4
|
14928 |
|
|
.IX Item "-m4"
|
14929 |
|
|
Generate code for the \s-1SH4\s0.
|
14930 |
|
|
.IP "\fB\-m4a\-nofpu\fR" 4
|
14931 |
|
|
.IX Item "-m4a-nofpu"
|
14932 |
|
|
Generate code for the SH4al\-dsp, or for a SH4a in such a way that the
|
14933 |
|
|
floating-point unit is not used.
|
14934 |
|
|
.IP "\fB\-m4a\-single\-only\fR" 4
|
14935 |
|
|
.IX Item "-m4a-single-only"
|
14936 |
|
|
Generate code for the SH4a, in such a way that no double-precision
|
14937 |
|
|
floating point operations are used.
|
14938 |
|
|
.IP "\fB\-m4a\-single\fR" 4
|
14939 |
|
|
.IX Item "-m4a-single"
|
14940 |
|
|
Generate code for the SH4a assuming the floating-point unit is in
|
14941 |
|
|
single-precision mode by default.
|
14942 |
|
|
.IP "\fB\-m4a\fR" 4
|
14943 |
|
|
.IX Item "-m4a"
|
14944 |
|
|
Generate code for the SH4a.
|
14945 |
|
|
.IP "\fB\-m4al\fR" 4
|
14946 |
|
|
.IX Item "-m4al"
|
14947 |
|
|
Same as \fB\-m4a\-nofpu\fR, except that it implicitly passes
|
14948 |
|
|
\&\fB\-dsp\fR to the assembler. \s-1GCC\s0 doesn't generate any \s-1DSP\s0
|
14949 |
|
|
instructions at the moment.
|
14950 |
|
|
.IP "\fB\-mb\fR" 4
|
14951 |
|
|
.IX Item "-mb"
|
14952 |
|
|
Compile code for the processor in big endian mode.
|
14953 |
|
|
.IP "\fB\-ml\fR" 4
|
14954 |
|
|
.IX Item "-ml"
|
14955 |
|
|
Compile code for the processor in little endian mode.
|
14956 |
|
|
.IP "\fB\-mdalign\fR" 4
|
14957 |
|
|
.IX Item "-mdalign"
|
14958 |
|
|
Align doubles at 64\-bit boundaries. Note that this changes the calling
|
14959 |
|
|
conventions, and thus some functions from the standard C library will
|
14960 |
|
|
not work unless you recompile it first with \fB\-mdalign\fR.
|
14961 |
|
|
.IP "\fB\-mrelax\fR" 4
|
14962 |
|
|
.IX Item "-mrelax"
|
14963 |
|
|
Shorten some address references at link time, when possible; uses the
|
14964 |
|
|
linker option \fB\-relax\fR.
|
14965 |
|
|
.IP "\fB\-mbigtable\fR" 4
|
14966 |
|
|
.IX Item "-mbigtable"
|
14967 |
|
|
Use 32\-bit offsets in \f(CW\*(C`switch\*(C'\fR tables. The default is to use
|
14968 |
|
|
16\-bit offsets.
|
14969 |
|
|
.IP "\fB\-mbitops\fR" 4
|
14970 |
|
|
.IX Item "-mbitops"
|
14971 |
|
|
Enable the use of bit manipulation instructions on \s-1SH2A\s0.
|
14972 |
|
|
.IP "\fB\-mfmovd\fR" 4
|
14973 |
|
|
.IX Item "-mfmovd"
|
14974 |
|
|
Enable the use of the instruction \f(CW\*(C`fmovd\*(C'\fR. Check \fB\-mdalign\fR for
|
14975 |
|
|
alignment constraints.
|
14976 |
|
|
.IP "\fB\-mhitachi\fR" 4
|
14977 |
|
|
.IX Item "-mhitachi"
|
14978 |
|
|
Comply with the calling conventions defined by Renesas.
|
14979 |
|
|
.IP "\fB\-mrenesas\fR" 4
|
14980 |
|
|
.IX Item "-mrenesas"
|
14981 |
|
|
Comply with the calling conventions defined by Renesas.
|
14982 |
|
|
.IP "\fB\-mno\-renesas\fR" 4
|
14983 |
|
|
.IX Item "-mno-renesas"
|
14984 |
|
|
Comply with the calling conventions defined for \s-1GCC\s0 before the Renesas
|
14985 |
|
|
conventions were available. This option is the default for all
|
14986 |
|
|
targets of the \s-1SH\s0 toolchain except for \fBsh-symbianelf\fR.
|
14987 |
|
|
.IP "\fB\-mnomacsave\fR" 4
|
14988 |
|
|
.IX Item "-mnomacsave"
|
14989 |
|
|
Mark the \f(CW\*(C`MAC\*(C'\fR register as call-clobbered, even if
|
14990 |
|
|
\&\fB\-mhitachi\fR is given.
|
14991 |
|
|
.IP "\fB\-mieee\fR" 4
|
14992 |
|
|
.IX Item "-mieee"
|
14993 |
|
|
Increase IEEE-compliance of floating-point code.
|
14994 |
|
|
At the moment, this is equivalent to \fB\-fno\-finite\-math\-only\fR.
|
14995 |
|
|
When generating 16 bit \s-1SH\s0 opcodes, getting IEEE-conforming results for
|
14996 |
|
|
comparisons of NANs / infinities incurs extra overhead in every
|
14997 |
|
|
floating point comparison, therefore the default is set to
|
14998 |
|
|
\&\fB\-ffinite\-math\-only\fR.
|
14999 |
|
|
.IP "\fB\-minline\-ic_invalidate\fR" 4
|
15000 |
|
|
.IX Item "-minline-ic_invalidate"
|
15001 |
|
|
Inline code to invalidate instruction cache entries after setting up
|
15002 |
|
|
nested function trampolines.
|
15003 |
|
|
This option has no effect if \-musermode is in effect and the selected
|
15004 |
|
|
code generation option (e.g. \-m4) does not allow the use of the icbi
|
15005 |
|
|
instruction.
|
15006 |
|
|
If the selected code generation option does not allow the use of the icbi
|
15007 |
|
|
instruction, and \-musermode is not in effect, the inlined code will
|
15008 |
|
|
manipulate the instruction cache address array directly with an associative
|
15009 |
|
|
write. This not only requires privileged mode, but it will also
|
15010 |
|
|
fail if the cache line had been mapped via the \s-1TLB\s0 and has become unmapped.
|
15011 |
|
|
.IP "\fB\-misize\fR" 4
|
15012 |
|
|
.IX Item "-misize"
|
15013 |
|
|
Dump instruction size and location in the assembly code.
|
15014 |
|
|
.IP "\fB\-mpadstruct\fR" 4
|
15015 |
|
|
.IX Item "-mpadstruct"
|
15016 |
|
|
This option is deprecated. It pads structures to multiple of 4 bytes,
|
15017 |
|
|
which is incompatible with the \s-1SH\s0 \s-1ABI\s0.
|
15018 |
|
|
.IP "\fB\-mspace\fR" 4
|
15019 |
|
|
.IX Item "-mspace"
|
15020 |
|
|
Optimize for space instead of speed. Implied by \fB\-Os\fR.
|
15021 |
|
|
.IP "\fB\-mprefergot\fR" 4
|
15022 |
|
|
.IX Item "-mprefergot"
|
15023 |
|
|
When generating position-independent code, emit function calls using
|
15024 |
|
|
the Global Offset Table instead of the Procedure Linkage Table.
|
15025 |
|
|
.IP "\fB\-musermode\fR" 4
|
15026 |
|
|
.IX Item "-musermode"
|
15027 |
|
|
Don't generate privileged mode only code; implies \-mno\-inline\-ic_invalidate
|
15028 |
|
|
if the inlined code would not work in user mode.
|
15029 |
|
|
This is the default when the target is \f(CW\*(C`sh\-*\-linux*\*(C'\fR.
|
15030 |
|
|
.IP "\fB\-multcost=\fR\fInumber\fR" 4
|
15031 |
|
|
.IX Item "-multcost=number"
|
15032 |
|
|
Set the cost to assume for a multiply insn.
|
15033 |
|
|
.IP "\fB\-mdiv=\fR\fIstrategy\fR" 4
|
15034 |
|
|
.IX Item "-mdiv=strategy"
|
15035 |
|
|
Set the division strategy to use for SHmedia code. \fIstrategy\fR must be
|
15036 |
|
|
one of: call, call2, fp, inv, inv:minlat, inv20u, inv20l, inv:call,
|
15037 |
|
|
inv:call2, inv:fp .
|
15038 |
|
|
\&\*(L"fp\*(R" performs the operation in floating point. This has a very high latency,
|
15039 |
|
|
but needs only a few instructions, so it might be a good choice if
|
15040 |
|
|
your code has enough easily exploitable \s-1ILP\s0 to allow the compiler to
|
15041 |
|
|
schedule the floating point instructions together with other instructions.
|
15042 |
|
|
Division by zero causes a floating point exception.
|
15043 |
|
|
\&\*(L"inv\*(R" uses integer operations to calculate the inverse of the divisor,
|
15044 |
|
|
and then multiplies the dividend with the inverse. This strategy allows
|
15045 |
|
|
cse and hoisting of the inverse calculation. Division by zero calculates
|
15046 |
|
|
an unspecified result, but does not trap.
|
15047 |
|
|
\&\*(L"inv:minlat\*(R" is a variant of \*(L"inv\*(R" where if no cse / hoisting opportunities
|
15048 |
|
|
have been found, or if the entire operation has been hoisted to the same
|
15049 |
|
|
place, the last stages of the inverse calculation are intertwined with the
|
15050 |
|
|
final multiply to reduce the overall latency, at the expense of using a few
|
15051 |
|
|
more instructions, and thus offering fewer scheduling opportunities with
|
15052 |
|
|
other code.
|
15053 |
|
|
\&\*(L"call\*(R" calls a library function that usually implements the inv:minlat
|
15054 |
|
|
strategy.
|
15055 |
|
|
This gives high code density for m5\-*media\-nofpu compilations.
|
15056 |
|
|
\&\*(L"call2\*(R" uses a different entry point of the same library function, where it
|
15057 |
|
|
assumes that a pointer to a lookup table has already been set up, which
|
15058 |
|
|
exposes the pointer load to cse / code hoisting optimizations.
|
15059 |
|
|
\&\*(L"inv:call\*(R", \*(L"inv:call2\*(R" and \*(L"inv:fp\*(R" all use the \*(L"inv\*(R" algorithm for initial
|
15060 |
|
|
code generation, but if the code stays unoptimized, revert to the \*(L"call\*(R",
|
15061 |
|
|
\&\*(L"call2\*(R", or \*(L"fp\*(R" strategies, respectively. Note that the
|
15062 |
|
|
potentially-trapping side effect of division by zero is carried by a
|
15063 |
|
|
separate instruction, so it is possible that all the integer instructions
|
15064 |
|
|
are hoisted out, but the marker for the side effect stays where it is.
|
15065 |
|
|
A recombination to fp operations or a call is not possible in that case.
|
15066 |
|
|
\&\*(L"inv20u\*(R" and \*(L"inv20l\*(R" are variants of the \*(L"inv:minlat\*(R" strategy. In the case
|
15067 |
|
|
that the inverse calculation was nor separated from the multiply, they speed
|
15068 |
|
|
up division where the dividend fits into 20 bits (plus sign where applicable),
|
15069 |
|
|
by inserting a test to skip a number of operations in this case; this test
|
15070 |
|
|
slows down the case of larger dividends. inv20u assumes the case of a such
|
15071 |
|
|
a small dividend to be unlikely, and inv20l assumes it to be likely.
|
15072 |
|
|
.IP "\fB\-mdivsi3_libfunc=\fR\fIname\fR" 4
|
15073 |
|
|
.IX Item "-mdivsi3_libfunc=name"
|
15074 |
|
|
Set the name of the library function used for 32 bit signed division to
|
15075 |
|
|
\&\fIname\fR. This only affect the name used in the call and inv:call
|
15076 |
|
|
division strategies, and the compiler will still expect the same
|
15077 |
|
|
sets of input/output/clobbered registers as if this option was not present.
|
15078 |
|
|
.IP "\fB\-mfixed\-range=\fR\fIregister-range\fR" 4
|
15079 |
|
|
.IX Item "-mfixed-range=register-range"
|
15080 |
|
|
Generate code treating the given register range as fixed registers.
|
15081 |
|
|
A fixed register is one that the register allocator can not use. This is
|
15082 |
|
|
useful when compiling kernel code. A register range is specified as
|
15083 |
|
|
two registers separated by a dash. Multiple register ranges can be
|
15084 |
|
|
specified separated by a comma.
|
15085 |
|
|
.IP "\fB\-madjust\-unroll\fR" 4
|
15086 |
|
|
.IX Item "-madjust-unroll"
|
15087 |
|
|
Throttle unrolling to avoid thrashing target registers.
|
15088 |
|
|
This option only has an effect if the gcc code base supports the
|
15089 |
|
|
\&\s-1TARGET_ADJUST_UNROLL_MAX\s0 target hook.
|
15090 |
|
|
.IP "\fB\-mindexed\-addressing\fR" 4
|
15091 |
|
|
.IX Item "-mindexed-addressing"
|
15092 |
|
|
Enable the use of the indexed addressing mode for SHmedia32/SHcompact.
|
15093 |
|
|
This is only safe if the hardware and/or \s-1OS\s0 implement 32 bit wrap-around
|
15094 |
|
|
semantics for the indexed addressing mode. The architecture allows the
|
15095 |
|
|
implementation of processors with 64 bit \s-1MMU\s0, which the \s-1OS\s0 could use to
|
15096 |
|
|
get 32 bit addressing, but since no current hardware implementation supports
|
15097 |
|
|
this or any other way to make the indexed addressing mode safe to use in
|
15098 |
|
|
the 32 bit \s-1ABI\s0, the default is \-mno\-indexed\-addressing.
|
15099 |
|
|
.IP "\fB\-mgettrcost=\fR\fInumber\fR" 4
|
15100 |
|
|
.IX Item "-mgettrcost=number"
|
15101 |
|
|
Set the cost assumed for the gettr instruction to \fInumber\fR.
|
15102 |
|
|
The default is 2 if \fB\-mpt\-fixed\fR is in effect, 100 otherwise.
|
15103 |
|
|
.IP "\fB\-mpt\-fixed\fR" 4
|
15104 |
|
|
.IX Item "-mpt-fixed"
|
15105 |
|
|
Assume pt* instructions won't trap. This will generally generate better
|
15106 |
|
|
scheduled code, but is unsafe on current hardware. The current architecture
|
15107 |
|
|
definition says that ptabs and ptrel trap when the target anded with 3 is 3.
|
15108 |
|
|
This has the unintentional effect of making it unsafe to schedule ptabs /
|
15109 |
|
|
ptrel before a branch, or hoist it out of a loop. For example,
|
15110 |
|
|
_\|_do_global_ctors, a part of libgcc that runs constructors at program
|
15111 |
|
|
startup, calls functions in a list which is delimited by \-1. With the
|
15112 |
|
|
\&\-mpt\-fixed option, the ptabs will be done before testing against \-1.
|
15113 |
|
|
That means that all the constructors will be run a bit quicker, but when
|
15114 |
|
|
the loop comes to the end of the list, the program crashes because ptabs
|
15115 |
|
|
loads \-1 into a target register. Since this option is unsafe for any
|
15116 |
|
|
hardware implementing the current architecture specification, the default
|
15117 |
|
|
is \-mno\-pt\-fixed. Unless the user specifies a specific cost with
|
15118 |
|
|
\&\fB\-mgettrcost\fR, \-mno\-pt\-fixed also implies \fB\-mgettrcost=100\fR;
|
15119 |
|
|
this deters register allocation using target registers for storing
|
15120 |
|
|
ordinary integers.
|
15121 |
|
|
.IP "\fB\-minvalid\-symbols\fR" 4
|
15122 |
|
|
.IX Item "-minvalid-symbols"
|
15123 |
|
|
Assume symbols might be invalid. Ordinary function symbols generated by
|
15124 |
|
|
the compiler will always be valid to load with movi/shori/ptabs or
|
15125 |
|
|
movi/shori/ptrel, but with assembler and/or linker tricks it is possible
|
15126 |
|
|
to generate symbols that will cause ptabs / ptrel to trap.
|
15127 |
|
|
This option is only meaningful when \fB\-mno\-pt\-fixed\fR is in effect.
|
15128 |
|
|
It will then prevent cross-basic-block cse, hoisting and most scheduling
|
15129 |
|
|
of symbol loads. The default is \fB\-mno\-invalid\-symbols\fR.
|
15130 |
|
|
.PP
|
15131 |
|
|
\fI\s-1SPARC\s0 Options\fR
|
15132 |
|
|
.IX Subsection "SPARC Options"
|
15133 |
|
|
.PP
|
15134 |
|
|
These \fB\-m\fR options are supported on the \s-1SPARC:\s0
|
15135 |
|
|
.IP "\fB\-mno\-app\-regs\fR" 4
|
15136 |
|
|
.IX Item "-mno-app-regs"
|
15137 |
|
|
.PD 0
|
15138 |
|
|
.IP "\fB\-mapp\-regs\fR" 4
|
15139 |
|
|
.IX Item "-mapp-regs"
|
15140 |
|
|
.PD
|
15141 |
|
|
Specify \fB\-mapp\-regs\fR to generate output using the global registers
|
15142 |
|
|
2 through 4, which the \s-1SPARC\s0 \s-1SVR4\s0 \s-1ABI\s0 reserves for applications. This
|
15143 |
|
|
is the default.
|
15144 |
|
|
.Sp
|
15145 |
|
|
To be fully \s-1SVR4\s0 \s-1ABI\s0 compliant at the cost of some performance loss,
|
15146 |
|
|
specify \fB\-mno\-app\-regs\fR. You should compile libraries and system
|
15147 |
|
|
software with this option.
|
15148 |
|
|
.IP "\fB\-mfpu\fR" 4
|
15149 |
|
|
.IX Item "-mfpu"
|
15150 |
|
|
.PD 0
|
15151 |
|
|
.IP "\fB\-mhard\-float\fR" 4
|
15152 |
|
|
.IX Item "-mhard-float"
|
15153 |
|
|
.PD
|
15154 |
|
|
Generate output containing floating point instructions. This is the
|
15155 |
|
|
default.
|
15156 |
|
|
.IP "\fB\-mno\-fpu\fR" 4
|
15157 |
|
|
.IX Item "-mno-fpu"
|
15158 |
|
|
.PD 0
|
15159 |
|
|
.IP "\fB\-msoft\-float\fR" 4
|
15160 |
|
|
.IX Item "-msoft-float"
|
15161 |
|
|
.PD
|
15162 |
|
|
Generate output containing library calls for floating point.
|
15163 |
|
|
\&\fBWarning:\fR the requisite libraries are not available for all \s-1SPARC\s0
|
15164 |
|
|
targets. Normally the facilities of the machine's usual C compiler are
|
15165 |
|
|
used, but this cannot be done directly in cross-compilation. You must make
|
15166 |
|
|
your own arrangements to provide suitable library functions for
|
15167 |
|
|
cross-compilation. The embedded targets \fBsparc\-*\-aout\fR and
|
15168 |
|
|
\&\fBsparclite\-*\-*\fR do provide software floating point support.
|
15169 |
|
|
.Sp
|
15170 |
|
|
\&\fB\-msoft\-float\fR changes the calling convention in the output file;
|
15171 |
|
|
therefore, it is only useful if you compile \fIall\fR of a program with
|
15172 |
|
|
this option. In particular, you need to compile \fIlibgcc.a\fR, the
|
15173 |
|
|
library that comes with \s-1GCC\s0, with \fB\-msoft\-float\fR in order for
|
15174 |
|
|
this to work.
|
15175 |
|
|
.IP "\fB\-mhard\-quad\-float\fR" 4
|
15176 |
|
|
.IX Item "-mhard-quad-float"
|
15177 |
|
|
Generate output containing quad-word (long double) floating point
|
15178 |
|
|
instructions.
|
15179 |
|
|
.IP "\fB\-msoft\-quad\-float\fR" 4
|
15180 |
|
|
.IX Item "-msoft-quad-float"
|
15181 |
|
|
Generate output containing library calls for quad-word (long double)
|
15182 |
|
|
floating point instructions. The functions called are those specified
|
15183 |
|
|
in the \s-1SPARC\s0 \s-1ABI\s0. This is the default.
|
15184 |
|
|
.Sp
|
15185 |
|
|
As of this writing, there are no \s-1SPARC\s0 implementations that have hardware
|
15186 |
|
|
support for the quad-word floating point instructions. They all invoke
|
15187 |
|
|
a trap handler for one of these instructions, and then the trap handler
|
15188 |
|
|
emulates the effect of the instruction. Because of the trap handler overhead,
|
15189 |
|
|
this is much slower than calling the \s-1ABI\s0 library routines. Thus the
|
15190 |
|
|
\&\fB\-msoft\-quad\-float\fR option is the default.
|
15191 |
|
|
.IP "\fB\-mno\-unaligned\-doubles\fR" 4
|
15192 |
|
|
.IX Item "-mno-unaligned-doubles"
|
15193 |
|
|
.PD 0
|
15194 |
|
|
.IP "\fB\-munaligned\-doubles\fR" 4
|
15195 |
|
|
.IX Item "-munaligned-doubles"
|
15196 |
|
|
.PD
|
15197 |
|
|
Assume that doubles have 8 byte alignment. This is the default.
|
15198 |
|
|
.Sp
|
15199 |
|
|
With \fB\-munaligned\-doubles\fR, \s-1GCC\s0 assumes that doubles have 8 byte
|
15200 |
|
|
alignment only if they are contained in another type, or if they have an
|
15201 |
|
|
absolute address. Otherwise, it assumes they have 4 byte alignment.
|
15202 |
|
|
Specifying this option avoids some rare compatibility problems with code
|
15203 |
|
|
generated by other compilers. It is not the default because it results
|
15204 |
|
|
in a performance loss, especially for floating point code.
|
15205 |
|
|
.IP "\fB\-mno\-faster\-structs\fR" 4
|
15206 |
|
|
.IX Item "-mno-faster-structs"
|
15207 |
|
|
.PD 0
|
15208 |
|
|
.IP "\fB\-mfaster\-structs\fR" 4
|
15209 |
|
|
.IX Item "-mfaster-structs"
|
15210 |
|
|
.PD
|
15211 |
|
|
With \fB\-mfaster\-structs\fR, the compiler assumes that structures
|
15212 |
|
|
should have 8 byte alignment. This enables the use of pairs of
|
15213 |
|
|
\&\f(CW\*(C`ldd\*(C'\fR and \f(CW\*(C`std\*(C'\fR instructions for copies in structure
|
15214 |
|
|
assignment, in place of twice as many \f(CW\*(C`ld\*(C'\fR and \f(CW\*(C`st\*(C'\fR pairs.
|
15215 |
|
|
However, the use of this changed alignment directly violates the \s-1SPARC\s0
|
15216 |
|
|
\&\s-1ABI\s0. Thus, it's intended only for use on targets where the developer
|
15217 |
|
|
acknowledges that their resulting code will not be directly in line with
|
15218 |
|
|
the rules of the \s-1ABI\s0.
|
15219 |
|
|
.IP "\fB\-mimpure\-text\fR" 4
|
15220 |
|
|
.IX Item "-mimpure-text"
|
15221 |
|
|
\&\fB\-mimpure\-text\fR, used in addition to \fB\-shared\fR, tells
|
15222 |
|
|
the compiler to not pass \fB\-z text\fR to the linker when linking a
|
15223 |
|
|
shared object. Using this option, you can link position-dependent
|
15224 |
|
|
code into a shared object.
|
15225 |
|
|
.Sp
|
15226 |
|
|
\&\fB\-mimpure\-text\fR suppresses the \*(L"relocations remain against
|
15227 |
|
|
allocatable but non-writable sections\*(R" linker error message.
|
15228 |
|
|
However, the necessary relocations will trigger copy-on-write, and the
|
15229 |
|
|
shared object is not actually shared across processes. Instead of
|
15230 |
|
|
using \fB\-mimpure\-text\fR, you should compile all source code with
|
15231 |
|
|
\&\fB\-fpic\fR or \fB\-fPIC\fR.
|
15232 |
|
|
.Sp
|
15233 |
|
|
This option is only available on SunOS and Solaris.
|
15234 |
|
|
.IP "\fB\-mcpu=\fR\fIcpu_type\fR" 4
|
15235 |
|
|
.IX Item "-mcpu=cpu_type"
|
15236 |
|
|
Set the instruction set, register set, and instruction scheduling parameters
|
15237 |
|
|
for machine type \fIcpu_type\fR. Supported values for \fIcpu_type\fR are
|
15238 |
|
|
\&\fBv7\fR, \fBcypress\fR, \fBv8\fR, \fBsupersparc\fR, \fBsparclite\fR,
|
15239 |
|
|
\&\fBf930\fR, \fBf934\fR, \fBhypersparc\fR, \fBsparclite86x\fR,
|
15240 |
|
|
\&\fBsparclet\fR, \fBtsc701\fR, \fBv9\fR, \fBultrasparc\fR,
|
15241 |
|
|
\&\fBultrasparc3\fR, \fBniagara\fR and \fBniagara2\fR.
|
15242 |
|
|
.Sp
|
15243 |
|
|
Default instruction scheduling parameters are used for values that select
|
15244 |
|
|
an architecture and not an implementation. These are \fBv7\fR, \fBv8\fR,
|
15245 |
|
|
\&\fBsparclite\fR, \fBsparclet\fR, \fBv9\fR.
|
15246 |
|
|
.Sp
|
15247 |
|
|
Here is a list of each supported architecture and their supported
|
15248 |
|
|
implementations.
|
15249 |
|
|
.Sp
|
15250 |
|
|
.Vb 5
|
15251 |
|
|
\& v7: cypress
|
15252 |
|
|
\& v8: supersparc, hypersparc
|
15253 |
|
|
\& sparclite: f930, f934, sparclite86x
|
15254 |
|
|
\& sparclet: tsc701
|
15255 |
|
|
\& v9: ultrasparc, ultrasparc3, niagara, niagara2
|
15256 |
|
|
.Ve
|
15257 |
|
|
.Sp
|
15258 |
|
|
By default (unless configured otherwise), \s-1GCC\s0 generates code for the V7
|
15259 |
|
|
variant of the \s-1SPARC\s0 architecture. With \fB\-mcpu=cypress\fR, the compiler
|
15260 |
|
|
additionally optimizes it for the Cypress \s-1CY7C602\s0 chip, as used in the
|
15261 |
|
|
SPARCStation/SPARCServer 3xx series. This is also appropriate for the older
|
15262 |
|
|
SPARCStation 1, 2, \s-1IPX\s0 etc.
|
15263 |
|
|
.Sp
|
15264 |
|
|
With \fB\-mcpu=v8\fR, \s-1GCC\s0 generates code for the V8 variant of the \s-1SPARC\s0
|
15265 |
|
|
architecture. The only difference from V7 code is that the compiler emits
|
15266 |
|
|
the integer multiply and integer divide instructions which exist in \s-1SPARC\-V8\s0
|
15267 |
|
|
but not in \s-1SPARC\-V7\s0. With \fB\-mcpu=supersparc\fR, the compiler additionally
|
15268 |
|
|
optimizes it for the SuperSPARC chip, as used in the SPARCStation 10, 1000 and
|
15269 |
|
|
2000 series.
|
15270 |
|
|
.Sp
|
15271 |
|
|
With \fB\-mcpu=sparclite\fR, \s-1GCC\s0 generates code for the SPARClite variant of
|
15272 |
|
|
the \s-1SPARC\s0 architecture. This adds the integer multiply, integer divide step
|
15273 |
|
|
and scan (\f(CW\*(C`ffs\*(C'\fR) instructions which exist in SPARClite but not in \s-1SPARC\-V7\s0.
|
15274 |
|
|
With \fB\-mcpu=f930\fR, the compiler additionally optimizes it for the
|
15275 |
|
|
Fujitsu \s-1MB86930\s0 chip, which is the original SPARClite, with no \s-1FPU\s0. With
|
15276 |
|
|
\&\fB\-mcpu=f934\fR, the compiler additionally optimizes it for the Fujitsu
|
15277 |
|
|
\&\s-1MB86934\s0 chip, which is the more recent SPARClite with \s-1FPU\s0.
|
15278 |
|
|
.Sp
|
15279 |
|
|
With \fB\-mcpu=sparclet\fR, \s-1GCC\s0 generates code for the SPARClet variant of
|
15280 |
|
|
the \s-1SPARC\s0 architecture. This adds the integer multiply, multiply/accumulate,
|
15281 |
|
|
integer divide step and scan (\f(CW\*(C`ffs\*(C'\fR) instructions which exist in SPARClet
|
15282 |
|
|
but not in \s-1SPARC\-V7\s0. With \fB\-mcpu=tsc701\fR, the compiler additionally
|
15283 |
|
|
optimizes it for the \s-1TEMIC\s0 SPARClet chip.
|
15284 |
|
|
.Sp
|
15285 |
|
|
With \fB\-mcpu=v9\fR, \s-1GCC\s0 generates code for the V9 variant of the \s-1SPARC\s0
|
15286 |
|
|
architecture. This adds 64\-bit integer and floating-point move instructions,
|
15287 |
|
|
3 additional floating-point condition code registers and conditional move
|
15288 |
|
|
instructions. With \fB\-mcpu=ultrasparc\fR, the compiler additionally
|
15289 |
|
|
optimizes it for the Sun UltraSPARC I/II/IIi chips. With
|
15290 |
|
|
\&\fB\-mcpu=ultrasparc3\fR, the compiler additionally optimizes it for the
|
15291 |
|
|
Sun UltraSPARC III/III+/IIIi/IIIi+/IV/IV+ chips. With
|
15292 |
|
|
\&\fB\-mcpu=niagara\fR, the compiler additionally optimizes it for
|
15293 |
|
|
Sun UltraSPARC T1 chips. With \fB\-mcpu=niagara2\fR, the compiler
|
15294 |
|
|
additionally optimizes it for Sun UltraSPARC T2 chips.
|
15295 |
|
|
.IP "\fB\-mtune=\fR\fIcpu_type\fR" 4
|
15296 |
|
|
.IX Item "-mtune=cpu_type"
|
15297 |
|
|
Set the instruction scheduling parameters for machine type
|
15298 |
|
|
\&\fIcpu_type\fR, but do not set the instruction set or register set that the
|
15299 |
|
|
option \fB\-mcpu=\fR\fIcpu_type\fR would.
|
15300 |
|
|
.Sp
|
15301 |
|
|
The same values for \fB\-mcpu=\fR\fIcpu_type\fR can be used for
|
15302 |
|
|
\&\fB\-mtune=\fR\fIcpu_type\fR, but the only useful values are those
|
15303 |
|
|
that select a particular cpu implementation. Those are \fBcypress\fR,
|
15304 |
|
|
\&\fBsupersparc\fR, \fBhypersparc\fR, \fBf930\fR, \fBf934\fR,
|
15305 |
|
|
\&\fBsparclite86x\fR, \fBtsc701\fR, \fBultrasparc\fR,
|
15306 |
|
|
\&\fBultrasparc3\fR, \fBniagara\fR, and \fBniagara2\fR.
|
15307 |
|
|
.IP "\fB\-mv8plus\fR" 4
|
15308 |
|
|
.IX Item "-mv8plus"
|
15309 |
|
|
.PD 0
|
15310 |
|
|
.IP "\fB\-mno\-v8plus\fR" 4
|
15311 |
|
|
.IX Item "-mno-v8plus"
|
15312 |
|
|
.PD
|
15313 |
|
|
With \fB\-mv8plus\fR, \s-1GCC\s0 generates code for the \s-1SPARC\-V8+\s0 \s-1ABI\s0. The
|
15314 |
|
|
difference from the V8 \s-1ABI\s0 is that the global and out registers are
|
15315 |
|
|
considered 64\-bit wide. This is enabled by default on Solaris in 32\-bit
|
15316 |
|
|
mode for all \s-1SPARC\-V9\s0 processors.
|
15317 |
|
|
.IP "\fB\-mvis\fR" 4
|
15318 |
|
|
.IX Item "-mvis"
|
15319 |
|
|
.PD 0
|
15320 |
|
|
.IP "\fB\-mno\-vis\fR" 4
|
15321 |
|
|
.IX Item "-mno-vis"
|
15322 |
|
|
.PD
|
15323 |
|
|
With \fB\-mvis\fR, \s-1GCC\s0 generates code that takes advantage of the UltraSPARC
|
15324 |
|
|
Visual Instruction Set extensions. The default is \fB\-mno\-vis\fR.
|
15325 |
|
|
.PP
|
15326 |
|
|
These \fB\-m\fR options are supported in addition to the above
|
15327 |
|
|
on \s-1SPARC\-V9\s0 processors in 64\-bit environments:
|
15328 |
|
|
.IP "\fB\-mlittle\-endian\fR" 4
|
15329 |
|
|
.IX Item "-mlittle-endian"
|
15330 |
|
|
Generate code for a processor running in little-endian mode. It is only
|
15331 |
|
|
available for a few configurations and most notably not on Solaris and Linux.
|
15332 |
|
|
.IP "\fB\-m32\fR" 4
|
15333 |
|
|
.IX Item "-m32"
|
15334 |
|
|
.PD 0
|
15335 |
|
|
.IP "\fB\-m64\fR" 4
|
15336 |
|
|
.IX Item "-m64"
|
15337 |
|
|
.PD
|
15338 |
|
|
Generate code for a 32\-bit or 64\-bit environment.
|
15339 |
|
|
The 32\-bit environment sets int, long and pointer to 32 bits.
|
15340 |
|
|
The 64\-bit environment sets int to 32 bits and long and pointer
|
15341 |
|
|
to 64 bits.
|
15342 |
|
|
.IP "\fB\-mcmodel=medlow\fR" 4
|
15343 |
|
|
.IX Item "-mcmodel=medlow"
|
15344 |
|
|
Generate code for the Medium/Low code model: 64\-bit addresses, programs
|
15345 |
|
|
must be linked in the low 32 bits of memory. Programs can be statically
|
15346 |
|
|
or dynamically linked.
|
15347 |
|
|
.IP "\fB\-mcmodel=medmid\fR" 4
|
15348 |
|
|
.IX Item "-mcmodel=medmid"
|
15349 |
|
|
Generate code for the Medium/Middle code model: 64\-bit addresses, programs
|
15350 |
|
|
must be linked in the low 44 bits of memory, the text and data segments must
|
15351 |
|
|
be less than 2GB in size and the data segment must be located within 2GB of
|
15352 |
|
|
the text segment.
|
15353 |
|
|
.IP "\fB\-mcmodel=medany\fR" 4
|
15354 |
|
|
.IX Item "-mcmodel=medany"
|
15355 |
|
|
Generate code for the Medium/Anywhere code model: 64\-bit addresses, programs
|
15356 |
|
|
may be linked anywhere in memory, the text and data segments must be less
|
15357 |
|
|
than 2GB in size and the data segment must be located within 2GB of the
|
15358 |
|
|
text segment.
|
15359 |
|
|
.IP "\fB\-mcmodel=embmedany\fR" 4
|
15360 |
|
|
.IX Item "-mcmodel=embmedany"
|
15361 |
|
|
Generate code for the Medium/Anywhere code model for embedded systems:
|
15362 |
|
|
64\-bit addresses, the text and data segments must be less than 2GB in
|
15363 |
|
|
size, both starting anywhere in memory (determined at link time). The
|
15364 |
|
|
global register \f(CW%g4\fR points to the base of the data segment. Programs
|
15365 |
|
|
are statically linked and \s-1PIC\s0 is not supported.
|
15366 |
|
|
.IP "\fB\-mstack\-bias\fR" 4
|
15367 |
|
|
.IX Item "-mstack-bias"
|
15368 |
|
|
.PD 0
|
15369 |
|
|
.IP "\fB\-mno\-stack\-bias\fR" 4
|
15370 |
|
|
.IX Item "-mno-stack-bias"
|
15371 |
|
|
.PD
|
15372 |
|
|
With \fB\-mstack\-bias\fR, \s-1GCC\s0 assumes that the stack pointer, and
|
15373 |
|
|
frame pointer if present, are offset by \-2047 which must be added back
|
15374 |
|
|
when making stack frame references. This is the default in 64\-bit mode.
|
15375 |
|
|
Otherwise, assume no such offset is present.
|
15376 |
|
|
.PP
|
15377 |
|
|
These switches are supported in addition to the above on Solaris:
|
15378 |
|
|
.IP "\fB\-threads\fR" 4
|
15379 |
|
|
.IX Item "-threads"
|
15380 |
|
|
Add support for multithreading using the Solaris threads library. This
|
15381 |
|
|
option sets flags for both the preprocessor and linker. This option does
|
15382 |
|
|
not affect the thread safety of object code produced by the compiler or
|
15383 |
|
|
that of libraries supplied with it.
|
15384 |
|
|
.IP "\fB\-pthreads\fR" 4
|
15385 |
|
|
.IX Item "-pthreads"
|
15386 |
|
|
Add support for multithreading using the \s-1POSIX\s0 threads library. This
|
15387 |
|
|
option sets flags for both the preprocessor and linker. This option does
|
15388 |
|
|
not affect the thread safety of object code produced by the compiler or
|
15389 |
|
|
that of libraries supplied with it.
|
15390 |
|
|
.IP "\fB\-pthread\fR" 4
|
15391 |
|
|
.IX Item "-pthread"
|
15392 |
|
|
This is a synonym for \fB\-pthreads\fR.
|
15393 |
|
|
.PP
|
15394 |
|
|
\fI\s-1SPU\s0 Options\fR
|
15395 |
|
|
.IX Subsection "SPU Options"
|
15396 |
|
|
.PP
|
15397 |
|
|
These \fB\-m\fR options are supported on the \s-1SPU:\s0
|
15398 |
|
|
.IP "\fB\-mwarn\-reloc\fR" 4
|
15399 |
|
|
.IX Item "-mwarn-reloc"
|
15400 |
|
|
.PD 0
|
15401 |
|
|
.IP "\fB\-merror\-reloc\fR" 4
|
15402 |
|
|
.IX Item "-merror-reloc"
|
15403 |
|
|
.PD
|
15404 |
|
|
The loader for \s-1SPU\s0 does not handle dynamic relocations. By default, \s-1GCC\s0
|
15405 |
|
|
will give an error when it generates code that requires a dynamic
|
15406 |
|
|
relocation. \fB\-mno\-error\-reloc\fR disables the error,
|
15407 |
|
|
\&\fB\-mwarn\-reloc\fR will generate a warning instead.
|
15408 |
|
|
.IP "\fB\-msafe\-dma\fR" 4
|
15409 |
|
|
.IX Item "-msafe-dma"
|
15410 |
|
|
.PD 0
|
15411 |
|
|
.IP "\fB\-munsafe\-dma\fR" 4
|
15412 |
|
|
.IX Item "-munsafe-dma"
|
15413 |
|
|
.PD
|
15414 |
|
|
Instructions which initiate or test completion of \s-1DMA\s0 must not be
|
15415 |
|
|
reordered with respect to loads and stores of the memory which is being
|
15416 |
|
|
accessed. Users typically address this problem using the volatile
|
15417 |
|
|
keyword, but that can lead to inefficient code in places where the
|
15418 |
|
|
memory is known to not change. Rather than mark the memory as volatile
|
15419 |
|
|
we treat the \s-1DMA\s0 instructions as potentially effecting all memory. With
|
15420 |
|
|
\&\fB\-munsafe\-dma\fR users must use the volatile keyword to protect
|
15421 |
|
|
memory accesses.
|
15422 |
|
|
.IP "\fB\-mbranch\-hints\fR" 4
|
15423 |
|
|
.IX Item "-mbranch-hints"
|
15424 |
|
|
By default, \s-1GCC\s0 will generate a branch hint instruction to avoid
|
15425 |
|
|
pipeline stalls for always taken or probably taken branches. A hint
|
15426 |
|
|
will not be generated closer than 8 instructions away from its branch.
|
15427 |
|
|
There is little reason to disable them, except for debugging purposes,
|
15428 |
|
|
or to make an object a little bit smaller.
|
15429 |
|
|
.IP "\fB\-msmall\-mem\fR" 4
|
15430 |
|
|
.IX Item "-msmall-mem"
|
15431 |
|
|
.PD 0
|
15432 |
|
|
.IP "\fB\-mlarge\-mem\fR" 4
|
15433 |
|
|
.IX Item "-mlarge-mem"
|
15434 |
|
|
.PD
|
15435 |
|
|
By default, \s-1GCC\s0 generates code assuming that addresses are never larger
|
15436 |
|
|
than 18 bits. With \fB\-mlarge\-mem\fR code is generated that assumes
|
15437 |
|
|
a full 32 bit address.
|
15438 |
|
|
.IP "\fB\-mstdmain\fR" 4
|
15439 |
|
|
.IX Item "-mstdmain"
|
15440 |
|
|
By default, \s-1GCC\s0 links against startup code that assumes the SPU-style
|
15441 |
|
|
main function interface (which has an unconventional parameter list).
|
15442 |
|
|
With \fB\-mstdmain\fR, \s-1GCC\s0 will link your program against startup
|
15443 |
|
|
code that assumes a C99\-style interface to \f(CW\*(C`main\*(C'\fR, including a
|
15444 |
|
|
local copy of \f(CW\*(C`argv\*(C'\fR strings.
|
15445 |
|
|
.IP "\fB\-mfixed\-range=\fR\fIregister-range\fR" 4
|
15446 |
|
|
.IX Item "-mfixed-range=register-range"
|
15447 |
|
|
Generate code treating the given register range as fixed registers.
|
15448 |
|
|
A fixed register is one that the register allocator can not use. This is
|
15449 |
|
|
useful when compiling kernel code. A register range is specified as
|
15450 |
|
|
two registers separated by a dash. Multiple register ranges can be
|
15451 |
|
|
specified separated by a comma.
|
15452 |
|
|
.IP "\fB\-mea32\fR" 4
|
15453 |
|
|
.IX Item "-mea32"
|
15454 |
|
|
.PD 0
|
15455 |
|
|
.IP "\fB\-mea64\fR" 4
|
15456 |
|
|
.IX Item "-mea64"
|
15457 |
|
|
.PD
|
15458 |
|
|
Compile code assuming that pointers to the \s-1PPU\s0 address space accessed
|
15459 |
|
|
via the \f(CW\*(C`_\|_ea\*(C'\fR named address space qualifier are either 32 or 64
|
15460 |
|
|
bits wide. The default is 32 bits. As this is an \s-1ABI\s0 changing option,
|
15461 |
|
|
all object code in an executable must be compiled with the same setting.
|
15462 |
|
|
.IP "\fB\-maddress\-space\-conversion\fR" 4
|
15463 |
|
|
.IX Item "-maddress-space-conversion"
|
15464 |
|
|
.PD 0
|
15465 |
|
|
.IP "\fB\-mno\-address\-space\-conversion\fR" 4
|
15466 |
|
|
.IX Item "-mno-address-space-conversion"
|
15467 |
|
|
.PD
|
15468 |
|
|
Allow/disallow treating the \f(CW\*(C`_\|_ea\*(C'\fR address space as superset
|
15469 |
|
|
of the generic address space. This enables explicit type casts
|
15470 |
|
|
between \f(CW\*(C`_\|_ea\*(C'\fR and generic pointer as well as implicit
|
15471 |
|
|
conversions of generic pointers to \f(CW\*(C`_\|_ea\*(C'\fR pointers. The
|
15472 |
|
|
default is to allow address space pointer conversions.
|
15473 |
|
|
.IP "\fB\-mcache\-size=\fR\fIcache-size\fR" 4
|
15474 |
|
|
.IX Item "-mcache-size=cache-size"
|
15475 |
|
|
This option controls the version of libgcc that the compiler links to an
|
15476 |
|
|
executable and selects a software-managed cache for accessing variables
|
15477 |
|
|
in the \f(CW\*(C`_\|_ea\*(C'\fR address space with a particular cache size. Possible
|
15478 |
|
|
options for \fIcache-size\fR are \fB8\fR, \fB16\fR, \fB32\fR, \fB64\fR
|
15479 |
|
|
and \fB128\fR. The default cache size is 64KB.
|
15480 |
|
|
.IP "\fB\-matomic\-updates\fR" 4
|
15481 |
|
|
.IX Item "-matomic-updates"
|
15482 |
|
|
.PD 0
|
15483 |
|
|
.IP "\fB\-mno\-atomic\-updates\fR" 4
|
15484 |
|
|
.IX Item "-mno-atomic-updates"
|
15485 |
|
|
.PD
|
15486 |
|
|
This option controls the version of libgcc that the compiler links to an
|
15487 |
|
|
executable and selects whether atomic updates to the software-managed
|
15488 |
|
|
cache of PPU-side variables are used. If you use atomic updates, changes
|
15489 |
|
|
to a \s-1PPU\s0 variable from \s-1SPU\s0 code using the \f(CW\*(C`_\|_ea\*(C'\fR named address space
|
15490 |
|
|
qualifier will not interfere with changes to other \s-1PPU\s0 variables residing
|
15491 |
|
|
in the same cache line from \s-1PPU\s0 code. If you do not use atomic updates,
|
15492 |
|
|
such interference may occur; however, writing back cache lines will be
|
15493 |
|
|
more efficient. The default behavior is to use atomic updates.
|
15494 |
|
|
.IP "\fB\-mdual\-nops\fR" 4
|
15495 |
|
|
.IX Item "-mdual-nops"
|
15496 |
|
|
.PD 0
|
15497 |
|
|
.IP "\fB\-mdual\-nops=\fR\fIn\fR" 4
|
15498 |
|
|
.IX Item "-mdual-nops=n"
|
15499 |
|
|
.PD
|
15500 |
|
|
By default, \s-1GCC\s0 will insert nops to increase dual issue when it expects
|
15501 |
|
|
it to increase performance. \fIn\fR can be a value from 0 to 10. A
|
15502 |
|
|
smaller \fIn\fR will insert fewer nops. 10 is the default, 0 is the
|
15503 |
|
|
same as \fB\-mno\-dual\-nops\fR. Disabled with \fB\-Os\fR.
|
15504 |
|
|
.IP "\fB\-mhint\-max\-nops=\fR\fIn\fR" 4
|
15505 |
|
|
.IX Item "-mhint-max-nops=n"
|
15506 |
|
|
Maximum number of nops to insert for a branch hint. A branch hint must
|
15507 |
|
|
be at least 8 instructions away from the branch it is effecting. \s-1GCC\s0
|
15508 |
|
|
will insert up to \fIn\fR nops to enforce this, otherwise it will not
|
15509 |
|
|
generate the branch hint.
|
15510 |
|
|
.IP "\fB\-mhint\-max\-distance=\fR\fIn\fR" 4
|
15511 |
|
|
.IX Item "-mhint-max-distance=n"
|
15512 |
|
|
The encoding of the branch hint instruction limits the hint to be within
|
15513 |
|
|
256 instructions of the branch it is effecting. By default, \s-1GCC\s0 makes
|
15514 |
|
|
sure it is within 125.
|
15515 |
|
|
.IP "\fB\-msafe\-hints\fR" 4
|
15516 |
|
|
.IX Item "-msafe-hints"
|
15517 |
|
|
Work around a hardware bug which causes the \s-1SPU\s0 to stall indefinitely.
|
15518 |
|
|
By default, \s-1GCC\s0 will insert the \f(CW\*(C`hbrp\*(C'\fR instruction to make sure
|
15519 |
|
|
this stall won't happen.
|
15520 |
|
|
.PP
|
15521 |
|
|
\fIOptions for System V\fR
|
15522 |
|
|
.IX Subsection "Options for System V"
|
15523 |
|
|
.PP
|
15524 |
|
|
These additional options are available on System V Release 4 for
|
15525 |
|
|
compatibility with other compilers on those systems:
|
15526 |
|
|
.IP "\fB\-G\fR" 4
|
15527 |
|
|
.IX Item "-G"
|
15528 |
|
|
Create a shared object.
|
15529 |
|
|
It is recommended that \fB\-symbolic\fR or \fB\-shared\fR be used instead.
|
15530 |
|
|
.IP "\fB\-Qy\fR" 4
|
15531 |
|
|
.IX Item "-Qy"
|
15532 |
|
|
Identify the versions of each tool used by the compiler, in a
|
15533 |
|
|
\&\f(CW\*(C`.ident\*(C'\fR assembler directive in the output.
|
15534 |
|
|
.IP "\fB\-Qn\fR" 4
|
15535 |
|
|
.IX Item "-Qn"
|
15536 |
|
|
Refrain from adding \f(CW\*(C`.ident\*(C'\fR directives to the output file (this is
|
15537 |
|
|
the default).
|
15538 |
|
|
.IP "\fB\-YP,\fR\fIdirs\fR" 4
|
15539 |
|
|
.IX Item "-YP,dirs"
|
15540 |
|
|
Search the directories \fIdirs\fR, and no others, for libraries
|
15541 |
|
|
specified with \fB\-l\fR.
|
15542 |
|
|
.IP "\fB\-Ym,\fR\fIdir\fR" 4
|
15543 |
|
|
.IX Item "-Ym,dir"
|
15544 |
|
|
Look in the directory \fIdir\fR to find the M4 preprocessor.
|
15545 |
|
|
The assembler uses this option.
|
15546 |
|
|
.PP
|
15547 |
|
|
\fIV850 Options\fR
|
15548 |
|
|
.IX Subsection "V850 Options"
|
15549 |
|
|
.PP
|
15550 |
|
|
These \fB\-m\fR options are defined for V850 implementations:
|
15551 |
|
|
.IP "\fB\-mlong\-calls\fR" 4
|
15552 |
|
|
.IX Item "-mlong-calls"
|
15553 |
|
|
.PD 0
|
15554 |
|
|
.IP "\fB\-mno\-long\-calls\fR" 4
|
15555 |
|
|
.IX Item "-mno-long-calls"
|
15556 |
|
|
.PD
|
15557 |
|
|
Treat all calls as being far away (near). If calls are assumed to be
|
15558 |
|
|
far away, the compiler will always load the functions address up into a
|
15559 |
|
|
register, and call indirect through the pointer.
|
15560 |
|
|
.IP "\fB\-mno\-ep\fR" 4
|
15561 |
|
|
.IX Item "-mno-ep"
|
15562 |
|
|
.PD 0
|
15563 |
|
|
.IP "\fB\-mep\fR" 4
|
15564 |
|
|
.IX Item "-mep"
|
15565 |
|
|
.PD
|
15566 |
|
|
Do not optimize (do optimize) basic blocks that use the same index
|
15567 |
|
|
pointer 4 or more times to copy pointer into the \f(CW\*(C`ep\*(C'\fR register, and
|
15568 |
|
|
use the shorter \f(CW\*(C`sld\*(C'\fR and \f(CW\*(C`sst\*(C'\fR instructions. The \fB\-mep\fR
|
15569 |
|
|
option is on by default if you optimize.
|
15570 |
|
|
.IP "\fB\-mno\-prolog\-function\fR" 4
|
15571 |
|
|
.IX Item "-mno-prolog-function"
|
15572 |
|
|
.PD 0
|
15573 |
|
|
.IP "\fB\-mprolog\-function\fR" 4
|
15574 |
|
|
.IX Item "-mprolog-function"
|
15575 |
|
|
.PD
|
15576 |
|
|
Do not use (do use) external functions to save and restore registers
|
15577 |
|
|
at the prologue and epilogue of a function. The external functions
|
15578 |
|
|
are slower, but use less code space if more than one function saves
|
15579 |
|
|
the same number of registers. The \fB\-mprolog\-function\fR option
|
15580 |
|
|
is on by default if you optimize.
|
15581 |
|
|
.IP "\fB\-mspace\fR" 4
|
15582 |
|
|
.IX Item "-mspace"
|
15583 |
|
|
Try to make the code as small as possible. At present, this just turns
|
15584 |
|
|
on the \fB\-mep\fR and \fB\-mprolog\-function\fR options.
|
15585 |
|
|
.IP "\fB\-mtda=\fR\fIn\fR" 4
|
15586 |
|
|
.IX Item "-mtda=n"
|
15587 |
|
|
Put static or global variables whose size is \fIn\fR bytes or less into
|
15588 |
|
|
the tiny data area that register \f(CW\*(C`ep\*(C'\fR points to. The tiny data
|
15589 |
|
|
area can hold up to 256 bytes in total (128 bytes for byte references).
|
15590 |
|
|
.IP "\fB\-msda=\fR\fIn\fR" 4
|
15591 |
|
|
.IX Item "-msda=n"
|
15592 |
|
|
Put static or global variables whose size is \fIn\fR bytes or less into
|
15593 |
|
|
the small data area that register \f(CW\*(C`gp\*(C'\fR points to. The small data
|
15594 |
|
|
area can hold up to 64 kilobytes.
|
15595 |
|
|
.IP "\fB\-mzda=\fR\fIn\fR" 4
|
15596 |
|
|
.IX Item "-mzda=n"
|
15597 |
|
|
Put static or global variables whose size is \fIn\fR bytes or less into
|
15598 |
|
|
the first 32 kilobytes of memory.
|
15599 |
|
|
.IP "\fB\-mv850\fR" 4
|
15600 |
|
|
.IX Item "-mv850"
|
15601 |
|
|
Specify that the target processor is the V850.
|
15602 |
|
|
.IP "\fB\-mbig\-switch\fR" 4
|
15603 |
|
|
.IX Item "-mbig-switch"
|
15604 |
|
|
Generate code suitable for big switch tables. Use this option only if
|
15605 |
|
|
the assembler/linker complain about out of range branches within a switch
|
15606 |
|
|
table.
|
15607 |
|
|
.IP "\fB\-mapp\-regs\fR" 4
|
15608 |
|
|
.IX Item "-mapp-regs"
|
15609 |
|
|
This option will cause r2 and r5 to be used in the code generated by
|
15610 |
|
|
the compiler. This setting is the default.
|
15611 |
|
|
.IP "\fB\-mno\-app\-regs\fR" 4
|
15612 |
|
|
.IX Item "-mno-app-regs"
|
15613 |
|
|
This option will cause r2 and r5 to be treated as fixed registers.
|
15614 |
|
|
.IP "\fB\-mv850e1\fR" 4
|
15615 |
|
|
.IX Item "-mv850e1"
|
15616 |
|
|
Specify that the target processor is the V850E1. The preprocessor
|
15617 |
|
|
constants \fB_\|_v850e1_\|_\fR and \fB_\|_v850e_\|_\fR will be defined if
|
15618 |
|
|
this option is used.
|
15619 |
|
|
.IP "\fB\-mv850e\fR" 4
|
15620 |
|
|
.IX Item "-mv850e"
|
15621 |
|
|
Specify that the target processor is the V850E. The preprocessor
|
15622 |
|
|
constant \fB_\|_v850e_\|_\fR will be defined if this option is used.
|
15623 |
|
|
.Sp
|
15624 |
|
|
If neither \fB\-mv850\fR nor \fB\-mv850e\fR nor \fB\-mv850e1\fR
|
15625 |
|
|
are defined then a default target processor will be chosen and the
|
15626 |
|
|
relevant \fB_\|_v850*_\|_\fR preprocessor constant will be defined.
|
15627 |
|
|
.Sp
|
15628 |
|
|
The preprocessor constants \fB_\|_v850\fR and \fB_\|_v851_\|_\fR are always
|
15629 |
|
|
defined, regardless of which processor variant is the target.
|
15630 |
|
|
.IP "\fB\-mdisable\-callt\fR" 4
|
15631 |
|
|
.IX Item "-mdisable-callt"
|
15632 |
|
|
This option will suppress generation of the \s-1CALLT\s0 instruction for the
|
15633 |
|
|
v850e and v850e1 flavors of the v850 architecture. The default is
|
15634 |
|
|
\&\fB\-mno\-disable\-callt\fR which allows the \s-1CALLT\s0 instruction to be used.
|
15635 |
|
|
.PP
|
15636 |
|
|
\fI\s-1VAX\s0 Options\fR
|
15637 |
|
|
.IX Subsection "VAX Options"
|
15638 |
|
|
.PP
|
15639 |
|
|
These \fB\-m\fR options are defined for the \s-1VAX:\s0
|
15640 |
|
|
.IP "\fB\-munix\fR" 4
|
15641 |
|
|
.IX Item "-munix"
|
15642 |
|
|
Do not output certain jump instructions (\f(CW\*(C`aobleq\*(C'\fR and so on)
|
15643 |
|
|
that the Unix assembler for the \s-1VAX\s0 cannot handle across long
|
15644 |
|
|
ranges.
|
15645 |
|
|
.IP "\fB\-mgnu\fR" 4
|
15646 |
|
|
.IX Item "-mgnu"
|
15647 |
|
|
Do output those jump instructions, on the assumption that you
|
15648 |
|
|
will assemble with the \s-1GNU\s0 assembler.
|
15649 |
|
|
.IP "\fB\-mg\fR" 4
|
15650 |
|
|
.IX Item "-mg"
|
15651 |
|
|
Output code for g\-format floating point numbers instead of d\-format.
|
15652 |
|
|
.PP
|
15653 |
|
|
\fIVxWorks Options\fR
|
15654 |
|
|
.IX Subsection "VxWorks Options"
|
15655 |
|
|
.PP
|
15656 |
|
|
The options in this section are defined for all VxWorks targets.
|
15657 |
|
|
Options specific to the target hardware are listed with the other
|
15658 |
|
|
options for that target.
|
15659 |
|
|
.IP "\fB\-mrtp\fR" 4
|
15660 |
|
|
.IX Item "-mrtp"
|
15661 |
|
|
\&\s-1GCC\s0 can generate code for both VxWorks kernels and real time processes
|
15662 |
|
|
(RTPs). This option switches from the former to the latter. It also
|
15663 |
|
|
defines the preprocessor macro \f(CW\*(C`_\|_RTP_\|_\*(C'\fR.
|
15664 |
|
|
.IP "\fB\-non\-static\fR" 4
|
15665 |
|
|
.IX Item "-non-static"
|
15666 |
|
|
Link an \s-1RTP\s0 executable against shared libraries rather than static
|
15667 |
|
|
libraries. The options \fB\-static\fR and \fB\-shared\fR can
|
15668 |
|
|
also be used for RTPs; \fB\-static\fR
|
15669 |
|
|
is the default.
|
15670 |
|
|
.IP "\fB\-Bstatic\fR" 4
|
15671 |
|
|
.IX Item "-Bstatic"
|
15672 |
|
|
.PD 0
|
15673 |
|
|
.IP "\fB\-Bdynamic\fR" 4
|
15674 |
|
|
.IX Item "-Bdynamic"
|
15675 |
|
|
.PD
|
15676 |
|
|
These options are passed down to the linker. They are defined for
|
15677 |
|
|
compatibility with Diab.
|
15678 |
|
|
.IP "\fB\-Xbind\-lazy\fR" 4
|
15679 |
|
|
.IX Item "-Xbind-lazy"
|
15680 |
|
|
Enable lazy binding of function calls. This option is equivalent to
|
15681 |
|
|
\&\fB\-Wl,\-z,now\fR and is defined for compatibility with Diab.
|
15682 |
|
|
.IP "\fB\-Xbind\-now\fR" 4
|
15683 |
|
|
.IX Item "-Xbind-now"
|
15684 |
|
|
Disable lazy binding of function calls. This option is the default and
|
15685 |
|
|
is defined for compatibility with Diab.
|
15686 |
|
|
.PP
|
15687 |
|
|
\fIx86\-64 Options\fR
|
15688 |
|
|
.IX Subsection "x86-64 Options"
|
15689 |
|
|
.PP
|
15690 |
|
|
These are listed under
|
15691 |
|
|
.PP
|
15692 |
|
|
\fIi386 and x86\-64 Windows Options\fR
|
15693 |
|
|
.IX Subsection "i386 and x86-64 Windows Options"
|
15694 |
|
|
.PP
|
15695 |
|
|
These additional options are available for Windows targets:
|
15696 |
|
|
.IP "\fB\-mconsole\fR" 4
|
15697 |
|
|
.IX Item "-mconsole"
|
15698 |
|
|
This option is available for Cygwin and MinGW targets. It
|
15699 |
|
|
specifies that a console application is to be generated, by
|
15700 |
|
|
instructing the linker to set the \s-1PE\s0 header subsystem type
|
15701 |
|
|
required for console applications.
|
15702 |
|
|
This is the default behavior for Cygwin and MinGW targets.
|
15703 |
|
|
.IP "\fB\-mcygwin\fR" 4
|
15704 |
|
|
.IX Item "-mcygwin"
|
15705 |
|
|
This option is available for Cygwin targets. It specifies that
|
15706 |
|
|
the Cygwin internal interface is to be used for predefined
|
15707 |
|
|
preprocessor macros, C runtime libraries and related linker
|
15708 |
|
|
paths and options. For Cygwin targets this is the default behavior.
|
15709 |
|
|
This option is deprecated and will be removed in a future release.
|
15710 |
|
|
.IP "\fB\-mno\-cygwin\fR" 4
|
15711 |
|
|
.IX Item "-mno-cygwin"
|
15712 |
|
|
This option is available for Cygwin targets. It specifies that
|
15713 |
|
|
the MinGW internal interface is to be used instead of Cygwin's, by
|
15714 |
|
|
setting MinGW-related predefined macros and linker paths and default
|
15715 |
|
|
library options.
|
15716 |
|
|
This option is deprecated and will be removed in a future release.
|
15717 |
|
|
.IP "\fB\-mdll\fR" 4
|
15718 |
|
|
.IX Item "-mdll"
|
15719 |
|
|
This option is available for Cygwin and MinGW targets. It
|
15720 |
|
|
specifies that a \s-1DLL\s0 \- a dynamic link library \- is to be
|
15721 |
|
|
generated, enabling the selection of the required runtime
|
15722 |
|
|
startup object and entry point.
|
15723 |
|
|
.IP "\fB\-mnop\-fun\-dllimport\fR" 4
|
15724 |
|
|
.IX Item "-mnop-fun-dllimport"
|
15725 |
|
|
This option is available for Cygwin and MinGW targets. It
|
15726 |
|
|
specifies that the dllimport attribute should be ignored.
|
15727 |
|
|
.IP "\fB\-mthread\fR" 4
|
15728 |
|
|
.IX Item "-mthread"
|
15729 |
|
|
This option is available for MinGW targets. It specifies
|
15730 |
|
|
that MinGW-specific thread support is to be used.
|
15731 |
|
|
.IP "\fB\-municode\fR" 4
|
15732 |
|
|
.IX Item "-municode"
|
15733 |
|
|
This option is available for mingw\-w64 targets. It specifies
|
15734 |
|
|
that the \s-1UNICODE\s0 macro is getting pre-defined and that the
|
15735 |
|
|
unicode capable runtime startup code is chosen.
|
15736 |
|
|
.IP "\fB\-mwin32\fR" 4
|
15737 |
|
|
.IX Item "-mwin32"
|
15738 |
|
|
This option is available for Cygwin and MinGW targets. It
|
15739 |
|
|
specifies that the typical Windows pre-defined macros are to
|
15740 |
|
|
be set in the pre-processor, but does not influence the choice
|
15741 |
|
|
of runtime library/startup code.
|
15742 |
|
|
.IP "\fB\-mwindows\fR" 4
|
15743 |
|
|
.IX Item "-mwindows"
|
15744 |
|
|
This option is available for Cygwin and MinGW targets. It
|
15745 |
|
|
specifies that a \s-1GUI\s0 application is to be generated by
|
15746 |
|
|
instructing the linker to set the \s-1PE\s0 header subsystem type
|
15747 |
|
|
appropriately.
|
15748 |
|
|
.IP "\fB\-fno\-set\-stack\-executable\fR" 4
|
15749 |
|
|
.IX Item "-fno-set-stack-executable"
|
15750 |
|
|
This option is available for MinGW targets. It specifies that
|
15751 |
|
|
the executable flag for stack used by nested functions isn't
|
15752 |
|
|
set. This is necessary for binaries running in kernel mode of
|
15753 |
|
|
Windows, as there the user32 \s-1API\s0, which is used to set executable
|
15754 |
|
|
privileges, isn't available.
|
15755 |
|
|
.IP "\fB\-mpe\-aligned\-commons\fR" 4
|
15756 |
|
|
.IX Item "-mpe-aligned-commons"
|
15757 |
|
|
This option is available for Cygwin and MinGW targets. It
|
15758 |
|
|
specifies that the \s-1GNU\s0 extension to the \s-1PE\s0 file format that
|
15759 |
|
|
permits the correct alignment of \s-1COMMON\s0 variables should be
|
15760 |
|
|
used when generating code. It will be enabled by default if
|
15761 |
|
|
\&\s-1GCC\s0 detects that the target assembler found during configuration
|
15762 |
|
|
supports the feature.
|
15763 |
|
|
.PP
|
15764 |
|
|
See also under \fBi386 and x86\-64 Options\fR for standard options.
|
15765 |
|
|
.PP
|
15766 |
|
|
\fIXstormy16 Options\fR
|
15767 |
|
|
.IX Subsection "Xstormy16 Options"
|
15768 |
|
|
.PP
|
15769 |
|
|
These options are defined for Xstormy16:
|
15770 |
|
|
.IP "\fB\-msim\fR" 4
|
15771 |
|
|
.IX Item "-msim"
|
15772 |
|
|
Choose startup files and linker script suitable for the simulator.
|
15773 |
|
|
.PP
|
15774 |
|
|
\fIXtensa Options\fR
|
15775 |
|
|
.IX Subsection "Xtensa Options"
|
15776 |
|
|
.PP
|
15777 |
|
|
These options are supported for Xtensa targets:
|
15778 |
|
|
.IP "\fB\-mconst16\fR" 4
|
15779 |
|
|
.IX Item "-mconst16"
|
15780 |
|
|
.PD 0
|
15781 |
|
|
.IP "\fB\-mno\-const16\fR" 4
|
15782 |
|
|
.IX Item "-mno-const16"
|
15783 |
|
|
.PD
|
15784 |
|
|
Enable or disable use of \f(CW\*(C`CONST16\*(C'\fR instructions for loading
|
15785 |
|
|
constant values. The \f(CW\*(C`CONST16\*(C'\fR instruction is currently not a
|
15786 |
|
|
standard option from Tensilica. When enabled, \f(CW\*(C`CONST16\*(C'\fR
|
15787 |
|
|
instructions are always used in place of the standard \f(CW\*(C`L32R\*(C'\fR
|
15788 |
|
|
instructions. The use of \f(CW\*(C`CONST16\*(C'\fR is enabled by default only if
|
15789 |
|
|
the \f(CW\*(C`L32R\*(C'\fR instruction is not available.
|
15790 |
|
|
.IP "\fB\-mfused\-madd\fR" 4
|
15791 |
|
|
.IX Item "-mfused-madd"
|
15792 |
|
|
.PD 0
|
15793 |
|
|
.IP "\fB\-mno\-fused\-madd\fR" 4
|
15794 |
|
|
.IX Item "-mno-fused-madd"
|
15795 |
|
|
.PD
|
15796 |
|
|
Enable or disable use of fused multiply/add and multiply/subtract
|
15797 |
|
|
instructions in the floating-point option. This has no effect if the
|
15798 |
|
|
floating-point option is not also enabled. Disabling fused multiply/add
|
15799 |
|
|
and multiply/subtract instructions forces the compiler to use separate
|
15800 |
|
|
instructions for the multiply and add/subtract operations. This may be
|
15801 |
|
|
desirable in some cases where strict \s-1IEEE\s0 754\-compliant results are
|
15802 |
|
|
required: the fused multiply add/subtract instructions do not round the
|
15803 |
|
|
intermediate result, thereby producing results with \fImore\fR bits of
|
15804 |
|
|
precision than specified by the \s-1IEEE\s0 standard. Disabling fused multiply
|
15805 |
|
|
add/subtract instructions also ensures that the program output is not
|
15806 |
|
|
sensitive to the compiler's ability to combine multiply and add/subtract
|
15807 |
|
|
operations.
|
15808 |
|
|
.IP "\fB\-mserialize\-volatile\fR" 4
|
15809 |
|
|
.IX Item "-mserialize-volatile"
|
15810 |
|
|
.PD 0
|
15811 |
|
|
.IP "\fB\-mno\-serialize\-volatile\fR" 4
|
15812 |
|
|
.IX Item "-mno-serialize-volatile"
|
15813 |
|
|
.PD
|
15814 |
|
|
When this option is enabled, \s-1GCC\s0 inserts \f(CW\*(C`MEMW\*(C'\fR instructions before
|
15815 |
|
|
\&\f(CW\*(C`volatile\*(C'\fR memory references to guarantee sequential consistency.
|
15816 |
|
|
The default is \fB\-mserialize\-volatile\fR. Use
|
15817 |
|
|
\&\fB\-mno\-serialize\-volatile\fR to omit the \f(CW\*(C`MEMW\*(C'\fR instructions.
|
15818 |
|
|
.IP "\fB\-mtext\-section\-literals\fR" 4
|
15819 |
|
|
.IX Item "-mtext-section-literals"
|
15820 |
|
|
.PD 0
|
15821 |
|
|
.IP "\fB\-mno\-text\-section\-literals\fR" 4
|
15822 |
|
|
.IX Item "-mno-text-section-literals"
|
15823 |
|
|
.PD
|
15824 |
|
|
Control the treatment of literal pools. The default is
|
15825 |
|
|
\&\fB\-mno\-text\-section\-literals\fR, which places literals in a separate
|
15826 |
|
|
section in the output file. This allows the literal pool to be placed
|
15827 |
|
|
in a data \s-1RAM/ROM\s0, and it also allows the linker to combine literal
|
15828 |
|
|
pools from separate object files to remove redundant literals and
|
15829 |
|
|
improve code size. With \fB\-mtext\-section\-literals\fR, the literals
|
15830 |
|
|
are interspersed in the text section in order to keep them as close as
|
15831 |
|
|
possible to their references. This may be necessary for large assembly
|
15832 |
|
|
files.
|
15833 |
|
|
.IP "\fB\-mtarget\-align\fR" 4
|
15834 |
|
|
.IX Item "-mtarget-align"
|
15835 |
|
|
.PD 0
|
15836 |
|
|
.IP "\fB\-mno\-target\-align\fR" 4
|
15837 |
|
|
.IX Item "-mno-target-align"
|
15838 |
|
|
.PD
|
15839 |
|
|
When this option is enabled, \s-1GCC\s0 instructs the assembler to
|
15840 |
|
|
automatically align instructions to reduce branch penalties at the
|
15841 |
|
|
expense of some code density. The assembler attempts to widen density
|
15842 |
|
|
instructions to align branch targets and the instructions following call
|
15843 |
|
|
instructions. If there are not enough preceding safe density
|
15844 |
|
|
instructions to align a target, no widening will be performed. The
|
15845 |
|
|
default is \fB\-mtarget\-align\fR. These options do not affect the
|
15846 |
|
|
treatment of auto-aligned instructions like \f(CW\*(C`LOOP\*(C'\fR, which the
|
15847 |
|
|
assembler will always align, either by widening density instructions or
|
15848 |
|
|
by inserting no-op instructions.
|
15849 |
|
|
.IP "\fB\-mlongcalls\fR" 4
|
15850 |
|
|
.IX Item "-mlongcalls"
|
15851 |
|
|
.PD 0
|
15852 |
|
|
.IP "\fB\-mno\-longcalls\fR" 4
|
15853 |
|
|
.IX Item "-mno-longcalls"
|
15854 |
|
|
.PD
|
15855 |
|
|
When this option is enabled, \s-1GCC\s0 instructs the assembler to translate
|
15856 |
|
|
direct calls to indirect calls unless it can determine that the target
|
15857 |
|
|
of a direct call is in the range allowed by the call instruction. This
|
15858 |
|
|
translation typically occurs for calls to functions in other source
|
15859 |
|
|
files. Specifically, the assembler translates a direct \f(CW\*(C`CALL\*(C'\fR
|
15860 |
|
|
instruction into an \f(CW\*(C`L32R\*(C'\fR followed by a \f(CW\*(C`CALLX\*(C'\fR instruction.
|
15861 |
|
|
The default is \fB\-mno\-longcalls\fR. This option should be used in
|
15862 |
|
|
programs where the call target can potentially be out of range. This
|
15863 |
|
|
option is implemented in the assembler, not the compiler, so the
|
15864 |
|
|
assembly code generated by \s-1GCC\s0 will still show direct call
|
15865 |
|
|
instructions\-\-\-look at the disassembled object code to see the actual
|
15866 |
|
|
instructions. Note that the assembler will use an indirect call for
|
15867 |
|
|
every cross-file call, not just those that really will be out of range.
|
15868 |
|
|
.PP
|
15869 |
|
|
\fIzSeries Options\fR
|
15870 |
|
|
.IX Subsection "zSeries Options"
|
15871 |
|
|
.PP
|
15872 |
|
|
These are listed under
|
15873 |
|
|
.Sh "Options for Code Generation Conventions"
|
15874 |
|
|
.IX Subsection "Options for Code Generation Conventions"
|
15875 |
|
|
These machine-independent options control the interface conventions
|
15876 |
|
|
used in code generation.
|
15877 |
|
|
.PP
|
15878 |
|
|
Most of them have both positive and negative forms; the negative form
|
15879 |
|
|
of \fB\-ffoo\fR would be \fB\-fno\-foo\fR. In the table below, only
|
15880 |
|
|
one of the forms is listed\-\-\-the one which is not the default. You
|
15881 |
|
|
can figure out the other form by either removing \fBno\-\fR or adding
|
15882 |
|
|
it.
|
15883 |
|
|
.IP "\fB\-fbounds\-check\fR" 4
|
15884 |
|
|
.IX Item "-fbounds-check"
|
15885 |
|
|
For front-ends that support it, generate additional code to check that
|
15886 |
|
|
indices used to access arrays are within the declared range. This is
|
15887 |
|
|
currently only supported by the Java and Fortran front-ends, where
|
15888 |
|
|
this option defaults to true and false respectively.
|
15889 |
|
|
.IP "\fB\-ftrapv\fR" 4
|
15890 |
|
|
.IX Item "-ftrapv"
|
15891 |
|
|
This option generates traps for signed overflow on addition, subtraction,
|
15892 |
|
|
multiplication operations.
|
15893 |
|
|
.IP "\fB\-fwrapv\fR" 4
|
15894 |
|
|
.IX Item "-fwrapv"
|
15895 |
|
|
This option instructs the compiler to assume that signed arithmetic
|
15896 |
|
|
overflow of addition, subtraction and multiplication wraps around
|
15897 |
|
|
using twos-complement representation. This flag enables some optimizations
|
15898 |
|
|
and disables others. This option is enabled by default for the Java
|
15899 |
|
|
front-end, as required by the Java language specification.
|
15900 |
|
|
.IP "\fB\-fexceptions\fR" 4
|
15901 |
|
|
.IX Item "-fexceptions"
|
15902 |
|
|
Enable exception handling. Generates extra code needed to propagate
|
15903 |
|
|
exceptions. For some targets, this implies \s-1GCC\s0 will generate frame
|
15904 |
|
|
unwind information for all functions, which can produce significant data
|
15905 |
|
|
size overhead, although it does not affect execution. If you do not
|
15906 |
|
|
specify this option, \s-1GCC\s0 will enable it by default for languages like
|
15907 |
|
|
\&\*(C+ which normally require exception handling, and disable it for
|
15908 |
|
|
languages like C that do not normally require it. However, you may need
|
15909 |
|
|
to enable this option when compiling C code that needs to interoperate
|
15910 |
|
|
properly with exception handlers written in \*(C+. You may also wish to
|
15911 |
|
|
disable this option if you are compiling older \*(C+ programs that don't
|
15912 |
|
|
use exception handling.
|
15913 |
|
|
.IP "\fB\-fnon\-call\-exceptions\fR" 4
|
15914 |
|
|
.IX Item "-fnon-call-exceptions"
|
15915 |
|
|
Generate code that allows trapping instructions to throw exceptions.
|
15916 |
|
|
Note that this requires platform-specific runtime support that does
|
15917 |
|
|
not exist everywhere. Moreover, it only allows \fItrapping\fR
|
15918 |
|
|
instructions to throw exceptions, i.e. memory references or floating
|
15919 |
|
|
point instructions. It does not allow exceptions to be thrown from
|
15920 |
|
|
arbitrary signal handlers such as \f(CW\*(C`SIGALRM\*(C'\fR.
|
15921 |
|
|
.IP "\fB\-funwind\-tables\fR" 4
|
15922 |
|
|
.IX Item "-funwind-tables"
|
15923 |
|
|
Similar to \fB\-fexceptions\fR, except that it will just generate any needed
|
15924 |
|
|
static data, but will not affect the generated code in any other way.
|
15925 |
|
|
You will normally not enable this option; instead, a language processor
|
15926 |
|
|
that needs this handling would enable it on your behalf.
|
15927 |
|
|
.IP "\fB\-fasynchronous\-unwind\-tables\fR" 4
|
15928 |
|
|
.IX Item "-fasynchronous-unwind-tables"
|
15929 |
|
|
Generate unwind table in dwarf2 format, if supported by target machine. The
|
15930 |
|
|
table is exact at each instruction boundary, so it can be used for stack
|
15931 |
|
|
unwinding from asynchronous events (such as debugger or garbage collector).
|
15932 |
|
|
.IP "\fB\-fpcc\-struct\-return\fR" 4
|
15933 |
|
|
.IX Item "-fpcc-struct-return"
|
15934 |
|
|
Return \*(L"short\*(R" \f(CW\*(C`struct\*(C'\fR and \f(CW\*(C`union\*(C'\fR values in memory like
|
15935 |
|
|
longer ones, rather than in registers. This convention is less
|
15936 |
|
|
efficient, but it has the advantage of allowing intercallability between
|
15937 |
|
|
GCC-compiled files and files compiled with other compilers, particularly
|
15938 |
|
|
the Portable C Compiler (pcc).
|
15939 |
|
|
.Sp
|
15940 |
|
|
The precise convention for returning structures in memory depends
|
15941 |
|
|
on the target configuration macros.
|
15942 |
|
|
.Sp
|
15943 |
|
|
Short structures and unions are those whose size and alignment match
|
15944 |
|
|
that of some integer type.
|
15945 |
|
|
.Sp
|
15946 |
|
|
\&\fBWarning:\fR code compiled with the \fB\-fpcc\-struct\-return\fR
|
15947 |
|
|
switch is not binary compatible with code compiled with the
|
15948 |
|
|
\&\fB\-freg\-struct\-return\fR switch.
|
15949 |
|
|
Use it to conform to a non-default application binary interface.
|
15950 |
|
|
.IP "\fB\-freg\-struct\-return\fR" 4
|
15951 |
|
|
.IX Item "-freg-struct-return"
|
15952 |
|
|
Return \f(CW\*(C`struct\*(C'\fR and \f(CW\*(C`union\*(C'\fR values in registers when possible.
|
15953 |
|
|
This is more efficient for small structures than
|
15954 |
|
|
\&\fB\-fpcc\-struct\-return\fR.
|
15955 |
|
|
.Sp
|
15956 |
|
|
If you specify neither \fB\-fpcc\-struct\-return\fR nor
|
15957 |
|
|
\&\fB\-freg\-struct\-return\fR, \s-1GCC\s0 defaults to whichever convention is
|
15958 |
|
|
standard for the target. If there is no standard convention, \s-1GCC\s0
|
15959 |
|
|
defaults to \fB\-fpcc\-struct\-return\fR, except on targets where \s-1GCC\s0 is
|
15960 |
|
|
the principal compiler. In those cases, we can choose the standard, and
|
15961 |
|
|
we chose the more efficient register return alternative.
|
15962 |
|
|
.Sp
|
15963 |
|
|
\&\fBWarning:\fR code compiled with the \fB\-freg\-struct\-return\fR
|
15964 |
|
|
switch is not binary compatible with code compiled with the
|
15965 |
|
|
\&\fB\-fpcc\-struct\-return\fR switch.
|
15966 |
|
|
Use it to conform to a non-default application binary interface.
|
15967 |
|
|
.IP "\fB\-fshort\-enums\fR" 4
|
15968 |
|
|
.IX Item "-fshort-enums"
|
15969 |
|
|
Allocate to an \f(CW\*(C`enum\*(C'\fR type only as many bytes as it needs for the
|
15970 |
|
|
declared range of possible values. Specifically, the \f(CW\*(C`enum\*(C'\fR type
|
15971 |
|
|
will be equivalent to the smallest integer type which has enough room.
|
15972 |
|
|
.Sp
|
15973 |
|
|
\&\fBWarning:\fR the \fB\-fshort\-enums\fR switch causes \s-1GCC\s0 to generate
|
15974 |
|
|
code that is not binary compatible with code generated without that switch.
|
15975 |
|
|
Use it to conform to a non-default application binary interface.
|
15976 |
|
|
.IP "\fB\-fshort\-double\fR" 4
|
15977 |
|
|
.IX Item "-fshort-double"
|
15978 |
|
|
Use the same size for \f(CW\*(C`double\*(C'\fR as for \f(CW\*(C`float\*(C'\fR.
|
15979 |
|
|
.Sp
|
15980 |
|
|
\&\fBWarning:\fR the \fB\-fshort\-double\fR switch causes \s-1GCC\s0 to generate
|
15981 |
|
|
code that is not binary compatible with code generated without that switch.
|
15982 |
|
|
Use it to conform to a non-default application binary interface.
|
15983 |
|
|
.IP "\fB\-fshort\-wchar\fR" 4
|
15984 |
|
|
.IX Item "-fshort-wchar"
|
15985 |
|
|
Override the underlying type for \fBwchar_t\fR to be \fBshort
|
15986 |
|
|
unsigned int\fR instead of the default for the target. This option is
|
15987 |
|
|
useful for building programs to run under \s-1WINE\s0.
|
15988 |
|
|
.Sp
|
15989 |
|
|
\&\fBWarning:\fR the \fB\-fshort\-wchar\fR switch causes \s-1GCC\s0 to generate
|
15990 |
|
|
code that is not binary compatible with code generated without that switch.
|
15991 |
|
|
Use it to conform to a non-default application binary interface.
|
15992 |
|
|
.IP "\fB\-fno\-common\fR" 4
|
15993 |
|
|
.IX Item "-fno-common"
|
15994 |
|
|
In C code, controls the placement of uninitialized global variables.
|
15995 |
|
|
Unix C compilers have traditionally permitted multiple definitions of
|
15996 |
|
|
such variables in different compilation units by placing the variables
|
15997 |
|
|
in a common block.
|
15998 |
|
|
This is the behavior specified by \fB\-fcommon\fR, and is the default
|
15999 |
|
|
for \s-1GCC\s0 on most targets.
|
16000 |
|
|
On the other hand, this behavior is not required by \s-1ISO\s0 C, and on some
|
16001 |
|
|
targets may carry a speed or code size penalty on variable references.
|
16002 |
|
|
The \fB\-fno\-common\fR option specifies that the compiler should place
|
16003 |
|
|
uninitialized global variables in the data section of the object file,
|
16004 |
|
|
rather than generating them as common blocks.
|
16005 |
|
|
This has the effect that if the same variable is declared
|
16006 |
|
|
(without \f(CW\*(C`extern\*(C'\fR) in two different compilations,
|
16007 |
|
|
you will get a multiple-definition error when you link them.
|
16008 |
|
|
In this case, you must compile with \fB\-fcommon\fR instead.
|
16009 |
|
|
Compiling with \fB\-fno\-common\fR is useful on targets for which
|
16010 |
|
|
it provides better performance, or if you wish to verify that the
|
16011 |
|
|
program will work on other systems which always treat uninitialized
|
16012 |
|
|
variable declarations this way.
|
16013 |
|
|
.IP "\fB\-fno\-ident\fR" 4
|
16014 |
|
|
.IX Item "-fno-ident"
|
16015 |
|
|
Ignore the \fB#ident\fR directive.
|
16016 |
|
|
.IP "\fB\-finhibit\-size\-directive\fR" 4
|
16017 |
|
|
.IX Item "-finhibit-size-directive"
|
16018 |
|
|
Don't output a \f(CW\*(C`.size\*(C'\fR assembler directive, or anything else that
|
16019 |
|
|
would cause trouble if the function is split in the middle, and the
|
16020 |
|
|
two halves are placed at locations far apart in memory. This option is
|
16021 |
|
|
used when compiling \fIcrtstuff.c\fR; you should not need to use it
|
16022 |
|
|
for anything else.
|
16023 |
|
|
.IP "\fB\-fverbose\-asm\fR" 4
|
16024 |
|
|
.IX Item "-fverbose-asm"
|
16025 |
|
|
Put extra commentary information in the generated assembly code to
|
16026 |
|
|
make it more readable. This option is generally only of use to those
|
16027 |
|
|
who actually need to read the generated assembly code (perhaps while
|
16028 |
|
|
debugging the compiler itself).
|
16029 |
|
|
.Sp
|
16030 |
|
|
\&\fB\-fno\-verbose\-asm\fR, the default, causes the
|
16031 |
|
|
extra information to be omitted and is useful when comparing two assembler
|
16032 |
|
|
files.
|
16033 |
|
|
.IP "\fB\-frecord\-gcc\-switches\fR" 4
|
16034 |
|
|
.IX Item "-frecord-gcc-switches"
|
16035 |
|
|
This switch causes the command line that was used to invoke the
|
16036 |
|
|
compiler to be recorded into the object file that is being created.
|
16037 |
|
|
This switch is only implemented on some targets and the exact format
|
16038 |
|
|
of the recording is target and binary file format dependent, but it
|
16039 |
|
|
usually takes the form of a section containing \s-1ASCII\s0 text. This
|
16040 |
|
|
switch is related to the \fB\-fverbose\-asm\fR switch, but that
|
16041 |
|
|
switch only records information in the assembler output file as
|
16042 |
|
|
comments, so it never reaches the object file.
|
16043 |
|
|
.IP "\fB\-fpic\fR" 4
|
16044 |
|
|
.IX Item "-fpic"
|
16045 |
|
|
Generate position-independent code (\s-1PIC\s0) suitable for use in a shared
|
16046 |
|
|
library, if supported for the target machine. Such code accesses all
|
16047 |
|
|
constant addresses through a global offset table (\s-1GOT\s0). The dynamic
|
16048 |
|
|
loader resolves the \s-1GOT\s0 entries when the program starts (the dynamic
|
16049 |
|
|
loader is not part of \s-1GCC\s0; it is part of the operating system). If
|
16050 |
|
|
the \s-1GOT\s0 size for the linked executable exceeds a machine-specific
|
16051 |
|
|
maximum size, you get an error message from the linker indicating that
|
16052 |
|
|
\&\fB\-fpic\fR does not work; in that case, recompile with \fB\-fPIC\fR
|
16053 |
|
|
instead. (These maximums are 8k on the \s-1SPARC\s0 and 32k
|
16054 |
|
|
on the m68k and \s-1RS/6000\s0. The 386 has no such limit.)
|
16055 |
|
|
.Sp
|
16056 |
|
|
Position-independent code requires special support, and therefore works
|
16057 |
|
|
only on certain machines. For the 386, \s-1GCC\s0 supports \s-1PIC\s0 for System V
|
16058 |
|
|
but not for the Sun 386i. Code generated for the \s-1IBM\s0 \s-1RS/6000\s0 is always
|
16059 |
|
|
position-independent.
|
16060 |
|
|
.Sp
|
16061 |
|
|
When this flag is set, the macros \f(CW\*(C`_\|_pic_\|_\*(C'\fR and \f(CW\*(C`_\|_PIC_\|_\*(C'\fR
|
16062 |
|
|
are defined to 1.
|
16063 |
|
|
.IP "\fB\-fPIC\fR" 4
|
16064 |
|
|
.IX Item "-fPIC"
|
16065 |
|
|
If supported for the target machine, emit position-independent code,
|
16066 |
|
|
suitable for dynamic linking and avoiding any limit on the size of the
|
16067 |
|
|
global offset table. This option makes a difference on the m68k,
|
16068 |
|
|
PowerPC and \s-1SPARC\s0.
|
16069 |
|
|
.Sp
|
16070 |
|
|
Position-independent code requires special support, and therefore works
|
16071 |
|
|
only on certain machines.
|
16072 |
|
|
.Sp
|
16073 |
|
|
When this flag is set, the macros \f(CW\*(C`_\|_pic_\|_\*(C'\fR and \f(CW\*(C`_\|_PIC_\|_\*(C'\fR
|
16074 |
|
|
are defined to 2.
|
16075 |
|
|
.IP "\fB\-fpie\fR" 4
|
16076 |
|
|
.IX Item "-fpie"
|
16077 |
|
|
.PD 0
|
16078 |
|
|
.IP "\fB\-fPIE\fR" 4
|
16079 |
|
|
.IX Item "-fPIE"
|
16080 |
|
|
.PD
|
16081 |
|
|
These options are similar to \fB\-fpic\fR and \fB\-fPIC\fR, but
|
16082 |
|
|
generated position independent code can be only linked into executables.
|
16083 |
|
|
Usually these options are used when \fB\-pie\fR \s-1GCC\s0 option will be
|
16084 |
|
|
used during linking.
|
16085 |
|
|
.Sp
|
16086 |
|
|
\&\fB\-fpie\fR and \fB\-fPIE\fR both define the macros
|
16087 |
|
|
\&\f(CW\*(C`_\|_pie_\|_\*(C'\fR and \f(CW\*(C`_\|_PIE_\|_\*(C'\fR. The macros have the value 1
|
16088 |
|
|
for \fB\-fpie\fR and 2 for \fB\-fPIE\fR.
|
16089 |
|
|
.IP "\fB\-fno\-jump\-tables\fR" 4
|
16090 |
|
|
.IX Item "-fno-jump-tables"
|
16091 |
|
|
Do not use jump tables for switch statements even where it would be
|
16092 |
|
|
more efficient than other code generation strategies. This option is
|
16093 |
|
|
of use in conjunction with \fB\-fpic\fR or \fB\-fPIC\fR for
|
16094 |
|
|
building code which forms part of a dynamic linker and cannot
|
16095 |
|
|
reference the address of a jump table. On some targets, jump tables
|
16096 |
|
|
do not require a \s-1GOT\s0 and this option is not needed.
|
16097 |
|
|
.IP "\fB\-ffixed\-\fR\fIreg\fR" 4
|
16098 |
|
|
.IX Item "-ffixed-reg"
|
16099 |
|
|
Treat the register named \fIreg\fR as a fixed register; generated code
|
16100 |
|
|
should never refer to it (except perhaps as a stack pointer, frame
|
16101 |
|
|
pointer or in some other fixed role).
|
16102 |
|
|
.Sp
|
16103 |
|
|
\&\fIreg\fR must be the name of a register. The register names accepted
|
16104 |
|
|
are machine-specific and are defined in the \f(CW\*(C`REGISTER_NAMES\*(C'\fR
|
16105 |
|
|
macro in the machine description macro file.
|
16106 |
|
|
.Sp
|
16107 |
|
|
This flag does not have a negative form, because it specifies a
|
16108 |
|
|
three-way choice.
|
16109 |
|
|
.IP "\fB\-fcall\-used\-\fR\fIreg\fR" 4
|
16110 |
|
|
.IX Item "-fcall-used-reg"
|
16111 |
|
|
Treat the register named \fIreg\fR as an allocable register that is
|
16112 |
|
|
clobbered by function calls. It may be allocated for temporaries or
|
16113 |
|
|
variables that do not live across a call. Functions compiled this way
|
16114 |
|
|
will not save and restore the register \fIreg\fR.
|
16115 |
|
|
.Sp
|
16116 |
|
|
It is an error to used this flag with the frame pointer or stack pointer.
|
16117 |
|
|
Use of this flag for other registers that have fixed pervasive roles in
|
16118 |
|
|
the machine's execution model will produce disastrous results.
|
16119 |
|
|
.Sp
|
16120 |
|
|
This flag does not have a negative form, because it specifies a
|
16121 |
|
|
three-way choice.
|
16122 |
|
|
.IP "\fB\-fcall\-saved\-\fR\fIreg\fR" 4
|
16123 |
|
|
.IX Item "-fcall-saved-reg"
|
16124 |
|
|
Treat the register named \fIreg\fR as an allocable register saved by
|
16125 |
|
|
functions. It may be allocated even for temporaries or variables that
|
16126 |
|
|
live across a call. Functions compiled this way will save and restore
|
16127 |
|
|
the register \fIreg\fR if they use it.
|
16128 |
|
|
.Sp
|
16129 |
|
|
It is an error to used this flag with the frame pointer or stack pointer.
|
16130 |
|
|
Use of this flag for other registers that have fixed pervasive roles in
|
16131 |
|
|
the machine's execution model will produce disastrous results.
|
16132 |
|
|
.Sp
|
16133 |
|
|
A different sort of disaster will result from the use of this flag for
|
16134 |
|
|
a register in which function values may be returned.
|
16135 |
|
|
.Sp
|
16136 |
|
|
This flag does not have a negative form, because it specifies a
|
16137 |
|
|
three-way choice.
|
16138 |
|
|
.IP "\fB\-fpack\-struct[=\fR\fIn\fR\fB]\fR" 4
|
16139 |
|
|
.IX Item "-fpack-struct[=n]"
|
16140 |
|
|
Without a value specified, pack all structure members together without
|
16141 |
|
|
holes. When a value is specified (which must be a small power of two), pack
|
16142 |
|
|
structure members according to this value, representing the maximum
|
16143 |
|
|
alignment (that is, objects with default alignment requirements larger than
|
16144 |
|
|
this will be output potentially unaligned at the next fitting location.
|
16145 |
|
|
.Sp
|
16146 |
|
|
\&\fBWarning:\fR the \fB\-fpack\-struct\fR switch causes \s-1GCC\s0 to generate
|
16147 |
|
|
code that is not binary compatible with code generated without that switch.
|
16148 |
|
|
Additionally, it makes the code suboptimal.
|
16149 |
|
|
Use it to conform to a non-default application binary interface.
|
16150 |
|
|
.IP "\fB\-finstrument\-functions\fR" 4
|
16151 |
|
|
.IX Item "-finstrument-functions"
|
16152 |
|
|
Generate instrumentation calls for entry and exit to functions. Just
|
16153 |
|
|
after function entry and just before function exit, the following
|
16154 |
|
|
profiling functions will be called with the address of the current
|
16155 |
|
|
function and its call site. (On some platforms,
|
16156 |
|
|
\&\f(CW\*(C`_\|_builtin_return_address\*(C'\fR does not work beyond the current
|
16157 |
|
|
function, so the call site information may not be available to the
|
16158 |
|
|
profiling functions otherwise.)
|
16159 |
|
|
.Sp
|
16160 |
|
|
.Vb 4
|
16161 |
|
|
\& void _\|_cyg_profile_func_enter (void *this_fn,
|
16162 |
|
|
\& void *call_site);
|
16163 |
|
|
\& void _\|_cyg_profile_func_exit (void *this_fn,
|
16164 |
|
|
\& void *call_site);
|
16165 |
|
|
.Ve
|
16166 |
|
|
.Sp
|
16167 |
|
|
The first argument is the address of the start of the current function,
|
16168 |
|
|
which may be looked up exactly in the symbol table.
|
16169 |
|
|
.Sp
|
16170 |
|
|
This instrumentation is also done for functions expanded inline in other
|
16171 |
|
|
functions. The profiling calls will indicate where, conceptually, the
|
16172 |
|
|
inline function is entered and exited. This means that addressable
|
16173 |
|
|
versions of such functions must be available. If all your uses of a
|
16174 |
|
|
function are expanded inline, this may mean an additional expansion of
|
16175 |
|
|
code size. If you use \fBextern inline\fR in your C code, an
|
16176 |
|
|
addressable version of such functions must be provided. (This is
|
16177 |
|
|
normally the case anyways, but if you get lucky and the optimizer always
|
16178 |
|
|
expands the functions inline, you might have gotten away without
|
16179 |
|
|
providing static copies.)
|
16180 |
|
|
.Sp
|
16181 |
|
|
A function may be given the attribute \f(CW\*(C`no_instrument_function\*(C'\fR, in
|
16182 |
|
|
which case this instrumentation will not be done. This can be used, for
|
16183 |
|
|
example, for the profiling functions listed above, high-priority
|
16184 |
|
|
interrupt routines, and any functions from which the profiling functions
|
16185 |
|
|
cannot safely be called (perhaps signal handlers, if the profiling
|
16186 |
|
|
routines generate output or allocate memory).
|
16187 |
|
|
.IP "\fB\-finstrument\-functions\-exclude\-file\-list=\fR\fIfile\fR\fB,\fR\fIfile\fR\fB,...\fR" 4
|
16188 |
|
|
.IX Item "-finstrument-functions-exclude-file-list=file,file,..."
|
16189 |
|
|
Set the list of functions that are excluded from instrumentation (see
|
16190 |
|
|
the description of \f(CW\*(C`\-finstrument\-functions\*(C'\fR). If the file that
|
16191 |
|
|
contains a function definition matches with one of \fIfile\fR, then
|
16192 |
|
|
that function is not instrumented. The match is done on substrings:
|
16193 |
|
|
if the \fIfile\fR parameter is a substring of the file name, it is
|
16194 |
|
|
considered to be a match.
|
16195 |
|
|
.Sp
|
16196 |
|
|
For example,
|
16197 |
|
|
\&\f(CW\*(C`\-finstrument\-functions\-exclude\-file\-list=/bits/stl,include/sys\*(C'\fR
|
16198 |
|
|
will exclude any inline function defined in files whose pathnames
|
16199 |
|
|
contain \f(CW\*(C`/bits/stl\*(C'\fR or \f(CW\*(C`include/sys\*(C'\fR.
|
16200 |
|
|
.Sp
|
16201 |
|
|
If, for some reason, you want to include letter \f(CW\*(Aq,\*(Aq\fR in one of
|
16202 |
|
|
\&\fIsym\fR, write \f(CW\*(Aq,\*(Aq\fR. For example,
|
16203 |
|
|
\&\f(CW\*(C`\-finstrument\-functions\-exclude\-file\-list=\*(Aq,,tmp\*(Aq\*(C'\fR
|
16204 |
|
|
(note the single quote surrounding the option).
|
16205 |
|
|
.IP "\fB\-finstrument\-functions\-exclude\-function\-list=\fR\fIsym\fR\fB,\fR\fIsym\fR\fB,...\fR" 4
|
16206 |
|
|
.IX Item "-finstrument-functions-exclude-function-list=sym,sym,..."
|
16207 |
|
|
This is similar to \f(CW\*(C`\-finstrument\-functions\-exclude\-file\-list\*(C'\fR,
|
16208 |
|
|
but this option sets the list of function names to be excluded from
|
16209 |
|
|
instrumentation. The function name to be matched is its user-visible
|
16210 |
|
|
name, such as \f(CW\*(C`vector blah(const vector &)\*(C'\fR, not the
|
16211 |
|
|
internal mangled name (e.g., \f(CW\*(C`_Z4blahRSt6vectorIiSaIiEE\*(C'\fR). The
|
16212 |
|
|
match is done on substrings: if the \fIsym\fR parameter is a substring
|
16213 |
|
|
of the function name, it is considered to be a match. For C99 and \*(C+
|
16214 |
|
|
extended identifiers, the function name must be given in \s-1UTF\-8\s0, not
|
16215 |
|
|
using universal character names.
|
16216 |
|
|
.IP "\fB\-fstack\-check\fR" 4
|
16217 |
|
|
.IX Item "-fstack-check"
|
16218 |
|
|
Generate code to verify that you do not go beyond the boundary of the
|
16219 |
|
|
stack. You should specify this flag if you are running in an
|
16220 |
|
|
environment with multiple threads, but only rarely need to specify it in
|
16221 |
|
|
a single-threaded environment since stack overflow is automatically
|
16222 |
|
|
detected on nearly all systems if there is only one stack.
|
16223 |
|
|
.Sp
|
16224 |
|
|
Note that this switch does not actually cause checking to be done; the
|
16225 |
|
|
operating system or the language runtime must do that. The switch causes
|
16226 |
|
|
generation of code to ensure that they see the stack being extended.
|
16227 |
|
|
.Sp
|
16228 |
|
|
You can additionally specify a string parameter: \f(CW\*(C`no\*(C'\fR means no
|
16229 |
|
|
checking, \f(CW\*(C`generic\*(C'\fR means force the use of old-style checking,
|
16230 |
|
|
\&\f(CW\*(C`specific\*(C'\fR means use the best checking method and is equivalent
|
16231 |
|
|
to bare \fB\-fstack\-check\fR.
|
16232 |
|
|
.Sp
|
16233 |
|
|
Old-style checking is a generic mechanism that requires no specific
|
16234 |
|
|
target support in the compiler but comes with the following drawbacks:
|
16235 |
|
|
.RS 4
|
16236 |
|
|
.IP "1." 4
|
16237 |
|
|
Modified allocation strategy for large objects: they will always be
|
16238 |
|
|
allocated dynamically if their size exceeds a fixed threshold.
|
16239 |
|
|
.IP "2." 4
|
16240 |
|
|
Fixed limit on the size of the static frame of functions: when it is
|
16241 |
|
|
topped by a particular function, stack checking is not reliable and
|
16242 |
|
|
a warning is issued by the compiler.
|
16243 |
|
|
.IP "3." 4
|
16244 |
|
|
Inefficiency: because of both the modified allocation strategy and the
|
16245 |
|
|
generic implementation, the performances of the code are hampered.
|
16246 |
|
|
.RE
|
16247 |
|
|
.RS 4
|
16248 |
|
|
.Sp
|
16249 |
|
|
Note that old-style stack checking is also the fallback method for
|
16250 |
|
|
\&\f(CW\*(C`specific\*(C'\fR if no target support has been added in the compiler.
|
16251 |
|
|
.RE
|
16252 |
|
|
.IP "\fB\-fstack\-limit\-register=\fR\fIreg\fR" 4
|
16253 |
|
|
.IX Item "-fstack-limit-register=reg"
|
16254 |
|
|
.PD 0
|
16255 |
|
|
.IP "\fB\-fstack\-limit\-symbol=\fR\fIsym\fR" 4
|
16256 |
|
|
.IX Item "-fstack-limit-symbol=sym"
|
16257 |
|
|
.IP "\fB\-fno\-stack\-limit\fR" 4
|
16258 |
|
|
.IX Item "-fno-stack-limit"
|
16259 |
|
|
.PD
|
16260 |
|
|
Generate code to ensure that the stack does not grow beyond a certain value,
|
16261 |
|
|
either the value of a register or the address of a symbol. If the stack
|
16262 |
|
|
would grow beyond the value, a signal is raised. For most targets,
|
16263 |
|
|
the signal is raised before the stack overruns the boundary, so
|
16264 |
|
|
it is possible to catch the signal without taking special precautions.
|
16265 |
|
|
.Sp
|
16266 |
|
|
For instance, if the stack starts at absolute address \fB0x80000000\fR
|
16267 |
|
|
and grows downwards, you can use the flags
|
16268 |
|
|
\&\fB\-fstack\-limit\-symbol=_\|_stack_limit\fR and
|
16269 |
|
|
\&\fB\-Wl,\-\-defsym,_\|_stack_limit=0x7ffe0000\fR to enforce a stack limit
|
16270 |
|
|
of 128KB. Note that this may only work with the \s-1GNU\s0 linker.
|
16271 |
|
|
.IP "\fB\-fargument\-alias\fR" 4
|
16272 |
|
|
.IX Item "-fargument-alias"
|
16273 |
|
|
.PD 0
|
16274 |
|
|
.IP "\fB\-fargument\-noalias\fR" 4
|
16275 |
|
|
.IX Item "-fargument-noalias"
|
16276 |
|
|
.IP "\fB\-fargument\-noalias\-global\fR" 4
|
16277 |
|
|
.IX Item "-fargument-noalias-global"
|
16278 |
|
|
.IP "\fB\-fargument\-noalias\-anything\fR" 4
|
16279 |
|
|
.IX Item "-fargument-noalias-anything"
|
16280 |
|
|
.PD
|
16281 |
|
|
Specify the possible relationships among parameters and between
|
16282 |
|
|
parameters and global data.
|
16283 |
|
|
.Sp
|
16284 |
|
|
\&\fB\-fargument\-alias\fR specifies that arguments (parameters) may
|
16285 |
|
|
alias each other and may alias global storage.\fB\-fargument\-noalias\fR specifies that arguments do not alias
|
16286 |
|
|
each other, but may alias global storage.\fB\-fargument\-noalias\-global\fR specifies that arguments do not
|
16287 |
|
|
alias each other and do not alias global storage.
|
16288 |
|
|
\&\fB\-fargument\-noalias\-anything\fR specifies that arguments do not
|
16289 |
|
|
alias any other storage.
|
16290 |
|
|
.Sp
|
16291 |
|
|
Each language will automatically use whatever option is required by
|
16292 |
|
|
the language standard. You should not need to use these options yourself.
|
16293 |
|
|
.IP "\fB\-fleading\-underscore\fR" 4
|
16294 |
|
|
.IX Item "-fleading-underscore"
|
16295 |
|
|
This option and its counterpart, \fB\-fno\-leading\-underscore\fR, forcibly
|
16296 |
|
|
change the way C symbols are represented in the object file. One use
|
16297 |
|
|
is to help link with legacy assembly code.
|
16298 |
|
|
.Sp
|
16299 |
|
|
\&\fBWarning:\fR the \fB\-fleading\-underscore\fR switch causes \s-1GCC\s0 to
|
16300 |
|
|
generate code that is not binary compatible with code generated without that
|
16301 |
|
|
switch. Use it to conform to a non-default application binary interface.
|
16302 |
|
|
Not all targets provide complete support for this switch.
|
16303 |
|
|
.IP "\fB\-ftls\-model=\fR\fImodel\fR" 4
|
16304 |
|
|
.IX Item "-ftls-model=model"
|
16305 |
|
|
Alter the thread-local storage model to be used.
|
16306 |
|
|
The \fImodel\fR argument should be one of \f(CW\*(C`global\-dynamic\*(C'\fR,
|
16307 |
|
|
\&\f(CW\*(C`local\-dynamic\*(C'\fR, \f(CW\*(C`initial\-exec\*(C'\fR or \f(CW\*(C`local\-exec\*(C'\fR.
|
16308 |
|
|
.Sp
|
16309 |
|
|
The default without \fB\-fpic\fR is \f(CW\*(C`initial\-exec\*(C'\fR; with
|
16310 |
|
|
\&\fB\-fpic\fR the default is \f(CW\*(C`global\-dynamic\*(C'\fR.
|
16311 |
|
|
.IP "\fB\-fvisibility=\fR\fIdefault|internal|hidden|protected\fR" 4
|
16312 |
|
|
.IX Item "-fvisibility=default|internal|hidden|protected"
|
16313 |
|
|
Set the default \s-1ELF\s0 image symbol visibility to the specified option\-\-\-all
|
16314 |
|
|
symbols will be marked with this unless overridden within the code.
|
16315 |
|
|
Using this feature can very substantially improve linking and
|
16316 |
|
|
load times of shared object libraries, produce more optimized
|
16317 |
|
|
code, provide near-perfect \s-1API\s0 export and prevent symbol clashes.
|
16318 |
|
|
It is \fBstrongly\fR recommended that you use this in any shared objects
|
16319 |
|
|
you distribute.
|
16320 |
|
|
.Sp
|
16321 |
|
|
Despite the nomenclature, \f(CW\*(C`default\*(C'\fR always means public ie;
|
16322 |
|
|
available to be linked against from outside the shared object.
|
16323 |
|
|
\&\f(CW\*(C`protected\*(C'\fR and \f(CW\*(C`internal\*(C'\fR are pretty useless in real-world
|
16324 |
|
|
usage so the only other commonly used option will be \f(CW\*(C`hidden\*(C'\fR.
|
16325 |
|
|
The default if \fB\-fvisibility\fR isn't specified is
|
16326 |
|
|
\&\f(CW\*(C`default\*(C'\fR, i.e., make every
|
16327 |
|
|
symbol public\-\-\-this causes the same behavior as previous versions of
|
16328 |
|
|
\&\s-1GCC\s0.
|
16329 |
|
|
.Sp
|
16330 |
|
|
A good explanation of the benefits offered by ensuring \s-1ELF\s0
|
16331 |
|
|
symbols have the correct visibility is given by \*(L"How To Write
|
16332 |
|
|
Shared Libraries\*(R" by Ulrich Drepper (which can be found at
|
16333 |
|
|
<\fBhttp://people.redhat.com/~drepper/\fR>)\-\-\-however a superior
|
16334 |
|
|
solution made possible by this option to marking things hidden when
|
16335 |
|
|
the default is public is to make the default hidden and mark things
|
16336 |
|
|
public. This is the norm with \s-1DLL\s0's on Windows and with \fB\-fvisibility=hidden\fR
|
16337 |
|
|
and \f(CW\*(C`_\|_attribute_\|_ ((visibility("default")))\*(C'\fR instead of
|
16338 |
|
|
\&\f(CW\*(C`_\|_declspec(dllexport)\*(C'\fR you get almost identical semantics with
|
16339 |
|
|
identical syntax. This is a great boon to those working with
|
16340 |
|
|
cross-platform projects.
|
16341 |
|
|
.Sp
|
16342 |
|
|
For those adding visibility support to existing code, you may find
|
16343 |
|
|
\&\fB#pragma \s-1GCC\s0 visibility\fR of use. This works by you enclosing
|
16344 |
|
|
the declarations you wish to set visibility for with (for example)
|
16345 |
|
|
\&\fB#pragma \s-1GCC\s0 visibility push(hidden)\fR and
|
16346 |
|
|
\&\fB#pragma \s-1GCC\s0 visibility pop\fR.
|
16347 |
|
|
Bear in mind that symbol visibility should be viewed \fBas
|
16348 |
|
|
part of the \s-1API\s0 interface contract\fR and thus all new code should
|
16349 |
|
|
always specify visibility when it is not the default ie; declarations
|
16350 |
|
|
only for use within the local \s-1DSO\s0 should \fBalways\fR be marked explicitly
|
16351 |
|
|
as hidden as so to avoid \s-1PLT\s0 indirection overheads\-\-\-making this
|
16352 |
|
|
abundantly clear also aids readability and self-documentation of the code.
|
16353 |
|
|
Note that due to \s-1ISO\s0 \*(C+ specification requirements, operator new and
|
16354 |
|
|
operator delete must always be of default visibility.
|
16355 |
|
|
.Sp
|
16356 |
|
|
Be aware that headers from outside your project, in particular system
|
16357 |
|
|
headers and headers from any other library you use, may not be
|
16358 |
|
|
expecting to be compiled with visibility other than the default. You
|
16359 |
|
|
may need to explicitly say \fB#pragma \s-1GCC\s0 visibility push(default)\fR
|
16360 |
|
|
before including any such headers.
|
16361 |
|
|
.Sp
|
16362 |
|
|
\&\fBextern\fR declarations are not affected by \fB\-fvisibility\fR, so
|
16363 |
|
|
a lot of code can be recompiled with \fB\-fvisibility=hidden\fR with
|
16364 |
|
|
no modifications. However, this means that calls to \fBextern\fR
|
16365 |
|
|
functions with no explicit visibility will use the \s-1PLT\s0, so it is more
|
16366 |
|
|
effective to use \fB_\|_attribute ((visibility))\fR and/or
|
16367 |
|
|
\&\fB#pragma \s-1GCC\s0 visibility\fR to tell the compiler which \fBextern\fR
|
16368 |
|
|
declarations should be treated as hidden.
|
16369 |
|
|
.Sp
|
16370 |
|
|
Note that \fB\-fvisibility\fR does affect \*(C+ vague linkage
|
16371 |
|
|
entities. This means that, for instance, an exception class that will
|
16372 |
|
|
be thrown between DSOs must be explicitly marked with default
|
16373 |
|
|
visibility so that the \fBtype_info\fR nodes will be unified between
|
16374 |
|
|
the DSOs.
|
16375 |
|
|
.Sp
|
16376 |
|
|
An overview of these techniques, their benefits and how to use them
|
16377 |
|
|
is at <\fBhttp://gcc.gnu.org/wiki/Visibility\fR>.
|
16378 |
|
|
.SH "ENVIRONMENT"
|
16379 |
|
|
.IX Header "ENVIRONMENT"
|
16380 |
|
|
This section describes several environment variables that affect how \s-1GCC\s0
|
16381 |
|
|
operates. Some of them work by specifying directories or prefixes to use
|
16382 |
|
|
when searching for various kinds of files. Some are used to specify other
|
16383 |
|
|
aspects of the compilation environment.
|
16384 |
|
|
.PP
|
16385 |
|
|
Note that you can also specify places to search using options such as
|
16386 |
|
|
\&\fB\-B\fR, \fB\-I\fR and \fB\-L\fR. These
|
16387 |
|
|
take precedence over places specified using environment variables, which
|
16388 |
|
|
in turn take precedence over those specified by the configuration of \s-1GCC\s0.
|
16389 |
|
|
.IP "\fB\s-1LANG\s0\fR" 4
|
16390 |
|
|
.IX Item "LANG"
|
16391 |
|
|
.PD 0
|
16392 |
|
|
.IP "\fB\s-1LC_CTYPE\s0\fR" 4
|
16393 |
|
|
.IX Item "LC_CTYPE"
|
16394 |
|
|
.IP "\fB\s-1LC_MESSAGES\s0\fR" 4
|
16395 |
|
|
.IX Item "LC_MESSAGES"
|
16396 |
|
|
.IP "\fB\s-1LC_ALL\s0\fR" 4
|
16397 |
|
|
.IX Item "LC_ALL"
|
16398 |
|
|
.PD
|
16399 |
|
|
These environment variables control the way that \s-1GCC\s0 uses
|
16400 |
|
|
localization information that allow \s-1GCC\s0 to work with different
|
16401 |
|
|
national conventions. \s-1GCC\s0 inspects the locale categories
|
16402 |
|
|
\&\fB\s-1LC_CTYPE\s0\fR and \fB\s-1LC_MESSAGES\s0\fR if it has been configured to do
|
16403 |
|
|
so. These locale categories can be set to any value supported by your
|
16404 |
|
|
installation. A typical value is \fBen_GB.UTF\-8\fR for English in the United
|
16405 |
|
|
Kingdom encoded in \s-1UTF\-8\s0.
|
16406 |
|
|
.Sp
|
16407 |
|
|
The \fB\s-1LC_CTYPE\s0\fR environment variable specifies character
|
16408 |
|
|
classification. \s-1GCC\s0 uses it to determine the character boundaries in
|
16409 |
|
|
a string; this is needed for some multibyte encodings that contain quote
|
16410 |
|
|
and escape characters that would otherwise be interpreted as a string
|
16411 |
|
|
end or escape.
|
16412 |
|
|
.Sp
|
16413 |
|
|
The \fB\s-1LC_MESSAGES\s0\fR environment variable specifies the language to
|
16414 |
|
|
use in diagnostic messages.
|
16415 |
|
|
.Sp
|
16416 |
|
|
If the \fB\s-1LC_ALL\s0\fR environment variable is set, it overrides the value
|
16417 |
|
|
of \fB\s-1LC_CTYPE\s0\fR and \fB\s-1LC_MESSAGES\s0\fR; otherwise, \fB\s-1LC_CTYPE\s0\fR
|
16418 |
|
|
and \fB\s-1LC_MESSAGES\s0\fR default to the value of the \fB\s-1LANG\s0\fR
|
16419 |
|
|
environment variable. If none of these variables are set, \s-1GCC\s0
|
16420 |
|
|
defaults to traditional C English behavior.
|
16421 |
|
|
.IP "\fB\s-1TMPDIR\s0\fR" 4
|
16422 |
|
|
.IX Item "TMPDIR"
|
16423 |
|
|
If \fB\s-1TMPDIR\s0\fR is set, it specifies the directory to use for temporary
|
16424 |
|
|
files. \s-1GCC\s0 uses temporary files to hold the output of one stage of
|
16425 |
|
|
compilation which is to be used as input to the next stage: for example,
|
16426 |
|
|
the output of the preprocessor, which is the input to the compiler
|
16427 |
|
|
proper.
|
16428 |
|
|
.IP "\fB\s-1GCC_EXEC_PREFIX\s0\fR" 4
|
16429 |
|
|
.IX Item "GCC_EXEC_PREFIX"
|
16430 |
|
|
If \fB\s-1GCC_EXEC_PREFIX\s0\fR is set, it specifies a prefix to use in the
|
16431 |
|
|
names of the subprograms executed by the compiler. No slash is added
|
16432 |
|
|
when this prefix is combined with the name of a subprogram, but you can
|
16433 |
|
|
specify a prefix that ends with a slash if you wish.
|
16434 |
|
|
.Sp
|
16435 |
|
|
If \fB\s-1GCC_EXEC_PREFIX\s0\fR is not set, \s-1GCC\s0 will attempt to figure out
|
16436 |
|
|
an appropriate prefix to use based on the pathname it was invoked with.
|
16437 |
|
|
.Sp
|
16438 |
|
|
If \s-1GCC\s0 cannot find the subprogram using the specified prefix, it
|
16439 |
|
|
tries looking in the usual places for the subprogram.
|
16440 |
|
|
.Sp
|
16441 |
|
|
The default value of \fB\s-1GCC_EXEC_PREFIX\s0\fR is
|
16442 |
|
|
\&\fI\fIprefix\fI/lib/gcc/\fR where \fIprefix\fR is the prefix to
|
16443 |
|
|
the installed compiler. In many cases \fIprefix\fR is the value
|
16444 |
|
|
of \f(CW\*(C`prefix\*(C'\fR when you ran the \fIconfigure\fR script.
|
16445 |
|
|
.Sp
|
16446 |
|
|
Other prefixes specified with \fB\-B\fR take precedence over this prefix.
|
16447 |
|
|
.Sp
|
16448 |
|
|
This prefix is also used for finding files such as \fIcrt0.o\fR that are
|
16449 |
|
|
used for linking.
|
16450 |
|
|
.Sp
|
16451 |
|
|
In addition, the prefix is used in an unusual way in finding the
|
16452 |
|
|
directories to search for header files. For each of the standard
|
16453 |
|
|
directories whose name normally begins with \fB/usr/local/lib/gcc\fR
|
16454 |
|
|
(more precisely, with the value of \fB\s-1GCC_INCLUDE_DIR\s0\fR), \s-1GCC\s0 tries
|
16455 |
|
|
replacing that beginning with the specified prefix to produce an
|
16456 |
|
|
alternate directory name. Thus, with \fB\-Bfoo/\fR, \s-1GCC\s0 will search
|
16457 |
|
|
\&\fIfoo/bar\fR where it would normally search \fI/usr/local/lib/bar\fR.
|
16458 |
|
|
These alternate directories are searched first; the standard directories
|
16459 |
|
|
come next. If a standard directory begins with the configured
|
16460 |
|
|
\&\fIprefix\fR then the value of \fIprefix\fR is replaced by
|
16461 |
|
|
\&\fB\s-1GCC_EXEC_PREFIX\s0\fR when looking for header files.
|
16462 |
|
|
.IP "\fB\s-1COMPILER_PATH\s0\fR" 4
|
16463 |
|
|
.IX Item "COMPILER_PATH"
|
16464 |
|
|
The value of \fB\s-1COMPILER_PATH\s0\fR is a colon-separated list of
|
16465 |
|
|
directories, much like \fB\s-1PATH\s0\fR. \s-1GCC\s0 tries the directories thus
|
16466 |
|
|
specified when searching for subprograms, if it can't find the
|
16467 |
|
|
subprograms using \fB\s-1GCC_EXEC_PREFIX\s0\fR.
|
16468 |
|
|
.IP "\fB\s-1LIBRARY_PATH\s0\fR" 4
|
16469 |
|
|
.IX Item "LIBRARY_PATH"
|
16470 |
|
|
The value of \fB\s-1LIBRARY_PATH\s0\fR is a colon-separated list of
|
16471 |
|
|
directories, much like \fB\s-1PATH\s0\fR. When configured as a native compiler,
|
16472 |
|
|
\&\s-1GCC\s0 tries the directories thus specified when searching for special
|
16473 |
|
|
linker files, if it can't find them using \fB\s-1GCC_EXEC_PREFIX\s0\fR. Linking
|
16474 |
|
|
using \s-1GCC\s0 also uses these directories when searching for ordinary
|
16475 |
|
|
libraries for the \fB\-l\fR option (but directories specified with
|
16476 |
|
|
\&\fB\-L\fR come first).
|
16477 |
|
|
.IP "\fB\s-1LANG\s0\fR" 4
|
16478 |
|
|
.IX Item "LANG"
|
16479 |
|
|
This variable is used to pass locale information to the compiler. One way in
|
16480 |
|
|
which this information is used is to determine the character set to be used
|
16481 |
|
|
when character literals, string literals and comments are parsed in C and \*(C+.
|
16482 |
|
|
When the compiler is configured to allow multibyte characters,
|
16483 |
|
|
the following values for \fB\s-1LANG\s0\fR are recognized:
|
16484 |
|
|
.RS 4
|
16485 |
|
|
.IP "\fBC\-JIS\fR" 4
|
16486 |
|
|
.IX Item "C-JIS"
|
16487 |
|
|
Recognize \s-1JIS\s0 characters.
|
16488 |
|
|
.IP "\fBC\-SJIS\fR" 4
|
16489 |
|
|
.IX Item "C-SJIS"
|
16490 |
|
|
Recognize \s-1SJIS\s0 characters.
|
16491 |
|
|
.IP "\fBC\-EUCJP\fR" 4
|
16492 |
|
|
.IX Item "C-EUCJP"
|
16493 |
|
|
Recognize \s-1EUCJP\s0 characters.
|
16494 |
|
|
.RE
|
16495 |
|
|
.RS 4
|
16496 |
|
|
.Sp
|
16497 |
|
|
If \fB\s-1LANG\s0\fR is not defined, or if it has some other value, then the
|
16498 |
|
|
compiler will use mblen and mbtowc as defined by the default locale to
|
16499 |
|
|
recognize and translate multibyte characters.
|
16500 |
|
|
.RE
|
16501 |
|
|
.PP
|
16502 |
|
|
Some additional environments variables affect the behavior of the
|
16503 |
|
|
preprocessor.
|
16504 |
|
|
.IP "\fB\s-1CPATH\s0\fR" 4
|
16505 |
|
|
.IX Item "CPATH"
|
16506 |
|
|
.PD 0
|
16507 |
|
|
.IP "\fBC_INCLUDE_PATH\fR" 4
|
16508 |
|
|
.IX Item "C_INCLUDE_PATH"
|
16509 |
|
|
.IP "\fB\s-1CPLUS_INCLUDE_PATH\s0\fR" 4
|
16510 |
|
|
.IX Item "CPLUS_INCLUDE_PATH"
|
16511 |
|
|
.IP "\fB\s-1OBJC_INCLUDE_PATH\s0\fR" 4
|
16512 |
|
|
.IX Item "OBJC_INCLUDE_PATH"
|
16513 |
|
|
.PD
|
16514 |
|
|
Each variable's value is a list of directories separated by a special
|
16515 |
|
|
character, much like \fB\s-1PATH\s0\fR, in which to look for header files.
|
16516 |
|
|
The special character, \f(CW\*(C`PATH_SEPARATOR\*(C'\fR, is target-dependent and
|
16517 |
|
|
determined at \s-1GCC\s0 build time. For Microsoft Windows-based targets it is a
|
16518 |
|
|
semicolon, and for almost all other targets it is a colon.
|
16519 |
|
|
.Sp
|
16520 |
|
|
\&\fB\s-1CPATH\s0\fR specifies a list of directories to be searched as if
|
16521 |
|
|
specified with \fB\-I\fR, but after any paths given with \fB\-I\fR
|
16522 |
|
|
options on the command line. This environment variable is used
|
16523 |
|
|
regardless of which language is being preprocessed.
|
16524 |
|
|
.Sp
|
16525 |
|
|
The remaining environment variables apply only when preprocessing the
|
16526 |
|
|
particular language indicated. Each specifies a list of directories
|
16527 |
|
|
to be searched as if specified with \fB\-isystem\fR, but after any
|
16528 |
|
|
paths given with \fB\-isystem\fR options on the command line.
|
16529 |
|
|
.Sp
|
16530 |
|
|
In all these variables, an empty element instructs the compiler to
|
16531 |
|
|
search its current working directory. Empty elements can appear at the
|
16532 |
|
|
beginning or end of a path. For instance, if the value of
|
16533 |
|
|
\&\fB\s-1CPATH\s0\fR is \f(CW\*(C`:/special/include\*(C'\fR, that has the same
|
16534 |
|
|
effect as \fB\-I.\ \-I/special/include\fR.
|
16535 |
|
|
.IP "\fB\s-1DEPENDENCIES_OUTPUT\s0\fR" 4
|
16536 |
|
|
.IX Item "DEPENDENCIES_OUTPUT"
|
16537 |
|
|
If this variable is set, its value specifies how to output
|
16538 |
|
|
dependencies for Make based on the non-system header files processed
|
16539 |
|
|
by the compiler. System header files are ignored in the dependency
|
16540 |
|
|
output.
|
16541 |
|
|
.Sp
|
16542 |
|
|
The value of \fB\s-1DEPENDENCIES_OUTPUT\s0\fR can be just a file name, in
|
16543 |
|
|
which case the Make rules are written to that file, guessing the target
|
16544 |
|
|
name from the source file name. Or the value can have the form
|
16545 |
|
|
\&\fIfile\fR\fB \fR\fItarget\fR, in which case the rules are written to
|
16546 |
|
|
file \fIfile\fR using \fItarget\fR as the target name.
|
16547 |
|
|
.Sp
|
16548 |
|
|
In other words, this environment variable is equivalent to combining
|
16549 |
|
|
the options \fB\-MM\fR and \fB\-MF\fR,
|
16550 |
|
|
with an optional \fB\-MT\fR switch too.
|
16551 |
|
|
.IP "\fB\s-1SUNPRO_DEPENDENCIES\s0\fR" 4
|
16552 |
|
|
.IX Item "SUNPRO_DEPENDENCIES"
|
16553 |
|
|
This variable is the same as \fB\s-1DEPENDENCIES_OUTPUT\s0\fR (see above),
|
16554 |
|
|
except that system header files are not ignored, so it implies
|
16555 |
|
|
\&\fB\-M\fR rather than \fB\-MM\fR. However, the dependence on the
|
16556 |
|
|
main input file is omitted.
|
16557 |
|
|
.SH "BUGS"
|
16558 |
|
|
.IX Header "BUGS"
|
16559 |
|
|
For instructions on reporting bugs, see
|
16560 |
|
|
<\fBhttp://gcc.gnu.org/bugs.html\fR>.
|
16561 |
|
|
.SH "FOOTNOTES"
|
16562 |
|
|
.IX Header "FOOTNOTES"
|
16563 |
|
|
.IP "1." 4
|
16564 |
|
|
On some systems, \fBgcc \-shared\fR
|
16565 |
|
|
needs to build supplementary stub code for constructors to work. On
|
16566 |
|
|
multi-libbed systems, \fBgcc \-shared\fR must select the correct support
|
16567 |
|
|
libraries to link against. Failing to supply the correct flags may lead
|
16568 |
|
|
to subtle defects. Supplying them in cases where they are not necessary
|
16569 |
|
|
is innocuous.
|
16570 |
|
|
.SH "SEE ALSO"
|
16571 |
|
|
.IX Header "SEE ALSO"
|
16572 |
|
|
\&\fIgpl\fR\|(7), \fIgfdl\fR\|(7), \fIfsf\-funding\fR\|(7),
|
16573 |
|
|
\&\fIcpp\fR\|(1), \fIgcov\fR\|(1), \fIas\fR\|(1), \fIld\fR\|(1), \fIgdb\fR\|(1), \fIadb\fR\|(1), \fIdbx\fR\|(1), \fIsdb\fR\|(1)
|
16574 |
|
|
and the Info entries for \fIgcc\fR, \fIcpp\fR, \fIas\fR,
|
16575 |
|
|
\&\fIld\fR, \fIbinutils\fR and \fIgdb\fR.
|
16576 |
|
|
.SH "AUTHOR"
|
16577 |
|
|
.IX Header "AUTHOR"
|
16578 |
|
|
See the Info entry for \fBgcc\fR, or
|
16579 |
|
|
<\fBhttp://gcc.gnu.org/onlinedocs/gcc/Contributors.html\fR>,
|
16580 |
|
|
for contributors to \s-1GCC\s0.
|
16581 |
|
|
.SH "COPYRIGHT"
|
16582 |
|
|
.IX Header "COPYRIGHT"
|
16583 |
|
|
Copyright (c) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
16584 |
|
|
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
16585 |
|
|
Free Software Foundation, Inc.
|
16586 |
|
|
.PP
|
16587 |
|
|
Permission is granted to copy, distribute and/or modify this document
|
16588 |
|
|
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or
|
16589 |
|
|
any later version published by the Free Software Foundation; with the
|
16590 |
|
|
Invariant Sections being \*(L"\s-1GNU\s0 General Public License\*(R" and \*(L"Funding
|
16591 |
|
|
Free Software\*(R", the Front-Cover texts being (a) (see below), and with
|
16592 |
|
|
the Back-Cover Texts being (b) (see below). A copy of the license is
|
16593 |
|
|
included in the \fIgfdl\fR\|(7) man page.
|
16594 |
|
|
.PP
|
16595 |
|
|
(a) The \s-1FSF\s0's Front-Cover Text is:
|
16596 |
|
|
.PP
|
16597 |
|
|
.Vb 1
|
16598 |
|
|
\& A GNU Manual
|
16599 |
|
|
.Ve
|
16600 |
|
|
.PP
|
16601 |
|
|
(b) The \s-1FSF\s0's Back-Cover Text is:
|
16602 |
|
|
.PP
|
16603 |
|
|
.Vb 3
|
16604 |
|
|
\& You have freedom to copy and modify this GNU Manual, like GNU
|
16605 |
|
|
\& software. Copies published by the Free Software Foundation raise
|
16606 |
|
|
\& funds for GNU development.
|
16607 |
|
|
.Ve
|