summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-23 06:44:41 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-23 06:44:41 +0000
commited2a572bfc2352433847f82bee9f3d73f4cdd771 (patch)
treebcf5ab5f943c135a0b5441f58aa5086668eb9211
parent383723742c7c0db962ff099594744e1cf6ed8932 (diff)
add configurations for all the other platforms
-rw-r--r--gnu/usr.bin/gcc/config.guess24
-rw-r--r--gnu/usr.bin/gcc/config/m68k/openbsd.h63
-rw-r--r--gnu/usr.bin/gcc/config/m68k/xm-openbsd.h4
-rw-r--r--gnu/usr.bin/gcc/config/mips/openbsd.h231
-rw-r--r--gnu/usr.bin/gcc/config/mips/xm-openbsd.h2
-rw-r--r--gnu/usr.bin/gcc/config/ns32k/openbsd.h112
-rw-r--r--gnu/usr.bin/gcc/config/ns32k/xm-openbsd.h10
-rw-r--r--gnu/usr.bin/gcc/config/sparc/openbsd.h45
-rw-r--r--gnu/usr.bin/gcc/config/sparc/xm-openbsd.h4
-rw-r--r--gnu/usr.bin/gcc/config/vax/openbsd.h22
-rw-r--r--gnu/usr.bin/gcc/config/vax/xm-openbsd.h2
-rw-r--r--gnu/usr.bin/gcc/configure41
12 files changed, 560 insertions, 0 deletions
diff --git a/gnu/usr.bin/gcc/config.guess b/gnu/usr.bin/gcc/config.guess
index 87c47aa6868..4dbead5429c 100644
--- a/gnu/usr.bin/gcc/config.guess
+++ b/gnu/usr.bin/gcc/config.guess
@@ -65,6 +65,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
amiga:NetBSD:*:*)
echo m68k-cbm-netbsd${UNAME_RELEASE}
exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-cbm-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-motorola-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-motorola-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arm32:OpenBSD:*:*)
+ echo arm-arm-openbsd${UNAME_RELEASE}
+ exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
@@ -102,12 +114,21 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
atari*:NetBSD:*:*)
echo m68k-atari-netbsd${UNAME_RELEASE}
exit 0 ;;
+ atari*:OpenBSD:*:*)
+ echo m68k-atari-openbsd${UNAME_RELEASE}
+ exit 0 ;;
sun3*:NetBSD:*:*)
echo m68k-sun-netbsd${UNAME_RELEASE}
exit 0 ;;
+ sun3*:OpenBSD:*:*)
+ echo m68k-sun-openbsd${UNAME_RELEASE}
+ exit 0 ;;
mac68k:NetBSD:*:*)
echo m68k-apple-netbsd${UNAME_RELEASE}
exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-apple-openbsd${UNAME_RELEASE}
+ exit 0 ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
@@ -303,6 +324,9 @@ EOF
hp3[0-9][05]:NetBSD:*:*)
echo m68k-hp-netbsd${UNAME_RELEASE}
exit 0 ;;
+ hp3[0-9][05]:OpenBSD:*:*)
+ echo m68k-hp-openbsd${UNAME_RELEASE}
+ exit 0 ;;
i[34]86:BSD/386:*:* | *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
diff --git a/gnu/usr.bin/gcc/config/m68k/openbsd.h b/gnu/usr.bin/gcc/config/m68k/openbsd.h
new file mode 100644
index 00000000000..ddcf22a6a3c
--- /dev/null
+++ b/gnu/usr.bin/gcc/config/m68k/openbsd.h
@@ -0,0 +1,63 @@
+#include <m68k/m68k.h>
+
+/* Get generic OpenBSD definitions. */
+
+#include <openbsd.h>
+
+
+/* See m68k.h. 7 means 68020 with 68881. */
+
+#define TARGET_DEFAULT 7
+
+/* 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}"
+
+/* Names to predefine in the preprocessor for this target machine. */
+
+#define CPP_PREDEFINES "-Dunix -Dm68k -Dmc68000 -Dmc68020 -D__OpenBSD__ -D__NetBSD__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(m68k) -Amachine(m68k)"
+
+/* Make gcc agree with <machine/ansi.h> */
+
+#undef SIZE_TYPE
+#define SIZE_TYPE "unsigned int"
+
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE "int"
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "int"
+
+#undef WCHAR_UNSIGNED
+#define WCHAR_UNSIGNED 0
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
+
+/* Every structure or union's size must be a multiple of 2 bytes. */
+
+#define STRUCTURE_SIZE_BOUNDARY 16
+
+/* This is BSD, so it wants DBX format. */
+
+#define DBX_DEBUGGING_INFO
+
+/* Do not break .stabs pseudos into continuations. */
+
+#define DBX_CONTIN_LENGTH 0
+
+/* This is the char to use for continuation (in case we need to turn
+ continuation back on). */
+
+#define DBX_CONTIN_CHAR '?'
+
+/* Don't use the `xsfoo;' construct in DBX output; this system
+ doesn't support it. */
+
+#define DBX_NO_XREFS
+
+/* Don't default to pcc-struct-return, because gcc is the only compiler, and
+ we want to retain compatibility with older gcc versions. */
+#define DEFAULT_PCC_STRUCT_RETURN 0
diff --git a/gnu/usr.bin/gcc/config/m68k/xm-openbsd.h b/gnu/usr.bin/gcc/config/m68k/xm-openbsd.h
new file mode 100644
index 00000000000..968dbf16982
--- /dev/null
+++ b/gnu/usr.bin/gcc/config/m68k/xm-openbsd.h
@@ -0,0 +1,4 @@
+/* Configuration for GCC for Motorola 68k running OpenBSD as host. */
+
+#include <m68k/xm-m68k.h>
+#include <xm-openbsd.h>
diff --git a/gnu/usr.bin/gcc/config/mips/openbsd.h b/gnu/usr.bin/gcc/config/mips/openbsd.h
new file mode 100644
index 00000000000..d4e9f340423
--- /dev/null
+++ b/gnu/usr.bin/gcc/config/mips/openbsd.h
@@ -0,0 +1,231 @@
+/* Definitions for DECstation running BSD as target machine for GNU compiler.
+ Copyright (C) 1993, 1995 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 DECSTATION
+
+/* Look for the include files in the system-defined places. */
+
+#ifndef CROSS_COMPILE
+#undef GPLUSPLUS_INCLUDE_DIR
+#define GPLUSPLUS_INCLUDE_DIR "/usr/include/g++"
+
+#undef GCC_INCLUDE_DIR
+#define GCC_INCLUDE_DIR "/usr/include"
+
+#undef INCLUDE_DEFAULTS
+#define INCLUDE_DEFAULTS \
+ { \
+ { GPLUSPLUS_INCLUDE_DIR, 1, 1 }, \
+ { GCC_INCLUDE_DIR, 0, 0 }, \
+ { 0, 0, 0 } \
+ }
+
+/* Under OpenBSD, the normal location of the various *crt*.o files is the
+ /usr/lib directory. */
+
+#undef STANDARD_STARTFILE_PREFIX
+#define STANDARD_STARTFILE_PREFIX "/usr/lib/"
+#endif
+
+/* Provide a LINK_SPEC appropriate for OpentBSD. Here we provide support
+ for the special GCC options -static, -assert, and -nostdlib. */
+
+#undef LINK_SPEC
+#define LINK_SPEC \
+ "%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
+ %{!nostdlib:%{!r*:%{!e*:-e __start}}} -dc -dp %{static:-Bstatic} %{assert*}"
+
+/* We have atexit(3). */
+
+#define HAVE_ATEXIT
+
+/* Implicit library calls should use memcpy, not bcopy, etc. */
+
+#define TARGET_MEM_FUNCTIONS
+
+/* Define mips-specific openbsd predefines... */
+#ifndef CPP_PREDEFINES
+#define CPP_PREDEFINES "-D__ANSI_COMPAT \
+-DMIPSEL -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__OpenBSD__ -D__NetBSD__ -Dmips \
+-D__NO_LEADING_UNDERSCORES__ -D__GP_SUPPORT__ \
+-Dunix -D_R3000 \
+-Asystem(unix) -Asystem(OpenBSD) -Amachine(mips)"
+#endif
+
+/* Always uses gas. */
+#ifndef ASM_SPEC
+#define ASM_SPEC "\
+%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{v} \
+%{noasmopt:-O0} \
+%{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}} \
+%{g} %{g0} %{g1} %{g2} %{g3} \
+%{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \
+%{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \
+%{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \
+%{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3}"
+#endif
+
+#ifndef CPP_SPEC
+#define CPP_SPEC "\
+%{posix:-D_POSIX_SOURCE} \
+%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
+%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
+%{mips3:-U__mips -D__mips=3 -D__mips64} \
+%{mgp32:-U__mips64} %{mgp64:-D__mips64}"
+#endif
+
+#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
+#define STARTFILE_SPEC ""
+
+#ifndef MACHINE_TYPE
+#define MACHINE_TYPE "OpenBSD/pmax"
+#endif
+
+#define TARGET_DEFAULT MASK_GAS
+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+
+#define LOCAL_LABEL_PREFIX "."
+
+#include "mips/mips.h"
+
+/*
+ * Some imports from svr4.h in support of shared libraries.
+ * Currently, we need the DECLARE_OBJECT_SIZE stuff.
+ */
+
+/* Define the strings used for the special svr4 .type and .size directives.
+ These strings generally do not vary from one system running svr4 to
+ another, but if a given system (e.g. m88k running svr) needs to use
+ different pseudo-op names for these, they may be overridden in the
+ file which includes this one. */
+
+#undef TYPE_ASM_OP
+#undef SIZE_ASM_OP
+#undef WEAK_ASM_OP
+#define TYPE_ASM_OP ".type"
+#define SIZE_ASM_OP ".size"
+#define WEAK_ASM_OP ".weak"
+
+/* The following macro defines the format used to output the second
+ operand of the .type assembler directive. Different svr4 assemblers
+ expect various different forms for this operand. The one given here
+ is just a default. You may need to override it in your machine-
+ specific tm.h file (depending upon the particulars of your assembler). */
+
+#undef TYPE_OPERAND_FMT
+#define TYPE_OPERAND_FMT "@%s"
+
+/* Write the extra assembler code needed to declare a function's result.
+ Most svr4 assemblers don't require any special declaration of the
+ result value, but there are exceptions. */
+
+#ifndef ASM_DECLARE_RESULT
+#define ASM_DECLARE_RESULT(FILE, RESULT)
+#endif
+
+/* These macros generate the special .type and .size directives which
+ are used to set the corresponding fields of the linker symbol table
+ entries in an ELF object file under SVR4. These macros also output
+ the starting labels for the relevant functions/objects. */
+
+/* Write the extra assembler code needed to declare a function properly.
+ Some svr4 assemblers need to also have something extra said about the
+ function's return value. We allow for that here. */
+
+#undef ASM_DECLARE_FUNCTION_NAME
+#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
+ do { \
+ fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
+ assemble_name (FILE, NAME); \
+ putc (',', FILE); \
+ fprintf (FILE, TYPE_OPERAND_FMT, "function"); \
+ putc ('\n', FILE); \
+ ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
+ } while (0)
+
+/* Write the extra assembler code needed to declare an object properly. */
+
+#undef ASM_DECLARE_OBJECT_NAME
+#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
+ do { \
+ fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
+ assemble_name (FILE, NAME); \
+ putc (',', FILE); \
+ fprintf (FILE, TYPE_OPERAND_FMT, "object"); \
+ putc ('\n', FILE); \
+ size_directive_output = 0; \
+ if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
+ { \
+ size_directive_output = 1; \
+ fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
+ assemble_name (FILE, NAME); \
+ fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
+ } \
+ ASM_OUTPUT_LABEL(FILE, NAME); \
+ } while (0)
+
+/* Output the size directive for a decl in rest_of_decl_compilation
+ in the case where we did not do so before the initializer.
+ Once we find the error_mark_node, we know that the value of
+ size_directive_output was set
+ by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
+
+#undef ASM_FINISH_DECLARE_OBJECT
+#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
+do { \
+ char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
+ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
+ && ! AT_END && TOP_LEVEL \
+ && DECL_INITIAL (DECL) == error_mark_node \
+ && !size_directive_output) \
+ { \
+ size_directive_output = 1; \
+ fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
+ assemble_name (FILE, name); \
+ fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
+ } \
+ } while (0)
+
+/* This is how to declare the size of a function. */
+
+#undef ASM_DECLARE_FUNCTION_SIZE
+#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
+ do { \
+ if (!flag_inhibit_size_directive) \
+ { \
+ char label[256]; \
+ static int labelno; \
+ labelno++; \
+ ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \
+ ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \
+ fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
+ assemble_name (FILE, (FNAME)); \
+ fprintf (FILE, ","); \
+ assemble_name (FILE, label); \
+ fprintf (FILE, "-"); \
+ assemble_name (FILE, (FNAME)); \
+ putc ('\n', FILE); \
+ } \
+ } while (0)
+
+/* Since gas and gld are standard on OpenBSD, we don't need these */
+#undef ASM_FINAL_SPEC
+#undef STARTFILE_SPEC
+
diff --git a/gnu/usr.bin/gcc/config/mips/xm-openbsd.h b/gnu/usr.bin/gcc/config/mips/xm-openbsd.h
new file mode 100644
index 00000000000..5f791bc287e
--- /dev/null
+++ b/gnu/usr.bin/gcc/config/mips/xm-openbsd.h
@@ -0,0 +1,2 @@
+#include "mips/xm-mips.h"
+#include "config/xm-openbsd.h"
diff --git a/gnu/usr.bin/gcc/config/ns32k/openbsd.h b/gnu/usr.bin/gcc/config/ns32k/openbsd.h
new file mode 100644
index 00000000000..ba21f05188e
--- /dev/null
+++ b/gnu/usr.bin/gcc/config/ns32k/openbsd.h
@@ -0,0 +1,112 @@
+/* Configuration for a ns32532 running OpenBSD as the target machine.
+ Copyright (C) 1988, 1994, 1995 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.
+
+*/
+
+#include <ns32k/ns32k.h>
+
+/* Compile for the floating point unit & 32532 by default;
+ Don't assume SB is zero;
+ Don't use bitfield instructions; */
+
+#define TARGET_DEFAULT (1 + 24 + 32 + 64)
+
+/* 32-bit alignment for efficiency */
+
+#undef POINTER_BOUNDARY
+#define POINTER_BOUNDARY 32
+
+/* 32-bit alignment for efficiency */
+
+#undef FUNCTION_BOUNDARY
+#define FUNCTION_BOUNDARY 32
+
+/* 32532 spec says it can handle any alignment. Rumor from tm-ns32k.h
+ tells this might not be actually true (but it's for 32032, perhaps
+ National has fixed the bug for 32532). You might have to change this
+ if the bug still exists. */
+
+#undef STRICT_ALIGNMENT
+#define STRICT_ALIGNMENT 0
+
+/* Use pc relative addressing whenever possible,
+ it's more efficient than absolute (ns32k.c)
+ You have to fix a bug in gas 1.38.1 to make this work with gas,
+ patch available from jkp@cs.hut.fi.
+ (OpenBSD's gas version has this patch already applied) */
+
+#define PC_RELATIVE
+
+/* Operand of bsr or jsr should be just the address. */
+
+#define CALL_MEMREF_IMPLICIT
+
+/* movd insns may have floating point constant operands. */
+
+#define MOVD_FLOAT_OK
+
+/* Get generic OpenBSD definitions. */
+#include <openbsd.h>
+
+/* Names to predefine in the preprocessor for this target machine. */
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-Dunix -Dns32k -Dns32000 -Dns32532 -D__OpenBSD__ -D__NetBSD__ -Dpc532 -D__ns32k__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(ns32k) -Amachine(ns32k)"
+
+/* Make gcc agree with <machine/ansi.h> */
+
+#undef SIZE_TYPE
+#define SIZE_TYPE "unsigned int"
+
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE "int"
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "int"
+
+#undef WCHAR_UNSIGNED
+#define WCHAR_UNSIGNED 0
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
+
+/* This is BSD, so it wants DBX format. */
+
+#define DBX_DEBUGGING_INFO
+
+/* Do not break .stabs pseudos into continuations. */
+
+#define DBX_CONTIN_LENGTH 0
+
+/* This is the char to use for continuation (in case we need to turn
+ continuation back on). */
+
+#define DBX_CONTIN_CHAR '?'
+
+/* Don't use the `xsfoo;' construct in DBX output; this system
+ doesn't support it. */
+
+#define DBX_NO_XREFS
+
+/* Don't default to pcc-struct-return, because gcc is the only compiler, and
+ we want to retain compatibility with older gcc versions. */
+
+#undef PCC_STATIC_STRUCT_RETURN
+#define DEFAULT_PCC_STRUCT_RETURN 0
diff --git a/gnu/usr.bin/gcc/config/ns32k/xm-openbsd.h b/gnu/usr.bin/gcc/config/ns32k/xm-openbsd.h
new file mode 100644
index 00000000000..719cb0e8894
--- /dev/null
+++ b/gnu/usr.bin/gcc/config/ns32k/xm-openbsd.h
@@ -0,0 +1,10 @@
+/* Configuration for GCC for ns32k running OpenBSD as host. */
+
+#include <ns32k/xm-ns32k.h>
+
+/* ns32k/xm-ns32k.h defines these macros, but we don't need them */
+#undef memcmp
+#undef memcpy
+#undef memset
+
+#include <xm-openbsd.h>
diff --git a/gnu/usr.bin/gcc/config/sparc/openbsd.h b/gnu/usr.bin/gcc/config/sparc/openbsd.h
new file mode 100644
index 00000000000..7eb503e2f6e
--- /dev/null
+++ b/gnu/usr.bin/gcc/config/sparc/openbsd.h
@@ -0,0 +1,45 @@
+#include <sparc/sparc.h>
+
+/* Get generic OpenBSD definitions. */
+
+#include <openbsd.h>
+
+/* Names to predefine in the preprocessor for this target machine. */
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-Dunix -Dsparc -D__OpenBSD__ -D__NetBSD__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(sparc) -Amachine(sparc)"
+
+/* Make gcc agree with <machine/ansi.h> */
+
+#undef SIZE_TYPE
+#define SIZE_TYPE "unsigned int"
+
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE "int"
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "int"
+
+#undef WCHAR_UNSIGNED
+#define WCHAR_UNSIGNED 0
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
+
+/* This is BSD, so it wants DBX format. */
+
+#define DBX_DEBUGGING_INFO
+
+/* This is the char to use for continuation (in case we need to turn
+ continuation back on). */
+
+#define DBX_CONTIN_CHAR '?'
+
+/* Don't use the `xsfoo;' construct in DBX output; this system
+ doesn't support it. */
+
+#define DBX_NO_XREFS
+
+/* Don't default to pcc-struct-return, because gcc is the only compiler, and
+ we want to retain compatibility with older gcc versions. */
+#define DEFAULT_PCC_STRUCT_RETURN 0
diff --git a/gnu/usr.bin/gcc/config/sparc/xm-openbsd.h b/gnu/usr.bin/gcc/config/sparc/xm-openbsd.h
new file mode 100644
index 00000000000..c78cde8b5ea
--- /dev/null
+++ b/gnu/usr.bin/gcc/config/sparc/xm-openbsd.h
@@ -0,0 +1,4 @@
+/* Configuration for GCC for Sun SPARC running OpenBSD as host. */
+
+#include <sparc/xm-sparc.h>
+#include <xm-openbsd.h>
diff --git a/gnu/usr.bin/gcc/config/vax/openbsd.h b/gnu/usr.bin/gcc/config/vax/openbsd.h
new file mode 100644
index 00000000000..205dce616a0
--- /dev/null
+++ b/gnu/usr.bin/gcc/config/vax/openbsd.h
@@ -0,0 +1,22 @@
+#include <vax/vax.h>
+#include <openbsd.h>
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-Dunix -Dvax -D__OpenBSD__ -D__NetBSD__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(vax) -Amachine(vax)"
+
+/* Make gcc agree with <machine/ansi.h> */
+
+#undef SIZE_TYPE
+#define SIZE_TYPE "unsigned int"
+
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE "int"
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "int"
+
+#undef WCHAR_UNSIGNED
+#define WCHAR_UNSIGNED 0
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
diff --git a/gnu/usr.bin/gcc/config/vax/xm-openbsd.h b/gnu/usr.bin/gcc/config/vax/xm-openbsd.h
new file mode 100644
index 00000000000..3ba8f9f6f00
--- /dev/null
+++ b/gnu/usr.bin/gcc/config/vax/xm-openbsd.h
@@ -0,0 +1,2 @@
+#include <vax/xm-vax.h>
+#include <xm-openbsd.h>
diff --git a/gnu/usr.bin/gcc/configure b/gnu/usr.bin/gcc/configure
index 49b047cecda..f09505edac9 100644
--- a/gnu/usr.bin/gcc/configure
+++ b/gnu/usr.bin/gcc/configure
@@ -1519,6 +1519,15 @@ for machine in $canon_build $canon_host $canon_target; do
tmake_file=t-libc-ok
xmake_file=x-netbsd
;;
+ m68k-*-openbsd*)
+ cpu_type=m68k
+ tm_file=m68k/openbsd.h
+ xm_file=m68k/xm-openbsd.h
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ tmake_file=t-libc-ok
+ xmake_file=x-openbsd
+ ;;
m68k-*-sysv3*) # Motorola m68k's running system V.3
xm_file=m68k/xm-m68kv.h
xmake_file=m68k/x-m68kv
@@ -1781,6 +1790,14 @@ for machine in $canon_build $canon_host $canon_target; do
fixincludes=Makefile.in
prefix=$native_prefix
;;
+ mips-dec-openbsd*) # Decstation running OpenBSD
+ tm_file=mips/openbsd.h
+ xm_file=mips/xm-openbsd.h
+ xmake_file=x-openbsd
+ tmake_file=t-libc-ok
+ fixincludes=Makefile.in
+ prefix=$native_prefix
+ ;;
mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
if [ x$stabs = xyes ]; then
tm_file=mips/news4-gdb.h
@@ -2115,6 +2132,14 @@ for machine in $canon_build $canon_host $canon_target; do
fixincludes=Makefile.in
xmake_file=x-netbsd
;;
+ ns32k-pc532-openbsd*)
+ tm_file=ns32k/openbsd.h
+ xm_file=ns32k/xm-openbsd.h
+ tmake_file=t-libc-ok
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ xmake_file=x-openbsd
+ ;;
pyramid-*-*)
cpu_type=pyr
xmake_file=pyr/x-pyr
@@ -2267,6 +2292,14 @@ for machine in $canon_build $canon_host $canon_target; do
tmake_file=t-libc-ok
xmake_file=x-netbsd
;;
+ sparc-*-openbsd*)
+ tm_file=sparc/openbsd.h
+ xm_file=sparc/xm-openbsd.h
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ tmake_file=t-libc-ok
+ xmake_file=x-openbsd
+ ;;
sparc-*-bsd*)
tm_file=sparc/bsd.h
;;
@@ -2359,6 +2392,14 @@ for machine in $canon_build $canon_host $canon_target; do
fixincludes=Makefile.in
xmake_file=x-netbsd
;;
+ vax-*-openbsd*)
+ tm_file=vax/openbsd.h
+ xm_file=vax/xm-openbsd.h
+ tmake_file=t-libc-ok
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ xmake_file=x-openbsd
+ ;;
vax-*-ultrix*) # vaxen running ultrix
tm_file=vax/ultrix.h
use_collect2=yes