Patchwork Add Xtensa ELF -rdynamic option from specs to new xtensa/elf.opt

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

Comments

Joseph S. Myers - Feb. 8, 2011, 10:55 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 the -rdynamic option from specs in xtensa/elf.h to a
new xtensa/elf.opt.  (I don't know why just this particular bare-metal
target supports -rdynamic - it may make sense in future to have some
common linker specs, including -rdynamic support, for all ELF targets
using the GNU linker - but the patch preserves the status quo for
now.)

Tested building cc1 and xgcc for cross to xtensa-elf.  Committed.

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

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

Patch

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 169947)
+++ gcc/config.gcc	(working copy)
@@ -2735,6 +2735,7 @@  xstormy16-*-elf)
 	;;
 xtensa*-*-elf*)
 	tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h xtensa/elf.h"
+	extra_options="${extra_options} xtensa/elf.opt"
 	tmake_file="xtensa/t-xtensa xtensa/t-elf"
 	;;
 xtensa*-*-linux*)
Index: gcc/config/xtensa/elf.opt
===================================================================
--- gcc/config/xtensa/elf.opt	(revision 0)
+++ gcc/config/xtensa/elf.opt	(revision 0)
@@ -0,0 +1,30 @@ 
+; Xtensa ELF (bare metal) 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.
+
+rdynamic
+Driver
+
+; This comment is to ensure we retain the blank line above.