From patchwork Tue Feb 8 22:55:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Add Xtensa ELF -rdynamic option from specs to new xtensa/elf.opt Date: Tue, 08 Feb 2011 12:55:15 -0000 From: "Joseph S. Myers" X-Patchwork-Id: 82410 Message-Id: To: gcc-patches@gcc.gnu.org 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 * 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 +; . + +; 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.