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 <[email protected]>
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