summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-01-17 17:41:15 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-01-17 17:41:15 +0000
commit07aad870427e09b1a5320970648cd235915fa9b2 (patch)
tree9139171de1b115c51f3da9954d282ad4c58dc0b8 /gnu/usr.bin
parent6c04e78b05ee151f2ad6075acd2d538d92b12c8e (diff)
- add OBS_OLD_GAS to conditionalize ASM_SPEC for those archs that still
use it (so that more archs may include openbsd.h as is) - #undef CPP_PREDEFINES globally. - reorganize stuff and comments to be more precise and match gcc.info structure better. - synch other files
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/gcc/config/i386/openbsd.h4
-rw-r--r--gnu/usr.bin/gcc/config/m68k/openbsd.h2
-rw-r--r--gnu/usr.bin/gcc/config/ns32k/openbsd.h2
-rw-r--r--gnu/usr.bin/gcc/config/openbsd.h59
-rw-r--r--gnu/usr.bin/gcc/config/sparc/openbsd.h2
-rw-r--r--gnu/usr.bin/gcc/config/vax/openbsd.h2
6 files changed, 44 insertions, 27 deletions
diff --git a/gnu/usr.bin/gcc/config/i386/openbsd.h b/gnu/usr.bin/gcc/config/i386/openbsd.h
index 9f1573d01ad..6df3cd0625c 100644
--- a/gnu/usr.bin/gcc/config/i386/openbsd.h
+++ b/gnu/usr.bin/gcc/config/i386/openbsd.h
@@ -9,10 +9,10 @@
/* Get perform_* macros to build libgcc.a. */
#include <i386/perform.h>
+#define OBSD_OLD_GAS
/* Get generic OpenBSD definitions. */
#include <openbsd.h>
-#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dunix -Di386 -D__OpenBSD__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(i386) -Amachine(i386)"
#undef SIZE_TYPE
@@ -30,7 +30,7 @@
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
-/* $OpenBSD: openbsd.h,v 1.5 1997/03/28 20:47:21 deraadt Exp $ */
+/* $OpenBSD: openbsd.h,v 1.6 1999/01/17 17:41:13 espie Exp $ */
/* There are conflicting reports about whether this system uses
a different assembler syntax. wilson@cygnus.com says # is right. */
diff --git a/gnu/usr.bin/gcc/config/m68k/openbsd.h b/gnu/usr.bin/gcc/config/m68k/openbsd.h
index 207ec321796..c74d07d5ec0 100644
--- a/gnu/usr.bin/gcc/config/m68k/openbsd.h
+++ b/gnu/usr.bin/gcc/config/m68k/openbsd.h
@@ -2,6 +2,7 @@
/* Get generic OpenBSD definitions. */
+#define OBSD_OLD_GAS
#include <openbsd.h>
@@ -12,7 +13,6 @@
/* 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. */
diff --git a/gnu/usr.bin/gcc/config/ns32k/openbsd.h b/gnu/usr.bin/gcc/config/ns32k/openbsd.h
index 4d1b25589a9..6133f13df07 100644
--- a/gnu/usr.bin/gcc/config/ns32k/openbsd.h
+++ b/gnu/usr.bin/gcc/config/ns32k/openbsd.h
@@ -62,12 +62,12 @@ Boston, MA 02111-1307, USA.
#define MOVD_FLOAT_OK
+#define OBSD_OLD_GAS
/* 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__ -Dpc532 -D__ns32k__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(ns32k) -Amachine(ns32k)"
/* Make gcc agree with <machine/ansi.h> */
diff --git a/gnu/usr.bin/gcc/config/openbsd.h b/gnu/usr.bin/gcc/config/openbsd.h
index 5a56c4f97b3..9179106c368 100644
--- a/gnu/usr.bin/gcc/config/openbsd.h
+++ b/gnu/usr.bin/gcc/config/openbsd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: openbsd.h,v 1.13 1999/01/13 00:27:52 espie Exp $ */
+/* $OpenBSD: openbsd.h,v 1.14 1999/01/17 17:41:13 espie Exp $ */
/* OPENBSD_NATIVE is defined when gcc is integrated into the OpenBSD
source tree so it can be configured appropriately when using the
@@ -32,52 +32,69 @@
#endif
-/* We want gcc.c to call mkstemp() for each file it generates. */
-/* (patched with code from egcs) */
-#define MKTEMP_EACH_FILE
-/* CPP_SPEC appropriate for OpenBSD. We only deal with -posix
- and -pthread */
+/* Controlling the compilation driver
+ * ---------------------------------- */
+/* CPP_SPEC appropriate for OpenBSD. We deal with -posix and -pthread */
#undef CPP_SPEC
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
-/* ASM_SPEC appropriate for OpenBSD. We only deal
- with the options for generating PIC code. */
+#ifdef OBSD_OLD_GAS
+/* ASM_SPEC appropriate for OpenBSD. For some architectures, OpenBSD
+ still uses a special flavor of gas that needs to be told when generating
+ pic code. */
#undef ASM_SPEC
-#define ASM_SPEC " %| %{fpic:-k} %{fPIC:-k -K}"
+#define ASM_SPEC "%{fpic:-k} %{fPIC:-k -K} %|"
+#else
+/* Since we use gas, stdin -> - is a good idea, but we don't want to
+ override native specs just for that. */
+#ifndef ASM_SPEC
+#define ASM_SPEC "%|"
+#endif
+#endif
-/* LIB_SPEC appropriate for OpenBSD. Select the appropriate
- libc, depending on profiling and threads.
- Basically, -lc(_r)?(_p)?, select _r for threads, _p for p or pg
+/* LIB_SPEC appropriate for OpenBSD. Select the appropriate libc,
+ depending on profiling and threads.
+ Basically, -lc(_r)?(_p)?, select _r for threads, and _p for p or pg
*/
-
#undef LIB_SPEC
-/* #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" */
#define LIB_SPEC "-lc%{pthread:_r}%{p:_p}%{!p:%{pg:_p}}"
-/* LINK_SPEC appropriate for OpenBSD. Support
- for GCC options -static, -assert, and -nostdlib. */
-
+/* LINK_SPEC appropriate for OpenBSD. Support for GCC options
+ -static, -assert, and -nostdlib. */
#undef LINK_SPEC
#define LINK_SPEC \
"%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{R*} %{static:-Bstatic} %{assert*}"
-/* This defines which switch letters take arguments. */
+/* Add the -R arg switch, needed for dynamic library support. */
#undef SWITCH_TAKES_ARG
#define SWITCH_TAKES_ARG(CHAR) \
(DEFAULT_SWITCH_TAKES_ARG(CHAR) \
|| (CHAR) == 'R')
-/* We have atexit(3). */
+/* Runtime target specification
+ * ---------------------------- */
-#define HAVE_ATEXIT
+/* You must redefine CPP_PREDEFINES in any arch specific file. */
+#undef CPP_PREDEFINES
-/* Implicit library calls should use memcpy, not bcopy, etc. */
+/* we want gcc.c to call mkstemps for each file it generates
+ (fix taken from egcs-current). */
+#define MKTEMP_EACH_FILE
+/* Implicit calls to library routines
+ * ---------------------------------- */
+/* Use memcpy and memset instead of bcopy and bzero for implicit library
+ calls. */
#define TARGET_MEM_FUNCTIONS
+/* Miscellaneous parameters
+ * ------------------------ */
+/* tell libgcc2.c that OpenBSD targets support atexit */
+#define HAVE_ATEXIT
+
/*
* Some imports from svr4.h in support of shared libraries.
diff --git a/gnu/usr.bin/gcc/config/sparc/openbsd.h b/gnu/usr.bin/gcc/config/sparc/openbsd.h
index 1caac2b7679..3fe4ea6ea1b 100644
--- a/gnu/usr.bin/gcc/config/sparc/openbsd.h
+++ b/gnu/usr.bin/gcc/config/sparc/openbsd.h
@@ -2,11 +2,11 @@
/* Get generic OpenBSD definitions. */
+#define OBSD_OLD_GAS
#include <openbsd.h>
/* Names to predefine in the preprocessor for this target machine. */
-#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dunix -Dsparc -D__OpenBSD__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(sparc) -Amachine(sparc)"
/* Make gcc agree with <machine/ansi.h> */
diff --git a/gnu/usr.bin/gcc/config/vax/openbsd.h b/gnu/usr.bin/gcc/config/vax/openbsd.h
index b6c25b4cda2..d9c3541ac18 100644
--- a/gnu/usr.bin/gcc/config/vax/openbsd.h
+++ b/gnu/usr.bin/gcc/config/vax/openbsd.h
@@ -1,7 +1,7 @@
#include <vax/vax.h>
+#define OBSD_OLD_GAS
#include <openbsd.h>
-#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dunix -Dvax -D__OpenBSD__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(vax) -Amachine(vax)"
/* Make gcc agree with <machine/ansi.h> */