OSDN Git Service

* config.gcc (sparc-*-linux*): Do not include sparc/gas.h.
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Mar 2010 23:35:12 +0000 (23:35 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Mar 2010 23:35:12 +0000 (23:35 +0000)
(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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157181 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config.gcc
gcc/config/sparc/gas.h [deleted file]
gcc/config/sparc/sol2-64.h
gcc/config/sparc/sol2-gas-bi.h
gcc/config/sparc/sol2-gas.h
gcc/config/sparc/sol2-gld.h
gcc/config/sparc/sol2.h
gcc/config/sparc/sparc.c
gcc/config/sparc/sysv4.h

index c3557b6..07db711 100644 (file)
@@ -1,3 +1,20 @@
+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.
index 8d0475f..c131b89 100644 (file)
@@ -2362,7 +2362,7 @@ sparc-*-elf*)
        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
@@ -2390,12 +2390,12 @@ sparc64-*-solaris2* | sparcv9-*-solaris2*)
                ;;
        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
@@ -2414,7 +2414,7 @@ sparc64-*-solaris2* | sparcv9-*-solaris2*)
        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"
@@ -2424,28 +2424,20 @@ sparc-*-solaris2*)
                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"
@@ -2482,7 +2474,7 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd*)
        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"
        ;;
diff --git a/gcc/config/sparc/gas.h b/gcc/config/sparc/gas.h
deleted file mode 100644 (file)
index e377929..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-/* 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
index d0dd284..cf0bbff 100644 (file)
@@ -1,5 +1,23 @@
 /* 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 \
index 88b3954..001f978 100644 (file)
@@ -1,5 +1,23 @@
 /* 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"
index 2cbfa45..e9f2490 100644 (file)
@@ -34,3 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #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
index eb422cb..b63693c 100644 (file)
@@ -1,5 +1,23 @@
 /* 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
index a3f7647..21882ae 100644 (file)
@@ -195,4 +195,8 @@ along with GCC; see the file COPYING3.  If not see
     }                                                                  \
   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"
index c45460d..e4ef862 100644 (file)
@@ -368,11 +368,8 @@ static int save_or_restore_regs (int, int, rtx, int, int);
 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);
@@ -464,14 +461,9 @@ static bool fpu_option_set = false;
 
 /* 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"
@@ -8002,10 +7994,11 @@ sparc_profile_hook (int labelno)
     }
 }
 \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);
 
@@ -8022,7 +8015,6 @@ sparc_elf_asm_named_section (const char *name, unsigned int flags,
 
   fputc ('\n', asm_out_file);
 }
-#endif /* OBJECT_FORMAT_ELF */
 
 /* We do not allow indirect calls to be optimized into sibling calls.
 
index 7620711..c78add4 100644 (file)
@@ -127,10 +127,6 @@ do { ASM_OUTPUT_ALIGN ((FILE), Pmode == SImode ? 2 : 3);           \
 #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)