From owner-freebsd-arch Wed May 30 12: 9:28 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id A57F537B422; Wed, 30 May 2001 12:09:25 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id FAA31612; Thu, 31 May 2001 05:09:18 +1000 Date: Thu, 31 May 2001 05:07:44 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Peter Pentchev Cc: arch@FreeBSD.ORG, "David E. O'Brien" Subject: Re: Overriding compiler flags (Re: cvs commit: src/contrib/gcc.295 gcc.c) In-Reply-To: <20010530192520.H74837@ringworld.oblivion.bg> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 30 May 2001, Peter Pentchev wrote: > On Wed, May 30, 2001 at 11:27:46PM +1000, Bruce Evans wrote: > > On Tue, 29 May 2001, Kris Kennaway wrote: > > > > > Hmm. We now have a number of ways of achieving this (some of these > > > only work in some contexts): > > > > > > Defining CFLAGS with ?= instead of = in /etc/make.conf > > > > This is a no-op, because CFLAGS is always defined in /etc/make.conf. Oops, I meant that CFLAGS it is always defined in sys.mk. > This is not a no-op, if CFLAGS is already defined in the environment > or on the make(1) command line. A CFLAGS=.. line in /etc/make.conf > is a lot less user-friendly than a CFLAGS?=.. line. It's the "?=" setting that is a no-op. This unfortunately means that you have to use an "=" setting to be sure of canceling the default in sys.mk, although this is bad if the setting is actually in the environment. BTW, "make -e -V CFLAGS" doesn't work right. It reports the value that is assigned to CFLAGS by assignments in makefiles, but not the value of CFLAGS that will actually be used (if it is set differently in the environment). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message