Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
Date: Thu, 02 Mar 2023 19:18:43
Message-Id: 1677784709.32189d086ac2495b35ea6ed5547b584b731e8532.floppym@gentoo
1 commit: 32189d086ac2495b35ea6ed5547b584b731e8532
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 2 16:36:53 2023 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 2 19:18:29 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32189d08
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
16 dev-qt/qtbase/files/qtbase-6-march.patch | 46 ++++++++++++++++++++++++++++++++
17 dev-qt/qtbase/qtbase-6.4.2.ebuild | 4 +++
18 2 files changed, 50 insertions(+)
19
20 diff --git a/dev-qt/qtbase/files/qtbase-6-march.patch b/dev-qt/qtbase/files/qtbase-6-march.patch
21 new file mode 100644
22 index 000000000000..2c5cb0a010cb
23 --- /dev/null
24 +++ b/dev-qt/qtbase/files/qtbase-6-march.patch
25 @@ -0,0 +1,46 @@
26 +https://bugreports.qt.io/browse/QTBUG-111698
27 +https://bugs.gentoo.org/898644
28 +
29 +From 5fe96c901cd1ecd3e53acedeb97efd38b6af49a4 Mon Sep 17 00:00:00 2001
30 +From: Mike Gilbert <floppym@g.o>
31 +Date: Wed, 1 Mar 2023 21:31:22 -0500
32 +Subject: [PATCH] Don't error on partial support for x86-64 v3/v4
33 +
34 +Bug: https://bugs.gentoo.org/898644
35 +---
36 + src/corelib/global/qsimd_p.h | 12 ++----------
37 + 1 file changed, 2 insertions(+), 10 deletions(-)
38 +
39 +diff --git a/src/corelib/global/qsimd_p.h b/src/corelib/global/qsimd_p.h
40 +index 1d12902a0a..1449d75d5c 100644
41 +--- a/src/corelib/global/qsimd_p.h
42 ++++ b/src/corelib/global/qsimd_p.h
43 +@@ -227,11 +227,7 @@ asm(
44 + // macOS's fat binaries support the "x86_64h" sub-architecture and the GNU libc
45 + // ELF loader also supports a "haswell/" subdir (e.g., /usr/lib/haswell).
46 + # define ARCH_HASWELL_MACROS (__AVX2__ + __BMI2__ + __FMA__ + __LZCNT__)
47 +-# if ARCH_HASWELL_MACROS != 0
48 +-# if ARCH_HASWELL_MACROS != 4
49 +-# error "Please enable all x86-64-v3 extensions; you probably want to use -march=haswell or -march=x86-64-v3 instead of -mavx2"
50 +-# endif
51 +-static_assert(ARCH_HASWELL_MACROS, "Undeclared identifiers indicate which features are missing.");
52 ++# if ARCH_HASWELL_MACROS == 4
53 + # define __haswell__ 1
54 + # endif
55 + # undef ARCH_HASWELL_MACROS
56 +@@ -243,11 +239,7 @@ static_assert(ARCH_HASWELL_MACROS, "Undeclared identifiers indicate which featur
57 + // with AVX512 support and it includes all of these too.
58 + //
59 + # define ARCH_SKX_MACROS (__AVX512F__ + __AVX512BW__ + __AVX512CD__ + __AVX512DQ__ + __AVX512VL__)
60 +-# if ARCH_SKX_MACROS != 0
61 +-# if ARCH_SKX_MACROS != 5
62 +-# error "Please enable all x86-64-v4 extensions; you probably want to use -march=skylake-avx512 or -march=x86-64-v4 instead of -mavx512f"
63 +-# endif
64 +-static_assert(ARCH_SKX_MACROS, "Undeclared identifiers indicate which features are missing.");
65 ++# if ARCH_SKX_MACROS == 5
66 + # define __skylake_avx512__ 1
67 + # endif
68 + # undef ARCH_SKX_MACROS
69 +--
70 +2.39.2
71 +
72
73 diff --git a/dev-qt/qtbase/qtbase-6.4.2.ebuild b/dev-qt/qtbase/qtbase-6.4.2.ebuild
74 index 589a3d13aacf..c6545a5f1a0c 100644
75 --- a/dev-qt/qtbase/qtbase-6.4.2.ebuild
76 +++ b/dev-qt/qtbase/qtbase-6.4.2.ebuild
77 @@ -102,6 +102,10 @@ DEPEND="
78 "
79 RDEPEND="${DEPEND}"
80
81 +PATCHES=(
82 + "${FILESDIR}/qtbase-6-march.patch"
83 +)
84 +
85 src_configure() {
86 local mycmakeargs=(
87 -DINSTALL_ARCHDATADIR=${QT6_ARCHDATADIR}