aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@wasabisystems.com>2002-05-29 20:09:29 +0000
committerJason Thorpe <thorpej@gcc.gnu.org>2002-05-29 20:09:29 +0000
commitcd7714ee966820cc0a1fc78d54ae96d4bb47b515 (patch)
treec22a5927bec357913db46e7fa2603675ed0d9cd6
parente7206fbc5c2615615180bf23d52727994d6b4a63 (diff)
downloadgcc-cd7714ee966820cc0a1fc78d54ae96d4bb47b515.zip
gcc-cd7714ee966820cc0a1fc78d54ae96d4bb47b515.tar.gz
gcc-cd7714ee966820cc0a1fc78d54ae96d4bb47b515.tar.bz2
netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define.
* 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
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/m68k/netbsd-elf.h26
-rw-r--r--gcc/config/m68k/netbsd.h22
3 files changed, 43 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 11e769a..c7942cf 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/m68k/netbsd-elf.h b/gcc/config/m68k/netbsd-elf.h
index f0d1e91..c2d7fc0 100644
--- a/gcc/config/m68k/netbsd-elf.h
+++ b/gcc/config/m68k/netbsd-elf.h
@@ -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. */
diff --git a/gcc/config/m68k/netbsd.h b/gcc/config/m68k/netbsd.h
index 5dd0895..6397014 100644
--- a/gcc/config/m68k/netbsd.h
+++ b/gcc/config/m68k/netbsd.h
@@ -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. */
@@ -7,18 +20,19 @@
#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"
/* Make gcc agree with <machine/ansi.h> */