commit: 28ae5ce2652cc4e1d5488034a6dd1c3d1cf26781 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> AuthorDate: Mon Feb 11 15:21:32 2019 +0000 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> CommitDate: Mon Feb 11 15:21:53 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28ae5ce2
www-client/firefox: use -fdisable-ipa-cdtor workaround when AVX2 is not available This commit changes commit da3675965824a307cd16ffc48193929ba8125d98. Bug: https://bugs.gentoo.org/677052 Package-Manager: Portage-2.3.59, Repoman-2.3.12 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> www-client/firefox/firefox-65.0-r1.ebuild | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/www-client/firefox/firefox-65.0-r1.ebuild b/www-client/firefox/firefox-65.0-r1.ebuild index 56719723d0a..5fe43fe3bee 100644 --- a/www-client/firefox/firefox-65.0-r1.ebuild +++ b/www-client/firefox/firefox-65.0-r1.ebuild @@ -131,10 +131,7 @@ DEPEND="${CDEPEND} # Due to a bug in GCC, profile guided optimization will produce # AVX2 instructions, bug #677052 REQUIRED_USE="wifi? ( dbus ) - pgo? ( - lto - !clang? ( cpu_flags_x86_avx2 ) - )" + pgo? ( lto )" S="${WORKDIR}/firefox-${PV%_*}" @@ -321,6 +318,15 @@ src_configure() { show_old_compiler_warning=1 fi + if ! use cpu_flags_x86_avx2 ; then + # due to a GCC bug, GCC will produce AVX2 instructions + # even if the CPU doesn't support AVX2, https://gcc.gnu.org/ml/gcc-patches/2018-12/msg01142.html + einfo "Disable IPA cdtor due to bug in GCC and missing AVX2 support -- triggered by USE=lto" + append-ldflags -fdisable-ipa-cdtor + else + einfo "No GCC workaround required, system supports AVX2" + fi + # Linking only works when using ld.gold when LTO is enabled mozconfig_annotate "forcing ld=gold due to USE=lto" --enable-linker=gold fi
