Patchwork Add MIPS options from specs to mips.opt

login
register
mail settings
Submitter Joseph S. Myers
Date Feb. 3, 2011, 8:21 p.m.
Message ID <Pine.LNX.4.64.1102032020570.18971@digraph.polyomino.org.uk>
Download mbox | patch
Permalink /patch/81715/
State New
Headers show

Comments

Joseph S. Myers - Feb. 3, 2011, 8:21 p.m.
In preparation for the driver only accepting options listed in .opt
files, and not other options that simply happen to match some spec,
this patch adds options from specs in mips.h to mips.opt.  -EB and -EL
are used in specs in various other headers as well; -noasmopt in
ASM_SPEC (via some levels of indirection).

For multilib selection based on features the equivalence of -EB to
-meb and -EL to -mel will need to be better expressed in the .opt
files - probably by making one form of the options an Alias for the
other.  (Given that, specs could be simplified to handle only the form
not marked as an Alias, and multilib configurations would need
updating to use only the non-Alias form, with MULTILIB_MATCHES between
the two forms removed.)  Right now, -EB/-EL are more or less treated
as canonical for the driver (by multilib configurations at least) and
-meb/-mel for cc1 (indeed, they are the only form that works with
cc1).

Tested building cc1 and xgcc for cross to mips-elf.  OK to commit?

2011-02-03  Joseph Myers  <joseph@codesourcery.com>

	* config/mips/mips.opt (EB, EL, noasmopt): New Driver options.
Richard Sandiford - Feb. 4, 2011, 9:18 a.m.
"Joseph S. Myers" <joseph@codesourcery.com> writes:
> In preparation for the driver only accepting options listed in .opt
> files, and not other options that simply happen to match some spec,
> this patch adds options from specs in mips.h to mips.opt.  -EB and -EL
> are used in specs in various other headers as well; -noasmopt in
> ASM_SPEC (via some levels of indirection).
>
> For multilib selection based on features the equivalence of -EB to
> -meb and -EL to -mel will need to be better expressed in the .opt
> files - probably by making one form of the options an Alias for the
> other.  (Given that, specs could be simplified to handle only the form
> not marked as an Alias, and multilib configurations would need
> updating to use only the non-Alias form, with MULTILIB_MATCHES between
> the two forms removed.)  Right now, -EB/-EL are more or less treated
> as canonical for the driver (by multilib configurations at least) and
> -meb/-mel for cc1 (indeed, they are the only form that works with
> cc1).

Yeah, this was to work around the old (pre-target-.opt-file) requirement
that every target-specific cc1 option had to be in the "-m" group.
-EB and -EL are supposed to be the canonical versions from a user
perspective, and I think -mel and -meb were originally intended
to be internal.  That wasn't enforced though, and I realise -mel
and -meb are now widely used as well.

I agree it would be nice to make -mel an alias of -EL, now that your
changes make that possible.

> 2011-02-03  Joseph Myers  <joseph@codesourcery.com>
>
> 	* config/mips/mips.opt (EB, EL, noasmopt): New Driver options.

OK, thanks.

Richard

Patch

Index: gcc/config/mips/mips.opt
===================================================================
--- gcc/config/mips/mips.opt	(revision 169769)
+++ gcc/config/mips/mips.opt	(working copy)
@@ -1,6 +1,6 @@ 
 ; Options for the MIPS port of the compiler
 ;
-; Copyright (C) 2005, 2007, 2008, 2010 Free Software Foundation, Inc.
+; Copyright (C) 2005, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
 ;
 ; This file is part of GCC.
 ;
@@ -18,6 +18,12 @@ 
 ; along with GCC; see the file COPYING3.  If not see
 ; <http://www.gnu.org/licenses/>.
 
+EB
+Driver
+
+EL
+Driver
+
 mabi=
 Target RejectNegative Joined
 -mabi=ABI	Generate code that conforms to the given ABI
@@ -299,3 +305,6 @@  Perform VR4130-specific alignment optimi
 mxgot
 Target Report Var(TARGET_XGOT)
 Lift restrictions on GOT size
+
+noasmopt
+Driver