Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/glibc/
Date: Sat, 20 Aug 2022 00:32:59
Message-Id: 1660955556.4fd2400c18a36b8aad51328b3731fef55968e4fc.sam@gentoo
1 commit: 4fd2400c18a36b8aad51328b3731fef55968e4fc
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 20 00:31:21 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 20 00:32:36 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4fd2400c
7
8 sys-libs/glibc: restore GCC < 11.2.1_p* AVX512 sanity check
9
10 It's cheap and it avoids build failures, so why not?
11
12 Only really affects Tiger Lake or so though. Fixed
13 in newer GCCs anyway.
14
15 Bug: https://bugs.gentoo.org/823780
16 Signed-off-by: Sam James <sam <AT> gentoo.org>
17
18 sys-libs/glibc/glibc-2.35-r8.ebuild | 6 ++++++
19 sys-libs/glibc/glibc-2.36.ebuild | 6 ++++++
20 sys-libs/glibc/glibc-9999.ebuild | 6 ++++++
21 3 files changed, 18 insertions(+)
22
23 diff --git a/sys-libs/glibc/glibc-2.35-r8.ebuild b/sys-libs/glibc/glibc-2.35-r8.ebuild
24 index c50c5ba3fbca..25a735d93196 100644
25 --- a/sys-libs/glibc/glibc-2.35-r8.ebuild
26 +++ b/sys-libs/glibc/glibc-2.35-r8.ebuild
27 @@ -326,6 +326,12 @@ setup_target_flags() {
28 fi
29 # For compatibility with older binaries at slight performance cost.
30 use stack-realign && export CFLAGS_x86+=" -mstackrealign"
31 +
32 + # Workaround for bug #823780.
33 + if tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then
34 + export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f"
35 + einfo "Auto adding -mno-avx512f to CFLAGS_x86 for buggy GCC version (bug #823780) (ABI=${ABI})"
36 + fi
37 fi
38 ;;
39 mips)
40
41 diff --git a/sys-libs/glibc/glibc-2.36.ebuild b/sys-libs/glibc/glibc-2.36.ebuild
42 index df09f5c97b9d..dc52203e0fe7 100644
43 --- a/sys-libs/glibc/glibc-2.36.ebuild
44 +++ b/sys-libs/glibc/glibc-2.36.ebuild
45 @@ -326,6 +326,12 @@ setup_target_flags() {
46 fi
47 # For compatibility with older binaries at slight performance cost.
48 use stack-realign && export CFLAGS_x86+=" -mstackrealign"
49 +
50 + # Workaround for bug #823780.
51 + if tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then
52 + export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f"
53 + einfo "Auto adding -mno-avx512f to CFLAGS_x86 for buggy GCC version (bug #823780) (ABI=${ABI})"
54 + fi
55 fi
56 ;;
57 mips)
58
59 diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
60 index b35b2febd192..92b54a5a254a 100644
61 --- a/sys-libs/glibc/glibc-9999.ebuild
62 +++ b/sys-libs/glibc/glibc-9999.ebuild
63 @@ -326,6 +326,12 @@ setup_target_flags() {
64 fi
65 # For compatibility with older binaries at slight performance cost.
66 use stack-realign && export CFLAGS_x86+=" -mstackrealign"
67 +
68 + # Workaround for bug #823780.
69 + if tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then
70 + export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f"
71 + einfo "Auto adding -mno-avx512f to CFLAGS_x86 for buggy GCC version (bug #823780) (ABI=${ABI})"
72 + fi
73 fi
74 ;;
75 mips)