From owner-freebsd-hackers Tue May 13 12:22:48 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA07734 for hackers-outgoing; Tue, 13 May 1997 12:22:48 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id MAA07726 for ; Tue, 13 May 1997 12:22:44 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id MAA10627; Tue, 13 May 1997 12:16:50 -0700 From: Terry Lambert Message-Id: <199705131916.MAA10627@phaeton.artisoft.com> Subject: Re: bsd.lib.mk To: James.Fenno@lodgenet.com Date: Tue, 13 May 1997 12:16:50 -0700 (MST) Cc: hackers@FreeBSD.ORG In-Reply-To: <199705131519.KAA10896@bruno.lodgenet.com> from "Jim Fenno" at May 13, 97 10:19:55 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > I have been looking at the bsd.lib.mk template and I am curious why the > compilation rules contain a CC command and a LD command. For example, > the .c.o rule is as follows: > > .c.o: > ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} > @${LD} -O ${.TARGET} -x -r ${.TARGET} > > > The man page for ld(1) says... > > -r Produce relocatable object file, suitable for another pass > through ld. > -x Discard all local symbols in the input files. > > Is there a benefit to the ld -x option? Yeah; it makes you have to update all your /usr/share/mk files and your 'ld' program, and "conveniently" suplicates functionality already present in "strip". Plus it makes you recompile 'ld' to use the stupid option that does the tmp file juggling. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.