Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Multilib ABI specific CPU use flags?
Date: Fri, 09 Oct 2020 05:45:33
Message-Id: 20201009054413.GA5752@waltdnes.org
In Reply to: Re: [gentoo-user] Re: Multilib ABI specific CPU use flags? by Jonathan Yong <10walls@gmail.com>
1 On Fri, Oct 09, 2020 at 12:26:17AM +0000, Jonathan Yong wrote
2 >
3 > I have a skylake system:
4 > CPU_FLAGS_X86: aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand
5 > sse sse2 sse3 sse4_1 sse4_2 ssse3
6
7 A heavy-handed 2-part solution
8 1) remove "avx2" from CPU_FLAGS_X86
9 2) assuming you have "-march=native" or "-march=skylake" in your CFLAGS
10 and CXXFLAGS, follow that with "-march=no-avx2". e.g...
11 "-march=skylake -march=no-avx2"
12
13 This tells gcc "I don't have avx2, so don't compile any avx2 code".
14 I think the performance loss will be minimal.
15
16 --
17 Walter Dnes <waltdnes@××××××××.org>
18 I don't run "desktop environments"; I run useful applications

Replies

Subject Author
Re: [gentoo-user] Re: Multilib ABI specific CPU use flags? Jonathan Yong <10walls@×××××.com>