From owner-freebsd-questions@FreeBSD.ORG Thu Feb 12 19:56:09 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D5A416A4CE; Thu, 12 Feb 2004 19:56:09 -0800 (PST) Received: from lakemtai06.cox.net (lakemtai06.cox.net [68.1.17.126]) by mx1.FreeBSD.org (Postfix) with ESMTP id F26A243D1F; Thu, 12 Feb 2004 19:56:08 -0800 (PST) (envelope-from scifi@scifi.homeip.net) Received: from scifi.homeip.net ([68.227.96.63]) by lakemtai06.cox.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040213035608.BRPT23064.lakemtai06.cox.net@scifi.homeip.net>; Thu, 12 Feb 2004 22:56:08 -0500 Received: by scifi.homeip.net (Postfix, from userid 501) id 3AA11A38EA; Thu, 12 Feb 2004 21:56:08 -0600 (CST) To: "Kris Kennaway" From: "Paul Seniura" Errors-To: "Paul Seniura" In-Reply-To: <20040213011324.GA55948@xor.obsecurity.org> References: <20040213001703.616C75C3B@techpc04.okladot.state.ok.us><20040213011324.GA55948@xor.obsecurity.org> Message-Id: <20040213035608.3AA11A38EA@scifi.homeip.net> Date: Thu, 12 Feb 2004 21:56:08 -0600 (CST) cc: freebsd-hackers@freebsd.org cc: freebsd-questions@freebsd.org Subject: Re: need help on CFLAGS in /etc/make.conf please X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Paul Seniura List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2004 03:56:09 -0000 Hi Kris, > On Thu, Feb 12, 2004 at 06:17:03PM -0600, Paul Seniura wrote: > > > > Hi y'all, > > > > I'm trying to find a way to do a CFLAGS+='-O' if and only if such a > > parm was not already provided before 'make' actually runs. > > > > I had this coded with the single = sign, i.e. without ?= or +=, but > > the process still acts as if += was coded anyway, thus tacking on > > my -O *after* the port's own CFLAGS. > > > > GCC33 docs say the _last_ -O# is the one that will be used. > > > > I've seen other discussion on using -O2 but the point seems to be the > > ports that set -O2 explicitly are likely to work correctly. On Thu 12 Feb 2004 17:13:25 -0800, Kris Kennaway replied: > That's not a good assumption; many ports simply add -O2 (or -O3, or > -O999) because the authors "want their code to run fast". The set of > ports for which the authors have run full regression suites for all > supported versions of gcc and all supported OS and architecture > combinations is probably the null set. Thank you for responding, but I'm *really* not wanting this to become another discussion on "how high my Oh-levels should be". ;) My question for this discussion is specifically how to prevent overriding a port's own setting for that parm, and to provide a default setting -O[1] when the port does not set it at all? (I'll save my l-o-n-g-e-r reply for later... believe me I have reasons ;) > Kris -- thx, Paul Seniura (in OkC)