diff options
author | 2013-04-02 07:15:02 +0000 | |
---|---|---|
committer | 2013-04-02 07:15:02 +0000 | |
commit | be93bc323d3966d78e16386f4be4f39486b50064 (patch) | |
tree | 11d80a868166924cce8ed380bfe0d97a597eff54 | |
parent | sync (diff) | |
download | wireguard-openbsd-be93bc323d3966d78e16386f4be4f39486b50064.tar.xz wireguard-openbsd-be93bc323d3966d78e16386f4be4f39486b50064.zip |
Let this work on gcc < 4, which don't accept /dev/null as a valid input file.
-rw-r--r-- | regress/libexec/ld.so/df_1_noopen/Makefile | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/regress/libexec/ld.so/df_1_noopen/Makefile b/regress/libexec/ld.so/df_1_noopen/Makefile index 56118324b93..b59bb852fde 100644 --- a/regress/libexec/ld.so/df_1_noopen/Makefile +++ b/regress/libexec/ld.so/df_1_noopen/Makefile @@ -1,19 +1,39 @@ -# $OpenBSD: Makefile,v 1.2 2013/01/23 19:46:09 miod Exp $ +# $OpenBSD: Makefile,v 1.3 2013/04/02 07:15:02 miod Exp $ + +.include <bsd.own.mk> REGRESS_TARGETS = test +.include <bsd.regress.mk> + +.if ${COMPILER_VERSION} == "gcc4" +EMPTYFILE= /dev/null +LIB_DEPENDS= +.else +EMPTYFILE= emptyfile +CLEANFILES+= ${EMPTYFILE} +LIB_DEPENDS= ${EMPTYFILE} + +# gcc3 will error with "file not recognized: File truncated" if the input file +# is not at least four bytes long! +${EMPTYFILE}: + printf "\n\n\n\n" > $@ +.endif + +CLEANFILES+=lib1.so lib2.so lib3.so dlopen dlopen1 dlopen2 dlopen3 + .PHONY: test test: lib1.so lib2.so lib3.so dlopen dlopen1 dlopen2 dlopen3 - ./test.sh + ${.CURDIR}/test.sh -lib1.so: - cc -o lib1.so /dev/null -fPIC -shared -Wl,-znodlopen +lib1.so: ${LIB_DEPENDS} + cc -o lib1.so ${EMPTYFILE} -fPIC -shared -Wl,-znodlopen -lib2.so: - cc -o lib2.so /dev/null -fPIC -shared -L. -l1 +lib2.so: ${LIB_DEPENDS} + cc -o lib2.so ${EMPTYFILE} -fPIC -shared -L. -l1 -lib3.so: - cc -o lib3.so /dev/null -fPIC -shared -L. -l2 +lib3.so: ${LIB_DEPENDS} + cc -o lib3.so ${EMPTYFILE} -fPIC -shared -L. -l2 dlopen: dlopen.c cc -o dlopen ${.CURDIR}/dlopen.c @@ -26,5 +46,3 @@ dlopen2: dlopen.c dlopen3: dlopen.c cc -o dlopen3 ${.CURDIR}/dlopen.c -L. -l3 - -.include <bsd.regress.mk> |