Commit 7ecfa34f by Rainer Orth Committed by Rainer Orth

usegld.h: New file.

	* config/usegld.h: New file.
	* config/sol2.h (PREFERRED_DEBUGGING_TYPE): Remove.
	(CPP_SUBTARGET_SPEC): Remove -compat-bsd support.
	(LIB_SPEC): Likewise.
	Search /lib.
	(LINK_ARCH32_SPEC_BASE): Remove -compat-bsd support.
	(RDYNAMIC_SPEC): Handle GNU ld.
	[HAVE_LD_EH_FRAME_HDR && TARGET_DL_ITERATE_PHDR] (LINK_EH_SPEC): Define.
	(SUPPORTS_INIT_PRIORITY): Only disable for Sun ld.
	(SUBTARGET_INSERT_ATTRIBUTES, SUBTARGET_ATTRIBUTE_TABLE): Define.
	[!USE_GAS] (NO_DBX_BNSYM_ENSYM): Redefine.
	(STACK_CHECK_STATIC_BUILTIN): Define.
	* config/sol2.opt (compat-bsd): Remove.
	* config/sol2-10.h (TARGET_C99_FUNCTIONS): Remove undef.
	* config/sol2-bi.h: New file.
	* config/sol2-gld.h: Remove.
	* config/i386/sol2.h (TLS_COMMON_ASM_OP): Only define if !USE_GAS.
	(NO_DBX_BNSYM_ENSYM): Remove.
	(SUBTARGET_INSERT_ATTRIBUTES, SUBTARGET_ATTRIBUTE_TABLE): Remove.
	(STACK_CHECK_STATIC_BUILTIN): Remove.
	Test USE_GLD instead of TARGET_GNU_LD.
	* config/i386/sol2-10.h: Rename to ...
	* config/i386/sol2-bi.h .. this.
	(SUBTARGET_EXTRA_SPECS): Redefine.
	(WCHAR_TYPE, WCHAR_TYPE_SIZE, WINT_TYPE, WINT_TYPE_SIZE): Remove.
	(MULTILIB_DEFAULTS): Remove.
	(DEFAULT_ARCH32_P): Define.
	(LINK_ARCH64_SPEC_BASE, LINK_ARCH64_SPEC): Remove.
	(ARCH64_SUBDIR): Define.
	Test USE_GLD instead of TARGET_GNU_LD.
	(I386_EMULATION): Rename to ...
	(ARCH32_EMULATION): ... this.
	(X86_64_EMULATION): Rename to ...
	(ARCH64_EMULATION): ... this.
	(TARGET_LD_EMULATION): Remove.
	(LINK_ARCH_SPEC): Remove.
	* config/i386/sol2-gas.h: Remove.
	* config/i386/t-sol2-10: Rename to ...
	* config/i386/t-sol2-64: ... this.
	* config/sparc/sol2.h (SPARC_DEFAULT_CMODEL): Redefine.
	(AS_SPARC64_FLAG): Define.
	(ASM_CPU32_DEFAULT_SPEC, ASM_CPU64_DEFAULT_SPEC): Redefine.
	(CPP_CPU64_DEFAULT_SPEC, ASM_CPU32_DEFAULT_SPEC): Redefine
	depending on TARGET_CPU_DEFAULT.
	(CPP_CPU_SPEC): Redefine.
	(ASM_CPU_SPEC): Handle DEFAULT_ARCH32_P.
	(CPP_CPU_DEFAULT_SPEC, ASM_CPU_DEFAULT_SPEC): Redefine.
	(CPP_ARCH32_SPEC, CPP_ARCH64_SPEC, CPP_ARCH_SPEC): Redefine.
	(ASM_ARCH_SPEC, ASM_ARCH32_SPEC, ASM_ARCH64_SPEC,
	ASM_ARCH_DEFAULT_SPEC): Redefine.
	(SUBTARGET_EXTRA_SPECS): Add LINK_ARCH32_SPEC, LINK_ARCH64_SPEC,
	LINK_ARCH_DEFAULT_SPEC.
	[USE_GLD] (ARCH32_EMULATION, ARCH64_EMULATION): Define.
	[USE_GLD] (LINK_ARCH32_SPEC, LINK_ARCH64_SPEC): Redefine.
	(ARCH64_SUBDIR): Define.
	(LINK_ARCH64_SPEC): Redefine.
	(CC1_SPEC): Redefine.
	(OPTION_DEFAULT_SPECS): Redefine.
	(MULTILIB_DEFAULTS): Define.
	(WCHAR_TYPE, WCHAR_TYPE_SIZE, WINT_TYPE, WINT_TYPE_SIZE): Redefine.
	[USE_GAS && HAVE_AS_TLS] (TARGET_SUN_TLS, TARGET_GNU_TLS): Redefine.
	[USE_GLD] (CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP): Undef.
	(NO_DBX_BNSYM_ENSYM): Remove.
	(SUBTARGET_INSERT_ATTRIBUTES, SUBTARGET_ATTRIBUTE_TABLE): Remove.
	(ASM_OUTPUT_ALIGN_WITH_NOP): Only define if !USE_GAS.
	(TARGET_ASM_NAMED_SECTION): Likewise.
	(STACK_CHECK_STATIC_BUILTIN): Remove.
	* config/sparc/sol2-bi.h: Remove.
	* config/sparc/sol2-gas-bi.h: Remove.
	* config/sparc/sol2-gas.h: Remove.
	* config/sparc/sol2-gld-bi.h: Remove.
	* config.gcc (i[34567]86-*-solaris2*, sparc*-*-solaris2*): Move
	common parts ...
	(*-*-solaris2*): ... here.

