Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Correct cflags for skylake i7-6600U
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
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2541
Location: Near Toronto

PostPosted: Sat May 07, 2016 3:16 pm    Post subject: Correct cflags for skylake i7-6600U Reply with quote

I am the proud owner of a new thinkpad x1 carbon with
(as in the subject) a core i7-6600U processor (16gb ram
and 512gb samsung 950 pro).

I am preparing to install gentoo (from an existing ubuntu install).

What's the correct cflags for this CPU?

I am thinking:

Code:
CFLAGS="-O2 -march=core-avx2 -pipe"


Does that look good to y'all?
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
Markus09
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2013
Posts: 78

PostPosted: Sat May 07, 2016 6:33 pm    Post subject: Reply with quote

If you want it to your specific CPU, why not use
Code:
-march=native

?
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Sat May 07, 2016 7:00 pm    Post subject: Reply with quote

GCC is using -march=broadwell when I set -march=native with my sixth generation i3.
Back to top
View user's profile Send private message
otakugeek
n00b
n00b


Joined: 26 Jun 2014
Posts: 50

PostPosted: Thu May 12, 2016 2:25 am    Post subject: Reply with quote

Follow the GCC 5.3 need to be :
Code:
-march=skylake-avx512
but with 4.9 I guess that :
Code:
 -march=core-avx2
will work well
Back to top
View user's profile Send private message
wichtounet
Tux's lil' helper
Tux's lil' helper


Joined: 17 Mar 2012
Posts: 116

PostPosted: Thu May 12, 2016 9:02 am    Post subject: Reply with quote

otakugeek wrote:
Follow the GCC 5.3 need to be :
Code:
-march=skylake-avx512
but with 4.9 I guess that :
Code:
 -march=core-avx2
will work well


The 6600 does not have AVX512, are you sure it'll work with
Code:
-march=skylake-avx512
?
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2541
Location: Near Toronto

PostPosted: Thu May 12, 2016 11:28 am    Post subject: Reply with quote

Quote:
The 6600 does not have AVX512, are you sure it'll work with

-march=skylake-avx512


well, "-march=core-avx2" appears to be working great (what
would be the symptoms if it is a bad choice?)

I understand that "-march=native" can foul up distcc which I use
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7972
Location: ~Brussels - Belgique

PostPosted: Thu May 12, 2016 11:35 am    Post subject: Reply with quote

Following the distcc Gentoo wiki page

Code:
gcc -v -E -x c -march=native -mtune=native - < /dev/null 2>&1 | grep cc1 | perl -pe 's/ -mno-\S+//g; s/^.* - //g;'

_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2541
Location: Near Toronto

PostPosted: Thu May 12, 2016 2:26 pm    Post subject: Reply with quote

I'm just wary of this from the distcc guide:

Quote:
Heed the following warning:
Warning
Do not use -march=native or -mtune=native in the CFLAGS or CXXFLAGS variables of make.conf when compiling with distcc.

_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2574

PostPosted: Thu May 12, 2016 4:00 pm    Post subject: Reply with quote

I'm reasonably certain that warning is only meant to apply to limitations in distcc, not a flaw in mach=native itself. As long as you don't need to use distcc there shouldn't be a problem. Obviously, mach=native when compiling on an i7 for a new amd fx-6300 machine is going to cause disappointment for very obvious reasons.

I'm running an i7-4790 and I get -march=haswell with mach=native.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
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