summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2000-10-13 05:15:18 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2000-10-13 05:15:18 +0000
commit3ba90dff973348a866dfeb92fca31555af2401ff (patch)
tree03a7a2077f27ddb49c85561c82673c4ccc4a9a05 /libexec
parent9c38c1942a644f6c07685cd3baa240884a39bf8c (diff)
Add secondary c++ shared library for testing purposes to verify
that appropriate constructors in each library are called.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ld.so/test/B.C7
-rw-r--r--libexec/ld.so/test/Makefile14
2 files changed, 17 insertions, 4 deletions
diff --git a/libexec/ld.so/test/B.C b/libexec/ld.so/test/B.C
new file mode 100644
index 00000000000..8b60a608631
--- /dev/null
+++ b/libexec/ld.so/test/B.C
@@ -0,0 +1,7 @@
+#include "iostream.h"
+#include "a.h"
+AA e("e");;
+AA f("f");;
+/*
+AA f;
+*/
diff --git a/libexec/ld.so/test/Makefile b/libexec/ld.so/test/Makefile
index 1a04134e777..fdf5114fcc6 100644
--- a/libexec/ld.so/test/Makefile
+++ b/libexec/ld.so/test/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.2 2000/10/13 04:04:04 drahn Exp $
+# $OpenBSD: Makefile,v 1.3 2000/10/13 05:15:17 drahn Exp $
DIR=/usr/src/libexec/ld.so/obj/ld.so
.if (${MACHINE_ARCH} == "powerpc")
@@ -14,7 +14,7 @@ SRCS= ldt.c
PROG= ldt
MAN=
CLEANFILES= dltest dltest.o libfoo.so libfoo.o libbar.so libbar.o libdep.so
-CLEANFILES+= libdep.o CCtest dltest A.o tst.o libA.so
+CLEANFILES+= libdep.o CCtest dltest A.o B.o tst.o libA.so libB.so
all: dltest CCtest
@@ -36,8 +36,14 @@ A.o: A.C
libA.so: A.o
$(CC) -shared -o $@ A.o
-CCtest: libA.so tst.o
- g++ ${LDFLAGS} -o $@ tst.o -L . -lA
+B.o: B.C
+ g++ -c ${CFLAGS} ${.IMPSRC}
+
+libB.so: B.o
+ $(CC) -shared -o $@ B.o
+
+CCtest: libA.so libB.so tst.o
+ g++ ${LDFLAGS} -o $@ tst.o -L . -lB -lA
.include <bsd.prog.mk>
.include <bsd.subdir.mk>