Gentoo Archives: gentoo-commits

From: Jimi Huotari <chiitoo@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/qt:master commit in: dev-qt/qtbase/files/, dev-qt/qtbase/
Date: Fri, 03 Mar 2023 10:08:49
Message-Id: 1677837776.b765522c50168e50a5e07e46d6e0b650c2a11bd0.chiitoo@gentoo
1 commit: b765522c50168e50a5e07e46d6e0b650c2a11bd0
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 2 16:29:40 2023 +0000
4 Commit: Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 3 10:02:56 2023 +0000
6 URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=b765522c
7
8 dev-qt/qtbase: apply patch for -march compat
9
10 Upstream expects people to use specific -march values, but that just causes
11 problems for Gentoo users. Remove the offending check.
12
13 Bug: https://bugs.gentoo.org/898644
14 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
15 Closes: https://github.com/gentoo/qt/pull/266
16 Signed-off-by: Jimi Huotari <chiitoo <AT> gentoo.org>
17
18 dev-qt/qtbase/files/qtbase-6-march.patch | 46 ++++++++++++++++++++++++++++++++
19 dev-qt/qtbase/qtbase-6.4.9999.ebuild | 4 +++
20 dev-qt/qtbase/qtbase-6.5.9999.ebuild | 4 +++
21 dev-qt/qtbase/qtbase-6.9999.ebuild | 4 +++
22 4 files changed, 58 insertions(+)
23
24 diff --git a/dev-qt/qtbase/files/qtbase-6-march.patch b/dev-qt/qtbase/files/qtbase-6-march.patch
25 new file mode 100644
26 index 00000000..2c5cb0a0
27 --- /dev/null
28 +++ b/dev-qt/qtbase/files/qtbase-6-march.patch
29 @@ -0,0 +1,46 @@
30 +https://bugreports.qt.io/browse/QTBUG-111698
31 +https://bugs.gentoo.org/898644
32 +
33 +From 5fe96c901cd1ecd3e53acedeb97efd38b6af49a4 Mon Sep 17 00:00:00 2001
34 +From: Mike Gilbert <floppym@g.o>
35 +Date: Wed, 1 Mar 2023 21:31:22 -0500
36 +Subject: [PATCH] Don't error on partial support for x86-64 v3/v4
37 +
38 +Bug: https://bugs.gentoo.org/898644
39 +---
40 + src/corelib/global/qsimd_p.h | 12 ++----------
41 + 1 file changed, 2 insertions(+), 10 deletions(-)
42 +
43 +diff --git a/src/corelib/global/qsimd_p.h b/src/corelib/global/qsimd_p.h
44 +index 1d12902a0a..1449d75d5c 100644
45 +--- a/src/corelib/global/qsimd_p.h
46 ++++ b/src/corelib/global/qsimd_p.h
47 +@@ -227,11 +227,7 @@ asm(
48 + // macOS's fat binaries support the "x86_64h" sub-architecture and the GNU libc
49 + // ELF loader also supports a "haswell/" subdir (e.g., /usr/lib/haswell).
50 + # define ARCH_HASWELL_MACROS (__AVX2__ + __BMI2__ + __FMA__ + __LZCNT__)
51 +-# if ARCH_HASWELL_MACROS != 0
52 +-# if ARCH_HASWELL_MACROS != 4
53 +-# error "Please enable all x86-64-v3 extensions; you probably want to use -march=haswell or -march=x86-64-v3 instead of -mavx2"
54 +-# endif
55 +-static_assert(ARCH_HASWELL_MACROS, "Undeclared identifiers indicate which features are missing.");
56 ++# if ARCH_HASWELL_MACROS == 4
57 + # define __haswell__ 1
58 + # endif
59 + # undef ARCH_HASWELL_MACROS
60 +@@ -243,11 +239,7 @@ static_assert(ARCH_HASWELL_MACROS, "Undeclared identifiers indicate which featur
61 + // with AVX512 support and it includes all of these too.
62 + //
63 + # define ARCH_SKX_MACROS (__AVX512F__ + __AVX512BW__ + __AVX512CD__ + __AVX512DQ__ + __AVX512VL__)
64 +-# if ARCH_SKX_MACROS != 0
65 +-# if ARCH_SKX_MACROS != 5
66 +-# error "Please enable all x86-64-v4 extensions; you probably want to use -march=skylake-avx512 or -march=x86-64-v4 instead of -mavx512f"
67 +-# endif
68 +-static_assert(ARCH_SKX_MACROS, "Undeclared identifiers indicate which features are missing.");
69 ++# if ARCH_SKX_MACROS == 5
70 + # define __skylake_avx512__ 1
71 + # endif
72 + # undef ARCH_SKX_MACROS
73 +--
74 +2.39.2
75 +
76
77 diff --git a/dev-qt/qtbase/qtbase-6.4.9999.ebuild b/dev-qt/qtbase/qtbase-6.4.9999.ebuild
78 index 8398b9b5..5e383b62 100644
79 --- a/dev-qt/qtbase/qtbase-6.4.9999.ebuild
80 +++ b/dev-qt/qtbase/qtbase-6.4.9999.ebuild
81 @@ -102,6 +102,10 @@ DEPEND="
82 "
83 RDEPEND="${DEPEND}"
84
85 +PATCHES=(
86 + "${FILESDIR}/qtbase-6-march.patch"
87 +)
88 +
89 src_configure() {
90 local mycmakeargs=(
91 -DINSTALL_ARCHDATADIR=${QT6_ARCHDATADIR}
92
93 diff --git a/dev-qt/qtbase/qtbase-6.5.9999.ebuild b/dev-qt/qtbase/qtbase-6.5.9999.ebuild
94 index 289aee78..a8971295 100644
95 --- a/dev-qt/qtbase/qtbase-6.5.9999.ebuild
96 +++ b/dev-qt/qtbase/qtbase-6.5.9999.ebuild
97 @@ -102,6 +102,10 @@ DEPEND="
98 "
99 RDEPEND="${DEPEND}"
100
101 +PATCHES=(
102 + "${FILESDIR}/qtbase-6-march.patch"
103 +)
104 +
105 src_configure() {
106 local mycmakeargs=(
107 -DINSTALL_ARCHDATADIR=${QT6_ARCHDATADIR}
108
109 diff --git a/dev-qt/qtbase/qtbase-6.9999.ebuild b/dev-qt/qtbase/qtbase-6.9999.ebuild
110 index ed5fe710..ce23e756 100644
111 --- a/dev-qt/qtbase/qtbase-6.9999.ebuild
112 +++ b/dev-qt/qtbase/qtbase-6.9999.ebuild
113 @@ -102,6 +102,10 @@ DEPEND="
114 "
115 RDEPEND="${DEPEND}"
116
117 +PATCHES=(
118 + "${FILESDIR}/qtbase-6-march.patch"
119 +)
120 +
121 src_configure() {
122 local mycmakeargs=(
123 -DINSTALL_ARCHDATADIR=${QT6_ARCHDATADIR}