commit:     876602ee223c6c4225371b428a346f0b2d7f2020
Author:     Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 16 23:30:13 2021 +0000
Commit:     Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org>
CommitDate: Tue Nov 16 23:33:44 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=876602ee

sys-libs/glibc: add -mno-avx512f to -m32 build for gcc 11 bug

No need to revbump as this only affects folks who cannot currently
compile.

Closes: https://bugs.gentoo.org/823780
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Jason A. Donenfeld <zx2c4 <AT> gentoo.org>

 sys-libs/glibc/glibc-2.34-r2.ebuild | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sys-libs/glibc/glibc-2.34-r2.ebuild 
b/sys-libs/glibc/glibc-2.34-r2.ebuild
index 4510d31aeb66..00c85cf62a55 100644
--- a/sys-libs/glibc/glibc-2.34-r2.ebuild
+++ b/sys-libs/glibc/glibc-2.34-r2.ebuild
@@ -326,6 +326,14 @@ setup_target_flags() {
                                export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
                                einfo "Auto adding -march=${t} to CFLAGS_x86 
#185404 (ABI=${ABI})"
                        fi
+
+                       # Workaround for https://bugs.gentoo.org/823780. This 
really should
+                       # be removed when the upstream bug 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103275
+                       # is fixed in our tree, either via 11.3 or an 11.2p2 
patch set.
+                       if [[ ${ABI} == x86 ]] && tc-is-gcc && 
(($(gcc-major-version) == 11)) && (($(gcc-minor-version) < 3)); then
+                               export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f"
+                               einfo "Auto adding -mno-avx512f to CFLAGS_x86 
#823780 (ABI=${ABI})"
+                       fi
                ;;
                mips)
                        # The mips abi cannot support the GNU style hashes. 
#233233

Reply via email to