Patchwork Add GNU userspace options from specs to new gnu-user.opt

login
register
mail settings
Submitter Joseph S. Myers
Date Jan. 27, 2011, 4:45 p.m.
Message ID <Pine.LNX.4.64.1101271642070.4828@digraph.polyomino.org.uk>
Download mbox | patch
Permalink /patch/80715/
State New
Headers show

Comments

Joseph S. Myers - Jan. 27, 2011, 4:45 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 generally accepted by specs for GNU-userspace
targets to a new gnu-user.opt file.  Note that even where these
targets do not use gnu-user.h, the subdirectory specs generally accept
these options, and where the specs do not accept the options that can
reasonably be considered a bug in those specs (except for some uClinux
targets where some of the options may be inapplicable - however, if
the options are inapplicable and not in specs the driver will continue
to reject them as before by the logic for rejecting options not
matched by a spec; that logic is intended to stay, with only the
converse logic of accepting an otherwise unknown option matched by
some spec intended to go).

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.  OK to
commit?

2011-01-27  Joseph Myers  <joseph@codesourcery.com>

	* config/gnu-user.opt: New.
	* config.gcc (*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu |
	*-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu,
	*-*-uclinux*): Use gnu-user.opt.
Joseph S. Myers - Feb. 3, 2011, 4:13 p.m.
Ping.  This patch 
<http://gcc.gnu.org/ml/gcc-patches/2011-01/msg02024.html> is pending 
review.
Joseph S. Myers - Feb. 8, 2011, 8:37 p.m.
I have committed this patch.

Patch

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 169317)
+++ gcc/config.gcc	(working copy)
@@ -543,6 +543,7 @@  case ${target} in
   use_gcc_stdint=wrap
   ;;
 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
+  extra_options="$extra_options gnu-user.opt"
   extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
   gas=yes
   gnu_ld=yes
@@ -657,6 +658,7 @@  case ${target} in
   use_gcc_stdint=wrap
   ;;
 *-*-uclinux*)
+  extra_options="$extra_options gnu-user.opt"
   use_gcc_stdint=wrap
   tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
   ;;
Index: gcc/config/gnu-user.opt
===================================================================
--- gcc/config/gnu-user.opt	(revision 0)
+++ gcc/config/gnu-user.opt	(revision 0)
@@ -0,0 +1,39 @@ 
+; Options for systems using gnu-user.h.
+
+; Copyright (C) 2011
+; Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 3, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING3.  If not see
+; <http://www.gnu.org/licenses/>.
+
+; See the GCC internals manual (options.texi) for a description of
+; this file's format.
+
+; Please try to keep this file in ASCII collating order.
+
+posix
+Driver
+
+profile
+Driver
+
+pthread
+Driver
+
+rdynamic
+Driver
+
+; This comment is to ensure we retain the blank line above.