From 6296166f8ed07c8ef4061474c1909e3952bea09d Mon Sep 17 00:00:00 2001 From: itohy Date: Sun, 14 Sep 2003 07:38:12 +0000 Subject: Add dummy object not to become totally empty (a.out ld will fail on an empty library). --- pkgtools/libnbcompat/files/Makefile.in | 10 +++++++--- pkgtools/libnbcompat/files/dummy.c | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 pkgtools/libnbcompat/files/dummy.c (limited to 'pkgtools') 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; -- cgit v1.2.3