summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoritohy <itohy@pkgsrc.org>2003-09-14 07:38:12 +0000
committeritohy <itohy@pkgsrc.org>2003-09-14 07:38:12 +0000
commit64a7e7b0bd8c35cee59e3dd17c2c38534af3d6bc (patch)
treefda5fe6f60034c9f617d4a89007a4af86a3ee79c
parent002e48eee1f6b0fc5a1ee8bb9481ec5cd9f492cc (diff)
downloadpkgsrc-64a7e7b0bd8c35cee59e3dd17c2c38534af3d6bc.tar.gz
Add dummy object not to become totally empty
(a.out ld will fail on an empty library).
-rw-r--r--pkgtools/libnbcompat/files/Makefile.in10
-rw-r--r--pkgtools/libnbcompat/files/dummy.c4
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;