aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/sol2-bi.h
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2011-06-21 08:53:06 +0000
committerRainer Orth <ro@gcc.gnu.org>2011-06-21 08:53:06 +0000
commit7ecfa34f84cdb9ed7f9063089a567968b6031dda (patch)
tree54e754d7718349903f64502e7344f614091edde2 /gcc/config/sol2-bi.h
parent1795c28e175fbdf2a23d8bf0293f95794c7167bd (diff)
downloadgcc-7ecfa34f84cdb9ed7f9063089a567968b6031dda.zip
gcc-7ecfa34f84cdb9ed7f9063089a567968b6031dda.tar.gz
gcc-7ecfa34f84cdb9ed7f9063089a567968b6031dda.tar.bz2
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
Diffstat (limited to 'gcc/config/sol2-bi.h')
-rw-r--r--gcc/config/sol2-bi.h119
1 files changed, 119 insertions, 0 deletions
diff --git a/gcc/config/sol2-bi.h b/gcc/config/sol2-bi.h
new file mode 100644
index 0000000..371cdd6
--- /dev/null
+++ b/gcc/config/sol2-bi.h
@@ -0,0 +1,119 @@
+/* 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