comparison gcc/doc/invoke.texi @ 67:f6334be47118

update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 22 Mar 2011 17:18:12 +0900
parents b7f97abdc517
children 04ced10e8804
comparison
equal deleted inserted replaced
65:65488c3d617d 67:f6334be47118
1 @c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 1 @c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2 @c 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 2 @c 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
3 @c Free Software Foundation, Inc. 3 @c Free Software Foundation, Inc.
4 @c This is part of the GCC manual. 4 @c This is part of the GCC manual.
5 @c For copying conditions, see the file gcc.texi. 5 @c For copying conditions, see the file gcc.texi.
6 6
7 @ignore 7 @ignore
13 Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 13 Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
14 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 14 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
15 Free Software Foundation, Inc. 15 Free Software Foundation, Inc.
16 16
17 Permission is granted to copy, distribute and/or modify this document 17 Permission is granted to copy, distribute and/or modify this document
18 under the terms of the GNU Free Documentation License, Version 1.2 or 18 under the terms of the GNU Free Documentation License, Version 1.3 or
19 any later version published by the Free Software Foundation; with the 19 any later version published by the Free Software Foundation; with the
20 Invariant Sections being ``GNU General Public License'' and ``Funding 20 Invariant Sections being ``GNU General Public License'' and ``Funding
21 Free Software'', the Front-Cover texts being (a) (see below), and with 21 Free Software'', the Front-Cover texts being (a) (see below), and with
22 the Back-Cover Texts being (b) (see below). A copy of the license is 22 the Back-Cover Texts being (b) (see below). A copy of the license is
23 included in the gfdl(7) man page. 23 included in the gfdl(7) man page.
159 in the following sections. 159 in the following sections.
160 160
161 @table @emph 161 @table @emph
162 @item Overall Options 162 @item Overall Options
163 @xref{Overall Options,,Options Controlling the Kind of Output}. 163 @xref{Overall Options,,Options Controlling the Kind of Output}.
164 @gccoptlist{-c -S -E -o @var{file} -combine -no-canonical-prefixes @gol 164 @gccoptlist{-c -S -E -o @var{file} -no-canonical-prefixes @gol
165 -pipe -pass-exit-codes @gol 165 -pipe -pass-exit-codes @gol
166 -x @var{language} -v -### --help@r{[}=@var{class}@r{[},@dots{}@r{]]} --target-help @gol 166 -x @var{language} -v -### --help@r{[}=@var{class}@r{[},@dots{}@r{]]} --target-help @gol
167 --version -wrapper@@@var{file} -fplugin=@var{file} -fplugin-arg-@var{name}=@var{arg}} 167 --version -wrapper @@@var{file} -fplugin=@var{file} -fplugin-arg-@var{name}=@var{arg} @gol
168 -fdump-ada-spec@r{[}-slim@r{]}} -fdump-go-spec=@var{file}
168 169
169 @item C Language Options 170 @item C Language Options
170 @xref{C Dialect Options,,Options Controlling C Dialect}. 171 @xref{C Dialect Options,,Options Controlling C Dialect}.
171 @gccoptlist{-ansi -std=@var{standard} -fgnu89-inline @gol 172 @gccoptlist{-ansi -std=@var{standard} -fgnu89-inline @gol
172 -aux-info @var{filename} @gol 173 -aux-info @var{filename} @gol
173 -fno-asm -fno-builtin -fno-builtin-@var{function} @gol 174 -fno-asm -fno-builtin -fno-builtin-@var{function} @gol
174 -fhosted -ffreestanding -fopenmp -fms-extensions @gol 175 -fhosted -ffreestanding -fopenmp -fms-extensions -fplan9-extensions @gol
175 -trigraphs -no-integrated-cpp -traditional -traditional-cpp @gol 176 -trigraphs -no-integrated-cpp -traditional -traditional-cpp @gol
176 -fallow-single-precision -fcond-mismatch -flax-vector-conversions @gol 177 -fallow-single-precision -fcond-mismatch -flax-vector-conversions @gol
177 -fsigned-bitfields -fsigned-char @gol 178 -fsigned-bitfields -fsigned-char @gol
178 -funsigned-bitfields -funsigned-char} 179 -funsigned-bitfields -funsigned-char}
179 180
193 -frepo -fno-rtti -fstats -ftemplate-depth=@var{n} @gol 194 -frepo -fno-rtti -fstats -ftemplate-depth=@var{n} @gol
194 -fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol 195 -fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol
195 -fno-default-inline -fvisibility-inlines-hidden @gol 196 -fno-default-inline -fvisibility-inlines-hidden @gol
196 -fvisibility-ms-compat @gol 197 -fvisibility-ms-compat @gol
197 -Wabi -Wconversion-null -Wctor-dtor-privacy @gol 198 -Wabi -Wconversion-null -Wctor-dtor-privacy @gol
198 -Wnon-virtual-dtor -Wreorder @gol 199 -Wnoexcept -Wnon-virtual-dtor -Wreorder @gol
199 -Weffc++ -Wstrict-null-sentinel @gol 200 -Weffc++ -Wstrict-null-sentinel @gol
200 -Wno-non-template-friend -Wold-style-cast @gol 201 -Wno-non-template-friend -Wold-style-cast @gol
201 -Woverloaded-virtual -Wno-pmf-conversions @gol 202 -Woverloaded-virtual -Wno-pmf-conversions @gol
202 -Wsign-promo} 203 -Wsign-promo}
203 204
205 @xref{Objective-C and Objective-C++ Dialect Options,,Options Controlling 206 @xref{Objective-C and Objective-C++ Dialect Options,,Options Controlling
206 Objective-C and Objective-C++ Dialects}. 207 Objective-C and Objective-C++ Dialects}.
207 @gccoptlist{-fconstant-string-class=@var{class-name} @gol 208 @gccoptlist{-fconstant-string-class=@var{class-name} @gol
208 -fgnu-runtime -fnext-runtime @gol 209 -fgnu-runtime -fnext-runtime @gol
209 -fno-nil-receivers @gol 210 -fno-nil-receivers @gol
211 -fobjc-abi-version=@var{n} @gol
210 -fobjc-call-cxx-cdtors @gol 212 -fobjc-call-cxx-cdtors @gol
211 -fobjc-direct-dispatch @gol 213 -fobjc-direct-dispatch @gol
212 -fobjc-exceptions @gol 214 -fobjc-exceptions @gol
213 -fobjc-gc @gol 215 -fobjc-gc @gol
216 -fobjc-nilcheck @gol
217 -fobjc-std=objc1 @gol
214 -freplace-objc-classes @gol 218 -freplace-objc-classes @gol
215 -fzero-link @gol 219 -fzero-link @gol
216 -gen-decls @gol 220 -gen-decls @gol
217 -Wassign-intercept @gol 221 -Wassign-intercept @gol
218 -Wno-protocol -Wselector @gol 222 -Wno-protocol -Wselector @gol
221 225
222 @item Language Independent Options 226 @item Language Independent Options
223 @xref{Language Independent Options,,Options to Control Diagnostic Messages Formatting}. 227 @xref{Language Independent Options,,Options to Control Diagnostic Messages Formatting}.
224 @gccoptlist{-fmessage-length=@var{n} @gol 228 @gccoptlist{-fmessage-length=@var{n} @gol
225 -fdiagnostics-show-location=@r{[}once@r{|}every-line@r{]} @gol 229 -fdiagnostics-show-location=@r{[}once@r{|}every-line@r{]} @gol
226 -fdiagnostics-show-option} 230 -fno-diagnostics-show-option}
227 231
228 @item Warning Options 232 @item Warning Options
229 @xref{Warning Options,,Options to Request or Suppress Warnings}. 233 @xref{Warning Options,,Options to Request or Suppress Warnings}.
230 @gccoptlist{-fsyntax-only -pedantic -pedantic-errors @gol 234 @gccoptlist{-fsyntax-only -fmax-errors=@var{n} -pedantic @gol
235 -pedantic-errors @gol
231 -w -Wextra -Wall -Waddress -Waggregate-return -Warray-bounds @gol 236 -w -Wextra -Wall -Waddress -Waggregate-return -Warray-bounds @gol
232 -Wno-attributes -Wno-builtin-macro-redefined @gol 237 -Wno-attributes -Wno-builtin-macro-redefined @gol
233 -Wc++-compat -Wc++0x-compat -Wcast-align -Wcast-qual @gol 238 -Wc++-compat -Wc++0x-compat -Wcast-align -Wcast-qual @gol
234 -Wchar-subscripts -Wclobbered -Wcomment @gol 239 -Wchar-subscripts -Wclobbered -Wcomment @gol
235 -Wconversion -Wcoverage-mismatch -Wcpp -Wno-deprecated @gol 240 -Wconversion -Wcoverage-mismatch -Wcpp -Wno-deprecated @gol
236 -Wno-deprecated-declarations -Wdisabled-optimization @gol 241 -Wno-deprecated-declarations -Wdisabled-optimization @gol
237 -Wno-div-by-zero -Wempty-body -Wenum-compare -Wno-endif-labels @gol 242 -Wno-div-by-zero -Wdouble-promotion -Wempty-body -Wenum-compare @gol
238 -Werror -Werror=* @gol 243 -Wno-endif-labels -Werror -Werror=* @gol
239 -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol 244 -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol
240 -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol 245 -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol
241 -Wformat-security -Wformat-y2k @gol 246 -Wformat-security -Wformat-y2k @gol
242 -Wframe-larger-than=@var{len} -Wjump-misses-init -Wignored-qualifiers @gol 247 -Wframe-larger-than=@var{len} -Wjump-misses-init -Wignored-qualifiers @gol
243 -Wimplicit -Wimplicit-function-declaration -Wimplicit-int @gol 248 -Wimplicit -Wimplicit-function-declaration -Wimplicit-int @gol
245 -Wno-int-to-pointer-cast -Wno-invalid-offsetof @gol 250 -Wno-int-to-pointer-cast -Wno-invalid-offsetof @gol
246 -Winvalid-pch -Wlarger-than=@var{len} -Wunsafe-loop-optimizations @gol 251 -Winvalid-pch -Wlarger-than=@var{len} -Wunsafe-loop-optimizations @gol
247 -Wlogical-op -Wlong-long @gol 252 -Wlogical-op -Wlong-long @gol
248 -Wmain -Wmissing-braces -Wmissing-field-initializers @gol 253 -Wmain -Wmissing-braces -Wmissing-field-initializers @gol
249 -Wmissing-format-attribute -Wmissing-include-dirs @gol 254 -Wmissing-format-attribute -Wmissing-include-dirs @gol
250 -Wmissing-noreturn -Wno-mudflap @gol 255 -Wno-mudflap @gol
251 -Wno-multichar -Wnonnull -Wno-overflow @gol 256 -Wno-multichar -Wnonnull -Wno-overflow @gol
252 -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol 257 -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol
253 -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol 258 -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
254 -Wpointer-arith -Wno-pointer-to-int-cast @gol 259 -Wpointer-arith -Wno-pointer-to-int-cast @gol
255 -Wredundant-decls @gol 260 -Wredundant-decls @gol
256 -Wreturn-type -Wsequence-point -Wshadow @gol 261 -Wreturn-type -Wsequence-point -Wshadow @gol
257 -Wsign-compare -Wsign-conversion -Wstack-protector @gol 262 -Wsign-compare -Wsign-conversion -Wstack-protector @gol
258 -Wstrict-aliasing -Wstrict-aliasing=n @gol 263 -Wstrict-aliasing -Wstrict-aliasing=n @gol
259 -Wstrict-overflow -Wstrict-overflow=@var{n} @gol 264 -Wstrict-overflow -Wstrict-overflow=@var{n} @gol
260 -Wsuggest-attribute=@r{[}const@r{|}pure@r{]} @gol 265 -Wsuggest-attribute=@r{[}pure@r{|}const@r{|}noreturn@r{]} @gol
261 -Wswitch -Wswitch-default -Wswitch-enum -Wsync-nand @gol 266 -Wswitch -Wswitch-default -Wswitch-enum -Wsync-nand @gol
262 -Wsystem-headers -Wtrigraphs -Wtype-limits -Wundef -Wuninitialized @gol 267 -Wsystem-headers -Wtrampolines -Wtrigraphs -Wtype-limits -Wundef @gol
263 -Wunknown-pragmas -Wno-pragmas @gol 268 -Wuninitialized -Wunknown-pragmas -Wno-pragmas @gol
264 -Wunsuffixed-float-constants -Wunused -Wunused-function @gol 269 -Wunsuffixed-float-constants -Wunused -Wunused-function @gol
265 -Wunused-label -Wunused-parameter -Wno-unused-result -Wunused-value -Wunused-variable @gol 270 -Wunused-label -Wunused-parameter -Wno-unused-result -Wunused-value @gol
266 -Wunused-but-set-parameter -Wunused-but-set-variable -Wvariadic-macros -Wvla @gol 271 -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable @gol
267 -Wvolatile-register-var -Wwrite-strings} 272 -Wvariadic-macros -Wvla -Wvolatile-register-var -Wwrite-strings}
268 273
269 @item C and Objective-C-only Warning Options 274 @item C and Objective-C-only Warning Options
270 @gccoptlist{-Wbad-function-cast -Wmissing-declarations @gol 275 @gccoptlist{-Wbad-function-cast -Wmissing-declarations @gol
271 -Wmissing-parameter-type -Wmissing-prototypes -Wnested-externs @gol 276 -Wmissing-parameter-type -Wmissing-prototypes -Wnested-externs @gol
272 -Wold-style-declaration -Wold-style-definition @gol 277 -Wold-style-declaration -Wold-style-definition @gol
310 -feliminate-unused-debug-symbols -femit-class-debug-always @gol 315 -feliminate-unused-debug-symbols -femit-class-debug-always @gol
311 -fenable-icf-debug @gol 316 -fenable-icf-debug @gol
312 -fmem-report -fpre-ipa-mem-report -fpost-ipa-mem-report -fprofile-arcs @gol 317 -fmem-report -fpre-ipa-mem-report -fpost-ipa-mem-report -fprofile-arcs @gol
313 -frandom-seed=@var{string} -fsched-verbose=@var{n} @gol 318 -frandom-seed=@var{string} -fsched-verbose=@var{n} @gol
314 -fsel-sched-verbose -fsel-sched-dump-cfg -fsel-sched-pipelining-verbose @gol 319 -fsel-sched-verbose -fsel-sched-dump-cfg -fsel-sched-pipelining-verbose @gol
315 -ftest-coverage -ftime-report -fvar-tracking @gol 320 -fstack-usage -ftest-coverage -ftime-report -fvar-tracking @gol
316 -fvar-tracking-assignments -fvar-tracking-assignments-toggle @gol 321 -fvar-tracking-assignments -fvar-tracking-assignments-toggle @gol
317 -g -g@var{level} -gtoggle -gcoff -gdwarf-@var{version} @gol 322 -g -g@var{level} -gtoggle -gcoff -gdwarf-@var{version} @gol
318 -ggdb -gstabs -gstabs+ -gstrict-dwarf -gno-strict-dwarf @gol 323 -ggdb -gstabs -gstabs+ -gstrict-dwarf -gno-strict-dwarf @gol
319 -gvms -gxcoff -gxcoff+ @gol 324 -gvms -gxcoff -gxcoff+ @gol
320 -fno-merge-debug-strings -fno-dwarf2-cfi-asm @gol 325 -fno-merge-debug-strings -fno-dwarf2-cfi-asm @gol
327 -print-sysroot -print-sysroot-headers-suffix @gol 332 -print-sysroot -print-sysroot-headers-suffix @gol
328 -save-temps -save-temps=cwd -save-temps=obj -time@r{[}=@var{file}@r{]}} 333 -save-temps -save-temps=cwd -save-temps=obj -time@r{[}=@var{file}@r{]}}
329 334
330 @item Optimization Options 335 @item Optimization Options
331 @xref{Optimize Options,,Options that Control Optimization}. 336 @xref{Optimize Options,,Options that Control Optimization}.
332 @gccoptlist{ 337 @gccoptlist{-falign-functions[=@var{n}] -falign-jumps[=@var{n}] @gol
333 -falign-functions[=@var{n}] -falign-jumps[=@var{n}] @gol
334 -falign-labels[=@var{n}] -falign-loops[=@var{n}] -fassociative-math @gol 338 -falign-labels[=@var{n}] -falign-loops[=@var{n}] -fassociative-math @gol
335 -fauto-inc-dec -fbranch-probabilities -fbranch-target-load-optimize @gol 339 -fauto-inc-dec -fbranch-probabilities -fbranch-target-load-optimize @gol
336 -fbranch-target-load-optimize2 -fbtr-bb-exclusive -fcaller-saves @gol 340 -fbranch-target-load-optimize2 -fbtr-bb-exclusive -fcaller-saves @gol
337 -fcheck-data-deps -fconserve-stack -fcprop-registers -fcrossjumping @gol 341 -fcheck-data-deps -fcombine-stack-adjustments -fconserve-stack @gol
338 -fcse-follow-jumps -fcse-skip-blocks -fcx-fortran-rules -fcx-limited-range @gol 342 -fcompare-elim -fcprop-registers -fcrossjumping @gol
339 -fdata-sections -fdce -fdce @gol 343 -fcse-follow-jumps -fcse-skip-blocks -fcx-fortran-rules @gol
340 -fdelayed-branch -fdelete-null-pointer-checks -fdse -fdse @gol 344 -fcx-limited-range @gol
345 -fdata-sections -fdce -fdce -fdelayed-branch @gol
346 -fdelete-null-pointer-checks -fdse -fdevirtualize -fdse @gol
341 -fearly-inlining -fipa-sra -fexpensive-optimizations -ffast-math @gol 347 -fearly-inlining -fipa-sra -fexpensive-optimizations -ffast-math @gol
342 -ffinite-math-only -ffloat-store -fexcess-precision=@var{style} @gol 348 -ffinite-math-only -ffloat-store -fexcess-precision=@var{style} @gol
343 -fforward-propagate -ffunction-sections @gol 349 -fforward-propagate -ffp-contract=@var{style} -ffunction-sections @gol
344 -fgcse -fgcse-after-reload -fgcse-las -fgcse-lm @gol 350 -fgcse -fgcse-after-reload -fgcse-las -fgcse-lm -fgraphite-identity @gol
345 -fgcse-sm -fif-conversion -fif-conversion2 -findirect-inlining @gol 351 -fgcse-sm -fif-conversion -fif-conversion2 -findirect-inlining @gol
346 -finline-functions -finline-functions-called-once -finline-limit=@var{n} @gol 352 -finline-functions -finline-functions-called-once -finline-limit=@var{n} @gol
347 -finline-small-functions -fipa-cp -fipa-cp-clone -fipa-matrix-reorg -fipa-pta @gol 353 -finline-small-functions -fipa-cp -fipa-cp-clone -fipa-matrix-reorg @gol
348 -fipa-profile -fipa-pure-const -fipa-reference -fipa-struct-reorg @gol 354 -fipa-pta -fipa-profile -fipa-pure-const -fipa-reference @gol
349 -fira-algorithm=@var{algorithm} @gol 355 -fipa-struct-reorg -fira-algorithm=@var{algorithm} @gol
350 -fira-region=@var{region} -fira-coalesce @gol 356 -fira-region=@var{region} @gol
351 -fira-loop-pressure -fno-ira-share-save-slots @gol 357 -fira-loop-pressure -fno-ira-share-save-slots @gol
352 -fno-ira-share-spill-slots -fira-verbose=@var{n} @gol 358 -fno-ira-share-spill-slots -fira-verbose=@var{n} @gol
353 -fivopts -fkeep-inline-functions -fkeep-static-consts @gol 359 -fivopts -fkeep-inline-functions -fkeep-static-consts @gol
354 -floop-block -floop-interchange -floop-strip-mine -fgraphite-identity @gol 360 -floop-block -floop-flatten -floop-interchange -floop-strip-mine @gol
355 -floop-parallelize-all -flto -flto-compression-level -flto-report -fltrans @gol 361 -floop-parallelize-all -flto -flto-compression-level
356 -fltrans-output-list -fmerge-all-constants -fmerge-constants -fmodulo-sched @gol 362 -flto-partition=@var{alg} -flto-report -fmerge-all-constants @gol
357 -fmodulo-sched-allow-regmoves -fmove-loop-invariants -fmudflap @gol 363 -fmerge-constants -fmodulo-sched -fmodulo-sched-allow-regmoves @gol
358 -fmudflapir -fmudflapth -fno-branch-count-reg -fno-default-inline @gol 364 -fmove-loop-invariants fmudflap -fmudflapir -fmudflapth -fno-branch-count-reg @gol
365 -fno-default-inline @gol
359 -fno-defer-pop -fno-function-cse -fno-guess-branch-probability @gol 366 -fno-defer-pop -fno-function-cse -fno-guess-branch-probability @gol
360 -fno-inline -fno-math-errno -fno-peephole -fno-peephole2 @gol 367 -fno-inline -fno-math-errno -fno-peephole -fno-peephole2 @gol
361 -fno-sched-interblock -fno-sched-spec -fno-signed-zeros @gol 368 -fno-sched-interblock -fno-sched-spec -fno-signed-zeros @gol
362 -fno-toplevel-reorder -fno-trapping-math -fno-zero-initialized-in-bss @gol 369 -fno-toplevel-reorder -fno-trapping-math -fno-zero-initialized-in-bss @gol
363 -fomit-frame-pointer -foptimize-register-move -foptimize-sibling-calls @gol 370 -fomit-frame-pointer -foptimize-register-move -foptimize-sibling-calls @gol
364 -fpeel-loops -fpredictive-commoning -fprefetch-loop-arrays @gol 371 -fpartial-inlining -fpeel-loops -fpredictive-commoning @gol
372 -fprefetch-loop-arrays @gol
365 -fprofile-correction -fprofile-dir=@var{path} -fprofile-generate @gol 373 -fprofile-correction -fprofile-dir=@var{path} -fprofile-generate @gol
366 -fprofile-generate=@var{path} @gol 374 -fprofile-generate=@var{path} @gol
367 -fprofile-use -fprofile-use=@var{path} -fprofile-values @gol 375 -fprofile-use -fprofile-use=@var{path} -fprofile-values @gol
368 -freciprocal-math -fregmove -frename-registers -freorder-blocks @gol 376 -freciprocal-math -fregmove -frename-registers -freorder-blocks @gol
369 -freorder-blocks-and-partition -freorder-functions @gol 377 -freorder-blocks-and-partition -freorder-functions @gol
378 -fselective-scheduling -fselective-scheduling2 @gol 386 -fselective-scheduling -fselective-scheduling2 @gol
379 -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops @gol 387 -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops @gol
380 -fsignaling-nans -fsingle-precision-constant -fsplit-ivs-in-unroller @gol 388 -fsignaling-nans -fsingle-precision-constant -fsplit-ivs-in-unroller @gol
381 -fsplit-wide-types -fstack-protector -fstack-protector-all @gol 389 -fsplit-wide-types -fstack-protector -fstack-protector-all @gol
382 -fstrict-aliasing -fstrict-overflow -fthread-jumps -ftracer @gol 390 -fstrict-aliasing -fstrict-overflow -fthread-jumps -ftracer @gol
391 -ftree-bit-ccp @gol
383 -ftree-builtin-call-dce -ftree-ccp -ftree-ch -ftree-copy-prop @gol 392 -ftree-builtin-call-dce -ftree-ccp -ftree-ch -ftree-copy-prop @gol
384 -ftree-copyrename -ftree-dce @gol 393 -ftree-copyrename -ftree-dce -ftree-dominator-opts -ftree-dse @gol
385 -ftree-dominator-opts -ftree-dse -ftree-forwprop -ftree-fre -ftree-loop-im @gol 394 -ftree-forwprop -ftree-fre -ftree-loop-if-convert @gol
386 -ftree-phiprop -ftree-loop-distribution @gol 395 -ftree-loop-if-convert-stores -ftree-loop-im @gol
396 -ftree-phiprop -ftree-loop-distribution -ftree-loop-distribute-patterns @gol
387 -ftree-loop-ivcanon -ftree-loop-linear -ftree-loop-optimize @gol 397 -ftree-loop-ivcanon -ftree-loop-linear -ftree-loop-optimize @gol
388 -ftree-parallelize-loops=@var{n} -ftree-pre -ftree-pta -ftree-reassoc @gol 398 -ftree-parallelize-loops=@var{n} -ftree-pre -ftree-pta -ftree-reassoc @gol
389 -ftree-sink -ftree-sra -ftree-switch-conversion @gol 399 -ftree-sink -ftree-sra -ftree-switch-conversion @gol
390 -ftree-ter -ftree-vect-loop-version -ftree-vectorize -ftree-vrp @gol 400 -ftree-ter -ftree-vect-loop-version -ftree-vectorize -ftree-vrp @gol
391 -funit-at-a-time -funroll-all-loops -funroll-loops @gol 401 -funit-at-a-time -funroll-all-loops -funroll-loops @gol
392 -funsafe-loop-optimizations -funsafe-math-optimizations -funswitch-loops @gol 402 -funsafe-loop-optimizations -funsafe-math-optimizations -funswitch-loops @gol
393 -fvariable-expansion-in-unroller -fvect-cost-model -fvpt -fweb @gol 403 -fvariable-expansion-in-unroller -fvect-cost-model -fvpt -fweb @gol
394 -fwhole-program -fwhopr[=@var{n}] -fwpa -fuse-linker-plugin @gol 404 -fwhole-program -fwpa -fuse-linker-plugin @gol
395 --param @var{name}=@var{value} 405 --param @var{name}=@var{value}
396 -O -O0 -O1 -O2 -O3 -Os} 406 -O -O0 -O1 -O2 -O3 -Os -Ofast}
397 407
398 @item Preprocessor Options 408 @item Preprocessor Options
399 @xref{Preprocessor Options,,Options Controlling the Preprocessor}. 409 @xref{Preprocessor Options,,Options Controlling the Preprocessor}.
400 @gccoptlist{-A@var{question}=@var{answer} @gol 410 @gccoptlist{-A@var{question}=@var{answer} @gol
401 -A-@var{question}@r{[}=@var{answer}@r{]} @gol 411 -A-@var{question}@r{[}=@var{answer}@r{]} @gol
557 -mno-nested-cond-exec -mtomcat-stats @gol 567 -mno-nested-cond-exec -mtomcat-stats @gol
558 -mTLS -mtls @gol 568 -mTLS -mtls @gol
559 -mcpu=@var{cpu}} 569 -mcpu=@var{cpu}}
560 570
561 @emph{GNU/Linux Options} 571 @emph{GNU/Linux Options}
562 @gccoptlist{-muclibc} 572 @gccoptlist{-mglibc -muclibc -mbionic -mandroid @gol
573 -tno-android-cc -tno-android-ld}
563 574
564 @emph{H8/300 Options} 575 @emph{H8/300 Options}
565 @gccoptlist{-mrelax -mh -ms -mn -mint32 -malign-300} 576 @gccoptlist{-mrelax -mh -ms -mn -mint32 -malign-300}
566 577
567 @emph{HPPA Options} 578 @emph{HPPA Options}
584 -mfpmath=@var{unit} @gol 595 -mfpmath=@var{unit} @gol
585 -masm=@var{dialect} -mno-fancy-math-387 @gol 596 -masm=@var{dialect} -mno-fancy-math-387 @gol
586 -mno-fp-ret-in-387 -msoft-float @gol 597 -mno-fp-ret-in-387 -msoft-float @gol
587 -mno-wide-multiply -mrtd -malign-double @gol 598 -mno-wide-multiply -mrtd -malign-double @gol
588 -mpreferred-stack-boundary=@var{num} 599 -mpreferred-stack-boundary=@var{num}
589 -mincoming-stack-boundary=@var{num} 600 -mincoming-stack-boundary=@var{num} @gol
590 -mcld -mcx16 -msahf -mmovbe -mcrc32 -mrecip @gol 601 -mcld -mcx16 -msahf -mmovbe -mcrc32 -mrecip -mvzeroupper @gol
591 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -msse4 -mavx @gol 602 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -msse4 -mavx @gol
592 -maes -mpclmul -mfused-madd @gol 603 -maes -mpclmul -mfsgsbase -mrdrnd -mf16c -mfused-madd @gol
593 -msse4a -m3dnow -mpopcnt -mabm -mfma4 -mxop -mlwp @gol 604 -msse4a -m3dnow -mpopcnt -mabm -mbmi -mtbm -mfma4 -mxop -mlwp @gol
594 -mthreads -mno-align-stringops -minline-all-stringops @gol 605 -mthreads -mno-align-stringops -minline-all-stringops @gol
595 -minline-stringops-dynamically -mstringop-strategy=@var{alg} @gol 606 -minline-stringops-dynamically -mstringop-strategy=@var{alg} @gol
596 -mpush-args -maccumulate-outgoing-args -m128bit-long-double @gol 607 -mpush-args -maccumulate-outgoing-args -m128bit-long-double @gol
597 -m96bit-long-double -mregparm=@var{num} -msseregparm @gol 608 -m96bit-long-double -mregparm=@var{num} -msseregparm @gol
598 -mveclibabi=@var{type} -mpc32 -mpc64 -mpc80 -mstackrealign @gol 609 -mveclibabi=@var{type} -mvect8-ret-in-mem @gol
610 -mpc32 -mpc64 -mpc80 -mstackrealign @gol
599 -momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs @gol 611 -momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs @gol
600 -mcmodel=@var{code-model} -mabi=@var{name} @gol 612 -mcmodel=@var{code-model} -mabi=@var{name} @gol
601 -m32 -m64 -mlarge-data-threshold=@var{num} @gol 613 -m32 -m64 -mlarge-data-threshold=@var{num} @gol
602 -msse2avx} 614 -msse2avx -mfentry -m8bit-idiv}
603 615
604 @emph{IA-64 Options} 616 @emph{IA-64 Options}
605 @gccoptlist{-mbig-endian -mlittle-endian -mgnu-as -mgnu-ld -mno-pic @gol 617 @gccoptlist{-mbig-endian -mlittle-endian -mgnu-as -mgnu-ld -mno-pic @gol
606 -mvolatile-asm-stop -mregister-names -msdata -mno-sdata @gol 618 -mvolatile-asm-stop -mregister-names -msdata -mno-sdata @gol
607 -mconstant-gp -mauto-pic -mfused-madd @gol 619 -mconstant-gp -mauto-pic -mfused-madd @gol
673 @gccoptlist{-mabsdiff -mall-opts -maverage -mbased=@var{n} -mbitops @gol 685 @gccoptlist{-mabsdiff -mall-opts -maverage -mbased=@var{n} -mbitops @gol
674 -mc=@var{n} -mclip -mconfig=@var{name} -mcop -mcop32 -mcop64 -mivc2 @gol 686 -mc=@var{n} -mclip -mconfig=@var{name} -mcop -mcop32 -mcop64 -mivc2 @gol
675 -mdc -mdiv -meb -mel -mio-volatile -ml -mleadz -mm -mminmax @gol 687 -mdc -mdiv -meb -mel -mio-volatile -ml -mleadz -mm -mminmax @gol
676 -mmult -mno-opts -mrepeat -ms -msatur -msdram -msim -msimnovec -mtf @gol 688 -mmult -mno-opts -mrepeat -ms -msatur -msdram -msim -msimnovec -mtf @gol
677 -mtiny=@var{n}} 689 -mtiny=@var{n}}
690
691 @emph{MicroBlaze Options}
692 @gccoptlist{-msoft-float -mhard-float -msmall-divides -mcpu=@var{cpu} @gol
693 -mmemcpy -mxl-soft-mul -mxl-soft-div -mxl-barrel-shift @gol
694 -mxl-pattern-compare -mxl-stack-check -mxl-gp-opt -mno-clearbss @gol
695 -mxl-multiply-high -mxl-float-convert -mxl-float-sqrt @gol
696 -mxl-mode-@var{app-model}}
678 697
679 @emph{MIPS Options} 698 @emph{MIPS Options}
680 @gccoptlist{-EL -EB -march=@var{arch} -mtune=@var{arch} @gol 699 @gccoptlist{-EL -EB -march=@var{arch} -mtune=@var{arch} @gol
681 -mips1 -mips2 -mips3 -mips4 -mips32 -mips32r2 @gol 700 -mips1 -mips2 -mips3 -mips4 -mips32 -mips32r2 @gol
682 -mips64 -mips64r2 @gol 701 -mips64 -mips64r2 @gol
717 -melf -mbranch-predict -mno-branch-predict -mbase-addresses @gol 736 -melf -mbranch-predict -mno-branch-predict -mbase-addresses @gol
718 -mno-base-addresses -msingle-exit -mno-single-exit} 737 -mno-base-addresses -msingle-exit -mno-single-exit}
719 738
720 @emph{MN10300 Options} 739 @emph{MN10300 Options}
721 @gccoptlist{-mmult-bug -mno-mult-bug @gol 740 @gccoptlist{-mmult-bug -mno-mult-bug @gol
722 -mam33 -mno-am33 @gol 741 -mno-am33 -mam33 -mam33-2 -mam34 @gol
723 -mam33-2 -mno-am33-2 @gol 742 -mtune=@var{cpu-type} @gol
724 -mreturn-pointer-on-d0 @gol 743 -mreturn-pointer-on-d0 @gol
725 -mno-crt0 -mrelax} 744 -mno-crt0 -mrelax -mliw}
726 745
727 @emph{PDP-11 Options} 746 @emph{PDP-11 Options}
728 @gccoptlist{-mfpu -msoft-float -mac0 -mno-ac0 -m40 -m45 -m10 @gol 747 @gccoptlist{-mfpu -msoft-float -mac0 -mno-ac0 -m40 -m45 -m10 @gol
729 -mbcopy -mbcopy-builtin -mint32 -mno-int16 @gol 748 -mbcopy -mbcopy-builtin -mint32 -mno-int16 @gol
730 -mint16 -mno-int32 -mfloat32 -mno-float64 @gol 749 -mint16 -mno-int32 -mfloat32 -mno-float64 @gol
731 -mfloat64 -mno-float32 -mabshi -mno-abshi @gol 750 -mfloat64 -mno-float32 -mabshi -mno-abshi @gol
732 -mbranch-expensive -mbranch-cheap @gol 751 -mbranch-expensive -mbranch-cheap @gol
733 -msplit -mno-split -munix-asm -mdec-asm} 752 -munix-asm -mdec-asm}
734 753
735 @emph{picoChip Options} 754 @emph{picoChip Options}
736 @gccoptlist{-mae=@var{ae_type} -mvliw-lookahead=@var{N} 755 @gccoptlist{-mae=@var{ae_type} -mvliw-lookahead=@var{N} @gol
737 -msymbol-as-address -mno-inefficient-warnings} 756 -msymbol-as-address -mno-inefficient-warnings}
738 757
739 @emph{PowerPC Options} 758 @emph{PowerPC Options}
740 See RS/6000 and PowerPC Options. 759 See RS/6000 and PowerPC Options.
741 760
742 @emph{RS/6000 and PowerPC Options} 761 @emph{RS/6000 and PowerPC Options}
743 @gccoptlist{-mcpu=@var{cpu-type} @gol 762 @gccoptlist{-mcpu=@var{cpu-type} @gol
744 -mtune=@var{cpu-type} @gol 763 -mtune=@var{cpu-type} @gol
764 -mcmodel=@var{code-model} @gol
745 -mpower -mno-power -mpower2 -mno-power2 @gol 765 -mpower -mno-power -mpower2 -mno-power2 @gol
746 -mpowerpc -mpowerpc64 -mno-powerpc @gol 766 -mpowerpc -mpowerpc64 -mno-powerpc @gol
747 -maltivec -mno-altivec @gol 767 -maltivec -mno-altivec @gol
748 -mpowerpc-gpopt -mno-powerpc-gpopt @gol 768 -mpowerpc-gpopt -mno-powerpc-gpopt @gol
749 -mpowerpc-gfxopt -mno-powerpc-gfxopt @gol 769 -mpowerpc-gfxopt -mno-powerpc-gfxopt @gol
760 -mavoid-indexed-addresses -mno-avoid-indexed-addresses @gol 780 -mavoid-indexed-addresses -mno-avoid-indexed-addresses @gol
761 -mfused-madd -mno-fused-madd -mbit-align -mno-bit-align @gol 781 -mfused-madd -mno-fused-madd -mbit-align -mno-bit-align @gol
762 -mstrict-align -mno-strict-align -mrelocatable @gol 782 -mstrict-align -mno-strict-align -mrelocatable @gol
763 -mno-relocatable -mrelocatable-lib -mno-relocatable-lib @gol 783 -mno-relocatable -mrelocatable-lib -mno-relocatable-lib @gol
764 -mtoc -mno-toc -mlittle -mlittle-endian -mbig -mbig-endian @gol 784 -mtoc -mno-toc -mlittle -mlittle-endian -mbig -mbig-endian @gol
765 -mdynamic-no-pic -maltivec -mswdiv @gol 785 -mdynamic-no-pic -maltivec -mswdiv -msingle-pic-base @gol
766 -mprioritize-restricted-insns=@var{priority} @gol 786 -mprioritize-restricted-insns=@var{priority} @gol
767 -msched-costly-dep=@var{dependence_type} @gol 787 -msched-costly-dep=@var{dependence_type} @gol
768 -minsert-sched-nops=@var{scheme} @gol 788 -minsert-sched-nops=@var{scheme} @gol
769 -mcall-sysv -mcall-netbsd @gol 789 -mcall-sysv -mcall-netbsd @gol
770 -maix-struct-return -msvr4-struct-return @gol 790 -maix-struct-return -msvr4-struct-return @gol
771 -mabi=@var{abi-type} -msecure-plt -mbss-plt @gol 791 -mabi=@var{abi-type} -msecure-plt -mbss-plt @gol
792 -mblock-move-inline-limit=@var{num} @gol
772 -misel -mno-isel @gol 793 -misel -mno-isel @gol
773 -misel=yes -misel=no @gol 794 -misel=yes -misel=no @gol
774 -mspe -mno-spe @gol 795 -mspe -mno-spe @gol
775 -mspe=yes -mspe=no @gol 796 -mspe=yes -mspe=no @gol
776 -mpaired @gol 797 -mpaired @gol
779 -mmulhw -mno-mulhw @gol 800 -mmulhw -mno-mulhw @gol
780 -mdlmzb -mno-dlmzb @gol 801 -mdlmzb -mno-dlmzb @gol
781 -mfloat-gprs=yes -mfloat-gprs=no -mfloat-gprs=single -mfloat-gprs=double @gol 802 -mfloat-gprs=yes -mfloat-gprs=no -mfloat-gprs=single -mfloat-gprs=double @gol
782 -mprototype -mno-prototype @gol 803 -mprototype -mno-prototype @gol
783 -msim -mmvme -mads -myellowknife -memb -msdata @gol 804 -msim -mmvme -mads -myellowknife -memb -msdata @gol
784 -msdata=@var{opt} -mvxworks -G @var{num} -pthread} 805 -msdata=@var{opt} -mvxworks -G @var{num} -pthread @gol
806 -mrecip -mrecip=@var{opt} -mno-recip -mrecip-precision
807 -mno-recip-precision @gol
808 -mveclibabi=@var{type} -mfriz -mno-friz}
785 809
786 @emph{RX Options} 810 @emph{RX Options}
787 @gccoptlist{-m64bit-doubles -m32bit-doubles -fpu -nofpu@gol 811 @gccoptlist{-m64bit-doubles -m32bit-doubles -fpu -nofpu@gol
788 -mcpu= -patch=@gol 812 -mcpu=@gol
789 -mbig-endian-data -mlittle-endian-data @gol 813 -mbig-endian-data -mlittle-endian-data @gol
790 -msmall-data @gol 814 -msmall-data @gol
791 -msim -mno-sim@gol 815 -msim -mno-sim@gol
792 -mas100-syntax -mno-as100-syntax@gol 816 -mas100-syntax -mno-as100-syntax@gol
793 -mrelax@gol 817 -mrelax@gol
827 -mprefergot -musermode -multcost=@var{number} -mdiv=@var{strategy} @gol 851 -mprefergot -musermode -multcost=@var{number} -mdiv=@var{strategy} @gol
828 -mdivsi3_libfunc=@var{name} -mfixed-range=@var{register-range} @gol 852 -mdivsi3_libfunc=@var{name} -mfixed-range=@var{register-range} @gol
829 -madjust-unroll -mindexed-addressing -mgettrcost=@var{number} -mpt-fixed @gol 853 -madjust-unroll -mindexed-addressing -mgettrcost=@var{number} -mpt-fixed @gol
830 -maccumulate-outgoing-args -minvalid-symbols} 854 -maccumulate-outgoing-args -minvalid-symbols}
831 855
856 @emph{Solaris 2 Options}
857 @gccoptlist{-mimpure-text -mno-impure-text @gol
858 -threads -pthreads -pthread}
859
832 @emph{SPARC Options} 860 @emph{SPARC Options}
833 @gccoptlist{-mcpu=@var{cpu-type} @gol 861 @gccoptlist{-mcpu=@var{cpu-type} @gol
834 -mtune=@var{cpu-type} @gol 862 -mtune=@var{cpu-type} @gol
835 -mcmodel=@var{code-model} @gol 863 -mcmodel=@var{code-model} @gol
836 -m32 -m64 -mapp-regs -mno-app-regs @gol 864 -m32 -m64 -mapp-regs -mno-app-regs @gol
837 -mfaster-structs -mno-faster-structs @gol 865 -mfaster-structs -mno-faster-structs @gol
838 -mfpu -mno-fpu -mhard-float -msoft-float @gol 866 -mfpu -mno-fpu -mhard-float -msoft-float @gol
839 -mhard-quad-float -msoft-quad-float @gol 867 -mhard-quad-float -msoft-quad-float @gol
840 -mimpure-text -mno-impure-text -mlittle-endian @gol 868 -mlittle-endian @gol
841 -mstack-bias -mno-stack-bias @gol 869 -mstack-bias -mno-stack-bias @gol
842 -munaligned-doubles -mno-unaligned-doubles @gol 870 -munaligned-doubles -mno-unaligned-doubles @gol
843 -mv8plus -mno-v8plus -mvis -mno-vis 871 -mv8plus -mno-v8plus -mvis -mno-vis}
844 -threads -pthreads -pthread}
845 872
846 @emph{SPU Options} 873 @emph{SPU Options}
847 @gccoptlist{-mwarn-reloc -merror-reloc @gol 874 @gccoptlist{-mwarn-reloc -merror-reloc @gol
848 -msafe-dma -munsafe-dma @gol 875 -msafe-dma -munsafe-dma @gol
849 -mbranch-hints @gol 876 -mbranch-hints @gol
861 @gccoptlist{-mlong-calls -mno-long-calls -mep -mno-ep @gol 888 @gccoptlist{-mlong-calls -mno-long-calls -mep -mno-ep @gol
862 -mprolog-function -mno-prolog-function -mspace @gol 889 -mprolog-function -mno-prolog-function -mspace @gol
863 -mtda=@var{n} -msda=@var{n} -mzda=@var{n} @gol 890 -mtda=@var{n} -msda=@var{n} -mzda=@var{n} @gol
864 -mapp-regs -mno-app-regs @gol 891 -mapp-regs -mno-app-regs @gol
865 -mdisable-callt -mno-disable-callt @gol 892 -mdisable-callt -mno-disable-callt @gol
866 -mv850e1 @gol 893 -mv850e2v3 @gol
894 -mv850e2 @gol
895 -mv850e1 -mv850es @gol
867 -mv850e @gol 896 -mv850e @gol
868 -mv850 -mbig-switch} 897 -mv850 -mbig-switch}
869 898
870 @emph{VAX Options} 899 @emph{VAX Options}
871 @gccoptlist{-mg -mgnu -munix} 900 @gccoptlist{-mg -mgnu -munix}
877 @emph{x86-64 Options} 906 @emph{x86-64 Options}
878 See i386 and x86-64 Options. 907 See i386 and x86-64 Options.
879 908
880 @emph{i386 and x86-64 Windows Options} 909 @emph{i386 and x86-64 Windows Options}
881 @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll 910 @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll
882 -mnop-fun-dllimport -mthread -municode -mwin32 -mwindows 911 -mnop-fun-dllimport -mthread @gol
883 -fno-set-stack-executable} 912 -municode -mwin32 -mwindows -fno-set-stack-executable}
884 913
885 @emph{Xstormy16 Options} 914 @emph{Xstormy16 Options}
886 @gccoptlist{-msim} 915 @gccoptlist{-msim}
887 916
888 @emph{Xtensa Options} 917 @emph{Xtensa Options}
889 @gccoptlist{-mconst16 -mno-const16 @gol 918 @gccoptlist{-mconst16 -mno-const16 @gol
890 -mfused-madd -mno-fused-madd @gol 919 -mfused-madd -mno-fused-madd @gol
920 -mforce-no-pic @gol
891 -mserialize-volatile -mno-serialize-volatile @gol 921 -mserialize-volatile -mno-serialize-volatile @gol
892 -mtext-section-literals -mno-text-section-literals @gol 922 -mtext-section-literals -mno-text-section-literals @gol
893 -mtarget-align -mno-target-align @gol 923 -mtarget-align -mno-target-align @gol
894 -mlongcalls -mno-longcalls} 924 -mlongcalls -mno-longcalls}
895 925
911 -frecord-gcc-switches @gol 941 -frecord-gcc-switches @gol
912 -freg-struct-return -fshort-enums @gol 942 -freg-struct-return -fshort-enums @gol
913 -fshort-double -fshort-wchar @gol 943 -fshort-double -fshort-wchar @gol
914 -fverbose-asm -fpack-struct[=@var{n}] -fstack-check @gol 944 -fverbose-asm -fpack-struct[=@var{n}] -fstack-check @gol
915 -fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol 945 -fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol
916 -fno-stack-limit @gol 946 -fno-stack-limit -fsplit-stack @gol
917 -fleading-underscore -ftls-model=@var{model} @gol 947 -fleading-underscore -ftls-model=@var{model} @gol
918 -ftrapv -fwrapv -fbounds-check @gol 948 -ftrapv -fwrapv -fbounds-check @gol
919 -fvisibility} 949 -fvisibility -fstrict-volatile-bitfields}
920 @end table 950 @end table
921 951
922 @menu 952 @menu
923 * Overall Options:: Controlling the kind of output: 953 * Overall Options:: Controlling the kind of output:
924 an executable, object files, assembler files, 954 an executable, object files, assembler files,
983 @item @var{file}.mii 1013 @item @var{file}.mii
984 Objective-C++ source code which should not be preprocessed. 1014 Objective-C++ source code which should not be preprocessed.
985 1015
986 @item @var{file}.h 1016 @item @var{file}.h
987 C, C++, Objective-C or Objective-C++ header file to be turned into a 1017 C, C++, Objective-C or Objective-C++ header file to be turned into a
988 precompiled header. 1018 precompiled header (default), or C, C++ header file to be turned into an
1019 Ada spec (via the @option{-fdump-ada-spec} switch).
989 1020
990 @item @var{file}.cc 1021 @item @var{file}.cc
991 @itemx @var{file}.cp 1022 @itemx @var{file}.cp
992 @itemx @var{file}.cxx 1023 @itemx @var{file}.cxx
993 @itemx @var{file}.cpp 1024 @itemx @var{file}.cpp
1011 @itemx @var{file}.hxx 1042 @itemx @var{file}.hxx
1012 @itemx @var{file}.hpp 1043 @itemx @var{file}.hpp
1013 @itemx @var{file}.HPP 1044 @itemx @var{file}.HPP
1014 @itemx @var{file}.h++ 1045 @itemx @var{file}.h++
1015 @itemx @var{file}.tcc 1046 @itemx @var{file}.tcc
1016 C++ header file to be turned into a precompiled header. 1047 C++ header file to be turned into a precompiled header or Ada spec.
1017 1048
1018 @item @var{file}.f 1049 @item @var{file}.f
1019 @itemx @var{file}.for 1050 @itemx @var{file}.for
1020 @itemx @var{file}.ftn 1051 @itemx @var{file}.ftn
1021 Fixed form Fortran source code which should not be preprocessed. 1052 Fixed form Fortran source code which should not be preprocessed.
1039 @itemx @var{file}.F03 1070 @itemx @var{file}.F03
1040 @itemx @var{file}.F08 1071 @itemx @var{file}.F08
1041 Free form Fortran source code which must be preprocessed (with the 1072 Free form Fortran source code which must be preprocessed (with the
1042 traditional preprocessor). 1073 traditional preprocessor).
1043 1074
1075 @item @var{file}.go
1076 Go source code.
1077
1044 @c FIXME: Descriptions of Java file types. 1078 @c FIXME: Descriptions of Java file types.
1045 @c @var{file}.java 1079 @c @var{file}.java
1046 @c @var{file}.class 1080 @c @var{file}.class
1047 @c @var{file}.zip 1081 @c @var{file}.zip
1048 @c @var{file}.jar 1082 @c @var{file}.jar
1085 Specify explicitly the @var{language} for the following input files 1119 Specify explicitly the @var{language} for the following input files
1086 (rather than letting the compiler choose a default based on the file 1120 (rather than letting the compiler choose a default based on the file
1087 name suffix). This option applies to all following input files until 1121 name suffix). This option applies to all following input files until
1088 the next @option{-x} option. Possible values for @var{language} are: 1122 the next @option{-x} option. Possible values for @var{language} are:
1089 @smallexample 1123 @smallexample
1090 c c-header c-cpp-output 1124 c c-header cpp-output
1091 c++ c++-header c++-cpp-output 1125 c++ c++-header c++-cpp-output
1092 objective-c objective-c-header objective-c-cpp-output 1126 objective-c objective-c-header objective-c-cpp-output
1093 objective-c++ objective-c++-header objective-c++-cpp-output 1127 objective-c++ objective-c++-header objective-c++-cpp-output
1094 assembler assembler-with-cpp 1128 assembler assembler-with-cpp
1095 ada 1129 ada
1096 f77 f77-cpp-input f95 f95-cpp-input 1130 f77 f77-cpp-input f95 f95-cpp-input
1131 go
1097 java 1132 java
1098 @end smallexample 1133 @end smallexample
1099 1134
1100 @item -x none 1135 @item -x none
1101 Turn off any specification of a language, so that subsequent files are 1136 Turn off any specification of a language, so that subsequent files are
1181 Use pipes rather than temporary files for communication between the 1216 Use pipes rather than temporary files for communication between the
1182 various stages of compilation. This fails to work on some systems where 1217 various stages of compilation. This fails to work on some systems where
1183 the assembler is unable to read from a pipe; but the GNU assembler has 1218 the assembler is unable to read from a pipe; but the GNU assembler has
1184 no trouble. 1219 no trouble.
1185 1220
1186 @item -combine
1187 @opindex combine
1188 If you are compiling multiple source files, this option tells the driver
1189 to pass all the source files to the compiler at once (for those
1190 languages for which the compiler can handle this). This will allow
1191 intermodule analysis (IMA) to be performed by the compiler. Currently the only
1192 language for which this is supported is C@. If you pass source files for
1193 multiple languages to the driver, using this option, the driver will invoke
1194 the compiler(s) that support IMA once each, passing each compiler all the
1195 source files appropriate for it. For those languages that do not support
1196 IMA this option will be ignored, and the compiler will be invoked once for
1197 each source file in that language. If you use this option in conjunction
1198 with @option{-save-temps}, the compiler will generate multiple
1199 pre-processed files
1200 (one for each source file), but only one (combined) @file{.o} or
1201 @file{.s} file.
1202
1203 @item --help 1221 @item --help
1204 @opindex help 1222 @opindex help
1205 Print (on the standard output) a description of the command line options 1223 Print (on the standard output) a description of the command line options
1206 understood by @command{gcc}. If the @option{-v} option is also specified 1224 understood by @command{gcc}. If the @option{-v} option is also specified
1207 then @option{--help} will also be passed on to the various processes 1225 then @option{--help} will also be passed on to the various processes
1342 @opindex version 1360 @opindex version
1343 Display the version number and copyrights of the invoked GCC@. 1361 Display the version number and copyrights of the invoked GCC@.
1344 1362
1345 @item -wrapper 1363 @item -wrapper
1346 @opindex wrapper 1364 @opindex wrapper
1347 Invoke all subcommands under a wrapper program. It takes a single 1365 Invoke all subcommands under a wrapper program. The name of the
1348 comma separated list as an argument, which will be used to invoke 1366 wrapper program and its parameters are passed as a comma separated
1349 the wrapper: 1367 list.
1350 1368
1351 @smallexample 1369 @smallexample
1352 gcc -c t.c -wrapper gdb,--args 1370 gcc -c t.c -wrapper gdb,--args
1353 @end smallexample 1371 @end smallexample
1354 1372
1355 This will invoke all subprograms of gcc under "gdb --args", 1373 This will invoke all subprograms of @command{gcc} under
1356 thus cc1 invocation will be "gdb --args cc1 ...". 1374 @samp{gdb --args}, thus the invocation of @command{cc1} will be
1375 @samp{gdb --args cc1 @dots{}}.
1357 1376
1358 @item -fplugin=@var{name}.so 1377 @item -fplugin=@var{name}.so
1359 Load the plugin code in file @var{name}.so, assumed to be a 1378 Load the plugin code in file @var{name}.so, assumed to be a
1360 shared object to be dlopen'd by the compiler. The base name of 1379 shared object to be dlopen'd by the compiler. The base name of
1361 the shared object file is used to identify the plugin for the 1380 the shared object file is used to identify the plugin for the
1365 Plugins API. 1384 Plugins API.
1366 1385
1367 @item -fplugin-arg-@var{name}-@var{key}=@var{value} 1386 @item -fplugin-arg-@var{name}-@var{key}=@var{value}
1368 Define an argument called @var{key} with a value of @var{value} 1387 Define an argument called @var{key} with a value of @var{value}
1369 for the plugin called @var{name}. 1388 for the plugin called @var{name}.
1389
1390 @item -fdump-ada-spec@r{[}-slim@r{]}
1391 For C and C++ source and include files, generate corresponding Ada
1392 specs. @xref{Generating Ada Bindings for C and C++ headers,,, gnat_ugn,
1393 GNAT User's Guide}, which provides detailed documentation on this feature.
1394
1395 @item -fdump-go-spec=@var{file}
1396 For input files in any language, generate corresponding Go
1397 declarations in @var{file}. This generates Go @code{const},
1398 @code{type}, @code{var}, and @code{func} declarations which may be a
1399 useful way to start writing a Go interface to code written in some
1400 other language.
1370 1401
1371 @include @value{srcdir}/../libiberty/at-file.texi 1402 @include @value{srcdir}/../libiberty/at-file.texi
1372 @end table 1403 @end table
1373 1404
1374 @node Invoking G++ 1405 @node Invoking G++
1496 @item c99 1527 @item c99
1497 @itemx c9x 1528 @itemx c9x
1498 @itemx iso9899:1999 1529 @itemx iso9899:1999
1499 @itemx iso9899:199x 1530 @itemx iso9899:199x
1500 ISO C99. Note that this standard is not yet fully supported; see 1531 ISO C99. Note that this standard is not yet fully supported; see
1501 @w{@uref{http://gcc.gnu.org/c99status.html}} for more information. The 1532 @w{@uref{http://gcc.gnu.org/gcc-4.6/c99status.html}} for more information. The
1502 names @samp{c9x} and @samp{iso9899:199x} are deprecated. 1533 names @samp{c9x} and @samp{iso9899:199x} are deprecated.
1503 1534
1504 @item c1x 1535 @item c1x
1505 ISO C1X, the draft of the next revision of the ISO C standard. 1536 ISO C1X, the draft of the next revision of the ISO C standard.
1506 Support is limited and experimental and features enabled by this 1537 Support is limited and experimental and features enabled by this
1657 @xref{Standards,,Language Standards Supported by GCC}, for details of 1688 @xref{Standards,,Language Standards Supported by GCC}, for details of
1658 freestanding and hosted environments. 1689 freestanding and hosted environments.
1659 1690
1660 @item -fopenmp 1691 @item -fopenmp
1661 @opindex fopenmp 1692 @opindex fopenmp
1662 @cindex openmp parallel 1693 @cindex OpenMP parallel
1663 Enable handling of OpenMP directives @code{#pragma omp} in C/C++ and 1694 Enable handling of OpenMP directives @code{#pragma omp} in C/C++ and
1664 @code{!$omp} in Fortran. When @option{-fopenmp} is specified, the 1695 @code{!$omp} in Fortran. When @option{-fopenmp} is specified, the
1665 compiler generates parallel code according to the OpenMP Application 1696 compiler generates parallel code according to the OpenMP Application
1666 Program Interface v3.0 @w{@uref{http://www.openmp.org/}}. This option 1697 Program Interface v3.0 @w{@uref{http://www.openmp.org/}}. This option
1667 implies @option{-pthread}, and thus is only supported on targets that 1698 implies @option{-pthread}, and thus is only supported on targets that
1669 1700
1670 @item -fms-extensions 1701 @item -fms-extensions
1671 @opindex fms-extensions 1702 @opindex fms-extensions
1672 Accept some non-standard constructs used in Microsoft header files. 1703 Accept some non-standard constructs used in Microsoft header files.
1673 1704
1705 In C++ code, this allows member names in structures to be similar
1706 to previous types declarations.
1707
1708 @smallexample
1709 typedef int UOW;
1710 struct ABC @{
1711 UOW UOW;
1712 @};
1713 @end smallexample
1714
1674 Some cases of unnamed fields in structures and unions are only 1715 Some cases of unnamed fields in structures and unions are only
1675 accepted with this option. @xref{Unnamed Fields,,Unnamed struct/union 1716 accepted with this option. @xref{Unnamed Fields,,Unnamed struct/union
1676 fields within structs/unions}, for details. 1717 fields within structs/unions}, for details.
1718
1719 @item -fplan9-extensions
1720 Accept some non-standard constructs used in Plan 9 code.
1721
1722 This enables @option{-fms-extensions}, permits passing pointers to
1723 structures with anonymous fields to functions which expect pointers to
1724 elements of the type of the field, and permits referring to anonymous
1725 fields declared using a typedef. @xref{Unnamed Fields,,Unnamed
1726 struct/union fields within structs/unions}, for details. This is only
1727 supported for C, not C++.
1677 1728
1678 @item -trigraphs 1729 @item -trigraphs
1679 @opindex trigraphs 1730 @opindex trigraphs
1680 Support ISO C trigraphs. The @option{-ansi} option (and @option{-std} 1731 Support ISO C trigraphs. The @option{-ansi} option (and @option{-std}
1681 options for strict ISO C conformance) implies @option{-trigraphs}. 1732 options for strict ISO C conformance) implies @option{-trigraphs}.
1793 Version 3 corrects an error in mangling a constant address as a 1844 Version 3 corrects an error in mangling a constant address as a
1794 template argument. 1845 template argument.
1795 1846
1796 Version 4 implements a standard mangling for vector types. 1847 Version 4 implements a standard mangling for vector types.
1797 1848
1849 Version 5 corrects the mangling of attribute const/volatile on
1850 function pointer types, decltype of a plain decl, and use of a
1851 function parameter in the declaration of another parameter.
1852
1798 See also @option{-Wabi}. 1853 See also @option{-Wabi}.
1799 1854
1800 @item -fno-access-control 1855 @item -fno-access-control
1801 @opindex fno-access-control 1856 @opindex fno-access-control
1802 Turn off all access checking. This switch is mainly useful for working 1857 Turn off all access checking. This switch is mainly useful for working
2268 @opindex Wctor-dtor-privacy 2323 @opindex Wctor-dtor-privacy
2269 @opindex Wno-ctor-dtor-privacy 2324 @opindex Wno-ctor-dtor-privacy
2270 Warn when a class seems unusable because all the constructors or 2325 Warn when a class seems unusable because all the constructors or
2271 destructors in that class are private, and it has neither friends nor 2326 destructors in that class are private, and it has neither friends nor
2272 public static member functions. 2327 public static member functions.
2328
2329 @item -Wnoexcept @r{(C++ and Objective-C++ only)}
2330 @opindex Wnoexcept
2331 @opindex Wno-noexcept
2332 Warn when a noexcept-expression evaluates to false because of a call
2333 to a function that does not have a non-throwing exception
2334 specification (i.e. @samp{throw()} or @samp{noexcept}) but is known by
2335 the compiler to never throw an exception.
2273 2336
2274 @item -Wnon-virtual-dtor @r{(C++ and Objective-C++ only)} 2337 @item -Wnon-virtual-dtor @r{(C++ and Objective-C++ only)}
2275 @opindex Wnon-virtual-dtor 2338 @opindex Wnon-virtual-dtor
2276 @opindex Wno-non-virtual-dtor 2339 @opindex Wno-non-virtual-dtor
2277 Warn when a class has virtual functions and accessible non-virtual 2340 Warn when a class has virtual functions and accessible non-virtual
2380 less vulnerable to unintended effects and much easier to search for. 2443 less vulnerable to unintended effects and much easier to search for.
2381 2444
2382 @item -Woverloaded-virtual @r{(C++ and Objective-C++ only)} 2445 @item -Woverloaded-virtual @r{(C++ and Objective-C++ only)}
2383 @opindex Woverloaded-virtual 2446 @opindex Woverloaded-virtual
2384 @opindex Wno-overloaded-virtual 2447 @opindex Wno-overloaded-virtual
2385 @cindex overloaded virtual fn, warning 2448 @cindex overloaded virtual function, warning
2386 @cindex warning for overloaded virtual fn 2449 @cindex warning for overloaded virtual function
2387 Warn when a function declaration hides virtual functions from a 2450 Warn when a function declaration hides virtual functions from a
2388 base class. For example, in: 2451 base class. For example, in:
2389 2452
2390 @smallexample 2453 @smallexample
2391 struct A @{ 2454 struct A @{
2443 2506
2444 @cindex compiler options, Objective-C and Objective-C++ 2507 @cindex compiler options, Objective-C and Objective-C++
2445 @cindex Objective-C and Objective-C++ options, command line 2508 @cindex Objective-C and Objective-C++ options, command line
2446 @cindex options, Objective-C and Objective-C++ 2509 @cindex options, Objective-C and Objective-C++
2447 (NOTE: This manual does not describe the Objective-C and Objective-C++ 2510 (NOTE: This manual does not describe the Objective-C and Objective-C++
2448 languages themselves. See @xref{Standards,,Language Standards 2511 languages themselves. @xref{Standards,,Language Standards
2449 Supported by GCC}, for references.) 2512 Supported by GCC}, for references.)
2450 2513
2451 This section describes the command-line options that are only meaningful 2514 This section describes the command-line options that are only meaningful
2452 for Objective-C and Objective-C++ programs, but you can also use most of 2515 for Objective-C and Objective-C++ programs, but you can also use most of
2453 the language-independent GNU compiler options. 2516 the language-independent GNU compiler options.
2493 @code{__NEXT_RUNTIME__} is predefined if (and only if) this option is 2556 @code{__NEXT_RUNTIME__} is predefined if (and only if) this option is
2494 used. 2557 used.
2495 2558
2496 @item -fno-nil-receivers 2559 @item -fno-nil-receivers
2497 @opindex fno-nil-receivers 2560 @opindex fno-nil-receivers
2498 Assume that all Objective-C message dispatches (e.g., 2561 Assume that all Objective-C message dispatches (@code{[receiver
2499 @code{[receiver message:arg]}) in this translation unit ensure that the receiver 2562 message:arg]}) in this translation unit ensure that the receiver is
2500 is not @code{nil}. This allows for more efficient entry points in the runtime 2563 not @code{nil}. This allows for more efficient entry points in the
2501 to be used. Currently, this option is only available in conjunction with 2564 runtime to be used. This option is only available in conjunction with
2502 the NeXT runtime on Mac OS X 10.3 and later. 2565 the NeXT runtime and ABI version 0 or 1.
2566
2567 @item -fobjc-abi-version=@var{n}
2568 @opindex fobjc-abi-version
2569 Use version @var{n} of the Objective-C ABI for the selected runtime.
2570 This option is currently supported only for the NeXT runtime. In that
2571 case, Version 0 is the traditional (32-bit) ABI without support for
2572 properties and other Objective-C 2.0 additions. Version 1 is the
2573 traditional (32-bit) ABI with support for properties and other
2574 Objective-C 2.0 additions. Version 2 is the modern (64-bit) ABI. If
2575 nothing is specified, the default is Version 0 on 32-bit target
2576 machines, and Version 2 on 64-bit target machines.
2503 2577
2504 @item -fobjc-call-cxx-cdtors 2578 @item -fobjc-call-cxx-cdtors
2505 @opindex fobjc-call-cxx-cdtors 2579 @opindex fobjc-call-cxx-cdtors
2506 For each Objective-C class, check if any of its instance variables is a 2580 For each Objective-C class, check if any of its instance variables is a
2507 C++ object with a non-trivial default constructor. If so, synthesize a 2581 C++ object with a non-trivial default constructor. If so, synthesize a
2510 and then return @code{self}. Similarly, check if any instance variable 2584 and then return @code{self}. Similarly, check if any instance variable
2511 is a C++ object with a non-trivial destructor, and if so, synthesize a 2585 is a C++ object with a non-trivial destructor, and if so, synthesize a
2512 special @code{- (void) .cxx_destruct} method that will run 2586 special @code{- (void) .cxx_destruct} method that will run
2513 all such default destructors, in reverse order. 2587 all such default destructors, in reverse order.
2514 2588
2515 The @code{- (id) .cxx_construct} and/or @code{- (void) .cxx_destruct} methods 2589 The @code{- (id) .cxx_construct} and @code{- (void) .cxx_destruct}
2516 thusly generated will only operate on instance variables declared in the 2590 methods thusly generated will only operate on instance variables
2517 current Objective-C class, and not those inherited from superclasses. It 2591 declared in the current Objective-C class, and not those inherited
2518 is the responsibility of the Objective-C runtime to invoke all such methods 2592 from superclasses. It is the responsibility of the Objective-C
2519 in an object's inheritance hierarchy. The @code{- (id) .cxx_construct} methods 2593 runtime to invoke all such methods in an object's inheritance
2520 will be invoked by the runtime immediately after a new object 2594 hierarchy. The @code{- (id) .cxx_construct} methods will be invoked
2521 instance is allocated; the @code{- (void) .cxx_destruct} methods will 2595 by the runtime immediately after a new object instance is allocated;
2522 be invoked immediately before the runtime deallocates an object instance. 2596 the @code{- (void) .cxx_destruct} methods will be invoked immediately
2597 before the runtime deallocates an object instance.
2523 2598
2524 As of this writing, only the NeXT runtime on Mac OS X 10.4 and later has 2599 As of this writing, only the NeXT runtime on Mac OS X 10.4 and later has
2525 support for invoking the @code{- (id) .cxx_construct} and 2600 support for invoking the @code{- (id) .cxx_construct} and
2526 @code{- (void) .cxx_destruct} methods. 2601 @code{- (void) .cxx_destruct} methods.
2527 2602
2530 Allow fast jumps to the message dispatcher. On Darwin this is 2605 Allow fast jumps to the message dispatcher. On Darwin this is
2531 accomplished via the comm page. 2606 accomplished via the comm page.
2532 2607
2533 @item -fobjc-exceptions 2608 @item -fobjc-exceptions
2534 @opindex fobjc-exceptions 2609 @opindex fobjc-exceptions
2535 Enable syntactic support for structured exception handling in Objective-C, 2610 Enable syntactic support for structured exception handling in
2536 similar to what is offered by C++ and Java. This option is 2611 Objective-C, similar to what is offered by C++ and Java. This option
2537 unavailable in conjunction with the NeXT runtime on Mac OS X 10.2 and 2612 is required to use the Objective-C keywords @code{@@try},
2538 earlier. 2613 @code{@@throw}, @code{@@catch}, @code{@@finally} and
2539 2614 @code{@@synchronized}. This option is available with both the GNU
2540 @smallexample 2615 runtime and the NeXT runtime (but not available in conjunction with
2541 @@try @{ 2616 the NeXT runtime on Mac OS X 10.2 and earlier).
2542 @dots{}
2543 @@throw expr;
2544 @dots{}
2545 @}
2546 @@catch (AnObjCClass *exc) @{
2547 @dots{}
2548 @@throw expr;
2549 @dots{}
2550 @@throw;
2551 @dots{}
2552 @}
2553 @@catch (AnotherClass *exc) @{
2554 @dots{}
2555 @}
2556 @@catch (id allOthers) @{
2557 @dots{}
2558 @}
2559 @@finally @{
2560 @dots{}
2561 @@throw expr;
2562 @dots{}
2563 @}
2564 @end smallexample
2565
2566 The @code{@@throw} statement may appear anywhere in an Objective-C or
2567 Objective-C++ program; when used inside of a @code{@@catch} block, the
2568 @code{@@throw} may appear without an argument (as shown above), in which case
2569 the object caught by the @code{@@catch} will be rethrown.
2570
2571 Note that only (pointers to) Objective-C objects may be thrown and
2572 caught using this scheme. When an object is thrown, it will be caught
2573 by the nearest @code{@@catch} clause capable of handling objects of that type,
2574 analogously to how @code{catch} blocks work in C++ and Java. A
2575 @code{@@catch(id @dots{})} clause (as shown above) may also be provided to catch
2576 any and all Objective-C exceptions not caught by previous @code{@@catch}
2577 clauses (if any).
2578
2579 The @code{@@finally} clause, if present, will be executed upon exit from the
2580 immediately preceding @code{@@try @dots{} @@catch} section. This will happen
2581 regardless of whether any exceptions are thrown, caught or rethrown
2582 inside the @code{@@try @dots{} @@catch} section, analogously to the behavior
2583 of the @code{finally} clause in Java.
2584
2585 There are several caveats to using the new exception mechanism:
2586
2587 @itemize @bullet
2588 @item
2589 Although currently designed to be binary compatible with @code{NS_HANDLER}-style
2590 idioms provided by the @code{NSException} class, the new
2591 exceptions can only be used on Mac OS X 10.3 (Panther) and later
2592 systems, due to additional functionality needed in the (NeXT) Objective-C
2593 runtime.
2594
2595 @item
2596 As mentioned above, the new exceptions do not support handling
2597 types other than Objective-C objects. Furthermore, when used from
2598 Objective-C++, the Objective-C exception model does not interoperate with C++
2599 exceptions at this time. This means you cannot @code{@@throw} an exception
2600 from Objective-C and @code{catch} it in C++, or vice versa
2601 (i.e., @code{throw @dots{} @@catch}).
2602 @end itemize
2603
2604 The @option{-fobjc-exceptions} switch also enables the use of synchronization
2605 blocks for thread-safe execution:
2606
2607 @smallexample
2608 @@synchronized (ObjCClass *guard) @{
2609 @dots{}
2610 @}
2611 @end smallexample
2612
2613 Upon entering the @code{@@synchronized} block, a thread of execution shall
2614 first check whether a lock has been placed on the corresponding @code{guard}
2615 object by another thread. If it has, the current thread shall wait until
2616 the other thread relinquishes its lock. Once @code{guard} becomes available,
2617 the current thread will place its own lock on it, execute the code contained in
2618 the @code{@@synchronized} block, and finally relinquish the lock (thereby
2619 making @code{guard} available to other threads).
2620
2621 Unlike Java, Objective-C does not allow for entire methods to be marked
2622 @code{@@synchronized}. Note that throwing exceptions out of
2623 @code{@@synchronized} blocks is allowed, and will cause the guarding object
2624 to be unlocked properly.
2625 2617
2626 @item -fobjc-gc 2618 @item -fobjc-gc
2627 @opindex fobjc-gc 2619 @opindex fobjc-gc
2628 Enable garbage collection (GC) in Objective-C and Objective-C++ programs. 2620 Enable garbage collection (GC) in Objective-C and Objective-C++
2621 programs. This option is only available with the NeXT runtime; the
2622 GNU runtime has a different garbage collection implementation that
2623 does not require special compiler flags.
2624
2625 @item -fobjc-nilcheck
2626 @opindex fobjc-nilcheck
2627 For the NeXT runtime with version 2 of the ABI, check for a nil
2628 receiver in method invocations before doing the actual method call.
2629 This is the default and can be disabled using
2630 @option{-fno-objc-nilcheck}. Class methods and super calls are never
2631 checked for nil in this way no matter what this flag is set to.
2632 Currently this flag does nothing when the GNU runtime, or an older
2633 version of the NeXT runtime ABI, is used.
2634
2635 @item -fobjc-std=objc1
2636 @opindex fobjc-std
2637 Conform to the language syntax of Objective-C 1.0, the language
2638 recognized by GCC 4.0. This only affects the Objective-C additions to
2639 the C/C++ language; it does not affect conformance to C/C++ standards,
2640 which is controlled by the separate C/C++ dialect option flags. When
2641 this option is used with the Objective-C or Objective-C++ compiler,
2642 any Objective-C syntax that is not recognized by GCC 4.0 is rejected.
2643 This is useful if you need to make sure that your Objective-C code can
2644 be compiled with older versions of GCC.
2629 2645
2630 @item -freplace-objc-classes 2646 @item -freplace-objc-classes
2631 @opindex freplace-objc-classes 2647 @opindex freplace-objc-classes
2632 Emit a special marker instructing @command{ld(1)} not to statically link in 2648 Emit a special marker instructing @command{ld(1)} not to statically link in
2633 the resulting object file, and allow @command{dyld(1)} to load it in at 2649 the resulting object file, and allow @command{dyld(1)} to load it in at
2645 compile time) with static class references that get initialized at load time, 2661 compile time) with static class references that get initialized at load time,
2646 which improves run-time performance. Specifying the @option{-fzero-link} flag 2662 which improves run-time performance. Specifying the @option{-fzero-link} flag
2647 suppresses this behavior and causes calls to @code{objc_getClass("@dots{}")} 2663 suppresses this behavior and causes calls to @code{objc_getClass("@dots{}")}
2648 to be retained. This is useful in Zero-Link debugging mode, since it allows 2664 to be retained. This is useful in Zero-Link debugging mode, since it allows
2649 for individual class implementations to be modified during program execution. 2665 for individual class implementations to be modified during program execution.
2666 The GNU runtime currently always retains calls to @code{objc_get_class("@dots{}")}
2667 regardless of command line options.
2650 2668
2651 @item -gen-decls 2669 @item -gen-decls
2652 @opindex gen-decls 2670 @opindex gen-decls
2653 Dump interface declarations for all classes seen in the source file to a 2671 Dump interface declarations for all classes seen in the source file to a
2654 file named @file{@var{sourcename}.decl}. 2672 file named @file{@var{sourcename}.decl}.
2751 Only meaningful in line-wrapping mode. Instructs the diagnostic 2769 Only meaningful in line-wrapping mode. Instructs the diagnostic
2752 messages reporter to emit the same source location information (as 2770 messages reporter to emit the same source location information (as
2753 prefix) for physical lines that result from the process of breaking 2771 prefix) for physical lines that result from the process of breaking
2754 a message which is too long to fit on a single line. 2772 a message which is too long to fit on a single line.
2755 2773
2756 @item -fdiagnostics-show-option 2774 @item -fno-diagnostics-show-option
2775 @opindex fno-diagnostics-show-option
2757 @opindex fdiagnostics-show-option 2776 @opindex fdiagnostics-show-option
2758 This option instructs the diagnostic machinery to add text to each 2777 By default, each diagnostic emitted includes text which indicates the
2759 diagnostic emitted, which indicates which command line option directly 2778 command line option that directly controls the diagnostic (if such an
2760 controls that diagnostic, when such an option is known to the 2779 option is known to the diagnostic machinery). Specifying the
2761 diagnostic machinery. 2780 @option{-fno-diagnostics-show-option} flag suppresses that behavior.
2762 2781
2763 @item -Wcoverage-mismatch 2782 @item -Wcoverage-mismatch
2764 @opindex Wcoverage-mismatch 2783 @opindex Wcoverage-mismatch
2765 Warn if feedback profiles do not match when using the 2784 Warn if feedback profiles do not match when using the
2766 @option{-fprofile-use} option. 2785 @option{-fprofile-use} option.
2795 @cindex syntax checking 2814 @cindex syntax checking
2796 @item -fsyntax-only 2815 @item -fsyntax-only
2797 @opindex fsyntax-only 2816 @opindex fsyntax-only
2798 Check the code for syntax errors, but don't do anything beyond that. 2817 Check the code for syntax errors, but don't do anything beyond that.
2799 2818
2819 @item -fmax-errors=@var{n}
2820 @opindex fmax-errors
2821 Limits the maximum number of error messages to @var{n}, at which point
2822 GCC bails out rather than attempting to continue processing the source
2823 code. If @var{n} is 0 (the default), there is no limit on the number
2824 of error messages produced. If @option{-Wfatal-errors} is also
2825 specified, then @option{-Wfatal-errors} takes precedence over this
2826 option.
2827
2800 @item -w 2828 @item -w
2801 @opindex w 2829 @opindex w
2802 Inhibit all warning messages. 2830 Inhibit all warning messages.
2803 2831
2804 @item -Werror 2832 @item -Werror
2813 is appended, for example @option{-Werror=switch} turns the warnings 2841 is appended, for example @option{-Werror=switch} turns the warnings
2814 controlled by @option{-Wswitch} into errors. This switch takes a 2842 controlled by @option{-Wswitch} into errors. This switch takes a
2815 negative form, to be used to negate @option{-Werror} for specific 2843 negative form, to be used to negate @option{-Werror} for specific
2816 warnings, for example @option{-Wno-error=switch} makes 2844 warnings, for example @option{-Wno-error=switch} makes
2817 @option{-Wswitch} warnings not be errors, even when @option{-Werror} 2845 @option{-Wswitch} warnings not be errors, even when @option{-Werror}
2818 is in effect. You can use the @option{-fdiagnostics-show-option} 2846 is in effect.
2819 option to have each controllable warning amended with the option which 2847
2820 controls it, to determine what to use with this option. 2848 The warning message for each controllable warning includes the
2849 option which controls the warning. That option can then be used with
2850 @option{-Werror=} and @option{-Wno-error=} as described above.
2851 (Printing of the option in the warning message can be disabled using the
2852 @option{-fno-diagnostics-show-option} flag.)
2821 2853
2822 Note that specifying @option{-Werror=}@var{foo} automatically implies 2854 Note that specifying @option{-Werror=}@var{foo} automatically implies
2823 @option{-W}@var{foo}. However, @option{-Wno-error=}@var{foo} does not 2855 @option{-W}@var{foo}. However, @option{-Wno-error=}@var{foo} does not
2824 imply anything. 2856 imply anything.
2825 2857
2839 example, @option{-Wno-implicit}. This manual lists only one of the 2871 example, @option{-Wno-implicit}. This manual lists only one of the
2840 two forms, whichever is not the default. For further, 2872 two forms, whichever is not the default. For further,
2841 language-specific options also refer to @ref{C++ Dialect Options} and 2873 language-specific options also refer to @ref{C++ Dialect Options} and
2842 @ref{Objective-C and Objective-C++ Dialect Options}. 2874 @ref{Objective-C and Objective-C++ Dialect Options}.
2843 2875
2844 When an unrecognized warning label is requested (e.g., 2876 When an unrecognized warning option is requested (e.g.,
2845 @option{-Wunknown-warning}), GCC will emit a diagnostic stating 2877 @option{-Wunknown-warning}), GCC will emit a diagnostic stating
2846 that the option is not recognized. However, if the @samp{-Wno-} form 2878 that the option is not recognized. However, if the @option{-Wno-} form
2847 is used, the behavior is slightly different: No diagnostic will be 2879 is used, the behavior is slightly different: No diagnostic will be
2848 produced for @option{-Wno-unknown-warning} unless other diagnostics 2880 produced for @option{-Wno-unknown-warning} unless other diagnostics
2849 are being produced. This allows the use of new @option{-Wno-} options 2881 are being produced. This allows the use of new @option{-Wno-} options
2850 with old compilers, but if something goes wrong, the compiler will 2882 with old compilers, but if something goes wrong, the compiler will
2851 warn that an unrecognized option was used. 2883 warn that an unrecognized option was used.
3016 @item -Wno-cpp \ 3048 @item -Wno-cpp \
3017 @r{(C, Objective-C, C++, Objective-C++ and Fortran only)} 3049 @r{(C, Objective-C, C++, Objective-C++ and Fortran only)}
3018 3050
3019 Suppress warning messages emitted by @code{#warning} directives. 3051 Suppress warning messages emitted by @code{#warning} directives.
3020 3052
3053 @item -Wdouble-promotion @r{(C, C++, Objective-C and Objective-C++ only)}
3054 @opindex Wdouble-promotion
3055 @opindex Wno-double-promotion
3056 Give a warning when a value of type @code{float} is implicitly
3057 promoted to @code{double}. CPUs with a 32-bit ``single-precision''
3058 floating-point unit implement @code{float} in hardware, but emulate
3059 @code{double} in software. On such a machine, doing computations
3060 using @code{double} values is much more expensive because of the
3061 overhead required for software emulation.
3062
3063 It is easy to accidentally do computations with @code{double} because
3064 floating-point literals are implicitly of type @code{double}. For
3065 example, in:
3066 @smallexample
3067 @group
3068 float area(float radius)
3069 @{
3070 return 3.14159 * radius * radius;
3071 @}
3072 @end group
3073 @end smallexample
3074 the compiler will perform the entire computation with @code{double}
3075 because the floating-point literal is a @code{double}.
3076
3021 @item -Wformat 3077 @item -Wformat
3022 @opindex Wformat 3078 @opindex Wformat
3023 @opindex Wno-format 3079 @opindex Wno-format
3024 @opindex ffreestanding 3080 @opindex ffreestanding
3025 @opindex fno-builtin 3081 @opindex fno-builtin
3254 @} 3310 @}
3255 @} 3311 @}
3256 @end group 3312 @end group
3257 @end smallexample 3313 @end smallexample
3258 3314
3315 Also warn for dangerous uses of the
3316 ?: with omitted middle operand GNU extension. When the condition
3317 in the ?: operator is a boolean expression the omitted value will
3318 be always 1. Often the user expects it to be a value computed
3319 inside the conditional expression instead.
3320
3259 This warning is enabled by @option{-Wall}. 3321 This warning is enabled by @option{-Wall}.
3260 3322
3261 @item -Wsequence-point 3323 @item -Wsequence-point
3262 @opindex Wsequence-point 3324 @opindex Wsequence-point
3263 @opindex Wno-sequence-point 3325 @opindex Wno-sequence-point
3298 3360
3299 The standard is worded confusingly, therefore there is some debate 3361 The standard is worded confusingly, therefore there is some debate
3300 over the precise meaning of the sequence point rules in subtle cases. 3362 over the precise meaning of the sequence point rules in subtle cases.
3301 Links to discussions of the problem, including proposed formal 3363 Links to discussions of the problem, including proposed formal
3302 definitions, may be found on the GCC readings page, at 3364 definitions, may be found on the GCC readings page, at
3303 @w{@uref{http://gcc.gnu.org/readings.html}}. 3365 @uref{http://gcc.gnu.org/@/readings.html}.
3304 3366
3305 This warning is enabled by @option{-Wall} for C and C++. 3367 This warning is enabled by @option{-Wall} for C and C++.
3306 3368
3307 @item -Wreturn-type 3369 @item -Wreturn-type
3308 @opindex Wreturn-type 3370 @opindex Wreturn-type
3642 highest warning level because this simplification applies to many 3704 highest warning level because this simplification applies to many
3643 comparisons, so this warning level will give a very large number of 3705 comparisons, so this warning level will give a very large number of
3644 false positives. 3706 false positives.
3645 @end table 3707 @end table
3646 3708
3647 @item -Wsuggest-attribute=@r{[}const@r{|}pure@r{]} 3709 @item -Wsuggest-attribute=@r{[}pure@r{|}const@r{|}noreturn@r{]}
3648 @opindex Wsuggest-attribute= 3710 @opindex Wsuggest-attribute=
3649 @opindex Wno-suggest-attribute= 3711 @opindex Wno-suggest-attribute=
3650 Warn for cases where adding an attribute may be beneficial. The 3712 Warn for cases where adding an attribute may be beneficial. The
3651 attributes currently supported are listed below. 3713 attributes currently supported are listed below.
3652 3714
3653 @table @gcctabopt 3715 @table @gcctabopt
3654 @item -Wsuggest-attribute=pure 3716 @item -Wsuggest-attribute=pure
3655 @itemx -Wsuggest-attribute=const 3717 @itemx -Wsuggest-attribute=const
3718 @itemx -Wsuggest-attribute=noreturn
3656 @opindex Wsuggest-attribute=pure 3719 @opindex Wsuggest-attribute=pure
3657 @opindex Wno-suggest-attribute=pure 3720 @opindex Wno-suggest-attribute=pure
3658 @opindex Wsuggest-attribute=const 3721 @opindex Wsuggest-attribute=const
3659 @opindex Wno-suggest-attribute=const 3722 @opindex Wno-suggest-attribute=const
3723 @opindex Wsuggest-attribute=noreturn
3724 @opindex Wno-suggest-attribute=noreturn
3660 3725
3661 Warn about functions which might be candidates for attributes 3726 Warn about functions which might be candidates for attributes
3662 @code{pure} or @code{const}. The compiler only warns for functions 3727 @code{pure}, @code{const} or @code{noreturn}. The compiler only warns for
3663 visible in other compilation units or if it cannot prove that the 3728 functions visible in other compilation units or (in the case of @code{pure} and
3664 function returns normally. A function returns normally if it doesn't 3729 @code{const}) if it cannot prove that the function returns normally. A function
3665 contain an infinite loop nor returns abnormally by throwing, calling 3730 returns normally if it doesn't contain an infinite loop nor returns abnormally
3666 @code{abort()} or trapping. This analysis requires option 3731 by throwing, calling @code{abort()} or trapping. This analysis requires option
3667 @option{-fipa-pure-const}, which is enabled by default at @option{-O} 3732 @option{-fipa-pure-const}, which is enabled by default at @option{-O} and
3668 and higher. Higher optimization levels improve the accuracy of the 3733 higher. Higher optimization levels improve the accuracy of the analysis.
3669 analysis.
3670 @end table 3734 @end table
3671 3735
3672 @item -Warray-bounds 3736 @item -Warray-bounds
3673 @opindex Wno-array-bounds 3737 @opindex Wno-array-bounds
3674 @opindex Warray-bounds 3738 @opindex Warray-bounds
3695 GCC to emit warnings from system headers as if they occurred in user 3759 GCC to emit warnings from system headers as if they occurred in user
3696 code. However, note that using @option{-Wall} in conjunction with this 3760 code. However, note that using @option{-Wall} in conjunction with this
3697 option will @emph{not} warn about unknown pragmas in system 3761 option will @emph{not} warn about unknown pragmas in system
3698 headers---for that, @option{-Wunknown-pragmas} must also be used. 3762 headers---for that, @option{-Wunknown-pragmas} must also be used.
3699 3763
3764 @item -Wtrampolines
3765 @opindex Wtrampolines
3766 @opindex Wno-trampolines
3767 Warn about trampolines generated for pointers to nested functions.
3768
3769 A trampoline is a small piece of data or code that is created at run
3770 time on the stack when the address of a nested function is taken, and
3771 is used to call the nested function indirectly. For some targets, it
3772 is made up of data only and thus requires no special treatment. But,
3773 for most targets, it is made up of code and thus requires the stack
3774 to be made executable in order for the program to work properly.
3775
3700 @item -Wfloat-equal 3776 @item -Wfloat-equal
3701 @opindex Wfloat-equal 3777 @opindex Wfloat-equal
3702 @opindex Wno-float-equal 3778 @opindex Wno-float-equal
3703 Warn if floating point values are used in equality comparisons. 3779 Warn if floating point values are used in equality comparisons.
3704 3780
3830 Do not warn whenever an @samp{#else} or an @samp{#endif} are followed by text. 3906 Do not warn whenever an @samp{#else} or an @samp{#endif} are followed by text.
3831 3907
3832 @item -Wshadow 3908 @item -Wshadow
3833 @opindex Wshadow 3909 @opindex Wshadow
3834 @opindex Wno-shadow 3910 @opindex Wno-shadow
3835 Warn whenever a local variable shadows another local variable, parameter or 3911 Warn whenever a local variable or type declaration shadows another variable,
3836 global variable or whenever a built-in function is shadowed. 3912 parameter, type, or class member (in C++), or whenever a built-in function
3913 is shadowed. Note that in C++, the compiler will not warn if a local variable
3914 shadows a struct/class/enum, but will warn if it shadows an explicit typedef.
3837 3915
3838 @item -Wlarger-than=@var{len} 3916 @item -Wlarger-than=@var{len}
3839 @opindex Wlarger-than=@var{len} 3917 @opindex Wlarger-than=@var{len}
3840 @opindex Wlarger-than-@var{len} 3918 @opindex Wlarger-than-@var{len}
3841 Warn whenever an object of larger than @var{len} bytes is defined. 3919 Warn whenever an object of larger than @var{len} bytes is defined.
4141 @end smallexample 4219 @end smallexample
4142 4220
4143 This warning is included in @option{-Wextra}. To get other @option{-Wextra} 4221 This warning is included in @option{-Wextra}. To get other @option{-Wextra}
4144 warnings without this one, use @samp{-Wextra -Wno-missing-field-initializers}. 4222 warnings without this one, use @samp{-Wextra -Wno-missing-field-initializers}.
4145 4223
4146 @item -Wmissing-noreturn
4147 @opindex Wmissing-noreturn
4148 @opindex Wno-missing-noreturn
4149 Warn about functions which might be candidates for attribute @code{noreturn}.
4150 Note these are only possible candidates, not absolute ones. Care should
4151 be taken to manually verify functions actually do not ever return before
4152 adding the @code{noreturn} attribute, otherwise subtle code generation
4153 bugs could be introduced. You will not get a warning for @code{main} in
4154 hosted C environments.
4155
4156 @item -Wmissing-format-attribute 4224 @item -Wmissing-format-attribute
4157 @opindex Wmissing-format-attribute 4225 @opindex Wmissing-format-attribute
4158 @opindex Wno-missing-format-attribute 4226 @opindex Wno-missing-format-attribute
4159 @opindex Wformat 4227 @opindex Wformat
4160 @opindex Wno-format 4228 @opindex Wno-format
4703 4771
4704 This option is a detailed version of 4772 This option is a detailed version of
4705 @option{-femit-struct-debug-reduced} and @option{-femit-struct-debug-baseonly}, 4773 @option{-femit-struct-debug-reduced} and @option{-femit-struct-debug-baseonly},
4706 which will serve for most needs. 4774 which will serve for most needs.
4707 4775
4708 A specification has the syntax 4776 A specification has the syntax@*
4709 [@samp{dir:}|@samp{ind:}][@samp{ord:}|@samp{gen:}](@samp{any}|@samp{sys}|@samp{base}|@samp{none}) 4777 [@samp{dir:}|@samp{ind:}][@samp{ord:}|@samp{gen:}](@samp{any}|@samp{sys}|@samp{base}|@samp{none})
4710 4778
4711 The optional first word limits the specification to 4779 The optional first word limits the specification to
4712 structs that are used directly (@samp{dir:}) or used indirectly (@samp{ind:}). 4780 structs that are used directly (@samp{dir:}) or used indirectly (@samp{ind:}).
4713 A struct type is used directly when it is the type of a variable, member. 4781 A struct type is used directly when it is the type of a variable, member.
4802 @opindex fpre-ipa-mem-report 4870 @opindex fpre-ipa-mem-report
4803 @item -fpost-ipa-mem-report 4871 @item -fpost-ipa-mem-report
4804 @opindex fpost-ipa-mem-report 4872 @opindex fpost-ipa-mem-report
4805 Makes the compiler print some statistics about permanent memory 4873 Makes the compiler print some statistics about permanent memory
4806 allocation before or after interprocedural optimization. 4874 allocation before or after interprocedural optimization.
4875
4876 @item -fstack-usage
4877 @opindex fstack-usage
4878 Makes the compiler output stack usage information for the program, on a
4879 per-function basis. The filename for the dump is made by appending
4880 @file{.su} to the @var{auxname}. @var{auxname} is generated from the name of
4881 the output file, if explicitly specified and it is not an executable,
4882 otherwise it is the basename of the source file. An entry is made up
4883 of three fields:
4884
4885 @itemize
4886 @item
4887 The name of the function.
4888 @item
4889 A number of bytes.
4890 @item
4891 One or more qualifiers: @code{static}, @code{dynamic}, @code{bounded}.
4892 @end itemize
4893
4894 The qualifier @code{static} means that the function manipulates the stack
4895 statically: a fixed number of bytes are allocated for the frame on function
4896 entry and released on function exit; no stack adjustments are otherwise made
4897 in the function. The second field is this fixed number of bytes.
4898
4899 The qualifier @code{dynamic} means that the function manipulates the stack
4900 dynamically: in addition to the static allocation described above, stack
4901 adjustments are made in the body of the function, for example to push/pop
4902 arguments around function calls. If the qualifier @code{bounded} is also
4903 present, the amount of these adjustments is bounded at compile-time and
4904 the second field is an upper bound of the total amount of stack used by
4905 the function. If it is not present, the amount of these adjustments is
4906 not bounded at compile-time and the second field only represents the
4907 bounded part.
4807 4908
4808 @item -fprofile-arcs 4909 @item -fprofile-arcs
4809 @opindex fprofile-arcs 4910 @opindex fprofile-arcs
4810 Add code so that program flow @dfn{arcs} are instrumented. During 4911 Add code so that program flow @dfn{arcs} are instrumented. During
4811 execution the program records how many times each branch and call is 4912 execution the program records how many times each branch and call is
4882 generate test coverage data. Coverage data will match the source files 4983 generate test coverage data. Coverage data will match the source files
4883 more closely, if you do not optimize. 4984 more closely, if you do not optimize.
4884 4985
4885 @item -fdbg-cnt-list 4986 @item -fdbg-cnt-list
4886 @opindex fdbg-cnt-list 4987 @opindex fdbg-cnt-list
4887 Print the name and the counter upperbound for all debug counters. 4988 Print the name and the counter upper bound for all debug counters.
4888 4989
4889 @item -fdbg-cnt=@var{counter-value-list} 4990 @item -fdbg-cnt=@var{counter-value-list}
4890 @opindex fdbg-cnt 4991 @opindex fdbg-cnt
4891 Set the internal debug counter upperbound. @var{counter-value-list} 4992 Set the internal debug counter upper bound. @var{counter-value-list}
4892 is a comma-separated list of @var{name}:@var{value} pairs 4993 is a comma-separated list of @var{name}:@var{value} pairs
4893 which sets the upperbound of each debug counter @var{name} to @var{value}. 4994 which sets the upper bound of each debug counter @var{name} to @var{value}.
4894 All debug counters have the initial upperbound of @var{UINT_MAX}, 4995 All debug counters have the initial upper bound of @var{UINT_MAX},
4895 thus dbg_cnt() returns true always unless the upperbound is set by this option. 4996 thus dbg_cnt() returns true always unless the upper bound is set by this option.
4896 e.g. With -fdbg-cnt=dce:10,tail_call:0 4997 e.g. With -fdbg-cnt=dce:10,tail_call:0
4897 dbg_cnt(dce) will return true only for first 10 invocations 4998 dbg_cnt(dce) will return true only for first 10 invocations
4898 and dbg_cnt(tail_call) will return false always. 4999 and dbg_cnt(tail_call) will return false always.
4899 5000
4900 @item -d@var{letters} 5001 @item -d@var{letters}
4902 @opindex d 5003 @opindex d
4903 Says to make debugging dumps during compilation at times specified by 5004 Says to make debugging dumps during compilation at times specified by
4904 @var{letters}. This is used for debugging the RTL-based passes of the 5005 @var{letters}. This is used for debugging the RTL-based passes of the
4905 compiler. The file names for most of the dumps are made by appending 5006 compiler. The file names for most of the dumps are made by appending
4906 a pass number and a word to the @var{dumpname}, and the files are 5007 a pass number and a word to the @var{dumpname}, and the files are
4907 created in the directory of the output file. @var{dumpname} is 5008 created in the directory of the output file. Note that the pass
4908 generated from the name of the output file, if explicitly specified 5009 number is computed statically as passes get registered into the pass
4909 and it is not an executable, otherwise it is the basename of the 5010 manager. Thus the numbering is not related to the dynamic order of
4910 source file. These switches may have different effects when 5011 execution of passes. In particular, a pass installed by a plugin
4911 @option{-E} is used for preprocessing. 5012 could have a number over 200 even if it executed quite early.
5013 @var{dumpname} is generated from the name of the output file, if
5014 explicitly specified and it is not an executable, otherwise it is the
5015 basename of the source file. These switches may have different effects
5016 when @option{-E} is used for preprocessing.
4912 5017
4913 Debug dumps can be enabled with a @option{-fdump-rtl} switch or some 5018 Debug dumps can be enabled with a @option{-fdump-rtl} switch or some
4914 @option{-d} option @var{letters}. Here are the possible 5019 @option{-d} option @var{letters}. Here are the possible
4915 letters for use in @var{pass} and @var{letters}, and their meanings: 5020 letters for use in @var{pass} and @var{letters}, and their meanings:
4916 5021
5209 5314
5210 @item -dx 5315 @item -dx
5211 @opindex dx 5316 @opindex dx
5212 Just generate RTL for a function instead of compiling it. Usually used 5317 Just generate RTL for a function instead of compiling it. Usually used
5213 with @option{-fdump-rtl-expand}. 5318 with @option{-fdump-rtl-expand}.
5214
5215 @item -dy
5216 @opindex dy
5217 Dump debugging information during parsing, to standard error.
5218 @end table 5319 @end table
5219 5320
5220 @item -fdump-noaddr 5321 @item -fdump-noaddr
5221 @opindex fdump-noaddr 5322 @opindex fdump-noaddr
5222 When doing debugging dumps, suppress address output. This makes it more 5323 When doing debugging dumps, suppress address output. This makes it more
5799 compilation time. 5900 compilation time.
5800 5901
5801 @option{-O} turns on the following optimization flags: 5902 @option{-O} turns on the following optimization flags:
5802 @gccoptlist{ 5903 @gccoptlist{
5803 -fauto-inc-dec @gol 5904 -fauto-inc-dec @gol
5905 -fcompare-elim @gol
5804 -fcprop-registers @gol 5906 -fcprop-registers @gol
5805 -fdce @gol 5907 -fdce @gol
5806 -fdefer-pop @gol 5908 -fdefer-pop @gol
5807 -fdelayed-branch @gol 5909 -fdelayed-branch @gol
5808 -fdse @gol 5910 -fdse @gol
5812 -fipa-pure-const @gol 5914 -fipa-pure-const @gol
5813 -fipa-profile @gol 5915 -fipa-profile @gol
5814 -fipa-reference @gol 5916 -fipa-reference @gol
5815 -fmerge-constants 5917 -fmerge-constants
5816 -fsplit-wide-types @gol 5918 -fsplit-wide-types @gol
5919 -ftree-bit-ccp @gol
5817 -ftree-builtin-call-dce @gol 5920 -ftree-builtin-call-dce @gol
5818 -ftree-ccp @gol 5921 -ftree-ccp @gol
5819 -ftree-ch @gol 5922 -ftree-ch @gol
5820 -ftree-copyrename @gol 5923 -ftree-copyrename @gol
5821 -ftree-dce @gol 5924 -ftree-dce @gol
5846 -falign-loops -falign-labels @gol 5949 -falign-loops -falign-labels @gol
5847 -fcaller-saves @gol 5950 -fcaller-saves @gol
5848 -fcrossjumping @gol 5951 -fcrossjumping @gol
5849 -fcse-follow-jumps -fcse-skip-blocks @gol 5952 -fcse-follow-jumps -fcse-skip-blocks @gol
5850 -fdelete-null-pointer-checks @gol 5953 -fdelete-null-pointer-checks @gol
5954 -fdevirtualize @gol
5851 -fexpensive-optimizations @gol 5955 -fexpensive-optimizations @gol
5852 -fgcse -fgcse-lm @gol 5956 -fgcse -fgcse-lm @gol
5853 -finline-small-functions @gol 5957 -finline-small-functions @gol
5854 -findirect-inlining @gol 5958 -findirect-inlining @gol
5855 -fipa-sra @gol 5959 -fipa-sra @gol
5856 -foptimize-sibling-calls @gol 5960 -foptimize-sibling-calls @gol
5961 -fpartial-inlining @gol
5857 -fpeephole2 @gol 5962 -fpeephole2 @gol
5858 -fregmove @gol 5963 -fregmove @gol
5859 -freorder-blocks -freorder-functions @gol 5964 -freorder-blocks -freorder-functions @gol
5860 -frerun-cse-after-loop @gol 5965 -frerun-cse-after-loop @gol
5861 -fsched-interblock -fsched-spec @gol 5966 -fsched-interblock -fsched-spec @gol
5871 @item -O3 5976 @item -O3
5872 @opindex O3 5977 @opindex O3
5873 Optimize yet more. @option{-O3} turns on all optimizations specified 5978 Optimize yet more. @option{-O3} turns on all optimizations specified
5874 by @option{-O2} and also turns on the @option{-finline-functions}, 5979 by @option{-O2} and also turns on the @option{-finline-functions},
5875 @option{-funswitch-loops}, @option{-fpredictive-commoning}, 5980 @option{-funswitch-loops}, @option{-fpredictive-commoning},
5876 @option{-fgcse-after-reload} and @option{-ftree-vectorize} options. 5981 @option{-fgcse-after-reload}, @option{-ftree-vectorize} and
5982 @option{-fipa-cp-clone} options.
5877 5983
5878 @item -O0 5984 @item -O0
5879 @opindex O0 5985 @opindex O0
5880 Reduce compilation time and make debugging produce the expected 5986 Reduce compilation time and make debugging produce the expected
5881 results. This is the default. 5987 results. This is the default.
5888 5994
5889 @option{-Os} disables the following optimization flags: 5995 @option{-Os} disables the following optimization flags:
5890 @gccoptlist{-falign-functions -falign-jumps -falign-loops @gol 5996 @gccoptlist{-falign-functions -falign-jumps -falign-loops @gol
5891 -falign-labels -freorder-blocks -freorder-blocks-and-partition @gol 5997 -falign-labels -freorder-blocks -freorder-blocks-and-partition @gol
5892 -fprefetch-loop-arrays -ftree-vect-loop-version} 5998 -fprefetch-loop-arrays -ftree-vect-loop-version}
5999
6000 @item -Ofast
6001 @opindex Ofast
6002 Disregard strict standards compliance. @option{-Ofast} enables all
6003 @option{-O3} optimizations. It also enables optimizations that are not
6004 valid for all standard compliant programs.
6005 It turns on @option{-ffast-math}.
5893 6006
5894 If you use multiple @option{-O} options, with or without level numbers, 6007 If you use multiple @option{-O} options, with or without level numbers,
5895 the last such option is the one that is effective. 6008 the last such option is the one that is effective.
5896 @end table 6009 @end table
5897 6010
5933 loop unrolling. 6046 loop unrolling.
5934 6047
5935 This option is enabled by default at optimization levels @option{-O}, 6048 This option is enabled by default at optimization levels @option{-O},
5936 @option{-O2}, @option{-O3}, @option{-Os}. 6049 @option{-O2}, @option{-O3}, @option{-Os}.
5937 6050
6051 @item -ffp-contract=@var{style}
6052 @opindex ffp-contract
6053 @option{-ffp-contract=off} disables floating-point expression contraction.
6054 @option{-ffp-contract=fast} enables floating-point expression contraction
6055 such as forming of fused multiply-add operations if the target has
6056 native support for them.
6057 @option{-ffp-contract=on} enables floating-point expression contraction
6058 if allowed by the language standard. This is currently not implemented
6059 and treated equal to @option{-ffp-contract=off}.
6060
6061 The default is @option{-ffp-contract=fast}.
6062
5938 @item -fomit-frame-pointer 6063 @item -fomit-frame-pointer
5939 @opindex fomit-frame-pointer 6064 @opindex fomit-frame-pointer
5940 Don't keep the frame pointer in a register for functions that 6065 Don't keep the frame pointer in a register for functions that
5941 don't need one. This avoids the instructions to save, set up and 6066 don't need one. This avoids the instructions to save, set up and
5942 restore frame pointers; it also makes an extra register available 6067 restore frame pointers; it also makes an extra register available
5948 and nothing is saved by pretending it doesn't exist. The 6073 and nothing is saved by pretending it doesn't exist. The
5949 machine-description macro @code{FRAME_POINTER_REQUIRED} controls 6074 machine-description macro @code{FRAME_POINTER_REQUIRED} controls
5950 whether a target machine supports this flag. @xref{Registers,,Register 6075 whether a target machine supports this flag. @xref{Registers,,Register
5951 Usage, gccint, GNU Compiler Collection (GCC) Internals}. 6076 Usage, gccint, GNU Compiler Collection (GCC) Internals}.
5952 6077
6078 Starting with GCC version 4.6, the default setting (when not optimizing for
6079 size) for 32-bit Linux x86 and 32-bit Darwin x86 targets has been changed to
6080 @option{-fomit-frame-pointer}. The default can be reverted to
6081 @option{-fno-omit-frame-pointer} by configuring GCC with the
6082 @option{--enable-frame-pointer} configure option.
6083
5953 Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}. 6084 Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
5954 6085
5955 @item -foptimize-sibling-calls 6086 @item -foptimize-sibling-calls
5956 @opindex foptimize-sibling-calls 6087 @opindex foptimize-sibling-calls
5957 Optimize sibling and tail recursive calls. 6088 Optimize sibling and tail recursive calls.
6047 6178
6048 @emph{Note:} pseudo instruction represents, in this particular context, an 6179 @emph{Note:} pseudo instruction represents, in this particular context, an
6049 abstract measurement of function's size. In no way does it represent a count 6180 abstract measurement of function's size. In no way does it represent a count
6050 of assembly instructions and as such its exact meaning might change from one 6181 of assembly instructions and as such its exact meaning might change from one
6051 release to an another. 6182 release to an another.
6183
6184 @item -fno-keep-inline-dllexport
6185 @opindex -fno-keep-inline-dllexport
6186 This is a more fine-grained version of @option{-fkeep-inline-functions},
6187 which applies only to functions that are declared using the @code{dllexport}
6188 attribute or declspec (@xref{Function Attributes,,Declaring Attributes of
6189 Functions}.)
6052 6190
6053 @item -fkeep-inline-functions 6191 @item -fkeep-inline-functions
6054 @opindex fkeep-inline-functions 6192 @opindex fkeep-inline-functions
6055 In C, emit @code{static} functions that are declared @code{inline} 6193 In C, emit @code{static} functions that are declared @code{inline}
6056 into the object file, even if the function has been inlined into all 6194 into the object file, even if the function has been inlined into all
6322 Some targets, especially embedded ones, disable this option at all levels. 6460 Some targets, especially embedded ones, disable this option at all levels.
6323 Otherwise it is enabled at all levels: @option{-O0}, @option{-O1}, 6461 Otherwise it is enabled at all levels: @option{-O0}, @option{-O1},
6324 @option{-O2}, @option{-O3}, @option{-Os}. Passes that use the information 6462 @option{-O2}, @option{-O3}, @option{-Os}. Passes that use the information
6325 are enabled independently at different optimization levels. 6463 are enabled independently at different optimization levels.
6326 6464
6465 @item -fdevirtualize
6466 @opindex fdevirtualize
6467 Attempt to convert calls to virtual functions to direct calls. This
6468 is done both within a procedure and interprocedurally as part of
6469 indirect inlining (@code{-findirect-inlining}) and interprocedural constant
6470 propagation (@option{-fipa-cp}).
6471 Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
6472
6327 @item -fexpensive-optimizations 6473 @item -fexpensive-optimizations
6328 @opindex fexpensive-optimizations 6474 @opindex fexpensive-optimizations
6329 Perform a number of minor optimizations that are relatively expensive. 6475 Perform a number of minor optimizations that are relatively expensive.
6330 6476
6331 Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. 6477 Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
6363 The first value can give best result for machines with small size and 6509 The first value can give best result for machines with small size and
6364 irregular register set, the third one results in faster and generates 6510 irregular register set, the third one results in faster and generates
6365 decent code and the smallest size code, and the default value usually 6511 decent code and the smallest size code, and the default value usually
6366 give the best results in most cases and for most architectures. 6512 give the best results in most cases and for most architectures.
6367 6513
6368 @item -fira-coalesce
6369 @opindex fira-coalesce
6370 Do optimistic register coalescing. This option might be profitable for
6371 architectures with big regular register files.
6372
6373 @item -fira-loop-pressure 6514 @item -fira-loop-pressure
6374 @opindex fira-loop-pressure 6515 @opindex fira-loop-pressure
6375 Use IRA to evaluate register pressure in loops for decision to move 6516 Use IRA to evaluate register pressure in loops for decision to move
6376 loop invariants. Usage of this option usually results in generation 6517 loop invariants. Usage of this option usually results in generation
6377 of faster and smaller code on machines with big register files (>= 32 6518 of faster and smaller code on machines with big register files (>= 32
6576 This option is always enabled by default on certain machines, usually 6717 This option is always enabled by default on certain machines, usually
6577 those which have no call-preserved registers to use instead. 6718 those which have no call-preserved registers to use instead.
6578 6719
6579 Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. 6720 Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
6580 6721
6722 @item -fcombine-stack-adjustments
6723 @opindex fcombine-stack-adjustments
6724 Tracks stack adjustments (pushes and pops) and stack memory references
6725 and then tries to find ways to combine them.
6726
6727 Enabled by default at @option{-O1} and higher.
6728
6581 @item -fconserve-stack 6729 @item -fconserve-stack
6582 @opindex fconserve-stack 6730 @opindex fconserve-stack
6583 Attempt to minimize stack usage. The compiler will attempt to use less 6731 Attempt to minimize stack usage. The compiler will attempt to use less
6584 stack space, even if that makes the program slower. This option 6732 stack space, even if that makes the program slower. This option
6585 implies setting the @option{large-stack-frame} parameter to 100 6733 implies setting the @option{large-stack-frame} parameter to 100
6635 Perform structure reorganization optimization, that change C-like structures 6783 Perform structure reorganization optimization, that change C-like structures
6636 layout in order to better utilize spatial locality. This transformation is 6784 layout in order to better utilize spatial locality. This transformation is
6637 affective for programs containing arrays of structures. Available in two 6785 affective for programs containing arrays of structures. Available in two
6638 compilation modes: profile-based (enabled with @option{-fprofile-generate}) 6786 compilation modes: profile-based (enabled with @option{-fprofile-generate})
6639 or static (which uses built-in heuristics). It works only in whole program 6787 or static (which uses built-in heuristics). It works only in whole program
6640 mode, so it requires @option{-fwhole-program} and @option{-combine} to be 6788 mode, so it requires @option{-fwhole-program} to be
6641 enabled. Structures considered @samp{cold} by this transformation are not 6789 enabled. Structures considered @samp{cold} by this transformation are not
6642 affected (see @option{--param struct-reorg-cold-struct-ratio=@var{value}}). 6790 affected (see @option{--param struct-reorg-cold-struct-ratio=@var{value}}).
6643 6791
6644 With this flag, the program debug info reflects a new structure layout. 6792 With this flag, the program debug info reflects a new structure layout.
6645 6793
6693 @item -ftree-sink 6841 @item -ftree-sink
6694 @opindex ftree-sink 6842 @opindex ftree-sink
6695 Perform forward store motion on trees. This flag is 6843 Perform forward store motion on trees. This flag is
6696 enabled by default at @option{-O} and higher. 6844 enabled by default at @option{-O} and higher.
6697 6845
6846 @item -ftree-bit-ccp
6847 @opindex ftree-bit-ccp
6848 Perform sparse conditional bit constant propagation on trees and propagate
6849 pointer alignment information.
6850 This pass only operates on local scalar variables and is enabled by default
6851 at @option{-O} and higher. It requires that @option{-ftree-ccp} is enabled.
6852
6698 @item -ftree-ccp 6853 @item -ftree-ccp
6699 @opindex ftree-ccp 6854 @opindex ftree-ccp
6700 Perform sparse conditional constant propagation (CCP) on trees. This 6855 Perform sparse conditional constant propagation (CCP) on trees. This
6701 pass only operates on local scalar variables and is enabled by default 6856 pass only operates on local scalar variables and is enabled by default
6702 at @option{-O} and higher. 6857 at @option{-O} and higher.
6745 Perform loop optimizations on trees. This flag is enabled by default 6900 Perform loop optimizations on trees. This flag is enabled by default
6746 at @option{-O} and higher. 6901 at @option{-O} and higher.
6747 6902
6748 @item -ftree-loop-linear 6903 @item -ftree-loop-linear
6749 @opindex ftree-loop-linear 6904 @opindex ftree-loop-linear
6750 Perform linear loop transformations on tree. This flag can improve cache 6905 Perform loop interchange transformations on tree. Same as
6751 performance and allow further loop optimizations to take place. 6906 @option{-floop-interchange}. To use this code transformation, GCC has
6907 to be configured with @option{--with-ppl} and @option{--with-cloog} to
6908 enable the Graphite loop transformation infrastructure.
6752 6909
6753 @item -floop-interchange 6910 @item -floop-interchange
6911 @opindex floop-interchange
6754 Perform loop interchange transformations on loops. Interchanging two 6912 Perform loop interchange transformations on loops. Interchanging two
6755 nested loops switches the inner and outer loops. For example, given a 6913 nested loops switches the inner and outer loops. For example, given a
6756 loop like: 6914 loop like:
6757 @smallexample 6915 @smallexample
6758 DO J = 1, M 6916 DO J = 1, M
6777 Fortran. To use this code transformation, GCC has to be configured 6935 Fortran. To use this code transformation, GCC has to be configured
6778 with @option{--with-ppl} and @option{--with-cloog} to enable the 6936 with @option{--with-ppl} and @option{--with-cloog} to enable the
6779 Graphite loop transformation infrastructure. 6937 Graphite loop transformation infrastructure.
6780 6938
6781 @item -floop-strip-mine 6939 @item -floop-strip-mine
6940 @opindex floop-strip-mine
6782 Perform loop strip mining transformations on loops. Strip mining 6941 Perform loop strip mining transformations on loops. Strip mining
6783 splits a loop into two nested loops. The outer loop has strides 6942 splits a loop into two nested loops. The outer loop has strides
6784 equal to the strip size and the inner loop has strides of the 6943 equal to the strip size and the inner loop has strides of the
6785 original loop within a strip. The strip length can be changed 6944 original loop within a strip. The strip length can be changed
6786 using the @option{loop-block-tile-size} parameter. For example, 6945 using the @option{loop-block-tile-size} parameter. For example,
6802 not limited to Fortran. To use this code transformation, GCC has to 6961 not limited to Fortran. To use this code transformation, GCC has to
6803 be configured with @option{--with-ppl} and @option{--with-cloog} to 6962 be configured with @option{--with-ppl} and @option{--with-cloog} to
6804 enable the Graphite loop transformation infrastructure. 6963 enable the Graphite loop transformation infrastructure.
6805 6964
6806 @item -floop-block 6965 @item -floop-block
6966 @opindex floop-block
6807 Perform loop blocking transformations on loops. Blocking strip mines 6967 Perform loop blocking transformations on loops. Blocking strip mines
6808 each loop in the loop nest such that the memory accesses of the 6968 each loop in the loop nest such that the memory accesses of the
6809 element loops fit inside caches. The strip length can be changed 6969 element loops fit inside caches. The strip length can be changed
6810 using the @option{loop-block-tile-size} parameter. For example, given 6970 using the @option{loop-block-tile-size} parameter. For example, given
6811 a loop like: 6971 a loop like:
6843 @option{-fgraphite-identity} we can check the costs or benefits of the 7003 @option{-fgraphite-identity} we can check the costs or benefits of the
6844 GIMPLE -> GRAPHITE -> GIMPLE transformation. Some minimal optimizations 7004 GIMPLE -> GRAPHITE -> GIMPLE transformation. Some minimal optimizations
6845 are also performed by the code generator CLooG, like index splitting and 7005 are also performed by the code generator CLooG, like index splitting and
6846 dead code elimination in loops. 7006 dead code elimination in loops.
6847 7007
7008 @item -floop-flatten
7009 @opindex floop-flatten
7010 Removes the loop nesting structure: transforms the loop nest into a
7011 single loop. This transformation can be useful to vectorize all the
7012 levels of the loop nest.
7013
6848 @item -floop-parallelize-all 7014 @item -floop-parallelize-all
7015 @opindex floop-parallelize-all
6849 Use the Graphite data dependence analysis to identify loops that can 7016 Use the Graphite data dependence analysis to identify loops that can
6850 be parallelized. Parallelize all the loops that can be analyzed to 7017 be parallelized. Parallelize all the loops that can be analyzed to
6851 not contain loop carried dependences without checking that it is 7018 not contain loop carried dependences without checking that it is
6852 profitable to parallelize the loops. 7019 profitable to parallelize the loops.
6853 7020
6854 @item -fcheck-data-deps 7021 @item -fcheck-data-deps
6855 @opindex fcheck-data-deps 7022 @opindex fcheck-data-deps
6856 Compare the results of several data dependence analyzers. This option 7023 Compare the results of several data dependence analyzers. This option
6857 is used for debugging the data dependence analyzers. 7024 is used for debugging the data dependence analyzers.
7025
7026 @item -ftree-loop-if-convert
7027 Attempt to transform conditional jumps in the innermost loops to
7028 branch-less equivalents. The intent is to remove control-flow from
7029 the innermost loops in order to improve the ability of the
7030 vectorization pass to handle these loops. This is enabled by default
7031 if vectorization is enabled.
7032
7033 @item -ftree-loop-if-convert-stores
7034 Attempt to also if-convert conditional jumps containing memory writes.
7035 This transformation can be unsafe for multi-threaded programs as it
7036 transforms conditional memory writes into unconditional memory writes.
7037 For example,
7038 @smallexample
7039 for (i = 0; i < N; i++)
7040 if (cond)
7041 A[i] = expr;
7042 @end smallexample
7043 would be transformed to
7044 @smallexample
7045 for (i = 0; i < N; i++)
7046 A[i] = cond ? expr : A[i];
7047 @end smallexample
7048 potentially producing data races.
6858 7049
6859 @item -ftree-loop-distribution 7050 @item -ftree-loop-distribution
6860 Perform loop distribution. This flag can improve cache performance on 7051 Perform loop distribution. This flag can improve cache performance on
6861 big loop bodies and allow further loop optimizations, like 7052 big loop bodies and allow further loop optimizations, like
6862 parallelization or vectorization, to take place. For example, the loop 7053 parallelization or vectorization, to take place. For example, the loop
6874 DO I = 1, N 7065 DO I = 1, N
6875 D(I) = E(I) * F 7066 D(I) = E(I) * F
6876 ENDDO 7067 ENDDO
6877 @end smallexample 7068 @end smallexample
6878 7069
7070 @item -ftree-loop-distribute-patterns
7071 Perform loop distribution of patterns that can be code generated with
7072 calls to a library. This flag is enabled by default at @option{-O3}.
7073
7074 This pass distributes the initialization loops and generates a call to
7075 memset zero. For example, the loop
7076 @smallexample
7077 DO I = 1, N
7078 A(I) = 0
7079 B(I) = A(I) + I
7080 ENDDO
7081 @end smallexample
7082 is transformed to
7083 @smallexample
7084 DO I = 1, N
7085 A(I) = 0
7086 ENDDO
7087 DO I = 1, N
7088 B(I) = A(I) + I
7089 ENDDO
7090 @end smallexample
7091 and the initialization loop is transformed into a call to memset zero.
7092
6879 @item -ftree-loop-im 7093 @item -ftree-loop-im
6880 @opindex ftree-loop-im 7094 @opindex ftree-loop-im
6881 Perform loop invariant motion on trees. This pass moves only invariants that 7095 Perform loop invariant motion on trees. This pass moves only invariants that
6882 would be hard to handle at RTL level (function calls, operations that expand to 7096 would be hard to handle at RTL level (function calls, operations that expand to
6883 nontrivial sequences of insns). With @option{-funswitch-loops} it also moves 7097 nontrivial sequences of insns). With @option{-funswitch-loops} it also moves
7001 7215
7002 @item -fvariable-expansion-in-unroller 7216 @item -fvariable-expansion-in-unroller
7003 @opindex fvariable-expansion-in-unroller 7217 @opindex fvariable-expansion-in-unroller
7004 With this option, the compiler will create multiple copies of some 7218 With this option, the compiler will create multiple copies of some
7005 local variables when unrolling a loop which can result in superior code. 7219 local variables when unrolling a loop which can result in superior code.
7220
7221 @item -fpartial-inlining
7222 @opindex fpartial-inlining
7223 Inline parts of functions. This option has any effect only
7224 when inlining itself is turned on by the @option{-finline-functions}
7225 or @option{-finline-small-functions} options.
7226
7227 Enabled at level @option{-O2}.
7006 7228
7007 @item -fpredictive-commoning 7229 @item -fpredictive-commoning
7008 @opindex fpredictive-commoning 7230 @opindex fpredictive-commoning
7009 Perform predictive commoning optimization, i.e., reusing computations 7231 Perform predictive commoning optimization, i.e., reusing computations
7010 (especially memory loads and stores) performed in previous 7232 (especially memory loads and stores) performed in previous
7275 @item -fwhole-program 7497 @item -fwhole-program
7276 @opindex fwhole-program 7498 @opindex fwhole-program
7277 Assume that the current compilation unit represents the whole program being 7499 Assume that the current compilation unit represents the whole program being
7278 compiled. All public functions and variables with the exception of @code{main} 7500 compiled. All public functions and variables with the exception of @code{main}
7279 and those merged by attribute @code{externally_visible} become static functions 7501 and those merged by attribute @code{externally_visible} become static functions
7280 and in effect are optimized more aggressively by interprocedural optimizers. 7502 and in effect are optimized more aggressively by interprocedural optimizers. If @command{gold} is used as the linker plugin, @code{externally_visible} attributes are automatically added to functions (not variable yet due to a current @command{gold} issue) that are accessed outside of LTO objects according to resolution file produced by @command{gold}. For other linkers that cannot generate resolution file, explicit @code{externally_visible} attributes are still necessary.
7281 While this option is equivalent to proper use of the @code{static} keyword for 7503 While this option is equivalent to proper use of the @code{static} keyword for
7282 programs consisting of a single file, in combination with option 7504 programs consisting of a single file, in combination with option
7283 @option{-combine}, @option{-flto} or @option{-fwhopr} this flag can be used to 7505 @option{-flto} this flag can be used to
7284 compile many smaller scale programs since the functions and variables become 7506 compile many smaller scale programs since the functions and variables become
7285 local for the whole combined compilation unit, not for the single source file 7507 local for the whole combined compilation unit, not for the single source file
7286 itself. 7508 itself.
7287 7509
7288 This option implies @option{-fwhole-file} for Fortran programs. 7510 This option implies @option{-fwhole-file} for Fortran programs.
7289 7511
7290 @item -flto 7512 @item -flto[=@var{n}]
7291 @opindex flto 7513 @opindex flto
7292 This option runs the standard link-time optimizer. When invoked 7514 This option runs the standard link-time optimizer. When invoked
7293 with source code, it generates GIMPLE (one of GCC's internal 7515 with source code, it generates GIMPLE (one of GCC's internal
7294 representations) and writes it to special ELF sections in the object 7516 representations) and writes it to special ELF sections in the object
7295 file. When the object files are linked together, all the function 7517 file. When the object files are linked together, all the function
7328 7550
7329 The only important thing to keep in mind is that to enable link-time 7551 The only important thing to keep in mind is that to enable link-time
7330 optimizations the @option{-flto} flag needs to be passed to both the 7552 optimizations the @option{-flto} flag needs to be passed to both the
7331 compile and the link commands. 7553 compile and the link commands.
7332 7554
7555 To make whole program optimization effective, it is necessary to make
7556 certain whole program assumptions. The compiler needs to know
7557 what functions and variables can be accessed by libraries and runtime
7558 outside of the link time optimized unit. When supported by the linker,
7559 the linker plugin (see @option{-fuse-linker-plugin}) passes to the
7560 compiler information about used and externally visible symbols. When
7561 the linker plugin is not available, @option{-fwhole-program} should be
7562 used to allow the compiler to make these assumptions, which will lead
7563 to more aggressive optimization decisions.
7564
7333 Note that when a file is compiled with @option{-flto}, the generated 7565 Note that when a file is compiled with @option{-flto}, the generated
7334 object file will be larger than a regular object file because it will 7566 object file will be larger than a regular object file because it will
7335 contain GIMPLE bytecodes and the usual final code. This means that 7567 contain GIMPLE bytecodes and the usual final code. This means that
7336 object files with LTO information can be linked as a normal object 7568 object files with LTO information can be linked as a normal object
7337 file. So, in the previous example, if the final link is done with 7569 file. So, in the previous example, if the final link is done with
7404 If LTO encounters objects with C linkage declared with incompatible 7636 If LTO encounters objects with C linkage declared with incompatible
7405 types in separate translation units to be linked together (undefined 7637 types in separate translation units to be linked together (undefined
7406 behavior according to ISO C99 6.2.7), a non-fatal diagnostic may be 7638 behavior according to ISO C99 6.2.7), a non-fatal diagnostic may be
7407 issued. The behavior is still undefined at runtime. 7639 issued. The behavior is still undefined at runtime.
7408 7640
7409 If object files containing GIMPLE bytecode are stored in a library 7641 If object files containing GIMPLE bytecode are stored in a library archive, say
7410 archive, say @file{libfoo.a}, it is possible to extract and use them 7642 @file{libfoo.a}, it is possible to extract and use them in an LTO link if you
7411 in an LTO link if you are using @command{gold} as the linker (which, 7643 are using a linker with linker plugin support. To enable this feature, use
7412 in turn requires GCC to be configured with @option{--enable-gold}). 7644 the flag @option{-fuse-linker-plugin} at link-time:
7413 To enable this feature, use the flag @option{-fuse-linker-plugin} at
7414 link-time:
7415 7645
7416 @smallexample 7646 @smallexample
7417 gcc -o myprog -O2 -flto -fuse-linker-plugin a.o b.o -lfoo 7647 gcc -o myprog -O2 -flto -fuse-linker-plugin a.o b.o -lfoo
7418 @end smallexample 7648 @end smallexample
7419 7649
7420 With the linker plugin enabled, @command{gold} will extract the needed 7650 With the linker plugin enabled, the linker will extract the needed
7421 GIMPLE files from @file{libfoo.a} and pass them on to the running GCC 7651 GIMPLE files from @file{libfoo.a} and pass them on to the running GCC
7422 to make them part of the aggregated GIMPLE image to be optimized. 7652 to make them part of the aggregated GIMPLE image to be optimized.
7423 7653
7424 If you are not using @command{gold} and/or do not specify 7654 If you are not using a linker with linker plugin support and/or do not
7425 @option{-fuse-linker-plugin} then the objects inside @file{libfoo.a} 7655 enable linker plugin then the objects inside @file{libfoo.a}
7426 will be extracted and linked as usual, but they will not participate 7656 will be extracted and linked as usual, but they will not participate
7427 in the LTO optimization process. 7657 in the LTO optimization process.
7428 7658
7429 Link time optimizations do not require the presence of the whole 7659 Link time optimizations do not require the presence of the whole program to
7430 program to operate. If the program does not require any symbols to 7660 operate. If the program does not require any symbols to be exported, it is
7431 be exported, it is possible to combine @option{-flto} and 7661 possible to combine @option{-flto} and with @option{-fwhole-program} to allow
7432 @option{-fwhopr} with @option{-fwhole-program} to allow the 7662 the interprocedural optimizers to use more aggressive assumptions which may
7433 interprocedural optimizers to use more aggressive assumptions which 7663 lead to improved optimization opportunities.
7434 may lead to improved optimization opportunities. 7664 Use of @option{-fwhole-program} is not needed when linker plugin is
7665 active (see @option{-fuse-linker-plugin}).
7435 7666
7436 Regarding portability: the current implementation of LTO makes no 7667 Regarding portability: the current implementation of LTO makes no
7437 attempt at generating bytecode that can be ported between different 7668 attempt at generating bytecode that can be ported between different
7438 types of hosts. The bytecode files are versioned and there is a 7669 types of hosts. The bytecode files are versioned and there is a
7439 strict version check, so bytecode files generated in one version of 7670 strict version check, so bytecode files generated in one version of
7440 GCC will not work with an older/newer version of GCC. 7671 GCC will not work with an older/newer version of GCC.
7441 7672
7442 Link time optimization does not play well with generating debugging 7673 Link time optimization does not play well with generating debugging
7443 information. Combining @option{-flto} or @option{-fwhopr} with 7674 information. Combining @option{-flto} with
7444 @option{-g} is experimental. 7675 @option{-g} is currently experimental and expected to produce wrong
7676 results.
7677
7678 If you specify the optional @var{n}, the optimization and code
7679 generation done at link time is executed in parallel using @var{n}
7680 parallel jobs by utilizing an installed @command{make} program. The
7681 environment variable @env{MAKE} may be used to override the program
7682 used. The default value for @var{n} is 1.
7683
7684 You can also specify @option{-flto=jobserver} to use GNU make's
7685 job server mode to determine the number of parallel jobs. This
7686 is useful when the Makefile calling GCC is already executing in parallel.
7687 The parent Makefile will need a @samp{+} prepended to the command recipe
7688 for this to work. This will likely only work if @env{MAKE} is
7689 GNU make.
7445 7690
7446 This option is disabled by default. 7691 This option is disabled by default.
7447 7692
7448 @item -fwhopr[=@var{n}] 7693 @item -flto-partition=@var{alg}
7449 @opindex fwhopr 7694 @opindex flto-partition
7450 This option is identical in functionality to @option{-flto} but it 7695 Specify the partitioning algorithm used by the link time optimizer.
7451 differs in how the final link stage is executed. Instead of loading 7696 The value is either @code{1to1} to specify a partitioning mirroring
7452 all the function bodies in memory, the callgraph is analyzed and 7697 the original source files or @code{balanced} to specify partitioning
7453 optimization decisions are made (whole program analysis or WPA). Once 7698 into equally sized chunks (whenever possible). Specifying @code{none}
7454 optimization decisions are made, the callgraph is partitioned and the 7699 as an algorithm disables partitioning and streaming completely. The
7455 different sections are compiled separately (local transformations or 7700 default value is @code{balanced}.
7456 LTRANS)@. This process allows optimizations on very large programs
7457 that otherwise would not fit in memory. This option enables
7458 @option{-fwpa} and @option{-fltrans} automatically.
7459
7460 If you specify the optional @var{n} the link stage is executed in
7461 parallel using @var{n} parallel jobs by utilizing an installed
7462 @code{make} program.
7463
7464 Disabled by default.
7465
7466 @item -fwpa
7467 @opindex fwpa
7468 This is an internal option used by GCC when compiling with
7469 @option{-fwhopr}. You should never need to use it.
7470
7471 This option runs the link-time optimizer in the whole-program-analysis
7472 (WPA) mode, which reads in summary information from all inputs and
7473 performs a whole-program analysis based on summary information only.
7474 It generates object files for subsequent runs of the link-time
7475 optimizer where individual object files are optimized using both
7476 summary information from the WPA mode and the actual function bodies.
7477 It then drives the LTRANS phase.
7478
7479 Disabled by default.
7480
7481 @item -fltrans
7482 @opindex fltrans
7483 This is an internal option used by GCC when compiling with
7484 @option{-fwhopr}. You should never need to use it.
7485
7486 This option runs the link-time optimizer in the local-transformation (LTRANS)
7487 mode, which reads in output from a previous run of the LTO in WPA mode.
7488 In the LTRANS mode, LTO optimizes an object and produces the final assembly.
7489
7490 Disabled by default.
7491
7492 @item -fltrans-output-list=@var{file}
7493 @opindex fltrans-output-list
7494 This is an internal option used by GCC when compiling with
7495 @option{-fwhopr}. You should never need to use it.
7496
7497 This option specifies a file to which the names of LTRANS output files are
7498 written. This option is only meaningful in conjunction with @option{-fwpa}.
7499
7500 Disabled by default.
7501 7701
7502 @item -flto-compression-level=@var{n} 7702 @item -flto-compression-level=@var{n}
7503 This option specifies the level of compression used for intermediate 7703 This option specifies the level of compression used for intermediate
7504 language written to LTO object files, and is only meaningful in 7704 language written to LTO object files, and is only meaningful in
7505 conjunction with LTO mode (@option{-fwhopr}, @option{-flto}). Valid 7705 conjunction with LTO mode (@option{-flto}). Valid
7506 values are 0 (no compression) to 9 (maximum compression). Values 7706 values are 0 (no compression) to 9 (maximum compression). Values
7507 outside this range are clamped to either 0 or 9. If the option is not 7707 outside this range are clamped to either 0 or 9. If the option is not
7508 given, a default balanced compression setting is used. 7708 given, a default balanced compression setting is used.
7509 7709
7510 @item -flto-report 7710 @item -flto-report
7511 Prints a report with internal details on the workings of the link-time 7711 Prints a report with internal details on the workings of the link-time
7512 optimizer. The contents of this report vary from version to version, 7712 optimizer. The contents of this report vary from version to version,
7513 it is meant to be useful to GCC developers when processing object 7713 it is meant to be useful to GCC developers when processing object
7514 files in LTO mode (via @option{-fwhopr} or @option{-flto}). 7714 files in LTO mode (via @option{-flto}).
7515 7715
7516 Disabled by default. 7716 Disabled by default.
7517 7717
7518 @item -fuse-linker-plugin 7718 @item -fuse-linker-plugin
7519 Enables the extraction of objects with GIMPLE bytecode information 7719 Enables the use of linker plugin during link time optimization. This option
7520 from library archives. This option relies on features available only 7720 relies on the linker plugin support in linker that is available in gold
7521 in @command{gold}, so to use this you must configure GCC with 7721 or in GNU ld 2.21 or newer.
7522 @option{--enable-gold}. See @option{-flto} for a description on the 7722
7523 effect of this flag and how to use it. 7723 This option enables the extraction of object files with GIMPLE bytecode out of
7524 7724 library archives. This improves the quality of optimization by exposing more
7525 Disabled by default. 7725 code the the link time optimizer. This information specify what symbols
7726 can be accessed externally (by non-LTO object or during dynamic linking).
7727 Resulting code quality improvements on binaries (and shared libraries that do
7728 use hidden visibility) is similar to @code{-fwhole-program}. See
7729 @option{-flto} for a description on the effect of this flag and how to use it.
7730
7731 Enabled by default when LTO support in GCC is enabled and GCC was compiled
7732 with a linker supporting plugins (GNU ld 2.21 or newer or gold).
7733
7734 @item -fcompare-elim
7735 @opindex fcompare-elim
7736 After register allocation and post-register allocation instruction splitting,
7737 identify arithmetic instructions that compute processor flags similar to a
7738 comparison operation based on that arithmetic. If possible, eliminate the
7739 explicit comparison operation.
7740
7741 This pass only applies to certain targets that cannot explicitly represent
7742 the comparison operation before register allocation is complete.
7743
7744 Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
7526 7745
7527 @item -fcprop-registers 7746 @item -fcprop-registers
7528 @opindex fcprop-registers 7747 @opindex fcprop-registers
7529 After register allocation and post-register allocation instruction splitting, 7748 After register allocation and post-register allocation instruction splitting,
7530 we perform a copy-propagation pass to try to reduce scheduling dependencies 7749 we perform a copy-propagation pass to try to reduce scheduling dependencies
7540 default, GCC will emit an error message when an inconsistent profile is detected. 7759 default, GCC will emit an error message when an inconsistent profile is detected.
7541 7760
7542 @item -fprofile-dir=@var{path} 7761 @item -fprofile-dir=@var{path}
7543 @opindex fprofile-dir 7762 @opindex fprofile-dir
7544 7763
7545 Set the directory to search the profile data files in to @var{path}. 7764 Set the directory to search for the profile data files in to @var{path}.
7546 This option affects only the profile data generated by 7765 This option affects only the profile data generated by
7547 @option{-fprofile-generate}, @option{-ftest-coverage}, @option{-fprofile-arcs} 7766 @option{-fprofile-generate}, @option{-ftest-coverage}, @option{-fprofile-arcs}
7548 and used by @option{-fprofile-use} and @option{-fbranch-probabilities} 7767 and used by @option{-fprofile-use} and @option{-fbranch-probabilities}
7549 and its related options. 7768 and its related options.
7550 By default, GCC will use the current directory as @var{path} 7769 By default, GCC will use the current directory as @var{path}, thus the
7551 thus the profile data file will appear in the same directory as the object file. 7770 profile data file will appear in the same directory as the object file.
7552 7771
7553 @item -fprofile-generate 7772 @item -fprofile-generate
7554 @itemx -fprofile-generate=@var{path} 7773 @itemx -fprofile-generate=@var{path}
7555 @opindex fprofile-generate 7774 @opindex fprofile-generate
7556 7775
7634 @option{-ffinite-math-only}, @option{-fno-rounding-math}, 7853 @option{-ffinite-math-only}, @option{-fno-rounding-math},
7635 @option{-fno-signaling-nans} and @option{-fcx-limited-range}. 7854 @option{-fno-signaling-nans} and @option{-fcx-limited-range}.
7636 7855
7637 This option causes the preprocessor macro @code{__FAST_MATH__} to be defined. 7856 This option causes the preprocessor macro @code{__FAST_MATH__} to be defined.
7638 7857
7639 This option is not turned on by any @option{-O} option since 7858 This option is not turned on by any @option{-O} option besides
7640 it can result in incorrect output for programs which depend on 7859 @option{-Ofast} since it can result in incorrect output for programs
7641 an exact implementation of IEEE or ISO rules/specifications for 7860 which depend on an exact implementation of IEEE or ISO rules/specifications
7642 math functions. It may, however, yield faster code for programs 7861 for math functions. It may, however, yield faster code for programs
7643 that do not require the guarantees of these specifications. 7862 that do not require the guarantees of these specifications.
7644 7863
7645 @item -fno-math-errno 7864 @item -fno-math-errno
7646 @opindex fno-math-errno 7865 @opindex fno-math-errno
7647 Do not set ERRNO after calling math functions that are executed 7866 Do not set ERRNO after calling math functions that are executed
7831 8050
7832 With @option{-fbranch-probabilities}, GCC puts a 8051 With @option{-fbranch-probabilities}, GCC puts a
7833 @samp{REG_BR_PROB} note on each @samp{JUMP_INSN} and @samp{CALL_INSN}. 8052 @samp{REG_BR_PROB} note on each @samp{JUMP_INSN} and @samp{CALL_INSN}.
7834 These can be used to improve optimization. Currently, they are only 8053 These can be used to improve optimization. Currently, they are only
7835 used in one place: in @file{reorg.c}, instead of guessing which path a 8054 used in one place: in @file{reorg.c}, instead of guessing which path a
7836 branch is mostly to take, the @samp{REG_BR_PROB} values are used to 8055 branch is most likely to take, the @samp{REG_BR_PROB} values are used to
7837 exactly determine which path is taken more often. 8056 exactly determine which path is taken more often.
7838 8057
7839 @item -fprofile-values 8058 @item -fprofile-values
7840 @opindex fprofile-values 8059 @opindex fprofile-values
7841 If combined with @option{-fprofile-arcs}, it adds code so that some 8060 If combined with @option{-fprofile-arcs}, it adds code so that some
7842 data about values of expressions in the program is gathered. 8061 data about values of expressions in the program is gathered.
7843 8062
7844 With @option{-fbranch-probabilities}, it reads back the data gathered 8063 With @option{-fbranch-probabilities}, it reads back the data gathered
7845 from profiling values of expressions and adds @samp{REG_VALUE_PROFILE} 8064 from profiling values of expressions for usage in optimizations.
7846 notes to instructions for their later usage in optimizations.
7847 8065
7848 Enabled with @option{-fprofile-generate} and @option{-fprofile-use}. 8066 Enabled with @option{-fprofile-generate} and @option{-fprofile-use}.
7849 8067
7850 @item -fvpt 8068 @item -fvpt
7851 @opindex fvpt 8069 @opindex fvpt
8069 The approximate maximum amount of memory that will be allocated in 8287 The approximate maximum amount of memory that will be allocated in
8070 order to perform the global common subexpression elimination 8288 order to perform the global common subexpression elimination
8071 optimization. If more memory than specified is required, the 8289 optimization. If more memory than specified is required, the
8072 optimization will not be done. 8290 optimization will not be done.
8073 8291
8292 @item max-gcse-insertion-ratio
8293 If the ratio of expression insertions to deletions is larger than this value
8294 for any expression, then RTL PRE will insert or remove the expression and thus
8295 leave partially redundant computations in the instruction stream. The default value is 20.
8296
8074 @item max-pending-list-length 8297 @item max-pending-list-length
8075 The maximum number of pending dependencies scheduling will allow 8298 The maximum number of pending dependencies scheduling will allow
8076 before flushing the current state and starting over. Large functions 8299 before flushing the current state and starting over. Large functions
8077 with few branches or calls can create excessively large lists which 8300 with few branches or calls can create excessively large lists which
8078 needlessly consume memory and resources. 8301 needlessly consume memory and resources.
8081 Several parameters control the tree inliner used in gcc. 8304 Several parameters control the tree inliner used in gcc.
8082 This number sets the maximum number of instructions (counted in GCC's 8305 This number sets the maximum number of instructions (counted in GCC's
8083 internal representation) in a single function that the tree inliner 8306 internal representation) in a single function that the tree inliner
8084 will consider for inlining. This only affects functions declared 8307 will consider for inlining. This only affects functions declared
8085 inline and methods implemented in a class declaration (C++). 8308 inline and methods implemented in a class declaration (C++).
8086 The default value is 300. 8309 The default value is 400.
8087 8310
8088 @item max-inline-insns-auto 8311 @item max-inline-insns-auto
8089 When you use @option{-finline-functions} (included in @option{-O3}), 8312 When you use @option{-finline-functions} (included in @option{-O3}),
8090 a lot of functions that would otherwise not be considered for inlining 8313 a lot of functions that would otherwise not be considered for inlining
8091 by the compiler will be investigated. To those functions, a different 8314 by the compiler will be investigated. To those functions, a different
8092 (more restrictive) limit compared to functions declared inline can 8315 (more restrictive) limit compared to functions declared inline can
8093 be applied. 8316 be applied.
8094 The default value is 50. 8317 The default value is 40.
8095 8318
8096 @item large-function-insns 8319 @item large-function-insns
8097 The limit specifying really large functions. For functions larger than this 8320 The limit specifying really large functions. For functions larger than this
8098 limit after inlining, inlining is constrained by 8321 limit after inlining, inlining is constrained by
8099 @option{--param large-function-growth}. This parameter is useful primarily 8322 @option{--param large-function-growth}. This parameter is useful primarily
8169 whose probability exceeds given threshold (in percents). The default value is 8392 whose probability exceeds given threshold (in percents). The default value is
8170 10. 8393 10.
8171 8394
8172 @item early-inlining-insns 8395 @item early-inlining-insns
8173 Specify growth that early inliner can make. In effect it increases amount of 8396 Specify growth that early inliner can make. In effect it increases amount of
8174 inlining for code having large abstraction penalty. The default value is 8. 8397 inlining for code having large abstraction penalty. The default value is 10.
8175 8398
8176 @item max-early-inliner-iterations 8399 @item max-early-inliner-iterations
8177 @itemx max-early-inliner-iterations 8400 @itemx max-early-inliner-iterations
8178 Limit of iterations of early inliner. This basically bounds number of nested 8401 Limit of iterations of early inliner. This basically bounds number of nested
8179 indirect calls early inliner can resolve. Deeper chains are still handled by 8402 indirect calls early inliner can resolve. Deeper chains are still handled by
8180 late inlining. 8403 late inlining.
8181 8404
8405 @item comdat-sharing-probability
8406 @itemx comdat-sharing-probability
8407 Probability (in percent) that C++ inline function with comdat visibility
8408 will be shared across multiple compilation units. The default value is 20.
8409
8182 @item min-vect-loop-bound 8410 @item min-vect-loop-bound
8183 The minimum number of iterations under which a loop will not get vectorized 8411 The minimum number of iterations under which a loop will not get vectorized
8184 when @option{-ftree-vectorize} is used. The number of iterations after 8412 when @option{-ftree-vectorize} is used. The number of iterations after
8185 vectorization needs to be greater than the value specified by this option 8413 vectorization needs to be greater than the value specified by this option
8186 to allow vectorization. The default value is 0. 8414 to allow vectorization. The default value is 0.
8187 8415
8416 @item gcse-cost-distance-ratio
8417 Scaling factor in calculation of maximum distance an expression
8418 can be moved by GCSE optimizations. This is currently supported only in the
8419 code hoisting pass. The bigger the ratio, the more aggressive code hoisting
8420 will be with simple expressions, i.e., the expressions which have cost
8421 less than @option{gcse-unrestricted-cost}. Specifying 0 will disable
8422 hoisting of simple expressions. The default value is 10.
8423
8424 @item gcse-unrestricted-cost
8425 Cost, roughly measured as the cost of a single typical machine
8426 instruction, at which GCSE optimizations will not constrain
8427 the distance an expression can travel. This is currently
8428 supported only in the code hoisting pass. The lesser the cost,
8429 the more aggressive code hoisting will be. Specifying 0 will
8430 allow all expressions to travel unrestricted distances.
8431 The default value is 3.
8432
8433 @item max-hoist-depth
8434 The depth of search in the dominator tree for expressions to hoist.
8435 This is used to avoid quadratic behavior in hoisting algorithm.
8436 The value of 0 will avoid limiting the search, but may slow down compilation
8437 of huge functions. The default value is 30.
8438
8188 @item max-unrolled-insns 8439 @item max-unrolled-insns
8189 The maximum number of instructions that a loop should have if that loop 8440 The maximum number of instructions that a loop should have if that loop
8190 is unrolled, and if the loop is unrolled, it determines how many times 8441 is unrolled, and if the loop is unrolled, it determines how many times
8191 the loop code is unrolled. 8442 the loop code is unrolled.
8192 8443
8241 8492
8242 @item scev-max-expr-size 8493 @item scev-max-expr-size
8243 Bound on size of expressions used in the scalar evolutions analyzer. 8494 Bound on size of expressions used in the scalar evolutions analyzer.
8244 Large expressions slow the analyzer. 8495 Large expressions slow the analyzer.
8245 8496
8497 @item scev-max-expr-complexity
8498 Bound on the complexity of the expressions in the scalar evolutions analyzer.
8499 Complex expressions slow the analyzer.
8500
8246 @item omega-max-vars 8501 @item omega-max-vars
8247 The maximum number of variables in an Omega constraint system. 8502 The maximum number of variables in an Omega constraint system.
8248 The default value is 128. 8503 The default value is 128.
8249 8504
8250 @item omega-max-geqs 8505 @item omega-max-geqs
8289 @item hot-bb-count-fraction 8544 @item hot-bb-count-fraction
8290 Select fraction of the maximal count of repetitions of basic block in program 8545 Select fraction of the maximal count of repetitions of basic block in program
8291 given basic block needs to have to be considered hot. 8546 given basic block needs to have to be considered hot.
8292 8547
8293 @item hot-bb-frequency-fraction 8548 @item hot-bb-frequency-fraction
8294 Select fraction of the maximal frequency of executions of basic block in 8549 Select fraction of the entry block frequency of executions of basic block in
8295 function given basic block needs to have to be considered hot 8550 function given basic block needs to have to be considered hot
8296 8551
8297 @item max-predicted-iterations 8552 @item max-predicted-iterations
8298 The maximum number of loop iterations we predict statically. This is useful 8553 The maximum number of loop iterations we predict statically. This is useful
8299 in cases where function contain single loop with known bound and other loop 8554 in cases where function contain single loop with known bound and other loop
8624 Loop blocking or strip mining transforms, enabled with 8879 Loop blocking or strip mining transforms, enabled with
8625 @option{-floop-block} or @option{-floop-strip-mine}, strip mine each 8880 @option{-floop-block} or @option{-floop-strip-mine}, strip mine each
8626 loop in the loop nest by a given number of iterations. The strip 8881 loop in the loop nest by a given number of iterations. The strip
8627 length can be changed using the @option{loop-block-tile-size} 8882 length can be changed using the @option{loop-block-tile-size}
8628 parameter. The default value is 51 iterations. 8883 parameter. The default value is 51 iterations.
8884
8885 @item devirt-type-list-size
8886 IPA-CP attempts to track all possible types passed to a function's
8887 parameter in order to perform devirtualization.
8888 @option{devirt-type-list-size} is the maximum number of types it
8889 stores per a single formal parameter of a function.
8890
8891 @item lto-partitions
8892 Specify desired number of partitions produced during WHOPR compilation.
8893 The number of partitions should exceed the number of CPUs used for compilation.
8894 The default value is 32.
8895
8896 @item lto-minpartition
8897 Size of minimal partition for WHOPR (in estimated instructions).
8898 This prevents expenses of splitting very small programs into too many
8899 partitions.
8900
8901 @item cxx-max-namespaces-for-diagnostic-help
8902 The maximum number of namespaces to consult for suggestions when C++
8903 name lookup fails for an identifier. The default is 1000.
8629 8904
8630 @end table 8905 @end table
8631 @end table 8906 @end table
8632 8907
8633 @node Preprocessor Options 8908 @node Preprocessor Options
9112 Issues a @var{command} to the spec file processor. The commands that can 9387 Issues a @var{command} to the spec file processor. The commands that can
9113 appear here are: 9388 appear here are:
9114 9389
9115 @table @code 9390 @table @code
9116 @item %include <@var{file}> 9391 @item %include <@var{file}>
9117 @cindex %include 9392 @cindex @code{%include}
9118 Search for @var{file} and insert its text at the current point in the 9393 Search for @var{file} and insert its text at the current point in the
9119 specs file. 9394 specs file.
9120 9395
9121 @item %include_noerr <@var{file}> 9396 @item %include_noerr <@var{file}>
9122 @cindex %include_noerr 9397 @cindex @code{%include_noerr}
9123 Just like @samp{%include}, but do not generate an error message if the include 9398 Just like @samp{%include}, but do not generate an error message if the include
9124 file cannot be found. 9399 file cannot be found.
9125 9400
9126 @item %rename @var{old_name} @var{new_name} 9401 @item %rename @var{old_name} @var{new_name}
9127 @cindex %rename 9402 @cindex @code{%rename}
9128 Rename the spec string @var{old_name} to @var{new_name}. 9403 Rename the spec string @var{old_name} to @var{new_name}.
9129 9404
9130 @end table 9405 @end table
9131 9406
9132 @item *[@var{spec_name}]: 9407 @item *[@var{spec_name}]:
9493 9768
9494 @smallexample 9769 @smallexample
9495 %@{fgnu-runtime:%:replace-outfile(-lobjc -lobjc-gnu)@} 9770 %@{fgnu-runtime:%:replace-outfile(-lobjc -lobjc-gnu)@}
9496 @end smallexample 9771 @end smallexample
9497 9772
9773 @item @code{remove-outfile}
9774 The @code{remove-outfile} spec function takes one argument. It looks for the
9775 first argument in the outfiles array and removes it. Here is a small example
9776 its usage:
9777
9778 @smallexample
9779 %:remove-outfile(-lm)
9780 @end smallexample
9781
9782 @item @code{pass-through-libs}
9783 The @code{pass-through-libs} spec function takes any number of arguments. It
9784 finds any @option{-l} options and any non-options ending in ".a" (which it
9785 assumes are the names of linker input library archive files) and returns a
9786 result containing all the found arguments each prepended by
9787 @option{-plugin-opt=-pass-through=} and joined by spaces. This list is
9788 intended to be passed to the LTO linker plugin.
9789
9790 @smallexample
9791 %:pass-through-libs(%G %L %G)
9792 @end smallexample
9793
9498 @item @code{print-asm-header} 9794 @item @code{print-asm-header}
9499 The @code{print-asm-header} function takes no arguments and simply 9795 The @code{print-asm-header} function takes no arguments and simply
9500 prints a banner like: 9796 prints a banner like:
9501 9797
9502 @smallexample 9798 @smallexample
9635 @cindex specifying machine version 9931 @cindex specifying machine version
9636 @cindex specifying compiler version and target machine 9932 @cindex specifying compiler version and target machine
9637 @cindex compiler version, specifying 9933 @cindex compiler version, specifying
9638 @cindex target machine, specifying 9934 @cindex target machine, specifying
9639 9935
9640 The usual way to run GCC is to run the executable called @file{gcc}, or 9936 The usual way to run GCC is to run the executable called @command{gcc}, or
9641 @file{<machine>-gcc} when cross-compiling, or 9937 @command{@var{machine}-gcc} when cross-compiling, or
9642 @file{<machine>-gcc-<version>} to run a version other than the one that 9938 @command{@var{machine}-gcc-@var{version}} to run a version other than the
9643 was installed last. 9939 one that was installed last.
9644 9940
9645 @node Submodel Options 9941 @node Submodel Options
9646 @section Hardware Models and Configurations 9942 @section Hardware Models and Configurations
9647 @cindex submodel options 9943 @cindex submodel options
9648 @cindex specifying hardware config 9944 @cindex specifying hardware config
9688 * M32R/D Options:: 9984 * M32R/D Options::
9689 * M680x0 Options:: 9985 * M680x0 Options::
9690 * M68hc1x Options:: 9986 * M68hc1x Options::
9691 * MCore Options:: 9987 * MCore Options::
9692 * MeP Options:: 9988 * MeP Options::
9989 * MicroBlaze Options::
9693 * MIPS Options:: 9990 * MIPS Options::
9694 * MMIX Options:: 9991 * MMIX Options::
9695 * MN10300 Options:: 9992 * MN10300 Options::
9696 * PDP-11 Options:: 9993 * PDP-11 Options::
9697 * picoChip Options:: 9994 * picoChip Options::
9699 * RS/6000 and PowerPC Options:: 9996 * RS/6000 and PowerPC Options::
9700 * RX Options:: 9997 * RX Options::
9701 * S/390 and zSeries Options:: 9998 * S/390 and zSeries Options::
9702 * Score Options:: 9999 * Score Options::
9703 * SH Options:: 10000 * SH Options::
10001 * Solaris 2 Options::
9704 * SPARC Options:: 10002 * SPARC Options::
9705 * SPU Options:: 10003 * SPU Options::
9706 * System V Options:: 10004 * System V Options::
9707 * V850 Options:: 10005 * V850 Options::
9708 * VAX Options:: 10006 * VAX Options::
9728 @opindex EB 10026 @opindex EB
9729 Compile code for big endian mode. 10027 Compile code for big endian mode.
9730 10028
9731 @item -mmangle-cpu 10029 @item -mmangle-cpu
9732 @opindex mmangle-cpu 10030 @opindex mmangle-cpu
9733 Prepend the name of the cpu to all public symbol names. 10031 Prepend the name of the CPU to all public symbol names.
9734 In multiple-processor systems, there are many ARC variants with different 10032 In multiple-processor systems, there are many ARC variants with different
9735 instruction and register set characteristics. This flag prevents code 10033 instruction and register set characteristics. This flag prevents code
9736 compiled for one cpu to be linked with code compiled for another. 10034 compiled for one CPU to be linked with code compiled for another.
9737 No facility exists for handling variants that are ``almost identical''. 10035 No facility exists for handling variants that are ``almost identical''.
9738 This is an all or nothing option. 10036 This is an all or nothing option.
9739 10037
9740 @item -mcpu=@var{cpu} 10038 @item -mcpu=@var{cpu}
9741 @opindex mcpu 10039 @opindex mcpu
9891 @samp{arm968e-s}, @samp{arm926ej-s}, @samp{arm940t}, @samp{arm9tdmi}, 10189 @samp{arm968e-s}, @samp{arm926ej-s}, @samp{arm940t}, @samp{arm9tdmi},
9892 @samp{arm10tdmi}, @samp{arm1020t}, @samp{arm1026ej-s}, 10190 @samp{arm10tdmi}, @samp{arm1020t}, @samp{arm1026ej-s},
9893 @samp{arm10e}, @samp{arm1020e}, @samp{arm1022e}, 10191 @samp{arm10e}, @samp{arm1020e}, @samp{arm1022e},
9894 @samp{arm1136j-s}, @samp{arm1136jf-s}, @samp{mpcore}, @samp{mpcorenovfp}, 10192 @samp{arm1136j-s}, @samp{arm1136jf-s}, @samp{mpcore}, @samp{mpcorenovfp},
9895 @samp{arm1156t2-s}, @samp{arm1156t2f-s}, @samp{arm1176jz-s}, @samp{arm1176jzf-s}, 10193 @samp{arm1156t2-s}, @samp{arm1156t2f-s}, @samp{arm1176jz-s}, @samp{arm1176jzf-s},
9896 @samp{cortex-a5}, @samp{cortex-a8}, @samp{cortex-a9}, 10194 @samp{cortex-a5}, @samp{cortex-a8}, @samp{cortex-a9}, @samp{cortex-a15},
9897 @samp{cortex-r4}, @samp{cortex-r4f}, @samp{cortex-m3}, 10195 @samp{cortex-r4}, @samp{cortex-r4f}, @samp{cortex-m4}, @samp{cortex-m3},
9898 @samp{cortex-m1}, 10196 @samp{cortex-m1},
9899 @samp{cortex-m0}, 10197 @samp{cortex-m0},
9900 @samp{xscale}, @samp{iwmmxt}, @samp{iwmmxt2}, @samp{ep9312}. 10198 @samp{xscale}, @samp{iwmmxt}, @samp{iwmmxt2}, @samp{ep9312}.
9901 10199
9902 @item -mtune=@var{name} 10200 @item -mtune=@var{name}
9904 This option is very similar to the @option{-mcpu=} option, except that 10202 This option is very similar to the @option{-mcpu=} option, except that
9905 instead of specifying the actual target processor type, and hence 10203 instead of specifying the actual target processor type, and hence
9906 restricting which instructions can be used, it specifies that GCC should 10204 restricting which instructions can be used, it specifies that GCC should
9907 tune the performance of the code as if the target were of the type 10205 tune the performance of the code as if the target were of the type
9908 specified in this option, but still choosing the instructions that it 10206 specified in this option, but still choosing the instructions that it
9909 will generate based on the cpu specified by a @option{-mcpu=} option. 10207 will generate based on the CPU specified by a @option{-mcpu=} option.
9910 For some ARM implementations better performance can be obtained by using 10208 For some ARM implementations better performance can be obtained by using
9911 this option. 10209 this option.
9912 10210
9913 @item -march=@var{name} 10211 @item -march=@var{name}
9914 @opindex march 10212 @opindex march
9939 @option{-mfpu}=@samp{fpe}@var{number}, for compatibility with older versions 10237 @option{-mfpu}=@samp{fpe}@var{number}, for compatibility with older versions
9940 of GCC@. 10238 of GCC@.
9941 10239
9942 If @option{-msoft-float} is specified this specifies the format of 10240 If @option{-msoft-float} is specified this specifies the format of
9943 floating point values. 10241 floating point values.
10242
10243 If the selected floating-point hardware includes the NEON extension
10244 (e.g. @option{-mfpu}=@samp{neon}), note that floating-point
10245 operations will not be used by GCC's auto-vectorization pass unless
10246 @option{-funsafe-math-optimizations} is also specified. This is
10247 because NEON hardware does not fully implement the IEEE 754 standard for
10248 floating-point arithmetic (in particular denormal values are treated as
10249 zero), so the use of NEON instructions may lead to a loss of precision.
9944 10250
9945 @item -mfp16-format=@var{name} 10251 @item -mfp16-format=@var{name}
9946 @opindex mfp16-format 10252 @opindex mfp16-format
9947 Specify the format of the @code{__fp16} half-precision floating-point type. 10253 Specify the format of the @code{__fp16} half-precision floating-point type.
9948 Permissible names are @samp{none}, @samp{ieee}, and @samp{alternative}; 10254 Permissible names are @samp{none}, @samp{ieee}, and @samp{alternative};
10671 @itemx -dylib_file 10977 @itemx -dylib_file
10672 @itemx -dylinker_install_name 10978 @itemx -dylinker_install_name
10673 @itemx -dynamic 10979 @itemx -dynamic
10674 @itemx -exported_symbols_list 10980 @itemx -exported_symbols_list
10675 @itemx -filelist 10981 @itemx -filelist
10982 @need 800
10676 @itemx -flat_namespace 10983 @itemx -flat_namespace
10677 @itemx -force_flat_namespace 10984 @itemx -force_flat_namespace
10678 @itemx -headerpad_max_install_names 10985 @itemx -headerpad_max_install_names
10679 @itemx -image_base 10986 @itemx -image_base
10680 @itemx -init 10987 @itemx -init
10681 @itemx -install_name 10988 @itemx -install_name
10682 @itemx -keep_private_externs 10989 @itemx -keep_private_externs
10683 @itemx -multi_module 10990 @itemx -multi_module
10684 @itemx -multiply_defined 10991 @itemx -multiply_defined
10685 @itemx -multiply_defined_unused 10992 @itemx -multiply_defined_unused
10993 @need 800
10686 @itemx -noall_load 10994 @itemx -noall_load
10687 @itemx -no_dead_strip_inits_and_terms 10995 @itemx -no_dead_strip_inits_and_terms
10688 @itemx -nofixprebinding 10996 @itemx -nofixprebinding
10689 @itemx -nomultidefs 10997 @itemx -nomultidefs
10690 @itemx -noprebind 10998 @itemx -noprebind
10691 @itemx -noseglinkedit 10999 @itemx -noseglinkedit
10692 @itemx -pagezero_size 11000 @itemx -pagezero_size
10693 @itemx -prebind 11001 @itemx -prebind
10694 @itemx -prebind_all_twolevel_modules 11002 @itemx -prebind_all_twolevel_modules
10695 @itemx -private_bundle 11003 @itemx -private_bundle
11004 @need 800
10696 @itemx -read_only_relocs 11005 @itemx -read_only_relocs
10697 @itemx -sectalign 11006 @itemx -sectalign
10698 @itemx -sectobjectsymbols 11007 @itemx -sectobjectsymbols
10699 @itemx -whyload 11008 @itemx -whyload
10700 @itemx -seg1addr 11009 @itemx -seg1addr
10701 @itemx -sectcreate 11010 @itemx -sectcreate
10702 @itemx -sectobjectsymbols 11011 @itemx -sectobjectsymbols
10703 @itemx -sectorder 11012 @itemx -sectorder
10704 @itemx -segaddr 11013 @itemx -segaddr
10705 @itemx -segs_read_only_addr 11014 @itemx -segs_read_only_addr
11015 @need 800
10706 @itemx -segs_read_write_addr 11016 @itemx -segs_read_write_addr
10707 @itemx -seg_addr_table 11017 @itemx -seg_addr_table
10708 @itemx -seg_addr_table_filename 11018 @itemx -seg_addr_table_filename
10709 @itemx -seglinkedit 11019 @itemx -seglinkedit
10710 @itemx -segprot 11020 @itemx -segprot
10711 @itemx -segs_read_only_addr 11021 @itemx -segs_read_only_addr
10712 @itemx -segs_read_write_addr 11022 @itemx -segs_read_write_addr
10713 @itemx -single_module 11023 @itemx -single_module
10714 @itemx -static 11024 @itemx -static
10715 @itemx -sub_library 11025 @itemx -sub_library
11026 @need 800
10716 @itemx -sub_umbrella 11027 @itemx -sub_umbrella
10717 @itemx -twolevel_namespace 11028 @itemx -twolevel_namespace
10718 @itemx -umbrella 11029 @itemx -umbrella
10719 @itemx -undefined 11030 @itemx -undefined
10720 @itemx -unexported_symbols_list 11031 @itemx -unexported_symbols_list
11467 These @samp{-m} options are defined for GNU/Linux targets: 11778 These @samp{-m} options are defined for GNU/Linux targets:
11468 11779
11469 @table @gcctabopt 11780 @table @gcctabopt
11470 @item -mglibc 11781 @item -mglibc
11471 @opindex mglibc 11782 @opindex mglibc
11472 Use the GNU C library instead of uClibc. This is the default except 11783 Use the GNU C library. This is the default except
11473 on @samp{*-*-linux-*uclibc*} targets. 11784 on @samp{*-*-linux-*uclibc*} and @samp{*-*-linux-*android*} targets.
11474 11785
11475 @item -muclibc 11786 @item -muclibc
11476 @opindex muclibc 11787 @opindex muclibc
11477 Use uClibc instead of the GNU C library. This is the default on 11788 Use uClibc C library. This is the default on
11478 @samp{*-*-linux-*uclibc*} targets. 11789 @samp{*-*-linux-*uclibc*} targets.
11790
11791 @item -mbionic
11792 @opindex mbionic
11793 Use Bionic C library. This is the default on
11794 @samp{*-*-linux-*android*} targets.
11795
11796 @item -mandroid
11797 @opindex mandroid
11798 Compile code compatible with Android platform. This is the default on
11799 @samp{*-*-linux-*android*} targets.
11800
11801 When compiling, this option enables @option{-mbionic}, @option{-fPIC},
11802 @option{-fno-exceptions} and @option{-fno-rtti} by default. When linking,
11803 this option makes the GCC driver pass Android-specific options to the linker.
11804 Finally, this option causes the preprocessor macro @code{__ANDROID__}
11805 to be defined.
11806
11807 @item -tno-android-cc
11808 @opindex tno-android-cc
11809 Disable compilation effects of @option{-mandroid}, i.e., do not enable
11810 @option{-mbionic}, @option{-fPIC}, @option{-fno-exceptions} and
11811 @option{-fno-rtti} by default.
11812
11813 @item -tno-android-ld
11814 @opindex tno-android-ld
11815 Disable linking effects of @option{-mandroid}, i.e., pass standard Linux
11816 linking options to the linker.
11817
11479 @end table 11818 @end table
11480 11819
11481 @node H8/300 Options 11820 @node H8/300 Options
11482 @subsection H8/300 Options 11821 @subsection H8/300 Options
11483 11822
11763 Tune to @var{cpu-type} everything applicable about the generated code, except 12102 Tune to @var{cpu-type} everything applicable about the generated code, except
11764 for the ABI and the set of available instructions. The choices for 12103 for the ABI and the set of available instructions. The choices for
11765 @var{cpu-type} are: 12104 @var{cpu-type} are:
11766 @table @emph 12105 @table @emph
11767 @item generic 12106 @item generic
11768 Produce code optimized for the most common IA32/AMD64/EM64T processors. 12107 Produce code optimized for the most common IA32/@/AMD64/@/EM64T processors.
11769 If you know the CPU on which your code will run, then you should use 12108 If you know the CPU on which your code will run, then you should use
11770 the corresponding @option{-mtune} option instead of 12109 the corresponding @option{-mtune} option instead of
11771 @option{-mtune=generic}. But, if you do not know exactly what CPU users 12110 @option{-mtune=generic}. But, if you do not know exactly what CPU users
11772 of your application will have, then you should use this option. 12111 of your application will have, then you should use this option.
11773 12112
11818 Improved version of Intel Pentium4 CPU with 64-bit extensions, MMX, SSE, 12157 Improved version of Intel Pentium4 CPU with 64-bit extensions, MMX, SSE,
11819 SSE2 and SSE3 instruction set support. 12158 SSE2 and SSE3 instruction set support.
11820 @item core2 12159 @item core2
11821 Intel Core2 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3 12160 Intel Core2 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3
11822 instruction set support. 12161 instruction set support.
12162 @item corei7
12163 Intel Core i7 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1
12164 and SSE4.2 instruction set support.
12165 @item corei7-avx
12166 Intel Core i7 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3,
12167 SSE4.1, SSE4.2, AVX, AES and PCLMUL instruction set support.
11823 @item atom 12168 @item atom
11824 Intel Atom CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3 12169 Intel Atom CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3
11825 instruction set support. 12170 instruction set support.
11826 @item k6 12171 @item k6
11827 AMD K6 CPU with MMX instruction set support. 12172 AMD K6 CPU with MMX instruction set support.
11960 @opindex mno-fancy-math-387 12305 @opindex mno-fancy-math-387
11961 Some 387 emulators do not support the @code{sin}, @code{cos} and 12306 Some 387 emulators do not support the @code{sin}, @code{cos} and
11962 @code{sqrt} instructions for the 387. Specify this option to avoid 12307 @code{sqrt} instructions for the 387. Specify this option to avoid
11963 generating those instructions. This option is the default on FreeBSD, 12308 generating those instructions. This option is the default on FreeBSD,
11964 OpenBSD and NetBSD@. This option is overridden when @option{-march} 12309 OpenBSD and NetBSD@. This option is overridden when @option{-march}
11965 indicates that the target cpu will always have an FPU and so the 12310 indicates that the target CPU will always have an FPU and so the
11966 instruction will not need emulation. As of revision 2.6.1, these 12311 instruction will not need emulation. As of revision 2.6.1, these
11967 instructions are not generated unless you also use the 12312 instructions are not generated unless you also use the
11968 @option{-funsafe-math-optimizations} switch. 12313 @option{-funsafe-math-optimizations} switch.
11969 12314
11970 @item -malign-double 12315 @item -malign-double
12065 @xref{Function Attributes}. 12410 @xref{Function Attributes}.
12066 12411
12067 @strong{Warning:} if you use this switch then you must build all 12412 @strong{Warning:} if you use this switch then you must build all
12068 modules with the same value, including any libraries. This includes 12413 modules with the same value, including any libraries. This includes
12069 the system libraries and startup modules. 12414 the system libraries and startup modules.
12415
12416 @item -mvect8-ret-in-mem
12417 @opindex mvect8-ret-in-mem
12418 Return 8-byte vectors in memory instead of MMX registers. This is the
12419 default on Solaris@tie{}8 and 9 and VxWorks to match the ABI of the Sun
12420 Studio compilers until version 12. Later compiler versions (starting
12421 with Studio 12 Update@tie{}1) follow the ABI used by other x86 targets, which
12422 is the default on Solaris@tie{}10 and later. @emph{Only} use this option if
12423 you need to remain compatible with existing code produced by those
12424 previous compiler versions or older versions of GCC.
12070 12425
12071 @item -mpc32 12426 @item -mpc32
12072 @itemx -mpc64 12427 @itemx -mpc64
12073 @itemx -mpc80 12428 @itemx -mpc80
12074 @opindex mpc32 12429 @opindex mpc32
12141 @itemx -msse3 12496 @itemx -msse3
12142 @itemx -mno-sse3 12497 @itemx -mno-sse3
12143 @itemx -mssse3 12498 @itemx -mssse3
12144 @itemx -mno-ssse3 12499 @itemx -mno-ssse3
12145 @itemx -msse4.1 12500 @itemx -msse4.1
12501 @need 800
12146 @itemx -mno-sse4.1 12502 @itemx -mno-sse4.1
12147 @itemx -msse4.2 12503 @itemx -msse4.2
12148 @itemx -mno-sse4.2 12504 @itemx -mno-sse4.2
12149 @itemx -msse4 12505 @itemx -msse4
12150 @itemx -mno-sse4 12506 @itemx -mno-sse4
12151 @itemx -mavx 12507 @itemx -mavx
12152 @itemx -mno-avx 12508 @itemx -mno-avx
12153 @itemx -maes 12509 @itemx -maes
12154 @itemx -mno-aes 12510 @itemx -mno-aes
12155 @itemx -mpclmul 12511 @itemx -mpclmul
12512 @need 800
12156 @itemx -mno-pclmul 12513 @itemx -mno-pclmul
12514 @itemx -mfsgsbase
12515 @itemx -mno-fsgsbase
12516 @itemx -mrdrnd
12517 @itemx -mno-rdrnd
12518 @itemx -mf16c
12519 @itemx -mno-f16c
12157 @itemx -msse4a 12520 @itemx -msse4a
12158 @itemx -mno-sse4a 12521 @itemx -mno-sse4a
12159 @itemx -mfma4 12522 @itemx -mfma4
12523 @need 800
12160 @itemx -mno-fma4 12524 @itemx -mno-fma4
12161 @itemx -mxop 12525 @itemx -mxop
12162 @itemx -mno-xop 12526 @itemx -mno-xop
12163 @itemx -mlwp 12527 @itemx -mlwp
12164 @itemx -mno-lwp 12528 @itemx -mno-lwp
12166 @itemx -mno-3dnow 12530 @itemx -mno-3dnow
12167 @itemx -mpopcnt 12531 @itemx -mpopcnt
12168 @itemx -mno-popcnt 12532 @itemx -mno-popcnt
12169 @itemx -mabm 12533 @itemx -mabm
12170 @itemx -mno-abm 12534 @itemx -mno-abm
12535 @itemx -mbmi
12536 @itemx -mno-bmi
12537 @itemx -mtbm
12538 @itemx -mno-tbm
12171 @opindex mmmx 12539 @opindex mmmx
12172 @opindex mno-mmx 12540 @opindex mno-mmx
12173 @opindex msse 12541 @opindex msse
12174 @opindex mno-sse 12542 @opindex mno-sse
12175 @opindex m3dnow 12543 @opindex m3dnow
12176 @opindex mno-3dnow 12544 @opindex mno-3dnow
12177 These switches enable or disable the use of instructions in the MMX, 12545 These switches enable or disable the use of instructions in the MMX,
12178 SSE, SSE2, SSE3, SSSE3, SSE4.1, AVX, AES, PCLMUL, SSE4A, FMA4, XOP, 12546 SSE, SSE2, SSE3, SSSE3, SSE4.1, AVX, AES, PCLMUL, FSGSBASE, RDRND,
12179 LWP, ABM or 3DNow!@: extended instruction sets. 12547 F16C, SSE4A, FMA4, XOP, LWP, ABM, BMI, or 3DNow!@: extended instruction sets.
12180 These extensions are also available as built-in functions: see 12548 These extensions are also available as built-in functions: see
12181 @ref{X86 Built-in Functions}, for details of the functions enabled and 12549 @ref{X86 Built-in Functions}, for details of the functions enabled and
12182 disabled by these switches. 12550 disabled by these switches.
12183 12551
12184 To have SSE/SSE2 instructions generated automatically from floating-point 12552 To have SSE/SSE2 instructions generated automatically from floating-point
12213 set which leads to wrong direction mode, when string instructions are used. 12581 set which leads to wrong direction mode, when string instructions are used.
12214 This option can be enabled by default on 32-bit x86 targets by configuring 12582 This option can be enabled by default on 32-bit x86 targets by configuring
12215 GCC with the @option{--enable-cld} configure option. Generation of @code{cld} 12583 GCC with the @option{--enable-cld} configure option. Generation of @code{cld}
12216 instructions can be suppressed with the @option{-mno-cld} compiler option 12584 instructions can be suppressed with the @option{-mno-cld} compiler option
12217 in this case. 12585 in this case.
12586
12587 @item -mvzeroupper
12588 @opindex mvzeroupper
12589 This option instructs GCC to emit a @code{vzeroupper} instruction
12590 before a transfer of control flow out of the function to minimize
12591 AVX to SSE transition penalty as well as remove unnecessary zeroupper
12592 intrinsics.
12218 12593
12219 @item -mcx16 12594 @item -mcx16
12220 @opindex mcx16 12595 @opindex mcx16
12221 This option will enable GCC to use CMPXCHG16B instruction in generated code. 12596 This option will enable GCC to use CMPXCHG16B instruction in generated code.
12222 CMPXCHG16B allows for atomic operations on 128-bit double quadword (or oword) 12597 CMPXCHG16B allows for atomic operations on 128-bit double quadword (or oword)
12367 @item -msse2avx 12742 @item -msse2avx
12368 @itemx -mno-sse2avx 12743 @itemx -mno-sse2avx
12369 @opindex msse2avx 12744 @opindex msse2avx
12370 Specify that the assembler should encode SSE instructions with VEX 12745 Specify that the assembler should encode SSE instructions with VEX
12371 prefix. The option @option{-mavx} turns this on by default. 12746 prefix. The option @option{-mavx} turns this on by default.
12747
12748 @item -mfentry
12749 @itemx -mno-fentry
12750 @opindex mfentry
12751 If profiling is active @option{-pg} put the profiling
12752 counter call before prologue.
12753 Note: On x86 architectures the attribute @code{ms_hook_prologue}
12754 isn't possible at the moment for @option{-mfentry} and @option{-pg}.
12755
12756 @item -m8bit-idiv
12757 @itemx -mno-8bit-idiv
12758 @opindex 8bit-idiv
12759 On some processors, like Intel Atom, 8bit unsigned integer divide is
12760 much faster than 32bit/64bit integer divide. This option will generate a
12761 runt-time check. If both dividend and divisor are within range of 0
12762 to 255, 8bit unsigned integer divide will be used instead of
12763 32bit/64bit integer divide.
12764
12372 @end table 12765 @end table
12373 12766
12374 These @samp{-m} switches are supported in addition to the above 12767 These @samp{-m} switches are supported in addition to the above
12375 on AMD x86-64 processors in 64-bit environments. 12768 on AMD x86-64 processors in 64-bit environments.
12376 12769
13593 register. The default for this option is 4, but note that there's a 13986 register. The default for this option is 4, but note that there's a
13594 65536 byte limit to the @code{.tiny} section. 13987 65536 byte limit to the @code{.tiny} section.
13595 13988
13596 @end table 13989 @end table
13597 13990
13991 @node MicroBlaze Options
13992 @subsection MicroBlaze Options
13993 @cindex MicroBlaze Options
13994
13995 @table @gcctabopt
13996
13997 @item -msoft-float
13998 @opindex msoft-float
13999 Use software emulation for floating point (default).
14000
14001 @item -mhard-float
14002 @opindex mhard-float
14003 Use hardware floating point instructions.
14004
14005 @item -mmemcpy
14006 @opindex mmemcpy
14007 Do not optimize block moves, use @code{memcpy}.
14008
14009 @item -mno-clearbss
14010 @opindex mno-clearbss
14011 This option is deprecated. Use @option{-fno-zero-initialized-in-bss} instead.
14012
14013 @item -mcpu=@var{cpu-type}
14014 @opindex mcpu=
14015 Use features of and schedule code for given CPU.
14016 Supported values are in the format @samp{v@var{X}.@var{YY}.@var{Z}},
14017 where @var{X} is a major version, @var{YY} is the minor version, and
14018 @var{Z} is compatibility code. Example values are @samp{v3.00.a},
14019 @samp{v4.00.b}, @samp{v5.00.a}, @samp{v5.00.b}, @samp{v5.00.b}, @samp{v6.00.a}.
14020
14021 @item -mxl-soft-mul
14022 @opindex mxl-soft-mul
14023 Use software multiply emulation (default).
14024
14025 @item -mxl-soft-div
14026 @opindex mxl-soft-div
14027 Use software emulation for divides (default).
14028
14029 @item -mxl-barrel-shift
14030 @opindex mxl-barrel-shift
14031 Use the hardware barrel shifter.
14032
14033 @item -mxl-pattern-compare
14034 @opindex mxl-pattern-compare
14035 Use pattern compare instructions.
14036
14037 @item -msmall-divides
14038 @opindex msmall-divides
14039 Use table lookup optimization for small signed integer divisions.
14040
14041 @item -mxl-stack-check
14042 @opindex mxl-stack-check
14043 This option is deprecated. Use -fstack-check instead.
14044
14045 @item -mxl-gp-opt
14046 @opindex mxl-gp-opt
14047 Use GP relative sdata/sbss sections.
14048
14049 @item -mxl-multiply-high
14050 @opindex mxl-multiply-high
14051 Use multiply high instructions for high part of 32x32 multiply.
14052
14053 @item -mxl-float-convert
14054 @opindex mxl-float-convert
14055 Use hardware floating point conversion instructions.
14056
14057 @item -mxl-float-sqrt
14058 @opindex mxl-float-sqrt
14059 Use hardware floating point square root instruction.
14060
14061 @item -mxl-mode-@var{app-model}
14062 Select application model @var{app-model}. Valid models are
14063 @table @samp
14064 @item executable
14065 normal executable (default), uses startup code @file{crt0.o}.
14066
14067 @item xmdstub
14068 for use with Xilinx Microprocessor Debugger (XMD) based
14069 software intrusive debug agent called xmdstub. This uses startup file
14070 @file{crt1.o} and sets the start address of the program to be 0x800.
14071
14072 @item bootstrap
14073 for applications that are loaded using a bootloader.
14074 This model uses startup file @file{crt2.o} which does not contain a processor
14075 reset vector handler. This is suitable for transferring control on a
14076 processor reset to the bootloader rather than the application.
14077
14078 @item novectors
14079 for applications that do not require any of the
14080 MicroBlaze vectors. This option may be useful for applications running
14081 within a monitoring application. This model uses @file{crt3.o} as a startup file.
14082 @end table
14083
14084 Option @option{-xl-mode-@var{app-model}} is a deprecated alias for
14085 @option{-mxl-mode-@var{app-model}}.
14086
14087 @end table
14088
13598 @node MIPS Options 14089 @node MIPS Options
13599 @subsection MIPS Options 14090 @subsection MIPS Options
13600 @cindex MIPS options 14091 @cindex MIPS options
13601 14092
13602 @table @gcctabopt 14093 @table @gcctabopt
13625 @samp{24kc}, @samp{24kf2_1}, @samp{24kf1_1}, 14116 @samp{24kc}, @samp{24kf2_1}, @samp{24kf1_1},
13626 @samp{24kec}, @samp{24kef2_1}, @samp{24kef1_1}, 14117 @samp{24kec}, @samp{24kef2_1}, @samp{24kef1_1},
13627 @samp{34kc}, @samp{34kf2_1}, @samp{34kf1_1}, 14118 @samp{34kc}, @samp{34kf2_1}, @samp{34kf1_1},
13628 @samp{74kc}, @samp{74kf2_1}, @samp{74kf1_1}, @samp{74kf3_2}, 14119 @samp{74kc}, @samp{74kf2_1}, @samp{74kf1_1}, @samp{74kf3_2},
13629 @samp{1004kc}, @samp{1004kf2_1}, @samp{1004kf1_1}, 14120 @samp{1004kc}, @samp{1004kf2_1}, @samp{1004kf1_1},
13630 @samp{loongson2e}, @samp{loongson2f}, 14121 @samp{loongson2e}, @samp{loongson2f}, @samp{loongson3a},
13631 @samp{m4k}, 14122 @samp{m4k},
13632 @samp{octeon}, 14123 @samp{octeon},
13633 @samp{orion}, 14124 @samp{orion},
13634 @samp{r2000}, @samp{r3000}, @samp{r3900}, @samp{r4000}, @samp{r4400}, 14125 @samp{r2000}, @samp{r3000}, @samp{r3900}, @samp{r4000}, @samp{r4400},
13635 @samp{r4600}, @samp{r4650}, @samp{r6000}, @samp{r8000}, 14126 @samp{r4600}, @samp{r4650}, @samp{r6000}, @samp{r8000},
13769 Note that the EABI has a 32-bit and a 64-bit variant. GCC normally 14260 Note that the EABI has a 32-bit and a 64-bit variant. GCC normally
13770 generates 64-bit code when you select a 64-bit architecture, but you 14261 generates 64-bit code when you select a 64-bit architecture, but you
13771 can use @option{-mgp32} to get 32-bit code instead. 14262 can use @option{-mgp32} to get 32-bit code instead.
13772 14263
13773 For information about the O64 ABI, see 14264 For information about the O64 ABI, see
13774 @w{@uref{http://gcc.gnu.org/projects/mipso64-abi.html}}. 14265 @uref{http://gcc.gnu.org/@/projects/@/mipso64-abi.html}.
13775 14266
13776 GCC supports a variant of the o32 ABI in which floating-point registers 14267 GCC supports a variant of the o32 ABI in which floating-point registers
13777 are 64 rather than 32 bits wide. You can select this combination with 14268 are 64 rather than 32 bits wide. You can select this combination with
13778 @option{-mabi=32} @option{-mfp64}. This ABI relies on the @samp{mthc1} 14269 @option{-mabi=32} @option{-mfp64}. This ABI relies on the @samp{mthc1}
13779 and @samp{mfhc1} instructions and is therefore only supported for 14270 and @samp{mfhc1} instructions and is therefore only supported for
14540 @item -mno-am33 15031 @item -mno-am33
14541 @opindex mno-am33 15032 @opindex mno-am33
14542 Do not generate code which uses features specific to the AM33 processor. This 15033 Do not generate code which uses features specific to the AM33 processor. This
14543 is the default. 15034 is the default.
14544 15035
15036 @item -mam33-2
15037 @opindex mam33-2
15038 Generate code which uses features specific to the AM33/2.0 processor.
15039
15040 @item -mam34
15041 @opindex mam34
15042 Generate code which uses features specific to the AM34 processor.
15043
15044 @item -mtune=@var{cpu-type}
15045 @opindex mtune
15046 Use the timing characteristics of the indicated CPU type when
15047 scheduling instructions. This does not change the targeted processor
15048 type. The CPU type must be one of @samp{mn10300}, @samp{am33},
15049 @samp{am33-2} or @samp{am34}.
15050
14545 @item -mreturn-pointer-on-d0 15051 @item -mreturn-pointer-on-d0
14546 @opindex mreturn-pointer-on-d0 15052 @opindex mreturn-pointer-on-d0
14547 When generating a function which returns a pointer, return the pointer 15053 When generating a function which returns a pointer, return the pointer
14548 in both @code{a0} and @code{d0}. Otherwise, the pointer is returned 15054 in both @code{a0} and @code{d0}. Otherwise, the pointer is returned
14549 only in a0, and attempts to call such functions without a prototype 15055 only in a0, and attempts to call such functions without a prototype
14559 Indicate to the linker that it should perform a relaxation optimization pass 15065 Indicate to the linker that it should perform a relaxation optimization pass
14560 to shorten branches, calls and absolute memory addresses. This option only 15066 to shorten branches, calls and absolute memory addresses. This option only
14561 has an effect when used on the command line for the final link step. 15067 has an effect when used on the command line for the final link step.
14562 15068
14563 This option makes symbolic debugging impossible. 15069 This option makes symbolic debugging impossible.
15070
15071 @item -mliw
15072 @opindex mliw
15073 Allow the compiler to generate @emph{Long Instruction Word}
15074 instructions if the target is the @samp{AM33} or later. This is the
15075 default. This option defines the preprocessor macro @samp{__LIW__}.
15076
15077 @item -mnoliw
15078 @opindex mnoliw
15079 Do not allow the compiler to generate @emph{Long Instruction Word}
15080 instructions. This option defines the preprocessor macro
15081 @samp{__NO_LIW__}.
15082
14564 @end table 15083 @end table
14565 15084
14566 @node PDP-11 Options 15085 @node PDP-11 Options
14567 @subsection PDP-11 Options 15086 @subsection PDP-11 Options
14568 @cindex PDP-11 Options 15087 @cindex PDP-11 Options
14646 code generation only. 15165 code generation only.
14647 15166
14648 @item -mbranch-cheap 15167 @item -mbranch-cheap
14649 @opindex mbranch-cheap 15168 @opindex mbranch-cheap
14650 Do not pretend that branches are expensive. This is the default. 15169 Do not pretend that branches are expensive. This is the default.
14651
14652 @item -msplit
14653 @opindex msplit
14654 Generate code for a system with split I&D@.
14655
14656 @item -mno-split
14657 @opindex mno-split
14658 Generate code for a system without split I&D@. This is the default.
14659 15170
14660 @item -munix-asm 15171 @item -munix-asm
14661 @opindex munix-asm 15172 @opindex munix-asm
14662 Use Unix assembler syntax. This is the default when configured for 15173 Use Unix assembler syntax. This is the default when configured for
14663 @samp{pdp11-*-bsd}. 15174 @samp{pdp11-*-bsd}.
14737 @itemx -mno-powerpc 15248 @itemx -mno-powerpc
14738 @itemx -mpowerpc-gpopt 15249 @itemx -mpowerpc-gpopt
14739 @itemx -mno-powerpc-gpopt 15250 @itemx -mno-powerpc-gpopt
14740 @itemx -mpowerpc-gfxopt 15251 @itemx -mpowerpc-gfxopt
14741 @itemx -mno-powerpc-gfxopt 15252 @itemx -mno-powerpc-gfxopt
15253 @need 800
14742 @itemx -mpowerpc64 15254 @itemx -mpowerpc64
14743 @itemx -mno-powerpc64 15255 @itemx -mno-powerpc64
14744 @itemx -mmfcrf 15256 @itemx -mmfcrf
14745 @itemx -mno-mfcrf 15257 @itemx -mno-mfcrf
14746 @itemx -mpopcntb 15258 @itemx -mpopcntb
14747 @itemx -mno-popcntb 15259 @itemx -mno-popcntb
14748 @itemx -mpopcntd 15260 @itemx -mpopcntd
14749 @itemx -mno-popcntd 15261 @itemx -mno-popcntd
14750 @itemx -mfprnd 15262 @itemx -mfprnd
14751 @itemx -mno-fprnd 15263 @itemx -mno-fprnd
15264 @need 800
14752 @itemx -mcmpb 15265 @itemx -mcmpb
14753 @itemx -mno-cmpb 15266 @itemx -mno-cmpb
14754 @itemx -mmfpgpr 15267 @itemx -mmfpgpr
14755 @itemx -mno-mfpgpr 15268 @itemx -mno-mfpgpr
14756 @itemx -mhard-dfp 15269 @itemx -mhard-dfp
14876 @samp{476}, @samp{476fp}, @samp{505}, @samp{601}, @samp{602}, @samp{603}, 15389 @samp{476}, @samp{476fp}, @samp{505}, @samp{601}, @samp{602}, @samp{603},
14877 @samp{603e}, @samp{604}, @samp{604e}, @samp{620}, @samp{630}, @samp{740}, 15390 @samp{603e}, @samp{604}, @samp{604e}, @samp{620}, @samp{630}, @samp{740},
14878 @samp{7400}, @samp{7450}, @samp{750}, @samp{801}, @samp{821}, @samp{823}, 15391 @samp{7400}, @samp{7450}, @samp{750}, @samp{801}, @samp{821}, @samp{823},
14879 @samp{860}, @samp{970}, @samp{8540}, @samp{a2}, @samp{e300c2}, 15392 @samp{860}, @samp{970}, @samp{8540}, @samp{a2}, @samp{e300c2},
14880 @samp{e300c3}, @samp{e500mc}, @samp{e500mc64}, @samp{ec603e}, @samp{G3}, 15393 @samp{e300c3}, @samp{e500mc}, @samp{e500mc64}, @samp{ec603e}, @samp{G3},
14881 @samp{G4}, @samp{G5}, @samp{power}, @samp{power2}, @samp{power3}, 15394 @samp{G4}, @samp{G5}, @samp{titan}, @samp{power}, @samp{power2}, @samp{power3},
14882 @samp{power4}, @samp{power5}, @samp{power5+}, @samp{power6}, @samp{power6x}, 15395 @samp{power4}, @samp{power5}, @samp{power5+}, @samp{power6}, @samp{power6x},
14883 @samp{power7}, @samp{common}, @samp{powerpc}, @samp{powerpc64}, @samp{rios}, 15396 @samp{power7}, @samp{common}, @samp{powerpc}, @samp{powerpc64}, @samp{rios},
14884 @samp{rios1}, @samp{rios2}, @samp{rsc}, and @samp{rs64}. 15397 @samp{rios1}, @samp{rios2}, @samp{rsc}, and @samp{rs64}.
14885 15398
14886 @option{-mcpu=common} selects a completely generic processor. Code 15399 @option{-mcpu=common} selects a completely generic processor. Code
14928 values for @var{cpu_type} are used for @option{-mtune} as for 15441 values for @var{cpu_type} are used for @option{-mtune} as for
14929 @option{-mcpu}. If both are specified, the code generated will use the 15442 @option{-mcpu}. If both are specified, the code generated will use the
14930 architecture, registers, and mnemonics set by @option{-mcpu}, but the 15443 architecture, registers, and mnemonics set by @option{-mcpu}, but the
14931 scheduling parameters set by @option{-mtune}. 15444 scheduling parameters set by @option{-mtune}.
14932 15445
14933 @item -mswdiv 15446 @item -mcmodel=small
14934 @itemx -mno-swdiv 15447 @opindex mcmodel=small
14935 @opindex mswdiv 15448 Generate PowerPC64 code for the small model: The TOC is limited to
14936 @opindex mno-swdiv 15449 64k.
14937 Generate code to compute division as reciprocal estimate and iterative 15450
14938 refinement, creating opportunities for increased throughput. This 15451 @item -mcmodel=medium
14939 feature requires: optional PowerPC Graphics instruction set for single 15452 @opindex mcmodel=medium
14940 precision and FRE instruction for double precision, assuming divides 15453 Generate PowerPC64 code for the medium model: The TOC and other static
14941 cannot generate user-visible traps, and the domain values not include 15454 data may be up to a total of 4G in size.
14942 Infinities, denormals or zero denominator. 15455
15456 @item -mcmodel=large
15457 @opindex mcmodel=large
15458 Generate PowerPC64 code for the large model: The TOC may be up to 4G
15459 in size. Other data and code is only limited by the 64-bit address
15460 space.
14943 15461
14944 @item -maltivec 15462 @item -maltivec
14945 @itemx -mno-altivec 15463 @itemx -mno-altivec
14946 @opindex maltivec 15464 @opindex maltivec
14947 @opindex mno-altivec 15465 @opindex mno-altivec
15211 @item -mfused-madd 15729 @item -mfused-madd
15212 @itemx -mno-fused-madd 15730 @itemx -mno-fused-madd
15213 @opindex mfused-madd 15731 @opindex mfused-madd
15214 @opindex mno-fused-madd 15732 @opindex mno-fused-madd
15215 Generate code that uses (does not use) the floating point multiply and 15733 Generate code that uses (does not use) the floating point multiply and
15216 accumulate instructions. These instructions are generated by default if 15734 accumulate instructions. These instructions are generated by default
15217 hardware floating is used. 15735 if hardware floating point is used. The machine dependent
15736 @option{-mfused-madd} option is now mapped to the machine independent
15737 @option{-ffp-contract=fast} option, and @option{-mno-fused-madd} is
15738 mapped to @option{-ffp-contract=off}.
15218 15739
15219 @item -mmulhw 15740 @item -mmulhw
15220 @itemx -mno-mulhw 15741 @itemx -mno-mulhw
15221 @opindex mmulhw 15742 @opindex mmulhw
15222 @opindex mno-mulhw 15743 @opindex mno-mulhw
15256 15777
15257 @item -mrelocatable 15778 @item -mrelocatable
15258 @itemx -mno-relocatable 15779 @itemx -mno-relocatable
15259 @opindex mrelocatable 15780 @opindex mrelocatable
15260 @opindex mno-relocatable 15781 @opindex mno-relocatable
15261 On embedded PowerPC systems generate code that allows (does not allow) 15782 Generate code that allows (does not allow) a static executable to be
15262 the program to be relocated to a different address at runtime. If you 15783 relocated to a different address at runtime. A simple embedded
15263 use @option{-mrelocatable} on any module, all objects linked together must 15784 PowerPC system loader should relocate the entire contents of
15264 be compiled with @option{-mrelocatable} or @option{-mrelocatable-lib}. 15785 @code{.got2} and 4-byte locations listed in the @code{.fixup} section,
15786 a table of 32-bit addresses generated by this option. For this to
15787 work, all objects linked together must be compiled with
15788 @option{-mrelocatable} or @option{-mrelocatable-lib}.
15789 @option{-mrelocatable} code aligns the stack to an 8 byte boundary.
15265 15790
15266 @item -mrelocatable-lib 15791 @item -mrelocatable-lib
15267 @itemx -mno-relocatable-lib 15792 @itemx -mno-relocatable-lib
15268 @opindex mrelocatable-lib 15793 @opindex mrelocatable-lib
15269 @opindex mno-relocatable-lib 15794 @opindex mno-relocatable-lib
15270 On embedded PowerPC systems generate code that allows (does not allow) 15795 Like @option{-mrelocatable}, @option{-mrelocatable-lib} generates a
15271 the program to be relocated to a different address at runtime. Modules 15796 @code{.fixup} section to allow static executables to be relocated at
15272 compiled with @option{-mrelocatable-lib} can be linked with either modules 15797 runtime, but @option{-mrelocatable-lib} does not use the smaller stack
15273 compiled without @option{-mrelocatable} and @option{-mrelocatable-lib} or 15798 alignment of @option{-mrelocatable}. Objects compiled with
15274 with modules compiled with the @option{-mrelocatable} options. 15799 @option{-mrelocatable-lib} may be linked with objects compiled with
15800 any combination of the @option{-mrelocatable} options.
15275 15801
15276 @item -mno-toc 15802 @item -mno-toc
15277 @itemx -mtoc 15803 @itemx -mtoc
15278 @opindex mno-toc 15804 @opindex mno-toc
15279 @opindex mtoc 15805 @opindex mtoc
15301 @opindex mdynamic-no-pic 15827 @opindex mdynamic-no-pic
15302 On Darwin and Mac OS X systems, compile code so that it is not 15828 On Darwin and Mac OS X systems, compile code so that it is not
15303 relocatable, but that its external references are relocatable. The 15829 relocatable, but that its external references are relocatable. The
15304 resulting code is suitable for applications, but not shared 15830 resulting code is suitable for applications, but not shared
15305 libraries. 15831 libraries.
15832
15833 @item -msingle-pic-base
15834 @opindex msingle-pic-base
15835 Treat the register used for PIC addressing as read-only, rather than
15836 loading it in the prologue for each function. The run-time system is
15837 responsible for initializing this register with an appropriate value
15838 before execution begins.
15306 15839
15307 @item -mprioritize-restricted-insns=@var{priority} 15840 @item -mprioritize-restricted-insns=@var{priority}
15308 @opindex mprioritize-restricted-insns 15841 @opindex mprioritize-restricted-insns
15309 This option controls the priority that is assigned to 15842 This option controls the priority that is assigned to
15310 dispatch-slot restricted instructions during the second scheduling 15843 dispatch-slot restricted instructions during the second scheduling
15527 @opindex mno-sdata 16060 @opindex mno-sdata
15528 On embedded PowerPC systems, put all initialized global and static data 16061 On embedded PowerPC systems, put all initialized global and static data
15529 in the @samp{.data} section, and all uninitialized data in the 16062 in the @samp{.data} section, and all uninitialized data in the
15530 @samp{.bss} section. 16063 @samp{.bss} section.
15531 16064
16065 @item -mblock-move-inline-limit=@var{num}
16066 @opindex mblock-move-inline-limit
16067 Inline all block moves (such as calls to @code{memcpy} or structure
16068 copies) less than or equal to @var{num} bytes. The minimum value for
16069 @var{num} is 32 bytes on 32-bit targets and 64 bytes on 64-bit
16070 targets. The default value is target-specific.
16071
15532 @item -G @var{num} 16072 @item -G @var{num}
15533 @opindex G 16073 @opindex G
15534 @cindex smaller data references (PowerPC) 16074 @cindex smaller data references (PowerPC)
15535 @cindex .sdata/.sdata2 references (PowerPC) 16075 @cindex .sdata/.sdata2 references (PowerPC)
15536 On embedded PowerPC systems, put global and static items less than or 16076 On embedded PowerPC systems, put global and static items less than or
15594 @item -pthread 16134 @item -pthread
15595 @opindex pthread 16135 @opindex pthread
15596 Adds support for multithreading with the @dfn{pthreads} library. 16136 Adds support for multithreading with the @dfn{pthreads} library.
15597 This option sets flags for both the preprocessor and linker. 16137 This option sets flags for both the preprocessor and linker.
15598 16138
16139 @item -mrecip
16140 @itemx -mno-recip
16141 @opindex mrecip
16142 This option will enable GCC to use the reciprocal estimate and
16143 reciprocal square root estimate instructions with additional
16144 Newton-Raphson steps to increase precision instead of doing a divide or
16145 square root and divide for floating point arguments. You should use
16146 the @option{-ffast-math} option when using @option{-mrecip} (or at
16147 least @option{-funsafe-math-optimizations},
16148 @option{-finite-math-only}, @option{-freciprocal-math} and
16149 @option{-fno-trapping-math}). Note that while the throughput of the
16150 sequence is generally higher than the throughput of the non-reciprocal
16151 instruction, the precision of the sequence can be decreased by up to 2
16152 ulp (i.e. the inverse of 1.0 equals 0.99999994) for reciprocal square
16153 roots.
16154
16155 @item -mrecip=@var{opt}
16156 @opindex mrecip=opt
16157 This option allows to control which reciprocal estimate instructions
16158 may be used. @var{opt} is a comma separated list of options, that may
16159 be preceded by a @code{!} to invert the option:
16160 @code{all}: enable all estimate instructions,
16161 @code{default}: enable the default instructions, equivalent to @option{-mrecip},
16162 @code{none}: disable all estimate instructions, equivalent to @option{-mno-recip};
16163 @code{div}: enable the reciprocal approximation instructions for both single and double precision;
16164 @code{divf}: enable the single precision reciprocal approximation instructions;
16165 @code{divd}: enable the double precision reciprocal approximation instructions;
16166 @code{rsqrt}: enable the reciprocal square root approximation instructions for both single and double precision;
16167 @code{rsqrtf}: enable the single precision reciprocal square root approximation instructions;
16168 @code{rsqrtd}: enable the double precision reciprocal square root approximation instructions;
16169
16170 So for example, @option{-mrecip=all,!rsqrtd} would enable the
16171 all of the reciprocal estimate instructions, except for the
16172 @code{FRSQRTE}, @code{XSRSQRTEDP}, and @code{XVRSQRTEDP} instructions
16173 which handle the double precision reciprocal square root calculations.
16174
16175 @item -mrecip-precision
16176 @itemx -mno-recip-precision
16177 @opindex mrecip-precision
16178 Assume (do not assume) that the reciprocal estimate instructions
16179 provide higher precision estimates than is mandated by the powerpc
16180 ABI. Selecting @option{-mcpu=power6} or @option{-mcpu=power7}
16181 automatically selects @option{-mrecip-precision}. The double
16182 precision square root estimate instructions are not generated by
16183 default on low precision machines, since they do not provide an
16184 estimate that converges after three steps.
16185
16186 @item -mveclibabi=@var{type}
16187 @opindex mveclibabi
16188 Specifies the ABI type to use for vectorizing intrinsics using an
16189 external library. The only type supported at present is @code{mass},
16190 which specifies to use IBM's Mathematical Acceleration Subsystem
16191 (MASS) libraries for vectorizing intrinsics using external libraries.
16192 GCC will currently emit calls to @code{acosd2}, @code{acosf4},
16193 @code{acoshd2}, @code{acoshf4}, @code{asind2}, @code{asinf4},
16194 @code{asinhd2}, @code{asinhf4}, @code{atan2d2}, @code{atan2f4},
16195 @code{atand2}, @code{atanf4}, @code{atanhd2}, @code{atanhf4},
16196 @code{cbrtd2}, @code{cbrtf4}, @code{cosd2}, @code{cosf4},
16197 @code{coshd2}, @code{coshf4}, @code{erfcd2}, @code{erfcf4},
16198 @code{erfd2}, @code{erff4}, @code{exp2d2}, @code{exp2f4},
16199 @code{expd2}, @code{expf4}, @code{expm1d2}, @code{expm1f4},
16200 @code{hypotd2}, @code{hypotf4}, @code{lgammad2}, @code{lgammaf4},
16201 @code{log10d2}, @code{log10f4}, @code{log1pd2}, @code{log1pf4},
16202 @code{log2d2}, @code{log2f4}, @code{logd2}, @code{logf4},
16203 @code{powd2}, @code{powf4}, @code{sind2}, @code{sinf4}, @code{sinhd2},
16204 @code{sinhf4}, @code{sqrtd2}, @code{sqrtf4}, @code{tand2},
16205 @code{tanf4}, @code{tanhd2}, and @code{tanhf4} when generating code
16206 for power7. Both @option{-ftree-vectorize} and
16207 @option{-funsafe-math-optimizations} have to be enabled. The MASS
16208 libraries will have to be specified at link time.
16209
16210 @item -mfriz
16211 @itemx -mno-friz
16212 @opindex mfriz
16213 Generate (do not generate) the @code{friz} instruction when the
16214 @option{-funsafe-math-optimizations} option is used to optimize
16215 rounding a floating point value to 64-bit integer and back to floating
16216 point. The @code{friz} instruction does not return the same value if
16217 the floating point number is too large to fit in an integer.
15599 @end table 16218 @end table
15600 16219
15601 @node RX Options 16220 @node RX Options
15602 @subsection RX Options 16221 @subsection RX Options
15603 @cindex RX Options 16222 @cindex RX Options
15630 @emph{Note} If the @option{-fpu} option is enabled then 16249 @emph{Note} If the @option{-fpu} option is enabled then
15631 @option{-funsafe-math-optimizations} is also enabled automatically. 16250 @option{-funsafe-math-optimizations} is also enabled automatically.
15632 This is because the RX FPU instructions are themselves unsafe. 16251 This is because the RX FPU instructions are themselves unsafe.
15633 16252
15634 @item -mcpu=@var{name} 16253 @item -mcpu=@var{name}
15635 @itemx -patch=@var{name}
15636 @opindex -mcpu 16254 @opindex -mcpu
15637 @opindex -patch
15638 Selects the type of RX CPU to be targeted. Currently three types are 16255 Selects the type of RX CPU to be targeted. Currently three types are
15639 supported, the generic @var{RX600} and @var{RX200} series hardware and 16256 supported, the generic @var{RX600} and @var{RX200} series hardware and
15640 the specific @var{RX610} cpu. The default is @var{RX600}. 16257 the specific @var{RX610} CPU. The default is @var{RX600}.
15641 16258
15642 The only difference between @var{RX600} and @var{RX610} is that the 16259 The only difference between @var{RX600} and @var{RX610} is that the
15643 @var{RX610} does not support the @code{MVTIPL} instruction. 16260 @var{RX610} does not support the @code{MVTIPL} instruction.
15644 16261
15645 The @var{RX200} series does not have a hardware floating point unit 16262 The @var{RX200} series does not have a hardware floating point unit
15649 @item -mbig-endian-data 16266 @item -mbig-endian-data
15650 @itemx -mlittle-endian-data 16267 @itemx -mlittle-endian-data
15651 @opindex mbig-endian-data 16268 @opindex mbig-endian-data
15652 @opindex mlittle-endian-data 16269 @opindex mlittle-endian-data
15653 Store data (but not code) in the big-endian format. The default is 16270 Store data (but not code) in the big-endian format. The default is
15654 @option{-mlittle-endian-data}, ie to store data in the little endian 16271 @option{-mlittle-endian-data}, i.e.@: to store data in the little endian
15655 format. 16272 format.
15656 16273
15657 @item -msmall-data-limit=@var{N} 16274 @item -msmall-data-limit=@var{N}
15658 @opindex msmall-data-limit 16275 @opindex msmall-data-limit
15659 Specifies the maximum size in bytes of global and static variables 16276 Specifies the maximum size in bytes of global and static variables
16285 This option is only meaningful when @option{-mno-pt-fixed} is in effect. 16902 This option is only meaningful when @option{-mno-pt-fixed} is in effect.
16286 It will then prevent cross-basic-block cse, hoisting and most scheduling 16903 It will then prevent cross-basic-block cse, hoisting and most scheduling
16287 of symbol loads. The default is @option{-mno-invalid-symbols}. 16904 of symbol loads. The default is @option{-mno-invalid-symbols}.
16288 @end table 16905 @end table
16289 16906
16907 @node Solaris 2 Options
16908 @subsection Solaris 2 Options
16909 @cindex Solaris 2 options
16910
16911 These @samp{-m} options are supported on Solaris 2:
16912
16913 @table @gcctabopt
16914 @item -mimpure-text
16915 @opindex mimpure-text
16916 @option{-mimpure-text}, used in addition to @option{-shared}, tells
16917 the compiler to not pass @option{-z text} to the linker when linking a
16918 shared object. Using this option, you can link position-dependent
16919 code into a shared object.
16920
16921 @option{-mimpure-text} suppresses the ``relocations remain against
16922 allocatable but non-writable sections'' linker error message.
16923 However, the necessary relocations will trigger copy-on-write, and the
16924 shared object is not actually shared across processes. Instead of
16925 using @option{-mimpure-text}, you should compile all source code with
16926 @option{-fpic} or @option{-fPIC}.
16927
16928 @end table
16929
16930 These switches are supported in addition to the above on Solaris 2:
16931
16932 @table @gcctabopt
16933 @item -threads
16934 @opindex threads
16935 Add support for multithreading using the Solaris threads library. This
16936 option sets flags for both the preprocessor and linker. This option does
16937 not affect the thread safety of object code produced by the compiler or
16938 that of libraries supplied with it.
16939
16940 @item -pthreads
16941 @opindex pthreads
16942 Add support for multithreading using the POSIX threads library. This
16943 option sets flags for both the preprocessor and linker. This option does
16944 not affect the thread safety of object code produced by the compiler or
16945 that of libraries supplied with it.
16946
16947 @item -pthread
16948 @opindex pthread
16949 This is a synonym for @option{-pthreads}.
16950 @end table
16951
16290 @node SPARC Options 16952 @node SPARC Options
16291 @subsection SPARC Options 16953 @subsection SPARC Options
16292 @cindex SPARC options 16954 @cindex SPARC options
16293 16955
16294 These @samp{-m} options are supported on the SPARC: 16956 These @samp{-m} options are supported on the SPARC:
16373 However, the use of this changed alignment directly violates the SPARC 17035 However, the use of this changed alignment directly violates the SPARC
16374 ABI@. Thus, it's intended only for use on targets where the developer 17036 ABI@. Thus, it's intended only for use on targets where the developer
16375 acknowledges that their resulting code will not be directly in line with 17037 acknowledges that their resulting code will not be directly in line with
16376 the rules of the ABI@. 17038 the rules of the ABI@.
16377 17039
16378 @item -mimpure-text
16379 @opindex mimpure-text
16380 @option{-mimpure-text}, used in addition to @option{-shared}, tells
16381 the compiler to not pass @option{-z text} to the linker when linking a
16382 shared object. Using this option, you can link position-dependent
16383 code into a shared object.
16384
16385 @option{-mimpure-text} suppresses the ``relocations remain against
16386 allocatable but non-writable sections'' linker error message.
16387 However, the necessary relocations will trigger copy-on-write, and the
16388 shared object is not actually shared across processes. Instead of
16389 using @option{-mimpure-text}, you should compile all source code with
16390 @option{-fpic} or @option{-fPIC}.
16391
16392 This option is only available on SunOS and Solaris.
16393
16394 @item -mcpu=@var{cpu_type} 17040 @item -mcpu=@var{cpu_type}
16395 @opindex mcpu 17041 @opindex mcpu
16396 Set the instruction set, register set, and instruction scheduling parameters 17042 Set the instruction set, register set, and instruction scheduling parameters
16397 for machine type @var{cpu_type}. Supported values for @var{cpu_type} are 17043 for machine type @var{cpu_type}. Supported values for @var{cpu_type} are
16398 @samp{v7}, @samp{cypress}, @samp{v8}, @samp{supersparc}, @samp{sparclite}, 17044 @samp{v7}, @samp{cypress}, @samp{v8}, @samp{supersparc}, @samp{hypersparc},
16399 @samp{f930}, @samp{f934}, @samp{hypersparc}, @samp{sparclite86x}, 17045 @samp{leon}, @samp{sparclite}, @samp{f930}, @samp{f934}, @samp{sparclite86x},
16400 @samp{sparclet}, @samp{tsc701}, @samp{v9}, @samp{ultrasparc}, 17046 @samp{sparclet}, @samp{tsc701}, @samp{v9}, @samp{ultrasparc},
16401 @samp{ultrasparc3}, @samp{niagara} and @samp{niagara2}. 17047 @samp{ultrasparc3}, @samp{niagara} and @samp{niagara2}.
16402 17048
16403 Default instruction scheduling parameters are used for values that select 17049 Default instruction scheduling parameters are used for values that select
16404 an architecture and not an implementation. These are @samp{v7}, @samp{v8}, 17050 an architecture and not an implementation. These are @samp{v7}, @samp{v8},
16407 Here is a list of each supported architecture and their supported 17053 Here is a list of each supported architecture and their supported
16408 implementations. 17054 implementations.
16409 17055
16410 @smallexample 17056 @smallexample
16411 v7: cypress 17057 v7: cypress
16412 v8: supersparc, hypersparc 17058 v8: supersparc, hypersparc, leon
16413 sparclite: f930, f934, sparclite86x 17059 sparclite: f930, f934, sparclite86x
16414 sparclet: tsc701 17060 sparclet: tsc701
16415 v9: ultrasparc, ultrasparc3, niagara, niagara2 17061 v9: ultrasparc, ultrasparc3, niagara, niagara2
16416 @end smallexample 17062 @end smallexample
16417 17063
16459 @var{cpu_type}, but do not set the instruction set or register set that the 17105 @var{cpu_type}, but do not set the instruction set or register set that the
16460 option @option{-mcpu=@var{cpu_type}} would. 17106 option @option{-mcpu=@var{cpu_type}} would.
16461 17107
16462 The same values for @option{-mcpu=@var{cpu_type}} can be used for 17108 The same values for @option{-mcpu=@var{cpu_type}} can be used for
16463 @option{-mtune=@var{cpu_type}}, but the only useful values are those 17109 @option{-mtune=@var{cpu_type}}, but the only useful values are those
16464 that select a particular cpu implementation. Those are @samp{cypress}, 17110 that select a particular CPU implementation. Those are @samp{cypress},
16465 @samp{supersparc}, @samp{hypersparc}, @samp{f930}, @samp{f934}, 17111 @samp{supersparc}, @samp{hypersparc}, @samp{leon}, @samp{f930}, @samp{f934},
16466 @samp{sparclite86x}, @samp{tsc701}, @samp{ultrasparc}, 17112 @samp{sparclite86x}, @samp{tsc701}, @samp{ultrasparc}, @samp{ultrasparc3},
16467 @samp{ultrasparc3}, @samp{niagara}, and @samp{niagara2}. 17113 @samp{niagara}, and @samp{niagara2}.
16468 17114
16469 @item -mv8plus 17115 @item -mv8plus
16470 @itemx -mno-v8plus 17116 @itemx -mno-v8plus
16471 @opindex mv8plus 17117 @opindex mv8plus
16472 @opindex mno-v8plus 17118 @opindex mno-v8plus
16535 @opindex mno-stack-bias 17181 @opindex mno-stack-bias
16536 With @option{-mstack-bias}, GCC assumes that the stack pointer, and 17182 With @option{-mstack-bias}, GCC assumes that the stack pointer, and
16537 frame pointer if present, are offset by @minus{}2047 which must be added back 17183 frame pointer if present, are offset by @minus{}2047 which must be added back
16538 when making stack frame references. This is the default in 64-bit mode. 17184 when making stack frame references. This is the default in 64-bit mode.
16539 Otherwise, assume no such offset is present. 17185 Otherwise, assume no such offset is present.
16540 @end table
16541
16542 These switches are supported in addition to the above on Solaris:
16543
16544 @table @gcctabopt
16545 @item -threads
16546 @opindex threads
16547 Add support for multithreading using the Solaris threads library. This
16548 option sets flags for both the preprocessor and linker. This option does
16549 not affect the thread safety of object code produced by the compiler or
16550 that of libraries supplied with it.
16551
16552 @item -pthreads
16553 @opindex pthreads
16554 Add support for multithreading using the POSIX threads library. This
16555 option sets flags for both the preprocessor and linker. This option does
16556 not affect the thread safety of object code produced by the compiler or
16557 that of libraries supplied with it.
16558
16559 @item -pthread
16560 @opindex pthread
16561 This is a synonym for @option{-pthreads}.
16562 @end table 17186 @end table
16563 17187
16564 @node SPU Options 17188 @node SPU Options
16565 @subsection SPU Options 17189 @subsection SPU Options
16566 @cindex SPU options 17190 @cindex SPU options
16804 17428
16805 @item -mno-app-regs 17429 @item -mno-app-regs
16806 @opindex mno-app-regs 17430 @opindex mno-app-regs
16807 This option will cause r2 and r5 to be treated as fixed registers. 17431 This option will cause r2 and r5 to be treated as fixed registers.
16808 17432
17433 @item -mv850e2v3
17434 @opindex mv850e2v3
17435 Specify that the target processor is the V850E2V3. The preprocessor
17436 constants @samp{__v850e2v3__} will be defined if
17437 this option is used.
17438
17439 @item -mv850e2
17440 @opindex mv850e2
17441 Specify that the target processor is the V850E2. The preprocessor
17442 constants @samp{__v850e2__} will be defined if
17443
16809 @item -mv850e1 17444 @item -mv850e1
16810 @opindex mv850e1 17445 @opindex mv850e1
16811 Specify that the target processor is the V850E1. The preprocessor 17446 Specify that the target processor is the V850E1. The preprocessor
16812 constants @samp{__v850e1__} and @samp{__v850e__} will be defined if 17447 constants @samp{__v850e1__} and @samp{__v850e__} will be defined if
16813 this option is used. 17448
17449 @item -mv850es
17450 @opindex mv850es
17451 Specify that the target processor is the V850ES. This is an alias for
17452 the @option{-mv850e1} option.
16814 17453
16815 @item -mv850e 17454 @item -mv850e
16816 @opindex mv850e 17455 @opindex mv850e
16817 Specify that the target processor is the V850E@. The preprocessor 17456 Specify that the target processor is the V850E@. The preprocessor
16818 constant @samp{__v850e__} will be defined if this option is used. 17457 constant @samp{__v850e__} will be defined if this option is used.
16819 17458
16820 If neither @option{-mv850} nor @option{-mv850e} nor @option{-mv850e1} 17459 If neither @option{-mv850} nor @option{-mv850e} nor @option{-mv850e1}
17460 nor @option{-mv850e2} nor @option{-mv850e2v3}
16821 are defined then a default target processor will be chosen and the 17461 are defined then a default target processor will be chosen and the
16822 relevant @samp{__v850*__} preprocessor constant will be defined. 17462 relevant @samp{__v850*__} preprocessor constant will be defined.
16823 17463
16824 The preprocessor constants @samp{__v850} and @samp{__v851__} are always 17464 The preprocessor constants @samp{__v850} and @samp{__v851__} are always
16825 defined, regardless of which processor variant is the target. 17465 defined, regardless of which processor variant is the target.
16826 17466
16827 @item -mdisable-callt 17467 @item -mdisable-callt
16828 @opindex mdisable-callt 17468 @opindex mdisable-callt
16829 This option will suppress generation of the CALLT instruction for the 17469 This option will suppress generation of the CALLT instruction for the
16830 v850e and v850e1 flavors of the v850 architecture. The default is 17470 v850e, v850e1, v850e2 and v850e2v3 flavors of the v850 architecture. The default is
16831 @option{-mno-disable-callt} which allows the CALLT instruction to be used. 17471 @option{-mno-disable-callt} which allows the CALLT instruction to be used.
16832 17472
16833 @end table 17473 @end table
16834 17474
16835 @node VAX Options 17475 @node VAX Options
16913 This option is available for Cygwin and MinGW targets. It 17553 This option is available for Cygwin and MinGW targets. It
16914 specifies that a console application is to be generated, by 17554 specifies that a console application is to be generated, by
16915 instructing the linker to set the PE header subsystem type 17555 instructing the linker to set the PE header subsystem type
16916 required for console applications. 17556 required for console applications.
16917 This is the default behavior for Cygwin and MinGW targets. 17557 This is the default behavior for Cygwin and MinGW targets.
16918
16919 @item -mcygwin
16920 @opindex mcygwin
16921 This option is available for Cygwin targets. It specifies that
16922 the Cygwin internal interface is to be used for predefined
16923 preprocessor macros, C runtime libraries and related linker
16924 paths and options. For Cygwin targets this is the default behavior.
16925 This option is deprecated and will be removed in a future release.
16926
16927 @item -mno-cygwin
16928 @opindex mno-cygwin
16929 This option is available for Cygwin targets. It specifies that
16930 the MinGW internal interface is to be used instead of Cygwin's, by
16931 setting MinGW-related predefined macros and linker paths and default
16932 library options.
16933 This option is deprecated and will be removed in a future release.
16934 17558
16935 @item -mdll 17559 @item -mdll
16936 @opindex mdll 17560 @opindex mdll
16937 This option is available for Cygwin and MinGW targets. It 17561 This option is available for Cygwin and MinGW targets. It
16938 specifies that a DLL - a dynamic link library - is to be 17562 specifies that a DLL - a dynamic link library - is to be
17042 @opindex mno-serialize-volatile 17666 @opindex mno-serialize-volatile
17043 When this option is enabled, GCC inserts @code{MEMW} instructions before 17667 When this option is enabled, GCC inserts @code{MEMW} instructions before
17044 @code{volatile} memory references to guarantee sequential consistency. 17668 @code{volatile} memory references to guarantee sequential consistency.
17045 The default is @option{-mserialize-volatile}. Use 17669 The default is @option{-mserialize-volatile}. Use
17046 @option{-mno-serialize-volatile} to omit the @code{MEMW} instructions. 17670 @option{-mno-serialize-volatile} to omit the @code{MEMW} instructions.
17671
17672 @item -mforce-no-pic
17673 @opindex mforce-no-pic
17674 For targets, like GNU/Linux, where all user-mode Xtensa code must be
17675 position-independent code (PIC), this option disables PIC for compiling
17676 kernel code.
17047 17677
17048 @item -mtext-section-literals 17678 @item -mtext-section-literals
17049 @itemx -mno-text-section-literals 17679 @itemx -mno-text-section-literals
17050 @opindex mtext-section-literals 17680 @opindex mtext-section-literals
17051 @opindex mno-text-section-literals 17681 @opindex mno-text-section-literals
17453 contains a function definition matches with one of @var{file}, then 18083 contains a function definition matches with one of @var{file}, then
17454 that function is not instrumented. The match is done on substrings: 18084 that function is not instrumented. The match is done on substrings:
17455 if the @var{file} parameter is a substring of the file name, it is 18085 if the @var{file} parameter is a substring of the file name, it is
17456 considered to be a match. 18086 considered to be a match.
17457 18087
17458 For example, 18088 For example:
17459 @code{-finstrument-functions-exclude-file-list=/bits/stl,include/sys} 18089
18090 @smallexample
18091 -finstrument-functions-exclude-file-list=/bits/stl,include/sys
18092 @end smallexample
18093
18094 @noindent
17460 will exclude any inline function defined in files whose pathnames 18095 will exclude any inline function defined in files whose pathnames
17461 contain @code{/bits/stl} or @code{include/sys}. 18096 contain @code{/bits/stl} or @code{include/sys}.
17462 18097
17463 If, for some reason, you want to include letter @code{','} in one of 18098 If, for some reason, you want to include letter @code{','} in one of
17464 @var{sym}, write @code{'\,'}. For example, 18099 @var{sym}, write @code{'\,'}. For example,
17532 and grows downwards, you can use the flags 18167 and grows downwards, you can use the flags
17533 @option{-fstack-limit-symbol=__stack_limit} and 18168 @option{-fstack-limit-symbol=__stack_limit} and
17534 @option{-Wl,--defsym,__stack_limit=0x7ffe0000} to enforce a stack limit 18169 @option{-Wl,--defsym,__stack_limit=0x7ffe0000} to enforce a stack limit
17535 of 128KB@. Note that this may only work with the GNU linker. 18170 of 128KB@. Note that this may only work with the GNU linker.
17536 18171
18172 @item -fsplit-stack
18173 @opindex fsplit-stack
18174 Generate code to automatically split the stack before it overflows.
18175 The resulting program has a discontiguous stack which can only
18176 overflow if the program is unable to allocate any more memory. This
18177 is most useful when running threaded programs, as it is no longer
18178 necessary to calculate a good stack size to use for each thread. This
18179 is currently only implemented for the i386 and x86_64 backends running
18180 GNU/Linux.
18181
18182 When code compiled with @option{-fsplit-stack} calls code compiled
18183 without @option{-fsplit-stack}, there may not be much stack space
18184 available for the latter code to run. If compiling all code,
18185 including library code, with @option{-fsplit-stack} is not an option,
18186 then the linker can fix up these calls so that the code compiled
18187 without @option{-fsplit-stack} always has a large stack. Support for
18188 this is implemented in the gold linker in GNU binutils release 2.21
18189 and later.
18190
17537 @item -fleading-underscore 18191 @item -fleading-underscore
17538 @opindex fleading-underscore 18192 @opindex fleading-underscore
17539 This option and its counterpart, @option{-fno-leading-underscore}, forcibly 18193 This option and its counterpart, @option{-fno-leading-underscore}, forcibly
17540 change the way C symbols are represented in the object file. One use 18194 change the way C symbols are represented in the object file. One use
17541 is to help link with legacy assembly code. 18195 is to help link with legacy assembly code.
17562 load times of shared object libraries, produce more optimized 18216 load times of shared object libraries, produce more optimized
17563 code, provide near-perfect API export and prevent symbol clashes. 18217 code, provide near-perfect API export and prevent symbol clashes.
17564 It is @strong{strongly} recommended that you use this in any shared objects 18218 It is @strong{strongly} recommended that you use this in any shared objects
17565 you distribute. 18219 you distribute.
17566 18220
17567 Despite the nomenclature, @code{default} always means public ie; 18221 Despite the nomenclature, @code{default} always means public; i.e.,
17568 available to be linked against from outside the shared object. 18222 available to be linked against from outside the shared object.
17569 @code{protected} and @code{internal} are pretty useless in real-world 18223 @code{protected} and @code{internal} are pretty useless in real-world
17570 usage so the only other commonly used option will be @code{hidden}. 18224 usage so the only other commonly used option will be @code{hidden}.
17571 The default if @option{-fvisibility} isn't specified is 18225 The default if @option{-fvisibility} isn't specified is
17572 @code{default}, i.e., make every 18226 @code{default}, i.e., make every
17590 the declarations you wish to set visibility for with (for example) 18244 the declarations you wish to set visibility for with (for example)
17591 @samp{#pragma GCC visibility push(hidden)} and 18245 @samp{#pragma GCC visibility push(hidden)} and
17592 @samp{#pragma GCC visibility pop}. 18246 @samp{#pragma GCC visibility pop}.
17593 Bear in mind that symbol visibility should be viewed @strong{as 18247 Bear in mind that symbol visibility should be viewed @strong{as
17594 part of the API interface contract} and thus all new code should 18248 part of the API interface contract} and thus all new code should
17595 always specify visibility when it is not the default ie; declarations 18249 always specify visibility when it is not the default; i.e., declarations
17596 only for use within the local DSO should @strong{always} be marked explicitly 18250 only for use within the local DSO should @strong{always} be marked explicitly
17597 as hidden as so to avoid PLT indirection overheads---making this 18251 as hidden as so to avoid PLT indirection overheads---making this
17598 abundantly clear also aids readability and self-documentation of the code. 18252 abundantly clear also aids readability and self-documentation of the code.
17599 Note that due to ISO C++ specification requirements, operator new and 18253 Note that due to ISO C++ specification requirements, operator new and
17600 operator delete must always be of default visibility. 18254 operator delete must always be of default visibility.
17618 be thrown between DSOs must be explicitly marked with default 18272 be thrown between DSOs must be explicitly marked with default
17619 visibility so that the @samp{type_info} nodes will be unified between 18273 visibility so that the @samp{type_info} nodes will be unified between
17620 the DSOs. 18274 the DSOs.
17621 18275
17622 An overview of these techniques, their benefits and how to use them 18276 An overview of these techniques, their benefits and how to use them
17623 is at @w{@uref{http://gcc.gnu.org/wiki/Visibility}}. 18277 is at @uref{http://gcc.gnu.org/@/wiki/@/Visibility}.
18278
18279 @item -fstrict-volatile-bitfields
18280 @opindex fstrict-volatile-bitfields
18281 This option should be used if accesses to volatile bitfields (or other
18282 structure fields, although the compiler usually honors those types
18283 anyway) should use a single access of the width of the
18284 field's type, aligned to a natural alignment if possible. For
18285 example, targets with memory-mapped peripheral registers might require
18286 all such accesses to be 16 bits wide; with this flag the user could
18287 declare all peripheral bitfields as ``unsigned short'' (assuming short
18288 is 16 bits on these targets) to force GCC to use 16 bit accesses
18289 instead of, perhaps, a more efficient 32 bit access.
18290
18291 If this option is disabled, the compiler will use the most efficient
18292 instruction. In the previous example, that might be a 32-bit load
18293 instruction, even though that will access bytes that do not contain
18294 any portion of the bitfield, or memory-mapped registers unrelated to
18295 the one being updated.
18296
18297 If the target requires strict alignment, and honoring the field
18298 type would require violating this alignment, a warning is issued.
18299 If the field has @code{packed} attribute, the access is done without
18300 honoring the field type. If the field doesn't have @code{packed}
18301 attribute, the access is done honoring the field type. In both cases,
18302 GCC assumes that the user knows something about the target hardware
18303 that it is unaware of.
18304
18305 The default value of this option is determined by the application binary
18306 interface for the target processor.
17624 18307
17625 @end table 18308 @end table
17626 18309
17627 @c man end 18310 @c man end
17628 18311
17889 is to use exactly the same options when generating and using the 18572 is to use exactly the same options when generating and using the
17890 precompiled header. The following are known to be safe: 18573 precompiled header. The following are known to be safe:
17891 18574
17892 @gccoptlist{-fmessage-length= -fpreprocessed -fsched-interblock @gol 18575 @gccoptlist{-fmessage-length= -fpreprocessed -fsched-interblock @gol
17893 -fsched-spec -fsched-spec-load -fsched-spec-load-dangerous @gol 18576 -fsched-spec -fsched-spec-load -fsched-spec-load-dangerous @gol
17894 -fsched-verbose=<number> -fschedule-insns -fvisibility= @gol 18577 -fsched-verbose=@var{number} -fschedule-insns -fvisibility= @gol
17895 -pedantic-errors} 18578 -pedantic-errors}
17896 18579
17897 @end itemize 18580 @end itemize
17898 18581
17899 For all of these except the last, the compiler will automatically 18582 For all of these except the last, the compiler will automatically