1 |
commit: 3bbf3bd432ec1436bef6e2d7ffc83d1c031553ab |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 5 23:52:26 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 5 23:52:26 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bbf3bd4 |
7 |
|
8 |
toolchain.eclass: mangle -O3 down to -O2, not -O0 |
9 |
|
10 |
In bug #701786 'strip-flags' removed all unsafe options |
11 |
first including -O3 and only then mangled -O? to -O2. |
12 |
|
13 |
This effectively made gcc to compalie wth -O0, generated |
14 |
huge slow profile and confused LTO. |
15 |
|
16 |
Let's default to safer -O3->-O2 transition. |
17 |
|
18 |
Reported-by: jeff.lemos.a <AT> gmail.com |
19 |
Closes: https://bugs.gentoo.org/701786 |
20 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
21 |
|
22 |
eclass/toolchain.eclass | 2 +- |
23 |
1 file changed, 1 insertion(+), 1 deletion(-) |
24 |
|
25 |
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass |
26 |
index 62520ae92df..d69ce9503ea 100644 |
27 |
--- a/eclass/toolchain.eclass |
28 |
+++ b/eclass/toolchain.eclass |
29 |
@@ -1494,8 +1494,8 @@ downgrade_arch_flags() { |
30 |
} |
31 |
|
32 |
gcc_do_filter_flags() { |
33 |
+ replace-flags -O? -O2 # 701786 (-O3) |
34 |
strip-flags |
35 |
- replace-flags -O? -O2 |
36 |
|
37 |
# dont want to funk ourselves |
38 |
filter-flags '-mabi*' -m31 -m32 -m64 |