Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
safe cflags for intel i7-8550U
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
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1626

PostPosted: Sat Dec 08, 2018 3:00 pm    Post subject: safe cflags for intel i7-8550U Reply with quote

Hello Everyone

I am installing now a new laptop. The cpu is i7-8550u model 142. I tried to find on the wiki and other links but couldn't find anything related to this cpu. Anyone has an idea what I should pick?

Queen
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1294
Location: Frankfurt, Germany

PostPosted: Sat Dec 08, 2018 3:11 pm    Post subject: Reply with quote

Code:
CFLAGS="-O2 -pipe -march=native"
CXXFLAGS="${CFLAGS}"

See: https://wiki.gentoo.org/wiki/Safe_CFLAGS

Additionally, run cpuid2cpuflags to get a list of CPU flags. You can define them in variable CPU_FLAGS_X86 in /etc/portage/make.conf.
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1626

PostPosted: Sat Dec 08, 2018 3:24 pm    Post subject: Reply with quote

mike155 wrote:
Code:
CFLAGS="-O2 -pipe -march=native"
CXXFLAGS="${CFLAGS}"

See: https://wiki.gentoo.org/wiki/Safe_CFLAGS

Additionally, run cpuid2cpuflags to get a list of CPU flags. You can define them in variable CPU_FLAGS_X86 in /etc/portage/make.conf.


Thanks. I saw that link but it's outdated. The cpu family is KabyLake. But I will check the program that you suggested.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3951
Location: Dallas area

PostPosted: Sat Dec 08, 2018 3:38 pm    Post subject: Reply with quote

skylake is close to kabylake (previous gen)
_________________
Asus m5a99fx, FX 8320 - nouveau, oss4, rx550 for qemu passthrough
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
5.0.13 zen kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1626

PostPosted: Sat Dec 08, 2018 3:55 pm    Post subject: Reply with quote

Anon-E-moose wrote:
skylake is close to kabylake (previous gen)


OK. Now I see few more things. The gcc version on the livecd install is 5.4.0.
gcc 6.4.0 recognizes the kabylake already? I guess I will have to recompile again when the system will be installed. So far
Code:


gcc -v -E -x c /dev/null -o /dev/null -march=native 2>&1 | grep /cc1
sees only march=broadwell

Is there a version of gcc that already recognizes kabylake?
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3951
Location: Dallas area

PostPosted: Sat Dec 08, 2018 4:36 pm    Post subject: Reply with quote

These are the changes from broadwell to skylake
Code:
Skylake introduced a number of new instructions:

    SGX1 - Software Guard Extensions, Version 1
    MPX -Memory Protection Extensions
    XSAVEC - Save processor extended states with compaction to memory
    XSAVES - Save processor supervisor-mode extended states to memory.
    CLFLUSHOPT - Flush & Invalidates memory operand and its associated cache line (All L1/L2/L3 etc..)


And as far as I can tell no new instructions between skylake and kabylake.

Yeah, my laptop (kabylake) gets reported as broadwell too (gcc 7.3.0)

Gcc >8.1 should have skylake support, but it's still not marked stable in portage.

Even if the compiler supports newer instructions, if the software doesn't take advantage of it, it's meaningless.
_________________
Asus m5a99fx, FX 8320 - nouveau, oss4, rx550 for qemu passthrough
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
5.0.13 zen kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7092
Location: Saint Amant, Acadiana

PostPosted: Sat Dec 08, 2018 4:39 pm    Post subject: Reply with quote

Yes, my 7th gen CPU is recognized as skylake by gcc-8.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 152

PostPosted: Sat Dec 08, 2018 5:37 pm    Post subject: Reply with quote

My i5-6500 is recognised as Skylake by GCC 7.3.0...
_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.

===
I refuse to move on from GTK+2.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3951
Location: Dallas area

PostPosted: Sat Dec 08, 2018 6:03 pm    Post subject: Reply with quote

Marcih wrote:
My i5-6500 is recognised as Skylake by GCC 7.3.0...


I think it depends on which processor one has as to what it thinks it is, mine is an i3 7100u, and it reports as broadwell.
When gcc 8 stabilizes, I'll check it out and see what it thinks it is.
_________________
Asus m5a99fx, FX 8320 - nouveau, oss4, rx550 for qemu passthrough
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
5.0.13 zen kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1626

PostPosted: Sat Dec 08, 2018 6:16 pm    Post subject: Reply with quote

Anon-E-moose wrote:
These are the changes from broadwell to skylake
Code:
Skylake introduced a number of new instructions:

    SGX1 - Software Guard Extensions, Version 1
    MPX -Memory Protection Extensions
    XSAVEC - Save processor extended states with compaction to memory
    XSAVES - Save processor supervisor-mode extended states to memory.
    CLFLUSHOPT - Flush & Invalidates memory operand and its associated cache line (All L1/L2/L3 etc..)


And as far as I can tell no new instructions between skylake and kabylake.

Yeah, my laptop (kabylake) gets reported as broadwell too (gcc 7.3.0)

Gcc >8.1 should have skylake support, but it's still not marked stable in portage.

Even if the compiler supports newer instructions, if the software doesn't take advantage of it, it's meaningless.


Thanks for showing me the differences. SGX is broken anyway. I won't work with sgx. I will use the stable gcc which I see it's 6.4.0 right now.
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1294
Location: Frankfurt, Germany

PostPosted: Sat Dec 08, 2018 6:37 pm    Post subject: Reply with quote

Quote:
I will use the stable gcc which I see it's 6.4.0 right now.

gcc 7.3.0 is stable on amd64 and x86, see https://packages.gentoo.org/packages/sys-devel/gcc
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5845

PostPosted: Sat Dec 08, 2018 7:42 pm    Post subject: Reply with quote

mpx is being removed from gcc 9 i believe, and its also being removed from the kernel, i guess nobody wanted to use it and intel stopped maintaining that part of the code.

this is what i've been using on my kabylake systems

Code:
CFLAGS="-march=skylake -mabm -O2 -pipe"
CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"

_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1626

PostPosted: Sat Dec 08, 2018 10:37 pm    Post subject: Reply with quote

Thanks for the input. I wasn't aware that gcc 7 is already stable.
Thanks bunder for your remark about mpx.
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