Mercurial > hg > CbC > CbC_gcc
comparison gcc/doc/invoke.texi @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 @c Copyright (C) 1988-2017 Free Software Foundation, Inc. | 1 @c Copyright (C) 1988-2018 Free Software Foundation, Inc. |
2 @c This is part of the GCC manual. | 2 @c This is part of the GCC manual. |
3 @c For copying conditions, see the file gcc.texi. | 3 @c For copying conditions, see the file gcc.texi. |
4 | 4 |
5 @ignore | 5 @ignore |
6 @c man begin INCLUDE | 6 @c man begin INCLUDE |
7 @include gcc-vers.texi | 7 @include gcc-vers.texi |
8 @c man end | 8 @c man end |
9 | 9 |
10 @c man begin COPYRIGHT | 10 @c man begin COPYRIGHT |
11 Copyright @copyright{} 1988-2017 Free Software Foundation, Inc. | 11 Copyright @copyright{} 1988-2018 Free Software Foundation, Inc. |
12 | 12 |
13 Permission is granted to copy, distribute and/or modify this document | 13 Permission is granted to copy, distribute and/or modify this document |
14 under the terms of the GNU Free Documentation License, Version 1.3 or | 14 under the terms of the GNU Free Documentation License, Version 1.3 or |
15 any later version published by the Free Software Foundation; with the | 15 any later version published by the Free Software Foundation; with the |
16 Invariant Sections being ``GNU General Public License'' and ``Funding | 16 Invariant Sections being ``GNU General Public License'' and ``Funding |
43 Only the most useful options are listed here; see below for the | 43 Only the most useful options are listed here; see below for the |
44 remainder. @command{g++} accepts mostly the same options as @command{gcc}. | 44 remainder. @command{g++} accepts mostly the same options as @command{gcc}. |
45 @c man end | 45 @c man end |
46 @c man begin SEEALSO | 46 @c man begin SEEALSO |
47 gpl(7), gfdl(7), fsf-funding(7), | 47 gpl(7), gfdl(7), fsf-funding(7), |
48 cpp(1), gcov(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1) | 48 cpp(1), gcov(1), as(1), ld(1), gdb(1), dbx(1) |
49 and the Info entries for @file{gcc}, @file{cpp}, @file{as}, | 49 and the Info entries for @file{gcc}, @file{cpp}, @file{as}, |
50 @file{ld}, @file{binutils} and @file{gdb}. | 50 @file{ld}, @file{binutils} and @file{gdb}. |
51 @c man end | 51 @c man end |
52 @c man begin BUGS | 52 @c man begin BUGS |
53 For instructions on reporting bugs, see | 53 For instructions on reporting bugs, see |
118 @samp{-W}---for example, | 118 @samp{-W}---for example, |
119 @option{-fmove-loop-invariants}, @option{-Wformat} and so on. Most of | 119 @option{-fmove-loop-invariants}, @option{-Wformat} and so on. Most of |
120 these have both positive and negative forms; the negative form of | 120 these have both positive and negative forms; the negative form of |
121 @option{-ffoo} is @option{-fno-foo}. This manual documents | 121 @option{-ffoo} is @option{-fno-foo}. This manual documents |
122 only one of these two forms, whichever one is not the default. | 122 only one of these two forms, whichever one is not the default. |
123 | |
124 Some options take one or more arguments typically separated either | |
125 by a space or by the equals sign (@samp{=}) from the option name. | |
126 Unless documented otherwise, an argument can be either numeric or | |
127 a string. Numeric arguments must typically be small unsigned decimal | |
128 or hexadecimal integers. Hexadecimal arguments must begin with | |
129 the @samp{0x} prefix. Arguments to options that specify a size | |
130 threshold of some sort may be arbitrarily large decimal or hexadecimal | |
131 integers followed by a byte size suffix designating a multiple of bytes | |
132 such as @code{kB} and @code{KiB} for kilobyte and kibibyte, respectively, | |
133 @code{MB} and @code{MiB} for megabyte and mebibyte, @code{GB} and | |
134 @code{GiB} for gigabyte and gigibyte, and so on. Such arguments are | |
135 designated by @var{byte-size} in the following text. Refer to the NIST, | |
136 IEC, and other relevant national and international standards for the full | |
137 listing and explanation of the binary and decimal byte size prefixes. | |
123 | 138 |
124 @c man end | 139 @c man end |
125 | 140 |
126 @xref{Option Index}, for an index to GCC's options. | 141 @xref{Option Index}, for an index to GCC's options. |
127 | 142 |
170 @item Overall Options | 185 @item Overall Options |
171 @xref{Overall Options,,Options Controlling the Kind of Output}. | 186 @xref{Overall Options,,Options Controlling the Kind of Output}. |
172 @gccoptlist{-c -S -E -o @var{file} -x @var{language} @gol | 187 @gccoptlist{-c -S -E -o @var{file} -x @var{language} @gol |
173 -v -### --help@r{[}=@var{class}@r{[},@dots{}@r{]]} --target-help --version @gol | 188 -v -### --help@r{[}=@var{class}@r{[},@dots{}@r{]]} --target-help --version @gol |
174 -pass-exit-codes -pipe -specs=@var{file} -wrapper @gol | 189 -pass-exit-codes -pipe -specs=@var{file} -wrapper @gol |
175 @@@var{file} -fplugin=@var{file} -fplugin-arg-@var{name}=@var{arg} @gol | 190 @@@var{file} -ffile-prefix-map=@var{old}=@var{new} @gol |
191 -fplugin=@var{file} -fplugin-arg-@var{name}=@var{arg} @gol | |
176 -fdump-ada-spec@r{[}-slim@r{]} -fada-spec-parent=@var{unit} -fdump-go-spec=@var{file}} | 192 -fdump-ada-spec@r{[}-slim@r{]} -fada-spec-parent=@var{unit} -fdump-go-spec=@var{file}} |
177 | 193 |
178 @item C Language Options | 194 @item C Language Options |
179 @xref{C Dialect Options,,Options Controlling C Dialect}. | 195 @xref{C Dialect Options,,Options Controlling C Dialect}. |
180 @gccoptlist{-ansi -std=@var{standard} -fgnu89-inline @gol | 196 @gccoptlist{-ansi -std=@var{standard} -fgnu89-inline @gol |
190 @item C++ Language Options | 206 @item C++ Language Options |
191 @xref{C++ Dialect Options,,Options Controlling C++ Dialect}. | 207 @xref{C++ Dialect Options,,Options Controlling C++ Dialect}. |
192 @gccoptlist{-fabi-version=@var{n} -fno-access-control @gol | 208 @gccoptlist{-fabi-version=@var{n} -fno-access-control @gol |
193 -faligned-new=@var{n} -fargs-in-order=@var{n} -fcheck-new @gol | 209 -faligned-new=@var{n} -fargs-in-order=@var{n} -fcheck-new @gol |
194 -fconstexpr-depth=@var{n} -fconstexpr-loop-limit=@var{n} @gol | 210 -fconstexpr-depth=@var{n} -fconstexpr-loop-limit=@var{n} @gol |
195 -ffriend-injection @gol | |
196 -fno-elide-constructors @gol | 211 -fno-elide-constructors @gol |
197 -fno-enforce-eh-specs @gol | 212 -fno-enforce-eh-specs @gol |
198 -ffor-scope -fno-for-scope -fno-gnu-keywords @gol | 213 -fno-gnu-keywords @gol |
199 -fno-implicit-templates @gol | 214 -fno-implicit-templates @gol |
200 -fno-implicit-inline-templates @gol | 215 -fno-implicit-inline-templates @gol |
201 -fno-implement-inlines -fms-extensions @gol | 216 -fno-implement-inlines -fms-extensions @gol |
202 -fnew-inheriting-ctors @gol | 217 -fnew-inheriting-ctors @gol |
203 -fnew-ttp-matching @gol | 218 -fnew-ttp-matching @gol |
211 -fno-weak -nostdinc++ @gol | 226 -fno-weak -nostdinc++ @gol |
212 -fvisibility-inlines-hidden @gol | 227 -fvisibility-inlines-hidden @gol |
213 -fvisibility-ms-compat @gol | 228 -fvisibility-ms-compat @gol |
214 -fext-numeric-literals @gol | 229 -fext-numeric-literals @gol |
215 -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol | 230 -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol |
216 -Wdelete-non-virtual-dtor -Wliteral-suffix -Wmultiple-inheritance @gol | 231 -Wdelete-non-virtual-dtor -Wdeprecated-copy -Wliteral-suffix @gol |
232 -Wmultiple-inheritance -Wno-init-list-lifetime @gol | |
217 -Wnamespaces -Wnarrowing @gol | 233 -Wnamespaces -Wnarrowing @gol |
234 -Wpessimizing-move -Wredundant-move @gol | |
218 -Wnoexcept -Wnoexcept-type -Wclass-memaccess @gol | 235 -Wnoexcept -Wnoexcept-type -Wclass-memaccess @gol |
219 -Wnon-virtual-dtor -Wreorder -Wregister @gol | 236 -Wnon-virtual-dtor -Wreorder -Wregister @gol |
220 -Weffc++ -Wstrict-null-sentinel -Wtemplates @gol | 237 -Weffc++ -Wstrict-null-sentinel -Wtemplates @gol |
221 -Wno-non-template-friend -Wold-style-cast @gol | 238 -Wno-non-template-friend -Wold-style-cast @gol |
222 -Woverloaded-virtual -Wno-pmf-conversions @gol | 239 -Woverloaded-virtual -Wno-pmf-conversions @gol |
240 -Wno-class-conversion -Wno-terminate @gol | |
223 -Wsign-promo -Wvirtual-inheritance} | 241 -Wsign-promo -Wvirtual-inheritance} |
224 | 242 |
225 @item Objective-C and Objective-C++ Language Options | 243 @item Objective-C and Objective-C++ Language Options |
226 @xref{Objective-C and Objective-C++ Dialect Options,,Options Controlling | 244 @xref{Objective-C and Objective-C++ Dialect Options,,Options Controlling |
227 Objective-C and Objective-C++ Dialects}. | 245 Objective-C and Objective-C++ Dialects}. |
249 @xref{Diagnostic Message Formatting Options,,Options to Control Diagnostic Messages Formatting}. | 267 @xref{Diagnostic Message Formatting Options,,Options to Control Diagnostic Messages Formatting}. |
250 @gccoptlist{-fmessage-length=@var{n} @gol | 268 @gccoptlist{-fmessage-length=@var{n} @gol |
251 -fdiagnostics-show-location=@r{[}once@r{|}every-line@r{]} @gol | 269 -fdiagnostics-show-location=@r{[}once@r{|}every-line@r{]} @gol |
252 -fdiagnostics-color=@r{[}auto@r{|}never@r{|}always@r{]} @gol | 270 -fdiagnostics-color=@r{[}auto@r{|}never@r{|}always@r{]} @gol |
253 -fno-diagnostics-show-option -fno-diagnostics-show-caret @gol | 271 -fno-diagnostics-show-option -fno-diagnostics-show-caret @gol |
272 -fno-diagnostics-show-labels -fno-diagnostics-show-line-numbers @gol | |
273 -fdiagnostics-minimum-margin-width=@var{width} @gol | |
254 -fdiagnostics-parseable-fixits -fdiagnostics-generate-patch @gol | 274 -fdiagnostics-parseable-fixits -fdiagnostics-generate-patch @gol |
255 -fdiagnostics-show-template-tree -fno-elide-type @gol | 275 -fdiagnostics-show-template-tree -fno-elide-type @gol |
256 -fno-show-column} | 276 -fno-show-column} |
257 | 277 |
258 @item Warning Options | 278 @item Warning Options |
259 @xref{Warning Options,,Options to Request or Suppress Warnings}. | 279 @xref{Warning Options,,Options to Request or Suppress Warnings}. |
260 @gccoptlist{-fsyntax-only -fmax-errors=@var{n} -Wpedantic @gol | 280 @gccoptlist{-fsyntax-only -fmax-errors=@var{n} -Wpedantic @gol |
261 -pedantic-errors @gol | 281 -pedantic-errors @gol |
262 -w -Wextra -Wall -Waddress -Waggregate-return @gol | 282 -w -Wextra -Wall -Waddress -Waggregate-return -Waligned-new @gol |
263 -Walloc-zero -Walloc-size-larger-than=@var{n} | 283 -Walloc-zero -Walloc-size-larger-than=@var{byte-size} |
264 -Walloca -Walloca-larger-than=@var{n} @gol | 284 -Walloca -Walloca-larger-than=@var{byte-size} @gol |
265 -Wno-aggressive-loop-optimizations -Warray-bounds -Warray-bounds=@var{n} @gol | 285 -Wno-aggressive-loop-optimizations -Warray-bounds -Warray-bounds=@var{n} @gol |
266 -Wno-attributes -Wbool-compare -Wbool-operation @gol | 286 -Wno-attributes -Wbool-compare -Wbool-operation @gol |
267 -Wno-builtin-declaration-mismatch @gol | 287 -Wno-builtin-declaration-mismatch @gol |
268 -Wno-builtin-macro-redefined -Wc90-c99-compat -Wc99-c11-compat @gol | 288 -Wno-builtin-macro-redefined -Wc90-c99-compat -Wc99-c11-compat @gol |
269 -Wc++-compat -Wc++11-compat -Wc++14-compat @gol | 289 -Wc++-compat -Wc++11-compat -Wc++14-compat -Wc++17-compat @gol |
270 -Wcast-align -Wcast-align=strict -Wcast-qual @gol | 290 -Wcast-align -Wcast-align=strict -Wcast-function-type -Wcast-qual @gol |
271 -Wchar-subscripts -Wchkp -Wcatch-value -Wcatch-value=@var{n} @gol | 291 -Wchar-subscripts -Wcatch-value -Wcatch-value=@var{n} @gol |
272 -Wclobbered -Wcomment -Wconditionally-supported @gol | 292 -Wclobbered -Wcomment -Wconditionally-supported @gol |
273 -Wconversion -Wcoverage-mismatch -Wno-cpp -Wdangling-else -Wdate-time @gol | 293 -Wconversion -Wcoverage-mismatch -Wno-cpp -Wdangling-else -Wdate-time @gol |
274 -Wdelete-incomplete @gol | 294 -Wdelete-incomplete @gol |
275 -Wno-deprecated -Wno-deprecated-declarations -Wno-designated-init @gol | 295 -Wno-deprecated -Wno-deprecated-declarations -Wno-designated-init @gol |
276 -Wdisabled-optimization @gol | 296 -Wdisabled-optimization @gol |
282 -Wfloat-equal -Wformat -Wformat=2 @gol | 302 -Wfloat-equal -Wformat -Wformat=2 @gol |
283 -Wno-format-contains-nul -Wno-format-extra-args @gol | 303 -Wno-format-contains-nul -Wno-format-extra-args @gol |
284 -Wformat-nonliteral -Wformat-overflow=@var{n} @gol | 304 -Wformat-nonliteral -Wformat-overflow=@var{n} @gol |
285 -Wformat-security -Wformat-signedness -Wformat-truncation=@var{n} @gol | 305 -Wformat-security -Wformat-signedness -Wformat-truncation=@var{n} @gol |
286 -Wformat-y2k -Wframe-address @gol | 306 -Wformat-y2k -Wframe-address @gol |
287 -Wframe-larger-than=@var{len} -Wno-free-nonheap-object -Wjump-misses-init @gol | 307 -Wframe-larger-than=@var{byte-size} -Wno-free-nonheap-object @gol |
308 -Wjump-misses-init @gol | |
288 -Wif-not-aligned @gol | 309 -Wif-not-aligned @gol |
289 -Wignored-qualifiers -Wignored-attributes -Wincompatible-pointer-types @gol | 310 -Wignored-qualifiers -Wignored-attributes -Wincompatible-pointer-types @gol |
290 -Wimplicit -Wimplicit-fallthrough -Wimplicit-fallthrough=@var{n} @gol | 311 -Wimplicit -Wimplicit-fallthrough -Wimplicit-fallthrough=@var{n} @gol |
291 -Wimplicit-function-declaration -Wimplicit-int @gol | 312 -Wimplicit-function-declaration -Wimplicit-int @gol |
292 -Winit-self -Winline -Wno-int-conversion -Wint-in-bool-context @gol | 313 -Winit-self -Winline -Wno-int-conversion -Wint-in-bool-context @gol |
293 -Wno-int-to-pointer-cast -Winvalid-memory-model -Wno-invalid-offsetof @gol | 314 -Wno-int-to-pointer-cast -Winvalid-memory-model -Wno-invalid-offsetof @gol |
294 -Winvalid-pch -Wlarger-than=@var{len} @gol | 315 -Winvalid-pch -Wlarger-than=@var{byte-size} @gol |
295 -Wlogical-op -Wlogical-not-parentheses -Wlong-long @gol | 316 -Wlogical-op -Wlogical-not-parentheses -Wlong-long @gol |
296 -Wmain -Wmaybe-uninitialized -Wmemset-elt-size -Wmemset-transposed-args @gol | 317 -Wmain -Wmaybe-uninitialized -Wmemset-elt-size -Wmemset-transposed-args @gol |
297 -Wmisleading-indentation -Wmissing-braces @gol | 318 -Wmisleading-indentation -Wmissing-attributes -Wmissing-braces @gol |
298 -Wmissing-field-initializers -Wmissing-include-dirs @gol | 319 -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-profile @gol |
299 -Wno-multichar -Wmultistatement-macros -Wnonnull -Wnonnull-compare @gol | 320 -Wno-multichar -Wmultistatement-macros -Wnonnull -Wnonnull-compare @gol |
300 -Wnormalized=@r{[}none@r{|}id@r{|}nfc@r{|}nfkc@r{]} @gol | 321 -Wnormalized=@r{[}none@r{|}id@r{|}nfc@r{|}nfkc@r{]} @gol |
301 -Wnull-dereference -Wodr -Wno-overflow -Wopenmp-simd @gol | 322 -Wnull-dereference -Wodr -Wno-overflow -Wopenmp-simd @gol |
302 -Woverride-init-side-effects -Woverlength-strings @gol | 323 -Woverride-init-side-effects -Woverlength-strings @gol |
303 -Wpacked -Wpacked-bitfield-compat -Wpacked-not-aligned -Wpadded @gol | 324 -Wpacked -Wpacked-bitfield-compat -Wpacked-not-aligned -Wpadded @gol |
304 -Wparentheses -Wno-pedantic-ms-format @gol | 325 -Wparentheses -Wno-pedantic-ms-format @gol |
305 -Wplacement-new -Wplacement-new=@var{n} @gol | 326 -Wplacement-new -Wplacement-new=@var{n} @gol |
306 -Wpointer-arith -Wpointer-compare -Wno-pointer-to-int-cast @gol | 327 -Wpointer-arith -Wpointer-compare -Wno-pointer-to-int-cast @gol |
307 -Wno-pragmas -Wredundant-decls -Wrestrict -Wno-return-local-addr @gol | 328 -Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls @gol |
329 -Wrestrict -Wno-return-local-addr @gol | |
308 -Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol | 330 -Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol |
309 -Wshadow=global, -Wshadow=local, -Wshadow=compatible-local @gol | 331 -Wshadow=global, -Wshadow=local, -Wshadow=compatible-local @gol |
310 -Wshift-overflow -Wshift-overflow=@var{n} @gol | 332 -Wshift-overflow -Wshift-overflow=@var{n} @gol |
311 -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-value @gol | 333 -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-value @gol |
312 -Wsign-compare -Wsign-conversion -Wfloat-conversion @gol | 334 -Wsign-compare -Wsign-conversion -Wfloat-conversion @gol |
313 -Wno-scalar-storage-order -Wsizeof-pointer-div @gol | 335 -Wno-scalar-storage-order -Wsizeof-pointer-div @gol |
314 -Wsizeof-pointer-memaccess -Wsizeof-array-argument @gol | 336 -Wsizeof-pointer-memaccess -Wsizeof-array-argument @gol |
315 -Wstack-protector -Wstack-usage=@var{len} -Wstrict-aliasing @gol | 337 -Wstack-protector -Wstack-usage=@var{byte-size} -Wstrict-aliasing @gol |
316 -Wstrict-aliasing=n -Wstrict-overflow -Wstrict-overflow=@var{n} @gol | 338 -Wstrict-aliasing=n -Wstrict-overflow -Wstrict-overflow=@var{n} @gol |
317 -Wstringop-overflow=@var{n} @gol | 339 -Wstringop-overflow=@var{n} -Wstringop-truncation @gol |
318 -Wsuggest-attribute=@r{[}pure@r{|}const@r{|}noreturn@r{|}format@r{]} @gol | 340 -Wsuggest-attribute=@r{[}pure@r{|}const@r{|}noreturn@r{|}format@r{|}malloc@r{]} @gol |
319 -Wsuggest-final-types @gol -Wsuggest-final-methods -Wsuggest-override @gol | 341 -Wsuggest-final-types @gol -Wsuggest-final-methods -Wsuggest-override @gol |
320 -Wmissing-format-attribute -Wsubobject-linkage @gol | 342 -Wmissing-format-attribute -Wsubobject-linkage @gol |
321 -Wswitch -Wswitch-bool -Wswitch-default -Wswitch-enum @gol | 343 -Wswitch -Wswitch-bool -Wswitch-default -Wswitch-enum @gol |
322 -Wswitch-unreachable -Wsync-nand @gol | 344 -Wswitch-unreachable -Wsync-nand @gol |
323 -Wsystem-headers -Wtautological-compare -Wtrampolines -Wtrigraphs @gol | 345 -Wsystem-headers -Wtautological-compare -Wtrampolines -Wtrigraphs @gol |
324 -Wtype-limits -Wundef @gol | 346 -Wtype-limits -Wundef @gol |
325 -Wuninitialized -Wunknown-pragmas -Wunsafe-loop-optimizations @gol | 347 -Wuninitialized -Wunknown-pragmas @gol |
326 -Wunsuffixed-float-constants -Wunused -Wunused-function @gol | 348 -Wunsuffixed-float-constants -Wunused -Wunused-function @gol |
327 -Wunused-label -Wunused-local-typedefs -Wunused-macros @gol | 349 -Wunused-label -Wunused-local-typedefs -Wunused-macros @gol |
328 -Wunused-parameter -Wno-unused-result @gol | 350 -Wunused-parameter -Wno-unused-result @gol |
329 -Wunused-value -Wunused-variable @gol | 351 -Wunused-value -Wunused-variable @gol |
330 -Wunused-const-variable -Wunused-const-variable=@var{n} @gol | 352 -Wunused-const-variable -Wunused-const-variable=@var{n} @gol |
331 -Wunused-but-set-parameter -Wunused-but-set-variable @gol | 353 -Wunused-but-set-parameter -Wunused-but-set-variable @gol |
332 -Wuseless-cast -Wvariadic-macros -Wvector-operation-performance @gol | 354 -Wuseless-cast -Wvariadic-macros -Wvector-operation-performance @gol |
333 -Wvla -Wvla-larger-than=@var{n} -Wvolatile-register-var -Wwrite-strings @gol | 355 -Wvla -Wvla-larger-than=@var{byte-size} -Wvolatile-register-var @gol |
356 -Wwrite-strings @gol | |
334 -Wzero-as-null-pointer-constant -Whsa} | 357 -Wzero-as-null-pointer-constant -Whsa} |
335 | 358 |
336 @item C and Objective-C-only Warning Options | 359 @item C and Objective-C-only Warning Options |
337 @gccoptlist{-Wbad-function-cast -Wmissing-declarations @gol | 360 @gccoptlist{-Wbad-function-cast -Wmissing-declarations @gol |
338 -Wmissing-parameter-type -Wmissing-prototypes -Wnested-externs @gol | 361 -Wmissing-parameter-type -Wmissing-prototypes -Wnested-externs @gol |
340 -Wstrict-prototypes -Wtraditional -Wtraditional-conversion @gol | 363 -Wstrict-prototypes -Wtraditional -Wtraditional-conversion @gol |
341 -Wdeclaration-after-statement -Wpointer-sign} | 364 -Wdeclaration-after-statement -Wpointer-sign} |
342 | 365 |
343 @item Debugging Options | 366 @item Debugging Options |
344 @xref{Debugging Options,,Options for Debugging Your Program}. | 367 @xref{Debugging Options,,Options for Debugging Your Program}. |
345 @gccoptlist{-g -g@var{level} -gcoff -gdwarf -gdwarf-@var{version} @gol | 368 @gccoptlist{-g -g@var{level} -gdwarf -gdwarf-@var{version} @gol |
346 -ggdb -grecord-gcc-switches -gno-record-gcc-switches @gol | 369 -ggdb -grecord-gcc-switches -gno-record-gcc-switches @gol |
347 -gstabs -gstabs+ -gstrict-dwarf -gno-strict-dwarf @gol | 370 -gstabs -gstabs+ -gstrict-dwarf -gno-strict-dwarf @gol |
371 -gas-loc-support -gno-as-loc-support @gol | |
372 -gas-locview-support -gno-as-locview-support @gol | |
348 -gcolumn-info -gno-column-info @gol | 373 -gcolumn-info -gno-column-info @gol |
374 -gstatement-frontiers -gno-statement-frontiers @gol | |
375 -gvariable-location-views -gno-variable-location-views @gol | |
376 -ginternal-reset-location-views -gno-internal-reset-location-views @gol | |
377 -ginline-points -gno-inline-points @gol | |
349 -gvms -gxcoff -gxcoff+ -gz@r{[}=@var{type}@r{]} @gol | 378 -gvms -gxcoff -gxcoff+ -gz@r{[}=@var{type}@r{]} @gol |
379 -gsplit-dwarf -gdescribe-dies -gno-describe-dies @gol | |
350 -fdebug-prefix-map=@var{old}=@var{new} -fdebug-types-section @gol | 380 -fdebug-prefix-map=@var{old}=@var{new} -fdebug-types-section @gol |
351 -fno-eliminate-unused-debug-types @gol | 381 -fno-eliminate-unused-debug-types @gol |
352 -femit-struct-debug-baseonly -femit-struct-debug-reduced @gol | 382 -femit-struct-debug-baseonly -femit-struct-debug-reduced @gol |
353 -femit-struct-debug-detailed@r{[}=@var{spec-list}@r{]} @gol | 383 -femit-struct-debug-detailed@r{[}=@var{spec-list}@r{]} @gol |
354 -feliminate-unused-debug-symbols -femit-class-debug-always @gol | 384 -feliminate-unused-debug-symbols -femit-class-debug-always @gol |
355 -fno-merge-debug-strings -fno-dwarf2-cfi-asm @gol | 385 -fno-merge-debug-strings -fno-dwarf2-cfi-asm @gol |
356 -fvar-tracking -fvar-tracking-assignments} | 386 -fvar-tracking -fvar-tracking-assignments} |
357 | 387 |
358 @item Optimization Options | 388 @item Optimization Options |
359 @xref{Optimize Options,,Options that Control Optimization}. | 389 @xref{Optimize Options,,Options that Control Optimization}. |
360 @gccoptlist{-faggressive-loop-optimizations -falign-functions[=@var{n}] @gol | 390 @gccoptlist{-faggressive-loop-optimizations @gol |
361 -falign-jumps[=@var{n}] @gol | 391 -falign-functions[=@var{n}[:@var{m}:[@var{n2}[:@var{m2}]]]] @gol |
362 -falign-labels[=@var{n}] -falign-loops[=@var{n}] @gol | 392 -falign-jumps[=@var{n}[:@var{m}:[@var{n2}[:@var{m2}]]]] @gol |
393 -falign-labels[=@var{n}[:@var{m}:[@var{n2}[:@var{m2}]]]] @gol | |
394 -falign-loops[=@var{n}[:@var{m}:[@var{n2}[:@var{m2}]]]] @gol | |
363 -fassociative-math -fauto-profile -fauto-profile[=@var{path}] @gol | 395 -fassociative-math -fauto-profile -fauto-profile[=@var{path}] @gol |
364 -fauto-inc-dec -fbranch-probabilities @gol | 396 -fauto-inc-dec -fbranch-probabilities @gol |
365 -fbranch-target-load-optimize -fbranch-target-load-optimize2 @gol | 397 -fbranch-target-load-optimize -fbranch-target-load-optimize2 @gol |
366 -fbtr-bb-exclusive -fcaller-saves @gol | 398 -fbtr-bb-exclusive -fcaller-saves @gol |
367 -fcombine-stack-adjustments -fconserve-stack @gol | 399 -fcombine-stack-adjustments -fconserve-stack @gol |
407 -fprofile-reorder-functions @gol | 439 -fprofile-reorder-functions @gol |
408 -freciprocal-math -free -frename-registers -freorder-blocks @gol | 440 -freciprocal-math -free -frename-registers -freorder-blocks @gol |
409 -freorder-blocks-algorithm=@var{algorithm} @gol | 441 -freorder-blocks-algorithm=@var{algorithm} @gol |
410 -freorder-blocks-and-partition -freorder-functions @gol | 442 -freorder-blocks-and-partition -freorder-functions @gol |
411 -frerun-cse-after-loop -freschedule-modulo-scheduled-loops @gol | 443 -frerun-cse-after-loop -freschedule-modulo-scheduled-loops @gol |
412 -frounding-math -fsched2-use-superblocks -fsched-pressure @gol | 444 -frounding-math -fsave-optimization-record @gol |
445 -fsched2-use-superblocks -fsched-pressure @gol | |
413 -fsched-spec-load -fsched-spec-load-dangerous @gol | 446 -fsched-spec-load -fsched-spec-load-dangerous @gol |
414 -fsched-stalled-insns-dep[=@var{n}] -fsched-stalled-insns[=@var{n}] @gol | 447 -fsched-stalled-insns-dep[=@var{n}] -fsched-stalled-insns[=@var{n}] @gol |
415 -fsched-group-heuristic -fsched-critical-path-heuristic @gol | 448 -fsched-group-heuristic -fsched-critical-path-heuristic @gol |
416 -fsched-spec-insn-heuristic -fsched-rank-heuristic @gol | 449 -fsched-spec-insn-heuristic -fsched-rank-heuristic @gol |
417 -fsched-last-insn-heuristic -fsched-dep-count-heuristic @gol | 450 -fsched-last-insn-heuristic -fsched-dep-count-heuristic @gol |
432 -ftree-loop-if-convert -ftree-loop-im @gol | 465 -ftree-loop-if-convert -ftree-loop-im @gol |
433 -ftree-phiprop -ftree-loop-distribution -ftree-loop-distribute-patterns @gol | 466 -ftree-phiprop -ftree-loop-distribution -ftree-loop-distribute-patterns @gol |
434 -ftree-loop-ivcanon -ftree-loop-linear -ftree-loop-optimize @gol | 467 -ftree-loop-ivcanon -ftree-loop-linear -ftree-loop-optimize @gol |
435 -ftree-loop-vectorize @gol | 468 -ftree-loop-vectorize @gol |
436 -ftree-parallelize-loops=@var{n} -ftree-pre -ftree-partial-pre -ftree-pta @gol | 469 -ftree-parallelize-loops=@var{n} -ftree-pre -ftree-partial-pre -ftree-pta @gol |
437 -ftree-reassoc -ftree-sink -ftree-slsr -ftree-sra @gol | 470 -ftree-reassoc -ftree-scev-cprop -ftree-sink -ftree-slsr -ftree-sra @gol |
438 -ftree-switch-conversion -ftree-tail-merge @gol | 471 -ftree-switch-conversion -ftree-tail-merge @gol |
439 -ftree-ter -ftree-vectorize -ftree-vrp -funconstrained-commons @gol | 472 -ftree-ter -ftree-vectorize -ftree-vrp -funconstrained-commons @gol |
440 -funit-at-a-time -funroll-all-loops -funroll-loops @gol | 473 -funit-at-a-time -funroll-all-loops -funroll-loops @gol |
441 -funsafe-math-optimizations -funswitch-loops @gol | 474 -funsafe-math-optimizations -funswitch-loops @gol |
442 -fipa-ra -fvariable-expansion-in-unroller -fvect-cost-model -fvpt @gol | 475 -fipa-ra -fvariable-expansion-in-unroller -fvect-cost-model -fvpt @gol |
450 -fprofile-abs-path @gol | 483 -fprofile-abs-path @gol |
451 -fprofile-dir=@var{path} -fprofile-generate -fprofile-generate=@var{path} @gol | 484 -fprofile-dir=@var{path} -fprofile-generate -fprofile-generate=@var{path} @gol |
452 -fsanitize=@var{style} -fsanitize-recover -fsanitize-recover=@var{style} @gol | 485 -fsanitize=@var{style} -fsanitize-recover -fsanitize-recover=@var{style} @gol |
453 -fasan-shadow-offset=@var{number} -fsanitize-sections=@var{s1},@var{s2},... @gol | 486 -fasan-shadow-offset=@var{number} -fsanitize-sections=@var{s1},@var{s2},... @gol |
454 -fsanitize-undefined-trap-on-error -fbounds-check @gol | 487 -fsanitize-undefined-trap-on-error -fbounds-check @gol |
455 -fcheck-pointer-bounds -fchkp-check-incomplete-type @gol | 488 -fcf-protection=@r{[}full@r{|}branch@r{|}return@r{|}none@r{]} @gol |
456 -fchkp-first-field-has-own-bounds -fchkp-narrow-bounds @gol | |
457 -fchkp-narrow-to-innermost-array -fchkp-optimize @gol | |
458 -fchkp-use-fast-string-functions -fchkp-use-nochk-string-functions @gol | |
459 -fchkp-use-static-bounds -fchkp-use-static-const-bounds @gol | |
460 -fchkp-treat-zero-dynamic-size-as-infinite -fchkp-check-read @gol | |
461 -fchkp-check-read -fchkp-check-write -fchkp-store-bounds @gol | |
462 -fchkp-instrument-calls -fchkp-instrument-marked-only @gol | |
463 -fchkp-use-wrappers -fchkp-flexible-struct-trailing-arrays@gol | |
464 -fcf-protection==@r{[}full@r{|}branch@r{|}return@r{|}none@r{]} @gol | |
465 -fstack-protector -fstack-protector-all -fstack-protector-strong @gol | 489 -fstack-protector -fstack-protector-all -fstack-protector-strong @gol |
466 -fstack-protector-explicit -fstack-check @gol | 490 -fstack-protector-explicit -fstack-check @gol |
467 -fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol | 491 -fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol |
468 -fno-stack-limit -fsplit-stack @gol | 492 -fno-stack-limit -fsplit-stack @gol |
469 -fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol | 493 -fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol |
478 -A-@var{question}@r{[}=@var{answer}@r{]} @gol | 502 -A-@var{question}@r{[}=@var{answer}@r{]} @gol |
479 -C -CC -D@var{macro}@r{[}=@var{defn}@r{]} @gol | 503 -C -CC -D@var{macro}@r{[}=@var{defn}@r{]} @gol |
480 -dD -dI -dM -dN -dU @gol | 504 -dD -dI -dM -dN -dU @gol |
481 -fdebug-cpp -fdirectives-only -fdollars-in-identifiers @gol | 505 -fdebug-cpp -fdirectives-only -fdollars-in-identifiers @gol |
482 -fexec-charset=@var{charset} -fextended-identifiers @gol | 506 -fexec-charset=@var{charset} -fextended-identifiers @gol |
483 -finput-charset=@var{charset} -fno-canonical-system-headers @gol | 507 -finput-charset=@var{charset} -fmacro-prefix-map=@var{old}=@var{new} @gol |
484 -fpch-deps -fpch-preprocess -fpreprocessed @gol | 508 -fno-canonical-system-headers @gol -fpch-deps -fpch-preprocess @gol |
485 -ftabstop=@var{width} -ftrack-macro-expansion @gol | 509 -fpreprocessed -ftabstop=@var{width} -ftrack-macro-expansion @gol |
486 -fwide-exec-charset=@var{charset} -fworking-directory @gol | 510 -fwide-exec-charset=@var{charset} -fworking-directory @gol |
487 -H -imacros @var{file} -include @var{file} @gol | 511 -H -imacros @var{file} -include @var{file} @gol |
488 -M -MD -MF -MG -MM -MMD -MP -MQ -MT @gol | 512 -M -MD -MF -MG -MM -MMD -MP -MQ -MT @gol |
489 -no-integrated-cpp -P -pthread -remap @gol | 513 -no-integrated-cpp -P -pthread -remap @gol |
490 -traditional -traditional-cpp -trigraphs @gol | 514 -traditional -traditional-cpp -trigraphs @gol |
496 @gccoptlist{-Wa,@var{option} -Xassembler @var{option}} | 520 @gccoptlist{-Wa,@var{option} -Xassembler @var{option}} |
497 | 521 |
498 @item Linker Options | 522 @item Linker Options |
499 @xref{Link Options,,Options for Linking}. | 523 @xref{Link Options,,Options for Linking}. |
500 @gccoptlist{@var{object-file-name} -fuse-ld=@var{linker} -l@var{library} @gol | 524 @gccoptlist{@var{object-file-name} -fuse-ld=@var{linker} -l@var{library} @gol |
501 -nostartfiles -nodefaultlibs -nostdlib -pie -pthread -rdynamic @gol | 525 -nostartfiles -nodefaultlibs -nolibc -nostdlib @gol |
526 -pie -pthread -r -rdynamic @gol | |
502 -s -static -static-pie -static-libgcc -static-libstdc++ @gol | 527 -s -static -static-pie -static-libgcc -static-libstdc++ @gol |
503 -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol | 528 -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol |
504 -static-libmpx -static-libmpxwrappers @gol | |
505 -shared -shared-libgcc -symbolic @gol | 529 -shared -shared-libgcc -symbolic @gol |
506 -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol | 530 -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol |
507 -u @var{symbol} -z @var{keyword}} | 531 -u @var{symbol} -z @var{keyword}} |
508 | 532 |
509 @item Directory Options | 533 @item Directory Options |
544 -fdisable-ipa-@var{pass_name} @gol | 568 -fdisable-ipa-@var{pass_name} @gol |
545 -fdisable-rtl-@var{pass_name} @gol | 569 -fdisable-rtl-@var{pass_name} @gol |
546 -fdisable-rtl-@var{pass-name}=@var{range-list} @gol | 570 -fdisable-rtl-@var{pass-name}=@var{range-list} @gol |
547 -fdisable-tree-@var{pass_name} @gol | 571 -fdisable-tree-@var{pass_name} @gol |
548 -fdisable-tree-@var{pass-name}=@var{range-list} @gol | 572 -fdisable-tree-@var{pass-name}=@var{range-list} @gol |
573 -fdump-debug -fdump-earlydebug @gol | |
549 -fdump-noaddr -fdump-unnumbered -fdump-unnumbered-links @gol | 574 -fdump-noaddr -fdump-unnumbered -fdump-unnumbered-links @gol |
550 -fdump-class-hierarchy@r{[}-@var{n}@r{]} @gol | 575 -fdump-class-hierarchy@r{[}-@var{n}@r{]} @gol |
551 -fdump-final-insns@r{[}=@var{file}@r{]} | 576 -fdump-final-insns@r{[}=@var{file}@r{]} @gol |
552 -fdump-ipa-all -fdump-ipa-cgraph -fdump-ipa-inline @gol | 577 -fdump-ipa-all -fdump-ipa-cgraph -fdump-ipa-inline @gol |
553 -fdump-lang-all @gol | 578 -fdump-lang-all @gol |
554 -fdump-lang-@var{switch} @gol | 579 -fdump-lang-@var{switch} @gol |
555 -fdump-lang-@var{switch}-@var{options} @gol | 580 -fdump-lang-@var{switch}-@var{options} @gol |
556 -fdump-lang-@var{switch}-@var{options}=@var{filename} @gol | 581 -fdump-lang-@var{switch}-@var{options}=@var{filename} @gol |
587 | 612 |
588 @emph{AArch64 Options} | 613 @emph{AArch64 Options} |
589 @gccoptlist{-mabi=@var{name} -mbig-endian -mlittle-endian @gol | 614 @gccoptlist{-mabi=@var{name} -mbig-endian -mlittle-endian @gol |
590 -mgeneral-regs-only @gol | 615 -mgeneral-regs-only @gol |
591 -mcmodel=tiny -mcmodel=small -mcmodel=large @gol | 616 -mcmodel=tiny -mcmodel=small -mcmodel=large @gol |
592 -mstrict-align @gol | 617 -mstrict-align -mno-strict-align @gol |
593 -momit-leaf-frame-pointer @gol | 618 -momit-leaf-frame-pointer @gol |
594 -mtls-dialect=desc -mtls-dialect=traditional @gol | 619 -mtls-dialect=desc -mtls-dialect=traditional @gol |
595 -mtls-size=@var{size} @gol | 620 -mtls-size=@var{size} @gol |
596 -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 @gol | 621 -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 @gol |
597 -mlow-precision-recip-sqrt -mlow-precision-sqrt -mlow-precision-div @gol | 622 -mlow-precision-recip-sqrt -mlow-precision-sqrt -mlow-precision-div @gol |
598 -mpc-relative-literal-loads @gol | 623 -mpc-relative-literal-loads @gol |
599 -msign-return-address=@var{scope} @gol | 624 -msign-return-address=@var{scope} @gol |
600 -march=@var{name} -mcpu=@var{name} -mtune=@var{name} -moverride=@var{string}} | 625 -march=@var{name} -mcpu=@var{name} -mtune=@var{name} @gol |
626 -moverride=@var{string} -mverbose-cost-dump -mtrack-speculation} | |
601 | 627 |
602 @emph{Adapteva Epiphany Options} | 628 @emph{Adapteva Epiphany Options} |
603 @gccoptlist{-mhalf-reg-file -mprefer-short-insn-regs @gol | 629 @gccoptlist{-mhalf-reg-file -mprefer-short-insn-regs @gol |
604 -mbranch-cost=@var{num} -mcmove -mnops=@var{num} -msoft-cmpsf @gol | 630 -mbranch-cost=@var{num} -mcmove -mnops=@var{num} -msoft-cmpsf @gol |
605 -msplit-lohi -mpost-inc -mpost-modify -mstack-offset=@var{num} @gol | 631 -msplit-lohi -mpost-inc -mpost-modify -mstack-offset=@var{num} @gol |
606 -mround-nearest -mlong-calls -mshort-calls -msmall16 @gol | 632 -mround-nearest -mlong-calls -mshort-calls -msmall16 @gol |
607 -mfp-mode=@var{mode} -mvect-double -max-vect-align=@var{num} @gol | 633 -mfp-mode=@var{mode} -mvect-double -max-vect-align=@var{num} @gol |
608 -msplit-vecmove-early -m1reg-@var{reg}} | 634 -msplit-vecmove-early -m1reg-@var{reg}} |
609 | 635 |
610 @emph{ARC Options} | 636 @emph{ARC Options} |
611 @gccoptlist{-mbarrel-shifter @gol | 637 @gccoptlist{-mbarrel-shifter -mjli-always @gol |
612 -mcpu=@var{cpu} -mA6 -mARC600 -mA7 -mARC700 @gol | 638 -mcpu=@var{cpu} -mA6 -mARC600 -mA7 -mARC700 @gol |
613 -mdpfp -mdpfp-compact -mdpfp-fast -mno-dpfp-lrsr @gol | 639 -mdpfp -mdpfp-compact -mdpfp-fast -mno-dpfp-lrsr @gol |
614 -mea -mno-mpy -mmul32x16 -mmul64 -matomic @gol | 640 -mea -mno-mpy -mmul32x16 -mmul64 -matomic @gol |
615 -mnorm -mspfp -mspfp-compact -mspfp-fast -msimd -msoft-float -mswap @gol | 641 -mnorm -mspfp -mspfp-compact -mspfp-fast -msimd -msoft-float -mswap @gol |
616 -mcrc -mdsp-packa -mdvbf -mlock -mmac-d16 -mmac-24 -mrtsc -mswape @gol | 642 -mcrc -mdsp-packa -mdvbf -mlock -mmac-d16 -mmac-24 -mrtsc -mswape @gol |
623 -mexpand-adddi -mindexed-loads -mlra -mlra-priority-none @gol | 649 -mexpand-adddi -mindexed-loads -mlra -mlra-priority-none @gol |
624 -mlra-priority-compact mlra-priority-noncompact -mno-millicode @gol | 650 -mlra-priority-compact mlra-priority-noncompact -mno-millicode @gol |
625 -mmixed-code -mq-class -mRcq -mRcw -msize-level=@var{level} @gol | 651 -mmixed-code -mq-class -mRcq -mRcw -msize-level=@var{level} @gol |
626 -mtune=@var{cpu} -mmultcost=@var{num} @gol | 652 -mtune=@var{cpu} -mmultcost=@var{num} @gol |
627 -munalign-prob-threshold=@var{probability} -mmpy-option=@var{multo} @gol | 653 -munalign-prob-threshold=@var{probability} -mmpy-option=@var{multo} @gol |
628 -mdiv-rem -mcode-density -mll64 -mfpu=@var{fpu}} | 654 -mdiv-rem -mcode-density -mll64 -mfpu=@var{fpu} -mrf16} |
629 | 655 |
630 @emph{ARM Options} | 656 @emph{ARM Options} |
631 @gccoptlist{-mapcs-frame -mno-apcs-frame @gol | 657 @gccoptlist{-mapcs-frame -mno-apcs-frame @gol |
632 -mabi=@var{name} @gol | 658 -mabi=@var{name} @gol |
633 -mapcs-stack-check -mno-apcs-stack-check @gol | 659 -mapcs-stack-check -mno-apcs-stack-check @gol |
645 -mlong-calls -mno-long-calls @gol | 671 -mlong-calls -mno-long-calls @gol |
646 -msingle-pic-base -mno-single-pic-base @gol | 672 -msingle-pic-base -mno-single-pic-base @gol |
647 -mpic-register=@var{reg} @gol | 673 -mpic-register=@var{reg} @gol |
648 -mnop-fun-dllimport @gol | 674 -mnop-fun-dllimport @gol |
649 -mpoke-function-name @gol | 675 -mpoke-function-name @gol |
650 -mthumb -marm @gol | 676 -mthumb -marm -mflip-thumb @gol |
651 -mtpcs-frame -mtpcs-leaf-frame @gol | 677 -mtpcs-frame -mtpcs-leaf-frame @gol |
652 -mcaller-super-interworking -mcallee-super-interworking @gol | 678 -mcaller-super-interworking -mcallee-super-interworking @gol |
653 -mtp=@var{name} -mtls-dialect=@var{dialect} @gol | 679 -mtp=@var{name} -mtls-dialect=@var{dialect} @gol |
654 -mword-relocations @gol | 680 -mword-relocations @gol |
655 -mfix-cortex-m3-ldrd @gol | 681 -mfix-cortex-m3-ldrd @gol |
656 -munaligned-access @gol | 682 -munaligned-access @gol |
657 -mneon-for-64bits @gol | 683 -mneon-for-64bits @gol |
658 -mslow-flash-data @gol | 684 -mslow-flash-data @gol |
659 -masm-syntax-unified @gol | 685 -masm-syntax-unified @gol |
660 -mrestrict-it @gol | 686 -mrestrict-it @gol |
687 -mverbose-cost-dump @gol | |
661 -mpure-code @gol | 688 -mpure-code @gol |
662 -mcmse} | 689 -mcmse} |
663 | 690 |
664 @emph{AVR Options} | 691 @emph{AVR Options} |
665 @gccoptlist{-mmcu=@var{mcu} -mabsdata -maccumulate-args @gol | 692 @gccoptlist{-mmcu=@var{mcu} -mabsdata -maccumulate-args @gol |
666 -mbranch-cost=@var{cost} @gol | 693 -mbranch-cost=@var{cost} @gol |
667 -mcall-prologues -mgas-isr-prologues -mint8 @gol | 694 -mcall-prologues -mgas-isr-prologues -mint8 @gol |
668 -mn_flash=@var{size} -mno-interrupts @gol | 695 -mn_flash=@var{size} -mno-interrupts @gol |
669 -mrelax -mrmw -mstrict-X -mtiny-stack -mfract-convert-truncate @gol | 696 -mmain-is-OS_task -mrelax -mrmw -mstrict-X -mtiny-stack @gol |
697 -mfract-convert-truncate @gol | |
670 -mshort-calls -nodevicelib @gol | 698 -mshort-calls -nodevicelib @gol |
671 -Waddr-space-convert -Wmisspelled-isr} | 699 -Waddr-space-convert -Wmisspelled-isr} |
672 | 700 |
673 @emph{Blackfin Options} | 701 @emph{Blackfin Options} |
674 @gccoptlist{-mcpu=@var{cpu}@r{[}-@var{sirevision}@r{]} @gol | 702 @gccoptlist{-mcpu=@var{cpu}@r{[}-@var{sirevision}@r{]} @gol |
697 @emph{CR16 Options} | 725 @emph{CR16 Options} |
698 @gccoptlist{-mmac @gol | 726 @gccoptlist{-mmac @gol |
699 -mcr16cplus -mcr16c @gol | 727 -mcr16cplus -mcr16c @gol |
700 -msim -mint32 -mbit-ops | 728 -msim -mint32 -mbit-ops |
701 -mdata-model=@var{model}} | 729 -mdata-model=@var{model}} |
730 | |
731 @emph{C-SKY Options} | |
732 @gccoptlist{-march=@var{arch} -mcpu=@var{cpu} @gol | |
733 -mbig-endian -EB -mlittle-endian -EL @gol | |
734 -mhard-float -msoft-float -mfpu=@var{fpu} -mdouble-float -mfdivdu @gol | |
735 -melrw -mistack -mmp -mcp -mcache -msecurity -mtrust @gol | |
736 -mdsp -medsp -mvdsp @gol | |
737 -mdiv -msmart -mhigh-registers -manchor @gol | |
738 -mpushpop -mmultiple-stld -mconstpool -mstack-size -mccrt @gol | |
739 -mbranch-cost=@var{n} -mcse-cc -msched-prolog} | |
702 | 740 |
703 @emph{Darwin Options} | 741 @emph{Darwin Options} |
704 @gccoptlist{-all_load -allowable_client -arch -arch_errors_fatal @gol | 742 @gccoptlist{-all_load -allowable_client -arch -arch_errors_fatal @gol |
705 -arch_only -bind_at_load -bundle -bundle_loader @gol | 743 -arch_only -bind_at_load -bundle -bundle_loader @gol |
706 -client_name -compatibility_version -current_version @gol | 744 -client_name -compatibility_version -current_version @gol |
741 | 779 |
742 @emph{FR30 Options} | 780 @emph{FR30 Options} |
743 @gccoptlist{-msmall-model -mno-lsim} | 781 @gccoptlist{-msmall-model -mno-lsim} |
744 | 782 |
745 @emph{FT32 Options} | 783 @emph{FT32 Options} |
746 @gccoptlist{-msim -mlra -mnodiv} | 784 @gccoptlist{-msim -mlra -mnodiv -mft32b -mcompress -mnopm} |
747 | 785 |
748 @emph{FRV Options} | 786 @emph{FRV Options} |
749 @gccoptlist{-mgpr-32 -mgpr-64 -mfpr-32 -mfpr-64 @gol | 787 @gccoptlist{-mgpr-32 -mgpr-64 -mfpr-32 -mfpr-64 @gol |
750 -mhard-float -msoft-float @gol | 788 -mhard-float -msoft-float @gol |
751 -malloc-cc -mfixed-cc -mdword -mno-dword @gol | 789 -malloc-cc -mfixed-cc -mdword -mno-dword @gol |
855 @emph{MicroBlaze Options} | 893 @emph{MicroBlaze Options} |
856 @gccoptlist{-msoft-float -mhard-float -msmall-divides -mcpu=@var{cpu} @gol | 894 @gccoptlist{-msoft-float -mhard-float -msmall-divides -mcpu=@var{cpu} @gol |
857 -mmemcpy -mxl-soft-mul -mxl-soft-div -mxl-barrel-shift @gol | 895 -mmemcpy -mxl-soft-mul -mxl-soft-div -mxl-barrel-shift @gol |
858 -mxl-pattern-compare -mxl-stack-check -mxl-gp-opt -mno-clearbss @gol | 896 -mxl-pattern-compare -mxl-stack-check -mxl-gp-opt -mno-clearbss @gol |
859 -mxl-multiply-high -mxl-float-convert -mxl-float-sqrt @gol | 897 -mxl-multiply-high -mxl-float-convert -mxl-float-sqrt @gol |
860 -mbig-endian -mlittle-endian -mxl-reorder -mxl-mode-@var{app-model}} | 898 -mbig-endian -mlittle-endian -mxl-reorder -mxl-mode-@var{app-model} |
899 -mpic-data-is-text-relative} | |
861 | 900 |
862 @emph{MIPS Options} | 901 @emph{MIPS Options} |
863 @gccoptlist{-EL -EB -march=@var{arch} -mtune=@var{arch} @gol | 902 @gccoptlist{-EL -EB -march=@var{arch} -mtune=@var{arch} @gol |
864 -mips1 -mips2 -mips3 -mips4 -mips32 -mips32r2 -mips32r3 -mips32r5 @gol | 903 -mips1 -mips2 -mips3 -mips4 -mips32 -mips32r2 -mips32r3 -mips32r5 @gol |
865 -mips32r6 -mips64 -mips64r2 -mips64r3 -mips64r5 -mips64r6 @gol | 904 -mips32r6 -mips64 -mips64r2 -mips64r3 -mips64r5 -mips64r6 @gol |
875 -mdsp -mno-dsp -mdspr2 -mno-dspr2 @gol | 914 -mdsp -mno-dsp -mdspr2 -mno-dspr2 @gol |
876 -mmcu -mmno-mcu @gol | 915 -mmcu -mmno-mcu @gol |
877 -meva -mno-eva @gol | 916 -meva -mno-eva @gol |
878 -mvirt -mno-virt @gol | 917 -mvirt -mno-virt @gol |
879 -mxpa -mno-xpa @gol | 918 -mxpa -mno-xpa @gol |
919 -mcrc -mno-crc @gol | |
920 -mginv -mno-ginv @gol | |
880 -mmicromips -mno-micromips @gol | 921 -mmicromips -mno-micromips @gol |
881 -mmsa -mno-msa @gol | 922 -mmsa -mno-msa @gol |
882 -mfpu=@var{fpu-type} @gol | 923 -mfpu=@var{fpu-type} @gol |
883 -msmartmips -mno-smartmips @gol | 924 -msmartmips -mno-smartmips @gol |
884 -mpaired-single -mno-paired-single -mdmx -mno-mdmx @gol | 925 -mpaired-single -mno-paired-single -mdmx -mno-mdmx @gol |
935 | 976 |
936 @emph{NDS32 Options} | 977 @emph{NDS32 Options} |
937 @gccoptlist{-mbig-endian -mlittle-endian @gol | 978 @gccoptlist{-mbig-endian -mlittle-endian @gol |
938 -mreduced-regs -mfull-regs @gol | 979 -mreduced-regs -mfull-regs @gol |
939 -mcmov -mno-cmov @gol | 980 -mcmov -mno-cmov @gol |
940 -mperf-ext -mno-perf-ext @gol | 981 -mext-perf -mno-ext-perf @gol |
982 -mext-perf2 -mno-ext-perf2 @gol | |
983 -mext-string -mno-ext-string @gol | |
941 -mv3push -mno-v3push @gol | 984 -mv3push -mno-v3push @gol |
942 -m16bit -mno-16bit @gol | 985 -m16bit -mno-16bit @gol |
943 -misr-vector-size=@var{num} @gol | 986 -misr-vector-size=@var{num} @gol |
944 -mcache-block-size=@var{num} @gol | 987 -mcache-block-size=@var{num} @gol |
945 -march=@var{arch} @gol | 988 -march=@var{arch} @gol |
962 @emph{Nvidia PTX Options} | 1005 @emph{Nvidia PTX Options} |
963 @gccoptlist{-m32 -m64 -mmainkernel -moptimize} | 1006 @gccoptlist{-m32 -m64 -mmainkernel -moptimize} |
964 | 1007 |
965 @emph{PDP-11 Options} | 1008 @emph{PDP-11 Options} |
966 @gccoptlist{-mfpu -msoft-float -mac0 -mno-ac0 -m40 -m45 -m10 @gol | 1009 @gccoptlist{-mfpu -msoft-float -mac0 -mno-ac0 -m40 -m45 -m10 @gol |
967 -mbcopy -mbcopy-builtin -mint32 -mno-int16 @gol | 1010 -mint32 -mno-int16 -mint16 -mno-int32 @gol |
968 -mint16 -mno-int32 -mfloat32 -mno-float64 @gol | 1011 -msplit -munix-asm -mdec-asm -mgnu-asm -mlra} |
969 -mfloat64 -mno-float32 -mabshi -mno-abshi @gol | |
970 -mbranch-expensive -mbranch-cheap @gol | |
971 -munix-asm -mdec-asm} | |
972 | 1012 |
973 @emph{picoChip Options} | 1013 @emph{picoChip Options} |
974 @gccoptlist{-mae=@var{ae_type} -mvliw-lookahead=@var{N} @gol | 1014 @gccoptlist{-mae=@var{ae_type} -mvliw-lookahead=@var{N} @gol |
975 -msymbol-as-address -mno-inefficient-warnings} | 1015 -msymbol-as-address -mno-inefficient-warnings} |
976 | 1016 |
977 @emph{PowerPC Options} | 1017 @emph{PowerPC Options} |
978 See RS/6000 and PowerPC Options. | 1018 See RS/6000 and PowerPC Options. |
979 | 1019 |
1020 @emph{PowerPC SPE Options} | |
1021 @gccoptlist{-mcpu=@var{cpu-type} @gol | |
1022 -mtune=@var{cpu-type} @gol | |
1023 -mmfcrf -mno-mfcrf -mpopcntb -mno-popcntb @gol | |
1024 -mfull-toc -mminimal-toc -mno-fp-in-toc -mno-sum-in-toc @gol | |
1025 -m32 -mxl-compat -mno-xl-compat @gol | |
1026 -malign-power -malign-natural @gol | |
1027 -msoft-float -mhard-float -mmultiple -mno-multiple @gol | |
1028 -msingle-float -mdouble-float @gol | |
1029 -mupdate -mno-update @gol | |
1030 -mavoid-indexed-addresses -mno-avoid-indexed-addresses @gol | |
1031 -mstrict-align -mno-strict-align -mrelocatable @gol | |
1032 -mno-relocatable -mrelocatable-lib -mno-relocatable-lib @gol | |
1033 -mtoc -mno-toc -mlittle -mlittle-endian -mbig -mbig-endian @gol | |
1034 -msingle-pic-base @gol | |
1035 -mprioritize-restricted-insns=@var{priority} @gol | |
1036 -msched-costly-dep=@var{dependence_type} @gol | |
1037 -minsert-sched-nops=@var{scheme} @gol | |
1038 -mcall-sysv -mcall-netbsd @gol | |
1039 -maix-struct-return -msvr4-struct-return @gol | |
1040 -mabi=@var{abi-type} -msecure-plt -mbss-plt @gol | |
1041 -mblock-move-inline-limit=@var{num} @gol | |
1042 -misel -mno-isel @gol | |
1043 -misel=yes -misel=no @gol | |
1044 -mspe -mno-spe @gol | |
1045 -mspe=yes -mspe=no @gol | |
1046 -mfloat-gprs=yes -mfloat-gprs=no -mfloat-gprs=single -mfloat-gprs=double @gol | |
1047 -mprototype -mno-prototype @gol | |
1048 -msim -mmvme -mads -myellowknife -memb -msdata @gol | |
1049 -msdata=@var{opt} -mvxworks -G @var{num} @gol | |
1050 -mrecip -mrecip=@var{opt} -mno-recip -mrecip-precision @gol | |
1051 -mno-recip-precision @gol | |
1052 -mpointers-to-nested-functions -mno-pointers-to-nested-functions @gol | |
1053 -msave-toc-indirect -mno-save-toc-indirect @gol | |
1054 -mcompat-align-parm -mno-compat-align-parm @gol | |
1055 -mfloat128 -mno-float128 @gol | |
1056 -mgnu-attribute -mno-gnu-attribute @gol | |
1057 -mstack-protector-guard=@var{guard} -mstack-protector-guard-reg=@var{reg} @gol | |
1058 -mstack-protector-guard-offset=@var{offset}} | |
1059 | |
980 @emph{RISC-V Options} | 1060 @emph{RISC-V Options} |
981 @gccoptlist{-mbranch-cost=@var{N-instruction} @gol | 1061 @gccoptlist{-mbranch-cost=@var{N-instruction} @gol |
982 -mmemcpy -mno-memcpy @gol | |
983 -mplt -mno-plt @gol | 1062 -mplt -mno-plt @gol |
984 -mabi=@var{ABI-string} @gol | 1063 -mabi=@var{ABI-string} @gol |
985 -mfdiv -mno-fdiv @gol | 1064 -mfdiv -mno-fdiv @gol |
986 -mdiv -mno-div @gol | 1065 -mdiv -mno-div @gol |
987 -march=@var{ISA-string} @gol | 1066 -march=@var{ISA-string} @gol |
988 -mtune=@var{processor-string} @gol | 1067 -mtune=@var{processor-string} @gol |
1068 -mpreferred-stack-boundary=@var{num} @gol | |
989 -msmall-data-limit=@var{N-bytes} @gol | 1069 -msmall-data-limit=@var{N-bytes} @gol |
990 -msave-restore -mno-save-restore @gol | 1070 -msave-restore -mno-save-restore @gol |
991 -mstrict-align -mno-strict-align @gol | 1071 -mstrict-align -mno-strict-align @gol |
992 -mcmodel=@var{code-model} @gol | 1072 -mcmodel=medlow -mcmodel=medany @gol |
993 -mexplicit-relocs -mno-explicit-relocs @gol} | 1073 -mexplicit-relocs -mno-explicit-relocs @gol |
1074 -mrelax -mno-relax @gol} | |
994 | 1075 |
995 @emph{RL78 Options} | 1076 @emph{RL78 Options} |
996 @gccoptlist{-msim -mmul=none -mmul=g13 -mmul=g14 -mallregs @gol | 1077 @gccoptlist{-msim -mmul=none -mmul=g13 -mmul=g14 -mallregs @gol |
997 -mcpu=g10 -mcpu=g13 -mcpu=g14 -mg10 -mg13 -mg14 @gol | 1078 -mcpu=g10 -mcpu=g13 -mcpu=g14 -mg10 -mg13 -mg14 @gol |
998 -m64bit-doubles -m32bit-doubles -msave-mduc-in-interrupts} | 1079 -m64bit-doubles -m32bit-doubles -msave-mduc-in-interrupts} |
1010 -mcmpb -mno-cmpb -mmfpgpr -mno-mfpgpr -mhard-dfp -mno-hard-dfp @gol | 1091 -mcmpb -mno-cmpb -mmfpgpr -mno-mfpgpr -mhard-dfp -mno-hard-dfp @gol |
1011 -mfull-toc -mminimal-toc -mno-fp-in-toc -mno-sum-in-toc @gol | 1092 -mfull-toc -mminimal-toc -mno-fp-in-toc -mno-sum-in-toc @gol |
1012 -m64 -m32 -mxl-compat -mno-xl-compat -mpe @gol | 1093 -m64 -m32 -mxl-compat -mno-xl-compat -mpe @gol |
1013 -malign-power -malign-natural @gol | 1094 -malign-power -malign-natural @gol |
1014 -msoft-float -mhard-float -mmultiple -mno-multiple @gol | 1095 -msoft-float -mhard-float -mmultiple -mno-multiple @gol |
1015 -msingle-float -mdouble-float -msimple-fpu @gol | 1096 -mupdate -mno-update @gol |
1016 -mstring -mno-string -mupdate -mno-update @gol | |
1017 -mavoid-indexed-addresses -mno-avoid-indexed-addresses @gol | 1097 -mavoid-indexed-addresses -mno-avoid-indexed-addresses @gol |
1018 -mfused-madd -mno-fused-madd -mbit-align -mno-bit-align @gol | 1098 -mfused-madd -mno-fused-madd -mbit-align -mno-bit-align @gol |
1019 -mstrict-align -mno-strict-align -mrelocatable @gol | 1099 -mstrict-align -mno-strict-align -mrelocatable @gol |
1020 -mno-relocatable -mrelocatable-lib -mno-relocatable-lib @gol | 1100 -mno-relocatable -mrelocatable-lib -mno-relocatable-lib @gol |
1021 -mtoc -mno-toc -mlittle -mlittle-endian -mbig -mbig-endian @gol | 1101 -mtoc -mno-toc -mlittle -mlittle-endian -mbig -mbig-endian @gol |
1022 -mdynamic-no-pic -maltivec -mswdiv -msingle-pic-base @gol | 1102 -mdynamic-no-pic -maltivec -mswdiv -msingle-pic-base @gol |
1023 -mprioritize-restricted-insns=@var{priority} @gol | 1103 -mprioritize-restricted-insns=@var{priority} @gol |
1024 -msched-costly-dep=@var{dependence_type} @gol | 1104 -msched-costly-dep=@var{dependence_type} @gol |
1025 -minsert-sched-nops=@var{scheme} @gol | 1105 -minsert-sched-nops=@var{scheme} @gol |
1026 -mcall-sysv -mcall-netbsd @gol | 1106 -mcall-aixdesc -mcall-eabi -mcall-freebsd @gol |
1107 -mcall-linux -mcall-netbsd -mcall-openbsd @gol | |
1108 -mcall-sysv -mcall-sysv-eabi -mcall-sysv-noeabi @gol | |
1109 -mtraceback=@var{traceback_type} @gol | |
1027 -maix-struct-return -msvr4-struct-return @gol | 1110 -maix-struct-return -msvr4-struct-return @gol |
1028 -mabi=@var{abi-type} -msecure-plt -mbss-plt @gol | 1111 -mabi=@var{abi-type} -msecure-plt -mbss-plt @gol |
1029 -mblock-move-inline-limit=@var{num} @gol | 1112 -mblock-move-inline-limit=@var{num} @gol |
1113 -mblock-compare-inline-limit=@var{num} @gol | |
1114 -mblock-compare-inline-loop-limit=@var{num} @gol | |
1115 -mstring-compare-inline-limit=@var{num} @gol | |
1030 -misel -mno-isel @gol | 1116 -misel -mno-isel @gol |
1031 -misel=yes -misel=no @gol | |
1032 -mspe -mno-spe @gol | |
1033 -mspe=yes -mspe=no @gol | |
1034 -mpaired @gol | |
1035 -mvrsave -mno-vrsave @gol | 1117 -mvrsave -mno-vrsave @gol |
1036 -mmulhw -mno-mulhw @gol | 1118 -mmulhw -mno-mulhw @gol |
1037 -mdlmzb -mno-dlmzb @gol | 1119 -mdlmzb -mno-dlmzb @gol |
1038 -mfloat-gprs=yes -mfloat-gprs=no -mfloat-gprs=single -mfloat-gprs=double @gol | |
1039 -mprototype -mno-prototype @gol | 1120 -mprototype -mno-prototype @gol |
1040 -msim -mmvme -mads -myellowknife -memb -msdata @gol | 1121 -msim -mmvme -mads -myellowknife -memb -msdata @gol |
1041 -msdata=@var{opt} -mvxworks -G @var{num} @gol | 1122 -msdata=@var{opt} -mreadonly-in-sdata -mvxworks -G @var{num} @gol |
1042 -mrecip -mrecip=@var{opt} -mno-recip -mrecip-precision @gol | 1123 -mrecip -mrecip=@var{opt} -mno-recip -mrecip-precision @gol |
1043 -mno-recip-precision @gol | 1124 -mno-recip-precision @gol |
1044 -mveclibabi=@var{type} -mfriz -mno-friz @gol | 1125 -mveclibabi=@var{type} -mfriz -mno-friz @gol |
1045 -mpointers-to-nested-functions -mno-pointers-to-nested-functions @gol | 1126 -mpointers-to-nested-functions -mno-pointers-to-nested-functions @gol |
1046 -msave-toc-indirect -mno-save-toc-indirect @gol | 1127 -msave-toc-indirect -mno-save-toc-indirect @gol |
1047 -mpower8-fusion -mno-mpower8-fusion -mpower8-vector -mno-power8-vector @gol | 1128 -mpower8-fusion -mno-mpower8-fusion -mpower8-vector -mno-power8-vector @gol |
1048 -mcrypto -mno-crypto -mhtm -mno-htm -mdirect-move -mno-direct-move @gol | 1129 -mcrypto -mno-crypto -mhtm -mno-htm @gol |
1049 -mquad-memory -mno-quad-memory @gol | 1130 -mquad-memory -mno-quad-memory @gol |
1050 -mquad-memory-atomic -mno-quad-memory-atomic @gol | 1131 -mquad-memory-atomic -mno-quad-memory-atomic @gol |
1051 -mcompat-align-parm -mno-compat-align-parm @gol | 1132 -mcompat-align-parm -mno-compat-align-parm @gol |
1052 -mfloat128 -mno-float128 -mfloat128-hardware -mno-float128-hardware @gol | 1133 -mfloat128 -mno-float128 -mfloat128-hardware -mno-float128-hardware @gol |
1053 -mgnu-attribute -mno-gnu-attribute @gol | 1134 -mgnu-attribute -mno-gnu-attribute @gol |
1194 -mno-wide-multiply -mrtd -malign-double @gol | 1275 -mno-wide-multiply -mrtd -malign-double @gol |
1195 -mpreferred-stack-boundary=@var{num} @gol | 1276 -mpreferred-stack-boundary=@var{num} @gol |
1196 -mincoming-stack-boundary=@var{num} @gol | 1277 -mincoming-stack-boundary=@var{num} @gol |
1197 -mcld -mcx16 -msahf -mmovbe -mcrc32 @gol | 1278 -mcld -mcx16 -msahf -mmovbe -mcrc32 @gol |
1198 -mrecip -mrecip=@var{opt} @gol | 1279 -mrecip -mrecip=@var{opt} @gol |
1199 -mvzeroupper -mprefer-avx128 -mprefer-avx256 @gol | 1280 -mvzeroupper -mprefer-avx128 -mprefer-vector-width=@var{opt} @gol |
1200 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -msse4 -mavx @gol | 1281 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -msse4 -mavx @gol |
1201 -mavx2 -mavx512f -mavx512pf -mavx512er -mavx512cd -mavx512vl @gol | 1282 -mavx2 -mavx512f -mavx512pf -mavx512er -mavx512cd -mavx512vl @gol |
1202 -mavx512bw -mavx512dq -mavx512ifma -mavx512vbmi -msha -maes @gol | 1283 -mavx512bw -mavx512dq -mavx512ifma -mavx512vbmi -msha -maes @gol |
1203 -mpclmul -mfsgsbase -mrdrnd -mf16c -mfma @gol | 1284 -mpclmul -mfsgsbase -mrdrnd -mf16c -mfma -mpconfig -mwbnoinvd @gol |
1204 -mprefetchwt1 -mclflushopt -mxsavec -mxsaves @gol | 1285 -mprefetchwt1 -mclflushopt -mxsavec -mxsaves @gol |
1205 -msse4a -m3dnow -m3dnowa -mpopcnt -mabm -mbmi -mtbm -mfma4 -mxop @gol | 1286 -msse4a -m3dnow -m3dnowa -mpopcnt -mabm -mbmi -mtbm -mfma4 -mxop @gol |
1206 -mlzcnt -mbmi2 -mfxsr -mxsave -mxsaveopt -mrtm -mlwp -mmpx @gol | 1287 -mlzcnt -mbmi2 -mfxsr -mxsave -mxsaveopt -mrtm -mlwp @gol |
1207 -mmwaitx -mclzero -mpku -mthreads @gol | 1288 -mmwaitx -mclzero -mpku -mthreads -mgfni -mvaes -mwaitpkg @gol |
1208 -mcet -mibt -mshstk @gol | 1289 -mshstk -mforce-indirect-call -mavx512vbmi2 @gol |
1290 -mvpclmulqdq -mavx512bitalg -mmovdiri -mmovdir64b -mavx512vpopcntdq | |
1291 -mcldemote @gol | |
1209 -mms-bitfields -mno-align-stringops -minline-all-stringops @gol | 1292 -mms-bitfields -mno-align-stringops -minline-all-stringops @gol |
1210 -minline-stringops-dynamically -mstringop-strategy=@var{alg} @gol | 1293 -minline-stringops-dynamically -mstringop-strategy=@var{alg} @gol |
1211 -mmemcpy-strategy=@var{strategy} -mmemset-strategy=@var{strategy} @gol | 1294 -mmemcpy-strategy=@var{strategy} -mmemset-strategy=@var{strategy} @gol |
1212 -mpush-args -maccumulate-outgoing-args -m128bit-long-double @gol | 1295 -mpush-args -maccumulate-outgoing-args -m128bit-long-double @gol |
1213 -m96bit-long-double -mlong-double-64 -mlong-double-80 -mlong-double-128 @gol | 1296 -m96bit-long-double -mlong-double-64 -mlong-double-80 -mlong-double-128 @gol |
1220 -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol | 1303 -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol |
1221 -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol | 1304 -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol |
1222 -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol | 1305 -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol |
1223 -mstack-protector-guard-reg=@var{reg} @gol | 1306 -mstack-protector-guard-reg=@var{reg} @gol |
1224 -mstack-protector-guard-offset=@var{offset} @gol | 1307 -mstack-protector-guard-offset=@var{offset} @gol |
1225 -mstack-protector-guard-symbol=@var{symbol} -mmitigate-rop @gol | 1308 -mstack-protector-guard-symbol=@var{symbol} @gol |
1226 -mgeneral-regs-only -mcall-ms2sysv-xlogues} | 1309 -mgeneral-regs-only -mcall-ms2sysv-xlogues @gol |
1310 -mindirect-branch=@var{choice} -mfunction-return=@var{choice} @gol | |
1311 -mindirect-branch-register} | |
1227 | 1312 |
1228 @emph{x86 Windows Options} | 1313 @emph{x86 Windows Options} |
1229 @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol | 1314 @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol |
1230 -mnop-fun-dllimport -mthread @gol | 1315 -mnop-fun-dllimport -mthread @gol |
1231 -municode -mwin32 -mwindows -fno-set-stack-executable} | 1316 -municode -mwin32 -mwindows -fno-set-stack-executable} |
1364 @item @var{file}.adb | 1449 @item @var{file}.adb |
1365 Ada source code file containing a library unit body (a subprogram or | 1450 Ada source code file containing a library unit body (a subprogram or |
1366 package body). Such files are also called @dfn{bodies}. | 1451 package body). Such files are also called @dfn{bodies}. |
1367 | 1452 |
1368 @c GCC also knows about some suffixes for languages not yet included: | 1453 @c GCC also knows about some suffixes for languages not yet included: |
1369 @c Pascal: | |
1370 @c @var{file}.p | |
1371 @c @var{file}.pas | |
1372 @c Ratfor: | 1454 @c Ratfor: |
1373 @c @var{file}.r | 1455 @c @var{file}.r |
1374 | 1456 |
1375 @item @var{file}.s | 1457 @item @var{file}.s |
1376 Assembler code. | 1458 Assembler code. |
1650 @noindent | 1732 @noindent |
1651 This invokes all subprograms of @command{gcc} under | 1733 This invokes all subprograms of @command{gcc} under |
1652 @samp{gdb --args}, thus the invocation of @command{cc1} is | 1734 @samp{gdb --args}, thus the invocation of @command{cc1} is |
1653 @samp{gdb --args cc1 @dots{}}. | 1735 @samp{gdb --args cc1 @dots{}}. |
1654 | 1736 |
1737 @item -ffile-prefix-map=@var{old}=@var{new} | |
1738 @opindex ffile-prefix-map | |
1739 When compiling files residing in directory @file{@var{old}}, record | |
1740 any references to them in the result of the compilation as if the | |
1741 files resided in directory @file{@var{new}} instead. Specifying this | |
1742 option is equivalent to specifying all the individual | |
1743 @option{-f*-prefix-map} options. This can be used to make reproducible | |
1744 builds that are location independent. See also | |
1745 @option{-fmacro-prefix-map} and @option{-fdebug-prefix-map}. | |
1746 | |
1655 @item -fplugin=@var{name}.so | 1747 @item -fplugin=@var{name}.so |
1656 @opindex fplugin | 1748 @opindex fplugin |
1657 Load the plugin code in file @var{name}.so, assumed to be a | 1749 Load the plugin code in file @var{name}.so, assumed to be a |
1658 shared object to be dlopen'd by the compiler. The base name of | 1750 shared object to be dlopen'd by the compiler. The base name of |
1659 the shared object file is used to identify the plugin for the | 1751 the shared object file is used to identify the plugin for the |
1829 substantially completely supported, modulo bugs, floating-point issues | 1921 substantially completely supported, modulo bugs, floating-point issues |
1830 (mainly but not entirely relating to optional C11 features from | 1922 (mainly but not entirely relating to optional C11 features from |
1831 Annexes F and G) and the optional Annexes K (Bounds-checking | 1923 Annexes F and G) and the optional Annexes K (Bounds-checking |
1832 interfaces) and L (Analyzability). The name @samp{c1x} is deprecated. | 1924 interfaces) and L (Analyzability). The name @samp{c1x} is deprecated. |
1833 | 1925 |
1926 @item c17 | |
1927 @itemx c18 | |
1928 @itemx iso9899:2017 | |
1929 @itemx iso9899:2018 | |
1930 ISO C17, the 2017 revision of the ISO C standard | |
1931 (published in 2018). This standard is | |
1932 same as C11 except for corrections of defects (all of which are also | |
1933 applied with @option{-std=c11}) and a new value of | |
1934 @code{__STDC_VERSION__}, and so is supported to the same extent as C11. | |
1935 | |
1936 @item c2x | |
1937 The next version of the ISO C standard, still under development. The | |
1938 support for this version is experimental and incomplete. | |
1939 | |
1834 @item gnu90 | 1940 @item gnu90 |
1835 @itemx gnu89 | 1941 @itemx gnu89 |
1836 GNU dialect of ISO C90 (including some C99 features). | 1942 GNU dialect of ISO C90 (including some C99 features). |
1837 | 1943 |
1838 @item gnu99 | 1944 @item gnu99 |
1839 @itemx gnu9x | 1945 @itemx gnu9x |
1840 GNU dialect of ISO C99. The name @samp{gnu9x} is deprecated. | 1946 GNU dialect of ISO C99. The name @samp{gnu9x} is deprecated. |
1841 | 1947 |
1842 @item gnu11 | 1948 @item gnu11 |
1843 @itemx gnu1x | 1949 @itemx gnu1x |
1844 GNU dialect of ISO C11. This is the default for C code. | 1950 GNU dialect of ISO C11. |
1845 The name @samp{gnu1x} is deprecated. | 1951 The name @samp{gnu1x} is deprecated. |
1952 | |
1953 @item gnu17 | |
1954 @itemx gnu18 | |
1955 GNU dialect of ISO C17. This is the default for C code. | |
1956 | |
1957 @item gnu2x | |
1958 The next version of the ISO C standard, still under development, plus | |
1959 GNU extensions. The support for this version is experimental and | |
1960 incomplete. | |
1846 | 1961 |
1847 @item c++98 | 1962 @item c++98 |
1848 @itemx c++03 | 1963 @itemx c++03 |
1849 The 1998 ISO C++ standard plus the 2003 technical corrigendum and some | 1964 The 1998 ISO C++ standard plus the 2003 technical corrigendum and some |
1850 additional defect reports. Same as @option{-ansi} for C++ code. | 1965 additional defect reports. Same as @option{-ansi} for C++ code. |
2069 @opindex fopenmp | 2184 @opindex fopenmp |
2070 @cindex OpenMP parallel | 2185 @cindex OpenMP parallel |
2071 Enable handling of OpenMP directives @code{#pragma omp} in C/C++ and | 2186 Enable handling of OpenMP directives @code{#pragma omp} in C/C++ and |
2072 @code{!$omp} in Fortran. When @option{-fopenmp} is specified, the | 2187 @code{!$omp} in Fortran. When @option{-fopenmp} is specified, the |
2073 compiler generates parallel code according to the OpenMP Application | 2188 compiler generates parallel code according to the OpenMP Application |
2074 Program Interface v4.5 @w{@uref{http://www.openmp.org/}}. This option | 2189 Program Interface v4.5 @w{@uref{https://www.openmp.org}}. This option |
2075 implies @option{-pthread}, and thus is only supported on targets that | 2190 implies @option{-pthread}, and thus is only supported on targets that |
2076 have support for @option{-pthread}. @option{-fopenmp} implies | 2191 have support for @option{-pthread}. @option{-fopenmp} implies |
2077 @option{-fopenmp-simd}. | 2192 @option{-fopenmp-simd}. |
2078 | 2193 |
2079 @item -fopenmp-simd | 2194 @item -fopenmp-simd |
2081 @cindex OpenMP SIMD | 2196 @cindex OpenMP SIMD |
2082 @cindex SIMD | 2197 @cindex SIMD |
2083 Enable handling of OpenMP's SIMD directives with @code{#pragma omp} | 2198 Enable handling of OpenMP's SIMD directives with @code{#pragma omp} |
2084 in C/C++ and @code{!$omp} in Fortran. Other OpenMP directives | 2199 in C/C++ and @code{!$omp} in Fortran. Other OpenMP directives |
2085 are ignored. | 2200 are ignored. |
2086 | |
2087 @item -fcilkplus | |
2088 @opindex fcilkplus | |
2089 @cindex Enable Cilk Plus | |
2090 Enable the usage of Cilk Plus language extension features for C/C++. | |
2091 When the option @option{-fcilkplus} is specified, enable the usage of | |
2092 the Cilk Plus Language extension features for C/C++. The present | |
2093 implementation follows ABI version 1.2. This is an experimental | |
2094 feature that is only partially complete, and whose interface may | |
2095 change in future versions of GCC as the official specification | |
2096 changes. Currently, all features but @code{_Cilk_for} have been | |
2097 implemented. | |
2098 | 2201 |
2099 @item -fgnu-tm | 2202 @item -fgnu-tm |
2100 @opindex fgnu-tm | 2203 @opindex fgnu-tm |
2101 When the option @option{-fgnu-tm} is specified, the compiler | 2204 When the option @option{-fgnu-tm} is specified, the compiler |
2102 generates code for the Linux variant of Intel's current Transactional | 2205 generates code for the Linux variant of Intel's current Transactional |
2283 sizeof... expressions and operator names. For multiple entities with | 2386 sizeof... expressions and operator names. For multiple entities with |
2284 the same name within a function, that are declared in different scopes, | 2387 the same name within a function, that are declared in different scopes, |
2285 the mangling now changes starting with the twelfth occurrence. It also | 2388 the mangling now changes starting with the twelfth occurrence. It also |
2286 implies @option{-fnew-inheriting-ctors}. | 2389 implies @option{-fnew-inheriting-ctors}. |
2287 | 2390 |
2391 Version 12, which first appeared in G++ 8, corrects the calling | |
2392 conventions for empty classes on the x86_64 target and for classes | |
2393 with only deleted copy/move constructors. It accidentally changes the | |
2394 calling convention for classes with a deleted copy constructor and a | |
2395 trivial move constructor. | |
2396 | |
2397 Version 13, which first appeared in G++ 8.2, fixes the accidental | |
2398 change in version 12. | |
2399 | |
2288 See also @option{-Wabi}. | 2400 See also @option{-Wabi}. |
2289 | 2401 |
2290 @item -fabi-compat-version=@var{n} | 2402 @item -fabi-compat-version=@var{n} |
2291 @opindex fabi-compat-version | 2403 @opindex fabi-compat-version |
2292 On targets that support strong aliases, G++ | 2404 On targets that support strong aliases, G++ |
2293 works around mangling changes by creating an alias with the correct | 2405 works around mangling changes by creating an alias with the correct |
2294 mangled name when defining a symbol with an incorrect mangled name. | 2406 mangled name when defining a symbol with an incorrect mangled name. |
2295 This switch specifies which ABI version to use for the alias. | 2407 This switch specifies which ABI version to use for the alias. |
2296 | 2408 |
2297 With @option{-fabi-version=0} (the default), this defaults to 8 (GCC 5 | 2409 With @option{-fabi-version=0} (the default), this defaults to 11 (GCC 7 |
2298 compatibility). If another ABI version is explicitly selected, this | 2410 compatibility). If another ABI version is explicitly selected, this |
2299 defaults to 0. For compatibility with GCC versions 3.2 through 4.9, | 2411 defaults to 0. For compatibility with GCC versions 3.2 through 4.9, |
2300 use @option{-fabi-compat-version=2}. | 2412 use @option{-fabi-compat-version=2}. |
2301 | 2413 |
2302 If this option is not provided but @option{-Wabi=@var{n}} is, that | 2414 If this option is not provided but @option{-Wabi=@var{n}} is, that |
2374 | 2486 |
2375 This deduction was implemented as a possible extension to the | 2487 This deduction was implemented as a possible extension to the |
2376 originally proposed semantics for the C++11 standard, but was not part | 2488 originally proposed semantics for the C++11 standard, but was not part |
2377 of the final standard, so it is disabled by default. This option is | 2489 of the final standard, so it is disabled by default. This option is |
2378 deprecated, and may be removed in a future version of G++. | 2490 deprecated, and may be removed in a future version of G++. |
2379 | |
2380 @item -ffriend-injection | |
2381 @opindex ffriend-injection | |
2382 Inject friend functions into the enclosing namespace, so that they are | |
2383 visible outside the scope of the class in which they are declared. | |
2384 Friend functions were documented to work this way in the old Annotated | |
2385 C++ Reference Manual. | |
2386 However, in ISO C++ a friend function that is not declared | |
2387 in an enclosing scope can only be found using argument dependent | |
2388 lookup. GCC defaults to the standard behavior. | |
2389 | |
2390 This option is for compatibility, and may be removed in a future | |
2391 release of G++. | |
2392 | 2491 |
2393 @item -fno-elide-constructors | 2492 @item -fno-elide-constructors |
2394 @opindex fno-elide-constructors | 2493 @opindex fno-elide-constructors |
2395 The C++ standard allows an implementation to omit creating a temporary | 2494 The C++ standard allows an implementation to omit creating a temporary |
2396 that is only used to initialize another object of the same type. | 2495 that is only used to initialize another object of the same type. |
2432 | 2531 |
2433 On targets that support symbol aliases, the default is | 2532 On targets that support symbol aliases, the default is |
2434 @option{-fextern-tls-init}. On targets that do not support symbol | 2533 @option{-fextern-tls-init}. On targets that do not support symbol |
2435 aliases, the default is @option{-fno-extern-tls-init}. | 2534 aliases, the default is @option{-fno-extern-tls-init}. |
2436 | 2535 |
2437 @item -ffor-scope | |
2438 @itemx -fno-for-scope | |
2439 @opindex ffor-scope | |
2440 @opindex fno-for-scope | |
2441 If @option{-ffor-scope} is specified, the scope of variables declared in | |
2442 a @i{for-init-statement} is limited to the @code{for} loop itself, | |
2443 as specified by the C++ standard. | |
2444 If @option{-fno-for-scope} is specified, the scope of variables declared in | |
2445 a @i{for-init-statement} extends to the end of the enclosing scope, | |
2446 as was the case in old versions of G++, and other (traditional) | |
2447 implementations of C++. | |
2448 | |
2449 If neither flag is given, the default is to follow the standard, | |
2450 but to allow and give a warning for old-style code that would | |
2451 otherwise be invalid, or have different behavior. | |
2452 | |
2453 @item -fno-gnu-keywords | 2536 @item -fno-gnu-keywords |
2454 @opindex fno-gnu-keywords | 2537 @opindex fno-gnu-keywords |
2455 Do not recognize @code{typeof} as a keyword, so that code can use this | 2538 Do not recognize @code{typeof} as a keyword, so that code can use this |
2456 word as an identifier. You can use the keyword @code{__typeof__} instead. | 2539 word as an identifier. You can use the keyword @code{__typeof__} instead. |
2457 This option is implied by the strict ISO C++ dialects: @option{-ansi}, | 2540 This option is implied by the strict ISO C++ dialects: @option{-ansi}, |
2857 has virtual functions and non-virtual destructor. It is unsafe to delete | 2940 has virtual functions and non-virtual destructor. It is unsafe to delete |
2858 an instance of a derived class through a pointer to a base class if the | 2941 an instance of a derived class through a pointer to a base class if the |
2859 base class does not have a virtual destructor. This warning is enabled | 2942 base class does not have a virtual destructor. This warning is enabled |
2860 by @option{-Wall}. | 2943 by @option{-Wall}. |
2861 | 2944 |
2945 @item -Wdeprecated-copy @r{(C++ and Objective-C++ only)} | |
2946 @opindex Wdeprecated-copy | |
2947 @opindex Wno-deprecated-copy | |
2948 Warn that the implicit declaration of a copy constructor or copy | |
2949 assignment operator is deprecated if the class has a user-provided | |
2950 copy constructor, copy assignment operator, or destructor, in C++11 | |
2951 and up. This warning is enabled by @option{-Wall}. | |
2952 | |
2953 @item -Wno-init-list-lifetime @r{(C++ and Objective-C++ only)} | |
2954 @opindex Winit-list-lifetime | |
2955 @opindex Wno-init-list-lifetime | |
2956 Do not warn about uses of @code{std::initializer_list} that are likely | |
2957 to result in dangling pointers. Since the underlying array for an | |
2958 @code{initializer_list} is handled like a normal C++ temporary object, | |
2959 it is easy to inadvertently keep a pointer to the array past the end | |
2960 of the array's lifetime. For example: | |
2961 | |
2962 @itemize @bullet | |
2963 @item | |
2964 If a function returns a temporary @code{initializer_list}, or a local | |
2965 @code{initializer_list} variable, the array's lifetime ends at the end | |
2966 of the return statement, so the value returned has a dangling pointer. | |
2967 | |
2968 @item | |
2969 If a new-expression creates an @code{initializer_list}, the array only | |
2970 lives until the end of the enclosing full-expression, so the | |
2971 @code{initializer_list} in the heap has a dangling pointer. | |
2972 | |
2973 @item | |
2974 When an @code{initializer_list} variable is assigned from a | |
2975 brace-enclosed initializer list, the temporary array created for the | |
2976 right side of the assignment only lives until the end of the | |
2977 full-expression, so at the next statement the @code{initializer_list} | |
2978 variable has a dangling pointer. | |
2979 | |
2980 @smallexample | |
2981 // li's initial underlying array lives as long as li | |
2982 std::initializer_list<int> li = @{ 1,2,3 @}; | |
2983 // assignment changes li to point to a temporary array | |
2984 li = @{ 4, 5 @}; | |
2985 // now the temporary is gone and li has a dangling pointer | |
2986 int i = li.begin()[0] // undefined behavior | |
2987 @end smallexample | |
2988 | |
2989 @item | |
2990 When a list constructor stores the @code{begin} pointer from the | |
2991 @code{initializer_list} argument, this doesn't extend the lifetime of | |
2992 the array, so if a class variable is constructed from a temporary | |
2993 @code{initializer_list}, the pointer is left dangling by the end of | |
2994 the variable declaration statement. | |
2995 | |
2996 @end itemize | |
2997 | |
2862 @item -Wliteral-suffix @r{(C++ and Objective-C++ only)} | 2998 @item -Wliteral-suffix @r{(C++ and Objective-C++ only)} |
2863 @opindex Wliteral-suffix | 2999 @opindex Wliteral-suffix |
2864 @opindex Wno-literal-suffix | 3000 @opindex Wno-literal-suffix |
2865 Warn when a string or character literal is followed by a ud-suffix which does | 3001 Warn when a string or character literal is followed by a ud-suffix which does |
2866 not begin with an underscore. As a conforming extension, GCC treats such | 3002 not begin with an underscore. As a conforming extension, GCC treats such |
2929 @opindex Wno-noexcept-type | 3065 @opindex Wno-noexcept-type |
2930 Warn if the C++17 feature making @code{noexcept} part of a function | 3066 Warn if the C++17 feature making @code{noexcept} part of a function |
2931 type changes the mangled name of a symbol relative to C++14. Enabled | 3067 type changes the mangled name of a symbol relative to C++14. Enabled |
2932 by @option{-Wabi} and @option{-Wc++17-compat}. | 3068 by @option{-Wabi} and @option{-Wc++17-compat}. |
2933 | 3069 |
3070 As an example: | |
3071 | |
2934 @smallexample | 3072 @smallexample |
2935 template <class T> void f(T t) @{ t(); @}; | 3073 template <class T> void f(T t) @{ t(); @}; |
2936 void g() noexcept; | 3074 void g() noexcept; |
2937 void h() @{ f(g); @} // in C++14 calls f<void(*)()>, in C++17 calls f<void(*)()noexcept> | 3075 void h() @{ f(g); @} |
2938 @end smallexample | 3076 @end smallexample |
3077 | |
3078 @noindent | |
3079 In C++14, @code{f} calls @code{f<void(*)()>}, but in | |
3080 C++17 it calls @code{f<void(*)()noexcept>}. | |
2939 | 3081 |
2940 @item -Wclass-memaccess @r{(C++ and Objective-C++ only)} | 3082 @item -Wclass-memaccess @r{(C++ and Objective-C++ only)} |
2941 @opindex Wclass-memaccess | 3083 @opindex Wclass-memaccess |
3084 @opindex Wno-class-memaccess | |
2942 Warn when the destination of a call to a raw memory function such as | 3085 Warn when the destination of a call to a raw memory function such as |
2943 @code{memset} or @code{memcpy} is an object of class type writing into which | 3086 @code{memset} or @code{memcpy} is an object of class type, and when writing |
2944 might bypass the class non-trivial or deleted constructor or copy assignment, | 3087 into such an object might bypass the class non-trivial or deleted constructor |
2945 violate const-correctness or encapsulation, or corrupt the virtual table. | 3088 or copy assignment, violate const-correctness or encapsulation, or corrupt |
2946 Modifying the representation of such objects may violate invariants maintained | 3089 virtual table pointers. Modifying the representation of such objects may |
2947 by member functions of the class. For example, the call to @code{memset} | 3090 violate invariants maintained by member functions of the class. For example, |
2948 below is undefined becase it modifies a non-trivial class object and is, | 3091 the call to @code{memset} below is undefined because it modifies a non-trivial |
2949 therefore, diagnosed. The safe way to either initialize or clear the storage | 3092 class object and is, therefore, diagnosed. The safe way to either initialize |
2950 of objects of such types is by using the appropriate constructor or assignment | 3093 or clear the storage of objects of such types is by using the appropriate |
2951 operator, if one is available. | 3094 constructor or assignment operator, if one is available. |
2952 @smallexample | 3095 @smallexample |
2953 std::string str = "abc"; | 3096 std::string str = "abc"; |
2954 memset (&str, 0, 3); | 3097 memset (&str, 0, sizeof str); |
2955 @end smallexample | 3098 @end smallexample |
2956 The @option{-Wclass-memaccess} option is enabled by @option{-Wall}. | 3099 The @option{-Wclass-memaccess} option is enabled by @option{-Wall}. |
3100 Explicitly casting the pointer to the class object to @code{void *} or | |
3101 to a type that can be safely accessed by the raw memory function suppresses | |
3102 the warning. | |
2957 | 3103 |
2958 @item -Wnon-virtual-dtor @r{(C++ and Objective-C++ only)} | 3104 @item -Wnon-virtual-dtor @r{(C++ and Objective-C++ only)} |
2959 @opindex Wnon-virtual-dtor | 3105 @opindex Wnon-virtual-dtor |
2960 @opindex Wno-non-virtual-dtor | 3106 @opindex Wno-non-virtual-dtor |
2961 Warn when a class has virtual functions and an accessible non-virtual | 3107 Warn when a class has virtual functions and an accessible non-virtual |
2991 | 3137 |
2992 @noindent | 3138 @noindent |
2993 The compiler rearranges the member initializers for @code{i} | 3139 The compiler rearranges the member initializers for @code{i} |
2994 and @code{j} to match the declaration order of the members, emitting | 3140 and @code{j} to match the declaration order of the members, emitting |
2995 a warning to that effect. This warning is enabled by @option{-Wall}. | 3141 a warning to that effect. This warning is enabled by @option{-Wall}. |
3142 | |
3143 @item -Wno-pessimizing-move @r{(C++ and Objective-C++ only)} | |
3144 @opindex Wpessimizing-move | |
3145 @opindex Wno-pessimizing-move | |
3146 This warning warns when a call to @code{std::move} prevents copy | |
3147 elision. A typical scenario when copy elision can occur is when returning in | |
3148 a function with a class return type, when the expression being returned is the | |
3149 name of a non-volatile automatic object, and is not a function parameter, and | |
3150 has the same type as the function return type. | |
3151 | |
3152 @smallexample | |
3153 struct T @{ | |
3154 @dots{} | |
3155 @}; | |
3156 T fn() | |
3157 @{ | |
3158 T t; | |
3159 @dots{} | |
3160 return std::move (t); | |
3161 @} | |
3162 @end smallexample | |
3163 | |
3164 But in this example, the @code{std::move} call prevents copy elision. | |
3165 | |
3166 This warning is enabled by @option{-Wall}. | |
3167 | |
3168 @item -Wno-redundant-move @r{(C++ and Objective-C++ only)} | |
3169 @opindex Wredundant-move | |
3170 @opindex Wno-redundant-move | |
3171 This warning warns about redundant calls to @code{std::move}; that is, when | |
3172 a move operation would have been performed even without the @code{std::move} | |
3173 call. This happens because the compiler is forced to treat the object as if | |
3174 it were an rvalue in certain situations such as returning a local variable, | |
3175 where copy elision isn't applicable. Consider: | |
3176 | |
3177 @smallexample | |
3178 struct T @{ | |
3179 @dots{} | |
3180 @}; | |
3181 T fn(T t) | |
3182 @{ | |
3183 @dots{} | |
3184 return std::move (t); | |
3185 @} | |
3186 @end smallexample | |
3187 | |
3188 Here, the @code{std::move} call is redundant. Because G++ implements Core | |
3189 Issue 1579, another example is: | |
3190 | |
3191 @smallexample | |
3192 struct T @{ // convertible to U | |
3193 @dots{} | |
3194 @}; | |
3195 struct U @{ | |
3196 @dots{} | |
3197 @}; | |
3198 U fn() | |
3199 @{ | |
3200 T t; | |
3201 @dots{} | |
3202 return std::move (t); | |
3203 @} | |
3204 @end smallexample | |
3205 In this example, copy elision isn't applicable because the type of the | |
3206 expression being returned and the function return type differ, yet G++ | |
3207 treats the return value as if it were designated by an rvalue. | |
3208 | |
3209 This warning is enabled by @option{-Wextra}. | |
2996 | 3210 |
2997 @item -fext-numeric-literals @r{(C++ and Objective-C++ only)} | 3211 @item -fext-numeric-literals @r{(C++ and Objective-C++ only)} |
2998 @opindex fext-numeric-literals | 3212 @opindex fext-numeric-literals |
2999 @opindex fno-ext-numeric-literals | 3213 @opindex fno-ext-numeric-literals |
3000 Accept imaginary, fixed-point, or machine-defined | 3214 Accept imaginary, fixed-point, or machine-defined |
3120 the same size. Previous versions of G++ tried to preserve | 3334 the same size. Previous versions of G++ tried to preserve |
3121 unsignedness, but the standard mandates the current behavior. | 3335 unsignedness, but the standard mandates the current behavior. |
3122 | 3336 |
3123 @item -Wtemplates @r{(C++ and Objective-C++ only)} | 3337 @item -Wtemplates @r{(C++ and Objective-C++ only)} |
3124 @opindex Wtemplates | 3338 @opindex Wtemplates |
3339 @opindex Wno-templates | |
3125 Warn when a primary template declaration is encountered. Some coding | 3340 Warn when a primary template declaration is encountered. Some coding |
3126 rules disallow templates, and this may be used to enforce that rule. | 3341 rules disallow templates, and this may be used to enforce that rule. |
3127 The warning is inactive inside a system header file, such as the STL, so | 3342 The warning is inactive inside a system header file, such as the STL, so |
3128 one can still use the STL. One may also instantiate or specialize | 3343 one can still use the STL. One may also instantiate or specialize |
3129 templates. | 3344 templates. |
3130 | 3345 |
3131 @item -Wmultiple-inheritance @r{(C++ and Objective-C++ only)} | 3346 @item -Wmultiple-inheritance @r{(C++ and Objective-C++ only)} |
3132 @opindex Wmultiple-inheritance | 3347 @opindex Wmultiple-inheritance |
3348 @opindex Wno-multiple-inheritance | |
3133 Warn when a class is defined with multiple direct base classes. Some | 3349 Warn when a class is defined with multiple direct base classes. Some |
3134 coding rules disallow multiple inheritance, and this may be used to | 3350 coding rules disallow multiple inheritance, and this may be used to |
3135 enforce that rule. The warning is inactive inside a system header file, | 3351 enforce that rule. The warning is inactive inside a system header file, |
3136 such as the STL, so one can still use the STL. One may also define | 3352 such as the STL, so one can still use the STL. One may also define |
3137 classes that indirectly use multiple inheritance. | 3353 classes that indirectly use multiple inheritance. |
3138 | 3354 |
3139 @item -Wvirtual-inheritance | 3355 @item -Wvirtual-inheritance |
3140 @opindex Wvirtual-inheritance | 3356 @opindex Wvirtual-inheritance |
3357 @opindex Wno-virtual-inheritance | |
3141 Warn when a class is defined with a virtual direct base class. Some | 3358 Warn when a class is defined with a virtual direct base class. Some |
3142 coding rules disallow multiple inheritance, and this may be used to | 3359 coding rules disallow multiple inheritance, and this may be used to |
3143 enforce that rule. The warning is inactive inside a system header file, | 3360 enforce that rule. The warning is inactive inside a system header file, |
3144 such as the STL, so one can still use the STL. One may also define | 3361 such as the STL, so one can still use the STL. One may also define |
3145 classes that indirectly use virtual inheritance. | 3362 classes that indirectly use virtual inheritance. |
3146 | 3363 |
3147 @item -Wnamespaces | 3364 @item -Wnamespaces |
3148 @opindex Wnamespaces | 3365 @opindex Wnamespaces |
3366 @opindex Wno-namespaces | |
3149 Warn when a namespace definition is opened. Some coding rules disallow | 3367 Warn when a namespace definition is opened. Some coding rules disallow |
3150 namespaces, and this may be used to enforce that rule. The warning is | 3368 namespaces, and this may be used to enforce that rule. The warning is |
3151 inactive inside a system header file, such as the STL, so one can still | 3369 inactive inside a system header file, such as the STL, so one can still |
3152 use the STL. One may also use using directives and qualified names. | 3370 use the STL. One may also use using directives and qualified names. |
3153 | 3371 |
3154 @item -Wno-terminate @r{(C++ and Objective-C++ only)} | 3372 @item -Wno-terminate @r{(C++ and Objective-C++ only)} |
3155 @opindex Wterminate | 3373 @opindex Wterminate |
3156 @opindex Wno-terminate | 3374 @opindex Wno-terminate |
3157 Disable the warning about a throw-expression that will immediately | 3375 Disable the warning about a throw-expression that will immediately |
3158 result in a call to @code{terminate}. | 3376 result in a call to @code{terminate}. |
3377 | |
3378 @item -Wno-class-conversion @r{(C++ and Objective-C++ only)} | |
3379 @opindex Wno-class-conversion | |
3380 @opindex Wclass-conversion | |
3381 Disable the warning about the case when a conversion function converts an | |
3382 object to the same type, to a base class of that type, or to void; such | |
3383 a conversion function will never be called. | |
3159 @end table | 3384 @end table |
3160 | 3385 |
3161 @node Objective-C and Objective-C++ Dialect Options | 3386 @node Objective-C and Objective-C++ Dialect Options |
3162 @section Options Controlling Objective-C and Objective-C++ Dialects | 3387 @section Options Controlling Objective-C and Objective-C++ Dialects |
3163 | 3388 |
3425 @opindex fmessage-length | 3650 @opindex fmessage-length |
3426 Try to format error messages so that they fit on lines of about | 3651 Try to format error messages so that they fit on lines of about |
3427 @var{n} characters. If @var{n} is zero, then no line-wrapping is | 3652 @var{n} characters. If @var{n} is zero, then no line-wrapping is |
3428 done; each error message appears on a single line. This is the | 3653 done; each error message appears on a single line. This is the |
3429 default for all front ends. | 3654 default for all front ends. |
3655 | |
3656 Note - this option also affects the display of the @samp{#error} and | |
3657 @samp{#warning} pre-processor directives, and the @samp{deprecated} | |
3658 function/type/variable attribute. It does not however affect the | |
3659 @samp{pragma GCC warning} and @samp{pragma GCC error} pragmas. | |
3430 | 3660 |
3431 @item -fdiagnostics-show-location=once | 3661 @item -fdiagnostics-show-location=once |
3432 @opindex fdiagnostics-show-location | 3662 @opindex fdiagnostics-show-location |
3433 Only meaningful in line-wrapping mode. Instructs the diagnostic messages | 3663 Only meaningful in line-wrapping mode. Instructs the diagnostic messages |
3434 reporter to emit source location information @emph{once}; that is, in | 3664 reporter to emit source location information @emph{once}; that is, in |
3573 information. The source line is truncated to @var{n} characters, if | 3803 information. The source line is truncated to @var{n} characters, if |
3574 the @option{-fmessage-length=n} option is given. When the output is done | 3804 the @option{-fmessage-length=n} option is given. When the output is done |
3575 to the terminal, the width is limited to the width given by the | 3805 to the terminal, the width is limited to the width given by the |
3576 @env{COLUMNS} environment variable or, if not set, to the terminal width. | 3806 @env{COLUMNS} environment variable or, if not set, to the terminal width. |
3577 | 3807 |
3808 @item -fno-diagnostics-show-labels | |
3809 @opindex fno-diagnostics-show-labels | |
3810 @opindex fdiagnostics-show-labels | |
3811 By default, when printing source code (via @option{-fdiagnostics-show-caret}), | |
3812 diagnostics can label ranges of source code with pertinent information, such | |
3813 as the types of expressions: | |
3814 | |
3815 @smallexample | |
3816 printf ("foo %s bar", long_i + long_j); | |
3817 ~^ ~~~~~~~~~~~~~~~ | |
3818 | | | |
3819 char * long int | |
3820 @end smallexample | |
3821 | |
3822 This option suppresses the printing of these labels (in the example above, | |
3823 the vertical bars and the ``char *'' and ``long int'' text). | |
3824 | |
3825 @item -fno-diagnostics-show-line-numbers | |
3826 @opindex fno-diagnostics-show-line-numbers | |
3827 @opindex fdiagnostics-show-line-numbers | |
3828 By default, when printing source code (via @option{-fdiagnostics-show-caret}), | |
3829 a left margin is printed, showing line numbers. This option suppresses this | |
3830 left margin. | |
3831 | |
3832 @item -fdiagnostics-minimum-margin-width=@var{width} | |
3833 @opindex -fdiagnostics-minimum-margin-width | |
3834 This option controls the minimum width of the left margin printed by | |
3835 @option{-fdiagnostics-show-line-numbers}. It defaults to 6. | |
3836 | |
3578 @item -fdiagnostics-parseable-fixits | 3837 @item -fdiagnostics-parseable-fixits |
3579 @opindex fdiagnostics-parseable-fixits | 3838 @opindex fdiagnostics-parseable-fixits |
3580 Emit fix-it hints in a machine-parseable format, suitable for consumption | 3839 Emit fix-it hints in a machine-parseable format, suitable for consumption |
3581 by IDEs. For each fix-it, a line will be printed after the relevant | 3840 by IDEs. For each fix-it, a line will be printed after the relevant |
3582 diagnostic, starting with the string ``fix-it:''. For example: | 3841 diagnostic, starting with the string ``fix-it:''. For example: |
3774 @table @gcctabopt | 4033 @table @gcctabopt |
3775 @item -Wpedantic | 4034 @item -Wpedantic |
3776 @itemx -pedantic | 4035 @itemx -pedantic |
3777 @opindex pedantic | 4036 @opindex pedantic |
3778 @opindex Wpedantic | 4037 @opindex Wpedantic |
4038 @opindex Wno-pedantic | |
3779 Issue all the warnings demanded by strict ISO C and ISO C++; | 4039 Issue all the warnings demanded by strict ISO C and ISO C++; |
3780 reject all programs that use forbidden extensions, and some other | 4040 reject all programs that use forbidden extensions, and some other |
3781 programs that do not follow ISO C and ISO C++. For ISO C, follows the | 4041 programs that do not follow ISO C and ISO C++. For ISO C, follows the |
3782 version of the ISO C standard specified by any @option{-std} option used. | 4042 version of the ISO C standard specified by any @option{-std} option used. |
3783 | 4043 |
3855 -Wmain @r{(only for C/ObjC and unless} @option{-ffreestanding}@r{)} @gol | 4115 -Wmain @r{(only for C/ObjC and unless} @option{-ffreestanding}@r{)} @gol |
3856 -Wmaybe-uninitialized @gol | 4116 -Wmaybe-uninitialized @gol |
3857 -Wmemset-elt-size @gol | 4117 -Wmemset-elt-size @gol |
3858 -Wmemset-transposed-args @gol | 4118 -Wmemset-transposed-args @gol |
3859 -Wmisleading-indentation @r{(only for C/C++)} @gol | 4119 -Wmisleading-indentation @r{(only for C/C++)} @gol |
4120 -Wmissing-attributes @gol | |
3860 -Wmissing-braces @r{(only for C/ObjC)} @gol | 4121 -Wmissing-braces @r{(only for C/ObjC)} @gol |
3861 -Wmultistatement-macros @gol | 4122 -Wmultistatement-macros @gol |
3862 -Wnarrowing @r{(only for C++)} @gol | 4123 -Wnarrowing @r{(only for C++)} @gol |
3863 -Wnonnull @gol | 4124 -Wnonnull @gol |
3864 -Wnonnull-compare @gol | 4125 -Wnonnull-compare @gol |
3865 -Wopenmp-simd @gol | 4126 -Wopenmp-simd @gol |
3866 -Wparentheses @gol | 4127 -Wparentheses @gol |
4128 -Wpessimizing-move @r{(only for C++)} @gol | |
3867 -Wpointer-sign @gol | 4129 -Wpointer-sign @gol |
3868 -Wreorder @gol | 4130 -Wreorder @gol |
4131 -Wrestrict @gol | |
3869 -Wreturn-type @gol | 4132 -Wreturn-type @gol |
3870 -Wsequence-point @gol | 4133 -Wsequence-point @gol |
3871 -Wsign-compare @r{(only in C++)} @gol | 4134 -Wsign-compare @r{(only in C++)} @gol |
3872 -Wsizeof-pointer-div @gol | 4135 -Wsizeof-pointer-div @gol |
3873 -Wsizeof-pointer-memaccess @gol | 4136 -Wsizeof-pointer-memaccess @gol |
3900 This enables some extra warning flags that are not enabled by | 4163 This enables some extra warning flags that are not enabled by |
3901 @option{-Wall}. (This option used to be called @option{-W}. The older | 4164 @option{-Wall}. (This option used to be called @option{-W}. The older |
3902 name is still supported, but the newer name is more descriptive.) | 4165 name is still supported, but the newer name is more descriptive.) |
3903 | 4166 |
3904 @gccoptlist{-Wclobbered @gol | 4167 @gccoptlist{-Wclobbered @gol |
4168 -Wcast-function-type @gol | |
3905 -Wempty-body @gol | 4169 -Wempty-body @gol |
3906 -Wignored-qualifiers @gol | 4170 -Wignored-qualifiers @gol |
3907 -Wimplicit-fallthrough=3 @gol | 4171 -Wimplicit-fallthrough=3 @gol |
3908 -Wmissing-field-initializers @gol | 4172 -Wmissing-field-initializers @gol |
3909 -Wmissing-parameter-type @r{(C only)} @gol | 4173 -Wmissing-parameter-type @r{(C only)} @gol |
3910 -Wold-style-declaration @r{(C only)} @gol | 4174 -Wold-style-declaration @r{(C only)} @gol |
3911 -Woverride-init @gol | 4175 -Woverride-init @gol |
3912 -Wsign-compare @r{(C only)} @gol | 4176 -Wsign-compare @r{(C only)} @gol |
4177 -Wredundant-move @r{(only for C++)} @gol | |
3913 -Wtype-limits @gol | 4178 -Wtype-limits @gol |
3914 -Wuninitialized @gol | 4179 -Wuninitialized @gol |
3915 -Wshift-negative-value @r{(in C++03 and in C99 and newer)} @gol | 4180 -Wshift-negative-value @r{(in C++03 and in C99 and newer)} @gol |
3916 -Wunused-parameter @r{(only with} @option{-Wunused} @r{or} @option{-Wall}@r{)} @gol | 4181 -Wunused-parameter @r{(only with} @option{-Wunused} @r{or} @option{-Wall}@r{)} @gol |
3917 -Wunused-but-set-parameter @r{(only with} @option{-Wunused} @r{or} @option{-Wall}@r{)} @gol | 4182 -Wunused-but-set-parameter @r{(only with} @option{-Wunused} @r{or} @option{-Wall}@r{)} @gol |
3954 machines. | 4219 machines. |
3955 This warning is enabled by @option{-Wall}. | 4220 This warning is enabled by @option{-Wall}. |
3956 | 4221 |
3957 @item -Wchkp | 4222 @item -Wchkp |
3958 @opindex Wchkp | 4223 @opindex Wchkp |
4224 @opindex Wno-chkp | |
3959 Warn about an invalid memory access that is found by Pointer Bounds Checker | 4225 Warn about an invalid memory access that is found by Pointer Bounds Checker |
3960 (@option{-fcheck-pointer-bounds}). | 4226 (@option{-fcheck-pointer-bounds}). |
3961 | 4227 |
3962 @item -Wno-coverage-mismatch | 4228 @item -Wno-coverage-mismatch |
3963 @opindex Wno-coverage-mismatch | 4229 @opindex Wno-coverage-mismatch |
4230 @opindex Wcoverage-mismatch | |
3964 Warn if feedback profiles do not match when using the | 4231 Warn if feedback profiles do not match when using the |
3965 @option{-fprofile-use} option. | 4232 @option{-fprofile-use} option. |
3966 If a source file is changed between compiling with @option{-fprofile-gen} and | 4233 If a source file is changed between compiling with @option{-fprofile-generate} |
3967 with @option{-fprofile-use}, the files with the profile feedback can fail | 4234 and with @option{-fprofile-use}, the files with the profile feedback can fail |
3968 to match the source file and GCC cannot use the profile feedback | 4235 to match the source file and GCC cannot use the profile feedback |
3969 information. By default, this warning is enabled and is treated as an | 4236 information. By default, this warning is enabled and is treated as an |
3970 error. @option{-Wno-coverage-mismatch} can be used to disable the | 4237 error. @option{-Wno-coverage-mismatch} can be used to disable the |
3971 warning or @option{-Wno-error=coverage-mismatch} can be used to | 4238 warning or @option{-Wno-error=coverage-mismatch} can be used to |
3972 disable the error. Disabling the error for this warning can result in | 4239 disable the error. Disabling the error for this warning can result in |
4087 will in most cases improve the accuracy of the warning, it may also | 4354 will in most cases improve the accuracy of the warning, it may also |
4088 result in false positives. | 4355 result in false positives. |
4089 | 4356 |
4090 @table @gcctabopt | 4357 @table @gcctabopt |
4091 @item -Wformat-overflow | 4358 @item -Wformat-overflow |
4092 @item -Wformat-overflow=1 | 4359 @itemx -Wformat-overflow=1 |
4093 @opindex Wformat-overflow | 4360 @opindex Wformat-overflow |
4094 @opindex Wno-format-overflow | 4361 @opindex Wno-format-overflow |
4095 Level @var{1} of @option{-Wformat-overflow} enabled by @option{-Wformat} | 4362 Level @var{1} of @option{-Wformat-overflow} enabled by @option{-Wformat} |
4096 employs a conservative approach that warns only about calls that most | 4363 employs a conservative approach that warns only about calls that most |
4097 likely overflow the buffer. At this level, numeric arguments to format | 4364 likely overflow the buffer. At this level, numeric arguments to format |
4108 warning, though it may not be sufficient to avoid the overflow. | 4375 warning, though it may not be sufficient to avoid the overflow. |
4109 | 4376 |
4110 @smallexample | 4377 @smallexample |
4111 void f (int a, int b) | 4378 void f (int a, int b) |
4112 @{ | 4379 @{ |
4113 char buf [12]; | 4380 char buf [13]; |
4114 sprintf (buf, "a = %i, b = %i\n", a, b); | 4381 sprintf (buf, "a = %i, b = %i\n", a, b); |
4115 @} | 4382 @} |
4116 @end smallexample | 4383 @end smallexample |
4117 | 4384 |
4118 @item -Wformat-overflow=2 | 4385 @item -Wformat-overflow=2 |
4206 in false positives. Except as noted otherwise, the option uses the same | 4473 in false positives. Except as noted otherwise, the option uses the same |
4207 logic @option{-Wformat-overflow}. | 4474 logic @option{-Wformat-overflow}. |
4208 | 4475 |
4209 @table @gcctabopt | 4476 @table @gcctabopt |
4210 @item -Wformat-truncation | 4477 @item -Wformat-truncation |
4211 @item -Wformat-truncation=1 | 4478 @itemx -Wformat-truncation=1 |
4212 @opindex Wformat-truncation | 4479 @opindex Wformat-truncation |
4213 @opindex Wno-format-overflow | 4480 @opindex Wno-format-truncation |
4214 Level @var{1} of @option{-Wformat-truncation} enabled by @option{-Wformat} | 4481 Level @var{1} of @option{-Wformat-truncation} enabled by @option{-Wformat} |
4215 employs a conservative approach that warns only about calls to bounded | 4482 employs a conservative approach that warns only about calls to bounded |
4216 functions whose return value is unused and that will most likely result | 4483 functions whose return value is unused and that will most likely result |
4217 in output truncation. | 4484 in output truncation. |
4218 | 4485 |
4444 | 4711 |
4445 @item -Wif-not-aligned @r{(C, C++, Objective-C and Objective-C++ only)} | 4712 @item -Wif-not-aligned @r{(C, C++, Objective-C and Objective-C++ only)} |
4446 @opindex Wif-not-aligned | 4713 @opindex Wif-not-aligned |
4447 @opindex Wno-if-not-aligned | 4714 @opindex Wno-if-not-aligned |
4448 Control if warning triggered by the @code{warn_if_not_aligned} attribute | 4715 Control if warning triggered by the @code{warn_if_not_aligned} attribute |
4449 should be issued. This is is enabled by default. | 4716 should be issued. This is enabled by default. |
4450 Use @option{-Wno-if-not-aligned} to disable it. | 4717 Use @option{-Wno-if-not-aligned} to disable it. |
4451 | 4718 |
4452 @item -Wignored-qualifiers @r{(C and C++ only)} | 4719 @item -Wignored-qualifiers @r{(C and C++ only)} |
4453 @opindex Wignored-qualifiers | 4720 @opindex Wignored-qualifiers |
4454 @opindex Wno-ignored-qualifiers | 4721 @opindex Wno-ignored-qualifiers |
4516 typically indicates autogenerated code, and no assumptions can be made | 4783 typically indicates autogenerated code, and no assumptions can be made |
4517 about the layout of the file that the directive references. | 4784 about the layout of the file that the directive references. |
4518 | 4785 |
4519 This warning is enabled by @option{-Wall} in C and C++. | 4786 This warning is enabled by @option{-Wall} in C and C++. |
4520 | 4787 |
4788 @item -Wmissing-attributes | |
4789 @opindex Wmissing-attributes | |
4790 @opindex Wno-missing-attributes | |
4791 Warn when a declaration of a function is missing one or more attributes | |
4792 that a related function is declared with and whose absence may adversely | |
4793 affect the correctness or efficiency of generated code. For example, in | |
4794 C++, the warning is issued when an explicit specialization of a primary | |
4795 template declared with attribute @code{alloc_align}, @code{alloc_size}, | |
4796 @code{assume_aligned}, @code{format}, @code{format_arg}, @code{malloc}, | |
4797 or @code{nonnull} is declared without it. Attributes @code{deprecated}, | |
4798 @code{error}, and @code{warning} suppress the warning. | |
4799 (@pxref{Function Attributes}). | |
4800 | |
4801 @option{-Wmissing-attributes} is enabled by @option{-Wall}. | |
4802 | |
4803 For example, since the declaration of the primary function template | |
4804 below makes use of both attribute @code{malloc} and @code{alloc_size} | |
4805 the declaration of the explicit specialization of the template is | |
4806 diagnosed because it is missing one of the attributes. | |
4807 | |
4808 @smallexample | |
4809 template <class T> | |
4810 T* __attribute__ ((malloc, alloc_size (1))) | |
4811 allocate (size_t); | |
4812 | |
4813 template <> | |
4814 void* __attribute__ ((malloc)) // missing alloc_size | |
4815 allocate<void> (size_t); | |
4816 @end smallexample | |
4817 | |
4521 @item -Wmissing-braces | 4818 @item -Wmissing-braces |
4522 @opindex Wmissing-braces | 4819 @opindex Wmissing-braces |
4523 @opindex Wno-missing-braces | 4820 @opindex Wno-missing-braces |
4524 Warn if an aggregate or union initializer is not fully bracketed. In | 4821 Warn if an aggregate or union initializer is not fully bracketed. In |
4525 the following example, the initializer for @code{a} is not fully | 4822 the following example, the initializer for @code{a} is not fully |
4535 | 4832 |
4536 @item -Wmissing-include-dirs @r{(C, C++, Objective-C and Objective-C++ only)} | 4833 @item -Wmissing-include-dirs @r{(C, C++, Objective-C and Objective-C++ only)} |
4537 @opindex Wmissing-include-dirs | 4834 @opindex Wmissing-include-dirs |
4538 @opindex Wno-missing-include-dirs | 4835 @opindex Wno-missing-include-dirs |
4539 Warn if a user-supplied include directory does not exist. | 4836 Warn if a user-supplied include directory does not exist. |
4837 | |
4838 @item -Wmissing-profile | |
4839 @opindex Wmissing-profile | |
4840 @opindex Wno-missing-profile | |
4841 Warn if feedback profiles are missing when using the | |
4842 @option{-fprofile-use} option. | |
4843 This option diagnoses those cases where a new function or a new file is added | |
4844 to the user code between compiling with @option{-fprofile-generate} and with | |
4845 @option{-fprofile-use}, without regenerating the profiles. In these cases, the | |
4846 profile feedback data files do not contain any profile feedback information for | |
4847 the newly added function or file respectively. Also, in the case when profile | |
4848 count data (.gcda) files are removed, GCC cannot use any profile feedback | |
4849 information. In all these cases, warnings are issued to inform the user that a | |
4850 profile generation step is due. @option{-Wno-missing-profile} can be used to | |
4851 disable the warning. Ignoring the warning can result in poorly optimized code. | |
4852 Completely disabling the warning is not recommended and should be done only | |
4853 when non-existent profile data is justified. | |
4540 | 4854 |
4541 @item -Wmultistatement-macros | 4855 @item -Wmultistatement-macros |
4542 @opindex Wmultistatement-macros | 4856 @opindex Wmultistatement-macros |
4543 @opindex Wno-multistatement-macros | 4857 @opindex Wno-multistatement-macros |
4544 Warn about unsafe multiple statement macros that appear to be guarded | 4858 Warn about unsafe multiple statement macros that appear to be guarded |
4670 | 4984 |
4671 For C++, a function without return type always produces a diagnostic | 4985 For C++, a function without return type always produces a diagnostic |
4672 message, even when @option{-Wno-return-type} is specified. The only | 4986 message, even when @option{-Wno-return-type} is specified. The only |
4673 exceptions are @code{main} and functions defined in system headers. | 4987 exceptions are @code{main} and functions defined in system headers. |
4674 | 4988 |
4675 This warning is enabled by @option{-Wall}. | 4989 This warning is enabled by default for C++ and is enabled by @option{-Wall}. |
4676 | 4990 |
4677 @item -Wshift-count-negative | 4991 @item -Wshift-count-negative |
4678 @opindex Wshift-count-negative | 4992 @opindex Wshift-count-negative |
4679 @opindex Wno-shift-count-negative | 4993 @opindex Wno-shift-count-negative |
4680 Warn if shift count is negative. This warning is enabled by default. | 4994 Warn if shift count is negative. This warning is enabled by default. |
4835 To suppress this warning use the @code{unused} attribute | 5149 To suppress this warning use the @code{unused} attribute |
4836 (@pxref{Variable Attributes}). | 5150 (@pxref{Variable Attributes}). |
4837 | 5151 |
4838 @item -Wunused-local-typedefs @r{(C, Objective-C, C++ and Objective-C++ only)} | 5152 @item -Wunused-local-typedefs @r{(C, Objective-C, C++ and Objective-C++ only)} |
4839 @opindex Wunused-local-typedefs | 5153 @opindex Wunused-local-typedefs |
5154 @opindex Wno-unused-local-typedefs | |
4840 Warn when a typedef locally defined in a function is not used. | 5155 Warn when a typedef locally defined in a function is not used. |
4841 This warning is enabled by @option{-Wall}. | 5156 This warning is enabled by @option{-Wall}. |
4842 | 5157 |
4843 @item -Wunused-parameter | 5158 @item -Wunused-parameter |
4844 @opindex Wunused-parameter | 5159 @opindex Wunused-parameter |
4958 @option{-Winvalid-memory-model} is enabled by default. | 5273 @option{-Winvalid-memory-model} is enabled by default. |
4959 | 5274 |
4960 @item -Wmaybe-uninitialized | 5275 @item -Wmaybe-uninitialized |
4961 @opindex Wmaybe-uninitialized | 5276 @opindex Wmaybe-uninitialized |
4962 @opindex Wno-maybe-uninitialized | 5277 @opindex Wno-maybe-uninitialized |
4963 For an automatic variable, if there exists a path from the function | 5278 For an automatic (i.e.@ local) variable, if there exists a path from the |
4964 entry to a use of the variable that is initialized, but there exist | 5279 function entry to a use of the variable that is initialized, but there exist |
4965 some other paths for which the variable is not initialized, the compiler | 5280 some other paths for which the variable is not initialized, the compiler |
4966 emits a warning if it cannot prove the uninitialized paths are not | 5281 emits a warning if it cannot prove the uninitialized paths are not |
4967 executed at run time. These warnings are made optional because GCC is | 5282 executed at run time. |
4968 not smart enough to see all the reasons why the code might be correct | 5283 |
4969 in spite of appearing to have an error. Here is one example of how | 5284 These warnings are only possible in optimizing compilation, because otherwise |
4970 this can happen: | 5285 GCC does not keep track of the state of variables. |
5286 | |
5287 These warnings are made optional because GCC may not be able to determine when | |
5288 the code is correct in spite of appearing to have an error. Here is one | |
5289 example of how this can happen: | |
4971 | 5290 |
4972 @smallexample | 5291 @smallexample |
4973 @group | 5292 @group |
4974 @{ | 5293 @{ |
4975 int x; | 5294 int x; |
4992 warning, you need to provide a default case with assert(0) or | 5311 warning, you need to provide a default case with assert(0) or |
4993 similar code. | 5312 similar code. |
4994 | 5313 |
4995 @cindex @code{longjmp} warnings | 5314 @cindex @code{longjmp} warnings |
4996 This option also warns when a non-volatile automatic variable might be | 5315 This option also warns when a non-volatile automatic variable might be |
4997 changed by a call to @code{longjmp}. These warnings as well are possible | 5316 changed by a call to @code{longjmp}. |
4998 only in optimizing compilation. | |
4999 | |
5000 The compiler sees only the calls to @code{setjmp}. It cannot know | 5317 The compiler sees only the calls to @code{setjmp}. It cannot know |
5001 where @code{longjmp} will be called; in fact, a signal handler could | 5318 where @code{longjmp} will be called; in fact, a signal handler could |
5002 call it at any point in the code. As a result, you may get a warning | 5319 call it at any point in the code. As a result, you may get a warning |
5003 even when there is in fact no problem because @code{longjmp} cannot | 5320 even when there is in fact no problem because @code{longjmp} cannot |
5004 in fact be called at the place that would cause a problem. | 5321 in fact be called at the place that would cause a problem. |
5024 @opindex Wno-pragmas | 5341 @opindex Wno-pragmas |
5025 @opindex Wpragmas | 5342 @opindex Wpragmas |
5026 Do not warn about misuses of pragmas, such as incorrect parameters, | 5343 Do not warn about misuses of pragmas, such as incorrect parameters, |
5027 invalid syntax, or conflicts between pragmas. See also | 5344 invalid syntax, or conflicts between pragmas. See also |
5028 @option{-Wunknown-pragmas}. | 5345 @option{-Wunknown-pragmas}. |
5346 | |
5347 @item -Wno-prio-ctor-dtor | |
5348 @opindex Wno-prio-ctor-dtor | |
5349 @opindex Wprio-ctor-dtor | |
5350 Do not warn if a priority from 0 to 100 is used for constructor or destructor. | |
5351 The use of constructor and destructor attributes allow you to assign a | |
5352 priority to the constructor/destructor to control its order of execution | |
5353 before @code{main} is called or after it returns. The priority values must be | |
5354 greater than 100 as the compiler reserves priority values between 0--100 for | |
5355 the implementation. | |
5029 | 5356 |
5030 @item -Wstrict-aliasing | 5357 @item -Wstrict-aliasing |
5031 @opindex Wstrict-aliasing | 5358 @opindex Wstrict-aliasing |
5032 @opindex Wno-strict-aliasing | 5359 @opindex Wno-strict-aliasing |
5033 This option is only active when @option{-fstrict-aliasing} is active. | 5360 This option is only active when @option{-fstrict-aliasing} is active. |
5165 | 5492 |
5166 Option @option{-Wstringop-overflow=2} is enabled by default. | 5493 Option @option{-Wstringop-overflow=2} is enabled by default. |
5167 | 5494 |
5168 @table @gcctabopt | 5495 @table @gcctabopt |
5169 @item -Wstringop-overflow | 5496 @item -Wstringop-overflow |
5170 @item -Wstringop-overflow=1 | 5497 @itemx -Wstringop-overflow=1 |
5171 @opindex Wstringop-overflow | 5498 @opindex Wstringop-overflow |
5172 @opindex Wno-stringop-overflow | 5499 @opindex Wno-stringop-overflow |
5173 The @option{-Wstringop-overflow=1} option uses type-zero Object Size Checking | 5500 The @option{-Wstringop-overflow=1} option uses type-zero Object Size Checking |
5174 to determine the sizes of destination objects. This is the default setting | 5501 to determine the sizes of destination objects. This is the default setting |
5175 of the option. At this setting the option will not warn for writes past | 5502 of the option. At this setting the option will not warn for writes past |
5202 one of several objects it uses the size of the largest of them to decide | 5529 one of several objects it uses the size of the largest of them to decide |
5203 whether to issue a warning. Similarly to @option{-Wstringop-overflow=3} this | 5530 whether to issue a warning. Similarly to @option{-Wstringop-overflow=3} this |
5204 setting of the option may result in warnings for benign code. | 5531 setting of the option may result in warnings for benign code. |
5205 @end table | 5532 @end table |
5206 | 5533 |
5207 @item -Wsuggest-attribute=@r{[}pure@r{|}const@r{|}noreturn@r{|}format@r{|}cold@r{]} | 5534 @item -Wstringop-truncation |
5535 @opindex Wstringop-truncation | |
5536 @opindex Wno-stringop-truncation | |
5537 Warn for calls to bounded string manipulation functions such as @code{strncat}, | |
5538 @code{strncpy}, and @code{stpncpy} that may either truncate the copied string | |
5539 or leave the destination unchanged. | |
5540 | |
5541 In the following example, the call to @code{strncat} specifies a bound that | |
5542 is less than the length of the source string. As a result, the copy of | |
5543 the source will be truncated and so the call is diagnosed. To avoid the | |
5544 warning use @code{bufsize - strlen (buf) - 1)} as the bound. | |
5545 | |
5546 @smallexample | |
5547 void append (char *buf, size_t bufsize) | |
5548 @{ | |
5549 strncat (buf, ".txt", 3); | |
5550 @} | |
5551 @end smallexample | |
5552 | |
5553 As another example, the following call to @code{strncpy} results in copying | |
5554 to @code{d} just the characters preceding the terminating NUL, without | |
5555 appending the NUL to the end. Assuming the result of @code{strncpy} is | |
5556 necessarily a NUL-terminated string is a common mistake, and so the call | |
5557 is diagnosed. To avoid the warning when the result is not expected to be | |
5558 NUL-terminated, call @code{memcpy} instead. | |
5559 | |
5560 @smallexample | |
5561 void copy (char *d, const char *s) | |
5562 @{ | |
5563 strncpy (d, s, strlen (s)); | |
5564 @} | |
5565 @end smallexample | |
5566 | |
5567 In the following example, the call to @code{strncpy} specifies the size | |
5568 of the destination buffer as the bound. If the length of the source | |
5569 string is equal to or greater than this size the result of the copy will | |
5570 not be NUL-terminated. Therefore, the call is also diagnosed. To avoid | |
5571 the warning, specify @code{sizeof buf - 1} as the bound and set the last | |
5572 element of the buffer to @code{NUL}. | |
5573 | |
5574 @smallexample | |
5575 void copy (const char *s) | |
5576 @{ | |
5577 char buf[80]; | |
5578 strncpy (buf, s, sizeof buf); | |
5579 @dots{} | |
5580 @} | |
5581 @end smallexample | |
5582 | |
5583 In situations where a character array is intended to store a sequence | |
5584 of bytes with no terminating @code{NUL} such an array may be annotated | |
5585 with attribute @code{nonstring} to avoid this warning. Such arrays, | |
5586 however, are not suitable arguments to functions that expect | |
5587 @code{NUL}-terminated strings. To help detect accidental misuses of | |
5588 such arrays GCC issues warnings unless it can prove that the use is | |
5589 safe. @xref{Common Variable Attributes}. | |
5590 | |
5591 @item -Wsuggest-attribute=@r{[}pure@r{|}const@r{|}noreturn@r{|}format@r{|}cold@r{|}malloc@r{]} | |
5208 @opindex Wsuggest-attribute= | 5592 @opindex Wsuggest-attribute= |
5209 @opindex Wno-suggest-attribute= | 5593 @opindex Wno-suggest-attribute= |
5210 Warn for cases where adding an attribute may be beneficial. The | 5594 Warn for cases where adding an attribute may be beneficial. The |
5211 attributes currently supported are listed below. | 5595 attributes currently supported are listed below. |
5212 | 5596 |
5213 @table @gcctabopt | 5597 @table @gcctabopt |
5214 @item -Wsuggest-attribute=pure | 5598 @item -Wsuggest-attribute=pure |
5215 @itemx -Wsuggest-attribute=const | 5599 @itemx -Wsuggest-attribute=const |
5216 @itemx -Wsuggest-attribute=noreturn | 5600 @itemx -Wsuggest-attribute=noreturn |
5601 @itemx -Wsuggest-attribute=malloc | |
5217 @opindex Wsuggest-attribute=pure | 5602 @opindex Wsuggest-attribute=pure |
5218 @opindex Wno-suggest-attribute=pure | 5603 @opindex Wno-suggest-attribute=pure |
5219 @opindex Wsuggest-attribute=const | 5604 @opindex Wsuggest-attribute=const |
5220 @opindex Wno-suggest-attribute=const | 5605 @opindex Wno-suggest-attribute=const |
5221 @opindex Wsuggest-attribute=noreturn | 5606 @opindex Wsuggest-attribute=noreturn |
5222 @opindex Wno-suggest-attribute=noreturn | 5607 @opindex Wno-suggest-attribute=noreturn |
5608 @opindex Wsuggest-attribute=malloc | |
5609 @opindex Wno-suggest-attribute=malloc | |
5223 | 5610 |
5224 Warn about functions that might be candidates for attributes | 5611 Warn about functions that might be candidates for attributes |
5225 @code{pure}, @code{const} or @code{noreturn}. The compiler only warns for | 5612 @code{pure}, @code{const} or @code{noreturn} or @code{malloc}. The compiler |
5226 functions visible in other compilation units or (in the case of @code{pure} and | 5613 only warns for functions visible in other compilation units or (in the case of |
5227 @code{const}) if it cannot prove that the function returns normally. A function | 5614 @code{pure} and @code{const}) if it cannot prove that the function returns |
5228 returns normally if it doesn't contain an infinite loop or return abnormally | 5615 normally. A function returns normally if it doesn't contain an infinite loop or |
5229 by throwing, calling @code{abort} or trapping. This analysis requires option | 5616 return abnormally by throwing, calling @code{abort} or trapping. This analysis |
5230 @option{-fipa-pure-const}, which is enabled by default at @option{-O} and | 5617 requires option @option{-fipa-pure-const}, which is enabled by default at |
5231 higher. Higher optimization levels improve the accuracy of the analysis. | 5618 @option{-O} and higher. Higher optimization levels improve the accuracy |
5619 of the analysis. | |
5232 | 5620 |
5233 @item -Wsuggest-attribute=format | 5621 @item -Wsuggest-attribute=format |
5234 @itemx -Wmissing-format-attribute | 5622 @itemx -Wmissing-format-attribute |
5235 @opindex Wsuggest-attribute=format | 5623 @opindex Wsuggest-attribute=format |
5236 @opindex Wmissing-format-attribute | 5624 @opindex Wmissing-format-attribute |
5304 @code{malloc}, and @code{realloc}. Because the behavior of these functions | 5692 @code{malloc}, and @code{realloc}. Because the behavior of these functions |
5305 when called with a zero size differs among implementations (and in the case | 5693 when called with a zero size differs among implementations (and in the case |
5306 of @code{realloc} has been deprecated) relying on it may result in subtle | 5694 of @code{realloc} has been deprecated) relying on it may result in subtle |
5307 portability bugs and should be avoided. | 5695 portability bugs and should be avoided. |
5308 | 5696 |
5309 @item -Walloc-size-larger-than=@var{n} | 5697 @item -Walloc-size-larger-than=@var{byte-size} |
5698 @opindex Walloc-size-larger-than= | |
5699 @opindex Wno-alloc-size-larger-than | |
5310 Warn about calls to functions decorated with attribute @code{alloc_size} | 5700 Warn about calls to functions decorated with attribute @code{alloc_size} |
5311 that attempt to allocate objects larger than the specified number of bytes, | 5701 that attempt to allocate objects larger than the specified number of bytes, |
5312 or where the result of the size computation in an integer type with infinite | 5702 or where the result of the size computation in an integer type with infinite |
5313 precision would exceed @code{SIZE_MAX / 2}. The option argument @var{n} | 5703 precision would exceed the value of @samp{PTRDIFF_MAX} on the target. |
5314 may end in one of the standard suffixes designating a multiple of bytes | 5704 @option{-Walloc-size-larger-than=}@samp{PTRDIFF_MAX} is enabled by default. |
5315 such as @code{kB} and @code{KiB} for kilobyte and kibibyte, respectively, | 5705 Warnings controlled by the option can be disabled either by specifying |
5316 @code{MB} and @code{MiB} for megabyte and mebibyte, and so on. | 5706 @var{byte-size} of @samp{SIZE_MAX} or more or by |
5707 @option{-Wno-alloc-size-larger-than}. | |
5317 @xref{Function Attributes}. | 5708 @xref{Function Attributes}. |
5709 | |
5710 @item -Wno-alloc-size-larger-than | |
5711 @opindex Wno-alloc-size-larger-than | |
5712 Disable @option{-Walloc-size-larger-than=} warnings. The option is | |
5713 equivalent to @option{-Walloc-size-larger-than=}@samp{SIZE_MAX} or | |
5714 larger. | |
5318 | 5715 |
5319 @item -Walloca | 5716 @item -Walloca |
5320 @opindex Wno-alloca | 5717 @opindex Wno-alloca |
5321 @opindex Walloca | 5718 @opindex Walloca |
5322 This option warns on all uses of @code{alloca} in the source. | 5719 This option warns on all uses of @code{alloca} in the source. |
5323 | 5720 |
5324 @item -Walloca-larger-than=@var{n} | 5721 @item -Walloca-larger-than=@var{byte-size} |
5325 This option warns on calls to @code{alloca} that are not bounded by a | 5722 @opindex -Walloca-larger-than= |
5326 controlling predicate limiting its argument of integer type to at most | 5723 @opindex -Wno-alloca-larger-than |
5327 @var{n} bytes, or calls to @code{alloca} where the bound is unknown. | 5724 This option warns on calls to @code{alloca} with an integer argument whose |
5328 Arguments of non-integer types are considered unbounded even if they | 5725 value is either zero, or that is not bounded by a controlling predicate |
5329 appear to be constrained to the expected range. | 5726 that limits its value to at most @var{byte-size}. It also warns for calls |
5727 to @code{alloca} where the bound value is unknown. Arguments of non-integer | |
5728 types are considered unbounded even if they appear to be constrained to | |
5729 the expected range. | |
5330 | 5730 |
5331 For example, a bounded case of @code{alloca} could be: | 5731 For example, a bounded case of @code{alloca} could be: |
5332 | 5732 |
5333 @smallexample | 5733 @smallexample |
5334 void func (size_t n) | 5734 void func (size_t n) |
5378 In the above example, @var{n} could be negative, causing a larger than | 5778 In the above example, @var{n} could be negative, causing a larger than |
5379 expected argument to be implicitly cast into the @code{alloca} call. | 5779 expected argument to be implicitly cast into the @code{alloca} call. |
5380 | 5780 |
5381 This option also warns when @code{alloca} is used in a loop. | 5781 This option also warns when @code{alloca} is used in a loop. |
5382 | 5782 |
5383 This warning is not enabled by @option{-Wall}, and is only active when | 5783 @option{-Walloca-larger-than=}@samp{PTRDIFF_MAX} is enabled by default |
5384 @option{-ftree-vrp} is active (default for @option{-O2} and above). | 5784 but is usually only effective when @option{-ftree-vrp} is active (default |
5385 | 5785 for @option{-O2} and above). |
5386 See also @option{-Wvla-larger-than=@var{n}}. | 5786 |
5787 See also @option{-Wvla-larger-than=}@samp{byte-size}. | |
5788 | |
5789 @item -Wno-alloca-larger-than | |
5790 @opindex Wno-alloca-larger-than | |
5791 Disable @option{-Walloca-larger-than=} warnings. The option is | |
5792 equivalent to @option{-Walloca-larger-than=}@samp{SIZE_MAX} or larger. | |
5387 | 5793 |
5388 @item -Warray-bounds | 5794 @item -Warray-bounds |
5389 @itemx -Warray-bounds=@var{n} | 5795 @itemx -Warray-bounds=@var{n} |
5390 @opindex Wno-array-bounds | 5796 @opindex Wno-array-bounds |
5391 @opindex Warray-bounds | 5797 @opindex Warray-bounds |
5729 undetected bugs. Use of this flag instead of @option{-Wshadow=local} can | 6135 undetected bugs. Use of this flag instead of @option{-Wshadow=local} can |
5730 possibly reduce the number of warnings triggered by intentional shadowing. | 6136 possibly reduce the number of warnings triggered by intentional shadowing. |
5731 | 6137 |
5732 This warning is enabled by @option{-Wshadow=local}. | 6138 This warning is enabled by @option{-Wshadow=local}. |
5733 | 6139 |
5734 @item -Wlarger-than=@var{len} | 6140 @item -Wlarger-than=@var{byte-size} |
5735 @opindex Wlarger-than=@var{len} | 6141 @opindex Wlarger-than= |
5736 @opindex Wlarger-than-@var{len} | 6142 @opindex Wlarger-than-@var{byte-size} |
5737 Warn whenever an object of larger than @var{len} bytes is defined. | 6143 Warn whenever an object is defined whose size exceeds @var{byte-size}. |
5738 | 6144 @option{-Wlarger-than=}@samp{PTRDIFF_MAX} is enabled by default. |
5739 @item -Wframe-larger-than=@var{len} | 6145 Warnings controlled by the option can be disabled either by specifying |
5740 @opindex Wframe-larger-than | 6146 @var{byte-size} of @samp{SIZE_MAX} or more or by |
5741 Warn if the size of a function frame is larger than @var{len} bytes. | 6147 @option{-Wno-larger-than}. |
6148 | |
6149 @item -Wno-larger-than | |
6150 @opindex Wno-larger-than | |
6151 Disable @option{-Wlarger-than=} warnings. The option is equivalent | |
6152 to @option{-Wlarger-than=}@samp{SIZE_MAX} or larger. | |
6153 | |
6154 @item -Wframe-larger-than=@var{byte-size} | |
6155 @opindex Wframe-larger-than= | |
6156 @opindex Wno-frame-larger-than | |
6157 Warn if the size of a function frame exceeds @var{byte-size}. | |
5742 The computation done to determine the stack frame size is approximate | 6158 The computation done to determine the stack frame size is approximate |
5743 and not conservative. | 6159 and not conservative. |
5744 The actual requirements may be somewhat greater than @var{len} | 6160 The actual requirements may be somewhat greater than @var{byte-size} |
5745 even if you do not get a warning. In addition, any space allocated | 6161 even if you do not get a warning. In addition, any space allocated |
5746 via @code{alloca}, variable-length arrays, or related constructs | 6162 via @code{alloca}, variable-length arrays, or related constructs |
5747 is not included by the compiler when determining | 6163 is not included by the compiler when determining |
5748 whether or not to issue a warning. | 6164 whether or not to issue a warning. |
6165 @option{-Wframe-larger-than=}@samp{PTRDIFF_MAX} is enabled by default. | |
6166 Warnings controlled by the option can be disabled either by specifying | |
6167 @var{byte-size} of @samp{SIZE_MAX} or more or by | |
6168 @option{-Wno-frame-larger-than}. | |
6169 | |
6170 @item -Wno-frame-larger-than | |
6171 @opindex Wno-frame-larger-than | |
6172 Disable @option{-Wframe-larger-than=} warnings. The option is equivalent | |
6173 to @option{-Wframe-larger-than=}@samp{SIZE_MAX} or larger. | |
5749 | 6174 |
5750 @item -Wno-free-nonheap-object | 6175 @item -Wno-free-nonheap-object |
5751 @opindex Wno-free-nonheap-object | 6176 @opindex Wno-free-nonheap-object |
5752 @opindex Wfree-nonheap-object | 6177 @opindex Wfree-nonheap-object |
5753 Do not warn when attempting to free an object that was not allocated | 6178 Do not warn when attempting to free an object that was not allocated |
5754 on the heap. | 6179 on the heap. |
5755 | 6180 |
5756 @item -Wstack-usage=@var{len} | 6181 @item -Wstack-usage=@var{byte-size} |
5757 @opindex Wstack-usage | 6182 @opindex Wstack-usage |
5758 Warn if the stack usage of a function might be larger than @var{len} bytes. | 6183 @opindex Wno-stack-usage |
6184 Warn if the stack usage of a function might exceed @var{byte-size}. | |
5759 The computation done to determine the stack usage is conservative. | 6185 The computation done to determine the stack usage is conservative. |
5760 Any space allocated via @code{alloca}, variable-length arrays, or related | 6186 Any space allocated via @code{alloca}, variable-length arrays, or related |
5761 constructs is included by the compiler when determining whether or not to | 6187 constructs is included by the compiler when determining whether or not to |
5762 issue a warning. | 6188 issue a warning. |
5763 | 6189 |
5781 | 6207 |
5782 @smallexample | 6208 @smallexample |
5783 warning: stack usage might be unbounded | 6209 warning: stack usage might be unbounded |
5784 @end smallexample | 6210 @end smallexample |
5785 @end itemize | 6211 @end itemize |
6212 | |
6213 @option{-Wstack-usage=}@samp{PTRDIFF_MAX} is enabled by default. | |
6214 Warnings controlled by the option can be disabled either by specifying | |
6215 @var{byte-size} of @samp{SIZE_MAX} or more or by | |
6216 @option{-Wno-stack-usage}. | |
6217 | |
6218 @item -Wno-stack-usage | |
6219 @opindex Wno-stack-usage | |
6220 Disable @option{-Wstack-usage=} warnings. The option is equivalent | |
6221 to @option{-Wstack-usage=}@samp{SIZE_MAX} or larger. | |
5786 | 6222 |
5787 @item -Wunsafe-loop-optimizations | 6223 @item -Wunsafe-loop-optimizations |
5788 @opindex Wunsafe-loop-optimizations | 6224 @opindex Wunsafe-loop-optimizations |
5789 @opindex Wno-unsafe-loop-optimizations | 6225 @opindex Wno-unsafe-loop-optimizations |
5790 Warn if the loop cannot be optimized because the compiler cannot | 6226 Warn if the loop cannot be optimized because the compiler cannot |
5889 range of the data type, but do not warn for constant expressions. For | 6325 range of the data type, but do not warn for constant expressions. For |
5890 example, warn if an unsigned variable is compared against zero with | 6326 example, warn if an unsigned variable is compared against zero with |
5891 @code{<} or @code{>=}. This warning is also enabled by | 6327 @code{<} or @code{>=}. This warning is also enabled by |
5892 @option{-Wextra}. | 6328 @option{-Wextra}. |
5893 | 6329 |
6330 @item -Wabsolute-value @r{(C and Objective-C only)} | |
6331 @opindex Wabsolute-value | |
6332 @opindex Wno-absolute-value | |
6333 Warn when a wrong absolute value function seems to be used or when it | |
6334 does not have any effect because its argument is an unsigned type. | |
6335 This warning be suppressed with an explicit type cast and it is also | |
6336 enabled by @option{-Wextra}. | |
6337 | |
5894 @include cppwarnopts.texi | 6338 @include cppwarnopts.texi |
5895 | 6339 |
5896 @item -Wbad-function-cast @r{(C and Objective-C only)} | 6340 @item -Wbad-function-cast @r{(C and Objective-C only)} |
5897 @opindex Wbad-function-cast | 6341 @opindex Wbad-function-cast |
5898 @opindex Wno-bad-function-cast | 6342 @opindex Wno-bad-function-cast |
5919 and so on. This option is independent of the standards mode. Warnings are | 6363 and so on. This option is independent of the standards mode. Warnings are |
5920 disabled in the expression that follows @code{__extension__}. | 6364 disabled in the expression that follows @code{__extension__}. |
5921 | 6365 |
5922 @item -Wc++-compat @r{(C and Objective-C only)} | 6366 @item -Wc++-compat @r{(C and Objective-C only)} |
5923 @opindex Wc++-compat | 6367 @opindex Wc++-compat |
6368 @opindex Wno-c++-compat | |
5924 Warn about ISO C constructs that are outside of the common subset of | 6369 Warn about ISO C constructs that are outside of the common subset of |
5925 ISO C and ISO C++, e.g.@: request for implicit conversion from | 6370 ISO C and ISO C++, e.g.@: request for implicit conversion from |
5926 @code{void *} to a pointer to non-@code{void} type. | 6371 @code{void *} to a pointer to non-@code{void} type. |
5927 | 6372 |
5928 @item -Wc++11-compat @r{(C++ and Objective-C++ only)} | 6373 @item -Wc++11-compat @r{(C++ and Objective-C++ only)} |
5929 @opindex Wc++11-compat | 6374 @opindex Wc++11-compat |
6375 @opindex Wno-c++11-compat | |
5930 Warn about C++ constructs whose meaning differs between ISO C++ 1998 | 6376 Warn about C++ constructs whose meaning differs between ISO C++ 1998 |
5931 and ISO C++ 2011, e.g., identifiers in ISO C++ 1998 that are keywords | 6377 and ISO C++ 2011, e.g., identifiers in ISO C++ 1998 that are keywords |
5932 in ISO C++ 2011. This warning turns on @option{-Wnarrowing} and is | 6378 in ISO C++ 2011. This warning turns on @option{-Wnarrowing} and is |
5933 enabled by @option{-Wall}. | 6379 enabled by @option{-Wall}. |
5934 | 6380 |
5935 @item -Wc++14-compat @r{(C++ and Objective-C++ only)} | 6381 @item -Wc++14-compat @r{(C++ and Objective-C++ only)} |
5936 @opindex Wc++14-compat | 6382 @opindex Wc++14-compat |
6383 @opindex Wno-c++14-compat | |
5937 Warn about C++ constructs whose meaning differs between ISO C++ 2011 | 6384 Warn about C++ constructs whose meaning differs between ISO C++ 2011 |
5938 and ISO C++ 2014. This warning is enabled by @option{-Wall}. | 6385 and ISO C++ 2014. This warning is enabled by @option{-Wall}. |
5939 | 6386 |
5940 @item -Wc++17-compat @r{(C++ and Objective-C++ only)} | 6387 @item -Wc++17-compat @r{(C++ and Objective-C++ only)} |
5941 @opindex Wc++17-compat | 6388 @opindex Wc++17-compat |
6389 @opindex Wno-c++17-compat | |
5942 Warn about C++ constructs whose meaning differs between ISO C++ 2014 | 6390 Warn about C++ constructs whose meaning differs between ISO C++ 2014 |
5943 and ISO C++ 2017. This warning is enabled by @option{-Wall}. | 6391 and ISO C++ 2017. This warning is enabled by @option{-Wall}. |
5944 | 6392 |
5945 @item -Wcast-qual | 6393 @item -Wcast-qual |
5946 @opindex Wcast-qual | 6394 @opindex Wcast-qual |
5973 @item -Wcast-align=strict | 6421 @item -Wcast-align=strict |
5974 @opindex Wcast-align=strict | 6422 @opindex Wcast-align=strict |
5975 Warn whenever a pointer is cast such that the required alignment of the | 6423 Warn whenever a pointer is cast such that the required alignment of the |
5976 target is increased. For example, warn if a @code{char *} is cast to | 6424 target is increased. For example, warn if a @code{char *} is cast to |
5977 an @code{int *} regardless of the target machine. | 6425 an @code{int *} regardless of the target machine. |
6426 | |
6427 @item -Wcast-function-type | |
6428 @opindex Wcast-function-type | |
6429 @opindex Wno-cast-function-type | |
6430 Warn when a function pointer is cast to an incompatible function pointer. | |
6431 In a cast involving function types with a variable argument list only | |
6432 the types of initial arguments that are provided are considered. | |
6433 Any parameter of pointer-type matches any other pointer-type. Any benign | |
6434 differences in integral types are ignored, like @code{int} vs. @code{long} | |
6435 on ILP32 targets. Likewise type qualifiers are ignored. The function | |
6436 type @code{void (*) (void)} is special and matches everything, which can | |
6437 be used to suppress this warning. | |
6438 In a cast involving pointer to member types this warning warns whenever | |
6439 the type cast is changing the pointer to member type. | |
6440 This warning is enabled by @option{-Wextra}. | |
5978 | 6441 |
5979 @item -Wwrite-strings | 6442 @item -Wwrite-strings |
5980 @opindex Wwrite-strings | 6443 @opindex Wwrite-strings |
5981 @opindex Wno-write-strings | 6444 @opindex Wno-write-strings |
5982 When compiling C, give string constants the type @code{const | 6445 When compiling C, give string constants the type @code{const |
6214 | 6677 |
6215 @item -Wsizeof-pointer-memaccess | 6678 @item -Wsizeof-pointer-memaccess |
6216 @opindex Wsizeof-pointer-memaccess | 6679 @opindex Wsizeof-pointer-memaccess |
6217 @opindex Wno-sizeof-pointer-memaccess | 6680 @opindex Wno-sizeof-pointer-memaccess |
6218 Warn for suspicious length parameters to certain string and memory built-in | 6681 Warn for suspicious length parameters to certain string and memory built-in |
6219 functions if the argument uses @code{sizeof}. This warning warns e.g.@: | 6682 functions if the argument uses @code{sizeof}. This warning triggers for |
6220 about @code{memset (ptr, 0, sizeof (ptr));} if @code{ptr} is not an array, | 6683 example for @code{memset (ptr, 0, sizeof (ptr));} if @code{ptr} is not |
6221 but a pointer, and suggests a possible fix, or about | 6684 an array, but a pointer, and suggests a possible fix, or about |
6222 @code{memcpy (&foo, ptr, sizeof (&foo));}. This warning is enabled by | 6685 @code{memcpy (&foo, ptr, sizeof (&foo));}. @option{-Wsizeof-pointer-memaccess} |
6223 @option{-Wall}. | 6686 also warns about calls to bounded string copy functions like @code{strncat} |
6687 or @code{strncpy} that specify as the bound a @code{sizeof} expression of | |
6688 the source array. For example, in the following function the call to | |
6689 @code{strncat} specifies the size of the source string as the bound. That | |
6690 is almost certainly a mistake and so the call is diagnosed. | |
6691 @smallexample | |
6692 void make_file (const char *name) | |
6693 @{ | |
6694 char path[PATH_MAX]; | |
6695 strncpy (path, name, sizeof path - 1); | |
6696 strncat (path, ".text", sizeof ".text"); | |
6697 @dots{} | |
6698 @} | |
6699 @end smallexample | |
6700 | |
6701 The @option{-Wsizeof-pointer-memaccess} option is enabled by @option{-Wall}. | |
6224 | 6702 |
6225 @item -Wsizeof-array-argument | 6703 @item -Wsizeof-array-argument |
6226 @opindex Wsizeof-array-argument | 6704 @opindex Wsizeof-array-argument |
6227 @opindex Wno-sizeof-array-argument | 6705 @opindex Wno-sizeof-array-argument |
6228 Warn when the @code{sizeof} operator is applied to a parameter that is | 6706 Warn when the @code{sizeof} operator is applied to a parameter that is |
6510 @opindex Wodr | 6988 @opindex Wodr |
6511 Warn about One Definition Rule violations during link-time optimization. | 6989 Warn about One Definition Rule violations during link-time optimization. |
6512 Requires @option{-flto-odr-type-merging} to be enabled. Enabled by default. | 6990 Requires @option{-flto-odr-type-merging} to be enabled. Enabled by default. |
6513 | 6991 |
6514 @item -Wopenmp-simd | 6992 @item -Wopenmp-simd |
6515 @opindex Wopenm-simd | 6993 @opindex Wopenmp-simd |
6516 Warn if the vectorizer cost model overrides the OpenMP or the Cilk Plus | 6994 @opindex Wno-openmp-simd |
6995 Warn if the vectorizer cost model overrides the OpenMP | |
6517 simd directive set by user. The @option{-fsimd-cost-model=unlimited} | 6996 simd directive set by user. The @option{-fsimd-cost-model=unlimited} |
6518 option can be used to relax the cost model. | 6997 option can be used to relax the cost model. |
6519 | 6998 |
6520 @item -Woverride-init @r{(C and Objective-C only)} | 6999 @item -Woverride-init @r{(C and Objective-C only)} |
6521 @opindex Woverride-init | 7000 @opindex Woverride-init |
6613 @opindex Wredundant-decls | 7092 @opindex Wredundant-decls |
6614 @opindex Wno-redundant-decls | 7093 @opindex Wno-redundant-decls |
6615 Warn if anything is declared more than once in the same scope, even in | 7094 Warn if anything is declared more than once in the same scope, even in |
6616 cases where multiple declaration is valid and changes nothing. | 7095 cases where multiple declaration is valid and changes nothing. |
6617 | 7096 |
6618 @item -Wrestrict | 7097 @item -Wno-restrict |
6619 @opindex Wrestrict | 7098 @opindex Wrestrict |
6620 @opindex Wno-restrict | 7099 @opindex Wno-restrict |
6621 Warn when an argument passed to a restrict-qualified parameter | 7100 Warn when an object referenced by a @code{restrict}-qualified parameter |
6622 aliases with another argument. | 7101 (or, in C++, a @code{__restrict}-qualified parameter) is aliased by another |
7102 argument, or when copies between such objects overlap. For example, | |
7103 the call to the @code{strcpy} function below attempts to truncate the string | |
7104 by replacing its initial characters with the last four. However, because | |
7105 the call writes the terminating NUL into @code{a[4]}, the copies overlap and | |
7106 the call is diagnosed. | |
7107 | |
7108 @smallexample | |
7109 void foo (void) | |
7110 @{ | |
7111 char a[] = "abcd1234"; | |
7112 strcpy (a, a + 4); | |
7113 @dots{} | |
7114 @} | |
7115 @end smallexample | |
7116 The @option{-Wrestrict} option detects some instances of simple overlap | |
7117 even without optimization but works best at @option{-O2} and above. It | |
7118 is included in @option{-Wall}. | |
6623 | 7119 |
6624 @item -Wnested-externs @r{(C and Objective-C only)} | 7120 @item -Wnested-externs @r{(C and Objective-C only)} |
6625 @opindex Wnested-externs | 7121 @opindex Wnested-externs |
6626 @opindex Wno-nested-externs | 7122 @opindex Wno-nested-externs |
6627 Warn if an @code{extern} declaration is encountered within a function. | 7123 Warn if an @code{extern} declaration is encountered within a function. |
6740 @opindex Wno-vla | 7236 @opindex Wno-vla |
6741 Warn if a variable-length array is used in the code. | 7237 Warn if a variable-length array is used in the code. |
6742 @option{-Wno-vla} prevents the @option{-Wpedantic} warning of | 7238 @option{-Wno-vla} prevents the @option{-Wpedantic} warning of |
6743 the variable-length array. | 7239 the variable-length array. |
6744 | 7240 |
6745 @item -Wvla-larger-than=@var{n} | 7241 @item -Wvla-larger-than=@var{byte-size} |
6746 If this option is used, the compiler will warn on uses of | 7242 @opindex -Wvla-larger-than= |
6747 variable-length arrays where the size is either unbounded, or bounded | 7243 @opindex -Wno-vla-larger-than |
6748 by an argument that can be larger than @var{n} bytes. This is similar | 7244 If this option is used, the compiler will warn for declarations of |
6749 to how @option{-Walloca-larger-than=@var{n}} works, but with | 7245 variable-length arrays whose size is either unbounded, or bounded |
6750 variable-length arrays. | 7246 by an argument that allows the array size to exceed @var{byte-size} |
7247 bytes. This is similar to how @option{-Walloca-larger-than=}@var{byte-size} | |
7248 works, but with variable-length arrays. | |
6751 | 7249 |
6752 Note that GCC may optimize small variable-length arrays of a known | 7250 Note that GCC may optimize small variable-length arrays of a known |
6753 value into plain arrays, so this warning may not get triggered for | 7251 value into plain arrays, so this warning may not get triggered for |
6754 such arrays. | 7252 such arrays. |
6755 | 7253 |
6756 This warning is not enabled by @option{-Wall}, and is only active when | 7254 @option{-Wvla-larger-than=}@samp{PTRDIFF_MAX} is enabled by default but |
6757 @option{-ftree-vrp} is active (default for @option{-O2} and above). | 7255 is typically only effective when @option{-ftree-vrp} is active (default |
6758 | 7256 for @option{-O2} and above). |
6759 See also @option{-Walloca-larger-than=@var{n}}. | 7257 |
7258 See also @option{-Walloca-larger-than=@var{byte-size}}. | |
7259 | |
7260 @item -Wno-vla-larger-than | |
7261 @opindex Wno-vla-larger-than | |
7262 Disable @option{-Wvla-larger-than=} warnings. The option is equivalent | |
7263 to @option{-Wvla-larger-than=}@samp{SIZE_MAX} or larger. | |
6760 | 7264 |
6761 @item -Wvolatile-register-var | 7265 @item -Wvolatile-register-var |
6762 @opindex Wvolatile-register-var | 7266 @opindex Wvolatile-register-var |
6763 @opindex Wno-volatile-register-var | 7267 @opindex Wno-volatile-register-var |
6764 Warn if a register variable is declared volatile. The volatile | 7268 Warn if a register variable is declared volatile. The volatile |
6807 This option is implied by @option{-Wpedantic}, and can be disabled with | 7311 This option is implied by @option{-Wpedantic}, and can be disabled with |
6808 @option{-Wno-overlength-strings}. | 7312 @option{-Wno-overlength-strings}. |
6809 | 7313 |
6810 @item -Wunsuffixed-float-constants @r{(C and Objective-C only)} | 7314 @item -Wunsuffixed-float-constants @r{(C and Objective-C only)} |
6811 @opindex Wunsuffixed-float-constants | 7315 @opindex Wunsuffixed-float-constants |
7316 @opindex Wno-unsuffixed-float-constants | |
6812 | 7317 |
6813 Issue a warning for any floating constant that does not have | 7318 Issue a warning for any floating constant that does not have |
6814 a suffix. When used together with @option{-Wsystem-headers} it | 7319 a suffix. When used together with @option{-Wsystem-headers} it |
6815 warns about such constants in system header files. This can be useful | 7320 warns about such constants in system header files. This can be useful |
6816 when preparing code to use with the @code{FLOAT_CONST_DECIMAL64} pragma | 7321 when preparing code to use with the @code{FLOAT_CONST_DECIMAL64} pragma |
6895 @item -gstabs | 7400 @item -gstabs |
6896 @opindex gstabs | 7401 @opindex gstabs |
6897 Produce debugging information in stabs format (if that is supported), | 7402 Produce debugging information in stabs format (if that is supported), |
6898 without GDB extensions. This is the format used by DBX on most BSD | 7403 without GDB extensions. This is the format used by DBX on most BSD |
6899 systems. On MIPS, Alpha and System V Release 4 systems this option | 7404 systems. On MIPS, Alpha and System V Release 4 systems this option |
6900 produces stabs debugging output that is not understood by DBX or SDB@. | 7405 produces stabs debugging output that is not understood by DBX@. |
6901 On System V Release 4 systems this option requires the GNU assembler. | 7406 On System V Release 4 systems this option requires the GNU assembler. |
6902 | 7407 |
6903 @item -gstabs+ | 7408 @item -gstabs+ |
6904 @opindex gstabs+ | 7409 @opindex gstabs+ |
6905 Produce debugging information in stabs format (if that is supported), | 7410 Produce debugging information in stabs format (if that is supported), |
6906 using GNU extensions understood only by the GNU debugger (GDB)@. The | 7411 using GNU extensions understood only by the GNU debugger (GDB)@. The |
6907 use of these extensions is likely to make other debuggers crash or | 7412 use of these extensions is likely to make other debuggers crash or |
6908 refuse to read the program. | 7413 refuse to read the program. |
6909 | |
6910 @item -gcoff | |
6911 @opindex gcoff | |
6912 Produce debugging information in COFF format (if that is supported). | |
6913 This is the format used by SDB on most System V systems prior to | |
6914 System V Release 4. | |
6915 | 7414 |
6916 @item -gxcoff | 7415 @item -gxcoff |
6917 @opindex gxcoff | 7416 @opindex gxcoff |
6918 Produce debugging information in XCOFF format (if that is supported). | 7417 Produce debugging information in XCOFF format (if that is supported). |
6919 This is the format used by the DBX debugger on IBM RS/6000 systems. | 7418 This is the format used by the DBX debugger on IBM RS/6000 systems. |
6932 supported). This is the format used by DEBUG on Alpha/VMS systems. | 7431 supported). This is the format used by DEBUG on Alpha/VMS systems. |
6933 | 7432 |
6934 @item -g@var{level} | 7433 @item -g@var{level} |
6935 @itemx -ggdb@var{level} | 7434 @itemx -ggdb@var{level} |
6936 @itemx -gstabs@var{level} | 7435 @itemx -gstabs@var{level} |
6937 @itemx -gcoff@var{level} | |
6938 @itemx -gxcoff@var{level} | 7436 @itemx -gxcoff@var{level} |
6939 @itemx -gvms@var{level} | 7437 @itemx -gvms@var{level} |
6940 Request debugging information and also use @var{level} to specify how | 7438 Request debugging information and also use @var{level} to specify how |
6941 much information. The default level is 2. | 7439 much information. The default level is 2. |
6942 | 7440 |
6980 of the debug information in the output file at the cost of increasing | 7478 of the debug information in the output file at the cost of increasing |
6981 link processing time. Merging is enabled by default. | 7479 link processing time. Merging is enabled by default. |
6982 | 7480 |
6983 @item -fdebug-prefix-map=@var{old}=@var{new} | 7481 @item -fdebug-prefix-map=@var{old}=@var{new} |
6984 @opindex fdebug-prefix-map | 7482 @opindex fdebug-prefix-map |
6985 When compiling files in directory @file{@var{old}}, record debugging | 7483 When compiling files residing in directory @file{@var{old}}, record |
6986 information describing them as in @file{@var{new}} instead. This can be | 7484 debugging information describing them as if the files resided in |
6987 used to replace a build-time path with an install-time path in the debug info. | 7485 directory @file{@var{new}} instead. This can be used to replace a |
6988 It can also be used to change an absolute path to a relative path by using | 7486 build-time path with an install-time path in the debug info. It can |
6989 @file{.} for @var{new}. This can give more reproducible builds, which are | 7487 also be used to change an absolute path to a relative path by using |
6990 location independent, but may require an extra command to tell GDB where to | 7488 @file{.} for @var{new}. This can give more reproducible builds, which |
6991 find the source files. | 7489 are location independent, but may require an extra command to tell GDB |
7490 where to find the source files. See also @option{-ffile-prefix-map}. | |
6992 | 7491 |
6993 @item -fvar-tracking | 7492 @item -fvar-tracking |
6994 @opindex fvar-tracking | 7493 @opindex fvar-tracking |
6995 Run variable tracking pass. It computes where variables are stored at each | 7494 Run variable tracking pass. It computes where variables are stored at each |
6996 position in code. Better debugging information is then generated | 7495 position in code. Better debugging information is then generated |
7019 separate output file with the extension @file{.dwo}. This option allows | 7518 separate output file with the extension @file{.dwo}. This option allows |
7020 the build system to avoid linking files with debug information. To | 7519 the build system to avoid linking files with debug information. To |
7021 be useful, this option requires a debugger capable of reading @file{.dwo} | 7520 be useful, this option requires a debugger capable of reading @file{.dwo} |
7022 files. | 7521 files. |
7023 | 7522 |
7523 @item -gdescribe-dies | |
7524 @opindex gdescribe-dies | |
7525 Add description attributes to some DWARF DIEs that have no name attribute, | |
7526 such as artificial variables, external references and call site | |
7527 parameter DIEs. | |
7528 | |
7024 @item -gpubnames | 7529 @item -gpubnames |
7025 @opindex gpubnames | 7530 @opindex gpubnames |
7026 Generate DWARF @code{.debug_pubnames} and @code{.debug_pubtypes} sections. | 7531 Generate DWARF @code{.debug_pubnames} and @code{.debug_pubtypes} sections. |
7027 | 7532 |
7028 @item -ggnu-pubnames | 7533 @item -ggnu-pubnames |
7035 @opindex fdebug-types-section | 7540 @opindex fdebug-types-section |
7036 @opindex fno-debug-types-section | 7541 @opindex fno-debug-types-section |
7037 When using DWARF Version 4 or higher, type DIEs can be put into | 7542 When using DWARF Version 4 or higher, type DIEs can be put into |
7038 their own @code{.debug_types} section instead of making them part of the | 7543 their own @code{.debug_types} section instead of making them part of the |
7039 @code{.debug_info} section. It is more efficient to put them in a separate | 7544 @code{.debug_info} section. It is more efficient to put them in a separate |
7040 comdat sections since the linker can then remove duplicates. | 7545 comdat section since the linker can then remove duplicates. |
7041 But not all DWARF consumers support @code{.debug_types} sections yet | 7546 But not all DWARF consumers support @code{.debug_types} sections yet |
7042 and on some objects @code{.debug_types} produces larger instead of smaller | 7547 and on some objects @code{.debug_types} produces larger instead of smaller |
7043 debugging information. | 7548 debugging information. |
7044 | 7549 |
7045 @item -grecord-gcc-switches | 7550 @item -grecord-gcc-switches |
7046 @item -gno-record-gcc-switches | 7551 @itemx -gno-record-gcc-switches |
7047 @opindex grecord-gcc-switches | 7552 @opindex grecord-gcc-switches |
7048 @opindex gno-record-gcc-switches | 7553 @opindex gno-record-gcc-switches |
7049 This switch causes the command-line options used to invoke the | 7554 This switch causes the command-line options used to invoke the |
7050 compiler that may affect code generation to be appended to the | 7555 compiler that may affect code generation to be appended to the |
7051 DW_AT_producer attribute in DWARF debugging information. The options | 7556 DW_AT_producer attribute in DWARF debugging information. The options |
7064 @item -gno-strict-dwarf | 7569 @item -gno-strict-dwarf |
7065 @opindex gno-strict-dwarf | 7570 @opindex gno-strict-dwarf |
7066 Allow using extensions of later DWARF standard version than selected with | 7571 Allow using extensions of later DWARF standard version than selected with |
7067 @option{-gdwarf-@var{version}}. | 7572 @option{-gdwarf-@var{version}}. |
7068 | 7573 |
7574 @item -gas-loc-support | |
7575 @opindex gas-loc-support | |
7576 Inform the compiler that the assembler supports @code{.loc} directives. | |
7577 It may then use them for the assembler to generate DWARF2+ line number | |
7578 tables. | |
7579 | |
7580 This is generally desirable, because assembler-generated line-number | |
7581 tables are a lot more compact than those the compiler can generate | |
7582 itself. | |
7583 | |
7584 This option will be enabled by default if, at GCC configure time, the | |
7585 assembler was found to support such directives. | |
7586 | |
7587 @item -gno-as-loc-support | |
7588 @opindex gno-as-loc-support | |
7589 Force GCC to generate DWARF2+ line number tables internally, if DWARF2+ | |
7590 line number tables are to be generated. | |
7591 | |
7592 @item gas-locview-support | |
7593 @opindex gas-locview-support | |
7594 Inform the compiler that the assembler supports @code{view} assignment | |
7595 and reset assertion checking in @code{.loc} directives. | |
7596 | |
7597 This option will be enabled by default if, at GCC configure time, the | |
7598 assembler was found to support them. | |
7599 | |
7600 @item gno-as-locview-support | |
7601 Force GCC to assign view numbers internally, if | |
7602 @option{-gvariable-location-views} are explicitly requested. | |
7603 | |
7069 @item -gcolumn-info | 7604 @item -gcolumn-info |
7070 @item -gno-column-info | 7605 @itemx -gno-column-info |
7071 @opindex gcolumn-info | 7606 @opindex gcolumn-info |
7072 @opindex gno-column-info | 7607 @opindex gno-column-info |
7073 Emit location column information into DWARF debugging information, rather | 7608 Emit location column information into DWARF debugging information, rather |
7074 than just file and line. | 7609 than just file and line. |
7075 This option is enabled by default. | 7610 This option is enabled by default. |
7611 | |
7612 @item -gstatement-frontiers | |
7613 @itemx -gno-statement-frontiers | |
7614 @opindex gstatement-frontiers | |
7615 @opindex gno-statement-frontiers | |
7616 This option causes GCC to create markers in the internal representation | |
7617 at the beginning of statements, and to keep them roughly in place | |
7618 throughout compilation, using them to guide the output of @code{is_stmt} | |
7619 markers in the line number table. This is enabled by default when | |
7620 compiling with optimization (@option{-Os}, @option{-O}, @option{-O2}, | |
7621 @dots{}), and outputting DWARF 2 debug information at the normal level. | |
7622 | |
7623 @item -gvariable-location-views | |
7624 @itemx -gvariable-location-views=incompat5 | |
7625 @itemx -gno-variable-location-views | |
7626 @opindex gvariable-location-views | |
7627 @opindex gvariable-location-views=incompat5 | |
7628 @opindex gno-variable-location-views | |
7629 Augment variable location lists with progressive view numbers implied | |
7630 from the line number table. This enables debug information consumers to | |
7631 inspect state at certain points of the program, even if no instructions | |
7632 associated with the corresponding source locations are present at that | |
7633 point. If the assembler lacks support for view numbers in line number | |
7634 tables, this will cause the compiler to emit the line number table, | |
7635 which generally makes them somewhat less compact. The augmented line | |
7636 number tables and location lists are fully backward-compatible, so they | |
7637 can be consumed by debug information consumers that are not aware of | |
7638 these augmentations, but they won't derive any benefit from them either. | |
7639 | |
7640 This is enabled by default when outputting DWARF 2 debug information at | |
7641 the normal level, as long as there is assembler support, | |
7642 @option{-fvar-tracking-assignments} is enabled and | |
7643 @option{-gstrict-dwarf} is not. When assembler support is not | |
7644 available, this may still be enabled, but it will force GCC to output | |
7645 internal line number tables, and if | |
7646 @option{-ginternal-reset-location-views} is not enabled, that will most | |
7647 certainly lead to silently mismatching location views. | |
7648 | |
7649 There is a proposed representation for view numbers that is not backward | |
7650 compatible with the location list format introduced in DWARF 5, that can | |
7651 be enabled with @option{-gvariable-location-views=incompat5}. This | |
7652 option may be removed in the future, is only provided as a reference | |
7653 implementation of the proposed representation. Debug information | |
7654 consumers are not expected to support this extended format, and they | |
7655 would be rendered unable to decode location lists using it. | |
7656 | |
7657 @item -ginternal-reset-location-views | |
7658 @itemx -gnointernal-reset-location-views | |
7659 @opindex ginternal-reset-location-views | |
7660 @opindex gno-internal-reset-location-views | |
7661 Attempt to determine location views that can be omitted from location | |
7662 view lists. This requires the compiler to have very accurate insn | |
7663 length estimates, which isn't always the case, and it may cause | |
7664 incorrect view lists to be generated silently when using an assembler | |
7665 that does not support location view lists. The GNU assembler will flag | |
7666 any such error as a @code{view number mismatch}. This is only enabled | |
7667 on ports that define a reliable estimation function. | |
7668 | |
7669 @item -ginline-points | |
7670 @itemx -gno-inline-points | |
7671 @opindex ginline-points | |
7672 @opindex gno-inline-points | |
7673 Generate extended debug information for inlined functions. Location | |
7674 view tracking markers are inserted at inlined entry points, so that | |
7675 address and view numbers can be computed and output in debug | |
7676 information. This can be enabled independently of location views, in | |
7677 which case the view numbers won't be output, but it can only be enabled | |
7678 along with statement frontiers, and it is only enabled by default if | |
7679 location views are enabled. | |
7076 | 7680 |
7077 @item -gz@r{[}=@var{type}@r{]} | 7681 @item -gz@r{[}=@var{type}@r{]} |
7078 @opindex gz | 7682 @opindex gz |
7079 Produce compressed debug sections in DWARF format, if that is supported. | 7683 Produce compressed debug sections in DWARF format, if that is supported. |
7080 If @var{type} is not given, the default type depends on the capabilities | 7684 If @var{type} is not given, the default type depends on the capabilities |
7249 -fipa-pure-const @gol | 7853 -fipa-pure-const @gol |
7250 -fipa-profile @gol | 7854 -fipa-profile @gol |
7251 -fipa-reference @gol | 7855 -fipa-reference @gol |
7252 -fmerge-constants @gol | 7856 -fmerge-constants @gol |
7253 -fmove-loop-invariants @gol | 7857 -fmove-loop-invariants @gol |
7858 -fomit-frame-pointer @gol | |
7254 -freorder-blocks @gol | 7859 -freorder-blocks @gol |
7255 -fshrink-wrap @gol | 7860 -fshrink-wrap @gol |
7256 -fshrink-wrap-separate @gol | 7861 -fshrink-wrap-separate @gol |
7257 -fsplit-wide-types @gol | 7862 -fsplit-wide-types @gol |
7258 -fssa-backprop @gol | 7863 -fssa-backprop @gol |
7266 -ftree-dominator-opts @gol | 7871 -ftree-dominator-opts @gol |
7267 -ftree-dse @gol | 7872 -ftree-dse @gol |
7268 -ftree-forwprop @gol | 7873 -ftree-forwprop @gol |
7269 -ftree-fre @gol | 7874 -ftree-fre @gol |
7270 -ftree-phiprop @gol | 7875 -ftree-phiprop @gol |
7876 -ftree-scev-cprop @gol | |
7271 -ftree-sink @gol | 7877 -ftree-sink @gol |
7272 -ftree-slsr @gol | 7878 -ftree-slsr @gol |
7273 -ftree-sra @gol | 7879 -ftree-sra @gol |
7274 -ftree-pta @gol | 7880 -ftree-pta @gol |
7275 -ftree-ter @gol | 7881 -ftree-ter @gol |
7276 -funit-at-a-time} | 7882 -funit-at-a-time} |
7277 | |
7278 @option{-O} also turns on @option{-fomit-frame-pointer} on machines | |
7279 where doing so does not interfere with debugging. | |
7280 | 7883 |
7281 @item -O2 | 7884 @item -O2 |
7282 @opindex O2 | 7885 @opindex O2 |
7283 Optimize even more. GCC performs nearly all supported optimizations | 7886 Optimize even more. GCC performs nearly all supported optimizations |
7284 that do not involve a space-speed tradeoff. | 7887 that do not involve a space-speed tradeoff. |
7337 -fpredictive-commoning @gol | 7940 -fpredictive-commoning @gol |
7338 -fgcse-after-reload @gol | 7941 -fgcse-after-reload @gol |
7339 -ftree-loop-vectorize @gol | 7942 -ftree-loop-vectorize @gol |
7340 -ftree-loop-distribution @gol | 7943 -ftree-loop-distribution @gol |
7341 -ftree-loop-distribute-patterns @gol | 7944 -ftree-loop-distribute-patterns @gol |
7945 -floop-interchange @gol | |
7946 -floop-unroll-and-jam @gol | |
7342 -fsplit-paths @gol | 7947 -fsplit-paths @gol |
7343 -ftree-slp-vectorize @gol | 7948 -ftree-slp-vectorize @gol |
7344 -fvect-cost-model @gol | 7949 -fvect-cost-model @gol |
7345 -ftree-partial-pre @gol | 7950 -ftree-partial-pre @gol |
7346 -fpeel-loops @gol | 7951 -fpeel-loops @gol |
7427 | 8032 |
7428 The default is @option{-ffp-contract=fast}. | 8033 The default is @option{-ffp-contract=fast}. |
7429 | 8034 |
7430 @item -fomit-frame-pointer | 8035 @item -fomit-frame-pointer |
7431 @opindex fomit-frame-pointer | 8036 @opindex fomit-frame-pointer |
7432 Don't keep the frame pointer in a register for functions that | 8037 Omit the frame pointer in functions that don't need one. This avoids the |
7433 don't need one. This avoids the instructions to save, set up and | 8038 instructions to save, set up and restore the frame pointer; on many targets |
7434 restore frame pointers; it also makes an extra register available | 8039 it also makes an extra register available. |
7435 in many functions. @strong{It also makes debugging impossible on | 8040 |
7436 some machines.} | 8041 On some targets this flag has no effect because the standard calling sequence |
7437 | 8042 always uses a frame pointer, so it cannot be omitted. |
7438 On some machines, such as the VAX, this flag has no effect, because | 8043 |
7439 the standard calling sequence automatically handles the frame pointer | 8044 Note that @option{-fno-omit-frame-pointer} doesn't guarantee the frame pointer |
7440 and nothing is saved by pretending it doesn't exist. The | 8045 is used in all functions. Several targets always omit the frame pointer in |
7441 machine-description macro @code{FRAME_POINTER_REQUIRED} controls | 8046 leaf functions. |
7442 whether a target machine supports this flag. @xref{Registers,,Register | 8047 |
7443 Usage, gccint, GNU Compiler Collection (GCC) Internals}. | 8048 Enabled by default at @option{-O} and higher. |
7444 | |
7445 The default setting (when not optimizing for | |
7446 size) for 32-bit GNU/Linux x86 and 32-bit Darwin x86 targets is | |
7447 @option{-fomit-frame-pointer}. You can configure GCC with the | |
7448 @option{--enable-frame-pointer} configure option to change the default. | |
7449 | |
7450 Note that @option{-fno-omit-frame-pointer} doesn't force a new stack | |
7451 frame for all functions if it isn't otherwise needed, and hence doesn't | |
7452 guarantee a new frame pointer for all functions. | |
7453 | |
7454 Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}. | |
7455 | 8049 |
7456 @item -foptimize-sibling-calls | 8050 @item -foptimize-sibling-calls |
7457 @opindex foptimize-sibling-calls | 8051 @opindex foptimize-sibling-calls |
7458 Optimize sibling and tail recursive calls. | 8052 Optimize sibling and tail recursive calls. |
7459 | 8053 |
7482 function call code (so overall size of program gets smaller). The compiler | 8076 function call code (so overall size of program gets smaller). The compiler |
7483 heuristically decides which functions are simple enough to be worth integrating | 8077 heuristically decides which functions are simple enough to be worth integrating |
7484 in this way. This inlining applies to all functions, even those not declared | 8078 in this way. This inlining applies to all functions, even those not declared |
7485 inline. | 8079 inline. |
7486 | 8080 |
7487 Enabled at level @option{-O2}. | 8081 Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. |
7488 | 8082 |
7489 @item -findirect-inlining | 8083 @item -findirect-inlining |
7490 @opindex findirect-inlining | 8084 @opindex findirect-inlining |
7491 Inline also indirect calls that are discovered to be known at compile | 8085 Inline also indirect calls that are discovered to be known at compile |
7492 time thanks to previous inlining. This option has any effect only | 8086 time thanks to previous inlining. This option has any effect only |
7493 when inlining itself is turned on by the @option{-finline-functions} | 8087 when inlining itself is turned on by the @option{-finline-functions} |
7494 or @option{-finline-small-functions} options. | 8088 or @option{-finline-small-functions} options. |
7495 | 8089 |
7496 Enabled at level @option{-O2}. | 8090 Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. |
7497 | 8091 |
7498 @item -finline-functions | 8092 @item -finline-functions |
7499 @opindex finline-functions | 8093 @opindex finline-functions |
7500 Consider all functions for inlining, even if they are not declared inline. | 8094 Consider all functions for inlining, even if they are not declared inline. |
7501 The compiler heuristically decides which functions are worth integrating | 8095 The compiler heuristically decides which functions are worth integrating |
7503 | 8097 |
7504 If all calls to a given function are integrated, and the function is | 8098 If all calls to a given function are integrated, and the function is |
7505 declared @code{static}, then the function is normally not output as | 8099 declared @code{static}, then the function is normally not output as |
7506 assembler code in its own right. | 8100 assembler code in its own right. |
7507 | 8101 |
7508 Enabled at level @option{-O3}. | 8102 Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. |
7509 | 8103 |
7510 @item -finline-functions-called-once | 8104 @item -finline-functions-called-once |
7511 @opindex finline-functions-called-once | 8105 @opindex finline-functions-called-once |
7512 Consider all @code{static} functions called once for inlining into their | 8106 Consider all @code{static} functions called once for inlining into their |
7513 caller even if they are not marked @code{inline}. If a call to a given | 8107 caller even if they are not marked @code{inline}. If a call to a given |
8356 This flag is enabled by default at @option{-O2} and higher and depends on | 8950 This flag is enabled by default at @option{-O2} and higher and depends on |
8357 @option{-fdelete-null-pointer-checks} also being enabled. | 8951 @option{-fdelete-null-pointer-checks} also being enabled. |
8358 | 8952 |
8359 @item -fisolate-erroneous-paths-attribute | 8953 @item -fisolate-erroneous-paths-attribute |
8360 @opindex fisolate-erroneous-paths-attribute | 8954 @opindex fisolate-erroneous-paths-attribute |
8361 Detect paths that trigger erroneous or undefined behavior due a null value | 8955 Detect paths that trigger erroneous or undefined behavior due to a null value |
8362 being used in a way forbidden by a @code{returns_nonnull} or @code{nonnull} | 8956 being used in a way forbidden by a @code{returns_nonnull} or @code{nonnull} |
8363 attribute. Isolate those paths from the main control flow and turn the | 8957 attribute. Isolate those paths from the main control flow and turn the |
8364 statement with erroneous or undefined behavior into a trap. This is not | 8958 statement with erroneous or undefined behavior into a trap. This is not |
8365 currently enabled, but may be enabled by @option{-O2} in the future. | 8959 currently enabled, but may be enabled by @option{-O2} in the future. |
8366 | 8960 |
8415 default at @option{-O} and higher. | 9009 default at @option{-O} and higher. |
8416 | 9010 |
8417 @item -ftree-builtin-call-dce | 9011 @item -ftree-builtin-call-dce |
8418 @opindex ftree-builtin-call-dce | 9012 @opindex ftree-builtin-call-dce |
8419 Perform conditional dead code elimination (DCE) for calls to built-in functions | 9013 Perform conditional dead code elimination (DCE) for calls to built-in functions |
8420 that may set @code{errno} but are otherwise side-effect free. This flag is | 9014 that may set @code{errno} but are otherwise free of side effects. This flag is |
8421 enabled by default at @option{-O2} and higher if @option{-Os} is not also | 9015 enabled by default at @option{-O2} and higher if @option{-Os} is not also |
8422 specified. | 9016 specified. |
8423 | 9017 |
8424 @item -ftree-dominator-opts | 9018 @item -ftree-dominator-opts |
8425 @opindex ftree-dominator-opts | 9019 @opindex ftree-dominator-opts |
8447 @opindex ftree-loop-optimize | 9041 @opindex ftree-loop-optimize |
8448 Perform loop optimizations on trees. This flag is enabled by default | 9042 Perform loop optimizations on trees. This flag is enabled by default |
8449 at @option{-O} and higher. | 9043 at @option{-O} and higher. |
8450 | 9044 |
8451 @item -ftree-loop-linear | 9045 @item -ftree-loop-linear |
8452 @itemx -floop-interchange | |
8453 @itemx -floop-strip-mine | 9046 @itemx -floop-strip-mine |
8454 @itemx -floop-block | 9047 @itemx -floop-block |
8455 @itemx -floop-unroll-and-jam | |
8456 @opindex ftree-loop-linear | 9048 @opindex ftree-loop-linear |
8457 @opindex floop-interchange | |
8458 @opindex floop-strip-mine | 9049 @opindex floop-strip-mine |
8459 @opindex floop-block | 9050 @opindex floop-block |
8460 @opindex floop-unroll-and-jam | |
8461 Perform loop nest optimizations. Same as | 9051 Perform loop nest optimizations. Same as |
8462 @option{-floop-nest-optimize}. To use this code transformation, GCC has | 9052 @option{-floop-nest-optimize}. To use this code transformation, GCC has |
8463 to be configured with @option{--with-isl} to enable the Graphite loop | 9053 to be configured with @option{--with-isl} to enable the Graphite loop |
8464 transformation infrastructure. | 9054 transformation infrastructure. |
8465 | 9055 |
8547 B(I) = A(I) + I | 9137 B(I) = A(I) + I |
8548 ENDDO | 9138 ENDDO |
8549 @end smallexample | 9139 @end smallexample |
8550 and the initialization loop is transformed into a call to memset zero. | 9140 and the initialization loop is transformed into a call to memset zero. |
8551 | 9141 |
9142 @item -floop-interchange | |
9143 @opindex floop-interchange | |
9144 Perform loop interchange outside of graphite. This flag can improve cache | |
9145 performance on loop nest and allow further loop optimizations, like | |
9146 vectorization, to take place. For example, the loop | |
9147 @smallexample | |
9148 for (int i = 0; i < N; i++) | |
9149 for (int j = 0; j < N; j++) | |
9150 for (int k = 0; k < N; k++) | |
9151 c[i][j] = c[i][j] + a[i][k]*b[k][j]; | |
9152 @end smallexample | |
9153 is transformed to | |
9154 @smallexample | |
9155 for (int i = 0; i < N; i++) | |
9156 for (int k = 0; k < N; k++) | |
9157 for (int j = 0; j < N; j++) | |
9158 c[i][j] = c[i][j] + a[i][k]*b[k][j]; | |
9159 @end smallexample | |
9160 This flag is enabled by default at @option{-O3}. | |
9161 | |
9162 @item -floop-unroll-and-jam | |
9163 @opindex floop-unroll-and-jam | |
9164 Apply unroll and jam transformations on feasible loops. In a loop | |
9165 nest this unrolls the outer loop by some factor and fuses the resulting | |
9166 multiple inner loops. This flag is enabled by default at @option{-O3}. | |
9167 | |
8552 @item -ftree-loop-im | 9168 @item -ftree-loop-im |
8553 @opindex ftree-loop-im | 9169 @opindex ftree-loop-im |
8554 Perform loop invariant motion on trees. This pass moves only invariants that | 9170 Perform loop invariant motion on trees. This pass moves only invariants that |
8555 are hard to handle at RTL level (function calls, operations that expand to | 9171 are hard to handle at RTL level (function calls, operations that expand to |
8556 nontrivial sequences of insns). With @option{-funswitch-loops} it also moves | 9172 nontrivial sequences of insns). With @option{-funswitch-loops} it also moves |
8562 @opindex ftree-loop-ivcanon | 9178 @opindex ftree-loop-ivcanon |
8563 Create a canonical counter for number of iterations in loops for which | 9179 Create a canonical counter for number of iterations in loops for which |
8564 determining number of iterations requires complicated analysis. Later | 9180 determining number of iterations requires complicated analysis. Later |
8565 optimizations then may determine the number easily. Useful especially | 9181 optimizations then may determine the number easily. Useful especially |
8566 in connection with unrolling. | 9182 in connection with unrolling. |
9183 | |
9184 @item -ftree-scev-cprop | |
9185 @opindex ftree-scev-cprop | |
9186 Perform final value replacement. If a variable is modified in a loop | |
9187 in such a way that its value when exiting the loop can be determined using | |
9188 only its initial value and the number of loop iterations, replace uses of | |
9189 the final value by such a computation, provided it is sufficiently cheap. | |
9190 This reduces data dependencies and may allow further simplifications. | |
9191 Enabled by default at @option{-O} and higher. | |
8567 | 9192 |
8568 @item -fivopts | 9193 @item -fivopts |
8569 @opindex fivopts | 9194 @opindex fivopts |
8570 Perform induction variable optimizations (strength reduction, induction | 9195 Perform induction variable optimizations (strength reduction, induction |
8571 variable merging and induction variable elimination) on trees. | 9196 variable merging and induction variable elimination) on trees. |
8644 either @samp{dynamic} or @samp{cheap}. | 9269 either @samp{dynamic} or @samp{cheap}. |
8645 | 9270 |
8646 @item -fsimd-cost-model=@var{model} | 9271 @item -fsimd-cost-model=@var{model} |
8647 @opindex fsimd-cost-model | 9272 @opindex fsimd-cost-model |
8648 Alter the cost model used for vectorization of loops marked with the OpenMP | 9273 Alter the cost model used for vectorization of loops marked with the OpenMP |
8649 or Cilk Plus simd directive. The @var{model} argument should be one of | 9274 simd directive. The @var{model} argument should be one of |
8650 @samp{unlimited}, @samp{dynamic}, @samp{cheap}. All values of @var{model} | 9275 @samp{unlimited}, @samp{dynamic}, @samp{cheap}. All values of @var{model} |
8651 have the same meaning as described in @option{-fvect-cost-model} and by | 9276 have the same meaning as described in @option{-fvect-cost-model} and by |
8652 default a cost model defined with @option{-fvect-cost-model} is used. | 9277 default a cost model defined with @option{-fvect-cost-model} is used. |
8653 | 9278 |
8654 @item -ftree-vrp | 9279 @item -ftree-vrp |
8689 @opindex fpartial-inlining | 9314 @opindex fpartial-inlining |
8690 Inline parts of functions. This option has any effect only | 9315 Inline parts of functions. This option has any effect only |
8691 when inlining itself is turned on by the @option{-finline-functions} | 9316 when inlining itself is turned on by the @option{-finline-functions} |
8692 or @option{-finline-small-functions} options. | 9317 or @option{-finline-small-functions} options. |
8693 | 9318 |
8694 Enabled at level @option{-O2}. | 9319 Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. |
8695 | 9320 |
8696 @item -fpredictive-commoning | 9321 @item -fpredictive-commoning |
8697 @opindex fpredictive-commoning | 9322 @opindex fpredictive-commoning |
8698 Perform predictive commoning optimization, i.e., reusing computations | 9323 Perform predictive commoning optimization, i.e., reusing computations |
8699 (especially memory loads and stores) performed in previous | 9324 (especially memory loads and stores) performed in previous |
8730 if (snprintf (buf, "%08x", i) >= sizeof buf) | 9355 if (snprintf (buf, "%08x", i) >= sizeof buf) |
8731 @dots{} | 9356 @dots{} |
8732 @end smallexample | 9357 @end smallexample |
8733 | 9358 |
8734 The @option{-fprintf-return-value} option relies on other optimizations | 9359 The @option{-fprintf-return-value} option relies on other optimizations |
8735 and yields best results with @option{-O2}. It works in tandem with the | 9360 and yields best results with @option{-O2} and above. It works in tandem |
8736 @option{-Wformat-overflow} and @option{-Wformat-truncation} options. | 9361 with the @option{-Wformat-overflow} and @option{-Wformat-truncation} |
8737 The @option{-fprintf-return-value} option is enabled by default. | 9362 options. The @option{-fprintf-return-value} option is enabled by default. |
8738 | 9363 |
8739 @item -fno-peephole | 9364 @item -fno-peephole |
8740 @itemx -fno-peephole2 | 9365 @itemx -fno-peephole2 |
8741 @opindex fno-peephole | 9366 @opindex fno-peephole |
8742 @opindex fno-peephole2 | 9367 @opindex fno-peephole2 |
8760 taking the @code{__builtin_expect} info into account. The interactions | 9385 taking the @code{__builtin_expect} info into account. The interactions |
8761 between the heuristics and @code{__builtin_expect} can be complex, and in | 9386 between the heuristics and @code{__builtin_expect} can be complex, and in |
8762 some cases, it may be useful to disable the heuristics so that the effects | 9387 some cases, it may be useful to disable the heuristics so that the effects |
8763 of @code{__builtin_expect} are easier to understand. | 9388 of @code{__builtin_expect} are easier to understand. |
8764 | 9389 |
9390 It is also possible to specify expected probability of the expression | |
9391 with @code{__builtin_expect_with_probability} built-in function. | |
9392 | |
8765 The default is @option{-fguess-branch-probability} at levels | 9393 The default is @option{-fguess-branch-probability} at levels |
8766 @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}. | 9394 @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}. |
8767 | 9395 |
8768 @item -freorder-blocks | 9396 @item -freorder-blocks |
8769 @opindex freorder-blocks | 9397 @opindex freorder-blocks |
8796 section attribute and on any architecture that does not support named | 9424 section attribute and on any architecture that does not support named |
8797 sections. When @option{-fsplit-stack} is used this option is not | 9425 sections. When @option{-fsplit-stack} is used this option is not |
8798 enabled by default (to avoid linker errors), but may be enabled | 9426 enabled by default (to avoid linker errors), but may be enabled |
8799 explicitly (if using a working linker). | 9427 explicitly (if using a working linker). |
8800 | 9428 |
8801 Enabled for x86 at levels @option{-O2}, @option{-O3}. | 9429 Enabled for x86 at levels @option{-O2}, @option{-O3}, @option{-Os}. |
8802 | 9430 |
8803 @item -freorder-functions | 9431 @item -freorder-functions |
8804 @opindex freorder-functions | 9432 @opindex freorder-functions |
8805 Reorder functions in the object file in order to | 9433 Reorder functions in the object file in order to |
8806 improve code locality. This is implemented by using special | 9434 improve code locality. This is implemented by using special |
8867 The @option{-fstrict-aliasing} option is enabled at levels | 9495 The @option{-fstrict-aliasing} option is enabled at levels |
8868 @option{-O2}, @option{-O3}, @option{-Os}. | 9496 @option{-O2}, @option{-O3}, @option{-Os}. |
8869 | 9497 |
8870 @item -falign-functions | 9498 @item -falign-functions |
8871 @itemx -falign-functions=@var{n} | 9499 @itemx -falign-functions=@var{n} |
9500 @itemx -falign-functions=@var{n}:@var{m} | |
9501 @itemx -falign-functions=@var{n}:@var{m}:@var{n2} | |
9502 @itemx -falign-functions=@var{n}:@var{m}:@var{n2}:@var{m2} | |
8872 @opindex falign-functions | 9503 @opindex falign-functions |
8873 Align the start of functions to the next power-of-two greater than | 9504 Align the start of functions to the next power-of-two greater than |
8874 @var{n}, skipping up to @var{n} bytes. For instance, | 9505 @var{n}, skipping up to @var{m}-1 bytes. This ensures that at least |
8875 @option{-falign-functions=32} aligns functions to the next 32-byte | 9506 the first @var{m} bytes of the function can be fetched by the CPU |
8876 boundary, but @option{-falign-functions=24} aligns to the next | 9507 without crossing an @var{n}-byte alignment boundary. |
8877 32-byte boundary only if this can be done by skipping 23 bytes or less. | 9508 |
9509 If @var{m} is not specified, it defaults to @var{n}. | |
9510 | |
9511 Examples: @option{-falign-functions=32} aligns functions to the next | |
9512 32-byte boundary, @option{-falign-functions=24} aligns to the next | |
9513 32-byte boundary only if this can be done by skipping 23 bytes or less, | |
9514 @option{-falign-functions=32:7} aligns to the next | |
9515 32-byte boundary only if this can be done by skipping 6 bytes or less. | |
9516 | |
9517 The second pair of @var{n2}:@var{m2} values allows you to specify | |
9518 a secondary alignment: @option{-falign-functions=64:7:32:3} aligns to | |
9519 the next 64-byte boundary if this can be done by skipping 6 bytes or less, | |
9520 otherwise aligns to the next 32-byte boundary if this can be done | |
9521 by skipping 2 bytes or less. | |
9522 If @var{m2} is not specified, it defaults to @var{n2}. | |
9523 | |
9524 Some assemblers only support this flag when @var{n} is a power of two; | |
9525 in that case, it is rounded up. | |
8878 | 9526 |
8879 @option{-fno-align-functions} and @option{-falign-functions=1} are | 9527 @option{-fno-align-functions} and @option{-falign-functions=1} are |
8880 equivalent and mean that functions are not aligned. | 9528 equivalent and mean that functions are not aligned. |
8881 | 9529 |
8882 Some assemblers only support this flag when @var{n} is a power of two; | |
8883 in that case, it is rounded up. | |
8884 | |
8885 If @var{n} is not specified or is zero, use a machine-dependent default. | 9530 If @var{n} is not specified or is zero, use a machine-dependent default. |
9531 The maximum allowed @var{n} option value is 65536. | |
8886 | 9532 |
8887 Enabled at levels @option{-O2}, @option{-O3}. | 9533 Enabled at levels @option{-O2}, @option{-O3}. |
8888 | 9534 |
8889 @item -flimit-function-alignment | 9535 @item -flimit-function-alignment |
8890 If this option is enabled, the compiler tries to avoid unnecessarily | 9536 If this option is enabled, the compiler tries to avoid unnecessarily |
8892 by the amount specified by @option{-falign-functions}, but not to | 9538 by the amount specified by @option{-falign-functions}, but not to |
8893 skip more bytes than the size of the function. | 9539 skip more bytes than the size of the function. |
8894 | 9540 |
8895 @item -falign-labels | 9541 @item -falign-labels |
8896 @itemx -falign-labels=@var{n} | 9542 @itemx -falign-labels=@var{n} |
9543 @itemx -falign-labels=@var{n}:@var{m} | |
9544 @itemx -falign-labels=@var{n}:@var{m}:@var{n2} | |
9545 @itemx -falign-labels=@var{n}:@var{m}:@var{n2}:@var{m2} | |
8897 @opindex falign-labels | 9546 @opindex falign-labels |
8898 Align all branch targets to a power-of-two boundary, skipping up to | 9547 Align all branch targets to a power-of-two boundary. |
8899 @var{n} bytes like @option{-falign-functions}. This option can easily | 9548 |
8900 make code slower, because it must insert dummy operations for when the | 9549 Parameters of this option are analogous to the @option{-falign-functions} option. |
8901 branch target is reached in the usual flow of the code. | |
8902 | |
8903 @option{-fno-align-labels} and @option{-falign-labels=1} are | 9550 @option{-fno-align-labels} and @option{-falign-labels=1} are |
8904 equivalent and mean that labels are not aligned. | 9551 equivalent and mean that labels are not aligned. |
8905 | 9552 |
8906 If @option{-falign-loops} or @option{-falign-jumps} are applicable and | 9553 If @option{-falign-loops} or @option{-falign-jumps} are applicable and |
8907 are greater than this value, then their values are used instead. | 9554 are greater than this value, then their values are used instead. |
8908 | 9555 |
8909 If @var{n} is not specified or is zero, use a machine-dependent default | 9556 If @var{n} is not specified or is zero, use a machine-dependent default |
8910 which is very likely to be @samp{1}, meaning no alignment. | 9557 which is very likely to be @samp{1}, meaning no alignment. |
9558 The maximum allowed @var{n} option value is 65536. | |
8911 | 9559 |
8912 Enabled at levels @option{-O2}, @option{-O3}. | 9560 Enabled at levels @option{-O2}, @option{-O3}. |
8913 | 9561 |
8914 @item -falign-loops | 9562 @item -falign-loops |
8915 @itemx -falign-loops=@var{n} | 9563 @itemx -falign-loops=@var{n} |
9564 @itemx -falign-loops=@var{n}:@var{m} | |
9565 @itemx -falign-loops=@var{n}:@var{m}:@var{n2} | |
9566 @itemx -falign-loops=@var{n}:@var{m}:@var{n2}:@var{m2} | |
8916 @opindex falign-loops | 9567 @opindex falign-loops |
8917 Align loops to a power-of-two boundary, skipping up to @var{n} bytes | 9568 Align loops to a power-of-two boundary. If the loops are executed |
8918 like @option{-falign-functions}. If the loops are | 9569 many times, this makes up for any execution of the dummy padding |
8919 executed many times, this makes up for any execution of the dummy | 9570 instructions. |
8920 operations. | 9571 |
8921 | 9572 Parameters of this option are analogous to the @option{-falign-functions} option. |
8922 @option{-fno-align-loops} and @option{-falign-loops=1} are | 9573 @option{-fno-align-loops} and @option{-falign-loops=1} are |
8923 equivalent and mean that loops are not aligned. | 9574 equivalent and mean that loops are not aligned. |
9575 The maximum allowed @var{n} option value is 65536. | |
8924 | 9576 |
8925 If @var{n} is not specified or is zero, use a machine-dependent default. | 9577 If @var{n} is not specified or is zero, use a machine-dependent default. |
8926 | 9578 |
8927 Enabled at levels @option{-O2}, @option{-O3}. | 9579 Enabled at levels @option{-O2}, @option{-O3}. |
8928 | 9580 |
8929 @item -falign-jumps | 9581 @item -falign-jumps |
8930 @itemx -falign-jumps=@var{n} | 9582 @itemx -falign-jumps=@var{n} |
9583 @itemx -falign-jumps=@var{n}:@var{m} | |
9584 @itemx -falign-jumps=@var{n}:@var{m}:@var{n2} | |
9585 @itemx -falign-jumps=@var{n}:@var{m}:@var{n2}:@var{m2} | |
8931 @opindex falign-jumps | 9586 @opindex falign-jumps |
8932 Align branch targets to a power-of-two boundary, for branch targets | 9587 Align branch targets to a power-of-two boundary, for branch targets |
8933 where the targets can only be reached by jumping, skipping up to @var{n} | 9588 where the targets can only be reached by jumping. In this case, |
8934 bytes like @option{-falign-functions}. In this case, no dummy operations | 9589 no dummy operations need be executed. |
8935 need be executed. | 9590 |
8936 | 9591 Parameters of this option are analogous to the @option{-falign-functions} option. |
8937 @option{-fno-align-jumps} and @option{-falign-jumps=1} are | 9592 @option{-fno-align-jumps} and @option{-falign-jumps=1} are |
8938 equivalent and mean that loops are not aligned. | 9593 equivalent and mean that loops are not aligned. |
8939 | 9594 |
8940 If @var{n} is not specified or is zero, use a machine-dependent default. | 9595 If @var{n} is not specified or is zero, use a machine-dependent default. |
9596 The maximum allowed @var{n} option value is 65536. | |
8941 | 9597 |
8942 Enabled at levels @option{-O2}, @option{-O3}. | 9598 Enabled at levels @option{-O2}, @option{-O3}. |
8943 | 9599 |
8944 @item -funit-at-a-time | 9600 @item -funit-at-a-time |
8945 @opindex funit-at-a-time | 9601 @opindex funit-at-a-time |
9135 are using a linker with plugin support. To create static libraries suitable | 9791 are using a linker with plugin support. To create static libraries suitable |
9136 for LTO, use @command{gcc-ar} and @command{gcc-ranlib} instead of @command{ar} | 9792 for LTO, use @command{gcc-ar} and @command{gcc-ranlib} instead of @command{ar} |
9137 and @command{ranlib}; | 9793 and @command{ranlib}; |
9138 to show the symbols of object files with GIMPLE bytecode, use | 9794 to show the symbols of object files with GIMPLE bytecode, use |
9139 @command{gcc-nm}. Those commands require that @command{ar}, @command{ranlib} | 9795 @command{gcc-nm}. Those commands require that @command{ar}, @command{ranlib} |
9140 and @command{nm} have been compiled with plugin support. At link time, use the the | 9796 and @command{nm} have been compiled with plugin support. At link time, use the |
9141 flag @option{-fuse-linker-plugin} to ensure that the library participates in | 9797 flag @option{-fuse-linker-plugin} to ensure that the library participates in |
9142 the LTO optimization process: | 9798 the LTO optimization process: |
9143 | 9799 |
9144 @smallexample | 9800 @smallexample |
9145 gcc -o myprog -O2 -flto -fuse-linker-plugin a.o b.o -lfoo | 9801 gcc -o myprog -O2 -flto -fuse-linker-plugin a.o b.o -lfoo |
9169 types of hosts. The bytecode files are versioned and there is a | 9825 types of hosts. The bytecode files are versioned and there is a |
9170 strict version check, so bytecode files generated in one version of | 9826 strict version check, so bytecode files generated in one version of |
9171 GCC do not work with an older or newer version of GCC. | 9827 GCC do not work with an older or newer version of GCC. |
9172 | 9828 |
9173 Link-time optimization does not work well with generation of debugging | 9829 Link-time optimization does not work well with generation of debugging |
9174 information. Combining @option{-flto} with | 9830 information on systems other than those using a combination of ELF and |
9175 @option{-g} is currently experimental and expected to produce unexpected | 9831 DWARF. |
9176 results. | |
9177 | 9832 |
9178 If you specify the optional @var{n}, the optimization and code | 9833 If you specify the optional @var{n}, the optimization and code |
9179 generation done at link time is executed in parallel using @var{n} | 9834 generation done at link time is executed in parallel using @var{n} |
9180 parallel jobs by utilizing an installed @command{make} program. The | 9835 parallel jobs by utilizing an installed @command{make} program. The |
9181 environment variable @env{MAKE} may be used to override the program | 9836 environment variable @env{MAKE} may be used to override the program |
9251 need to support linker plugins to allow a full-featured build environment | 9906 need to support linker plugins to allow a full-featured build environment |
9252 (capable of building static libraries etc). GCC provides the @command{gcc-ar}, | 9907 (capable of building static libraries etc). GCC provides the @command{gcc-ar}, |
9253 @command{gcc-nm}, @command{gcc-ranlib} wrappers to pass the right options | 9908 @command{gcc-nm}, @command{gcc-ranlib} wrappers to pass the right options |
9254 to these tools. With non fat LTO makefiles need to be modified to use them. | 9909 to these tools. With non fat LTO makefiles need to be modified to use them. |
9255 | 9910 |
9911 Note that modern binutils provide plugin auto-load mechanism. | |
9912 Installing the linker plugin into @file{$libdir/bfd-plugins} has the same | |
9913 effect as usage of the command wrappers (@command{gcc-ar}, @command{gcc-nm} and | |
9914 @command{gcc-ranlib}). | |
9915 | |
9256 The default is @option{-fno-fat-lto-objects} on targets with linker plugin | 9916 The default is @option{-fno-fat-lto-objects} on targets with linker plugin |
9257 support. | 9917 support. |
9258 | 9918 |
9259 @item -fcompare-elim | 9919 @item -fcompare-elim |
9260 @opindex fcompare-elim | 9920 @opindex fcompare-elim |
9297 @xref{Instrumentation Options}, for information about the | 9957 @xref{Instrumentation Options}, for information about the |
9298 @option{-fprofile-generate} option. | 9958 @option{-fprofile-generate} option. |
9299 | 9959 |
9300 By default, GCC emits an error message if the feedback profiles do not | 9960 By default, GCC emits an error message if the feedback profiles do not |
9301 match the source code. This error can be turned into a warning by using | 9961 match the source code. This error can be turned into a warning by using |
9302 @option{-Wcoverage-mismatch}. Note this may result in poorly optimized | 9962 @option{-Wno-error=coverage-mismatch}. Note this may result in poorly |
9303 code. | 9963 optimized code. Additionally, by default, GCC also emits a warning message if |
9964 the feedback profiles do not exist (See @option{-Wmissing-profile}). | |
9304 | 9965 |
9305 If @var{path} is specified, GCC looks at the @var{path} to find | 9966 If @var{path} is specified, GCC looks at the @var{path} to find |
9306 the profile feedback data files. See @option{-fprofile-dir}. | 9967 the profile feedback data files. See @option{-fprofile-dir}. |
9307 | 9968 |
9308 @item -fauto-profile | 9969 @item -fauto-profile |
9805 | 10466 |
9806 The names of specific parameters, and the meaning of the values, are | 10467 The names of specific parameters, and the meaning of the values, are |
9807 tied to the internals of the compiler, and are subject to change | 10468 tied to the internals of the compiler, and are subject to change |
9808 without notice in future releases. | 10469 without notice in future releases. |
9809 | 10470 |
10471 In order to get minimal, maximal and default value of a parameter, | |
10472 one can use @option{--help=param -Q} options. | |
10473 | |
9810 In each case, the @var{value} is an integer. The allowable choices for | 10474 In each case, the @var{value} is an integer. The allowable choices for |
9811 @var{name} are: | 10475 @var{name} are: |
9812 | 10476 |
9813 @table @gcctabopt | 10477 @table @gcctabopt |
9814 @item predictable-branch-outcome | 10478 @item predictable-branch-outcome |
9815 When branch is predicted to be taken with probability lower than this threshold | 10479 When branch is predicted to be taken with probability lower than this threshold |
9816 (in percent), then it is considered well predictable. The default is 10. | 10480 (in percent), then it is considered well predictable. |
9817 | 10481 |
9818 @item max-rtl-if-conversion-insns | 10482 @item max-rtl-if-conversion-insns |
9819 RTL if-conversion tries to remove conditional branches around a block and | 10483 RTL if-conversion tries to remove conditional branches around a block and |
9820 replace them with conditionally executed instructions. This parameter | 10484 replace them with conditionally executed instructions. This parameter |
9821 gives the maximum number of instructions in a block which should be | 10485 gives the maximum number of instructions in a block which should be |
9822 considered for if-conversion. The default is 10, though the compiler will | 10486 considered for if-conversion. The compiler will |
9823 also use other heuristics to decide whether if-conversion is likely to be | 10487 also use other heuristics to decide whether if-conversion is likely to be |
9824 profitable. | 10488 profitable. |
9825 | 10489 |
9826 @item max-rtl-if-conversion-predictable-cost | 10490 @item max-rtl-if-conversion-predictable-cost |
9827 @item max-rtl-if-conversion-unpredictable-cost | 10491 @itemx max-rtl-if-conversion-unpredictable-cost |
9828 RTL if-conversion will try to remove conditional branches around a block | 10492 RTL if-conversion will try to remove conditional branches around a block |
9829 and replace them with conditionally executed instructions. These parameters | 10493 and replace them with conditionally executed instructions. These parameters |
9830 give the maximum permissible cost for the sequence that would be generated | 10494 give the maximum permissible cost for the sequence that would be generated |
9831 by if-conversion depending on whether the branch is statically determined | 10495 by if-conversion depending on whether the branch is statically determined |
9832 to be predictable or not. The units for this parameter are the same as | 10496 to be predictable or not. The units for this parameter are the same as |
9843 | 10507 |
9844 @item min-crossjump-insns | 10508 @item min-crossjump-insns |
9845 The minimum number of instructions that must be matched at the end | 10509 The minimum number of instructions that must be matched at the end |
9846 of two blocks before cross-jumping is performed on them. This | 10510 of two blocks before cross-jumping is performed on them. This |
9847 value is ignored in the case where all instructions in the block being | 10511 value is ignored in the case where all instructions in the block being |
9848 cross-jumped from are matched. The default value is 5. | 10512 cross-jumped from are matched. |
9849 | 10513 |
9850 @item max-grow-copy-bb-insns | 10514 @item max-grow-copy-bb-insns |
9851 The maximum code size expansion factor when copying basic blocks | 10515 The maximum code size expansion factor when copying basic blocks |
9852 instead of jumping. The expansion is relative to a jump instruction. | 10516 instead of jumping. The expansion is relative to a jump instruction. |
9853 The default value is 8. | |
9854 | 10517 |
9855 @item max-goto-duplication-insns | 10518 @item max-goto-duplication-insns |
9856 The maximum number of instructions to duplicate to a block that jumps | 10519 The maximum number of instructions to duplicate to a block that jumps |
9857 to a computed goto. To avoid @math{O(N^2)} behavior in a number of | 10520 to a computed goto. To avoid @math{O(N^2)} behavior in a number of |
9858 passes, GCC factors computed gotos early in the compilation process, | 10521 passes, GCC factors computed gotos early in the compilation process, |
9859 and unfactors them as late as possible. Only computed jumps at the | 10522 and unfactors them as late as possible. Only computed jumps at the |
9860 end of a basic blocks with no more than max-goto-duplication-insns are | 10523 end of a basic blocks with no more than max-goto-duplication-insns are |
9861 unfactored. The default value is 8. | 10524 unfactored. |
9862 | 10525 |
9863 @item max-delay-slot-insn-search | 10526 @item max-delay-slot-insn-search |
9864 The maximum number of instructions to consider when looking for an | 10527 The maximum number of instructions to consider when looking for an |
9865 instruction to fill a delay slot. If more than this arbitrary number of | 10528 instruction to fill a delay slot. If more than this arbitrary number of |
9866 instructions are searched, the time savings from filling the delay slot | 10529 instructions are searched, the time savings from filling the delay slot |
9883 optimization is not done. | 10546 optimization is not done. |
9884 | 10547 |
9885 @item max-gcse-insertion-ratio | 10548 @item max-gcse-insertion-ratio |
9886 If the ratio of expression insertions to deletions is larger than this value | 10549 If the ratio of expression insertions to deletions is larger than this value |
9887 for any expression, then RTL PRE inserts or removes the expression and thus | 10550 for any expression, then RTL PRE inserts or removes the expression and thus |
9888 leaves partially redundant computations in the instruction stream. The default value is 20. | 10551 leaves partially redundant computations in the instruction stream. |
9889 | 10552 |
9890 @item max-pending-list-length | 10553 @item max-pending-list-length |
9891 The maximum number of pending dependencies scheduling allows | 10554 The maximum number of pending dependencies scheduling allows |
9892 before flushing the current state and starting over. Large functions | 10555 before flushing the current state and starting over. Large functions |
9893 with few branches or calls can create excessively large lists which | 10556 with few branches or calls can create excessively large lists which |
9902 Several parameters control the tree inliner used in GCC@. | 10565 Several parameters control the tree inliner used in GCC@. |
9903 This number sets the maximum number of instructions (counted in GCC's | 10566 This number sets the maximum number of instructions (counted in GCC's |
9904 internal representation) in a single function that the tree inliner | 10567 internal representation) in a single function that the tree inliner |
9905 considers for inlining. This only affects functions declared | 10568 considers for inlining. This only affects functions declared |
9906 inline and methods implemented in a class declaration (C++). | 10569 inline and methods implemented in a class declaration (C++). |
9907 The default value is 400. | |
9908 | 10570 |
9909 @item max-inline-insns-auto | 10571 @item max-inline-insns-auto |
9910 When you use @option{-finline-functions} (included in @option{-O3}), | 10572 When you use @option{-finline-functions} (included in @option{-O3}), |
9911 a lot of functions that would otherwise not be considered for inlining | 10573 a lot of functions that would otherwise not be considered for inlining |
9912 by the compiler are investigated. To those functions, a different | 10574 by the compiler are investigated. To those functions, a different |
9913 (more restrictive) limit compared to functions declared inline can | 10575 (more restrictive) limit compared to functions declared inline can |
9914 be applied. | 10576 be applied. |
9915 The default value is 40. | |
9916 | 10577 |
9917 @item inline-min-speedup | 10578 @item inline-min-speedup |
9918 When estimated performance improvement of caller + callee runtime exceeds this | 10579 When estimated performance improvement of caller + callee runtime exceeds this |
9919 threshold (in percent), the function can be inlined regardless of the limit on | 10580 threshold (in percent), the function can be inlined regardless of the limit on |
9920 @option{--param max-inline-insns-single} and @option{--param | 10581 @option{--param max-inline-insns-single} and @option{--param |
9924 The limit specifying really large functions. For functions larger than this | 10585 The limit specifying really large functions. For functions larger than this |
9925 limit after inlining, inlining is constrained by | 10586 limit after inlining, inlining is constrained by |
9926 @option{--param large-function-growth}. This parameter is useful primarily | 10587 @option{--param large-function-growth}. This parameter is useful primarily |
9927 to avoid extreme compilation time caused by non-linear algorithms used by the | 10588 to avoid extreme compilation time caused by non-linear algorithms used by the |
9928 back end. | 10589 back end. |
9929 The default value is 2700. | |
9930 | 10590 |
9931 @item large-function-growth | 10591 @item large-function-growth |
9932 Specifies maximal growth of large function caused by inlining in percents. | 10592 Specifies maximal growth of large function caused by inlining in percents. |
9933 The default value is 100 which limits large function growth to 2.0 times | 10593 For example, parameter value 100 limits large function growth to 2.0 times |
9934 the original size. | 10594 the original size. |
9935 | 10595 |
9936 @item large-unit-insns | 10596 @item large-unit-insns |
9937 The limit specifying large translation unit. Growth caused by inlining of | 10597 The limit specifying large translation unit. Growth caused by inlining of |
9938 units larger than this limit is limited by @option{--param inline-unit-growth}. | 10598 units larger than this limit is limited by @option{--param inline-unit-growth}. |
9941 that is inline and B that just calls A three times. If B is small relative to | 10601 that is inline and B that just calls A three times. If B is small relative to |
9942 A, the growth of unit is 300\% and yet such inlining is very sane. For very | 10602 A, the growth of unit is 300\% and yet such inlining is very sane. For very |
9943 large units consisting of small inlineable functions, however, the overall unit | 10603 large units consisting of small inlineable functions, however, the overall unit |
9944 growth limit is needed to avoid exponential explosion of code size. Thus for | 10604 growth limit is needed to avoid exponential explosion of code size. Thus for |
9945 smaller units, the size is increased to @option{--param large-unit-insns} | 10605 smaller units, the size is increased to @option{--param large-unit-insns} |
9946 before applying @option{--param inline-unit-growth}. The default is 10000. | 10606 before applying @option{--param inline-unit-growth}. |
9947 | 10607 |
9948 @item inline-unit-growth | 10608 @item inline-unit-growth |
9949 Specifies maximal overall growth of the compilation unit caused by inlining. | 10609 Specifies maximal overall growth of the compilation unit caused by inlining. |
9950 The default value is 20 which limits unit growth to 1.2 times the original | 10610 For example, parameter value 20 limits unit growth to 1.2 times the original |
9951 size. Cold functions (either marked cold via an attribute or by profile | 10611 size. Cold functions (either marked cold via an attribute or by profile |
9952 feedback) are not accounted into the unit size. | 10612 feedback) are not accounted into the unit size. |
9953 | 10613 |
9954 @item ipcp-unit-growth | 10614 @item ipcp-unit-growth |
9955 Specifies maximal overall growth of the compilation unit caused by | 10615 Specifies maximal overall growth of the compilation unit caused by |
9956 interprocedural constant propagation. The default value is 10 which limits | 10616 interprocedural constant propagation. For example, parameter value 10 limits |
9957 unit growth to 1.1 times the original size. | 10617 unit growth to 1.1 times the original size. |
9958 | 10618 |
9959 @item large-stack-frame | 10619 @item large-stack-frame |
9960 The limit specifying large stack frames. While inlining the algorithm is trying | 10620 The limit specifying large stack frames. While inlining the algorithm is trying |
9961 to not grow past this limit too much. The default value is 256 bytes. | 10621 to not grow past this limit too much. |
9962 | 10622 |
9963 @item large-stack-frame-growth | 10623 @item large-stack-frame-growth |
9964 Specifies maximal growth of large stack frames caused by inlining in percents. | 10624 Specifies maximal growth of large stack frames caused by inlining in percents. |
9965 The default value is 1000 which limits large stack frame growth to 11 times | 10625 For example, parameter value 1000 limits large stack frame growth to 11 times |
9966 the original size. | 10626 the original size. |
9967 | 10627 |
9968 @item max-inline-insns-recursive | 10628 @item max-inline-insns-recursive |
9969 @itemx max-inline-insns-recursive-auto | 10629 @itemx max-inline-insns-recursive-auto |
9970 Specifies the maximum number of instructions an out-of-line copy of a | 10630 Specifies the maximum number of instructions an out-of-line copy of a |
9973 | 10633 |
9974 @option{--param max-inline-insns-recursive} applies to functions | 10634 @option{--param max-inline-insns-recursive} applies to functions |
9975 declared inline. | 10635 declared inline. |
9976 For functions not declared inline, recursive inlining | 10636 For functions not declared inline, recursive inlining |
9977 happens only when @option{-finline-functions} (included in @option{-O3}) is | 10637 happens only when @option{-finline-functions} (included in @option{-O3}) is |
9978 enabled; @option{--param max-inline-insns-recursive-auto} applies instead. The | 10638 enabled; @option{--param max-inline-insns-recursive-auto} applies instead. |
9979 default value is 450. | |
9980 | 10639 |
9981 @item max-inline-recursive-depth | 10640 @item max-inline-recursive-depth |
9982 @itemx max-inline-recursive-depth-auto | 10641 @itemx max-inline-recursive-depth-auto |
9983 Specifies the maximum recursion depth used for recursive inlining. | 10642 Specifies the maximum recursion depth used for recursive inlining. |
9984 | 10643 |
9985 @option{--param max-inline-recursive-depth} applies to functions | 10644 @option{--param max-inline-recursive-depth} applies to functions |
9986 declared inline. For functions not declared inline, recursive inlining | 10645 declared inline. For functions not declared inline, recursive inlining |
9987 happens only when @option{-finline-functions} (included in @option{-O3}) is | 10646 happens only when @option{-finline-functions} (included in @option{-O3}) is |
9988 enabled; @option{--param max-inline-recursive-depth-auto} applies instead. The | 10647 enabled; @option{--param max-inline-recursive-depth-auto} applies instead. |
9989 default value is 8. | |
9990 | 10648 |
9991 @item min-inline-recursive-probability | 10649 @item min-inline-recursive-probability |
9992 Recursive inlining is profitable only for function having deep recursion | 10650 Recursive inlining is profitable only for function having deep recursion |
9993 in average and can hurt for function having little recursion depth by | 10651 in average and can hurt for function having little recursion depth by |
9994 increasing the prologue size or complexity of function body to other | 10652 increasing the prologue size or complexity of function body to other |
9996 | 10654 |
9997 When profile feedback is available (see @option{-fprofile-generate}) the actual | 10655 When profile feedback is available (see @option{-fprofile-generate}) the actual |
9998 recursion depth can be guessed from the probability that function recurses | 10656 recursion depth can be guessed from the probability that function recurses |
9999 via a given call expression. This parameter limits inlining only to call | 10657 via a given call expression. This parameter limits inlining only to call |
10000 expressions whose probability exceeds the given threshold (in percents). | 10658 expressions whose probability exceeds the given threshold (in percents). |
10001 The default value is 10. | |
10002 | 10659 |
10003 @item early-inlining-insns | 10660 @item early-inlining-insns |
10004 Specify growth that the early inliner can make. In effect it increases | 10661 Specify growth that the early inliner can make. In effect it increases |
10005 the amount of inlining for code having a large abstraction penalty. | 10662 the amount of inlining for code having a large abstraction penalty. |
10006 The default value is 14. | |
10007 | 10663 |
10008 @item max-early-inliner-iterations | 10664 @item max-early-inliner-iterations |
10009 Limit of iterations of the early inliner. This basically bounds | 10665 Limit of iterations of the early inliner. This basically bounds |
10010 the number of nested indirect calls the early inliner can resolve. | 10666 the number of nested indirect calls the early inliner can resolve. |
10011 Deeper chains are still handled by late inlining. | 10667 Deeper chains are still handled by late inlining. |
10012 | 10668 |
10013 @item comdat-sharing-probability | 10669 @item comdat-sharing-probability |
10014 Probability (in percent) that C++ inline function with comdat visibility | 10670 Probability (in percent) that C++ inline function with comdat visibility |
10015 are shared across multiple compilation units. The default value is 20. | 10671 are shared across multiple compilation units. |
10016 | 10672 |
10017 @item profile-func-internal-id | 10673 @item profile-func-internal-id |
10018 A parameter to control whether to use function internal id in profile | 10674 A parameter to control whether to use function internal id in profile |
10019 database lookup. If the value is 0, the compiler uses an id that | 10675 database lookup. If the value is 0, the compiler uses an id that |
10020 is based on function assembler name and filename, which makes old profile | 10676 is based on function assembler name and filename, which makes old profile |
10021 data more tolerant to source changes such as function reordering etc. | 10677 data more tolerant to source changes such as function reordering etc. |
10022 The default value is 0. | |
10023 | 10678 |
10024 @item min-vect-loop-bound | 10679 @item min-vect-loop-bound |
10025 The minimum number of iterations under which loops are not vectorized | 10680 The minimum number of iterations under which loops are not vectorized |
10026 when @option{-ftree-vectorize} is used. The number of iterations after | 10681 when @option{-ftree-vectorize} is used. The number of iterations after |
10027 vectorization needs to be greater than the value specified by this option | 10682 vectorization needs to be greater than the value specified by this option |
10028 to allow vectorization. The default value is 0. | 10683 to allow vectorization. |
10029 | 10684 |
10030 @item gcse-cost-distance-ratio | 10685 @item gcse-cost-distance-ratio |
10031 Scaling factor in calculation of maximum distance an expression | 10686 Scaling factor in calculation of maximum distance an expression |
10032 can be moved by GCSE optimizations. This is currently supported only in the | 10687 can be moved by GCSE optimizations. This is currently supported only in the |
10033 code hoisting pass. The bigger the ratio, the more aggressive code hoisting | 10688 code hoisting pass. The bigger the ratio, the more aggressive code hoisting |
10034 is with simple expressions, i.e., the expressions that have cost | 10689 is with simple expressions, i.e., the expressions that have cost |
10035 less than @option{gcse-unrestricted-cost}. Specifying 0 disables | 10690 less than @option{gcse-unrestricted-cost}. Specifying 0 disables |
10036 hoisting of simple expressions. The default value is 10. | 10691 hoisting of simple expressions. |
10037 | 10692 |
10038 @item gcse-unrestricted-cost | 10693 @item gcse-unrestricted-cost |
10039 Cost, roughly measured as the cost of a single typical machine | 10694 Cost, roughly measured as the cost of a single typical machine |
10040 instruction, at which GCSE optimizations do not constrain | 10695 instruction, at which GCSE optimizations do not constrain |
10041 the distance an expression can travel. This is currently | 10696 the distance an expression can travel. This is currently |
10042 supported only in the code hoisting pass. The lesser the cost, | 10697 supported only in the code hoisting pass. The lesser the cost, |
10043 the more aggressive code hoisting is. Specifying 0 | 10698 the more aggressive code hoisting is. Specifying 0 |
10044 allows all expressions to travel unrestricted distances. | 10699 allows all expressions to travel unrestricted distances. |
10045 The default value is 3. | |
10046 | 10700 |
10047 @item max-hoist-depth | 10701 @item max-hoist-depth |
10048 The depth of search in the dominator tree for expressions to hoist. | 10702 The depth of search in the dominator tree for expressions to hoist. |
10049 This is used to avoid quadratic behavior in hoisting algorithm. | 10703 This is used to avoid quadratic behavior in hoisting algorithm. |
10050 The value of 0 does not limit on the search, but may slow down compilation | 10704 The value of 0 does not limit on the search, but may slow down compilation |
10051 of huge functions. The default value is 30. | 10705 of huge functions. |
10052 | 10706 |
10053 @item max-tail-merge-comparisons | 10707 @item max-tail-merge-comparisons |
10054 The maximum amount of similar bbs to compare a bb with. This is used to | 10708 The maximum amount of similar bbs to compare a bb with. This is used to |
10055 avoid quadratic behavior in tree tail merging. The default value is 10. | 10709 avoid quadratic behavior in tree tail merging. |
10056 | 10710 |
10057 @item max-tail-merge-iterations | 10711 @item max-tail-merge-iterations |
10058 The maximum amount of iterations of the pass over the function. This is used to | 10712 The maximum amount of iterations of the pass over the function. This is used to |
10059 limit compilation time in tree tail merging. The default value is 2. | 10713 limit compilation time in tree tail merging. |
10060 | 10714 |
10061 @item store-merging-allow-unaligned | 10715 @item store-merging-allow-unaligned |
10062 Allow the store merging pass to introduce unaligned stores if it is legal to | 10716 Allow the store merging pass to introduce unaligned stores if it is legal to |
10063 do so. The default value is 1. | 10717 do so. |
10064 | 10718 |
10065 @item max-stores-to-merge | 10719 @item max-stores-to-merge |
10066 The maximum number of stores to attempt to merge into wider stores in the store | 10720 The maximum number of stores to attempt to merge into wider stores in the store |
10067 merging pass. The minimum value is 2 and the default is 64. | 10721 merging pass. |
10068 | 10722 |
10069 @item max-unrolled-insns | 10723 @item max-unrolled-insns |
10070 The maximum number of instructions that a loop may have to be unrolled. | 10724 The maximum number of instructions that a loop may have to be unrolled. |
10071 If a loop is unrolled, this parameter also determines how many times | 10725 If a loop is unrolled, this parameter also determines how many times |
10072 the loop code is unrolled. | 10726 the loop code is unrolled. |
10102 @item max-unswitch-insns | 10756 @item max-unswitch-insns |
10103 The maximum number of insns of an unswitched loop. | 10757 The maximum number of insns of an unswitched loop. |
10104 | 10758 |
10105 @item max-unswitch-level | 10759 @item max-unswitch-level |
10106 The maximum number of branches unswitched in a single loop. | 10760 The maximum number of branches unswitched in a single loop. |
10107 | |
10108 @item max-loop-headers-insns | |
10109 The maximum number of insns in loop header duplicated by the copy loop headers | |
10110 pass. | |
10111 | 10761 |
10112 @item lim-expensive | 10762 @item lim-expensive |
10113 The minimum cost of an expensive expression in the loop invariant motion. | 10763 The minimum cost of an expensive expression in the loop invariant motion. |
10114 | 10764 |
10115 @item iv-consider-all-candidates-bound | 10765 @item iv-consider-all-candidates-bound |
10131 Average number of iterations of a loop. | 10781 Average number of iterations of a loop. |
10132 | 10782 |
10133 @item dse-max-object-size | 10783 @item dse-max-object-size |
10134 Maximum size (in bytes) of objects tracked bytewise by dead store elimination. | 10784 Maximum size (in bytes) of objects tracked bytewise by dead store elimination. |
10135 Larger values may result in larger compilation times. | 10785 Larger values may result in larger compilation times. |
10786 | |
10787 @item dse-max-alias-queries-per-store | |
10788 Maximum number of queries into the alias oracle per store. | |
10789 Larger values result in larger compilation times and may result in more | |
10790 removed dead stores. | |
10136 | 10791 |
10137 @item scev-max-expr-size | 10792 @item scev-max-expr-size |
10138 Bound on size of expressions used in the scalar evolutions analyzer. | 10793 Bound on size of expressions used in the scalar evolutions analyzer. |
10139 Large expressions slow the analyzer. | 10794 Large expressions slow the analyzer. |
10140 | 10795 |
10179 loop without bounds appears artificially cold relative to the other one. | 10834 loop without bounds appears artificially cold relative to the other one. |
10180 | 10835 |
10181 @item builtin-expect-probability | 10836 @item builtin-expect-probability |
10182 Control the probability of the expression having the specified value. This | 10837 Control the probability of the expression having the specified value. This |
10183 parameter takes a percentage (i.e. 0 ... 100) as input. | 10838 parameter takes a percentage (i.e. 0 ... 100) as input. |
10184 The default probability of 90 is obtained empirically. | 10839 |
10840 @item builtin-string-cmp-inline-length | |
10841 The maximum length of a constant string for a builtin string cmp call | |
10842 eligible for inlining. | |
10185 | 10843 |
10186 @item align-threshold | 10844 @item align-threshold |
10187 | 10845 |
10188 Select fraction of the maximal frequency of executions of a basic block in | 10846 Select fraction of the maximal frequency of executions of a basic block in |
10189 a function to align the basic block. | 10847 a function to align the basic block. |
10229 needs to be more conservative (higher) in order to make tracer | 10887 needs to be more conservative (higher) in order to make tracer |
10230 effective. | 10888 effective. |
10231 | 10889 |
10232 @item stack-clash-protection-guard-size | 10890 @item stack-clash-protection-guard-size |
10233 Specify the size of the operating system provided stack guard as | 10891 Specify the size of the operating system provided stack guard as |
10234 2 raised to @var{num} bytes. The default value is 12 (4096 bytes). | 10892 2 raised to @var{num} bytes. Higher values may reduce the |
10235 Acceptable values are between 12 and 30. Higher values may reduce the | |
10236 number of explicit probes, but a value larger than the operating system | 10893 number of explicit probes, but a value larger than the operating system |
10237 provided guard will leave code vulnerable to stack clash style attacks. | 10894 provided guard will leave code vulnerable to stack clash style attacks. |
10238 | 10895 |
10239 @item stack-clash-protection-probe-interval | 10896 @item stack-clash-protection-probe-interval |
10240 Stack clash protection involves probing stack space as it is allocated. This | 10897 Stack clash protection involves probing stack space as it is allocated. This |
10241 param controls the maximum distance between probes into the stack as 2 raised | 10898 param controls the maximum distance between probes into the stack as 2 raised |
10242 to @var{num} bytes. Acceptable values are between 10 and 16 and defaults to | 10899 to @var{num} bytes. Higher values may reduce the number of explicit probes, but a value |
10243 12. Higher values may reduce the number of explicit probes, but a value | |
10244 larger than the operating system provided guard will leave code vulnerable to | 10900 larger than the operating system provided guard will leave code vulnerable to |
10245 stack clash style attacks. | 10901 stack clash style attacks. |
10246 | 10902 |
10247 @item max-cse-path-length | 10903 @item max-cse-path-length |
10248 | 10904 |
10249 The maximum number of basic blocks on path that CSE considers. | 10905 The maximum number of basic blocks on path that CSE considers. |
10250 The default is 10. | |
10251 | 10906 |
10252 @item max-cse-insns | 10907 @item max-cse-insns |
10253 The maximum number of instructions CSE processes before flushing. | 10908 The maximum number of instructions CSE processes before flushing. |
10254 The default is 1000. | |
10255 | 10909 |
10256 @item ggc-min-expand | 10910 @item ggc-min-expand |
10257 | 10911 |
10258 GCC uses a garbage collector to manage its own memory allocation. This | 10912 GCC uses a garbage collector to manage its own memory allocation. This |
10259 parameter specifies the minimum percentage by which the garbage | 10913 parameter specifies the minimum percentage by which the garbage |
10289 | 10943 |
10290 @item max-reload-search-insns | 10944 @item max-reload-search-insns |
10291 The maximum number of instruction reload should look backward for equivalent | 10945 The maximum number of instruction reload should look backward for equivalent |
10292 register. Increasing values mean more aggressive optimization, making the | 10946 register. Increasing values mean more aggressive optimization, making the |
10293 compilation time increase with probably slightly better performance. | 10947 compilation time increase with probably slightly better performance. |
10294 The default value is 100. | |
10295 | 10948 |
10296 @item max-cselib-memory-locations | 10949 @item max-cselib-memory-locations |
10297 The maximum number of memory locations cselib should take into account. | 10950 The maximum number of memory locations cselib should take into account. |
10298 Increasing values mean more aggressive optimization, making the compilation time | 10951 Increasing values mean more aggressive optimization, making the compilation time |
10299 increase with probably slightly better performance. The default value is 500. | 10952 increase with probably slightly better performance. |
10300 | 10953 |
10301 @item max-sched-ready-insns | 10954 @item max-sched-ready-insns |
10302 The maximum number of instructions ready to be issued the scheduler should | 10955 The maximum number of instructions ready to be issued the scheduler should |
10303 consider at any given time during the first scheduling pass. Increasing | 10956 consider at any given time during the first scheduling pass. Increasing |
10304 values mean more thorough searches, making the compilation time increase | 10957 values mean more thorough searches, making the compilation time increase |
10305 with probably little benefit. The default value is 100. | 10958 with probably little benefit. |
10306 | 10959 |
10307 @item max-sched-region-blocks | 10960 @item max-sched-region-blocks |
10308 The maximum number of blocks in a region to be considered for | 10961 The maximum number of blocks in a region to be considered for |
10309 interblock scheduling. The default value is 10. | 10962 interblock scheduling. |
10310 | 10963 |
10311 @item max-pipeline-region-blocks | 10964 @item max-pipeline-region-blocks |
10312 The maximum number of blocks in a region to be considered for | 10965 The maximum number of blocks in a region to be considered for |
10313 pipelining in the selective scheduler. The default value is 15. | 10966 pipelining in the selective scheduler. |
10314 | 10967 |
10315 @item max-sched-region-insns | 10968 @item max-sched-region-insns |
10316 The maximum number of insns in a region to be considered for | 10969 The maximum number of insns in a region to be considered for |
10317 interblock scheduling. The default value is 100. | 10970 interblock scheduling. |
10318 | 10971 |
10319 @item max-pipeline-region-insns | 10972 @item max-pipeline-region-insns |
10320 The maximum number of insns in a region to be considered for | 10973 The maximum number of insns in a region to be considered for |
10321 pipelining in the selective scheduler. The default value is 200. | 10974 pipelining in the selective scheduler. |
10322 | 10975 |
10323 @item min-spec-prob | 10976 @item min-spec-prob |
10324 The minimum probability (in percents) of reaching a source block | 10977 The minimum probability (in percents) of reaching a source block |
10325 for interblock speculative scheduling. The default value is 40. | 10978 for interblock speculative scheduling. |
10326 | 10979 |
10327 @item max-sched-extend-regions-iters | 10980 @item max-sched-extend-regions-iters |
10328 The maximum number of iterations through CFG to extend regions. | 10981 The maximum number of iterations through CFG to extend regions. |
10329 A value of 0 (the default) disables region extensions. | 10982 A value of 0 disables region extensions. |
10330 | 10983 |
10331 @item max-sched-insn-conflict-delay | 10984 @item max-sched-insn-conflict-delay |
10332 The maximum conflict delay for an insn to be considered for speculative motion. | 10985 The maximum conflict delay for an insn to be considered for speculative motion. |
10333 The default value is 3. | |
10334 | 10986 |
10335 @item sched-spec-prob-cutoff | 10987 @item sched-spec-prob-cutoff |
10336 The minimal probability of speculation success (in percents), so that | 10988 The minimal probability of speculation success (in percents), so that |
10337 speculative insns are scheduled. | 10989 speculative insns are scheduled. |
10338 The default value is 40. | |
10339 | 10990 |
10340 @item sched-state-edge-prob-cutoff | 10991 @item sched-state-edge-prob-cutoff |
10341 The minimum probability an edge must have for the scheduler to save its | 10992 The minimum probability an edge must have for the scheduler to save its |
10342 state across it. | 10993 state across it. |
10343 The default value is 10. | |
10344 | 10994 |
10345 @item sched-mem-true-dep-cost | 10995 @item sched-mem-true-dep-cost |
10346 Minimal distance (in CPU cycles) between store and load targeting same | 10996 Minimal distance (in CPU cycles) between store and load targeting same |
10347 memory locations. The default value is 1. | 10997 memory locations. |
10348 | 10998 |
10349 @item selsched-max-lookahead | 10999 @item selsched-max-lookahead |
10350 The maximum size of the lookahead window of selective scheduling. It is a | 11000 The maximum size of the lookahead window of selective scheduling. It is a |
10351 depth of search for available instructions. | 11001 depth of search for available instructions. |
10352 The default value is 50. | |
10353 | 11002 |
10354 @item selsched-max-sched-times | 11003 @item selsched-max-sched-times |
10355 The maximum number of times that an instruction is scheduled during | 11004 The maximum number of times that an instruction is scheduled during |
10356 selective scheduling. This is the limit on the number of iterations | 11005 selective scheduling. This is the limit on the number of iterations |
10357 through which the instruction may be pipelined. The default value is 2. | 11006 through which the instruction may be pipelined. |
10358 | 11007 |
10359 @item selsched-insns-to-rename | 11008 @item selsched-insns-to-rename |
10360 The maximum number of best instructions in the ready list that are considered | 11009 The maximum number of best instructions in the ready list that are considered |
10361 for renaming in the selective scheduler. The default value is 2. | 11010 for renaming in the selective scheduler. |
10362 | 11011 |
10363 @item sms-min-sc | 11012 @item sms-min-sc |
10364 The minimum value of stage count that swing modulo scheduler | 11013 The minimum value of stage count that swing modulo scheduler |
10365 generates. The default value is 2. | 11014 generates. |
10366 | 11015 |
10367 @item max-last-value-rtl | 11016 @item max-last-value-rtl |
10368 The maximum size measured as number of RTLs that can be recorded in an expression | 11017 The maximum size measured as number of RTLs that can be recorded in an expression |
10369 in combiner for a pseudo register as last known value of that register. The default | 11018 in combiner for a pseudo register as last known value of that register. |
10370 is 10000. | |
10371 | 11019 |
10372 @item max-combine-insns | 11020 @item max-combine-insns |
10373 The maximum number of instructions the RTL combiner tries to combine. | 11021 The maximum number of instructions the RTL combiner tries to combine. |
10374 The default value is 2 at @option{-Og} and 4 otherwise. | |
10375 | 11022 |
10376 @item integer-share-limit | 11023 @item integer-share-limit |
10377 Small integer constants can use a shared data structure, reducing the | 11024 Small integer constants can use a shared data structure, reducing the |
10378 compiler's memory usage and increasing its speed. This sets the maximum | 11025 compiler's memory usage and increasing its speed. This sets the maximum |
10379 value of a shared integer constant. The default value is 256. | 11026 value of a shared integer constant. |
10380 | 11027 |
10381 @item ssp-buffer-size | 11028 @item ssp-buffer-size |
10382 The minimum size of buffers (i.e.@: arrays) that receive stack smashing | 11029 The minimum size of buffers (i.e.@: arrays) that receive stack smashing |
10383 protection when @option{-fstack-protection} is used. | 11030 protection when @option{-fstack-protection} is used. |
10384 | 11031 |
10385 @item min-size-for-stack-sharing | 11032 @item min-size-for-stack-sharing |
10386 The minimum size of variables taking part in stack slot sharing when not | 11033 The minimum size of variables taking part in stack slot sharing when not |
10387 optimizing. The default value is 32. | 11034 optimizing. |
10388 | 11035 |
10389 @item max-jump-thread-duplication-stmts | 11036 @item max-jump-thread-duplication-stmts |
10390 Maximum number of statements allowed in a block that needs to be | 11037 Maximum number of statements allowed in a block that needs to be |
10391 duplicated when threading jumps. | 11038 duplicated when threading jumps. |
10392 | 11039 |
10393 @item max-fields-for-field-sensitive | 11040 @item max-fields-for-field-sensitive |
10394 Maximum number of fields in a structure treated in | 11041 Maximum number of fields in a structure treated in |
10395 a field sensitive manner during pointer analysis. The default is zero | 11042 a field sensitive manner during pointer analysis. |
10396 for @option{-O0} and @option{-O1}, | |
10397 and 100 for @option{-Os}, @option{-O2}, and @option{-O3}. | |
10398 | 11043 |
10399 @item prefetch-latency | 11044 @item prefetch-latency |
10400 Estimate on average number of instructions that are executed before | 11045 Estimate on average number of instructions that are executed before |
10401 prefetch finishes. The distance prefetched ahead is proportional | 11046 prefetch finishes. The distance prefetched ahead is proportional |
10402 to this constant. Increasing this number may also lead to less | 11047 to this constant. Increasing this number may also lead to less |
10412 The size of L1 cache, in kilobytes. | 11057 The size of L1 cache, in kilobytes. |
10413 | 11058 |
10414 @item l2-cache-size | 11059 @item l2-cache-size |
10415 The size of L2 cache, in kilobytes. | 11060 The size of L2 cache, in kilobytes. |
10416 | 11061 |
11062 @item prefetch-dynamic-strides | |
11063 Whether the loop array prefetch pass should issue software prefetch hints | |
11064 for strides that are non-constant. In some cases this may be | |
11065 beneficial, though the fact the stride is non-constant may make it | |
11066 hard to predict when there is clear benefit to issuing these hints. | |
11067 | |
11068 Set to 1 if the prefetch hints should be issued for non-constant | |
11069 strides. Set to 0 if prefetch hints should be issued only for strides that | |
11070 are known to be constant and below @option{prefetch-minimum-stride}. | |
11071 | |
11072 @item prefetch-minimum-stride | |
11073 Minimum constant stride, in bytes, to start using prefetch hints for. If | |
11074 the stride is less than this threshold, prefetch hints will not be issued. | |
11075 | |
11076 This setting is useful for processors that have hardware prefetchers, in | |
11077 which case there may be conflicts between the hardware prefetchers and | |
11078 the software prefetchers. If the hardware prefetchers have a maximum | |
11079 stride they can handle, it should be used here to improve the use of | |
11080 software prefetchers. | |
11081 | |
11082 A value of -1 means we don't have a threshold and therefore | |
11083 prefetch hints can be issued for any constant stride. | |
11084 | |
11085 This setting is only useful for strides that are known and constant. | |
11086 | |
11087 @item loop-interchange-max-num-stmts | |
11088 The maximum number of stmts in a loop to be interchanged. | |
11089 | |
11090 @item loop-interchange-stride-ratio | |
11091 The minimum ratio between stride of two loops for interchange to be profitable. | |
11092 | |
10417 @item min-insn-to-prefetch-ratio | 11093 @item min-insn-to-prefetch-ratio |
10418 The minimum ratio between the number of instructions and the | 11094 The minimum ratio between the number of instructions and the |
10419 number of prefetches to enable prefetching in a loop. | 11095 number of prefetches to enable prefetching in a loop. |
10420 | 11096 |
10421 @item prefetch-min-insn-to-mem-ratio | 11097 @item prefetch-min-insn-to-mem-ratio |
10422 The minimum ratio between the number of instructions and the | 11098 The minimum ratio between the number of instructions and the |
10423 number of memory references to enable prefetching in a loop. | 11099 number of memory references to enable prefetching in a loop. |
10424 | 11100 |
10425 @item use-canonical-types | 11101 @item use-canonical-types |
10426 Whether the compiler should use the ``canonical'' type system. By | 11102 Whether the compiler should use the ``canonical'' type system. |
10427 default, this should always be 1, which uses a more efficient internal | 11103 Should always be 1, which uses a more efficient internal |
10428 mechanism for comparing types in C++ and Objective-C++. However, if | 11104 mechanism for comparing types in C++ and Objective-C++. However, if |
10429 bugs in the canonical type system are causing compilation failures, | 11105 bugs in the canonical type system are causing compilation failures, |
10430 set this value to 0 to disable canonical types. | 11106 set this value to 0 to disable canonical types. |
10431 | 11107 |
10432 @item switch-conversion-max-branch-ratio | 11108 @item switch-conversion-max-branch-ratio |
10442 consuming all of the memory available on the host machine. This | 11118 consuming all of the memory available on the host machine. This |
10443 parameter sets a limit on the length of the sets that are computed, | 11119 parameter sets a limit on the length of the sets that are computed, |
10444 which prevents the runaway behavior. Setting a value of 0 for | 11120 which prevents the runaway behavior. Setting a value of 0 for |
10445 this parameter allows an unlimited set length. | 11121 this parameter allows an unlimited set length. |
10446 | 11122 |
10447 @item sccvn-max-scc-size | 11123 @item rpo-vn-max-loop-depth |
10448 Maximum size of a strongly connected component (SCC) during SCCVN | 11124 Maximum loop depth that is value-numbered optimistically. |
10449 processing. If this limit is hit, SCCVN processing for the whole | 11125 When the limit hits the innermost |
10450 function is not done and optimizations depending on it are | 11126 @var{rpo-vn-max-loop-depth} loops and the outermost loop in the |
10451 disabled. The default maximum SCC size is 10000. | 11127 loop nest are value-numbered optimistically and the remaining ones not. |
10452 | 11128 |
10453 @item sccvn-max-alias-queries-per-access | 11129 @item sccvn-max-alias-queries-per-access |
10454 Maximum number of alias-oracle queries we perform when looking for | 11130 Maximum number of alias-oracle queries we perform when looking for |
10455 redundancies for loads and stores. If this limit is hit the search | 11131 redundancies for loads and stores. If this limit is hit the search |
10456 is aborted and the load or store is not considered redundant. The | 11132 is aborted and the load or store is not considered redundant. The |
10457 number of queries is algorithmically limited to the number of | 11133 number of queries is algorithmically limited to the number of |
10458 stores on all paths from the load to the function entry. | 11134 stores on all paths from the load to the function entry. |
10459 The default maximum number of queries is 1000. | |
10460 | 11135 |
10461 @item ira-max-loops-num | 11136 @item ira-max-loops-num |
10462 IRA uses regional register allocation by default. If a function | 11137 IRA uses regional register allocation by default. If a function |
10463 contains more loops than the number given by this parameter, only at most | 11138 contains more loops than the number given by this parameter, only at most |
10464 the given number of the most frequently-executed loops form regions | 11139 the given number of the most frequently-executed loops form regions |
10465 for regional register allocation. The default value of the | 11140 for regional register allocation. |
10466 parameter is 100. | |
10467 | 11141 |
10468 @item ira-max-conflict-table-size | 11142 @item ira-max-conflict-table-size |
10469 Although IRA uses a sophisticated algorithm to compress the conflict | 11143 Although IRA uses a sophisticated algorithm to compress the conflict |
10470 table, the table can still require excessive amounts of memory for | 11144 table, the table can still require excessive amounts of memory for |
10471 huge functions. If the conflict table for a function could be more | 11145 huge functions. If the conflict table for a function could be more |
10472 than the size in MB given by this parameter, the register allocator | 11146 than the size in MB given by this parameter, the register allocator |
10473 instead uses a faster, simpler, and lower-quality | 11147 instead uses a faster, simpler, and lower-quality |
10474 algorithm that does not require building a pseudo-register conflict table. | 11148 algorithm that does not require building a pseudo-register conflict table. |
10475 The default value of the parameter is 2000. | |
10476 | 11149 |
10477 @item ira-loop-reserved-regs | 11150 @item ira-loop-reserved-regs |
10478 IRA can be used to evaluate more accurate register pressure in loops | 11151 IRA can be used to evaluate more accurate register pressure in loops |
10479 for decisions to move loop invariants (see @option{-O3}). The number | 11152 for decisions to move loop invariants (see @option{-O3}). The number |
10480 of available registers reserved for some other purposes is given | 11153 of available registers reserved for some other purposes is given |
10481 by this parameter. The default value of the parameter is 2, which is | 11154 by this parameter. Default of the parameter |
10482 the minimal number of registers needed by typical instructions. | 11155 is the best found from numerous experiments. |
10483 This value is the best found from numerous experiments. | |
10484 | 11156 |
10485 @item lra-inheritance-ebb-probability-cutoff | 11157 @item lra-inheritance-ebb-probability-cutoff |
10486 LRA tries to reuse values reloaded in registers in subsequent insns. | 11158 LRA tries to reuse values reloaded in registers in subsequent insns. |
10487 This optimization is called inheritance. EBB is used as a region to | 11159 This optimization is called inheritance. EBB is used as a region to |
10488 do this optimization. The parameter defines a minimal fall-through | 11160 do this optimization. The parameter defines a minimal fall-through |
10489 edge probability in percentage used to add BB to inheritance EBB in | 11161 edge probability in percentage used to add BB to inheritance EBB in |
10490 LRA. The default value of the parameter is 40. The value was chosen | 11162 LRA. The default value was chosen |
10491 from numerous runs of SPEC2000 on x86-64. | 11163 from numerous runs of SPEC2000 on x86-64. |
10492 | 11164 |
10493 @item loop-invariant-max-bbs-in-loop | 11165 @item loop-invariant-max-bbs-in-loop |
10494 Loop invariant motion can be very expensive, both in compilation time and | 11166 Loop invariant motion can be very expensive, both in compilation time and |
10495 in amount of needed compile-time memory, with very large loops. Loops | 11167 in amount of needed compile-time memory, with very large loops. Loops |
10496 with more basic blocks than this parameter won't have loop invariant | 11168 with more basic blocks than this parameter won't have loop invariant |
10497 motion optimization performed on them. The default value of the | 11169 motion optimization performed on them. |
10498 parameter is 1000 for @option{-O1} and 10000 for @option{-O2} and above. | |
10499 | 11170 |
10500 @item loop-max-datarefs-for-datadeps | 11171 @item loop-max-datarefs-for-datadeps |
10501 Building data dependencies is expensive for very large loops. This | 11172 Building data dependencies is expensive for very large loops. This |
10502 parameter limits the number of data references in loops that are | 11173 parameter limits the number of data references in loops that are |
10503 considered for data dependence analysis. These large loops are no | 11174 considered for data dependence analysis. These large loops are no |
10504 handled by the optimizations using loop data dependencies. | 11175 handled by the optimizations using loop data dependencies. |
10505 The default value is 1000. | |
10506 | 11176 |
10507 @item max-vartrack-size | 11177 @item max-vartrack-size |
10508 Sets a maximum number of hash table slots to use during variable | 11178 Sets a maximum number of hash table slots to use during variable |
10509 tracking dataflow analysis of any function. If this limit is exceeded | 11179 tracking dataflow analysis of any function. If this limit is exceeded |
10510 with variable tracking at assignments enabled, analysis for that | 11180 with variable tracking at assignments enabled, analysis for that |
10518 variable names or debug temporaries to value expressions. This trades | 11188 variable names or debug temporaries to value expressions. This trades |
10519 compilation time for more complete debug information. If this is set too | 11189 compilation time for more complete debug information. If this is set too |
10520 low, value expressions that are available and could be represented in | 11190 low, value expressions that are available and could be represented in |
10521 debug information may end up not being used; setting this higher may | 11191 debug information may end up not being used; setting this higher may |
10522 enable the compiler to find more complex debug expressions, but compile | 11192 enable the compiler to find more complex debug expressions, but compile |
10523 time and memory use may grow. The default is 12. | 11193 time and memory use may grow. |
11194 | |
11195 @item max-debug-marker-count | |
11196 Sets a threshold on the number of debug markers (e.g. begin stmt | |
11197 markers) to avoid complexity explosion at inlining or expanding to RTL. | |
11198 If a function has more such gimple stmts than the set limit, such stmts | |
11199 will be dropped from the inlined copy of a function, and from its RTL | |
11200 expansion. | |
10524 | 11201 |
10525 @item min-nondebug-insn-uid | 11202 @item min-nondebug-insn-uid |
10526 Use uids starting at this parameter for nondebug insns. The range below | 11203 Use uids starting at this parameter for nondebug insns. The range below |
10527 the parameter is reserved exclusively for debug insns created by | 11204 the parameter is reserved exclusively for debug insns created by |
10528 @option{-fvar-tracking-assignments}, but debug insns may get | 11205 @option{-fvar-tracking-assignments}, but debug insns may get |
10533 parameters only when their cumulative size is less or equal to | 11210 parameters only when their cumulative size is less or equal to |
10534 @option{ipa-sra-ptr-growth-factor} times the size of the original | 11211 @option{ipa-sra-ptr-growth-factor} times the size of the original |
10535 pointer parameter. | 11212 pointer parameter. |
10536 | 11213 |
10537 @item sra-max-scalarization-size-Ospeed | 11214 @item sra-max-scalarization-size-Ospeed |
10538 @item sra-max-scalarization-size-Osize | 11215 @itemx sra-max-scalarization-size-Osize |
10539 The two Scalar Reduction of Aggregates passes (SRA and IPA-SRA) aim to | 11216 The two Scalar Reduction of Aggregates passes (SRA and IPA-SRA) aim to |
10540 replace scalar parts of aggregates with uses of independent scalar | 11217 replace scalar parts of aggregates with uses of independent scalar |
10541 variables. These parameters control the maximum size, in storage units, | 11218 variables. These parameters control the maximum size, in storage units, |
10542 of aggregate which is considered for replacement when compiling for | 11219 of aggregate which is considered for replacement when compiling for |
10543 speed | 11220 speed |
10551 sequence pairs. This option only applies when using | 11228 sequence pairs. This option only applies when using |
10552 @option{-fgnu-tm}. | 11229 @option{-fgnu-tm}. |
10553 | 11230 |
10554 @item graphite-max-nb-scop-params | 11231 @item graphite-max-nb-scop-params |
10555 To avoid exponential effects in the Graphite loop transforms, the | 11232 To avoid exponential effects in the Graphite loop transforms, the |
10556 number of parameters in a Static Control Part (SCoP) is bounded. The | 11233 number of parameters in a Static Control Part (SCoP) is bounded. |
10557 default value is 10 parameters, a value of zero can be used to lift | 11234 A value of zero can be used to lift |
10558 the bound. A variable whose value is unknown at compilation time and | 11235 the bound. A variable whose value is unknown at compilation time and |
10559 defined outside a SCoP is a parameter of the SCoP. | 11236 defined outside a SCoP is a parameter of the SCoP. |
10560 | 11237 |
10561 @item loop-block-tile-size | 11238 @item loop-block-tile-size |
10562 Loop blocking or strip mining transforms, enabled with | 11239 Loop blocking or strip mining transforms, enabled with |
10563 @option{-floop-block} or @option{-floop-strip-mine}, strip mine each | 11240 @option{-floop-block} or @option{-floop-strip-mine}, strip mine each |
10564 loop in the loop nest by a given number of iterations. The strip | 11241 loop in the loop nest by a given number of iterations. The strip |
10565 length can be changed using the @option{loop-block-tile-size} | 11242 length can be changed using the @option{loop-block-tile-size} |
10566 parameter. The default value is 51 iterations. | 11243 parameter. |
10567 | |
10568 @item loop-unroll-jam-size | |
10569 Specify the unroll factor for the @option{-floop-unroll-and-jam} option. The | |
10570 default value is 4. | |
10571 | |
10572 @item loop-unroll-jam-depth | |
10573 Specify the dimension to be unrolled (counting from the most inner loop) | |
10574 for the @option{-floop-unroll-and-jam}. The default value is 2. | |
10575 | 11244 |
10576 @item ipa-cp-value-list-size | 11245 @item ipa-cp-value-list-size |
10577 IPA-CP attempts to track all possible values and types passed to a function's | 11246 IPA-CP attempts to track all possible values and types passed to a function's |
10578 parameter in order to propagate them and perform devirtualization. | 11247 parameter in order to propagate them and perform devirtualization. |
10579 @option{ipa-cp-value-list-size} is the maximum number of values and types it | 11248 @option{ipa-cp-value-list-size} is the maximum number of values and types it |
10589 are evaluated for cloning. | 11258 are evaluated for cloning. |
10590 | 11259 |
10591 @item ipa-cp-single-call-penalty | 11260 @item ipa-cp-single-call-penalty |
10592 Percentage penalty functions containing a single call to another | 11261 Percentage penalty functions containing a single call to another |
10593 function will receive when they are evaluated for cloning. | 11262 function will receive when they are evaluated for cloning. |
10594 | |
10595 | 11263 |
10596 @item ipa-max-agg-items | 11264 @item ipa-max-agg-items |
10597 IPA-CP is also capable to propagate a number of scalar values passed | 11265 IPA-CP is also capable to propagate a number of scalar values passed |
10598 in an aggregate. @option{ipa-max-agg-items} controls the maximum | 11266 in an aggregate. @option{ipa-max-agg-items} controls the maximum |
10599 number of such values per one parameter. | 11267 number of such values per one parameter. |
10618 @option{ipa-max-aa-steps} statements modifying memory. | 11286 @option{ipa-max-aa-steps} statements modifying memory. |
10619 | 11287 |
10620 @item lto-partitions | 11288 @item lto-partitions |
10621 Specify desired number of partitions produced during WHOPR compilation. | 11289 Specify desired number of partitions produced during WHOPR compilation. |
10622 The number of partitions should exceed the number of CPUs used for compilation. | 11290 The number of partitions should exceed the number of CPUs used for compilation. |
10623 The default value is 32. | |
10624 | 11291 |
10625 @item lto-min-partition | 11292 @item lto-min-partition |
10626 Size of minimal partition for WHOPR (in estimated instructions). | 11293 Size of minimal partition for WHOPR (in estimated instructions). |
10627 This prevents expenses of splitting very small programs into too many | 11294 This prevents expenses of splitting very small programs into too many |
10628 partitions. | 11295 partitions. |
10632 to provide an upper bound for individual size of partition. | 11299 to provide an upper bound for individual size of partition. |
10633 Meant to be used only with balanced partitioning. | 11300 Meant to be used only with balanced partitioning. |
10634 | 11301 |
10635 @item cxx-max-namespaces-for-diagnostic-help | 11302 @item cxx-max-namespaces-for-diagnostic-help |
10636 The maximum number of namespaces to consult for suggestions when C++ | 11303 The maximum number of namespaces to consult for suggestions when C++ |
10637 name lookup fails for an identifier. The default is 1000. | 11304 name lookup fails for an identifier. |
10638 | 11305 |
10639 @item sink-frequency-threshold | 11306 @item sink-frequency-threshold |
10640 The maximum relative execution frequency (in percents) of the target block | 11307 The maximum relative execution frequency (in percents) of the target block |
10641 relative to a statement's original block to allow statement sinking of a | 11308 relative to a statement's original block to allow statement sinking of a |
10642 statement. Larger numbers result in more aggressive statement sinking. | 11309 statement. Larger numbers result in more aggressive statement sinking. |
10643 The default value is 75. A small positive adjustment is applied for | 11310 A small positive adjustment is applied for |
10644 statements with memory operands as those are even more profitable so sink. | 11311 statements with memory operands as those are even more profitable so sink. |
10645 | 11312 |
10646 @item max-stores-to-sink | 11313 @item max-stores-to-sink |
10647 The maximum number of conditional store pairs that can be sunk. Set to 0 | 11314 The maximum number of conditional store pairs that can be sunk. Set to 0 |
10648 if either vectorization (@option{-ftree-vectorize}) or if-conversion | 11315 if either vectorization (@option{-ftree-vectorize}) or if-conversion |
10649 (@option{-ftree-loop-if-convert}) is disabled. The default is 2. | 11316 (@option{-ftree-loop-if-convert}) is disabled. |
10650 | 11317 |
10651 @item allow-store-data-races | 11318 @item allow-store-data-races |
10652 Allow optimizers to introduce new data races on stores. | 11319 Allow optimizers to introduce new data races on stores. |
10653 Set to 1 to allow, otherwise to 0. This option is enabled by default | 11320 Set to 1 to allow, otherwise to 0. |
10654 at optimization level @option{-Ofast}. | |
10655 | 11321 |
10656 @item case-values-threshold | 11322 @item case-values-threshold |
10657 The smallest number of different values for which it is best to use a | 11323 The smallest number of different values for which it is best to use a |
10658 jump-table instead of a tree of conditional branches. If the value is | 11324 jump-table instead of a tree of conditional branches. If the value is |
10659 0, use the default for the machine. The default is 0. | 11325 0, use the default for the machine. |
10660 | 11326 |
10661 @item tree-reassoc-width | 11327 @item tree-reassoc-width |
10662 Set the maximum number of instructions executed in parallel in | 11328 Set the maximum number of instructions executed in parallel in |
10663 reassociated tree. This parameter overrides target dependent | 11329 reassociated tree. This parameter overrides target dependent |
10664 heuristics used by default if has non zero value. | 11330 heuristics used by default if has non zero value. |
10724 @option{--param asan-instrumentation-with-call-threshold=0}. | 11390 @option{--param asan-instrumentation-with-call-threshold=0}. |
10725 | 11391 |
10726 @item use-after-scope-direct-emission-threshold | 11392 @item use-after-scope-direct-emission-threshold |
10727 If the size of a local variable in bytes is smaller or equal to this | 11393 If the size of a local variable in bytes is smaller or equal to this |
10728 number, directly poison (or unpoison) shadow memory instead of using | 11394 number, directly poison (or unpoison) shadow memory instead of using |
10729 run-time callbacks. The default value is 256. | 11395 run-time callbacks. |
10730 | |
10731 @item chkp-max-ctor-size | |
10732 Static constructors generated by Pointer Bounds Checker may become very | |
10733 large and significantly increase compile time at optimization level | |
10734 @option{-O1} and higher. This parameter is a maximum number of statements | |
10735 in a single generated constructor. Default value is 5000. | |
10736 | 11396 |
10737 @item max-fsm-thread-path-insns | 11397 @item max-fsm-thread-path-insns |
10738 Maximum number of instructions to copy when duplicating blocks on a | 11398 Maximum number of instructions to copy when duplicating blocks on a |
10739 finite state automaton jump thread path. The default is 100. | 11399 finite state automaton jump thread path. |
10740 | 11400 |
10741 @item max-fsm-thread-length | 11401 @item max-fsm-thread-length |
10742 Maximum number of basic blocks on a finite state automaton jump thread | 11402 Maximum number of basic blocks on a finite state automaton jump thread |
10743 path. The default is 10. | 11403 path. |
10744 | 11404 |
10745 @item max-fsm-thread-paths | 11405 @item max-fsm-thread-paths |
10746 Maximum number of new jump thread paths to create for a finite state | 11406 Maximum number of new jump thread paths to create for a finite state |
10747 automaton. The default is 50. | 11407 automaton. |
10748 | 11408 |
10749 @item parloops-chunk-size | 11409 @item parloops-chunk-size |
10750 Chunk size of omp schedule for loops parallelized by parloops. The default | 11410 Chunk size of omp schedule for loops parallelized by parloops. |
10751 is 0. | |
10752 | 11411 |
10753 @item parloops-schedule | 11412 @item parloops-schedule |
10754 Schedule type of omp schedule for loops parallelized by parloops (static, | 11413 Schedule type of omp schedule for loops parallelized by parloops (static, |
10755 dynamic, guided, auto, runtime). The default is static. | 11414 dynamic, guided, auto, runtime). |
11415 | |
11416 @item parloops-min-per-thread | |
11417 The minimum number of iterations per thread of an innermost parallelized | |
11418 loop for which the parallelized variant is preferred over the single threaded | |
11419 one. Note that for a parallelized loop nest the | |
11420 minimum number of iterations of the outermost loop per thread is two. | |
10756 | 11421 |
10757 @item max-ssa-name-query-depth | 11422 @item max-ssa-name-query-depth |
10758 Maximum depth of recursion when querying properties of SSA names in things | 11423 Maximum depth of recursion when querying properties of SSA names in things |
10759 like fold routines. One level of recursion corresponds to following a | 11424 like fold routines. One level of recursion corresponds to following a |
10760 use-def chain. | 11425 use-def chain. |
10770 specifying the dynamic type of an object that invokes a virtual call | 11435 specifying the dynamic type of an object that invokes a virtual call |
10771 we may be able to devirtualize speculatively. | 11436 we may be able to devirtualize speculatively. |
10772 | 11437 |
10773 @item max-vrp-switch-assertions | 11438 @item max-vrp-switch-assertions |
10774 The maximum number of assertions to add along the default edge of a switch | 11439 The maximum number of assertions to add along the default edge of a switch |
10775 statement during VRP. The default is 10. | 11440 statement during VRP. |
11441 | |
11442 @item unroll-jam-min-percent | |
11443 The minimum percentage of memory references that must be optimized | |
11444 away for the unroll-and-jam transformation to be considered profitable. | |
11445 | |
11446 @item unroll-jam-max-unroll | |
11447 The maximum number of times the outer loop should be unrolled by | |
11448 the unroll-and-jam transformation. | |
11449 | |
11450 @item max-rtl-if-conversion-unpredictable-cost | |
11451 Maximum permissible cost for the sequence that would be generated | |
11452 by the RTL if-conversion pass for a branch that is considered unpredictable. | |
11453 | |
11454 @item max-variable-expansions-in-unroller | |
11455 If @option{-fvariable-expansion-in-unroller} is used, the maximum number | |
11456 of times that an individual variable will be expanded during loop unrolling. | |
11457 | |
11458 @item tracer-min-branch-probability-feedback | |
11459 Stop forward growth if the probability of best edge is less than | |
11460 this threshold (in percent). Used when profile feedback is available. | |
11461 | |
11462 @item partial-inlining-entry-probability | |
11463 Maximum probability of the entry BB of split region | |
11464 (in percent relative to entry BB of the function) | |
11465 to make partial inlining happen. | |
11466 | |
11467 @item max-tracked-strlens | |
11468 Maximum number of strings for which strlen optimization pass will | |
11469 track string lengths. | |
11470 | |
11471 @item gcse-after-reload-partial-fraction | |
11472 The threshold ratio for performing partial redundancy | |
11473 elimination after reload. | |
11474 | |
11475 @item gcse-after-reload-critical-fraction | |
11476 The threshold ratio of critical edges execution count that | |
11477 permit performing redundancy elimination after reload. | |
11478 | |
11479 @item max-loop-header-insns | |
11480 The maximum number of insns in loop header duplicated | |
11481 by the copy loop headers pass. | |
11482 | |
11483 @item vect-epilogues-nomask | |
11484 Enable loop epilogue vectorization using smaller vector size. | |
11485 | |
11486 @item slp-max-insns-in-bb | |
11487 Maximum number of instructions in basic block to be | |
11488 considered for SLP vectorization. | |
11489 | |
11490 @item avoid-fma-max-bits | |
11491 Maximum number of bits for which we avoid creating FMAs. | |
11492 | |
11493 @item sms-loop-average-count-threshold | |
11494 A threshold on the average loop count considered by the swing modulo scheduler. | |
11495 | |
11496 @item sms-dfa-history | |
11497 The number of cycles the swing modulo scheduler considers when checking | |
11498 conflicts using DFA. | |
11499 | |
11500 @item hot-bb-count-fraction | |
11501 Select fraction of the maximal count of repetitions of basic block | |
11502 in program given basic block needs | |
11503 to have to be considered hot (used in non-LTO mode) | |
11504 | |
11505 @item max-inline-insns-recursive-auto | |
11506 The maximum number of instructions non-inline function | |
11507 can grow to via recursive inlining. | |
11508 | |
11509 @item graphite-allow-codegen-errors | |
11510 Whether codegen errors should be ICEs when @option{-fchecking}. | |
11511 | |
11512 @item sms-max-ii-factor | |
11513 A factor for tuning the upper bound that swing modulo scheduler | |
11514 uses for scheduling a loop. | |
11515 | |
11516 @item lra-max-considered-reload-pseudos | |
11517 The max number of reload pseudos which are considered during | |
11518 spilling a non-reload pseudo. | |
11519 | |
11520 @item max-pow-sqrt-depth | |
11521 Maximum depth of sqrt chains to use when synthesizing exponentiation | |
11522 by a real constant. | |
11523 | |
11524 @item max-dse-active-local-stores | |
11525 Maximum number of active local stores in RTL dead store elimination. | |
11526 | |
11527 @item asan-instrument-allocas | |
11528 Enable asan allocas/VLAs protection. | |
11529 | |
11530 @item max-iterations-computation-cost | |
11531 Bound on the cost of an expression to compute the number of iterations. | |
11532 | |
11533 @item max-isl-operations | |
11534 Maximum number of isl operations, 0 means unlimited. | |
11535 | |
11536 @item graphite-max-arrays-per-scop | |
11537 Maximum number of arrays per scop. | |
11538 | |
11539 @item max-vartrack-reverse-op-size | |
11540 Max. size of loc list for which reverse ops should be added. | |
11541 | |
11542 @item unlikely-bb-count-fraction | |
11543 The minimum fraction of profile runs a given basic block execution count | |
11544 must be not to be considered unlikely. | |
11545 | |
11546 @item tracer-dynamic-coverage-feedback | |
11547 The percentage of function, weighted by execution frequency, | |
11548 that must be covered by trace formation. | |
11549 Used when profile feedback is available. | |
11550 | |
11551 @item max-inline-recursive-depth-auto | |
11552 The maximum depth of recursive inlining for non-inline functions. | |
11553 | |
11554 @item fsm-scale-path-stmts | |
11555 Scale factor to apply to the number of statements in a threading path | |
11556 when comparing to the number of (scaled) blocks. | |
11557 | |
11558 @item fsm-maximum-phi-arguments | |
11559 Maximum number of arguments a PHI may have before the FSM threader | |
11560 will not try to thread through its block. | |
11561 | |
11562 @item uninit-control-dep-attempts | |
11563 Maximum number of nested calls to search for control dependencies | |
11564 during uninitialized variable analysis. | |
11565 | |
11566 @item indir-call-topn-profile | |
11567 Track top N target addresses in indirect-call profile. | |
11568 | |
11569 @item max-once-peeled-insns | |
11570 The maximum number of insns of a peeled loop that rolls only once. | |
11571 | |
11572 @item sra-max-scalarization-size-Osize | |
11573 Maximum size, in storage units, of an aggregate | |
11574 which should be considered for scalarization when compiling for size. | |
11575 | |
11576 @item fsm-scale-path-blocks | |
11577 Scale factor to apply to the number of blocks in a threading path | |
11578 when comparing to the number of (scaled) statements. | |
11579 | |
11580 @item sched-autopref-queue-depth | |
11581 Hardware autoprefetcher scheduler model control flag. | |
11582 Number of lookahead cycles the model looks into; at ' | |
11583 ' only enable instruction sorting heuristic. | |
11584 | |
11585 | |
10776 @end table | 11586 @end table |
10777 @end table | 11587 @end table |
10778 | 11588 |
10779 @node Instrumentation Options | 11589 @node Instrumentation Options |
10780 @section Program Instrumentation Options | 11590 @section Program Instrumentation Options |
10866 | 11676 |
10867 @item | 11677 @item |
10868 Run the program on a representative workload to generate the arc profile | 11678 Run the program on a representative workload to generate the arc profile |
10869 information. This may be repeated any number of times. You can run | 11679 information. This may be repeated any number of times. You can run |
10870 concurrent instances of your program, and provided that the file system | 11680 concurrent instances of your program, and provided that the file system |
10871 supports locking, the data files will be correctly updated. Also | 11681 supports locking, the data files will be correctly updated. Unless |
10872 @code{fork} calls are detected and correctly handled (double counting | 11682 a strict ISO C dialect option is in effect, @code{fork} calls are |
10873 will not happen). | 11683 detected and correctly handled without double counting. |
10874 | 11684 |
10875 @item | 11685 @item |
10876 For profile-directed optimizations, compile the source files again with | 11686 For profile-directed optimizations, compile the source files again with |
10877 the same optimization and code generation options plus | 11687 the same optimization and code generation options plus |
10878 @option{-fbranch-probabilities} (@pxref{Optimize Options,,Options that | 11688 @option{-fbranch-probabilities} (@pxref{Optimize Options,,Options that |
10919 @option{-fprofile-generate}, @option{-ftest-coverage}, @option{-fprofile-arcs} | 11729 @option{-fprofile-generate}, @option{-ftest-coverage}, @option{-fprofile-arcs} |
10920 and used by @option{-fprofile-use} and @option{-fbranch-probabilities} | 11730 and used by @option{-fprofile-use} and @option{-fbranch-probabilities} |
10921 and its related options. Both absolute and relative paths can be used. | 11731 and its related options. Both absolute and relative paths can be used. |
10922 By default, GCC uses the current directory as @var{path}, thus the | 11732 By default, GCC uses the current directory as @var{path}, thus the |
10923 profile data file appears in the same directory as the object file. | 11733 profile data file appears in the same directory as the object file. |
11734 In order to prevent the file name clashing, if the object file name is | |
11735 not an absolute path, we mangle the absolute path of the | |
11736 @file{@var{sourcename}.gcda} file and use it as the file name of a | |
11737 @file{.gcda} file. | |
11738 | |
11739 When an executable is run in a massive parallel environment, it is recommended | |
11740 to save profile to different folders. That can be done with variables | |
11741 in @var{path} that are exported during run-time: | |
11742 | |
11743 @table @gcctabopt | |
11744 | |
11745 @item %p | |
11746 process ID. | |
11747 | |
11748 @item %q@{VAR@} | |
11749 value of environment variable @var{VAR} | |
11750 | |
11751 @end table | |
10924 | 11752 |
10925 @item -fprofile-generate | 11753 @item -fprofile-generate |
10926 @itemx -fprofile-generate=@var{path} | 11754 @itemx -fprofile-generate=@var{path} |
10927 @opindex fprofile-generate | 11755 @opindex fprofile-generate |
10928 | 11756 |
10966 more details. The run-time behavior can be influenced using the | 11794 more details. The run-time behavior can be influenced using the |
10967 @env{ASAN_OPTIONS} environment variable. When set to @code{help=1}, | 11795 @env{ASAN_OPTIONS} environment variable. When set to @code{help=1}, |
10968 the available options are shown at startup of the instrumented program. See | 11796 the available options are shown at startup of the instrumented program. See |
10969 @url{https://github.com/google/sanitizers/wiki/AddressSanitizerFlags#run-time-flags} | 11797 @url{https://github.com/google/sanitizers/wiki/AddressSanitizerFlags#run-time-flags} |
10970 for a list of supported options. | 11798 for a list of supported options. |
10971 The option cannot be combined with @option{-fsanitize=thread} | 11799 The option cannot be combined with @option{-fsanitize=thread}. |
10972 and/or @option{-fcheck-pointer-bounds}. | |
10973 | 11800 |
10974 @item -fsanitize=kernel-address | 11801 @item -fsanitize=kernel-address |
10975 @opindex fsanitize=kernel-address | 11802 @opindex fsanitize=kernel-address |
10976 Enable AddressSanitizer for Linux kernel. | 11803 Enable AddressSanitizer for Linux kernel. |
10977 See @uref{https://github.com/google/kasan/wiki} for more details. | 11804 See @uref{https://github.com/google/kasan/wiki} for more details. |
10978 The option cannot be combined with @option{-fcheck-pointer-bounds}. | 11805 |
11806 @item -fsanitize=pointer-compare | |
11807 @opindex fsanitize=pointer-compare | |
11808 Instrument comparison operation (<, <=, >, >=) with pointer operands. | |
11809 The option must be combined with either @option{-fsanitize=kernel-address} or | |
11810 @option{-fsanitize=address} | |
11811 The option cannot be combined with @option{-fsanitize=thread}. | |
11812 Note: By default the check is disabled at run time. To enable it, | |
11813 add @code{detect_invalid_pointer_pairs=2} to the environment variable | |
11814 @env{ASAN_OPTIONS}. Using @code{detect_invalid_pointer_pairs=1} detects | |
11815 invalid operation only when both pointers are non-null. | |
11816 | |
11817 @item -fsanitize=pointer-subtract | |
11818 @opindex fsanitize=pointer-subtract | |
11819 Instrument subtraction with pointer operands. | |
11820 The option must be combined with either @option{-fsanitize=kernel-address} or | |
11821 @option{-fsanitize=address} | |
11822 The option cannot be combined with @option{-fsanitize=thread}. | |
11823 Note: By default the check is disabled at run time. To enable it, | |
11824 add @code{detect_invalid_pointer_pairs=2} to the environment variable | |
11825 @env{ASAN_OPTIONS}. Using @code{detect_invalid_pointer_pairs=1} detects | |
11826 invalid operation only when both pointers are non-null. | |
10979 | 11827 |
10980 @item -fsanitize=thread | 11828 @item -fsanitize=thread |
10981 @opindex fsanitize=thread | 11829 @opindex fsanitize=thread |
10982 Enable ThreadSanitizer, a fast data race detector. | 11830 Enable ThreadSanitizer, a fast data race detector. |
10983 Memory access instructions are instrumented to detect | 11831 Memory access instructions are instrumented to detect |
10985 details. The run-time behavior can be influenced using the @env{TSAN_OPTIONS} | 11833 details. The run-time behavior can be influenced using the @env{TSAN_OPTIONS} |
10986 environment variable; see | 11834 environment variable; see |
10987 @url{https://github.com/google/sanitizers/wiki/ThreadSanitizerFlags} for a list of | 11835 @url{https://github.com/google/sanitizers/wiki/ThreadSanitizerFlags} for a list of |
10988 supported options. | 11836 supported options. |
10989 The option cannot be combined with @option{-fsanitize=address}, | 11837 The option cannot be combined with @option{-fsanitize=address}, |
10990 @option{-fsanitize=leak} and/or @option{-fcheck-pointer-bounds}. | 11838 @option{-fsanitize=leak}. |
10991 | 11839 |
10992 Note that sanitized atomic builtins cannot throw exceptions when | 11840 Note that sanitized atomic builtins cannot throw exceptions when |
10993 operating on invalid memory addresses with non-call exceptions | 11841 operating on invalid memory addresses with non-call exceptions |
10994 (@option{-fnon-call-exceptions}). | 11842 (@option{-fnon-call-exceptions}). |
10995 | 11843 |
11078 @item -fsanitize=bounds | 11926 @item -fsanitize=bounds |
11079 @opindex fsanitize=bounds | 11927 @opindex fsanitize=bounds |
11080 This option enables instrumentation of array bounds. Various out of bounds | 11928 This option enables instrumentation of array bounds. Various out of bounds |
11081 accesses are detected. Flexible array members, flexible array member-like | 11929 accesses are detected. Flexible array members, flexible array member-like |
11082 arrays, and initializers of variables with static storage are not instrumented. | 11930 arrays, and initializers of variables with static storage are not instrumented. |
11083 The option cannot be combined with @option{-fcheck-pointer-bounds}. | |
11084 | 11931 |
11085 @item -fsanitize=bounds-strict | 11932 @item -fsanitize=bounds-strict |
11086 @opindex fsanitize=bounds-strict | 11933 @opindex fsanitize=bounds-strict |
11087 This option enables strict instrumentation of array bounds. Most out of bounds | 11934 This option enables strict instrumentation of array bounds. Most out of bounds |
11088 accesses are detected, including flexible array members and flexible array | 11935 accesses are detected, including flexible array members and flexible array |
11089 member-like arrays. Initializers of variables with static storage are not | 11936 member-like arrays. Initializers of variables with static storage are not |
11090 instrumented. The option cannot be combined | 11937 instrumented. |
11091 with @option{-fcheck-pointer-bounds}. | |
11092 | 11938 |
11093 @item -fsanitize=alignment | 11939 @item -fsanitize=alignment |
11094 @opindex fsanitize=alignment | 11940 @opindex fsanitize=alignment |
11095 | 11941 |
11096 This option enables checking of alignment of pointers when they are | 11942 This option enables checking of alignment of pointers when they are |
11260 @code{__sanitizer_cov_trace_const_cmp8} for integral comparison with one | 12106 @code{__sanitizer_cov_trace_const_cmp8} for integral comparison with one |
11261 operand constant, @code{__sanitizer_cov_trace_cmpf} or | 12107 operand constant, @code{__sanitizer_cov_trace_cmpf} or |
11262 @code{__sanitizer_cov_trace_cmpd} for float or double comparisons and | 12108 @code{__sanitizer_cov_trace_cmpd} for float or double comparisons and |
11263 @code{__sanitizer_cov_trace_switch} for switch statements. | 12109 @code{__sanitizer_cov_trace_switch} for switch statements. |
11264 | 12110 |
11265 @item -fbounds-check | 12111 @item -fcf-protection=@r{[}full@r{|}branch@r{|}return@r{|}none@r{]} |
11266 @opindex fbounds-check | |
11267 For front ends that support it, generate additional code to check that | |
11268 indices used to access arrays are within the declared range. This is | |
11269 currently only supported by the Fortran front end, where this option | |
11270 defaults to false. | |
11271 | |
11272 @item -fcheck-pointer-bounds | |
11273 @opindex fcheck-pointer-bounds | |
11274 @opindex fno-check-pointer-bounds | |
11275 @cindex Pointer Bounds Checker options | |
11276 Enable Pointer Bounds Checker instrumentation. Each memory reference | |
11277 is instrumented with checks of the pointer used for memory access against | |
11278 bounds associated with that pointer. | |
11279 | |
11280 Currently there | |
11281 is only an implementation for Intel MPX available, thus x86 GNU/Linux target | |
11282 and @option{-mmpx} are required to enable this feature. | |
11283 MPX-based instrumentation requires | |
11284 a runtime library to enable MPX in hardware and handle bounds | |
11285 violation signals. By default when @option{-fcheck-pointer-bounds} | |
11286 and @option{-mmpx} options are used to link a program, the GCC driver | |
11287 links against the @file{libmpx} and @file{libmpxwrappers} libraries. | |
11288 Bounds checking on calls to dynamic libraries requires a linker | |
11289 with @option{-z bndplt} support; if GCC was configured with a linker | |
11290 without support for this option (including the Gold linker and older | |
11291 versions of ld), a warning is given if you link with @option{-mmpx} | |
11292 without also specifying @option{-static}, since the overall effectiveness | |
11293 of the bounds checking protection is reduced. | |
11294 See also @option{-static-libmpxwrappers}. | |
11295 | |
11296 MPX-based instrumentation | |
11297 may be used for debugging and also may be included in production code | |
11298 to increase program security. Depending on usage, you may | |
11299 have different requirements for the runtime library. The current version | |
11300 of the MPX runtime library is more oriented for use as a debugging | |
11301 tool. MPX runtime library usage implies @option{-lpthread}. See | |
11302 also @option{-static-libmpx}. The runtime library behavior can be | |
11303 influenced using various @env{CHKP_RT_*} environment variables. See | |
11304 @uref{https://gcc.gnu.org/wiki/Intel%20MPX%20support%20in%20the%20GCC%20compiler} | |
11305 for more details. | |
11306 | |
11307 Generated instrumentation may be controlled by various | |
11308 @option{-fchkp-*} options and by the @code{bnd_variable_size} | |
11309 structure field attribute (@pxref{Type Attributes}) and | |
11310 @code{bnd_legacy}, and @code{bnd_instrument} function attributes | |
11311 (@pxref{Function Attributes}). GCC also provides a number of built-in | |
11312 functions for controlling the Pointer Bounds Checker. @xref{Pointer | |
11313 Bounds Checker builtins}, for more information. | |
11314 | |
11315 @item -fchkp-check-incomplete-type | |
11316 @opindex fchkp-check-incomplete-type | |
11317 @opindex fno-chkp-check-incomplete-type | |
11318 Generate pointer bounds checks for variables with incomplete type. | |
11319 Enabled by default. | |
11320 | |
11321 @item -fchkp-narrow-bounds | |
11322 @opindex fchkp-narrow-bounds | |
11323 @opindex fno-chkp-narrow-bounds | |
11324 Controls bounds used by Pointer Bounds Checker for pointers to object | |
11325 fields. If narrowing is enabled then field bounds are used. Otherwise | |
11326 object bounds are used. See also @option{-fchkp-narrow-to-innermost-array} | |
11327 and @option{-fchkp-first-field-has-own-bounds}. Enabled by default. | |
11328 | |
11329 @item -fchkp-first-field-has-own-bounds | |
11330 @opindex fchkp-first-field-has-own-bounds | |
11331 @opindex fno-chkp-first-field-has-own-bounds | |
11332 Forces Pointer Bounds Checker to use narrowed bounds for the address of the | |
11333 first field in the structure. By default a pointer to the first field has | |
11334 the same bounds as a pointer to the whole structure. | |
11335 | |
11336 @item -fchkp-flexible-struct-trailing-arrays | |
11337 @opindex fchkp-flexible-struct-trailing-arrays | |
11338 @opindex fno-chkp-flexible-struct-trailing-arrays | |
11339 Forces Pointer Bounds Checker to treat all trailing arrays in structures as | |
11340 possibly flexible. By default only array fields with zero length or that are | |
11341 marked with attribute bnd_variable_size are treated as flexible. | |
11342 | |
11343 @item -fchkp-narrow-to-innermost-array | |
11344 @opindex fchkp-narrow-to-innermost-array | |
11345 @opindex fno-chkp-narrow-to-innermost-array | |
11346 Forces Pointer Bounds Checker to use bounds of the innermost arrays in | |
11347 case of nested static array access. By default this option is disabled and | |
11348 bounds of the outermost array are used. | |
11349 | |
11350 @item -fchkp-optimize | |
11351 @opindex fchkp-optimize | |
11352 @opindex fno-chkp-optimize | |
11353 Enables Pointer Bounds Checker optimizations. Enabled by default at | |
11354 optimization levels @option{-O}, @option{-O2}, @option{-O3}. | |
11355 | |
11356 @item -fchkp-use-fast-string-functions | |
11357 @opindex fchkp-use-fast-string-functions | |
11358 @opindex fno-chkp-use-fast-string-functions | |
11359 Enables use of @code{*_nobnd} versions of string functions (not copying bounds) | |
11360 by Pointer Bounds Checker. Disabled by default. | |
11361 | |
11362 @item -fchkp-use-nochk-string-functions | |
11363 @opindex fchkp-use-nochk-string-functions | |
11364 @opindex fno-chkp-use-nochk-string-functions | |
11365 Enables use of @code{*_nochk} versions of string functions (not checking bounds) | |
11366 by Pointer Bounds Checker. Disabled by default. | |
11367 | |
11368 @item -fchkp-use-static-bounds | |
11369 @opindex fchkp-use-static-bounds | |
11370 @opindex fno-chkp-use-static-bounds | |
11371 Allow Pointer Bounds Checker to generate static bounds holding | |
11372 bounds of static variables. Enabled by default. | |
11373 | |
11374 @item -fchkp-use-static-const-bounds | |
11375 @opindex fchkp-use-static-const-bounds | |
11376 @opindex fno-chkp-use-static-const-bounds | |
11377 Use statically-initialized bounds for constant bounds instead of | |
11378 generating them each time they are required. By default enabled when | |
11379 @option{-fchkp-use-static-bounds} is enabled. | |
11380 | |
11381 @item -fchkp-treat-zero-dynamic-size-as-infinite | |
11382 @opindex fchkp-treat-zero-dynamic-size-as-infinite | |
11383 @opindex fno-chkp-treat-zero-dynamic-size-as-infinite | |
11384 With this option, objects with incomplete type whose | |
11385 dynamically-obtained size is zero are treated as having infinite size | |
11386 instead by Pointer Bounds | |
11387 Checker. This option may be helpful if a program is linked with a library | |
11388 missing size information for some symbols. Disabled by default. | |
11389 | |
11390 @item -fchkp-check-read | |
11391 @opindex fchkp-check-read | |
11392 @opindex fno-chkp-check-read | |
11393 Instructs Pointer Bounds Checker to generate checks for all read | |
11394 accesses to memory. Enabled by default. | |
11395 | |
11396 @item -fchkp-check-write | |
11397 @opindex fchkp-check-write | |
11398 @opindex fno-chkp-check-write | |
11399 Instructs Pointer Bounds Checker to generate checks for all write | |
11400 accesses to memory. Enabled by default. | |
11401 | |
11402 @item -fchkp-store-bounds | |
11403 @opindex fchkp-store-bounds | |
11404 @opindex fno-chkp-store-bounds | |
11405 Instructs Pointer Bounds Checker to generate bounds stores for | |
11406 pointer writes. Enabled by default. | |
11407 | |
11408 @item -fchkp-instrument-calls | |
11409 @opindex fchkp-instrument-calls | |
11410 @opindex fno-chkp-instrument-calls | |
11411 Instructs Pointer Bounds Checker to pass pointer bounds to calls. | |
11412 Enabled by default. | |
11413 | |
11414 @item -fchkp-instrument-marked-only | |
11415 @opindex fchkp-instrument-marked-only | |
11416 @opindex fno-chkp-instrument-marked-only | |
11417 Instructs Pointer Bounds Checker to instrument only functions | |
11418 marked with the @code{bnd_instrument} attribute | |
11419 (@pxref{Function Attributes}). Disabled by default. | |
11420 | |
11421 @item -fchkp-use-wrappers | |
11422 @opindex fchkp-use-wrappers | |
11423 @opindex fno-chkp-use-wrappers | |
11424 Allows Pointer Bounds Checker to replace calls to built-in functions | |
11425 with calls to wrapper functions. When @option{-fchkp-use-wrappers} | |
11426 is used to link a program, the GCC driver automatically links | |
11427 against @file{libmpxwrappers}. See also @option{-static-libmpxwrappers}. | |
11428 Enabled by default. | |
11429 | |
11430 @item -fcf-protection==@r{[}full@r{|}branch@r{|}return@r{|}none@r{]} | |
11431 @opindex fcf-protection | 12112 @opindex fcf-protection |
11432 Enable code instrumentation of control-flow transfers to increase | 12113 Enable code instrumentation of control-flow transfers to increase |
11433 program security by checking that target addresses of control-flow | 12114 program security by checking that target addresses of control-flow |
11434 transfer instructions (such as indirect function call, function return, | 12115 transfer instructions (such as indirect function call, function return, |
11435 indirect jump) are valid. This prevents diverting the flow of control | 12116 indirect jump) are valid. This prevents diverting the flow of control |
11443 implements checking of validity at the point of returning from a | 12124 implements checking of validity at the point of returning from a |
11444 function. The value @code{full} is an alias for specifying both | 12125 function. The value @code{full} is an alias for specifying both |
11445 @code{branch} and @code{return}. The value @code{none} turns off | 12126 @code{branch} and @code{return}. The value @code{none} turns off |
11446 instrumentation. | 12127 instrumentation. |
11447 | 12128 |
12129 The macro @code{__CET__} is defined when @option{-fcf-protection} is | |
12130 used. The first bit of @code{__CET__} is set to 1 for the value | |
12131 @code{branch} and the second bit of @code{__CET__} is set to 1 for | |
12132 the @code{return}. | |
12133 | |
11448 You can also use the @code{nocf_check} attribute to identify | 12134 You can also use the @code{nocf_check} attribute to identify |
11449 which functions and calls should be skipped from instrumentation | 12135 which functions and calls should be skipped from instrumentation |
11450 (@pxref{Function Attributes}). | 12136 (@pxref{Function Attributes}). |
11451 | 12137 |
11452 Currently the x86 GNU/Linux target provides an implementation based | 12138 Currently the x86 GNU/Linux target provides an implementation based |
11453 on Intel Control-flow Enforcement Technology (CET). Instrumentation | 12139 on Intel Control-flow Enforcement Technology (CET). |
11454 for x86 is controlled by target-specific options @option{-mcet}, | |
11455 @option{-mibt} and @option{-mshstk} (@pxref{x86 Options}). | |
11456 | 12140 |
11457 @item -fstack-protector | 12141 @item -fstack-protector |
11458 @opindex fstack-protector | 12142 @opindex fstack-protector |
11459 Emit extra code to check for buffer overflows, such as stack smashing | 12143 Emit extra code to check for buffer overflows, such as stack smashing |
11460 attacks. This is done by adding a guard variable to functions with | 12144 attacks. This is done by adding a guard variable to functions with |
11848 @opindex E | 12532 @opindex E |
11849 If any of these options is used, then the linker is not run, and | 12533 If any of these options is used, then the linker is not run, and |
11850 object file names should not be used as arguments. @xref{Overall | 12534 object file names should not be used as arguments. @xref{Overall |
11851 Options}. | 12535 Options}. |
11852 | 12536 |
12537 @item -flinker-output=@var{type} | |
12538 @opindex -flinker-output | |
12539 This option controls the code generation of the link time optimizer. By | |
12540 default the linker output is determined by the linker plugin automatically. For | |
12541 debugging the compiler and in the case of incremental linking to non-lto object | |
12542 file is desired, it may be useful to control the type manually. | |
12543 | |
12544 If @var{type} is @samp{exec} the code generation is configured to produce static | |
12545 binary. In this case @option{-fpic} and @option{-fpie} are both disabled. | |
12546 | |
12547 If @var{type} is @samp{dyn} the code generation is configured to produce shared | |
12548 library. In this case @option{-fpic} or @option{-fPIC} is preserved, but not | |
12549 enabled automatically. This makes it possible to build shared libraries without | |
12550 position independent code on architectures this is possible, i.e. on x86. | |
12551 | |
12552 If @var{type} is @samp{pie} the code generation is configured to produce | |
12553 @option{-fpie} executable. This result in similar optimizations as @samp{exec} | |
12554 except that @option{-fpie} is not disabled if specified at compilation time. | |
12555 | |
12556 If @var{type} is @samp{rel} the compiler assumes that incremental linking is | |
12557 done. The sections containing intermediate code for link-time optimization are | |
12558 merged, pre-optimized, and output to the resulting object file. In addition, if | |
12559 @option{-ffat-lto-objects} is specified the binary code is produced for future | |
12560 non-lto linking. The object file produced by incremental linking will be smaller | |
12561 than a static library produced from the same object files. At link-time the | |
12562 result of incremental linking will also load faster to compiler than a static | |
12563 library assuming that majority of objects in the library are used. | |
12564 | |
12565 Finally @samp{nolto-rel} configure compiler to for incremental linking where | |
12566 code generation is forced, final binary is produced and the intermediate code | |
12567 for later link-time optimization is stripped. When multiple object files are | |
12568 linked together the resulting code will be optimized better than with link time | |
12569 optimizations disabled (for example, the cross-module inlining will happen), | |
12570 most of benefits of whole program optimizations are however lost. | |
12571 | |
12572 During the incremental link (by @option{-r}) the linker plugin will default to | |
12573 @option{rel}. With current interfaces to GNU Binutils it is however not | |
12574 possible to link incrementally LTO objects and non-LTO objects into a single | |
12575 mixed object file. In the case any of object files in incremental link can not | |
12576 be used for link-time optimization the linker plugin will output warning and | |
12577 use @samp{nolto-rel}. To maintain the whole program optimization it is | |
12578 recommended to link such objects into static library instead. Alternatively it | |
12579 is possible to use H.J. Lu's binutils with support for mixed objects. | |
12580 | |
11853 @item -fuse-ld=bfd | 12581 @item -fuse-ld=bfd |
11854 @opindex fuse-ld=bfd | 12582 @opindex fuse-ld=bfd |
11855 Use the @command{bfd} linker instead of the default linker. | 12583 Use the @command{bfd} linker instead of the default linker. |
11856 | 12584 |
11857 @item -fuse-ld=gold | 12585 @item -fuse-ld=gold |
11894 link an Objective-C or Objective-C++ program. | 12622 link an Objective-C or Objective-C++ program. |
11895 | 12623 |
11896 @item -nostartfiles | 12624 @item -nostartfiles |
11897 @opindex nostartfiles | 12625 @opindex nostartfiles |
11898 Do not use the standard system startup files when linking. | 12626 Do not use the standard system startup files when linking. |
11899 The standard system libraries are used normally, unless @option{-nostdlib} | 12627 The standard system libraries are used normally, unless @option{-nostdlib}, |
11900 or @option{-nodefaultlibs} is used. | 12628 @option{-nolibc}, or @option{-nodefaultlibs} is used. |
11901 | 12629 |
11902 @item -nodefaultlibs | 12630 @item -nodefaultlibs |
11903 @opindex nodefaultlibs | 12631 @opindex nodefaultlibs |
11904 Do not use the standard system libraries when linking. | 12632 Do not use the standard system libraries when linking. |
11905 Only the libraries you specify are passed to the linker, and options | 12633 Only the libraries you specify are passed to the linker, and options |
11911 The compiler may generate calls to @code{memcmp}, | 12639 The compiler may generate calls to @code{memcmp}, |
11912 @code{memset}, @code{memcpy} and @code{memmove}. | 12640 @code{memset}, @code{memcpy} and @code{memmove}. |
11913 These entries are usually resolved by entries in | 12641 These entries are usually resolved by entries in |
11914 libc. These entry points should be supplied through some other | 12642 libc. These entry points should be supplied through some other |
11915 mechanism when this option is specified. | 12643 mechanism when this option is specified. |
12644 | |
12645 @item -nolibc | |
12646 @opindex nolibc | |
12647 Do not use the C library or system libraries tightly coupled with it when | |
12648 linking. Still link with the startup files, @file{libgcc} or toolchain | |
12649 provided language support libraries such as @file{libgnat}, @file{libgfortran} | |
12650 or @file{libstdc++} unless options preventing their inclusion are used as | |
12651 well. This typically removes @option{-lc} from the link command line, as well | |
12652 as system libraries that normally go with it and become meaningless when | |
12653 absence of a C library is assumed, for example @option{-lpthread} or | |
12654 @option{-lm} in some configurations. This is intended for bare-board | |
12655 targets when there is indeed no C library available. | |
11916 | 12656 |
11917 @item -nostdlib | 12657 @item -nostdlib |
11918 @opindex nostdlib | 12658 @opindex nostdlib |
11919 Do not use the standard system startup files or libraries when linking. | 12659 Do not use the standard system startup files or libraries when linking. |
11920 No startup files and only the libraries you specify are passed to | 12660 No startup files and only the libraries you specify are passed to |
11975 GNU/Linux targets, most other Unix derivatives, and also on | 12715 GNU/Linux targets, most other Unix derivatives, and also on |
11976 x86 Cygwin and MinGW targets. On some targets this option also sets | 12716 x86 Cygwin and MinGW targets. On some targets this option also sets |
11977 flags for the preprocessor, so it should be used consistently for both | 12717 flags for the preprocessor, so it should be used consistently for both |
11978 compilation and linking. | 12718 compilation and linking. |
11979 | 12719 |
12720 @item -r | |
12721 @opindex r | |
12722 Produce a relocatable object as output. This is also known as partial | |
12723 linking. | |
12724 | |
11980 @item -rdynamic | 12725 @item -rdynamic |
11981 @opindex rdynamic | 12726 @opindex rdynamic |
11982 Pass the flag @option{-export-dynamic} to the ELF linker, on targets | 12727 Pass the flag @option{-export-dynamic} to the ELF linker, on targets |
11983 that support it. This instructs the linker to add all symbols, not | 12728 that support it. This instructs the linker to add all symbols, not |
11984 only used ones, to the dynamic symbol table. This option is needed | 12729 only used ones, to the dynamic symbol table. This option is needed |
12021 shared @file{libgcc} instead of the static version. The most common | 12766 shared @file{libgcc} instead of the static version. The most common |
12022 of these is when the application wishes to throw and catch exceptions | 12767 of these is when the application wishes to throw and catch exceptions |
12023 across different shared libraries. In that case, each of the libraries | 12768 across different shared libraries. In that case, each of the libraries |
12024 as well as the application itself should use the shared @file{libgcc}. | 12769 as well as the application itself should use the shared @file{libgcc}. |
12025 | 12770 |
12026 Therefore, the G++ and driver automatically adds @option{-shared-libgcc} | 12771 Therefore, the G++ driver automatically adds @option{-shared-libgcc} |
12027 whenever you build a shared library or a main executable, because C++ | 12772 whenever you build a shared library or a main executable, because C++ |
12028 programs typically use exceptions, so this is the right thing to do. | 12773 programs typically use exceptions, so this is the right thing to do. |
12029 | 12774 |
12030 If, instead, you use the GCC driver to create shared libraries, you may | 12775 If, instead, you use the GCC driver to create shared libraries, you may |
12031 find that they are not always linked with the shared @file{libgcc}. | 12776 find that they are not always linked with the shared @file{libgcc}. |
12032 If GCC finds, at its configuration time, that you have a non-GNU linker | 12777 If GCC finds, at its configuration time, that you have a non-GNU linker |
12033 or a GNU linker that does not support option @option{--eh-frame-hdr}, | 12778 or a GNU linker that does not support option @option{--eh-frame-hdr}, |
12037 the static version of libgcc by default. This allows exceptions to | 12782 the static version of libgcc by default. This allows exceptions to |
12038 propagate through such shared libraries, without incurring relocation | 12783 propagate through such shared libraries, without incurring relocation |
12039 costs at library load time. | 12784 costs at library load time. |
12040 | 12785 |
12041 However, if a library or main executable is supposed to throw or catch | 12786 However, if a library or main executable is supposed to throw or catch |
12042 exceptions, you must link it using the G++ driver, as appropriate | 12787 exceptions, you must link it using the G++ driver, or using the option |
12043 for the languages used in the program, or using the option | |
12044 @option{-shared-libgcc}, such that it is linked with the shared | 12788 @option{-shared-libgcc}, such that it is linked with the shared |
12045 @file{libgcc}. | 12789 @file{libgcc}. |
12046 | 12790 |
12047 @item -static-libasan | 12791 @item -static-libasan |
12048 @opindex static-libasan | 12792 @opindex static-libasan |
12081 @file{libubsan} is available as a shared library, and the @option{-static} | 12825 @file{libubsan} is available as a shared library, and the @option{-static} |
12082 option is not used, then this links against the shared version of | 12826 option is not used, then this links against the shared version of |
12083 @file{libubsan}. The @option{-static-libubsan} option directs the GCC | 12827 @file{libubsan}. The @option{-static-libubsan} option directs the GCC |
12084 driver to link @file{libubsan} statically, without necessarily linking | 12828 driver to link @file{libubsan} statically, without necessarily linking |
12085 other libraries statically. | 12829 other libraries statically. |
12086 | |
12087 @item -static-libmpx | |
12088 @opindex static-libmpx | |
12089 When the @option{-fcheck-pointer bounds} and @option{-mmpx} options are | |
12090 used to link a program, the GCC driver automatically links against | |
12091 @file{libmpx}. If @file{libmpx} is available as a shared library, | |
12092 and the @option{-static} option is not used, then this links against | |
12093 the shared version of @file{libmpx}. The @option{-static-libmpx} | |
12094 option directs the GCC driver to link @file{libmpx} statically, | |
12095 without necessarily linking other libraries statically. | |
12096 | |
12097 @item -static-libmpxwrappers | |
12098 @opindex static-libmpxwrappers | |
12099 When the @option{-fcheck-pointer bounds} and @option{-mmpx} options are used | |
12100 to link a program without also using @option{-fno-chkp-use-wrappers}, the | |
12101 GCC driver automatically links against @file{libmpxwrappers}. If | |
12102 @file{libmpxwrappers} is available as a shared library, and the | |
12103 @option{-static} option is not used, then this links against the shared | |
12104 version of @file{libmpxwrappers}. The @option{-static-libmpxwrappers} | |
12105 option directs the GCC driver to link @file{libmpxwrappers} statically, | |
12106 without necessarily linking other libraries statically. | |
12107 | 12830 |
12108 @item -static-libstdc++ | 12831 @item -static-libstdc++ |
12109 @opindex static-libstdc++ | 12832 @opindex static-libstdc++ |
12110 When the @command{g++} program is used to link a C++ program, it | 12833 When the @command{g++} program is used to link a C++ program, it |
12111 normally automatically links against @option{libstdc++}. If | 12834 normally automatically links against @option{libstdc++}. If |
12388 The options @option{-ftrapv} and @option{-fwrapv} override each other, so using | 13111 The options @option{-ftrapv} and @option{-fwrapv} override each other, so using |
12389 @option{-ftrapv} @option{-fwrapv} on the command-line results in | 13112 @option{-ftrapv} @option{-fwrapv} on the command-line results in |
12390 @option{-fwrapv} being effective. Note that only active options override, so | 13113 @option{-fwrapv} being effective. Note that only active options override, so |
12391 using @option{-ftrapv} @option{-fwrapv} @option{-fno-wrapv} on the command-line | 13114 using @option{-ftrapv} @option{-fwrapv} @option{-fno-wrapv} on the command-line |
12392 results in @option{-ftrapv} being effective. | 13115 results in @option{-ftrapv} being effective. |
13116 | |
13117 @item -fwrapv-pointer | |
13118 @opindex fwrapv-pointer | |
13119 This option instructs the compiler to assume that pointer arithmetic | |
13120 overflow on addition and subtraction wraps around using twos-complement | |
13121 representation. This flag disables some optimizations which assume | |
13122 pointer overflow is invalid. | |
13123 | |
13124 @item -fstrict-overflow | |
13125 @opindex fstrict-overflow | |
13126 This option implies @option{-fno-wrapv} @option{-fno-wrapv-pointer} and when | |
13127 negated implies @option{-fwrapv} @option{-fwrapv-pointer}. | |
12393 | 13128 |
12394 @item -fexceptions | 13129 @item -fexceptions |
12395 @opindex fexceptions | 13130 @opindex fexceptions |
12396 Enable exception handling. Generates extra code needed to propagate | 13131 Enable exception handling. Generates extra code needed to propagate |
12397 exceptions. For some targets, this implies GCC generates frame | 13132 exceptions. For some targets, this implies GCC generates frame |
12692 | 13427 |
12693 @item -fpie | 13428 @item -fpie |
12694 @itemx -fPIE | 13429 @itemx -fPIE |
12695 @opindex fpie | 13430 @opindex fpie |
12696 @opindex fPIE | 13431 @opindex fPIE |
12697 These options are similar to @option{-fpic} and @option{-fPIC}, but | 13432 These options are similar to @option{-fpic} and @option{-fPIC}, but the |
12698 generated position independent code can be only linked into executables. | 13433 generated position-independent code can be only linked into executables. |
12699 Usually these options are used when @option{-pie} GCC option is | 13434 Usually these options are used to compile code that will be linked using |
12700 used during linking. | 13435 the @option{-pie} GCC option. |
12701 | 13436 |
12702 @option{-fpie} and @option{-fPIE} both define the macros | 13437 @option{-fpie} and @option{-fPIE} both define the macros |
12703 @code{__pie__} and @code{__PIE__}. The macros have the value 1 | 13438 @code{__pie__} and @code{__PIE__}. The macros have the value 1 |
12704 for @option{-fpie} and 2 for @option{-fPIE}. | 13439 for @option{-fpie} and 2 for @option{-fPIE}. |
12705 | 13440 |
12956 memory use and execution time; and that print information about GCC's | 13691 memory use and execution time; and that print information about GCC's |
12957 configuration, such as where it searches for libraries. You should | 13692 configuration, such as where it searches for libraries. You should |
12958 rarely need to use any of these options for ordinary compilation and | 13693 rarely need to use any of these options for ordinary compilation and |
12959 linking tasks. | 13694 linking tasks. |
12960 | 13695 |
13696 Many developer options that cause GCC to dump output to a file take an | |
13697 optional @samp{=@var{filename}} suffix. You can specify @samp{stdout} | |
13698 or @samp{-} to dump to standard output, and @samp{stderr} for standard | |
13699 error. | |
13700 | |
13701 If @samp{=@var{filename}} is omitted, a default dump file name is | |
13702 constructed by concatenating the base dump file name, a pass number, | |
13703 phase letter, and pass name. The base dump file name is the name of | |
13704 output file produced by the compiler if explicitly specified and not | |
13705 an executable; otherwise it is the source file name. | |
13706 The pass number is determined by the order passes are registered with | |
13707 the compiler's pass manager. | |
13708 This is generally the same as the order of execution, but passes | |
13709 registered by plugins, target-specific passes, or passes that are | |
13710 otherwise registered late are numbered higher than the pass named | |
13711 @samp{final}, even if they are executed earlier. The phase letter is | |
13712 one of @samp{i} (inter-procedural analysis), @samp{l} | |
13713 (language-specific), @samp{r} (RTL), or @samp{t} (tree). | |
13714 The files are created in the directory of the output file. | |
13715 | |
12961 @table @gcctabopt | 13716 @table @gcctabopt |
12962 | 13717 |
12963 @item -d@var{letters} | 13718 @item -d@var{letters} |
12964 @itemx -fdump-rtl-@var{pass} | 13719 @itemx -fdump-rtl-@var{pass} |
12965 @itemx -fdump-rtl-@var{pass}=@var{filename} | 13720 @itemx -fdump-rtl-@var{pass}=@var{filename} |
12966 @opindex d | 13721 @opindex d |
12967 @opindex fdump-rtl-@var{pass} | 13722 @opindex fdump-rtl-@var{pass} |
12968 Says to make debugging dumps during compilation at times specified by | 13723 Says to make debugging dumps during compilation at times specified by |
12969 @var{letters}. This is used for debugging the RTL-based passes of the | 13724 @var{letters}. This is used for debugging the RTL-based passes of the |
12970 compiler. The file names for most of the dumps are made by appending | 13725 compiler. |
12971 a pass number and a word to the @var{dumpname}, and the files are | |
12972 created in the directory of the output file. In case of | |
12973 @option{=@var{filename}} option, the dump is output on the given file | |
12974 instead of the pass numbered dump files. Note that the pass number is | |
12975 assigned as passes are registered into the pass manager. Most passes | |
12976 are registered in the order that they will execute and for these passes | |
12977 the number corresponds to the pass execution order. However, passes | |
12978 registered by plugins, passes specific to compilation targets, or | |
12979 passes that are otherwise registered after all the other passes are | |
12980 numbered higher than a pass named "final", even if they are executed | |
12981 earlier. @var{dumpname} is generated from the name of the output | |
12982 file if explicitly specified and not an executable, otherwise it is | |
12983 the basename of the source file. | |
12984 | 13726 |
12985 Some @option{-d@var{letters}} switches have different meaning when | 13727 Some @option{-d@var{letters}} switches have different meaning when |
12986 @option{-E} is used for preprocessing. @xref{Preprocessor Options}, | 13728 @option{-E} is used for preprocessing. @xref{Preprocessor Options}, |
12987 for information about preprocessor-specific dump options. | 13729 for information about preprocessor-specific dump options. |
12988 | 13730 |
13258 Produce a core dump whenever an error occurs. | 14000 Produce a core dump whenever an error occurs. |
13259 | 14001 |
13260 @item -dp | 14002 @item -dp |
13261 @opindex dp | 14003 @opindex dp |
13262 Annotate the assembler output with a comment indicating which | 14004 Annotate the assembler output with a comment indicating which |
13263 pattern and alternative is used. The length of each instruction is | 14005 pattern and alternative is used. The length and cost of each instruction are |
13264 also printed. | 14006 also printed. |
13265 | 14007 |
13266 @item -dP | 14008 @item -dP |
13267 @opindex dP | 14009 @opindex dP |
13268 Dump the RTL in the assembler output as a comment before each instruction. | 14010 Dump the RTL in the assembler output as a comment before each instruction. |
13271 @item -dx | 14013 @item -dx |
13272 @opindex dx | 14014 @opindex dx |
13273 Just generate RTL for a function instead of compiling it. Usually used | 14015 Just generate RTL for a function instead of compiling it. Usually used |
13274 with @option{-fdump-rtl-expand}. | 14016 with @option{-fdump-rtl-expand}. |
13275 @end table | 14017 @end table |
14018 | |
14019 @item -fdump-debug | |
14020 @opindex fdump-debug | |
14021 Dump debugging information generated during the debug | |
14022 generation phase. | |
14023 | |
14024 @item -fdump-earlydebug | |
14025 @opindex fdump-earlydebug | |
14026 Dump debugging information generated during the early debug | |
14027 generation phase. | |
13276 | 14028 |
13277 @item -fdump-noaddr | 14029 @item -fdump-noaddr |
13278 @opindex fdump-noaddr | 14030 @opindex fdump-noaddr |
13279 When doing debugging dumps, suppress address output. This makes it more | 14031 When doing debugging dumps, suppress address output. This makes it more |
13280 feasible to use diff on debugging dumps for compiler invocations with | 14032 feasible to use diff on debugging dumps for compiler invocations with |
13366 @itemx -fdump-tree-@var{switch}-@var{options} | 14118 @itemx -fdump-tree-@var{switch}-@var{options} |
13367 @itemx -fdump-tree-@var{switch}-@var{options}=@var{filename} | 14119 @itemx -fdump-tree-@var{switch}-@var{options}=@var{filename} |
13368 @opindex fdump-tree-all | 14120 @opindex fdump-tree-all |
13369 @opindex fdump-tree | 14121 @opindex fdump-tree |
13370 Control the dumping at various stages of processing the intermediate | 14122 Control the dumping at various stages of processing the intermediate |
13371 language tree to a file. The file name is generated by appending a | 14123 language tree to a file. If the @samp{-@var{options}} |
13372 switch-specific suffix to the source file name, and the file is | |
13373 created in the same directory as the output file. In case of | |
13374 @option{=@var{filename}} option, the dump is output on the given file | |
13375 instead of the auto named dump files. If the @samp{-@var{options}} | |
13376 form is used, @var{options} is a list of @samp{-} separated options | 14124 form is used, @var{options} is a list of @samp{-} separated options |
13377 which control the details of the dump. Not all options are applicable | 14125 which control the details of the dump. Not all options are applicable |
13378 to all dumps; those that are not meaningful are ignored. The | 14126 to all dumps; those that are not meaningful are ignored. The |
13379 following options are available | 14127 following options are available |
13380 | 14128 |
13437 Enable showing missed optimization information (only available in certain | 14185 Enable showing missed optimization information (only available in certain |
13438 passes). | 14186 passes). |
13439 @item note | 14187 @item note |
13440 Enable other detailed optimization information (only available in | 14188 Enable other detailed optimization information (only available in |
13441 certain passes). | 14189 certain passes). |
13442 @item =@var{filename} | |
13443 Instead of an auto named dump file, output into the given file | |
13444 name. The file names @file{stdout} and @file{stderr} are treated | |
13445 specially and are considered already open standard streams. For | |
13446 example, | |
13447 | |
13448 @smallexample | |
13449 gcc -O2 -ftree-vectorize -fdump-tree-vect-blocks=foo.dump | |
13450 -fdump-tree-pre=/dev/stderr file.c | |
13451 @end smallexample | |
13452 | |
13453 outputs vectorizer dump into @file{foo.dump}, while the PRE dump is | |
13454 output on to @file{stderr}. If two conflicting dump filenames are | |
13455 given for the same pass, then the latter option overrides the earlier | |
13456 one. | |
13457 | |
13458 @item all | 14190 @item all |
13459 Turn on all options, except @option{raw}, @option{slim}, @option{verbose} | 14191 Turn on all options, except @option{raw}, @option{slim}, @option{verbose} |
13460 and @option{lineno}. | 14192 and @option{lineno}. |
13461 | |
13462 @item optall | 14193 @item optall |
13463 Turn on all optimization options, i.e., @option{optimized}, | 14194 Turn on all optimization options, i.e., @option{optimized}, |
13464 @option{missed}, and @option{note}. | 14195 @option{missed}, and @option{note}. |
13465 @end table | 14196 @end table |
13466 | 14197 |
13499 Controls optimization dumps from various optimization passes. If the | 14230 Controls optimization dumps from various optimization passes. If the |
13500 @samp{-@var{options}} form is used, @var{options} is a list of | 14231 @samp{-@var{options}} form is used, @var{options} is a list of |
13501 @samp{-} separated option keywords to select the dump details and | 14232 @samp{-} separated option keywords to select the dump details and |
13502 optimizations. | 14233 optimizations. |
13503 | 14234 |
13504 The @var{options} can be divided into two groups: options describing the | 14235 The @var{options} can be divided into three groups: |
13505 verbosity of the dump, and options describing which optimizations | 14236 @enumerate |
13506 should be included. The options from both the groups can be freely | 14237 @item |
13507 mixed as they are non-overlapping. However, in case of any conflicts, | 14238 options describing what kinds of messages should be emitted, |
14239 @item | |
14240 options describing the verbosity of the dump, and | |
14241 @item | |
14242 options describing which optimizations should be included. | |
14243 @end enumerate | |
14244 The options from each group can be freely mixed as they are | |
14245 non-overlapping. However, in case of any conflicts, | |
13508 the later options override the earlier options on the command | 14246 the later options override the earlier options on the command |
13509 line. | 14247 line. |
13510 | 14248 |
13511 The following options control the dump verbosity: | 14249 The following options control which kinds of messages should be emitted: |
13512 | 14250 |
13513 @table @samp | 14251 @table @samp |
13514 @item optimized | 14252 @item optimized |
13515 Print information when an optimization is successfully applied. It is | 14253 Print information when an optimization is successfully applied. It is |
13516 up to a pass to decide which information is relevant. For example, the | 14254 up to a pass to decide which information is relevant. For example, the |
13525 @item all | 14263 @item all |
13526 Print detailed optimization information. This includes | 14264 Print detailed optimization information. This includes |
13527 @samp{optimized}, @samp{missed}, and @samp{note}. | 14265 @samp{optimized}, @samp{missed}, and @samp{note}. |
13528 @end table | 14266 @end table |
13529 | 14267 |
14268 The following option controls the dump verbosity: | |
14269 | |
14270 @table @samp | |
14271 @item internals | |
14272 By default, only ``high-level'' messages are emitted. This option enables | |
14273 additional, more detailed, messages, which are likely to only be of interest | |
14274 to GCC developers. | |
14275 @end table | |
14276 | |
13530 One or more of the following option keywords can be used to describe a | 14277 One or more of the following option keywords can be used to describe a |
13531 group of optimizations: | 14278 group of optimizations: |
13532 | 14279 |
13533 @table @samp | 14280 @table @samp |
13534 @item ipa | 14281 @item ipa |
13545 Enable dumps from all optimizations. This is a superset of | 14292 Enable dumps from all optimizations. This is a superset of |
13546 the optimization groups listed above. | 14293 the optimization groups listed above. |
13547 @end table | 14294 @end table |
13548 | 14295 |
13549 If @var{options} is | 14296 If @var{options} is |
13550 omitted, it defaults to @samp{optimized-optall}, which means to dump all | 14297 omitted, it defaults to @samp{optimized-optall}, which means to dump messages |
13551 info about successful optimizations from all the passes. | 14298 about successful optimizations from all the passes, omitting messages |
14299 that are treated as ``internals''. | |
13552 | 14300 |
13553 If the @var{filename} is provided, then the dumps from all the | 14301 If the @var{filename} is provided, then the dumps from all the |
13554 applicable optimizations are concatenated into the @var{filename}. | 14302 applicable optimizations are concatenated into the @var{filename}. |
13555 Otherwise the dump is output onto @file{stderr}. Though multiple | 14303 Otherwise the dump is output onto @file{stderr}. Though multiple |
13556 @option{-fopt-info} options are accepted, only one of them can include | 14304 @option{-fopt-info} options are accepted, only one of them can include |
13609 Here the two output filenames @file{vec.miss} and @file{loop.opt} are | 14357 Here the two output filenames @file{vec.miss} and @file{loop.opt} are |
13610 in conflict since only one output file is allowed. In this case, only | 14358 in conflict since only one output file is allowed. In this case, only |
13611 the first option takes effect and the subsequent options are | 14359 the first option takes effect and the subsequent options are |
13612 ignored. Thus only @file{vec.miss} is produced which contains | 14360 ignored. Thus only @file{vec.miss} is produced which contains |
13613 dumps from the vectorizer about missed opportunities. | 14361 dumps from the vectorizer about missed opportunities. |
14362 | |
14363 @item -fsave-optimization-record | |
14364 @opindex fsave-optimization-record | |
14365 Write a SRCFILE.opt-record.json file detailing what optimizations | |
14366 were performed, for those optimizations that support @option{-fopt-info}. | |
14367 | |
14368 This option is experimental and the format of the data within the JSON | |
14369 file is subject to change. | |
14370 | |
14371 It is roughly equivalent to a machine-readable version of | |
14372 @option{-fopt-info-all}, as a collection of messages with source file, | |
14373 line number and column number, with the following additional data for | |
14374 each message: | |
14375 | |
14376 @itemize @bullet | |
14377 | |
14378 @item | |
14379 the execution count of the code being optimized, along with metadata about | |
14380 whether this was from actual profile data, or just an estimate, allowing | |
14381 consumers to prioritize messages by code hotness, | |
14382 | |
14383 @item | |
14384 the function name of the code being optimized, where applicable, | |
14385 | |
14386 @item | |
14387 the ``inlining chain'' for the code being optimized, so that when | |
14388 a function is inlined into several different places (which might | |
14389 themselves be inlined), the reader can distinguish between the copies, | |
14390 | |
14391 @item | |
14392 objects identifying those parts of the message that refer to expressions, | |
14393 statements or symbol-table nodes, which of these categories they are, and, | |
14394 when available, their source code location, | |
14395 | |
14396 @item | |
14397 the GCC pass that emitted the message, and | |
14398 | |
14399 @item | |
14400 the location in GCC's own code from which the message was emitted | |
14401 | |
14402 @end itemize | |
14403 | |
14404 Additionally, some messages are logically nested within other | |
14405 messages, reflecting implementation details of the optimization | |
14406 passes. | |
13614 | 14407 |
13615 @item -fsched-verbose=@var{n} | 14408 @item -fsched-verbose=@var{n} |
13616 @opindex fsched-verbose | 14409 @opindex fsched-verbose |
13617 On targets that use instruction scheduling, this option controls the | 14410 On targets that use instruction scheduling, this option controls the |
13618 amount of debugging output the scheduler prints to the dump files. | 14411 amount of debugging output the scheduler prints to the dump files. |
13840 | 14633 |
13841 @item -fcompare-debug-second | 14634 @item -fcompare-debug-second |
13842 @opindex fcompare-debug-second | 14635 @opindex fcompare-debug-second |
13843 This option is implicitly passed to the compiler for the second | 14636 This option is implicitly passed to the compiler for the second |
13844 compilation requested by @option{-fcompare-debug}, along with options to | 14637 compilation requested by @option{-fcompare-debug}, along with options to |
13845 silence warnings, and omitting other options that would cause | 14638 silence warnings, and omitting other options that would cause the compiler |
13846 side-effect compiler outputs to files or to the standard output. Dump | 14639 to produce output to files or to standard output as a side effect. Dump |
13847 files and preserved temporary files are renamed so as to contain the | 14640 files and preserved temporary files are renamed so as to contain the |
13848 @code{.gk} additional extension during the second compilation, to avoid | 14641 @code{.gk} additional extension during the second compilation, to avoid |
13849 overwriting those generated by the first. | 14642 overwriting those generated by the first. |
13850 | 14643 |
13851 When this option is passed to the compiler driver, it causes the | 14644 When this option is passed to the compiler driver, it causes the |
13967 Print the name and the counter upper bound for all debug counters. | 14760 Print the name and the counter upper bound for all debug counters. |
13968 | 14761 |
13969 | 14762 |
13970 @item -fdbg-cnt=@var{counter-value-list} | 14763 @item -fdbg-cnt=@var{counter-value-list} |
13971 @opindex fdbg-cnt | 14764 @opindex fdbg-cnt |
13972 Set the internal debug counter upper bound. @var{counter-value-list} | 14765 Set the internal debug counter lower and upper bound. @var{counter-value-list} |
13973 is a comma-separated list of @var{name}:@var{value} pairs | 14766 is a comma-separated list of @var{name}:@var{lower_bound}:@var{upper_bound} |
13974 which sets the upper bound of each debug counter @var{name} to @var{value}. | 14767 tuples which sets the lower and the upper bound of each debug |
14768 counter @var{name}. The @var{lower_bound} is optional and is zero | |
14769 initialized if not set. | |
13975 All debug counters have the initial upper bound of @code{UINT_MAX}; | 14770 All debug counters have the initial upper bound of @code{UINT_MAX}; |
13976 thus @code{dbg_cnt} returns true always unless the upper bound | 14771 thus @code{dbg_cnt} returns true always unless the upper bound |
13977 is set by this option. | 14772 is set by this option. |
13978 For example, with @option{-fdbg-cnt=dce:10,tail_call:0}, | 14773 For example, with @option{-fdbg-cnt=dce:2:4,tail_call:10}, |
13979 @code{dbg_cnt(dce)} returns true only for first 10 invocations. | 14774 @code{dbg_cnt(dce)} returns true only for third and fourth invocation. |
14775 For @code{dbg_cnt(tail_call)} true is returned for first 10 invocations. | |
13980 | 14776 |
13981 @item -print-file-name=@var{library} | 14777 @item -print-file-name=@var{library} |
13982 @opindex print-file-name | 14778 @opindex print-file-name |
13983 Print the full absolute name of the library file @var{library} that | 14779 Print the full absolute name of the library file @var{library} that |
13984 would be used when linking---and don't do anything else. With this | 14780 would be used when linking---and don't do anything else. With this |
14062 @samp{i686-pc-linux-gnu})---and don't do anything else. | 14858 @samp{i686-pc-linux-gnu})---and don't do anything else. |
14063 | 14859 |
14064 @item -dumpversion | 14860 @item -dumpversion |
14065 @opindex dumpversion | 14861 @opindex dumpversion |
14066 Print the compiler version (for example, @code{3.0}, @code{6.3.0} or @code{7})---and don't do | 14862 Print the compiler version (for example, @code{3.0}, @code{6.3.0} or @code{7})---and don't do |
14067 anything else. This is the compiler version used in filesystem paths, | 14863 anything else. This is the compiler version used in filesystem paths and |
14068 specs, can be depending on how the compiler has been configured just | 14864 specs. Depending on how the compiler has been configured it can be just |
14069 a single number (major version), two numbers separated by dot (major and | 14865 a single number (major version), two numbers separated by a dot (major and |
14070 minor version) or three numbers separated by dots (major, minor and patchlevel | 14866 minor version) or three numbers separated by dots (major, minor and patchlevel |
14071 version). | 14867 version). |
14072 | 14868 |
14073 @item -dumpfullversion | 14869 @item -dumpfullversion |
14074 @opindex dumpfullversion | 14870 @opindex dumpfullversion |
14075 Print the full compiler version, always 3 numbers separated by dots, | 14871 Print the full compiler version---and don't do anything else. The output is |
14076 major, minor and patchlevel version. | 14872 always three numbers separated by dots, major, minor and patchlevel version. |
14077 | 14873 |
14078 @item -dumpspecs | 14874 @item -dumpspecs |
14079 @opindex dumpspecs | 14875 @opindex dumpspecs |
14080 Print the compiler's built-in specs---and don't do anything else. (This | 14876 Print the compiler's built-in specs---and don't do anything else. (This |
14081 is used when GCC itself is being built.) @xref{Spec Files}. | 14877 is used when GCC itself is being built.) @xref{Spec Files}. |
14111 * AVR Options:: | 14907 * AVR Options:: |
14112 * Blackfin Options:: | 14908 * Blackfin Options:: |
14113 * C6X Options:: | 14909 * C6X Options:: |
14114 * CRIS Options:: | 14910 * CRIS Options:: |
14115 * CR16 Options:: | 14911 * CR16 Options:: |
14912 * C-SKY Options:: | |
14116 * Darwin Options:: | 14913 * Darwin Options:: |
14117 * DEC Alpha Options:: | 14914 * DEC Alpha Options:: |
14118 * FR30 Options:: | 14915 * FR30 Options:: |
14119 * FT32 Options:: | 14916 * FT32 Options:: |
14120 * FRV Options:: | 14917 * FRV Options:: |
14138 * Nios II Options:: | 14935 * Nios II Options:: |
14139 * Nvidia PTX Options:: | 14936 * Nvidia PTX Options:: |
14140 * PDP-11 Options:: | 14937 * PDP-11 Options:: |
14141 * picoChip Options:: | 14938 * picoChip Options:: |
14142 * PowerPC Options:: | 14939 * PowerPC Options:: |
14940 * PowerPC SPE Options:: | |
14143 * RISC-V Options:: | 14941 * RISC-V Options:: |
14144 * RL78 Options:: | 14942 * RL78 Options:: |
14145 * RS/6000 and PowerPC Options:: | 14943 * RS/6000 and PowerPC Options:: |
14146 * RX Options:: | 14944 * RX Options:: |
14147 * S/390 and zSeries Options:: | 14945 * S/390 and zSeries Options:: |
14216 @opindex mcmodel=large | 15014 @opindex mcmodel=large |
14217 Generate code for the large code model. This makes no assumptions about | 15015 Generate code for the large code model. This makes no assumptions about |
14218 addresses and sizes of sections. Programs can be statically linked only. | 15016 addresses and sizes of sections. Programs can be statically linked only. |
14219 | 15017 |
14220 @item -mstrict-align | 15018 @item -mstrict-align |
15019 @itemx -mno-strict-align | |
14221 @opindex mstrict-align | 15020 @opindex mstrict-align |
14222 Avoid generating memory accesses that may not be aligned on a natural object | 15021 @opindex mno-strict-align |
14223 boundary as described in the architecture specification. | 15022 Avoid or allow generating memory accesses that may not be aligned on a natural |
15023 object boundary as described in the architecture specification. | |
14224 | 15024 |
14225 @item -momit-leaf-frame-pointer | 15025 @item -momit-leaf-frame-pointer |
14226 @itemx -mno-omit-leaf-frame-pointer | 15026 @itemx -mno-omit-leaf-frame-pointer |
14227 @opindex momit-leaf-frame-pointer | 15027 @opindex momit-leaf-frame-pointer |
14228 @opindex mno-omit-leaf-frame-pointer | 15028 @opindex mno-omit-leaf-frame-pointer |
14259 Enable or disable the workaround for the ARM Cortex-A53 erratum number 843419. | 15059 Enable or disable the workaround for the ARM Cortex-A53 erratum number 843419. |
14260 This erratum workaround is made at link time and this will only pass the | 15060 This erratum workaround is made at link time and this will only pass the |
14261 corresponding flag to the linker. | 15061 corresponding flag to the linker. |
14262 | 15062 |
14263 @item -mlow-precision-recip-sqrt | 15063 @item -mlow-precision-recip-sqrt |
14264 @item -mno-low-precision-recip-sqrt | 15064 @itemx -mno-low-precision-recip-sqrt |
14265 @opindex mlow-precision-recip-sqrt | 15065 @opindex mlow-precision-recip-sqrt |
14266 @opindex mno-low-precision-recip-sqrt | 15066 @opindex mno-low-precision-recip-sqrt |
14267 Enable or disable the reciprocal square root approximation. | 15067 Enable or disable the reciprocal square root approximation. |
14268 This option only has an effect if @option{-ffast-math} or | 15068 This option only has an effect if @option{-ffast-math} or |
14269 @option{-funsafe-math-optimizations} is used as well. Enabling this reduces | 15069 @option{-funsafe-math-optimizations} is used as well. Enabling this reduces |
14270 precision of reciprocal square root results to about 16 bits for | 15070 precision of reciprocal square root results to about 16 bits for |
14271 single precision and to 32 bits for double precision. | 15071 single precision and to 32 bits for double precision. |
14272 | 15072 |
14273 @item -mlow-precision-sqrt | 15073 @item -mlow-precision-sqrt |
14274 @item -mno-low-precision-sqrt | 15074 @itemx -mno-low-precision-sqrt |
14275 @opindex -mlow-precision-sqrt | 15075 @opindex -mlow-precision-sqrt |
14276 @opindex -mno-low-precision-sqrt | 15076 @opindex -mno-low-precision-sqrt |
14277 Enable or disable the square root approximation. | 15077 Enable or disable the square root approximation. |
14278 This option only has an effect if @option{-ffast-math} or | 15078 This option only has an effect if @option{-ffast-math} or |
14279 @option{-funsafe-math-optimizations} is used as well. Enabling this reduces | 15079 @option{-funsafe-math-optimizations} is used as well. Enabling this reduces |
14280 precision of square root results to about 16 bits for | 15080 precision of square root results to about 16 bits for |
14281 single precision and to 32 bits for double precision. | 15081 single precision and to 32 bits for double precision. |
14282 If enabled, it implies @option{-mlow-precision-recip-sqrt}. | 15082 If enabled, it implies @option{-mlow-precision-recip-sqrt}. |
14283 | 15083 |
14284 @item -mlow-precision-div | 15084 @item -mlow-precision-div |
14285 @item -mno-low-precision-div | 15085 @itemx -mno-low-precision-div |
14286 @opindex -mlow-precision-div | 15086 @opindex -mlow-precision-div |
14287 @opindex -mno-low-precision-div | 15087 @opindex -mno-low-precision-div |
14288 Enable or disable the division approximation. | 15088 Enable or disable the division approximation. |
14289 This option only has an effect if @option{-ffast-math} or | 15089 This option only has an effect if @option{-ffast-math} or |
14290 @option{-funsafe-math-optimizations} is used as well. Enabling this reduces | 15090 @option{-funsafe-math-optimizations} is used as well. Enabling this reduces |
14291 precision of division results to about 16 bits for | 15091 precision of division results to about 16 bits for |
14292 single precision and to 32 bits for double precision. | 15092 single precision and to 32 bits for double precision. |
14293 | 15093 |
15094 @item -mtrack-speculation | |
15095 @itemx -mno-track-speculation | |
15096 Enable or disable generation of additional code to track speculative | |
15097 execution through conditional branches. The tracking state can then | |
15098 be used by the compiler when expanding calls to | |
15099 @code{__builtin_speculation_safe_copy} to permit a more efficient code | |
15100 sequence to be generated. | |
15101 | |
14294 @item -march=@var{name} | 15102 @item -march=@var{name} |
14295 @opindex march | 15103 @opindex march |
14296 Specify the name of the target architecture and, optionally, one or | 15104 Specify the name of the target architecture and, optionally, one or |
14297 more feature modifiers. This option has the form | 15105 more feature modifiers. This option has the form |
14298 @option{-march=@var{arch}@r{@{}+@r{[}no@r{]}@var{feature}@r{@}*}}. | 15106 @option{-march=@var{arch}@r{@{}+@r{[}no@r{]}@var{feature}@r{@}*}}. |
14299 | 15107 |
14300 The permissible values for @var{arch} are @samp{armv8-a}, | 15108 The permissible values for @var{arch} are @samp{armv8-a}, |
14301 @samp{armv8.1-a}, @samp{armv8.2-a}, @samp{armv8.3-a} or @var{native}. | 15109 @samp{armv8.1-a}, @samp{armv8.2-a}, @samp{armv8.3-a} or @samp{armv8.4-a} |
15110 or @var{native}. | |
15111 | |
15112 The value @samp{armv8.4-a} implies @samp{armv8.3-a} and enables compiler | |
15113 support for the ARMv8.4-A architecture extensions. | |
14302 | 15114 |
14303 The value @samp{armv8.3-a} implies @samp{armv8.2-a} and enables compiler | 15115 The value @samp{armv8.3-a} implies @samp{armv8.2-a} and enables compiler |
14304 support for the ARMv8.3-A architecture extensions. | 15116 support for the ARMv8.3-A architecture extensions. |
14305 | 15117 |
14306 The value @samp{armv8.2-a} implies @samp{armv8.1-a} and enables compiler | 15118 The value @samp{armv8.2-a} implies @samp{armv8.1-a} and enables compiler |
14330 @opindex mtune | 15142 @opindex mtune |
14331 Specify the name of the target processor for which GCC should tune the | 15143 Specify the name of the target processor for which GCC should tune the |
14332 performance of the code. Permissible values for this option are: | 15144 performance of the code. Permissible values for this option are: |
14333 @samp{generic}, @samp{cortex-a35}, @samp{cortex-a53}, @samp{cortex-a55}, | 15145 @samp{generic}, @samp{cortex-a35}, @samp{cortex-a53}, @samp{cortex-a55}, |
14334 @samp{cortex-a57}, @samp{cortex-a72}, @samp{cortex-a73}, @samp{cortex-a75}, | 15146 @samp{cortex-a57}, @samp{cortex-a72}, @samp{cortex-a73}, @samp{cortex-a75}, |
14335 @samp{exynos-m1}, @samp{falkor}, @samp{qdf24xx}, | 15147 @samp{cortex-a76}, @samp{exynos-m1}, @samp{falkor}, @samp{qdf24xx}, |
14336 @samp{xgene1}, @samp{vulcan}, @samp{thunderx}, | 15148 @samp{saphira}, @samp{phecda}, @samp{xgene1}, @samp{vulcan}, @samp{thunderx}, |
14337 @samp{thunderxt88}, @samp{thunderxt88p1}, @samp{thunderxt81}, | 15149 @samp{thunderxt88}, @samp{thunderxt88p1}, @samp{thunderxt81},@samp{tsv110}, |
14338 @samp{thunderxt83}, @samp{thunderx2t99}, @samp{cortex-a57.cortex-a53}, | 15150 @samp{thunderxt83}, @samp{thunderx2t99}, @samp{cortex-a57.cortex-a53}, |
14339 @samp{cortex-a72.cortex-a53}, @samp{cortex-a73.cortex-a35}, | 15151 @samp{cortex-a72.cortex-a53}, @samp{cortex-a73.cortex-a35}, |
14340 @samp{cortex-a73.cortex-a53}, @samp{cortex-a75.cortex-a55}, | 15152 @samp{cortex-a73.cortex-a53}, @samp{cortex-a75.cortex-a55}, |
15153 @samp{cortex-a76.cortex-a55} | |
14341 @samp{native}. | 15154 @samp{native}. |
14342 | 15155 |
14343 The values @samp{cortex-a57.cortex-a53}, @samp{cortex-a72.cortex-a53}, | 15156 The values @samp{cortex-a57.cortex-a53}, @samp{cortex-a72.cortex-a53}, |
14344 @samp{cortex-a73.cortex-a35}, @samp{cortex-a73.cortex-a53}, | 15157 @samp{cortex-a73.cortex-a35}, @samp{cortex-a73.cortex-a53}, |
14345 @samp{cortex-a75.cortex-a55} specify that GCC should tune for a | 15158 @samp{cortex-a75.cortex-a55}, @samp{cortex-a76.cortex-a55} specify that GCC |
14346 big.LITTLE system. | 15159 should tune for a big.LITTLE system. |
14347 | 15160 |
14348 Additionally on native AArch64 GNU/Linux systems the value | 15161 Additionally on native AArch64 GNU/Linux systems the value |
14349 @samp{native} tunes performance to the host system. This option has no effect | 15162 @samp{native} tunes performance to the host system. This option has no effect |
14350 if the compiler is unable to recognize the processor of the host system. | 15163 if the compiler is unable to recognize the processor of the host system. |
14351 | 15164 |
14381 for @var{string} in this option are not guaranteed to be consistent | 15194 for @var{string} in this option are not guaranteed to be consistent |
14382 across releases. | 15195 across releases. |
14383 | 15196 |
14384 This option is only intended to be useful when developing GCC. | 15197 This option is only intended to be useful when developing GCC. |
14385 | 15198 |
15199 @item -mverbose-cost-dump | |
15200 @opindex mverbose-cost-dump | |
15201 Enable verbose cost model dumping in the debug dump files. This option is | |
15202 provided for use in debugging the compiler. | |
15203 | |
14386 @item -mpc-relative-literal-loads | 15204 @item -mpc-relative-literal-loads |
14387 @itemx -mno-pc-relative-literal-loads | 15205 @itemx -mno-pc-relative-literal-loads |
14388 @opindex mpc-relative-literal-loads | 15206 @opindex mpc-relative-literal-loads |
14389 @opindex mno-pc-relative-literal-loads | 15207 @opindex mno-pc-relative-literal-loads |
14390 Enable or disable PC-relative literal loads. With this option literal pools are | 15208 Enable or disable PC-relative literal loads. With this option literal pools are |
14397 Select the function scope on which return address signing will be applied. | 15215 Select the function scope on which return address signing will be applied. |
14398 Permissible values are @samp{none}, which disables return address signing, | 15216 Permissible values are @samp{none}, which disables return address signing, |
14399 @samp{non-leaf}, which enables pointer signing for functions which are not leaf | 15217 @samp{non-leaf}, which enables pointer signing for functions which are not leaf |
14400 functions, and @samp{all}, which enables pointer signing for all functions. The | 15218 functions, and @samp{all}, which enables pointer signing for all functions. The |
14401 default value is @samp{none}. | 15219 default value is @samp{none}. |
15220 | |
15221 @item -msve-vector-bits=@var{bits} | |
15222 @opindex msve-vector-bits | |
15223 Specify the number of bits in an SVE vector register. This option only has | |
15224 an effect when SVE is enabled. | |
15225 | |
15226 GCC supports two forms of SVE code generation: ``vector-length | |
15227 agnostic'' output that works with any size of vector register and | |
15228 ``vector-length specific'' output that only works when the vector | |
15229 registers are a particular size. Replacing @var{bits} with | |
15230 @samp{scalable} selects vector-length agnostic output while | |
15231 replacing it with a number selects vector-length specific output. | |
15232 The possible lengths in the latter case are: 128, 256, 512, 1024 | |
15233 and 2048. @samp{scalable} is the default. | |
15234 | |
15235 At present, @samp{-msve-vector-bits=128} produces the same output | |
15236 as @samp{-msve-vector-bits=scalable}. | |
14402 | 15237 |
14403 @end table | 15238 @end table |
14404 | 15239 |
14405 @subsubsection @option{-march} and @option{-mcpu} Feature Modifiers | 15240 @subsubsection @option{-march} and @option{-mcpu} Feature Modifiers |
14406 @anchor{aarch64-feature-modifiers} | 15241 @anchor{aarch64-feature-modifiers} |
14421 values for options @option{-march} and @option{-mcpu}. | 15256 values for options @option{-march} and @option{-mcpu}. |
14422 @item simd | 15257 @item simd |
14423 Enable Advanced SIMD instructions. This also enables floating-point | 15258 Enable Advanced SIMD instructions. This also enables floating-point |
14424 instructions. This is on by default for all possible values for options | 15259 instructions. This is on by default for all possible values for options |
14425 @option{-march} and @option{-mcpu}. | 15260 @option{-march} and @option{-mcpu}. |
15261 @item sve | |
15262 Enable Scalable Vector Extension instructions. This also enables Advanced | |
15263 SIMD and floating-point instructions. | |
14426 @item lse | 15264 @item lse |
14427 Enable Large System Extension instructions. This is on by default for | 15265 Enable Large System Extension instructions. This is on by default for |
14428 @option{-march=armv8.1-a}. | 15266 @option{-march=armv8.1-a}. |
14429 @item rdma | 15267 @item rdma |
14430 Enable Round Double Multiply Accumulate instructions. This is on by default | 15268 Enable Round Double Multiply Accumulate instructions. This is on by default |
14431 for @option{-march=armv8.1-a}. | 15269 for @option{-march=armv8.1-a}. |
14432 @item fp16 | 15270 @item fp16 |
14433 Enable FP16 extension. This also enables floating-point instructions. | 15271 Enable FP16 extension. This also enables floating-point instructions. |
15272 @item fp16fml | |
15273 Enable FP16 fmla extension. This also enables FP16 extensions and | |
15274 floating-point instructions. This option is enabled by default for @option{-march=armv8.4-a}. Use of this option with architectures prior to Armv8.2-A is not supported. | |
15275 | |
14434 @item rcpc | 15276 @item rcpc |
14435 Enable the RcPc extension. This does not change code generation from GCC, | 15277 Enable the RcPc extension. This does not change code generation from GCC, |
14436 but is passed on to the assembler, enabling inline asm statements to use | 15278 but is passed on to the assembler, enabling inline asm statements to use |
14437 instructions from the RcPc extension. | 15279 instructions from the RcPc extension. |
14438 @item dotprod | 15280 @item dotprod |
14439 Enable the Dot Product extension. This also enables Advanced SIMD instructions. | 15281 Enable the Dot Product extension. This also enables Advanced SIMD instructions. |
15282 @item aes | |
15283 Enable the Armv8-a aes and pmull crypto extension. This also enables Advanced | |
15284 SIMD instructions. | |
15285 @item sha2 | |
15286 Enable the Armv8-a sha2 crypto extension. This also enables Advanced SIMD instructions. | |
15287 @item sha3 | |
15288 Enable the sha512 and sha3 crypto extension. This also enables Advanced SIMD | |
15289 instructions. Use of this option with architectures prior to Armv8.2-A is not supported. | |
15290 @item sm4 | |
15291 Enable the sm3 and sm4 crypto extension. This also enables Advanced SIMD instructions. | |
15292 Use of this option with architectures prior to Armv8.2-A is not supported. | |
15293 @item profile | |
15294 Enable the Statistical Profiling extension. This option is only to enable the | |
15295 extension at the assembler level and does not affect code generation. | |
14440 | 15296 |
14441 @end table | 15297 @end table |
14442 | 15298 |
14443 Feature @option{crypto} implies @option{simd}, which implies @option{fp}. | 15299 Feature @option{crypto} implies @option{aes}, @option{sha2}, and @option{simd}, |
15300 which implies @option{fp}. | |
14444 Conversely, @option{nofp} implies @option{nosimd}, which implies | 15301 Conversely, @option{nofp} implies @option{nosimd}, which implies |
14445 @option{nocrypto}. | 15302 @option{nocrypto}, @option{noaes} and @option{nosha2}. |
14446 | 15303 |
14447 @node Adapteva Epiphany Options | 15304 @node Adapteva Epiphany Options |
14448 @subsection Adapteva Epiphany Options | 15305 @subsection Adapteva Epiphany Options |
14449 | 15306 |
14450 These @samp{-m} options are defined for Adapteva Epiphany: | 15307 These @samp{-m} options are defined for Adapteva Epiphany: |
14613 @item -mbarrel-shifter | 15470 @item -mbarrel-shifter |
14614 @opindex mbarrel-shifter | 15471 @opindex mbarrel-shifter |
14615 Generate instructions supported by barrel shifter. This is the default | 15472 Generate instructions supported by barrel shifter. This is the default |
14616 unless @option{-mcpu=ARC601} or @samp{-mcpu=ARCEM} is in effect. | 15473 unless @option{-mcpu=ARC601} or @samp{-mcpu=ARCEM} is in effect. |
14617 | 15474 |
15475 @item -mjli-always | |
15476 @opindex mjli-alawys | |
15477 Force to call a function using jli_s instruction. This option is | |
15478 valid only for ARCv2 architecture. | |
15479 | |
14618 @item -mcpu=@var{cpu} | 15480 @item -mcpu=@var{cpu} |
14619 @opindex mcpu | 15481 @opindex mcpu |
14620 Set architecture type, register usage, and instruction scheduling | 15482 Set architecture type, register usage, and instruction scheduling |
14621 parameters for @var{cpu}. There are also shortcut alias options | 15483 parameters for @var{cpu}. There are also shortcut alias options |
14622 available for backward compatibility and convenience. Supported | 15484 available for backward compatibility and convenience. Supported |
14696 Compile for ARC 601 CPU with @code{norm} and @code{mul64}-family | 15558 Compile for ARC 601 CPU with @code{norm} and @code{mul64}-family |
14697 instructions enabled. | 15559 instructions enabled. |
14698 | 15560 |
14699 @item nps400 | 15561 @item nps400 |
14700 Compile for ARC 700 on NPS400 chip. | 15562 Compile for ARC 700 on NPS400 chip. |
15563 | |
15564 @item em_mini | |
15565 Compile for ARC EM minimalist configuration featuring reduced register | |
15566 set. | |
14701 | 15567 |
14702 @end table | 15568 @end table |
14703 | 15569 |
14704 @item -mdpfp | 15570 @item -mdpfp |
14705 @opindex mdpfp | 15571 @opindex mdpfp |
14955 hold the required loop-counter value. Depending on the width | 15821 hold the required loop-counter value. Depending on the width |
14956 specified, the compiler and run-time library might continue to use the | 15822 specified, the compiler and run-time library might continue to use the |
14957 loop mechanism for various needs. This option defines macro | 15823 loop mechanism for various needs. This option defines macro |
14958 @code{__ARC_LPC_WIDTH__} with the value of @var{width}. | 15824 @code{__ARC_LPC_WIDTH__} with the value of @var{width}. |
14959 | 15825 |
15826 @item -mrf16 | |
15827 @opindex mrf16 | |
15828 This option instructs the compiler to generate code for a 16-entry | |
15829 register file. This option defines the @code{__ARC_RF16__} | |
15830 preprocessor macro. | |
15831 | |
14960 @end table | 15832 @end table |
14961 | 15833 |
14962 The following options are passed through to the assembler, and also | 15834 The following options are passed through to the assembler, and also |
14963 define preprocessor macro symbols. | 15835 define preprocessor macro symbols. |
14964 | 15836 |
15160 @opindex mindexed-loads | 16032 @opindex mindexed-loads |
15161 Enable the use of indexed loads. This can be problematic because some | 16033 Enable the use of indexed loads. This can be problematic because some |
15162 optimizers then assume that indexed stores exist, which is not | 16034 optimizers then assume that indexed stores exist, which is not |
15163 the case. | 16035 the case. |
15164 | 16036 |
16037 @item -mlra | |
15165 @opindex mlra | 16038 @opindex mlra |
15166 Enable Local Register Allocation. This is still experimental for ARC, | 16039 Enable Local Register Allocation. This is still experimental for ARC, |
15167 so by default the compiler uses standard reload | 16040 so by default the compiler uses standard reload |
15168 (i.e. @option{-mno-lra}). | 16041 (i.e. @option{-mno-lra}). |
15169 | 16042 |
15464 @samp{armv4t}, | 16337 @samp{armv4t}, |
15465 @samp{armv5t}, @samp{armv5te}, | 16338 @samp{armv5t}, @samp{armv5te}, |
15466 @samp{armv6}, @samp{armv6j}, @samp{armv6k}, @samp{armv6kz}, @samp{armv6t2}, | 16339 @samp{armv6}, @samp{armv6j}, @samp{armv6k}, @samp{armv6kz}, @samp{armv6t2}, |
15467 @samp{armv6z}, @samp{armv6zk}, | 16340 @samp{armv6z}, @samp{armv6zk}, |
15468 @samp{armv7}, @samp{armv7-a}, @samp{armv7ve}, | 16341 @samp{armv7}, @samp{armv7-a}, @samp{armv7ve}, |
15469 @samp{armv8-a}, @samp{armv8.1-a}, @samp{armv8.2-a}, | 16342 @samp{armv8-a}, @samp{armv8.1-a}, @samp{armv8.2-a}, @samp{armv8.3-a}, |
16343 @samp{armv8.4-a}, | |
15470 @samp{armv7-r}, | 16344 @samp{armv7-r}, |
15471 @samp{armv8-r}, | 16345 @samp{armv8-r}, |
15472 @samp{armv6-m}, @samp{armv6s-m}, | 16346 @samp{armv6-m}, @samp{armv6s-m}, |
15473 @samp{armv7-m}, @samp{armv7e-m}, | 16347 @samp{armv7-m}, @samp{armv7e-m}, |
15474 @samp{armv8-m.base}, @samp{armv8-m.main}, | 16348 @samp{armv8-m.base}, @samp{armv8-m.main}, |
15475 @samp{iwmmxt} and @samp{iwmmxt2}. | 16349 @samp{iwmmxt} and @samp{iwmmxt2}. |
15476 | 16350 |
15477 Additionally, the following architectures, which lack support for the | 16351 Additionally, the following architectures, which lack support for the |
15478 Thumb exection state, are recognized but support is deprecated: | 16352 Thumb execution state, are recognized but support is deprecated: @samp{armv4}. |
15479 @samp{armv2}, @samp{armv2a}, @samp{armv3}, @samp{armv3m}, | |
15480 @samp{armv4}, @samp{armv5} and @samp{armv5e}. | |
15481 | 16353 |
15482 Many of the architectures support extensions. These can be added by | 16354 Many of the architectures support extensions. These can be added by |
15483 appending @samp{+@var{extension}} to the architecture name. Extension | 16355 appending @samp{+@var{extension}} to the architecture name. Extension |
15484 options are processed in order and capabilities accumulate. An extension | 16356 options are processed in order and capabilities accumulate. An extension |
15485 will also enable any necessary base extensions | 16357 will also enable any necessary base extensions |
15495 entirely disabled by the @samp{+nofp} option that follows it. | 16367 entirely disabled by the @samp{+nofp} option that follows it. |
15496 | 16368 |
15497 Most extension names are generically named, but have an effect that is | 16369 Most extension names are generically named, but have an effect that is |
15498 dependent upon the architecture to which it is applied. For example, | 16370 dependent upon the architecture to which it is applied. For example, |
15499 the @samp{+simd} option can be applied to both @samp{armv7-a} and | 16371 the @samp{+simd} option can be applied to both @samp{armv7-a} and |
15500 @samp{armv8-a} architectures, but will enable the original ARMv7 | 16372 @samp{armv8-a} architectures, but will enable the original ARMv7-A |
15501 Advanced SIMD (Neon) extensions for @samp{armv7-a} and the ARMv8-a | 16373 Advanced SIMD (Neon) extensions for @samp{armv7-a} and the ARMv8-A |
15502 variant for @samp{armv8-a}. | 16374 variant for @samp{armv8-a}. |
15503 | 16375 |
15504 The table below lists the supported extensions for each architecture. | 16376 The table below lists the supported extensions for each architecture. |
15505 Architectures not mentioned do not support any extensions. | 16377 Architectures not mentioned do not support any extensions. |
15506 | 16378 |
15507 @table @samp | 16379 @table @samp |
15508 @item armv5e | 16380 @item armv5te |
15509 @itemx armv5te | |
15510 @itemx armv6 | 16381 @itemx armv6 |
15511 @itemx armv6j | 16382 @itemx armv6j |
15512 @itemx armv6k | 16383 @itemx armv6k |
15513 @itemx armv6kz | 16384 @itemx armv6kz |
15514 @itemx armv6t2 | 16385 @itemx armv6t2 |
15637 @item armv8-a | 16508 @item armv8-a |
15638 @table @samp | 16509 @table @samp |
15639 @item +crc | 16510 @item +crc |
15640 The Cyclic Redundancy Check (CRC) instructions. | 16511 The Cyclic Redundancy Check (CRC) instructions. |
15641 @item +simd | 16512 @item +simd |
15642 The ARMv8 Advanced SIMD and floating-point instructions. | 16513 The ARMv8-A Advanced SIMD and floating-point instructions. |
15643 @item +crypto | 16514 @item +crypto |
15644 The cryptographic instructions. | 16515 The cryptographic instructions. |
15645 @item +nocrypto | 16516 @item +nocrypto |
15646 Disable the cryptographic isntructions. | 16517 Disable the cryptographic instructions. |
15647 @item +nofp | 16518 @item +nofp |
15648 Disable the floating-point, Advanced SIMD and cryptographic instructions. | 16519 Disable the floating-point, Advanced SIMD and cryptographic instructions. |
15649 @end table | 16520 @end table |
15650 | 16521 |
15651 @item armv8.1-a | 16522 @item armv8.1-a |
15652 @table @samp | 16523 @table @samp |
15653 @item +simd | 16524 @item +simd |
15654 The ARMv8.1 Advanced SIMD and floating-point instructions. | 16525 The ARMv8.1-A Advanced SIMD and floating-point instructions. |
15655 | 16526 |
15656 @item +crypto | 16527 @item +crypto |
15657 The cryptographic instructions. This also enables the Advanced SIMD and | 16528 The cryptographic instructions. This also enables the Advanced SIMD and |
15658 floating-point instructions. | 16529 floating-point instructions. |
15659 | 16530 |
15660 @item +nocrypto | 16531 @item +nocrypto |
15661 Disable the cryptographic isntructions. | 16532 Disable the cryptographic instructions. |
15662 | 16533 |
15663 @item +nofp | 16534 @item +nofp |
15664 Disable the floating-point, Advanced SIMD and cryptographic instructions. | 16535 Disable the floating-point, Advanced SIMD and cryptographic instructions. |
15665 @end table | 16536 @end table |
15666 | 16537 |
15667 @item armv8.2-a | 16538 @item armv8.2-a |
16539 @itemx armv8.3-a | |
15668 @table @samp | 16540 @table @samp |
15669 @item +fp16 | 16541 @item +fp16 |
15670 The half-precision floating-point data processing instructions. | 16542 The half-precision floating-point data processing instructions. |
15671 This also enables the Advanced SIMD and floating-point instructions. | 16543 This also enables the Advanced SIMD and floating-point instructions. |
15672 | 16544 |
16545 @item +fp16fml | |
16546 The half-precision floating-point fmla extension. This also enables | |
16547 the half-precision floating-point extension and Advanced SIMD and | |
16548 floating-point instructions. | |
16549 | |
15673 @item +simd | 16550 @item +simd |
15674 The ARMv8.1 Advanced SIMD and floating-point instructions. | 16551 The ARMv8.1-A Advanced SIMD and floating-point instructions. |
15675 | 16552 |
15676 @item +crypto | 16553 @item +crypto |
15677 The cryptographic instructions. This also enables the Advanced SIMD and | 16554 The cryptographic instructions. This also enables the Advanced SIMD and |
15678 floating-point instructions. | 16555 floating-point instructions. |
15679 | 16556 |
15680 @item +dotprod | 16557 @item +dotprod |
15681 Enable the Dot Product extension. This also enables Advanced SIMD instructions. | 16558 Enable the Dot Product extension. This also enables Advanced SIMD instructions. |
16559 | |
16560 @item +nocrypto | |
16561 Disable the cryptographic extension. | |
16562 | |
16563 @item +nofp | |
16564 Disable the floating-point, Advanced SIMD and cryptographic instructions. | |
16565 @end table | |
16566 | |
16567 @item armv8.4-a | |
16568 @table @samp | |
16569 @item +fp16 | |
16570 The half-precision floating-point data processing instructions. | |
16571 This also enables the Advanced SIMD and floating-point instructions as well | |
16572 as the Dot Product extension and the half-precision floating-point fmla | |
16573 extension. | |
16574 | |
16575 @item +simd | |
16576 The ARMv8.3-A Advanced SIMD and floating-point instructions as well as the | |
16577 Dot Product extension. | |
16578 | |
16579 @item +crypto | |
16580 The cryptographic instructions. This also enables the Advanced SIMD and | |
16581 floating-point instructions as well as the Dot Product extension. | |
15682 | 16582 |
15683 @item +nocrypto | 16583 @item +nocrypto |
15684 Disable the cryptographic extension. | 16584 Disable the cryptographic extension. |
15685 | 16585 |
15686 @item +nofp | 16586 @item +nofp |
15745 @item +crc | 16645 @item +crc |
15746 The Cyclic Redundancy Check (CRC) instructions. | 16646 The Cyclic Redundancy Check (CRC) instructions. |
15747 @item +fp.sp | 16647 @item +fp.sp |
15748 The single-precision FPv5 floating-point instructions. | 16648 The single-precision FPv5 floating-point instructions. |
15749 @item +simd | 16649 @item +simd |
15750 The ARMv8 Advanced SIMD and floating-point instructions. | 16650 The ARMv8-A Advanced SIMD and floating-point instructions. |
15751 @item +crypto | 16651 @item +crypto |
15752 The cryptographic instructions. | 16652 The cryptographic instructions. |
15753 @item +nocrypto | 16653 @item +nocrypto |
15754 Disable the cryptographic isntructions. | 16654 Disable the cryptographic instructions. |
15755 @item +nofp | 16655 @item +nofp |
15756 Disable the floating-point, Advanced SIMD and cryptographic instructions. | 16656 Disable the floating-point, Advanced SIMD and cryptographic instructions. |
15757 @end table | 16657 @end table |
15758 | 16658 |
15759 @end table | 16659 @end table |
15788 @samp{arm1156t2-s}, @samp{arm1156t2f-s}, @samp{arm1176jz-s}, @samp{arm1176jzf-s}, | 16688 @samp{arm1156t2-s}, @samp{arm1156t2f-s}, @samp{arm1176jz-s}, @samp{arm1176jzf-s}, |
15789 @samp{generic-armv7-a}, @samp{cortex-a5}, @samp{cortex-a7}, @samp{cortex-a8}, | 16689 @samp{generic-armv7-a}, @samp{cortex-a5}, @samp{cortex-a7}, @samp{cortex-a8}, |
15790 @samp{cortex-a9}, @samp{cortex-a12}, @samp{cortex-a15}, @samp{cortex-a17}, | 16690 @samp{cortex-a9}, @samp{cortex-a12}, @samp{cortex-a15}, @samp{cortex-a17}, |
15791 @samp{cortex-a32}, @samp{cortex-a35}, @samp{cortex-a53}, @samp{cortex-a55}, | 16691 @samp{cortex-a32}, @samp{cortex-a35}, @samp{cortex-a53}, @samp{cortex-a55}, |
15792 @samp{cortex-a57}, @samp{cortex-a72}, @samp{cortex-a73}, @samp{cortex-a75}, | 16692 @samp{cortex-a57}, @samp{cortex-a72}, @samp{cortex-a73}, @samp{cortex-a75}, |
15793 @samp{cortex-r4}, @samp{cortex-r4f}, @samp{cortex-r5}, @samp{cortex-r7}, | 16693 @samp{cortex-a76}, @samp{cortex-r4}, @samp{cortex-r4f}, @samp{cortex-r5}, |
15794 @samp{cortex-r8}, @samp{cortex-r52}, | 16694 @samp{cortex-r7}, @samp{cortex-r8}, @samp{cortex-r52}, |
15795 @samp{cortex-m33}, | 16695 @samp{cortex-m33}, |
15796 @samp{cortex-m23}, | 16696 @samp{cortex-m23}, |
15797 @samp{cortex-m7}, | 16697 @samp{cortex-m7}, |
15798 @samp{cortex-m4}, | 16698 @samp{cortex-m4}, |
15799 @samp{cortex-m3}, | 16699 @samp{cortex-m3}, |
15813 Additionally, this option can specify that GCC should tune the performance | 16713 Additionally, this option can specify that GCC should tune the performance |
15814 of the code for a big.LITTLE system. Permissible names are: | 16714 of the code for a big.LITTLE system. Permissible names are: |
15815 @samp{cortex-a15.cortex-a7}, @samp{cortex-a17.cortex-a7}, | 16715 @samp{cortex-a15.cortex-a7}, @samp{cortex-a17.cortex-a7}, |
15816 @samp{cortex-a57.cortex-a53}, @samp{cortex-a72.cortex-a53}, | 16716 @samp{cortex-a57.cortex-a53}, @samp{cortex-a72.cortex-a53}, |
15817 @samp{cortex-a72.cortex-a35}, @samp{cortex-a73.cortex-a53}, | 16717 @samp{cortex-a72.cortex-a35}, @samp{cortex-a73.cortex-a53}, |
15818 @samp{cortex-a75.cortex-a55}. | 16718 @samp{cortex-a75.cortex-a55}, @samp{cortex-a76.cortex-a55}. |
15819 | 16719 |
15820 @option{-mtune=generic-@var{arch}} specifies that GCC should tune the | 16720 @option{-mtune=generic-@var{arch}} specifies that GCC should tune the |
15821 performance for a blend of processors within architecture @var{arch}. | 16721 performance for a blend of processors within architecture @var{arch}. |
15822 The aim is to generate code that run well on the current most popular | 16722 The aim is to generate code that run well on the current most popular |
15823 processors, balancing between optimizations that benefit some CPUs in the | 16723 processors, balancing between optimizations that benefit some CPUs in the |
16061 | 16961 |
16062 You can also override the ARM and Thumb mode for each function | 16962 You can also override the ARM and Thumb mode for each function |
16063 by using the @code{target("thumb")} and @code{target("arm")} function attributes | 16963 by using the @code{target("thumb")} and @code{target("arm")} function attributes |
16064 (@pxref{ARM Function Attributes}) or pragmas (@pxref{Function Specific Option Pragmas}). | 16964 (@pxref{ARM Function Attributes}) or pragmas (@pxref{Function Specific Option Pragmas}). |
16065 | 16965 |
16966 @item -mflip-thumb | |
16967 @opindex mflip-thumb | |
16968 Switch ARM/Thumb modes on alternating functions. | |
16969 This option is provided for regression testing of mixed Thumb/ARM code | |
16970 generation, and is not intended for ordinary use in compiling code. | |
16971 | |
16066 @item -mtpcs-frame | 16972 @item -mtpcs-frame |
16067 @opindex mtpcs-frame | 16973 @opindex mtpcs-frame |
16068 Generate a stack frame that is compliant with the Thumb Procedure Call | 16974 Generate a stack frame that is compliant with the Thumb Procedure Call |
16069 Standard for all non-leaf functions. (A leaf function is one that does | 16975 Standard for all non-leaf functions. (A leaf function is one that does |
16070 not call any other functions.) The default is @option{-mno-tpcs-frame}. | 16976 not call any other functions.) The default is @option{-mno-tpcs-frame}. |
16164 on Thumb2. However, this may change in future releases of GCC. | 17070 on Thumb2. However, this may change in future releases of GCC. |
16165 Divided syntax should be considered deprecated. | 17071 Divided syntax should be considered deprecated. |
16166 | 17072 |
16167 @item -mrestrict-it | 17073 @item -mrestrict-it |
16168 @opindex mrestrict-it | 17074 @opindex mrestrict-it |
16169 Restricts generation of IT blocks to conform to the rules of ARMv8. | 17075 Restricts generation of IT blocks to conform to the rules of ARMv8-A. |
16170 IT blocks can only contain a single 16-bit instruction from a select | 17076 IT blocks can only contain a single 16-bit instruction from a select |
16171 set of instructions. This option is on by default for ARMv8 Thumb mode. | 17077 set of instructions. This option is on by default for ARMv8-A Thumb mode. |
16172 | 17078 |
16173 @item -mprint-tune-info | 17079 @item -mprint-tune-info |
16174 @opindex mprint-tune-info | 17080 @opindex mprint-tune-info |
16175 Print CPU tuning information as comment in assembler file. This is | 17081 Print CPU tuning information as comment in assembler file. This is |
16176 an option used only for regression testing of the compiler and not | 17082 an option used only for regression testing of the compiler and not |
16177 intended for ordinary use in compiling code. This option is disabled | 17083 intended for ordinary use in compiling code. This option is disabled |
16178 by default. | 17084 by default. |
17085 | |
17086 @item -mverbose-cost-dump | |
17087 @opindex mverbose-cost-dump | |
17088 Enable verbose cost model dumping in the debug dump files. This option is | |
17089 provided for use in debugging the compiler. | |
16179 | 17090 |
16180 @item -mpure-code | 17091 @item -mpure-code |
16181 @opindex mpure-code | 17092 @opindex mpure-code |
16182 Do not allow constant data to be placed in code sections. | 17093 Do not allow constant data to be placed in code sections. |
16183 Additionally, when compiling for ELF object format give all text sections the | 17094 Additionally, when compiling for ELF object format give all text sections the |
16260 @code{char} is 1 byte, an @code{int} is 1 byte, a @code{long} is 2 bytes, | 17171 @code{char} is 1 byte, an @code{int} is 1 byte, a @code{long} is 2 bytes, |
16261 and @code{long long} is 4 bytes. Please note that this option does not | 17172 and @code{long long} is 4 bytes. Please note that this option does not |
16262 conform to the C standards, but it results in smaller code | 17173 conform to the C standards, but it results in smaller code |
16263 size. | 17174 size. |
16264 | 17175 |
17176 @item -mmain-is-OS_task | |
17177 @opindex mmain-is-OS_task | |
17178 Do not save registers in @code{main}. The effect is the same like | |
17179 attaching attribute @ref{AVR Function Attributes,,@code{OS_task}} | |
17180 to @code{main}. It is activated per default if optimization is on. | |
17181 | |
16265 @item -mn-flash=@var{num} | 17182 @item -mn-flash=@var{num} |
16266 @opindex mn-flash | 17183 @opindex mn-flash |
16267 Assume that the flash memory has a size of | 17184 Assume that the flash memory has a size of |
16268 @var{num} times 64@tie{}KiB. | 17185 @var{num} times 64@tie{}KiB. |
16269 | 17186 |
16348 @opindex nodevicelib | 17265 @opindex nodevicelib |
16349 Don't link against AVR-LibC's device specific library @code{lib<mcu>.a}. | 17266 Don't link against AVR-LibC's device specific library @code{lib<mcu>.a}. |
16350 | 17267 |
16351 @item -Waddr-space-convert | 17268 @item -Waddr-space-convert |
16352 @opindex Waddr-space-convert | 17269 @opindex Waddr-space-convert |
17270 @opindex Wno-addr-space-convert | |
16353 Warn about conversions between address spaces in the case where the | 17271 Warn about conversions between address spaces in the case where the |
16354 resulting address space is not contained in the incoming address space. | 17272 resulting address space is not contained in the incoming address space. |
16355 | 17273 |
16356 @item -Wmisspelled-isr | 17274 @item -Wmisspelled-isr |
16357 @opindex Wmisspelled-isr | 17275 @opindex Wmisspelled-isr |
17276 @opindex Wno-misspelled-isr | |
16358 Warn if the ISR is misspelled, i.e. without __vector prefix. | 17277 Warn if the ISR is misspelled, i.e. without __vector prefix. |
16359 Enabled by default. | 17278 Enabled by default. |
16360 @end table | 17279 @end table |
16361 | 17280 |
16362 @subsubsection @code{EIND} and Devices with More Than 128 Ki Bytes of Flash | 17281 @subsubsection @code{EIND} and Devices with More Than 128 Ki Bytes of Flash |
16744 | 17663 |
16745 @item -momit-leaf-frame-pointer | 17664 @item -momit-leaf-frame-pointer |
16746 @opindex momit-leaf-frame-pointer | 17665 @opindex momit-leaf-frame-pointer |
16747 Don't keep the frame pointer in a register for leaf functions. This | 17666 Don't keep the frame pointer in a register for leaf functions. This |
16748 avoids the instructions to save, set up and restore frame pointers and | 17667 avoids the instructions to save, set up and restore frame pointers and |
16749 makes an extra register available in leaf functions. The option | 17668 makes an extra register available in leaf functions. |
16750 @option{-fomit-frame-pointer} removes the frame pointer for all functions, | |
16751 which might make debugging harder. | |
16752 | 17669 |
16753 @item -mspecld-anomaly | 17670 @item -mspecld-anomaly |
16754 @opindex mspecld-anomaly | 17671 @opindex mspecld-anomaly |
16755 When enabled, the compiler ensures that the generated code does not | 17672 When enabled, the compiler ensures that the generated code does not |
16756 contain speculative loads after jump instructions. If this option is used, | 17673 contain speculative loads after jump instructions. If this option is used, |
17113 @opindex mdata-model | 18030 @opindex mdata-model |
17114 Choose a data model. The choices for @var{model} are @samp{near}, | 18031 Choose a data model. The choices for @var{model} are @samp{near}, |
17115 @samp{far} or @samp{medium}. @samp{medium} is default. | 18032 @samp{far} or @samp{medium}. @samp{medium} is default. |
17116 However, @samp{far} is not valid with @option{-mcr16c}, as the | 18033 However, @samp{far} is not valid with @option{-mcr16c}, as the |
17117 CR16C architecture does not support the far data model. | 18034 CR16C architecture does not support the far data model. |
18035 @end table | |
18036 | |
18037 @node C-SKY Options | |
18038 @subsection C-SKY Options | |
18039 @cindex C-SKY Options | |
18040 | |
18041 GCC supports these options when compiling for C-SKY V2 processors. | |
18042 | |
18043 @table @gcctabopt | |
18044 | |
18045 @item -march=@var{arch} | |
18046 @opindex march= | |
18047 Specify the C-SKY target architecture. Valid values for @var{arch} are: | |
18048 @samp{ck801}, @samp{ck802}, @samp{ck803}, @samp{ck807}, and @samp{ck810}. | |
18049 The default is @samp{ck810}. | |
18050 | |
18051 @item -mcpu=@var{cpu} | |
18052 @opindex mcpu= | |
18053 Specify the C-SKY target processor. Valid values for @var{cpu} are: | |
18054 @samp{ck801}, @samp{ck801t}, | |
18055 @samp{ck802}, @samp{ck802t}, @samp{ck802j}, | |
18056 @samp{ck803}, @samp{ck803h}, @samp{ck803t}, @samp{ck803ht}, | |
18057 @samp{ck803f}, @samp{ck803fh}, @samp{ck803e}, @samp{ck803eh}, | |
18058 @samp{ck803et}, @samp{ck803eht}, @samp{ck803ef}, @samp{ck803efh}, | |
18059 @samp{ck803ft}, @samp{ck803eft}, @samp{ck803efht}, @samp{ck803r1}, | |
18060 @samp{ck803hr1}, @samp{ck803tr1}, @samp{ck803htr1}, @samp{ck803fr1}, | |
18061 @samp{ck803fhr1}, @samp{ck803er1}, @samp{ck803ehr1}, @samp{ck803etr1}, | |
18062 @samp{ck803ehtr1}, @samp{ck803efr1}, @samp{ck803efhr1}, @samp{ck803ftr1}, | |
18063 @samp{ck803eftr1}, @samp{ck803efhtr1}, | |
18064 @samp{ck803s}, @samp{ck803st}, @samp{ck803se}, @samp{ck803sf}, | |
18065 @samp{ck803sef}, @samp{ck803seft}, | |
18066 @samp{ck807e}, @samp{ck807ef}, @samp{ck807}, @samp{ck807f}, | |
18067 @samp{ck810e}, @samp{ck810et}, @samp{ck810ef}, @samp{ck810eft}, | |
18068 @samp{ck810}, @samp{ck810v}, @samp{ck810f}, @samp{ck810t}, @samp{ck810fv}, | |
18069 @samp{ck810tv}, @samp{ck810ft}, and @samp{ck810ftv}. | |
18070 | |
18071 @item -mbig-endian | |
18072 @opindex mbig-endian | |
18073 @itemx -EB | |
18074 @opindex -EB | |
18075 @itemx -mlittle-endian | |
18076 @opindex mlittle-endian | |
18077 @itemx -EL | |
18078 @opindex -EL | |
18079 | |
18080 Select big- or little-endian code. The default is little-endian. | |
18081 | |
18082 @item -mhard-float | |
18083 @opindex mhard-float | |
18084 @itemx -msoft-float | |
18085 @opindex msoft-float | |
18086 | |
18087 Select hardware or software floating-point implementations. | |
18088 The default is soft float. | |
18089 | |
18090 @item -mdouble-float | |
18091 @itemx -mno-double-float | |
18092 @opindex mdouble-float | |
18093 When @option{-mhard-float} is in effect, enable generation of | |
18094 double-precision float instructions. This is the default except | |
18095 when compiling for CK803. | |
18096 | |
18097 @item -mfdivdu | |
18098 @itemx -mno-fdivdu | |
18099 @opindex mfdivdu | |
18100 When @option{-mhard-float} is in effect, enable generation of | |
18101 @code{frecipd}, @code{fsqrtd}, and @code{fdivd} instructions. | |
18102 This is the default except when compiling for CK803. | |
18103 | |
18104 @item -mfpu=@var{fpu} | |
18105 @opindex mfpu= | |
18106 Select the floating-point processor. This option can only be used with | |
18107 @option{-mhard-float}. | |
18108 Values for @var{fpu} are | |
18109 @samp{fpv2_sf} (equivalent to @samp{-mno-double-float -mno-fdivdu}), | |
18110 @samp{fpv2} (@samp{-mdouble-float -mno-divdu}), and | |
18111 @samp{fpv2_divd} (@samp{-mdouble-float -mdivdu}). | |
18112 | |
18113 @item -melrw | |
18114 @itemx -mno-elrw | |
18115 @opindex melrw | |
18116 Enable the extended @code{lrw} instruction. This option defaults to on | |
18117 for CK801 and off otherwise. | |
18118 | |
18119 @item -mistack | |
18120 @itemx -mno-istack | |
18121 @opindex mistack | |
18122 Enable interrupt stack instructions; the default is off. | |
18123 | |
18124 The @option{-mistack} option is required to handle the | |
18125 @code{interrupt} and @code{isr} function attributes | |
18126 (@pxref{C-SKY Function Attributes}). | |
18127 | |
18128 @item -mmp | |
18129 @opindex mmp | |
18130 Enable multiprocessor instructions; the default is off. | |
18131 | |
18132 @item -mcp | |
18133 @opindex mcp | |
18134 Enable coprocessor instructions; the default is off. | |
18135 | |
18136 @item -mcache | |
18137 @opindex mcache | |
18138 Enable coprocessor instructions; the default is off. | |
18139 | |
18140 @item -msecurity | |
18141 @opindex msecurity | |
18142 Enable C-SKY security instructions; the default is off. | |
18143 | |
18144 @item -mtrust | |
18145 @opindex mtrust | |
18146 Enable C-SKY trust instructions; the default is off. | |
18147 | |
18148 @item -mdsp | |
18149 @opindex mdsp | |
18150 @itemx -medsp | |
18151 @opindex medsp | |
18152 @itemx -mvdsp | |
18153 @opindex mvdsp | |
18154 Enable C-SKY DSP, Enhanced DSP, or Vector DSP instructions, respectively. | |
18155 All of these options default to off. | |
18156 | |
18157 @item -mdiv | |
18158 @itemx -mno-div | |
18159 @opindex mdiv | |
18160 Generate divide instructions. Default is off. | |
18161 | |
18162 @item -msmart | |
18163 @itemx -mno-smart | |
18164 @opindex msmart | |
18165 Generate code for Smart Mode, using only registers numbered 0-7 to allow | |
18166 use of 16-bit instructions. This option is ignored for CK801 where this | |
18167 is the required behavior, and it defaults to on for CK802. | |
18168 For other targets, the default is off. | |
18169 | |
18170 @item -mhigh-registers | |
18171 @itemx -mno-high-registers | |
18172 @opindex mhigh-registers | |
18173 Generate code using the high registers numbered 16-31. This option | |
18174 is not supported on CK801, CK802, or CK803, and is enabled by default | |
18175 for other processors. | |
18176 | |
18177 @item -manchor | |
18178 @itemx -mno-anchor | |
18179 @opindex manchor | |
18180 Generate code using global anchor symbol addresses. | |
18181 | |
18182 @item -mpushpop | |
18183 @itemx -mno-pushpop | |
18184 @opindex mpushpop | |
18185 Generate code using @code{push} and @code{pop} instructions. This option | |
18186 defaults to on. | |
18187 | |
18188 @item -mmultiple-stld | |
18189 @itemx -mstm | |
18190 @itemx -mno-multiple-stld | |
18191 @itemx -mno-stm | |
18192 @opindex mmultiple-stld | |
18193 Generate code using @code{stm} and @code{ldm} instructions. This option | |
18194 isn't supported on CK801 but is enabled by default on other processors. | |
18195 | |
18196 @item -mconstpool | |
18197 @itemx -mno-constpool | |
18198 @opindex mconstpool | |
18199 Create constant pools in the compiler instead of deferring it to the | |
18200 assembler. This option is the default and required for correct code | |
18201 generation on CK801 and CK802, and is optional on other processors. | |
18202 | |
18203 @item -mstack-size | |
18204 @item -mno-stack-size | |
18205 @opindex mstack-size | |
18206 Emit @code{.stack_size} directives for each function in the assembly | |
18207 output. This option defaults to off. | |
18208 | |
18209 @item -mccrt | |
18210 @itemx -mno-ccrt | |
18211 @opindex mccrt | |
18212 Generate code for the C-SKY compiler runtime instead of libgcc. This | |
18213 option defaults to off. | |
18214 | |
18215 @item -mbranch-cost=@var{n} | |
18216 @opindex mbranch-cost= | |
18217 Set the branch costs to roughly @code{n} instructions. The default is 1. | |
18218 | |
18219 @item -msched-prolog | |
18220 @itemx -mno-sched-prolog | |
18221 @opindex msched-prolog | |
18222 Permit scheduling of function prologue and epilogue sequences. Using | |
18223 this option can result in code that is not compliant with the C-SKY V2 ABI | |
18224 prologue requirements and that cannot be debugged or backtraced. | |
18225 It is disabled by default. | |
18226 | |
17118 @end table | 18227 @end table |
17119 | 18228 |
17120 @node Darwin Options | 18229 @node Darwin Options |
17121 @subsection Darwin Options | 18230 @subsection Darwin Options |
17122 @cindex Darwin options | 18231 @cindex Darwin options |
17759 | 18868 |
17760 @item -mnodiv | 18869 @item -mnodiv |
17761 @opindex mnodiv | 18870 @opindex mnodiv |
17762 Do not use div and mod instructions. | 18871 Do not use div and mod instructions. |
17763 | 18872 |
18873 @item -mft32b | |
18874 @opindex mft32b | |
18875 Enable use of the extended instructions of the FT32B processor. | |
18876 | |
18877 @item -mcompress | |
18878 @opindex mcompress | |
18879 Compress all code using the Ft32B code compression scheme. | |
18880 | |
18881 @item -mnopm | |
18882 @opindex mnopm | |
18883 Do not generate code that reads program memory. | |
18884 | |
17764 @end table | 18885 @end table |
17765 | 18886 |
17766 @node FRV Options | 18887 @node FRV Options |
17767 @subsection FRV Options | 18888 @subsection FRV Options |
17768 @cindex FRV Options | 18889 @cindex FRV Options |
19533 @opindex mcpu= | 20654 @opindex mcpu= |
19534 Use features of, and schedule code for, the given CPU. | 20655 Use features of, and schedule code for, the given CPU. |
19535 Supported values are in the format @samp{v@var{X}.@var{YY}.@var{Z}}, | 20656 Supported values are in the format @samp{v@var{X}.@var{YY}.@var{Z}}, |
19536 where @var{X} is a major version, @var{YY} is the minor version, and | 20657 where @var{X} is a major version, @var{YY} is the minor version, and |
19537 @var{Z} is compatibility code. Example values are @samp{v3.00.a}, | 20658 @var{Z} is compatibility code. Example values are @samp{v3.00.a}, |
19538 @samp{v4.00.b}, @samp{v5.00.a}, @samp{v5.00.b}, @samp{v5.00.b}, @samp{v6.00.a}. | 20659 @samp{v4.00.b}, @samp{v5.00.a}, @samp{v5.00.b}, @samp{v6.00.a}. |
19539 | 20660 |
19540 @item -mxl-soft-mul | 20661 @item -mxl-soft-mul |
19541 @opindex mxl-soft-mul | 20662 @opindex mxl-soft-mul |
19542 Use software multiply emulation (default). | 20663 Use software multiply emulation (default). |
19543 | 20664 |
19592 @item -mxl-mode-@var{app-model} | 20713 @item -mxl-mode-@var{app-model} |
19593 Select application model @var{app-model}. Valid models are | 20714 Select application model @var{app-model}. Valid models are |
19594 @table @samp | 20715 @table @samp |
19595 @item executable | 20716 @item executable |
19596 normal executable (default), uses startup code @file{crt0.o}. | 20717 normal executable (default), uses startup code @file{crt0.o}. |
20718 | |
20719 @item -mpic-data-is-text-relative | |
20720 @opindex mpic-data-is-text-relative | |
20721 Assume that the displacement between the text and data segments is fixed | |
20722 at static link time. This allows data to be referenced by offset from start of | |
20723 text address instead of GOT since PC-relative addressing is not supported. | |
19597 | 20724 |
19598 @item xmdstub | 20725 @item xmdstub |
19599 for use with Xilinx Microprocessor Debugger (XMD) based | 20726 for use with Xilinx Microprocessor Debugger (XMD) based |
19600 software intrusive debug agent called xmdstub. This uses startup file | 20727 software intrusive debug agent called xmdstub. This uses startup file |
19601 @file{crt1.o} and sets the start address of the program to 0x800. | 20728 @file{crt1.o} and sets the start address of the program to 0x800. |
19649 @samp{24kc}, @samp{24kf2_1}, @samp{24kf1_1}, | 20776 @samp{24kc}, @samp{24kf2_1}, @samp{24kf1_1}, |
19650 @samp{24kec}, @samp{24kef2_1}, @samp{24kef1_1}, | 20777 @samp{24kec}, @samp{24kef2_1}, @samp{24kef1_1}, |
19651 @samp{34kc}, @samp{34kf2_1}, @samp{34kf1_1}, @samp{34kn}, | 20778 @samp{34kc}, @samp{34kf2_1}, @samp{34kf1_1}, @samp{34kn}, |
19652 @samp{74kc}, @samp{74kf2_1}, @samp{74kf1_1}, @samp{74kf3_2}, | 20779 @samp{74kc}, @samp{74kf2_1}, @samp{74kf1_1}, @samp{74kf3_2}, |
19653 @samp{1004kc}, @samp{1004kf2_1}, @samp{1004kf1_1}, | 20780 @samp{1004kc}, @samp{1004kf2_1}, @samp{1004kf1_1}, |
19654 @samp{i6400}, | 20781 @samp{i6400}, @samp{i6500}, |
19655 @samp{interaptiv}, | 20782 @samp{interaptiv}, |
19656 @samp{loongson2e}, @samp{loongson2f}, @samp{loongson3a}, | 20783 @samp{loongson2e}, @samp{loongson2f}, @samp{loongson3a}, |
19657 @samp{m4k}, | 20784 @samp{m4k}, |
19658 @samp{m14k}, @samp{m14kc}, @samp{m14ke}, @samp{m14kec}, | 20785 @samp{m14k}, @samp{m14kc}, @samp{m14ke}, @samp{m14kec}, |
19659 @samp{m5100}, @samp{m5101}, | 20786 @samp{m5100}, @samp{m5101}, |
19660 @samp{octeon}, @samp{octeon+}, @samp{octeon2}, @samp{octeon3}, | 20787 @samp{octeon}, @samp{octeon+}, @samp{octeon2}, @samp{octeon3}, |
19661 @samp{orion}, | 20788 @samp{orion}, |
19662 @samp{p5600}, | 20789 @samp{p5600}, @samp{p6600}, |
19663 @samp{r2000}, @samp{r3000}, @samp{r3900}, @samp{r4000}, @samp{r4400}, | 20790 @samp{r2000}, @samp{r3000}, @samp{r3900}, @samp{r4000}, @samp{r4400}, |
19664 @samp{r4600}, @samp{r4650}, @samp{r4700}, @samp{r6000}, @samp{r8000}, | 20791 @samp{r4600}, @samp{r4650}, @samp{r4700}, @samp{r6000}, @samp{r8000}, |
19665 @samp{rm7000}, @samp{rm9000}, | 20792 @samp{rm7000}, @samp{rm9000}, |
19666 @samp{r10000}, @samp{r12000}, @samp{r14000}, @samp{r16000}, | 20793 @samp{r10000}, @samp{r12000}, @samp{r14000}, @samp{r16000}, |
19667 @samp{sb1}, | 20794 @samp{sb1}, |
19790 Generate MIPS16 code on alternating functions. This option is provided | 20917 Generate MIPS16 code on alternating functions. This option is provided |
19791 for regression testing of mixed MIPS16/non-MIPS16 code generation, and is | 20918 for regression testing of mixed MIPS16/non-MIPS16 code generation, and is |
19792 not intended for ordinary use in compiling user code. | 20919 not intended for ordinary use in compiling user code. |
19793 | 20920 |
19794 @item -minterlink-compressed | 20921 @item -minterlink-compressed |
19795 @item -mno-interlink-compressed | 20922 @itemx -mno-interlink-compressed |
19796 @opindex minterlink-compressed | 20923 @opindex minterlink-compressed |
19797 @opindex mno-interlink-compressed | 20924 @opindex mno-interlink-compressed |
19798 Require (do not require) that code using the standard (uncompressed) MIPS ISA | 20925 Require (do not require) that code using the standard (uncompressed) MIPS ISA |
19799 be link-compatible with MIPS16 and microMIPS code, and vice versa. | 20926 be link-compatible with MIPS16 and microMIPS code, and vice versa. |
19800 | 20927 |
20130 @itemx -mno-xpa | 21257 @itemx -mno-xpa |
20131 @opindex mxpa | 21258 @opindex mxpa |
20132 @opindex mno-xpa | 21259 @opindex mno-xpa |
20133 Use (do not use) the MIPS eXtended Physical Address (XPA) instructions. | 21260 Use (do not use) the MIPS eXtended Physical Address (XPA) instructions. |
20134 | 21261 |
21262 @item -mcrc | |
21263 @itemx -mno-crc | |
21264 @opindex mcrc | |
21265 @opindex mno-crc | |
21266 Use (do not use) the MIPS Cyclic Redundancy Check (CRC) instructions. | |
21267 | |
21268 @item -mginv | |
21269 @itemx -mno-ginv | |
21270 @opindex mginv | |
21271 @opindex mno-ginv | |
21272 Use (do not use) the MIPS Global INValidate (GINV) instructions. | |
21273 | |
20135 @item -mlong64 | 21274 @item -mlong64 |
20136 @opindex mlong64 | 21275 @opindex mlong64 |
20137 Force @code{long} types to be 64 bits wide. See @option{-mlong32} for | 21276 Force @code{long} types to be 64 bits wide. See @option{-mlong32} for |
20138 an explanation of the default and the way that the pointer size is | 21277 an explanation of the default and the way that the pointer size is |
20139 determined. | 21278 determined. |
20371 @opindex nocpp | 21510 @opindex nocpp |
20372 Tell the MIPS assembler to not run its preprocessor over user | 21511 Tell the MIPS assembler to not run its preprocessor over user |
20373 assembler files (with a @samp{.s} suffix) when assembling them. | 21512 assembler files (with a @samp{.s} suffix) when assembling them. |
20374 | 21513 |
20375 @item -mfix-24k | 21514 @item -mfix-24k |
20376 @item -mno-fix-24k | 21515 @itemx -mno-fix-24k |
20377 @opindex mfix-24k | 21516 @opindex mfix-24k |
20378 @opindex mno-fix-24k | 21517 @opindex mno-fix-24k |
20379 Work around the 24K E48 (lost data on stores during refill) errata. | 21518 Work around the 24K E48 (lost data on stores during refill) errata. |
20380 The workarounds are implemented by the assembler rather than by GCC@. | 21519 The workarounds are implemented by the assembler rather than by GCC@. |
20381 | 21520 |
20463 ``F1'' and ``F2'' floating-point errata.) | 21602 ``F1'' and ``F2'' floating-point errata.) |
20464 | 21603 |
20465 @item -mr10k-cache-barrier=@var{setting} | 21604 @item -mr10k-cache-barrier=@var{setting} |
20466 @opindex mr10k-cache-barrier | 21605 @opindex mr10k-cache-barrier |
20467 Specify whether GCC should insert cache barriers to avoid the | 21606 Specify whether GCC should insert cache barriers to avoid the |
20468 side-effects of speculation on R10K processors. | 21607 side effects of speculation on R10K processors. |
20469 | 21608 |
20470 In common with many processors, the R10K tries to predict the outcome | 21609 In common with many processors, the R10K tries to predict the outcome |
20471 of a conditional branch and speculatively executes instructions from | 21610 of a conditional branch and speculatively executes instructions from |
20472 the ``taken'' branch. It later aborts these instructions if the | 21611 the ``taken'' branch. It later aborts these instructions if the |
20473 predicted outcome is wrong. However, on the R10K, even aborted | 21612 predicted outcome is wrong. However, on the R10K, even aborted |
21036 | 22175 |
21037 @item -mno-cmov | 22176 @item -mno-cmov |
21038 @opindex mno-cmov | 22177 @opindex mno-cmov |
21039 Do not generate conditional move instructions. | 22178 Do not generate conditional move instructions. |
21040 | 22179 |
21041 @item -mperf-ext | 22180 @item -mext-perf |
21042 @opindex mperf-ext | 22181 @opindex mperf-ext |
21043 Generate performance extension instructions. | 22182 Generate performance extension instructions. |
21044 | 22183 |
21045 @item -mno-perf-ext | 22184 @item -mno-ext-perf |
21046 @opindex mno-perf-ext | 22185 @opindex mno-perf-ext |
21047 Do not generate performance extension instructions. | 22186 Do not generate performance extension instructions. |
22187 | |
22188 @item -mext-perf2 | |
22189 @opindex mperf-ext | |
22190 Generate performance extension 2 instructions. | |
22191 | |
22192 @item -mno-ext-perf2 | |
22193 @opindex mno-perf-ext | |
22194 Do not generate performance extension 2 instructions. | |
22195 | |
22196 @item -mext-string | |
22197 @opindex mperf-ext | |
22198 Generate string extension instructions. | |
22199 | |
22200 @item -mno-ext-string | |
22201 @opindex mno-perf-ext | |
22202 Do not generate string extension instructions. | |
21048 | 22203 |
21049 @item -mv3push | 22204 @item -mv3push |
21050 @opindex mv3push | 22205 @opindex mv3push |
21051 Generate v3 push25/pop25 instructions. | 22206 Generate v3 push25/pop25 instructions. |
21052 | 22207 |
21115 Put global and static objects less than or equal to @var{num} bytes | 22270 Put global and static objects less than or equal to @var{num} bytes |
21116 into the small data or BSS sections instead of the normal data or BSS | 22271 into the small data or BSS sections instead of the normal data or BSS |
21117 sections. The default value of @var{num} is 8. | 22272 sections. The default value of @var{num} is 8. |
21118 | 22273 |
21119 @item -mgpopt=@var{option} | 22274 @item -mgpopt=@var{option} |
21120 @item -mgpopt | 22275 @itemx -mgpopt |
21121 @itemx -mno-gpopt | 22276 @itemx -mno-gpopt |
21122 @opindex mgpopt | 22277 @opindex mgpopt |
21123 @opindex mno-gpopt | 22278 @opindex mno-gpopt |
21124 Generate (do not generate) GP-relative accesses. The following | 22279 Generate (do not generate) GP-relative accesses. The following |
21125 @var{option} names are recognized: | 22280 @var{option} names are recognized: |
21179 @code{section} attributes on variable declarations | 22334 @code{section} attributes on variable declarations |
21180 (@pxref{Common Variable Attributes}) and a custom linker script. | 22335 (@pxref{Common Variable Attributes}) and a custom linker script. |
21181 The @var{regexp} is a POSIX Extended Regular Expression. | 22336 The @var{regexp} is a POSIX Extended Regular Expression. |
21182 | 22337 |
21183 This option does not affect the behavior of the @option{-G} option, and | 22338 This option does not affect the behavior of the @option{-G} option, and |
21184 and the specified sections are in addition to the standard @code{.sdata} | 22339 the specified sections are in addition to the standard @code{.sdata} |
21185 and @code{.sbss} small-data sections that are recognized by @option{-mgpopt}. | 22340 and @code{.sbss} small-data sections that are recognized by @option{-mgpopt}. |
21186 | 22341 |
21187 @item -mr0rel-sec=@var{regexp} | 22342 @item -mr0rel-sec=@var{regexp} |
21188 @opindex mr0rel-sec | 22343 @opindex mr0rel-sec |
21189 This option specifies names of sections that can be accessed via a | 22344 This option specifies names of sections that can be accessed via a |
21482 @itemx -m64 | 22637 @itemx -m64 |
21483 @opindex m32 | 22638 @opindex m32 |
21484 @opindex m64 | 22639 @opindex m64 |
21485 Generate code for 32-bit or 64-bit ABI. | 22640 Generate code for 32-bit or 64-bit ABI. |
21486 | 22641 |
22642 @item -misa=@var{ISA-string} | |
22643 @opindex march | |
22644 Generate code for given the specified PTX ISA (e.g.@ @samp{sm_35}). ISA | |
22645 strings must be lower-case. Valid ISA strings include @samp{sm_30} and | |
22646 @samp{sm_35}. The default ISA is sm_30. | |
22647 | |
21487 @item -mmainkernel | 22648 @item -mmainkernel |
21488 @opindex mmainkernel | 22649 @opindex mmainkernel |
21489 Link in code for a __main kernel. This is for stand-alone instead of | 22650 Link in code for a __main kernel. This is for stand-alone instead of |
21490 offloading execution. | 22651 offloading execution. |
21491 | 22652 |
21535 | 22696 |
21536 @table @gcctabopt | 22697 @table @gcctabopt |
21537 @item -mfpu | 22698 @item -mfpu |
21538 @opindex mfpu | 22699 @opindex mfpu |
21539 Use hardware FPP floating point. This is the default. (FIS floating | 22700 Use hardware FPP floating point. This is the default. (FIS floating |
21540 point on the PDP-11/40 is not supported.) | 22701 point on the PDP-11/40 is not supported.) Implies -m45. |
21541 | 22702 |
21542 @item -msoft-float | 22703 @item -msoft-float |
21543 @opindex msoft-float | 22704 @opindex msoft-float |
21544 Do not use hardware floating point. | 22705 Do not use hardware floating point. |
21545 | 22706 |
21551 @opindex mno-ac0 | 22712 @opindex mno-ac0 |
21552 Return floating-point results in memory. This is the default. | 22713 Return floating-point results in memory. This is the default. |
21553 | 22714 |
21554 @item -m40 | 22715 @item -m40 |
21555 @opindex m40 | 22716 @opindex m40 |
21556 Generate code for a PDP-11/40. | 22717 Generate code for a PDP-11/40. Implies -msoft-float -mno-split. |
21557 | 22718 |
21558 @item -m45 | 22719 @item -m45 |
21559 @opindex m45 | 22720 @opindex m45 |
21560 Generate code for a PDP-11/45. This is the default. | 22721 Generate code for a PDP-11/45. This is the default. |
21561 | 22722 |
21562 @item -m10 | 22723 @item -m10 |
21563 @opindex m10 | 22724 @opindex m10 |
21564 Generate code for a PDP-11/10. | 22725 Generate code for a PDP-11/10. Implies -msoft-float -mno-split. |
21565 | |
21566 @item -mbcopy-builtin | |
21567 @opindex mbcopy-builtin | |
21568 Use inline @code{movmemhi} patterns for copying memory. This is the | |
21569 default. | |
21570 | |
21571 @item -mbcopy | |
21572 @opindex mbcopy | |
21573 Do not use inline @code{movmemhi} patterns for copying memory. | |
21574 | 22726 |
21575 @item -mint16 | 22727 @item -mint16 |
21576 @itemx -mno-int32 | 22728 @itemx -mno-int32 |
21577 @opindex mint16 | 22729 @opindex mint16 |
21578 @opindex mno-int32 | 22730 @opindex mno-int32 |
21582 @itemx -mno-int16 | 22734 @itemx -mno-int16 |
21583 @opindex mint32 | 22735 @opindex mint32 |
21584 @opindex mno-int16 | 22736 @opindex mno-int16 |
21585 Use 32-bit @code{int}. | 22737 Use 32-bit @code{int}. |
21586 | 22738 |
21587 @item -mfloat64 | 22739 @item -msplit |
21588 @itemx -mno-float32 | 22740 @opindex msplit |
21589 @opindex mfloat64 | 22741 Target has split instruction and data space. Implies -m45. |
21590 @opindex mno-float32 | |
21591 Use 64-bit @code{float}. This is the default. | |
21592 | |
21593 @item -mfloat32 | |
21594 @itemx -mno-float64 | |
21595 @opindex mfloat32 | |
21596 @opindex mno-float64 | |
21597 Use 32-bit @code{float}. | |
21598 | |
21599 @item -mabshi | |
21600 @opindex mabshi | |
21601 Use @code{abshi2} pattern. This is the default. | |
21602 | |
21603 @item -mno-abshi | |
21604 @opindex mno-abshi | |
21605 Do not use @code{abshi2} pattern. | |
21606 | |
21607 @item -mbranch-expensive | |
21608 @opindex mbranch-expensive | |
21609 Pretend that branches are expensive. This is for experimenting with | |
21610 code generation only. | |
21611 | |
21612 @item -mbranch-cheap | |
21613 @opindex mbranch-cheap | |
21614 Do not pretend that branches are expensive. This is the default. | |
21615 | 22742 |
21616 @item -munix-asm | 22743 @item -munix-asm |
21617 @opindex munix-asm | 22744 @opindex munix-asm |
21618 Use Unix assembler syntax. This is the default when configured for | 22745 Use Unix assembler syntax. |
21619 @samp{pdp11-*-bsd}. | |
21620 | 22746 |
21621 @item -mdec-asm | 22747 @item -mdec-asm |
21622 @opindex mdec-asm | 22748 @opindex mdec-asm |
21623 Use DEC assembler syntax. This is the default when configured for any | 22749 Use DEC assembler syntax. |
21624 PDP-11 target other than @samp{pdp11-*-bsd}. | 22750 |
22751 @item -mgnu-asm | |
22752 @opindex mgnu-asm | |
22753 Use GNU assembler syntax. This is the default. | |
22754 | |
22755 @item -mlra | |
22756 @opindex mlra | |
22757 Use the new LRA register allocator. By default, the old ``reload'' | |
22758 allocator is used. | |
21625 @end table | 22759 @end table |
21626 | 22760 |
21627 @node picoChip Options | 22761 @node picoChip Options |
21628 @subsection picoChip Options | 22762 @subsection picoChip Options |
21629 @cindex picoChip options | 22763 @cindex picoChip options |
21676 @subsection PowerPC Options | 22810 @subsection PowerPC Options |
21677 @cindex PowerPC options | 22811 @cindex PowerPC options |
21678 | 22812 |
21679 These are listed under @xref{RS/6000 and PowerPC Options}. | 22813 These are listed under @xref{RS/6000 and PowerPC Options}. |
21680 | 22814 |
22815 @node PowerPC SPE Options | |
22816 @subsection PowerPC SPE Options | |
22817 @cindex PowerPC SPE options | |
22818 | |
22819 These @samp{-m} options are defined for PowerPC SPE: | |
22820 @table @gcctabopt | |
22821 @item -mmfcrf | |
22822 @itemx -mno-mfcrf | |
22823 @itemx -mpopcntb | |
22824 @itemx -mno-popcntb | |
22825 @opindex mmfcrf | |
22826 @opindex mno-mfcrf | |
22827 @opindex mpopcntb | |
22828 @opindex mno-popcntb | |
22829 You use these options to specify which instructions are available on the | |
22830 processor you are using. The default value of these options is | |
22831 determined when configuring GCC@. Specifying the | |
22832 @option{-mcpu=@var{cpu_type}} overrides the specification of these | |
22833 options. We recommend you use the @option{-mcpu=@var{cpu_type}} option | |
22834 rather than the options listed above. | |
22835 | |
22836 The @option{-mmfcrf} option allows GCC to generate the move from | |
22837 condition register field instruction implemented on the POWER4 | |
22838 processor and other processors that support the PowerPC V2.01 | |
22839 architecture. | |
22840 The @option{-mpopcntb} option allows GCC to generate the popcount and | |
22841 double-precision FP reciprocal estimate instruction implemented on the | |
22842 POWER5 processor and other processors that support the PowerPC V2.02 | |
22843 architecture. | |
22844 | |
22845 @item -mcpu=@var{cpu_type} | |
22846 @opindex mcpu | |
22847 Set architecture type, register usage, and | |
22848 instruction scheduling parameters for machine type @var{cpu_type}. | |
22849 Supported values for @var{cpu_type} are @samp{8540}, @samp{8548}, | |
22850 and @samp{native}. | |
22851 | |
22852 @option{-mcpu=powerpc} specifies pure 32-bit PowerPC (either | |
22853 endian), with an appropriate, generic processor model assumed for | |
22854 scheduling purposes. | |
22855 | |
22856 Specifying @samp{native} as cpu type detects and selects the | |
22857 architecture option that corresponds to the host processor of the | |
22858 system performing the compilation. | |
22859 @option{-mcpu=native} has no effect if GCC does not recognize the | |
22860 processor. | |
22861 | |
22862 The other options specify a specific processor. Code generated under | |
22863 those options runs best on that processor, and may not run at all on | |
22864 others. | |
22865 | |
22866 The @option{-mcpu} options automatically enable or disable the | |
22867 following options: | |
22868 | |
22869 @gccoptlist{-mhard-float -mmfcrf -mmultiple @gol | |
22870 -mpopcntb -mpopcntd @gol | |
22871 -msingle-float -mdouble-float @gol | |
22872 -mfloat128} | |
22873 | |
22874 The particular options set for any particular CPU varies between | |
22875 compiler versions, depending on what setting seems to produce optimal | |
22876 code for that CPU; it doesn't necessarily reflect the actual hardware's | |
22877 capabilities. If you wish to set an individual option to a particular | |
22878 value, you may specify it after the @option{-mcpu} option, like | |
22879 @option{-mcpu=8548}. | |
22880 | |
22881 @item -mtune=@var{cpu_type} | |
22882 @opindex mtune | |
22883 Set the instruction scheduling parameters for machine type | |
22884 @var{cpu_type}, but do not set the architecture type or register usage, | |
22885 as @option{-mcpu=@var{cpu_type}} does. The same | |
22886 values for @var{cpu_type} are used for @option{-mtune} as for | |
22887 @option{-mcpu}. If both are specified, the code generated uses the | |
22888 architecture and registers set by @option{-mcpu}, but the | |
22889 scheduling parameters set by @option{-mtune}. | |
22890 | |
22891 @item -msecure-plt | |
22892 @opindex msecure-plt | |
22893 Generate code that allows @command{ld} and @command{ld.so} | |
22894 to build executables and shared | |
22895 libraries with non-executable @code{.plt} and @code{.got} sections. | |
22896 This is a PowerPC | |
22897 32-bit SYSV ABI option. | |
22898 | |
22899 @item -mbss-plt | |
22900 @opindex mbss-plt | |
22901 Generate code that uses a BSS @code{.plt} section that @command{ld.so} | |
22902 fills in, and | |
22903 requires @code{.plt} and @code{.got} | |
22904 sections that are both writable and executable. | |
22905 This is a PowerPC 32-bit SYSV ABI option. | |
22906 | |
22907 @item -misel | |
22908 @itemx -mno-isel | |
22909 @opindex misel | |
22910 @opindex mno-isel | |
22911 This switch enables or disables the generation of ISEL instructions. | |
22912 | |
22913 @item -misel=@var{yes/no} | |
22914 This switch has been deprecated. Use @option{-misel} and | |
22915 @option{-mno-isel} instead. | |
22916 | |
22917 @item -mspe | |
22918 @itemx -mno-spe | |
22919 @opindex mspe | |
22920 @opindex mno-spe | |
22921 This switch enables or disables the generation of SPE simd | |
22922 instructions. | |
22923 | |
22924 @item -mspe=@var{yes/no} | |
22925 This option has been deprecated. Use @option{-mspe} and | |
22926 @option{-mno-spe} instead. | |
22927 | |
22928 @item -mfloat128 | |
22929 @itemx -mno-float128 | |
22930 @opindex mfloat128 | |
22931 @opindex mno-float128 | |
22932 Enable/disable the @var{__float128} keyword for IEEE 128-bit floating point | |
22933 and use either software emulation for IEEE 128-bit floating point or | |
22934 hardware instructions. | |
22935 | |
22936 @item -mfloat-gprs=@var{yes/single/double/no} | |
22937 @itemx -mfloat-gprs | |
22938 @opindex mfloat-gprs | |
22939 This switch enables or disables the generation of floating-point | |
22940 operations on the general-purpose registers for architectures that | |
22941 support it. | |
22942 | |
22943 The argument @samp{yes} or @samp{single} enables the use of | |
22944 single-precision floating-point operations. | |
22945 | |
22946 The argument @samp{double} enables the use of single and | |
22947 double-precision floating-point operations. | |
22948 | |
22949 The argument @samp{no} disables floating-point operations on the | |
22950 general-purpose registers. | |
22951 | |
22952 This option is currently only available on the MPC854x. | |
22953 | |
22954 @item -mfull-toc | |
22955 @itemx -mno-fp-in-toc | |
22956 @itemx -mno-sum-in-toc | |
22957 @itemx -mminimal-toc | |
22958 @opindex mfull-toc | |
22959 @opindex mno-fp-in-toc | |
22960 @opindex mno-sum-in-toc | |
22961 @opindex mminimal-toc | |
22962 Modify generation of the TOC (Table Of Contents), which is created for | |
22963 every executable file. The @option{-mfull-toc} option is selected by | |
22964 default. In that case, GCC allocates at least one TOC entry for | |
22965 each unique non-automatic variable reference in your program. GCC | |
22966 also places floating-point constants in the TOC@. However, only | |
22967 16,384 entries are available in the TOC@. | |
22968 | |
22969 If you receive a linker error message that saying you have overflowed | |
22970 the available TOC space, you can reduce the amount of TOC space used | |
22971 with the @option{-mno-fp-in-toc} and @option{-mno-sum-in-toc} options. | |
22972 @option{-mno-fp-in-toc} prevents GCC from putting floating-point | |
22973 constants in the TOC and @option{-mno-sum-in-toc} forces GCC to | |
22974 generate code to calculate the sum of an address and a constant at | |
22975 run time instead of putting that sum into the TOC@. You may specify one | |
22976 or both of these options. Each causes GCC to produce very slightly | |
22977 slower and larger code at the expense of conserving TOC space. | |
22978 | |
22979 If you still run out of space in the TOC even when you specify both of | |
22980 these options, specify @option{-mminimal-toc} instead. This option causes | |
22981 GCC to make only one TOC entry for every file. When you specify this | |
22982 option, GCC produces code that is slower and larger but which | |
22983 uses extremely little TOC space. You may wish to use this option | |
22984 only on files that contain less frequently-executed code. | |
22985 | |
22986 @item -maix32 | |
22987 @opindex maix32 | |
22988 Disables the 64-bit ABI. GCC defaults to @option{-maix32}. | |
22989 | |
22990 @item -mxl-compat | |
22991 @itemx -mno-xl-compat | |
22992 @opindex mxl-compat | |
22993 @opindex mno-xl-compat | |
22994 Produce code that conforms more closely to IBM XL compiler semantics | |
22995 when using AIX-compatible ABI@. Pass floating-point arguments to | |
22996 prototyped functions beyond the register save area (RSA) on the stack | |
22997 in addition to argument FPRs. Do not assume that most significant | |
22998 double in 128-bit long double value is properly rounded when comparing | |
22999 values and converting to double. Use XL symbol names for long double | |
23000 support routines. | |
23001 | |
23002 The AIX calling convention was extended but not initially documented to | |
23003 handle an obscure K&R C case of calling a function that takes the | |
23004 address of its arguments with fewer arguments than declared. IBM XL | |
23005 compilers access floating-point arguments that do not fit in the | |
23006 RSA from the stack when a subroutine is compiled without | |
23007 optimization. Because always storing floating-point arguments on the | |
23008 stack is inefficient and rarely needed, this option is not enabled by | |
23009 default and only is necessary when calling subroutines compiled by IBM | |
23010 XL compilers without optimization. | |
23011 | |
23012 @item -malign-natural | |
23013 @itemx -malign-power | |
23014 @opindex malign-natural | |
23015 @opindex malign-power | |
23016 On AIX, 32-bit Darwin, and 64-bit PowerPC GNU/Linux, the option | |
23017 @option{-malign-natural} overrides the ABI-defined alignment of larger | |
23018 types, such as floating-point doubles, on their natural size-based boundary. | |
23019 The option @option{-malign-power} instructs GCC to follow the ABI-specified | |
23020 alignment rules. GCC defaults to the standard alignment defined in the ABI@. | |
23021 | |
23022 On 64-bit Darwin, natural alignment is the default, and @option{-malign-power} | |
23023 is not supported. | |
23024 | |
23025 @item -msoft-float | |
23026 @itemx -mhard-float | |
23027 @opindex msoft-float | |
23028 @opindex mhard-float | |
23029 Generate code that does not use (uses) the floating-point register set. | |
23030 Software floating-point emulation is provided if you use the | |
23031 @option{-msoft-float} option, and pass the option to GCC when linking. | |
23032 | |
23033 @item -msingle-float | |
23034 @itemx -mdouble-float | |
23035 @opindex msingle-float | |
23036 @opindex mdouble-float | |
23037 Generate code for single- or double-precision floating-point operations. | |
23038 @option{-mdouble-float} implies @option{-msingle-float}. | |
23039 | |
23040 @item -mmultiple | |
23041 @itemx -mno-multiple | |
23042 @opindex mmultiple | |
23043 @opindex mno-multiple | |
23044 Generate code that uses (does not use) the load multiple word | |
23045 instructions and the store multiple word instructions. These | |
23046 instructions are generated by default on POWER systems, and not | |
23047 generated on PowerPC systems. Do not use @option{-mmultiple} on little-endian | |
23048 PowerPC systems, since those instructions do not work when the | |
23049 processor is in little-endian mode. The exceptions are PPC740 and | |
23050 PPC750 which permit these instructions in little-endian mode. | |
23051 | |
23052 @item -mupdate | |
23053 @itemx -mno-update | |
23054 @opindex mupdate | |
23055 @opindex mno-update | |
23056 Generate code that uses (does not use) the load or store instructions | |
23057 that update the base register to the address of the calculated memory | |
23058 location. These instructions are generated by default. If you use | |
23059 @option{-mno-update}, there is a small window between the time that the | |
23060 stack pointer is updated and the address of the previous frame is | |
23061 stored, which means code that walks the stack frame across interrupts or | |
23062 signals may get corrupted data. | |
23063 | |
23064 @item -mavoid-indexed-addresses | |
23065 @itemx -mno-avoid-indexed-addresses | |
23066 @opindex mavoid-indexed-addresses | |
23067 @opindex mno-avoid-indexed-addresses | |
23068 Generate code that tries to avoid (not avoid) the use of indexed load | |
23069 or store instructions. These instructions can incur a performance | |
23070 penalty on Power6 processors in certain situations, such as when | |
23071 stepping through large arrays that cross a 16M boundary. This option | |
23072 is enabled by default when targeting Power6 and disabled otherwise. | |
23073 | |
23074 @item -mfused-madd | |
23075 @itemx -mno-fused-madd | |
23076 @opindex mfused-madd | |
23077 @opindex mno-fused-madd | |
23078 Generate code that uses (does not use) the floating-point multiply and | |
23079 accumulate instructions. These instructions are generated by default | |
23080 if hardware floating point is used. The machine-dependent | |
23081 @option{-mfused-madd} option is now mapped to the machine-independent | |
23082 @option{-ffp-contract=fast} option, and @option{-mno-fused-madd} is | |
23083 mapped to @option{-ffp-contract=off}. | |
23084 | |
23085 @item -mno-strict-align | |
23086 @itemx -mstrict-align | |
23087 @opindex mno-strict-align | |
23088 @opindex mstrict-align | |
23089 On System V.4 and embedded PowerPC systems do not (do) assume that | |
23090 unaligned memory references are handled by the system. | |
23091 | |
23092 @item -mrelocatable | |
23093 @itemx -mno-relocatable | |
23094 @opindex mrelocatable | |
23095 @opindex mno-relocatable | |
23096 Generate code that allows (does not allow) a static executable to be | |
23097 relocated to a different address at run time. A simple embedded | |
23098 PowerPC system loader should relocate the entire contents of | |
23099 @code{.got2} and 4-byte locations listed in the @code{.fixup} section, | |
23100 a table of 32-bit addresses generated by this option. For this to | |
23101 work, all objects linked together must be compiled with | |
23102 @option{-mrelocatable} or @option{-mrelocatable-lib}. | |
23103 @option{-mrelocatable} code aligns the stack to an 8-byte boundary. | |
23104 | |
23105 @item -mrelocatable-lib | |
23106 @itemx -mno-relocatable-lib | |
23107 @opindex mrelocatable-lib | |
23108 @opindex mno-relocatable-lib | |
23109 Like @option{-mrelocatable}, @option{-mrelocatable-lib} generates a | |
23110 @code{.fixup} section to allow static executables to be relocated at | |
23111 run time, but @option{-mrelocatable-lib} does not use the smaller stack | |
23112 alignment of @option{-mrelocatable}. Objects compiled with | |
23113 @option{-mrelocatable-lib} may be linked with objects compiled with | |
23114 any combination of the @option{-mrelocatable} options. | |
23115 | |
23116 @item -mno-toc | |
23117 @itemx -mtoc | |
23118 @opindex mno-toc | |
23119 @opindex mtoc | |
23120 On System V.4 and embedded PowerPC systems do not (do) assume that | |
23121 register 2 contains a pointer to a global area pointing to the addresses | |
23122 used in the program. | |
23123 | |
23124 @item -mlittle | |
23125 @itemx -mlittle-endian | |
23126 @opindex mlittle | |
23127 @opindex mlittle-endian | |
23128 On System V.4 and embedded PowerPC systems compile code for the | |
23129 processor in little-endian mode. The @option{-mlittle-endian} option is | |
23130 the same as @option{-mlittle}. | |
23131 | |
23132 @item -mbig | |
23133 @itemx -mbig-endian | |
23134 @opindex mbig | |
23135 @opindex mbig-endian | |
23136 On System V.4 and embedded PowerPC systems compile code for the | |
23137 processor in big-endian mode. The @option{-mbig-endian} option is | |
23138 the same as @option{-mbig}. | |
23139 | |
23140 @item -mdynamic-no-pic | |
23141 @opindex mdynamic-no-pic | |
23142 On Darwin and Mac OS X systems, compile code so that it is not | |
23143 relocatable, but that its external references are relocatable. The | |
23144 resulting code is suitable for applications, but not shared | |
23145 libraries. | |
23146 | |
23147 @item -msingle-pic-base | |
23148 @opindex msingle-pic-base | |
23149 Treat the register used for PIC addressing as read-only, rather than | |
23150 loading it in the prologue for each function. The runtime system is | |
23151 responsible for initializing this register with an appropriate value | |
23152 before execution begins. | |
23153 | |
23154 @item -mprioritize-restricted-insns=@var{priority} | |
23155 @opindex mprioritize-restricted-insns | |
23156 This option controls the priority that is assigned to | |
23157 dispatch-slot restricted instructions during the second scheduling | |
23158 pass. The argument @var{priority} takes the value @samp{0}, @samp{1}, | |
23159 or @samp{2} to assign no, highest, or second-highest (respectively) | |
23160 priority to dispatch-slot restricted | |
23161 instructions. | |
23162 | |
23163 @item -msched-costly-dep=@var{dependence_type} | |
23164 @opindex msched-costly-dep | |
23165 This option controls which dependences are considered costly | |
23166 by the target during instruction scheduling. The argument | |
23167 @var{dependence_type} takes one of the following values: | |
23168 | |
23169 @table @asis | |
23170 @item @samp{no} | |
23171 No dependence is costly. | |
23172 | |
23173 @item @samp{all} | |
23174 All dependences are costly. | |
23175 | |
23176 @item @samp{true_store_to_load} | |
23177 A true dependence from store to load is costly. | |
23178 | |
23179 @item @samp{store_to_load} | |
23180 Any dependence from store to load is costly. | |
23181 | |
23182 @item @var{number} | |
23183 Any dependence for which the latency is greater than or equal to | |
23184 @var{number} is costly. | |
23185 @end table | |
23186 | |
23187 @item -minsert-sched-nops=@var{scheme} | |
23188 @opindex minsert-sched-nops | |
23189 This option controls which NOP insertion scheme is used during | |
23190 the second scheduling pass. The argument @var{scheme} takes one of the | |
23191 following values: | |
23192 | |
23193 @table @asis | |
23194 @item @samp{no} | |
23195 Don't insert NOPs. | |
23196 | |
23197 @item @samp{pad} | |
23198 Pad with NOPs any dispatch group that has vacant issue slots, | |
23199 according to the scheduler's grouping. | |
23200 | |
23201 @item @samp{regroup_exact} | |
23202 Insert NOPs to force costly dependent insns into | |
23203 separate groups. Insert exactly as many NOPs as needed to force an insn | |
23204 to a new group, according to the estimated processor grouping. | |
23205 | |
23206 @item @var{number} | |
23207 Insert NOPs to force costly dependent insns into | |
23208 separate groups. Insert @var{number} NOPs to force an insn to a new group. | |
23209 @end table | |
23210 | |
23211 @item -mcall-sysv | |
23212 @opindex mcall-sysv | |
23213 On System V.4 and embedded PowerPC systems compile code using calling | |
23214 conventions that adhere to the March 1995 draft of the System V | |
23215 Application Binary Interface, PowerPC processor supplement. This is the | |
23216 default unless you configured GCC using @samp{powerpc-*-eabiaix}. | |
23217 | |
23218 @item -mcall-sysv-eabi | |
23219 @itemx -mcall-eabi | |
23220 @opindex mcall-sysv-eabi | |
23221 @opindex mcall-eabi | |
23222 Specify both @option{-mcall-sysv} and @option{-meabi} options. | |
23223 | |
23224 @item -mcall-sysv-noeabi | |
23225 @opindex mcall-sysv-noeabi | |
23226 Specify both @option{-mcall-sysv} and @option{-mno-eabi} options. | |
23227 | |
23228 @item -mcall-aixdesc | |
23229 @opindex m | |
23230 On System V.4 and embedded PowerPC systems compile code for the AIX | |
23231 operating system. | |
23232 | |
23233 @item -mcall-linux | |
23234 @opindex mcall-linux | |
23235 On System V.4 and embedded PowerPC systems compile code for the | |
23236 Linux-based GNU system. | |
23237 | |
23238 @item -mcall-freebsd | |
23239 @opindex mcall-freebsd | |
23240 On System V.4 and embedded PowerPC systems compile code for the | |
23241 FreeBSD operating system. | |
23242 | |
23243 @item -mcall-netbsd | |
23244 @opindex mcall-netbsd | |
23245 On System V.4 and embedded PowerPC systems compile code for the | |
23246 NetBSD operating system. | |
23247 | |
23248 @item -mcall-openbsd | |
23249 @opindex mcall-netbsd | |
23250 On System V.4 and embedded PowerPC systems compile code for the | |
23251 OpenBSD operating system. | |
23252 | |
23253 @item -maix-struct-return | |
23254 @opindex maix-struct-return | |
23255 Return all structures in memory (as specified by the AIX ABI)@. | |
23256 | |
23257 @item -msvr4-struct-return | |
23258 @opindex msvr4-struct-return | |
23259 Return structures smaller than 8 bytes in registers (as specified by the | |
23260 SVR4 ABI)@. | |
23261 | |
23262 @item -mabi=@var{abi-type} | |
23263 @opindex mabi | |
23264 Extend the current ABI with a particular extension, or remove such extension. | |
23265 Valid values are @samp{altivec}, @samp{no-altivec}, @samp{spe}, | |
23266 @samp{no-spe}, @samp{ibmlongdouble}, @samp{ieeelongdouble}, | |
23267 @samp{elfv1}, @samp{elfv2}@. | |
23268 | |
23269 @item -mabi=spe | |
23270 @opindex mabi=spe | |
23271 Extend the current ABI with SPE ABI extensions. This does not change | |
23272 the default ABI, instead it adds the SPE ABI extensions to the current | |
23273 ABI@. | |
23274 | |
23275 @item -mabi=no-spe | |
23276 @opindex mabi=no-spe | |
23277 Disable Book-E SPE ABI extensions for the current ABI@. | |
23278 | |
23279 @item -mabi=ibmlongdouble | |
23280 @opindex mabi=ibmlongdouble | |
23281 Change the current ABI to use IBM extended-precision long double. | |
23282 This is not likely to work if your system defaults to using IEEE | |
23283 extended-precision long double. If you change the long double type | |
23284 from IEEE extended-precision, the compiler will issue a warning unless | |
23285 you use the @option{-Wno-psabi} option. | |
23286 | |
23287 @item -mabi=ieeelongdouble | |
23288 @opindex mabi=ieeelongdouble | |
23289 Change the current ABI to use IEEE extended-precision long double. | |
23290 This is not likely to work if your system defaults to using IBM | |
23291 extended-precision long double. If you change the long double type | |
23292 from IBM extended-precision, the compiler will issue a warning unless | |
23293 you use the @option{-Wno-psabi} option. | |
23294 | |
23295 @item -mabi=elfv1 | |
23296 @opindex mabi=elfv1 | |
23297 Change the current ABI to use the ELFv1 ABI. | |
23298 This is the default ABI for big-endian PowerPC 64-bit Linux. | |
23299 Overriding the default ABI requires special system support and is | |
23300 likely to fail in spectacular ways. | |
23301 | |
23302 @item -mabi=elfv2 | |
23303 @opindex mabi=elfv2 | |
23304 Change the current ABI to use the ELFv2 ABI. | |
23305 This is the default ABI for little-endian PowerPC 64-bit Linux. | |
23306 Overriding the default ABI requires special system support and is | |
23307 likely to fail in spectacular ways. | |
23308 | |
23309 @item -mgnu-attribute | |
23310 @itemx -mno-gnu-attribute | |
23311 @opindex mgnu-attribute | |
23312 @opindex mno-gnu-attribute | |
23313 Emit .gnu_attribute assembly directives to set tag/value pairs in a | |
23314 .gnu.attributes section that specify ABI variations in function | |
23315 parameters or return values. | |
23316 | |
23317 @item -mprototype | |
23318 @itemx -mno-prototype | |
23319 @opindex mprototype | |
23320 @opindex mno-prototype | |
23321 On System V.4 and embedded PowerPC systems assume that all calls to | |
23322 variable argument functions are properly prototyped. Otherwise, the | |
23323 compiler must insert an instruction before every non-prototyped call to | |
23324 set or clear bit 6 of the condition code register (@code{CR}) to | |
23325 indicate whether floating-point values are passed in the floating-point | |
23326 registers in case the function takes variable arguments. With | |
23327 @option{-mprototype}, only calls to prototyped variable argument functions | |
23328 set or clear the bit. | |
23329 | |
23330 @item -msim | |
23331 @opindex msim | |
23332 On embedded PowerPC systems, assume that the startup module is called | |
23333 @file{sim-crt0.o} and that the standard C libraries are @file{libsim.a} and | |
23334 @file{libc.a}. This is the default for @samp{powerpc-*-eabisim} | |
23335 configurations. | |
23336 | |
23337 @item -mmvme | |
23338 @opindex mmvme | |
23339 On embedded PowerPC systems, assume that the startup module is called | |
23340 @file{crt0.o} and the standard C libraries are @file{libmvme.a} and | |
23341 @file{libc.a}. | |
23342 | |
23343 @item -mads | |
23344 @opindex mads | |
23345 On embedded PowerPC systems, assume that the startup module is called | |
23346 @file{crt0.o} and the standard C libraries are @file{libads.a} and | |
23347 @file{libc.a}. | |
23348 | |
23349 @item -myellowknife | |
23350 @opindex myellowknife | |
23351 On embedded PowerPC systems, assume that the startup module is called | |
23352 @file{crt0.o} and the standard C libraries are @file{libyk.a} and | |
23353 @file{libc.a}. | |
23354 | |
23355 @item -mvxworks | |
23356 @opindex mvxworks | |
23357 On System V.4 and embedded PowerPC systems, specify that you are | |
23358 compiling for a VxWorks system. | |
23359 | |
23360 @item -memb | |
23361 @opindex memb | |
23362 On embedded PowerPC systems, set the @code{PPC_EMB} bit in the ELF flags | |
23363 header to indicate that @samp{eabi} extended relocations are used. | |
23364 | |
23365 @item -meabi | |
23366 @itemx -mno-eabi | |
23367 @opindex meabi | |
23368 @opindex mno-eabi | |
23369 On System V.4 and embedded PowerPC systems do (do not) adhere to the | |
23370 Embedded Applications Binary Interface (EABI), which is a set of | |
23371 modifications to the System V.4 specifications. Selecting @option{-meabi} | |
23372 means that the stack is aligned to an 8-byte boundary, a function | |
23373 @code{__eabi} is called from @code{main} to set up the EABI | |
23374 environment, and the @option{-msdata} option can use both @code{r2} and | |
23375 @code{r13} to point to two separate small data areas. Selecting | |
23376 @option{-mno-eabi} means that the stack is aligned to a 16-byte boundary, | |
23377 no EABI initialization function is called from @code{main}, and the | |
23378 @option{-msdata} option only uses @code{r13} to point to a single | |
23379 small data area. The @option{-meabi} option is on by default if you | |
23380 configured GCC using one of the @samp{powerpc*-*-eabi*} options. | |
23381 | |
23382 @item -msdata=eabi | |
23383 @opindex msdata=eabi | |
23384 On System V.4 and embedded PowerPC systems, put small initialized | |
23385 @code{const} global and static data in the @code{.sdata2} section, which | |
23386 is pointed to by register @code{r2}. Put small initialized | |
23387 non-@code{const} global and static data in the @code{.sdata} section, | |
23388 which is pointed to by register @code{r13}. Put small uninitialized | |
23389 global and static data in the @code{.sbss} section, which is adjacent to | |
23390 the @code{.sdata} section. The @option{-msdata=eabi} option is | |
23391 incompatible with the @option{-mrelocatable} option. The | |
23392 @option{-msdata=eabi} option also sets the @option{-memb} option. | |
23393 | |
23394 @item -msdata=sysv | |
23395 @opindex msdata=sysv | |
23396 On System V.4 and embedded PowerPC systems, put small global and static | |
23397 data in the @code{.sdata} section, which is pointed to by register | |
23398 @code{r13}. Put small uninitialized global and static data in the | |
23399 @code{.sbss} section, which is adjacent to the @code{.sdata} section. | |
23400 The @option{-msdata=sysv} option is incompatible with the | |
23401 @option{-mrelocatable} option. | |
23402 | |
23403 @item -msdata=default | |
23404 @itemx -msdata | |
23405 @opindex msdata=default | |
23406 @opindex msdata | |
23407 On System V.4 and embedded PowerPC systems, if @option{-meabi} is used, | |
23408 compile code the same as @option{-msdata=eabi}, otherwise compile code the | |
23409 same as @option{-msdata=sysv}. | |
23410 | |
23411 @item -msdata=data | |
23412 @opindex msdata=data | |
23413 On System V.4 and embedded PowerPC systems, put small global | |
23414 data in the @code{.sdata} section. Put small uninitialized global | |
23415 data in the @code{.sbss} section. Do not use register @code{r13} | |
23416 to address small data however. This is the default behavior unless | |
23417 other @option{-msdata} options are used. | |
23418 | |
23419 @item -msdata=none | |
23420 @itemx -mno-sdata | |
23421 @opindex msdata=none | |
23422 @opindex mno-sdata | |
23423 On embedded PowerPC systems, put all initialized global and static data | |
23424 in the @code{.data} section, and all uninitialized data in the | |
23425 @code{.bss} section. | |
23426 | |
23427 @item -mblock-move-inline-limit=@var{num} | |
23428 @opindex mblock-move-inline-limit | |
23429 Inline all block moves (such as calls to @code{memcpy} or structure | |
23430 copies) less than or equal to @var{num} bytes. The minimum value for | |
23431 @var{num} is 32 bytes on 32-bit targets and 64 bytes on 64-bit | |
23432 targets. The default value is target-specific. | |
23433 | |
23434 @item -G @var{num} | |
23435 @opindex G | |
23436 @cindex smaller data references (PowerPC) | |
23437 @cindex .sdata/.sdata2 references (PowerPC) | |
23438 On embedded PowerPC systems, put global and static items less than or | |
23439 equal to @var{num} bytes into the small data or BSS sections instead of | |
23440 the normal data or BSS section. By default, @var{num} is 8. The | |
23441 @option{-G @var{num}} switch is also passed to the linker. | |
23442 All modules should be compiled with the same @option{-G @var{num}} value. | |
23443 | |
23444 @item -mregnames | |
23445 @itemx -mno-regnames | |
23446 @opindex mregnames | |
23447 @opindex mno-regnames | |
23448 On System V.4 and embedded PowerPC systems do (do not) emit register | |
23449 names in the assembly language output using symbolic forms. | |
23450 | |
23451 @item -mlongcall | |
23452 @itemx -mno-longcall | |
23453 @opindex mlongcall | |
23454 @opindex mno-longcall | |
23455 By default assume that all calls are far away so that a longer and more | |
23456 expensive calling sequence is required. This is required for calls | |
23457 farther than 32 megabytes (33,554,432 bytes) from the current location. | |
23458 A short call is generated if the compiler knows | |
23459 the call cannot be that far away. This setting can be overridden by | |
23460 the @code{shortcall} function attribute, or by @code{#pragma | |
23461 longcall(0)}. | |
23462 | |
23463 Some linkers are capable of detecting out-of-range calls and generating | |
23464 glue code on the fly. On these systems, long calls are unnecessary and | |
23465 generate slower code. As of this writing, the AIX linker can do this, | |
23466 as can the GNU linker for PowerPC/64. It is planned to add this feature | |
23467 to the GNU linker for 32-bit PowerPC systems as well. | |
23468 | |
23469 In the future, GCC may ignore all longcall specifications | |
23470 when the linker is known to generate glue. | |
23471 | |
23472 @item -mtls-markers | |
23473 @itemx -mno-tls-markers | |
23474 @opindex mtls-markers | |
23475 @opindex mno-tls-markers | |
23476 Mark (do not mark) calls to @code{__tls_get_addr} with a relocation | |
23477 specifying the function argument. The relocation allows the linker to | |
23478 reliably associate function call with argument setup instructions for | |
23479 TLS optimization, which in turn allows GCC to better schedule the | |
23480 sequence. | |
23481 | |
23482 @item -mrecip | |
23483 @itemx -mno-recip | |
23484 @opindex mrecip | |
23485 This option enables use of the reciprocal estimate and | |
23486 reciprocal square root estimate instructions with additional | |
23487 Newton-Raphson steps to increase precision instead of doing a divide or | |
23488 square root and divide for floating-point arguments. You should use | |
23489 the @option{-ffast-math} option when using @option{-mrecip} (or at | |
23490 least @option{-funsafe-math-optimizations}, | |
23491 @option{-ffinite-math-only}, @option{-freciprocal-math} and | |
23492 @option{-fno-trapping-math}). Note that while the throughput of the | |
23493 sequence is generally higher than the throughput of the non-reciprocal | |
23494 instruction, the precision of the sequence can be decreased by up to 2 | |
23495 ulp (i.e.@: the inverse of 1.0 equals 0.99999994) for reciprocal square | |
23496 roots. | |
23497 | |
23498 @item -mrecip=@var{opt} | |
23499 @opindex mrecip=opt | |
23500 This option controls which reciprocal estimate instructions | |
23501 may be used. @var{opt} is a comma-separated list of options, which may | |
23502 be preceded by a @code{!} to invert the option: | |
23503 | |
23504 @table @samp | |
23505 | |
23506 @item all | |
23507 Enable all estimate instructions. | |
23508 | |
23509 @item default | |
23510 Enable the default instructions, equivalent to @option{-mrecip}. | |
23511 | |
23512 @item none | |
23513 Disable all estimate instructions, equivalent to @option{-mno-recip}. | |
23514 | |
23515 @item div | |
23516 Enable the reciprocal approximation instructions for both | |
23517 single and double precision. | |
23518 | |
23519 @item divf | |
23520 Enable the single-precision reciprocal approximation instructions. | |
23521 | |
23522 @item divd | |
23523 Enable the double-precision reciprocal approximation instructions. | |
23524 | |
23525 @item rsqrt | |
23526 Enable the reciprocal square root approximation instructions for both | |
23527 single and double precision. | |
23528 | |
23529 @item rsqrtf | |
23530 Enable the single-precision reciprocal square root approximation instructions. | |
23531 | |
23532 @item rsqrtd | |
23533 Enable the double-precision reciprocal square root approximation instructions. | |
23534 | |
23535 @end table | |
23536 | |
23537 So, for example, @option{-mrecip=all,!rsqrtd} enables | |
23538 all of the reciprocal estimate instructions, except for the | |
23539 @code{FRSQRTE}, @code{XSRSQRTEDP}, and @code{XVRSQRTEDP} instructions | |
23540 which handle the double-precision reciprocal square root calculations. | |
23541 | |
23542 @item -mrecip-precision | |
23543 @itemx -mno-recip-precision | |
23544 @opindex mrecip-precision | |
23545 Assume (do not assume) that the reciprocal estimate instructions | |
23546 provide higher-precision estimates than is mandated by the PowerPC | |
23547 ABI. Selecting @option{-mcpu=power6}, @option{-mcpu=power7} or | |
23548 @option{-mcpu=power8} automatically selects @option{-mrecip-precision}. | |
23549 The double-precision square root estimate instructions are not generated by | |
23550 default on low-precision machines, since they do not provide an | |
23551 estimate that converges after three steps. | |
23552 | |
23553 @item -mpointers-to-nested-functions | |
23554 @itemx -mno-pointers-to-nested-functions | |
23555 @opindex mpointers-to-nested-functions | |
23556 Generate (do not generate) code to load up the static chain register | |
23557 (@code{r11}) when calling through a pointer on AIX and 64-bit Linux | |
23558 systems where a function pointer points to a 3-word descriptor giving | |
23559 the function address, TOC value to be loaded in register @code{r2}, and | |
23560 static chain value to be loaded in register @code{r11}. The | |
23561 @option{-mpointers-to-nested-functions} is on by default. You cannot | |
23562 call through pointers to nested functions or pointers | |
23563 to functions compiled in other languages that use the static chain if | |
23564 you use @option{-mno-pointers-to-nested-functions}. | |
23565 | |
23566 @item -msave-toc-indirect | |
23567 @itemx -mno-save-toc-indirect | |
23568 @opindex msave-toc-indirect | |
23569 Generate (do not generate) code to save the TOC value in the reserved | |
23570 stack location in the function prologue if the function calls through | |
23571 a pointer on AIX and 64-bit Linux systems. If the TOC value is not | |
23572 saved in the prologue, it is saved just before the call through the | |
23573 pointer. The @option{-mno-save-toc-indirect} option is the default. | |
23574 | |
23575 @item -mcompat-align-parm | |
23576 @itemx -mno-compat-align-parm | |
23577 @opindex mcompat-align-parm | |
23578 Generate (do not generate) code to pass structure parameters with a | |
23579 maximum alignment of 64 bits, for compatibility with older versions | |
23580 of GCC. | |
23581 | |
23582 Older versions of GCC (prior to 4.9.0) incorrectly did not align a | |
23583 structure parameter on a 128-bit boundary when that structure contained | |
23584 a member requiring 128-bit alignment. This is corrected in more | |
23585 recent versions of GCC. This option may be used to generate code | |
23586 that is compatible with functions compiled with older versions of | |
23587 GCC. | |
23588 | |
23589 The @option{-mno-compat-align-parm} option is the default. | |
23590 | |
23591 @item -mstack-protector-guard=@var{guard} | |
23592 @itemx -mstack-protector-guard-reg=@var{reg} | |
23593 @itemx -mstack-protector-guard-offset=@var{offset} | |
23594 @itemx -mstack-protector-guard-symbol=@var{symbol} | |
23595 @opindex mstack-protector-guard | |
23596 @opindex mstack-protector-guard-reg | |
23597 @opindex mstack-protector-guard-offset | |
23598 @opindex mstack-protector-guard-symbol | |
23599 Generate stack protection code using canary at @var{guard}. Supported | |
23600 locations are @samp{global} for global canary or @samp{tls} for per-thread | |
23601 canary in the TLS block (the default with GNU libc version 2.4 or later). | |
23602 | |
23603 With the latter choice the options | |
23604 @option{-mstack-protector-guard-reg=@var{reg}} and | |
23605 @option{-mstack-protector-guard-offset=@var{offset}} furthermore specify | |
23606 which register to use as base register for reading the canary, and from what | |
23607 offset from that base register. The default for those is as specified in the | |
23608 relevant ABI. @option{-mstack-protector-guard-symbol=@var{symbol}} overrides | |
23609 the offset with a symbol reference to a canary in the TLS block. | |
23610 @end table | |
23611 | |
23612 | |
21681 @node RISC-V Options | 23613 @node RISC-V Options |
21682 @subsection RISC-V Options | 23614 @subsection RISC-V Options |
21683 @cindex RISC-V Options | 23615 @cindex RISC-V Options |
21684 | 23616 |
21685 These command-line options are defined for RISC-V targets: | 23617 These command-line options are defined for RISC-V targets: |
21687 @table @gcctabopt | 23619 @table @gcctabopt |
21688 @item -mbranch-cost=@var{n} | 23620 @item -mbranch-cost=@var{n} |
21689 @opindex mbranch-cost | 23621 @opindex mbranch-cost |
21690 Set the cost of branches to roughly @var{n} instructions. | 23622 Set the cost of branches to roughly @var{n} instructions. |
21691 | 23623 |
21692 @item -mmemcpy | |
21693 @itemx -mno-memcpy | |
21694 @opindex mmemcpy | |
21695 Don't optimize block moves. | |
21696 | |
21697 @item -mplt | 23624 @item -mplt |
21698 @itemx -mno-plt | 23625 @itemx -mno-plt |
21699 @opindex plt | 23626 @opindex plt |
21700 When generating PIC code, allow the use of PLTs. Ignored for non-PIC. | 23627 When generating PIC code, do or don't allow the use of PLTs. Ignored for |
23628 non-PIC. The default is @option{-mplt}. | |
21701 | 23629 |
21702 @item -mabi=@var{ABI-string} | 23630 @item -mabi=@var{ABI-string} |
21703 @opindex mabi | 23631 @opindex mabi |
21704 Specify integer and floating-point calling convention. This defaults to the | 23632 Specify integer and floating-point calling convention. @var{ABI-string} |
21705 natural calling convention: e.g.@ LP64 for RV64I, ILP32 for RV32I, LP64D for | 23633 contains two parts: the size of integer types and the registers used for |
21706 RV64G. | 23634 floating-point types. For example @samp{-march=rv64ifd -mabi=lp64d} means that |
23635 @samp{long} and pointers are 64-bit (implicitly defining @samp{int} to be | |
23636 32-bit), and that floating-point values up to 64 bits wide are passed in F | |
23637 registers. Contrast this with @samp{-march=rv64ifd -mabi=lp64f}, which still | |
23638 allows the compiler to generate code that uses the F and D extensions but only | |
23639 allows floating-point values up to 32 bits long to be passed in registers; or | |
23640 @samp{-march=rv64ifd -mabi=lp64}, in which no floating-point arguments will be | |
23641 passed in registers. | |
23642 | |
23643 The default for this argument is system dependent, users who want a specific | |
23644 calling convention should specify one explicitly. The valid calling | |
23645 conventions are: @samp{ilp32}, @samp{ilp32f}, @samp{ilp32d}, @samp{lp64}, | |
23646 @samp{lp64f}, and @samp{lp64d}. Some calling conventions are impossible to | |
23647 implement on some ISAs: for example, @samp{-march=rv32if -mabi=ilp32d} is | |
23648 invalid because the ABI requires 64-bit values be passed in F registers, but F | |
23649 registers are only 32 bits wide. There is also the @samp{ilp32e} ABI that can | |
23650 only be used with the @samp{rv32e} architecture. This ABI is not well | |
23651 specified at present, and is subject to change. | |
21707 | 23652 |
21708 @item -mfdiv | 23653 @item -mfdiv |
21709 @itemx -mno-fdiv | 23654 @itemx -mno-fdiv |
21710 @opindex mfdiv | 23655 @opindex mfdiv |
21711 Use hardware floating-point divide and square root instructions. This requires | 23656 Do or don't use hardware floating-point divide and square root instructions. |
21712 the F or D extensions for floating-point registers. | 23657 This requires the F or D extensions for floating-point registers. The default |
23658 is to use them if the specified architecture has these instructions. | |
21713 | 23659 |
21714 @item -mdiv | 23660 @item -mdiv |
21715 @itemx -mno-div | 23661 @itemx -mno-div |
21716 @opindex mdiv | 23662 @opindex mdiv |
21717 Use hardware instructions for integer division. This requires the M extension. | 23663 Do or don't use hardware instructions for integer division. This requires the |
23664 M extension. The default is to use them if the specified architecture has | |
23665 these instructions. | |
21718 | 23666 |
21719 @item -march=@var{ISA-string} | 23667 @item -march=@var{ISA-string} |
21720 @opindex march | 23668 @opindex march |
21721 Generate code for given RISC-V ISA (e.g.@ @samp{rv64im}). ISA strings must be | 23669 Generate code for given RISC-V ISA (e.g.@ @samp{rv64im}). ISA strings must be |
21722 lower-case. Examples include @samp{rv64i}, @samp{rv32g}, and @samp{rv32imaf}. | 23670 lower-case. Examples include @samp{rv64i}, @samp{rv32g}, @samp{rv32e}, and |
23671 @samp{rv32imaf}. | |
21723 | 23672 |
21724 @item -mtune=@var{processor-string} | 23673 @item -mtune=@var{processor-string} |
21725 @opindex mtune | 23674 @opindex mtune |
21726 Optimize the output for the given processor, specified by microarchitecture | 23675 Optimize the output for the given processor, specified by microarchitecture |
21727 name. | 23676 name. |
21728 | 23677 |
23678 @item -mpreferred-stack-boundary=@var{num} | |
23679 @opindex mpreferred-stack-boundary | |
23680 Attempt to keep the stack boundary aligned to a 2 raised to @var{num} | |
23681 byte boundary. If @option{-mpreferred-stack-boundary} is not specified, | |
23682 the default is 4 (16 bytes or 128-bits). | |
23683 | |
23684 @strong{Warning:} If you use this switch, then you must build all modules with | |
23685 the same value, including any libraries. This includes the system libraries | |
23686 and startup modules. | |
23687 | |
21729 @item -msmall-data-limit=@var{n} | 23688 @item -msmall-data-limit=@var{n} |
21730 @opindex msmall-data-limit | 23689 @opindex msmall-data-limit |
21731 Put global and static data smaller than @var{n} bytes into a special section | 23690 Put global and static data smaller than @var{n} bytes into a special section |
21732 (on some targets). | 23691 (on some targets). |
21733 | 23692 |
21734 @item -msave-restore | 23693 @item -msave-restore |
21735 @itemx -mno-save-restore | 23694 @itemx -mno-save-restore |
21736 @opindex msave-restore | 23695 @opindex msave-restore |
21737 Use smaller but slower prologue and epilogue code. | 23696 Do or don't use smaller but slower prologue and epilogue code that uses |
23697 library function calls. The default is to use fast inline prologues and | |
23698 epilogues. | |
21738 | 23699 |
21739 @item -mstrict-align | 23700 @item -mstrict-align |
21740 @itemx -mno-strict-align | 23701 @itemx -mno-strict-align |
21741 @opindex mstrict-align | 23702 @opindex mstrict-align |
21742 Do not generate unaligned memory accesses. | 23703 Do not or do generate unaligned memory accesses. The default is set depending |
21743 | 23704 on whether the processor we are optimizing for supports fast unaligned access |
21744 @item -mcmodel=@var{code-model} | 23705 or not. |
21745 @opindex mcmodel | 23706 |
21746 Specify the code model. | 23707 @item -mcmodel=medlow |
23708 @opindex mcmodel=medlow | |
23709 Generate code for the medium-low code model. The program and its statically | |
23710 defined symbols must lie within a single 2 GiB address range and must lie | |
23711 between absolute addresses @minus{}2 GiB and +2 GiB. Programs can be | |
23712 statically or dynamically linked. This is the default code model. | |
23713 | |
23714 @item -mcmodel=medany | |
23715 @opindex mcmodel=medany | |
23716 Generate code for the medium-any code model. The program and its statically | |
23717 defined symbols must be within any single 2 GiB address range. Programs can be | |
23718 statically or dynamically linked. | |
23719 | |
23720 @item -mexplicit-relocs | |
23721 @itemx -mno-exlicit-relocs | |
23722 Use or do not use assembler relocation operators when dealing with symbolic | |
23723 addresses. The alternative is to use assembler macros instead, which may | |
23724 limit optimization. | |
23725 | |
23726 @item -mrelax | |
23727 @itemx -mno-relax | |
23728 Take advantage of linker relaxations to reduce the number of instructions | |
23729 required to materialize symbol addresses. The default is to take advantage of | |
23730 linker relaxations. | |
21747 | 23731 |
21748 @end table | 23732 @end table |
21749 | 23733 |
21750 @node RL78 Options | 23734 @node RL78 Options |
21751 @subsection RL78 Options | 23735 @subsection RL78 Options |
21833 Make the @code{double} data type be 64 bits (@option{-m64bit-doubles}) | 23817 Make the @code{double} data type be 64 bits (@option{-m64bit-doubles}) |
21834 or 32 bits (@option{-m32bit-doubles}) in size. The default is | 23818 or 32 bits (@option{-m32bit-doubles}) in size. The default is |
21835 @option{-m32bit-doubles}. | 23819 @option{-m32bit-doubles}. |
21836 | 23820 |
21837 @item -msave-mduc-in-interrupts | 23821 @item -msave-mduc-in-interrupts |
21838 @item -mno-save-mduc-in-interrupts | 23822 @itemx -mno-save-mduc-in-interrupts |
21839 @opindex msave-mduc-in-interrupts | 23823 @opindex msave-mduc-in-interrupts |
21840 @opindex mno-save-mduc-in-interrupts | 23824 @opindex mno-save-mduc-in-interrupts |
21841 Specifies that interrupt handler functions should preserve the | 23825 Specifies that interrupt handler functions should preserve the |
21842 MDUC registers. This is only necessary if normal code might use | 23826 MDUC registers. This is only necessary if normal code might use |
21843 the MDUC registers, for example because it performs multiplication | 23827 the MDUC registers, for example because it performs multiplication |
21955 @samp{e300c3}, @samp{e500mc}, @samp{e500mc64}, @samp{e5500}, | 23939 @samp{e300c3}, @samp{e500mc}, @samp{e500mc64}, @samp{e5500}, |
21956 @samp{e6500}, @samp{ec603e}, @samp{G3}, @samp{G4}, @samp{G5}, | 23940 @samp{e6500}, @samp{ec603e}, @samp{G3}, @samp{G4}, @samp{G5}, |
21957 @samp{titan}, @samp{power3}, @samp{power4}, @samp{power5}, @samp{power5+}, | 23941 @samp{titan}, @samp{power3}, @samp{power4}, @samp{power5}, @samp{power5+}, |
21958 @samp{power6}, @samp{power6x}, @samp{power7}, @samp{power8}, | 23942 @samp{power6}, @samp{power6x}, @samp{power7}, @samp{power8}, |
21959 @samp{power9}, @samp{powerpc}, @samp{powerpc64}, @samp{powerpc64le}, | 23943 @samp{power9}, @samp{powerpc}, @samp{powerpc64}, @samp{powerpc64le}, |
21960 and @samp{rs64}. | 23944 @samp{rs64}, and @samp{native}. |
21961 | 23945 |
21962 @option{-mcpu=powerpc}, @option{-mcpu=powerpc64}, and | 23946 @option{-mcpu=powerpc}, @option{-mcpu=powerpc64}, and |
21963 @option{-mcpu=powerpc64le} specify pure 32-bit PowerPC (either | 23947 @option{-mcpu=powerpc64le} specify pure 32-bit PowerPC (either |
21964 endian), 64-bit big endian PowerPC and 64-bit little endian PowerPC | 23948 endian), 64-bit big endian PowerPC and 64-bit little endian PowerPC |
21965 architecture machine types, with an appropriate, generic processor | 23949 architecture machine types, with an appropriate, generic processor |
21966 model assumed for scheduling purposes. | 23950 model assumed for scheduling purposes. |
21967 | 23951 |
23952 Specifying @samp{native} as cpu type detects and selects the | |
23953 architecture option that corresponds to the host processor of the | |
23954 system performing the compilation. | |
23955 @option{-mcpu=native} has no effect if GCC does not recognize the | |
23956 processor. | |
23957 | |
21968 The other options specify a specific processor. Code generated under | 23958 The other options specify a specific processor. Code generated under |
21969 those options runs best on that processor, and may not run at all on | 23959 those options runs best on that processor, and may not run at all on |
21970 others. | 23960 others. |
21971 | 23961 |
21972 The @option{-mcpu} options automatically enable or disable the | 23962 The @option{-mcpu} options automatically enable or disable the |
21973 following options: | 23963 following options: |
21974 | 23964 |
21975 @gccoptlist{-maltivec -mfprnd -mhard-float -mmfcrf -mmultiple @gol | 23965 @gccoptlist{-maltivec -mfprnd -mhard-float -mmfcrf -mmultiple @gol |
21976 -mpopcntb -mpopcntd -mpowerpc64 @gol | 23966 -mpopcntb -mpopcntd -mpowerpc64 @gol |
21977 -mpowerpc-gpopt -mpowerpc-gfxopt -msingle-float -mdouble-float @gol | 23967 -mpowerpc-gpopt -mpowerpc-gfxopt @gol |
21978 -msimple-fpu -mstring -mmulhw -mdlmzb -mmfpgpr -mvsx @gol | 23968 -mmulhw -mdlmzb -mmfpgpr -mvsx @gol |
21979 -mcrypto -mdirect-move -mhtm -mpower8-fusion -mpower8-vector @gol | 23969 -mcrypto -mhtm -mpower8-fusion -mpower8-vector @gol |
21980 -mquad-memory -mquad-memory-atomic -mfloat128 -mfloat128-hardware} | 23970 -mquad-memory -mquad-memory-atomic -mfloat128 -mfloat128-hardware} |
21981 | 23971 |
21982 The particular options set for any particular CPU varies between | 23972 The particular options set for any particular CPU varies between |
21983 compiler versions, depending on what setting seems to produce optimal | 23973 compiler versions, depending on what setting seems to produce optimal |
21984 code for that CPU; it doesn't necessarily reflect the actual hardware's | 23974 code for that CPU; it doesn't necessarily reflect the actual hardware's |
22040 | 24030 |
22041 @item -maltivec=be | 24031 @item -maltivec=be |
22042 @opindex maltivec=be | 24032 @opindex maltivec=be |
22043 Generate AltiVec instructions using big-endian element order, | 24033 Generate AltiVec instructions using big-endian element order, |
22044 regardless of whether the target is big- or little-endian. This is | 24034 regardless of whether the target is big- or little-endian. This is |
22045 the default when targeting a big-endian platform. | 24035 the default when targeting a big-endian platform. Using this option |
24036 is currently deprecated. Support for this feature will be removed in | |
24037 GCC 9. | |
22046 | 24038 |
22047 The element order is used to interpret element numbers in AltiVec | 24039 The element order is used to interpret element numbers in AltiVec |
22048 intrinsics such as @code{vec_splat}, @code{vec_extract}, and | 24040 intrinsics such as @code{vec_splat}, @code{vec_extract}, and |
22049 @code{vec_insert}. By default, these match array element order | 24041 @code{vec_insert}. By default, these match array element order |
22050 corresponding to the endianness for the target. | 24042 corresponding to the endianness for the target. |
22087 @itemx -mno-isel | 24079 @itemx -mno-isel |
22088 @opindex misel | 24080 @opindex misel |
22089 @opindex mno-isel | 24081 @opindex mno-isel |
22090 This switch enables or disables the generation of ISEL instructions. | 24082 This switch enables or disables the generation of ISEL instructions. |
22091 | 24083 |
22092 @item -misel=@var{yes/no} | |
22093 This switch has been deprecated. Use @option{-misel} and | |
22094 @option{-mno-isel} instead. | |
22095 | |
22096 @item -mspe | |
22097 @itemx -mno-spe | |
22098 @opindex mspe | |
22099 @opindex mno-spe | |
22100 This switch enables or disables the generation of SPE simd | |
22101 instructions. | |
22102 | |
22103 @item -mpaired | |
22104 @itemx -mno-paired | |
22105 @opindex mpaired | |
22106 @opindex mno-paired | |
22107 This switch enables or disables the generation of PAIRED simd | |
22108 instructions. | |
22109 | |
22110 @item -mspe=@var{yes/no} | |
22111 This option has been deprecated. Use @option{-mspe} and | |
22112 @option{-mno-spe} instead. | |
22113 | |
22114 @item -mvsx | 24084 @item -mvsx |
22115 @itemx -mno-vsx | 24085 @itemx -mno-vsx |
22116 @opindex mvsx | 24086 @opindex mvsx |
22117 @opindex mno-vsx | 24087 @opindex mno-vsx |
22118 Generate code that uses (does not use) vector/scalar (VSX) | 24088 Generate code that uses (does not use) vector/scalar (VSX) |
22124 @opindex mcrypto | 24094 @opindex mcrypto |
22125 @opindex mno-crypto | 24095 @opindex mno-crypto |
22126 Enable the use (disable) of the built-in functions that allow direct | 24096 Enable the use (disable) of the built-in functions that allow direct |
22127 access to the cryptographic instructions that were added in version | 24097 access to the cryptographic instructions that were added in version |
22128 2.07 of the PowerPC ISA. | 24098 2.07 of the PowerPC ISA. |
22129 | |
22130 @item -mdirect-move | |
22131 @itemx -mno-direct-move | |
22132 @opindex mdirect-move | |
22133 @opindex mno-direct-move | |
22134 Generate code that uses (does not use) the instructions to move data | |
22135 between the general purpose registers and the vector/scalar (VSX) | |
22136 registers that were added in version 2.07 of the PowerPC ISA. | |
22137 | 24099 |
22138 @item -mhtm | 24100 @item -mhtm |
22139 @itemx -mno-htm | 24101 @itemx -mno-htm |
22140 @opindex mhtm | 24102 @opindex mhtm |
22141 @opindex mno-htm | 24103 @opindex mno-htm |
22208 @var{__float128} data type. | 24170 @var{__float128} data type. |
22209 | 24171 |
22210 The default for @option{-mfloat128-hardware} is enabled on PowerPC | 24172 The default for @option{-mfloat128-hardware} is enabled on PowerPC |
22211 Linux systems using the ISA 3.0 instruction set, and disabled on other | 24173 Linux systems using the ISA 3.0 instruction set, and disabled on other |
22212 systems. | 24174 systems. |
22213 | |
22214 @item -mfloat-gprs=@var{yes/single/double/no} | |
22215 @itemx -mfloat-gprs | |
22216 @opindex mfloat-gprs | |
22217 This switch enables or disables the generation of floating-point | |
22218 operations on the general-purpose registers for architectures that | |
22219 support it. | |
22220 | |
22221 The argument @samp{yes} or @samp{single} enables the use of | |
22222 single-precision floating-point operations. | |
22223 | |
22224 The argument @samp{double} enables the use of single and | |
22225 double-precision floating-point operations. | |
22226 | |
22227 The argument @samp{no} disables floating-point operations on the | |
22228 general-purpose registers. | |
22229 | |
22230 This option is currently only available on the MPC854x. | |
22231 | 24175 |
22232 @item -m32 | 24176 @item -m32 |
22233 @itemx -m64 | 24177 @itemx -m64 |
22234 @opindex m32 | 24178 @opindex m32 |
22235 @opindex m64 | 24179 @opindex m64 |
22334 @opindex mhard-float | 24278 @opindex mhard-float |
22335 Generate code that does not use (uses) the floating-point register set. | 24279 Generate code that does not use (uses) the floating-point register set. |
22336 Software floating-point emulation is provided if you use the | 24280 Software floating-point emulation is provided if you use the |
22337 @option{-msoft-float} option, and pass the option to GCC when linking. | 24281 @option{-msoft-float} option, and pass the option to GCC when linking. |
22338 | 24282 |
22339 @item -msingle-float | |
22340 @itemx -mdouble-float | |
22341 @opindex msingle-float | |
22342 @opindex mdouble-float | |
22343 Generate code for single- or double-precision floating-point operations. | |
22344 @option{-mdouble-float} implies @option{-msingle-float}. | |
22345 | |
22346 @item -msimple-fpu | |
22347 @opindex msimple-fpu | |
22348 Do not generate @code{sqrt} and @code{div} instructions for hardware | |
22349 floating-point unit. | |
22350 | |
22351 @item -mfpu=@var{name} | |
22352 @opindex mfpu | |
22353 Specify type of floating-point unit. Valid values for @var{name} are | |
22354 @samp{sp_lite} (equivalent to @option{-msingle-float -msimple-fpu}), | |
22355 @samp{dp_lite} (equivalent to @option{-mdouble-float -msimple-fpu}), | |
22356 @samp{sp_full} (equivalent to @option{-msingle-float}), | |
22357 and @samp{dp_full} (equivalent to @option{-mdouble-float}). | |
22358 | |
22359 @item -mxilinx-fpu | |
22360 @opindex mxilinx-fpu | |
22361 Perform optimizations for the floating-point unit on Xilinx PPC 405/440. | |
22362 | |
22363 @item -mmultiple | 24283 @item -mmultiple |
22364 @itemx -mno-multiple | 24284 @itemx -mno-multiple |
22365 @opindex mmultiple | 24285 @opindex mmultiple |
22366 @opindex mno-multiple | 24286 @opindex mno-multiple |
22367 Generate code that uses (does not use) the load multiple word | 24287 Generate code that uses (does not use) the load multiple word |
22369 instructions are generated by default on POWER systems, and not | 24289 instructions are generated by default on POWER systems, and not |
22370 generated on PowerPC systems. Do not use @option{-mmultiple} on little-endian | 24290 generated on PowerPC systems. Do not use @option{-mmultiple} on little-endian |
22371 PowerPC systems, since those instructions do not work when the | 24291 PowerPC systems, since those instructions do not work when the |
22372 processor is in little-endian mode. The exceptions are PPC740 and | 24292 processor is in little-endian mode. The exceptions are PPC740 and |
22373 PPC750 which permit these instructions in little-endian mode. | 24293 PPC750 which permit these instructions in little-endian mode. |
22374 | |
22375 @item -mstring | |
22376 @itemx -mno-string | |
22377 @opindex mstring | |
22378 @opindex mno-string | |
22379 Generate code that uses (does not use) the load string instructions | |
22380 and the store string word instructions to save multiple registers and | |
22381 do small block moves. These instructions are generated by default on | |
22382 POWER systems, and not generated on PowerPC systems. Do not use | |
22383 @option{-mstring} on little-endian PowerPC systems, since those | |
22384 instructions do not work when the processor is in little-endian mode. | |
22385 The exceptions are PPC740 and PPC750 which permit these instructions | |
22386 in little-endian mode. | |
22387 | 24294 |
22388 @item -mupdate | 24295 @item -mupdate |
22389 @itemx -mno-update | 24296 @itemx -mno-update |
22390 @opindex mupdate | 24297 @opindex mupdate |
22391 @opindex mno-update | 24298 @opindex mno-update |
22615 @item -mcall-openbsd | 24522 @item -mcall-openbsd |
22616 @opindex mcall-netbsd | 24523 @opindex mcall-netbsd |
22617 On System V.4 and embedded PowerPC systems compile code for the | 24524 On System V.4 and embedded PowerPC systems compile code for the |
22618 OpenBSD operating system. | 24525 OpenBSD operating system. |
22619 | 24526 |
24527 @item -mtraceback=@var{traceback_type} | |
24528 @opindex mtraceback | |
24529 Select the type of traceback table. Valid values for @var{traceback_type} | |
24530 are @samp{full}, @samp{part}, and @samp{no}. | |
24531 | |
22620 @item -maix-struct-return | 24532 @item -maix-struct-return |
22621 @opindex maix-struct-return | 24533 @opindex maix-struct-return |
22622 Return all structures in memory (as specified by the AIX ABI)@. | 24534 Return all structures in memory (as specified by the AIX ABI)@. |
22623 | 24535 |
22624 @item -msvr4-struct-return | 24536 @item -msvr4-struct-return |
22627 SVR4 ABI)@. | 24539 SVR4 ABI)@. |
22628 | 24540 |
22629 @item -mabi=@var{abi-type} | 24541 @item -mabi=@var{abi-type} |
22630 @opindex mabi | 24542 @opindex mabi |
22631 Extend the current ABI with a particular extension, or remove such extension. | 24543 Extend the current ABI with a particular extension, or remove such extension. |
22632 Valid values are @samp{altivec}, @samp{no-altivec}, @samp{spe}, | 24544 Valid values are @samp{altivec}, @samp{no-altivec}, |
22633 @samp{no-spe}, @samp{ibmlongdouble}, @samp{ieeelongdouble}, | 24545 @samp{ibmlongdouble}, @samp{ieeelongdouble}, |
22634 @samp{elfv1}, @samp{elfv2}@. | 24546 @samp{elfv1}, @samp{elfv2}@. |
22635 | |
22636 @item -mabi=spe | |
22637 @opindex mabi=spe | |
22638 Extend the current ABI with SPE ABI extensions. This does not change | |
22639 the default ABI, instead it adds the SPE ABI extensions to the current | |
22640 ABI@. | |
22641 | |
22642 @item -mabi=no-spe | |
22643 @opindex mabi=no-spe | |
22644 Disable Book-E SPE ABI extensions for the current ABI@. | |
22645 | 24547 |
22646 @item -mabi=ibmlongdouble | 24548 @item -mabi=ibmlongdouble |
22647 @opindex mabi=ibmlongdouble | 24549 @opindex mabi=ibmlongdouble |
22648 Change the current ABI to use IBM extended-precision long double. | 24550 Change the current ABI to use IBM extended-precision long double. |
22649 This is not likely to work if your system defaults to using IEEE | 24551 This is not likely to work if your system defaults to using IEEE |
22789 @opindex mno-sdata | 24691 @opindex mno-sdata |
22790 On embedded PowerPC systems, put all initialized global and static data | 24692 On embedded PowerPC systems, put all initialized global and static data |
22791 in the @code{.data} section, and all uninitialized data in the | 24693 in the @code{.data} section, and all uninitialized data in the |
22792 @code{.bss} section. | 24694 @code{.bss} section. |
22793 | 24695 |
24696 @item -mreadonly-in-sdata | |
24697 @opindex mreadonly-in-sdata | |
24698 @opindex mno-readonly-in-sdata | |
24699 Put read-only objects in the @code{.sdata} section as well. This is the | |
24700 default. | |
24701 | |
22794 @item -mblock-move-inline-limit=@var{num} | 24702 @item -mblock-move-inline-limit=@var{num} |
22795 @opindex mblock-move-inline-limit | 24703 @opindex mblock-move-inline-limit |
22796 Inline all block moves (such as calls to @code{memcpy} or structure | 24704 Inline all block moves (such as calls to @code{memcpy} or structure |
22797 copies) less than or equal to @var{num} bytes. The minimum value for | 24705 copies) less than or equal to @var{num} bytes. The minimum value for |
22798 @var{num} is 32 bytes on 32-bit targets and 64 bytes on 64-bit | 24706 @var{num} is 32 bytes on 32-bit targets and 64 bytes on 64-bit |
22799 targets. The default value is target-specific. | 24707 targets. The default value is target-specific. |
24708 | |
24709 @item -mblock-compare-inline-limit=@var{num} | |
24710 @opindex mblock-compare-inline-limit | |
24711 Generate non-looping inline code for all block compares (such as calls | |
24712 to @code{memcmp} or structure compares) less than or equal to @var{num} | |
24713 bytes. If @var{num} is 0, all inline expansion (non-loop and loop) of | |
24714 block compare is disabled. The default value is target-specific. | |
24715 | |
24716 @item -mblock-compare-inline-loop-limit=@var{num} | |
24717 @opindex mblock-compare-inline-loop-limit | |
24718 Generate an inline expansion using loop code for all block compares that | |
24719 are less than or equal to @var{num} bytes, but greater than the limit | |
24720 for non-loop inline block compare expansion. If the block length is not | |
24721 constant, at most @var{num} bytes will be compared before @code{memcmp} | |
24722 is called to compare the remainder of the block. The default value is | |
24723 target-specific. | |
24724 | |
24725 @item -mstring-compare-inline-limit=@var{num} | |
24726 @opindex mstring-compare-inline-limit | |
24727 Compare at most @var{num} string bytes with inline code. | |
24728 If the difference or end of string is not found at the | |
24729 end of the inline compare a call to @code{strcmp} or @code{strncmp} will | |
24730 take care of the rest of the comparison. The default is 64 bytes. | |
22800 | 24731 |
22801 @item -G @var{num} | 24732 @item -G @var{num} |
22802 @opindex G | 24733 @opindex G |
22803 @cindex smaller data references (PowerPC) | 24734 @cindex smaller data references (PowerPC) |
22804 @cindex .sdata/.sdata2 references (PowerPC) | 24735 @cindex .sdata/.sdata2 references (PowerPC) |
23414 @var{cpu-type} are @samp{z900}/@samp{arch5}, @samp{z990}/@samp{arch6}, | 25345 @var{cpu-type} are @samp{z900}/@samp{arch5}, @samp{z990}/@samp{arch6}, |
23415 @samp{z9-109}, @samp{z9-ec}/@samp{arch7}, @samp{z10}/@samp{arch8}, | 25346 @samp{z9-109}, @samp{z9-ec}/@samp{arch7}, @samp{z10}/@samp{arch8}, |
23416 @samp{z196}/@samp{arch9}, @samp{zEC12}, @samp{z13}/@samp{arch11}, and | 25347 @samp{z196}/@samp{arch9}, @samp{zEC12}, @samp{z13}/@samp{arch11}, and |
23417 @samp{native}. | 25348 @samp{native}. |
23418 | 25349 |
23419 The default is @option{-march=z900}. @samp{g5}/@samp{arch3} and | 25350 The default is @option{-march=z900}. |
23420 @samp{g6} are deprecated and will be removed with future releases. | |
23421 | 25351 |
23422 Specifying @samp{native} as cpu type can be used to select the best | 25352 Specifying @samp{native} as cpu type can be used to select the best |
23423 architecture option for the host processor. | 25353 architecture option for the host processor. |
23424 @option{-march=native} has no effect if GCC does not recognize the | 25354 @option{-march=native} has no effect if GCC does not recognize the |
23425 processor. | 25355 processor. |
25101 enables all instruction subsets supported by the local machine (hence | 27031 enables all instruction subsets supported by the local machine (hence |
25102 the result might not run on different machines). Using @option{-mtune=native} | 27032 the result might not run on different machines). Using @option{-mtune=native} |
25103 produces code optimized for the local machine under the constraints | 27033 produces code optimized for the local machine under the constraints |
25104 of the selected instruction set. | 27034 of the selected instruction set. |
25105 | 27035 |
27036 @item x86-64 | |
27037 A generic CPU with 64-bit extensions. | |
27038 | |
25106 @item i386 | 27039 @item i386 |
25107 Original Intel i386 CPU@. | 27040 Original Intel i386 CPU@. |
25108 | 27041 |
25109 @item i486 | 27042 @item i486 |
25110 Intel i486 CPU@. (No scheduling is implemented for this chip.) | 27043 Intel i486 CPU@. (No scheduling is implemented for this chip.) |
25195 | 27128 |
25196 @item silvermont | 27129 @item silvermont |
25197 Intel Silvermont CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3, SSSE3, | 27130 Intel Silvermont CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3, SSSE3, |
25198 SSE4.1, SSE4.2, POPCNT, AES, PCLMUL and RDRND instruction set support. | 27131 SSE4.1, SSE4.2, POPCNT, AES, PCLMUL and RDRND instruction set support. |
25199 | 27132 |
27133 @item goldmont | |
27134 Intel Goldmont CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3, SSSE3, | |
27135 SSE4.1, SSE4.2, POPCNT, AES, PCLMUL, RDRND, XSAVE, XSAVEOPT and FSGSBASE | |
27136 instruction set support. | |
27137 | |
27138 @item goldmont-plus | |
27139 Intel Goldmont Plus CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3, | |
27140 SSSE3, SSE4.1, SSE4.2, POPCNT, AES, PCLMUL, RDRND, XSAVE, XSAVEOPT, FSGSBASE, | |
27141 PTWRITE, RDPID, SGX and UMIP instruction set support. | |
27142 | |
27143 @item tremont | |
27144 Intel Tremont CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3, SSSE3, | |
27145 SSE4.1, SSE4.2, POPCNT, AES, PCLMUL, RDRND, XSAVE, XSAVEOPT, FSGSBASE, PTWRITE, | |
27146 RDPID, SGX, UMIP, GFNI-SSE, CLWB and ENCLV instruction set support. | |
27147 | |
25200 @item knl | 27148 @item knl |
25201 Intel Knight's Landing CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3, | 27149 Intel Knight's Landing CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3, |
25202 SSSE3, SSE4.1, SSE4.2, POPCNT, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA, | 27150 SSSE3, SSE4.1, SSE4.2, POPCNT, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA, |
25203 BMI, BMI2, F16C, RDSEED, ADCX, PREFETCHW, AVX512F, AVX512PF, AVX512ER and | 27151 BMI, BMI2, F16C, RDSEED, ADCX, PREFETCHW, AVX512F, AVX512PF, AVX512ER and |
25204 AVX512CD instruction set support. | 27152 AVX512CD instruction set support. |
25211 | 27159 |
25212 @item skylake-avx512 | 27160 @item skylake-avx512 |
25213 Intel Skylake Server CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3, | 27161 Intel Skylake Server CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3, |
25214 SSSE3, SSE4.1, SSE4.2, POPCNT, PKU, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA, | 27162 SSSE3, SSE4.1, SSE4.2, POPCNT, PKU, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA, |
25215 BMI, BMI2, F16C, RDSEED, ADCX, PREFETCHW, CLFLUSHOPT, XSAVEC, XSAVES, AVX512F, | 27163 BMI, BMI2, F16C, RDSEED, ADCX, PREFETCHW, CLFLUSHOPT, XSAVEC, XSAVES, AVX512F, |
25216 AVX512VL, AVX512BW, AVX512DQ and AVX512CD instruction set support. | 27164 CLWB, AVX512VL, AVX512BW, AVX512DQ and AVX512CD instruction set support. |
27165 | |
27166 @item cannonlake | |
27167 Intel Cannonlake Server CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, | |
27168 SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, PKU, AVX, AVX2, AES, PCLMUL, FSGSBASE, | |
27169 RDRND, FMA, BMI, BMI2, F16C, RDSEED, ADCX, PREFETCHW, CLFLUSHOPT, XSAVEC, | |
27170 XSAVES, AVX512F, AVX512VL, AVX512BW, AVX512DQ, AVX512CD, AVX512VBMI, | |
27171 AVX512IFMA, SHA and UMIP instruction set support. | |
27172 | |
27173 @item icelake-client | |
27174 Intel Icelake Client CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, | |
27175 SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, PKU, AVX, AVX2, AES, PCLMUL, FSGSBASE, | |
27176 RDRND, FMA, BMI, BMI2, F16C, RDSEED, ADCX, PREFETCHW, CLFLUSHOPT, XSAVEC, | |
27177 XSAVES, AVX512F, AVX512VL, AVX512BW, AVX512DQ, AVX512CD, AVX512VBMI, | |
27178 AVX512IFMA, SHA, CLWB, UMIP, RDPID, GFNI, AVX512VBMI2, AVX512VPOPCNTDQ, | |
27179 AVX512BITALG, AVX512VNNI, VPCLMULQDQ, VAES instruction set support. | |
27180 | |
27181 @item icelake-server | |
27182 Intel Icelake Server CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, | |
27183 SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, PKU, AVX, AVX2, AES, PCLMUL, FSGSBASE, | |
27184 RDRND, FMA, BMI, BMI2, F16C, RDSEED, ADCX, PREFETCHW, CLFLUSHOPT, XSAVEC, | |
27185 XSAVES, AVX512F, AVX512VL, AVX512BW, AVX512DQ, AVX512CD, AVX512VBMI, | |
27186 AVX512IFMA, SHA, CLWB, UMIP, RDPID, GFNI, AVX512VBMI2, AVX512VPOPCNTDQ, | |
27187 AVX512BITALG, AVX512VNNI, VPCLMULQDQ, VAES, PCONFIG and WBNOINVD instruction | |
27188 set support. | |
25217 | 27189 |
25218 @item k6 | 27190 @item k6 |
25219 AMD K6 CPU with MMX instruction set support. | 27191 AMD K6 CPU with MMX instruction set support. |
25220 | 27192 |
25221 @item k6-2 | 27193 @item k6-2 |
25487 Control whether or not the compiler uses IEEE floating-point | 27459 Control whether or not the compiler uses IEEE floating-point |
25488 comparisons. These correctly handle the case where the result of a | 27460 comparisons. These correctly handle the case where the result of a |
25489 comparison is unordered. | 27461 comparison is unordered. |
25490 | 27462 |
25491 @item -m80387 | 27463 @item -m80387 |
25492 @item -mhard-float | 27464 @itemx -mhard-float |
25493 @opindex 80387 | 27465 @opindex 80387 |
25494 @opindex mhard-float | 27466 @opindex mhard-float |
25495 Generate output containing 80387 instructions for floating point. | 27467 Generate output containing 80387 instructions for floating point. |
25496 | 27468 |
25497 @item -mno-80387 | 27469 @item -mno-80387 |
25498 @item -msoft-float | 27470 @itemx -msoft-float |
25499 @opindex no-80387 | 27471 @opindex no-80387 |
25500 @opindex msoft-float | 27472 @opindex msoft-float |
25501 Generate output containing library calls for floating point. | 27473 Generate output containing library calls for floating point. |
25502 | 27474 |
25503 @strong{Warning:} the requisite libraries are not part of GCC@. | 27475 @strong{Warning:} the requisite libraries are not part of GCC@. |
25524 | 27496 |
25525 @item -mno-fancy-math-387 | 27497 @item -mno-fancy-math-387 |
25526 @opindex mno-fancy-math-387 | 27498 @opindex mno-fancy-math-387 |
25527 Some 387 emulators do not support the @code{sin}, @code{cos} and | 27499 Some 387 emulators do not support the @code{sin}, @code{cos} and |
25528 @code{sqrt} instructions for the 387. Specify this option to avoid | 27500 @code{sqrt} instructions for the 387. Specify this option to avoid |
25529 generating those instructions. This option is the default on | 27501 generating those instructions. |
25530 OpenBSD and NetBSD@. This option is overridden when @option{-march} | 27502 This option is overridden when @option{-march} |
25531 indicates that the target CPU always has an FPU and so the | 27503 indicates that the target CPU always has an FPU and so the |
25532 instruction does not need emulation. These | 27504 instruction does not need emulation. These |
25533 instructions are not generated unless you also use the | 27505 instructions are not generated unless you also use the |
25534 @option{-funsafe-math-optimizations} switch. | 27506 @option{-funsafe-math-optimizations} switch. |
25535 | 27507 |
25819 @opindex maes | 27791 @opindex maes |
25820 @need 200 | 27792 @need 200 |
25821 @itemx -mpclmul | 27793 @itemx -mpclmul |
25822 @opindex mpclmul | 27794 @opindex mpclmul |
25823 @need 200 | 27795 @need 200 |
25824 @itemx -mclfushopt | 27796 @itemx -mclflushopt |
25825 @opindex mclfushopt | 27797 @opindex mclflushopt |
25826 @need 200 | 27798 @need 200 |
25827 @itemx -mfsgsbase | 27799 @itemx -mfsgsbase |
25828 @opindex mfsgsbase | 27800 @opindex mfsgsbase |
25829 @need 200 | 27801 @need 200 |
25830 @itemx -mrdrnd | 27802 @itemx -mrdrnd |
25833 @itemx -mf16c | 27805 @itemx -mf16c |
25834 @opindex mf16c | 27806 @opindex mf16c |
25835 @need 200 | 27807 @need 200 |
25836 @itemx -mfma | 27808 @itemx -mfma |
25837 @opindex mfma | 27809 @opindex mfma |
27810 @need 200 | |
27811 @itemx -mpconfig | |
27812 @opindex mpconfig | |
27813 @need 200 | |
27814 @itemx -mwbnoinvd | |
27815 @opindex mwbnoinvd | |
25838 @need 200 | 27816 @need 200 |
25839 @itemx -mfma4 | 27817 @itemx -mfma4 |
25840 @opindex mfma4 | 27818 @opindex mfma4 |
25841 @need 200 | 27819 @need 200 |
25842 @itemx -mprefetchwt1 | 27820 @itemx -mprefetchwt1 |
25887 @opindex mrtm | 27865 @opindex mrtm |
25888 @need 200 | 27866 @need 200 |
25889 @itemx -mtbm | 27867 @itemx -mtbm |
25890 @opindex mtbm | 27868 @opindex mtbm |
25891 @need 200 | 27869 @need 200 |
25892 @itemx -mmpx | |
25893 @opindex mmpx | |
25894 @need 200 | |
25895 @itemx -mmwaitx | 27870 @itemx -mmwaitx |
25896 @opindex mmwaitx | 27871 @opindex mmwaitx |
25897 @need 200 | 27872 @need 200 |
25898 @itemx -mclzero | 27873 @itemx -mclzero |
25899 @opindex mclzero | 27874 @opindex mclzero |
25900 @need 200 | 27875 @need 200 |
25901 @itemx -mpku | 27876 @itemx -mpku |
25902 @opindex mpku | 27877 @opindex mpku |
25903 @need 200 | 27878 @need 200 |
25904 @itemx -mcet | 27879 @itemx -mavx512vbmi2 |
25905 @opindex mcet | 27880 @opindex mavx512vbmi2 |
27881 @need 200 | |
27882 @itemx -mgfni | |
27883 @opindex mgfni | |
27884 @need 200 | |
27885 @itemx -mvaes | |
27886 @opindex mvaes | |
27887 @need 200 | |
27888 @itemx -mwaitpkg | |
27889 @opindex -mwaitpkg | |
27890 @need 200 | |
27891 @itemx -mvpclmulqdq | |
27892 @opindex mvpclmulqdq | |
27893 @need 200 | |
27894 @itemx -mavx512bitalg | |
27895 @opindex mavx512bitalg | |
27896 @need 200 | |
27897 @itemx -mmovdiri | |
27898 @opindex mmovdiri | |
27899 @need 200 | |
27900 @itemx -mmovdir64b | |
27901 @opindex mmovdir64b | |
27902 @need 200 | |
27903 @itemx -mavx512vpopcntdq | |
27904 @opindex mavx512vpopcntdq | |
27905 @need 200 | |
27906 @itemx -mcldemote | |
27907 @opindex mcldemote | |
25906 These switches enable the use of instructions in the MMX, SSE, | 27908 These switches enable the use of instructions in the MMX, SSE, |
25907 SSE2, SSE3, SSSE3, SSE4.1, AVX, AVX2, AVX512F, AVX512PF, AVX512ER, AVX512CD, | 27909 SSE2, SSE3, SSSE3, SSE4.1, AVX, AVX2, AVX512F, AVX512PF, AVX512ER, AVX512CD, |
25908 SHA, AES, PCLMUL, FSGSBASE, RDRND, F16C, FMA, SSE4A, FMA4, XOP, LWP, ABM, | 27910 SHA, AES, PCLMUL, FSGSBASE, RDRND, F16C, FMA, SSE4A, FMA4, XOP, LWP, ABM, |
25909 AVX512VL, AVX512BW, AVX512DQ, AVX512IFMA AVX512VBMI, BMI, BMI2, FXSR, | 27911 AVX512VL, AVX512BW, AVX512DQ, AVX512IFMA, AVX512VBMI, BMI, BMI2, VAES, WAITPKG, |
25910 XSAVE, XSAVEOPT, LZCNT, RTM, MPX, MWAITX, PKU, IBT, SHSTK, | 27912 FXSR, XSAVE, XSAVEOPT, LZCNT, RTM, MWAITX, PKU, IBT, SHSTK, AVX512VBMI2, |
25911 3DNow!@: or enhanced 3DNow!@: extended instruction sets. Each has a | 27913 GFNI, VPCLMULQDQ, AVX512BITALG, MOVDIRI, MOVDIR64B, |
25912 corresponding @option{-mno-} option to disable use of these instructions. | 27914 AVX512VPOPCNTDQ, CLDEMOTE, 3DNow!@: or enhanced 3DNow!@: extended instruction |
27915 sets. Each has a corresponding @option{-mno-} option to disable use of these | |
27916 instructions. | |
25913 | 27917 |
25914 These extensions are also available as built-in functions: see | 27918 These extensions are also available as built-in functions: see |
25915 @ref{x86 Built-in Functions}, for details of the functions enabled and | 27919 @ref{x86 Built-in Functions}, for details of the functions enabled and |
25916 disabled by these switches. | 27920 disabled by these switches. |
25917 | 27921 |
25926 generated code, even without @option{-mfpmath=sse}. Applications that | 27930 generated code, even without @option{-mfpmath=sse}. Applications that |
25927 perform run-time CPU detection must compile separate files for each | 27931 perform run-time CPU detection must compile separate files for each |
25928 supported architecture, using the appropriate flags. In particular, | 27932 supported architecture, using the appropriate flags. In particular, |
25929 the file containing the CPU detection code should be compiled without | 27933 the file containing the CPU detection code should be compiled without |
25930 these options. | 27934 these options. |
25931 | |
25932 The @option{-mcet} option turns on the @option{-mibt} and @option{-mshstk} | |
25933 options. The @option{-mibt} option enables indirect branch tracking support | |
25934 and the @option{-mshstk} option enables shadow stack support from | |
25935 Intel Control-flow Enforcement Technology (CET). The compiler also provides | |
25936 a number of built-in functions for fine-grained control in a CET-based | |
25937 application. See @xref{x86 Built-in Functions}, for more information. | |
25938 | 27935 |
25939 @item -mdump-tune-features | 27936 @item -mdump-tune-features |
25940 @opindex mdump-tune-features | 27937 @opindex mdump-tune-features |
25941 This option instructs GCC to dump the names of the x86 performance | 27938 This option instructs GCC to dump the names of the x86 performance |
25942 tuning features and default settings. The names can be used in | 27939 tuning features and default settings. The names can be used in |
25981 @item -mprefer-avx128 | 27978 @item -mprefer-avx128 |
25982 @opindex mprefer-avx128 | 27979 @opindex mprefer-avx128 |
25983 This option instructs GCC to use 128-bit AVX instructions instead of | 27980 This option instructs GCC to use 128-bit AVX instructions instead of |
25984 256-bit AVX instructions in the auto-vectorizer. | 27981 256-bit AVX instructions in the auto-vectorizer. |
25985 | 27982 |
25986 @item -mprefer-avx256 | 27983 @item -mprefer-vector-width=@var{opt} |
25987 @opindex mprefer-avx256 | 27984 @opindex mprefer-vector-width |
25988 This option instructs GCC to use 256-bit AVX instructions instead of | 27985 This option instructs GCC to use @var{opt}-bit vector width in instructions |
25989 512-bit AVX instructions in the auto-vectorizer. | 27986 instead of default on the selected platform. |
27987 | |
27988 @table @samp | |
27989 @item none | |
27990 No extra limitations applied to GCC other than defined by the selected platform. | |
27991 | |
27992 @item 128 | |
27993 Prefer 128-bit vector width for instructions. | |
27994 | |
27995 @item 256 | |
27996 Prefer 256-bit vector width for instructions. | |
27997 | |
27998 @item 512 | |
27999 Prefer 512-bit vector width for instructions. | |
28000 @end table | |
25990 | 28001 |
25991 @item -mcx16 | 28002 @item -mcx16 |
25992 @opindex mcx16 | 28003 @opindex mcx16 |
25993 This option enables GCC to generate @code{CMPXCHG16B} instructions in 64-bit | 28004 This option enables GCC to generate @code{CMPXCHG16B} instructions in 64-bit |
25994 code to implement compare-and-exchange operations on 16-byte aligned 128-bit | 28005 code to implement compare-and-exchange operations on 16-byte aligned 128-bit |
26012 @item -mmovbe | 28023 @item -mmovbe |
26013 @opindex mmovbe | 28024 @opindex mmovbe |
26014 This option enables use of the @code{movbe} instruction to implement | 28025 This option enables use of the @code{movbe} instruction to implement |
26015 @code{__builtin_bswap32} and @code{__builtin_bswap64}. | 28026 @code{__builtin_bswap32} and @code{__builtin_bswap64}. |
26016 | 28027 |
26017 @item -mibt | |
26018 @opindex mibt | |
26019 This option tells the compiler to use indirect branch tracking support | |
26020 (for indirect calls and jumps) from x86 Control-flow Enforcement | |
26021 Technology (CET). The option has effect only if the | |
26022 @option{-fcf-protection=full} or @option{-fcf-protection=branch} option | |
26023 is specified. The option @option{-mibt} is on by default when the | |
26024 @code{-mcet} option is specified. | |
26025 | |
26026 @item -mshstk | 28028 @item -mshstk |
26027 @opindex mshstk | 28029 @opindex mshstk |
26028 This option tells the compiler to use shadow stack support (return | 28030 The @option{-mshstk} option enables shadow stack built-in functions |
26029 address tracking) from x86 Control-flow Enforcement Technology (CET). | 28031 from x86 Control-flow Enforcement Technology (CET). |
26030 The option has effect only if the @option{-fcf-protection=full} or | |
26031 @option{-fcf-protection=return} option is specified. The option | |
26032 @option{-mshstk} is on by default when the @option{-mcet} option is | |
26033 specified. | |
26034 | 28032 |
26035 @item -mcrc32 | 28033 @item -mcrc32 |
26036 @opindex mcrc32 | 28034 @opindex mcrc32 |
26037 This option enables built-in functions @code{__builtin_ia32_crc32qi}, | 28035 This option enables built-in functions @code{__builtin_ia32_crc32qi}, |
26038 @code{__builtin_ia32_crc32hi}, @code{__builtin_ia32_crc32si} and | 28036 @code{__builtin_ia32_crc32hi}, @code{__builtin_ia32_crc32si} and |
26102 To use this option, both @option{-ftree-vectorize} and | 28100 To use this option, both @option{-ftree-vectorize} and |
26103 @option{-funsafe-math-optimizations} have to be enabled, and an SVML or ACML | 28101 @option{-funsafe-math-optimizations} have to be enabled, and an SVML or ACML |
26104 ABI-compatible library must be specified at link time. | 28102 ABI-compatible library must be specified at link time. |
26105 | 28103 |
26106 GCC currently emits calls to @code{vmldExp2}, | 28104 GCC currently emits calls to @code{vmldExp2}, |
26107 @code{vmldLn2}, @code{vmldLog102}, @code{vmldLog102}, @code{vmldPow2}, | 28105 @code{vmldLn2}, @code{vmldLog102}, @code{vmldPow2}, |
26108 @code{vmldTanh2}, @code{vmldTan2}, @code{vmldAtan2}, @code{vmldAtanh2}, | 28106 @code{vmldTanh2}, @code{vmldTan2}, @code{vmldAtan2}, @code{vmldAtanh2}, |
26109 @code{vmldCbrt2}, @code{vmldSinh2}, @code{vmldSin2}, @code{vmldAsinh2}, | 28107 @code{vmldCbrt2}, @code{vmldSinh2}, @code{vmldSin2}, @code{vmldAsinh2}, |
26110 @code{vmldAsin2}, @code{vmldCosh2}, @code{vmldCos2}, @code{vmldAcosh2}, | 28108 @code{vmldAsin2}, @code{vmldCosh2}, @code{vmldCos2}, @code{vmldAcosh2}, |
26111 @code{vmldAcos2}, @code{vmlsExp4}, @code{vmlsLn4}, @code{vmlsLog104}, | 28109 @code{vmldAcos2}, @code{vmlsExp4}, @code{vmlsLn4}, |
26112 @code{vmlsLog104}, @code{vmlsPow4}, @code{vmlsTanh4}, @code{vmlsTan4}, | 28110 @code{vmlsLog104}, @code{vmlsPow4}, @code{vmlsTanh4}, @code{vmlsTan4}, |
26113 @code{vmlsAtan4}, @code{vmlsAtanh4}, @code{vmlsCbrt4}, @code{vmlsSinh4}, | 28111 @code{vmlsAtan4}, @code{vmlsAtanh4}, @code{vmlsCbrt4}, @code{vmlsSinh4}, |
26114 @code{vmlsSin4}, @code{vmlsAsinh4}, @code{vmlsAsin4}, @code{vmlsCosh4}, | 28112 @code{vmlsSin4}, @code{vmlsAsinh4}, @code{vmlsAsin4}, @code{vmlsCosh4}, |
26115 @code{vmlsCos4}, @code{vmlsAcosh4} and @code{vmlsAcos4} for corresponding | 28113 @code{vmlsCos4}, @code{vmlsAcosh4} and @code{vmlsAcos4} for corresponding |
26116 function type when @option{-mveclibabi=svml} is used, and @code{__vrd2_sin}, | 28114 function type when @option{-mveclibabi=svml} is used, and @code{__vrd2_sin}, |
26127 @samp{ms} for the Microsoft ABI. The default is to use the Microsoft | 28125 @samp{ms} for the Microsoft ABI. The default is to use the Microsoft |
26128 ABI when targeting Microsoft Windows and the SysV ABI on all other systems. | 28126 ABI when targeting Microsoft Windows and the SysV ABI on all other systems. |
26129 You can control this behavior for specific functions by | 28127 You can control this behavior for specific functions by |
26130 using the function attributes @code{ms_abi} and @code{sysv_abi}. | 28128 using the function attributes @code{ms_abi} and @code{sysv_abi}. |
26131 @xref{Function Attributes}. | 28129 @xref{Function Attributes}. |
28130 | |
28131 @item -mforce-indirect-call | |
28132 @opindex mforce-indirect-call | |
28133 Force all calls to functions to be indirect. This is useful | |
28134 when using Intel Processor Trace where it generates more precise timing | |
28135 information for function calls. | |
26132 | 28136 |
26133 @item -mcall-ms2sysv-xlogues | 28137 @item -mcall-ms2sysv-xlogues |
26134 @opindex mcall-ms2sysv-xlogues | 28138 @opindex mcall-ms2sysv-xlogues |
26135 @opindex mno-call-ms2sysv-xlogues | 28139 @opindex mno-call-ms2sysv-xlogues |
26136 Due to differences in 64-bit ABIs, any Microsoft ABI function that calls a | 28140 Due to differences in 64-bit ABIs, any Microsoft ABI function that calls a |
26459 @option{-mstack-protector-guard-offset=@var{offset}} furthermore specify | 28463 @option{-mstack-protector-guard-offset=@var{offset}} furthermore specify |
26460 which segment register (@code{%fs} or @code{%gs}) to use as base register | 28464 which segment register (@code{%fs} or @code{%gs}) to use as base register |
26461 for reading the canary, and from what offset from that base register. | 28465 for reading the canary, and from what offset from that base register. |
26462 The default for those is as specified in the relevant ABI. | 28466 The default for those is as specified in the relevant ABI. |
26463 | 28467 |
26464 @item -mmitigate-rop | |
26465 @opindex mmitigate-rop | |
26466 Try to avoid generating code sequences that contain unintended return | |
26467 opcodes, to mitigate against certain forms of attack. At the moment, | |
26468 this option is limited in what it can do and should not be relied | |
26469 on to provide serious protection. | |
26470 | |
26471 @item -mgeneral-regs-only | 28468 @item -mgeneral-regs-only |
26472 @opindex mgeneral-regs-only | 28469 @opindex mgeneral-regs-only |
26473 Generate code that uses only the general-purpose registers. This | 28470 Generate code that uses only the general-purpose registers. This |
26474 prevents the compiler from using floating-point, vector, mask and bound | 28471 prevents the compiler from using floating-point, vector, mask and bound |
26475 registers. | 28472 registers. |
28473 | |
28474 @item -mindirect-branch=@var{choice} | |
28475 @opindex -mindirect-branch | |
28476 Convert indirect call and jump with @var{choice}. The default is | |
28477 @samp{keep}, which keeps indirect call and jump unmodified. | |
28478 @samp{thunk} converts indirect call and jump to call and return thunk. | |
28479 @samp{thunk-inline} converts indirect call and jump to inlined call | |
28480 and return thunk. @samp{thunk-extern} converts indirect call and jump | |
28481 to external call and return thunk provided in a separate object file. | |
28482 You can control this behavior for a specific function by using the | |
28483 function attribute @code{indirect_branch}. @xref{Function Attributes}. | |
28484 | |
28485 Note that @option{-mcmodel=large} is incompatible with | |
28486 @option{-mindirect-branch=thunk} and | |
28487 @option{-mindirect-branch=thunk-extern} since the thunk function may | |
28488 not be reachable in the large code model. | |
28489 | |
28490 Note that @option{-mindirect-branch=thunk-extern} is incompatible with | |
28491 @option{-fcf-protection=branch} since the external thunk can not be modified | |
28492 to disable control-flow check. | |
28493 | |
28494 @item -mfunction-return=@var{choice} | |
28495 @opindex -mfunction-return | |
28496 Convert function return with @var{choice}. The default is @samp{keep}, | |
28497 which keeps function return unmodified. @samp{thunk} converts function | |
28498 return to call and return thunk. @samp{thunk-inline} converts function | |
28499 return to inlined call and return thunk. @samp{thunk-extern} converts | |
28500 function return to external call and return thunk provided in a separate | |
28501 object file. You can control this behavior for a specific function by | |
28502 using the function attribute @code{function_return}. | |
28503 @xref{Function Attributes}. | |
28504 | |
28505 Note that @option{-mcmodel=large} is incompatible with | |
28506 @option{-mfunction-return=thunk} and | |
28507 @option{-mfunction-return=thunk-extern} since the thunk function may | |
28508 not be reachable in the large code model. | |
28509 | |
28510 | |
28511 @item -mindirect-branch-register | |
28512 @opindex -mindirect-branch-register | |
28513 Force indirect call and jump via register. | |
26476 | 28514 |
26477 @end table | 28515 @end table |
26478 | 28516 |
26479 These @samp{-m} switches are supported in addition to the above | 28517 These @samp{-m} switches are supported in addition to the above |
26480 on x86-64 processors in 64-bit environments. | 28518 on x86-64 processors in 64-bit environments. |