This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Only expose sparc_solaris_elf_asm_named_section declaration on Solaris (PR target/49099)
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Eric Botcazou <ebotcazou at adacore dot com>
- Date: Thu, 26 May 2011 13:11:29 +0200
- Subject: Only expose sparc_solaris_elf_asm_named_section declaration on Solaris (PR target/49099)
As reported in the PR, mainline fails to build on non-Solaris SPARC
targets. The following patch fixes this.
Bootstrapped without regressions on sparc-sun-solaris2.11 with as and
gas, tested with a i386-pc-solaris2.10 x sparc-elf cross with
--enable-werror-always.
Ok for mainline?
Rainer
2011-05-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR target/49099
* config/sparc/sparc.c (sparc_solaris_elf_asm_named_section): Wrap
declaration in TARGET_SOLARIS.
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -392,8 +392,10 @@ static int save_or_restore_regs (int, in
static void emit_save_or_restore_regs (int);
static void sparc_asm_function_prologue (FILE *, HOST_WIDE_INT);
static void sparc_asm_function_epilogue (FILE *, HOST_WIDE_INT);
+#ifdef TARGET_SOLARIS
static void sparc_solaris_elf_asm_named_section (const char *, unsigned int,
tree) ATTRIBUTE_UNUSED;
+#endif
static int sparc_adjust_cost (rtx, rtx, rtx, int);
static int sparc_issue_rate (void);
static void sparc_sched_init (FILE *, int, int);
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University