* config/i386/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define.
authorthorpej <thorpej@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 May 2002 17:57:55 +0000 (17:57 +0000)
committerthorpej <thorpej@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 May 2002 17:57:55 +0000 (17:57 +0000)
(CPP_PREDEFINES): Remove.
(SUBTARGET_EXTRA_SPECS): Define.
(CPP_SPEC): Use %(netbsd_cpp_spec).
* config/i386/netbsd.h (TARGET_OS_CPP_BUILTINS): Define.
(CPP_PREDEFINES): Remove.
(SUBTARGET_EXTRA_SPECS): Define.
(CPP_SPEC): Use %(netbsd_cpp_spec).
* config/i386/netbsd64.h (TARGET_OS_CPP_BUILTINS): Define.
(CPP_PREDEFINES, CPP_LP64_SPEC, CPP_SUBTARGET_SPEC): Remove.
(SUBTARGET_EXTRA_SPECS): Remove cpp_lp64 and cpp_subtarget.
Add netbsd_cpp_spec.
(CPP_SPEC): Remove %(cpp_subtarget), add %(netbsd_cpp_spec).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54009 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/netbsd-elf.h
gcc/config/i386/netbsd.h
gcc/config/i386/netbsd64.h

index 75ebd81..4fe6deb 100644 (file)
@@ -1,3 +1,19 @@
+2002-05-29  Jason Thorpe  <thorpej@wasabisystems.com>
+
+       * config/i386/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define.
+       (CPP_PREDEFINES): Remove.
+       (SUBTARGET_EXTRA_SPECS): Define.
+       (CPP_SPEC): Use %(netbsd_cpp_spec).
+       * config/i386/netbsd.h (TARGET_OS_CPP_BUILTINS): Define.
+       (CPP_PREDEFINES): Remove.
+       (SUBTARGET_EXTRA_SPECS): Define.
+       (CPP_SPEC): Use %(netbsd_cpp_spec).
+       * config/i386/netbsd64.h (TARGET_OS_CPP_BUILTINS): Define.
+       (CPP_PREDEFINES, CPP_LP64_SPEC, CPP_SUBTARGET_SPEC): Remove.
+       (SUBTARGET_EXTRA_SPECS): Remove cpp_lp64 and cpp_subtarget.
+       Add netbsd_cpp_spec.
+       (CPP_SPEC): Remove %(cpp_subtarget), add %(netbsd_cpp_spec).
+
 2002-05-29  Neil Booth  <neil@daikokuya.demon.co.uk>
            Zack Weinberg <zack@codesourcery.com>
 
index f3992e8..b91847f 100644 (file)
@@ -20,6 +20,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.  */
 
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+      NETBSD_OS_CPP_BUILTINS_ELF();            \
+    }                                          \
+  while (0)
+
 /* Provide a LINK_SPEC appropriate for a NetBSD/i386 ELF target.
    This is a copy of LINK_SPEC from <netbsd-elf.h> tweaked for
    the i386 target.  */
@@ -38,16 +45,14 @@ Boston, MA 02111-1307, USA.  */
       %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}}       \
     %{static:-static}}"
 
-/* Names to predefine in the preprocessor for this target machine.  */
-
-#define CPP_PREDEFINES                                                 \
-  "-D__NetBSD__ -D__ELF__ -Asystem=unix -Asystem=NetBSD"
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS                  \
+  { "netbsd_cpp_spec", NETBSD_CPP_SPEC },
 
-/* Provide a CPP_SPEC appropriate for NetBSD.  Currently we just deal with
-   the GCC option `-posix'.  */
+/* Provide a CPP_SPEC appropriate for NetBSD.  */
 
 #undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC "%(cpp_cpu) %(netbsd_cpp_spec)"
 
 
 /* Make gcc agree with <machine/ansi.h> */
index 400cb0f..89dce21 100644 (file)
@@ -1,3 +1,10 @@
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+      NETBSD_OS_CPP_BUILTINS_AOUT();           \
+    }                                          \
+  while (0)
+
 #define TARGET_VERSION fprintf (stderr, " (NetBSD/i386 a.out)");
 
 /* This goes away when the math-emulator is fixed */
 #define TARGET_SUBTARGET_DEFAULT \
   (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387)
 
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dunix -D__NetBSD__ \
- -Asystem=unix -Asystem=bsd -Asystem=NetBSD"
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS                  \
+  { "netbsd_cpp_spec", NETBSD_CPP_SPEC },
 
 #undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC "%(cpp_cpu) %(netbsd_cpp_spec)"
 
 \f
 #undef SIZE_TYPE
index 26a3f42..24448c9 100644 (file)
@@ -20,6 +20,14 @@ 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                                           \
+    {                                          \
+      NETBSD_OS_CPP_BUILTINS_ELF();            \
+      if (TARGET_64BIT)                                \
+       NETBSD_OS_CPP_BUILTINS_LP64();          \
+    }                                          \
+  while (0)
 
 /* Provide a LINK_SPEC appropriate for a NetBSD/x86-64 ELF target.
    This is a copy of LINK_SPEC from <netbsd-elf.h> tweaked for
@@ -41,29 +49,14 @@ Boston, MA 02111-1307, USA.  */
        %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}}      \
      %{static:-static}}"
 
-
-/* Names to predefine in the preprocessor for this target machine.  */
-
-#define CPP_PREDEFINES                                                 \
-  "-D__NetBSD__ -D__ELF__ -Asystem=unix -Asystem=NetBSD"
-
-
-/* Provide some extra CPP specs needed by NetBSD/x86_64.  */
-#define CPP_LP64_SPEC "%{!m32:-D_LP64}"
-
-#define CPP_SUBTARGET_SPEC "%(cpp_lp64)"
-
 #undef SUBTARGET_EXTRA_SPECS
-#define SUBTARGET_EXTRA_SPECS                                          \
-  { "cpp_lp64", CPP_LP64_SPEC },                                       \
-  { "cpp_subtarget", CPP_SUBTARGET_SPEC },
-
+#define SUBTARGET_EXTRA_SPECS                  \
+  { "netbsd_cpp_spec", NETBSD_CPP_SPEC },
 
-/* Provide a CPP_SPEC appropriate for NetBSD.  Currently we deal with
-   our subtarget specs and the GCC option `-posix'.  */
+/* Provide a CPP_SPEC appropriate for NetBSD.  */
 
 #undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %(cpp_subtarget) %{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC "%(cpp_cpu) %(netbsd_cpp_spec)"
 
 
 /* Output assembler code to FILE to call the profiler.  */