public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ionen Wolkens" <ionen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
Date: Tue, 13 Aug 2024 01:27:32 +0000 (UTC)	[thread overview]
Message-ID: <1723512351.ca034bbed6d34c7e87a013a35ac9d72f5f8dc040.ionen@gentoo> (raw)

commit:     ca034bbed6d34c7e87a013a35ac9d72f5f8dc040
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 12 21:22:22 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Aug 13 01:25:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca034bbe

dev-qt/qtbase: backport float16 fix for systems without sse2

Needs a revbump but it was done in previous commit at same
time for another reason.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../qtbase/files/qtbase-6.7.2-float16-sse2.patch   | 43 ++++++++++++++++++++++
 dev-qt/qtbase/qtbase-6.7.2-r2.ebuild               |  1 +
 2 files changed, 44 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-float16-sse2.patch b/dev-qt/qtbase/files/qtbase-6.7.2-float16-sse2.patch
new file mode 100644
index 000000000000..a54c9daa42b9
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.7.2-float16-sse2.patch
@@ -0,0 +1,43 @@
+Backport from 6.7.3 as it may cause major problems for x86 sse2-less
+systems using gcc14.
+
+https://github.com/qt/qtbase/commit/39fa7e7bef90be2940c5f736935f963e3969e0bd
+From: Dmitry Shachnev <mitya57@gmail.com>
+Date: Sat, 27 Jul 2024 23:03:07 +0300
+Subject: [PATCH] Use _Float16 only when SSE2 is enabled
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The GCC documentation [1] says: “On x86 targets with SSE2 enabled, GCC
+supports half-precision (16-bit) floating point via the _Float16 type”.
+
+On non-SSE2 x86 (such as Debian i386 baseline [2]), __FLT16_MAX__ is
+defined starting with GCC 14 [3], however any non-trivial use of the
+_Float16 type results in an error:
+
+error: operation not permitted on type ‘_Float16’ without option ‘-msse2’
+
+which makes some packages fail to build on i386 architecture [4].
+
+[1]: https://gcc.gnu.org/onlinedocs/gcc/Half-Precision.html
+[2]: https://wiki.debian.org/ArchitectureSpecificsMemo#i386-1
+[3]: https://gcc.gnu.org/g:9a19fa8b616f83474c35cc5b34a3865073ced829
+[4]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076986
+--- a/src/corelib/global/qtypes.h
++++ b/src/corelib/global/qtypes.h
+@@ -264,11 +264,10 @@
+ #  define QFLOAT16_IS_NATIVE        1
+ using NativeFloat16Type = decltype(__FLT16_MAX__);
+-#elif defined(Q_CC_GNU_ONLY) && defined(__FLT16_MAX__)
++#elif defined(Q_CC_GNU_ONLY) && defined(__FLT16_MAX__) && defined(__ARM_FP16_FORMAT_IEEE)
+ #  define QFLOAT16_IS_NATIVE        1
+-#  ifdef __ARM_FP16_FORMAT_IEEE
+ using NativeFloat16Type = __fp16;
+-#  else
++#elif defined(Q_CC_GNU_ONLY) && defined(__FLT16_MAX__) && defined(__SSE2__)
++#  define QFLOAT16_IS_NATIVE        1
+ using NativeFloat16Type = _Float16;
+-#  endif
+ #else
+ #  define QFLOAT16_IS_NATIVE        0

diff --git a/dev-qt/qtbase/qtbase-6.7.2-r2.ebuild b/dev-qt/qtbase/qtbase-6.7.2-r2.ebuild
index 3b8705b716fd..68a5c8f9e4fa 100644
--- a/dev-qt/qtbase/qtbase-6.7.2-r2.ebuild
+++ b/dev-qt/qtbase/qtbase-6.7.2-r2.ebuild
@@ -147,6 +147,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
 	"${FILESDIR}"/${PN}-6.7.2-CVE-2024-39936.patch
 	"${FILESDIR}"/${PN}-6.7.2-gcc15-odr.patch
+	"${FILESDIR}"/${PN}-6.7.2-float16-sse2.patch
 )
 
 src_prepare() {


             reply	other threads:[~2024-08-13  1:27 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-13  1:27 Ionen Wolkens [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-03 22:39 [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/ James Le Cuirot
2025-02-06 14:33 Ionen Wolkens
2025-02-02 12:26 Ionen Wolkens
2024-10-08 17:46 Ionen Wolkens
2024-09-03  7:44 Ionen Wolkens
2024-08-25 17:07 Maciej Mrozowski
2024-08-24  8:54 Ionen Wolkens
2024-08-13  1:27 Ionen Wolkens
2024-06-08 13:41 Ionen Wolkens
2024-05-02 13:09 Ionen Wolkens
2024-04-19  7:55 Ionen Wolkens
2024-04-05 14:37 Ionen Wolkens
2024-01-03 15:52 Ionen Wolkens
2023-12-19 20:33 Ionen Wolkens
2023-11-29  5:36 Ionen Wolkens
2023-10-09 23:03 Ionen Wolkens
2023-09-24 17:22 Ionen Wolkens
2023-07-20 19:41 Jimi Huotari
2023-06-10 13:33 Jimi Huotari
2023-06-02 15:39 Jimi Huotari
2023-05-24  6:52 Jimi Huotari
2023-03-02 19:18 Mike Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1723512351.ca034bbed6d34c7e87a013a35ac9d72f5f8dc040.ionen@gentoo \
    --to=ionen@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox