OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / doc / options.texi
index 3afb3c1..a05a6b2 100644 (file)
@@ -1,11 +1,12 @@
-@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
@@ -29,14 +30,18 @@ The files can contain the following types of record:
 
 @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
@@ -62,11 +67,11 @@ tab forms the help text.  This allows you to elaborate on what type
 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.
 
@@ -124,7 +129,10 @@ This property cannot be used alongside @code{Joined} or @code{Separate}.
 @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}.
@@ -169,8 +177,8 @@ The variable specified by the @code{Var} property already exists.
 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
@@ -221,4 +229,9 @@ The option should only be accepted if preprocessor condition
 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