From owner-freebsd-questions@FreeBSD.ORG Wed Jul 27 11:17:35 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 7A36916A420 for ; Wed, 27 Jul 2005 11:17:35 +0000 (GMT) (envelope-from gabor.kovesdan@t-hosting.hu) Received: from server.t-hosting.hu (server.t-hosting.hu [217.20.133.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB94343D7F for ; Wed, 27 Jul 2005 11:17:33 +0000 (GMT) (envelope-from gabor.kovesdan@t-hosting.hu) Received: from localhost (localhost [127.0.0.1]) by server.t-hosting.hu (Postfix) with ESMTP id 3E9B59979E3; Wed, 27 Jul 2005 13:17:30 +0200 (CEST) Received: from server.t-hosting.hu ([127.0.0.1]) by localhost (server.t-hosting.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 11454-02-4; Wed, 27 Jul 2005 13:17:26 +0200 (CEST) Received: from [80.98.156.20] (catv-50629c14.catv.broadband.hu [80.98.156.20]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.t-hosting.hu (Postfix) with ESMTP id CBF74997587; Wed, 27 Jul 2005 13:17:26 +0200 (CEST) Message-ID: <42E815EC.20309@t-hosting.hu> Date: Thu, 28 Jul 2005 01:17:00 +0200 From: =?ISO-8859-1?Q?K=F6vesd=E1n_G=E1bor?= User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nikolas Britton References: <42E69B11.6070208@t-hosting.hu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: amavisd-new at t-hosting.hu Cc: FreeBSD - Questions Subject: Re: FreeBSD 6 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, 27 Jul 2005 11:17:35 -0000 Nikolas Britton wrote: >On 7/26/05, Kövesdán Gábor wrote: > > >>Nikolas Britton wrote: >> >> >> >>>Is it just me or is -O2 now the default for kernel builds? What about >>>-Os, safe to use? >>> >>> >>> >>> >>> >>So is it for me. But if I specify some CFLAGS, for example -O3 >>-march=athlon64, the >>building fails, but CFLAGS mustn't affect the kernel compiling process >>afaik. There is >>COPTFLAGS for that reason. I've also made a PR about this new, unwanted >>behaviour, >>but haven't got any answers so yet. >> >> >> > >You are right, COPTCLAGS is for the kernel only. -O3 is not officially >supported for CFLAGS or COPTFLAGS. If you use -O3 for CFLAGS it will >break some ports. Also from my experience using anything higher then >CPUTYPE=p2 will break ports (like gstreamer). > >This is what I normally add to my make.conf file: >CPUTYPE=p2 >CFLAGS= -Os -pipes >COPTFLAGS= -Os -pipes >#CXXFLAGS= don't remember what I set this too, don't use it a lot. > >If I want a port to build with different settings I just tell it to >inline... make CPUTYPE=p4 install clean etc. > > > Yes, I know -O3 isn't supported for either, but I didn't mean ports. The kernel building fails with this: CFLAGS=-O3 -march=athlon64 #COPTFLAGS=-O3 -march=athlon64 <-This is commenred out! And this breaks the kernel compiling. See this: http://www.freebsd.org/cgi/query-pr.cgi?pr=83995 >As far as -O2 as the default for the kernel... I thought it was more >important to have a small kernel then a faster but fatter one. The >smaller the kernel the more you can put in L1,2, and 3 cache and the >smaller the program the less it needs to hit ram, swap, and hard disk? >isn't this what apple does with their OS-X builds? > > I also use -Os -march=athlon64 on the server I administer. :) Cheers, Gábor Kövesdán