summaryrefslogtreecommitdiff
path: root/lib/csu/c++
diff options
context:
space:
mode:
authorPer Fogelstrom <pefo@cvs.openbsd.org>1998-09-15 11:01:52 +0000
committerPer Fogelstrom <pefo@cvs.openbsd.org>1998-09-15 11:01:52 +0000
commita2575690cf0b8e9075efc784f8b5914744aaf483 (patch)
tree2e2cce9e06e9686235ae1fe85ad9801ce0318808 /lib/csu/c++
parent501ab940284a1d26dbc73f2cb404c266f2483052 (diff)
If something is a.out dependent... don't use if in elf ports...
Diffstat (limited to 'lib/csu/c++')
-rw-r--r--lib/csu/c++/Makefile3
-rw-r--r--lib/csu/c++/c++rt0.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/csu/c++/Makefile b/lib/csu/c++/Makefile
index 4960c6b767d..36b5dbdb07e 100644
--- a/lib/csu/c++/Makefile
+++ b/lib/csu/c++/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.5 1997/10/07 22:38:31 niklas Exp $
+# $OpenBSD: Makefile,v 1.6 1998/09/15 11:01:51 pefo Exp $
.include <bsd.own.mk>
@@ -6,6 +6,7 @@ CFLAGS+= -DLIBC_SCCS
.if !defined(NOPIC)
CFLAGS+= -fpic
.endif
+
OBJS= c++rt0.o
all: ${OBJS}
diff --git a/lib/csu/c++/c++rt0.c b/lib/csu/c++/c++rt0.c
index 8c21e4029ee..7c407785146 100644
--- a/lib/csu/c++/c++rt0.c
+++ b/lib/csu/c++/c++rt0.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: c++rt0.c,v 1.4 1998/02/09 19:28:36 niklas Exp $ */
+/* $OpenBSD: c++rt0.c,v 1.5 1998/09/15 11:01:51 pefo Exp $ */
/* $NetBSD: c++rt0.c,v 1.6 1997/12/29 15:36:50 pk Exp $ */
/*
@@ -40,7 +40,9 @@
* The tables are also null-terminated.
*/
#include <stdlib.h>
+#include <sys/exec.h>
+#if !defined(NATIVE_EXEC_ELF)
/*
* We make the __{C,D}TOR_LIST__ symbols appear as type `SETD' and
* include a dummy local function in the set. This keeps references
@@ -51,6 +53,7 @@ static void dummy __P((void)) { return; }
/* Note: this is "a.out" dependent. */
__asm(".stabs \"___CTOR_LIST__\",22,0,0,_dummy");
__asm(".stabs \"___DTOR_LIST__\",22,0,0,_dummy");
+#endif
extern void (*__CTOR_LIST__[]) __P((void));
extern void (*__DTOR_LIST__[]) __P((void));