mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-21 22:47:14 -08:00
toolchain.eclass: strip -march=native when building with Clang
-march=native doesn't work correctly in the stage2 compiler when the stage1 compiler is Clang (see PR117952 for details). We have two options until that is fixed: 1) strip -march=native, or 2) do 'bootstrap4' (which isn't super well-tested at the moment, see e.g. https://trofi.github.io/posts/301-another-gcc-profiling-bug.html) Choose 1). Thanks to immolo for testing. Bug: https://gcc.gnu.org/PR117952 Bug: https://bugs.gentoo.org/933772 Closes: https://bugs.gentoo.org/947752 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -695,6 +695,7 @@ toolchain_src_prepare() {
|
||||
# Workaround -march=native not working for stage1 with non-GCC (bug #933772).
|
||||
if ! tc-is-gcc && [[ "${CFLAGS}${CXXFLAGS}" == *-march=native* ]] ; then
|
||||
CLANG_DISABLE_CET_HACK=1
|
||||
filter-flags '-march=native'
|
||||
fi
|
||||
|
||||
if ! use vanilla ; then
|
||||
|
||||
Reference in New Issue
Block a user