diff mbox

Don't include flags.h in tm.h

Message ID Pine.LNX.4.64.1010111729560.30928@digraph.polyomino.org.uk
State New
Headers show

Commit Message

Joseph Myers Oct. 11, 2010, 5:30 p.m. UTC
This patch stops flags.h from being included in tm.h, instead moving
types required by options.h into a separate flag-types.h, as proposed
in <http://gcc.gnu.org/ml/gcc-patches/2010-10/msg00787.html>.  (I
didn't try to limit the types moved to just those required by
options.h, since it's likely more variables will end up moving to
options.h and so require more types there.)

I don't know if this will help with the Cygwin problems reported by
RTH.

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.  Also
tested building cc1 for cross to mips-elf (previously broken, works
with this patch).  OK to commit?

2010-10-11  Joseph Myers  <joseph@codesourcery.com>

	* flag-types.h: New.
	* Makefile.in (TH_H): Include $(OPTIONS_H) instead of $(FLAGS_H).
	(FLAGS_H): Include flag-types.h.  Include $(OPTIONS_H) instead of
	options.h.
	(OPTIONS_H): Define.
	(c-family/c-opts.o, lto-opts.o, opts.o): Use $(OPTIONS_H) instead
	of options.h.
	* configure.ac (tm_include_list): Include options.h not flags.h.
	* configure: Regenerate.
	* flags.h: Include flag-types.h.  Include options.h at top of file
	again.
	(enum debug_info_type, enum debug_info_level, enum
	debug_info_usage, enum symbol_visibility, struct visibility_flags,
	enum ira_algorithm, enum ira_region, enum excess_precision, enum
	graph_dump_types, enum stack_check_type, enum
	warn_strict_overflow_code): Move to flag-types.h
	* opth-gen.awk: Include flag-types.h in options.h.

ada:
2010-10-11  Joseph Myers  <joseph@codesourcery.com>

	* gcc-interface/Make-lang.in (ada/misc.o): Use $(OPTIONS_H)
	instead of options.h.

java:
2010-10-11  Joseph Myers  <joseph@codesourcery.com>

	* Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
	options.h.

Comments

Richard Biener Oct. 12, 2010, 10:01 a.m. UTC | #1
On Mon, Oct 11, 2010 at 7:30 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> This patch stops flags.h from being included in tm.h, instead moving
> types required by options.h into a separate flag-types.h, as proposed
> in <http://gcc.gnu.org/ml/gcc-patches/2010-10/msg00787.html>.  (I
> didn't try to limit the types moved to just those required by
> options.h, since it's likely more variables will end up moving to
> options.h and so require more types there.)
>
> I don't know if this will help with the Cygwin problems reported by
> RTH.
>
> Bootstrapped with no regressions on x86_64-unknown-linux-gnu.  Also
> tested building cc1 for cross to mips-elf (previously broken, works
> with this patch).  OK to commit?

Ok.

Thanks,
Richard.

