-@c Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+@c Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
+@c Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@node Options
@chapter Option specification files
@cindex option specification files
-@cindex @samp{opts.sh}
+@cindex @samp{optc-gen.awk}
Most GCC command-line options are described by special option
definition files, the names of which conventionally end in
@itemize @bullet
@item
-A language definition record. These records have two fields: the
-string @samp{Language} and the name of the language. Once a language
+A language definition record. These records have two fields: the
+string @samp{Language} and the name of the language. Once a language
has been declared in this way, it can be used as an option property.
@xref{Option properties}.
@item
-An option definition record. These records have the following fields:
+A target specific save record to save additional information. These
+records have two fields: the string @samp{TargetSave}, and a
+declaration type to go in the @code{cl_target_option} structure.
+@item
+An option definition record. These records have the following fields:
@enumerate
@item
the name of the option, with the leading ``-'' removed
of argument the option takes.
@item
-A target mask record. These records have one field of the form
-@samp{Mask(@var{x})}. The options-processing script will automatically
+A target mask record. These records have one field of the form
+@samp{Mask(@var{x})}. The options-processing script will automatically
allocate a bit in @code{target_flags} (@pxref{Run-time Target}) for
each mask name @var{x} and set the macro @code{MASK_@var{x}} to the
-appropriate bitmask. It will also declare a @code{TARGET_@var{x}}
+appropriate bitmask. It will also declare a @code{TARGET_@var{x}}
macro that has the value 1 when bit @code{MASK_@var{x}} is set and
0 otherwise.
@item UInteger
The option's argument is a non-negative integer. The option parser
will check and convert the argument before passing it to the relevant
-option handler.
+option handler. @code{UInteger} should also be used on options like
+@code{-falign-loops} where both @code{-falign-loops} and
+@code{-falign-loops}=@var{n} are supported to make sure the saved
+options are given a full integer.
@item Var(@var{var})
The state of this option should be stored in variable @var{var}.
No definition should be added to @file{options.c} in response to
this option record.
-You should use this property if an earlier option has already declared
-the variable or if the variable is declared outside @file{options.c}.
+You should use this property only if the variable is declared outside
+@file{options.c}.
@item Init(@var{value})
The variable specified by the @code{Var} property should be statically
option will be present even if @var{cond} is false; @var{cond} simply
controls whether the option is accepted and whether it is printed in
the @option{--help} output.
+
+@item Save
+Build the @code{cl_target_option} structure to hold a copy of the
+option, add the functions @code{cl_target_option_save} and
+@code{cl_target_option_restore} to save and restore the options.
@end table