forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-qt/qtbase: fix build with gcc15, incl. for revdeps
Issue is in public headers, so revbump is necessary. Please ensure update to qtbase-6.7.2-r2 before reporting new bugs while testing gcc15. Thankfully most normal users should have updated long before gcc15 is keyworded (and further stabled) so there should be little need to set lower bounds. Closes: https://bugs.gentoo.org/937808 Closes: https://bugs.gentoo.org/937809 Closes: https://bugs.gentoo.org/937824 Closes: https://bugs.gentoo.org/937825 Closes: https://bugs.gentoo.org/937828 Closes: https://bugs.gentoo.org/937829 Thanks-to: Sam James <[email protected]> Signed-off-by: Ionen Wolkens <[email protected]>
- Loading branch information
Showing
5 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
https://codereview.qt-project.org/c/qt/qtbase/+/582403 | ||
From: Sam James <[email protected]> | ||
Date: Sat, 10 Aug 2024 16:43:05 +0100 | ||
Subject: [PATCH] Fix ODR violation for IsFloatType_v | ||
|
||
With recent GCC 15 trunk, I started to see: | ||
``` | ||
ld: .../kwalletentry.cc.o:(.rodata+0x0): multiple definition of `QtPrivate::IsFloatType_v<_Float16>'; | ||
src/runtime/kwalletd/backend/CMakeFiles/KF6WalletBackend.dir/cbc.cc.o:(.rodata+0x0): first defined here | ||
``` | ||
|
||
The issue is that constexpr is only implicitly inline for functions or | ||
static data members [0], so the two constexpr IsFloatType_v definitions | ||
here cause an ODR violation. | ||
|
||
Explicitly mark them as inline constexpr. | ||
|
||
[0] http://eel.is/c++draft/dcl.constexpr#1.sentence-3 | ||
--- a/src/corelib/global/qcomparehelpers.h | ||
+++ b/src/corelib/global/qcomparehelpers.h | ||
@@ -348,9 +348,9 @@ | ||
|
||
template <typename T> | ||
-constexpr bool IsFloatType_v = std::is_floating_point_v<T>; | ||
+inline constexpr bool IsFloatType_v = std::is_floating_point_v<T>; | ||
|
||
#if QFLOAT16_IS_NATIVE | ||
template <> | ||
-constexpr bool IsFloatType_v<QtPrivate::NativeFloat16Type> = true; | ||
+inline constexpr bool IsFloatType_v<QtPrivate::NativeFloat16Type> = true; | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters