From owner-freebsd-audit Tue Mar 18 4: 7:50 2003 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C13237B401 for ; Tue, 18 Mar 2003 04:07:49 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1715643FA3 for ; Tue, 18 Mar 2003 04:07:48 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id XAA04086; Tue, 18 Mar 2003 23:07:27 +1100 Date: Tue, 18 Mar 2003 23:07:25 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Guido van Rooij Cc: Guy Helmer , "" Subject: Re: /bin/sh flag NO_HISTORY In-Reply-To: <20030318095509.GA70239@gvr.gvr.org> Message-ID: <20030318225521.M4509@gamplex.bde.org> References: <20030318095509.GA70239@gvr.gvr.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 18 Mar 2003, Guido van Rooij wrote: > On Mon, Mar 17, 2003 at 02:11:53PM -0600, Guy Helmer wrote: > > --- /usr/src/bin/sh/Makefile Mon Mar 17 10:38:03 2003 > > +++ Makefile Mon Mar 17 10:34:07 2003 > > @@ -14,8 +14,12 @@ > > # utilities of the same name are handled with the associated manpage, > > # builtin.1 in share/man/man1/. > > > > +.if !defined(NO_HISTORY) > > DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} > > LDADD+= -ll -ledit -ltermcap > > +.else > > +CFLAGS+=-DNO_HISTORY > > +.endif > > Could you please do this the other way around: > .if defined(NO_HISTORY) > CFLAGS+=-DNO_HISTORY > .else > DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} > LDADD+= -ll -ledit -ltermcap > .endif > > I think double negations don't add in readbility. I agree with supporting NO_HISTORY in some way and not using double negatives. However, it's not really necessary to provide a global knob for every possible -D option. I sometimes test compiling sh with -DNO_HISTORY (too see how much bloatier the library bloat has become). I just use something like "make CC='cc -DNOHISTORY'". For more global builds like picobsd it would be better to hack on COPTS and fix COPTS to work right. I think removing unused libraries from the command line has no effect, at least for static linkage, so a knob outside of CC/CFLAGS/COPTS is not needed. Removing the used library libl has the effect of breaking the build. libl has nothing to do with history. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message