* 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
+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
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"
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
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)
;;
;;
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)
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"
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"
+++ /dev/null
-/* Solaris 10 configuration.
- Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
- Contributed by CodeSourcery, LLC.
-
-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 ASM_COMMENT_START
-#define ASM_COMMENT_START "/"
-
-/* binutils' GNU as understands --32 and --64, but the native Solaris
- assembler requires -xarch=generic or -xarch=generic64 instead. */
-#undef ASM_SPEC
-#ifdef USE_GAS
-#define ASM_SPEC "%{m32:--32} %{m64:--64} -s %(asm_cpu)"
-#else
-#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} " \
- "%{m32:-xarch=generic} %{m64:-xarch=generic64} " \
- "-s %(asm_cpu)"
-#endif
-
-/* The native Solaris assembler can't calculate the difference between
- symbols in different sections, which causes problems for -fPIC jump
- tables in .rodata. */
-#ifndef HAVE_AS_IX86_DIFF_SECT_DELTA
-#undef JUMP_TABLES_IN_TEXT_SECTION
-#define JUMP_TABLES_IN_TEXT_SECTION 1
-
-/* The native Solaris assembler cannot handle the SYMBOL-. syntax, but
- requires SYMBOL@rel/@rel64 instead. */
-#define ASM_OUTPUT_DWARF_PCREL(FILE, SIZE, LABEL) \
- do { \
- fputs (integer_asm_op (SIZE, FALSE), FILE); \
- assemble_name (FILE, LABEL); \
- fputs (SIZE == 8 ? "@rel64" : "@rel", FILE); \
- } while (0)
-#endif
-
-/* As in sol2.h, override the default from i386/x86-64.h to work around
- Sun as TLS bug. */
-#undef ASM_OUTPUT_ALIGNED_COMMON
-#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
- do \
- { \
- if (TARGET_SUN_TLS \
- && in_section \
- && ((in_section->common.flags & SECTION_TLS) == SECTION_TLS)) \
- switch_to_section (bss_section); \
- x86_elf_aligned_common (FILE, NAME, SIZE, ALIGN); \
- } \
- 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 "}"
-
-/* We do not need to search a special directory for startup files. */
-#undef MD_STARTFILE_PREFIX
--- /dev/null
+/* 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.
+
+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/>. */
+
+/* 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 }
+
+/* GNU as understands --32 and --64, but the native Solaris
+ assembler requires -xarch=generic or -xarch=generic64 instead. */
+#undef ASM_SPEC
+#ifdef USE_GAS
+#define ASM_SPEC "%{m32:--32} %{m64:--64} -s %(asm_cpu)"
+#else
+#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} " \
+ "%{m32:-xarch=generic} %{m64:-xarch=generic64} " \
+ "-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. */
+#ifndef HAVE_AS_IX86_DIFF_SECT_DELTA
+#undef JUMP_TABLES_IN_TEXT_SECTION
+#define JUMP_TABLES_IN_TEXT_SECTION 1
+
+/* The native Solaris assembler cannot handle the SYMBOL-. syntax, but
+ requires SYMBOL@rel/@rel64 instead. */
+#define ASM_OUTPUT_DWARF_PCREL(FILE, SIZE, LABEL) \
+ do { \
+ fputs (integer_asm_op (SIZE, FALSE), FILE); \
+ assemble_name (FILE, LABEL); \
+ fputs (SIZE == 8 ? "@rel64" : "@rel", FILE); \
+ } while (0)
+#endif
+
+/* As in sol2.h, override the default from i386/x86-64.h to work around
+ Sun as TLS bug. */
+#undef ASM_OUTPUT_ALIGNED_COMMON
+#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
+ do \
+ { \
+ if (TARGET_SUN_TLS \
+ && in_section \
+ && ((in_section->common.flags & SECTION_TLS) == SECTION_TLS)) \
+ switch_to_section (bss_section); \
+ x86_elf_aligned_common (FILE, NAME, SIZE, ALIGN); \
+ } \
+ while (0)
+
+#define USE_IX86_FRAME_POINTER 1
+#define USE_X86_64_FRAME_POINTER 1
+
+#undef NO_PROFILE_COUNTERS
+
+#undef MCOUNT_NAME
+#define MCOUNT_NAME "_mcount"
+++ /dev/null
-/* 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
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
#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 "."
} \
} 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 \
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) \
#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
#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"
+++ /dev/null
-# Copyright (C) 2004, 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.
-#
-# 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/>.
-
-MULTILIB_OPTIONS = m32/m64
-MULTILIB_DIRNAMES = 32 amd64
-MULTILIB_OSDIRNAMES = . amd64
--- /dev/null
+# Copyright (C) 2004, 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.
+#
+# 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/>.
+
+MULTILIB_OPTIONS = m32/m64
+MULTILIB_DIRNAMES = 32 amd64
+MULTILIB_OSDIRNAMES = . amd64
/* 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.
<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
--- /dev/null
+/* 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
+++ /dev/null
-/* 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 */
/* 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"
#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()
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 "\
%(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/"
#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
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
#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} \
%(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"
+\f
+/* The system headers under Solaris 2 are C++-aware since 2.0. */
+#define NO_IMPLICIT_EXTERN_C
#define STDC_0_IN_SYSTEM_HEADERS 1
-\f
-#define HAVE_ENABLE_EXECUTE_STACK
/* Support Solaris-specific format checking for cmn_err. */
#define TARGET_N_FORMAT_TYPES 1
{ "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"
} \
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) \
#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;
Ym,
Driver Joined
-compat-bsd
-Driver
-
mimpure-text
Target Report
Pass -z text to linker
+++ /dev/null
-/* 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
+++ /dev/null
-/* 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"
+++ /dev/null
-/* 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"
+++ /dev/null
-/* 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
-
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+/* Solaris allows 64 bit out and global registers in 32 bit mode.
+ sparc_override_options will disable V8+ if not generating V9 code. */
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT (MASK_V8PLUS + MASK_APP_REGS + MASK_FPU \
+ + MASK_LONG_DOUBLE_128)
+
+/* 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
+
+/* Select a format to encode pointers in exception handling data. CODE
+ is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
+ true if the symbol may be affected by dynamic relocations.
+
+ Some Solaris dynamic linkers don't handle unaligned section relative
+ relocs properly, so force them to be aligned. */
+#ifndef HAVE_AS_SPARC_UA_PCREL
+#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
+ ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr)
+#endif
+
+\f
+
/* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
/* This is here rather than in sparc.h because it's not known what
other assemblers will accept. */
+#ifndef USE_GAS
+#define AS_SPARC64_FLAG "-xarch=v9"
+#else
+#define AS_SPARC64_FLAG "-TSO -64 -Av9"
+#endif
+
+#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"
#undef ASM_CPU_DEFAULT_SPEC
-#define ASM_CPU_DEFAULT_SPEC "-xarch=v8plus"
+#define ASM_CPU_DEFAULT_SPEC ASM_CPU32_DEFAULT_SPEC
#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"
#undef ASM_CPU_DEFAULT_SPEC
-#define ASM_CPU_DEFAULT_SPEC "-xarch=v8plusa"
+#define ASM_CPU_DEFAULT_SPEC ASM_CPU32_DEFAULT_SPEC
#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"
#undef ASM_CPU_DEFAULT_SPEC
-#define ASM_CPU_DEFAULT_SPEC "-xarch=v8plusb"
+#define ASM_CPU_DEFAULT_SPEC ASM_CPU32_DEFAULT_SPEC
#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"
#undef ASM_CPU_DEFAULT_SPEC
-#define ASM_CPU_DEFAULT_SPEC "-xarch=v8plusb"
+#define ASM_CPU_DEFAULT_SPEC ASM_CPU32_DEFAULT_SPEC
#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"
#undef ASM_CPU_DEFAULT_SPEC
-#define ASM_CPU_DEFAULT_SPEC "-xarch=v8plusb"
+#define ASM_CPU_DEFAULT_SPEC ASM_CPU32_DEFAULT_SPEC
+#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 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 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 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
#undef ASM_CPU_SPEC
#define ASM_CPU_SPEC "\
-%{mcpu=v9:-xarch=v8plus} \
-%{mcpu=ultrasparc:-xarch=v8plusa} \
-%{mcpu=ultrasparc3:-xarch=v8plusb} \
-%{mcpu=niagara:-xarch=v8plusb} \
-%{mcpu=niagara2:-xarch=v8plusb} \
+%{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 SUBTARGET_EXTRA_SPECS
-#define SUBTARGET_EXTRA_SPECS \
- { "startfile_arch", STARTFILE_ARCH_SPEC }, \
- { "link_arch", LINK_ARCH_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 "} \
+")
+
+#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 ASM_ARCH_SPEC
+#define ASM_ARCH_SPEC ""
+
+#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 "elf32_sparc_sol2"
+#define ARCH64_EMULATION "elf64_sparc_sol2"
+#else
+#define ARCH32_EMULATION "elf32_sparc"
+#define ARCH64_EMULATION "elf64_sparc"
+#endif
+#endif
+
+#define ARCH64_SUBDIR "sparcv9"
-/* However it appears that Solaris 2.0 uses the same reg numbering as
- the old BSD-style system did. */
+#define SUBTARGET_CPU_EXTRA_SPECS
+
+\f
+
+/* Register the Solaris-specific #pragma directives. */
+#define REGISTER_TARGET_PRAGMAS() solaris_register_pragmas ()
+
+#if defined(USE_GAS) && defined(HAVE_AS_TLS)
+/* Use GNU extensions to TLS support. */
+#undef TARGET_SUN_TLS
+#undef TARGET_GNU_TLS
+#define TARGET_SUN_TLS 0
+#define TARGET_GNU_TLS 1
+#endif
+
+#undef LOCAL_LABEL_PREFIX
+#define LOCAL_LABEL_PREFIX "."
/* The Solaris 2 assembler uses .skip, not .zero, so put this back. */
#undef ASM_OUTPUT_SKIP
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
fprintf (FILE, "\t.skip %u\n", (int)(SIZE))
-#undef LOCAL_LABEL_PREFIX
-#define LOCAL_LABEL_PREFIX "."
-
/* This is how to store into the string LABEL
the symbol_ref name of an internal numbered label where
PREFIX is the class of label and NUM is the number within the class.
/* The native TLS-enabled assembler requires the directive #tls_object
to be put on objects in TLS sections (as of v7.1). This is not
- required by the GNU assembler but supported on SPARC. */
+ required by GNU as but supported on SPARC. */
#undef ASM_DECLARE_OBJECT_NAME
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
do \
} \
while (0)
-/* The Solaris assembler cannot grok .stabd directives. */
-#undef NO_DBX_BNSYM_ENSYM
-#define NO_DBX_BNSYM_ENSYM 1
-\f
-
-/* Select a format to encode pointers in exception handling data. CODE
- is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
- true if the symbol may be affected by dynamic relocations.
-
- Some Solaris dynamic linkers don't handle unaligned section relative
- relocs properly, so force them to be aligned. */
-#ifndef HAVE_AS_SPARC_UA_PCREL
-#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
- ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr)
-#endif
-
-\f
-/* Define for support of TFmode long double.
- SPARC ABI says that long double is 4 words. */
-#define LONG_DOUBLE_TYPE_SIZE 128
-
-/* Solaris's _Qp_* library routine implementation clobbers the output
- memory before the inputs are fully consumed. */
-
-#undef TARGET_BUGGY_QP_LIB
-#define TARGET_BUGGY_QP_LIB 1
-
-#undef SUN_CONVERSION_LIBFUNCS
-#define SUN_CONVERSION_LIBFUNCS 1
-
-#undef DITF_CONVERSION_LIBFUNCS
-#define DITF_CONVERSION_LIBFUNCS 1
-
-#undef SUN_INTEGER_MULTIPLY_64
-#define SUN_INTEGER_MULTIPLY_64 1
-
-/* Solaris allows 64 bit out and global registers in 32 bit mode.
- sparc_override_options will disable V8+ if not generating V9 code. */
-#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (MASK_V8PLUS + MASK_APP_REGS + MASK_FPU \
- + MASK_LONG_DOUBLE_128)
-
-/* 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_TARGET_PRAGMAS() solaris_register_pragmas ()
-
/* Output a simple call for .init/.fini. */
#define ASM_OUTPUT_CALL(FILE, FN) \
do \
} \
while (0)
+#ifndef USE_GAS
/* This is how to output an assembler line that says to advance
the location counter to a multiple of 2**LOG bytes using the
- NOP instruction as padding. */
+ NOP instruction as padding. The filler pattern doesn't work
+ with GNU as. */
#define ASM_OUTPUT_ALIGN_WITH_NOP(FILE,LOG) \
if ((LOG) != 0) \
fprintf (FILE, "\t.align %d,0x1000000\n", (1<<(LOG)))
-/* Use Solaris ELF section syntax. */
+/* Use Solaris ELF section syntax with Sun as. */
#undef TARGET_ASM_NAMED_SECTION
#define TARGET_ASM_NAMED_SECTION sparc_solaris_elf_asm_named_section
#undef TARGET_ASM_CODE_END
#define TARGET_ASM_CODE_END solaris_code_end
-/* Solaris/SPARC as requires doublequoted section names. While gas
+/* Sun as requires doublequoted section names on SPARC. While GNU as
supports that, too, we prefer the standard variant. */
-#ifndef USE_GAS
#undef SECTION_NAME_FORMAT
#define SECTION_NAME_FORMAT "\"%s\""
+#endif /* !USE_GAS */
+
+/* Undefine this so that attribute((init_priority)) works with GNU ld. */
+#ifdef USE_GLD
+#undef CTORS_SECTION_ASM_OP
+#undef DTORS_SECTION_ASM_OP
#endif
-/* Static stack checking is supported by means of probes. */
-#define STACK_CHECK_STATIC_BUILTIN 1
+\f
+
+/* Define for support of TFmode long double.
+ SPARC ABI says that long double is 4 words. */
+#define LONG_DOUBLE_TYPE_SIZE 128
+
+/* Solaris's _Qp_* library routine implementation clobbers the output
+ memory before the inputs are fully consumed. */
+
+#undef TARGET_BUGGY_QP_LIB
+#define TARGET_BUGGY_QP_LIB 1
+
+#undef SUN_CONVERSION_LIBFUNCS
+#define SUN_CONVERSION_LIBFUNCS 1
+
+#undef DITF_CONVERSION_LIBFUNCS
+#define DITF_CONVERSION_LIBFUNCS 1
+
+#undef SUN_INTEGER_MULTIPLY_64
+#define SUN_INTEGER_MULTIPLY_64 1
--- /dev/null
+#define USE_GLD 1