This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Add Xtensa ELF -rdynamic option from specs to new xtensa/elf.opt
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 8 Feb 2011 22:55:15 +0000 (UTC)
- Subject: Add Xtensa ELF -rdynamic option from specs to new xtensa/elf.opt
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.
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.
--
Joseph S. Myers
joseph@codesourcery.com