+2010-03-02 Eric Botcazou <ebotcazou@adacore.com>
+
+ * config.gcc (sparc-*-linux*): Do not include sparc/gas.h.
+ (sparc64-*-linux*): Likewise.
+ (sparc64-*-solaris2*): Include assembler files before linker ones.
+ (sparc-*-solaris2*): Simplify and reorder to match previous case.
+ * config/sparc/gas.h: Delete.
+ * config/sparc/sol2-64.h: Add copyright notice.
+ * config/sparc/sol2-gas-bi.h: Likewise.
+ * config/sparc/sol2-gld.h: Likewise.
+ * config/sparc/sysv4.h (TARGET_ASM_NAMED_SECTION): Delete.
+ * config/sparc/sol2.h (TARGET_ASM_NAMED_SECTION): Redefine.
+ * config/sparc/sol2-gas.h (TARGET_ASM_NAMED_SECTION): Likewise.
+ * config/sparc/sparc.c (TARGET_ASM_ALIGNED_SI_OP): Never redefine.
+ (sparc_elf_asm_named_section): Rename into...
+ (sparc_solaris_elf_asm_named_section): ...this. Always define.
+
2010-03-02 Uros Bizjak <ubizjak@gmail.com>
* config/alpha/alpha.c (override_options): Fix -mtune error message.
extra_parts="crti.o crtn.o crtbegin.o crtend.o"
;;
sparc-*-linux*) # SPARC's running GNU/Linux, libc6
- tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/gas.h linux.h glibc-stdint.h"
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h glibc-stdint.h"
extra_options="${extra_options} sparc/long-double-switch.opt"
tmake_file="${tmake_file} sparc/t-linux"
if test x$enable_targets = xall; then
;;
esac
tm_file="${tm_file} sparc/sol2.h sparc/sol2-64.h sparc/sol2-bi.h"
- if test x$gnu_ld = xyes; then
- tm_file="${tm_file} sparc/sol2-gld.h sparc/sol2-gld-bi.h"
- fi
if test x$gas = xyes; then
tm_file="${tm_file} sparc/sol2-gas.h sparc/sol2-gas-bi.h"
fi
+ if test x$gnu_ld = xyes; then
+ tm_file="${tm_file} sparc/sol2-gld.h sparc/sol2-gld-bi.h"
+ fi
tm_file="${tm_file} tm-dwarf2.h"
tmake_file="t-sol2 sparc/t-sol2 sparc/t-sol2-64 sparc/t-crtfm"
if test x$gnu_ld = xyes; then
esac
;;
sparc-*-solaris2*)
- tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h"
+ tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h"
case ${target} in
*-*-solaris2.1[0-9]*)
tm_file="${tm_file} sol2-10.h"
use_gcc_stdint=provide
;;
esac
- tm_file="${tm_file} sparc/sol2.h"
- if test x$gnu_ld = xyes; then
- tm_file="${tm_file} sparc/sol2-gld.h"
- fi
+ tm_file="${tm_file} sparc/sol2.h sparc/sol2-bi.h"
if test x$gas = xyes; then
- tm_file="${tm_file} sparc/sol2-gas.h"
+ tm_file="${tm_file} sparc/sol2-gas.h sparc/sol2-gas-bi.h"
fi
- tmake_file="t-sol2 sparc/t-sol2 sparc/t-crtfm"
+ if test x$gnu_ld = xyes; then
+ tm_file="${tm_file} sparc/sol2-gld.h sparc/sol2-gld-bi.h"
+ fi
+ tm_file="${tm_file} tm-dwarf2.h"
+ tmake_file="t-sol2 sparc/t-sol2 sparc/t-sol2-64 sparc/t-crtfm"
if test x$gnu_ld = xyes; then
tmake_file="$tmake_file t-slibgcc-elf-ver"
else
tmake_file="$tmake_file t-slibgcc-sld"
fi
- tm_file="sparc/biarch64.h ${tm_file} sparc/sol2-bi.h"
- if test x$gnu_ld = xyes; then
- tm_file="${tm_file} sparc/sol2-gld-bi.h"
- fi
- if test x$gas = xyes; then
- tm_file="${tm_file} sparc/sol2-gas-bi.h"
- fi
- tm_file="${tm_file} tm-dwarf2.h"
- tmake_file="$tmake_file sparc/t-sol2-64"
test x$with_cpu != x || with_cpu=v9
c_target_objs="sol2-c.o"
cxx_target_objs="sol2-c.o"
esac
;;
sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux
- tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/gas.h linux.h glibc-stdint.h sparc/linux64.h"
+ tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h glibc-stdint.h sparc/linux64.h"
extra_options="${extra_options} sparc/long-double-switch.opt"
tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64 sparc/t-crtfm"
;;
+++ /dev/null
-/* Definitions of target machine for GCC, for SPARC
- using the GNU assembler. */
-
-/* Switch into a generic section. */
-#undef TARGET_ASM_NAMED_SECTION
-#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
/* Definitions of target machine for GCC, for bi-arch SPARC
- running Solaris 2, defaulting to 64-bit code generation. */
+ running Solaris 2, defaulting to 64-bit code generation.
+
+ Copyright (C) 1999, 2010 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/>. */
#undef TARGET_DEFAULT
#define TARGET_DEFAULT \
/* Definitions of target machine for GCC, for bi-arch SPARC
- running Solaris 2 using the GNU assembler. */
+ running Solaris 2 using the GNU assembler.
+
+ Copyright (C) 2002, 2010 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/>. */
#undef AS_SPARC64_FLAG
#define AS_SPARC64_FLAG "-TSO -64 -Av9"
#define TARGET_SUN_TLS 0
#define TARGET_GNU_TLS 1
#endif
+
+/* Use default ELF section syntax. */
+#undef TARGET_ASM_NAMED_SECTION
+#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
/* Definitions of target machine for GCC, for SPARC running Solaris 2
- using the GNU linker. */
+ using the GNU linker.
+
+ Copyright (C) 2002, 2010 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/>. */
/* Undefine this so that attribute((init_priority)) works. */
#undef CTORS_SECTION_ASM_OP
} \
while (0)
+/* Use Solaris ELF section syntax. */
+#undef TARGET_ASM_NAMED_SECTION
+#define TARGET_ASM_NAMED_SECTION sparc_solaris_elf_asm_named_section
+
#define MD_UNWIND_SUPPORT "config/sparc/sol2-unwind.h"
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)
-static void sparc_elf_asm_named_section (const char *, unsigned int, tree)
- ATTRIBUTE_UNUSED;
-#endif
-
+static void sparc_solaris_elf_asm_named_section (const char *, unsigned int,
+ tree) ATTRIBUTE_UNUSED;
static int sparc_adjust_cost (rtx, rtx, rtx, int);
static int sparc_issue_rate (void);
static void sparc_sched_init (FILE *, int, int);
/* Initialize the GCC target structure. */
-/* The sparc default is to use .half rather than .short for aligned
- HI objects. Use .word instead of .long on non-ELF systems. */
+/* The default is to use .half rather than .short for aligned HI objects. */
#undef TARGET_ASM_ALIGNED_HI_OP
#define TARGET_ASM_ALIGNED_HI_OP "\t.half\t"
-#ifndef OBJECT_FORMAT_ELF
-#undef TARGET_ASM_ALIGNED_SI_OP
-#define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
-#endif
#undef TARGET_ASM_UNALIGNED_HI_OP
#define TARGET_ASM_UNALIGNED_HI_OP "\t.uahalf\t"
}
}
\f
-#if defined (OBJECT_FORMAT_ELF)
+/* Solaris implementation of TARGET_ASM_NAMED_SECTION. */
+
static void
-sparc_elf_asm_named_section (const char *name, unsigned int flags,
- tree decl ATTRIBUTE_UNUSED)
+sparc_solaris_elf_asm_named_section (const char *name, unsigned int flags,
+ tree decl ATTRIBUTE_UNUSED)
{
fprintf (asm_out_file, "\t.section\t\"%s\"", name);
fputc ('\n', asm_out_file);
}
-#endif /* OBJECT_FORMAT_ELF */
/* We do not allow indirect calls to be optimized into sibling calls.
#undef DTORS_SECTION_ASM_OP
#define DTORS_SECTION_ASM_OP "\t.section\t\".dtors\",#alloc,#write"
-/* Switch into a generic section. */
-#undef TARGET_ASM_NAMED_SECTION
-#define TARGET_ASM_NAMED_SECTION sparc_elf_asm_named_section
-
#undef ASM_OUTPUT_ALIGNED_BSS
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)