> 2010-10-11  Joseph Myers  <joseph@codesourcery.com>
>
>        * flag-types.h: New.
>        * Makefile.in (TH_H): Include $(OPTIONS_H) instead of $(FLAGS_H).
>        (FLAGS_H): Include flag-types.h.  Include $(OPTIONS_H) instead of
>        options.h.
>        (OPTIONS_H): Define.
>        (c-family/c-opts.o, lto-opts.o, opts.o): Use $(OPTIONS_H) instead
>        of options.h.
>        * configure.ac (tm_include_list): Include options.h not flags.h.
>        * configure: Regenerate.
>        * flags.h: Include flag-types.h.  Include options.h at top of file
>        again.
>        (enum debug_info_type, enum debug_info_level, enum
>        debug_info_usage, enum symbol_visibility, struct visibility_flags,
>        enum ira_algorithm, enum ira_region, enum excess_precision, enum
>        graph_dump_types, enum stack_check_type, enum
>        warn_strict_overflow_code): Move to flag-types.h
>        * opth-gen.awk: Include flag-types.h in options.h.
>
> ada:
> 2010-10-11  Joseph Myers  <joseph@codesourcery.com>
>
>        * gcc-interface/Make-lang.in (ada/misc.o): Use $(OPTIONS_H)
>        instead of options.h.
>
> java:
> 2010-10-11  Joseph Myers  <joseph@codesourcery.com>
>
>        * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
>        options.h.
>
> Index: gcc/flags.h
> ===================================================================
> --- gcc/flags.h (revision 165304)
> +++ gcc/flags.h (working copy)
> @@ -23,54 +23,20 @@ along with GCC; see the file COPYING3.
>  #define GCC_FLAGS_H
>
>  #include "coretypes.h"
> +#include "flag-types.h"
> +#include "options.h"
>
>  #if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) && !defined(IN_RTS)
>
> -enum debug_info_type
> -{
> -  NO_DEBUG,        /* Write no debug info.  */
> -  DBX_DEBUG,       /* Write BSD .stabs for DBX (using dbxout.c).  */
> -  SDB_DEBUG,       /* Write COFF for (old) SDB (using sdbout.c).  */
> -  DWARF2_DEBUG,            /* Write Dwarf v2 debug info (using dwarf2out.c).  */
> -  XCOFF_DEBUG,     /* Write IBM/Xcoff debug info (using dbxout.c).  */
> -  VMS_DEBUG,        /* Write VMS debug info (using vmsdbgout.c).  */
> -  VMS_AND_DWARF2_DEBUG /* Write VMS debug info (using vmsdbgout.c).
> -                          and DWARF v2 debug info (using dwarf2out.c).  */
> -};
> -
>  /* Specify which kind of debugging info to generate.  */
>  extern enum debug_info_type write_symbols;
>
>  /* Names of debug_info_type, for error messages.  */
>  extern const char *const debug_type_names[];
>
> -enum debug_info_level
> -{
> -  DINFO_LEVEL_NONE,    /* Write no debugging info.  */
> -  DINFO_LEVEL_TERSE,   /* Write minimal info to support tracebacks only.  */
> -  DINFO_LEVEL_NORMAL,  /* Write info for all declarations (and line table).  */
> -  DINFO_LEVEL_VERBOSE  /* Write normal info plus #define/#undef info.  */
> -};
> -
>  /* Specify how much debugging info to generate.  */
>  extern enum debug_info_level debug_info_level;
>
> -/* A major contribution to object and executable size is debug
> -   information size.  A major contribution to debug information
> -   size is struct descriptions replicated in several object files.
> -   The following function determines whether or not debug information
> -   should be generated for a given struct.  The indirect parameter
> -   indicates that the struct is being handled indirectly, via
> -   a pointer.  See opts.c for the implementation. */
> -
> -enum debug_info_usage
> -{
> -  DINFO_USAGE_DFN,     /* A struct definition. */
> -  DINFO_USAGE_DIR_USE, /* A direct use, such as the type of a variable. */
> -  DINFO_USAGE_IND_USE, /* An indirect use, such as through a pointer. */
> -  DINFO_USAGE_NUM_ENUMS        /* The number of enumerators. */
> -};
> -
>  extern bool should_emit_struct_debug (tree type_decl, enum debug_info_usage);
>  extern void set_struct_debug_option (const char *value);
>
> @@ -83,28 +49,9 @@ extern bool use_gnu_debug_info_extension
>    an actual variable not a macro.  */
>  extern int flag_compare_debug;
>
> -/* Enumerate visibility settings.  This is deliberately ordered from most
> -   to least visibility.  */
> -#ifndef SYMBOL_VISIBILITY_DEFINED
> -#define SYMBOL_VISIBILITY_DEFINED
> -enum symbol_visibility
> -{
> -  VISIBILITY_DEFAULT,
> -  VISIBILITY_PROTECTED,
> -  VISIBILITY_HIDDEN,
> -  VISIBILITY_INTERNAL
> -};
> -#endif
> -
>  /* The default visibility for all symbols (unless overridden).  */
>  extern enum symbol_visibility default_visibility;
>
> -struct visibility_flags
> -{
> -  unsigned inpragma : 1;       /* True when in #pragma GCC visibility.  */
> -  unsigned inlines_hidden : 1; /* True when -finlineshidden in effect.  */
> -};
> -
>  /* Global visibility options.  */
>  extern struct visibility_flags visibility_options;
>
> @@ -189,29 +136,6 @@ extern int flag_next_runtime;
>
>  extern int flag_dump_rtl_in_asm;
>
> -/* The algorithm used for the integrated register allocator (IRA).  */
> -enum ira_algorithm
> -{
> -  IRA_ALGORITHM_CB,
> -  IRA_ALGORITHM_PRIORITY
> -};
> -
> -/* The regions used for the integrated register allocator (IRA).  */
> -enum ira_region
> -{
> -  IRA_REGION_ONE,
> -  IRA_REGION_ALL,
> -  IRA_REGION_MIXED
> -};
> -
> -/* The options for excess precision.  */
> -enum excess_precision
> -{
> -  EXCESS_PRECISION_DEFAULT,
> -  EXCESS_PRECISION_FAST,
> -  EXCESS_PRECISION_STANDARD
> -};
> -
>  /* The excess precision specified on the command line, or defaulted by
>    the front end.  */
>  extern enum excess_precision flag_excess_precision_cmdline;
> @@ -263,33 +187,8 @@ extern struct target_flag_state *this_ta
>  /* Nonzero if we dump in VCG format, not plain text.  */
>  extern int dump_for_graph;
>
> -/* Selection of the graph form.  */
> -enum graph_dump_types
> -{
> -  no_graph = 0,
> -  vcg
> -};
>  extern enum graph_dump_types graph_dump_format;
>
> -/* Type of stack check.  */
> -enum stack_check_type
> -{
> -  /* Do not check the stack.  */
> -  NO_STACK_CHECK = 0,
> -
> -  /* Check the stack generically, i.e. assume no specific support
> -     from the target configuration files.  */
> -  GENERIC_STACK_CHECK,
> -
> -  /* Check the stack and rely on the target configuration files to
> -     check the static frame of functions, i.e. use the generic
> -     mechanism only for dynamic stack allocations.  */
> -  STATIC_BUILTIN_STACK_CHECK,
> -
> -  /* Check the stack and entirely rely on the target configuration
> -     files, i.e. do not use the generic mechanism at all.  */
> -  FULL_BUILTIN_STACK_CHECK
> -};
>  extern enum stack_check_type flag_stack_check;
>
>  /* Returns TRUE if generated code should match ABI version N or
> @@ -326,38 +225,9 @@ extern bool flag_instrument_functions_ex
>  /* True if pointer types have undefined overflow.  */
>  #define POINTER_TYPE_OVERFLOW_UNDEFINED (flag_strict_overflow)
>
> -/* Names for the different levels of -Wstrict-overflow=N.  The numeric
> -   values here correspond to N.  */
> -
> -enum warn_strict_overflow_code
> -{
> -  /* Overflow warning that should be issued with -Wall: a questionable
> -     construct that is easy to avoid even when using macros.  Example:
> -     folding (x + CONSTANT > x) to 1.  */
> -  WARN_STRICT_OVERFLOW_ALL = 1,
> -  /* Overflow warning about folding a comparison to a constant because
> -     of undefined signed overflow, other than cases covered by
> -     WARN_STRICT_OVERFLOW_ALL.  Example: folding (abs (x) >= 0) to 1
> -     (this is false when x == INT_MIN).  */
> -  WARN_STRICT_OVERFLOW_CONDITIONAL = 2,
> -  /* Overflow warning about changes to comparisons other than folding
> -     them to a constant.  Example: folding (x + 1 > 1) to (x > 0).  */
> -  WARN_STRICT_OVERFLOW_COMPARISON = 3,
> -  /* Overflow warnings not covered by the above cases.  Example:
> -     folding ((x * 10) / 5) to (x * 2).  */
> -  WARN_STRICT_OVERFLOW_MISC = 4,
> -  /* Overflow warnings about reducing magnitude of constants in
> -     comparison.  Example: folding (x + 2 > y) to (x + 1 >= y).  */
> -  WARN_STRICT_OVERFLOW_MAGNITUDE = 5
> -};
> -
>  /* Whether to emit an overflow warning whose code is C.  */
>  #define issue_strict_overflow_warning(c) (warn_strict_overflow >= (int) (c))
>
>  #endif
>
> -/* This is included last because options may use types declared
> -   above.  */
> -#include "options.h"
> -
>  #endif /* ! GCC_FLAGS_H */
> Index: gcc/java/Make-lang.in
> ===================================================================
> --- gcc/java/Make-lang.in       (revision 165304)
> +++ gcc/java/Make-lang.in       (working copy)
> @@ -302,7 +302,7 @@ java/jvgenmain.o: java/jvgenmain.c $(CON
>   coretypes.h $(TM_H) intl.h
>  java/lang.o: java/lang.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h input.h \
>   toplev.h $(SYSTEM_H) coretypes.h $(TM_H) $(DIAGNOSTIC_H) \
> -  langhooks.h $(LANGHOOKS_DEF_H) gt-java-lang.h opts.h options.h \
> +  langhooks.h $(LANGHOOKS_DEF_H) gt-java-lang.h opts.h $(OPTIONS_H) \
>   $(TARGET_H)
>  java/mangle.o: java/mangle.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) $(SYSTEM_H) \
>   coretypes.h $(TM_H) toplev.h $(GGC_H) gt-java-mangle.h $(LANGHOOKS_DEF_H)
> Index: gcc/configure
> ===================================================================
> --- gcc/configure       (revision 165304)
> +++ gcc/configure       (working copy)
> @@ -10843,7 +10843,7 @@ tmake_file="${tmake_file_}"
>  out_object_file=`basename $out_file .c`.o
>
>  tm_file_list="options.h"
> -tm_include_list="flags.h insn-constants.h"
> +tm_include_list="options.h insn-constants.h"
>  for f in $tm_file; do
>   case $f in
>     ./* )
> Index: gcc/ada/gcc-interface/Make-lang.in
> ===================================================================
> --- gcc/ada/gcc-interface/Make-lang.in  (revision 165304)
> +++ gcc/ada/gcc-interface/Make-lang.in  (working copy)
> @@ -1234,7 +1234,7 @@ ada/decl.o : ada/gcc-interface/decl.c $(
>  ada/misc.o : ada/gcc-interface/misc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
>    $(TM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TARGET_H) $(FUNCTION_H) \
>    $(FLAGS_H) debug.h toplev.h langhooks.h \
> -   $(LANGHOOKS_DEF_H) opts.h options.h $(TREE_INLINE_H) $(PLUGIN_H) \
> +   $(LANGHOOKS_DEF_H) opts.h $(OPTIONS_H) $(TREE_INLINE_H) $(PLUGIN_H) \
>    ada/gcc-interface/ada.h ada/adadecode.h ada/types.h ada/atree.h \
>    ada/elists.h ada/namet.h ada/nlists.h ada/stringt.h ada/uintp.h ada/fe.h \
>    ada/sinfo.h ada/einfo.h $(ADA_TREE_H) ada/gcc-interface/gigi.h \
> Index: gcc/configure.ac
> ===================================================================
> --- gcc/configure.ac    (revision 165304)
> +++ gcc/configure.ac    (working copy)
> @@ -1609,7 +1609,7 @@ tmake_file="${tmake_file_}"
>  out_object_file=`basename $out_file .c`.o
>
>  tm_file_list="options.h"
> -tm_include_list="flags.h insn-constants.h"
> +tm_include_list="options.h insn-constants.h"
>  for f in $tm_file; do
>   case $f in
>     ./* )
> Index: gcc/flag-types.h
> ===================================================================
> --- gcc/flag-types.h    (revision 0)
> +++ gcc/flag-types.h    (revision 0)
> @@ -0,0 +1,155 @@
> +/* Compilation switch flag type definitions for GCC.
> +   Copyright (C) 1987, 1988, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002,
> +   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
> +   Free Software Foundation, Inc.
> +
> +This file is part of GCC.
> +
> +GCC is free software; you can redistribute it and/or modify it under
> +the terms of the GNU General Public License as published by the Free
> +Software Foundation; either version 3, or (at your option) any later
> +version.
> +
> +GCC is distributed in the hope that it will be useful, but WITHOUT ANY
> +WARRANTY; without even the implied warranty of MERCHANTABILITY or
> +FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
> +for more details.
> +
> +You should have received a copy of the GNU General Public License
> +along with GCC; see the file COPYING3.  If not see
> +<http://www.gnu.org/licenses/>.  */
> +
> +#ifndef GCC_FLAG_TYPES_H
> +#define GCC_FLAG_TYPES_H
> +
> +enum debug_info_type
> +{
> +  NO_DEBUG,        /* Write no debug info.  */
> +  DBX_DEBUG,       /* Write BSD .stabs for DBX (using dbxout.c).  */
> +  SDB_DEBUG,       /* Write COFF for (old) SDB (using sdbout.c).  */
> +  DWARF2_DEBUG,            /* Write Dwarf v2 debug info (using dwarf2out.c).  */
> +  XCOFF_DEBUG,     /* Write IBM/Xcoff debug info (using dbxout.c).  */
> +  VMS_DEBUG,        /* Write VMS debug info (using vmsdbgout.c).  */
> +  VMS_AND_DWARF2_DEBUG /* Write VMS debug info (using vmsdbgout.c).
> +                          and DWARF v2 debug info (using dwarf2out.c).  */
> +};
> +
> +enum debug_info_level
> +{
> +  DINFO_LEVEL_NONE,    /* Write no debugging info.  */
> +  DINFO_LEVEL_TERSE,   /* Write minimal info to support tracebacks only.  */
> +  DINFO_LEVEL_NORMAL,  /* Write info for all declarations (and line table).  */
> +  DINFO_LEVEL_VERBOSE  /* Write normal info plus #define/#undef info.  */
> +};
> +
> +/* A major contribution to object and executable size is debug
> +   information size.  A major contribution to debug information
> +   size is struct descriptions replicated in several object files.
> +   The following function determines whether or not debug information
> +   should be generated for a given struct.  The indirect parameter
> +   indicates that the struct is being handled indirectly, via
> +   a pointer.  See opts.c for the implementation. */
> +
> +enum debug_info_usage
> +{
> +  DINFO_USAGE_DFN,     /* A struct definition. */
> +  DINFO_USAGE_DIR_USE, /* A direct use, such as the type of a variable. */
> +  DINFO_USAGE_IND_USE, /* An indirect use, such as through a pointer. */
> +  DINFO_USAGE_NUM_ENUMS        /* The number of enumerators. */
> +};
> +
> +/* Enumerate visibility settings.  This is deliberately ordered from most
> +   to least visibility.  */
> +#ifndef SYMBOL_VISIBILITY_DEFINED
> +#define SYMBOL_VISIBILITY_DEFINED
> +enum symbol_visibility
> +{
> +  VISIBILITY_DEFAULT,
> +  VISIBILITY_PROTECTED,
> +  VISIBILITY_HIDDEN,
> +  VISIBILITY_INTERNAL
> +};
> +#endif
> +
> +struct visibility_flags
> +{
> +  unsigned inpragma : 1;       /* True when in #pragma GCC visibility.  */
> +  unsigned inlines_hidden : 1; /* True when -finlineshidden in effect.  */
> +};
> +
> +/* The algorithm used for the integrated register allocator (IRA).  */
> +enum ira_algorithm
> +{
> +  IRA_ALGORITHM_CB,
> +  IRA_ALGORITHM_PRIORITY
> +};
> +
> +/* The regions used for the integrated register allocator (IRA).  */
> +enum ira_region
> +{
> +  IRA_REGION_ONE,
> +  IRA_REGION_ALL,
> +  IRA_REGION_MIXED
> +};
> +
> +/* The options for excess precision.  */
> +enum excess_precision
> +{
> +  EXCESS_PRECISION_DEFAULT,
> +  EXCESS_PRECISION_FAST,
> +  EXCESS_PRECISION_STANDARD
> +};
> +
> +/* Selection of the graph form.  */
> +enum graph_dump_types
> +{
> +  no_graph = 0,
> +  vcg
> +};
> +
> +/* Type of stack check.  */
> +enum stack_check_type
> +{
> +  /* Do not check the stack.  */
> +  NO_STACK_CHECK = 0,
> +
> +  /* Check the stack generically, i.e. assume no specific support
> +     from the target configuration files.  */
> +  GENERIC_STACK_CHECK,
> +
> +  /* Check the stack and rely on the target configuration files to
> +     check the static frame of functions, i.e. use the generic
> +     mechanism only for dynamic stack allocations.  */
> +  STATIC_BUILTIN_STACK_CHECK,
> +
> +  /* Check the stack and entirely rely on the target configuration
> +     files, i.e. do not use the generic mechanism at all.  */
> +  FULL_BUILTIN_STACK_CHECK
> +};
> +
> +/* Names for the different levels of -Wstrict-overflow=N.  The numeric
> +   values here correspond to N.  */
> +
> +enum warn_strict_overflow_code
> +{
> +  /* Overflow warning that should be issued with -Wall: a questionable
> +     construct that is easy to avoid even when using macros.  Example:
> +     folding (x + CONSTANT > x) to 1.  */
> +  WARN_STRICT_OVERFLOW_ALL = 1,
> +  /* Overflow warning about folding a comparison to a constant because
> +     of undefined signed overflow, other than cases covered by
> +     WARN_STRICT_OVERFLOW_ALL.  Example: folding (abs (x) >= 0) to 1
> +     (this is false when x == INT_MIN).  */
> +  WARN_STRICT_OVERFLOW_CONDITIONAL = 2,
> +  /* Overflow warning about changes to comparisons other than folding
> +     them to a constant.  Example: folding (x + 1 > 1) to (x > 0).  */
> +  WARN_STRICT_OVERFLOW_COMPARISON = 3,
> +  /* Overflow warnings not covered by the above cases.  Example:
> +     folding ((x * 10) / 5) to (x * 2).  */
> +  WARN_STRICT_OVERFLOW_MISC = 4,
> +  /* Overflow warnings about reducing magnitude of constants in
> +     comparison.  Example: folding (x + 2 > y) to (x + 1 >= y).  */
> +  WARN_STRICT_OVERFLOW_MAGNITUDE = 5
> +};
> +
> +#endif /* ! GCC_FLAG_TYPES_H */
> Index: gcc/opth-gen.awk
> ===================================================================
> --- gcc/opth-gen.awk    (revision 165304)
> +++ gcc/opth-gen.awk    (working copy)
> @@ -70,6 +70,8 @@ print ""
>  print "#ifndef OPTIONS_H"
>  print "#define OPTIONS_H"
>  print ""
> +print "#include \"flag-types.h\""
> +print ""
>
>  have_save = 0;
>
> Index: gcc/Makefile.in
> ===================================================================
> --- gcc/Makefile.in     (revision 165304)
> +++ gcc/Makefile.in     (working copy)
> @@ -823,7 +823,7 @@ CONFIG_H  = config.h  $(host_xm_file_lis
>  TCONFIG_H = tconfig.h $(xm_file_list)
>  TM_P_H    = tm_p.h    $(tm_p_file_list)
>  GTM_H     = tm.h      $(tm_file_list) insn-constants.h
> -TM_H      = $(GTM_H) insn-flags.h $(FLAGS_H)
> +TM_H      = $(GTM_H) insn-flags.h $(OPTIONS_H)
>
>  # Variables for version information.
>  BASEVER     := $(srcdir)/BASE-VER  # 4.x.y
> @@ -897,7 +897,8 @@ DEMANGLE_H = $(srcdir)/../include/demang
>  RECOG_H = recog.h
>  ALIAS_H = alias.h coretypes.h
>  EMIT_RTL_H = emit-rtl.h
> -FLAGS_H = flags.h coretypes.h options.h
> +FLAGS_H = flags.h coretypes.h flag-types.h $(OPTIONS_H)
> +OPTIONS_H = options.h flag-types.h
>  FUNCTION_H = function.h $(TREE_H) $(HASHTAB_H) vecprim.h $(TM_H)
>  EXPR_H = expr.h insn-config.h $(FUNCTION_H) $(RTL_H) $(FLAGS_H) $(TREE_H) $(MACHMODE_H) $(EMIT_RTL_H)
>  OPTABS_H = optabs.h insn-codes.h
> @@ -2123,7 +2124,7 @@ c-family/c-omp.o : c-family/c-omp.c $(CO
>  c-family/c-opts.o : c-family/c-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
>         $(TREE_H) $(C_PRAGMA_H) $(FLAGS_H) $(TOPLEV_H) langhooks.h \
>         $(DIAGNOSTIC_H) intl.h debug.h $(C_COMMON_H)   \
> -        opts.h options.h $(MKDEPS_H) incpath.h cppdefault.h
> +        opts.h $(OPTIONS_H) $(MKDEPS_H) incpath.h cppdefault.h
>        $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
>                $< $(OUTPUT_OPTION) @TARGET_SYSTEM_ROOT_DEFINE@
>
> @@ -2324,7 +2325,7 @@ lto-symtab.o: lto-symtab.c $(CONFIG_H) $
>    toplev.h $(TREE_H) $(GIMPLE_H) $(GGC_H) $(LAMBDA_H) $(HASHTAB_H) \
>    $(LTO_STREAMER_H) $(LINKER_PLUGIN_API_H) gt-lto-symtab.h
>  lto-opts.o: lto-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
> -   $(HASHTAB_H) $(GGC_H) $(BITMAP_H) $(FLAGS_H) opts.h options.h \
> +   $(HASHTAB_H) $(GGC_H) $(BITMAP_H) $(FLAGS_H) opts.h $(OPTIONS_H) \
>    $(TARGET_H) $(TOPLEV_H) $(DIAGNOSTIC_H) $(LTO_STREAMER_H)
>  lto-streamer.o: lto-streamer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h   \
>    $(TM_H) $(TREE_H) $(GIMPLE_H) $(BITMAP_H) $(LTO_STREAMER_H) $(FLAGS_H) \
> @@ -2816,7 +2817,7 @@ fold-const.o : fold-const.c $(CONFIG_H)
>    $(GIMPLE_H) realmpfr.h $(TREE_FLOW_H)
>  diagnostic.o : diagnostic.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
>    version.h $(INPUT_H) intl.h $(DIAGNOSTIC_H) diagnostic.def
> -opts.o : opts.c opts.h options.h $(TOPLEV_H) $(DIAGNOSTIC_CORE_H) $(CONFIG_H) $(SYSTEM_H) \
> +opts.o : opts.c opts.h $(OPTIONS_H) $(TOPLEV_H) $(DIAGNOSTIC_CORE_H) $(CONFIG_H) $(SYSTEM_H) \
>    coretypes.h $(TREE_H) $(TM_H) langhooks.h $(GGC_H) $(EXPR_H) $(RTL_H) \
>    output.h $(DIAGNOSTIC_H) $(TM_P_H) $(INSN_ATTR_H) intl.h $(TARGET_H) \
>    $(FLAGS_H) $(PARAMS_H) $(TREE_PASS_H) $(DBGCNT_H) debug.h \
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
>
diff mbox

Patch

Index: gcc/flags.h
===================================================================
--- gcc/flags.h	(revision 165304)
+++ gcc/flags.h	(working copy)
@@ -23,54 +23,20 @@  along with GCC; see the file COPYING3.  
 #define GCC_FLAGS_H
 
 #include "coretypes.h"
+#include "flag-types.h"
+#include "options.h"
 
 #if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) && !defined(IN_RTS)
 
-enum debug_info_type
-{
-  NO_DEBUG,	    /* Write no debug info.  */
-  DBX_DEBUG,	    /* Write BSD .stabs for DBX (using dbxout.c).  */
-  SDB_DEBUG,	    /* Write COFF for (old) SDB (using sdbout.c).  */
-  DWARF2_DEBUG,	    /* Write Dwarf v2 debug info (using dwarf2out.c).  */
-  XCOFF_DEBUG,	    /* Write IBM/Xcoff debug info (using dbxout.c).  */
-  VMS_DEBUG,        /* Write VMS debug info (using vmsdbgout.c).  */
-  VMS_AND_DWARF2_DEBUG /* Write VMS debug info (using vmsdbgout.c).
-                          and DWARF v2 debug info (using dwarf2out.c).  */
-};
-
 /* Specify which kind of debugging info to generate.  */
 extern enum debug_info_type write_symbols;
 
 /* Names of debug_info_type, for error messages.  */
 extern const char *const debug_type_names[];
 
-enum debug_info_level
-{
-  DINFO_LEVEL_NONE,	/* Write no debugging info.  */
-  DINFO_LEVEL_TERSE,	/* Write minimal info to support tracebacks only.  */
-  DINFO_LEVEL_NORMAL,	/* Write info for all declarations (and line table).  */
-  DINFO_LEVEL_VERBOSE	/* Write normal info plus #define/#undef info.  */
-};
-
 /* Specify how much debugging info to generate.  */
 extern enum debug_info_level debug_info_level;
 
-/* A major contribution to object and executable size is debug
-   information size.  A major contribution to debug information
-   size is struct descriptions replicated in several object files.
-   The following function determines whether or not debug information
-   should be generated for a given struct.  The indirect parameter
-   indicates that the struct is being handled indirectly, via
-   a pointer.  See opts.c for the implementation. */
-
-enum debug_info_usage
-{
-  DINFO_USAGE_DFN,	/* A struct definition. */
-  DINFO_USAGE_DIR_USE,	/* A direct use, such as the type of a variable. */
-  DINFO_USAGE_IND_USE,	/* An indirect use, such as through a pointer. */
-  DINFO_USAGE_NUM_ENUMS	/* The number of enumerators. */
-};
-
 extern bool should_emit_struct_debug (tree type_decl, enum debug_info_usage);
 extern void set_struct_debug_option (const char *value);
 
@@ -83,28 +49,9 @@  extern bool use_gnu_debug_info_extension
    an actual variable not a macro.  */
 extern int flag_compare_debug;
 
-/* Enumerate visibility settings.  This is deliberately ordered from most
-   to least visibility.  */
-#ifndef SYMBOL_VISIBILITY_DEFINED
-#define SYMBOL_VISIBILITY_DEFINED
-enum symbol_visibility
-{
-  VISIBILITY_DEFAULT,
-  VISIBILITY_PROTECTED,
-  VISIBILITY_HIDDEN,
-  VISIBILITY_INTERNAL
-};
-#endif
-
 /* The default visibility for all symbols (unless overridden).  */
 extern enum symbol_visibility default_visibility;
 
-struct visibility_flags
-{
-  unsigned inpragma : 1;	/* True when in #pragma GCC visibility.  */
-  unsigned inlines_hidden : 1;	/* True when -finlineshidden in effect.  */
-};
-
 /* Global visibility options.  */
 extern struct visibility_flags visibility_options;
 
@@ -189,29 +136,6 @@  extern int flag_next_runtime;
 
 extern int flag_dump_rtl_in_asm;
 
-/* The algorithm used for the integrated register allocator (IRA).  */
-enum ira_algorithm
-{
-  IRA_ALGORITHM_CB,
-  IRA_ALGORITHM_PRIORITY
-};
-
-/* The regions used for the integrated register allocator (IRA).  */
-enum ira_region
-{
-  IRA_REGION_ONE,
-  IRA_REGION_ALL,
-  IRA_REGION_MIXED
-};
-
-/* The options for excess precision.  */
-enum excess_precision
-{
-  EXCESS_PRECISION_DEFAULT,
-  EXCESS_PRECISION_FAST,
-  EXCESS_PRECISION_STANDARD
-};
-
 /* The excess precision specified on the command line, or defaulted by
    the front end.  */
 extern enum excess_precision flag_excess_precision_cmdline;
@@ -263,33 +187,8 @@  extern struct target_flag_state *this_ta
 /* Nonzero if we dump in VCG format, not plain text.  */
 extern int dump_for_graph;
 
-/* Selection of the graph form.  */
-enum graph_dump_types
-{
-  no_graph = 0,
-  vcg
-};
 extern enum graph_dump_types graph_dump_format;
 
-/* Type of stack check.  */
-enum stack_check_type
-{
-  /* Do not check the stack.  */
-  NO_STACK_CHECK = 0,
-
-  /* Check the stack generically, i.e. assume no specific support
-     from the target configuration files.  */
-  GENERIC_STACK_CHECK,
-
-  /* Check the stack and rely on the target configuration files to
-     check the static frame of functions, i.e. use the generic
-     mechanism only for dynamic stack allocations.  */
-  STATIC_BUILTIN_STACK_CHECK,
-
-  /* Check the stack and entirely rely on the target configuration
-     files, i.e. do not use the generic mechanism at all.  */
-  FULL_BUILTIN_STACK_CHECK
-};
 extern enum stack_check_type flag_stack_check;
 
 /* Returns TRUE if generated code should match ABI version N or
@@ -326,38 +225,9 @@  extern bool flag_instrument_functions_ex
 /* True if pointer types have undefined overflow.  */
 #define POINTER_TYPE_OVERFLOW_UNDEFINED (flag_strict_overflow)
 
-/* Names for the different levels of -Wstrict-overflow=N.  The numeric
-   values here correspond to N.  */
-
-enum warn_strict_overflow_code
-{
-  /* Overflow warning that should be issued with -Wall: a questionable
-     construct that is easy to avoid even when using macros.  Example:
-     folding (x + CONSTANT > x) to 1.  */
-  WARN_STRICT_OVERFLOW_ALL = 1,
-  /* Overflow warning about folding a comparison to a constant because
-     of undefined signed overflow, other than cases covered by
-     WARN_STRICT_OVERFLOW_ALL.  Example: folding (abs (x) >= 0) to 1
-     (this is false when x == INT_MIN).  */
-  WARN_STRICT_OVERFLOW_CONDITIONAL = 2,
-  /* Overflow warning about changes to comparisons other than folding
-     them to a constant.  Example: folding (x + 1 > 1) to (x > 0).  */
-  WARN_STRICT_OVERFLOW_COMPARISON = 3,
-  /* Overflow warnings not covered by the above cases.  Example:
-     folding ((x * 10) / 5) to (x * 2).  */
-  WARN_STRICT_OVERFLOW_MISC = 4,
-  /* Overflow warnings about reducing magnitude of constants in
-     comparison.  Example: folding (x + 2 > y) to (x + 1 >= y).  */
-  WARN_STRICT_OVERFLOW_MAGNITUDE = 5
-};
-
 /* Whether to emit an overflow warning whose code is C.  */
 #define issue_strict_overflow_warning(c) (warn_strict_overflow >= (int) (c))
 
 #endif
 
-/* This is included last because options may use types declared
-   above.  */
-#include "options.h"
-
 #endif /* ! GCC_FLAGS_H */
Index: gcc/java/Make-lang.in
===================================================================
--- gcc/java/Make-lang.in	(revision 165304)
+++ gcc/java/Make-lang.in	(working copy)
@@ -302,7 +302,7 @@  java/jvgenmain.o: java/jvgenmain.c $(CON
   coretypes.h $(TM_H) intl.h
 java/lang.o: java/lang.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h input.h \
   toplev.h $(SYSTEM_H) coretypes.h $(TM_H) $(DIAGNOSTIC_H) \
-  langhooks.h $(LANGHOOKS_DEF_H) gt-java-lang.h opts.h options.h \
+  langhooks.h $(LANGHOOKS_DEF_H) gt-java-lang.h opts.h $(OPTIONS_H) \
   $(TARGET_H)
 java/mangle.o: java/mangle.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) $(SYSTEM_H) \
   coretypes.h $(TM_H) toplev.h $(GGC_H) gt-java-mangle.h $(LANGHOOKS_DEF_H)
Index: gcc/configure
===================================================================
--- gcc/configure	(revision 165304)
+++ gcc/configure	(working copy)
@@ -10843,7 +10843,7 @@  tmake_file="${tmake_file_}"
 out_object_file=`basename $out_file .c`.o
 
 tm_file_list="options.h"
-tm_include_list="flags.h insn-constants.h"
+tm_include_list="options.h insn-constants.h"
 for f in $tm_file; do
   case $f in
     ./* )
Index: gcc/ada/gcc-interface/Make-lang.in
===================================================================
--- gcc/ada/gcc-interface/Make-lang.in	(revision 165304)
+++ gcc/ada/gcc-interface/Make-lang.in	(working copy)
@@ -1234,7 +1234,7 @@  ada/decl.o : ada/gcc-interface/decl.c $(
 ada/misc.o : ada/gcc-interface/misc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TARGET_H) $(FUNCTION_H) \
    $(FLAGS_H) debug.h toplev.h langhooks.h \
-   $(LANGHOOKS_DEF_H) opts.h options.h $(TREE_INLINE_H) $(PLUGIN_H) \
+   $(LANGHOOKS_DEF_H) opts.h $(OPTIONS_H) $(TREE_INLINE_H) $(PLUGIN_H) \
    ada/gcc-interface/ada.h ada/adadecode.h ada/types.h ada/atree.h \
    ada/elists.h ada/namet.h ada/nlists.h ada/stringt.h ada/uintp.h ada/fe.h \
    ada/sinfo.h ada/einfo.h $(ADA_TREE_H) ada/gcc-interface/gigi.h \
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac	(revision 165304)
+++ gcc/configure.ac	(working copy)
@@ -1609,7 +1609,7 @@  tmake_file="${tmake_file_}"
 out_object_file=`basename $out_file .c`.o
 
 tm_file_list="options.h"
-tm_include_list="flags.h insn-constants.h"
+tm_include_list="options.h insn-constants.h"
 for f in $tm_file; do
   case $f in
     ./* )
Index: gcc/flag-types.h
===================================================================
--- gcc/flag-types.h	(revision 0)
+++ gcc/flag-types.h	(revision 0)
@@ -0,0 +1,155 @@ 
+/* Compilation switch flag type definitions for GCC.
+   Copyright (C) 1987, 1988, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002,
+   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
+#ifndef GCC_FLAG_TYPES_H
+#define GCC_FLAG_TYPES_H
+
+enum debug_info_type
+{
+  NO_DEBUG,	    /* Write no debug info.  */
+  DBX_DEBUG,	    /* Write BSD .stabs for DBX (using dbxout.c).  */
+  SDB_DEBUG,	    /* Write COFF for (old) SDB (using sdbout.c).  */
+  DWARF2_DEBUG,	    /* Write Dwarf v2 debug info (using dwarf2out.c).  */
+  XCOFF_DEBUG,	    /* Write IBM/Xcoff debug info (using dbxout.c).  */
+  VMS_DEBUG,        /* Write VMS debug info (using vmsdbgout.c).  */
+  VMS_AND_DWARF2_DEBUG /* Write VMS debug info (using vmsdbgout.c).
+                          and DWARF v2 debug info (using dwarf2out.c).  */
+};
+
+enum debug_info_level
+{
+  DINFO_LEVEL_NONE,	/* Write no debugging info.  */
+  DINFO_LEVEL_TERSE,	/* Write minimal info to support tracebacks only.  */
+  DINFO_LEVEL_NORMAL,	/* Write info for all declarations (and line table).  */
+  DINFO_LEVEL_VERBOSE	/* Write normal info plus #define/#undef info.  */
+};
+
+/* A major contribution to object and executable size is debug
+   information size.  A major contribution to debug information
+   size is struct descriptions replicated in several object files.
+   The following function determines whether or not debug information
+   should be generated for a given struct.  The indirect parameter
+   indicates that the struct is being handled indirectly, via
+   a pointer.  See opts.c for the implementation. */
+
+enum debug_info_usage
+{
+  DINFO_USAGE_DFN,	/* A struct definition. */
+  DINFO_USAGE_DIR_USE,	/* A direct use, such as the type of a variable. */
+  DINFO_USAGE_IND_USE,	/* An indirect use, such as through a pointer. */
+  DINFO_USAGE_NUM_ENUMS	/* The number of enumerators. */
+};
+
+/* Enumerate visibility settings.  This is deliberately ordered from most
+   to least visibility.  */
+#ifndef SYMBOL_VISIBILITY_DEFINED
+#define SYMBOL_VISIBILITY_DEFINED
+enum symbol_visibility
+{
+  VISIBILITY_DEFAULT,
+  VISIBILITY_PROTECTED,
+  VISIBILITY_HIDDEN,
+  VISIBILITY_INTERNAL
+};
+#endif
+
+struct visibility_flags
+{
+  unsigned inpragma : 1;	/* True when in #pragma GCC visibility.  */
+  unsigned inlines_hidden : 1;	/* True when -finlineshidden in effect.  */
+};
+
+/* The algorithm used for the integrated register allocator (IRA).  */
+enum ira_algorithm
+{
+  IRA_ALGORITHM_CB,
+  IRA_ALGORITHM_PRIORITY
+};
+
+/* The regions used for the integrated register allocator (IRA).  */
+enum ira_region
+{
+  IRA_REGION_ONE,
+  IRA_REGION_ALL,
+  IRA_REGION_MIXED
+};
+
+/* The options for excess precision.  */
+enum excess_precision
+{
+  EXCESS_PRECISION_DEFAULT,
+  EXCESS_PRECISION_FAST,
+  EXCESS_PRECISION_STANDARD
+};
+
+/* Selection of the graph form.  */
+enum graph_dump_types
+{
+  no_graph = 0,
+  vcg
+};
+
+/* Type of stack check.  */
+enum stack_check_type
+{
+  /* Do not check the stack.  */
+  NO_STACK_CHECK = 0,
+
+  /* Check the stack generically, i.e. assume no specific support
+     from the target configuration files.  */
+  GENERIC_STACK_CHECK,
+
+  /* Check the stack and rely on the target configuration files to
+     check the static frame of functions, i.e. use the generic
+     mechanism only for dynamic stack allocations.  */
+  STATIC_BUILTIN_STACK_CHECK,
+
+  /* Check the stack and entirely rely on the target configuration
+     files, i.e. do not use the generic mechanism at all.  */
+  FULL_BUILTIN_STACK_CHECK
+};
+
+/* Names for the different levels of -Wstrict-overflow=N.  The numeric
+   values here correspond to N.  */
+
+enum warn_strict_overflow_code
+{
+  /* Overflow warning that should be issued with -Wall: a questionable
+     construct that is easy to avoid even when using macros.  Example:
+     folding (x + CONSTANT > x) to 1.  */
+  WARN_STRICT_OVERFLOW_ALL = 1,
+  /* Overflow warning about folding a comparison to a constant because
+     of undefined signed overflow, other than cases covered by
+     WARN_STRICT_OVERFLOW_ALL.  Example: folding (abs (x) >= 0) to 1
+     (this is false when x == INT_MIN).  */
+  WARN_STRICT_OVERFLOW_CONDITIONAL = 2,
+  /* Overflow warning about changes to comparisons other than folding
+     them to a constant.  Example: folding (x + 1 > 1) to (x > 0).  */
+  WARN_STRICT_OVERFLOW_COMPARISON = 3,
+  /* Overflow warnings not covered by the above cases.  Example:
+     folding ((x * 10) / 5) to (x * 2).  */
+  WARN_STRICT_OVERFLOW_MISC = 4,
+  /* Overflow warnings about reducing magnitude of constants in
+     comparison.  Example: folding (x + 2 > y) to (x + 1 >= y).  */
+  WARN_STRICT_OVERFLOW_MAGNITUDE = 5
+};
+
+#endif /* ! GCC_FLAG_TYPES_H */
Index: gcc/opth-gen.awk
===================================================================
--- gcc/opth-gen.awk	(revision 165304)
+++ gcc/opth-gen.awk	(working copy)
@@ -70,6 +70,8 @@  print ""
 print "#ifndef OPTIONS_H"
 print "#define OPTIONS_H"
 print ""
+print "#include \"flag-types.h\""
+print ""
 
 have_save = 0;
 
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in	(revision 165304)
+++ gcc/Makefile.in	(working copy)
@@ -823,7 +823,7 @@  CONFIG_H  = config.h  $(host_xm_file_lis
 TCONFIG_H = tconfig.h $(xm_file_list)
 TM_P_H    = tm_p.h    $(tm_p_file_list)
 GTM_H     = tm.h      $(tm_file_list) insn-constants.h
-TM_H      = $(GTM_H) insn-flags.h $(FLAGS_H)
+TM_H      = $(GTM_H) insn-flags.h $(OPTIONS_H)
 
 # Variables for version information.
 BASEVER     := $(srcdir)/BASE-VER  # 4.x.y
@@ -897,7 +897,8 @@  DEMANGLE_H = $(srcdir)/../include/demang
 RECOG_H = recog.h
 ALIAS_H = alias.h coretypes.h
 EMIT_RTL_H = emit-rtl.h
-FLAGS_H = flags.h coretypes.h options.h
+FLAGS_H = flags.h coretypes.h flag-types.h $(OPTIONS_H)
+OPTIONS_H = options.h flag-types.h
 FUNCTION_H = function.h $(TREE_H) $(HASHTAB_H) vecprim.h $(TM_H)
 EXPR_H = expr.h insn-config.h $(FUNCTION_H) $(RTL_H) $(FLAGS_H) $(TREE_H) $(MACHMODE_H) $(EMIT_RTL_H)
 OPTABS_H = optabs.h insn-codes.h
@@ -2123,7 +2124,7 @@  c-family/c-omp.o : c-family/c-omp.c $(CO
 c-family/c-opts.o : c-family/c-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
         $(TREE_H) $(C_PRAGMA_H) $(FLAGS_H) $(TOPLEV_H) langhooks.h \
         $(DIAGNOSTIC_H) intl.h debug.h $(C_COMMON_H)	\
-        opts.h options.h $(MKDEPS_H) incpath.h cppdefault.h
+        opts.h $(OPTIONS_H) $(MKDEPS_H) incpath.h cppdefault.h
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
 		$< $(OUTPUT_OPTION) @TARGET_SYSTEM_ROOT_DEFINE@
 
@@ -2324,7 +2325,7 @@  lto-symtab.o: lto-symtab.c $(CONFIG_H) $
    toplev.h $(TREE_H) $(GIMPLE_H) $(GGC_H) $(LAMBDA_H) $(HASHTAB_H) \
    $(LTO_STREAMER_H) $(LINKER_PLUGIN_API_H) gt-lto-symtab.h
 lto-opts.o: lto-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
-   $(HASHTAB_H) $(GGC_H) $(BITMAP_H) $(FLAGS_H) opts.h options.h \
+   $(HASHTAB_H) $(GGC_H) $(BITMAP_H) $(FLAGS_H) opts.h $(OPTIONS_H) \
    $(TARGET_H) $(TOPLEV_H) $(DIAGNOSTIC_H) $(LTO_STREAMER_H)
 lto-streamer.o: lto-streamer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h   \
    $(TM_H) $(TREE_H) $(GIMPLE_H) $(BITMAP_H) $(LTO_STREAMER_H) $(FLAGS_H) \
@@ -2816,7 +2817,7 @@  fold-const.o : fold-const.c $(CONFIG_H) 
    $(GIMPLE_H) realmpfr.h $(TREE_FLOW_H)
 diagnostic.o : diagnostic.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    version.h $(INPUT_H) intl.h $(DIAGNOSTIC_H) diagnostic.def
-opts.o : opts.c opts.h options.h $(TOPLEV_H) $(DIAGNOSTIC_CORE_H) $(CONFIG_H) $(SYSTEM_H) \
+opts.o : opts.c opts.h $(OPTIONS_H) $(TOPLEV_H) $(DIAGNOSTIC_CORE_H) $(CONFIG_H) $(SYSTEM_H) \
    coretypes.h $(TREE_H) $(TM_H) langhooks.h $(GGC_H) $(EXPR_H) $(RTL_H) \
    output.h $(DIAGNOSTIC_H) $(TM_P_H) $(INSN_ATTR_H) intl.h $(TARGET_H) \
    $(FLAGS_H) $(PARAMS_H) $(TREE_PASS_H) $(DBGCNT_H) debug.h \