From: Sergei Trofimovich Date: Thu, 5 Mar 2020 23:52:26 +0000 (+0000) Subject: toolchain.eclass: mangle -O3 down to -O2, not -O0 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3bbf3bd432ec1436bef6e2d7ffc83d1c031553ab;p=gentoo.git toolchain.eclass: mangle -O3 down to -O2, not -O0 In bug #701786 'strip-flags' removed all unsafe options first including -O3 and only then mangled -O? to -O2. This effectively made gcc to compalie wth -O0, generated huge slow profile and confused LTO. Let's default to safer -O3->-O2 transition. Reported-by: jeff.lemos.a@gmail.com Closes: https://bugs.gentoo.org/701786 Signed-off-by: Sergei Trofimovich --- diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 62520ae92dff..d69ce9503eaa 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1494,8 +1494,8 @@ downgrade_arch_flags() { } gcc_do_filter_flags() { + replace-flags -O? -O2 # 701786 (-O3) strip-flags - replace-flags -O? -O2 # dont want to funk ourselves filter-flags '-mabi*' -m31 -m32 -m64