]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define.
authorJason Thorpe <thorpej@wasabisystems.com>
Wed, 29 May 2002 20:09:29 +0000 (20:09 +0000)
committerJason Thorpe <thorpej@gcc.gnu.org>
Wed, 29 May 2002 20:09:29 +0000 (20:09 +0000)
* config/m68k/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define.
(EXTRA_SPECS): Add netbsd_cpp_spec.
(CPP_SPEC): Use %(netbsd_cpp_spec).
(CPP_PREDEFINES): Remove.
* config/m68k/netbsd.h (TARGET_OS_CPP_BUILTINS): Define.
(EXTRA_SPECS): Define.
(CPP_SPEC): Use %(netbsd_cpp_spec).
(CPP_PREDEFINES): Remove.

From-SVN: r54016

gcc/ChangeLog
gcc/config/m68k/netbsd-elf.h
gcc/config/m68k/netbsd.h

index 11e769a729d164438719766a8c2d9ecb0ba09ca6..c7942cfffefef17407ec9a5836980b8c86db1b89 100644 (file)
@@ -1,3 +1,14 @@
+2002-05-29  Jason Thorpe  <thorpej@wasabisystems.com>
+
+       * config/m68k/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define.
+       (EXTRA_SPECS): Add netbsd_cpp_spec.
+       (CPP_SPEC): Use %(netbsd_cpp_spec).
+       (CPP_PREDEFINES): Remove.
+       * config/m68k/netbsd.h (TARGET_OS_CPP_BUILTINS): Define.
+       (EXTRA_SPECS): Define.
+       (CPP_SPEC): Use %(netbsd_cpp_spec).
+       (CPP_PREDEFINES): Remove.
+
 2002-05-29  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        PR preprocessor/6844
index f0d1e91e3b18b42e2cedebb07055bc3d63161a59..c2d7fc0bdc540a672f8200fbcc8480620a55f1ed 100644 (file)
@@ -24,6 +24,17 @@ 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();            \
+      builtin_define ("__m68k__");             \
+      builtin_define ("__SVR4_ABI__");         \
+      builtin_define ("__motorola__");         \
+      builtin_assert ("cpu=m68k");             \
+      builtin_assert ("machine=m68k");         \
+    }                                          \
+  while (0)
 
 /* Default target comes from config.gcc */
 #undef TARGET_DEFAULT
@@ -44,7 +55,8 @@ Boston, MA 02111-1307, USA.  */
   { "cpp_cpu_default_spec", CPP_CPU_DEFAULT_SPEC }, \
   { "cpp_cpu_spec",         CPP_CPU_SPEC }, \
   { "cpp_fpu_spec",         CPP_FPU_SPEC }, \
-  { "asm_default_spec",     ASM_DEFAULT_SPEC },
+  { "asm_default_spec",     ASM_DEFAULT_SPEC }, \
+  { "netbsd_cpp_spec",      NETBSD_CPP_SPEC },
 
 
 #define CPP_CPU_SPEC \
@@ -80,7 +92,7 @@ Boston, MA 02111-1307, USA.  */
 
 #undef CPP_SPEC
 #define CPP_SPEC \
-  "%{posix:-D_POSIX_SOURCE} %(cpp_cpu_spec) %(cpp_fpu_spec)"
+  "%(netbsd_cpp_spec) %(cpp_cpu_spec) %(cpp_fpu_spec)"
 
 
 /* Provide an ASM_SPEC appropriate for NetBSD m68k ELF targets.  We pass
@@ -92,16 +104,6 @@ Boston, MA 02111-1307, USA.  */
     %{m68010} %{m68020} %{m68030} %{m68040} %{m68060} \
     %{fpic:-k} %{fPIC:-k -K}"
 
-
-/* Provide a set of CPP pre-definitions and pre-assertions appropriate
-   for NetBSD m68k ELF targets (using the SVR4 ABI).  */
-
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES \
-  "-D__NetBSD__ -D__ELF__ -D__m68k__ -D__SVR4_ABI__ -D__motorola__ \
-   -Asystem=unix -Asystem=NetBSD -Acpu=m68k -Amachine=m68k"
-
-
 /* Provide a LINK_SPEC appropriate for a NetBSD/m68k ELF target.
    This is a copy of LINK_SPEC from <netbsd-elf.h> tweaked for
    the m68k target.  */
index 5dd0895df6a0617d06adabbbc4f89dbbe89f6b5a..6397014b89f517673813809c982023a3a74e2570 100644 (file)
@@ -1,3 +1,16 @@
+#define TARGET_OS_CPP_BUILTINS()               \
+  do                                           \
+    {                                          \
+      NETBSD_OS_CPP_BUILTINS_AOUT();           \
+      builtin_define_std ("unix");             \
+      builtin_define_std ("m68k");             \
+      builtin_define_std ("mc68000");          \
+      builtin_define_std ("mc68020");          \
+      builtin_assert ("cpu=m68k");             \
+      builtin_assert ("machine=m68k");         \
+    }                                          \
+  while (0)
+
 #include <m68k/m68k.h>
 
 /* Get generic NetBSD definitions.  */
 
 #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020)
 
+#define EXTRA_SPECS \
+  { "netbsd_cpp_spec",      NETBSD_CPP_SPEC },
+
 /* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified.
    This will control the use of inline 68881 insns in certain macros.  */
 
 #undef CPP_SPEC
-#define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC \
+  "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %(netbsd_cpp_spec)"
 
 #undef ASM_SPEC
 #define ASM_SPEC " %| %{m68030} %{m68040} %{m68060} %{fpic:-k} %{fPIC:-k -K}"
 
-/* Names to predefine in the preprocessor for this target machine.  */
-
-#define CPP_PREDEFINES "-Dunix -Dm68k -Dmc68000 -Dmc68020 -D__NetBSD__ -Asystem=unix -Asystem=NetBSD -Acpu=m68k -Amachine=m68k"
 \f
 /* Make gcc agree with <machine/ansi.h> */