Subject: misc/1546: Bug in /usr/share/mk/bsd.lib.mk when compiling *.cc to *.o
To: None <gnats-bugs@gnats.netbsd.org>
From: None <cracauer@wavehh.hanse.de>
List: netbsd-bugs
Date: 09/29/1995 13:23:18
>Number: 1546
>Category: misc
>Synopsis: Missing ".o" in line 46 of /usr/share/mk/bsd.lib.mk
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: misc-bug-people (Misc Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Sep 29 15:50:04 1995
>Last-Modified:
>Originator: Martin Cracauer
>Organization:
private
>Release: sup 19950927
>Environment:
System: NetBSD knight.wavedata.de 1.0A NetBSD 1.0A (KNIGHT) #0: Thu Sep 28 14:53:29 MET 1995 cracauer@knight.wavedata.de:/usr/src/sys/arch/i386/compile/KNIGHT i386
>Description:
When compiling g++ libraries, the sequence
$ g++ -c tagrget.cc -o target.o.o
$ ld -x -r target.o.o -o target.o
fails because the rule states
@${LD} -x -r ${.TARGET} -o ${.TARGET}
instead of
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
which evaluates to:
$ g++ -c tagrget.cc -o target.o.o
$ ld -x -r target.o -o target.o
>How-To-Repeat:
cd /usr/src/gnu/lib/libg++/libg++
make
cd /usr/src/gnu/usr.bin/groff
make
>Fix:
For /usr/share/mk/bsd.lib.mk
37c37
< @${LD} -x -r ${.TARGET} -o ${.TARGET}
---
> @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
>Audit-Trail:
>Unformatted: