From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 12 17:13:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A930716A4CE; Thu, 12 Feb 2004 17:13:29 -0800 (PST) Received: from obsecurity.dyndns.org (adsl-64-169-106-71.dsl.lsan03.pacbell.net [64.169.106.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C72343D1D; Thu, 12 Feb 2004 17:13:29 -0800 (PST) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 42D2F66D0E; Thu, 12 Feb 2004 17:13:25 -0800 (PST) Date: Thu, 12 Feb 2004 17:13:25 -0800 From: Kris Kennaway To: Paul Seniura Message-ID: <20040213011324.GA55948@xor.obsecurity.org> References: <20040213001703.616C75C3B@techpc04.okladot.state.ok.us> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pWyiEgJYm5f9v55/" Content-Disposition: inline In-Reply-To: <20040213001703.616C75C3B@techpc04.okladot.state.ok.us> User-Agent: Mutt/1.4.1i X-Mailman-Approved-At: Fri, 13 Feb 2004 05:35:59 -0800 cc: freebsd-hackers@freebsd.org cc: freebsd-questions@freebsd.org Subject: Re: need help on CFLAGS in /etc/make.conf please X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2004 01:13:29 -0000 --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 12, 2004 at 06:17:03PM -0600, Paul Seniura wrote: >=20 > Hi y'all, >=20 > I'm trying to find a way to do a CFLAGS+=3D'-O' if and only if such a > parm was not already provided before 'make' actually runs. >=20 > I had this coded with the single =3D sign, i.e. without ?=3D or +=3D, but > the process still acts as if +=3D was coded anyway, thus tacking on > my -O *after* the port's own CFLAGS. >=20 > GCC33 docs say the _last_ -O# is the one that will be used. >=20 > 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. 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. Kris --pWyiEgJYm5f9v55/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFALCS0Wry0BWjoQKURAkp4AJ0TFcFM2slc6VoaIWm160DmqD3qagCfamuj nyRzW7Q+5so/QQzpDyKnNwg= =TRoK -----END PGP SIGNATURE----- --pWyiEgJYm5f9v55/--