This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Fix Solaris/SPARC bootstrap without gas
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Cc: David Miller <davem at davemloft dot net>
- Date: Tue, 26 Jan 2010 22:30:16 +0100
- Subject: PATCH: Fix Solaris/SPARC bootstrap without gas
This patch
[PATCH]: Fix comdat et al. on sparc
http://gcc.gnu.org/ml/gcc-patches/2010-01/msg01237.html
broke bootstrap on Solaris/SPARC since HAVE_GNU_AS is always defined
even without gas (as 0 in this case).
The following patch at least allowed the stage 1 libgcc to configure.
Ok for mainline?
I don't have current baselines of the 4.3 and 4.4 branches, so testing
there will take some time.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2010-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/sparc/sparc.c (sparc_elf_asm_named_section): Test for
HAVE_GNU_AS value.
* config/sparc/sysv4.h [HAVE_GNU_AS] (TARGET_ASM_NAMED_SECTION):
Test for HAVE_GNU_AS value.
diff -r 639f1353c2b9 gcc/config/sparc/sparc.c
--- a/gcc/config/sparc/sparc.c Mon Jan 25 10:22:04 2010 +0000
+++ b/gcc/config/sparc/sparc.c Tue Jan 26 22:29:25 2010 +0100
@@ -368,7 +368,7 @@
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);
-#if defined (OBJECT_FORMAT_ELF) && !defined (HAVE_GNU_AS)
+#if defined (OBJECT_FORMAT_ELF) && !HAVE_GNU_AS
static void sparc_elf_asm_named_section (const char *, unsigned int, tree);
#endif
@@ -7986,7 +7986,7 @@
}
}
-#if defined (OBJECT_FORMAT_ELF) && !defined (HAVE_GNU_AS)
+#if defined (OBJECT_FORMAT_ELF) && !HAVE_GNU_AS
static void
sparc_elf_asm_named_section (const char *name, unsigned int flags,
tree decl)
diff -r 639f1353c2b9 gcc/config/sparc/sysv4.h
--- a/gcc/config/sparc/sysv4.h Mon Jan 25 10:22:04 2010 +0000
+++ b/gcc/config/sparc/sysv4.h Tue Jan 26 22:29:25 2010 +0100
@@ -127,7 +127,7 @@
#undef DTORS_SECTION_ASM_OP
#define DTORS_SECTION_ASM_OP "\t.section\t\".dtors\",#alloc,#write"
-#ifndef HAVE_GNU_AS
+#if !HAVE_GNU_AS
/* Switch into a generic section. */
#undef TARGET_ASM_NAMED_SECTION
#define TARGET_ASM_NAMED_SECTION sparc_elf_asm_named_section