From owner-freebsd-questions@FreeBSD.ORG Thu Feb 12 16:16:50 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 1B3BD16A4CE; Thu, 12 Feb 2004 16:16:50 -0800 (PST) Received: from odot.okladot.state.ok.us (odot.okladot.state.ok.us [192.149.244.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF26643D1F; Thu, 12 Feb 2004 16:16:49 -0800 (PST) (envelope-from root@techpc04.okladot.state.ok.us) Received: from notes9c.okladot.state.ok.us (notes9a.okladot.state.ok.us [10.36.36.31])SAA40976; Thu, 12 Feb 2004 18:16:48 -0600 Received: from techpc04.okladot.state.ok.us ([199.27.9.37]) by notes9c.okladot.state.ok.us (Lotus Domino Release 5.0.12) with ESMTP id 2004021218171568:7769 ; Thu, 12 Feb 2004 18:17:15 -0600 Received: by techpc04.okladot.state.ok.us (Postfix, from userid 0) id 616C75C3B; Thu, 12 Feb 2004 18:17:03 -0600 (CST) To: freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org From: "Paul Seniura" Message-Id: <20040213001703.616C75C3B@techpc04.okladot.state.ok.us> Date: Thu, 12 Feb 2004 18:17:03 -0600 (CST) X-MIMETrack: Itemize by SMTP Server on Notes9c/ODOT(Release 5.0.12 |February 13, 2003) at 02/12/2004 06:17:15 PM,2003) at 02/12/2004 06:17:16 PM, Serialize complete at 02/12/2004 06:17:16 PM cc: Paul Seniura Subject: 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 00:16:50 -0000 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. And so, in many ports esp. KDE, it will add my -O *after* the port's own -O2, and KDE et al will not be compiled with the intended settings, which may be causing some of its slowness. Since TPTB here could only find a spare slow@$$ Pentium2 for this project, I'm trying to optimize other ports with at least -O in an automatic fashion. That leaves out /etc/pkgtools.conf due to the sheer manual labor it would take to code this up for each port. The idea of having a test in /etc/make.conf struck me as the way to go, since it is effectively 'sourced'-in and could contain some simple shell logic operations. I hope I'm explaining this correctly. ;) I'd love to hear feedback on this. I'll continue working on it tomorrow. Thank you, -- Paul Seniura System Specialist State of Okla. D.O.T.