Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 May 2001 05:07:44 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Peter Pentchev <roam@orbitel.bg>
Cc:        arch@FreeBSD.ORG, "David E. O'Brien" <obrien@FreeBSD.ORG>
Subject:   Re: Overriding compiler flags (Re: cvs commit: src/contrib/gcc.295 gcc.c)
Message-ID:  <Pine.BSF.4.21.0105310442540.20240-100000@besplex.bde.org>
In-Reply-To: <20010530192520.H74837@ringworld.oblivion.bg>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0105310442540.20240-100000>