From 6fb7d0a7131b5a5938b12673f4b260d66cc1a527 Mon Sep 17 00:00:00 2001 From: Denis Pronin Date: Thu, 13 Jul 2023 17:55:14 +0300 Subject: dev-qt/qtwebengine: fix compiling with clang-16 clang-16 complains about casting an integer value that exceeds an enumeration capacity in the class base::BitField to not modify chromium code we just cancel warning about this circumstance to prevent it from being converted to an error that fails compilation [sam: Note that this is a bandaid and won't work with Clang 17.] Bug: https://bugs.gentoo.org/903573 Signed-off-by: Denis Pronin Closes: https://github.com/gentoo/gentoo/pull/31869 Signed-off-by: Sam James --- .../files/qtwebengine-5.15.10_p20230623-clang16.patch | 15 +++++++++++++++ dev-qt/qtwebengine/qtwebengine-5.15.10_p20230623.ebuild | 5 ++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 dev-qt/qtwebengine/files/qtwebengine-5.15.10_p20230623-clang16.patch diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.10_p20230623-clang16.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.10_p20230623-clang16.patch new file mode 100644 index 000000000000..2d8f8482e1b4 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.10_p20230623-clang16.patch @@ -0,0 +1,15 @@ +https://bugs.gentoo.org/903573 +--- a/src/3rdparty/chromium/v8/src/base/bit-field.h ++++ b/src/3rdparty/chromium/v8/src/base/bit-field.h +@@ -39,8 +39,11 @@ + static constexpr int kLastUsedBit = kShift + kSize - 1; + static constexpr U kNumValues = U{1} << kSize; + ++ #pragma clang diagnostic push ++ #pragma clang diagnostic ignored "-Wenum-constexpr-conversion" + // Value for the field with all bits set. + static constexpr T kMax = static_cast(kNumValues - 1); ++ #pragma clang diagnostic pop + + template + using Next = BitField; diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.10_p20230623.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.10_p20230623.ebuild index ce07a4c85372..937b8d59b20d 100644 --- a/dev-qt/qtwebengine/qtwebengine-5.15.10_p20230623.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-5.15.10_p20230623.ebuild @@ -100,7 +100,10 @@ BDEPEND="${PYTHON_DEPS} ppc64? ( >=dev-util/gn-0.1807 ) " -PATCHES=( "${WORKDIR}/${PN}-5.15.8_p20230313-patchset" ) +PATCHES=( + "${WORKDIR}/${PN}-5.15.8_p20230313-patchset" + "${FILESDIR}/${PN}-5.15.10_p20230623-clang16.patch" +) qtwebengine_check-reqs() { # bug #307861 -- cgit v1.2.3-65-gdbad