Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Change of CFLAGS
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
BartNL
n00b
n00b


Joined: 29 Aug 2004
Posts: 65

PostPosted: Tue Mar 04, 2014 10:46 pm    Post subject: Change of CFLAGS Reply with quote

My gentoo system is running perfect. I have an intel i5 4570 haswell processor. When i installed gentoo i used the corei7 cflag. Later i read the wiki save cflags wich says to use core-avx2. What should i do? Change the cflag and run emerge -avuDN world?

In my kernel config i selected core2/newer. Is that correct, or do i need a patch?
Back to top
View user's profile Send private message
hydrapolic
Tux's lil' helper
Tux's lil' helper


Joined: 07 Feb 2008
Posts: 126

PostPosted: Wed Mar 05, 2014 6:58 am    Post subject: Reply with quote

Or you may use native if you have a recent gcc that supports it:

CFLAGS="-mtune=native -O2 -pipe"
CXXFLAGS="${CFLAGS}"
Back to top
View user's profile Send private message
aCOSwt
Bodhisattva
Bodhisattva


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Wed Mar 05, 2014 8:07 am    Post subject: Re: Change of CFLAGS Reply with quote

BartNL wrote:
In my kernel config i selected core2/newer. Is that correct, or do i need a patch?

Yes it is correct.
BTW, you'll notice that starting from 3.13 kernels, you get the ability to select a wider range of families, in particular one dedicated to your processor :

CONFIG_MCOREAVX2:
Select this for AVX2 enabled processors including Haswell.
Enables -march=core-avx2

BTW only efficient with gcc >= 4.7
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum