Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jan 2009 23:44:51 +0100
From:      =?ISO-8859-1?Q?Morgan_Wesstr=F6m?= <freebsd-questions@pp.dyndns.biz>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: default CFLAGS
Message-ID:  <497B99E3.7010901@pp.dyndns.biz>
In-Reply-To: <20090124215002.6a0bf24e@gumby.homeunix.com>
References:  <Pine.LNX.4.64.0901241734020.6296@localhost>	<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>

next in thread | previous in thread | raw e-mail | index | archive | help
RW wrote:
> On Sat, 24 Jan 2009 21:13:00 +0100
> Morgan Wesström <freebsd-questions@pp.dyndns.biz> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?497B99E3.7010901>