aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/sparc
diff options
context:
space:
mode:
authorDavid O'Brien <obrien@FreeBSD.org>2001-11-14 21:44:21 +0000
committerDavid O'Brien <obrien@gcc.gnu.org>2001-11-14 21:44:21 +0000
commit0f7a7be7ceaf26e2355a8f623d0986a2cde145ab (patch)
treed33f96eb78a1cd88b0c1d8166cff64d303cbf582 /gcc/config/sparc
parent90a12988695ada8c9b24d7adc2dabcd7d7a1709b (diff)
downloadgcc-0f7a7be7ceaf26e2355a8f623d0986a2cde145ab.zip
gcc-0f7a7be7ceaf26e2355a8f623d0986a2cde145ab.tar.gz
gcc-0f7a7be7ceaf26e2355a8f623d0986a2cde145ab.tar.bz2
config.gcc (sparc64-wrs-vxworks*, [...]): Include various CPU headers via tm_file.
2001-11-14 David O'Brien <obrien@FreeBSD.org> * config.gcc (sparc64-wrs-vxworks*, sparc-*-netbsd*, sparc-*-openbsd*, sparc-*-chorusos*, sparc-*-elf*, sparc-*-linux*aout*, sparc-*-linux*libc1*, sparc-*-linux*, sparc-*-lynxos*, sparc-*-rtems*, sparc-*-rtemself*, sparc-hal-solaris2*, sparc-*-solaris2*, sparc-*-sunos4.0*, sparc-*-sunos4*, sparc-*-sunos3*, sparc-*-sysv4*, sparc-*-vxsim*, sparclite-*-aout*, sparclite-*-elf*, sparc86x-*-aout*, sparc86x-*-elf*, sparc64-*-aout*, sparc64-*-elf*, sparc64-*-linux*): Include various CPU headers via tm_file. a.out based platforms now properly include sparc/aout.h. sol2.h usage now implies including elfos.h, svr4.h, and sparc/sysv4.h. * config/netbsd.h (TARGET_MEM_FUNCTIONS): Undef before defining it. Also define to '1'. * sparc/sparc.h (CPP_PREDEFINES, TARGET_VERSION, WORD_SWITCH_TAKES_ARG, SELECT_SECTION, ASM_DECLARE_FUNCTION_NAME, TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, DBX_REGISTER_NUMBER, ASM_OUTPUT_SOURCE_LINE): Remove. They are a.out specific and belong in sparc/aout.h. * sparc/aout.h (TARGET_VERSION, WORD_SWITCH_TAKES_ARG, SELECT_SECTION, ASM_DECLARE_FUNCTION_NAME, TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, DBX_REGISTER_NUMBER, ASM_OUTPUT_SOURCE_LINE): Define. Moved here from sparc/sparc.h. * sparc/litecoff.h (WORD_SWITCH_TAKES_ARG, ASM_DECLARE_FUNCTION_NAME, TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, DBX_REGISTER_NUMBER): Define. Moved here from sparc/sparc.h. * config/sparc/linux-aout.h (DEFAULT_PCC_STRUCT_RETURN): Undef before defining. * config/sparc/linux64.h (UNALIGNED_DOUBLE_INT_ASM_OP): Undef before * config/sparc/lynx.h: Don't include lynx.h. (SELECT_SECTION): Do not undef. * config/sparc/openbsd.h: Don't include sparc/sparc.h. * config/sparc/sol2-sld-64.h: Include sparc/sparc.h, elfos.h, svr4.h, and sparc/sysv4.h. * config/sparc/sol2.h: Don't include sparc/sparc.h and sparc/sysv4.h. * config/sparc/sp64-aout.h (CPP_PREDEFINES): Don't define. Get from sparc/aout.h now. * config/sparc/sp64-elf.h (DWARF_DEBUGGING_INFO, DWARF2_DEBUGGING_INFO): Don't undef, there is no need. * config/sparc/splet.h (CPP_PREDEFINES): Define. * config/sparc/sun4o3.h (CPP_PREDEFINES): Likewise. * config/sparc/sunos4.h (CPP_PREDEFINES): Likewise. Don't include sparc/sparc.h. * config/sparc/sysv4.h (WORD_SWITCH_TAKES_ARG, ASM_OUTPUT_SOURCE_LINE, SELECT_SECTION, ASM_DECLARE_FUNCTION_NAME, TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Don't undef, there is no need now. Don't include elfos.h and svr4.h. (TARGET_VERSION): Define. * config/sparc/vxsim.h (TARGET_VERSION): Define. Approved by: Richard Henderson <rth@redhat.com> Message-ID: <20011114132416.B17112@redhat.com> From-SVN: r47023
Diffstat (limited to 'gcc/config/sparc')
-rw-r--r--gcc/config/sparc/aout.h81
-rw-r--r--gcc/config/sparc/linux-aout.h1
-rw-r--r--gcc/config/sparc/linux64.h1
-rw-r--r--gcc/config/sparc/litecoff.h28
-rw-r--r--gcc/config/sparc/lynx.h3
-rw-r--r--gcc/config/sparc/netbsd.h1
-rw-r--r--gcc/config/sparc/openbsd.h2
-rw-r--r--gcc/config/sparc/sol2-sld-64.h4
-rw-r--r--gcc/config/sparc/sol2.h2
-rw-r--r--gcc/config/sparc/sp64-aout.h3
-rw-r--r--gcc/config/sparc/sp64-elf.h2
-rw-r--r--gcc/config/sparc/sparc.h81
-rw-r--r--gcc/config/sparc/splet.h2
-rw-r--r--gcc/config/sparc/sun4o3.h3
-rw-r--r--gcc/config/sparc/sunos4.h5
-rw-r--r--gcc/config/sparc/sysv4.h16
-rw-r--r--gcc/config/sparc/vxsim.h3
17 files changed, 128 insertions, 110 deletions
diff --git a/gcc/config/sparc/aout.h b/gcc/config/sparc/aout.h
index 217430e..fd84d75 100644
--- a/gcc/config/sparc/aout.h
+++ b/gcc/config/sparc/aout.h
@@ -19,5 +19,84 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#undef CPP_PREDEFINES
+/* Print subsidiary information on the compiler version in use. */
+
+#define TARGET_VERSION fprintf (stderr, " (sparc)");
+
+/* Names to predefine in the preprocessor for this target machine.
+ ??? It would be nice to not include any subtarget specific values here,
+ however there's no way to portably provide subtarget values to
+ CPP_PREFINES. Also, -D values in CPP_SUBTARGET_SPEC don't get turned into
+ foo, __foo and __foo__. */
+
#define CPP_PREDEFINES "-Dsparc -Acpu=sparc -Amachine=sparc"
+
+/* These compiler options take an argument. We ignore -target for now. */
+
+#define WORD_SWITCH_TAKES_ARG(STR) \
+ (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
+ || !strcmp (STR, "target") || !strcmp (STR, "assert"))
+
+/* This is defined differently for v9 in a cover file. */
+#define SELECT_SECTION(T,RELOC,ALIGN) \
+{ \
+ if (TREE_CODE (T) == VAR_DECL) \
+ { \
+ if (TREE_READONLY (T) && ! TREE_SIDE_EFFECTS (T) \
+ && DECL_INITIAL (T) \
+ && (DECL_INITIAL (T) == error_mark_node \
+ || TREE_CONSTANT (DECL_INITIAL (T))) \
+ && DECL_ALIGN (T) <= MAX_TEXT_ALIGN \
+ && ! (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES))) \
+ text_section (); \
+ else \
+ data_section (); \
+ } \
+ else if (TREE_CODE (T) == CONSTRUCTOR) \
+ { \
+ if (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES)) \
+ data_section (); \
+ } \
+ else if (TREE_CODE_CLASS (TREE_CODE (T)) == 'c') \
+ { \
+ if ((TREE_CODE (T) == STRING_CST && flag_writable_strings) \
+ || TYPE_ALIGN (TREE_TYPE (T)) > MAX_TEXT_ALIGN \
+ || (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES))) \
+ data_section (); \
+ else \
+ text_section (); \
+ } \
+}
+
+/* Output the label for a function definition. */
+
+#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
+do { \
+ ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
+ ASM_OUTPUT_LABEL (FILE, NAME); \
+} while (0)
+
+/* Output before read-only data. */
+
+#define TEXT_SECTION_ASM_OP "\t.text"
+
+/* Output before writable data. */
+
+#define DATA_SECTION_ASM_OP "\t.data"
+
+/* How to renumber registers for dbx and gdb. In the flat model, the frame
+ pointer is really %i7. */
+
+#define DBX_REGISTER_NUMBER(REGNO) \
+ (TARGET_FLAT && REGNO == FRAME_POINTER_REGNUM ? 31 : REGNO)
+
+/* This is how to output a note to DBX telling it the line number
+ to which the following sequence of instructions corresponds.
+
+ This is needed for SunOS 4.0, and should not hurt for 3.2
+ versions either. */
+#define ASM_OUTPUT_SOURCE_LINE(file, line) \
+ { static int sym_lineno = 1; \
+ fprintf (file, ".stabn 68,0,%d,LM%d\nLM%d:\n", \
+ line, sym_lineno, sym_lineno); \
+ sym_lineno += 1; }
diff --git a/gcc/config/sparc/linux-aout.h b/gcc/config/sparc/linux-aout.h
index 0c44541..04ebb8c 100644
--- a/gcc/config/sparc/linux-aout.h
+++ b/gcc/config/sparc/linux-aout.h
@@ -70,6 +70,7 @@ Boston, MA 02111-1307, USA. */
/* Don't default to pcc-struct-return, because gcc is the only compiler,
and we want to retain compatibility with older gcc versions. */
+#undef DEFAULT_PCC_STRUCT_RETURN
#define DEFAULT_PCC_STRUCT_RETURN 0
#undef LIB_SPEC
diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
index 566d722..9785869 100644
--- a/gcc/config/sparc/linux64.h
+++ b/gcc/config/sparc/linux64.h
@@ -356,6 +356,7 @@ do { \
misnamed. These should all refer to explicit sizes (half/word/xword?),
anything other than short/int/long/etc. */
+#undef UNALIGNED_DOUBLE_INT_ASM_OP
#define UNALIGNED_DOUBLE_INT_ASM_OP "\t.uaxword\t"
/* DWARF bits. */
diff --git a/gcc/config/sparc/litecoff.h b/gcc/config/sparc/litecoff.h
index 73a31cc..4b08d38 100644
--- a/gcc/config/sparc/litecoff.h
+++ b/gcc/config/sparc/litecoff.h
@@ -48,3 +48,31 @@ Boston, MA 02111-1307, USA. */
#undef DO_GLOBAL_CTORS_BODY
#undef DO_GLOBAL_DTORS_BODY
+
+/* These compiler options take an argument. We ignore -target for now. */
+
+#define WORD_SWITCH_TAKES_ARG(STR) \
+ (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
+ || !strcmp (STR, "target") || !strcmp (STR, "assert"))
+
+/* Output the label for a function definition. */
+
+#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
+do { \
+ ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
+ ASM_OUTPUT_LABEL (FILE, NAME); \
+} while (0)
+
+/* Output before read-only data. */
+
+#define TEXT_SECTION_ASM_OP "\t.text"
+
+/* Output before writable data. */
+
+#define DATA_SECTION_ASM_OP "\t.data"
+
+/* How to renumber registers for dbx and gdb. In the flat model, the frame
+ pointer is really %i7. */
+
+#define DBX_REGISTER_NUMBER(REGNO) \
+ (TARGET_FLAT && REGNO == FRAME_POINTER_REGNUM ? 31 : REGNO)
diff --git a/gcc/config/sparc/lynx.h b/gcc/config/sparc/lynx.h
index 45216b2..866612d 100644
--- a/gcc/config/sparc/lynx.h
+++ b/gcc/config/sparc/lynx.h
@@ -19,13 +19,10 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#undef ASM_OUTPUT_IDENT
-#undef SELECT_SECTION
#undef SELECT_RTX_SECTION
#define BSS_SECTION_ASM_OP "\t.section\t\".bss\""
-#include <lynx.h>
-
/* ??? Must redefine to get sparclite and v8 defines. Can this be done
differently? */
diff --git a/gcc/config/sparc/netbsd.h b/gcc/config/sparc/netbsd.h
index 0fc5bd1..4be5b6b 100644
--- a/gcc/config/sparc/netbsd.h
+++ b/gcc/config/sparc/netbsd.h
@@ -37,4 +37,3 @@
/* Until they use ELF or something that handles dwarf2 unwinds
and initialization stuff better. */
#define DWARF2_UNWIND_INFO 0
-
diff --git a/gcc/config/sparc/openbsd.h b/gcc/config/sparc/openbsd.h
index ba97ac7..dc37284 100644
--- a/gcc/config/sparc/openbsd.h
+++ b/gcc/config/sparc/openbsd.h
@@ -18,8 +18,6 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <sparc/sparc.h>
-
/* Get generic OpenBSD definitions. */
#define OBSD_OLD_GAS
#include <openbsd.h>
diff --git a/gcc/config/sparc/sol2-sld-64.h b/gcc/config/sparc/sol2-sld-64.h
index c9d89ca..ffd8447 100644
--- a/gcc/config/sparc/sol2-sld-64.h
+++ b/gcc/config/sparc/sol2-sld-64.h
@@ -5,6 +5,10 @@
#include "sparc/sparc_bi.h"
#endif
+#include "sparc/sparc.h"
+#include "elfos.h"
+#include "svr4.h"
+#include "sparc/sysv4.h"
#include "sparc/sol2.h"
#ifdef AS_SPARC64_FLAG
diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h
index aee098b..aeb5f7e 100644
--- a/gcc/config/sparc/sol2.h
+++ b/gcc/config/sparc/sol2.h
@@ -22,8 +22,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
-#include "sparc/sparc.h"
-#include "sparc/sysv4.h"
/* Solaris 2 uses a wint_t different from the default. This is required
by the SCD 2.4.1, p. 6-83, Figure 6-66. */
diff --git a/gcc/config/sparc/sp64-aout.h b/gcc/config/sparc/sp64-aout.h
index 8183973..669adc3 100644
--- a/gcc/config/sparc/sp64-aout.h
+++ b/gcc/config/sparc/sp64-aout.h
@@ -31,6 +31,3 @@ Boston, MA 02111-1307, USA. */
/* The only code model supported is Medium/Low. */
#undef SPARC_DEFAULT_CMODEL
#define SPARC_DEFAULT_CMODEL CM_MEDLOW
-
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dsparc -Acpu=sparc -Amachine=sparc"
diff --git a/gcc/config/sparc/sp64-elf.h b/gcc/config/sparc/sp64-elf.h
index 3aac978..07be388 100644
--- a/gcc/config/sparc/sp64-elf.h
+++ b/gcc/config/sparc/sp64-elf.h
@@ -110,8 +110,6 @@ crtbegin.o%s \
GDB doesn't support 64 bit stabs yet and the desired debug format is DWARF
anyway so it is the default. */
-#define DWARF_DEBUGGING_INFO
-#define DWARF2_DEBUGGING_INFO
#define DBX_DEBUGGING_INFO
#undef PREFERRED_DEBUGGING_TYPE
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index 09a2943..0d96aca 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -210,14 +210,6 @@ Unrecognized value in TARGET_CPU_DEFAULT.
#endif /* !SPARC_BI_ARCH */
-/* Names to predefine in the preprocessor for this target machine.
- ??? It would be nice to not include any subtarget specific values here,
- however there's no way to portably provide subtarget values to
- CPP_PREFINES. Also, -D values in CPP_SUBTARGET_SPEC don't get turned into
- foo, __foo and __foo__. */
-
-#define CPP_PREDEFINES "-Dsparc -Dsun -Dunix -Asystem=unix -Asystem=bsd"
-
/* Define macros to distinguish architectures. */
/* Common CPP definitions used by CPP_SPEC amongst the various targets
@@ -414,16 +406,6 @@ Unrecognized value in TARGET_CPU_DEFAULT.
/* This is meant to be redefined in the host dependent files. */
#define SUBTARGET_OVERRIDE_OPTIONS
-/* These compiler options take an argument. We ignore -target for now. */
-
-#define WORD_SWITCH_TAKES_ARG(STR) \
- (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
- || !strcmp (STR, "target") || !strcmp (STR, "assert"))
-
-/* Print subsidiary information on the compiler version in use. */
-
-#define TARGET_VERSION fprintf (stderr, " (sparc)");
-
/* Generate DBX debugging information. */
#define DBX_DEBUGGING_INFO
@@ -911,36 +893,6 @@ if (TARGET_ARCH64 \
#define SUNOS4_SHARED_LIBRARIES 0
#endif
-/* This is defined differently for v9 in a cover file. */
-#define SELECT_SECTION(T,RELOC,ALIGN) \
-{ \
- if (TREE_CODE (T) == VAR_DECL) \
- { \
- if (TREE_READONLY (T) && ! TREE_SIDE_EFFECTS (T) \
- && DECL_INITIAL (T) \
- && (DECL_INITIAL (T) == error_mark_node \
- || TREE_CONSTANT (DECL_INITIAL (T))) \
- && DECL_ALIGN (T) <= MAX_TEXT_ALIGN \
- && ! (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES))) \
- text_section (); \
- else \
- data_section (); \
- } \
- else if (TREE_CODE (T) == CONSTRUCTOR) \
- { \
- if (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES)) \
- data_section (); \
- } \
- else if (TREE_CODE_CLASS (TREE_CODE (T)) == 'c') \
- { \
- if ((TREE_CODE (T) == STRING_CST && flag_writable_strings) \
- || TYPE_ALIGN (TREE_TYPE (T)) > MAX_TEXT_ALIGN \
- || (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES))) \
- data_section (); \
- else \
- text_section (); \
- } \
-}
/* Use text section for a constant
unless we need more alignment than that offers. */
@@ -1884,14 +1836,6 @@ extern struct rtx_def *sparc_compare_op0, *sparc_compare_op1;
#define ASM_DECLARE_RESULT(FILE, RESULT) \
fprintf ((FILE), "\t.proc\t0%lo\n", sparc_type_code (TREE_TYPE (RESULT)))
-/* Output the label for a function definition. */
-
-#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
-do { \
- ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
- ASM_OUTPUT_LABEL (FILE, NAME); \
-} while (0)
-
/* Output the special assembly code needed to tell the assembler some
register is used as global register variable.
@@ -2905,14 +2849,6 @@ do { \
#define ASM_DOUBLE ".double"
#define ASM_LONGDOUBLE ".xxx" /* ??? Not known (or used yet). */
-/* Output before read-only data. */
-
-#define TEXT_SECTION_ASM_OP "\t.text"
-
-/* Output before writable data. */
-
-#define DATA_SECTION_ASM_OP "\t.data"
-
/* How to refer to registers in assembler output.
This sequence is indexed by compiler's hard-register-number (see above). */
@@ -2936,12 +2872,6 @@ do { \
#define ADDITIONAL_REGISTER_NAMES \
{{"ccr", SPARC_ICC_REG}, {"cc", SPARC_ICC_REG}}
-/* How to renumber registers for dbx and gdb. In the flat model, the frame
- pointer is really %i7. */
-
-#define DBX_REGISTER_NUMBER(REGNO) \
- (TARGET_FLAT && REGNO == FRAME_POINTER_REGNUM ? 31 : REGNO)
-
/* On Sun 4, this limit is 2048. We use 1000 to be safe, since the length
can run past this up to a continuation point. Once we used 1500, but
a single entry in C++ can run more than 500 bytes, due to the length of
@@ -2950,17 +2880,6 @@ do { \
guess... */
#define DBX_CONTIN_LENGTH 1000
-/* This is how to output a note to DBX telling it the line number
- to which the following sequence of instructions corresponds.
-
- This is needed for SunOS 4.0, and should not hurt for 3.2
- versions either. */
-#define ASM_OUTPUT_SOURCE_LINE(file, line) \
- { static int sym_lineno = 1; \
- fprintf (file, ".stabn 68,0,%d,LM%d\nLM%d:\n", \
- line, sym_lineno, sym_lineno); \
- sym_lineno += 1; }
-
/* This is how to output the definition of a user-level label named NAME,
such as the label on a static function or variable NAME. */
diff --git a/gcc/config/sparc/splet.h b/gcc/config/sparc/splet.h
index 922dd33..d2ef4fb 100644
--- a/gcc/config/sparc/splet.h
+++ b/gcc/config/sparc/splet.h
@@ -22,6 +22,8 @@ Boston, MA 02111-1307, USA. */
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_APP_REGS + MASK_EPILOGUE)
+#define CPP_PREDEFINES "-Dsparc -Acpu=sparc -Amachine=sparc"
+
#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \
{"big-endian", -MASK_LITTLE_ENDIAN, N_("Generate code for big endian") }, \
diff --git a/gcc/config/sparc/sun4o3.h b/gcc/config/sparc/sun4o3.h
index 19ff33e..891e329 100644
--- a/gcc/config/sparc/sun4o3.h
+++ b/gcc/config/sparc/sun4o3.h
@@ -1,3 +1,6 @@
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-Dsparc -Dsun -Dunix -Asystem=unix -Asystem=bsd"
+
/* Override the name of the mcount profiling function. */
#undef MCOUNT_FUNCTION
diff --git a/gcc/config/sparc/sunos4.h b/gcc/config/sparc/sunos4.h
index 07939f0..2f12cc6 100644
--- a/gcc/config/sparc/sunos4.h
+++ b/gcc/config/sparc/sunos4.h
@@ -20,12 +20,13 @@ Boston, MA 02111-1307, USA. */
#define SUNOS4_SHARED_LIBRARIES 1
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-Dsparc -Dsun -Dunix -Asystem=unix -Asystem=bsd"
+
/* Use N_BINCL stabs. */
#define DBX_USE_BINCL
-#include "sparc/sparc.h"
-
/* The Sun as doesn't like unaligned data. */
#define DWARF2_UNWIND_INFO 0
diff --git a/gcc/config/sparc/sysv4.h b/gcc/config/sparc/sysv4.h
index 12c3fdf..caf6a21 100644
--- a/gcc/config/sparc/sysv4.h
+++ b/gcc/config/sparc/sysv4.h
@@ -20,19 +20,9 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-
-/* Undefine some symbols which are defined in "sparc.h" but which are
- appropriate only for SunOS 4.x, and not for svr4. */
-
-#undef WORD_SWITCH_TAKES_ARG
-#undef ASM_OUTPUT_SOURCE_LINE
-#undef SELECT_SECTION
-#undef ASM_DECLARE_FUNCTION_NAME
-#undef TEXT_SECTION_ASM_OP
-#undef DATA_SECTION_ASM_OP
-
-#include "elfos.h"
-#include "svr4.h"
+#ifndef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (sparc ELF)");
+#endif
/* ??? Put back the SIZE_TYPE/PTRDIFF_TYPE definitions set by sparc.h.
Why, exactly, is svr4.h messing with this? Seems like the chip
diff --git a/gcc/config/sparc/vxsim.h b/gcc/config/sparc/vxsim.h
index ea2ed5e..94cfb92 100644
--- a/gcc/config/sparc/vxsim.h
+++ b/gcc/config/sparc/vxsim.h
@@ -18,6 +18,9 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (sparc VxSim)");
+
/* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
#undef CPP_PREDEFINES