aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-04-12 16:02:45 -0700
committerRichard Henderson <rth@gcc.gnu.org>2002-04-12 16:02:45 -0700
commit3fc602a055c3442625a6238df059928681605033 (patch)
tree382d6ed5de207c7f602d15756e5d3615dc26d066 /gcc/config
parent2f15e255eda3a0ef4e8f07c0176198ec0a1be7c5 (diff)
downloadgcc-3fc602a055c3442625a6238df059928681605033.zip
gcc-3fc602a055c3442625a6238df059928681605033.tar.gz
gcc-3fc602a055c3442625a6238df059928681605033.tar.bz2
config.gcc (sparcv9-*-solaris2): Default to 32-bit code.
* config.gcc (sparcv9-*-solaris2): Default to 32-bit code. (sparc*-*-solaris): Clean up header files. * configure.in (AS_SPARC64_FLAG): Error out if can't find it and plan on generating 64-bit code. * toplev.c (decode_g_option): Remove LINKER_DOES_NOT_WORK_WITH_DWARF2. * config/sparc/sol2-64.h: Delete and reuse for default 64-bit code. * config/sparc/sol2-sld-64.h: Rename ... * config/sparc/sol2-bi.h: ... here. Remove the bits that checked for AS_SPARC64_FLAG not defined. * config/sparc/sol2-gld-bi.h: New. * config/sparc/sol2-sld.h: Remove. * config/sparc/sol26-sld.h: New. * config/sparc/sol2.h: Tidy comments. * doc/install.texi: Document sparc-solaris configury changes. From-SVN: r52251
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/sparc/sol2-64.h25
-rw-r--r--gcc/config/sparc/sol2-bi.h (renamed from gcc/config/sparc/sol2-sld-64.h)81
-rw-r--r--gcc/config/sparc/sol2-gld-bi.h9
-rw-r--r--gcc/config/sparc/sol2-sld.h9
-rw-r--r--gcc/config/sparc/sol2.h8
-rw-r--r--gcc/config/sparc/sol26-sld.h6
6 files changed, 31 insertions, 107 deletions
diff --git a/gcc/config/sparc/sol2-64.h b/gcc/config/sparc/sol2-64.h
index 40db497..ccdc8f3 100644
--- a/gcc/config/sparc/sol2-64.h
+++ b/gcc/config/sparc/sol2-64.h
@@ -1,20 +1,7 @@
-/* Definitions of target machine for GNU compiler, for 64-bit SPARC
- running Solaris 2 using the GNU linker. */
+/* Definitions of target machine for GNU compiler, for bi-arch SPARC
+ running Solaris 2, defaulting to 64-bit code generation. */
-#ifdef LINKER_DOES_NOT_WORK_WITH_DWARF2
-#undef LINKER_DOES_NOT_WORK_WITH_DWARF2
-#endif
-
-#ifdef AS_SPARC64_FLAG
-
-#ifdef LINK_ARCH_SPEC
-#undef LINK_ARCH_SPEC
-#endif
-
-#define LINK_ARCH_SPEC "\
-%{m32:-m elf32_sparc %(link_arch32)} \
-%{m64:-m elf64_sparc %(link_arch64)} \
-%{!m32:%{!m64:%(link_arch_default)}} \
-"
-
-#endif
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT \
+ (MASK_V9 + MASK_PTR64 + MASK_64BIT /* + MASK_HARD_QUAD */ + \
+ MASK_STACK_BIAS + MASK_FPU + MASK_LONG_DOUBLE_128)
diff --git a/gcc/config/sparc/sol2-sld-64.h b/gcc/config/sparc/sol2-bi.h
index 2a8eafc..63a4d66 100644
--- a/gcc/config/sparc/sol2-sld-64.h
+++ b/gcc/config/sparc/sol2-bi.h
@@ -1,35 +1,6 @@
-/* Definitions of target machine for GNU compiler, for 64-bit SPARC
+/* Definitions of target machine for GNU compiler, for bi-arch SPARC
running Solaris 2 using the system linker. */
-#ifdef AS_SPARC64_FLAG
-#include "sparc/biarch64.h"
-#endif
-
-#include "sparc/sparc.h"
-#include "dbxelf.h"
-#include "elfos.h"
-#include "svr4.h"
-#include "sparc/sysv4.h"
-#include "sparc/sol2.h"
-
-#ifdef AS_SPARC64_FLAG
-
-/* At least up through Solaris 2.6,
- the system linker does not work with DWARF or DWARF2,
- since it does not have working support for relocations
- to unaligned data. */
-
-#define LINKER_DOES_NOT_WORK_WITH_DWARF2
-
-/* A 64 bit v9 compiler with stack-bias */
-
-#if TARGET_CPU_DEFAULT == TARGET_CPU_v9 || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc
-#undef TARGET_DEFAULT
-#define TARGET_DEFAULT \
- (MASK_V9 + MASK_PTR64 + MASK_64BIT /* + MASK_HARD_QUAD */ + \
- MASK_STACK_BIAS + MASK_FPU + MASK_LONG_DOUBLE_128)
-#endif
-
/* The default code model. */
#undef SPARC_DEFAULT_CMODEL
#define SPARC_DEFAULT_CMODEL CM_MEDANY
@@ -107,8 +78,6 @@
%{ansi:/usr/lib/sparcv9/values-Xc.o%s} \
%{!ansi:/usr/lib/sparcv9/values-Xa.o%s}"
-#ifdef SPARC_BI_ARCH
-
#if DEFAULT_ARCH32_P
#define STARTFILE_ARCH_SPEC "\
%{m32:" STARTFILE_SPEC32 "} \
@@ -121,13 +90,6 @@
%{!m32:%{!m64:" STARTFILE_SPEC64 "}}"
#endif
-#else /* !SPARC_BI_ARCH */
-
-/* In this case we define MD_STARTFILE_PREFIX to /usr/lib/sparcv9/ */
-#define STARTFILE_ARCH_SPEC STARTFILE_SPEC32
-
-#endif /* !SPARC_BI_ARCH */
-
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{!shared: \
%{!symbolic: \
@@ -138,8 +100,6 @@
crti.o%s " STARTFILE_ARCH_SPEC " \
crtbegin.o%s"
-#ifdef SPARC_BI_ARCH
-
#undef CPP_CPU_DEFAULT_SPEC
#define CPP_CPU_DEFAULT_SPEC \
(DEFAULT_ARCH32_P ? "\
@@ -295,37 +255,8 @@
#define MULTILIB_DEFAULTS { "m64" }
#endif
-#else /* !SPARC_BI_ARCH */
-
-/*
- * This should be the same as in sol2-sld.h, except with "/sparcv9"
- * appended to the paths and /usr/ccs/lib is no longer necessary
- */
-#undef LINK_SPEC
-#define LINK_SPEC \
- "%{h*} %{v:-V} \
- %{b} %{Wl,*:%*} \
- %{static:-dn -Bstatic} \
- %{shared:-G -dy %{!mimpure-text:-z text}} \
- %{symbolic:-Bsymbolic -G -dy -z text} \
- %{mcmodel=medlow:-M /usr/lib/ld/sparcv9/map.below4G} \
- %{G:-G} \
- %{YP,*} \
- %{R*} \
- %{compat-bsd: \
- %{!YP,*:%{p:-Y P,/usr/ucblib/sparcv9:/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \
- %{pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \
- %{!p:%{!pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/sparcv9}}} \
- -R /usr/ucblib} \
- %{!compat-bsd: \
- %{!YP,*:%{p:-Y P,/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \
- %{pg:-Y P,/usr/lib/libp/sparcv9:/usr/lib/sparcv9} \
- %{!p:%{!pg:-Y P,/usr/lib/sparcv9}}}} \
- %{Qy:} %{!Qn:-Qy}"
-
-#undef MD_STARTFILE_PREFIX
-#define MD_STARTFILE_PREFIX "/usr/lib/sparcv9/"
-
-#endif /* ! SPARC_BI_ARCH */
-
-#endif
+/* We use stabs-in-elf in 32-bit mode, because that is what the native
+ toolchain uses. But gdb can't handle truncated 32-bit stabs so we
+ use dwarf2 in 64-bit mode. */
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE (TARGET_ARCH32 ? DBX_DEBUG : DWARF2_DEBUG)
diff --git a/gcc/config/sparc/sol2-gld-bi.h b/gcc/config/sparc/sol2-gld-bi.h
new file mode 100644
index 0000000..81a1ff2
--- /dev/null
+++ b/gcc/config/sparc/sol2-gld-bi.h
@@ -0,0 +1,9 @@
+/* Definitions of target machine for GNU compiler, for bi-arch SPARC
+ running Solaris 2 using the GNU linker. */
+
+#undef LINK_ARCH_SPEC
+#define LINK_ARCH_SPEC "\
+%{m32:-m elf32_sparc %(link_arch32)} \
+%{m64:-m elf64_sparc %(link_arch64)} \
+%{!m32:%{!m64:%(link_arch_default)}} \
+"
diff --git a/gcc/config/sparc/sol2-sld.h b/gcc/config/sparc/sol2-sld.h
deleted file mode 100644
index 3847fae..0000000
--- a/gcc/config/sparc/sol2-sld.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Definitions of target machine for GNU compiler, for SPARC running Solaris 2
- using the system linker. */
-
-/* At least up through Solaris 2.6,
- the system linker does not work with DWARF or DWARF2,
- since it does not have working support for relocations
- to unaligned data. */
-
-#define LINKER_DOES_NOT_WORK_WITH_DWARF2
diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h
index 305129b..69ba9f5 100644
--- a/gcc/config/sparc/sol2.h
+++ b/gcc/config/sparc/sol2.h
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler, for SPARC running Solaris 2
- Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001 Free Software Foundation, Inc.
+ Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@netcom.com).
Additional changes by David V. Henkel-Wallace (gumby@cygnus.com).
@@ -89,12 +89,12 @@ Boston, MA 02111-1307, USA. */
/* However it appears that Solaris 2.0 uses the same reg numbering as
the old BSD-style system did. */
-#undef DBX_REGISTER_NUMBER
/* Same as sparc.h */
+#undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(REGNO) \
(TARGET_FLAT && (REGNO) == HARD_FRAME_POINTER_REGNUM ? 31 : REGNO)
-/* We use stabs-in-elf for debugging, because that is what the native
+/* We use stabs-in-elf by default, because that is what the native
toolchain uses. */
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
diff --git a/gcc/config/sparc/sol26-sld.h b/gcc/config/sparc/sol26-sld.h
new file mode 100644
index 0000000..74b5433
--- /dev/null
+++ b/gcc/config/sparc/sol26-sld.h
@@ -0,0 +1,6 @@
+/* Up through Solaris 2.6, the system linker does not work with DWARF
+ or DWARF2, since it does not have working support for relocations
+ to unaligned data. */
+
+#undef DWARF_DEBUGGING_INFO
+#undef DWARF2_DEBUGGING_INFO