diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-11-08 23:51:03 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-11-08 23:51:03 +0000 |
commit | d3909eb35fac8989875635a97f5549f171971037 (patch) | |
tree | 6462898d771a075ce7ceba66ba601aba1d2b007a | |
parent | b84584bddd37a76214b9123d37167b611b04d8b6 (diff) |
ld.so initfirst regress test
-rw-r--r-- | regress/libexec/ld.so/initfirst/Makefile | 5 | ||||
-rw-r--r-- | regress/libexec/ld.so/initfirst/prog1/Makefile | 30 |
2 files changed, 35 insertions, 0 deletions
diff --git a/regress/libexec/ld.so/initfirst/Makefile b/regress/libexec/ld.so/initfirst/Makefile new file mode 100644 index 00000000000..b878c98153d --- /dev/null +++ b/regress/libexec/ld.so/initfirst/Makefile @@ -0,0 +1,5 @@ +# $OpenBSD: Makefile,v 1.1 2011/11/08 23:51:02 guenther Exp $ + +SUBDIR+= libif1 libif2 libif3 libnormal prog1 + +.include <bsd.subdir.mk> diff --git a/regress/libexec/ld.so/initfirst/prog1/Makefile b/regress/libexec/ld.so/initfirst/prog1/Makefile new file mode 100644 index 00000000000..c42028b9636 --- /dev/null +++ b/regress/libexec/ld.so/initfirst/prog1/Makefile @@ -0,0 +1,30 @@ +# $OpenBSD: Makefile,v 1.1 2011/11/08 23:51:02 guenther Exp $ + +PROGS= prog1 prog2 prog3 prog4 +SRCS= main.c +OBJS= main.o +LDFLAGS+= -Wl,-E +LDFLAGS+= -Wl,-rpath,$(IF1_OBJDIR) -L$(IF1_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(IF2_OBJDIR) -L$(IF2_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(IF3_OBJDIR) -L$(IF3_OBJDIR) +LDFLAGS+= -Wl,-rpath,$(NORMAL_OBJDIR) -L$(NORMAL_OBJDIR) +LDADD_prog1+= -lnormal -lif1 -lif2 +LDADD_prog2+= -lif1 -lnormal -lif2 +LDADD_prog3+= -lif1 -lif2 -lnormal +LDADD_prog4+= -lif1 -lif2 -lif3 + +REGRESS_TARGETS=do-prog1 do-prog2 do-prog3 do-prog4 + +do-prog1: prog1 + ./prog1 | grep -v ^fini | cmp -s ${.CURDIR}/expected1 - +do-prog2: prog2 + ./prog2 | grep -v ^fini | cmp -s ${.CURDIR}/expected2 - +do-prog3: prog3 + ./prog3 | grep -v ^fini | cmp -s ${.CURDIR}/expected3 - +do-prog4: prog4 + ./prog4 | grep -v ^fini | cmp -s ${.CURDIR}/expected4 - + +.include <bsd.regress.mk> + +${PROGS}: ${LIBCRT0} ${OBJS} ${LIBC} ${CRTBEGIN} ${CRTEND} ${DPADD} + ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD_${.TARGET}} |