Subject: lib/6257: bsd.lib.mk should set target only if LIB is defined.
To: None <gnats-bugs@gnats.netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: netbsd-bugs
Date: 10/07/1998 22:51:10
>Number: 6257
>Category: lib
>Synopsis: bsd.lib.mk should set target only if LIB is defined.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: lib-bug-people (Library Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Oct 7 07:05:00 1998
>Last-Modified:
>Originator: Izumi Tsutsui
>Organization:
Izumi Tsutsui
>Release: NetBSD-current as of 98/10/4
>Environment:
System: NetBSD mirage 1.3H NetBSD 1.3H (MIRAGE) #23: Wed Oct 7 18:51:49 JST 1998 tsutsui@mirage:/usr/src/sys/arch/i386/compile/MIRAGE i386
>Description:
If LIB is not defined in Makefile, bsd.lib.mk sets some broken target.
>How-To-Repeat:
Try make in /usr/src/gnu/usr.bin/binutils/common on powerpc machines.
# make
building standard library
ar: file: No such file or directory
*** Error code 1
Stop.
#
>Fix:
Apply following patch to bsd.lib.mk:
--- /usr/src/share/mk/bsd.lib.mk Mon Sep 28 20:09:04 1998
+++ bsd.lib.mk Wed Oct 7 21:47:40 1998
@@ -170,6 +170,7 @@
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@rm -f ${.TARGET}.o
+.if defined(LIB)
.if defined(NOPIC) || (defined(LDSTATIC) && ${LDSTATIC} != "") \
|| !defined(NOLINKLIB)
_LIBS=lib${LIB}.a
@@ -190,6 +191,7 @@
.if !defined(NOLINT) && !defined(NOLINKLIB)
_LIBS+=llib-l${LIB}.ln
+.endif
.endif
all: ${SRCS} ${_LIBS}
>Audit-Trail:
>Unformatted: