aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2003-05-17 07:19:56 +0000
committerNeil Booth <neil@gcc.gnu.org>2003-05-17 07:19:56 +0000
commit9b8466f43d9a3d82e5e7a89fda55d5e0676ac4c7 (patch)
treef99fc63c8af0a9699f048d06ce3c1989fad067a5
parent5c07bd7a3c5ad78260ad8c53e0f2e003f3df0787 (diff)
downloadgcc-9b8466f43d9a3d82e5e7a89fda55d5e0676ac4c7.zip
gcc-9b8466f43d9a3d82e5e7a89fda55d5e0676ac4c7.tar.gz
gcc-9b8466f43d9a3d82e5e7a89fda55d5e0676ac4c7.tar.bz2
config.gcc (sparc-*-sysv4*): Add sparc/sysv4-only.h.
* config.gcc (sparc-*-sysv4*): Add sparc/sysv4-only.h. * sparc/aout.h, sparc/elf.h, sparc/freebsd.h, sparc/linux.h, sparc/linux64.h, sparc/lite.h, sparc/litecoff.h, sparc/liteelf.h, sparc/netbsd-elf.h, sparc/openbsd.h, sparc/openbsd64.h, sparc/pbd.h, sparc/rtemself.h, sparc/sol2-64.h, sparc/sol2-bi.h, sparc/sol2.h, sparc/sp64-elf.h, sparc/sp86-elf.h, sparc/sparc.h, sparc/sysv4.h, * sparc/sysv4-only.h: New. From-SVN: r66902
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config.gcc2
-rw-r--r--gcc/config/sparc/aout.h8
-rw-r--r--gcc/config/sparc/elf.h3
-rw-r--r--gcc/config/sparc/freebsd.h4
-rw-r--r--gcc/config/sparc/linux.h15
-rw-r--r--gcc/config/sparc/linux64.h19
-rw-r--r--gcc/config/sparc/lite.h3
-rw-r--r--gcc/config/sparc/litecoff.h9
-rw-r--r--gcc/config/sparc/liteelf.h8
-rw-r--r--gcc/config/sparc/netbsd-elf.h3
-rw-r--r--gcc/config/sparc/openbsd.h12
-rw-r--r--gcc/config/sparc/openbsd64.h19
-rw-r--r--gcc/config/sparc/pbd.h14
-rw-r--r--gcc/config/sparc/rtemself.h15
-rw-r--r--gcc/config/sparc/sol2-64.h8
-rw-r--r--gcc/config/sparc/sol2-bi.h6
-rw-r--r--gcc/config/sparc/sol2.h3
-rw-r--r--gcc/config/sparc/sp64-elf.h10
-rw-r--r--gcc/config/sparc/sp86x-elf.h9
-rw-r--r--gcc/config/sparc/sparc.h29
-rw-r--r--gcc/config/sparc/sysv4-only.h35
-rw-r--r--gcc/config/sparc/sysv4.h7
23 files changed, 176 insertions, 76 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3187e09..d795666 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+2003-05-17 Neil Booth <neil@daikokuya.co.uk>
+
+ * config.gcc (sparc-*-sysv4*): Add sparc/sysv4-only.h.
+ * sparc/aout.h, sparc/elf.h, sparc/freebsd.h, sparc/linux.h,
+ sparc/linux64.h, sparc/lite.h, sparc/litecoff.h, sparc/liteelf.h,
+ sparc/netbsd-elf.h, sparc/openbsd.h, sparc/openbsd64.h,
+ sparc/pbd.h, sparc/rtemself.h, sparc/sol2-64.h, sparc/sol2-bi.h,
+ sparc/sol2.h, sparc/sp64-elf.h, sparc/sp86-elf.h, sparc/sparc.h,
+ sparc/sysv4.h,
+ * sparc/sysv4-only.h: New.
+
2003-05-17 Alan Modra <amodra@bigpond.net.au>
* function.c (assign_parms): Check for zero size args.
diff --git a/gcc/config.gcc b/gcc/config.gcc
index b1c55ed..b8ceb03 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1948,7 +1948,7 @@ sparc-*-solaris2*)
fi
;;
sparc-*-sysv4*)
- tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h"
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sysv4-only.h"
tmake_file=t-svr4
extra_parts="crtbegin.o crtend.o"
;;
diff --git a/gcc/config/sparc/aout.h b/gcc/config/sparc/aout.h
index 7532281..b4727b6 100644
--- a/gcc/config/sparc/aout.h
+++ b/gcc/config/sparc/aout.h
@@ -23,14 +23,6 @@ Boston, MA 02111-1307, USA. */
#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) \
diff --git a/gcc/config/sparc/elf.h b/gcc/config/sparc/elf.h
index d2d3a0b..04e7b63 100644
--- a/gcc/config/sparc/elf.h
+++ b/gcc/config/sparc/elf.h
@@ -19,9 +19,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. */
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dsparc -D__elf__"
-
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
diff --git a/gcc/config/sparc/freebsd.h b/gcc/config/sparc/freebsd.h
index bec5a23..1e39a27 100644
--- a/gcc/config/sparc/freebsd.h
+++ b/gcc/config/sparc/freebsd.h
@@ -24,10 +24,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef CPP_CPU64_DEFAULT_SPEC
#define CPP_CPU64_DEFAULT_SPEC "-D__sparc64__ -D__sparc_v9__ -D__arch64__"
-/* Because we include sparc/sysv4.h. */
-#undef CPP_PREDEFINES
-/* Do not define it here, we now use TARGET_OS_CPP_BUILTINS. */
-
#define LINK_SPEC "%(link_arch) \
%{!mno-relax:%{!r:-relax}} \
%{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
index 2879c64..4d33a33 100644
--- a/gcc/config/sparc/linux.h
+++ b/gcc/config/sparc/linux.h
@@ -19,6 +19,18 @@ 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. */
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define_std ("unix"); \
+ builtin_define_std ("linux"); \
+ builtin_define ("__gnu_linux__"); \
+ builtin_define ("__ELF__"); \
+ builtin_assert ("system=unix"); \
+ builtin_assert ("system=posix"); \
+ } \
+ while (0)
+
#define LINUX_DEFAULT_ELF
/* Don't assume anything about the header files. */
@@ -98,9 +110,6 @@ Boston, MA 02111-1307, USA. */
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-D__ELF__ -Dunix -D__sparc__ -D__gnu_linux__ -Dlinux -Asystem=unix -Asystem=posix"
-
#undef CPP_SUBTARGET_SPEC
#ifdef USE_GNULIBC_1
#define CPP_SUBTARGET_SPEC \
diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
index 40fd232..3f7f6ca 100644
--- a/gcc/config/sparc/linux64.h
+++ b/gcc/config/sparc/linux64.h
@@ -19,6 +19,19 @@ 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. */
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define_std ("unix"); \
+ builtin_define_std ("linux"); \
+ builtin_define ("_LONGLONG"); \
+ builtin_define ("__gnu_linux__"); \
+ builtin_define ("__ELF__"); \
+ builtin_assert ("system=unix"); \
+ builtin_assert ("system=posix"); \
+ } \
+ while (0)
+
#define LINUX_DEFAULT_ELF
/* Don't assume anything about the header files. */
@@ -43,8 +56,7 @@ Boston, MA 02111-1307, USA. */
#ifdef SPARC_BI_ARCH
#undef CPP_ARCH32_SPEC
-#define CPP_ARCH32_SPEC "%{mlong-double-128:-D__LONG_DOUBLE_128__} \
--D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc"
+#define CPP_ARCH32_SPEC "%{mlong-double-128:-D__LONG_DOUBLE_128__}"
#endif
@@ -111,9 +123,6 @@ Boston, MA 02111-1307, USA. */
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64
#endif
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-D__ELF__ -Dunix -D_LONGLONG -D__sparc__ -D__gnu_linux__ -Dlinux -Asystem=unix -Asystem=posix"
-
#undef CPP_SUBTARGET_SPEC
#define CPP_SUBTARGET_SPEC "\
%{fPIC:-D__PIC__ -D__pic__} \
diff --git a/gcc/config/sparc/lite.h b/gcc/config/sparc/lite.h
index 95da781..b314f43 100644
--- a/gcc/config/sparc/lite.h
+++ b/gcc/config/sparc/lite.h
@@ -19,9 +19,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. */
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dsparc -Dsparclite -Acpu=sparc -Amachine=sparc"
-
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (sparclite)");
diff --git a/gcc/config/sparc/litecoff.h b/gcc/config/sparc/litecoff.h
index 91808f5..65f065d 100644
--- a/gcc/config/sparc/litecoff.h
+++ b/gcc/config/sparc/litecoff.h
@@ -21,8 +21,13 @@ Boston, MA 02111-1307, USA. */
#define BSS_SECTION_ASM_OP "\t.section\t\".bss\""
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dsparc -Dsparclite -Acpu=sparc -Amachine=sparc"
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define_std ("sparc"); \
+ builtin_define_std ("sparclite"); \
+ } \
+ while (0)
/* Default to stabs in COFF. */
diff --git a/gcc/config/sparc/liteelf.h b/gcc/config/sparc/liteelf.h
index 9b6cbaa..04ad6e1 100644
--- a/gcc/config/sparc/liteelf.h
+++ b/gcc/config/sparc/liteelf.h
@@ -19,8 +19,12 @@ 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
-#define CPP_PREDEFINES "-D__sparc__ -D__sparclite__ -Acpu=sparc -Amachine=sparc"
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__sparclite__"); \
+ } \
+ while (0)
/* Default to dwarf2 in ELF. */
diff --git a/gcc/config/sparc/netbsd-elf.h b/gcc/config/sparc/netbsd-elf.h
index 65901c8..0f0d6fc 100644
--- a/gcc/config/sparc/netbsd-elf.h
+++ b/gcc/config/sparc/netbsd-elf.h
@@ -39,9 +39,6 @@ Boston, MA 02111-1307, USA. */
#undef MD_EXEC_PREFIX
#undef MD_STARTFILE_PREFIX
-/* Make sure this is undefined. */
-#undef CPP_PREDEFINES
-
/* CPP defines used by all NetBSD targets. */
#undef CPP_SUBTARGET_SPEC
#define CPP_SUBTARGET_SPEC "%(netbsd_cpp_spec)"
diff --git a/gcc/config/sparc/openbsd.h b/gcc/config/sparc/openbsd.h
index a4333df..814ccdf 100644
--- a/gcc/config/sparc/openbsd.h
+++ b/gcc/config/sparc/openbsd.h
@@ -22,8 +22,16 @@ Boston, MA 02111-1307, USA. */
#define OBSD_OLD_GAS
#include <openbsd.h>
-/* Run-time target specifications. */
-#define CPP_PREDEFINES "-D__unix__ -D__sparc__ -D__OpenBSD__ -Asystem=unix -Asystem=OpenBSD -Acpu=sparc -Amachine=sparc"
+/* Target OS builtins. */
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__unix__"); \
+ builtin_define ("__OpenBSD__"); \
+ builtin_assert ("system=unix"); \
+ builtin_assert ("system=OpenBSD"); \
+ } \
+ while (0)
/* Layout of source language data types */
diff --git a/gcc/config/sparc/openbsd64.h b/gcc/config/sparc/openbsd64.h
index 4dfe381..78c2fad 100644
--- a/gcc/config/sparc/openbsd64.h
+++ b/gcc/config/sparc/openbsd64.h
@@ -30,9 +30,22 @@ Boston, MA 02111-1307, USA. */
#undef SPARC_DEFAULT_CMODEL
#define SPARC_DEFAULT_CMODEL CM_MEDMID
-/* Run-time target specifications. */
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-D__unix__ -D__sparc__ -D__sparc64__ -D__sparcv9__ -D__sparc_v9__ -D__arch64__ -D__ELF__ -D__OpenBSD__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(sparc) -Amachine(sparc)"
+/* Target OS builtins. */
+#undef TARGET_OS_CPP_BUILTINS /* Defined in sp64-elf.h. */
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__unix__"); \
+ builtin_define ("__OpenBSD__"); \
+ builtin_assert ("system=unix"); \
+ builtin_assert ("system=OpenBSD"); \
+ builtin_define ("__sparc64__"); \
+ builtin_define ("__sparcv9__"); \
+ builtin_define ("__sparc_v9__"); \
+ builtin_define ("__arch64__"); \
+ builtin_define ("__ELF__"); \
+ } \
+ while (0)
#undef CPP_SUBTARGET_SPEC
#define CPP_SUBTARGET_SPEC ""
diff --git a/gcc/config/sparc/pbd.h b/gcc/config/sparc/pbd.h
index dd47b36..45675b1 100644
--- a/gcc/config/sparc/pbd.h
+++ b/gcc/config/sparc/pbd.h
@@ -19,11 +19,15 @@ 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. */
-
-/* Names to predefine in the preprocessor for this target machine. */
-
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dsparc -DUnicomPBD -Dunix -D__GCC_NEW_VARARGS__ -Asystem=unix -Acpu=sparc -Amachine=sparc"
+/* Target OS builtins. */
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define_std ("unix"); \
+ builtin_define_std ("UnicomPBD"); \
+ builtin_assert ("system=unix"); \
+ } \
+ while (0)
/* We want DBX format for use with gdb under COFF. */
diff --git a/gcc/config/sparc/rtemself.h b/gcc/config/sparc/rtemself.h
index 4f2cc66..3bd9571 100644
--- a/gcc/config/sparc/rtemself.h
+++ b/gcc/config/sparc/rtemself.h
@@ -19,8 +19,13 @@ 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. */
-/* Specify predefined symbols in preprocessor. */
-
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dsparc -D__GCC_NEW_VARARGS__ -D__rtems__ \
- -D__USE_INIT_FINI__ -Asystem=rtems"
+/* Target OS builtins. */
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define_std ("sparc"); \
+ builtin_define ("__rtems__"); \
+ builtin_define ("__USE_INIT_FINI__"); \
+ builtin_assert ("system=rtems"); \
+ } \
+ while (0)
diff --git a/gcc/config/sparc/sol2-64.h b/gcc/config/sparc/sol2-64.h
index ccdc8f3..18e1742 100644
--- a/gcc/config/sparc/sol2-64.h
+++ b/gcc/config/sparc/sol2-64.h
@@ -5,3 +5,11 @@
#define TARGET_DEFAULT \
(MASK_V9 + MASK_PTR64 + MASK_64BIT /* + MASK_HARD_QUAD */ + \
MASK_STACK_BIAS + MASK_FPU + MASK_LONG_DOUBLE_128)
+
+/* Target OS builtins. */
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define_std ("sparc"); \
+ } \
+ while (0)
diff --git a/gcc/config/sparc/sol2-bi.h b/gcc/config/sparc/sol2-bi.h
index 3f9416d..8c0d472 100644
--- a/gcc/config/sparc/sol2-bi.h
+++ b/gcc/config/sparc/sol2-bi.h
@@ -98,11 +98,9 @@
#define WINT_TYPE_SIZE 32
#undef CPP_ARCH32_SPEC
-#define CPP_ARCH32_SPEC "\
--D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc"
+#define CPP_ARCH32_SPEC ""
#undef CPP_ARCH64_SPEC
-#define CPP_ARCH64_SPEC "\
--D__arch64__ -Acpu=sparc64 -Amachine=sparcv9 -D__sparcv9"
+#define CPP_ARCH64_SPEC "-D__arch64__ -D__sparcv9"
#undef CPP_ARCH_SPEC
#define CPP_ARCH_SPEC "\
diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h
index e22bdcf..b026356 100644
--- a/gcc/config/sparc/sol2.h
+++ b/gcc/config/sparc/sol2.h
@@ -23,9 +23,6 @@ Boston, MA 02111-1307, USA. */
/* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dsparc"
-
/* This is here rather than in sparc.h because it's not known what
other assemblers will accept. */
diff --git a/gcc/config/sparc/sp64-elf.h b/gcc/config/sparc/sp64-elf.h
index 18187dc..652e7339 100644
--- a/gcc/config/sparc/sp64-elf.h
+++ b/gcc/config/sparc/sp64-elf.h
@@ -38,8 +38,14 @@ Boston, MA 02111-1307, USA. */
#undef SPARC_DEFAULT_CMODEL
#define SPARC_DEFAULT_CMODEL CM_EMBMEDANY
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dsparc -D__ELF__ -Acpu=sparc -Amachine=sparc"
+/* Target OS builtins. */
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define_std ("sparc"); \
+ builtin_define ("__ELF__"); \
+ } \
+ while (0)
/* __svr4__ is used by the C library (FIXME) */
#undef CPP_SUBTARGET_SPEC
diff --git a/gcc/config/sparc/sp86x-elf.h b/gcc/config/sparc/sp86x-elf.h
index cb7e8c3..86aa4db 100644
--- a/gcc/config/sparc/sp86x-elf.h
+++ b/gcc/config/sparc/sp86x-elf.h
@@ -19,8 +19,13 @@ 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
-#define CPP_PREDEFINES "-D__sparc__ -D__sparclite86x__ -Acpu=sparc -Amachine=sparc"
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__sparclite86x__"); \
+ builtin_define ("__ELF__"); \
+ } \
+ while (0)
/* Default to dwarf2 in ELF. */
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index f3a3ce3..0531148 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -25,6 +25,24 @@ Boston, MA 02111-1307, USA. */
/* Note that some other tm.h files include this one and then override
whatever definitions are necessary. */
+/* Target CPU builtins. */
+#define TARGET_CPU_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__sparc__"); \
+ if (TARGET_64BIT) \
+ { \
+ builtin_assert ("cpu=sparc"); \
+ builtin_assert ("machine=sparc"); \
+ } \
+ else \
+ { \
+ builtin_assert ("cpu=sparc64"); \
+ builtin_assert ("machine=sparc64"); \
+ } \
+ } \
+ while (0)
+
/* Specify this in a cover file to provide bi-architecture (32/64) support. */
/* #define SPARC_BI_ARCH */
@@ -239,15 +257,8 @@ extern enum cmodel sparc_cmodel;
%{mcpu=ultrasparc3:-D__sparc_v9__} \
%{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:%(cpp_cpu_default)}}}}}}} \
"
-
-/* ??? The GCC_NEW_VARARGS macro is now obsolete, because gcc always uses
- the right varags.h file when bootstrapping. */
-/* ??? It's not clear what value we want to use for -Acpu/machine for
- sparc64 in 32 bit environments, so for now we only use `sparc64' in
- 64 bit environments. */
-
-#define CPP_ARCH32_SPEC "-D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc"
-#define CPP_ARCH64_SPEC "-D__arch64__ -Acpu=sparc64 -Amachine=sparc64"
+#define CPP_ARCH32_SPEC ""
+#define CPP_ARCH64_SPEC "-D__arch64__"
#define CPP_ARCH_DEFAULT_SPEC \
(DEFAULT_ARCH32_P ? CPP_ARCH32_SPEC : CPP_ARCH64_SPEC)
diff --git a/gcc/config/sparc/sysv4-only.h b/gcc/config/sparc/sysv4-only.h
new file mode 100644
index 0000000..a283a22
--- /dev/null
+++ b/gcc/config/sparc/sysv4-only.h
@@ -0,0 +1,35 @@
+/* Target macros for GNU compiler for SPARC running System V.4
+ Copyright (C) 2003
+ 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 2, 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 COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Provide a set of pre-definitions and pre-assertions appropriate for
+ the SPARC running svr4. __svr4__ is our extension. */
+
+/* Target OS builtins. */ \
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define_std ("sparc"); \
+ builtin_define_std ("unix"); \
+ builtin_define ("__svr4__"); \
+ builtin_assert ("system=unix"); \
+ builtin_assert ("system=svr4"); \
+ } \
+ while (0)
diff --git a/gcc/config/sparc/sysv4.h b/gcc/config/sparc/sysv4.h
index 0543b46..1d153c0 100644
--- a/gcc/config/sparc/sysv4.h
+++ b/gcc/config/sparc/sysv4.h
@@ -48,13 +48,6 @@ Boston, MA 02111-1307, USA. */
#undef SKIP_ASM_OP
#undef SET_ASM_OP /* Has no equivalent. See ASM_OUTPUT_DEF below. */
-/* Provide a set of pre-definitions and pre-assertions appropriate for
- the SPARC running svr4. __svr4__ is our extension. */
-
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES \
-"-Dsparc -Dunix -D__svr4__ -Asystem=unix -Asystem=svr4"
-
/* The native assembler can't compute differences between symbols in different
sections when generating pic code, so we must put jump tables in the
text section. */