Mercurial > hg > CbC > CbC_gcc
comparison gcc/doc/options.texi @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | f6334be47118 |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 @c Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 | 1 @c Copyright (C) 2003-2017 Free Software Foundation, Inc. |
2 @c Free Software Foundation, Inc. | |
3 @c This is part of the GCC manual. | 2 @c This is part of the GCC manual. |
4 @c For copying conditions, see the file gcc.texi. | 3 @c For copying conditions, see the file gcc.texi. |
5 | 4 |
6 @node Options | 5 @node Options |
7 @chapter Option specification files | 6 @chapter Option specification files |
69 These records have two fields: the string @samp{HeaderInclude} and the | 68 These records have two fields: the string @samp{HeaderInclude} and the |
70 name of the include file. | 69 name of the include file. |
71 | 70 |
72 @item | 71 @item |
73 A variable record to record any additional files that the | 72 A variable record to record any additional files that the |
74 @file{options.c} file should include. This is useful to provide | 73 @file{options.c} or @file{options-save.c} file should include. This |
74 is useful to provide | |
75 inline functions needed for target variables and/or @code{#ifdef} | 75 inline functions needed for target variables and/or @code{#ifdef} |
76 sequences to properly set up the initialization. These records have | 76 sequences to properly set up the initialization. These records have |
77 two fields: the string @samp{SourceInclude} and the name of the | 77 two fields: the string @samp{SourceInclude} and the name of the |
78 include file. | 78 include file. |
79 | 79 |
220 The option will turn off another option @var{othername}, which is | 220 The option will turn off another option @var{othername}, which is |
221 the option name with the leading ``-'' removed. This chain action will | 221 the option name with the leading ``-'' removed. This chain action will |
222 propagate through the @code{Negative} property of the option to be | 222 propagate through the @code{Negative} property of the option to be |
223 turned off. | 223 turned off. |
224 | 224 |
225 As a consequence, if you have a group of mutually-exclusive | |
226 options, their @code{Negative} properties should form a circular chain. | |
227 For example, if options @option{-@var{a}}, @option{-@var{b}} and | |
228 @option{-@var{c}} are mutually exclusive, their respective @code{Negative} | |
229 properties should be @samp{Negative(@var{b})}, @samp{Negative(@var{c})} | |
230 and @samp{Negative(@var{a})}. | |
231 | |
225 @item Joined | 232 @item Joined |
226 @itemx Separate | 233 @itemx Separate |
227 The option takes a mandatory argument. @code{Joined} indicates | 234 The option takes a mandatory argument. @code{Joined} indicates |
228 that the option and argument can be included in the same @code{argv} | 235 that the option and argument can be included in the same @code{argv} |
229 entry (as with @code{-mflush-func=@var{name}}, for example). | 236 entry (as with @code{-mflush-func=@var{name}}, for example). |
255 option handler. @code{UInteger} should also be used on options like | 262 option handler. @code{UInteger} should also be used on options like |
256 @code{-falign-loops} where both @code{-falign-loops} and | 263 @code{-falign-loops} where both @code{-falign-loops} and |
257 @code{-falign-loops}=@var{n} are supported to make sure the saved | 264 @code{-falign-loops}=@var{n} are supported to make sure the saved |
258 options are given a full integer. | 265 options are given a full integer. |
259 | 266 |
267 @item ToLower | |
268 The option's argument should be converted to lowercase as part of | |
269 putting it in canonical form, and before comparing with the strings | |
270 indicated by any @code{Enum} property. | |
271 | |
260 @item NoDriverArg | 272 @item NoDriverArg |
261 For an option marked @code{Separate}, the option only takes an | 273 For an option marked @code{Separate}, the option only takes an |
262 argument in the compiler proper, not in the driver. This is for | 274 argument in the compiler proper, not in the driver. This is for |
263 compatibility with existing options that are used both directly and | 275 compatibility with existing options that are used both directly and |
264 via @option{-Wp,}; new options should not have this property. | 276 via @option{-Wp,}; new options should not have this property. |
328 The options-processing script will automatically allocate a unique bit | 340 The options-processing script will automatically allocate a unique bit |
329 for the option. If the option is attached to @samp{target_flags}, | 341 for the option. If the option is attached to @samp{target_flags}, |
330 the script will set the macro @code{MASK_@var{name}} to the appropriate | 342 the script will set the macro @code{MASK_@var{name}} to the appropriate |
331 bitmask. It will also declare a @code{TARGET_@var{name}} macro that has | 343 bitmask. It will also declare a @code{TARGET_@var{name}} macro that has |
332 the value 1 when the option is active and 0 otherwise. If you use @code{Var} | 344 the value 1 when the option is active and 0 otherwise. If you use @code{Var} |
333 to attach the option to a different variable, the associated macros are | 345 to attach the option to a different variable, the bitmask macro with be |
334 called @code{OPTION_MASK_@var{name}} and @code{OPTION_@var{name}} respectively. | 346 called @code{OPTION_MASK_@var{name}}. |
335 | |
336 You can disable automatic bit allocation using @code{MaskExists}. | |
337 | 347 |
338 @item InverseMask(@var{othername}) | 348 @item InverseMask(@var{othername}) |
339 @itemx InverseMask(@var{othername}, @var{thisname}) | 349 @itemx InverseMask(@var{othername}, @var{thisname}) |
340 The option is the inverse of another option that has the | 350 The option is the inverse of another option that has the |
341 @code{Mask(@var{othername})} property. If @var{thisname} is given, | 351 @code{Mask(@var{othername})} property. If @var{thisname} is given, |
342 the options-processing script will declare a @code{TARGET_@var{thisname}} | 352 the options-processing script will declare a @code{TARGET_@var{thisname}} |
343 macro that is 1 when the option is active and 0 otherwise. | 353 macro that is 1 when the option is active and 0 otherwise. |
344 | 354 |
345 @item MaskExists | |
346 The mask specified by the @code{Mask} property already exists. | |
347 No @code{MASK} or @code{TARGET} definitions should be added to | |
348 @file{options.h} in response to this option record. | |
349 | |
350 The main purpose of this property is to support synonymous options. | |
351 The first option should use @samp{Mask(@var{name})} and the others | |
352 should use @samp{Mask(@var{name}) MaskExists}. | |
353 | |
354 @item Enum(@var{name}) | 355 @item Enum(@var{name}) |
355 The option's argument is a string from the set of strings associated | 356 The option's argument is a string from the set of strings associated |
356 with the corresponding @samp{Enum} record. The string is checked and | 357 with the corresponding @samp{Enum} record. The string is checked and |
357 converted to the integer specified in the corresponding | 358 converted to the integer specified in the corresponding |
358 @samp{EnumValue} record before being passed to option handlers. | 359 @samp{EnumValue} record before being passed to option handlers. |
362 for later processing. | 363 for later processing. |
363 | 364 |
364 @item Alias(@var{opt}) | 365 @item Alias(@var{opt}) |
365 @itemx Alias(@var{opt}, @var{arg}) | 366 @itemx Alias(@var{opt}, @var{arg}) |
366 @itemx Alias(@var{opt}, @var{posarg}, @var{negarg}) | 367 @itemx Alias(@var{opt}, @var{posarg}, @var{negarg}) |
367 The option is an alias for @option{-@var{opt}}. In the first form, | 368 The option is an alias for @option{-@var{opt}} (or the negative form |
369 of that option, depending on @code{NegativeAlias}). In the first form, | |
368 any argument passed to the alias is considered to be passed to | 370 any argument passed to the alias is considered to be passed to |
369 @option{-@var{opt}}, and @option{-@var{opt}} is considered to be | 371 @option{-@var{opt}}, and @option{-@var{opt}} is considered to be |
370 negated if the alias is used in negated form. In the second form, the | 372 negated if the alias is used in negated form. In the second form, the |
371 alias may not be negated or have an argument, and @var{posarg} is | 373 alias may not be negated or have an argument, and @var{posarg} is |
372 considered to be passed as an argument to @option{-@var{opt}}. In the | 374 considered to be passed as an argument to @option{-@var{opt}}. In the |
385 When an @code{Alias} definition is used for an option, driver specs do | 387 When an @code{Alias} definition is used for an option, driver specs do |
386 not need to handle it and no @samp{OPT_} enumeration value is defined | 388 not need to handle it and no @samp{OPT_} enumeration value is defined |
387 for it; only the canonical form of the option will be seen in those | 389 for it; only the canonical form of the option will be seen in those |
388 places. | 390 places. |
389 | 391 |
392 @item NegativeAlias | |
393 For an option marked with @code{Alias(@var{opt})}, the option is | |
394 considered to be an alias for the positive form of @option{-@var{opt}} | |
395 if negated and for the negative form of @option{-@var{opt}} if not | |
396 negated. @code{NegativeAlias} may not be used with the forms of | |
397 @code{Alias} taking more than one argument. | |
398 | |
390 @item Ignore | 399 @item Ignore |
391 This option is ignored apart from printing any warning specified using | 400 This option is ignored apart from printing any warning specified using |
392 @code{Warn}. The option will not be seen by specs and no @samp{OPT_} | 401 @code{Warn}. The option will not be seen by specs and no @samp{OPT_} |
393 enumeration value is defined for it. | 402 enumeration value is defined for it. |
394 | 403 |
418 @item Optimization | 427 @item Optimization |
419 This is an optimization option. It should be shown as such in | 428 This is an optimization option. It should be shown as such in |
420 @option{--help} output, and any associated variable named using | 429 @option{--help} output, and any associated variable named using |
421 @code{Var} should be saved and restored when the optimization level is | 430 @code{Var} should be saved and restored when the optimization level is |
422 changed with @code{optimize} attributes. | 431 changed with @code{optimize} attributes. |
432 | |
433 @item PerFunction | |
434 This is an option that can be overridden on a per-function basis. | |
435 @code{Optimization} implies @code{PerFunction}, but options that do not | |
436 affect executable code generation may use this flag instead, so that the | |
437 option is not taken into account in ways that might affect executable | |
438 code generation. | |
423 | 439 |
424 @item Undocumented | 440 @item Undocumented |
425 The option is deliberately missing documentation and should not | 441 The option is deliberately missing documentation and should not |
426 be included in the @option{--help} output. | 442 be included in the @option{--help} output. |
427 | 443 |
447 combined option. For example, some front ends use this to prevent | 463 combined option. For example, some front ends use this to prevent |
448 @option{-ffast-math} and @option{-fno-fast-math} from changing the | 464 @option{-ffast-math} and @option{-fno-fast-math} from changing the |
449 value of @option{-fmath-errno} for languages that do not use | 465 value of @option{-fmath-errno} for languages that do not use |
450 @code{errno}. | 466 @code{errno}. |
451 | 467 |
468 @item EnabledBy(@var{opt}) | |
469 @itemx EnabledBy(@var{opt} || @var{opt2}) | |
470 @itemx EnabledBy(@var{opt} && @var{opt2}) | |
471 If not explicitly set, the option is set to the value of | |
472 @option{-@var{opt}}; multiple options can be given, separated by | |
473 @code{||}. The third form using @code{&&} specifies that the option is | |
474 only set if both @var{opt} and @var{opt2} are set. The options @var{opt} | |
475 and @var{opt2} must have the @code{Common} property; otherwise, use | |
476 @code{LangEnabledBy}. | |
477 | |
478 @item LangEnabledBy(@var{language}, @var{opt}) | |
479 @itemx LangEnabledBy(@var{language}, @var{opt}, @var{posarg}, @var{negarg}) | |
480 When compiling for the given language, the option is set to the value | |
481 of @option{-@var{opt}}, if not explicitly set. @var{opt} can be also a list | |
482 of @code{||} separated options. In the second form, if | |
483 @var{opt} is used in the positive form then @var{posarg} is considered | |
484 to be passed to the option, and if @var{opt} is used in the negative | |
485 form then @var{negarg} is considered to be passed to the option. It | |
486 is possible to specify several different languages. Each | |
487 @var{language} must have been declared by an earlier @code{Language} | |
488 record. @xref{Option file format}. | |
489 | |
490 @item NoDWARFRecord | |
491 The option is omitted from the producer string written by | |
492 @option{-grecord-gcc-switches}. | |
493 | |
494 @item PchIgnore | |
495 Even if this is a target option, this option will not be recorded / compared | |
496 to determine if a precompiled header file matches. | |
497 | |
498 @item CPP(@var{var}) | |
499 The state of this option should be kept in sync with the preprocessor | |
500 option @var{var}. If this property is set, then properties @code{Var} | |
501 and @code{Init} must be set as well. | |
502 | |
503 @item CppReason(@var{CPP_W_Enum}) | |
504 This warning option corresponds to @code{cpplib.h} warning reason code | |
505 @var{CPP_W_Enum}. This should only be used for warning options of the | |
506 C-family front-ends. | |
507 | |
452 @end table | 508 @end table |