Patchwork Add m68k uClinux options from specs to new m68k/uclinux.opt

login
register
mail settings
Submitter Joseph S. Myers
Date Feb. 9, 2011, 12:23 a.m.
Message ID <Pine.LNX.4.64.1102090023160.23870@digraph.polyomino.org.uk>
Download mbox | patch
Permalink /patch/82421/
State New
Headers show

Comments

Joseph S. Myers - Feb. 9, 2011, 12:23 a.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 the -elf2flt* options from specs in m68k/uclinux.h to
a new m68k/uclinux.opt.  It appears that the options accepted by
elf2flt's ld wrapper are actually -elf2flt and -elf2flt=*, so those
are what go in the .opt file.

Tested building cc1 and xgcc for cross to m68k-uclinux.  Committed.

This concludes the series of patches adding options found in my first
pass over all specs in GCC to .opt files.  I'll make another pass over
all specs to look for options missed in the first pass, as this check
is rather error-prone (and in the first pass I largely ignored -f and
-m options on the basis that they would not have worked in commands
that actually ran cc1 if they weren't in the .opt files - but some may
in practice have been used only when linking).  The actual driver
changes to stop accepting unknown options are planned for 4.7 (or,
before then, a development branch for those and other
options/multilibs changes unsuitable for trunk at this point).

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

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

Patch

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 169953)
+++ gcc/config.gcc	(working copy)
@@ -1768,6 +1768,7 @@  m68k-*-uclinux*)		# Motorola m68k/ColdFi
 	default_m68k_cpu=68020
 	default_cf_cpu=5206
 	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h"
+	extra_options="${extra_options} m68k/uclinux.opt"
  	tm_defines="${tm_defines} MOTOROLA=1"
 	tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
 	;;
Index: gcc/config/m68k/uclinux.opt
===================================================================
--- gcc/config/m68k/uclinux.opt	(revision 0)
+++ gcc/config/m68k/uclinux.opt	(revision 0)
@@ -0,0 +1,33 @@ 
+; m68k/ColdFire uClinux options.
+
+; 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.
+
+elf2flt
+Driver
+
+elf2flt=
+Driver JoinedOrMissing
+
+; This comment is to ensure we retain the blank line above.