From owner-freebsd-questions@FreeBSD.ORG Wed Apr 9 17:44:40 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5835B106566C for ; Wed, 9 Apr 2008 17:44:40 +0000 (UTC) (envelope-from fbsd06+U2=f69727cb@mlists.homeunix.com) Received: from mxout-04.mxes.net (mxout-04.mxes.net [216.86.168.179]) by mx1.freebsd.org (Postfix) with ESMTP id 2FC748FC25 for ; Wed, 9 Apr 2008 17:44:40 +0000 (UTC) (envelope-from fbsd06+U2=f69727cb@mlists.homeunix.com) Received: from gumby.homeunix.com. (unknown [87.81.140.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id 19828D0A89 for ; Wed, 9 Apr 2008 13:44:38 -0400 (EDT) Date: Wed, 9 Apr 2008 18:44:35 +0100 From: RW To: freebsd-questions@freebsd.org Message-ID: <20080409184435.3bb4b91c@gumby.homeunix.com.> In-Reply-To: <2daa8b4e0804081314o25b9773bn844734b674856e8c@mail.gmail.com> References: <2daa8b4e0804081314o25b9773bn844734b674856e8c@mail.gmail.com> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: Setting CPUTYPE and CFLAGS in make.conf X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2008 17:44:40 -0000 On Tue, 8 Apr 2008 13:14:45 -0700 "David Allen" wrote: > The advice I've read in several posts on the subject involve > everything from setting one, setting both, to ignoring both, > sometimes with the =? notation and sometimes without. And then, I've > read comments that suggest when compiling the kernel, for example, > both are ignored, and default values (tucked away somewhere) are > always applied. IIRC, the handbook recommends at least setting > CPUTYPE. Avoid setting CFLAGS unless you have a good reason - Gentoo documentation has a lot to answer for. CPUTYPE causes "-march" to be applied, so it can affect compatibility. AFAIK both setting do affect world and kernel because CFLAGS can cause a build to fail, and I've seen matching march settings in kernel builds. > Or are those settings relevant to the > compilation process only? Or to both the compilation process and the > actual performance of the binary? It can be either, -O2 is related to execution, -pipe speeds-up compilation.