From 09886ee677ea97b80f1469dc7534ff6aea6247cb Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann Date: Mon, 21 Dec 2020 22:18:14 +0100 Subject: www-client/firefox: disable loop vectorization Loop vectorization, -ftree-loop-vectorize, which will be auto-enabled when using -O3, is broken in GCC 10+. Many thanks to Dave Hughes (xaero) for running countless tests to find the issue. Bug: https://bugs.gentoo.org/758446 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Thomas Deutschmann --- www-client/firefox/firefox-78.6.0.ebuild | 7 +++++++ www-client/firefox/firefox-84.0.ebuild | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'www-client') diff --git a/www-client/firefox/firefox-78.6.0.ebuild b/www-client/firefox/firefox-78.6.0.ebuild index 2a93a2717ee1..2b97950a07f9 100644 --- a/www-client/firefox/firefox-78.6.0.ebuild +++ b/www-client/firefox/firefox-78.6.0.ebuild @@ -521,6 +521,7 @@ src_prepare() { src_configure() { # Show flags set at the beginning einfo "Current CFLAGS: ${CFLAGS}" + einfo "Current CXXFLAGS: ${CXXFLAGS}" einfo "Current LDFLAGS: ${LDFLAGS}" einfo "Current RUSTFLAGS: ${RUSTFLAGS}" @@ -769,6 +770,11 @@ src_configure() { if [[ -n ${disable_elf_hack} ]] ; then mozconfig_add_options_ac 'elf-hack is broken when using Clang' --disable-elf-hack fi + elif tc-is-gcc ; then + if ver_test $(gcc-fullversion) -ge 10 ; then + einfo "Forcing -fno-tree-loop-vectorize to workaround GCC bug, see bug 758446 ..." + append-cxxflags -fno-tree-loop-vectorize + fi fi # Additional ARCH support @@ -814,6 +820,7 @@ src_configure() { # Show flags we will use einfo "Build CFLAGS: ${CFLAGS}" + einfo "Build CXXFLAGS: ${CXXFLAGS}" einfo "Build LDFLAGS: ${LDFLAGS}" einfo "Build RUSTFLAGS: ${RUSTFLAGS}" diff --git a/www-client/firefox/firefox-84.0.ebuild b/www-client/firefox/firefox-84.0.ebuild index 6d3e1b6e40d8..e2bb2e858214 100644 --- a/www-client/firefox/firefox-84.0.ebuild +++ b/www-client/firefox/firefox-84.0.ebuild @@ -521,6 +521,7 @@ src_prepare() { src_configure() { # Show flags set at the beginning einfo "Current CFLAGS: ${CFLAGS}" + einfo "Current CXXFLAGS: ${CXXFLAGS}" einfo "Current LDFLAGS: ${LDFLAGS}" einfo "Current RUSTFLAGS: ${RUSTFLAGS}" @@ -767,6 +768,11 @@ src_configure() { if [[ -n ${disable_elf_hack} ]] ; then mozconfig_add_options_ac 'elf-hack is broken when using Clang' --disable-elf-hack fi + elif tc-is-gcc ; then + if ver_test $(gcc-fullversion) -ge 10 ; then + einfo "Forcing -fno-tree-loop-vectorize to workaround GCC bug, see bug 758446 ..." + append-cxxflags -fno-tree-loop-vectorize + fi fi # Additional ARCH support @@ -813,6 +819,7 @@ src_configure() { # Show flags we will use einfo "Build CFLAGS: ${CFLAGS}" + einfo "Build CXXFLAGS: ${CXXFLAGS}" einfo "Build LDFLAGS: ${LDFLAGS}" einfo "Build RUSTFLAGS: ${RUSTFLAGS}" -- cgit v1.2.3-65-gdbad