Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
make.conf CFLAGS
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
grindz
n00b
n00b


Joined: 07 Mar 2013
Posts: 3
Location: Las Vegas

PostPosted: Thu Mar 07, 2013 5:57 am    Post subject: make.conf CFLAGS Reply with quote

Installing Gentoo for first time, currently configuring the make.conf file, it is telling me to use CFLAGS="-march=k8 -O2 -pipe" by default, but I just want to make sure this is right. My CPU is as follows Intel(R) Core(TM) i7 Q720 @1.60GHz

does anyone know if that is the correct switch or where i can find out?


note I am using a VM with max cores of 4


thanks in advance
Back to top
View user's profile Send private message
grindz
n00b
n00b


Joined: 07 Mar 2013
Posts: 3
Location: Las Vegas

PostPosted: Thu Mar 07, 2013 6:40 am    Post subject: Reply with quote

I found this after looking through wiki... i think this will work

CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7 -O2 -pipe"
CXXFLAGS="${CFLAGS}"

http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel#Core_i7_and_Core_i5.2C_Xeon_55xx


Thanks for the help all
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Mar 07, 2013 8:29 am    Post subject: Reply with quote

grindz ...

firstly, wiki-gentoo.com is not gentoo's official wiki, and the information there is not always up-to-date. As far as CFLAGS are concerned, the use of '-O2 -march=native -pipe' is recommended, gcc will then work out what optimization to use based on the information in /proc/cpuinfo. You can see what those flags will be with the following:

Code:
# LC_ALL=C gcc '-###' -e -v -march=native /usr/include/stdlib.h

or .. to just extract the flags:
Code:
# echo $(LC_ALL=C gcc -v -march=native -x c /dev/null 2>&1 | grep /dev/null | egrep -o -- '-+(m|param )\S+')

or ... for a list of all enabled/disabled target specific options:
Code:
# LC_ALL=C gcc -Q -O2 -march=native -c --help=target

HTH & best ... khay
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Thu Mar 07, 2013 3:24 pm    Post subject: Reply with quote

!t might be good to note that k8 is specific to AMD cpus.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
grindz
n00b
n00b


Joined: 07 Mar 2013
Posts: 3
Location: Las Vegas

PostPosted: Thu Mar 07, 2013 5:04 pm    Post subject: Reply with quote

Thank you all for the information. Noted on the K8 and thank you khayyam, for the valuable information. So much to learn, been primary windows for a long time... so bored with it, this is so much more challenging and fun.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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