From owner-freebsd-audit Tue Mar 18 6:40:36 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 E5A9C37B401 for ; Tue, 18 Mar 2003 06:40:34 -0800 (PST) Received: from magellan.palisadesys.com (magellan.palisadesys.com [192.188.162.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1634043FA3 for ; Tue, 18 Mar 2003 06:40:34 -0800 (PST) (envelope-from ghelmer@palisadesys.com) Received: from mira (mira.palisadesys.com [192.188.162.116]) (authenticated bits=0) by magellan.palisadesys.com (8.12.8/8.12.8) with ESMTP id h2IEeR9S042578 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Tue, 18 Mar 2003 08:40:33 -0600 (CST) (envelope-from ghelmer@palisadesys.com) From: "Guy Helmer" To: "Bruce Evans" , "Guido van Rooij" Cc: Subject: RE: /bin/sh flag NO_HISTORY Date: Tue, 18 Mar 2003 08:40:26 -0600 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal In-Reply-To: <20030318225521.M4509@gamplex.bde.org> 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, Bruce Evans wrote: > > 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. Good points, and thanks for the hint on redefining CC. I usually look at the Makefiles first for knobs like this because I assume if there are knobs in them, they are knobs that ought to work. If I have to look deeper into the source for knobs, I assume they may not be operational because they aren't "published". I haven't looked, but is NO_HISTORY used elsewhere? If so, perhaps it would be a good candidate for a global knob to reduce bloat in a build... Unless others think that adding the NO_HISTORY knob to the Makefile would be good, I'll just drop this. Thanks again, Guy To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message