diff mbox

Complete OVERRIDE_OPTIONS hook conversion

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

Commit Message

Joseph Myers Sept. 14, 2010, 1:01 p.m. UTC
This patch completes the conversion of OVERRIDE_OPTIONS to a target
hook, converting all previously unconverted targets, updating some
comments in previously converted targets and target-independent code
and poisoning the old target macro.

In general I renamed targets' functions implementing the macro to
follow the ${target}_option_override pattern used for already
converted targets, but did not do anything about the naming of
SUBTARGET_OVERRIDE_OPTIONS macros or associated functions.  The
functions vary in how much they relate to options and how much they
are general initialization functions; subsequent changes are expected
to split the two, with a pure-options hook being shared with the
driver.

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.  Also
tested building cc1 (or at least the relevant .o file in cc1, where a
complete cc1 build was broken for other reasons) for the following
targets, intended to cover all cases of SUBTARGET_OVERRIDE_OPTIONS
etc.: alpha-linux-gnu alpha-dec-vms arc-elf arm-eabi arm-wrs-vxworks
bfin-elf cris-elf frv-elf h8300-elf i686-cygwin i686-darwin
i686-pc-msdosdjgpp i686-interix3 i686-netware i686-solaris2.10
i686-wrs-vxworks ia64-linux-gnu iq2000-elf lm32-elf m32r-elf
m68hc11-elf m68k-elf mcore-elf mep-elf mmix-knuth-mmixware mn10300-elf
moxie-elf picochip-none powerpc-eabi powerpc-ibm-aix4.3
powerpc-ibm-aix5.1.0 powerpc-ibm-aix5.2.0 powerpc-ibm-aix5.3.0
powerpc-ibm-aix6.1 powerpc-darwin powerpc-eabispe
(--enable-e500-double) powerpc-eabialtivec powerpc64-linux-gnu
powerpc-linux-gnualtivec powerpc-linux-gnuspe powerpc-wrs-vxworks
s390-linux-gnu score-elf sh-elf sparc-elf sparc-wrs-vxworks
vax-linux-gnu vax-netbsd xtensa-elf.  OK to commit?

In general I watched for any warnings or errors building the relevant
.o file that would indicate an issue with this patch, and did not see
such warnings or errors for any target.  There are of course various
unrelated pre-existing warnings for various targets.  I also saw
errors building compilers for AIX 4.3/5.1/5.2 of the form:

rs6000.c: In function 'rs6000_expand_ternop_builtin':
rs6000.c:10930: error: duplicate case value
rs6000.c:10929: error: previously used here

coming from code

    case CODE_FOR_altivec_vsldoi_v4sf:
    case CODE_FOR_altivec_vsldoi_v4si:
    case CODE_FOR_altivec_vsldoi_v8hi:
    case CODE_FOR_altivec_vsldoi_v16qi:

where all those values are defined to CODE_FOR_nothing (TARGET_ALTIVEC
is hardcoded to 0 in the relevant .h files).  I don't know why those
should appear when building a cross-compiler when gcc-testresults
shows that people have been successfully building native compilers for
these targets since that code came in.

2010-09-14  Joseph Myers  <joseph@codesourcery.com>

	* doc/tm.texi.in (OVERRIDE_OPTIONS): Remove documentation.
	(C_COMMON_OVERRIDE_OPTIONS): Don't refer to OVERRIDE_OPTIONS.
	* doc/tm.texi: Regenerate.
	* system.h (OVERRIDE_OPTIONS): Poison.
	* target.def (override): Default to hook_void_void.
	* targhooks.c (default_target_option_override): Remove.
	* genmodes.c, machmode.def: Update comments mentioning
	OVERRIDE_OPTIONS.
	* config/alpha/alpha-modes.def: Update comment mentioning
	alpha_override_options.
	* config/alpha/alpha-protos.h (override_options): Remove.
	* config/alpha/alpha.c (override_options): Rename to
	alpha_option_override.  Call SUBTARGET_OVERRIDE_OPTIONS.  Make
	static.
	(TARGET_OPTION_OVERRIDE): Define.
	* config/alpha/alpha.h (OVERRIDE_OPTIONS): Remove.
	* config/alpha/vms.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead
	of OVERRIDE_OPTIONS.
	* config/arc/arc-protos.h (arc_init): Remove.
	* config/arc/arc.c (TARGET_OPTION_OVERRIDE): Define.
	(arc_init): Rename to arc_option_override.  Make static.
	* config/arc/arc.h (ARC_EXTENSION_CPU): Correct comment.
	(OVERRIDE_OPTIONS): Remove.
	* config/arm/arm-protos.h (arm_override_options): Remove.
	* config/arm/arm.c (TARGET_OPTION_OVERRIDE): Define.
	(arm_override_options): Rename to arm_option_override.  Make
	static.  Call SUBTARGET_OVERRIDE_OPTIONS.
	* config/arm/arm.h (OVERRIDE_OPTIONS): Remove.
	* config/arm/arm.md: Update comment referring to
	arm_override_options.
	* config/arm/vxworks.h (SUBTARGET_OVERRIDE_OPTIONS): Define
	instead of OVERRIDE_OPTIONS.
	* config/avr/avr-protos.h (avr_override_options): Remove.
	* config/avr/avr.c (TARGET_OPTION_OVERRIDE): Define.
	(avr_override_options): Rename to avr_option_override.  Make
	static.
	* config/avr/avr.h (OVERRIDE_OPTIONS): Remove.
	* config/bfin/bfin-protos.h (override_options): Remove (twice).
	* config/bfin/bfin.c (override_options): Rename to
	bfin_option_override.  Make static.
	(TARGET_OPTION_OVERRIDE): Define.
	* config/bfin/bfin.h (OVERRIDE_OPTIONS): Remove.
	* config/cris/cris-protos.h (cris_override_options): Remove.
	* config/cris/cris.c (TARGET_OPTION_OVERRIDE): Define.
	(cris_override_options): Rename to cris_option_override.  Make
	static.
	* config/cris/cris.h (OVERRIDE_OPTIONS): Remove.
	* config/frv/frv-protos.h (frv_override_options): Remove.
	* config/frv/frv.c (TARGET_OPTION_OVERRIDE): Define.
	(frv_override_options): Rename to frv_option_override.  Make
	static.
	* config/frv/frv.h (OVERRIDE_OPTIONS): Remove.
	* config/h8300/h8300-protos.h (h8300_init_once): Remove.
	* config/h8300/h8300.c (h8300_init_once): Rename to
	h8300_option_override.  Make static.
	(TARGET_OPTION_OVERRIDE): Define.
	* config/h8300/h8300.h (OVERRIDE_OPTIONS): Remove.
	* config/i386/i386-protos.h (override_options): Remove.
	* config/i386/i386.c (override_options): Rename to
	ix86_option_override_internal.  Make static.  Comments referring
	to this function and callers changed.
	(ix86_option_override): New.
	(TARGET_OPTION_OVERRIDE): Define.
	* config/i386/i386.h (OVERRIDE_OPTION): Remove.
	* config/i386/linux64.h (DEFAULT_PCC_STRUCT_RETURN): Update
	comment.
	* config/ia64/ia64.c (ia64_file_start): Update comment referring
	to ia64_override_options.
	* config/iq2000/iq2000-protos.h (override_options): Remove.
	* config/iq2000/iq2000.c (TARGET_OPTION_OVERRIDE): Define.
	(override_options): Rename to iq2000_option_override.  Make
	static.
	* config/iq2000/iq2000.h (OVERRIDE_OPTIONS): Remove.
	* config/lm32/lm32-protos.h (lm32_override_options): Remove.
	* config/lm32/lm32.c (TARGET_OPTION_OVERRIDE): Define.
	(lm32_override_options): Rename to lm32_option_override.  Make
	static.
	* config/lm32/lm32.h (OVERRIDE_OPTIONS): Remove.
	* config/m32r/m32r.c (TARGET_OPTION_OVERRIDE): Define.
	(m32r_option_override): New.
	(m32r_init): Update comment.
	* config/m32r/m32r.h (OVERRIDE_OPTIONS): Remove.
	* config/m68hc11/m68hc11-protos.h (m68hc11_override_options):
	Remove.
	* config/m68hc11/m68hc11.c (TARGET_OPTION_OVERRIDE): Define.
	(m68hc11_override_options): Rename to m68hc11_option_override.
	Make static.  Return void.
	* config/m68hc11/m68hc11.h (OVERRIDE_OPTIONS): Remove.
	* config/m68k/m68k-protos.h (override_options): Remove.
	* config/m68k/m68k.c (TARGET_OPTION_OVERRIDE): Define.
	(override_options): Rename to m68k_option_override.  Make static.
	* config/m68k/m68k.h (OVERRIDE_OPTIONS): Remove.
	* config/mcore/mcore-protos.h (mcore_override_options): Remove.
	* config/mcore/mcore.c (TARGET_OPTION_OVERRIDE): Define.
	(mcore_override_options): Rename to mcore_option_override.  Make
	static.
	* config/mcore/mcore.h (OVERRIDE_OPTIONS): Remove.
	* config/mep/mep-protos.h (mep_override_options): Remove.
	* config/mep/mep.c (TARGET_OPTION_OVERRIDE): Define.
	(mep_override_options): Rename to mep_option_override.  Make
	static.
	* config/mep/mep.h (OVERRIDE_OPTIONS): Remove.
	* config/mmix/mmix-protos.h (mmix_override_options): Remove.
	* config/mmix/mmix.c (TARGET_OPTION_OVERRIDE): Define.
	(mmix_override_options): Rename to mmix_option_override.  Make
	static.
	* config/mmix/mmix.h (OVERRIDE_OPTIONS): Remove.
	* config/mn10300/mn10300-protos.h (mn10300_override_options):
	Remove.
	* config/mn10300/mn10300.c (TARGET_OPTION_OVERRIDE): Define.
	(mn10300_override_options): Rename to mn10300_option_override.
	Make static.
	* config/mn10300/mn10300.h (OVERRIDE_OPTIONS): Remove.
	* config/moxie/moxie-protos.h (moxie_override_options): Remove.
	* config/moxie/moxie.c (moxie_override_options): Rename to
	moxie_option_override.  Make static.
	(TARGET_OPTION_OVERRIDE): Define.
	* config/moxie/moxie.h (OVERRIDE_OPTIONS): Remove.
	* config/picochip/picochip-protos.h (picochip_override_options):
	Remove.  Update comment referring to picochip_override_options.
	* config/picochip/picochip.c (TARGET_OPTION_OVERRIDE): Define.
	(picochip_override_options): Rename to picochip_option_override.
	Make static.  Update comment and definition of
	TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE.
	* config/picochip/picochip.h (OVERRIDE_OPTIONS): Remove.
	* config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Update
	comment.
	* config/rs6000/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Update
	comment.
	* config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Update
	comment.
	* config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Update
	comment.
	* config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Update
	comment.
	* config/rs6000/linux64.h (OPTION_TARGET_CPU_DEFAULT): Define
	instead of OVERRIDE_OPTIONS.
	* config/rs6000/rs6000-modes.def: Update comment referring to
	rs6000_override_options.
	* config/rs6000/rs6000-protos.h (rs6000_override_options): Remove.
	* config/rs6000/rs6000.c (TARGET_OPTION_OVERRIDE): Define.
	(rs6000_override_options): Rename to
	rs6000_option_override_internal.  Make static.  Commented
	referring to rs6000_override_options and OVERRIDE_OPTIONS updated.
	(rs6000_option_override): New.
	* config/rs6000/rs6000.h (OPTION_TARGET_CPU_DEFAULT): Define
	instead of OVERRIDE_OPTIONS.
	* config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Update
	comment.
	* config/s390/s390-protos.h (override_options): Remove.
	* config/s390/s390.c (override_options): Rename to
	s390_option_override.  Make static.
	(TARGET_OPTION_OVERRIDE): Define.
	* config/s390/s390.h (OVERRIDE_OPTIONS): Remove.
	* config/score/score-protos.h (score_override_options): Remove.
	* config/score/score.c (TARGET_OPTION_OVERRIDE): Define.
	(score_override_options): Rename to score_option_override.  Make
	static.
	* config/score/score.h (OVERRIDE_OPTIONS): Remove.
	Update comment referring to override_options.
	* config/score/score3.c (score3_override_options): Rename to
	score3_option_override.
	* config/score/score3.h (score3_override_options): Rename to
	score3_option_override.
	* config/score/score7.c (score7_override_options): Rename to
	score7_option_override.
	* config/score/score7.h (score7_override_options): Rename to
	score7_option_override.
	* config/sh/sh.c: Update comments referring to OVERRIDE_OPTIONS.
	* config/sparc/sparc.c (TARGET_OPTION_OVERRIDE): Define.
	(sparc_override_options): Rename to sparc_option_override.  Make
	static.  Call SUBTARGET_OVERRIDE_OPTIONS.
	* config/sparc/sparc.h (OVERRIDE_OPTIONS): Remove.
	* config/sparc/vxworks.h (SUBTARGET_OVERRIDE_OPTIONS): Define
	instead of OVERRIDE_OPTIONS.
	* config/spu/spu-protos.h (spu_override_options): Remove.
	* config/spu/spu.c (TARGET_OPTION_OVERRIDE): Define.
	(spu_override_options): Rename to spu_option_override.  Make
	static.
	* config/spu/spu.h (OVERRIDE_OPTIONS): Remove.
	* config/vax/elf.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of
	OVERRIDE_OPTIONS.
	* config/vax/vax-protos.h (override_options): Remove.
	* config/vax/vax.c (TARGET_OPTION_OVERRIDE): Define.
	(override_options): Rename to vax_option_override.  Make static.
	Call SUBTARGET_OVERRIDE_OPTIONS.
	* config/vax/vax.h (OVERRIDE_OPTIONS): Remove.
	* config/vxworks.c: Update comment referring to OVERRIDE_OPTIONS.
	* config/vxworks.h: Update comment referring to OVERRIDE_OPTIONS.
	* config/xtensa/xtensa-protos.h (override_options): Remove.
	* config/xtensa/xtensa.c (TARGET_OPTION_OVERRIDE): Define.
	(override_options): Rename to xtensa_option_override.  Make
	static.
	* config/xtensa/xtensa.h (OVERRIDE_OPTIONS): Remove.

Comments

Richard Biener Sept. 14, 2010, 1:25 p.m. UTC | #1
On Tue, Sep 14, 2010 at 3:01 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> This patch completes the conversion of OVERRIDE_OPTIONS to a target
> hook, converting all previously unconverted targets, updating some
> comments in previously converted targets and target-independent code
> and poisoning the old target macro.
>
> In general I renamed targets' functions implementing the macro to
> follow the ${target}_option_override pattern used for already
> converted targets, but did not do anything about the naming of
> SUBTARGET_OVERRIDE_OPTIONS macros or associated functions.  The
> functions vary in how much they relate to options and how much they
> are general initialization functions; subsequent changes are expected
> to split the two, with a pure-options hook being shared with the
> driver.
>
> Bootstrapped with no regressions on x86_64-unknown-linux-gnu.  Also
> tested building cc1 (or at least the relevant .o file in cc1, where a
> complete cc1 build was broken for other reasons) for the following
> targets, intended to cover all cases of SUBTARGET_OVERRIDE_OPTIONS
> etc.: alpha-linux-gnu alpha-dec-vms arc-elf arm-eabi arm-wrs-vxworks
> bfin-elf cris-elf frv-elf h8300-elf i686-cygwin i686-darwin
> i686-pc-msdosdjgpp i686-interix3 i686-netware i686-solaris2.10
> i686-wrs-vxworks ia64-linux-gnu iq2000-elf lm32-elf m32r-elf
> m68hc11-elf m68k-elf mcore-elf mep-elf mmix-knuth-mmixware mn10300-elf
> moxie-elf picochip-none powerpc-eabi powerpc-ibm-aix4.3
> powerpc-ibm-aix5.1.0 powerpc-ibm-aix5.2.0 powerpc-ibm-aix5.3.0
> powerpc-ibm-aix6.1 powerpc-darwin powerpc-eabispe
> (--enable-e500-double) powerpc-eabialtivec powerpc64-linux-gnu
> powerpc-linux-gnualtivec powerpc-linux-gnuspe powerpc-wrs-vxworks
> s390-linux-gnu score-elf sh-elf sparc-elf sparc-wrs-vxworks
> vax-linux-gnu vax-netbsd xtensa-elf.  OK to commit?
>
> In general I watched for any warnings or errors building the relevant
> .o file that would indicate an issue with this patch, and did not see
> such warnings or errors for any target.  There are of course various
> unrelated pre-existing warnings for various targets.  I also saw
> errors building compilers for AIX 4.3/5.1/5.2 of the form:
>
> rs6000.c: In function 'rs6000_expand_ternop_builtin':
> rs6000.c:10930: error: duplicate case value
> rs6000.c:10929: error: previously used here
>
> coming from code
>
>    case CODE_FOR_altivec_vsldoi_v4sf:
>    case CODE_FOR_altivec_vsldoi_v4si:
>    case CODE_FOR_altivec_vsldoi_v8hi:
>    case CODE_FOR_altivec_vsldoi_v16qi:
>
> where all those values are defined to CODE_FOR_nothing (TARGET_ALTIVEC
> is hardcoded to 0 in the relevant .h files).  I don't know why those
> should appear when building a cross-compiler when gcc-testresults
> shows that people have been successfully building native compilers for
> these targets since that code came in.

The middle-end parts are ok.  At your discretion consider target
dependent parts ok as well after giving target maintainers some time
to review and possibly test their bits.

Thanks,
Richard.


