config.gcc (sparc-*-linux*): Do not include sparc/gas.h.

* 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.

From-SVN: r157181
This commit is contained in:
Eric Botcazou 2010-03-02 23:35:12 +00:00 committed by Eric Botcazou
parent ac4983563d
commit d1ced15560
10 changed files with 102 additions and 49 deletions

View 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.

View 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"
;;

View File

@ -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

View 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 \

View 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"

View 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

View 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

View 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"

View 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)
}
}
#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.

View 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)