summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog17
-rw-r--r--gcc/config.gcc1
-rw-r--r--gcc/config/vax/bsd.h32
-rw-r--r--gcc/config/vax/netbsd.h34
-rw-r--r--gcc/config/vax/openbsd.h13
-rw-r--r--gcc/config/vax/ultrix.h19
-rw-r--r--gcc/config/vax/vax.h22
-rw-r--r--gcc/config/vax/vaxv.h15
-rw-r--r--gcc/config/vax/vms.h18
9 files changed, 145 insertions, 26 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d5f7f831a1f..ae0e26dfe05 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,20 @@
+2002-06-11 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config.gcc (vax-*-bsd*): Add vax/bsd.h to ${tm_file}.
+ * config/vax/bsd.h: New file.
+ * config/vax/netbsd.h: Add missing notice.
+ (CPP_PREDEFINES): Remove.
+ (TARGET_OS_CPP_BUILTINS): Define.
+ (CPP_SPEC): Use NETBSD_CPP_SPEC.
+ * config/vax/openbsd.h: Update copyright years.
+ (CPP_PREDEFINES): Remove.
+ (TARGET_OS_CPP_BUILTINS): Define.
+ * config/vax/ultrix.h: Likewise.
+ * config/vax/vaxv.h: Likewise.
+ * config/vax/vms.h: Likewise.
+ * config/vax/vax.h (TARGET_CPU_CPP_BUILTINS): Define.
+ (CPP_PREDEFINES, CPP_SPEC): Remove.
+
Wed Jun 12 01:50:28 CEST 2002 Jan Hubicka <jh@suse.cz>
* i386.md (addqi_1_slp, subqi_1_slp
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 3ae8d433ef7..4868f46f256 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2627,6 +2627,7 @@ v850-*-*)
cxx_target_objs="v850-c.o"
;;
vax-*-bsd*) # VAXen running BSD
+ tm_file="${tm_file} vax/bsd.h"
use_collect2=yes
float_format=vax
;;
diff --git a/gcc/config/vax/bsd.h b/gcc/config/vax/bsd.h
new file mode 100644
index 00000000000..9b3b77045ff
--- /dev/null
+++ b/gcc/config/vax/bsd.h
@@ -0,0 +1,32 @@
+/* Definitions of target machine for GNU compiler. BSD version.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC 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 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_assert ("system=bsd"); \
+ \
+ builtin_define_std ("vax"); \
+ if (TARGET_G_FLOAT) \
+ builtin_define_std ("GFLOAT"); \
+ } \
+ while (0)
diff --git a/gcc/config/vax/netbsd.h b/gcc/config/vax/netbsd.h
index 005a8677527..46bbac77c53 100644
--- a/gcc/config/vax/netbsd.h
+++ b/gcc/config/vax/netbsd.h
@@ -1,8 +1,35 @@
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dunix -Dvax -D__NetBSD__ -Asystem=unix -Asystem=NetBSD -Acpu=vax -Amachine=vax"
+/* Definitions of target machine for GNU compiler.
+ NetBSD/vax a.out version.
+ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+ Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC 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 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_AOUT(); \
+ } \
+ while (0)
#undef CPP_SPEC
-#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC NETBSD_CPP_SPEC
/* Make gcc agree with <machine/ansi.h> */
@@ -15,4 +42,3 @@
/* Until they use ELF or something that handles dwarf2 unwinds
and initialization stuff better. */
#undef DWARF2_UNWIND_INFO
-
diff --git a/gcc/config/vax/openbsd.h b/gcc/config/vax/openbsd.h
index 84f4c8e4bc4..bc3af245d86 100644
--- a/gcc/config/vax/openbsd.h
+++ b/gcc/config/vax/openbsd.h
@@ -1,5 +1,5 @@
/* Configuration fragment for a VAX OpenBSD target.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -20,8 +20,15 @@ Boston, MA 02111-1307, USA. */
/* Amend common OpenBSD definitions for VAX target. */
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-D__unix__ -D__vax__ -D__OpenBSD__ -Asystem=unix -Asystem=OpenBSD -Acpu=vax -Amachine=vax"
+#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/vax/ultrix.h b/gcc/config/vax/ultrix.h
index 0be135c4c4d..f8ade575737 100644
--- a/gcc/config/vax/ultrix.h
+++ b/gcc/config/vax/ultrix.h
@@ -1,5 +1,5 @@
/* Output variables, constants and external declarations, for GNU compiler.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -18,8 +18,21 @@ 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 " -Dvax -Dunix -Dultrix -Dbsd4_2 -D__vax -D__unix -D__ultrix -D__bsd4_2 -Asystem=unix -Asystem=bsd -Acpu=vax -Amachine=vax"
+
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define_std ("unix"); \
+ builtin_define_std ("ultrix"); \
+ builtin_define_std ("bsd4_2"); \
+ builtin_assert ("system=unix"); \
+ builtin_assert ("system=bsd"); \
+ \
+ builtin_define_std ("vax"); \
+ if (TARGET_G_FLOAT) \
+ builtin_define_std ("GFLOAT"); \
+ } \
+ while (0)
/* These are as defined in /usr/include/sys/stdtypes.h.
These values are for ultrix 4.2 on the VAX. */
diff --git a/gcc/config/vax/vax.h b/gcc/config/vax/vax.h
index 1194b8d42ec..c6b377ee5bf 100644
--- a/gcc/config/vax/vax.h
+++ b/gcc/config/vax/vax.h
@@ -19,20 +19,28 @@ 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 VMS_TARGET 0
-/* Names to predefine in the preprocessor for this target machine. */
+/* Target CPU builtins. */
+#define TARGET_CPU_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__vax__"); \
+ builtin_assert ("cpu=vax"); \
+ builtin_assert ("machine=vax"); \
+ if (TARGET_G_FLOAT) \
+ { \
+ builtin_define ("__GFLOAT"); \
+ builtin_define ("__GFLOAT__"); \
+ } \
+ } \
+ while (0)
-#define CPP_PREDEFINES "-Dvax -D__vax__ -Dunix -Asystem=unix -Asystem=bsd -Acpu=vax -Amachine=vax"
+#define VMS_TARGET 0
/* Use -J option for long branch support with Unix assembler. */
#define ASM_SPEC "-J"
-/* If using g-format floating point, alter math.h. */
-
-#define CPP_SPEC "%{mg:%{!ansi:-DGFLOAT} -D__GFLOAT}"
-
/* Choose proper libraries depending on float format.
Note that there are no profiling libraries for g-format.
Also use -lg for the sake of dbx. */
diff --git a/gcc/config/vax/vaxv.h b/gcc/config/vax/vaxv.h
index 72c09fe8734..a86615277ea 100644
--- a/gcc/config/vax/vaxv.h
+++ b/gcc/config/vax/vaxv.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. VAX sysV version.
- Copyright (C) 1988, 1993, 1996, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1993, 1996, 2000, 2002 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -22,8 +22,17 @@ Boston, MA 02111-1307, USA. */
#define SCCS_DIRECTIVE
-#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dvax -Dunix -Asystem=unix -Asystem=svr3 -Acpu=vax -Amachine=vax"
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define_std ("unix"); \
+ builtin_assert ("system=svr3"); \
+ \
+ builtin_define_std ("vax"); \
+ if (TARGET_G_FLOAT) \
+ builtin_define_std ("GFLOAT"); \
+ } \
+ while (0)
/* Output #ident as a .ident. */
diff --git a/gcc/config/vax/vms.h b/gcc/config/vax/vms.h
index 15716a687bc..943882975d5 100644
--- a/gcc/config/vax/vms.h
+++ b/gcc/config/vax/vms.h
@@ -35,17 +35,23 @@ Boston, MA 02111-1307, USA. */
#define VMS_TARGET 1
#undef LIB_SPEC
-#undef CPP_PREDEFINES
#undef TARGET_NAME
#undef TARGET_DEFAULT
#undef CALL_USED_REGISTERS
#undef STARTING_FRAME_OFFSET
-/* Predefine this in CPP because VMS limits the size of command options
- and GNU CPP is not used on VMS except with GNU C. */
-#define CPP_PREDEFINES \
-"-Dvax -Dvms -DVMS -D__vax__ -D__vms__ -D__VMS__\
- -D__GNUC__=2 -D__GNUC_MINOR__=7 -Asystem=vms -Acpu=vax -Amachine=vax"
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define_std ("vms"); \
+ builtin_define_std ("VMS"); \
+ builtin_assert ("system=vms"); \
+ \
+ builtin_define_std ("vax"); \
+ if (TARGET_G_FLOAT) \
+ builtin_define_std ("GFLOAT"); \
+ } \
+ while (0)
/* These match the definitions used in VAXCRTL, the VMS C run-time library */