> 2010-09-14  Joseph Myers  <joseph@codesourcery.com>
>
>        * doc/tm.texi.in (OVERRIDE_OPTIONS): Remove documentation.
>        (C_COMMON_OVERRIDE_OPTIONS): Don't refer to OVERRIDE_OPTIONS.
>        * doc/tm.texi: Regenerate.
>        * system.h (OVERRIDE_OPTIONS): Poison.
>        * target.def (override): Default to hook_void_void.
>        * targhooks.c (default_target_option_override): Remove.
>        * genmodes.c, machmode.def: Update comments mentioning
>        OVERRIDE_OPTIONS.
>        * config/alpha/alpha-modes.def: Update comment mentioning
>        alpha_override_options.
>        * config/alpha/alpha-protos.h (override_options): Remove.
>        * config/alpha/alpha.c (override_options): Rename to
>        alpha_option_override.  Call SUBTARGET_OVERRIDE_OPTIONS.  Make
>        static.
>        (TARGET_OPTION_OVERRIDE): Define.
>        * config/alpha/alpha.h (OVERRIDE_OPTIONS): Remove.
>        * config/alpha/vms.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead
>        of OVERRIDE_OPTIONS.
>        * config/arc/arc-protos.h (arc_init): Remove.
>        * config/arc/arc.c (TARGET_OPTION_OVERRIDE): Define.
>        (arc_init): Rename to arc_option_override.  Make static.
>        * config/arc/arc.h (ARC_EXTENSION_CPU): Correct comment.
>        (OVERRIDE_OPTIONS): Remove.
>        * config/arm/arm-protos.h (arm_override_options): Remove.
>        * config/arm/arm.c (TARGET_OPTION_OVERRIDE): Define.
>        (arm_override_options): Rename to arm_option_override.  Make
>        static.  Call SUBTARGET_OVERRIDE_OPTIONS.
>        * config/arm/arm.h (OVERRIDE_OPTIONS): Remove.
>        * config/arm/arm.md: Update comment referring to
>        arm_override_options.
>        * config/arm/vxworks.h (SUBTARGET_OVERRIDE_OPTIONS): Define
>        instead of OVERRIDE_OPTIONS.
>        * config/avr/avr-protos.h (avr_override_options): Remove.
>        * config/avr/avr.c (TARGET_OPTION_OVERRIDE): Define.
>        (avr_override_options): Rename to avr_option_override.  Make
>        static.
>        * config/avr/avr.h (OVERRIDE_OPTIONS): Remove.
>        * config/bfin/bfin-protos.h (override_options): Remove (twice).
>        * config/bfin/bfin.c (override_options): Rename to
>        bfin_option_override.  Make static.
>        (TARGET_OPTION_OVERRIDE): Define.
>        * config/bfin/bfin.h (OVERRIDE_OPTIONS): Remove.
>        * config/cris/cris-protos.h (cris_override_options): Remove.
>        * config/cris/cris.c (TARGET_OPTION_OVERRIDE): Define.
>        (cris_override_options): Rename to cris_option_override.  Make
>        static.
>        * config/cris/cris.h (OVERRIDE_OPTIONS): Remove.
>        * config/frv/frv-protos.h (frv_override_options): Remove.
>        * config/frv/frv.c (TARGET_OPTION_OVERRIDE): Define.
>        (frv_override_options): Rename to frv_option_override.  Make
>        static.
>        * config/frv/frv.h (OVERRIDE_OPTIONS): Remove.
>        * config/h8300/h8300-protos.h (h8300_init_once): Remove.
>        * config/h8300/h8300.c (h8300_init_once): Rename to
>        h8300_option_override.  Make static.
>        (TARGET_OPTION_OVERRIDE): Define.
>        * config/h8300/h8300.h (OVERRIDE_OPTIONS): Remove.
>        * config/i386/i386-protos.h (override_options): Remove.
>        * config/i386/i386.c (override_options): Rename to
>        ix86_option_override_internal.  Make static.  Comments referring
>        to this function and callers changed.
>        (ix86_option_override): New.
>        (TARGET_OPTION_OVERRIDE): Define.
>        * config/i386/i386.h (OVERRIDE_OPTION): Remove.
>        * config/i386/linux64.h (DEFAULT_PCC_STRUCT_RETURN): Update
>        comment.
>        * config/ia64/ia64.c (ia64_file_start): Update comment referring
>        to ia64_override_options.
>        * config/iq2000/iq2000-protos.h (override_options): Remove.
>        * config/iq2000/iq2000.c (TARGET_OPTION_OVERRIDE): Define.
>        (override_options): Rename to iq2000_option_override.  Make
>        static.
>        * config/iq2000/iq2000.h (OVERRIDE_OPTIONS): Remove.
>        * config/lm32/lm32-protos.h (lm32_override_options): Remove.
>        * config/lm32/lm32.c (TARGET_OPTION_OVERRIDE): Define.
>        (lm32_override_options): Rename to lm32_option_override.  Make
>        static.
>        * config/lm32/lm32.h (OVERRIDE_OPTIONS): Remove.
>        * config/m32r/m32r.c (TARGET_OPTION_OVERRIDE): Define.
>        (m32r_option_override): New.
>        (m32r_init): Update comment.
>        * config/m32r/m32r.h (OVERRIDE_OPTIONS): Remove.
>        * config/m68hc11/m68hc11-protos.h (m68hc11_override_options):
>        Remove.
>        * config/m68hc11/m68hc11.c (TARGET_OPTION_OVERRIDE): Define.
>        (m68hc11_override_options): Rename to m68hc11_option_override.
>        Make static.  Return void.
>        * config/m68hc11/m68hc11.h (OVERRIDE_OPTIONS): Remove.
>        * config/m68k/m68k-protos.h (override_options): Remove.
>        * config/m68k/m68k.c (TARGET_OPTION_OVERRIDE): Define.
>        (override_options): Rename to m68k_option_override.  Make static.
>        * config/m68k/m68k.h (OVERRIDE_OPTIONS): Remove.
>        * config/mcore/mcore-protos.h (mcore_override_options): Remove.
>        * config/mcore/mcore.c (TARGET_OPTION_OVERRIDE): Define.
>        (mcore_override_options): Rename to mcore_option_override.  Make
>        static.
>        * config/mcore/mcore.h (OVERRIDE_OPTIONS): Remove.
>        * config/mep/mep-protos.h (mep_override_options): Remove.
>        * config/mep/mep.c (TARGET_OPTION_OVERRIDE): Define.
>        (mep_override_options): Rename to mep_option_override.  Make
>        static.
>        * config/mep/mep.h (OVERRIDE_OPTIONS): Remove.
>        * config/mmix/mmix-protos.h (mmix_override_options): Remove.
>        * config/mmix/mmix.c (TARGET_OPTION_OVERRIDE): Define.
>        (mmix_override_options): Rename to mmix_option_override.  Make
>        static.
>        * config/mmix/mmix.h (OVERRIDE_OPTIONS): Remove.
>        * config/mn10300/mn10300-protos.h (mn10300_override_options):
>        Remove.
>        * config/mn10300/mn10300.c (TARGET_OPTION_OVERRIDE): Define.
>        (mn10300_override_options): Rename to mn10300_option_override.
>        Make static.
>        * config/mn10300/mn10300.h (OVERRIDE_OPTIONS): Remove.
>        * config/moxie/moxie-protos.h (moxie_override_options): Remove.
>        * config/moxie/moxie.c (moxie_override_options): Rename to
>        moxie_option_override.  Make static.
>        (TARGET_OPTION_OVERRIDE): Define.
>        * config/moxie/moxie.h (OVERRIDE_OPTIONS): Remove.
>        * config/picochip/picochip-protos.h (picochip_override_options):
>        Remove.  Update comment referring to picochip_override_options.
>        * config/picochip/picochip.c (TARGET_OPTION_OVERRIDE): Define.
>        (picochip_override_options): Rename to picochip_option_override.
>        Make static.  Update comment and definition of
>        TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE.
>        * config/picochip/picochip.h (OVERRIDE_OPTIONS): Remove.
>        * config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Update
>        comment.
>        * config/rs6000/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Update
>        comment.
>        * config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Update
>        comment.
>        * config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Update
>        comment.
>        * config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Update
>        comment.
>        * config/rs6000/linux64.h (OPTION_TARGET_CPU_DEFAULT): Define
>        instead of OVERRIDE_OPTIONS.
>        * config/rs6000/rs6000-modes.def: Update comment referring to
>        rs6000_override_options.
>        * config/rs6000/rs6000-protos.h (rs6000_override_options): Remove.
>        * config/rs6000/rs6000.c (TARGET_OPTION_OVERRIDE): Define.
>        (rs6000_override_options): Rename to
>        rs6000_option_override_internal.  Make static.  Commented
>        referring to rs6000_override_options and OVERRIDE_OPTIONS updated.
>        (rs6000_option_override): New.
>        * config/rs6000/rs6000.h (OPTION_TARGET_CPU_DEFAULT): Define
>        instead of OVERRIDE_OPTIONS.
>        * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Update
>        comment.
>        * config/s390/s390-protos.h (override_options): Remove.
>        * config/s390/s390.c (override_options): Rename to
>        s390_option_override.  Make static.
>        (TARGET_OPTION_OVERRIDE): Define.
>        * config/s390/s390.h (OVERRIDE_OPTIONS): Remove.
>        * config/score/score-protos.h (score_override_options): Remove.
>        * config/score/score.c (TARGET_OPTION_OVERRIDE): Define.
>        (score_override_options): Rename to score_option_override.  Make
>        static.
>        * config/score/score.h (OVERRIDE_OPTIONS): Remove.
>        Update comment referring to override_options.
>        * config/score/score3.c (score3_override_options): Rename to
>        score3_option_override.
>        * config/score/score3.h (score3_override_options): Rename to
>        score3_option_override.
>        * config/score/score7.c (score7_override_options): Rename to
>        score7_option_override.
>        * config/score/score7.h (score7_override_options): Rename to
>        score7_option_override.
>        * config/sh/sh.c: Update comments referring to OVERRIDE_OPTIONS.
>        * config/sparc/sparc.c (TARGET_OPTION_OVERRIDE): Define.
>        (sparc_override_options): Rename to sparc_option_override.  Make
>        static.  Call SUBTARGET_OVERRIDE_OPTIONS.
>        * config/sparc/sparc.h (OVERRIDE_OPTIONS): Remove.
>        * config/sparc/vxworks.h (SUBTARGET_OVERRIDE_OPTIONS): Define
>        instead of OVERRIDE_OPTIONS.
>        * config/spu/spu-protos.h (spu_override_options): Remove.
>        * config/spu/spu.c (TARGET_OPTION_OVERRIDE): Define.
>        (spu_override_options): Rename to spu_option_override.  Make
>        static.
>        * config/spu/spu.h (OVERRIDE_OPTIONS): Remove.
>        * config/vax/elf.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of
>        OVERRIDE_OPTIONS.
>        * config/vax/vax-protos.h (override_options): Remove.
>        * config/vax/vax.c (TARGET_OPTION_OVERRIDE): Define.
>        (override_options): Rename to vax_option_override.  Make static.
>        Call SUBTARGET_OVERRIDE_OPTIONS.
>        * config/vax/vax.h (OVERRIDE_OPTIONS): Remove.
>        * config/vxworks.c: Update comment referring to OVERRIDE_OPTIONS.
>        * config/vxworks.h: Update comment referring to OVERRIDE_OPTIONS.
>        * config/xtensa/xtensa-protos.h (override_options): Remove.
>        * config/xtensa/xtensa.c (TARGET_OPTION_OVERRIDE): Define.
>        (override_options): Rename to xtensa_option_override.  Make
>        static.
>        * config/xtensa/xtensa.h (OVERRIDE_OPTIONS): Remove.
>
> Index: gcc/doc/tm.texi
> ===================================================================
> --- gcc/doc/tm.texi     (revision 164243)
> +++ gcc/doc/tm.texi     (working copy)
> @@ -773,24 +773,6 @@ description should define @code{TARGET_V
>  @end smallexample
>  @end defmac
>
> -@defmac OVERRIDE_OPTIONS
> -Sometimes certain combinations of command options do not make sense on
> -a particular target machine.  You can define a macro
> -@code{OVERRIDE_OPTIONS} to take account of this.  This macro, if
> -defined, is executed once just after all the command options have been
> -parsed.
> -
> -Don't use this macro to turn on various extra optimizations for
> -@option{-O}.  That is what @code{OPTIMIZATION_OPTIONS} is for.
> -
> -If you need to do something whenever the optimization level is
> -changed via the optimize attribute or pragma, see
> -@code{TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE}
> -
> -This macros is obsolete, new ports should use the target hook
> -@code{TARGET_OPTION_OVERRIDE} instead.
> -@end defmac
> -
>  @deftypefn {Target Hook} void TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE (void)
>  This target function is similar to the hook @code{TARGET_OPTION_OVERRIDE}
>  but is called when the optimize level is changed via an attribute or
> @@ -802,7 +784,8 @@ actions then, you should have @code{TARG
>  @end deftypefn
>
>  @defmac C_COMMON_OVERRIDE_OPTIONS
> -This is similar to @code{OVERRIDE_OPTIONS} but is only used in the C
> +This is similar to the @code{TARGET_OPTION_OVERRIDE} hook
> +but is only used in the C
>  language frontends (C, Objective-C, C++, Objective-C++) and so can be
>  used to alter option flag variables which only exist in those
>  frontends.
> Index: gcc/doc/tm.texi.in
> ===================================================================
> --- gcc/doc/tm.texi.in  (revision 164243)
> +++ gcc/doc/tm.texi.in  (working copy)
> @@ -773,24 +773,6 @@ description should define @code{TARGET_V
>  @end smallexample
>  @end defmac
>
> -@defmac OVERRIDE_OPTIONS
> -Sometimes certain combinations of command options do not make sense on
> -a particular target machine.  You can define a macro
> -@code{OVERRIDE_OPTIONS} to take account of this.  This macro, if
> -defined, is executed once just after all the command options have been
> -parsed.
> -
> -Don't use this macro to turn on various extra optimizations for
> -@option{-O}.  That is what @code{OPTIMIZATION_OPTIONS} is for.
> -
> -If you need to do something whenever the optimization level is
> -changed via the optimize attribute or pragma, see
> -@code{TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE}
> -
> -This macros is obsolete, new ports should use the target hook
> -@code{TARGET_OPTION_OVERRIDE} instead.
> -@end defmac
> -
>  @hook TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE
>  This target function is similar to the hook @code{TARGET_OPTION_OVERRIDE}
>  but is called when the optimize level is changed via an attribute or
> @@ -802,7 +784,8 @@ actions then, you should have @code{TARG
>  @end deftypefn
>
>  @defmac C_COMMON_OVERRIDE_OPTIONS
> -This is similar to @code{OVERRIDE_OPTIONS} but is only used in the C
> +This is similar to the @code{TARGET_OPTION_OVERRIDE} hook
> +but is only used in the C
>  language frontends (C, Objective-C, C++, Objective-C++) and so can be
>  used to alter option flag variables which only exist in those
>  frontends.
> Index: gcc/targhooks.c
> ===================================================================
> --- gcc/targhooks.c     (revision 164243)
> +++ gcc/targhooks.c     (working copy)
> @@ -919,14 +919,6 @@ default_secondary_reload (bool in_p ATTR
>   return rclass;
>  }
>
> -void
> -default_target_option_override (void)
> -{
> -#ifdef OVERRIDE_OPTIONS
> -  OVERRIDE_OPTIONS;
> -#endif
> -}
> -
>  bool
>  default_handle_c_option (size_t code ATTRIBUTE_UNUSED,
>                         const char *arg ATTRIBUTE_UNUSED,
> Index: gcc/target.def
> ===================================================================
> --- gcc/target.def      (revision 164243)
> +++ gcc/target.def      (working copy)
> @@ -2303,7 +2303,7 @@ DEFHOOK
>  (override,
>  "",
>  void, (void),
> - default_target_option_override)
> + hook_void_void)
>
>  /* Function to determine if one function can inline another function.  */
>  #undef HOOK_PREFIX
> Index: gcc/machmode.def
> ===================================================================
> --- gcc/machmode.def    (revision 164243)
> +++ gcc/machmode.def    (working copy)
> @@ -1,7 +1,7 @@
>  /* This file contains the definitions and documentation for the
>    machine modes used in the GNU compiler.
>    Copyright (C) 1987, 1992, 1994, 1997, 1998, 2000, 2003, 2004, 2005,
> -   2007  Free Software Foundation, Inc.
> +   2007, 2010  Free Software Foundation, Inc.
>
>  This file is part of GCC.
>
> @@ -191,7 +191,7 @@ INT_MODE (TI, 16);
>    that need 1-word, 2-word, 80-bit, or 128-bit float types respectively.
>
>    These are the IEEE mappings.  They can be overridden with
> -   RESET_FLOAT_FORMAT or at runtime (in OVERRIDE_OPTIONS).  */
> +   RESET_FLOAT_FORMAT or at runtime (in TARGET_OPTION_OVERRIDE).  */
>
>  FLOAT_MODE (SF, 4, ieee_single_format);
>  FLOAT_MODE (DF, 8, ieee_double_format);
> Index: gcc/genmodes.c
> ===================================================================
> --- gcc/genmodes.c      (revision 164243)
> +++ gcc/genmodes.c      (working copy)
> @@ -1,5 +1,5 @@
>  /* Generate the machine mode enumeration and associated tables.
> -   Copyright (C) 2003, 2004, 2005, 2006, 2007
> +   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010
>    Free Software Foundation, Inc.
>
>  This file is part of GCC.
> @@ -1160,7 +1160,7 @@ emit_real_format_for_mode (void)
>      or not the table itself is constant.
>
>      For backward compatibility this table is always writable
> -     (several targets modify it in OVERRIDE_OPTIONS).   FIXME:
> +     (several targets modify it in TARGET_OPTION_OVERRIDE).   FIXME:
>      convert all said targets to use ADJUST_FORMAT instead.  */
>  #if 0
>   print_maybe_const_decl ("const struct real_format *%s",
> Index: gcc/system.h
> ===================================================================
> --- gcc/system.h        (revision 164243)
> +++ gcc/system.h        (working copy)
> @@ -715,7 +715,7 @@ extern void fancy_abort (const char *, i
>        ALLOCATE_INITIAL_VALUE LEGITIMIZE_ADDRESS FRAME_POINTER_REQUIRED \
>        CAN_ELIMINATE TRAMPOLINE_TEMPLATE INITIALIZE_TRAMPOLINE         \
>        TRAMPOLINE_ADJUST_ADDRESS STATIC_CHAIN STATIC_CHAIN_INCOMING    \
> -       RETURN_POPS_ARGS
> +       RETURN_POPS_ARGS OVERRIDE_OPTIONS
>
>  /* Other obsolete target macros, or macros that used to be in target
>    headers and were not used, and may be obsolete or may never have
> Index: gcc/config/alpha/vms.h
> ===================================================================
> --- gcc/config/alpha/vms.h      (revision 164243)
> +++ gcc/config/alpha/vms.h      (working copy)
> @@ -1,6 +1,6 @@
>  /* Output variables, constants and external declarations, for GNU compiler.
>    Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2004, 2005, 2007, 2008,
> -   2009
> +   2009, 2010
>    Free Software Foundation, Inc.
>
>  This file is part of GCC.
> @@ -337,17 +337,16 @@ typedef struct crtl_name_spec
>  /* The VMS convention is to always provide minimal debug info
>    for a traceback unless specifically overridden.  */
>
> -#undef OVERRIDE_OPTIONS
> -#define OVERRIDE_OPTIONS                            \
> -{                                                   \
> +#undef SUBTARGET_OVERRIDE_OPTIONS
> +#define SUBTARGET_OVERRIDE_OPTIONS                  \
> +do {                                                \
>   if (write_symbols == NO_DEBUG                     \
>       && debug_info_level == DINFO_LEVEL_NONE)      \
>     {                                               \
>       write_symbols = VMS_DEBUG;                    \
>       debug_info_level = DINFO_LEVEL_TERSE;         \
>     }                                               \
> -   override_options ();                             \
> -}
> +} while (0)
>
>  /* Link with vms-dwarf2.o if -g (except -g0). This causes the
>    VMS link to pull all the dwarf2 debug sections together.  */
> Index: gcc/config/alpha/alpha.c
> ===================================================================
> --- gcc/config/alpha/alpha.c    (revision 164243)
> +++ gcc/config/alpha/alpha.c    (working copy)
> @@ -256,8 +256,8 @@ alpha_mangle_type (const_tree type)
>
>  /* Parse target option strings.  */
>
> -void
> -override_options (void)
> +static void
> +alpha_option_override (void)
>  {
>   static const struct cpu_table {
>     const char *const name;
> @@ -283,6 +283,10 @@ override_options (void)
>   int const ct_size = ARRAY_SIZE (cpu_table);
>   int i;
>
> +#ifdef SUBTARGET_OVERRIDE_OPTIONS
> +  SUBTARGET_OVERRIDE_OPTIONS;
> +#endif
> +
>   /* Unicos/Mk doesn't have shared libraries.  */
>   if (TARGET_ABI_UNICOSMK && flag_pic)
>     {
> @@ -11144,6 +11148,9 @@ alpha_init_libfuncs (void)
>  #undef TARGET_HANDLE_OPTION
>  #define TARGET_HANDLE_OPTION alpha_handle_option
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE alpha_option_override
> +
>  #ifdef TARGET_ALTERNATE_LONG_DOUBLE_MANGLING
>  #undef TARGET_MANGLE_TYPE
>  #define TARGET_MANGLE_TYPE alpha_mangle_type
> Index: gcc/config/alpha/alpha.h
> ===================================================================
> --- gcc/config/alpha/alpha.h    (revision 164243)
> +++ gcc/config/alpha/alpha.h    (working copy)
> @@ -212,17 +212,6 @@ extern enum alpha_fp_trap_mode alpha_fpt
>   {"cpu", "%{!mcpu=*:-mcpu=%(VALUE)}" }, \
>   {"tune", "%{!mtune=*:-mtune=%(VALUE)}" }
>
> -/* Sometimes certain combinations of command options do not make sense
> -   on a particular target machine.  You can define a macro
> -   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
> -   defined, is executed once just after all the command options have
> -   been parsed.
> -
> -   On the Alpha, it is used to translate target-option strings into
> -   numeric values.  */
> -
> -#define OVERRIDE_OPTIONS override_options ()
> -
>
>  /* Define this macro to change register usage conditional on target flags.
>
> Index: gcc/config/alpha/alpha-modes.def
> ===================================================================
> --- gcc/config/alpha/alpha-modes.def    (revision 164243)
> +++ gcc/config/alpha/alpha-modes.def    (working copy)
> @@ -1,5 +1,5 @@
>  /* Alpha extra machine modes.
> -   Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
> +   Copyright (C) 2003, 2004, 2007, 2010 Free Software Foundation, Inc.
>
>  This file is part of GCC.
>
> @@ -17,7 +17,7 @@ You should have received a copy of the G
>  along with GCC; see the file COPYING3.  If not see
>  <http://www.gnu.org/licenses/>.  */
>
> -/* 128-bit floating point.  This gets reset in alpha_override_options
> +/* 128-bit floating point.  This gets reset in alpha_option_override
>    if VAX float format is in use.  */
>  FLOAT_MODE (TF, 16, ieee_quad_format);
>
> Index: gcc/config/alpha/alpha-protos.h
> ===================================================================
> --- gcc/config/alpha/alpha-protos.h     (revision 164243)
> +++ gcc/config/alpha/alpha-protos.h     (working copy)
> @@ -1,5 +1,5 @@
>  /* Prototypes for alpha.c functions used in the md file & elsewhere.
> -   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009
> +   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010
>    Free Software Foundation, Inc.
>
>  This file is part of GCC.
> @@ -21,7 +21,6 @@ along with GCC; see the file COPYING3.
>  extern int alpha_next_sequence_number;
>
>  extern void literal_section (void);
> -extern void override_options (void);
>  extern int zap_mask (HOST_WIDE_INT);
>  extern int direct_return (void);
>
> Index: gcc/config/frv/frv.h
> ===================================================================
> --- gcc/config/frv/frv.h        (revision 164243)
> +++ gcc/config/frv/frv.h        (working copy)
> @@ -328,16 +328,6 @@
>         #endif  */
>  #define TARGET_VERSION fprintf (stderr, _(" (frv)"))
>
> -/* Sometimes certain combinations of command options do not make sense on a
> -   particular target machine.  You can define a macro `OVERRIDE_OPTIONS' to
> -   take account of this.  This macro, if defined, is executed once just after
> -   all the command options have been parsed.
> -
> -   Don't use this macro to turn on various extra optimizations for `-O'.  That
> -   is what `OPTIMIZATION_OPTIONS' is for.  */
> -
> -#define OVERRIDE_OPTIONS frv_override_options ()
> -
>  /* Some machines may desire to change what optimizations are performed for
>    various optimization levels.  This macro, if defined, is executed once just
>    after the optimization level is determined and before the remainder of the
> Index: gcc/config/frv/frv-protos.h
> ===================================================================
> --- gcc/config/frv/frv-protos.h (revision 164243)
> +++ gcc/config/frv/frv-protos.h (working copy)
> @@ -38,7 +38,6 @@ extern frv_cpu_t frv_cpu_type;                        /* valu
>  /* Define functions defined in frv.c */
>  extern void frv_expand_prologue                        (void);
>  extern void frv_expand_epilogue                        (bool);
> -extern void frv_override_options               (void);
>  extern void frv_optimization_options           (int, int);
>  extern void frv_conditional_register_usage     (void);
>  extern frv_stack_t *frv_stack_info             (void);
> Index: gcc/config/frv/frv.c
> ===================================================================
> --- gcc/config/frv/frv.c        (revision 164243)
> +++ gcc/config/frv/frv.c        (working copy)
> @@ -264,6 +264,7 @@ frv_cpu_t frv_cpu_type = CPU_TYPE;  /* va
>  /* Forward references */
>
>  static bool frv_handle_option                  (size_t, const char *, int);
> +static void frv_option_override                        (void);
>  static bool frv_legitimate_address_p           (enum machine_mode, rtx, bool);
>  static int frv_default_flags_for_cpu           (void);
>  static int frv_string_begins_with              (const_tree, const char *);
> @@ -428,6 +429,8 @@ static bool frv_class_likely_spilled_p
>    | MASK_NESTED_CE)
>  #undef TARGET_HANDLE_OPTION
>  #define TARGET_HANDLE_OPTION frv_handle_option
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE frv_option_override
>  #undef TARGET_INIT_BUILTINS
>  #define TARGET_INIT_BUILTINS frv_init_builtins
>  #undef TARGET_EXPAND_BUILTIN
> @@ -669,17 +672,10 @@ frv_default_flags_for_cpu (void)
>     }
>  }
>
> -/* Sometimes certain combinations of command options do not make
> -   sense on a particular target machine.  You can define a macro
> -   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
> -   defined, is executed once just after all the command options have
> -   been parsed.
> +/* Implement TARGET_OPTION_OVERRIDE.  */
>
> -   Don't use this macro to turn on various extra optimizations for
> -   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
> -
> -void
> -frv_override_options (void)
> +static void
> +frv_option_override (void)
>  {
>   int regno;
>   unsigned int i;
> Index: gcc/config/s390/s390.c
> ===================================================================
> --- gcc/config/s390/s390.c      (revision 164243)
> +++ gcc/config/s390/s390.c      (working copy)
> @@ -1555,8 +1555,8 @@ s390_handle_option (size_t code, const c
>     }
>  }
>
> -void
> -override_options (void)
> +static void
> +s390_option_override (void)
>  {
>   /* Set up function hooks.  */
>   init_machine_status = s390_init_machine_status;
> @@ -10423,6 +10423,9 @@ s390_loop_unroll_adjust (unsigned nunrol
>  #undef TARGET_HANDLE_OPTION
>  #define TARGET_HANDLE_OPTION s390_handle_option
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE s390_option_override
> +
>  #undef TARGET_ENCODE_SECTION_INFO
>  #define TARGET_ENCODE_SECTION_INFO s390_encode_section_info
>
> Index: gcc/config/s390/s390.h
> ===================================================================
> --- gcc/config/s390/s390.h      (revision 164243)
> +++ gcc/config/s390/s390.h      (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions of target machine for GNU compiler, for IBM S/390
>    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
> -   2007, 2008, 2009 Free Software Foundation, Inc.
> +   2007, 2008, 2009, 2010 Free Software Foundation, Inc.
>    Contributed by Hartmut Penner (hpenner@de.ibm.com) and
>                   Ulrich Weigand (uweigand@de.ibm.com).
>                   Andreas Krebbel (Andreas.Krebbel@de.ibm.com)
> @@ -149,9 +149,8 @@ extern int s390_arch_flags;
>  #define TARGET_VERSION fprintf (stderr, " (S/390)");
>  #endif
>
> -/* Hooks to override options.  */
> +/* Hook to override options.  */
>  #define OPTIMIZATION_OPTIONS(LEVEL, SIZE) optimization_options(LEVEL, SIZE)
> -#define OVERRIDE_OPTIONS override_options ()
>
>  /* Frame pointer is not used for debugging.  */
>  #define CAN_DEBUG_WITHOUT_FP
> Index: gcc/config/s390/s390-protos.h
> ===================================================================
> --- gcc/config/s390/s390-protos.h       (revision 164243)
> +++ gcc/config/s390/s390-protos.h       (working copy)
> @@ -1,5 +1,5 @@
>  /* Definitions of target machine for GNU compiler, for IBM S/390.
> -   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2008, 2009
> +   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
>    Free Software Foundation, Inc.
>
>    Contributed by Hartmut Penner (hpenner@de.ibm.com)
> @@ -35,7 +35,6 @@ extern bool s390_check_symref_alignment
>  /* Declare functions in s390.c.  */
>
>  extern void optimization_options (int, int);
> -extern void override_options (void);
>  extern HOST_WIDE_INT s390_initial_elimination_offset (int, int);
>  extern void s390_emit_prologue (void);
>  extern void s390_emit_epilogue (bool);
> Index: gcc/config/spu/spu-protos.h
> ===================================================================
> --- gcc/config/spu/spu-protos.h (revision 164243)
> +++ gcc/config/spu/spu-protos.h (working copy)
> @@ -21,7 +21,6 @@
>  extern void spu_cpu_cpp_builtins (struct cpp_reader * pfile);
>  extern void builtin_define_std (const char *);
>  extern void spu_optimization_options (int level, int size);
> -extern void spu_override_options (void);
>  extern void spu_c_common_override_options (void);
>  extern int valid_subreg (rtx op);
>  extern void spu_expand_extv (rtx * ops, int unsignedp);
> Index: gcc/config/spu/spu.c
> ===================================================================
> --- gcc/config/spu/spu.c        (revision 164243)
> +++ gcc/config/spu/spu.c        (working copy)
> @@ -149,6 +149,7 @@ static struct spu_builtin_range spu_buil
>  char regs_ever_allocated[FIRST_PSEUDO_REGISTER];
>
>  /*  Prototypes and external defs.  */
> +static void spu_option_override (void);
>  static void spu_init_builtins (void);
>  static tree spu_builtin_decl (unsigned, bool);
>  static bool spu_scalar_mode_supported_p (enum machine_mode mode);
> @@ -464,6 +465,9 @@ static const struct attribute_spec spu_a
>  #undef TARGET_TRAMPOLINE_INIT
>  #define TARGET_TRAMPOLINE_INIT spu_trampoline_init
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE spu_option_override
> +
>  struct gcc_target targetm = TARGET_INITIALIZER;
>
>  void
> @@ -477,12 +481,9 @@ spu_optimization_options (int level ATTR
>   flag_rename_registers = 1;
>  }
>
> -/* Sometimes certain combinations of command options do not make sense
> -   on a particular target machine.  You can define a macro
> -   OVERRIDE_OPTIONS to take account of this. This macro, if defined, is
> -   executed once just after all the command options have been parsed.  */
> -void
> -spu_override_options (void)
> +/* Implement TARGET_OPTION_OVERRIDE.  */
> +static void
> +spu_option_override (void)
>  {
>   /* Small loops will be unpeeled at -O3.  For SPU it is more important
>      to keep code small by default.  */
> Index: gcc/config/spu/spu.h
> ===================================================================
> --- gcc/config/spu/spu.h        (revision 164243)
> +++ gcc/config/spu/spu.h        (working copy)
> @@ -20,7 +20,6 @@
>
>  #define TARGET_VERSION fprintf (stderr, " (spu %s)", __DATE__);
>
> -#define OVERRIDE_OPTIONS spu_override_options()
>  #define C_COMMON_OVERRIDE_OPTIONS spu_c_common_override_options()
>
>  #define OPTIMIZATION_OPTIONS(level,size) \
> Index: gcc/config/sparc/sparc.c
> ===================================================================
> --- gcc/config/sparc/sparc.c    (revision 164243)
> +++ gcc/config/sparc/sparc.c    (working copy)
> @@ -349,6 +349,7 @@ static HOST_WIDE_INT frame_base_offset;
>  int sparc_indent_opcode = 0;
>
>  static bool sparc_handle_option (size_t, const char *, int);
> +static void sparc_option_override (void);
>  static void sparc_init_modes (void);
>  static void scan_record_type (tree, int *, int *, int *);
>  static int function_arg_slotno (const CUMULATIVE_ARGS *, enum machine_mode,
> @@ -591,6 +592,8 @@ static bool fpu_option_set = false;
>  #define TARGET_DEFAULT_TARGET_FLAGS TARGET_DEFAULT
>  #undef TARGET_HANDLE_OPTION
>  #define TARGET_HANDLE_OPTION sparc_handle_option
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE sparc_option_override
>
>  #if TARGET_GNU_TLS && defined(HAVE_AS_SPARC_UA_PCREL)
>  #undef TARGET_ASM_OUTPUT_DWARF_DTPREL
> @@ -647,8 +650,8 @@ sparc_handle_option (size_t code, const
>  /* Validate and override various options, and do some machine dependent
>    initialization.  */
>
> -void
> -sparc_override_options (void)
> +static void
> +sparc_option_override (void)
>  {
>   static struct code_model {
>     const char *const name;
> @@ -724,6 +727,10 @@ sparc_override_options (void)
>   const struct sparc_cpu_select *sel;
>   int fpu;
>
> +#ifdef SUBTARGET_OVERRIDE_OPTIONS
> +  SUBTARGET_OVERRIDE_OPTIONS;
> +#endif
> +
>  #ifndef SPARC_BI_ARCH
>   /* Check for unsupported architecture size.  */
>   if (! TARGET_64BIT != DEFAULT_ARCH32_P)
> Index: gcc/config/sparc/sparc.h
> ===================================================================
> --- gcc/config/sparc/sparc.h    (revision 164243)
> +++ gcc/config/sparc/sparc.h    (working copy)
> @@ -499,10 +499,6 @@ extern enum cmodel sparc_cmodel;
>
>  /* Show we can debug even without a frame pointer.  */
>  #define CAN_DEBUG_WITHOUT_FP
> -
> -/* Option handling.  */
> -
> -#define OVERRIDE_OPTIONS  sparc_override_options ()
>
>  /* Mask of all CPU selection flags.  */
>  #define MASK_ISA \
> Index: gcc/config/sparc/vxworks.h
> ===================================================================
> --- gcc/config/sparc/vxworks.h  (revision 164243)
> +++ gcc/config/sparc/vxworks.h  (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions of target machine for GNU compiler,
>    for SPARC targeting the VxWorks run time environment.
> -   Copyright (C) 2007 Free Software Foundation, Inc.
> +   Copyright (C) 2007, 2010 Free Software Foundation, Inc.
>
>  This file is part of GCC.
>
> @@ -27,14 +27,8 @@ along with GCC; see the file COPYING3.
>     }                                          \
>   while (0)
>
> -#undef OVERRIDE_OPTIONS
> -#define OVERRIDE_OPTIONS                       \
> -  do                                           \
> -    {                                          \
> -      VXWORKS_OVERRIDE_OPTIONS;                        \
> -      sparc_override_options ();               \
> -    }                                          \
> -  while (0)
> +#undef SUBTARGET_OVERRIDE_OPTIONS
> +#define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS
>
>  #undef CPP_SUBTARGET_SPEC
>  #define CPP_SUBTARGET_SPEC VXWORKS_ADDITIONAL_CPP_SPEC
> Index: gcc/config/mep/mep-protos.h
> ===================================================================
> --- gcc/config/mep/mep-protos.h (revision 164243)
> +++ gcc/config/mep/mep-protos.h (working copy)
> @@ -21,7 +21,6 @@ along with GCC; see the file COPYING3.
>
>  extern void mep_conditional_register_usage (char *, char *);
>  extern void mep_optimization_options (void);
> -extern void mep_override_options (void);
>  extern int mep_regno_reg_class (int);
>  extern int mep_reg_class_from_constraint (int, const char *);
>  extern bool mep_const_ok_for_letter_p (HOST_WIDE_INT, int);
> Index: gcc/config/mep/mep.c
> ===================================================================
> --- gcc/config/mep/mep.c        (revision 164243)
> +++ gcc/config/mep/mep.c        (working copy)
> @@ -220,6 +220,7 @@ static bool mep_pass_by_reference (CUMUL
>                                   const_tree, bool);
>  static bool mep_vector_mode_supported_p (enum machine_mode);
>  static bool mep_handle_option (size_t, const char *, int);
> +static void mep_option_override (void);
>  static rtx  mep_allocate_initial_value (rtx);
>  static void mep_asm_init_sections (void);
>  static int mep_comp_type_attributes (const_tree, const_tree);
> @@ -283,6 +284,8 @@ static void mep_trampoline_init (rtx, tr
>  #define TARGET_VECTOR_MODE_SUPPORTED_P mep_vector_mode_supported_p
>  #undef  TARGET_HANDLE_OPTION
>  #define TARGET_HANDLE_OPTION            mep_handle_option
> +#undef  TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE         mep_option_override
>  #undef  TARGET_DEFAULT_TARGET_FLAGS
>  #define TARGET_DEFAULT_TARGET_FLAGS    TARGET_DEFAULT
>  #undef  TARGET_ALLOCATE_INITIAL_VALUE
> @@ -381,8 +384,8 @@ mep_optimization_options (void)
>   flag_omit_frame_pointer = 1;
>  }
>
> -void
> -mep_override_options (void)
> +static void
> +mep_option_override (void)
>  {
>   if (flag_pic == 1)
>     warning (OPT_fpic, "-fpic is not supported");
> Index: gcc/config/mep/mep.h
> ===================================================================
> --- gcc/config/mep/mep.h        (revision 164243)
> +++ gcc/config/mep/mep.h        (working copy)
> @@ -134,8 +134,6 @@ extern int target_flags;
>
>  #define TARGET_VERSION fprintf (stderr, " (Toshiba Media Processor (MeP))");
>
> -#define OVERRIDE_OPTIONS mep_override_options ();
> -
>  /* The MeP config tool will add TARGET_OPTION_TRANSLATE_TABLE here.  */
>  #define TARGET_OPTION_TRANSLATE_TABLE \
>   {"-mall-opts", "-maverage -mmult -mdiv -mbitops -mleadz \
> Index: gcc/config/m32r/m32r.c
> ===================================================================
> --- gcc/config/m32r/m32r.c      (revision 164243)
> +++ gcc/config/m32r/m32r.c      (working copy)
> @@ -63,6 +63,7 @@ enum m32r_sdata m32r_sdata = M32R_SDATA_
>
>  /* Forward declaration.  */
>  static bool  m32r_handle_option (size_t, const char *, int);
> +static void  m32r_option_override (void);
>  static void  init_reg_tables (void);
>  static void  block_move_call (rtx, rtx, rtx);
>  static int   m32r_is_insn (rtx);
> @@ -150,6 +151,8 @@ static const struct attribute_spec m32r_
>  #define TARGET_DEFAULT_TARGET_FLAGS TARGET_CPU_DEFAULT
>  #undef  TARGET_HANDLE_OPTION
>  #define TARGET_HANDLE_OPTION m32r_handle_option
> +#undef  TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE m32r_option_override
>
>  #undef  TARGET_ENCODE_SECTION_INFO
>  #define TARGET_ENCODE_SECTION_INFO m32r_encode_section_info
> @@ -251,7 +254,7 @@ m32r_handle_option (size_t code, const c
>     }
>  }
>
> -/* Called by OVERRIDE_OPTIONS to initialize various things.  */
> +/* Called by m32r_option_override to initialize various things.  */
>
>  void
>  m32r_init (void)
> @@ -268,6 +271,15 @@ m32r_init (void)
>     g_switch_value = SDATA_DEFAULT_SIZE;
>  }
>
> +static void
> +m32r_option_override (void)
> +{
> +  /* These need to be done at start up.
> +     It's convenient to do them here.  */
> +  m32r_init ();
> +  SUBTARGET_OVERRIDE_OPTIONS;
> +}
> +
>  /* Vectors to keep interesting information about registers where it can easily
>    be got.  We use to use the actual mode value as the bit number, but there
>    is (or may be) more than 32 modes now.  Instead we use two tables: one
> Index: gcc/config/m32r/m32r.h
> ===================================================================
> --- gcc/config/m32r/m32r.h      (revision 164243)
> +++ gcc/config/m32r/m32r.h      (working copy)
> @@ -302,29 +302,10 @@ extern enum m32r_sdata m32r_sdata;
>  #define MULTILIB_DEFAULTS { "mmodel=small" SUBTARGET_MULTILIB_DEFAULTS }
>  #endif
>
> -/* Sometimes certain combinations of command options do not make
> -   sense on a particular target machine.  You can define a macro
> -   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
> -   defined, is executed once just after all the command options have
> -   been parsed.
> -
> -   Don't use this macro to turn on various extra optimizations for
> -   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
> -
>  #ifndef SUBTARGET_OVERRIDE_OPTIONS
>  #define SUBTARGET_OVERRIDE_OPTIONS
>  #endif
>
> -#define OVERRIDE_OPTIONS                       \
> -  do                                           \
> -    {                                          \
> -      /* These need to be done at start up.    \
> -        It's convenient to do them here.  */   \
> -      m32r_init ();                            \
> -      SUBTARGET_OVERRIDE_OPTIONS               \
> -    }                                          \
> -  while (0)
> -
>  #ifndef SUBTARGET_OPTIMIZATION_OPTIONS
>  #define SUBTARGET_OPTIMIZATION_OPTIONS
>  #endif
> Index: gcc/config/i386/i386.h
> ===================================================================
> --- gcc/config/i386/i386.h      (revision 164243)
> +++ gcc/config/i386/i386.h      (working copy)
> @@ -503,17 +503,6 @@ extern enum calling_abi ix86_abi;
>    with the rounding mode forced to 53 bits.  */
>  #define TARGET_96_ROUND_53_LONG_DOUBLE 0
>
> -/* Sometimes certain combinations of command options do not make
> -   sense on a particular target machine.  You can define a macro
> -   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
> -   defined, is executed once just after all the command options have
> -   been parsed.
> -
> -   Don't use this macro to turn on various extra optimizations for
> -   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
> -
> -#define OVERRIDE_OPTIONS override_options (true)
> -
>  /* Define this to change the optimizations performed by default.  */
>  #define OPTIMIZATION_OPTIONS(LEVEL, SIZE) \
>   optimization_options ((LEVEL), (SIZE))
> Index: gcc/config/i386/linux64.h
> ===================================================================
> --- gcc/config/i386/linux64.h   (revision 164243)
> +++ gcc/config/i386/linux64.h   (working copy)
> @@ -42,7 +42,8 @@ see the files COPYING3 and COPYING.RUNTI
>
>  /* The svr4 ABI for the i386 says that records and unions are returned
>    in memory.  In the 64bit compilation we will turn this flag off in
> -   override_options, as we never do pcc_struct_return scheme on this target.  */
> +   ix86_option_override_internal, as we never do pcc_struct_return
> +   scheme on this target.  */
>  #undef DEFAULT_PCC_STRUCT_RETURN
>  #define DEFAULT_PCC_STRUCT_RETURN 1
>
> Index: gcc/config/i386/i386-protos.h
> ===================================================================
> --- gcc/config/i386/i386-protos.h       (revision 164243)
> +++ gcc/config/i386/i386-protos.h       (working copy)
> @@ -20,7 +20,6 @@ along with GCC; see the file COPYING3.
>  <http://www.gnu.org/licenses/>.  */
>
>  /* Functions in i386.c */
> -extern void override_options (bool);
>  extern void optimization_options (int, int);
>  extern void ix86_conditional_register_usage (void);
>
> Index: gcc/config/i386/i386.c
> ===================================================================
> --- gcc/config/i386/i386.c      (revision 164243)
> +++ gcc/config/i386/i386.c      (working copy)
> @@ -2799,17 +2799,12 @@ ix86_debug_options (void)
>   return;
>  }
>
> -/* Sometimes certain combinations of command options do not make
> -   sense on a particular target machine.  You can define a macro
> -   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
> -   defined, is executed once just after all the command options have
> -   been parsed.
> +/* Override various settings based on options.  If MAIN_ARGS_P, the
> +   options are from the command line, otherwise they are from
> +   attributes.  */
>
> -   Don't use this macro to turn on various extra optimizations for
> -   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
> -
> -void
> -override_options (bool main_args_p)
> +static void
> +ix86_option_override_internal (bool main_args_p)
>  {
>   int i;
>   unsigned int ix86_arch_mask, ix86_tune_mask;
> @@ -3705,6 +3700,14 @@ override_options (bool main_args_p)
>       = build_target_option_node ();
>  }
>
> +/* Implement the TARGET_OPTION_OVERRIDE hook.  */
> +
> +static void
> +ix86_option_override (void)
> +{
> +  ix86_option_override_internal (true);
> +}
> +
>  /* Update register usage after having seen the compiler flags.  */
>
>  void
> @@ -4101,9 +4104,10 @@ ix86_valid_target_attribute_tree (tree a
>   if (! ix86_valid_target_attribute_inner_p (args, option_strings))
>     return NULL_TREE;
>
> -  /* If the changed options are different from the default, rerun override_options,
> -     and then save the options away.  The string options are are attribute options,
> -     and will be undone when we copy the save structure.  */
> +  /* If the changed options are different from the default, rerun
> +     ix86_option_override_internal, and then save the options away.
> +     The string options are are attribute options, and will be undone
> +     when we copy the save structure.  */
>   if (ix86_isa_flags != def->ix86_isa_flags
>       || target_flags != def->target_flags
>       || option_strings[IX86_FUNCTION_SPECIFIC_ARCH]
> @@ -4129,7 +4133,7 @@ ix86_valid_target_attribute_tree (tree a
>        ix86_fpmath_string = "sse,387";
>
>       /* Do any overrides, such as arch=xxx, or tune=xxx support.  */
> -      override_options (false);
> +      ix86_option_override_internal (false);
>
>       /* Add any builtin functions with the new isa if any.  */
>       ix86_add_new_builtins (ix86_isa_flags);
> @@ -4525,8 +4529,9 @@ optimization_options (int level, int siz
>
>   /* The default values of these switches depend on the TARGET_64BIT
>      that is not known at this moment.  Mark these values with 2 and
> -     let user the to override these.  In case there is no command line option
> -     specifying them, we will set the defaults in override_options.  */
> +     let user the to override these.  In case there is no command line
> +     option specifying them, we will set the defaults in
> +     ix86_option_override_internal.  */
>   if (optimize >= 1)
>     flag_omit_frame_pointer = 2;
>
> @@ -7897,9 +7902,9 @@ ix86_frame_pointer_required (void)
>   if (SUBTARGET_FRAME_POINTER_REQUIRED)
>     return true;
>
> -  /* In override_options, TARGET_OMIT_LEAF_FRAME_POINTER turns off
> -     the frame pointer by default.  Turn it back on now if we've not
> -     got a leaf function.  */
> +  /* In ix86_option_override_internal, TARGET_OMIT_LEAF_FRAME_POINTER
> +     turns off the frame pointer by default.  Turn it back on now if
> +     we've not got a leaf function.  */
>   if (TARGET_OMIT_LEAF_FRAME_POINTER
>       && (!current_function_is_leaf
>          || ix86_current_function_calls_tls_descriptor))
> @@ -32467,6 +32472,9 @@ has_dispatch (rtx insn, int action)
>  #undef TARGET_HANDLE_OPTION
>  #define TARGET_HANDLE_OPTION ix86_handle_option
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE ix86_option_override
> +
>  #undef TARGET_REGISTER_MOVE_COST
>  #define TARGET_REGISTER_MOVE_COST ix86_register_move_cost
>  #undef TARGET_MEMORY_MOVE_COST
> Index: gcc/config/sh/sh.c
> ===================================================================
> --- gcc/config/sh/sh.c  (revision 164243)
> +++ gcc/config/sh/sh.c  (working copy)
> @@ -331,7 +331,7 @@ static const struct attribute_spec sh_at
>  #undef TARGET_ASM_UNALIGNED_SI_OP
>  #define TARGET_ASM_UNALIGNED_SI_OP "\t.ualong\t"
>
> -/* These are NULLed out on non-SH5 in OVERRIDE_OPTIONS.  */
> +/* These are NULLed out on non-SH5 in TARGET_OPTION_OVERRIDE.  */
>  #undef TARGET_ASM_UNALIGNED_DI_OP
>  #define TARGET_ASM_UNALIGNED_DI_OP "\t.uaquad\t"
>  #undef TARGET_ASM_ALIGNED_DI_OP
> @@ -720,7 +720,7 @@ sh_optimization_options (int level ATTRI
>        target_flags |= MASK_SAVE_ALL_TARGET_REGS;
>     }
>   /* Likewise, we can't meaningfully test TARGET_SH2E / TARGET_IEEE
> -     here, so leave it to OVERRIDE_OPTIONS to set
> +     here, so leave it to TARGET_OPTION_OVERRIDE to set
>     flag_finite_math_only.  We set it to 2 here so we know if the user
>     explicitly requested this to be on or off.  */
>   flag_finite_math_only = 2;
> Index: gcc/config/avr/avr-protos.h
> ===================================================================
> --- gcc/config/avr/avr-protos.h (revision 164243)
> +++ gcc/config/avr/avr-protos.h (working copy)
> @@ -22,7 +22,6 @@
>
>
>  extern int function_arg_regno_p (int r);
> -extern void avr_override_options (void);
>  extern void avr_cpu_cpp_builtins (struct cpp_reader * pfile);
>  extern int avr_ret_register (void);
>  extern bool class_likely_spilled_p (int c);
> Index: gcc/config/avr/avr.c
> ===================================================================
> --- gcc/config/avr/avr.c        (revision 164243)
> +++ gcc/config/avr/avr.c        (working copy)
> @@ -49,6 +49,7 @@
>  /* Maximal allowed offset for an address in the LD command */
>  #define MAX_LD_OFFSET(MODE) (64 - (signed)GET_MODE_SIZE (MODE))
>
> +static void avr_option_override (void);
>  static int avr_naked_function_p (tree);
>  static int interrupt_function_p (tree);
>  static int signal_function_p (tree);
> @@ -192,10 +193,13 @@ static const struct attribute_spec avr_a
>  #undef TARGET_CAN_ELIMINATE
>  #define TARGET_CAN_ELIMINATE avr_can_eliminate
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE avr_option_override
> +
>  struct gcc_target targetm = TARGET_INITIALIZER;
>
> -void
> -avr_override_options (void)
> +static void
> +avr_option_override (void)
>  {
>   const struct mcu_type_s *t;
>
> Index: gcc/config/avr/avr.h
> ===================================================================
> --- gcc/config/avr/avr.h        (revision 164243)
> +++ gcc/config/avr/avr.h        (working copy)
> @@ -124,8 +124,6 @@ extern GTY(()) section *progmem_section;
>
>  #define TARGET_VERSION fprintf (stderr, " (GNU assembler syntax)");
>
> -#define OVERRIDE_OPTIONS avr_override_options ()
> -
>  #define CAN_DEBUG_WITHOUT_FP
>
>  #define BITS_BIG_ENDIAN 0
> Index: gcc/config/xtensa/xtensa.c
> ===================================================================
> --- gcc/config/xtensa/xtensa.c  (revision 164243)
> +++ gcc/config/xtensa/xtensa.c  (working copy)
> @@ -118,6 +118,7 @@ const enum reg_class xtensa_regno_to_cla
>   ACC_REG,
>  };
>
> +static void xtensa_option_override (void);
>  static enum internal_test map_test_to_internal_test (enum rtx_code);
>  static rtx gen_int_relational (enum rtx_code, rtx, rtx, int *);
>  static rtx gen_float_relational (enum rtx_code, rtx, rtx);
> @@ -251,6 +252,9 @@ static const int reg_nonleaf_alloc_order
>  #undef TARGET_TRAMPOLINE_INIT
>  #define TARGET_TRAMPOLINE_INIT xtensa_trampoline_init
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE xtensa_option_override
> +
>  struct gcc_target targetm = TARGET_INITIALIZER;
>
>
> @@ -2096,8 +2100,8 @@ xtensa_return_in_msb (const_tree valtype
>  }
>
>
> -void
> -override_options (void)
> +static void
> +xtensa_option_override (void)
>  {
>   int regno;
>   enum machine_mode mode;
> Index: gcc/config/xtensa/xtensa.h
> ===================================================================
> --- gcc/config/xtensa/xtensa.h  (revision 164243)
> +++ gcc/config/xtensa/xtensa.h  (working copy)
> @@ -1,5 +1,5 @@
>  /* Definitions of Tensilica's Xtensa target machine for GNU compiler.
> -   Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
> +   Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
>    Free Software Foundation, Inc.
>    Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica.
>
> @@ -74,8 +74,6 @@ extern unsigned xtensa_current_frame_siz
>  #define HAVE_AS_TLS 0
>  #endif
>
> -#define OVERRIDE_OPTIONS override_options ()
> -
>  /* Reordering blocks for Xtensa is not a good idea unless the compiler
>    understands the range of conditional branches.  Currently all branch
>    relaxation for Xtensa is handled in the assembler, so GCC cannot do a
> Index: gcc/config/xtensa/xtensa-protos.h
> ===================================================================
> --- gcc/config/xtensa/xtensa-protos.h   (revision 164243)
> +++ gcc/config/xtensa/xtensa-protos.h   (working copy)
> @@ -1,5 +1,5 @@
>  /* Prototypes of target machine for GNU compiler for Xtensa.
> -   Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
> +   Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
>    Free Software Foundation, Inc.
>    Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica.
>
> @@ -78,7 +78,6 @@ extern int function_arg_boundary (enum m
>
>  extern void xtensa_setup_frame_addresses (void);
>  extern int xtensa_dbx_register_number (int);
> -extern void override_options (void);
>  extern long compute_frame_size (int);
>  extern void xtensa_expand_prologue (void);
>  extern void order_regs_for_local_alloc (void);
> Index: gcc/config/lm32/lm32.h
> ===================================================================
> --- gcc/config/lm32/lm32.h      (revision 164243)
> +++ gcc/config/lm32/lm32.h      (working copy)
> @@ -68,8 +68,6 @@
>  #undef  LIB_SPEC
>  #define LIB_SPEC "%{!T*:-T sim.ld}"
>
> -#define OVERRIDE_OPTIONS lm32_override_options()
> -
>  extern int target_flags;
>
>  /* Add -G xx support.  */
> Index: gcc/config/lm32/lm32-protos.h
> ===================================================================
> --- gcc/config/lm32/lm32-protos.h       (revision 164243)
> +++ gcc/config/lm32/lm32-protos.h       (working copy)
> @@ -1,7 +1,7 @@
>  /* Prototypes of target machine functions, Lattice Mico32 architecture.
>    Contributed by Jon Beniston <jon@beniston.com>
>
> -   Copyright (C) 2009 Free Software Foundation, Inc.
> +   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
>
>    This file is part of GCC.
>
> @@ -28,7 +28,6 @@ extern void lm32_print_operand (FILE *fi
>  extern void lm32_print_operand_address (FILE *file, rtx addr);
>  extern rtx lm32_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode,
>                               tree type, int named);
> -extern void lm32_override_options (void);
>  extern HOST_WIDE_INT lm32_compute_initial_elimination_offset (int from,
>                                                              int to);
>  extern int lm32_can_use_return (void);
> Index: gcc/config/lm32/lm32.c
> ===================================================================
> --- gcc/config/lm32/lm32.c      (revision 164243)
> +++ gcc/config/lm32/lm32.c      (working copy)
> @@ -76,9 +76,12 @@ static bool
>  lm32_legitimate_address_p (enum machine_mode mode, rtx x, bool strict);
>  static HOST_WIDE_INT lm32_compute_frame_size (int size);
>  static bool lm32_handle_option (size_t code, const char *arg, int value);
> +static void lm32_option_override (void);
>
>  #undef TARGET_HANDLE_OPTION
>  #define TARGET_HANDLE_OPTION lm32_handle_option
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE lm32_option_override
>  #undef TARGET_ADDRESS_COST
>  #define TARGET_ADDRESS_COST hook_int_rtx_bool_0
>  #undef TARGET_RTX_COSTS
> @@ -713,8 +716,8 @@ lm32_handle_option (size_t code, const c
>  }
>
>  /* Override command line options.  */
> -void
> -lm32_override_options (void)
> +static void
> +lm32_option_override (void)
>  {
>   /* We must have sign-extend enabled if barrel-shift isn't.  */
>   if (!TARGET_BARREL_SHIFT_ENABLED && !TARGET_SIGN_EXTEND_ENABLED)
> Index: gcc/config/moxie/moxie.c
> ===================================================================
> --- gcc/config/moxie/moxie.c    (revision 164243)
> +++ gcc/config/moxie/moxie.c    (working copy)
> @@ -231,10 +231,10 @@ moxie_init_machine_status (void)
>  }
>
>
> -/* The OVERRIDE_OPTIONS worker.
> +/* The TARGET_OPTION_OVERRIDE worker.
>    All this curently does is set init_machine_status.  */
> -void
> -moxie_override_options (void)
> +static void
> +moxie_option_override (void)
>  {
>   /* Set the per-function-data initializer.  */
>   init_machine_status = moxie_init_machine_status;
> @@ -567,6 +567,9 @@ moxie_trampoline_init (rtx m_tramp, tree
>  #undef TARGET_TRAMPOLINE_INIT
>  #define TARGET_TRAMPOLINE_INIT moxie_trampoline_init
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE moxie_option_override
> +
>  struct gcc_target targetm = TARGET_INITIALIZER;
>
>  #include "gt-moxie.h"
> Index: gcc/config/moxie/moxie.h
> ===================================================================
> --- gcc/config/moxie/moxie.h    (revision 164243)
> +++ gcc/config/moxie/moxie.h    (working copy)
> @@ -303,8 +303,6 @@ enum reg_class
>    pointer registers are already assumed to be used as needed.  */
>  #define EPILOGUE_USES(R) (R == MOXIE_R5)
>
> -#define OVERRIDE_OPTIONS moxie_override_options ()
> -
>  /* Storage Layout */
>
>  #define BITS_BIG_ENDIAN 0
> Index: gcc/config/moxie/moxie-protos.h
> ===================================================================
> --- gcc/config/moxie/moxie-protos.h     (revision 164243)
> +++ gcc/config/moxie/moxie-protos.h     (working copy)
> @@ -18,7 +18,6 @@ You should have received a copy of the G
>  along with GCC; see the file COPYING3.  If not see
>  <http://www.gnu.org/licenses/>.  */
>
> -extern void  moxie_override_options (void);
>  extern void  moxie_expand_prologue (void);
>  extern void  moxie_expand_epilogue (void);
>  extern int   moxie_initial_elimination_offset (int, int);
> Index: gcc/config/m68hc11/m68hc11-protos.h
> ===================================================================
> --- gcc/config/m68hc11/m68hc11-protos.h (revision 164243)
> +++ gcc/config/m68hc11/m68hc11-protos.h (working copy)
> @@ -20,7 +20,6 @@ along with GCC; see the file COPYING3.
>  <http://www.gnu.org/licenses/>.  */
>
>
> -extern int m68hc11_override_options (void);
>  extern int m68hc11_optimization_options (int,int);
>  extern void m68hc11_conditional_register_usage (void);
>  extern int hard_regno_mode_ok (int, enum machine_mode);
> Index: gcc/config/m68hc11/m68hc11.c
> ===================================================================
> --- gcc/config/m68hc11/m68hc11.c        (revision 164243)
> +++ gcc/config/m68hc11/m68hc11.c        (working copy)
> @@ -61,6 +61,7 @@ Note:
>  #include "target-def.h"
>  #include "df.h"
>
> +static void m68hc11_option_override (void);
>  static void emit_move_after_reload (rtx, rtx, rtx);
>  static rtx simplify_logical (enum machine_mode, int, rtx, rtx *);
>  static void m68hc11_emit_logical (enum machine_mode, enum rtx_code, rtx *);
> @@ -293,10 +294,13 @@ static const struct attribute_spec m68hc
>  #undef TARGET_TRAMPOLINE_INIT
>  #define TARGET_TRAMPOLINE_INIT m68hc11_trampoline_init
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE m68hc11_option_override
> +
>  struct gcc_target targetm = TARGET_INITIALIZER;
>
> -int
> -m68hc11_override_options (void)
> +static void
> +m68hc11_option_override (void)
>  {
>   memset (m68hc11_reg_valid_for_index, 0,
>          sizeof (m68hc11_reg_valid_for_index));
> @@ -361,7 +365,6 @@ m68hc11_override_options (void)
>       if (TARGET_LONG_CALLS)
>         current_function_far = 1;
>     }
> -  return 0;
>  }
>
>
> Index: gcc/config/m68hc11/m68hc11.h
> ===================================================================
> --- gcc/config/m68hc11/m68hc11.h        (revision 164243)
> +++ gcc/config/m68hc11/m68hc11.h        (working copy)
> @@ -142,17 +142,6 @@ extern short *reg_renumber;        /* def in lo
>  /* Print subsidiary information on the compiler version in use.  */
>  #define TARGET_VERSION fprintf (stderr, " (MC68HC11/MC68HC12/MC68HCS12)")
>
> -/* Sometimes certain combinations of command options do not make
> -   sense on a particular target machine.  You can define a macro
> -   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
> -   defined, is executed once just after all the command options have
> -   been parsed.
> -
> -   Don't use this macro to turn on various extra optimizations for
> -   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
> -
> -#define OVERRIDE_OPTIONS       m68hc11_override_options ()
> -
>
>  /* Define cost parameters for a given processor variant.  */
>  struct processor_costs {
> Index: gcc/config/cris/cris.c
> ===================================================================
> --- gcc/config/cris/cris.c      (revision 164243)
> +++ gcc/config/cris/cris.c      (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions for GCC.  Part of the machine description for CRIS.
>    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
> -   2008, 2009  Free Software Foundation, Inc.
> +   2008, 2009, 2010  Free Software Foundation, Inc.
>    Contributed by Axis Communications.  Written by Hans-Peter Nilsson.
>
>  This file is part of GCC.
> @@ -130,6 +130,7 @@ static int cris_arg_partial_bytes (CUMUL
>  static tree cris_md_asm_clobbers (tree, tree, tree);
>
>  static bool cris_handle_option (size_t, const char *, int);
> +static void cris_option_override (void);
>
>  static bool cris_frame_pointer_required (void);
>
> @@ -208,6 +209,9 @@ int cris_cpu_version = CRIS_DEFAULT_CPU_
>  #undef TARGET_FRAME_POINTER_REQUIRED
>  #define TARGET_FRAME_POINTER_REQUIRED cris_frame_pointer_required
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE cris_option_override
> +
>  #undef TARGET_ASM_TRAMPOLINE_TEMPLATE
>  #define TARGET_ASM_TRAMPOLINE_TEMPLATE cris_asm_trampoline_template
>  #undef TARGET_TRAMPOLINE_INIT
> @@ -2336,7 +2340,7 @@ cris_asm_output_case_end (FILE *stream,
>
>  /* TARGET_HANDLE_OPTION worker.  We just store the values into local
>    variables here.  Checks for correct semantics are in
> -   cris_override_options.  */
> +   cris_option_override.  */
>
>  static bool
>  cris_handle_option (size_t code, const char *arg ATTRIBUTE_UNUSED,
> @@ -2392,11 +2396,11 @@ cris_handle_option (size_t code, const c
>   return true;
>  }
>
> -/* The OVERRIDE_OPTIONS worker.
> +/* The TARGET_OPTION_OVERRIDE worker.
>    As is the norm, this also parses -mfoo=bar type parameters.  */
>
> -void
> -cris_override_options (void)
> +static void
> +cris_option_override (void)
>  {
>   if (cris_max_stackframe_str)
>     {
> Index: gcc/config/cris/cris.h
> ===================================================================
> --- gcc/config/cris/cris.h      (revision 164243)
> +++ gcc/config/cris/cris.h      (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions for GCC.  Part of the machine description for CRIS.
>    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008,
> -   2009 Free Software Foundation, Inc.
> +   2009, 2010 Free Software Foundation, Inc.
>    Contributed by Axis Communications.  Written by Hans-Peter Nilsson.
>
>  This file is part of GCC.
> @@ -328,8 +328,6 @@ extern int target_flags;
>
>  #define CRIS_SUBTARGET_HANDLE_OPTION(x, y, z)
>
> -#define OVERRIDE_OPTIONS cris_override_options ()
> -
>  #define OPTIMIZATION_OPTIONS(OPTIMIZE, SIZE)   \
>   do                                           \
>     {                                          \
> Index: gcc/config/cris/cris-protos.h
> ===================================================================
> --- gcc/config/cris/cris-protos.h       (revision 164243)
> +++ gcc/config/cris/cris-protos.h       (working copy)
> @@ -1,5 +1,5 @@
>  /* Definitions for GCC.  Part of the machine description for CRIS.
> -   Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005, 2006, 2007
> +   Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005, 2006, 2007, 2009, 2010
>    Free Software Foundation, Inc.
>    Contributed by Axis Communications.
>
> @@ -64,8 +64,6 @@ extern void cris_pragma_expand_mul (stru
>  /* Need one that returns an int; usable in expressions.  */
>  extern int cris_fatal (char *);
>
> -extern void cris_override_options (void);
> -
>  extern int cris_initial_elimination_offset (int, int);
>
>  extern void cris_init_expanders (void);
> Index: gcc/config/iq2000/iq2000.h
> ===================================================================
> --- gcc/config/iq2000/iq2000.h  (revision 164243)
> +++ gcc/config/iq2000/iq2000.h  (working copy)
> @@ -69,8 +69,6 @@
>  #define TARGET_VERSION TARGET_VERSION_INTERNAL (stderr)
>  #endif
>
> -#define OVERRIDE_OPTIONS override_options ()
> -
>  #define CAN_DEBUG_WITHOUT_FP
>
>  /* Storage Layout.  */
> Index: gcc/config/iq2000/iq2000-protos.h
> ===================================================================
> --- gcc/config/iq2000/iq2000-protos.h   (revision 164243)
> +++ gcc/config/iq2000/iq2000-protos.h   (working copy)
> @@ -1,5 +1,5 @@
>  /* Definitions of target machine for GNU compiler for iq2000.
> -   Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
> +   Copyright (C) 2003, 2004, 2007, 2009, 2010 Free Software Foundation, Inc.
>
>    This file is part of GCC.
>
> @@ -24,7 +24,6 @@ extern int              iq2000_check_spl
>  extern int              iq2000_reg_mode_ok_for_base_p (rtx, enum machine_mode, int);
>  extern const char *     iq2000_fill_delay_slot (const char *, enum delay_type, rtx *, rtx);
>  extern const char *     iq2000_move_1word (rtx *, rtx, int);
> -extern void             override_options (void);
>  extern HOST_WIDE_INT    iq2000_debugger_offset (rtx, HOST_WIDE_INT);
>  extern void             final_prescan_insn (rtx, rtx *, int);
>  extern HOST_WIDE_INT    compute_frame_size (HOST_WIDE_INT);
> Index: gcc/config/iq2000/iq2000.c
> ===================================================================
> --- gcc/config/iq2000/iq2000.c  (revision 164243)
> +++ gcc/config/iq2000/iq2000.c  (working copy)
> @@ -1,5 +1,5 @@
>  /* Subroutines used for code generation on Vitesse IQ2000 processors
> -   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
> +   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
>    Free Software Foundation, Inc.
>
>  This file is part of GCC.
> @@ -147,6 +147,7 @@ static enum machine_mode gpr_mode;
>  /* Initialize the GCC target structure.  */
>  static struct machine_function* iq2000_init_machine_status (void);
>  static bool iq2000_handle_option      (size_t, const char *, int);
> +static void iq2000_option_override    (void);
>  static section *iq2000_select_rtx_section (enum machine_mode, rtx,
>                                           unsigned HOST_WIDE_INT);
>  static void iq2000_init_builtins      (void);
> @@ -182,6 +183,8 @@ static bool iq2000_print_operand_punct_v
>  #define TARGET_ASM_SELECT_RTX_SECTION  iq2000_select_rtx_section
>  #undef  TARGET_HANDLE_OPTION
>  #define TARGET_HANDLE_OPTION           iq2000_handle_option
> +#undef  TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE         iq2000_option_override
>  #undef  TARGET_RTX_COSTS
>  #define TARGET_RTX_COSTS               iq2000_rtx_costs
>  #undef  TARGET_ADDRESS_COST
> @@ -1428,8 +1431,8 @@ iq2000_handle_option (size_t code, const
>
>  /* Detect any conflicts in the switches.  */
>
> -void
> -override_options (void)
> +static void
> +iq2000_option_override (void)
>  {
>   target_flags &= ~MASK_GPOPT;
>
> Index: gcc/config/mn10300/mn10300.c
> ===================================================================
> --- gcc/config/mn10300/mn10300.c        (revision 164243)
> +++ gcc/config/mn10300/mn10300.c        (working copy)
> @@ -69,6 +69,7 @@ enum processor_type mn10300_processor =
>
>
>  static bool mn10300_handle_option (size_t, const char *, int);
> +static void mn10300_option_override (void);
>  static bool mn10300_legitimate_address_p (enum machine_mode, rtx, bool);
>  static int mn10300_address_cost_1 (rtx, int *);
>  static int mn10300_address_cost (rtx, bool);
> @@ -112,6 +113,8 @@ static bool mn10300_can_output_mi_thunk
>  #define TARGET_DEFAULT_TARGET_FLAGS MASK_MULT_BUG | MASK_PTR_A0D0
>  #undef TARGET_HANDLE_OPTION
>  #define TARGET_HANDLE_OPTION mn10300_handle_option
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE mn10300_option_override
>
>  #undef  TARGET_ENCODE_SECTION_INFO
>  #define TARGET_ENCODE_SECTION_INFO mn10300_encode_section_info
> @@ -177,10 +180,10 @@ mn10300_handle_option (size_t code,
>     }
>  }
>
> -/* Implement OVERRIDE_OPTIONS.  */
> +/* Implement TARGET_OPTION_OVERRIDE.  */
>
> -void
> -mn10300_override_options (void)
> +static void
> +mn10300_option_override (void)
>  {
>   if (TARGET_AM33)
>     target_flags &= ~MASK_MULT_BUG;
> Index: gcc/config/mn10300/mn10300.h
> ===================================================================
> --- gcc/config/mn10300/mn10300.h        (revision 164243)
> +++ gcc/config/mn10300/mn10300.h        (working copy)
> @@ -60,8 +60,6 @@ extern enum processor_type mn10300_proce
>  #define PROCESSOR_DEFAULT PROCESSOR_MN10300
>  #endif
>
> -#define OVERRIDE_OPTIONS mn10300_override_options ()
> -
>  /* Print subsidiary information on the compiler version in use.  */
>
>  #define TARGET_VERSION fprintf (stderr, " (MN10300)");
> Index: gcc/config/mn10300/mn10300-protos.h
> ===================================================================
> --- gcc/config/mn10300/mn10300-protos.h (revision 164243)
> +++ gcc/config/mn10300/mn10300-protos.h (working copy)
> @@ -1,5 +1,6 @@
>  /* Definitions of target machine for GNU compiler. Matsushita MN10300 series
> -   Copyright (C) 2000, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
> +   Copyright (C) 2000, 2003, 2004, 2005, 2007, 2009, 2010
> +   Free Software Foundation, Inc.
>    Contributed by Jeff Law (law@cygnus.com).
>
>  This file is part of GCC.
> @@ -20,7 +21,6 @@ along with GCC; see the file COPYING3.
>
>  #ifdef RTX_CODE
>
> -extern void mn10300_override_options (void);
>  extern rtx legitimize_pic_address (rtx, rtx);
>  extern int legitimate_pic_operand_p (rtx);
>  extern void print_operand (FILE *, rtx, int);
> Index: gcc/config/ia64/ia64.c
> ===================================================================
> --- gcc/config/ia64/ia64.c      (revision 164243)
> +++ gcc/config/ia64/ia64.c      (working copy)
> @@ -2314,7 +2314,7 @@ ia64_file_start (void)
>  {
>   /* Variable tracking should be run after all optimizations which change order
>      of insns.  It also needs a valid CFG.  This can't be done in
> -     ia64_override_options, because flag_var_tracking is finalized after
> +     ia64_option_override, because flag_var_tracking is finalized after
>      that.  */
>   ia64_flag_var_tracking = flag_var_tracking;
>   flag_var_tracking = 0;
> Index: gcc/config/m68k/m68k-protos.h
> ===================================================================
> --- gcc/config/m68k/m68k-protos.h       (revision 164243)
> +++ gcc/config/m68k/m68k-protos.h       (working copy)
> @@ -1,5 +1,5 @@
>  /* Definitions of target machine for GNU compiler.  Sun 68000/68020 version.
> -   Copyright (C) 2000, 2002, 2004, 2005, 2006, 2007, 2008
> +   Copyright (C) 2000, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010
>    Free Software Foundation, Inc.
>
>  This file is part of GCC.
> @@ -94,7 +94,6 @@ extern int flags_in_68881 (void);
>  extern void m68k_expand_prologue (void);
>  extern bool m68k_use_return_insn (void);
>  extern void m68k_expand_epilogue (bool);
> -extern void override_options (void);
>  extern const char *m68k_cpp_cpu_ident (const char *);
>  extern const char *m68k_cpp_cpu_family (const char *);
>  extern void init_68881_table (void);
> Index: gcc/config/m68k/m68k.c
> ===================================================================
> --- gcc/config/m68k/m68k.c      (revision 164243)
> +++ gcc/config/m68k/m68k.c      (working copy)
> @@ -135,6 +135,7 @@ static int m68k_sched_first_cycle_multip
>  static bool m68k_can_eliminate (const int, const int);
>  static bool m68k_legitimate_address_p (enum machine_mode, rtx, bool);
>  static bool m68k_handle_option (size_t, const char *, int);
> +static void m68k_option_override (void);
>  static rtx find_addr_reg (rtx);
>  static const char *singlemove_string (rtx *);
>  static void m68k_output_mi_thunk (FILE *, tree, HOST_WIDE_INT,
> @@ -233,6 +234,9 @@ const char *m68k_library_id_string = "_c
>  #undef TARGET_HANDLE_OPTION
>  #define TARGET_HANDLE_OPTION m68k_handle_option
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE m68k_option_override
> +
>  #undef TARGET_RTX_COSTS
>  #define TARGET_RTX_COSTS m68k_rtx_costs
>
> @@ -539,17 +543,10 @@ m68k_handle_option (size_t code, const c
>     }
>  }
>
> -/* Sometimes certain combinations of command options do not make
> -   sense on a particular target machine.  You can define a macro
> -   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
> -   defined, is executed once just after all the command options have
> -   been parsed.
> -
> -   Don't use this macro to turn on various extra optimizations for
> -   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
> +/* Implement TARGET_OPTION_OVERRIDE.  */
>
> -void
> -override_options (void)
> +static void
> +m68k_option_override (void)
>  {
>   const struct m68k_target_selection *entry;
>   unsigned long target_mask;
> Index: gcc/config/m68k/m68k.h
> ===================================================================
> --- gcc/config/m68k/m68k.h      (revision 164243)
> +++ gcc/config/m68k/m68k.h      (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions of target machine for GCC for Motorola 680x0/ColdFire.
>    Copyright (C) 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
> -   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
> +   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
>    Free Software Foundation, Inc.
>
>  This file is part of GCC.
> @@ -274,8 +274,6 @@ along with GCC; see the file COPYING3.
>  #define TUNE_MAC       ((m68k_tune_flags & FL_CF_MAC) != 0)
>  #define TUNE_EMAC      ((m68k_tune_flags & FL_CF_EMAC) != 0)
>
> -#define OVERRIDE_OPTIONS   override_options()
> -
>  /* These are meant to be redefined in the host dependent files */
>  #define SUBTARGET_OVERRIDE_OPTIONS
>
> Index: gcc/config/rs6000/aix53.h
> ===================================================================
> --- gcc/config/rs6000/aix53.h   (revision 164243)
> +++ gcc/config/rs6000/aix53.h   (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions of target machine for GNU compiler,
>    for IBM RS/6000 POWER running AIX V5.3.
> -   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
> +   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
>    Free Software Foundation, Inc.
>    Contributed by David Edelsohn (edelsohn@gnu.org).
>
> @@ -20,14 +20,8 @@
>    along with GCC; see the file COPYING3.  If not see
>    <http://www.gnu.org/licenses/>.  */
>
> -/* Sometimes certain combinations of command options do not make sense
> -   on a particular target machine.  You can define a macro
> -   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
> -   defined, is executed once just after all the command options have
> -   been parsed.
> -
> -   The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
> -   get control.  */
> +/* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
> +   get control in TARGET_OPTION_OVERRIDE.  */
>
>  #define NON_POWERPC_MASKS (MASK_POWER | MASK_POWER2)
>  #define SUBTARGET_OVERRIDE_OPTIONS                                     \
> Index: gcc/config/rs6000/rs6000-modes.def
> ===================================================================
> --- gcc/config/rs6000/rs6000-modes.def  (revision 164243)
> +++ gcc/config/rs6000/rs6000-modes.def  (working copy)
> @@ -1,5 +1,5 @@
>  /* Definitions of target machine for GNU compiler, for IBM RS/6000.
> -   Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
> +   Copyright (C) 2002, 2003, 2004, 2007, 2010 Free Software Foundation, Inc.
>    Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
>
>    This file is part of GCC.
> @@ -19,7 +19,7 @@
>    <http://www.gnu.org/licenses/>.  */
>
>  /* 128-bit floating point.  ABI_V4 uses IEEE quad, AIX/Darwin
> -   adjust this in rs6000_override_options.  */
> +   adjust this in rs6000_option_override_internal.  */
>  FLOAT_MODE (TF, 16, ieee_quad_format);
>
>  /* Add any extra modes needed to represent the condition code.
> Index: gcc/config/rs6000/rs6000-protos.h
> ===================================================================
> --- gcc/config/rs6000/rs6000-protos.h   (revision 164243)
> +++ gcc/config/rs6000/rs6000-protos.h   (working copy)
> @@ -154,7 +154,6 @@ extern enum direction function_arg_paddi
>  #endif /* TREE_CODE */
>
>  extern void optimization_options (int, int);
> -extern void rs6000_override_options (const char *);
>  extern int direct_return (void);
>  extern int first_reg_to_save (void);
>  extern int first_fp_reg_to_save (void);
> Index: gcc/config/rs6000/aix51.h
> ===================================================================
> --- gcc/config/rs6000/aix51.h   (revision 164243)
> +++ gcc/config/rs6000/aix51.h   (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions of target machine for GNU compiler,
>    for IBM RS/6000 POWER running AIX V5.
> -   Copyright (C) 2001, 2003, 2004, 2005, 2007, 2008
> +   Copyright (C) 2001, 2003, 2004, 2005, 2007, 2008, 2009, 2010
>    Free Software Foundation, Inc.
>    Contributed by David Edelsohn (edelsohn@gnu.org).
>
> @@ -20,14 +20,8 @@
>    along with GCC; see the file COPYING3.  If not see
>    <http://www.gnu.org/licenses/>.  */
>
> -/* Sometimes certain combinations of command options do not make sense
> -   on a particular target machine.  You can define a macro
> -   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
> -   defined, is executed once just after all the command options have
> -   been parsed.
> -
> -   The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
> -   get control.  */
> +/* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
> +   get control in TARGET_OPTION_OVERRIDE.  */
>
>  #define NON_POWERPC_MASKS (MASK_POWER | MASK_POWER2)
>  #define SUBTARGET_OVERRIDE_OPTIONS                                     \
> Index: gcc/config/rs6000/aix43.h
> ===================================================================
> --- gcc/config/rs6000/aix43.h   (revision 164243)
> +++ gcc/config/rs6000/aix43.h   (working copy)
> @@ -1,7 +1,7 @@
>  /* Definitions of target machine for GNU compiler,
>    for IBM RS/6000 POWER running AIX version 4.3.
>    Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
> -   2007 Free Software Foundation, Inc.
> +   2007, 2009, 2010 Free Software Foundation, Inc.
>    Contributed by David Edelsohn (edelsohn@gnu.org).
>
>    This file is part of GCC.
> @@ -20,14 +20,8 @@
>    along with GCC; see the file COPYING3.  If not see
>    <http://www.gnu.org/licenses/>.  */
>
> -/* Sometimes certain combinations of command options do not make sense
> -   on a particular target machine.  You can define a macro
> -   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
> -   defined, is executed once just after all the command options have
> -   been parsed.
> -
> -   The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
> -   get control.  */
> +/* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
> +   get control in TARGET_OPTION_OVERRIDE.  */
>
>  #define NON_POWERPC_MASKS (MASK_POWER | MASK_POWER2)
>  #define SUBTARGET_OVERRIDE_OPTIONS                                     \
> Index: gcc/config/rs6000/linux64.h
> ===================================================================
> --- gcc/config/rs6000/linux64.h (revision 164243)
> +++ gcc/config/rs6000/linux64.h (working copy)
> @@ -162,10 +162,10 @@ extern enum rs6000_cmodel cmodel;
>
>  #ifdef RS6000_BI_ARCH
>
> -#undef OVERRIDE_OPTIONS
> -#define        OVERRIDE_OPTIONS \
> -  rs6000_override_options (((TARGET_DEFAULT ^ target_flags) & MASK_64BIT) \
> -                          ? (char *) 0 : TARGET_CPU_DEFAULT)
> +#undef OPTION_TARGET_CPU_DEFAULT
> +#define        OPTION_TARGET_CPU_DEFAULT \
> +  (((TARGET_DEFAULT ^ target_flags) & MASK_64BIT) \
> +   ? (char *) 0 : TARGET_CPU_DEFAULT)
>
>  #endif
>
> Index: gcc/config/rs6000/rs6000.c
> ===================================================================
> --- gcc/config/rs6000/rs6000.c  (revision 164243)
> +++ gcc/config/rs6000/rs6000.c  (working copy)
> @@ -1133,6 +1133,7 @@ static rtx altivec_expand_vec_init_built
>  static rtx altivec_expand_vec_set_builtin (tree);
>  static rtx altivec_expand_vec_ext_builtin (tree, rtx);
>  static int get_element_number (tree, tree);
> +static void rs6000_option_override (void);
>  static bool rs6000_handle_option (size_t, const char *, int);
>  static void rs6000_parse_tls_size_option (void);
>  static void rs6000_parse_yes_no_option (const char *, const char *, int *);
> @@ -1588,6 +1589,9 @@ static const struct attribute_spec rs600
>  #undef TARGET_HANDLE_OPTION
>  #define TARGET_HANDLE_OPTION rs6000_handle_option
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE rs6000_option_override
> +
>  #undef TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION
>  #define TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION \
>   rs6000_builtin_vectorized_function
> @@ -2393,8 +2397,8 @@ darwin_rs6000_override_options (void)
>  /* Override command line options.  Mostly we process the processor
>    type and sometimes adjust other TARGET_ options.  */
>
> -void
> -rs6000_override_options (const char *default_cpu)
> +static void
> +rs6000_option_override_internal (const char *default_cpu)
>  {
>   size_t i, j;
>   struct rs6000_cpu_select *ptr;
> @@ -3226,6 +3230,15 @@ rs6000_override_options (const char *def
>   rs6000_init_hard_regno_mode_ok ();
>  }
>
> +/* Implement TARGET_OPTION_OVERRIDE.  On the RS/6000 this is used to
> +   define the target cpu type.  */
> +
> +static void
> +rs6000_option_override (void)
> +{
> +  rs6000_option_override_internal (OPTION_TARGET_CPU_DEFAULT);
> +}
> +
>  /* Implement targetm.vectorize.builtin_mask_for_load.  */
>  static tree
>  rs6000_builtin_mask_for_load (void)
> @@ -7542,7 +7555,7 @@ rs6000_emit_move (rtx dest, rtx source,
>    controls this instead of DEFAULT_ABI; V.4 targets needing backward
>    compatibility can change DRAFT_V4_STRUCT_RET to override the
>    default, and -m switches get the final word.  See
> -   rs6000_override_options for more details.
> +   rs6000_option_override_internal for more details.
>
>    The PPC32 SVR4 ABI uses IEEE double extended for long double, if 128-bit
>    long double support is enabled.  These values are returned in memory.
> @@ -21953,7 +21966,7 @@ output_toc (FILE *file, rtx x, int label
>       struct toc_hash_struct *h;
>       void * * found;
>
> -      /* Create toc_hash_table.  This can't be done at OVERRIDE_OPTIONS
> +      /* Create toc_hash_table.  This can't be done at TARGET_OPTION_OVERRIDE
>         time because GGC is not initialized at that point.  */
>       if (toc_hash_table == NULL)
>        toc_hash_table = htab_create_ggc (1021, toc_hash_function,
> Index: gcc/config/rs6000/aix52.h
> ===================================================================
> --- gcc/config/rs6000/aix52.h   (revision 164243)
> +++ gcc/config/rs6000/aix52.h   (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions of target machine for GNU compiler,
>    for IBM RS/6000 POWER running AIX V5.2.
> -   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
> +   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
>    Free Software Foundation, Inc.
>    Contributed by David Edelsohn (edelsohn@gnu.org).
>
> @@ -20,14 +20,8 @@
>    along with GCC; see the file COPYING3.  If not see
>    <http://www.gnu.org/licenses/>.  */
>
> -/* Sometimes certain combinations of command options do not make sense
> -   on a particular target machine.  You can define a macro
> -   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
> -   defined, is executed once just after all the command options have
> -   been parsed.
> -
> -   The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
> -   get control.  */
> +/* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
> +   get control in TARGET_OPTION_OVERRIDE.  */
>
>  #define NON_POWERPC_MASKS (MASK_POWER | MASK_POWER2)
>  #define SUBTARGET_OVERRIDE_OPTIONS                                     \
> Index: gcc/config/rs6000/rs6000.h
> ===================================================================
> --- gcc/config/rs6000/rs6000.h  (revision 164243)
> +++ gcc/config/rs6000/rs6000.h  (working copy)
> @@ -619,18 +619,8 @@ extern unsigned char rs6000_recip_bits[]
>  #define RS6000_RECIP_HIGH_PRECISION_P(MODE) \
>   ((MODE) == SFmode || (MODE) == V4SFmode || TARGET_RECIP_PRECISION)
>
> -/* Sometimes certain combinations of command options do not make sense
> -   on a particular target machine.  You can define a macro
> -   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
> -   defined, is executed once just after all the command options have
> -   been parsed.
> -
> -   Do not use this macro to turn on various extra optimizations for
> -   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.
> -
> -   On the RS/6000 this is used to define the target cpu type.  */
> -
> -#define OVERRIDE_OPTIONS rs6000_override_options (TARGET_CPU_DEFAULT)
> +/* The default CPU for TARGET_OPTION_OVERRIDE.  */
> +#define OPTION_TARGET_CPU_DEFAULT TARGET_CPU_DEFAULT
>
>  /* Define this to change the optimizations performed by default.  */
>  #define OPTIMIZATION_OPTIONS(LEVEL,SIZE) optimization_options(LEVEL,SIZE)
> Index: gcc/config/rs6000/aix61.h
> ===================================================================
> --- gcc/config/rs6000/aix61.h   (revision 164243)
> +++ gcc/config/rs6000/aix61.h   (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions of target machine for GNU compiler,
>    for IBM RS/6000 POWER running AIX V6.1.
> -   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
> +   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
>    Free Software Foundation, Inc.
>    Contributed by David Edelsohn (edelsohn@gnu.org).
>
> @@ -20,14 +20,8 @@
>    along with GCC; see the file COPYING3.  If not see
>    <http://www.gnu.org/licenses/>.  */
>
> -/* Sometimes certain combinations of command options do not make sense
> -   on a particular target machine.  You can define a macro
> -   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
> -   defined, is executed once just after all the command options have
> -   been parsed.
> -
> -   The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
> -   get control.  */
> +/* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
> +   get control in TARGET_OPTION_OVERRIDE.  */
>
>  #define NON_POWERPC_MASKS (MASK_POWER | MASK_POWER2)
>  #define SUBTARGET_OVERRIDE_OPTIONS                                     \
> Index: gcc/config/rs6000/sysv4.h
> ===================================================================
> --- gcc/config/rs6000/sysv4.h   (revision 164243)
> +++ gcc/config/rs6000/sysv4.h   (working copy)
> @@ -76,14 +76,8 @@ extern const char *rs6000_tls_size_strin
>
>  #define SDATA_DEFAULT_SIZE 8
>
> -/* Sometimes certain combinations of command options do not make sense
> -   on a particular target machine.  You can define a macro
> -   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
> -   defined, is executed once just after all the command options have
> -   been parsed.
> -
> -   The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
> -   get control.  */
> +/* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
> +   get control in TARGET_OPTION_OVERRIDE.  */
>
>  #define SUBTARGET_OVERRIDE_OPTIONS                                     \
>  do {                                                                   \
> Index: gcc/config/picochip/picochip.c
> ===================================================================
> --- gcc/config/picochip/picochip.c      (revision 164243)
> +++ gcc/config/picochip/picochip.c      (working copy)
> @@ -117,6 +117,8 @@ picochip_asm_named_section (const char *
>
>  static rtx picochip_static_chain (const_tree, bool);
>
> +static void picochip_option_override (void);
> +
>  /* Lookup table mapping a register number to the earliest containing
>    class.  Used by REGNO_REG_CLASS.  */
>  const enum reg_class picochip_regno_reg_class[FIRST_PSEUDO_REGISTER] =
> @@ -301,8 +303,11 @@ static char picochip_get_vliw_alu_id (vo
>  #undef TARGET_STATIC_CHAIN
>  #define TARGET_STATIC_CHAIN picochip_static_chain
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE picochip_option_override
> +
>  #undef TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE
> -#define TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE picochip_override_options
> +#define TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE picochip_option_override
>
>  struct gcc_target targetm = TARGET_INITIALIZER;
>
> @@ -317,9 +322,13 @@ picochip_return_in_memory(const_tree typ
>   return ((unsigned HOST_WIDE_INT) int_size_in_bytes (type) > 4);
>  }
>
> -/* Allow certain command options to be overriden. */
> -void
> -picochip_override_options (void)
> +/* Allow some options to be overriden.  In particular, the 2nd
> +   scheduling pass option is switched off, and a machine dependent
> +   reorganisation ensures that it is run later on, after the second
> +   jump optimisation. */
> +
> +static void
> +picochip_option_override (void)
>  {
>   /* If we are optimizing for stack, dont let inliner to inline functions
>      that could potentially increase stack size.*/
> @@ -1760,7 +1769,7 @@ picochip_asm_file_start (void)
>
>   /* Variable tracking should be run after all optimizations which change order
>      of insns.  It also needs a valid CFG.  This can't be done in
> -     picochip_override_options, because flag_var_tracking is finalized after
> +     picochip_option_override, because flag_var_tracking is finalized after
>      that.  */
>   picochip_flag_var_tracking = flag_var_tracking;
>   flag_var_tracking = 0;
> Index: gcc/config/picochip/picochip.h
> ===================================================================
> --- gcc/config/picochip/picochip.h      (revision 164243)
> +++ gcc/config/picochip/picochip.h      (working copy)
> @@ -1,5 +1,5 @@
>  /* Definitions of target machine for GNU compiler for picoChip
> -   Copyright (C) 2001, 2008 Free Software Foundation, Inc.
> +   Copyright (C) 2001, 2008, 2009, 2010 Free Software Foundation, Inc.
>
>    Contributed by picoChip Designs Ltd. (http://www.picochip.com)
>    Maintained by Daniel Towner (daniel.towner@picochip.com) and
> @@ -84,12 +84,6 @@ extern enum picochip_dfa_type picochip_s
>  #define TARGET_HAS_MAC_UNIT (picochip_has_mac_unit)
>  #define TARGET_HAS_MULTIPLY (picochip_has_mac_unit || picochip_has_mul_unit)
>
> -/* Allow some options to be overriden.  In particular, the 2nd
> -   scheduling pass option is switched off, and a machine dependent
> -   reorganisation ensures that it is run later on, after the second
> -   jump optimisation. */
> -#define OVERRIDE_OPTIONS picochip_override_options()
> -
>  #define CAN_DEBUG_WITHOUT_FP 1
>
>  #define TARGET_VERSION fprintf(stderr, "(picoChip)");
> Index: gcc/config/picochip/picochip-protos.h
> ===================================================================
> --- gcc/config/picochip/picochip-protos.h       (revision 164243)
> +++ gcc/config/picochip/picochip-protos.h       (working copy)
> @@ -1,6 +1,6 @@
>  /* Prototypes for exported functions defined in picochip.c
>
> -   Copyright (C) 2000, 2001, 2008 Free Software Foundation, Inc.
> +   Copyright (C) 2000, 2001, 2008, 2009, 2010 Free Software Foundation, Inc.
>    Contributed by picoChip Designs Ltd. (http://www.picochip.com)
>    Maintained by Daniel Towner (daniel.towner@picochip.com) and
>    Hariharan Sandanagobalane (hariharan@picochip.com).
> @@ -91,7 +91,6 @@ extern void picochip_expand_epilogue (in
>
>  extern void picochip_final_prescan_insn (rtx insn, rtx * operand, int num_operands);
>  extern const char *picochip_asm_output_opcode (FILE * f, const char *ptr);
> -extern void picochip_override_options (void);
>
>  extern int picochip_check_conditional_copy (rtx * operands);
>
> @@ -138,7 +137,7 @@ extern int picochip_flag_schedule_insns2
>  extern void picochip_asm_output_anchor (rtx symbol);
>
>  /* Instruction set capability flags.  These are initialised to the
> -   appropriate values by picochip_override_options, once the user has
> +   appropriate values by picochip_option_override, once the user has
>    selected a CPU type. */
>  extern bool picochip_has_mul_unit;
>  extern bool picochip_has_mac_unit;
> Index: gcc/config/arc/arc-protos.h
> ===================================================================
> --- gcc/config/arc/arc-protos.h (revision 164243)
> +++ gcc/config/arc/arc-protos.h (working copy)
> @@ -1,5 +1,5 @@
>  /* Definitions of target machine for GNU compiler, Argonaut ARC cpu.
> -   Copyright (C) 2000, 2004, 2007 Free Software Foundation, Inc.
> +   Copyright (C) 2000, 2004, 2007, 2010 Free Software Foundation, Inc.
>
>  This file is part of GCC.
>
> @@ -54,7 +54,6 @@ extern int shift_operator (rtx, enum mac
>  extern enum arc_function_type arc_compute_function_type (tree);
>
>
> -extern void arc_init (void);
>  extern unsigned int arc_compute_frame_size (int);
>  extern void arc_save_restore (FILE *, const char *, unsigned int,
>                              unsigned int, const char *);
> Index: gcc/config/arc/arc.c
> ===================================================================
> --- gcc/config/arc/arc.c        (revision 164243)
> +++ gcc/config/arc/arc.c        (working copy)
> @@ -1,6 +1,6 @@
>  /* Subroutines used for code generation on the Argonaut ARC cpu.
>    Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
> -   2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
> +   2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
>
>  This file is part of GCC.
>
> @@ -95,6 +95,7 @@ static bool arc_return_in_memory (const_
>  static bool arc_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
>                                   const_tree, bool);
>  static void arc_trampoline_init (rtx, tree, rtx);
> +static void arc_option_override (void);
>
>
>  /* ARC specific attributs.  */
> @@ -130,6 +131,9 @@ static const struct attribute_spec arc_a
>  #undef TARGET_HANDLE_OPTION
>  #define TARGET_HANDLE_OPTION arc_handle_option
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE arc_option_override
> +
>  #undef TARGET_RTX_COSTS
>  #define TARGET_RTX_COSTS arc_rtx_costs
>  #undef TARGET_ADDRESS_COST
> @@ -173,10 +177,11 @@ arc_handle_option (size_t code, const ch
>     }
>  }
>
> -/* Called by OVERRIDE_OPTIONS to initialize various things.  */
> +/* Implement TARGET_OPTION_OVERRIDE.
> +   These need to be done at start up.  It's convenient to do them here.  */
>
> -void
> -arc_init (void)
> +static void
> +arc_option_override (void)
>  {
>   char *tmp;
>
> Index: gcc/config/arc/arc.h
> ===================================================================
> --- gcc/config/arc/arc.h        (revision 164243)
> +++ gcc/config/arc/arc.h        (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions of target machine for GNU compiler, Argonaut ARC cpu.
>    Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005,
> -   2007, 2008, 2009 Free Software Foundation, Inc.
> +   2007, 2008, 2009, 2010 Free Software Foundation, Inc.
>
>  This file is part of GCC.
>
> @@ -82,24 +82,9 @@ extern int arc_cpu_type;
>  /* Check if CPU is an extension and set `arc_cpu_type' and `arc_mangle_cpu'
>    appropriately.  The result should be nonzero if the cpu is recognized,
>    otherwise zero.  This is intended to be redefined in a cover file.
> -   This is used by arc_init.  */
> +   This is used by arc_handle_option.  */
>  #define ARC_EXTENSION_CPU(cpu) 0
>
> -/* Sometimes certain combinations of command options do not make
> -   sense on a particular target machine.  You can define a macro
> -   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
> -   defined, is executed once just after all the command options have
> -   been parsed.
> -
> -   Don't use this macro to turn on various extra optimizations for
> -   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
> -
> -
> -#define OVERRIDE_OPTIONS \
> -do {                           \
> -  /* These need to be done at start up.  It's convenient to do them here.  */ \
> -  arc_init ();                 \
> -} while (0)
>
>  /* Target machine storage layout.  */
>
> Index: gcc/config/mcore/mcore-protos.h
> ===================================================================
> --- gcc/config/mcore/mcore-protos.h     (revision 164243)
> +++ gcc/config/mcore/mcore-protos.h     (working copy)
> @@ -1,5 +1,5 @@
>  /* Prototypes for exported functions defined in mcore.c
> -   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007
> +   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2009, 2010
>    Free Software Foundation, Inc.
>    Contributed by Nick Clifton (nickc@redhat.com)
>
> @@ -29,7 +29,6 @@ extern int          mcore_initial_elimin
>  extern int          mcore_byte_offset                  (unsigned int);
>  extern int          mcore_halfword_offset              (unsigned int);
>  extern int          mcore_const_trick_uses_not         (HOST_WIDE_INT);
> -extern void         mcore_override_options             (void);
>  extern int          mcore_dllexport_name_p             (const char *);
>  extern int          mcore_dllimport_name_p             (const char *);
>  extern int          mcore_naked_function_p             (void);
> Index: gcc/config/mcore/mcore.c
> ===================================================================
> --- gcc/config/mcore/mcore.c    (revision 164243)
> +++ gcc/config/mcore/mcore.c    (working copy)
> @@ -1,6 +1,6 @@
>  /* Output routines for Motorola MCore processor
>    Copyright (C) 1993, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008,
> -   2009 Free Software Foundation, Inc.
> +   2009, 2010 Free Software Foundation, Inc.
>
>    This file is part of GCC.
>
> @@ -149,6 +149,7 @@ static int        mcore_arg_partial_byte
>                                                 tree, bool);
>  static void       mcore_asm_trampoline_template (FILE *);
>  static void       mcore_trampoline_init                (rtx, tree, rtx);
> +static void       mcore_option_override                (void);
>
>  /* MCore specific attributes.  */
>
> @@ -225,6 +226,9 @@ static const struct attribute_spec mcore
>  #undef  TARGET_TRAMPOLINE_INIT
>  #define TARGET_TRAMPOLINE_INIT         mcore_trampoline_init
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE mcore_option_override
> +
>  struct gcc_target targetm = TARGET_INITIALIZER;
>
>  /* Adjust the stack and return the number of bytes taken to do it.  */
> @@ -2679,8 +2683,8 @@ mcore_is_same_reg (rtx x, rtx y)
>   return 0;
>  }
>
> -void
> -mcore_override_options (void)
> +static void
> +mcore_option_override (void)
>  {
>   /* Only the m340 supports little endian code.  */
>   if (TARGET_LITTLE_END && ! TARGET_M340)
> Index: gcc/config/mcore/mcore.h
> ===================================================================
> --- gcc/config/mcore/mcore.h    (revision 164243)
> +++ gcc/config/mcore/mcore.h    (working copy)
> @@ -1,7 +1,7 @@
>  /* Definitions of target machine for GNU compiler,
>    for Motorola M*CORE Processor.
>    Copyright (C) 1993, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
> -   2008, 2009 Free Software Foundation, Inc.
> +   2008, 2009, 2010 Free Software Foundation, Inc.
>
>    This file is part of GCC.
>
> @@ -110,11 +110,6 @@ extern char * mcore_current_function_nam
>     }                                          \
>  }
>
> -/* What options are we going to force to specific settings,
> -   regardless of what the user thought he wanted.
> -   We also use this for some post-processing of options.  */
> -#define OVERRIDE_OPTIONS  mcore_override_options ()
> -
>  /* Target machine storage Layout.  */
>
>  #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE)      \
> Index: gcc/config/score/score3.c
> ===================================================================
> --- gcc/config/score/score3.c   (revision 164243)
> +++ gcc/config/score/score3.c   (working copy)
> @@ -1,5 +1,5 @@
>  /* score3.c for Sunplus S+CORE processor
> -   Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
> +   Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
>    Contributed by Sunnorth
>
>    This file is part of GCC.
> @@ -635,9 +635,9 @@ score3_asm_file_end (void)
>     }
>  }
>
> -/* Implement OVERRIDE_OPTIONS macro.  */
> +/* Implement TARGET_OPTION_OVERRIDE hook.  */
>  void
> -score3_override_options (void)
> +score3_option_override (void)
>  {
>   flag_pic = false;
>   if (!flag_pic)
> Index: gcc/config/score/score7.c
> ===================================================================
> --- gcc/config/score/score7.c   (revision 164243)
> +++ gcc/config/score/score7.c   (working copy)
> @@ -1,5 +1,5 @@
>  /* score7.c for Sunplus S+CORE processor
> -   Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
> +   Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
>    Contributed by Sunnorth
>
>    This file is part of GCC.
> @@ -634,9 +634,9 @@ score7_asm_file_end (void)
>     }
>  }
>
> -/* Implement OVERRIDE_OPTIONS macro.  */
> +/* Implement TARGET_OPTION_OVERRIDE hook.  */
>  void
> -score7_override_options (void)
> +score7_option_override (void)
>  {
>   flag_pic = false;
>   if (!flag_pic)
> Index: gcc/config/score/score3.h
> ===================================================================
> --- gcc/config/score/score3.h   (revision 164243)
> +++ gcc/config/score/score3.h   (working copy)
> @@ -1,5 +1,5 @@
>  /* score3.h for Sunplus S+CORE processor
> -   Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
> +   Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
>    Contributed by Sunnorth
>
>    This file is part of GCC.
> @@ -90,7 +90,7 @@ extern section *score3_select_rtx_sectio
>  extern bool score3_in_small_data_p (tree decl);
>  extern void score3_asm_file_start (void);
>  extern void score3_asm_file_end (void);
> -extern void score3_override_options (void);
> +extern void score3_option_override (void);
>  extern int score3_reg_class (int regno);
>  extern enum reg_class score3_preferred_reload_class (rtx x ATTRIBUTE_UNUSED,
>                                                      enum reg_class rclass);
> Index: gcc/config/score/score-protos.h
> ===================================================================
> --- gcc/config/score/score-protos.h     (revision 164243)
> +++ gcc/config/score/score-protos.h     (working copy)
> @@ -1,5 +1,5 @@
>  /* score-protos.h for Sunplus S+CORE processor
> -   Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
> +   Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
>
>    This file is part of GCC.
>
> @@ -59,7 +59,6 @@ extern void score_init_cumulative_args (
>  extern void score_declare_object (FILE *stream, const char *name,
>                                   const char *directive, const char *fmt, ...);
>  extern int score_output_external (FILE *file, tree decl, const char *name);
> -extern void score_override_options (void);
>  extern enum reg_class score_secondary_reload_class (enum reg_class rclass,
>                                                     enum machine_mode mode,
>                                                     rtx x);
> Index: gcc/config/score/score7.h
> ===================================================================
> --- gcc/config/score/score7.h   (revision 164243)
> +++ gcc/config/score/score7.h   (working copy)
> @@ -1,5 +1,5 @@
>  /* score7.h for Sunplus S+CORE processor
> -   Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
> +   Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
>    Contributed by Sunnorth
>
>    This file is part of GCC.
> @@ -90,7 +90,7 @@ extern section *score7_select_rtx_sectio
>  extern bool score7_in_small_data_p (tree decl);
>  extern void score7_asm_file_start (void);
>  extern void score7_asm_file_end (void);
> -extern void score7_override_options (void);
> +extern void score7_option_override (void);
>  extern int score7_reg_class (int regno);
>  extern enum reg_class score7_preferred_reload_class (rtx x ATTRIBUTE_UNUSED,
>                                                      enum reg_class rclass);
> Index: gcc/config/score/score.c
> ===================================================================
> --- gcc/config/score/score.c    (revision 164243)
> +++ gcc/config/score/score.c    (working copy)
> @@ -51,6 +51,8 @@
>  #include "score3.h"
>  #include "df.h"
>
> +static void score_option_override (void);
> +
>  #undef  TARGET_ASM_FILE_START
>  #define TARGET_ASM_FILE_START           score_asm_file_start
>
> @@ -67,6 +69,8 @@
>  #define TARGET_DEFAULT_TARGET_FLAGS     TARGET_DEFAULT
>  #undef TARGET_HANDLE_OPTION
>  #define TARGET_HANDLE_OPTION            score_handle_option
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE          score_option_override
>
>  #undef TARGET_LEGITIMIZE_ADDRESS
>  #define TARGET_LEGITIMIZE_ADDRESS      score_legitimize_address
> @@ -351,16 +355,16 @@ score_handle_option (size_t code, const
>     }
>  }
>
> -/* Implement OVERRIDE_OPTIONS macro.  */
> -void
> -score_override_options (void)
> +/* Implement TARGET_OPTION_OVERRIDE hook.  */
> +static void
> +score_option_override (void)
>  {
>   if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
> -    return score7_override_options ();
> +    return score7_option_override ();
>   else if (TARGET_SCORE3)
> -    return score3_override_options ();
> +    return score3_option_override ();
>
> -  return score7_override_options ();
> +  return score7_option_override ();
>  }
>
>  /* Implement REGNO_REG_CLASS macro.  */
> Index: gcc/config/score/score.h
> ===================================================================
> --- gcc/config/score/score.h    (revision 164243)
> +++ gcc/config/score/score.h    (working copy)
> @@ -1,5 +1,5 @@
>  /* score.h for Sunplus S+CORE processor
> -   Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
> +   Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
>    Contributed by Sunnorth.
>
>    This file is part of GCC.
> @@ -98,8 +98,6 @@
>  #define TARGET_VERSION \
>       fprintf (stderr, "Sunplus S+core rev=%s", SCORE_GCC_VERSION);
>
> -#define OVERRIDE_OPTIONS       score_override_options ()
> -
>  /* Show we can debug even without a frame pointer.  */
>  #define CAN_DEBUG_WITHOUT_FP
>
> @@ -235,7 +233,7 @@
>
>    Regarding coprocessor registers: without evidence to the contrary,
>    it's best to assume that each coprocessor register has a unique
> -   use.  This can be overridden, in, e.g., override_options() or
> +   use.  This can be overridden, in, e.g., TARGET_OPTION_OVERRIDE or
>    CONDITIONAL_REGISTER_USAGE should the assumption be inappropriate
>    for a particular target.  */
>
> Index: gcc/config/arm/arm.c
> ===================================================================
> --- gcc/config/arm/arm.c        (revision 164243)
> +++ gcc/config/arm/arm.c        (working copy)
> @@ -215,6 +215,7 @@ static void arm_init_libfuncs (void);
>  static tree arm_build_builtin_va_list (void);
>  static void arm_expand_builtin_va_start (tree, rtx);
>  static tree arm_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *);
> +static void arm_option_override (void);
>  static bool arm_handle_option (size_t, const char *, int);
>  static void arm_target_help (void);
>  static unsigned HOST_WIDE_INT arm_shift_truncation_mask (enum machine_mode);
> @@ -317,6 +318,8 @@ static const struct attribute_spec arm_a
>  #define TARGET_HANDLE_OPTION arm_handle_option
>  #undef  TARGET_HELP
>  #define TARGET_HELP arm_target_help
> +#undef  TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE arm_option_override
>
>  #undef  TARGET_COMP_TYPE_ATTRIBUTES
>  #define TARGET_COMP_TYPE_ATTRIBUTES arm_comp_type_attributes
> @@ -1372,13 +1375,16 @@ arm_target_help (void)
>
>  }
>
> -/* Fix up any incompatible options that the user has specified.
> -   This has now turned into a maze.  */
> -void
> -arm_override_options (void)
> +/* Fix up any incompatible options that the user has specified.  */
> +static void
> +arm_option_override (void)
>  {
>   unsigned i;
>
> +#ifdef SUBTARGET_OVERRIDE_OPTIONS
> +  SUBTARGET_OVERRIDE_OPTIONS;
> +#endif
> +
>   if (arm_selected_arch)
>     {
>       if (arm_selected_cpu)
> Index: gcc/config/arm/arm.h
> ===================================================================
> --- gcc/config/arm/arm.h        (revision 164243)
> +++ gcc/config/arm/arm.h        (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions of target machine for GNU compiler, for ARM.
>    Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
> -   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
> +   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
>    Free Software Foundation, Inc.
>    Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
>    and Martin Simmons (@harleqn.co.uk).
> @@ -498,8 +498,6 @@ extern int arm_arch_hwdiv;
>    that is controlled by the APCS-FRAME option.  */
>  #define CAN_DEBUG_WITHOUT_FP
>
> -#define OVERRIDE_OPTIONS  arm_override_options ()
> -
>  #define OPTIMIZATION_OPTIONS(LEVEL,SIZE)               \
>        arm_optimization_options ((LEVEL), (SIZE))
>
> Index: gcc/config/arm/arm-protos.h
> ===================================================================
> --- gcc/config/arm/arm-protos.h (revision 164243)
> +++ gcc/config/arm/arm-protos.h (working copy)
> @@ -1,6 +1,6 @@
>  /* Prototypes for exported functions defined in arm.c and pe.c
>    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
> -   2009 Free Software Foundation, Inc.
> +   2009, 2010 Free Software Foundation, Inc.
>    Contributed by Richard Earnshaw (rearnsha@arm.com)
>    Minor hacks by Nick Clifton (nickc@cygnus.com)
>
> @@ -23,7 +23,6 @@
>  #ifndef GCC_ARM_PROTOS_H
>  #define GCC_ARM_PROTOS_H
>
> -extern void arm_override_options (void);
>  extern void arm_optimization_options (int, int);
>  extern int use_return_insn (int, rtx);
>  extern enum reg_class arm_regno_class (int);
> Index: gcc/config/arm/arm.md
> ===================================================================
> --- gcc/config/arm/arm.md       (revision 164243)
> +++ gcc/config/arm/arm.md       (working copy)
> @@ -333,7 +333,7 @@
>         (const_string "alu")))
>
>  ; Load scheduling, set from the arm_ld_sched variable
> -; initialized by arm_override_options()
> +; initialized by arm_option_override()
>  (define_attr "ldsched" "no,yes" (const (symbol_ref "arm_ld_sched")))
>
>  ;; Classification of NEON instructions for scheduling purposes.
> Index: gcc/config/arm/vxworks.h
> ===================================================================
> --- gcc/config/arm/vxworks.h    (revision 164243)
> +++ gcc/config/arm/vxworks.h    (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions of target machine for GCC,
>    for ARM with targetting the VXWorks run time environment.
> -   Copyright (C) 1999, 2000, 2003, 2004, 2007, 2008
> +   Copyright (C) 1999, 2000, 2003, 2004, 2007, 2008, 2009, 2010
>    Free Software Foundation, Inc.
>
>    Contributed by: Mike Stump <mrs@wrs.com>
> @@ -44,14 +44,8 @@ along with GCC; see the file COPYING3.
>     VXWORKS_OS_CPP_BUILTINS ();                        \
>   } while (0)
>
> -#undef OVERRIDE_OPTIONS
> -#define OVERRIDE_OPTIONS                       \
> -  do                                           \
> -    {                                          \
> -      VXWORKS_OVERRIDE_OPTIONS;                        \
> -      arm_override_options ();                 \
> -    }                                          \
> -  while (0)
> +#undef SUBTARGET_OVERRIDE_OPTIONS
> +#define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS
>
>  /* Subsume the arm/elf.h definition, and add RTP hooks.  */
>  #undef SUBTARGET_CPP_SPEC
> Index: gcc/config/vax/vax.c
> ===================================================================
> --- gcc/config/vax/vax.c        (revision 164243)
> +++ gcc/config/vax/vax.c        (working copy)
> @@ -1,6 +1,6 @@
>  /* Subroutines for insn-output.c for VAX.
>    Copyright (C) 1987, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002,
> -   2004, 2005, 2006, 2007, 2008, 2009
> +   2004, 2005, 2006, 2007, 2008, 2009, 2010
>    Free Software Foundation, Inc.
>
>  This file is part of GCC.
> @@ -46,6 +46,7 @@ along with GCC; see the file COPYING3.
>  #include "target.h"
>  #include "target-def.h"
>
> +static void vax_option_override (void);
>  static bool vax_legitimate_address_p (enum machine_mode, rtx, bool);
>  static void vax_output_function_prologue (FILE *, HOST_WIDE_INT);
>  static void vax_file_start (void);
> @@ -111,16 +112,23 @@ static int vax_return_pops_args (tree, t
>  #undef TARGET_RETURN_POPS_ARGS
>  #define TARGET_RETURN_POPS_ARGS vax_return_pops_args
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE vax_option_override
> +
>  struct gcc_target targetm = TARGET_INITIALIZER;
>
>  /* Set global variables as needed for the options enabled.  */
>
> -void
> -override_options (void)
> +static void
> +vax_option_override (void)
>  {
>   /* We're VAX floating point, not IEEE floating point.  */
>   if (TARGET_G_FLOAT)
>     REAL_MODE_FORMAT (DFmode) = &vax_g_format;
> +
> +#ifdef SUBTARGET_OVERRIDE_OPTIONS
> +  SUBTARGET_OVERRIDE_OPTIONS;
> +#endif
>  }
>
>  /* Generate the assembly code for function entry.  FILE is a stdio
> Index: gcc/config/vax/vax.h
> ===================================================================
> --- gcc/config/vax/vax.h        (revision 164243)
> +++ gcc/config/vax/vax.h        (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions of target machine for GNU compiler.  VAX version.
>    Copyright (C) 1987, 1988, 1991, 1993, 1994, 1995, 1996, 1997, 1998,
> -   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
> +   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
>    Free Software Foundation, Inc.
>
>  This file is part of GCC.
> @@ -72,8 +72,6 @@ along with GCC; see the file COPYING3.
>  #define TARGET_DEFAULT (MASK_UNIX_ASM)
>  #endif
>
> -#define OVERRIDE_OPTIONS override_options ()
> -
>
>  /* Target machine storage layout */
>
> Index: gcc/config/vax/elf.h
> ===================================================================
> --- gcc/config/vax/elf.h        (revision 164243)
> +++ gcc/config/vax/elf.h        (working copy)
> @@ -1,5 +1,6 @@
>  /* Target definitions for GNU compiler for VAX using ELF
> -   Copyright (C) 2002, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
> +   Copyright (C) 2002, 2004, 2005, 2007, 2008, 2009, 2010
> +   Free Software Foundation, Inc.
>    Contributed by Matt Thomas <matt@3am-software.com>
>
>  This file is part of GCC.
> @@ -72,13 +73,10 @@ along with GCC; see the file COPYING3.
>  #undef  ASM_OUTPUT_BEFORE_CASE_LABEL
>  #define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE, PREFIX, NUM, TABLE)
>
> -#undef OVERRIDE_OPTIONS
> -#define OVERRIDE_OPTIONS                               \
> +#undef SUBTARGET_OVERRIDE_OPTIONS
> +#define SUBTARGET_OVERRIDE_OPTIONS                     \
>   do                                                   \
>     {                                                  \
> -      /* Do generic VAX overrides.  */                 \
> -      override_options ();                             \
> -                                                       \
>       /* Turn off function CSE if we're doing PIC.  */ \
>       if (flag_pic)                                    \
>        flag_no_function_cse = 1;                       \
> Index: gcc/config/vax/vax-protos.h
> ===================================================================
> --- gcc/config/vax/vax-protos.h (revision 164243)
> +++ gcc/config/vax/vax-protos.h (working copy)
> @@ -1,5 +1,6 @@
>  /* Definitions of target machine for GNU compiler.  VAX version.
> -   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
> +   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2009, 2010
> +   Free Software Foundation, Inc.
>
>  This file is part of GCC.
>
> @@ -17,8 +18,6 @@ You should have received a copy of the G
>  along with GCC; see the file COPYING3.  If not see
>  <http://www.gnu.org/licenses/>.  */
>
> -extern void override_options (void);
> -
>  extern bool legitimate_constant_address_p (rtx);
>  extern bool legitimate_constant_p (rtx);
>  extern bool vax_mode_dependent_address_p (rtx);
> Index: gcc/config/h8300/h8300.c
> ===================================================================
> --- gcc/config/h8300/h8300.c    (revision 164243)
> +++ gcc/config/h8300/h8300.c    (working copy)
> @@ -305,8 +305,8 @@ enum h8_cpu
>
>  /* Initialize various cpu specific globals at start up.  */
>
> -void
> -h8300_init_once (void)
> +static void
> +h8300_option_override (void)
>  {
>   static const char *const h8_push_ops[2] = { "push" , "push.l" };
>   static const char *const h8_pop_ops[2]  = { "pop"  , "pop.l"  };
> @@ -5922,4 +5922,7 @@ h8300_trampoline_init (rtx m_tramp, tree
>  #undef TARGET_TRAMPOLINE_INIT
>  #define TARGET_TRAMPOLINE_INIT h8300_trampoline_init
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE h8300_option_override
> +
>  struct gcc_target targetm = TARGET_INITIALIZER;
> Index: gcc/config/h8300/h8300.h
> ===================================================================
> --- gcc/config/h8300/h8300.h    (revision 164243)
> +++ gcc/config/h8300/h8300.h    (working copy)
> @@ -1,7 +1,7 @@
>  /* Definitions of target machine for GNU compiler.
>    Renesas H8/300 (generic)
>    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1996, 1997, 1998, 1999,
> -   2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
> +   2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
>    Free Software Foundation, Inc.
>    Contributed by Steve Chamberlain (sac@cygnus.com),
>    Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com).
> @@ -129,15 +129,6 @@ extern const char * const *h8_reg_names;
>  #endif
>  #endif /* !IN_LIBGCC2 */
>
> -/* Do things that must be done once at start up.  */
> -
> -#define OVERRIDE_OPTIONS                       \
> -  do                                           \
> -    {                                          \
> -      h8300_init_once ();                      \
> -    }                                          \
> -  while (0)
> -
>  /* Default target_flags if no switches specified.  */
>
>  #ifndef TARGET_DEFAULT
> Index: gcc/config/h8300/h8300-protos.h
> ===================================================================
> --- gcc/config/h8300/h8300-protos.h     (revision 164243)
> +++ gcc/config/h8300/h8300-protos.h     (working copy)
> @@ -1,6 +1,7 @@
>  /* Definitions of target machine for GNU compiler.
>    Renesas H8/300 version
> -   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
> +   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2009, 2010
> +   Free Software Foundation, Inc.
>    Contributed by Steve Chamberlain (sac@cygnus.com),
>    Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com).
>
> @@ -95,7 +96,6 @@ extern int h8300_eightbit_data_p (tree);
>  extern int h8300_tiny_data_p (tree);
>  #endif /* TREE_CODE */
>
> -extern void h8300_init_once (void);
>  extern int h8300_can_use_return_insn_p (void);
>  extern void h8300_expand_prologue (void);
>  extern void h8300_expand_epilogue (void);
> Index: gcc/config/vxworks.c
> ===================================================================
> --- gcc/config/vxworks.c        (revision 164243)
> +++ gcc/config/vxworks.c        (working copy)
> @@ -1,5 +1,5 @@
>  /* Common VxWorks target definitions for GNU compiler.
> -   Copyright (C) 2007, 2008
> +   Copyright (C) 2007, 2008, 2010
>    Free Software Foundation, Inc.
>    Contributed by CodeSourcery, Inc.
>
> @@ -120,7 +120,7 @@ vxworks_emutls_var_init (tree var, tree
>   return build_constructor (type, v);
>  }
>
> -/* Do VxWorks-specific parts of OVERRIDE_OPTIONS.  */
> +/* Do VxWorks-specific parts of TARGET_OPTION_OVERRIDE.  */
>
>  void
>  vxworks_override_options (void)
> Index: gcc/config/vxworks.h
> ===================================================================
> --- gcc/config/vxworks.h        (revision 164243)
> +++ gcc/config/vxworks.h        (working copy)
> @@ -1,5 +1,5 @@
>  /* Common VxWorks target definitions for GNU compiler.
> -   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
> +   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010
>    Free Software Foundation, Inc.
>    Contributed by Wind River Systems.
>    Rewritten by CodeSourcery, LLC.
> @@ -84,7 +84,7 @@ along with GCC; see the file COPYING3.
>  #define        VXWORKS_STARTFILE_SPEC "%{mrtp:%{!shared:-l:crt0.o}}"
>  #define VXWORKS_ENDFILE_SPEC ""
>
> -/* Do VxWorks-specific parts of OVERRIDE_OPTIONS.  */
> +/* Do VxWorks-specific parts of TARGET_OPTION_OVERRIDE.  */
>  #undef VXWORKS_OVERRIDE_OPTIONS
>  #define VXWORKS_OVERRIDE_OPTIONS vxworks_override_options ()
>  extern void vxworks_override_options (void);
> Index: gcc/config/mmix/mmix.h
> ===================================================================
> --- gcc/config/mmix/mmix.h      (revision 164243)
> +++ gcc/config/mmix/mmix.h      (working copy)
> @@ -149,8 +149,6 @@ extern int target_flags;
>  #define TARGET_VERSION \
>   fprintf (stderr, " (MMIX)")
>
> -#define OVERRIDE_OPTIONS mmix_override_options ()
> -
>  #define OPTIMIZATION_OPTIONS(LEVEL, SIZE)      \
>   do                                           \
>     {                                          \
> Index: gcc/config/mmix/mmix-protos.h
> ===================================================================
> --- gcc/config/mmix/mmix-protos.h       (revision 164243)
> +++ gcc/config/mmix/mmix-protos.h       (working copy)
> @@ -19,7 +19,6 @@ You should have received a copy of the G
>  along with GCC; see the file COPYING3.  If not see
>  <http://www.gnu.org/licenses/>.  */
>
> -extern void mmix_override_options (void);
>  extern void mmix_init_expanders (void);
>  extern int mmix_eh_return_data_regno (int);
>  extern int mmix_initial_elimination_offset (int, int);
> Index: gcc/config/mmix/mmix.c
> ===================================================================
> --- gcc/config/mmix/mmix.c      (revision 164243)
> +++ gcc/config/mmix/mmix.c      (working copy)
> @@ -113,6 +113,7 @@ rtx mmix_compare_op1;
>  /* Intermediate for insn output.  */
>  static int mmix_output_destination_register;
>
> +static void mmix_option_override (void);
>  static void mmix_asm_output_source_filename (FILE *, const char *);
>  static void mmix_output_shiftvalue_op_from_str
>   (FILE *, const char *, HOST_WIDEST_INT);
> @@ -233,15 +234,18 @@ static void mmix_trampoline_init (rtx, t
>  #undef TARGET_TRAMPOLINE_INIT
>  #define TARGET_TRAMPOLINE_INIT mmix_trampoline_init
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE mmix_option_override
> +
>  struct gcc_target targetm = TARGET_INITIALIZER;
>
>  /* Functions that are expansions for target macros.
>    See Target Macros in `Using and Porting GCC'.  */
>
> -/* OVERRIDE_OPTIONS.  */
> +/* TARGET_OPTION_OVERRIDE.  */
>
> -void
> -mmix_override_options (void)
> +static void
> +mmix_option_override (void)
>  {
>   /* Should we err or should we warn?  Hmm.  At least we must neutralize
>      it.  For example the wrong kind of case-tables will be generated with
> Index: gcc/config/bfin/bfin-protos.h
> ===================================================================
> --- gcc/config/bfin/bfin-protos.h       (revision 164243)
> +++ gcc/config/bfin/bfin-protos.h       (working copy)
> @@ -1,5 +1,5 @@
>  /* Prototypes for Blackfin functions used in the md file & elsewhere.
> -   Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
> +   Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
>
>    This file is part of GNU CC.
>
> @@ -99,13 +99,11 @@ extern enum reg_class secondary_output_r
>                                                     rtx);
>  extern char *section_asm_op_1 (SECT_ENUM_T);
>  extern char *section_asm_op (SECT_ENUM_T);
> -extern void override_options (void);
>  extern void print_operand (FILE *,  rtx, char);
>  extern void print_address_operand (FILE *, rtx);
>  extern void split_di (rtx [], int, rtx [], rtx []);
>  extern int split_load_immediate (rtx []);
>  extern void emit_pic_move (rtx *, Mmode);
> -extern void override_options (void);
>  extern void asm_conditional_branch (rtx, rtx *, int, int);
>  extern rtx bfin_gen_compare (rtx, Mmode);
>
> Index: gcc/config/bfin/bfin.c
> ===================================================================
> --- gcc/config/bfin/bfin.c      (revision 164243)
> +++ gcc/config/bfin/bfin.c      (working copy)
> @@ -358,7 +358,7 @@ output_file_start (void)
>
>   /* Variable tracking should be run after all optimizations which change order
>      of insns.  It also needs a valid CFG.  This can't be done in
> -     override_options, because flag_var_tracking is finalized after
> +     bfin_option_override, because flag_var_tracking is finalized after
>      that.  */
>   bfin_flag_var_tracking = flag_var_tracking;
>   flag_var_tracking = 0;
> @@ -2639,10 +2639,10 @@ bfin_init_machine_status (void)
>   return ggc_alloc_cleared_machine_function ();
>  }
>
> -/* Implement the macro OVERRIDE_OPTIONS.  */
> +/* Implement the TARGET_OPTION_OVERRIDE hook.  */
>
> -void
> -override_options (void)
> +static void
> +bfin_option_override (void)
>  {
>   /* If processor type is not specified, enable all workarounds.  */
>   if (bfin_cpu_type == BFIN_CPU_UNKNOWN)
> @@ -6626,6 +6626,9 @@ bfin_expand_builtin (tree exp, rtx targe
>  #undef TARGET_HANDLE_OPTION
>  #define TARGET_HANDLE_OPTION bfin_handle_option
>
> +#undef TARGET_OPTION_OVERRIDE
> +#define TARGET_OPTION_OVERRIDE bfin_option_override
> +
>  #undef TARGET_DEFAULT_TARGET_FLAGS
>  #define TARGET_DEFAULT_TARGET_FLAGS TARGET_DEFAULT
>
> Index: gcc/config/bfin/bfin.h
> ===================================================================
> --- gcc/config/bfin/bfin.h      (revision 164243)
> +++ gcc/config/bfin/bfin.h      (working copy)
> @@ -276,17 +276,6 @@ extern int target_flags;
>
>  extern const char *bfin_library_id_string;
>
> -/* Sometimes certain combinations of command options do not make
> -   sense on a particular target machine.  You can define a macro
> -   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
> -   defined, is executed once just after all the command options have
> -   been parsed.
> -
> -   Don't use this macro to turn on various extra optimizations for
> -   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
> -
> -#define OVERRIDE_OPTIONS override_options ()
> -
>  #define FUNCTION_MODE    SImode
>  #define Pmode            SImode
>
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
>
diff mbox

Patch

Index: gcc/doc/tm.texi
===================================================================
--- gcc/doc/tm.texi	(revision 164243)
+++ gcc/doc/tm.texi	(working copy)
@@ -773,24 +773,6 @@  description should define @code{TARGET_V
 @end smallexample
 @end defmac
 
-@defmac OVERRIDE_OPTIONS
-Sometimes certain combinations of command options do not make sense on
-a particular target machine.  You can define a macro
-@code{OVERRIDE_OPTIONS} to take account of this.  This macro, if
-defined, is executed once just after all the command options have been
-parsed.
-
-Don't use this macro to turn on various extra optimizations for
-@option{-O}.  That is what @code{OPTIMIZATION_OPTIONS} is for.
-
-If you need to do something whenever the optimization level is
-changed via the optimize attribute or pragma, see
-@code{TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE}
-
-This macros is obsolete, new ports should use the target hook
-@code{TARGET_OPTION_OVERRIDE} instead.
-@end defmac
-
 @deftypefn {Target Hook} void TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE (void)
 This target function is similar to the hook @code{TARGET_OPTION_OVERRIDE}
 but is called when the optimize level is changed via an attribute or
@@ -802,7 +784,8 @@  actions then, you should have @code{TARG
 @end deftypefn
 
 @defmac C_COMMON_OVERRIDE_OPTIONS
-This is similar to @code{OVERRIDE_OPTIONS} but is only used in the C
+This is similar to the @code{TARGET_OPTION_OVERRIDE} hook
+but is only used in the C
 language frontends (C, Objective-C, C++, Objective-C++) and so can be
 used to alter option flag variables which only exist in those
 frontends.
Index: gcc/doc/tm.texi.in
===================================================================
--- gcc/doc/tm.texi.in	(revision 164243)
+++ gcc/doc/tm.texi.in	(working copy)
@@ -773,24 +773,6 @@  description should define @code{TARGET_V
 @end smallexample
 @end defmac
 
-@defmac OVERRIDE_OPTIONS
-Sometimes certain combinations of command options do not make sense on
-a particular target machine.  You can define a macro
-@code{OVERRIDE_OPTIONS} to take account of this.  This macro, if
-defined, is executed once just after all the command options have been
-parsed.
-
-Don't use this macro to turn on various extra optimizations for
-@option{-O}.  That is what @code{OPTIMIZATION_OPTIONS} is for.
-
-If you need to do something whenever the optimization level is
-changed via the optimize attribute or pragma, see
-@code{TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE}
-
-This macros is obsolete, new ports should use the target hook
-@code{TARGET_OPTION_OVERRIDE} instead.
-@end defmac
-
 @hook TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE
 This target function is similar to the hook @code{TARGET_OPTION_OVERRIDE}
 but is called when the optimize level is changed via an attribute or
@@ -802,7 +784,8 @@  actions then, you should have @code{TARG
 @end deftypefn
 
 @defmac C_COMMON_OVERRIDE_OPTIONS
-This is similar to @code{OVERRIDE_OPTIONS} but is only used in the C
+This is similar to the @code{TARGET_OPTION_OVERRIDE} hook
+but is only used in the C
 language frontends (C, Objective-C, C++, Objective-C++) and so can be
 used to alter option flag variables which only exist in those
 frontends.
Index: gcc/targhooks.c
===================================================================
--- gcc/targhooks.c	(revision 164243)
+++ gcc/targhooks.c	(working copy)
@@ -919,14 +919,6 @@  default_secondary_reload (bool in_p ATTR
   return rclass;
 }
 
-void
-default_target_option_override (void)
-{
-#ifdef OVERRIDE_OPTIONS
-  OVERRIDE_OPTIONS;
-#endif
-}
-
 bool
 default_handle_c_option (size_t code ATTRIBUTE_UNUSED,
 			 const char *arg ATTRIBUTE_UNUSED,
Index: gcc/target.def
===================================================================
--- gcc/target.def	(revision 164243)
+++ gcc/target.def	(working copy)
@@ -2303,7 +2303,7 @@  DEFHOOK
 (override,
  "",
  void, (void),
- default_target_option_override)
+ hook_void_void)
 
 /* Function to determine if one function can inline another function.  */
 #undef HOOK_PREFIX
Index: gcc/machmode.def
===================================================================
--- gcc/machmode.def	(revision 164243)
+++ gcc/machmode.def	(working copy)
@@ -1,7 +1,7 @@ 
 /* This file contains the definitions and documentation for the
    machine modes used in the GNU compiler.
    Copyright (C) 1987, 1992, 1994, 1997, 1998, 2000, 2003, 2004, 2005,
-   2007  Free Software Foundation, Inc.
+   2007, 2010  Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -191,7 +191,7 @@  INT_MODE (TI, 16);
    that need 1-word, 2-word, 80-bit, or 128-bit float types respectively.
 
    These are the IEEE mappings.  They can be overridden with
-   RESET_FLOAT_FORMAT or at runtime (in OVERRIDE_OPTIONS).  */
+   RESET_FLOAT_FORMAT or at runtime (in TARGET_OPTION_OVERRIDE).  */
 
 FLOAT_MODE (SF, 4, ieee_single_format);
 FLOAT_MODE (DF, 8, ieee_double_format);
Index: gcc/genmodes.c
===================================================================
--- gcc/genmodes.c	(revision 164243)
+++ gcc/genmodes.c	(working copy)
@@ -1,5 +1,5 @@ 
 /* Generate the machine mode enumeration and associated tables.
-   Copyright (C) 2003, 2004, 2005, 2006, 2007
+   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -1160,7 +1160,7 @@  emit_real_format_for_mode (void)
      or not the table itself is constant.
 
      For backward compatibility this table is always writable
-     (several targets modify it in OVERRIDE_OPTIONS).   FIXME:
+     (several targets modify it in TARGET_OPTION_OVERRIDE).   FIXME:
      convert all said targets to use ADJUST_FORMAT instead.  */
 #if 0
   print_maybe_const_decl ("const struct real_format *%s",
Index: gcc/system.h
===================================================================
--- gcc/system.h	(revision 164243)
+++ gcc/system.h	(working copy)
@@ -715,7 +715,7 @@  extern void fancy_abort (const char *, i
 	ALLOCATE_INITIAL_VALUE LEGITIMIZE_ADDRESS FRAME_POINTER_REQUIRED \
 	CAN_ELIMINATE TRAMPOLINE_TEMPLATE INITIALIZE_TRAMPOLINE		\
 	TRAMPOLINE_ADJUST_ADDRESS STATIC_CHAIN STATIC_CHAIN_INCOMING	\
-	RETURN_POPS_ARGS
+	RETURN_POPS_ARGS OVERRIDE_OPTIONS
 
 /* Other obsolete target macros, or macros that used to be in target
    headers and were not used, and may be obsolete or may never have
Index: gcc/config/alpha/vms.h
===================================================================
--- gcc/config/alpha/vms.h	(revision 164243)
+++ gcc/config/alpha/vms.h	(working copy)
@@ -1,6 +1,6 @@ 
 /* Output variables, constants and external declarations, for GNU compiler.
    Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2004, 2005, 2007, 2008,
-   2009
+   2009, 2010
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -337,17 +337,16 @@  typedef struct crtl_name_spec
 /* The VMS convention is to always provide minimal debug info
    for a traceback unless specifically overridden.  */
 
-#undef OVERRIDE_OPTIONS
-#define OVERRIDE_OPTIONS                            \
-{                                                   \
+#undef SUBTARGET_OVERRIDE_OPTIONS
+#define SUBTARGET_OVERRIDE_OPTIONS                  \
+do {                                                \
   if (write_symbols == NO_DEBUG                     \
       && debug_info_level == DINFO_LEVEL_NONE)      \
     {                                               \
       write_symbols = VMS_DEBUG;                    \
       debug_info_level = DINFO_LEVEL_TERSE;         \
     }                                               \
-   override_options ();                             \
-}
+} while (0)
 
 /* Link with vms-dwarf2.o if -g (except -g0). This causes the
    VMS link to pull all the dwarf2 debug sections together.  */
Index: gcc/config/alpha/alpha.c
===================================================================
--- gcc/config/alpha/alpha.c	(revision 164243)
+++ gcc/config/alpha/alpha.c	(working copy)
@@ -256,8 +256,8 @@  alpha_mangle_type (const_tree type)
 
 /* Parse target option strings.  */
 
-void
-override_options (void)
+static void
+alpha_option_override (void)
 {
   static const struct cpu_table {
     const char *const name;
@@ -283,6 +283,10 @@  override_options (void)
   int const ct_size = ARRAY_SIZE (cpu_table);
   int i;
 
+#ifdef SUBTARGET_OVERRIDE_OPTIONS
+  SUBTARGET_OVERRIDE_OPTIONS;
+#endif
+
   /* Unicos/Mk doesn't have shared libraries.  */
   if (TARGET_ABI_UNICOSMK && flag_pic)
     {
@@ -11144,6 +11148,9 @@  alpha_init_libfuncs (void)
 #undef TARGET_HANDLE_OPTION
 #define TARGET_HANDLE_OPTION alpha_handle_option
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE alpha_option_override
+
 #ifdef TARGET_ALTERNATE_LONG_DOUBLE_MANGLING
 #undef TARGET_MANGLE_TYPE
 #define TARGET_MANGLE_TYPE alpha_mangle_type
Index: gcc/config/alpha/alpha.h
===================================================================
--- gcc/config/alpha/alpha.h	(revision 164243)
+++ gcc/config/alpha/alpha.h	(working copy)
@@ -212,17 +212,6 @@  extern enum alpha_fp_trap_mode alpha_fpt
   {"cpu", "%{!mcpu=*:-mcpu=%(VALUE)}" }, \
   {"tune", "%{!mtune=*:-mtune=%(VALUE)}" }
 
-/* Sometimes certain combinations of command options do not make sense
-   on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
-
-   On the Alpha, it is used to translate target-option strings into
-   numeric values.  */
-
-#define OVERRIDE_OPTIONS override_options ()
-
 
 /* Define this macro to change register usage conditional on target flags.
 
Index: gcc/config/alpha/alpha-modes.def
===================================================================
--- gcc/config/alpha/alpha-modes.def	(revision 164243)
+++ gcc/config/alpha/alpha-modes.def	(working copy)
@@ -1,5 +1,5 @@ 
 /* Alpha extra machine modes. 
-   Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2007, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -17,7 +17,7 @@  You should have received a copy of the G
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
-/* 128-bit floating point.  This gets reset in alpha_override_options
+/* 128-bit floating point.  This gets reset in alpha_option_override
    if VAX float format is in use.  */
 FLOAT_MODE (TF, 16, ieee_quad_format);
 
Index: gcc/config/alpha/alpha-protos.h
===================================================================
--- gcc/config/alpha/alpha-protos.h	(revision 164243)
+++ gcc/config/alpha/alpha-protos.h	(working copy)
@@ -1,5 +1,5 @@ 
 /* Prototypes for alpha.c functions used in the md file & elsewhere.
-   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009
+   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -21,7 +21,6 @@  along with GCC; see the file COPYING3.  
 extern int alpha_next_sequence_number;
 
 extern void literal_section (void);
-extern void override_options (void);
 extern int zap_mask (HOST_WIDE_INT);
 extern int direct_return (void);
 
Index: gcc/config/frv/frv.h
===================================================================
--- gcc/config/frv/frv.h	(revision 164243)
+++ gcc/config/frv/frv.h	(working copy)
@@ -328,16 +328,6 @@ 
         #endif  */
 #define TARGET_VERSION fprintf (stderr, _(" (frv)"))
 
-/* Sometimes certain combinations of command options do not make sense on a
-   particular target machine.  You can define a macro `OVERRIDE_OPTIONS' to
-   take account of this.  This macro, if defined, is executed once just after
-   all the command options have been parsed.
-
-   Don't use this macro to turn on various extra optimizations for `-O'.  That
-   is what `OPTIMIZATION_OPTIONS' is for.  */
-
-#define OVERRIDE_OPTIONS frv_override_options ()
-
 /* Some machines may desire to change what optimizations are performed for
    various optimization levels.  This macro, if defined, is executed once just
    after the optimization level is determined and before the remainder of the
Index: gcc/config/frv/frv-protos.h
===================================================================
--- gcc/config/frv/frv-protos.h	(revision 164243)
+++ gcc/config/frv/frv-protos.h	(working copy)
@@ -38,7 +38,6 @@  extern frv_cpu_t frv_cpu_type;			/* valu
 /* Define functions defined in frv.c */
 extern void frv_expand_prologue			(void);
 extern void frv_expand_epilogue			(bool);
-extern void frv_override_options		(void);
 extern void frv_optimization_options		(int, int);
 extern void frv_conditional_register_usage	(void);
 extern frv_stack_t *frv_stack_info		(void);
Index: gcc/config/frv/frv.c
===================================================================
--- gcc/config/frv/frv.c	(revision 164243)
+++ gcc/config/frv/frv.c	(working copy)
@@ -264,6 +264,7 @@  frv_cpu_t frv_cpu_type = CPU_TYPE;	/* va
 /* Forward references */
 
 static bool frv_handle_option			(size_t, const char *, int);
+static void frv_option_override			(void);
 static bool frv_legitimate_address_p		(enum machine_mode, rtx, bool);
 static int frv_default_flags_for_cpu		(void);
 static int frv_string_begins_with		(const_tree, const char *);
@@ -428,6 +429,8 @@  static bool frv_class_likely_spilled_p 	
    | MASK_NESTED_CE)
 #undef TARGET_HANDLE_OPTION
 #define TARGET_HANDLE_OPTION frv_handle_option
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE frv_option_override
 #undef TARGET_INIT_BUILTINS
 #define TARGET_INIT_BUILTINS frv_init_builtins
 #undef TARGET_EXPAND_BUILTIN
@@ -669,17 +672,10 @@  frv_default_flags_for_cpu (void)
     }
 }
 
-/* Sometimes certain combinations of command options do not make
-   sense on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
+/* Implement TARGET_OPTION_OVERRIDE.  */
 
-   Don't use this macro to turn on various extra optimizations for
-   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
-
-void
-frv_override_options (void)
+static void
+frv_option_override (void)
 {
   int regno;
   unsigned int i;
Index: gcc/config/s390/s390.c
===================================================================
--- gcc/config/s390/s390.c	(revision 164243)
+++ gcc/config/s390/s390.c	(working copy)
@@ -1555,8 +1555,8 @@  s390_handle_option (size_t code, const c
     }
 }
 
-void
-override_options (void)
+static void
+s390_option_override (void)
 {
   /* Set up function hooks.  */
   init_machine_status = s390_init_machine_status;
@@ -10423,6 +10423,9 @@  s390_loop_unroll_adjust (unsigned nunrol
 #undef TARGET_HANDLE_OPTION
 #define TARGET_HANDLE_OPTION s390_handle_option
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE s390_option_override
+
 #undef	TARGET_ENCODE_SECTION_INFO
 #define TARGET_ENCODE_SECTION_INFO s390_encode_section_info
 
Index: gcc/config/s390/s390.h
===================================================================
--- gcc/config/s390/s390.h	(revision 164243)
+++ gcc/config/s390/s390.h	(working copy)
@@ -1,6 +1,6 @@ 
 /* Definitions of target machine for GNU compiler, for IBM S/390
    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2007, 2008, 2009 Free Software Foundation, Inc.
+   2007, 2008, 2009, 2010 Free Software Foundation, Inc.
    Contributed by Hartmut Penner (hpenner@de.ibm.com) and
                   Ulrich Weigand (uweigand@de.ibm.com).
                   Andreas Krebbel (Andreas.Krebbel@de.ibm.com)
@@ -149,9 +149,8 @@  extern int s390_arch_flags;
 #define TARGET_VERSION fprintf (stderr, " (S/390)");
 #endif
 
-/* Hooks to override options.  */
+/* Hook to override options.  */
 #define OPTIMIZATION_OPTIONS(LEVEL, SIZE) optimization_options(LEVEL, SIZE)
-#define OVERRIDE_OPTIONS override_options ()
 
 /* Frame pointer is not used for debugging.  */
 #define CAN_DEBUG_WITHOUT_FP
Index: gcc/config/s390/s390-protos.h
===================================================================
--- gcc/config/s390/s390-protos.h	(revision 164243)
+++ gcc/config/s390/s390-protos.h	(working copy)
@@ -1,5 +1,5 @@ 
 /* Definitions of target machine for GNU compiler, for IBM S/390.
-   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2008, 2009
+   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
 
    Contributed by Hartmut Penner (hpenner@de.ibm.com)
@@ -35,7 +35,6 @@  extern bool s390_check_symref_alignment 
 /* Declare functions in s390.c.  */
 
 extern void optimization_options (int, int);
-extern void override_options (void);
 extern HOST_WIDE_INT s390_initial_elimination_offset (int, int);
 extern void s390_emit_prologue (void);
 extern void s390_emit_epilogue (bool);
Index: gcc/config/spu/spu-protos.h
===================================================================
--- gcc/config/spu/spu-protos.h	(revision 164243)
+++ gcc/config/spu/spu-protos.h	(working copy)
@@ -21,7 +21,6 @@ 
 extern void spu_cpu_cpp_builtins (struct cpp_reader * pfile);
 extern void builtin_define_std (const char *);
 extern void spu_optimization_options (int level, int size);
-extern void spu_override_options (void);
 extern void spu_c_common_override_options (void);
 extern int valid_subreg (rtx op);
 extern void spu_expand_extv (rtx * ops, int unsignedp);
Index: gcc/config/spu/spu.c
===================================================================
--- gcc/config/spu/spu.c	(revision 164243)
+++ gcc/config/spu/spu.c	(working copy)
@@ -149,6 +149,7 @@  static struct spu_builtin_range spu_buil
 char regs_ever_allocated[FIRST_PSEUDO_REGISTER];
 
 /*  Prototypes and external defs.  */
+static void spu_option_override (void);
 static void spu_init_builtins (void);
 static tree spu_builtin_decl (unsigned, bool);
 static bool spu_scalar_mode_supported_p (enum machine_mode mode);
@@ -464,6 +465,9 @@  static const struct attribute_spec spu_a
 #undef TARGET_TRAMPOLINE_INIT
 #define TARGET_TRAMPOLINE_INIT spu_trampoline_init
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE spu_option_override
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 void
@@ -477,12 +481,9 @@  spu_optimization_options (int level ATTR
   flag_rename_registers = 1;
 }
 
-/* Sometimes certain combinations of command options do not make sense
-   on a particular target machine.  You can define a macro
-   OVERRIDE_OPTIONS to take account of this. This macro, if defined, is
-   executed once just after all the command options have been parsed.  */
-void
-spu_override_options (void)
+/* Implement TARGET_OPTION_OVERRIDE.  */
+static void
+spu_option_override (void)
 {
   /* Small loops will be unpeeled at -O3.  For SPU it is more important
      to keep code small by default.  */
Index: gcc/config/spu/spu.h
===================================================================
--- gcc/config/spu/spu.h	(revision 164243)
+++ gcc/config/spu/spu.h	(working copy)
@@ -20,7 +20,6 @@ 
 
 #define TARGET_VERSION fprintf (stderr, " (spu %s)", __DATE__);
 
-#define OVERRIDE_OPTIONS spu_override_options()
 #define C_COMMON_OVERRIDE_OPTIONS spu_c_common_override_options()
 
 #define OPTIMIZATION_OPTIONS(level,size) \
Index: gcc/config/sparc/sparc.c
===================================================================
--- gcc/config/sparc/sparc.c	(revision 164243)
+++ gcc/config/sparc/sparc.c	(working copy)
@@ -349,6 +349,7 @@  static HOST_WIDE_INT frame_base_offset;
 int sparc_indent_opcode = 0;
 
 static bool sparc_handle_option (size_t, const char *, int);
+static void sparc_option_override (void);
 static void sparc_init_modes (void);
 static void scan_record_type (tree, int *, int *, int *);
 static int function_arg_slotno (const CUMULATIVE_ARGS *, enum machine_mode,
@@ -591,6 +592,8 @@  static bool fpu_option_set = false;
 #define TARGET_DEFAULT_TARGET_FLAGS TARGET_DEFAULT
 #undef TARGET_HANDLE_OPTION
 #define TARGET_HANDLE_OPTION sparc_handle_option
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE sparc_option_override
 
 #if TARGET_GNU_TLS && defined(HAVE_AS_SPARC_UA_PCREL)
 #undef TARGET_ASM_OUTPUT_DWARF_DTPREL
@@ -647,8 +650,8 @@  sparc_handle_option (size_t code, const 
 /* Validate and override various options, and do some machine dependent
    initialization.  */
 
-void
-sparc_override_options (void)
+static void
+sparc_option_override (void)
 {
   static struct code_model {
     const char *const name;
@@ -724,6 +727,10 @@  sparc_override_options (void)
   const struct sparc_cpu_select *sel;
   int fpu;
 
+#ifdef SUBTARGET_OVERRIDE_OPTIONS
+  SUBTARGET_OVERRIDE_OPTIONS;
+#endif
+
 #ifndef SPARC_BI_ARCH
   /* Check for unsupported architecture size.  */
   if (! TARGET_64BIT != DEFAULT_ARCH32_P)
Index: gcc/config/sparc/sparc.h
===================================================================
--- gcc/config/sparc/sparc.h	(revision 164243)
+++ gcc/config/sparc/sparc.h	(working copy)
@@ -499,10 +499,6 @@  extern enum cmodel sparc_cmodel;
 
 /* Show we can debug even without a frame pointer.  */
 #define CAN_DEBUG_WITHOUT_FP
-
-/* Option handling.  */
-
-#define OVERRIDE_OPTIONS  sparc_override_options ()
 
 /* Mask of all CPU selection flags.  */
 #define MASK_ISA \
Index: gcc/config/sparc/vxworks.h
===================================================================
--- gcc/config/sparc/vxworks.h	(revision 164243)
+++ gcc/config/sparc/vxworks.h	(working copy)
@@ -1,6 +1,6 @@ 
 /* Definitions of target machine for GNU compiler,
    for SPARC targeting the VxWorks run time environment.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -27,14 +27,8 @@  along with GCC; see the file COPYING3.  
     }						\
   while (0)
 
-#undef OVERRIDE_OPTIONS
-#define OVERRIDE_OPTIONS			\
-  do						\
-    {						\
-      VXWORKS_OVERRIDE_OPTIONS;			\
-      sparc_override_options ();		\
-    }						\
-  while (0)
+#undef SUBTARGET_OVERRIDE_OPTIONS
+#define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS
 
 #undef CPP_SUBTARGET_SPEC
 #define CPP_SUBTARGET_SPEC VXWORKS_ADDITIONAL_CPP_SPEC
Index: gcc/config/mep/mep-protos.h
===================================================================
--- gcc/config/mep/mep-protos.h	(revision 164243)
+++ gcc/config/mep/mep-protos.h	(working copy)
@@ -21,7 +21,6 @@  along with GCC; see the file COPYING3.  
 
 extern void mep_conditional_register_usage (char *, char *);
 extern void mep_optimization_options (void);
-extern void mep_override_options (void);
 extern int mep_regno_reg_class (int);
 extern int mep_reg_class_from_constraint (int, const char *);
 extern bool mep_const_ok_for_letter_p (HOST_WIDE_INT, int);
Index: gcc/config/mep/mep.c
===================================================================
--- gcc/config/mep/mep.c	(revision 164243)
+++ gcc/config/mep/mep.c	(working copy)
@@ -220,6 +220,7 @@  static bool mep_pass_by_reference (CUMUL
 				   const_tree, bool);
 static bool mep_vector_mode_supported_p (enum machine_mode);
 static bool mep_handle_option (size_t, const char *, int);
+static void mep_option_override (void);
 static rtx  mep_allocate_initial_value (rtx);
 static void mep_asm_init_sections (void);
 static int mep_comp_type_attributes (const_tree, const_tree);
@@ -283,6 +284,8 @@  static void mep_trampoline_init (rtx, tr
 #define TARGET_VECTOR_MODE_SUPPORTED_P	mep_vector_mode_supported_p
 #undef  TARGET_HANDLE_OPTION
 #define TARGET_HANDLE_OPTION            mep_handle_option
+#undef  TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE		mep_option_override
 #undef  TARGET_DEFAULT_TARGET_FLAGS
 #define TARGET_DEFAULT_TARGET_FLAGS	TARGET_DEFAULT
 #undef  TARGET_ALLOCATE_INITIAL_VALUE
@@ -381,8 +384,8 @@  mep_optimization_options (void)
   flag_omit_frame_pointer = 1;
 }
 
-void
-mep_override_options (void)
+static void
+mep_option_override (void)
 {
   if (flag_pic == 1)
     warning (OPT_fpic, "-fpic is not supported");
Index: gcc/config/mep/mep.h
===================================================================
--- gcc/config/mep/mep.h	(revision 164243)
+++ gcc/config/mep/mep.h	(working copy)
@@ -134,8 +134,6 @@  extern int target_flags;
 
 #define TARGET_VERSION fprintf (stderr, " (Toshiba Media Processor (MeP))");
 
-#define OVERRIDE_OPTIONS mep_override_options ();
-
 /* The MeP config tool will add TARGET_OPTION_TRANSLATE_TABLE here.  */
 #define TARGET_OPTION_TRANSLATE_TABLE \
   {"-mall-opts", "-maverage -mmult -mdiv -mbitops -mleadz \
Index: gcc/config/m32r/m32r.c
===================================================================
--- gcc/config/m32r/m32r.c	(revision 164243)
+++ gcc/config/m32r/m32r.c	(working copy)
@@ -63,6 +63,7 @@  enum m32r_sdata m32r_sdata = M32R_SDATA_
 
 /* Forward declaration.  */
 static bool  m32r_handle_option (size_t, const char *, int);
+static void  m32r_option_override (void);
 static void  init_reg_tables (void);
 static void  block_move_call (rtx, rtx, rtx);
 static int   m32r_is_insn (rtx);
@@ -150,6 +151,8 @@  static const struct attribute_spec m32r_
 #define TARGET_DEFAULT_TARGET_FLAGS TARGET_CPU_DEFAULT
 #undef  TARGET_HANDLE_OPTION
 #define TARGET_HANDLE_OPTION m32r_handle_option
+#undef  TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE m32r_option_override
 
 #undef  TARGET_ENCODE_SECTION_INFO
 #define TARGET_ENCODE_SECTION_INFO m32r_encode_section_info
@@ -251,7 +254,7 @@  m32r_handle_option (size_t code, const c
     }
 }
 
-/* Called by OVERRIDE_OPTIONS to initialize various things.  */
+/* Called by m32r_option_override to initialize various things.  */
 
 void
 m32r_init (void)
@@ -268,6 +271,15 @@  m32r_init (void)
     g_switch_value = SDATA_DEFAULT_SIZE;
 }
 
+static void
+m32r_option_override (void)
+{
+  /* These need to be done at start up.
+     It's convenient to do them here.  */
+  m32r_init ();
+  SUBTARGET_OVERRIDE_OPTIONS;
+}
+
 /* Vectors to keep interesting information about registers where it can easily
    be got.  We use to use the actual mode value as the bit number, but there
    is (or may be) more than 32 modes now.  Instead we use two tables: one
Index: gcc/config/m32r/m32r.h
===================================================================
--- gcc/config/m32r/m32r.h	(revision 164243)
+++ gcc/config/m32r/m32r.h	(working copy)
@@ -302,29 +302,10 @@  extern enum m32r_sdata m32r_sdata;
 #define MULTILIB_DEFAULTS { "mmodel=small" SUBTARGET_MULTILIB_DEFAULTS }
 #endif
 
-/* Sometimes certain combinations of command options do not make
-   sense on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
-
-   Don't use this macro to turn on various extra optimizations for
-   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
-
 #ifndef SUBTARGET_OVERRIDE_OPTIONS
 #define SUBTARGET_OVERRIDE_OPTIONS
 #endif
 
-#define OVERRIDE_OPTIONS			\
-  do						\
-    {						\
-      /* These need to be done at start up.	\
-	 It's convenient to do them here.  */	\
-      m32r_init ();				\
-      SUBTARGET_OVERRIDE_OPTIONS		\
-    }						\
-  while (0)
-
 #ifndef SUBTARGET_OPTIMIZATION_OPTIONS
 #define SUBTARGET_OPTIMIZATION_OPTIONS
 #endif
Index: gcc/config/i386/i386.h
===================================================================
--- gcc/config/i386/i386.h	(revision 164243)
+++ gcc/config/i386/i386.h	(working copy)
@@ -503,17 +503,6 @@  extern enum calling_abi ix86_abi;
    with the rounding mode forced to 53 bits.  */
 #define TARGET_96_ROUND_53_LONG_DOUBLE 0
 
-/* Sometimes certain combinations of command options do not make
-   sense on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
-
-   Don't use this macro to turn on various extra optimizations for
-   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
-
-#define OVERRIDE_OPTIONS override_options (true)
-
 /* Define this to change the optimizations performed by default.  */
 #define OPTIMIZATION_OPTIONS(LEVEL, SIZE) \
   optimization_options ((LEVEL), (SIZE))
Index: gcc/config/i386/linux64.h
===================================================================
--- gcc/config/i386/linux64.h	(revision 164243)
+++ gcc/config/i386/linux64.h	(working copy)
@@ -42,7 +42,8 @@  see the files COPYING3 and COPYING.RUNTI
 
 /* The svr4 ABI for the i386 says that records and unions are returned
    in memory.  In the 64bit compilation we will turn this flag off in
-   override_options, as we never do pcc_struct_return scheme on this target.  */
+   ix86_option_override_internal, as we never do pcc_struct_return
+   scheme on this target.  */
 #undef DEFAULT_PCC_STRUCT_RETURN
 #define DEFAULT_PCC_STRUCT_RETURN 1
 
Index: gcc/config/i386/i386-protos.h
===================================================================
--- gcc/config/i386/i386-protos.h	(revision 164243)
+++ gcc/config/i386/i386-protos.h	(working copy)
@@ -20,7 +20,6 @@  along with GCC; see the file COPYING3.  
 <http://www.gnu.org/licenses/>.  */
 
 /* Functions in i386.c */
-extern void override_options (bool);
 extern void optimization_options (int, int);
 extern void ix86_conditional_register_usage (void);
 
Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c	(revision 164243)
+++ gcc/config/i386/i386.c	(working copy)
@@ -2799,17 +2799,12 @@  ix86_debug_options (void)
   return;
 }
 
-/* Sometimes certain combinations of command options do not make
-   sense on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
+/* Override various settings based on options.  If MAIN_ARGS_P, the
+   options are from the command line, otherwise they are from
+   attributes.  */
 
-   Don't use this macro to turn on various extra optimizations for
-   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
-
-void
-override_options (bool main_args_p)
+static void
+ix86_option_override_internal (bool main_args_p)
 {
   int i;
   unsigned int ix86_arch_mask, ix86_tune_mask;
@@ -3705,6 +3700,14 @@  override_options (bool main_args_p)
       = build_target_option_node ();
 }
 
+/* Implement the TARGET_OPTION_OVERRIDE hook.  */
+
+static void
+ix86_option_override (void)
+{
+  ix86_option_override_internal (true);
+}
+
 /* Update register usage after having seen the compiler flags.  */
 
 void
@@ -4101,9 +4104,10 @@  ix86_valid_target_attribute_tree (tree a
   if (! ix86_valid_target_attribute_inner_p (args, option_strings))
     return NULL_TREE;
 
-  /* If the changed options are different from the default, rerun override_options,
-     and then save the options away.  The string options are are attribute options,
-     and will be undone when we copy the save structure.  */
+  /* If the changed options are different from the default, rerun
+     ix86_option_override_internal, and then save the options away.
+     The string options are are attribute options, and will be undone
+     when we copy the save structure.  */
   if (ix86_isa_flags != def->ix86_isa_flags
       || target_flags != def->target_flags
       || option_strings[IX86_FUNCTION_SPECIFIC_ARCH]
@@ -4129,7 +4133,7 @@  ix86_valid_target_attribute_tree (tree a
 	ix86_fpmath_string = "sse,387";
 
       /* Do any overrides, such as arch=xxx, or tune=xxx support.  */
-      override_options (false);
+      ix86_option_override_internal (false);
 
       /* Add any builtin functions with the new isa if any.  */
       ix86_add_new_builtins (ix86_isa_flags);
@@ -4525,8 +4529,9 @@  optimization_options (int level, int siz
 
   /* The default values of these switches depend on the TARGET_64BIT
      that is not known at this moment.  Mark these values with 2 and
-     let user the to override these.  In case there is no command line option
-     specifying them, we will set the defaults in override_options.  */
+     let user the to override these.  In case there is no command line
+     option specifying them, we will set the defaults in
+     ix86_option_override_internal.  */
   if (optimize >= 1)
     flag_omit_frame_pointer = 2;
 
@@ -7897,9 +7902,9 @@  ix86_frame_pointer_required (void)
   if (SUBTARGET_FRAME_POINTER_REQUIRED)
     return true;
 
-  /* In override_options, TARGET_OMIT_LEAF_FRAME_POINTER turns off
-     the frame pointer by default.  Turn it back on now if we've not
-     got a leaf function.  */
+  /* In ix86_option_override_internal, TARGET_OMIT_LEAF_FRAME_POINTER
+     turns off the frame pointer by default.  Turn it back on now if
+     we've not got a leaf function.  */
   if (TARGET_OMIT_LEAF_FRAME_POINTER
       && (!current_function_is_leaf
 	  || ix86_current_function_calls_tls_descriptor))
@@ -32467,6 +32472,9 @@  has_dispatch (rtx insn, int action)
 #undef TARGET_HANDLE_OPTION
 #define TARGET_HANDLE_OPTION ix86_handle_option
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE ix86_option_override
+
 #undef TARGET_REGISTER_MOVE_COST
 #define TARGET_REGISTER_MOVE_COST ix86_register_move_cost
 #undef TARGET_MEMORY_MOVE_COST
Index: gcc/config/sh/sh.c
===================================================================
--- gcc/config/sh/sh.c	(revision 164243)
+++ gcc/config/sh/sh.c	(working copy)
@@ -331,7 +331,7 @@  static const struct attribute_spec sh_at
 #undef TARGET_ASM_UNALIGNED_SI_OP
 #define TARGET_ASM_UNALIGNED_SI_OP "\t.ualong\t"
 
-/* These are NULLed out on non-SH5 in OVERRIDE_OPTIONS.  */
+/* These are NULLed out on non-SH5 in TARGET_OPTION_OVERRIDE.  */
 #undef TARGET_ASM_UNALIGNED_DI_OP
 #define TARGET_ASM_UNALIGNED_DI_OP "\t.uaquad\t"
 #undef TARGET_ASM_ALIGNED_DI_OP
@@ -720,7 +720,7 @@  sh_optimization_options (int level ATTRI
 	target_flags |= MASK_SAVE_ALL_TARGET_REGS;
     }
   /* Likewise, we can't meaningfully test TARGET_SH2E / TARGET_IEEE
-     here, so leave it to OVERRIDE_OPTIONS to set
+     here, so leave it to TARGET_OPTION_OVERRIDE to set
     flag_finite_math_only.  We set it to 2 here so we know if the user
     explicitly requested this to be on or off.  */
   flag_finite_math_only = 2;
Index: gcc/config/avr/avr-protos.h
===================================================================
--- gcc/config/avr/avr-protos.h	(revision 164243)
+++ gcc/config/avr/avr-protos.h	(working copy)
@@ -22,7 +22,6 @@ 
 
 
 extern int function_arg_regno_p (int r);
-extern void avr_override_options (void);
 extern void avr_cpu_cpp_builtins (struct cpp_reader * pfile);
 extern int avr_ret_register (void);
 extern bool class_likely_spilled_p (int c);
Index: gcc/config/avr/avr.c
===================================================================
--- gcc/config/avr/avr.c	(revision 164243)
+++ gcc/config/avr/avr.c	(working copy)
@@ -49,6 +49,7 @@ 
 /* Maximal allowed offset for an address in the LD command */
 #define MAX_LD_OFFSET(MODE) (64 - (signed)GET_MODE_SIZE (MODE))
 
+static void avr_option_override (void);
 static int avr_naked_function_p (tree);
 static int interrupt_function_p (tree);
 static int signal_function_p (tree);
@@ -192,10 +193,13 @@  static const struct attribute_spec avr_a
 #undef TARGET_CAN_ELIMINATE
 #define TARGET_CAN_ELIMINATE avr_can_eliminate
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE avr_option_override
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
-void
-avr_override_options (void)
+static void
+avr_option_override (void)
 {
   const struct mcu_type_s *t;
 
Index: gcc/config/avr/avr.h
===================================================================
--- gcc/config/avr/avr.h	(revision 164243)
+++ gcc/config/avr/avr.h	(working copy)
@@ -124,8 +124,6 @@  extern GTY(()) section *progmem_section;
 
 #define TARGET_VERSION fprintf (stderr, " (GNU assembler syntax)");
 
-#define OVERRIDE_OPTIONS avr_override_options ()
-
 #define CAN_DEBUG_WITHOUT_FP
 
 #define BITS_BIG_ENDIAN 0
Index: gcc/config/xtensa/xtensa.c
===================================================================
--- gcc/config/xtensa/xtensa.c	(revision 164243)
+++ gcc/config/xtensa/xtensa.c	(working copy)
@@ -118,6 +118,7 @@  const enum reg_class xtensa_regno_to_cla
   ACC_REG,
 };
 
+static void xtensa_option_override (void);
 static enum internal_test map_test_to_internal_test (enum rtx_code);
 static rtx gen_int_relational (enum rtx_code, rtx, rtx, int *);
 static rtx gen_float_relational (enum rtx_code, rtx, rtx);
@@ -251,6 +252,9 @@  static const int reg_nonleaf_alloc_order
 #undef TARGET_TRAMPOLINE_INIT
 #define TARGET_TRAMPOLINE_INIT xtensa_trampoline_init
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE xtensa_option_override
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 
@@ -2096,8 +2100,8 @@  xtensa_return_in_msb (const_tree valtype
 }
 
 
-void
-override_options (void)
+static void
+xtensa_option_override (void)
 {
   int regno;
   enum machine_mode mode;
Index: gcc/config/xtensa/xtensa.h
===================================================================
--- gcc/config/xtensa/xtensa.h	(revision 164243)
+++ gcc/config/xtensa/xtensa.h	(working copy)
@@ -1,5 +1,5 @@ 
 /* Definitions of Tensilica's Xtensa target machine for GNU compiler.
-   Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
    Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica.
 
@@ -74,8 +74,6 @@  extern unsigned xtensa_current_frame_siz
 #define HAVE_AS_TLS 0
 #endif
 
-#define OVERRIDE_OPTIONS override_options ()
-
 /* Reordering blocks for Xtensa is not a good idea unless the compiler
    understands the range of conditional branches.  Currently all branch
    relaxation for Xtensa is handled in the assembler, so GCC cannot do a
Index: gcc/config/xtensa/xtensa-protos.h
===================================================================
--- gcc/config/xtensa/xtensa-protos.h	(revision 164243)
+++ gcc/config/xtensa/xtensa-protos.h	(working copy)
@@ -1,5 +1,5 @@ 
 /* Prototypes of target machine for GNU compiler for Xtensa.
-   Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
+   Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
    Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica.
 
@@ -78,7 +78,6 @@  extern int function_arg_boundary (enum m
 
 extern void xtensa_setup_frame_addresses (void);
 extern int xtensa_dbx_register_number (int);
-extern void override_options (void);
 extern long compute_frame_size (int);
 extern void xtensa_expand_prologue (void);
 extern void order_regs_for_local_alloc (void);
Index: gcc/config/lm32/lm32.h
===================================================================
--- gcc/config/lm32/lm32.h	(revision 164243)
+++ gcc/config/lm32/lm32.h	(working copy)
@@ -68,8 +68,6 @@ 
 #undef  LIB_SPEC
 #define LIB_SPEC "%{!T*:-T sim.ld}"
 
-#define OVERRIDE_OPTIONS lm32_override_options()
-
 extern int target_flags;
 
 /* Add -G xx support.  */
Index: gcc/config/lm32/lm32-protos.h
===================================================================
--- gcc/config/lm32/lm32-protos.h	(revision 164243)
+++ gcc/config/lm32/lm32-protos.h	(working copy)
@@ -1,7 +1,7 @@ 
 /* Prototypes of target machine functions, Lattice Mico32 architecture.
    Contributed by Jon Beniston <jon@beniston.com>
 
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
 
    This file is part of GCC.
 
@@ -28,7 +28,6 @@  extern void lm32_print_operand (FILE *fi
 extern void lm32_print_operand_address (FILE *file, rtx addr);
 extern rtx lm32_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode,
                               tree type, int named);
-extern void lm32_override_options (void);
 extern HOST_WIDE_INT lm32_compute_initial_elimination_offset (int from, 
                                                              int to);
 extern int lm32_can_use_return (void);
Index: gcc/config/lm32/lm32.c
===================================================================
--- gcc/config/lm32/lm32.c	(revision 164243)
+++ gcc/config/lm32/lm32.c	(working copy)
@@ -76,9 +76,12 @@  static bool
 lm32_legitimate_address_p (enum machine_mode mode, rtx x, bool strict);
 static HOST_WIDE_INT lm32_compute_frame_size (int size);
 static bool lm32_handle_option (size_t code, const char *arg, int value);
+static void lm32_option_override (void);
 
 #undef TARGET_HANDLE_OPTION
 #define TARGET_HANDLE_OPTION lm32_handle_option
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE lm32_option_override
 #undef TARGET_ADDRESS_COST
 #define TARGET_ADDRESS_COST hook_int_rtx_bool_0
 #undef TARGET_RTX_COSTS
@@ -713,8 +716,8 @@  lm32_handle_option (size_t code, const c
 }
 
 /* Override command line options.  */
-void
-lm32_override_options (void)
+static void
+lm32_option_override (void)
 {
   /* We must have sign-extend enabled if barrel-shift isn't.  */
   if (!TARGET_BARREL_SHIFT_ENABLED && !TARGET_SIGN_EXTEND_ENABLED)
Index: gcc/config/moxie/moxie.c
===================================================================
--- gcc/config/moxie/moxie.c	(revision 164243)
+++ gcc/config/moxie/moxie.c	(working copy)
@@ -231,10 +231,10 @@  moxie_init_machine_status (void)
 }
 
 
-/* The OVERRIDE_OPTIONS worker.
+/* The TARGET_OPTION_OVERRIDE worker.
    All this curently does is set init_machine_status.  */
-void
-moxie_override_options (void)
+static void
+moxie_option_override (void)
 {
   /* Set the per-function-data initializer.  */
   init_machine_status = moxie_init_machine_status;
@@ -567,6 +567,9 @@  moxie_trampoline_init (rtx m_tramp, tree
 #undef TARGET_TRAMPOLINE_INIT
 #define TARGET_TRAMPOLINE_INIT moxie_trampoline_init
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE moxie_option_override
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 #include "gt-moxie.h"
Index: gcc/config/moxie/moxie.h
===================================================================
--- gcc/config/moxie/moxie.h	(revision 164243)
+++ gcc/config/moxie/moxie.h	(working copy)
@@ -303,8 +303,6 @@  enum reg_class
    pointer registers are already assumed to be used as needed.  */
 #define EPILOGUE_USES(R) (R == MOXIE_R5)
 
-#define OVERRIDE_OPTIONS moxie_override_options ()
-
 /* Storage Layout */
 
 #define BITS_BIG_ENDIAN 0
Index: gcc/config/moxie/moxie-protos.h
===================================================================
--- gcc/config/moxie/moxie-protos.h	(revision 164243)
+++ gcc/config/moxie/moxie-protos.h	(working copy)
@@ -18,7 +18,6 @@  You should have received a copy of the G
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
-extern void  moxie_override_options (void);
 extern void  moxie_expand_prologue (void);
 extern void  moxie_expand_epilogue (void);
 extern int   moxie_initial_elimination_offset (int, int);
Index: gcc/config/m68hc11/m68hc11-protos.h
===================================================================
--- gcc/config/m68hc11/m68hc11-protos.h	(revision 164243)
+++ gcc/config/m68hc11/m68hc11-protos.h	(working copy)
@@ -20,7 +20,6 @@  along with GCC; see the file COPYING3.  
 <http://www.gnu.org/licenses/>.  */
 
 
-extern int m68hc11_override_options (void);
 extern int m68hc11_optimization_options (int,int);
 extern void m68hc11_conditional_register_usage (void);
 extern int hard_regno_mode_ok (int, enum machine_mode);
Index: gcc/config/m68hc11/m68hc11.c
===================================================================
--- gcc/config/m68hc11/m68hc11.c	(revision 164243)
+++ gcc/config/m68hc11/m68hc11.c	(working copy)
@@ -61,6 +61,7 @@  Note:
 #include "target-def.h"
 #include "df.h"
 
+static void m68hc11_option_override (void);
 static void emit_move_after_reload (rtx, rtx, rtx);
 static rtx simplify_logical (enum machine_mode, int, rtx, rtx *);
 static void m68hc11_emit_logical (enum machine_mode, enum rtx_code, rtx *);
@@ -293,10 +294,13 @@  static const struct attribute_spec m68hc
 #undef TARGET_TRAMPOLINE_INIT
 #define TARGET_TRAMPOLINE_INIT m68hc11_trampoline_init
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE m68hc11_option_override
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
-int
-m68hc11_override_options (void)
+static void
+m68hc11_option_override (void)
 {
   memset (m68hc11_reg_valid_for_index, 0,
 	  sizeof (m68hc11_reg_valid_for_index));
@@ -361,7 +365,6 @@  m68hc11_override_options (void)
       if (TARGET_LONG_CALLS)
         current_function_far = 1;
     }
-  return 0;
 }
 
 
Index: gcc/config/m68hc11/m68hc11.h
===================================================================
--- gcc/config/m68hc11/m68hc11.h	(revision 164243)
+++ gcc/config/m68hc11/m68hc11.h	(working copy)
@@ -142,17 +142,6 @@  extern short *reg_renumber;	/* def in lo
 /* Print subsidiary information on the compiler version in use.  */
 #define TARGET_VERSION	fprintf (stderr, " (MC68HC11/MC68HC12/MC68HCS12)")
 
-/* Sometimes certain combinations of command options do not make
-   sense on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
-
-   Don't use this macro to turn on various extra optimizations for
-   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
-
-#define OVERRIDE_OPTIONS	m68hc11_override_options ()
-
 
 /* Define cost parameters for a given processor variant.  */
 struct processor_costs {
Index: gcc/config/cris/cris.c
===================================================================
--- gcc/config/cris/cris.c	(revision 164243)
+++ gcc/config/cris/cris.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* Definitions for GCC.  Part of the machine description for CRIS.
    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-   2008, 2009  Free Software Foundation, Inc.
+   2008, 2009, 2010  Free Software Foundation, Inc.
    Contributed by Axis Communications.  Written by Hans-Peter Nilsson.
 
 This file is part of GCC.
@@ -130,6 +130,7 @@  static int cris_arg_partial_bytes (CUMUL
 static tree cris_md_asm_clobbers (tree, tree, tree);
 
 static bool cris_handle_option (size_t, const char *, int);
+static void cris_option_override (void);
 
 static bool cris_frame_pointer_required (void);
 
@@ -208,6 +209,9 @@  int cris_cpu_version = CRIS_DEFAULT_CPU_
 #undef TARGET_FRAME_POINTER_REQUIRED
 #define TARGET_FRAME_POINTER_REQUIRED cris_frame_pointer_required
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE cris_option_override
+
 #undef TARGET_ASM_TRAMPOLINE_TEMPLATE
 #define TARGET_ASM_TRAMPOLINE_TEMPLATE cris_asm_trampoline_template
 #undef TARGET_TRAMPOLINE_INIT
@@ -2336,7 +2340,7 @@  cris_asm_output_case_end (FILE *stream, 
 
 /* TARGET_HANDLE_OPTION worker.  We just store the values into local
    variables here.  Checks for correct semantics are in
-   cris_override_options.  */
+   cris_option_override.  */
 
 static bool
 cris_handle_option (size_t code, const char *arg ATTRIBUTE_UNUSED,
@@ -2392,11 +2396,11 @@  cris_handle_option (size_t code, const c
   return true;
 }
 
-/* The OVERRIDE_OPTIONS worker.
+/* The TARGET_OPTION_OVERRIDE worker.
    As is the norm, this also parses -mfoo=bar type parameters.  */
 
-void
-cris_override_options (void)
+static void
+cris_option_override (void)
 {
   if (cris_max_stackframe_str)
     {
Index: gcc/config/cris/cris.h
===================================================================
--- gcc/config/cris/cris.h	(revision 164243)
+++ gcc/config/cris/cris.h	(working copy)
@@ -1,6 +1,6 @@ 
 /* Definitions for GCC.  Part of the machine description for CRIS.
    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008,
-   2009 Free Software Foundation, Inc.
+   2009, 2010 Free Software Foundation, Inc.
    Contributed by Axis Communications.  Written by Hans-Peter Nilsson.
 
 This file is part of GCC.
@@ -328,8 +328,6 @@  extern int target_flags;
 
 #define CRIS_SUBTARGET_HANDLE_OPTION(x, y, z)
 
-#define OVERRIDE_OPTIONS cris_override_options ()
-
 #define OPTIMIZATION_OPTIONS(OPTIMIZE, SIZE)	\
   do						\
     {						\
Index: gcc/config/cris/cris-protos.h
===================================================================
--- gcc/config/cris/cris-protos.h	(revision 164243)
+++ gcc/config/cris/cris-protos.h	(working copy)
@@ -1,5 +1,5 @@ 
 /* Definitions for GCC.  Part of the machine description for CRIS.
-   Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005, 2006, 2007
+   Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005, 2006, 2007, 2009, 2010
    Free Software Foundation, Inc.
    Contributed by Axis Communications.
 
@@ -64,8 +64,6 @@  extern void cris_pragma_expand_mul (stru
 /* Need one that returns an int; usable in expressions.  */
 extern int cris_fatal (char *);
 
-extern void cris_override_options (void);
-
 extern int cris_initial_elimination_offset (int, int);
 
 extern void cris_init_expanders (void);
Index: gcc/config/iq2000/iq2000.h
===================================================================
--- gcc/config/iq2000/iq2000.h	(revision 164243)
+++ gcc/config/iq2000/iq2000.h	(working copy)
@@ -69,8 +69,6 @@ 
 #define TARGET_VERSION TARGET_VERSION_INTERNAL (stderr)
 #endif
 
-#define OVERRIDE_OPTIONS override_options ()
-
 #define CAN_DEBUG_WITHOUT_FP
 
 /* Storage Layout.  */
Index: gcc/config/iq2000/iq2000-protos.h
===================================================================
--- gcc/config/iq2000/iq2000-protos.h	(revision 164243)
+++ gcc/config/iq2000/iq2000-protos.h	(working copy)
@@ -1,5 +1,5 @@ 
 /* Definitions of target machine for GNU compiler for iq2000.
-   Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This file is part of GCC.
 
@@ -24,7 +24,6 @@  extern int              iq2000_check_spl
 extern int              iq2000_reg_mode_ok_for_base_p (rtx, enum machine_mode, int);
 extern const char *     iq2000_fill_delay_slot (const char *, enum delay_type, rtx *, rtx);
 extern const char *     iq2000_move_1word (rtx *, rtx, int);
-extern void             override_options (void);
 extern HOST_WIDE_INT    iq2000_debugger_offset (rtx, HOST_WIDE_INT);
 extern void             final_prescan_insn (rtx, rtx *, int);
 extern HOST_WIDE_INT    compute_frame_size (HOST_WIDE_INT);
Index: gcc/config/iq2000/iq2000.c
===================================================================
--- gcc/config/iq2000/iq2000.c	(revision 164243)
+++ gcc/config/iq2000/iq2000.c	(working copy)
@@ -1,5 +1,5 @@ 
 /* Subroutines used for code generation on Vitesse IQ2000 processors
-   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -147,6 +147,7 @@  static enum machine_mode gpr_mode;
 /* Initialize the GCC target structure.  */
 static struct machine_function* iq2000_init_machine_status (void);
 static bool iq2000_handle_option      (size_t, const char *, int);
+static void iq2000_option_override    (void);
 static section *iq2000_select_rtx_section (enum machine_mode, rtx,
 					   unsigned HOST_WIDE_INT);
 static void iq2000_init_builtins      (void);
@@ -182,6 +183,8 @@  static bool iq2000_print_operand_punct_v
 #define TARGET_ASM_SELECT_RTX_SECTION	iq2000_select_rtx_section
 #undef  TARGET_HANDLE_OPTION
 #define TARGET_HANDLE_OPTION		iq2000_handle_option
+#undef  TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE		iq2000_option_override
 #undef  TARGET_RTX_COSTS
 #define TARGET_RTX_COSTS		iq2000_rtx_costs
 #undef  TARGET_ADDRESS_COST
@@ -1428,8 +1431,8 @@  iq2000_handle_option (size_t code, const
 
 /* Detect any conflicts in the switches.  */
 
-void
-override_options (void)
+static void
+iq2000_option_override (void)
 {
   target_flags &= ~MASK_GPOPT;
 
Index: gcc/config/mn10300/mn10300.c
===================================================================
--- gcc/config/mn10300/mn10300.c	(revision 164243)
+++ gcc/config/mn10300/mn10300.c	(working copy)
@@ -69,6 +69,7 @@  enum processor_type mn10300_processor = 
 
 
 static bool mn10300_handle_option (size_t, const char *, int);
+static void mn10300_option_override (void);
 static bool mn10300_legitimate_address_p (enum machine_mode, rtx, bool);
 static int mn10300_address_cost_1 (rtx, int *);
 static int mn10300_address_cost (rtx, bool);
@@ -112,6 +113,8 @@  static bool mn10300_can_output_mi_thunk 
 #define TARGET_DEFAULT_TARGET_FLAGS MASK_MULT_BUG | MASK_PTR_A0D0
 #undef TARGET_HANDLE_OPTION
 #define TARGET_HANDLE_OPTION mn10300_handle_option
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE mn10300_option_override
 
 #undef  TARGET_ENCODE_SECTION_INFO
 #define TARGET_ENCODE_SECTION_INFO mn10300_encode_section_info
@@ -177,10 +180,10 @@  mn10300_handle_option (size_t code,
     }
 }
 
-/* Implement OVERRIDE_OPTIONS.  */
+/* Implement TARGET_OPTION_OVERRIDE.  */
 
-void
-mn10300_override_options (void)
+static void
+mn10300_option_override (void)
 {
   if (TARGET_AM33)
     target_flags &= ~MASK_MULT_BUG;
Index: gcc/config/mn10300/mn10300.h
===================================================================
--- gcc/config/mn10300/mn10300.h	(revision 164243)
+++ gcc/config/mn10300/mn10300.h	(working copy)
@@ -60,8 +60,6 @@  extern enum processor_type mn10300_proce
 #define PROCESSOR_DEFAULT PROCESSOR_MN10300
 #endif
 
-#define OVERRIDE_OPTIONS mn10300_override_options ()
-
 /* Print subsidiary information on the compiler version in use.  */
 
 #define TARGET_VERSION fprintf (stderr, " (MN10300)");
Index: gcc/config/mn10300/mn10300-protos.h
===================================================================
--- gcc/config/mn10300/mn10300-protos.h	(revision 164243)
+++ gcc/config/mn10300/mn10300-protos.h	(working copy)
@@ -1,5 +1,6 @@ 
 /* Definitions of target machine for GNU compiler. Matsushita MN10300 series
-   Copyright (C) 2000, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2003, 2004, 2005, 2007, 2009, 2010
+   Free Software Foundation, Inc.
    Contributed by Jeff Law (law@cygnus.com).
 
 This file is part of GCC.
@@ -20,7 +21,6 @@  along with GCC; see the file COPYING3.  
 
 #ifdef RTX_CODE
 
-extern void mn10300_override_options (void);
 extern rtx legitimize_pic_address (rtx, rtx);
 extern int legitimate_pic_operand_p (rtx);
 extern void print_operand (FILE *, rtx, int);
Index: gcc/config/ia64/ia64.c
===================================================================
--- gcc/config/ia64/ia64.c	(revision 164243)
+++ gcc/config/ia64/ia64.c	(working copy)
@@ -2314,7 +2314,7 @@  ia64_file_start (void)
 {
   /* Variable tracking should be run after all optimizations which change order
      of insns.  It also needs a valid CFG.  This can't be done in
-     ia64_override_options, because flag_var_tracking is finalized after
+     ia64_option_override, because flag_var_tracking is finalized after
      that.  */
   ia64_flag_var_tracking = flag_var_tracking;
   flag_var_tracking = 0;
Index: gcc/config/m68k/m68k-protos.h
===================================================================
--- gcc/config/m68k/m68k-protos.h	(revision 164243)
+++ gcc/config/m68k/m68k-protos.h	(working copy)
@@ -1,5 +1,5 @@ 
 /* Definitions of target machine for GNU compiler.  Sun 68000/68020 version.
-   Copyright (C) 2000, 2002, 2004, 2005, 2006, 2007, 2008
+   Copyright (C) 2000, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -94,7 +94,6 @@  extern int flags_in_68881 (void);
 extern void m68k_expand_prologue (void);
 extern bool m68k_use_return_insn (void);
 extern void m68k_expand_epilogue (bool);
-extern void override_options (void);
 extern const char *m68k_cpp_cpu_ident (const char *);
 extern const char *m68k_cpp_cpu_family (const char *);
 extern void init_68881_table (void);
Index: gcc/config/m68k/m68k.c
===================================================================
--- gcc/config/m68k/m68k.c	(revision 164243)
+++ gcc/config/m68k/m68k.c	(working copy)
@@ -135,6 +135,7 @@  static int m68k_sched_first_cycle_multip
 static bool m68k_can_eliminate (const int, const int);
 static bool m68k_legitimate_address_p (enum machine_mode, rtx, bool);
 static bool m68k_handle_option (size_t, const char *, int);
+static void m68k_option_override (void);
 static rtx find_addr_reg (rtx);
 static const char *singlemove_string (rtx *);
 static void m68k_output_mi_thunk (FILE *, tree, HOST_WIDE_INT,
@@ -233,6 +234,9 @@  const char *m68k_library_id_string = "_c
 #undef TARGET_HANDLE_OPTION
 #define TARGET_HANDLE_OPTION m68k_handle_option
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE m68k_option_override
+
 #undef TARGET_RTX_COSTS
 #define TARGET_RTX_COSTS m68k_rtx_costs
 
@@ -539,17 +543,10 @@  m68k_handle_option (size_t code, const c
     }
 }
 
-/* Sometimes certain combinations of command options do not make
-   sense on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
-
-   Don't use this macro to turn on various extra optimizations for
-   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
+/* Implement TARGET_OPTION_OVERRIDE.  */
 
-void
-override_options (void)
+static void
+m68k_option_override (void)
 {
   const struct m68k_target_selection *entry;
   unsigned long target_mask;
Index: gcc/config/m68k/m68k.h
===================================================================
--- gcc/config/m68k/m68k.h	(revision 164243)
+++ gcc/config/m68k/m68k.h	(working copy)
@@ -1,6 +1,6 @@ 
 /* Definitions of target machine for GCC for Motorola 680x0/ColdFire.
    Copyright (C) 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -274,8 +274,6 @@  along with GCC; see the file COPYING3.  
 #define TUNE_MAC	((m68k_tune_flags & FL_CF_MAC) != 0)
 #define TUNE_EMAC	((m68k_tune_flags & FL_CF_EMAC) != 0)
 
-#define OVERRIDE_OPTIONS   override_options()
-
 /* These are meant to be redefined in the host dependent files */
 #define SUBTARGET_OVERRIDE_OPTIONS
 
Index: gcc/config/rs6000/aix53.h
===================================================================
--- gcc/config/rs6000/aix53.h	(revision 164243)
+++ gcc/config/rs6000/aix53.h	(working copy)
@@ -1,6 +1,6 @@ 
 /* Definitions of target machine for GNU compiler,
    for IBM RS/6000 POWER running AIX V5.3.
-   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
    Contributed by David Edelsohn (edelsohn@gnu.org).
 
@@ -20,14 +20,8 @@ 
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
-/* Sometimes certain combinations of command options do not make sense
-   on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
-
-   The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
-   get control.  */
+/* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
+   get control in TARGET_OPTION_OVERRIDE.  */
 
 #define NON_POWERPC_MASKS (MASK_POWER | MASK_POWER2)
 #define SUBTARGET_OVERRIDE_OPTIONS					\
Index: gcc/config/rs6000/rs6000-modes.def
===================================================================
--- gcc/config/rs6000/rs6000-modes.def	(revision 164243)
+++ gcc/config/rs6000/rs6000-modes.def	(working copy)
@@ -1,5 +1,5 @@ 
 /* Definitions of target machine for GNU compiler, for IBM RS/6000.
-   Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004, 2007, 2010 Free Software Foundation, Inc.
    Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
 
    This file is part of GCC.
@@ -19,7 +19,7 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 /* 128-bit floating point.  ABI_V4 uses IEEE quad, AIX/Darwin
-   adjust this in rs6000_override_options.  */
+   adjust this in rs6000_option_override_internal.  */
 FLOAT_MODE (TF, 16, ieee_quad_format);
 
 /* Add any extra modes needed to represent the condition code.
Index: gcc/config/rs6000/rs6000-protos.h
===================================================================
--- gcc/config/rs6000/rs6000-protos.h	(revision 164243)
+++ gcc/config/rs6000/rs6000-protos.h	(working copy)
@@ -154,7 +154,6 @@  extern enum direction function_arg_paddi
 #endif /* TREE_CODE */
 
 extern void optimization_options (int, int);
-extern void rs6000_override_options (const char *);
 extern int direct_return (void);
 extern int first_reg_to_save (void);
 extern int first_fp_reg_to_save (void);
Index: gcc/config/rs6000/aix51.h
===================================================================
--- gcc/config/rs6000/aix51.h	(revision 164243)
+++ gcc/config/rs6000/aix51.h	(working copy)
@@ -1,6 +1,6 @@ 
 /* Definitions of target machine for GNU compiler,
    for IBM RS/6000 POWER running AIX V5.
-   Copyright (C) 2001, 2003, 2004, 2005, 2007, 2008
+   Copyright (C) 2001, 2003, 2004, 2005, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
    Contributed by David Edelsohn (edelsohn@gnu.org).
 
@@ -20,14 +20,8 @@ 
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
-/* Sometimes certain combinations of command options do not make sense
-   on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
-
-   The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
-   get control.  */
+/* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
+   get control in TARGET_OPTION_OVERRIDE.  */
 
 #define NON_POWERPC_MASKS (MASK_POWER | MASK_POWER2)
 #define SUBTARGET_OVERRIDE_OPTIONS					\
Index: gcc/config/rs6000/aix43.h
===================================================================
--- gcc/config/rs6000/aix43.h	(revision 164243)
+++ gcc/config/rs6000/aix43.h	(working copy)
@@ -1,7 +1,7 @@ 
 /* Definitions of target machine for GNU compiler,
    for IBM RS/6000 POWER running AIX version 4.3.
    Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
-   2007 Free Software Foundation, Inc.
+   2007, 2009, 2010 Free Software Foundation, Inc.
    Contributed by David Edelsohn (edelsohn@gnu.org).
 
    This file is part of GCC.
@@ -20,14 +20,8 @@ 
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
-/* Sometimes certain combinations of command options do not make sense
-   on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
-
-   The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
-   get control.  */
+/* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
+   get control in TARGET_OPTION_OVERRIDE.  */
 
 #define NON_POWERPC_MASKS (MASK_POWER | MASK_POWER2)
 #define SUBTARGET_OVERRIDE_OPTIONS					\
Index: gcc/config/rs6000/linux64.h
===================================================================
--- gcc/config/rs6000/linux64.h	(revision 164243)
+++ gcc/config/rs6000/linux64.h	(working copy)
@@ -162,10 +162,10 @@  extern enum rs6000_cmodel cmodel;
 
 #ifdef	RS6000_BI_ARCH
 
-#undef	OVERRIDE_OPTIONS
-#define	OVERRIDE_OPTIONS \
-  rs6000_override_options (((TARGET_DEFAULT ^ target_flags) & MASK_64BIT) \
-			   ? (char *) 0 : TARGET_CPU_DEFAULT)
+#undef	OPTION_TARGET_CPU_DEFAULT
+#define	OPTION_TARGET_CPU_DEFAULT \
+  (((TARGET_DEFAULT ^ target_flags) & MASK_64BIT) \
+   ? (char *) 0 : TARGET_CPU_DEFAULT)
 
 #endif
 
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 164243)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -1133,6 +1133,7 @@  static rtx altivec_expand_vec_init_built
 static rtx altivec_expand_vec_set_builtin (tree);
 static rtx altivec_expand_vec_ext_builtin (tree, rtx);
 static int get_element_number (tree, tree);
+static void rs6000_option_override (void);
 static bool rs6000_handle_option (size_t, const char *, int);
 static void rs6000_parse_tls_size_option (void);
 static void rs6000_parse_yes_no_option (const char *, const char *, int *);
@@ -1588,6 +1589,9 @@  static const struct attribute_spec rs600
 #undef TARGET_HANDLE_OPTION
 #define TARGET_HANDLE_OPTION rs6000_handle_option
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE rs6000_option_override
+
 #undef TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION
 #define TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION \
   rs6000_builtin_vectorized_function
@@ -2393,8 +2397,8 @@  darwin_rs6000_override_options (void)
 /* Override command line options.  Mostly we process the processor
    type and sometimes adjust other TARGET_ options.  */
 
-void
-rs6000_override_options (const char *default_cpu)
+static void
+rs6000_option_override_internal (const char *default_cpu)
 {
   size_t i, j;
   struct rs6000_cpu_select *ptr;
@@ -3226,6 +3230,15 @@  rs6000_override_options (const char *def
   rs6000_init_hard_regno_mode_ok ();
 }
 
+/* Implement TARGET_OPTION_OVERRIDE.  On the RS/6000 this is used to
+   define the target cpu type.  */
+
+static void
+rs6000_option_override (void)
+{
+  rs6000_option_override_internal (OPTION_TARGET_CPU_DEFAULT);
+}
+
 /* Implement targetm.vectorize.builtin_mask_for_load.  */
 static tree
 rs6000_builtin_mask_for_load (void)
@@ -7542,7 +7555,7 @@  rs6000_emit_move (rtx dest, rtx source, 
    controls this instead of DEFAULT_ABI; V.4 targets needing backward
    compatibility can change DRAFT_V4_STRUCT_RET to override the
    default, and -m switches get the final word.  See
-   rs6000_override_options for more details.
+   rs6000_option_override_internal for more details.
 
    The PPC32 SVR4 ABI uses IEEE double extended for long double, if 128-bit
    long double support is enabled.  These values are returned in memory.
@@ -21953,7 +21966,7 @@  output_toc (FILE *file, rtx x, int label
       struct toc_hash_struct *h;
       void * * found;
 
-      /* Create toc_hash_table.  This can't be done at OVERRIDE_OPTIONS
+      /* Create toc_hash_table.  This can't be done at TARGET_OPTION_OVERRIDE
 	 time because GGC is not initialized at that point.  */
       if (toc_hash_table == NULL)
 	toc_hash_table = htab_create_ggc (1021, toc_hash_function,
Index: gcc/config/rs6000/aix52.h
===================================================================
--- gcc/config/rs6000/aix52.h	(revision 164243)
+++ gcc/config/rs6000/aix52.h	(working copy)
@@ -1,6 +1,6 @@ 
 /* Definitions of target machine for GNU compiler,
    for IBM RS/6000 POWER running AIX V5.2.
-   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
+   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
    Contributed by David Edelsohn (edelsohn@gnu.org).
 
@@ -20,14 +20,8 @@ 
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
-/* Sometimes certain combinations of command options do not make sense
-   on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
-
-   The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
-   get control.  */
+/* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
+   get control in TARGET_OPTION_OVERRIDE.  */
 
 #define NON_POWERPC_MASKS (MASK_POWER | MASK_POWER2)
 #define SUBTARGET_OVERRIDE_OPTIONS					\
Index: gcc/config/rs6000/rs6000.h
===================================================================
--- gcc/config/rs6000/rs6000.h	(revision 164243)
+++ gcc/config/rs6000/rs6000.h	(working copy)
@@ -619,18 +619,8 @@  extern unsigned char rs6000_recip_bits[]
 #define RS6000_RECIP_HIGH_PRECISION_P(MODE) \
   ((MODE) == SFmode || (MODE) == V4SFmode || TARGET_RECIP_PRECISION)
 
-/* Sometimes certain combinations of command options do not make sense
-   on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
-
-   Do not use this macro to turn on various extra optimizations for
-   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.
-
-   On the RS/6000 this is used to define the target cpu type.  */
-
-#define OVERRIDE_OPTIONS rs6000_override_options (TARGET_CPU_DEFAULT)
+/* The default CPU for TARGET_OPTION_OVERRIDE.  */
+#define OPTION_TARGET_CPU_DEFAULT TARGET_CPU_DEFAULT
 
 /* Define this to change the optimizations performed by default.  */
 #define OPTIMIZATION_OPTIONS(LEVEL,SIZE) optimization_options(LEVEL,SIZE)
Index: gcc/config/rs6000/aix61.h
===================================================================
--- gcc/config/rs6000/aix61.h	(revision 164243)
+++ gcc/config/rs6000/aix61.h	(working copy)
@@ -1,6 +1,6 @@ 
 /* Definitions of target machine for GNU compiler,
    for IBM RS/6000 POWER running AIX V6.1.
-   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
    Contributed by David Edelsohn (edelsohn@gnu.org).
 
@@ -20,14 +20,8 @@ 
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
-/* Sometimes certain combinations of command options do not make sense
-   on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
-
-   The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
-   get control.  */
+/* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
+   get control in TARGET_OPTION_OVERRIDE.  */
 
 #define NON_POWERPC_MASKS (MASK_POWER | MASK_POWER2)
 #define SUBTARGET_OVERRIDE_OPTIONS					\
Index: gcc/config/rs6000/sysv4.h
===================================================================
--- gcc/config/rs6000/sysv4.h	(revision 164243)
+++ gcc/config/rs6000/sysv4.h	(working copy)
@@ -76,14 +76,8 @@  extern const char *rs6000_tls_size_strin
 
 #define SDATA_DEFAULT_SIZE 8
 
-/* Sometimes certain combinations of command options do not make sense
-   on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
-
-   The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
-   get control.  */
+/* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
+   get control in TARGET_OPTION_OVERRIDE.  */
 
 #define SUBTARGET_OVERRIDE_OPTIONS					\
 do {									\
Index: gcc/config/picochip/picochip.c
===================================================================
--- gcc/config/picochip/picochip.c	(revision 164243)
+++ gcc/config/picochip/picochip.c	(working copy)
@@ -117,6 +117,8 @@  picochip_asm_named_section (const char *
 
 static rtx picochip_static_chain (const_tree, bool);
 
+static void picochip_option_override (void);
+
 /* Lookup table mapping a register number to the earliest containing
    class.  Used by REGNO_REG_CLASS.  */
 const enum reg_class picochip_regno_reg_class[FIRST_PSEUDO_REGISTER] =
@@ -301,8 +303,11 @@  static char picochip_get_vliw_alu_id (vo
 #undef TARGET_STATIC_CHAIN
 #define TARGET_STATIC_CHAIN picochip_static_chain
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE picochip_option_override
+
 #undef TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE
-#define TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE picochip_override_options
+#define TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE picochip_option_override
 
 struct gcc_target targetm = TARGET_INITIALIZER;
 
@@ -317,9 +322,13 @@  picochip_return_in_memory(const_tree typ
   return ((unsigned HOST_WIDE_INT) int_size_in_bytes (type) > 4);
 }
 
-/* Allow certain command options to be overriden. */
-void
-picochip_override_options (void)
+/* Allow some options to be overriden.  In particular, the 2nd
+   scheduling pass option is switched off, and a machine dependent
+   reorganisation ensures that it is run later on, after the second
+   jump optimisation. */
+
+static void
+picochip_option_override (void)
 {
   /* If we are optimizing for stack, dont let inliner to inline functions
      that could potentially increase stack size.*/
@@ -1760,7 +1769,7 @@  picochip_asm_file_start (void)
 
   /* Variable tracking should be run after all optimizations which change order
      of insns.  It also needs a valid CFG.  This can't be done in
-     picochip_override_options, because flag_var_tracking is finalized after
+     picochip_option_override, because flag_var_tracking is finalized after
      that.  */
   picochip_flag_var_tracking = flag_var_tracking;
   flag_var_tracking = 0;
Index: gcc/config/picochip/picochip.h
===================================================================
--- gcc/config/picochip/picochip.h	(revision 164243)
+++ gcc/config/picochip/picochip.h	(working copy)
@@ -1,5 +1,5 @@ 
 /* Definitions of target machine for GNU compiler for picoChip
-   Copyright (C) 2001, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2008, 2009, 2010 Free Software Foundation, Inc.
 
    Contributed by picoChip Designs Ltd. (http://www.picochip.com)
    Maintained by Daniel Towner (daniel.towner@picochip.com) and
@@ -84,12 +84,6 @@  extern enum picochip_dfa_type picochip_s
 #define TARGET_HAS_MAC_UNIT (picochip_has_mac_unit)
 #define TARGET_HAS_MULTIPLY (picochip_has_mac_unit || picochip_has_mul_unit)
 
-/* Allow some options to be overriden.  In particular, the 2nd
-   scheduling pass option is switched off, and a machine dependent
-   reorganisation ensures that it is run later on, after the second
-   jump optimisation. */
-#define OVERRIDE_OPTIONS picochip_override_options()
-
 #define CAN_DEBUG_WITHOUT_FP 1
 
 #define TARGET_VERSION fprintf(stderr, "(picoChip)");
Index: gcc/config/picochip/picochip-protos.h
===================================================================
--- gcc/config/picochip/picochip-protos.h	(revision 164243)
+++ gcc/config/picochip/picochip-protos.h	(working copy)
@@ -1,6 +1,6 @@ 
 /* Prototypes for exported functions defined in picochip.c
 
-   Copyright (C) 2000, 2001, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2008, 2009, 2010 Free Software Foundation, Inc.
    Contributed by picoChip Designs Ltd. (http://www.picochip.com)
    Maintained by Daniel Towner (daniel.towner@picochip.com) and
    Hariharan Sandanagobalane (hariharan@picochip.com).
@@ -91,7 +91,6 @@  extern void picochip_expand_epilogue (in
 
 extern void picochip_final_prescan_insn (rtx insn, rtx * operand, int num_operands);
 extern const char *picochip_asm_output_opcode (FILE * f, const char *ptr);
-extern void picochip_override_options (void);
 
 extern int picochip_check_conditional_copy (rtx * operands);
 
@@ -138,7 +137,7 @@  extern int picochip_flag_schedule_insns2
 extern void picochip_asm_output_anchor (rtx symbol);
 
 /* Instruction set capability flags.  These are initialised to the
-   appropriate values by picochip_override_options, once the user has
+   appropriate values by picochip_option_override, once the user has
    selected a CPU type. */
 extern bool picochip_has_mul_unit;
 extern bool picochip_has_mac_unit;
Index: gcc/config/arc/arc-protos.h
===================================================================
--- gcc/config/arc/arc-protos.h	(revision 164243)
+++ gcc/config/arc/arc-protos.h	(working copy)
@@ -1,5 +1,5 @@ 
 /* Definitions of target machine for GNU compiler, Argonaut ARC cpu.
-   Copyright (C) 2000, 2004, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2004, 2007, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -54,7 +54,6 @@  extern int shift_operator (rtx, enum mac
 extern enum arc_function_type arc_compute_function_type (tree);
 
 
-extern void arc_init (void);
 extern unsigned int arc_compute_frame_size (int);
 extern void arc_save_restore (FILE *, const char *, unsigned int,
 			      unsigned int, const char *);
Index: gcc/config/arc/arc.c
===================================================================
--- gcc/config/arc/arc.c	(revision 164243)
+++ gcc/config/arc/arc.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* Subroutines used for code generation on the Argonaut ARC cpu.
    Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+   2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -95,6 +95,7 @@  static bool arc_return_in_memory (const_
 static bool arc_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
 				   const_tree, bool);
 static void arc_trampoline_init (rtx, tree, rtx);
+static void arc_option_override (void);
 
 
 /* ARC specific attributs.  */
@@ -130,6 +131,9 @@  static const struct attribute_spec arc_a
 #undef TARGET_HANDLE_OPTION
 #define TARGET_HANDLE_OPTION arc_handle_option
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE arc_option_override
+
 #undef TARGET_RTX_COSTS
 #define TARGET_RTX_COSTS arc_rtx_costs
 #undef TARGET_ADDRESS_COST
@@ -173,10 +177,11 @@  arc_handle_option (size_t code, const ch
     }
 }
 
-/* Called by OVERRIDE_OPTIONS to initialize various things.  */
+/* Implement TARGET_OPTION_OVERRIDE.
+   These need to be done at start up.  It's convenient to do them here.  */
 
-void
-arc_init (void)
+static void
+arc_option_override (void)
 {
   char *tmp;
   
Index: gcc/config/arc/arc.h
===================================================================
--- gcc/config/arc/arc.h	(revision 164243)
+++ gcc/config/arc/arc.h	(working copy)
@@ -1,6 +1,6 @@ 
 /* Definitions of target machine for GNU compiler, Argonaut ARC cpu.
    Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005,
-   2007, 2008, 2009 Free Software Foundation, Inc.
+   2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -82,24 +82,9 @@  extern int arc_cpu_type;
 /* Check if CPU is an extension and set `arc_cpu_type' and `arc_mangle_cpu'
    appropriately.  The result should be nonzero if the cpu is recognized,
    otherwise zero.  This is intended to be redefined in a cover file.
-   This is used by arc_init.  */
+   This is used by arc_handle_option.  */
 #define ARC_EXTENSION_CPU(cpu) 0
 
-/* Sometimes certain combinations of command options do not make
-   sense on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
-
-   Don't use this macro to turn on various extra optimizations for
-   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
-
-
-#define OVERRIDE_OPTIONS \
-do {				\
-  /* These need to be done at start up.  It's convenient to do them here.  */ \
-  arc_init ();			\
-} while (0)
 
 /* Target machine storage layout.  */
 
Index: gcc/config/mcore/mcore-protos.h
===================================================================
--- gcc/config/mcore/mcore-protos.h	(revision 164243)
+++ gcc/config/mcore/mcore-protos.h	(working copy)
@@ -1,5 +1,5 @@ 
 /* Prototypes for exported functions defined in mcore.c
-   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007
+   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2009, 2010
    Free Software Foundation, Inc.
    Contributed by Nick Clifton (nickc@redhat.com)
 
@@ -29,7 +29,6 @@  extern int          mcore_initial_elimin
 extern int          mcore_byte_offset            	(unsigned int);
 extern int          mcore_halfword_offset        	(unsigned int);
 extern int          mcore_const_trick_uses_not   	(HOST_WIDE_INT);
-extern void         mcore_override_options       	(void);
 extern int          mcore_dllexport_name_p       	(const char *);
 extern int          mcore_dllimport_name_p       	(const char *);
 extern int          mcore_naked_function_p       	(void);
Index: gcc/config/mcore/mcore.c
===================================================================
--- gcc/config/mcore/mcore.c	(revision 164243)
+++ gcc/config/mcore/mcore.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* Output routines for Motorola MCore processor
    Copyright (C) 1993, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008,
-   2009 Free Software Foundation, Inc.
+   2009, 2010 Free Software Foundation, Inc.
 
    This file is part of GCC.
 
@@ -149,6 +149,7 @@  static int        mcore_arg_partial_byte
 						 tree, bool);
 static void       mcore_asm_trampoline_template (FILE *);
 static void       mcore_trampoline_init		(rtx, tree, rtx);
+static void       mcore_option_override		(void);
 
 /* MCore specific attributes.  */
 
@@ -225,6 +226,9 @@  static const struct attribute_spec mcore
 #undef  TARGET_TRAMPOLINE_INIT
 #define TARGET_TRAMPOLINE_INIT		mcore_trampoline_init
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE mcore_option_override
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 /* Adjust the stack and return the number of bytes taken to do it.  */
@@ -2679,8 +2683,8 @@  mcore_is_same_reg (rtx x, rtx y)
   return 0;
 }
 
-void
-mcore_override_options (void)
+static void
+mcore_option_override (void)
 {
   /* Only the m340 supports little endian code.  */
   if (TARGET_LITTLE_END && ! TARGET_M340)
Index: gcc/config/mcore/mcore.h
===================================================================
--- gcc/config/mcore/mcore.h	(revision 164243)
+++ gcc/config/mcore/mcore.h	(working copy)
@@ -1,7 +1,7 @@ 
 /* Definitions of target machine for GNU compiler,
    for Motorola M*CORE Processor.
    Copyright (C) 1993, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
-   2008, 2009 Free Software Foundation, Inc.
+   2008, 2009, 2010 Free Software Foundation, Inc.
 
    This file is part of GCC.
 
@@ -110,11 +110,6 @@  extern char * mcore_current_function_nam
     }						\
 }
 
-/* What options are we going to force to specific settings,
-   regardless of what the user thought he wanted.
-   We also use this for some post-processing of options.  */
-#define OVERRIDE_OPTIONS  mcore_override_options ()
-
 /* Target machine storage Layout.  */
 
 #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE)  	\
Index: gcc/config/score/score3.c
===================================================================
--- gcc/config/score/score3.c	(revision 164243)
+++ gcc/config/score/score3.c	(working copy)
@@ -1,5 +1,5 @@ 
 /* score3.c for Sunplus S+CORE processor
-   Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
    Contributed by Sunnorth
 
    This file is part of GCC.
@@ -635,9 +635,9 @@  score3_asm_file_end (void)
     }
 }
 
-/* Implement OVERRIDE_OPTIONS macro.  */
+/* Implement TARGET_OPTION_OVERRIDE hook.  */
 void
-score3_override_options (void)
+score3_option_override (void)
 {
   flag_pic = false;
   if (!flag_pic)
Index: gcc/config/score/score7.c
===================================================================
--- gcc/config/score/score7.c	(revision 164243)
+++ gcc/config/score/score7.c	(working copy)
@@ -1,5 +1,5 @@ 
 /* score7.c for Sunplus S+CORE processor
-   Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
    Contributed by Sunnorth
 
    This file is part of GCC.
@@ -634,9 +634,9 @@  score7_asm_file_end (void)
     }
 }
 
-/* Implement OVERRIDE_OPTIONS macro.  */
+/* Implement TARGET_OPTION_OVERRIDE hook.  */
 void
-score7_override_options (void)
+score7_option_override (void)
 {
   flag_pic = false;
   if (!flag_pic)
Index: gcc/config/score/score3.h
===================================================================
--- gcc/config/score/score3.h	(revision 164243)
+++ gcc/config/score/score3.h	(working copy)
@@ -1,5 +1,5 @@ 
 /* score3.h for Sunplus S+CORE processor
-   Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
    Contributed by Sunnorth
 
    This file is part of GCC.
@@ -90,7 +90,7 @@  extern section *score3_select_rtx_sectio
 extern bool score3_in_small_data_p (tree decl);
 extern void score3_asm_file_start (void);
 extern void score3_asm_file_end (void);
-extern void score3_override_options (void);
+extern void score3_option_override (void);
 extern int score3_reg_class (int regno);
 extern enum reg_class score3_preferred_reload_class (rtx x ATTRIBUTE_UNUSED,
                                                      enum reg_class rclass);
Index: gcc/config/score/score-protos.h
===================================================================
--- gcc/config/score/score-protos.h	(revision 164243)
+++ gcc/config/score/score-protos.h	(working copy)
@@ -1,5 +1,5 @@ 
 /* score-protos.h for Sunplus S+CORE processor
-   Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This file is part of GCC.
 
@@ -59,7 +59,6 @@  extern void score_init_cumulative_args (
 extern void score_declare_object (FILE *stream, const char *name,
                                   const char *directive, const char *fmt, ...);
 extern int score_output_external (FILE *file, tree decl, const char *name);
-extern void score_override_options (void);
 extern enum reg_class score_secondary_reload_class (enum reg_class rclass,
                                                     enum machine_mode mode,
                                                     rtx x);
Index: gcc/config/score/score7.h
===================================================================
--- gcc/config/score/score7.h	(revision 164243)
+++ gcc/config/score/score7.h	(working copy)
@@ -1,5 +1,5 @@ 
 /* score7.h for Sunplus S+CORE processor
-   Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
    Contributed by Sunnorth
 
    This file is part of GCC.
@@ -90,7 +90,7 @@  extern section *score7_select_rtx_sectio
 extern bool score7_in_small_data_p (tree decl);
 extern void score7_asm_file_start (void);
 extern void score7_asm_file_end (void);
-extern void score7_override_options (void);
+extern void score7_option_override (void);
 extern int score7_reg_class (int regno);
 extern enum reg_class score7_preferred_reload_class (rtx x ATTRIBUTE_UNUSED,
                                                      enum reg_class rclass);
Index: gcc/config/score/score.c
===================================================================
--- gcc/config/score/score.c	(revision 164243)
+++ gcc/config/score/score.c	(working copy)
@@ -51,6 +51,8 @@ 
 #include "score3.h"
 #include "df.h"
 
+static void score_option_override (void);
+
 #undef  TARGET_ASM_FILE_START
 #define TARGET_ASM_FILE_START           score_asm_file_start
 
@@ -67,6 +69,8 @@ 
 #define TARGET_DEFAULT_TARGET_FLAGS     TARGET_DEFAULT
 #undef TARGET_HANDLE_OPTION
 #define TARGET_HANDLE_OPTION            score_handle_option
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE          score_option_override
 
 #undef TARGET_LEGITIMIZE_ADDRESS
 #define TARGET_LEGITIMIZE_ADDRESS	score_legitimize_address
@@ -351,16 +355,16 @@  score_handle_option (size_t code, const 
     }
 }
 
-/* Implement OVERRIDE_OPTIONS macro.  */
-void
-score_override_options (void)
+/* Implement TARGET_OPTION_OVERRIDE hook.  */
+static void
+score_option_override (void)
 {
   if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
-    return score7_override_options ();
+    return score7_option_override ();
   else if (TARGET_SCORE3)
-    return score3_override_options ();
+    return score3_option_override ();
 
-  return score7_override_options ();
+  return score7_option_override ();
 }
 
 /* Implement REGNO_REG_CLASS macro.  */
Index: gcc/config/score/score.h
===================================================================
--- gcc/config/score/score.h	(revision 164243)
+++ gcc/config/score/score.h	(working copy)
@@ -1,5 +1,5 @@ 
 /* score.h for Sunplus S+CORE processor
-   Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
    Contributed by Sunnorth.
 
    This file is part of GCC.
@@ -98,8 +98,6 @@ 
 #define TARGET_VERSION \
       fprintf (stderr, "Sunplus S+core rev=%s", SCORE_GCC_VERSION);
 
-#define OVERRIDE_OPTIONS       score_override_options ()
-
 /* Show we can debug even without a frame pointer.  */
 #define CAN_DEBUG_WITHOUT_FP
 
@@ -235,7 +233,7 @@ 
 
    Regarding coprocessor registers: without evidence to the contrary,
    it's best to assume that each coprocessor register has a unique
-   use.  This can be overridden, in, e.g., override_options() or
+   use.  This can be overridden, in, e.g., TARGET_OPTION_OVERRIDE or
    CONDITIONAL_REGISTER_USAGE should the assumption be inappropriate
    for a particular target.  */
 
Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c	(revision 164243)
+++ gcc/config/arm/arm.c	(working copy)
@@ -215,6 +215,7 @@  static void arm_init_libfuncs (void);
 static tree arm_build_builtin_va_list (void);
 static void arm_expand_builtin_va_start (tree, rtx);
 static tree arm_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *);
+static void arm_option_override (void);
 static bool arm_handle_option (size_t, const char *, int);
 static void arm_target_help (void);
 static unsigned HOST_WIDE_INT arm_shift_truncation_mask (enum machine_mode);
@@ -317,6 +318,8 @@  static const struct attribute_spec arm_a
 #define TARGET_HANDLE_OPTION arm_handle_option
 #undef  TARGET_HELP
 #define TARGET_HELP arm_target_help
+#undef  TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE arm_option_override
 
 #undef  TARGET_COMP_TYPE_ATTRIBUTES
 #define TARGET_COMP_TYPE_ATTRIBUTES arm_comp_type_attributes
@@ -1372,13 +1375,16 @@  arm_target_help (void)
 
 }
 
-/* Fix up any incompatible options that the user has specified.
-   This has now turned into a maze.  */
-void
-arm_override_options (void)
+/* Fix up any incompatible options that the user has specified.  */
+static void
+arm_option_override (void)
 {
   unsigned i;
 
+#ifdef SUBTARGET_OVERRIDE_OPTIONS
+  SUBTARGET_OVERRIDE_OPTIONS;
+#endif
+
   if (arm_selected_arch)
     {
       if (arm_selected_cpu)
Index: gcc/config/arm/arm.h
===================================================================
--- gcc/config/arm/arm.h	(revision 164243)
+++ gcc/config/arm/arm.h	(working copy)
@@ -1,6 +1,6 @@ 
 /* Definitions of target machine for GNU compiler, for ARM.
    Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
    Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
    and Martin Simmons (@harleqn.co.uk).
@@ -498,8 +498,6 @@  extern int arm_arch_hwdiv;
    that is controlled by the APCS-FRAME option.  */
 #define CAN_DEBUG_WITHOUT_FP
 
-#define OVERRIDE_OPTIONS  arm_override_options ()
-
 #define OPTIMIZATION_OPTIONS(LEVEL,SIZE)		\
 	arm_optimization_options ((LEVEL), (SIZE))
 
Index: gcc/config/arm/arm-protos.h
===================================================================
--- gcc/config/arm/arm-protos.h	(revision 164243)
+++ gcc/config/arm/arm-protos.h	(working copy)
@@ -1,6 +1,6 @@ 
 /* Prototypes for exported functions defined in arm.c and pe.c
    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-   2009 Free Software Foundation, Inc.
+   2009, 2010 Free Software Foundation, Inc.
    Contributed by Richard Earnshaw (rearnsha@arm.com)
    Minor hacks by Nick Clifton (nickc@cygnus.com)
 
@@ -23,7 +23,6 @@ 
 #ifndef GCC_ARM_PROTOS_H
 #define GCC_ARM_PROTOS_H
 
-extern void arm_override_options (void);
 extern void arm_optimization_options (int, int);
 extern int use_return_insn (int, rtx);
 extern enum reg_class arm_regno_class (int);
Index: gcc/config/arm/arm.md
===================================================================
--- gcc/config/arm/arm.md	(revision 164243)
+++ gcc/config/arm/arm.md	(working copy)
@@ -333,7 +333,7 @@ 
 	 (const_string "alu")))
 
 ; Load scheduling, set from the arm_ld_sched variable
-; initialized by arm_override_options() 
+; initialized by arm_option_override()
 (define_attr "ldsched" "no,yes" (const (symbol_ref "arm_ld_sched")))
 
 ;; Classification of NEON instructions for scheduling purposes.
Index: gcc/config/arm/vxworks.h
===================================================================
--- gcc/config/arm/vxworks.h	(revision 164243)
+++ gcc/config/arm/vxworks.h	(working copy)
@@ -1,6 +1,6 @@ 
 /* Definitions of target machine for GCC,
    for ARM with targetting the VXWorks run time environment. 
-   Copyright (C) 1999, 2000, 2003, 2004, 2007, 2008
+   Copyright (C) 1999, 2000, 2003, 2004, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
 
    Contributed by: Mike Stump <mrs@wrs.com>
@@ -44,14 +44,8 @@  along with GCC; see the file COPYING3.  
     VXWORKS_OS_CPP_BUILTINS ();			\
   } while (0)
 
-#undef OVERRIDE_OPTIONS
-#define OVERRIDE_OPTIONS			\
-  do						\
-    {						\
-      VXWORKS_OVERRIDE_OPTIONS;			\
-      arm_override_options ();			\
-    }						\
-  while (0)
+#undef SUBTARGET_OVERRIDE_OPTIONS
+#define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS
 
 /* Subsume the arm/elf.h definition, and add RTP hooks.  */
 #undef SUBTARGET_CPP_SPEC
Index: gcc/config/vax/vax.c
===================================================================
--- gcc/config/vax/vax.c	(revision 164243)
+++ gcc/config/vax/vax.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* Subroutines for insn-output.c for VAX.
    Copyright (C) 1987, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002,
-   2004, 2005, 2006, 2007, 2008, 2009
+   2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -46,6 +46,7 @@  along with GCC; see the file COPYING3.  
 #include "target.h"
 #include "target-def.h"
 
+static void vax_option_override (void);
 static bool vax_legitimate_address_p (enum machine_mode, rtx, bool);
 static void vax_output_function_prologue (FILE *, HOST_WIDE_INT);
 static void vax_file_start (void);
@@ -111,16 +112,23 @@  static int vax_return_pops_args (tree, t
 #undef TARGET_RETURN_POPS_ARGS
 #define TARGET_RETURN_POPS_ARGS vax_return_pops_args
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE vax_option_override
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 /* Set global variables as needed for the options enabled.  */
 
-void
-override_options (void)
+static void
+vax_option_override (void)
 {
   /* We're VAX floating point, not IEEE floating point.  */
   if (TARGET_G_FLOAT)
     REAL_MODE_FORMAT (DFmode) = &vax_g_format;
+
+#ifdef SUBTARGET_OVERRIDE_OPTIONS
+  SUBTARGET_OVERRIDE_OPTIONS;
+#endif
 }
 
 /* Generate the assembly code for function entry.  FILE is a stdio
Index: gcc/config/vax/vax.h
===================================================================
--- gcc/config/vax/vax.h	(revision 164243)
+++ gcc/config/vax/vax.h	(working copy)
@@ -1,6 +1,6 @@ 
 /* Definitions of target machine for GNU compiler.  VAX version.
    Copyright (C) 1987, 1988, 1991, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
+   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -72,8 +72,6 @@  along with GCC; see the file COPYING3.  
 #define TARGET_DEFAULT (MASK_UNIX_ASM)
 #endif
 
-#define OVERRIDE_OPTIONS override_options ()
-
 
 /* Target machine storage layout */
 
Index: gcc/config/vax/elf.h
===================================================================
--- gcc/config/vax/elf.h	(revision 164243)
+++ gcc/config/vax/elf.h	(working copy)
@@ -1,5 +1,6 @@ 
 /* Target definitions for GNU compiler for VAX using ELF
-   Copyright (C) 2002, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005, 2007, 2008, 2009, 2010
+   Free Software Foundation, Inc.
    Contributed by Matt Thomas <matt@3am-software.com>
 
 This file is part of GCC.
@@ -72,13 +73,10 @@  along with GCC; see the file COPYING3.  
 #undef  ASM_OUTPUT_BEFORE_CASE_LABEL
 #define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE, PREFIX, NUM, TABLE)
 
-#undef OVERRIDE_OPTIONS
-#define OVERRIDE_OPTIONS				\
+#undef SUBTARGET_OVERRIDE_OPTIONS
+#define SUBTARGET_OVERRIDE_OPTIONS			\
   do							\
     {							\
-      /* Do generic VAX overrides.  */			\
-      override_options ();				\
-							\
       /* Turn off function CSE if we're doing PIC.  */	\
       if (flag_pic)					\
 	flag_no_function_cse = 1;			\
Index: gcc/config/vax/vax-protos.h
===================================================================
--- gcc/config/vax/vax-protos.h	(revision 164243)
+++ gcc/config/vax/vax-protos.h	(working copy)
@@ -1,5 +1,6 @@ 
 /* Definitions of target machine for GNU compiler.  VAX version.
-   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2009, 2010
+   Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -17,8 +18,6 @@  You should have received a copy of the G
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
-extern void override_options (void);
-
 extern bool legitimate_constant_address_p (rtx);
 extern bool legitimate_constant_p (rtx);
 extern bool vax_mode_dependent_address_p (rtx);
Index: gcc/config/h8300/h8300.c
===================================================================
--- gcc/config/h8300/h8300.c	(revision 164243)
+++ gcc/config/h8300/h8300.c	(working copy)
@@ -305,8 +305,8 @@  enum h8_cpu
 
 /* Initialize various cpu specific globals at start up.  */
 
-void
-h8300_init_once (void)
+static void
+h8300_option_override (void)
 {
   static const char *const h8_push_ops[2] = { "push" , "push.l" };
   static const char *const h8_pop_ops[2]  = { "pop"  , "pop.l"  };
@@ -5922,4 +5922,7 @@  h8300_trampoline_init (rtx m_tramp, tree
 #undef TARGET_TRAMPOLINE_INIT
 #define TARGET_TRAMPOLINE_INIT h8300_trampoline_init
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE h8300_option_override
+
 struct gcc_target targetm = TARGET_INITIALIZER;
Index: gcc/config/h8300/h8300.h
===================================================================
--- gcc/config/h8300/h8300.h	(revision 164243)
+++ gcc/config/h8300/h8300.h	(working copy)
@@ -1,7 +1,7 @@ 
 /* Definitions of target machine for GNU compiler.
    Renesas H8/300 (generic)
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
+   2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
    Contributed by Steve Chamberlain (sac@cygnus.com),
    Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com).
@@ -129,15 +129,6 @@  extern const char * const *h8_reg_names;
 #endif
 #endif /* !IN_LIBGCC2 */
 
-/* Do things that must be done once at start up.  */
-
-#define OVERRIDE_OPTIONS			\
-  do						\
-    {						\
-      h8300_init_once ();			\
-    }						\
-  while (0)
-
 /* Default target_flags if no switches specified.  */
 
 #ifndef TARGET_DEFAULT
Index: gcc/config/h8300/h8300-protos.h
===================================================================
--- gcc/config/h8300/h8300-protos.h	(revision 164243)
+++ gcc/config/h8300/h8300-protos.h	(working copy)
@@ -1,6 +1,7 @@ 
 /* Definitions of target machine for GNU compiler.
    Renesas H8/300 version
-   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2009, 2010
+   Free Software Foundation, Inc.
    Contributed by Steve Chamberlain (sac@cygnus.com),
    Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com).
 
@@ -95,7 +96,6 @@  extern int h8300_eightbit_data_p (tree);
 extern int h8300_tiny_data_p (tree);
 #endif /* TREE_CODE */
 
-extern void h8300_init_once (void);
 extern int h8300_can_use_return_insn_p (void);
 extern void h8300_expand_prologue (void);
 extern void h8300_expand_epilogue (void);
Index: gcc/config/vxworks.c
===================================================================
--- gcc/config/vxworks.c	(revision 164243)
+++ gcc/config/vxworks.c	(working copy)
@@ -1,5 +1,5 @@ 
 /* Common VxWorks target definitions for GNU compiler.
-   Copyright (C) 2007, 2008
+   Copyright (C) 2007, 2008, 2010
    Free Software Foundation, Inc.
    Contributed by CodeSourcery, Inc.
 
@@ -120,7 +120,7 @@  vxworks_emutls_var_init (tree var, tree 
   return build_constructor (type, v);
 }
 
-/* Do VxWorks-specific parts of OVERRIDE_OPTIONS.  */
+/* Do VxWorks-specific parts of TARGET_OPTION_OVERRIDE.  */
 
 void
 vxworks_override_options (void)
Index: gcc/config/vxworks.h
===================================================================
--- gcc/config/vxworks.h	(revision 164243)
+++ gcc/config/vxworks.h	(working copy)
@@ -1,5 +1,5 @@ 
 /* Common VxWorks target definitions for GNU compiler.
-   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
+   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010
    Free Software Foundation, Inc.
    Contributed by Wind River Systems.
    Rewritten by CodeSourcery, LLC.
@@ -84,7 +84,7 @@  along with GCC; see the file COPYING3.  
 #define	VXWORKS_STARTFILE_SPEC "%{mrtp:%{!shared:-l:crt0.o}}"
 #define VXWORKS_ENDFILE_SPEC ""
 
-/* Do VxWorks-specific parts of OVERRIDE_OPTIONS.  */
+/* Do VxWorks-specific parts of TARGET_OPTION_OVERRIDE.  */
 #undef VXWORKS_OVERRIDE_OPTIONS
 #define VXWORKS_OVERRIDE_OPTIONS vxworks_override_options ()
 extern void vxworks_override_options (void);
Index: gcc/config/mmix/mmix.h
===================================================================
--- gcc/config/mmix/mmix.h	(revision 164243)
+++ gcc/config/mmix/mmix.h	(working copy)
@@ -149,8 +149,6 @@  extern int target_flags;
 #define TARGET_VERSION \
   fprintf (stderr, " (MMIX)")
 
-#define OVERRIDE_OPTIONS mmix_override_options ()
-
 #define OPTIMIZATION_OPTIONS(LEVEL, SIZE)	\
   do						\
     {						\
Index: gcc/config/mmix/mmix-protos.h
===================================================================
--- gcc/config/mmix/mmix-protos.h	(revision 164243)
+++ gcc/config/mmix/mmix-protos.h	(working copy)
@@ -19,7 +19,6 @@  You should have received a copy of the G
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
-extern void mmix_override_options (void);
 extern void mmix_init_expanders (void);
 extern int mmix_eh_return_data_regno (int);
 extern int mmix_initial_elimination_offset (int, int);
Index: gcc/config/mmix/mmix.c
===================================================================
--- gcc/config/mmix/mmix.c	(revision 164243)
+++ gcc/config/mmix/mmix.c	(working copy)
@@ -113,6 +113,7 @@  rtx mmix_compare_op1;
 /* Intermediate for insn output.  */
 static int mmix_output_destination_register;
 
+static void mmix_option_override (void);
 static void mmix_asm_output_source_filename (FILE *, const char *);
 static void mmix_output_shiftvalue_op_from_str
   (FILE *, const char *, HOST_WIDEST_INT);
@@ -233,15 +234,18 @@  static void mmix_trampoline_init (rtx, t
 #undef TARGET_TRAMPOLINE_INIT
 #define TARGET_TRAMPOLINE_INIT mmix_trampoline_init
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE mmix_option_override
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 /* Functions that are expansions for target macros.
    See Target Macros in `Using and Porting GCC'.  */
 
-/* OVERRIDE_OPTIONS.  */
+/* TARGET_OPTION_OVERRIDE.  */
 
-void
-mmix_override_options (void)
+static void
+mmix_option_override (void)
 {
   /* Should we err or should we warn?  Hmm.  At least we must neutralize
      it.  For example the wrong kind of case-tables will be generated with
Index: gcc/config/bfin/bfin-protos.h
===================================================================
--- gcc/config/bfin/bfin-protos.h	(revision 164243)
+++ gcc/config/bfin/bfin-protos.h	(working copy)
@@ -1,5 +1,5 @@ 
 /* Prototypes for Blackfin functions used in the md file & elsewhere.
-   Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This file is part of GNU CC.
 
@@ -99,13 +99,11 @@  extern enum reg_class secondary_output_r
 						     rtx);
 extern char *section_asm_op_1 (SECT_ENUM_T);
 extern char *section_asm_op (SECT_ENUM_T);
-extern void override_options (void);
 extern void print_operand (FILE *,  rtx, char);
 extern void print_address_operand (FILE *, rtx);
 extern void split_di (rtx [], int, rtx [], rtx []);
 extern int split_load_immediate (rtx []);
 extern void emit_pic_move (rtx *, Mmode);
-extern void override_options (void);
 extern void asm_conditional_branch (rtx, rtx *, int, int);
 extern rtx bfin_gen_compare (rtx, Mmode);
 
Index: gcc/config/bfin/bfin.c
===================================================================
--- gcc/config/bfin/bfin.c	(revision 164243)
+++ gcc/config/bfin/bfin.c	(working copy)
@@ -358,7 +358,7 @@  output_file_start (void) 
 
   /* Variable tracking should be run after all optimizations which change order
      of insns.  It also needs a valid CFG.  This can't be done in
-     override_options, because flag_var_tracking is finalized after
+     bfin_option_override, because flag_var_tracking is finalized after
      that.  */
   bfin_flag_var_tracking = flag_var_tracking;
   flag_var_tracking = 0;
@@ -2639,10 +2639,10 @@  bfin_init_machine_status (void)
   return ggc_alloc_cleared_machine_function ();
 }
 
-/* Implement the macro OVERRIDE_OPTIONS.  */
+/* Implement the TARGET_OPTION_OVERRIDE hook.  */
 
-void
-override_options (void)
+static void
+bfin_option_override (void)
 {
   /* If processor type is not specified, enable all workarounds.  */
   if (bfin_cpu_type == BFIN_CPU_UNKNOWN)
@@ -6626,6 +6626,9 @@  bfin_expand_builtin (tree exp, rtx targe
 #undef TARGET_HANDLE_OPTION
 #define TARGET_HANDLE_OPTION bfin_handle_option
 
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE bfin_option_override
+
 #undef TARGET_DEFAULT_TARGET_FLAGS
 #define TARGET_DEFAULT_TARGET_FLAGS TARGET_DEFAULT
 
Index: gcc/config/bfin/bfin.h
===================================================================
--- gcc/config/bfin/bfin.h	(revision 164243)
+++ gcc/config/bfin/bfin.h	(working copy)
@@ -276,17 +276,6 @@  extern int target_flags;
 
 extern const char *bfin_library_id_string;
 
-/* Sometimes certain combinations of command options do not make
-   sense on a particular target machine.  You can define a macro
-   `OVERRIDE_OPTIONS' to take account of this.  This macro, if
-   defined, is executed once just after all the command options have
-   been parsed.
- 
-   Don't use this macro to turn on various extra optimizations for
-   `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
- 
-#define OVERRIDE_OPTIONS override_options ()
-
 #define FUNCTION_MODE    SImode
 #define Pmode            SImode