Mike noticed that CFLAGS without any optimization options
still effectively are -O0. Let's follow glibc ebuild here
and always use -O2.
Suggested-by: Mike Gilbert
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
}
gcc_do_filter_flags() {
- replace-flags -O? -O2 # 701786 (-O3)
+ # Be conservative here:
+ # - don't allow -O3 and like to over-optimize libgcc # 701786
+ # - don't allow -O0 to generate potentially invalid startup code
strip-flags
+ filter-flags '-O?'
+ append-flags -O2
# dont want to funk ourselves
filter-flags '-mabi*' -m31 -m32 -m64