diff options
author | itohy <itohy@pkgsrc.org> | 2003-09-14 07:38:12 +0000 |
---|---|---|
committer | itohy <itohy@pkgsrc.org> | 2003-09-14 07:38:12 +0000 |
commit | 6296166f8ed07c8ef4061474c1909e3952bea09d (patch) | |
tree | fda5fe6f60034c9f617d4a89007a4af86a3ee79c /pkgtools | |
parent | ef72c2b1c7c7d7f3e40c5831fd29e5c3a06c3606 (diff) | |
download | pkgsrc-6296166f8ed07c8ef4061474c1909e3952bea09d.tar.gz |
Add dummy object not to become totally empty
(a.out ld will fail on an empty library).
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/libnbcompat/files/Makefile.in | 10 | ||||
-rw-r--r-- | pkgtools/libnbcompat/files/dummy.c | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/pkgtools/libnbcompat/files/Makefile.in b/pkgtools/libnbcompat/files/Makefile.in index 220e750c137..39b9699440b 100644 --- a/pkgtools/libnbcompat/files/Makefile.in +++ b/pkgtools/libnbcompat/files/Makefile.in @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.in,v 1.18 2003/09/13 17:07:47 jlam Exp $ +# $NetBSD: Makefile.in,v 1.19 2003/09/14 07:38:12 itohy Exp $ # srcdir= @srcdir@ @@ -36,8 +36,12 @@ all: nbcompat/nbtypes.h nbcompat/nbconfig.h $(LIB) .c.o: nbcompat/nbtypes.h $(COMPILE) $(DEFS) -c $< -$(LIB): $(OBJS) - $(AR) cr $@ $(OBJS) +# Add dummy.o not to become totally empty, which some ld's don't like. +$(LIB): $(OBJS) dummy.o + @set -x; case "$(OBJS)" in \ + *.*) $(AR) cr $@ $(OBJS);; \ + *) $(AR) cr $@ dummy.o;; \ + esac $(RANLIB) $@ nbcompat/nbconfig.h: nbcompat/config.h diff --git a/pkgtools/libnbcompat/files/dummy.c b/pkgtools/libnbcompat/files/dummy.c new file mode 100644 index 00000000000..dee24053621 --- /dev/null +++ b/pkgtools/libnbcompat/files/dummy.c @@ -0,0 +1,4 @@ +/* $NetBSD: dummy.c,v 1.1 2003/09/14 07:38:13 itohy Exp $ */ + +/* Written by ITOH Yasufumi in 2003. Public domain. */ +static int nbcompat_dummy; |