From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 21 17:42:40 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0555A16A407 for ; Thu, 21 Dec 2006 17:42:40 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout2.cac.washington.edu (mxout2.cac.washington.edu [140.142.33.4]) by mx1.freebsd.org (Postfix) with ESMTP id D825113C458 for ; Thu, 21 Dec 2006 17:42:39 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.141]) by mxout2.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kBLHgdeH011509 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 21 Dec 2006 09:42:39 -0800 X-Auth-Received: from [128.208.5.99] (nilakantha.cs.washington.edu [128.208.5.99]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kBLHgXQE002293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 21 Dec 2006 09:42:39 -0800 Message-ID: <458AC789.7030103@u.washington.edu> Date: Thu, 21 Dec 2006 09:42:33 -0800 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.ORG References: <458A0620.5020905@u.washington.edu> <200612210856.00910.fcash@ocis.net> In-Reply-To: <200612210856.00910.fcash@ocis.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.2.2.285561, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2006.12.21.91932 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Cc: Subject: Re: Properly controlling CFLAGS/CXXFLAGS X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Dec 2006 17:42:40 -0000 Freddie Cash wrote: > On Wednesday 20 December 2006 07:57 pm, Garrett Cooper wrote: > >> Hello, >> Coming from Gentoo we were taught how to 'rice' our machines. >> Based on my experience though with FreeBSD, this is an improper >> methodology for one to use. >> I was wondering (looking at the make.conf manpage), what's the >> best way to control one's CFLAGS/CXXFLAGS. I'd prefer if only a few >> ports would have optimized compiler flags, while the rest of the system >> used a safe set of compiler flags. >> So, I was wondering what the best course of action for setting >> variables in /etc/make.conf would be? Is this proper given what I'm >> trying to accomplish: >> >> /etc/make.conf snippet: >> CFLAGS= -O2 -pipe >> CXXFLAGS= ${CFLAGS} >> COPTFLAGS= ${CFLAGS} -msse -msse2 -mfpmath=sse,387 >> >> NO_CPU_CFLAGS="YES" >> NO_CPU_COPTFLAGS="YES" >> >> CPUTYPE?=pentium4 >> > > My suggestion is to leave all mention of *CFLAGS out of /etc/make.conf to > use the system defaults (-O2 -pipe -fno-strict-aliasing), set CPUTYPE > accordingly, and install sysutils/portconf. > > That gives you a separate /usr/local/etc/ports.conf file where you can set > global and per-port settings that are only used when compiling things > under /usr/ports (actually $PORTSDIR). > Yeah, I realized that I accidentally deleted CPUTYPE after the fact sometime in the past few weeks ><. Wasn't sure whether or not this topic really fit in the -hackers list, but it seemed more technical than many of the posts made to -questions. Also, (as make complained) the above setup with CXXFLAGS and COPTFLAGS is recursive (didn't realize that CFLAGS pulled in COPTFLAGS by default), and won't allow me to build much of anything. Lol. I appreciate the help though, a lot, because I want to determine what in the world is causing issues with Thunderbird, gtk, screen redraw, and a few other things on my desktop. -Garrett