Add RTEMS options from specs to rtems.opt

Joseph S. Myers joseph@codesourcery.com
Fri Dec 31 10:20:00 GMT 2010


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 RTEMS options matched by specs in rtems.h to a new
.opt file rtems.opt.  RTEMS target configurations are reasonably
consistent, with all using rtems.h, after architecture-specific
headers so they don't get a chance to override the specs therein, and
only RTEMS targets using rtems.h.  Thus, in this patch rtems.opt is
added to extra_options in one place only rather than separately in
each place that uses rtems.h.

Tested building cc1 and xgcc for crosses to: arm-rtems avr-rtems
bfin-rtems moxie-rtems h8300-rtems i686-rtems lm32-rtems m32r-rtems
m68k-rtems mips-rtems powerpc-rtems sh-rtems sparc-rtems sparc64-rtems
m32c-rtems.  OK to commit?

2010-12-30  Joseph Myers  <joseph@codesourcery.com>

	* config/rtems.opt: New.
	* config.gcc (*-*-rtems*): Use rtems.opt.

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 168358)
+++ gcc/config.gcc	(working copy)
@@ -653,6 +653,7 @@ case ${target} in
   case ${enable_threads} in
     yes) thread_file='rtems' ;;
   esac
+  extra_options="${extra_options} rtems.opt"
   use_gcc_stdint=wrap
   ;;
 *-*-uclinux*)
Index: gcc/config/rtems.opt
===================================================================
--- gcc/config/rtems.opt	(revision 0)
+++ gcc/config/rtems.opt	(revision 0)
@@ -0,0 +1,33 @@
+; RTEMS options.
+
+; Copyright (C) 2010
+; Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 3, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING3.  If not see
+; <http://www.gnu.org/licenses/>.
+
+; 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.
+
+qnolinkcmds
+Driver
+
+qrtems
+Driver
+
+; This comment is to ensure we retain the blank line above.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list