This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [4.7] Make SPARC use PROCESSOR_NIAGARA2 for "niagara2"
- From: David Miller <davem at redhat dot com>
- To: joseph at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org, rth at redhat dot com, jakub at redhat dot com, ebotcazou at libertysurf dot fr
- Date: Wed, 09 Mar 2011 20:04:32 -0500 (EST)
- Subject: Re: [4.7] Make SPARC use PROCESSOR_NIAGARA2 for "niagara2"
- References: <Pine.LNX.4.64.1103100059530.28262@digraph.polyomino.org.uk>
From: "Joseph S. Myers" <joseph@codesourcery.com>
Date: Thu, 10 Mar 2011 01:01:12 +0000 (UTC)
> In the course of preparing target changes to avoid global state in
> option handlers (and use more .opt facilities to simplify those
> handlers) I found that SPARC has a PROCESSOR_NIAGARA2 enumeration
> value but maps "niagara2" in command-line options to PROCESSOR_NIAGARA
> for no apparent reason (at least, there's no comment to explain this
> oddity).
>
> Supposing this mapping to be a mistake, this patch changes it to use
> PROCESSOR_NIAGARA2. Tested building cc1 and xgcc for cross to
> sparc-elf. OK to commit for 4.7? (If the mapping is deliberate,
> changes to make SPARC use the .opt Enum facility will need to add a
> separate enumeration corresponding to -march values, in order to
> distinguish the two entries.)
>
> 2011-03-09 Joseph Myers <joseph@codesourcery.com>
>
> * config/sparc/sparc.c (sparc_option_override): Use
> PROCESSOR_NIAGARA2 not PROCESSOR_NIAGARA for "niagara2".
Thanks for finding this bug Joseph, please commit this fix and I think
it's appropriate for existing stable release branches as well.