]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/common.opt
[gcc]
[thirdparty/gcc.git] / gcc / common.opt
CommitLineData
3272db82 1; Options for the language- and target-independent parts of the compiler.
2e9da478 2
711789cc 3; Copyright (C) 2003-2013 Free Software Foundation, Inc.
3272db82 4;
5; This file is part of GCC.
6;
7; GCC is free software; you can redistribute it and/or modify it under
8; the terms of the GNU General Public License as published by the Free
8c4c00c1 9; Software Foundation; either version 3, or (at your option) any later
3272db82 10; version.
a0c938f0 11;
3272db82 12; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13; WARRANTY; without even the implied warranty of MERCHANTABILITY or
14; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15; for more details.
a0c938f0 16;
3272db82 17; You should have received a copy of the GNU General Public License
8c4c00c1 18; along with GCC; see the file COPYING3. If not see
19; <http://www.gnu.org/licenses/>.
3272db82 20
a4b0007b 21; See the GCC internals manual (options.texi) for a description of this file's format.
3272db82 22
23; Please try to keep this file in ASCII collating order.
24
0f8defe5 25Variable
26int target_flags
27
2c5d2e39 28Variable
29int optimize
30
31Variable
32int optimize_size
33
9b0d2865 34Variable
35int optimize_debug
36
d2807aa3 37; Not used directly to control optimizations, only to save -Ofast
38; setting for "optimize" attributes.
39Variable
40int optimize_fast
41
90336809 42; True if this is the lto front end. This is used to disable gimple
43; generation and lowering passes that are normally run on the output
44; of a front end. These passes must be bypassed for lto since they
45; have already been done before the gimple was written.
46Variable
47bool in_lto_p = false
48
f3f006ad 49; 0 means straightforward implementation of complex divide acceptable.
50; 1 means wide ranges of inputs must work for complex divide.
51; 2 means C99-like requirements for complex multiply and divide.
52Variable
53int flag_complex_method = 1
54
55; Nonzero if subexpressions must be evaluated from left-to-right.
56Variable
57int flag_evaluation_order = 0
58
f3f006ad 59; Language specific warning pass for unused results.
60Variable
61bool flag_warn_unused_result = false
62
56f280c4 63Variable
64int *param_values
65
6bd9d862 66; Nonzero if we should write GIMPLE bytecode for link-time optimization.
67Variable
68int flag_generate_lto
69
70; True to warn about any objects definitions whose size is larger
71; than N bytes. Also want about function definitions whose returned
72; values are larger than N bytes, where N is 'larger_than_size'.
73Variable
74bool warn_larger_than
75
76Variable
77HOST_WIDE_INT larger_than_size
78
79; True to warn about any function whose frame size is larger
80; than N bytes.
81Variable
82bool warn_frame_larger_than
83
84Variable
85HOST_WIDE_INT frame_larger_than_size
86
87; Nonzero means we should be saving declaration info into a .X file.
88Variable
89int flag_gen_aux_info = 0
90
91; Nonzero if we are compiling code for a shared library, zero for
92; executable.
93Variable
94int flag_shlib
95
470a0ecd 96; These two are really VEC(char_p,heap) *.
97
98Variable
99void *flag_instrument_functions_exclude_functions
100
101Variable
102void *flag_instrument_functions_exclude_files
103
d7175aef 104; Generic structs (e.g. templates not explicitly specialized)
105; may not have a compilation unit associated with them, and so
106; may need to be treated differently from ordinary structs.
107;
108; Structs only handled by reference (indirectly), will also usually
109; not need as much debugging information.
110
111Variable
112enum debug_struct_file debug_struct_ordinary[DINFO_USAGE_NUM_ENUMS] = { DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY }
113
114Variable
115enum debug_struct_file debug_struct_generic[DINFO_USAGE_NUM_ENUMS] = { DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY }
116
cc4fa57a 117; True if we should exit after parsing options.
118Variable
119bool exit_after_options
120
121; Type(s) of debugging information we are producing (if any). See
122; flag-types.h for the definitions of the different possible types of
123; debugging information.
124Variable
125enum debug_info_type write_symbols = NO_DEBUG
126
127; Level of debugging information we are producing. See flag-types.h
128; for the definitions of the different possible levels.
129Variable
130enum debug_info_levels debug_info_level = DINFO_LEVEL_NONE
131
132; Nonzero means use GNU-only extensions in the generated symbolic
133; debugging information. Currently, this only has an effect when
134; write_symbols is set to DBX_DEBUG, XCOFF_DEBUG, or DWARF_DEBUG.
135Variable
136bool use_gnu_debug_info_extensions
137
9faf44d6 138; Original value of maximum field alignment in bytes, specified via
139; -fpack-struct=<value>.
140Variable
141unsigned int initial_max_fld_align = TARGET_DEFAULT_PACK_STRUCT
142
ab3728ee 143; Type of stack check.
144Variable
145enum stack_check_type flag_stack_check = NO_STACK_CHECK
146
8c0dd614 147; True if stack usage information needs to be computed.
148Variable
149bool flag_stack_usage_info = false
150
9faf44d6 151; -dA causes debug commentary information to be produced in
152; the generated assembly code (to make it more readable). This option
153; is generally only of use to those who actually need to read the
154; generated assembly code (perhaps while debugging the compiler itself).
155; Currently, this switch is only used by dwarf2out.c; however, it is intended
156; to be a catchall for printing debug information in the assembler file.
157Variable
158int flag_debug_asm
159
160; -dP causes the rtl to be emitted as a comment in assembly.
161Variable
162int flag_dump_rtl_in_asm
163
164; Whether -da was passed (used only in handle_common_deferred_options).
165Variable
166bool flag_dump_all_passed
167
168; Other flags saying which kinds of debugging dump have been requested.
169
170Variable
171int rtl_dump_and_exit
172
173Variable
174int flag_print_asm_name
175
0e763b2a 176; Name of top-level original source file (what was input to cpp).
177; This comes from the #-command at the beginning of the actual input.
178; If there isn't any there, then this is the cc1 input file name.
179Variable
180const char *main_input_filename
181
182; Pointer to base name in main_input_filename, with directories and a
183; single final extension removed, and the length of this base
184; name.
185
186Variable
187const char *main_input_basename
188
189Variable
190int main_input_baselength
191
9faf44d6 192; Which options have been printed by --help.
193Variable
194char *help_printed
195
d62a5950 196; Which enums have been printed by --help. 0 = not printed, no
197; relevant options seen, 1 = relevant option seen, not yet printed, 2
198; = printed.
199Variable
200char *help_enum_printed
201
9faf44d6 202; The number of columns for --help output.
203Variable
204unsigned int help_columns
205
206; Whether this options structure has been through finish_options
207Variable
208bool flag_opts_finished
209
9e46467d 210; What the sanitizer should instrument
211Variable
212unsigned int flag_sanitize
213
e28aa114 214###
215Driver
216
5789e05b 217-assemble
218Driver Alias(S)
219
220-compile
221Driver Alias(c)
222
223-coverage
224Driver Alias(coverage)
225
226-debug
227Common Alias(g)
228
229-dump
230Common Separate Alias(d)
231
232-dump=
233Common Joined Alias(d)
234
235-dumpbase
236Common Separate Alias(dumpbase)
237
238-dumpdir
239Common Separate Alias(dumpdir)
240
241-entry
242Driver Separate Alias(e)
243
244-entry=
245Driver Joined Alias(e)
246
247-extra-warnings
248Common Warning Alias(Wextra)
249
250-for-assembler
251Driver Separate Alias(Xassembler)
252
253-for-assembler=
254Driver JoinedOrMissing Alias(Xassembler)
255
256-for-linker
257Driver Separate Alias(Xlinker)
258
259-for-linker=
260Driver JoinedOrMissing Alias(Xlinker)
261
262-force-link
263Driver Separate Alias(u)
264
265-force-link=
266Driver Joined Alias(u)
267
e690b385 268-help
5789e05b 269Common Driver Var(help_flag)
53b8e5c1 270Display this information
e690b385 271
87c75316 272-help=
e28aa114 273Common Driver Report Joined
87c75316 274--help=<class> Display descriptions of a specific class of options. <class> is one or more of optimizers, target, warnings, undocumented, params
da3b1bab 275
5789e05b 276-language
277Driver Separate Alias(x)
278
279-language=
280Driver Joined Alias(x)
281
282-library-directory
283Driver Separate Alias(L)
284
285-library-directory=
286Driver Joined Alias(L)
287
288-no-canonical-prefixes
289Driver Alias(no-canonical-prefixes)
290
291-no-standard-libraries
292Driver Alias(nostdlib)
293
70eb49f5 294-no-sysroot-suffix
295Driver Var(no_sysroot_suffix)
296
5789e05b 297-no-warnings
298Common Alias(w)
299
300-optimize
301Common Alias(O)
302
303-output
304Common Driver Separate Alias(o) MissingArgError(missing filename after %qs)
305
306-output=
307Common Driver Joined Alias(o) MissingArgError(missing filename after %qs)
308
309-pass-exit-codes
310Driver Alias(pass-exit-codes)
311
312-pedantic
29438999 313Common Alias(Wpedantic)
5789e05b 314
315-pedantic-errors
316Common Alias(pedantic-errors)
317
318-pie
1412b935 319Driver Alias(pie)
5789e05b 320
321-pipe
322Driver Alias(pipe)
323
324-prefix
325Driver Separate Alias(B)
326
327-prefix=
328Driver JoinedOrMissing Alias(B)
329
330-preprocess
331Driver Alias(E)
332
333-print-file-name
334Driver Separate Alias(print-file-name=)
335
336-print-file-name=
337Driver JoinedOrMissing Alias(print-file-name=)
338
339-print-libgcc-file-name
340Driver Alias(print-libgcc-file-name)
341
342-print-multi-directory
343Driver Alias(print-multi-directory)
344
345-print-multi-lib
346Driver Alias(print-multi-lib)
347
348-print-multi-os-directory
349Driver Alias(print-multi-os-directory)
350
77adc39e 351-print-multiarch
352Driver Alias(print-multiarch)
353
5789e05b 354-print-prog-name
355Driver Separate Alias(print-prog-name=)
356
357-print-prog-name=
358Driver JoinedOrMissing Alias(print-prog-name=)
359
360-print-search-dirs
361Driver Alias(print-search-dirs)
362
363-print-sysroot
364Driver Alias(print-sysroot)
365
366-print-sysroot-headers-suffix
367Driver Alias(print-sysroot-headers-suffix)
368
369-profile
370Common Alias(p)
371
372-save-temps
373Driver Alias(save-temps)
374
375-shared
1412b935 376Driver Alias(shared)
5789e05b 377
378-specs
379Driver Separate Alias(specs=)
380
381-specs=
382Driver Joined Alias(specs=)
383
384-static
385Driver Alias(static)
386
387-symbolic
388Driver Alias(symbolic)
389
e690b385 390-target-help
e28aa114 391Common Driver
87c75316 392Alias for --help=target
393
5789e05b 394-time
395Driver Alias(time)
396
397-verbose
398Driver Alias(v)
399
400;; The driver used to convert options such as --help into forms such
401;; as -fhelp; the following four entries are for compatibility with
402;; any direct uses of those (undocumented) -f forms
87c75316 403fhelp
5789e05b 404Common Driver Alias(-help)
87c75316 405
406fhelp=
5789e05b 407Common Driver Joined Alias(-help=)
87c75316 408
409ftarget-help
5789e05b 410Common Driver Alias(-target-help)
87c75316 411
39932bd2 412fversion
5789e05b 413Common Driver Alias(-version)
39932bd2 414
87c75316 415-param
416Common Separate
417--param <param>=<value> Set parameter <param> to value. See below for a complete list of parameters
e690b385 418
5789e05b 419-param=
420Common Joined Alias(-param)
421
422-sysroot
423Driver Separate Alias(-sysroot=)
424
e28aa114 425-sysroot=
426Driver JoinedOrMissing
427
e690b385 428-version
e28aa114 429Common Driver
430
431B
432Driver Joined Separate
433
434E
435Driver
e690b385 436
cb22f930 437L
438Driver Joined Separate
439
3bfde2af 440N
441Driver
442
da3b1bab 443O
46f8e3b0 444Common JoinedOrMissing Optimization
53b8e5c1 445-O<number> Set optimization level to <number>
da3b1bab 446
447Os
46f8e3b0 448Common Optimization
53b8e5c1 449Optimize for space rather than speed
da3b1bab 450
1ebc0b9f 451Ofast
452Common Optimization
453Optimize for speed disregarding exact standards compliance
454
9b0d2865 455Og
456Common Optimization
457Optimize for debugging experience rather than speed or size
458
3bfde2af 459Q
460Driver
461
462Qn
463Driver Negative(Qy)
464
465Qy
466Driver Negative(Qn)
467
f37ef985 468R
469Driver Joined Separate
470
e28aa114 471S
472Driver
473
f37ef985 474T
475Driver Joined Separate
476
477Tbss
478Driver Separate
479
69304750 480Tbss=
481Driver Joined
482
f37ef985 483Tdata
484Driver Separate
485
69304750 486Tdata=
487Driver Joined
488
f37ef985 489Ttext
490Driver Separate
491
69304750 492Ttext=
493Driver Joined
494
da3b1bab 495W
67089c6b 496Common RejectNegative Warning Alias(Wextra)
bb0814ce 497This switch is deprecated; use -Wextra instead
da3b1bab 498
e28aa114 499Wa,
500Driver JoinedOrMissing
501
502Wl,
503Driver JoinedOrMissing
504
505Wp,
506Driver JoinedOrMissing
507
6f2f567f 508Waggregate-return
87c75316 509Common Var(warn_aggregate_return) Warning
bb0814ce 510Warn about returning structures, unions or arrays
6f2f567f 511
228bf2b8 512Waggressive-loop-optimizations
513Common Var(warn_aggressive_loop_optimizations) Init(1) Warning
514Warn if a loop with constant number of iterations triggers undefined behavior
515
5bc96398 516Warray-bounds
e8831472 517Common Var(warn_array_bounds) Warning
5bc96398 518Warn if an array is accessed out of bounds
519
9b2d6d13 520Wattributes
87c75316 521Common Var(warn_attributes) Init(1) Warning
9b2d6d13 522Warn about inappropriate attribute usage
523
6f2f567f 524Wcast-align
87c75316 525Common Var(warn_cast_align) Warning
bb0814ce 526Warn about pointer casts which increase alignment
6f2f567f 527
3a79f5da 528Wcpp
529Common Var(warn_cpp) Init(1) Warning
530Warn when a #warning directive is encountered
531
6f2f567f 532Wdeprecated-declarations
87c75316 533Common Var(warn_deprecated_decl) Init(1) Warning
bb0814ce 534Warn about uses of __attribute__((deprecated)) declarations
6f2f567f 535
536Wdisabled-optimization
87c75316 537Common Var(warn_disabled_optimization) Warning
bb0814ce 538Warn when an optimization pass is disabled
6f2f567f 539
540Werror
2e9da478 541Common Var(warnings_are_errors)
bb0814ce 542Treat all warnings as errors
6f2f567f 543
76f02516 544Werror=
545Common Joined
546Treat specified warning as error
547
da3b1bab 548Wextra
a0ded67b 549Common Var(extra_warnings) Warning
53b8e5c1 550Print extra (possibly unwanted) warnings
da3b1bab 551
295acf4f 552Wfatal-errors
2e9da478 553Common Var(flag_fatal_errors)
295acf4f 554Exit on the first error occurred
555
6fdade09 556Wframe-larger-than=
557Common RejectNegative Joined UInteger
cf210371 558-Wframe-larger-than=<number> Warn if a function's stack frame requires more than <number> bytes
6fdade09 559
f74ea1c2 560Wfree-nonheap-object
561Common Var(warn_free_nonheap_object) Init(1) Warning
562Warn when attempting to free a non-heap object
563
6f2f567f 564Winline
87c75316 565Common Var(warn_inline) Warning
bb0814ce 566Warn when an inlined function cannot be inlined
6f2f567f 567
1cd6e20d 568Winvalid-memory-model
569Common Var(warn_invalid_memory_model) Init(1) Warning
570Warn when an atomic memory model parameter is known to be outside the valid range.
571
6f2f567f 572Wlarger-than-
67089c6b 573Common RejectNegative Joined Warning Undocumented Alias(Wlarger-than=)
17c66687 574
575Wlarger-than=
576Common RejectNegative Joined UInteger Warning
577-Wlarger-than=<number> Warn if an object is larger than <number> bytes
6f2f567f 578
7e3cc681 579Wunsafe-loop-optimizations
87c75316 580Common Var(warn_unsafe_loop_optimizations) Warning
7e3cc681 581Warn if the loop cannot be optimized due to nontrivial assumptions.
582
6f2f567f 583Wmissing-noreturn
fdc46702 584Common Alias(Wsuggest-attribute=noreturn)
6f2f567f 585
55972f40 586Woverflow
87c75316 587Common Var(warn_overflow) Init(1) Warning
55972f40 588Warn about overflow in arithmetic expressions
589
6f2f567f 590Wpacked
87c75316 591Common Var(warn_packed) Warning
bb0814ce 592Warn when the packed attribute has no effect on struct layout
6f2f567f 593
594Wpadded
87c75316 595Common Var(warn_padded) Warning
bb0814ce 596Warn when padding is required to align structure members
6f2f567f 597
29438999 598Wpedantic
599Common Var(pedantic) Warning
600Issue warnings needed for strict compliance to the standard
601
6f2f567f 602Wshadow
87c75316 603Common Var(warn_shadow) Warning
bb0814ce 604Warn when one local variable shadows another
6f2f567f 605
f1a0edff 606Wstack-protector
87c75316 607Common Var(warn_stack_protect) Warning
f1a0edff 608Warn when not issuing stack smashing protection for some reason
609
8c0dd614 610Wstack-usage=
611Common Joined RejectNegative UInteger Var(warn_stack_usage) Init(-1) Warning
612Warn if stack usage might be larger than specified amount
613
6f2f567f 614Wstrict-aliasing
87c75316 615Common Warning
bb0814ce 616Warn about code which might break strict aliasing rules
6f2f567f 617
c1628b55 618Wstrict-aliasing=
77b27208 619Common Joined RejectNegative UInteger Var(warn_strict_aliasing) Warning
c1628b55 620Warn about code which might break strict aliasing rules
621
add6ee5e 622Wstrict-overflow
e8831472 623Common Warning
add6ee5e 624Warn about optimizations that assume that signed overflow is undefined
625
626Wstrict-overflow=
77b27208 627Common Joined RejectNegative UInteger Var(warn_strict_overflow) Warning
add6ee5e 628Warn about optimizations that assume that signed overflow is undefined
629
2c06958d 630Wsuggest-attribute=const
631Common Var(warn_suggest_attribute_const) Warning
632Warn about functions which might be candidates for __attribute__((const))
633
634Wsuggest-attribute=pure
635Common Var(warn_suggest_attribute_pure) Warning
636Warn about functions which might be candidates for __attribute__((pure))
637
43d60d64 638Wsuggest-attribute=noreturn
639Common Var(warn_suggest_attribute_noreturn) Warning
640Warn about functions which might be candidates for __attribute__((noreturn))
641
6f2f567f 642Wsystem-headers
87c75316 643Common Var(warn_system_headers) Warning
72528c71 644Do not suppress warnings from system headers
6f2f567f 645
8bc8a8f4 646Wtrampolines
647Common Var(warn_trampolines) Warning
648Warn whenever a trampoline is generated
649
100b67da 650Wtype-limits
70059cea 651Common Var(warn_type_limits) Warning EnabledBy(Wextra)
100b67da 652Warn if a comparison is always true or always false due to the limited range of the data type
653
6f2f567f 654Wuninitialized
fbb6fbd8 655Common Var(warn_uninitialized) Warning EnabledBy(Wextra)
bb0814ce 656Warn about uninitialized automatic variables
6f2f567f 657
8c3e8d68 658Wmaybe-uninitialized
fbb6fbd8 659Common Var(warn_maybe_uninitialized) Warning EnabledBy(Wuninitialized)
8c3e8d68 660Warn about maybe uninitialized automatic variables
661
6f2f567f 662Wunreachable-code
3b0273a1 663Common Ignore
cc029bec 664Does nothing. Preserved for backward compatibility.
6f2f567f 665
da3b1bab 666Wunused
278e3a1f 667Common Var(warn_unused) Init(0) Warning
53b8e5c1 668Enable all -Wunused- warnings
da3b1bab 669
abc6c64f 670Wunused-but-set-parameter
1090f26f 671Common Var(warn_unused_but_set_parameter) Warning EnabledBy(Wunused && Wextra)
abc6c64f 672Warn when a function parameter is only set, otherwise unused
673
674Wunused-but-set-variable
fbb6fbd8 675Common Var(warn_unused_but_set_variable) Warning EnabledBy(Wunused)
abc6c64f 676Warn when a variable is only set, otherwise unused
677
6f2f567f 678Wunused-function
fbb6fbd8 679Common Var(warn_unused_function) Warning EnabledBy(Wunused)
bb0814ce 680Warn when a function is unused
6f2f567f 681
682Wunused-label
fbb6fbd8 683Common Var(warn_unused_label) Warning EnabledBy(Wunused)
bb0814ce 684Warn when a label is unused
6f2f567f 685
686Wunused-parameter
1090f26f 687Common Var(warn_unused_parameter) Warning EnabledBy(Wunused && Wextra)
bb0814ce 688Warn when a function parameter is unused
6f2f567f 689
690Wunused-value
fbb6fbd8 691Common Var(warn_unused_value) Warning EnabledBy(Wunused)
bb0814ce 692Warn when an expression value is unused
6f2f567f 693
694Wunused-variable
fbb6fbd8 695Common Var(warn_unused_variable) Warning EnabledBy(Wunused)
bb0814ce 696Warn when a variable is unused
6f2f567f 697
c81ed7c1 698Wcoverage-mismatch
21cd990d 699Common Var(warn_coverage_mismatch) Init(1) Warning
700Warn in case profiles in -fprofile-use do not match
c81ed7c1 701
928efcfe 702Wvector-operation-performance
703Common Var(warn_vector_operation_performance) Warning
704Warn when a vector operation is compiled outside the SIMD
705
e28aa114 706Xassembler
707Driver Separate
708
709Xlinker
710Driver Separate
711
712Xpreprocessor
713Driver Separate
714
3bfde2af 715Z
716Driver
717
e690b385 718aux-info
6bd9d862 719Common Separate Var(aux_info_file_name)
53b8e5c1 720-aux-info <file> Emit declaration information into <file>
e690b385 721
722aux-info=
67089c6b 723Common Joined Alias(aux-info)
e690b385 724
725auxbase
6bd9d862 726Common Separate RejectDriver Var(aux_base_name)
e690b385 727
728auxbase-strip
e28aa114 729Common Separate RejectDriver
730
5789e05b 731coverage
732Driver
733
e28aa114 734c
735Driver
e690b385 736
737d
738Common Joined
53b8e5c1 739-d<letters> Enable dumps from specific passes of the compiler
e690b385 740
741dumpbase
6bd9d862 742Common Separate Var(dump_base_name)
53b8e5c1 743-dumpbase <file> Set the file basename to be used for dumps
e690b385 744
50ca7c37 745dumpdir
6bd9d862 746Common Separate Var(dump_dir_name)
eb21bbd2 747-dumpdir <dir> Set the directory name to be used for dumps
50ca7c37 748
e28aa114 749dumpmachine
750Driver
751
752dumpspecs
753Driver
754
755dumpversion
756Driver
757
5789e05b 758e
759Driver Joined Separate
760
455188e9 761; This option has historically been passed down to the linker by an
762; accident of a %{e*} spec, so ensure it continues to be passed down
763; as a single option. The supported option for this purpose is
764; -rdynamic. See PR 47390.
765export-dynamic
766Driver Undocumented
767
82a16202 768; The version of the C++ ABI in use. The following values are allowed:
769;
770; 0: The version of the ABI believed most conformant with the C++ ABI
771; specification. This ABI may change as bugs are discovered and fixed.
772; Therefore, 0 will not necessarily indicate the same ABI in different
773; versions of G++.
774;
775; 1: The version of the ABI first used in G++ 3.2.
776;
29e2e80a 777; 2: The version of the ABI first used in G++ 3.4 (and current default).
778;
779; 3: The version of the ABI that fixes the missing underscore
780; in template non-type arguments of pointer type.
781;
782; 4: The version of the ABI that introduces unambiguous mangling of
87d553db 783; vector types. First selectable in G++ 4.5.
e9e7c198 784;
4d7aaf8e 785; 5: The version of the ABI that ignores attribute const/noreturn
87d553db 786; in function pointer mangling, and corrects mangling of decltype and
4d7aaf8e 787; function parameters used in other parameters and the return type.
87d553db 788; First selectable in G++ 4.6.
4d7aaf8e 789;
2d847c18 790; 6: The version of the ABI that doesn't promote scoped enums to int and
791; changes the mangling of template argument packs, const/static_cast,
792; prefix ++ and --, and a class scope function used as a template
793; argument.
72fc0f64 794; First selectable in G++ 4.7.
795;
dc78d83a 796; 7: The version of the ABI that treats nullptr_t as a builtin type and
797; corrects the mangling of lambdas in default argument scope.
fbcdace8 798; First selectable in G++ 4.8.
862e5b6d 799;
800; 8: The version of the ABI that corrects the substitution behavior of
801; function types with function-cv-qualifiers.
802; First selectable in G++ 4.9.
803;
82a16202 804; Additional positive integers will be assigned as new versions of
805; the ABI become the default version of the ABI.
e100aadc 806fabi-version=
212cc995 807Common Joined RejectNegative UInteger Var(flag_abi_version) Init(2)
e100aadc 808
56dfa44a 809faggressive-loop-optimizations
810Common Report Var(flag_aggressive_loop_optimizations) Optimization Init(1)
811Aggressively optimize loops using language constraints
812
ecdb6d1a 813falign-functions
46f8e3b0 814Common Report Var(align_functions,0) Optimization UInteger
72528c71 815Align the start of functions
ecdb6d1a 816
941a4893 817falign-functions=
6bd9d862 818Common RejectNegative Joined UInteger Var(align_functions)
941a4893 819
ecdb6d1a 820falign-jumps
46f8e3b0 821Common Report Var(align_jumps,0) Optimization UInteger
72528c71 822Align labels which are only reached by jumping
ecdb6d1a 823
941a4893 824falign-jumps=
6bd9d862 825Common RejectNegative Joined UInteger Var(align_jumps)
941a4893 826
ecdb6d1a 827falign-labels
46f8e3b0 828Common Report Var(align_labels,0) Optimization UInteger
72528c71 829Align all labels
ecdb6d1a 830
941a4893 831falign-labels=
6bd9d862 832Common RejectNegative Joined UInteger Var(align_labels)
941a4893 833
ecdb6d1a 834falign-loops
c17f64cc 835Common Report Var(align_loops,0) Optimization UInteger
72528c71 836Align the start of loops
ecdb6d1a 837
941a4893 838falign-loops=
6bd9d862 839Common RejectNegative Joined UInteger Var(align_loops)
941a4893 840
ecdb6d1a 841fargument-alias
3b0273a1 842Common Ignore
e190b18a 843Does nothing. Preserved for backward compatibility.
ecdb6d1a 844
845fargument-noalias
3b0273a1 846Common Ignore
e190b18a 847Does nothing. Preserved for backward compatibility.
ecdb6d1a 848
849fargument-noalias-global
3b0273a1 850Common Ignore
e190b18a 851Does nothing. Preserved for backward compatibility.
ecdb6d1a 852
5ff22aea 853fargument-noalias-anything
3b0273a1 854Common Ignore
e190b18a 855Does nothing. Preserved for backward compatibility.
5ff22aea 856
9e46467d 857fsanitize=
858Common Driver Report Joined
859Select what to sanitize
b077695d 860
ecdb6d1a 861fasynchronous-unwind-tables
87c75316 862Common Report Var(flag_asynchronous_unwind_tables) Optimization
72528c71 863Generate unwind tables that are exact at each instruction boundary
ecdb6d1a 864
3072d30e 865fauto-inc-dec
866Common Report Var(flag_auto_inc_dec) Init(1)
867Generate auto-inc/dec instructions
868
82a16202 869; -fcheck-bounds causes gcc to generate array bounds checks.
870; For C, C++ and ObjC: defaults off.
871; For Java: defaults to on.
872; For Fortran: defaults to off.
ecdb6d1a 873fbounds-check
2e9da478 874Common Report Var(flag_bounds_check)
72528c71 875Generate code to check bounds before indexing arrays
ecdb6d1a 876
877fbranch-count-reg
87c75316 878Common Report Var(flag_branch_on_count_reg) Init(1) Optimization
72528c71 879Replace add, compare, branch with branch on count register
ecdb6d1a 880
881fbranch-probabilities
87c75316 882Common Report Var(flag_branch_probabilities) Optimization
72528c71 883Use profiling information for branch probabilities
ecdb6d1a 884
1e06725a 885fbranch-target-load-optimize
87c75316 886Common Report Var(flag_branch_target_load_optimize) Optimization
72528c71 887Perform branch target load optimization before prologue / epilogue threading
1e06725a 888
889fbranch-target-load-optimize2
87c75316 890Common Report Var(flag_branch_target_load_optimize2) Optimization
72528c71 891Perform branch target load optimization after prologue / epilogue threading
1e06725a 892
08d163a9 893fbtr-bb-exclusive
87c75316 894Common Report Var(flag_btr_bb_exclusive) Optimization
08d163a9 895Restrict target load migration not to re-use registers in any basic block
896
941a4893 897fcall-saved-
f0da0668 898Common Joined RejectNegative Var(common_deferred_options) Defer
53b8e5c1 899-fcall-saved-<register> Mark <register> as being preserved across functions
941a4893 900
901fcall-used-
f0da0668 902Common Joined RejectNegative Var(common_deferred_options) Defer
53b8e5c1 903-fcall-used-<register> Mark <register> as being corrupted by function calls
941a4893 904
82a16202 905; Nonzero for -fcaller-saves: allocate values in regs that need to
906; be saved across function calls, if that produces overall better code.
907; Optional now, so people can test it.
1e06725a 908fcaller-saves
87c75316 909Common Report Var(flag_caller_saves) Optimization
72528c71 910Save registers around function calls
1e06725a 911
355572cc 912fcheck-data-deps
913Common Report Var(flag_check_data_deps)
914Compare the results of several data dependence analyzers.
915
bbb0a662 916fcombine-stack-adjustments
917Common Report Var(flag_combine_stack_adjustments) Optimization
918Looks for opportunities to reduce stack adjustments and stack references.
919
ecdb6d1a 920fcommon
87c75316 921Common Report Var(flag_no_common,0) Optimization
72528c71 922Do not put uninitialized globals in the common section
ecdb6d1a 923
e28aa114 924fcompare-debug
925Driver
926; Converted by the driver to -fcompare-debug= options.
927
71278019 928fcompare-debug=
e28aa114 929Common Driver JoinedOrMissing RejectNegative Var(flag_compare_debug_opt)
cf210371 930-fcompare-debug[=<opts>] Compile with and without e.g. -gtoggle, and compare the final-insns dump
71278019 931
932fcompare-debug-second
ab3728ee 933Common Driver RejectNegative Var(flag_compare_debug)
71278019 934Run only the second compilation of -fcompare-debug
935
a50372fe 936fcompare-elim
937Common Report Var(flag_compare_elim_after_reload) Optimization
938Perform comparison elimination after register allocation has finished
939
9845d120 940fconserve-stack
941Common Var(flag_conserve_stack) Optimization
942Do not perform optimizations increasing noticeably stack usage
943
ecdb6d1a 944fcprop-registers
87c75316 945Common Report Var(flag_cprop_registers) Optimization
72528c71 946Perform a register copy-propagation optimization pass
ecdb6d1a 947
1e06725a 948fcrossjumping
87c75316 949Common Report Var(flag_crossjumping) Optimization
72528c71 950Perform cross-jumping optimization
1e06725a 951
952fcse-follow-jumps
87c75316 953Common Report Var(flag_cse_follow_jumps) Optimization
72528c71 954When running CSE, follow jumps to their targets
1e06725a 955
956fcse-skip-blocks
3b0273a1 957Common Ignore
d743aba2 958Does nothing. Preserved for backward compatibility.
1e06725a 959
45b9d334 960fcx-limited-range
ecee1b29 961Common Report Var(flag_cx_limited_range) Optimization SetByCombined
45b9d334 962Omit range reduction step when performing complex division
963
608256a0 964fcx-fortran-rules
965Common Report Var(flag_cx_fortran_rules) Optimization
966Complex multiplication and division follow Fortran rules
967
ecdb6d1a 968fdata-sections
87c75316 969Common Report Var(flag_data_sections) Optimization
72528c71 970Place data items into their own section
ecdb6d1a 971
d2153a46 972fdbg-cnt-list
9faf44d6 973Common Report Var(common_deferred_options) Defer
d2153a46 974List all available debugging counters with their limits and counts.
975
3072d30e 976fdbg-cnt=
9faf44d6 977Common RejectNegative Joined Var(common_deferred_options) Defer
cf210371 978-fdbg-cnt=<counter>:<limit>[,<counter>:<limit>,...] Set the debug counter limit.
3072d30e 979
5f1f2de5 980fdebug-prefix-map=
9faf44d6 981Common Joined RejectNegative Var(common_deferred_options) Defer
5f1f2de5 982Map one directory name to another in debug information
983
240a87ff 984fdebug-types-section
052166fd 985Common Report Var(flag_debug_types_section) Init(0)
240a87ff 986Output .debug_types section when using DWARF v4 debuginfo.
987
82a16202 988; Nonzero for -fdefer-pop: don't pop args after each function call
989; instead save them up to pop many calls' args with one insns.
1e06725a 990fdefer-pop
87c75316 991Common Report Var(flag_defer_pop) Optimization
72528c71 992Defer popping functions args from stack until later
1e06725a 993
994fdelayed-branch
87c75316 995Common Report Var(flag_delayed_branch) Optimization
72528c71 996Attempt to fill delay slots of branch instructions
1e06725a 997
bc0dfc8d 998fdelete-dead-exceptions
999Common Report Var(flag_delete_dead_exceptions) Init(0)
1000Delete dead instructions that may throw exceptions
1001
1e06725a 1002fdelete-null-pointer-checks
7df298fe 1003Common Report Var(flag_delete_null_pointer_checks) Init(1) Optimization
72528c71 1004Delete useless null pointer checks
1e06725a 1005
84f6cc40 1006fdevirtualize-speculatively
1007Common Report Var(flag_devirtualize_speculatively) Optimization
1008Perform speculative devirtualization
1009
0276be0c 1010fdevirtualize
1011Common Report Var(flag_devirtualize) Optimization
1012Try to convert virtual calls to direct ones.
1013
1e06725a 1014fdiagnostics-show-location=
d62a5950 1015Common Joined RejectNegative Enum(diagnostic_prefixing_rule)
53b8e5c1 1016-fdiagnostics-show-location=[once|every-line] How often to emit source location at the beginning of line-wrapped diagnostics
1e06725a 1017
d62a5950 1018; Required for these enum values.
1019SourceInclude
1020pretty-print.h
1021
1022Enum
1023Name(diagnostic_prefixing_rule) Type(int)
1024
1025EnumValue
1026Enum(diagnostic_prefixing_rule) String(once) Value(DIAGNOSTICS_SHOW_PREFIX_ONCE)
1027
1028EnumValue
1029Enum(diagnostic_prefixing_rule) String(every-line) Value(DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE)
1030
5a983084 1031fdiagnostics-show-caret
1032Common Var(flag_diagnostics_show_caret) Init(1)
1033Show the source line with a caret indicating the column
1034
41609f8b 1035fdiagnostics-color
1036Common Alias(fdiagnostics-color=,always,never)
1037;
1038
1039fdiagnostics-color=
71eeb8d3 1040Common Joined RejectNegative Var(flag_diagnostics_show_color) Enum(diagnostic_color_rule) Init(DIAGNOSTICS_COLOR_NO)
41609f8b 1041-fdiagnostics-color=[never|always|auto] Colorize diagnostics
1042
1043; Required for these enum values.
1044SourceInclude
1045diagnostic-color.h
1046
1047Enum
1048Name(diagnostic_color_rule) Type(int)
1049
1050EnumValue
1051Enum(diagnostic_color_rule) String(never) Value(DIAGNOSTICS_COLOR_NO)
1052
1053EnumValue
1054Enum(diagnostic_color_rule) String(always) Value(DIAGNOSTICS_COLOR_YES)
1055
1056EnumValue
1057Enum(diagnostic_color_rule) String(auto) Value(DIAGNOSTICS_COLOR_AUTO)
1058
efb9d9ee 1059fdiagnostics-show-option
3fee9a69 1060Common Var(flag_diagnostics_show_option) Init(1)
3284a242 1061Amend appropriate diagnostic messages with the command line option that controls them
efb9d9ee 1062
c3087ce0 1063fdisable-
1064Common Joined RejectNegative Var(common_deferred_options) Defer
1065-fdisable-[tree|rtl|ipa]-<pass>=range1+range2 disables an optimization pass
1066
1067fenable-
1068Common Joined RejectNegative Var(common_deferred_options) Defer
1069-fenable-[tree|rtl|ipa]-<pass>=range1+range2 enables an optimization pass
1070
4ee9c684 1071fdump-
f0da0668 1072Common Joined RejectNegative Var(common_deferred_options) Defer
4ee9c684 1073-fdump-<type> Dump various compiler internals to a file
1074
0b1d266f 1075fdump-final-insns
1076Driver RejectNegative
1077
71278019 1078fdump-final-insns=
1079Common RejectNegative Joined Var(flag_dump_final_insns)
1080-fdump-final-insns=filename Dump to filename the insns at the end of translation
1081
929d2a90 1082fdump-go-spec=
1083Common RejectNegative Joined Var(flag_dump_go_spec)
1084-fdump-go-spec=filename Write all declarations to file as Go code
1085
969239ad 1086fdump-noaddr
1087Common Report Var(flag_dump_noaddr)
1088Suppress output of addresses in debugging dumps
1089
ec4791a8 1090fdump-passes
1091Common Var(flag_dump_passes) Init(0)
1092Dump optimization passes
1093
ecdb6d1a 1094fdump-unnumbered
0f8defe5 1095Common Report Var(flag_dump_unnumbered)
969239ad 1096Suppress output of instruction numbers, line number notes and addresses in debugging dumps
ecdb6d1a 1097
0a59e439 1098fdump-unnumbered-links
0f8defe5 1099Common Report Var(flag_dump_unnumbered_links)
0a59e439 1100Suppress output of previous and next insn numbers in debugging dumps
1101
9845d120 1102fdwarf2-cfi-asm
1103Common Report Var(flag_dwarf2_cfi_asm) Init(HAVE_GAS_CFI_DIRECTIVE)
1104Enable CFI tables via GAS assembler directives.
1105
f1aa280c 1106fearly-inlining
87c75316 1107Common Report Var(flag_early_inlining) Init(1) Optimization
f1aa280c 1108Perform early inlining
1109
1e06725a 1110feliminate-dwarf2-dups
2e9da478 1111Common Report Var(flag_eliminate_dwarf2_dups)
72528c71 1112Perform DWARF2 duplicate elimination
1e06725a 1113
2f29eac3 1114fipa-sra
1115Common Report Var(flag_ipa_sra) Init(0) Optimization
1116Perform interprocedural reduction of aggregates
1117
262444a6 1118feliminate-unused-debug-symbols
2e9da478 1119Common Report Var(flag_debug_only_used_symbols)
72528c71 1120Perform unused type elimination in debug info
262444a6 1121
1e06725a 1122feliminate-unused-debug-types
2e9da478 1123Common Report Var(flag_eliminate_unused_debug_types) Init(1)
72528c71 1124Perform unused type elimination in debug info
1e06725a 1125
0c573f98 1126femit-class-debug-always
fd5e1dfe 1127Common Report Var(flag_emit_class_debug_always) Init(0)
0c573f98 1128Do not suppress C++ class debug information.
1129
ecdb6d1a 1130fexceptions
87c75316 1131Common Report Var(flag_exceptions) Optimization
72528c71 1132Enable exception handling
ecdb6d1a 1133
1e06725a 1134fexpensive-optimizations
87c75316 1135Common Report Var(flag_expensive_optimizations) Optimization
72528c71 1136Perform a number of minor, expensive optimizations
1e06725a 1137
c6418a4e 1138fexcess-precision=
d62a5950 1139Common Joined RejectNegative Enum(excess_precision) Var(flag_excess_precision_cmdline) Init(EXCESS_PRECISION_DEFAULT)
c6418a4e 1140-fexcess-precision=[fast|standard] Specify handling of excess floating-point precision
1141
d62a5950 1142Enum
1143Name(excess_precision) Type(enum excess_precision) UnknownError(unknown excess precision style %qs)
1144
1145EnumValue
1146Enum(excess_precision) String(fast) Value(EXCESS_PRECISION_FAST)
1147
1148EnumValue
1149Enum(excess_precision) String(standard) Value(EXCESS_PRECISION_STANDARD)
1150
941a4893 1151ffast-math
1152Common
1153
b33542ab 1154ffat-lto-objects
1155Common Var(flag_fat_lto_objects) Init(1)
1156Output lto objects containing both the intermediate language and binary output.
1157
ecdb6d1a 1158ffinite-math-only
ecee1b29 1159Common Report Var(flag_finite_math_only) Optimization SetByCombined
72528c71 1160Assume no NaNs or infinities are generated
ecdb6d1a 1161
941a4893 1162ffixed-
f0da0668 1163Common Joined RejectNegative Var(common_deferred_options) Defer
53b8e5c1 1164-ffixed-<register> Mark <register> as being unavailable to the compiler
941a4893 1165
1e06725a 1166ffloat-store
87c75316 1167Common Report Var(flag_float_store) Optimization
82a16202 1168Don't allocate floats and doubles in extended-precision registers
1e06725a 1169
1170fforce-addr
3b0273a1 1171Common Ignore
4d25f9eb 1172Does nothing. Preserved for backward compatibility.
1e06725a 1173
55d51835 1174fforward-propagate
1175Common Report Var(flag_forward_propagate) Optimization
42a3a38b 1176Perform a forward propagation pass on RTL
1177
b9be572e 1178ffp-contract=
d62a5950 1179Common Joined RejectNegative Enum(fp_contract_mode) Var(flag_fp_contract_mode) Init(FP_CONTRACT_FAST)
b9be572e 1180-ffp-contract=[off|on|fast] Perform floating-point expression contraction.
1181
d62a5950 1182Enum
1183Name(fp_contract_mode) Type(enum fp_contract_mode) UnknownError(unknown floating point contraction style %qs)
1184
1185EnumValue
1186Enum(fp_contract_mode) String(off) Value(FP_CONTRACT_OFF)
1187
1188; Not implemented, fall back to conservative FP_CONTRACT_OFF.
1189EnumValue
1190Enum(fp_contract_mode) String(on) Value(FP_CONTRACT_OFF)
1191
1192EnumValue
1193Enum(fp_contract_mode) String(fast) Value(FP_CONTRACT_FAST)
1194
82a16202 1195; Nonzero means don't put addresses of constant functions in registers.
1196; Used for compiling the Unix kernel, where strange substitutions are
1197; done on the assembly output.
1e06725a 1198ffunction-cse
2e9da478 1199Common Report Var(flag_no_function_cse,0)
72528c71 1200Allow function addresses to be held in registers
1e06725a 1201
ecdb6d1a 1202ffunction-sections
2e9da478 1203Common Report Var(flag_function_sections)
72528c71 1204Place each function into its own section
ecdb6d1a 1205
1e06725a 1206fgcse
87c75316 1207Common Report Var(flag_gcse) Optimization
72528c71 1208Perform global common subexpression elimination
1e06725a 1209
1210fgcse-lm
87c75316 1211Common Report Var(flag_gcse_lm) Init(1) Optimization
72528c71 1212Perform enhanced load motion during global common subexpression elimination
1e06725a 1213
1214fgcse-sm
87c75316 1215Common Report Var(flag_gcse_sm) Init(0) Optimization
72528c71 1216Perform store motion after global common subexpression elimination
1e06725a 1217
5c47e414 1218fgcse-las
87c75316 1219Common Report Var(flag_gcse_las) Init(0) Optimization
839f8415 1220Perform redundant load after store elimination in global common subexpression
1221elimination
1222
1223fgcse-after-reload
87c75316 1224Common Report Var(flag_gcse_after_reload) Optimization
839f8415 1225Perform global common subexpression elimination after register allocation
3284a242 1226has finished
5c47e414 1227
d3399492 1228; This option is not documented yet as its semantics will change.
255b6be7 1229fgraphite
1230Common Report Var(flag_graphite)
1231Enable in and out of Graphite representation
1232
26c166eb 1233fgraphite-identity
1234Common Report Var(flag_graphite_identity) Optimization
1235Enable Graphite Identity transformation
1236
239e9670 1237fhoist-adjacent-loads
1238Common Report Var(flag_hoist_adjacent_loads) Optimization
1239Enable hoisting adjacent loads to encourage generating conditional move
1240instructions
1241
16848556 1242floop-parallelize-all
1243Common Report Var(flag_loop_parallelize_all) Optimization
26c166eb 1244Mark all loops as parallel
1245
255b6be7 1246floop-strip-mine
1247Common Report Var(flag_loop_strip_mine) Optimization
1248Enable Loop Strip Mining transformation
1249
1250floop-interchange
1251Common Report Var(flag_loop_interchange) Optimization
1252Enable Loop Interchange transformation
1253
1254floop-block
1255Common Report Var(flag_loop_block) Optimization
1256Enable Loop Blocking transformation
1257
4c0315d0 1258fgnu-tm
1259Common Report Var(flag_tm)
1260Enable support for GNU transactional memory
1261
d60a90cc 1262floop-flatten
d094f1d6 1263Common Ignore
1264Does nothing. Preserved for backward compatibility.
d60a90cc 1265
89049f25 1266floop-nest-optimize
1267Common Report Var(flag_loop_optimize_isl) Optimization
1268Enable the ISL based loop nest optimizer
1269
a420d927 1270fstrict-volatile-bitfields
1271Common Report Var(flag_strict_volatile_bitfields) Init(-1)
1272Force bitfield accesses to match their type width
1273
ecdb6d1a 1274fguess-branch-probability
87c75316 1275Common Report Var(flag_guess_branch_prob) Optimization
72528c71 1276Enable guessing of branch probabilities
ecdb6d1a 1277
82a16202 1278; Nonzero means ignore `#ident' directives. 0 means handle them.
1279; Generate position-independent code for executables if possible
1280; On SVR4 targets, it also controls whether or not to emit a
1281; string identifying the compiler.
ecdb6d1a 1282fident
2e9da478 1283Common Report Var(flag_no_ident,0)
72528c71 1284Process #ident directives
ecdb6d1a 1285
1e06725a 1286fif-conversion
87c75316 1287Common Report Var(flag_if_conversion) Optimization
72528c71 1288Perform conversion of conditional jumps to branchless equivalents
1e06725a 1289
1290fif-conversion2
87c75316 1291Common Report Var(flag_if_conversion2) Optimization
72528c71 1292Perform conversion of conditional jumps to conditional execution
1e06725a 1293
5680e508 1294fstack-reuse=
1295Common Joined RejectNegative Enum(stack_reuse_level) Var(flag_stack_reuse) Init(SR_ALL)
1296-fstack-reuse=[all|named_vars|none] Set stack reuse level for local variables.
1297
1298Enum
1299Name(stack_reuse_level) Type(enum stack_reuse_level) UnknownError(unknown Stack Reuse Level %qs)
1300
1301EnumValue
1302Enum(stack_reuse_level) String(all) Value(SR_ALL)
1303
1304EnumValue
1305Enum(stack_reuse_level) String(named_vars) Value(SR_NAMED_VARS)
1306
1307EnumValue
1308Enum(stack_reuse_level) String(none) Value(SR_NONE)
1309
0cb1935d 1310ftree-loop-if-convert
1311Common Report Var(flag_tree_loop_if_convert) Init(-1) Optimization
1312Convert conditional jumps in innermost loops to branchless equivalents
1313
3b91ccd9 1314ftree-loop-if-convert-stores
1315Common Report Var(flag_tree_loop_if_convert_stores) Optimization
1316Also if-convert conditional jumps containing memory writes
1317
82a16202 1318; -finhibit-size-directive inhibits output of .size for ELF.
1319; This is used only for compiling crtstuff.c,
1320; and it may be extended to other effects
1321; needed for crtstuff.c on other systems.
ecdb6d1a 1322finhibit-size-directive
2e9da478 1323Common Report Var(flag_inhibit_size_directive)
72528c71 1324Do not generate .size directives
ecdb6d1a 1325
f8daee9b 1326findirect-inlining
1327Common Report Var(flag_indirect_inlining)
1328Perform indirect inlining
1329
b75cad1f 1330; General flag to enable inlining. Specifying -fno-inline will disable
1331; all inlining apart from always-inline functions.
1e06725a 1332finline
e5166d71 1333Common Report Var(flag_no_inline,0) Init(0) Optimization
b75cad1f 1334Enable inlining of function declared \"inline\", disabling disables all inlining
1e06725a 1335
b97510b2 1336finline-small-functions
1337Common Report Var(flag_inline_small_functions) Optimization
b75cad1f 1338Integrate functions into their callers when code size is known not to grow
b97510b2 1339
1e06725a 1340finline-functions
87c75316 1341Common Report Var(flag_inline_functions) Optimization
b75cad1f 1342Integrate functions not declared \"inline\" into their callers when profitable
1e06725a 1343
f1aa280c 1344finline-functions-called-once
055af069 1345Common Report Var(flag_inline_functions_called_once) Optimization
b75cad1f 1346Integrate functions only required by their single caller
9e0baf4d 1347
39470ac3 1348finline-limit-
67089c6b 1349Common RejectNegative Joined Alias(finline-limit=)
39470ac3 1350
1351finline-limit=
1352Common RejectNegative Joined UInteger
53b8e5c1 1353-finline-limit=<number> Limit the size of inlined functions to <number>
39470ac3 1354
1cd6e20d 1355finline-atomics
1356Common Report Var(flag_inline_atomics) Init(1) Optimization
1357Inline __atomic operations when a lock free instruction sequence is available.
1358
ecdb6d1a 1359finstrument-functions
2e9da478 1360Common Report Var(flag_instrument_function_entry_exit)
72528c71 1361Instrument function entry and exit with profiling calls
ecdb6d1a 1362
a95c0776 1363finstrument-functions-exclude-function-list=
1364Common RejectNegative Joined
1365-finstrument-functions-exclude-function-list=name,... Do not instrument listed functions
1366
1367finstrument-functions-exclude-file-list=
1368Common RejectNegative Joined
1369-finstrument-functions-exclude-file-list=filename,... Do not instrument functions listed in files
1370
a17a73c7 1371fipa-cp
87c75316 1372Common Report Var(flag_ipa_cp) Optimization
84f6cc40 1373Perform interprocedural constant propagation
a17a73c7 1374
2a15795f 1375fipa-cp-clone
1376Common Report Var(flag_ipa_cp_clone) Optimization
1377Perform cloning to make Interprocedural constant propagation stronger
1378
4e2db0ad 1379fipa-profile
1380Common Report Var(flag_ipa_profile) Init(0) Optimization
1381Perform interprocedural profile propagation
f7d118a9 1382
bdf4f142 1383fipa-pta
87c75316 1384Common Report Var(flag_ipa_pta) Init(0) Optimization
bdf4f142 1385Perform interprocedural points-to analysis
1386
4e2db0ad 1387fipa-pure-const
1388Common Report Var(flag_ipa_pure_const) Init(0) Optimization
1389Discover pure and const functions
1390
f7d118a9 1391fipa-reference
87c75316 1392Common Report Var(flag_ipa_reference) Init(0) Optimization
f7d118a9 1393Discover readonly and non addressable static variables
1394
604cde73 1395fipa-matrix-reorg
fa62b5da 1396Common Ignore
1397Does nothing. Preserved for backward compatibility.
604cde73 1398
f27ac341 1399fipa-struct-reorg
210a8eb6 1400Common Ignore
1401Does nothing. Preserved for backward compatibility.
f27ac341 1402
47dd2e78 1403fira-algorithm=
d62a5950 1404Common Joined RejectNegative Enum(ira_algorithm) Var(flag_ira_algorithm) Init(IRA_ALGORITHM_CB)
14792f4e 1405-fira-algorithm=[CB|priority] Set the used IRA algorithm
1406
d62a5950 1407Enum
1408Name(ira_algorithm) Type(enum ira_algorithm) UnknownError(unknown IRA algorithm %qs)
1409
1410EnumValue
1411Enum(ira_algorithm) String(CB) Value(IRA_ALGORITHM_CB)
1412
1413EnumValue
1414Enum(ira_algorithm) String(priority) Value(IRA_ALGORITHM_PRIORITY)
1415
14792f4e 1416fira-region=
0cb057cb 1417Common Joined RejectNegative Enum(ira_region) Var(flag_ira_region) Init(IRA_REGION_AUTODETECT)
14792f4e 1418-fira-region=[one|all|mixed] Set regions for IRA
47dd2e78 1419
d62a5950 1420Enum
1421Name(ira_region) Type(enum ira_region) UnknownError(unknown IRA region %qs)
1422
1423EnumValue
1424Enum(ira_region) String(one) Value(IRA_REGION_ONE)
1425
1426EnumValue
1427Enum(ira_region) String(all) Value(IRA_REGION_ALL)
1428
1429EnumValue
1430Enum(ira_region) String(mixed) Value(IRA_REGION_MIXED)
1431
1ec78e16 1432fira-hoist-pressure
1433Common Report Var(flag_ira_hoist_pressure) Init(1) Optimization
1434Use IRA based register pressure calculation
1435in RTL hoist optimizations.
1436
e8eed2f8 1437fira-loop-pressure
1438Common Report Var(flag_ira_loop_pressure)
1439Use IRA based register pressure calculation
1440in RTL loop optimizations.
1441
47dd2e78 1442fira-share-save-slots
1443Common Report Var(flag_ira_share_save_slots) Init(1)
1444Share slots for saving different hard registers.
1445
1446fira-share-spill-slots
1447Common Report Var(flag_ira_share_spill_slots) Init(1)
1448Share stack slots for spilled pseudo-registers.
1449
1450fira-verbose=
4aafe913 1451Common RejectNegative Joined UInteger Var(flag_ira_verbose) Init(5)
cf210371 1452-fira-verbose=<number> Control IRA's level of diagnostic messages.
47dd2e78 1453
dec41e98 1454fivopts
87c75316 1455Common Report Var(flag_ivopts) Init(1) Optimization
dec41e98 1456Optimize induction variables on trees
1457
51d8e657 1458fjump-tables
87c75316 1459Common Var(flag_jump_tables) Init(1) Optimization
51d8e657 1460Use jump tables for sufficiently large switch statements
1461
1e06725a 1462fkeep-inline-functions
2e9da478 1463Common Report Var(flag_keep_inline_functions)
72528c71 1464Generate code for functions even if they are fully inlined
1e06725a 1465
1466fkeep-static-consts
2e9da478 1467Common Report Var(flag_keep_static_consts) Init(1)
72528c71 1468Emit static const variables even if they are not used
1e06725a 1469
ecdb6d1a 1470fleading-underscore
2e9da478 1471Common Report Var(flag_leading_underscore) Init(-1)
72528c71 1472Give external symbols a leading underscore
ecdb6d1a 1473
4f87b914 1474floop-optimize
3b0273a1 1475Common Ignore
334ec2d8 1476Does nothing. Preserved for backward compatibility.
4f87b914 1477
7bfefa9d 1478flto
cbcf2791 1479Common
7bfefa9d 1480Enable link-time optimization.
1481
cbcf2791 1482flto=
1483Common RejectNegative Joined Var(flag_lto)
1484Link-time optimization with number of parallel jobs or jobserver.
1485
48e3ea52 1486flto-partition=1to1
1487Common Var(flag_lto_partition_1to1)
0851d795 1488Partition symbols and vars at linktime based on object files they originate from
48e3ea52 1489
1490flto-partition=balanced
1491Common Var(flag_lto_partition_balanced)
1492Partition functions and vars at linktime into approximately same sized buckets
1493
0851d795 1494flto-partition=max
1495Common Var(flag_lto_partition_max)
1496Put every symbol into separate partition
1497
cbcf2791 1498flto-partition=none
1499Common Var(flag_lto_partition_none)
1500Disable partioning and streaming
1501
7bfefa9d 1502; The initial value of -1 comes from Z_DEFAULT_COMPRESSION in zlib.h.
1503flto-compression-level=
212cc995 1504Common Joined RejectNegative UInteger Var(flag_lto_compression_level) Init(-1)
cf210371 1505-flto-compression-level=<number> Use zlib compression level <number> for IL
7bfefa9d 1506
1507flto-report
596c40fb 1508Common Report Var(flag_lto_report) Init(0)
7bfefa9d 1509Report various link-time optimization statistics
1510
b63a7a3e 1511flto-report-wpa
1512Common Report Var(flag_lto_report_wpa) Init(0)
1513Report various link-time optimization statistics for WPA only
1514
ecdb6d1a 1515fmath-errno
ecee1b29 1516Common Report Var(flag_errno_math) Init(1) Optimization SetByCombined
72528c71 1517Set errno after built-in math functions
ecdb6d1a 1518
566d7c74 1519fmax-errors=
1520Common Joined RejectNegative UInteger Var(flag_max_errors)
1521-fmax-errors=<number> Maximum number of errors to report
1522
ecdb6d1a 1523fmem-report
2e9da478 1524Common Report Var(mem_report)
72528c71 1525Report on permanent memory allocation
ecdb6d1a 1526
93e5f148 1527fmem-report-wpa
1528Common Report Var(mem_report_wpa)
1529Report on permanent memory allocation in WPA only
1530
82a16202 1531; This will attempt to merge constant section constants, if 1 only
1532; string constants and constants from constant pool, if 2 also constant
1533; variables.
ecdb6d1a 1534fmerge-all-constants
87c75316 1535Common Report Var(flag_merge_constants,2) Init(1) Optimization
72528c71 1536Attempt to merge identical constants and constant variables
ecdb6d1a 1537
1538fmerge-constants
5461e683 1539Common Report Var(flag_merge_constants,1) Optimization
72528c71 1540Attempt to merge identical constants across compilation units
ecdb6d1a 1541
7765591b 1542fmerge-debug-strings
1543Common Report Var(flag_merge_debug_strings) Init(1)
1544Attempt to merge identical debug strings across compilation units
1545
1e06725a 1546fmessage-length=
1547Common RejectNegative Joined UInteger
53b8e5c1 1548-fmessage-length=<number> Limit diagnostics to <number> characters per line. 0 suppresses line-wrapping
1e06725a 1549
406a73e7 1550fmodulo-sched
87c75316 1551Common Report Var(flag_modulo_sched) Optimization
406a73e7 1552Perform SMS based modulo scheduling before the first scheduling pass
1553
3a943084 1554fmodulo-sched-allow-regmoves
1555Common Report Var(flag_modulo_sched_allow_regmoves)
1556Perform SMS based modulo scheduling with register moves allowed
1557
3a0ecac2 1558fmove-loop-invariants
87c75316 1559Common Report Var(flag_move_loop_invariants) Init(1) Optimization
3a0ecac2 1560Move loop invariant computations out of loops
1561
3072d30e 1562fdce
76c71f34 1563Common Var(flag_dce) Init(1) Optimization
3072d30e 1564Use the RTL dead code elimination pass
1565
1566fdse
76c71f34 1567Common Var(flag_dse) Init(1) Optimization
3072d30e 1568Use the RTL dead store elimination pass
1569
f045d41d 1570freschedule-modulo-scheduled-loops
87c75316 1571Common Report Var(flag_resched_modulo_sched) Optimization
f045d41d 1572Enable/Disable the traditional scheduling in loops that already passed modulo scheduling
1573
ecdb6d1a 1574fnon-call-exceptions
87c75316 1575Common Report Var(flag_non_call_exceptions) Optimization
72528c71 1576Support synchronous non-call exceptions
ecdb6d1a 1577
1e06725a 1578fomit-frame-pointer
87c75316 1579Common Report Var(flag_omit_frame_pointer) Optimization
72528c71 1580When possible do not generate stack frames
1e06725a 1581
7bd765d4 1582fopt-info
1583Common Report Var(flag_opt_info) Optimization
1584Enable all optimization info dumps on stderr
1585
1586fopt-info-
1587Common Joined RejectNegative Var(common_deferred_options) Defer
1588-fopt-info[-<type>=filename] Dump compiler optimization details
1589
ecdb6d1a 1590foptimize-register-move
87c75316 1591Common Report Var(flag_regmove) Optimization
72528c71 1592Do the full register move optimization pass
ecdb6d1a 1593
1e06725a 1594foptimize-sibling-calls
87c75316 1595Common Report Var(flag_optimize_sibling_calls) Optimization
72528c71 1596Optimize sibling and tail recursive calls
1e06725a 1597
2862cf88 1598fpartial-inlining
1599Common Report Var(flag_partial_inlining)
1600Perform partial inlining
1601
51949610 1602fpre-ipa-mem-report
1603Common Report Var(pre_ipa_mem_report)
1604Report on memory allocation before interprocedural optimization
1605
1606fpost-ipa-mem-report
1607Common Report Var(post_ipa_mem_report)
1608Report on memory allocation before interprocedural optimization
1609
ecdb6d1a 1610fpack-struct
87c75316 1611Common Report Var(flag_pack_struct) Optimization
72528c71 1612Pack structure members together without holes
ecdb6d1a 1613
6b5553e5 1614fpack-struct=
87c75316 1615Common RejectNegative Joined UInteger Optimization
6b5553e5 1616-fpack-struct=<number> Set initial maximum structure member alignment
1617
1e06725a 1618fpcc-struct-return
4aafe913 1619Common Report Var(flag_pcc_struct_return,1) Init(DEFAULT_PCC_STRUCT_RETURN)
72528c71 1620Return small aggregates in memory, not registers
1e06725a 1621
1622fpeel-loops
87c75316 1623Common Report Var(flag_peel_loops) Optimization
72528c71 1624Perform loop peeling
1e06725a 1625
1626fpeephole
87c75316 1627Common Report Var(flag_no_peephole,0) Optimization
72528c71 1628Enable machine specific peephole optimizations
1e06725a 1629
ecdb6d1a 1630fpeephole2
87c75316 1631Common Report Var(flag_peephole2) Optimization
72528c71 1632Enable an RTL peephole pass before sched2
ecdb6d1a 1633
82a16202 1634fPIC
e27c5cf0 1635Common Report Var(flag_pic,2) Negative(fPIE)
82a16202 1636Generate position-independent code if possible (large mode)
1637
1638fPIE
e27c5cf0 1639Common Report Var(flag_pie,2) Negative(fpic)
82a16202 1640Generate position-independent code for executables if possible (large mode)
1641
ecdb6d1a 1642fpic
e27c5cf0 1643Common Report Var(flag_pic,1) Negative(fpie)
82a16202 1644Generate position-independent code if possible (small mode)
ecdb6d1a 1645
1646fpie
e27c5cf0 1647Common Report Var(flag_pie,1) Negative(fPIC)
82a16202 1648Generate position-independent code for executables if possible (small mode)
ecdb6d1a 1649
9227b6fc 1650fplugin=
f0da0668 1651Common Joined RejectNegative Var(common_deferred_options) Defer
9227b6fc 1652Specify a plugin to load
1653
1654fplugin-arg-
f0da0668 1655Common Joined RejectNegative Var(common_deferred_options) Defer
cf210371 1656-fplugin-arg-<name>-<key>[=<value>] Specify argument <key>=<value> for plugin <name>
9227b6fc 1657
ad4a85ad 1658fpredictive-commoning
76c71f34 1659Common Report Var(flag_predictive_commoning) Optimization
ad4a85ad 1660Run predictive commoning optimization.
1661
1e06725a 1662fprefetch-loop-arrays
cd459e62 1663Common Report Var(flag_prefetch_loop_arrays) Init(-1) Optimization
72528c71 1664Generate prefetch instructions, if available, for arrays in loops
1e06725a 1665
ecdb6d1a 1666fprofile
2e9da478 1667Common Report Var(profile_flag)
72528c71 1668Enable basic program profiling code
ecdb6d1a 1669
1670fprofile-arcs
2e9da478 1671Common Report Var(profile_arc_flag)
72528c71 1672Insert arc-based program profiling code
ecdb6d1a 1673
3e3a0e9c 1674fprofile-dir=
cc4fa57a 1675Common Joined RejectNegative Var(profile_data_prefix)
3e3a0e9c 1676Set the top-level directory for storing the profile data.
1677The default is 'pwd'.
1678
e0dc6f2b 1679fprofile-correction
1680Common Report Var(flag_profile_correction)
1681Enable correction of flow inconsistent profile data input
1682
7dea76ba 1683fprofile-generate
1684Common
1685Enable common options for generating profile info for profile feedback directed optimizations
1686
3e3a0e9c 1687fprofile-generate=
1688Common Joined RejectNegative
1689Enable common options for generating profile info for profile feedback directed optimizations, and set -fprofile-dir=
1690
7dea76ba 1691fprofile-use
3e3a0e9c 1692Common Var(flag_profile_use)
7dea76ba 1693Enable common options for performing profile feedback directed optimizations
1694
3e3a0e9c 1695fprofile-use=
1696Common Joined RejectNegative
1697Enable common options for performing profile feedback directed optimizations, and set -fprofile-dir=
1698
1c6a7b8c 1699fprofile-values
2e9da478 1700Common Report Var(flag_profile_values)
1c6a7b8c 1701Insert code to profile values of expressions
1702
5168ef25 1703fprofile-report
1704Common Report Var(profile_report)
1705Report on consistency of profile
1706
1e06725a 1707frandom-seed
9faf44d6 1708Common Var(common_deferred_options) Defer
1e06725a 1709
1710frandom-seed=
9faf44d6 1711Common Joined RejectNegative Var(common_deferred_options) Defer
53b8e5c1 1712-frandom-seed=<string> Make compile reproducible using <string>
1e06725a 1713
7c6733e8 1714; This switch causes the command line that was used to create an
1715; object file to be recorded into the object file. The exact format
1716; of this recording is target and binary file format dependent.
1717; It is related to the -fverbose-asm switch, but that switch only
1718; records information in the assembler output file as comments, so
1719; they never reach the object file.
1720frecord-gcc-switches
1721Common Report Var(flag_record_gcc_switches)
1722Record gcc command line switches in the object file.
1723
1e06725a 1724freg-struct-return
5461e683 1725Common Report Var(flag_pcc_struct_return,0) Optimization
72528c71 1726Return small aggregates in registers
1e06725a 1727
ecdb6d1a 1728fregmove
87c75316 1729Common Report Var(flag_regmove) Optimization
72528c71 1730Enables a register move optimization
ecdb6d1a 1731
1732frename-registers
87c75316 1733Common Report Var(flag_rename_registers) Init(2) Optimization
72528c71 1734Perform a register renaming optimization pass
ecdb6d1a 1735
1736freorder-blocks
87c75316 1737Common Report Var(flag_reorder_blocks) Optimization
72528c71 1738Reorder basic blocks to improve code placement
ecdb6d1a 1739
4f18499c 1740freorder-blocks-and-partition
87c75316 1741Common Report Var(flag_reorder_blocks_and_partition) Optimization
4f18499c 1742Reorder basic blocks and partition into hot and cold sections
1743
ecdb6d1a 1744freorder-functions
87c75316 1745Common Report Var(flag_reorder_functions) Optimization
72528c71 1746Reorder functions to improve code placement
ecdb6d1a 1747
1e06725a 1748frerun-cse-after-loop
c17f64cc 1749Common Report Var(flag_rerun_cse_after_loop) Optimization
72528c71 1750Add a common subexpression elimination pass after loop optimizations
1e06725a 1751
4f87b914 1752frerun-loop-opt
3b0273a1 1753Common Ignore
334ec2d8 1754Does nothing. Preserved for backward compatibility.
4f87b914 1755
5466f589 1756frounding-math
ecee1b29 1757Common Report Var(flag_rounding_math) Optimization SetByCombined
5466f589 1758Disable optimizations that assume default FP rounding behavior
1759
ecdb6d1a 1760fsched-interblock
87c75316 1761Common Report Var(flag_schedule_interblock) Init(1) Optimization
72528c71 1762Enable scheduling across basic blocks
ecdb6d1a 1763
a7dcf969 1764fsched-pressure
1765Common Report Var(flag_sched_pressure) Init(0) Optimization
1766Enable register pressure sensitive insn scheduling
1767
ecdb6d1a 1768fsched-spec
87c75316 1769Common Report Var(flag_schedule_speculative) Init(1) Optimization
72528c71 1770Allow speculative motion of non-loads
ecdb6d1a 1771
1772fsched-spec-load
87c75316 1773Common Report Var(flag_schedule_speculative_load) Optimization
72528c71 1774Allow speculative motion of some loads
ecdb6d1a 1775
1776fsched-spec-load-dangerous
87c75316 1777Common Report Var(flag_schedule_speculative_load_dangerous) Optimization
72528c71 1778Allow speculative motion of more loads
ecdb6d1a 1779
1e06725a 1780fsched-verbose=
9faf44d6 1781Common RejectNegative Joined UInteger Var(sched_verbose_param)
53b8e5c1 1782-fsched-verbose=<number> Set the verbosity level of the scheduler
1e06725a 1783
ecdb6d1a 1784fsched2-use-superblocks
87c75316 1785Common Report Var(flag_sched2_use_superblocks) Optimization
72528c71 1786If scheduling post reload, do superblock scheduling
ecdb6d1a 1787
1788fsched2-use-traces
3b0273a1 1789Common Ignore
fda153ea 1790Does nothing. Preserved for backward compatibility.
ecdb6d1a 1791
1e06725a 1792fschedule-insns
87c75316 1793Common Report Var(flag_schedule_insns) Optimization
72528c71 1794Reschedule instructions before register allocation
1e06725a 1795
1796fschedule-insns2
87c75316 1797Common Report Var(flag_schedule_insns_after_reload) Optimization
72528c71 1798Reschedule instructions after register allocation
1e06725a 1799
e1ab7874 1800; This flag should be on when a target implements non-trivial
1801; scheduling hooks, maybe saving some information for its own sake.
1802; On IA64, for example, this is used for correct bundling.
1803fselective-scheduling
1804Common Report Var(flag_selective_scheduling) Optimization
1805Schedule instructions using selective scheduling algorithm
1806
1807fselective-scheduling2
1808Common Report Var(flag_selective_scheduling2) Optimization
1809Run selective scheduling after reload
1810
1811fsel-sched-pipelining
1812Common Report Var(flag_sel_sched_pipelining) Init(0) Optimization
1813Perform software pipelining of inner loops during selective scheduling
1814
1815fsel-sched-pipelining-outer-loops
1816Common Report Var(flag_sel_sched_pipelining_outer_loops) Init(0) Optimization
1817Perform software pipelining of outer loops during selective scheduling
1818
1819fsel-sched-reschedule-pipelined
1820Common Report Var(flag_sel_sched_reschedule_pipelined) Init(0) Optimization
1821Reschedule pipelined regions without pipelining
1822
82a16202 1823; sched_stalled_insns means that insns can be moved prematurely from the queue
1824; of stalled insns into the ready list.
52c4b43f 1825fsched-stalled-insns
46f8e3b0 1826Common Report Var(flag_sched_stalled_insns) Optimization UInteger
52c4b43f 1827Allow premature scheduling of queued insns
1828
1829fsched-stalled-insns=
a0c938f0 1830Common RejectNegative Joined UInteger
98b93ebb 1831-fsched-stalled-insns=<number> Set number of queued insns that can be prematurely scheduled
52c4b43f 1832
82a16202 1833; sched_stalled_insns_dep controls how many recently scheduled cycles will
1834; be examined for a dependency on a stalled insn that is candidate for
1835; premature removal from the queue of stalled insns into the ready list (has
1836; an effect only if the flag 'sched_stalled_insns' is set).
52c4b43f 1837fsched-stalled-insns-dep
46f8e3b0 1838Common Report Var(flag_sched_stalled_insns_dep,1) Init(1) Optimization UInteger
52c4b43f 1839Set dependence distance checking in premature scheduling of queued insns
1840
1841fsched-stalled-insns-dep=
1842Common RejectNegative Joined UInteger
98b93ebb 1843-fsched-stalled-insns-dep=<number> Set dependence distance checking in premature scheduling of queued insns
52c4b43f 1844
4d569386 1845fsched-group-heuristic
1846Common Report Var(flag_sched_group_heuristic) Init(1) Optimization
1847Enable the group heuristic in the scheduler
1848
1849fsched-critical-path-heuristic
1850Common Report Var(flag_sched_critical_path_heuristic) Init(1) Optimization
1851Enable the critical path heuristic in the scheduler
1852
1853fsched-spec-insn-heuristic
1854Common Report Var(flag_sched_spec_insn_heuristic) Init(1) Optimization
1855Enable the speculative instruction heuristic in the scheduler
1856
4d569386 1857fsched-rank-heuristic
1858Common Report Var(flag_sched_rank_heuristic) Init(1) Optimization
1859Enable the rank heuristic in the scheduler
1860
1861fsched-last-insn-heuristic
1862Common Report Var(flag_sched_last_insn_heuristic) Init(1) Optimization
1863Enable the last instruction heuristic in the scheduler
1864
1865fsched-dep-count-heuristic
1866Common Report Var(flag_sched_dep_count_heuristic) Init(1) Optimization
1867Enable the dependent count heuristic in the scheduler
1868
f2d0e9f1 1869fsection-anchors
87c75316 1870Common Report Var(flag_section_anchors) Optimization
f2d0e9f1 1871Access data in the same section from shared anchor points
1872
2b74c150 1873fsee
3b0273a1 1874Common Ignore
1bc99153 1875Does nothing. Preserved for backward compatibility.
2b74c150 1876
a5b022e7 1877fzee
1d4227c3 1878Common Ignore
1879Does nothing. Preserved for backward compatibility.
1880
1881free
1882Common Report Var(flag_ree) Init(0)
1883Turn on Redundant Extensions Elimination pass.
a5b022e7 1884
5fd4bf3b 1885fshow-column
abf6a617 1886Common Report Var(flag_show_column) Init(1)
b559b9e2 1887Show column numbers in diagnostics, when available. Default on
5fd4bf3b 1888
1f021f97 1889fshrink-wrap
1890Common Report Var(flag_shrink_wrap) Optimization
1891Emit function prologues only before parts of the function that need it,
1892rather than at the top of the function.
1893
ecdb6d1a 1894fsignaling-nans
ecee1b29 1895Common Report Var(flag_signaling_nans) Optimization SetByCombined
72528c71 1896Disable optimizations observable by IEEE signaling NaNs
ecdb6d1a 1897
893038cd 1898fsigned-zeros
ecee1b29 1899Common Report Var(flag_signed_zeros) Init(1) Optimization SetByCombined
893038cd 1900Disable floating point optimizations that ignore the IEEE signedness of zero
1901
ecdb6d1a 1902fsingle-precision-constant
87c75316 1903Common Report Var(flag_single_precision_constant) Optimization
72528c71 1904Convert floating point constants to single precision constants
ecdb6d1a 1905
a9989fb4 1906fsplit-ivs-in-unroller
87c75316 1907Common Report Var(flag_split_ivs_in_unroller) Init(1) Optimization
3284a242 1908Split lifetimes of induction variables when loops are unrolled
a9989fb4 1909
48b14f50 1910fsplit-stack
1911Common Report Var(flag_split_stack) Init(-1)
1912Generate discontiguous stack frames
1913
1a6a0f2a 1914fsplit-wide-types
e8831472 1915Common Report Var(flag_split_wide_types) Optimization
1a6a0f2a 1916Split wide types into independent registers
1917
375bb675 1918fvariable-expansion-in-unroller
87c75316 1919Common Report Var(flag_variable_expansion_in_unroller) Optimization
3284a242 1920Apply variable expansion when loops are unrolled
375bb675 1921
4852b829 1922fstack-check=
1923Common Report RejectNegative Joined
1924-fstack-check=[no|generic|specific] Insert stack checking code into the program
1925
ecdb6d1a 1926fstack-check
67089c6b 1927Common Alias(fstack-check=, specific, no)
4852b829 1928Insert stack checking code into the program. Same as -fstack-check=specific
ecdb6d1a 1929
1e06725a 1930fstack-limit
f0da0668 1931Common Var(common_deferred_options) Defer
1e06725a 1932
941a4893 1933fstack-limit-register=
f0da0668 1934Common RejectNegative Joined Var(common_deferred_options) Defer
53b8e5c1 1935-fstack-limit-register=<register> Trap if the stack goes past <register>
941a4893 1936
1937fstack-limit-symbol=
f0da0668 1938Common RejectNegative Joined Var(common_deferred_options) Defer
53b8e5c1 1939-fstack-limit-symbol=<name> Trap if the stack goes past symbol <name>
941a4893 1940
f1a0edff 1941fstack-protector
1942Common Report Var(flag_stack_protect, 1)
1943Use propolice as a stack protection method
1944
1945fstack-protector-all
5461e683 1946Common Report RejectNegative Var(flag_stack_protect, 2)
f1a0edff 1947Use a stack protection method for every function
1948
b156ec37 1949fstack-protector-strong
1950Common Report RejectNegative Var(flag_stack_protect, 3)
1951Use a smart stack protection method for certain functions
1952
990495a7 1953fstack-usage
1954Common RejectNegative Var(flag_stack_usage)
1955Output stack usage information on a per-function basis
1956
1e06725a 1957fstrength-reduce
3b0273a1 1958Common Ignore
334ec2d8 1959Does nothing. Preserved for backward compatibility.
1e06725a 1960
82a16202 1961; Nonzero if we should do (language-dependent) alias analysis.
1962; Typically, this analysis will assume that expressions of certain
1963; types do not alias expressions of certain other types. Only used
1964; if alias analysis (in general) is enabled.
ecdb6d1a 1965fstrict-aliasing
87c75316 1966Common Report Var(flag_strict_aliasing) Optimization
72528c71 1967Assume strict aliasing rules apply
ecdb6d1a 1968
981eb798 1969fstrict-overflow
1970Common Report Var(flag_strict_overflow)
1971Treat signed overflow as undefined
1972
d8219307 1973fsync-libcalls
1974Common Report Var(flag_sync_libcalls) Init(1)
1975Implement __atomic operations via libcalls to legacy __sync functions
1976
1e06725a 1977fsyntax-only
2e9da478 1978Common Report Var(flag_syntax_only)
72528c71 1979Check for syntax errors, then stop
1e06725a 1980
ecdb6d1a 1981ftest-coverage
2e9da478 1982Common Report Var(flag_test_coverage)
72528c71 1983Create data files needed by \"gcov\"
ecdb6d1a 1984
1e06725a 1985fthread-jumps
87c75316 1986Common Report Var(flag_thread_jumps) Optimization
72528c71 1987Perform jump threading optimizations
1e06725a 1988
ecdb6d1a 1989ftime-report
2e9da478 1990Common Report Var(time_report)
72528c71 1991Report the time taken by each compiler pass
ecdb6d1a 1992
941a4893 1993ftls-model=
d62a5950 1994Common Joined RejectNegative Enum(tls_model) Var(flag_tls_default) Init(TLS_MODEL_GLOBAL_DYNAMIC)
53b8e5c1 1995-ftls-model=[global-dynamic|local-dynamic|initial-exec|local-exec] Set the default thread-local storage code generation model
941a4893 1996
d62a5950 1997Enum
1998Name(tls_model) Type(enum tls_model) UnknownError(unknown TLS model %qs)
1999
2000EnumValue
2001Enum(tls_model) String(global-dynamic) Value(TLS_MODEL_GLOBAL_DYNAMIC)
2002
2003EnumValue
2004Enum(tls_model) String(local-dynamic) Value(TLS_MODEL_LOCAL_DYNAMIC)
2005
2006EnumValue
2007Enum(tls_model) String(initial-exec) Value(TLS_MODEL_INITIAL_EXEC)
2008
2009EnumValue
2010Enum(tls_model) String(local-exec) Value(TLS_MODEL_LOCAL_EXEC)
2011
56af936e 2012ftoplevel-reorder
8188ae06 2013Common Report Var(flag_toplevel_reorder) Init(2) Optimization
56af936e 2014Reorder top level functions, variables, and asms
2015
1e06725a 2016ftracer
2e9da478 2017Common Report Var(flag_tracer)
72528c71 2018Perform superblock formation via tail duplication
1e06725a 2019
82a16202 2020; Zero means that floating-point math operations cannot generate a
2021; (user-visible) trap. This is the case, for example, in nonstop
2022; IEEE 754 arithmetic.
ecdb6d1a 2023ftrapping-math
ecee1b29 2024Common Report Var(flag_trapping_math) Init(1) Optimization SetByCombined
72528c71 2025Assume floating-point operations can trap
ecdb6d1a 2026
2027ftrapv
87c75316 2028Common Report Var(flag_trapv) Optimization
72528c71 2029Trap for signed overflow in addition, subtraction and multiplication
ecdb6d1a 2030
4ee9c684 2031ftree-ccp
87c75316 2032Common Report Var(flag_tree_ccp) Optimization
4ee9c684 2033Enable SSA-CCP optimization on trees
2034
b7e55469 2035ftree-bit-ccp
2036Common Report Var(flag_tree_bit_ccp) Optimization
2037Enable SSA-BIT-CCP optimization on trees
2038
88dbf20f 2039ftree-store-ccp
3b0273a1 2040Common Ignore
61207d43 2041Does nothing. Preserved for backward compatibility.
88dbf20f 2042
4ee9c684 2043ftree-ch
87c75316 2044Common Report Var(flag_tree_ch) Optimization
4ee9c684 2045Enable loop header copying on trees
2046
4015e18c 2047ftree-coalesce-inlined-vars
2048Common Report Var(flag_ssa_coalesce_vars,1) Init(2) RejectNegative Optimization
2049Enable coalescing of copy-related user variables that are inlined
2050
2051ftree-coalesce-vars
2052Common Report Var(flag_ssa_coalesce_vars,2) Optimization
2053Enable coalescing of all copy-related user variables
2054
4ee9c684 2055ftree-copyrename
87c75316 2056Common Report Var(flag_tree_copyrename) Optimization
3284a242 2057Replace SSA temporaries with better names in copies
4ee9c684 2058
88dbf20f 2059ftree-copy-prop
87c75316 2060Common Report Var(flag_tree_copy_prop) Optimization
88dbf20f 2061Enable copy propagation on trees
2062
2063ftree-store-copy-prop
3b0273a1 2064Common Ignore
578ef723 2065Does nothing. Preserved for backward compatibility.
88dbf20f 2066
e6d0e152 2067ftree-cselim
2068Common Report Var(flag_tree_cselim) Init(2) Optimization
2069Transform condition stores into unconditional ones
2070
a347af29 2071ftree-switch-conversion
2072Common Report Var(flag_tree_switch_conversion) Optimization
2073Perform conversions of switch initializations.
2074
4ee9c684 2075ftree-dce
87c75316 2076Common Report Var(flag_tree_dce) Optimization
4ee9c684 2077Enable SSA dead code elimination optimization on trees
2078
2079ftree-dominator-opts
87c75316 2080Common Report Var(flag_tree_dom) Optimization
4ee9c684 2081Enable dominator optimizations
2082
51385f30 2083ftree-tail-merge
2084Common Report Var(flag_tree_tail_merge) Optimization
2085Enable tail merging on trees
2086
4ee9c684 2087ftree-dse
87c75316 2088Common Report Var(flag_tree_dse) Optimization
4ee9c684 2089Enable dead store elimination
2090
408c3c77 2091ftree-forwprop
2092Common Report Var(flag_tree_forwprop) Init(1) Optimization
2093Enable forward propagation on trees
2094
591c2a30 2095ftree-fre
87c75316 2096Common Report Var(flag_tree_fre) Optimization
591c2a30 2097Enable Full Redundancy Elimination (FRE) on trees
2098
9efe50a4 2099foptimize-strlen
2100Common Report Var(flag_optimize_strlen) Optimization
2101Enable string length optimizations on trees
2102
801c5610 2103ftree-loop-distribution
2b945500 2104Common Report Var(flag_tree_loop_distribution) Optimization
801c5610 2105Enable loop distribution on trees
2106
0acf3477 2107ftree-loop-distribute-patterns
2108Common Report Var(flag_tree_loop_distribute_patterns) Optimization
2109Enable loop distribution for patterns transformed into a library call
2110
41b5cc78 2111ftree-loop-im
87c75316 2112Common Report Var(flag_tree_loop_im) Init(1) Optimization
7d23383d 2113Enable loop invariant motion on trees
2114
60cfcb79 2115ftree-loop-linear
464a406e 2116Common Alias(floop-interchange)
2117Enable loop interchange transforms. Same as -floop-interchange
60cfcb79 2118
41b5cc78 2119ftree-loop-ivcanon
87c75316 2120Common Report Var(flag_tree_loop_ivcanon) Init(1) Optimization
41b5cc78 2121Create canonical induction variables in loops
2122
dcb9eccb 2123ftree-loop-optimize
87c75316 2124Common Report Var(flag_tree_loop_optimize) Init(1) Optimization
dcb9eccb 2125Enable loop optimizations on tree level
2126
28c92cbb 2127ftree-parallelize-loops=
212cc995 2128Common Report Joined RejectNegative UInteger Var(flag_tree_parallelize_loops) Init(1)
28c92cbb 2129Enable automatic parallelization of loops
2130
408c3c77 2131ftree-phiprop
2132Common Report Var(flag_tree_phiprop) Init(1) Optimization
2133Enable hoisting loads from conditional pointers.
2134
4ee9c684 2135ftree-pre
87c75316 2136Common Report Var(flag_tree_pre) Optimization
4ee9c684 2137Enable SSA-PRE optimization on trees
2138
0f9b384d 2139ftree-partial-pre
2140Common Report Var(flag_tree_partial_pre) Optimization
2141In SSA-PRE optimization on trees, enable partial-partial redundancy elimination
2142
408c3c77 2143ftree-pta
2144Common Report Var(flag_tree_pta) Init(1) Optimization
2145Perform function-local points-to analysis on trees.
2146
621a93b1 2147ftree-reassoc
2148Common Report Var(flag_tree_reassoc) Init(1) Optimization
2149Enable reassociation on tree level
2150
2be14d8b 2151ftree-salias
3b0273a1 2152Common Ignore
70393469 2153Does nothing. Preserved for backward compatibility.
2be14d8b 2154
5e733b02 2155ftree-sink
87c75316 2156Common Report Var(flag_tree_sink) Optimization
5e733b02 2157Enable SSA code sinking on trees
2158
6de100ef 2159ftree-slsr
2160Common Report Var(flag_tree_slsr) Optimization
2161Perform straight-line strength reduction
2162
4ee9c684 2163ftree-sra
87c75316 2164Common Report Var(flag_tree_sra) Optimization
4ee9c684 2165Perform scalar replacement of aggregates
2166
2167ftree-ter
c17f64cc 2168Common Report Var(flag_tree_ter) Optimization
4ee9c684 2169Replace temporary expressions in the SSA->normal pass
2170
87c75316 2171ftree-lrs
2172Common Report Var(flag_tree_live_range_split) Optimization
2173Perform live range splitting during the SSA->normal pass
2174
88dbf20f 2175ftree-vrp
87c75316 2176Common Report Var(flag_tree_vrp) Init(0) Optimization
88dbf20f 2177Perform Value Range Propagation on trees
2178
1e06725a 2179funit-at-a-time
8188ae06 2180Common Report Var(flag_unit_at_a_time) Init(1) Optimization
72528c71 2181Compile whole compilation unit at a time
1e06725a 2182
2183funroll-loops
87c75316 2184Common Report Var(flag_unroll_loops) Optimization
72528c71 2185Perform loop unrolling when iteration count is known
1e06725a 2186
2187funroll-all-loops
87c75316 2188Common Report Var(flag_unroll_all_loops) Optimization
72528c71 2189Perform loop unrolling for all loops
1e06725a 2190
7e3cc681 2191; Nonzero means that loop optimizer may assume that the induction variables
2192; that control loops do not overflow and that the loops with nontrivial
2193; exit condition are not infinite
2194funsafe-loop-optimizations
87c75316 2195Common Report Var(flag_unsafe_loop_optimizations) Optimization
7e3cc681 2196Allow loop optimizations to assume that the loops behave in normal way
2197
49d060d7 2198fassociative-math
ecee1b29 2199Common Report Var(flag_associative_math) SetByCombined
49d060d7 2200Allow optimization for floating-point arithmetic which may change the
2201result of the operation due to rounding.
2202
2203freciprocal-math
ecee1b29 2204Common Report Var(flag_reciprocal_math) SetByCombined
49d060d7 2205Same as -fassociative-math for expressions which include division.
2206
82a16202 2207; Nonzero means that unsafe floating-point math optimizations are allowed
2208; for the sake of speed. IEEE compliance is not guaranteed, and operations
2209; are allowed to assume that their arguments and results are "normal"
2210; (e.g., nonnegative for SQRT).
ecdb6d1a 2211funsafe-math-optimizations
ecee1b29 2212Common Report Var(flag_unsafe_math_optimizations) Optimization SetByCombined
72528c71 2213Allow math optimizations that may violate IEEE or ISO standards
ecdb6d1a 2214
1e06725a 2215funswitch-loops
87c75316 2216Common Report Var(flag_unswitch_loops) Optimization
72528c71 2217Perform loop unswitching
1e06725a 2218
ecdb6d1a 2219funwind-tables
87c75316 2220Common Report Var(flag_unwind_tables) Optimization
72528c71 2221Just generate unwind tables for exception handling
ecdb6d1a 2222
99d5fe2d 2223fuse-ld=bfd
2224Common Negative(fuse-ld=gold)
2225Use the bfd linker instead of the default linker
2226
2227fuse-ld=gold
2228Common Negative(fuse-ld=bfd)
2229Use the gold linker instead of the default linker
2230
386fbe6a 2231fuse-linker-plugin
2232Common Undocumented
2233
0f8defe5 2234; Positive if we should track variables, negative if we should run
2235; the var-tracking pass only to discard debug annotations, zero if
2236; we're not to run it. When flag_var_tracking == 2 (AUTODETECT_VALUE) it
2237; will be set according to optimize, debug_info_level and debug_hooks
2238; in process_options ().
5923a5e7 2239fvar-tracking
0f8defe5 2240Common Report Var(flag_var_tracking) Init(2) Optimization
5923a5e7 2241Perform variable tracking
2242
0f8defe5 2243; Positive if we should track variables at assignments, negative if
2244; we should run the var-tracking pass only to discard debug
2245; annotations. When flag_var_tracking_assignments ==
2246; AUTODETECT_VALUE it will be set according to flag_var_tracking.
9845d120 2247fvar-tracking-assignments
0f8defe5 2248Common Report Var(flag_var_tracking_assignments) Init(2) Optimization
9845d120 2249Perform variable tracking by annotating assignments
2250
0f8defe5 2251; Nonzero if we should toggle flag_var_tracking_assignments after
2252; processing options and computing its default. */
9845d120 2253fvar-tracking-assignments-toggle
0f8defe5 2254Common Report Var(flag_var_tracking_assignments_toggle) Optimization
9845d120 2255Toggle -fvar-tracking-assignments
2256
3e1cce93 2257; Positive if we should track uninitialized variables, negative if
2258; we should run the var-tracking pass only to discard debug
2259; annotations. When flag_var_tracking_uninit == AUTODETECT_VALUE it
2260; will be set according to flag_var_tracking.
d53bb226 2261fvar-tracking-uninit
2262Common Report Var(flag_var_tracking_uninit) Optimization
2263Perform variable tracking and also tag variables that are uninitialized
2264
c91e8223 2265ftree-vectorize
87c75316 2266Common Report Var(flag_tree_vectorize) Optimization
043115ec 2267Enable vectorization on trees
c91e8223 2268
7bd765d4 2269ftree-vectorizer-verbose=
2270Common RejectNegative Joined UInteger Var(common_deferred_options) Defer
2271-ftree-vectorizer-verbose=<number> This switch is deprecated. Use -fopt-info instead.
2272
043115ec 2273ftree-loop-vectorize
2274Common Report Var(flag_tree_loop_vectorize) Optimization
2275Enable loop vectorization on trees
2276
37545e54 2277ftree-slp-vectorize
043115ec 2278Common Report Var(flag_tree_slp_vectorize) Optimization
37545e54 2279Enable basic block vectorization (SLP) on trees
2280
1dbf9bd1 2281fvect-cost-model=
2282Common Joined RejectNegative Enum(vect_cost_model) Var(flag_vect_cost_model) Init(VECT_COST_MODEL_DEFAULT)
2283Specifies the cost model for vectorization
2284
2285Enum
2286Name(vect_cost_model) Type(enum vect_cost_model) UnknownError(unknown vectorizer cost model %qs)
2287
2288EnumValue
2289Enum(vect_cost_model) String(unlimited) Value(VECT_COST_MODEL_UNLIMITED)
2290
2291EnumValue
2292Enum(vect_cost_model) String(dynamic) Value(VECT_COST_MODEL_DYNAMIC)
2293
2294EnumValue
2295Enum(vect_cost_model) String(cheap) Value(VECT_COST_MODEL_CHEAP)
2296
867c03eb 2297fvect-cost-model
1dbf9bd1 2298Common RejectNegative Alias(fvect-cost-model=,dynamic)
2299Enables the dynamic vectorizer cost model. Preserved for backward compatibility.
2300
2301fno-vect-cost-model
2302Common RejectNegative Alias(fvect-cost-model=,unlimited)
2303Enables the unlimited vectorizer cost model. Preserved for backward compatibility.
867c03eb 2304
25e3c2e8 2305ftree-vect-loop-version
1dbf9bd1 2306Common Ignore
2307Does nothing. Preserved for backward compatibility.
25e3c2e8 2308
2a6e95ba 2309ftree-scev-cprop
e8831472 2310Common Report Var(flag_tree_scev_cprop) Init(1) Optimization
2a6e95ba 2311Enable copy propagation of scalar-evolution information.
2312
82a16202 2313; -fverbose-asm causes extra commentary information to be produced in
2314; the generated assembly code (to make it more readable). This option
2315; is generally only of use to those who actually need to read the
2316; generated assembly code (perhaps while debugging the compiler itself).
2317; -fno-verbose-asm, the default, causes the extra information
2318; to not be added and is useful when comparing two assembler files.
ecdb6d1a 2319fverbose-asm
2e9da478 2320Common Report Var(flag_verbose_asm)
72528c71 2321Add extra commentary to assembler output
ecdb6d1a 2322
b212f378 2323fvisibility=
d62a5950 2324Common Joined RejectNegative Enum(symbol_visibility) Var(default_visibility) Init(VISIBILITY_DEFAULT)
b212f378 2325-fvisibility=[default|internal|hidden|protected] Set the default symbol visibility
2326
d62a5950 2327Enum
2328Name(symbol_visibility) Type(enum symbol_visibility) UnknownError(unrecognized visibility value %qs)
2329
2330EnumValue
2331Enum(symbol_visibility) String(default) Value(VISIBILITY_DEFAULT)
2332
2333EnumValue
2334Enum(symbol_visibility) String(internal) Value(VISIBILITY_INTERNAL)
2335
2336EnumValue
2337Enum(symbol_visibility) String(hidden) Value(VISIBILITY_HIDDEN)
2338
2339EnumValue
2340Enum(symbol_visibility) String(protected) Value(VISIBILITY_PROTECTED)
b212f378 2341
b710ec85 2342fvtable-verify=
2343Common Joined RejectNegative Enum(vtv_priority) Var(flag_vtable_verify) Init(VTV_NO_PRIORITY)
2344Validate vtable pointers before using them.
2345
2346Enum
2347Name(vtv_priority) Type(enum vtv_priority) UnknownError(unknown vtable verify initialization priority %qs)
2348
2349EnumValue
2350Enum(vtv_priority) String(none) Value(VTV_NO_PRIORITY)
2351
2352EnumValue
2353Enum(vtv_priority) String(std) Value(VTV_STANDARD_PRIORITY)
2354
2355EnumValue
2356Enum(vtv_priority) String(preinit) Value(VTV_PREINIT_PRIORITY)
2357
2358fvtv-counts
2359Common Var(flag_vtv_counts)
2360Output vtable verification counters.
2361
2362fvtv-debug
2363Common Var(flag_vtv_debug)
2364Output vtable verification pointer sets information.
2365
1c6a7b8c 2366fvpt
87c75316 2367Common Report Var(flag_value_profile_transformations) Optimization
1c6a7b8c 2368Use expression value profiles in optimizations
2369
eeb4a70e 2370fweb
87c75316 2371Common Report Var(flag_web) Init(2) Optimization
eeb4a70e 2372Construct webs and split unrelated uses of single variable
2373
e6a23add 2374ftree-builtin-call-dce
2375Common Report Var(flag_tree_builtin_call_dce) Init(0) Optimization
2376Enable conditional dead code elimination for builtin calls
2377
62eec3b4 2378fwhole-program
87c75316 2379Common Report Var(flag_whole_program) Init(0) Optimization
62eec3b4 2380Perform whole program optimizations
2381
ecdb6d1a 2382fwrapv
87c75316 2383Common Report Var(flag_wrapv) Optimization
72528c71 2384Assume signed arithmetic overflow wraps around
ecdb6d1a 2385
ecdb6d1a 2386fzero-initialized-in-bss
2e9da478 2387Common Report Var(flag_zero_initialized_in_bss) Init(1)
72528c71 2388Put zero initialized data in the bss section
ecdb6d1a 2389
6f2f567f 2390g
2391Common JoinedOrMissing
b0e56fb1 2392Generate debug information in default format
2393
2394gcoff
8786b72c 2395Common JoinedOrMissing Negative(gdwarf)
b0e56fb1 2396Generate debug information in COFF format
2397
8786b72c 2398gdwarf
2399Common JoinedOrMissing Negative(gdwarf-)
2400Generate debug information in default version of DWARF format
2401
3d3b9d5b 2402gdwarf-
052166fd 2403Common Joined UInteger Var(dwarf_version) Init(4) Negative(gstabs)
3d3b9d5b 2404Generate debug information in DWARF v2 (or later) format
b0e56fb1 2405
2406ggdb
2407Common JoinedOrMissing
2408Generate debug information in default extended format
2409
7a99ccab 2410gno-pubnames
2411Common RejectNegative Var(debug_generate_pub_sections, 0) Init(-1)
2412Don't generate DWARF pubnames and pubtypes sections.
2413
2414gpubnames
2415Common RejectNegative Var(debug_generate_pub_sections, 1)
2416Generate DWARF pubnames and pubtypes sections.
2417
f45370f8 2418gno-record-gcc-switches
052166fd 2419Common RejectNegative Var(dwarf_record_gcc_switches,0) Init(1)
f45370f8 2420Don't record gcc command line switches in DWARF DW_AT_producer.
2421
2422grecord-gcc-switches
2423Common RejectNegative Var(dwarf_record_gcc_switches,1)
2424Record gcc command line switches in DWARF DW_AT_producer.
2425
b35329c7 2426gno-split-dwarf
2427Common Driver RejectNegative Var(dwarf_split_debug_info,0) Init(0)
2428Don't generate debug information in separate .dwo files
2429
2430gsplit-dwarf
2431Common Driver RejectNegative Var(dwarf_split_debug_info,1)
2432Generate debug information in separate .dwo files
2433
b0e56fb1 2434gstabs
a1baa5f1 2435Common JoinedOrMissing Negative(gstabs+)
b0e56fb1 2436Generate debug information in STABS format
2437
2438gstabs+
a1baa5f1 2439Common JoinedOrMissing Negative(gvms)
b0e56fb1 2440Generate debug information in extended STABS format
2441
c16b6d19 2442gno-strict-dwarf
052166fd 2443Common RejectNegative Var(dwarf_strict,0) Init(0)
c16b6d19 2444Emit DWARF additions beyond selected version
2445
2446gstrict-dwarf
5461e683 2447Common Report RejectNegative Var(dwarf_strict,1)
c16b6d19 2448Don't emit DWARF additions beyond selected version
2449
71278019 2450gtoggle
2451Common Report Var(flag_gtoggle)
2452Toggle debug information generation
2453
b0e56fb1 2454gvms
a1baa5f1 2455Common JoinedOrMissing Negative(gxcoff)
b0e56fb1 2456Generate debug information in VMS format
2457
2458gxcoff
a1baa5f1 2459Common JoinedOrMissing Negative(gxcoff+)
b0e56fb1 2460Generate debug information in XCOFF format
2461
2462gxcoff+
a1baa5f1 2463Common JoinedOrMissing Negative(gcoff)
b0e56fb1 2464Generate debug information in extended XCOFF format
6f2f567f 2465
f37ef985 2466h
2467Driver Joined Separate
2468
19bc000d 2469iplugindir=
2470Common Joined Var(plugindir_string) Init(0)
2471-iplugindir=<dir> Set <dir> to be the default plugin directory
2472
77adc39e 2473imultiarch
2474Common Joined Separate RejectDriver Var(imultiarch) Init(0)
2475-imultiarch <dir> Set <dir> to be the multiarch include subdirectory
2476
e28aa114 2477l
2478Driver Joined Separate
2479
3bfde2af 2480n
2481Driver
2482
e28aa114 2483no-canonical-prefixes
2484Driver
2485
cb22f930 2486nodefaultlibs
2487Driver
2488
286f96fe 2489nostartfiles
2490Driver
2491
cb22f930 2492nostdlib
2493Driver
2494
e690b385 2495o
6bd9d862 2496Common Driver Joined Separate Var(asm_file_name) MissingArgError(missing filename after %qs)
53b8e5c1 2497-o <file> Place output into <file>
e690b385 2498
2499p
2e9da478 2500Common Var(profile_flag)
53b8e5c1 2501Enable function profiling
e690b385 2502
e28aa114 2503pass-exit-codes
2504Driver Var(pass_exit_codes)
2505
e690b385 2506pedantic
29438999 2507Common Alias(Wpedantic)
e690b385 2508
2509pedantic-errors
6bd9d862 2510Common Var(flag_pedantic_errors)
53b8e5c1 2511Like -pedantic but issue them as errors
e690b385 2512
cb22f930 2513pg
2514Driver
2515
e28aa114 2516pipe
2517Driver Var(use_pipes)
2518
2519print-file-name=
2520Driver JoinedOrMissing Var(print_file_name)
2521
2522print-libgcc-file-name
2523Driver
2524
2525print-multi-directory
2526Driver Var(print_multi_directory)
2527
2528print-multi-lib
2529Driver Var(print_multi_lib)
2530
2531print-multi-os-directory
2532Driver Var(print_multi_os_directory)
77adc39e 2533
2534print-multiarch
2535Driver Var(print_multiarch)
e28aa114 2536
2537print-prog-name=
2538Driver JoinedOrMissing Var(print_prog_name)
2539
2540print-search-dirs
2541Driver Var(print_search_dirs)
2542
2543print-sysroot
2544Driver Var(print_sysroot)
2545
2546print-sysroot-headers-suffix
2547Driver Var(print_sysroot_headers_suffix)
2548
3272db82 2549quiet
e28aa114 2550Common Var(quiet_flag) RejectDriver
53b8e5c1 2551Do not display functions compiled or elapsed time
3272db82 2552
3bfde2af 2553r
2554Driver
2555
2556s
2557Driver
2558
e28aa114 2559save-temps
2560Driver
2561
2562save-temps=
2563Driver Joined
2564
3bfde2af 2565t
2566Driver
2567
e28aa114 2568time
2569Driver Var(report_times)
2570
2571time=
2572Driver JoinedOrMissing
2573
5789e05b 2574u
2575Driver Joined Separate
2576
4b2a05b6 2577undef
2578Driver
2579; C option, but driver must not handle as "-u ndef".
2580
e28aa114 2581v
6bd9d862 2582Common Driver Var(verbose_flag)
2583Enable verbose output
e28aa114 2584
e690b385 2585version
e28aa114 2586Common Var(version_flag) RejectDriver
53b8e5c1 2587Display the compiler's version
e690b385 2588
2589w
2e9da478 2590Common Var(inhibit_warnings)
53b8e5c1 2591Suppress warnings
e690b385 2592
e28aa114 2593wrapper
2594Driver Separate Var(wrapper_string)
2595
2596x
2597Driver Joined Separate
2598
794febf8 2599shared
1412b935 2600Driver RejectNegative Negative(pie)
794febf8 2601Create a shared library
2602
e28aa114 2603shared-libgcc
2604Driver
2605
2606specs
67089c6b 2607Driver Separate Alias(specs=)
e28aa114 2608
2609specs=
2610Driver Joined
2611
cb22f930 2612static
2613Driver
2614
e28aa114 2615static-libgcc
2616Driver
2617
2618static-libgfortran
2619Driver
2620; Documented for Fortran, but always accepted by driver.
2621
2622static-libstdc++
2623Driver
2624
e440a328 2625static-libgo
2626Driver
2627; Documented for Go, but always accepted by driver.
2628
6db5160a 2629static-libasan
2630Driver
2631
b077695d 2632static-libtsan
2633Driver
2634
9e46467d 2635static-libubsan
2636Driver
2637
5789e05b 2638symbolic
2639Driver
2640
794febf8 2641pie
1412b935 2642Driver RejectNegative Negative(shared)
794febf8 2643Create a position independent executable
2644
f37ef985 2645z
2646Driver Joined Separate
2647
3272db82 2648; This comment is to ensure we retain the blank line above.