From owner-freebsd-questions@FreeBSD.ORG Sat Jan 24 22:44:55 2009 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 56A8F106564A for ; Sat, 24 Jan 2009 22:44:55 +0000 (UTC) (envelope-from freebsd-questions@pp.dyndns.biz) Received: from proxy2.bredband.net (proxy2.bredband.net [195.54.101.72]) by mx1.freebsd.org (Postfix) with ESMTP id 0971E8FC0C for ; Sat, 24 Jan 2009 22:44:54 +0000 (UTC) (envelope-from freebsd-questions@pp.dyndns.biz) Received: from ironport2.bredband.com (195.54.101.122) by proxy2.bredband.net (7.3.127) id 494BF30200B25CB6 for freebsd-questions@freebsd.org; Sat, 24 Jan 2009 23:44:53 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgNBAEMoe0lV4jp1PGdsb2JhbAAwgTyHJYpgAQEBATW0FIVM Received: from c-753ae255.107-1-64736c10.cust.bredbandsbolaget.se (HELO gatekeeper.pp.dyndns.biz) ([85.226.58.117]) by ironport2.bredband.com with ESMTP; 24 Jan 2009 23:44:52 +0100 Received: from [192.168.69.67] (phobos [192.168.69.67]) by gatekeeper.pp.dyndns.biz (8.14.2/8.14.2) with ESMTP id n0OMip2o013474 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 24 Jan 2009 23:44:52 +0100 (CET) (envelope-from freebsd-questions@pp.dyndns.biz) Message-ID: <497B99E3.7010901@pp.dyndns.biz> Date: Sat, 24 Jan 2009 23:44:51 +0100 From: =?ISO-8859-1?Q?Morgan_Wesstr=F6m?= User-Agent: Thunderbird 2.0.0.19 (X11/20090102) MIME-Version: 1.0 To: FreeBSD Questions References: <20090124124535.3006687c@gumby.homeunix.com> <9a52b1190901240451i14dc544fm1c241d6f43fa897b@mail.gmail.com> <20090124131629.1f9fabe4@gumby.homeunix.com> <497B2536.7030907@pp.dyndns.biz> <20090124174357.4aafcf1a@gumby.homeunix.com> <497B5686.8050600@pp.dyndns.biz> <9a52b1190901241107h5bff8c1al6c980b7ad8e99051@mail.gmail.com> <497B764C.4080109@pp.dyndns.biz> <20090124215002.6a0bf24e@gumby.homeunix.com> In-Reply-To: <20090124215002.6a0bf24e@gumby.homeunix.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: default CFLAGS 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: Sat, 24 Jan 2009 22:44:55 -0000 RW wrote: > On Sat, 24 Jan 2009 21:13:00 +0100 > Morgan Wesström wrote: > >> gcc 4.2 and later will figure out the correct -march and -mtune for >> you automatically if you use CPUTYPE=native. > > The point I was making before, is that CPUTYPE isn't just passed > transparently to gcc, it's used for setting other variables, such as > CFLAGS. So unless you know that CPUTYPE=native is supported by the OS as > well as the compiler, you probably shouldn't use it in make.conf. I got that point. As with all tuning you always take the risk of breaking something but that is a personal choice. From my own experience I prefer that the compiler choses the optimizations. I don't know about the base OS but a quick grep through /usr/ports only reveals 5 or 6 ports that actually checks CPUTYPE and they don't do much more than setting -march={$CPUTYPE} which is pretty redundant. Regards Morgan