meta-qt6/recipes-qt/qt6/qtbase/0006-qnumeric-disable-use-of-stdckdint.h.patch
Samuli Piippo 47df0df388 qtbase: workaround GCC15 issue with stdckdint.h header
Change 08ebe3465cc2fce98662b5833b75503490f66265 in qtbase enabled
support for C23/C++26 <stdckdint.h>.
Similar to GCC14 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121811),
GCC15 has problem using stdckdint.h in Yocto setup as default include
paths are ordered so that the C header is found first.

| nativesdk-qtbase/6.11.0/sources/qtbase-6.11.0/src/corelib/global/qnumeric.h: In function 'constexpr std::enable_if_t<((bool)is_unsigned_v<T>), bool> qAddOverflow(T, T, T*)':
| nativesdk-qtbase/6.11.0/sources/qtbase-6.11.0/src/corelib/global/qnumeric.h:282:12: error: '_Bool' was not declared in this scope [-Wtemplate-body]
|   282 |     return ckd_add(r, v1, v2);
|       |            ^~~~~~~

As a workaround, disable the feature until better solution
is found.

Change-Id: I0eeeb8bc97411646a7ccc71aa38f5d6fe8a6e16a
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
2025-10-30 07:09:27 +00:00

34 lines
1.6 KiB
Diff

From d194661b728c0fa8c9d7ef6a8961b6eb7077ceb9 Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Mon, 27 Oct 2025 13:11:00 +0000
Subject: [PATCH] qnumeric: disable use of stdckdint.h
Similar to GCC14 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121811),
GCC15 has problem using stdckdint.h in Yocto setup as default include
paths are ordered so that the C header is found first.
| nativesdk-qtbase/6.11.0/sources/qtbase-6.11.0/src/corelib/global/qnumeric.h: In function 'constexpr std::enable_if_t<((bool)is_unsigned_v<T>), bool> qAddOverflow(T, T, T*)':
| nativesdk-qtbase/6.11.0/sources/qtbase-6.11.0/src/corelib/global/qnumeric.h:282:12: error: '_Bool' was not declared in this scope [-Wtemplate-body]
| 282 | return ckd_add(r, v1, v2);
| | ^~~~~~~
Upstream-Status: Inappropriate [oe specific]
Change-Id: Ic158ebdc81aa31bed54b703c7ee2c3a436c51c90
---
src/corelib/global/qnumeric.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/corelib/global/qnumeric.h b/src/corelib/global/qnumeric.h
index 6caf3510f8a..cea5738e524 100644
--- a/src/corelib/global/qnumeric.h
+++ b/src/corelib/global/qnumeric.h
@@ -25,7 +25,7 @@
// usable. Its provided functions are in the global namespace even in C++ (not
// std::) because they are sometimes macros.
# include <QtCore/qstdlibdetection.h>
-# if defined(Q_CC_GNU_ONLY) && (defined(Q_STL_LIBCPP) || Q_CC_GNU_ONLY < 1500)
+# if defined(Q_CC_GNU_ONLY)
// broken - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121811
# elif defined(Q_OS_FREEBSD) && __FreeBSD_version <= 1500000
// broken - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290299