From-SVN: r175245
parent 1795c28e
2011-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/usegld.h: New file.
* config/sol2.h (PREFERRED_DEBUGGING_TYPE): Remove.
(CPP_SUBTARGET_SPEC): Remove -compat-bsd support.
(LIB_SPEC): Likewise.
Search /lib.
(LINK_ARCH32_SPEC_BASE): Remove -compat-bsd support.
(RDYNAMIC_SPEC): Handle GNU ld.
[HAVE_LD_EH_FRAME_HDR && TARGET_DL_ITERATE_PHDR] (LINK_EH_SPEC): Define.
(SUPPORTS_INIT_PRIORITY): Only disable for Sun ld.
(SUBTARGET_INSERT_ATTRIBUTES, SUBTARGET_ATTRIBUTE_TABLE): Define.
[!USE_GAS] (NO_DBX_BNSYM_ENSYM): Redefine.
(STACK_CHECK_STATIC_BUILTIN): Define.
* config/sol2.opt (compat-bsd): Remove.
* config/sol2-10.h (TARGET_C99_FUNCTIONS): Remove undef.
* config/sol2-bi.h: New file.
* config/sol2-gld.h: Remove.
* config/i386/sol2.h (TLS_COMMON_ASM_OP): Only define if !USE_GAS.
(NO_DBX_BNSYM_ENSYM): Remove.
(SUBTARGET_INSERT_ATTRIBUTES, SUBTARGET_ATTRIBUTE_TABLE): Remove.
(STACK_CHECK_STATIC_BUILTIN): Remove.
Test USE_GLD instead of TARGET_GNU_LD.
* config/i386/sol2-10.h: Rename to ...
* config/i386/sol2-bi.h .. this.
(SUBTARGET_EXTRA_SPECS): Redefine.
(WCHAR_TYPE, WCHAR_TYPE_SIZE, WINT_TYPE, WINT_TYPE_SIZE): Remove.
(MULTILIB_DEFAULTS): Remove.
(DEFAULT_ARCH32_P): Define.
(LINK_ARCH64_SPEC_BASE, LINK_ARCH64_SPEC): Remove.
(ARCH64_SUBDIR): Define.
Test USE_GLD instead of TARGET_GNU_LD.
(I386_EMULATION): Rename to ...
(ARCH32_EMULATION): ... this.
(X86_64_EMULATION): Rename to ...
(ARCH64_EMULATION): ... this.
(TARGET_LD_EMULATION): Remove.
(LINK_ARCH_SPEC): Remove.
* config/i386/sol2-gas.h: Remove.
* config/i386/t-sol2-10: Rename to ...
* config/i386/t-sol2-64: ... this.
* config/sparc/sol2.h (SPARC_DEFAULT_CMODEL): Redefine.
(AS_SPARC64_FLAG): Define.
(ASM_CPU32_DEFAULT_SPEC, ASM_CPU64_DEFAULT_SPEC): Redefine.
(CPP_CPU64_DEFAULT_SPEC, ASM_CPU32_DEFAULT_SPEC): Redefine
depending on TARGET_CPU_DEFAULT.
(CPP_CPU_SPEC): Redefine.
(ASM_CPU_SPEC): Handle DEFAULT_ARCH32_P.
(CPP_CPU_DEFAULT_SPEC, ASM_CPU_DEFAULT_SPEC): Redefine.
(CPP_ARCH32_SPEC, CPP_ARCH64_SPEC, CPP_ARCH_SPEC): Redefine.
(ASM_ARCH_SPEC, ASM_ARCH32_SPEC, ASM_ARCH64_SPEC,
ASM_ARCH_DEFAULT_SPEC): Redefine.
(SUBTARGET_EXTRA_SPECS): Add LINK_ARCH32_SPEC, LINK_ARCH64_SPEC,
LINK_ARCH_DEFAULT_SPEC.
[USE_GLD] (ARCH32_EMULATION, ARCH64_EMULATION): Define.
[USE_GLD] (LINK_ARCH32_SPEC, LINK_ARCH64_SPEC): Redefine.
(ARCH64_SUBDIR): Define.
(LINK_ARCH64_SPEC): Redefine.
(CC1_SPEC): Redefine.
(OPTION_DEFAULT_SPECS): Redefine.
(MULTILIB_DEFAULTS): Define.
(WCHAR_TYPE, WCHAR_TYPE_SIZE, WINT_TYPE, WINT_TYPE_SIZE): Redefine.
[USE_GAS && HAVE_AS_TLS] (TARGET_SUN_TLS, TARGET_GNU_TLS): Redefine.
[USE_GLD] (CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP): Undef.
(NO_DBX_BNSYM_ENSYM): Remove.
(SUBTARGET_INSERT_ATTRIBUTES, SUBTARGET_ATTRIBUTE_TABLE): Remove.
(ASM_OUTPUT_ALIGN_WITH_NOP): Only define if !USE_GAS.
(TARGET_ASM_NAMED_SECTION): Likewise.
(STACK_CHECK_STATIC_BUILTIN): Remove.
* config/sparc/sol2-bi.h: Remove.
* config/sparc/sol2-gas-bi.h: Remove.
* config/sparc/sol2-gas.h: Remove.
* config/sparc/sol2-gld-bi.h: Remove.
* config.gcc (i[34567]86-*-solaris2*, sparc*-*-solaris2*): Move
common parts ...
(*-*-solaris2*): ... here.
2011-06-21 Christian Bruel <christian.bruel@st.com>
PR other/43564
......
......@@ -686,7 +686,35 @@ case ${target} in
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
;;
*-*-solaris2*)
# i?86-*-solaris2* needs to insert headers between cpu default and
# Solaris 2 specific ones.
sol2_tm_file="dbxelf.h elfos.h ${cpu_type}/sysv4.h sol2.h ${cpu_type}/sol2.h"
case ${target} in
*-*-solaris2.1[0-9]*)
sol2_tm_file="${sol2_tm_file} sol2-10.h"
use_gcc_stdint=wrap
;;
*)
use_gcc_stdint=provide
;;
esac
if test x$gnu_ld = xyes; then
tm_file="usegld.h ${tm_file}"
fi
if test x$gas = xyes; then
tm_file="usegas.h ${tm_file}"
fi
tm_p_file="${tm_p_file} sol2-protos.h"
tmake_file="${tmake_file} t-sol2 t-slibgcc-dummy"
c_target_objs="${c_target_objs} sol2-c.o"
cxx_target_objs="${cxx_target_objs} sol2-c.o"
extra_objs="sol2.o"
extra_options="${extra_options} sol2.opt"
case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
"":yes:* | yes:yes:* )
thread_file=posix
;;
esac
;;
*-*-*vms*)
extra_options="${extra_options} vms/vms.opt"
......@@ -1335,7 +1363,7 @@ i[34567]86-*-rtems*)
tmake_file="${tmake_file} i386/t-rtems t-rtems"
;;
i[34567]86-*-solaris2*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/sysv4.h sol2.h"
tm_file="${tm_file} i386/unix.h i386/att.h ${sol2_tm_file}"
# Set default arch_32 to pentium4, tune_32 to generic like the other
# i386 targets, although config.guess defaults to i386-pc-solaris2*.
case ${target} in
......@@ -1351,36 +1379,11 @@ i[34567]86-*-solaris2*)
with_tune_32=${with_tune_32:-generic}
case ${target} in
*-*-solaris2.1[0-9]*)
tm_file="${tm_file} sol2-10.h"
;;
esac
tm_file="${tm_file} i386/sol2.h"
if test x$gnu_ld = xyes; then
tm_file="${tm_file} sol2-gld.h"
fi
if test x$gas = xyes; then
tm_file="${tm_file} i386/sol2-gas.h"
fi
tmake_file="${tmake_file} t-sol2 t-slibgcc-dummy"
c_target_objs="${c_target_objs} sol2-c.o"
cxx_target_objs="${cxx_target_objs} sol2-c.o"
extra_objs="sol2.o"
tm_p_file="${tm_p_file} sol2-protos.h"
if test x$gnu_ld = xyes; then
tm_defines="${tm_defines} TARGET_GNU_LD=1"
fi
if test x$gas = xyes; then
tm_file="usegas.h ${tm_file}"
fi
tm_file="$tm_file tm-dwarf2.h"
case ${target} in
*-*-solaris2.1[0-9]*)
tm_file="${tm_file} i386/x86-64.h i386/sol2-10.h"
tm_file="${tm_file} i386/x86-64.h i386/sol2-bi.h sol2-bi.h"
tm_defines="${tm_defines} TARGET_BI_ARCH=1"
tmake_file="$tmake_file i386/t-sol2-10"
tmake_file="$tmake_file i386/t-sol2-64"
need_64bit_hwint=yes
need_64bit_isa=yes
use_gcc_stdint=wrap
case X"${with_cpu}" in
Xgeneric|Xatom|Xcore2|Xcorei7|Xcorei7-avx|Xnocona|Xx86-64|Xbdver1|Xbtver1|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
;;
......@@ -1396,14 +1399,6 @@ i[34567]86-*-solaris2*)
;;
esac
;;
*)
use_gcc_stdint=provide
;;
esac
case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
"":yes:* | yes:yes:* )
thread_file=posix
;;
esac
;;
i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
......@@ -2479,17 +2474,7 @@ sparc-*-netbsdelf*)
extra_options="${extra_options} sparc/long-double-switch.opt"
;;
sparc*-*-solaris2*)
tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sol2.h"
case ${target} in
*-*-solaris2.1[0-9]*)
tm_file="${tm_file} sol2-10.h"
use_gcc_stdint=wrap
;;
*)
use_gcc_stdint=provide
;;
esac
tm_file="${tm_file} sparc/sol2.h"
tm_file="sparc/biarch64.h ${tm_file} ${sol2_tm_file} sol2-bi.h"
case ${target} in
sparc64-*-* | sparcv9-*-*)
tm_file="${tm_file} sparc/sol2-64.h"
......@@ -2498,27 +2483,7 @@ sparc*-*-solaris2*)
test x$with_cpu != x || with_cpu=v9
;;
esac
tm_file="${tm_file} sparc/sol2-bi.h"
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} sol2-gld.h sparc/sol2-gld-bi.h"
fi
tm_file="${tm_file} tm-dwarf2.h"
tmake_file="t-sol2 t-slibgcc-dummy sparc/t-sol2-64"
if test x$gas = xyes; then
tm_file="usegas.h ${tm_file}"
fi
c_target_objs="sol2-c.o"
cxx_target_objs="sol2-c.o"
extra_objs="sol2.o"
tm_p_file="${tm_p_file} sol2-protos.h"
case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
"":yes:* | yes:yes:* )
thread_file=posix
;;
esac
tmake_file="${tmake_file} sparc/t-sol2-64"
;;
sparc-wrs-vxworks)
tm_file="${tm_file} elfos.h sparc/sysv4.h vx-common.h vxworks.h sparc/vxworks.h"
......
/* Solaris 10 configuration.
/* Definitions of target machine for GCC, for bi-arch Solaris 2/x86.
Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
......@@ -19,10 +19,17 @@ 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 ASM_COMMENT_START
#define ASM_COMMENT_START "/"
/* Override i386/sol2.h version: return 8-byte vectors in MMX registers if
possible, matching Sun Studio 12 Update 1+ compilers and other x86
targets. */
#undef TARGET_SUBTARGET_DEFAULT
#define TARGET_SUBTARGET_DEFAULT \
(MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS)
/* binutils' GNU as understands --32 and --64, but the native Solaris
#define SUBTARGET_OPTIMIZATION_OPTIONS \
{ OPT_LEVELS_1_PLUS, OPT_momit_leaf_frame_pointer, NULL, 1 }
/* GNU as understands --32 and --64, but the native Solaris
assembler requires -xarch=generic or -xarch=generic64 instead. */
#undef ASM_SPEC
#ifdef USE_GAS
......@@ -33,6 +40,29 @@ along with GCC; see the file COPYING3. If not see
"-s %(asm_cpu)"
#endif
/* We do not need to search a special directory for startup files. */
#undef MD_STARTFILE_PREFIX
/* No 64-bit default configurations. */
#define DEFAULT_ARCH32_P 1
#define ARCH64_SUBDIR "amd64"
#ifdef USE_GLD
/* Since binutils 2.21, GNU ld supports new *_sol2 emulations to strictly
follow the Solaris 2 ABI. Prefer them if present. */
#ifdef HAVE_LD_SOL2_EMULATION
#define ARCH32_EMULATION "elf_i386_sol2"
#define ARCH64_EMULATION "elf_x86_64_sol2"
#else
#define ARCH32_EMULATION "elf_i386"
#define ARCH64_EMULATION "elf_x86_64"
#endif
#endif
#undef ASM_COMMENT_START
#define ASM_COMMENT_START "/"
/* The native Solaris assembler can't calculate the difference between
symbols in different sections, which causes problems for -fPIC jump
tables in .rodata. */
......@@ -64,72 +94,10 @@ along with GCC; see the file COPYING3. If not see
} \
while (0)
#undef NO_PROFILE_COUNTERS
#undef MCOUNT_NAME
#define MCOUNT_NAME "_mcount"
#undef WCHAR_TYPE
#define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int")
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
#undef WINT_TYPE
#define WINT_TYPE (TARGET_64BIT ? "int" : "long int")
#undef WINT_TYPE_SIZE
#define WINT_TYPE_SIZE 32
#define USE_IX86_FRAME_POINTER 1
#define USE_X86_64_FRAME_POINTER 1
/* Override i386/sol2.h version: return 8-byte vectors in MMX registers if
possible, matching Sun Studio 12 Update 1+ compilers and other x86
targets. */
#undef TARGET_SUBTARGET_DEFAULT
#define TARGET_SUBTARGET_DEFAULT \
(MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS)
#define SUBTARGET_OPTIMIZATION_OPTIONS \
{ OPT_LEVELS_1_PLUS, OPT_momit_leaf_frame_pointer, NULL, 1 }
#define MULTILIB_DEFAULTS { "m32" }
#undef LINK_ARCH64_SPEC_BASE
#define LINK_ARCH64_SPEC_BASE \
"%{G:-G} \
%{YP,*} \
%{R*} \
%{compat-bsd: \
%{!YP,*:%{p|pg:-Y P,/usr/ucblib/64:/usr/lib/libp/64:/lib/64:/usr/lib/64} \
%{!p:%{!pg:-Y P,/usr/ucblib/64:/lib:/usr/lib/64}}} \
-R /usr/ucblib/64} \
%{!compat-bsd: \
%{!YP,*:%{p|pg:-Y P,/usr/lib/libp/64:/lib/64:/usr/lib/64} \
%{!p:%{!pg:-Y P,/lib/64:/usr/lib/64}}}}"
#undef LINK_ARCH64_SPEC
#define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE
#ifdef TARGET_GNU_LD
/* Since binutils 2.21, GNU ld supports new *_sol2 emulations to strictly
follow the Solaris 2 ABI. Prefer them if present. */
#ifdef HAVE_LD_SOL2_EMULATION
#define I386_EMULATION "elf_i386_sol2"
#define X86_64_EMULATION "elf_x86_64_sol2"
#else
#define I386_EMULATION "elf_i386"
#define X86_64_EMULATION "elf_x86_64"
#endif
#define TARGET_LD_EMULATION "%{m64:-m " X86_64_EMULATION "}" \
"%{!m64:-m " I386_EMULATION "} "
#else
#define TARGET_LD_EMULATION ""
#endif
#undef LINK_ARCH_SPEC
#define LINK_ARCH_SPEC TARGET_LD_EMULATION \
"%{m64:" LINK_ARCH64_SPEC "}%{!m64:" LINK_ARCH32_SPEC "}"
#undef NO_PROFILE_COUNTERS
/* We do not need to search a special directory for startup files. */
#undef MD_STARTFILE_PREFIX
#undef MCOUNT_NAME
#define MCOUNT_NAME "_mcount"
/* Definitions of target machine for GCC, for x86 running Solaris 2
using the GNU assembler.
Copyright (C) 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.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
/* Undefine this so that BNSYM/ENSYM pairs are emitted by STABS+. */
#undef NO_DBX_BNSYM_ENSYM
/* Restore default; gas doesn't understand Sun as .tcomm. */
#undef TLS_COMMON_ASM_OP
......@@ -19,6 +19,13 @@ 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/>. */
/* Augment i386/unix.h version to return 8-byte vectors in memory, matching
Sun Studio compilers until version 12, the only ones supported on
Solaris 8 and 9. */
#undef TARGET_SUBTARGET_DEFAULT
#define TARGET_SUBTARGET_DEFAULT \
(MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_VECT8_RETURNS)
/* Old versions of the Solaris assembler can not handle the difference of
labels in different sections, so force DW_EH_PE_datarel. */
#undef ASM_PREFERRED_EH_DATA_FORMAT
......@@ -37,23 +44,42 @@ along with GCC; see the file COPYING3. If not see
#undef EH_TABLES_CAN_BE_READ_ONLY
#define EH_TABLES_CAN_BE_READ_ONLY (TARGET_64BIT)
/* Solaris 2/Intel as chokes on #line directives. */
/* Follow Sun requirements for TLS code sequences and use Sun assembler TLS
syntax. */
#undef TARGET_SUN_TLS
#define TARGET_SUN_TLS 1
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "int"
/* Solaris 2/Intel as chokes on #line directives before Solaris 10. */
#undef CPP_SPEC
#define CPP_SPEC "%{,assembler-with-cpp:-P} %(cpp_subtarget)"
/* FIXME: Removed -K PIC from generic Solaris 2 ASM_SPEC: the native assembler
gives many warnings: R_386_32 relocation is used for symbol ".text". */
#define ASM_CPU_SPEC ""
/* Removed -K PIC from generic sol2.h ASM_SPEC: the Solaris 8 and 9 assembler
gives many warnings: R_386_32 relocation is used for symbol ".text", and
GNU as doesn't recognize -K at all. */
/* FIXME: Perhaps split between common and CPU-specific parts? */
#undef ASM_SPEC
#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} -s %(asm_cpu)"
#define ASM_CPU_SPEC ""
#define SUBTARGET_CPU_EXTRA_SPECS \
{ "cpp_subtarget", CPP_SUBTARGET_SPEC }, \
{ "asm_cpu", ASM_CPU_SPEC }
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
{ "cpp_subtarget", CPP_SUBTARGET_SPEC }, \
{ "asm_cpu", ASM_CPU_SPEC }, \
{ "startfile_arch", STARTFILE_ARCH_SPEC }, \
{ "link_arch", LINK_ARCH_SPEC }
{ "startfile_arch", STARTFILE_ARCH_SPEC }, \
{ "link_arch", LINK_ARCH_SPEC }, \
SUBTARGET_CPU_EXTRA_SPECS
/* Register the Solaris-specific #pragma directives. */
#define REGISTER_SUBTARGET_PRAGMAS() solaris_register_pragmas ()
#undef LOCAL_LABEL_PREFIX
#define LOCAL_LABEL_PREFIX "."
......@@ -78,18 +104,13 @@ along with GCC; see the file COPYING3. If not see
} \
} while (0)
/* Follow Sun requirements for TLS code sequences and use Sun assembler TLS
syntax. */
#undef TARGET_SUN_TLS
#define TARGET_SUN_TLS 1
#ifndef USE_GAS
/* The Sun assembler uses .tcomm for TLS common sections. */
#define TLS_COMMON_ASM_OP ".tcomm"
/* Similar to the Sun assembler on SPARC, the native assembler requires
TLS objects to be declared as @tls_obj (not @tls_object). Unlike SPARC,
gas doesn't understand this variant. */
#ifndef USE_GAS
#undef ASM_DECLARE_OBJECT_NAME
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
do \
......@@ -113,26 +134,7 @@ along with GCC; see the file COPYING3. If not see
ASM_OUTPUT_LABEL (FILE, NAME); \
} \
while (0)
#endif
/* The Solaris assembler cannot grok .stabd directives. */
#undef NO_DBX_BNSYM_ENSYM
#define NO_DBX_BNSYM_ENSYM 1
/* Solaris-specific #pragmas are implemented on top of attributes. Hook in
the bits from config/sol2.c. */
#define SUBTARGET_INSERT_ATTRIBUTES solaris_insert_attributes
#define SUBTARGET_ATTRIBUTE_TABLE SOLARIS_ATTRIBUTE_TABLE
/* Register the Solaris-specific #pragma directives. */
#define REGISTER_SUBTARGET_PRAGMAS() solaris_register_pragmas ()
/* Augment i386/unix.h version to return 8-byte vectors in memory, matching
Sun Studio compilers until version 12, the only ones supported on
Solaris 8 and 9. */
#undef TARGET_SUBTARGET_DEFAULT
#define TARGET_SUBTARGET_DEFAULT \
(MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_VECT8_RETURNS)
#endif /* !USE_GAS */
/* Output a simple call for .init/.fini. */
#define ASM_OUTPUT_CALL(FILE, FN) \
......@@ -151,12 +153,9 @@ along with GCC; see the file COPYING3. If not see
#undef X86_FILE_START_VERSION_DIRECTIVE
#define X86_FILE_START_VERSION_DIRECTIVE false
/* Static stack checking is supported by means of probes. */
#define STACK_CHECK_STATIC_BUILTIN 1
/* Only recent versions of Solaris 11 ld properly support hidden .gnu.linkonce
sections, so don't use them. */
#ifndef TARGET_GNU_LD
#ifndef USE_GLD
#define USE_HIDDEN_LINKONCE 0
#endif
......@@ -165,9 +164,3 @@ along with GCC; see the file COPYING3. If not see
#define LIBGCC2_HAS_TF_MODE 1
#define LIBGCC2_TF_CEXT q
#define TF_SIZE 113
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "int"
/* Operating system specific defines to be used when targeting GCC for any
Solaris 2 system starting from Solaris 10.
Copyright 2006, 2007 Free Software Foundation, Inc.
Copyright 2006, 2007, 2011 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -19,5 +19,4 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
/* Solaris 10 has the float and long double forms of math functions. */
#undef TARGET_C99_FUNCTIONS
#define TARGET_C99_FUNCTIONS 1
/* Definitions of target machine for GCC, for bi-arch Solaris 2.
Copyright (C) 2011 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.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
/* wchar_t is called differently in <wchar.h> for 32 and 64-bit
compilations. This is called for by SCD 2.4.1, p. 6-83, Figure 6-65
(32-bit) and p. 6P-10, Figure 6.38 (64-bit). */
#undef WCHAR_TYPE
#define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int")
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
/* Same for wint_t. See SCD 2.4.1, p. 6-83, Figure 6-66 (32-bit). There's
no corresponding 64-bit definition, but this is what Solaris 8
<iso/wchar_iso.h> uses. */
#undef WINT_TYPE
#define WINT_TYPE (TARGET_64BIT ? "int" : "long int")
#undef WINT_TYPE_SIZE
#define WINT_TYPE_SIZE 32
#if DEFAULT_ARCH32_P
#define MULTILIB_DEFAULTS { "m32" }
#else
#define MULTILIB_DEFAULTS { "m64" }
#endif
#if DEFAULT_ARCH32_P
#define DEF_ARCH32_SPEC(__str) "%{!m64:" __str "}"
#define DEF_ARCH64_SPEC(__str) "%{m64:" __str "}"
#else
#define DEF_ARCH32_SPEC(__str) "%{m32:" __str "}"
#define DEF_ARCH64_SPEC(__str) "%{!m32:" __str "}"
#endif
/* This should be the same as LINK_ARCH32_SPEC_BASE, except with
ARCH64_SUBDIR appended to the paths and /usr/ccs/lib is no longer
necessary. */
#undef LINK_ARCH64_SPEC_BASE
#define LINK_ARCH64_SPEC_BASE \
"%{G:-G} \
%{YP,*} \
%{R*} \
%{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp/" ARCH64_SUBDIR ":%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "} \
%{!p:%{!pg:-Y P,%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "}}}"
#undef LINK_ARCH64_SPEC
#ifndef USE_GLD
/* FIXME: Used to be SPARC-only. Not SPARC-specfic but for the model name! */
#define LINK_ARCH64_SPEC \
"%{mcmodel=medlow:-M /usr/lib/ld/" ARCH64_SUBDIR "/map.below4G} " \
LINK_ARCH64_SPEC_BASE
#else
#define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE
#endif
#ifdef USE_GLD
#define TARGET_LD_EMULATION "%{m32:-m " ARCH32_EMULATION "}" \
"%{m64:-m " ARCH64_EMULATION "} "
#else
#define TARGET_LD_EMULATION ""
#endif
#undef LINK_ARCH_SPEC
#if DISABLE_MULTILIB
#if DEFAULT_ARCH32_P
#define LINK_ARCH_SPEC TARGET_LD_EMULATION " \
%{m32:%(link_arch32)} \
%{m64:%edoes not support multilib} \
%{!m32:%{!m64:%(link_arch_default)}} \
"
#else
#define LINK_ARCH_SPEC TARGET_LD_EMULATION " \
%{m32:%edoes not support multilib} \
%{m64:%(link_arch64)} \
%{!m32:%{!m64:%(link_arch_default)}} \
"
#endif
#else
#define LINK_ARCH_SPEC TARGET_LD_EMULATION " \
%{m32:%(link_arch32)} \
%{m64:%(link_arch64)} \
%{!m32:%{!m64:%(link_arch_default)}}"
#endif
#define LINK_ARCH_DEFAULT_SPEC \
(DEFAULT_ARCH32_P ? LINK_ARCH32_SPEC : LINK_ARCH64_SPEC)
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
{ "startfile_arch", STARTFILE_ARCH_SPEC }, \
{ "link_arch32", LINK_ARCH32_SPEC }, \
{ "link_arch64", LINK_ARCH64_SPEC }, \
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
{ "link_arch", LINK_ARCH_SPEC }, \
SUBTARGET_CPU_EXTRA_SPECS
/* Definitions of target machine for GCC, for any machine running Solaris 2
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
#undef DTORS_SECTION_ASM_OP
#undef SUPPORTS_INIT_PRIORITY
#define SUPPORTS_INIT_PRIORITY 1
/* GNU ld needs --export-dynamic to implement -rdynamic. */
#undef RDYNAMIC_SPEC
#define RDYNAMIC_SPEC "--export-dynamic"
/* Solaris 11 build 135+ implements dl_iterate_phdr. */
#if defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR)
#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
#endif /* HAVE_LD_EH_FRAME && TARGET_DL_ITERATE_PHDR */
......@@ -22,11 +22,6 @@ along with GCC; see the file COPYING3. If not see
/* We are compiling for Solaris 2 now. */
#define TARGET_SOLARIS 1
/* We use stabs-in-elf for debugging, because that is what the native
toolchain uses. */
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
/* Solaris 2 (at least as of 2.5.1) uses a 32-bit wchar_t. */
#undef WCHAR_TYPE
#define WCHAR_TYPE "long int"
......@@ -76,15 +71,9 @@ along with GCC; see the file COPYING3. If not see
#define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
#define UINTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int")
/* ??? Note: in order for -compat-bsd to work fully,
we must somehow arrange to fixincludes /usr/ucbinclude
and put the result in $(libsubdir)/ucbinclude. */
#undef CPP_SUBTARGET_SPEC
#define CPP_SUBTARGET_SPEC "\
%{pthreads|pthread:-D_REENTRANT -D_PTHREADS} \
%{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude} \
"
%{pthreads|pthread:-D_REENTRANT -D_PTHREADS}"
/* Names to predefine in the preprocessor for this target machine. */
#define TARGET_SUB_OS_CPP_BUILTINS()
......@@ -110,9 +99,6 @@ along with GCC; see the file COPYING3. If not see
TARGET_SUB_OS_CPP_BUILTINS(); \
} while (0)
/* The system headers under Solaris 2 are C++-aware since 2.0. */
#define NO_IMPLICIT_EXTERN_C
/* It's safe to pass -s always, even if -g is not used. */
#undef ASM_SPEC
#define ASM_SPEC "\
......@@ -121,6 +107,15 @@ along with GCC; see the file COPYING3. If not see
%(asm_cpu) \
"
#undef LIB_SPEC
#define LIB_SPEC \
"%{!symbolic:\
%{pthreads|pthread:" \
LIB_THREAD_LDFLAGS_SPEC " -lpthread " LIB_TLS_SPEC "} \
%{fprofile-generate*:" \
LIB_THREAD_LDFLAGS_SPEC " " LIB_TLS_SPEC "} \
%{p|pg:-ldl} -lc}"
#ifndef CROSS_DIRECTORY_STRUCTURE
#undef MD_EXEC_PREFIX
#define MD_EXEC_PREFIX "/usr/ccs/bin/"
......@@ -129,21 +124,12 @@ along with GCC; see the file COPYING3. If not see
#define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
#endif
/* We don't use the standard LIB_SPEC only because we don't yet support c++. */
#undef LIB_SPEC
#define LIB_SPEC \
"%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \
%{!symbolic:\
%{pthreads|pthread:" \
LIB_THREAD_LDFLAGS_SPEC " -lpthread " LIB_TLS_SPEC "} \
%{fprofile-generate*:" \
LIB_THREAD_LDFLAGS_SPEC " " LIB_TLS_SPEC "} \
%{p|pg:-ldl} -lc}"
#undef STARTFILE_ARCH32_SPEC
#define STARTFILE_ARCH32_SPEC "%{ansi:values-Xc.o%s} \
%{!ansi:values-Xa.o%s}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
crtend.o%s crtn.o%s"
#undef STARTFILE_ARCH_SPEC
#define STARTFILE_ARCH_SPEC STARTFILE_ARCH32_SPEC
/* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us. */
#undef STARTFILE_SPEC
......@@ -156,25 +142,18 @@ along with GCC; see the file COPYING3. If not see
crti.o%s %(startfile_arch) \
crtbegin.o%s"
#undef STARTFILE_ARCH32_SPEC
#define STARTFILE_ARCH32_SPEC "%{ansi:values-Xc.o%s} \
%{!ansi:values-Xa.o%s}"
#undef STARTFILE_ARCH_SPEC
#define STARTFILE_ARCH_SPEC STARTFILE_ARCH32_SPEC
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
crtend.o%s crtn.o%s"
#undef LINK_ARCH32_SPEC_BASE
#define LINK_ARCH32_SPEC_BASE \
"%{G:-G} \
%{YP,*} \
%{R*} \
%{compat-bsd: \
%{!YP,*:%{p|pg:-Y P,%R/usr/ucblib:%R/usr/ccs/lib/libp:%R/usr/lib/libp:%R/usr/ccs/lib:%R/usr/lib} \
%{!p:%{!pg:-Y P,%R/usr/ucblib:%R/usr/ccs/lib:%R/usr/lib}}} \
-R %R/usr/ucblib} \
%{!compat-bsd: \
%{!YP,*:%{p|pg:-Y P,%R/usr/ccs/lib/libp:%R/usr/lib/libp:%R/usr/ccs/lib:%R/usr/lib} \
%{!p:%{!pg:-Y P,%R/usr/ccs/lib:%R/usr/lib}}}}"
%{!YP,*:%{p|pg:-Y P,%R/usr/ccs/lib/libp:%R/usr/lib/libp:%R/usr/ccs/lib:%R/lib:%R/usr/lib} \
%{!p:%{!pg:-Y P,%R/usr/ccs/lib:%R/lib:%R/usr/lib}}}"
#undef LINK_ARCH32_SPEC
#define LINK_ARCH32_SPEC LINK_ARCH32_SPEC_BASE
......@@ -182,6 +161,14 @@ along with GCC; see the file COPYING3. If not see
#undef LINK_ARCH_SPEC
#define LINK_ARCH_SPEC LINK_ARCH32_SPEC
#ifndef USE_GLD
/* With Sun ld, -rdynamic is a no-op. */
#define RDYNAMIC_SPEC ""
#else
/* GNU ld needs --export-dynamic to implement -rdynamic. */
#define RDYNAMIC_SPEC "--export-dynamic"
#endif
#undef LINK_SPEC
#define LINK_SPEC \
"%{h*} %{v:-V} \
......@@ -192,22 +179,22 @@ along with GCC; see the file COPYING3. If not see
%(link_arch) \
%{Qy:} %{!Qn:-Qy}"
/* With Sun ld, -rdynamic is a no-op. */
#define RDYNAMIC_SPEC ""
/* The Solaris linker doesn't understand constructor priorities. (The
GNU linker does support constructor priorities, so GNU ld
configuration files for Solaris override this setting.) */
#undef SUPPORTS_INIT_PRIORITY
#define SUPPORTS_INIT_PRIORITY 0
#ifdef USE_GLD
/* Solaris 11 build 135+ implements dl_iterate_phdr. GNU ld needs
--eh-frame-hdr to create the required .eh_frame_hdr sections. */
#if defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR)
#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
#endif /* HAVE_LD_EH_FRAME && TARGET_DL_ITERATE_PHDR */
#endif
/* collect2.c can only parse GNU nm -n output. Solaris nm needs -png to
produce the same format. */
#define NM_FLAGS "-png"
/* The system headers under Solaris 2 are C++-aware since 2.0. */
#define NO_IMPLICIT_EXTERN_C
#define STDC_0_IN_SYSTEM_HEADERS 1
#define HAVE_ENABLE_EXECUTE_STACK
/* Support Solaris-specific format checking for cmn_err. */
#define TARGET_N_FORMAT_TYPES 1
......@@ -219,6 +206,14 @@ along with GCC; see the file COPYING3. If not see
{ "init", 0, 0, true, false, false, NULL, false }, \
{ "fini", 0, 0, true, false, false, NULL, false }
/* Solaris-specific #pragmas are implemented on top of attributes. Hook in
the bits from config/sol2.c. */
#define SUBTARGET_INSERT_ATTRIBUTES solaris_insert_attributes
#define SUBTARGET_ATTRIBUTE_TABLE SOLARIS_ATTRIBUTE_TABLE
/* Allow macro expansion in #pragma pack. */
#define HANDLE_PRAGMA_PACK_WITH_EXPANSION
/* Solaris/x86 as and gas support unquoted section names. */
#define SECTION_NAME_FORMAT "%s"
......@@ -234,7 +229,7 @@ along with GCC; see the file COPYING3. If not see
} \
while (0)
/* Solaris 'as' has a bug: a .common directive in .tbss or .tdata section
/* Solaris as has a bug: a .common directive in .tbss or .tdata section
behaves as .tls_common rather than normal non-TLS .common. */
#undef ASM_OUTPUT_ALIGNED_COMMON
#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
......@@ -257,13 +252,25 @@ along with GCC; see the file COPYING3. If not see
#define AS_NEEDS_DASH_FOR_PIPED_INPUT
/* The Solaris assembler cannot grok .stabd directives. */
#undef NO_DBX_BNSYM_ENSYM
#define NO_DBX_BNSYM_ENSYM 1
#endif
extern GTY(()) tree solaris_pending_aligns;
extern GTY(()) tree solaris_pending_inits;
extern GTY(()) tree solaris_pending_finis;
#ifndef USE_GLD
/* The Solaris linker doesn't understand constructor priorities. */
#undef SUPPORTS_INIT_PRIORITY
#define SUPPORTS_INIT_PRIORITY 0
#endif
/* Allow macro expansion in #pragma pack. */
#define HANDLE_PRAGMA_PACK_WITH_EXPANSION
/* Solaris has an implementation of __enable_execute_stack. */
#define HAVE_ENABLE_EXECUTE_STACK
/* Static stack checking is supported by means of probes. */
#define STACK_CHECK_STATIC_BUILTIN 1
#define TARGET_POSIX_IO
extern GTY(()) tree solaris_pending_aligns;
extern GTY(()) tree solaris_pending_inits;
extern GTY(()) tree solaris_pending_finis;
......@@ -27,9 +27,6 @@ Driver Joined
Ym,
Driver Joined
compat-bsd
Driver
mimpure-text
Target Report
Pass -z text to linker
......
/* Definitions of target machine for GCC, for bi-arch SPARC
running Solaris 2 using the system assembler and linker.
Copyright (C) 2002, 2003, 2004, 2006, 2007, 2009, 2010, 2011
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.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
/* The default code model used to be CM_MEDANY on Solaris
but even Sun eventually found it to be quite wasteful
and changed it to CM_MEDMID in the Studio 9 compiler. */
#undef SPARC_DEFAULT_CMODEL
#define SPARC_DEFAULT_CMODEL CM_MEDMID
#define AS_SPARC64_FLAG "-xarch=v9"
#undef ASM_CPU32_DEFAULT_SPEC
#define ASM_CPU32_DEFAULT_SPEC ""
#undef ASM_CPU64_DEFAULT_SPEC
#define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG
#if TARGET_CPU_DEFAULT == TARGET_CPU_v9
#undef CPP_CPU64_DEFAULT_SPEC
#define CPP_CPU64_DEFAULT_SPEC ""
#undef ASM_CPU32_DEFAULT_SPEC
#define ASM_CPU32_DEFAULT_SPEC "-xarch=v8plus"
#endif
#if TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc
#undef CPP_CPU64_DEFAULT_SPEC
#define CPP_CPU64_DEFAULT_SPEC ""
#undef ASM_CPU32_DEFAULT_SPEC
#define ASM_CPU32_DEFAULT_SPEC "-xarch=v8plusa"
#undef ASM_CPU64_DEFAULT_SPEC
#define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG "a"
#endif
#if TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3
#undef CPP_CPU64_DEFAULT_SPEC
#define CPP_CPU64_DEFAULT_SPEC ""
#undef ASM_CPU32_DEFAULT_SPEC
#define ASM_CPU32_DEFAULT_SPEC "-xarch=v8plusb"
#undef ASM_CPU64_DEFAULT_SPEC
#define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG "b"
#endif
#if TARGET_CPU_DEFAULT == TARGET_CPU_niagara
#undef CPP_CPU64_DEFAULT_SPEC
#define CPP_CPU64_DEFAULT_SPEC ""
#undef ASM_CPU32_DEFAULT_SPEC
#define ASM_CPU32_DEFAULT_SPEC "-xarch=v8plusb"
#undef ASM_CPU64_DEFAULT_SPEC
#define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG "b"
#endif
#if TARGET_CPU_DEFAULT == TARGET_CPU_niagara2
#undef CPP_CPU64_DEFAULT_SPEC
#define CPP_CPU64_DEFAULT_SPEC ""
#undef ASM_CPU32_DEFAULT_SPEC
#define ASM_CPU32_DEFAULT_SPEC "-xarch=v8plusb"
#undef ASM_CPU64_DEFAULT_SPEC
#define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG "b"
#endif
#if DEFAULT_ARCH32_P
#define DEF_ARCH32_SPEC(__str) "%{!m64:" __str "}"
#define DEF_ARCH64_SPEC(__str) "%{m64:" __str "}"
#else
#define DEF_ARCH32_SPEC(__str) "%{m32:" __str "}"
#define DEF_ARCH64_SPEC(__str) "%{!m32:" __str "}"
#endif
#undef CPP_CPU_SPEC
#define CPP_CPU_SPEC "\
%{mcpu=sparclet|mcpu=tsc701:-D__sparclet__} \
%{mcpu=sparclite|mcpu-f930|mcpu=f934:-D__sparclite__} \
%{mcpu=v8:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
%{mcpu=supersparc:-D__supersparc__ " DEF_ARCH32_SPEC("-D__sparcv8") "} \
%{mcpu=v9|mcpu=ultrasparc|mcpu=ultrasparc3|mcpu=niagara|mcpu=niagara2:" DEF_ARCH32_SPEC("-D__sparcv8") "} \
%{!mcpu*:%(cpp_cpu_default)} \
"
#undef ASM_CPU_SPEC
#define ASM_CPU_SPEC "\
%{mcpu=v9:" DEF_ARCH32_SPEC("-xarch=v8plus") DEF_ARCH64_SPEC(AS_SPARC64_FLAG) "} \
%{mcpu=ultrasparc:" DEF_ARCH32_SPEC("-xarch=v8plusa") DEF_ARCH64_SPEC(AS_SPARC64_FLAG "a") "} \
%{mcpu=ultrasparc3:" DEF_ARCH32_SPEC("-xarch=v8plusb") DEF_ARCH64_SPEC(AS_SPARC64_FLAG "b") "} \
%{mcpu=niagara:" DEF_ARCH32_SPEC("-xarch=v8plusb") DEF_ARCH64_SPEC(AS_SPARC64_FLAG "b") "} \
%{mcpu=niagara2:" DEF_ARCH32_SPEC("-xarch=v8plusb") DEF_ARCH64_SPEC(AS_SPARC64_FLAG "b") "} \
%{!mcpu=niagara2:%{!mcpu=niagara:%{!mcpu=ultrasparc3:%{!mcpu=ultrasparc:%{!mcpu=v9:%{mcpu*:" DEF_ARCH32_SPEC("-xarch=v8") DEF_ARCH64_SPEC(AS_SPARC64_FLAG) "}}}}}} \
%{!mcpu*:%(asm_cpu_default)} \
"
#undef CPP_CPU_DEFAULT_SPEC
#define CPP_CPU_DEFAULT_SPEC \
(DEFAULT_ARCH32_P ? "\
%{m64:" CPP_CPU64_DEFAULT_SPEC "} \
%{!m64:" CPP_CPU32_DEFAULT_SPEC "} \
" : "\
%{m32:" CPP_CPU32_DEFAULT_SPEC "} \
%{!m32:" CPP_CPU64_DEFAULT_SPEC "} \
")
#undef ASM_CPU_DEFAULT_SPEC
#define ASM_CPU_DEFAULT_SPEC \
(DEFAULT_ARCH32_P ? "\
%{m64:" ASM_CPU64_DEFAULT_SPEC "} \
%{!m64:" ASM_CPU32_DEFAULT_SPEC "} \
" : "\
%{m32:" ASM_CPU32_DEFAULT_SPEC "} \
%{!m32:" ASM_CPU64_DEFAULT_SPEC "} \
")
/* wchar_t is called differently in <wchar.h> for 32 and 64-bit
compilations. This is called for by SCD 2.4.1, p. 6-83, Figure 6-65
(32-bit) and p. 6P-10, Figure 6.38 (64-bit). */
#undef WCHAR_TYPE
#define WCHAR_TYPE (TARGET_ARCH64 ? "int" : "long int")
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
/* Same for wint_t. See SCD 2.4.1, p. 6-83, Figure 6-66 (32-bit). There's
no corresponding 64-bit definition, but this is what Solaris 8
<iso/wchar_iso.h> uses. */
#undef WINT_TYPE
#define WINT_TYPE (TARGET_ARCH64 ? "int" : "long int")
#undef WINT_TYPE_SIZE
#define WINT_TYPE_SIZE 32
#undef CPP_ARCH32_SPEC
#define CPP_ARCH32_SPEC ""
#undef CPP_ARCH64_SPEC
#define CPP_ARCH64_SPEC "-D__arch64__ -D__sparcv9"
#undef CPP_ARCH_SPEC
#define CPP_ARCH_SPEC "\
%{m32:%(cpp_arch32)} \
%{m64:%(cpp_arch64)} \
%{!m32:%{!m64:%(cpp_arch_default)}} \
"
#undef ASM_ARCH_SPEC
#define ASM_ARCH_SPEC ""
#undef ASM_ARCH32_SPEC
#define ASM_ARCH32_SPEC ""
#undef ASM_ARCH64_SPEC
#define ASM_ARCH64_SPEC ""
#undef ASM_ARCH_DEFAULT_SPEC
#define ASM_ARCH_DEFAULT_SPEC ""
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
{ "startfile_arch", STARTFILE_ARCH_SPEC }, \
{ "link_arch32", LINK_ARCH32_SPEC }, \
{ "link_arch64", LINK_ARCH64_SPEC }, \
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
{ "link_arch", LINK_ARCH_SPEC },
/*
* This should be the same as in sol2.h, except with "/sparcv9"
* appended to the paths and /usr/ccs/lib is no longer necessary
*/
#define LINK_ARCH64_SPEC_BASE \
"%{mcmodel=medlow:-M /usr/lib/ld/sparcv9/map.below4G} \
%{G:-G} \
%{YP,*} \
%{R*} \
%{compat-bsd: \
%{!YP,*:%{p|pg:-Y P,%R/usr/ucblib/sparcv9:%R/usr/lib/libp/sparcv9:%R/usr/lib/sparcv9} \
%{!p:%{!pg:-Y P,%R/usr/ucblib/sparcv9:%R/usr/lib/sparcv9}}} \
-R %R/usr/ucblib/sparcv9} \
%{!compat-bsd: \
%{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp/sparcv9:%R/usr/lib/sparcv9} \
%{!p:%{!pg:-Y P,%R/usr/lib/sparcv9}}}}"
#define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE
#undef LINK_ARCH_SPEC
#if DISABLE_MULTILIB
#if DEFAULT_ARCH32_P
#define LINK_ARCH_SPEC "\
%{m32:%(link_arch32)} \
%{m64:%edoes not support multilib} \
%{!m32:%{!m64:%(link_arch_default)}} \
"
#else
#define LINK_ARCH_SPEC "\
%{m32:%edoes not support multilib} \
%{m64:%(link_arch64)} \
%{!m32:%{!m64:%(link_arch_default)}} \
"
#endif
#else
#define LINK_ARCH_SPEC "\
%{m32:%(link_arch32)} \
%{m64:%(link_arch64)} \
%{!m32:%{!m64:%(link_arch_default)}} \
"
#endif
#define LINK_ARCH_DEFAULT_SPEC \
(DEFAULT_ARCH32_P ? LINK_ARCH32_SPEC : LINK_ARCH64_SPEC)
#undef CC1_SPEC
#if DEFAULT_ARCH32_P
#define CC1_SPEC "\
%{m64:%{m32:%emay not use both -m32 and -m64}} \
%{m64:-mptr64 -mstack-bias -mno-v8plus \
%{!mcpu*:-%{!mv8plus:mcpu=v9}}} \
"
#else
#define CC1_SPEC "\
%{m32:%{m64:%emay not use both -m32 and -m64}} \
%{m32:-mptr32 -mno-stack-bias \
%{!mcpu*:%{!mv8plus:-mcpu=v9}}} \
%{mv8plus:-m32 -mptr32 -mno-stack-bias \
%{!mcpu*:-mcpu=v9}} \
"
#endif
/* Support for a compile-time default CPU, et cetera. The rules are:
--with-cpu is ignored if -mcpu is specified.
--with-tune is ignored if -mtune is specified.
--with-float is ignored if -mhard-float, -msoft-float, -mfpu, or -mno-fpu
are specified.
In the SPARC_BI_ARCH compiler we cannot pass %{!mcpu=*:-mcpu=%(VALUE)}
here, otherwise say -mcpu=v7 would be passed even when -m64.
CC1_SPEC above takes care of this instead. */
#undef OPTION_DEFAULT_SPECS
#if DEFAULT_ARCH32_P
#define OPTION_DEFAULT_SPECS \
{"cpu", "%{!m64:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \
{"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \
{"float", "%{!msoft-float:%{!mhard-float:%{!mfpu:%{!mno-fpu:-m%(VALUE)-float}}}}" }
#else
#define OPTION_DEFAULT_SPECS \
{"cpu", "%{!m32:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \
{"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \
{"float", "%{!msoft-float:%{!mhard-float:%{!mfpu:%{!mno-fpu:-m%(VALUE)-float}}}}" }
#endif
#if DEFAULT_ARCH32_P
#define MULTILIB_DEFAULTS { "m32" }
#else
#define MULTILIB_DEFAULTS { "m64" }
#endif
/* Definitions of target machine for GCC, for bi-arch SPARC
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"
/* Definitions of target machine for GCC, for SPARC running Solaris 2
using the GNU assembler.
Copyright (C) 2004, 2005, 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.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
/* Undefine this as the filler pattern doesn't work with GNU as. */
#undef ASM_OUTPUT_ALIGN_WITH_NOP
/* Undefine this so that BNSYM/ENSYM pairs are emitted by STABS+. */
#undef NO_DBX_BNSYM_ENSYM
/* Use GNU extensions to TLS support. */
#ifdef HAVE_AS_TLS
#undef TARGET_SUN_TLS
#undef TARGET_GNU_TLS
#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
/* And standard pushsection syntax. While GNU as supports the non-standard
variant too, we prefer the former. */
#undef PUSHSECTION_FORMAT
#define PUSHSECTION_FORMAT "\t.pushsection\t%s\n"
/* Definitions of target machine for GCC, for bi-arch SPARC
running Solaris 2 using the GNU linker.
Copyright (C) 2002, 2003, 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.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
#undef LINK_ARCH32_SPEC
#define LINK_ARCH32_SPEC \
LINK_ARCH32_SPEC_BASE "%{!static: -rpath-link %R/usr/lib}"
#undef LINK_ARCH64_SPEC
#define LINK_ARCH64_SPEC \
LINK_ARCH64_SPEC_BASE "%{!static: -rpath-link %R/usr/lib/sparcv9}"
/* Since binutils 2.21, GNU ld supports new *_sol2 emulations to strictly
follow the Solaris 2 ABI. Prefer them if present. */
#ifdef HAVE_LD_SOL2_EMULATION
#define SPARC32_EMULATION "elf32_sparc_sol2"
#define SPARC64_EMULATION "elf64_sparc_sol2"
#else
#define SPARC32_EMULATION "elf32_sparc"
#define SPARC64_EMULATION "elf64_sparc"
#endif
#undef LINK_ARCH_SPEC
#if DISABLE_MULTILIB
#if DEFAULT_ARCH32_P
#define LINK_ARCH_SPEC "\
%{m32:-m " SPARC32_EMULATION " %(link_arch32)} \
%{m64:%edoes not support multilib} \
%{!m32:%{!m64:%(link_arch_default)}} \
"
#else
#define LINK_ARCH_SPEC "\
%{m32:%edoes not support multilib} \
%{m64:-m " SPARC64_EMULATION " %(link_arch64)} \
%{!m32:%{!m64:%(link_arch_default)}} \
"
#endif
#else
#define LINK_ARCH_SPEC "\
%{m32:-m " SPARC32_EMULATION " %(link_arch32)} \
%{m64:-m " SPARC64_EMULATION " %(link_arch64)} \
%{!m32:%{!m64:%(link_arch_default)}} \
"
#endif
#define USE_GLD 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment