diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c3557b6de10..07db7111dbc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,20 @@ +2010-03-02 Eric Botcazou + + * 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 * config/alpha/alpha.c (override_options): Fix -mtune error message. diff --git a/gcc/config.gcc b/gcc/config.gcc index 8d0475f27aa..c131b89d0b8 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -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 index e3779293532..00000000000 --- a/gcc/config/sparc/gas.h +++ /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 diff --git a/gcc/config/sparc/sol2-64.h b/gcc/config/sparc/sol2-64.h index d0dd284daf0..cf0bbff1ec6 100644 --- a/gcc/config/sparc/sol2-64.h +++ b/gcc/config/sparc/sol2-64.h @@ -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 +. */ #undef TARGET_DEFAULT #define TARGET_DEFAULT \ diff --git a/gcc/config/sparc/sol2-gas-bi.h b/gcc/config/sparc/sol2-gas-bi.h index 88b3954f820..001f978b889 100644 --- a/gcc/config/sparc/sol2-gas-bi.h +++ b/gcc/config/sparc/sol2-gas-bi.h @@ -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 +. */ #undef AS_SPARC64_FLAG #define AS_SPARC64_FLAG "-TSO -64 -Av9" diff --git a/gcc/config/sparc/sol2-gas.h b/gcc/config/sparc/sol2-gas.h index 2cbfa45d4b0..e9f2490980f 100644 --- a/gcc/config/sparc/sol2-gas.h +++ b/gcc/config/sparc/sol2-gas.h @@ -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 diff --git a/gcc/config/sparc/sol2-gld.h b/gcc/config/sparc/sol2-gld.h index eb422cb8667..b63693c002f 100644 --- a/gcc/config/sparc/sol2-gld.h +++ b/gcc/config/sparc/sol2-gld.h @@ -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 +. */ /* Undefine this so that attribute((init_priority)) works. */ #undef CTORS_SECTION_ASM_OP diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h index a3f7647027b..21882ae206a 100644 --- a/gcc/config/sparc/sol2.h +++ b/gcc/config/sparc/sol2.h @@ -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" diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index c45460db4db..e4ef862c96d 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -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) } } -#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. diff --git a/gcc/config/sparc/sysv4.h b/gcc/config/sparc/sysv4.h index 7620711d3b6..c78add484fe 100644 --- a/gcc/config/sparc/sysv4.h +++ b/gcc/config/sparc/sysv4.h @@ -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)