Subject: Re: bin/1528: builds foo.o.o for libc ?
To: None <netbsd-bugs@NetBSD.ORG>
From: Christos Zoulas <>
List: netbsd-bugs
Date: 09/27/1995 12:59:04
In article <199509270848.BAA00633@Reno.Stanford.EDU> jonathan@DSG.Stanford.EDU writes:
>>Number:         1528
>>Category:       bin
>>Synopsis: builds foo.o.o for libc ?
>>Confidential:   no
>>Severity:       non-critical
>>Priority:       medium
>>Responsible:    bin-bug-people (Utility Bug People)
>>State:          open
>>Class:          support
>>Submitter-Id:   net
>>Arrival-Date:   Wed Sep 27 05:05:02 1995
>>Originator:     Jonathan Stone
>	Stanford Distributed Systems Group
>>Release:        NetBSD-current supp'ed at 1:40am 27 Sept 1995 PST
>System: NetBSD Reno.Stanford.EDU 1.0A NetBSD 1.0A (NEWCONF) #596: Tue Sep 26 17:27:54 PDT 1995 jonathan@Reno.Stanford.EDU:/usr/src/sys/arch/pmax/compile/NEWCONF pmax
>	`make -n libc.a'' in src/lib/libc makes <foo>.o.o and then does ld -r
>	<foo>.o.o -o <foo>.o
>	Which may well produce the desired results, but is, to say
>	the least, disconcerting, and may be an unwanted side-effect of
>	today's fix to /usr/share/mk/
>	This may also break cross-compilation with other make variants,
>	or older versions of Berkeley make, which I think *is* a real concern.
>	``(cd /usr/src/lib/libc; make -n -k)''
>	on a suitably out-of-date libc tree.

This was the intended fix. The way it was done before, was that the LD
output was left to go to a.out and then a.out was mv'ed to the target.
This approach does not work for parallel make's where many a.outs get
created in parallel. The .o suffix was chosen, because many c compilers
do not allow you to specify -o to a file without a .o suffix. So yes,
this works on all systems I've tried so far. The way the rules were
done before [cc -c foo.c -o foo.{so,po}] did not work at least in one
popular unix variant...