SHA256
1
0
forked from pool/libqt5-qtdoc
libqt5-qtdoc/workaround-qdoc-failure.patch

31 lines
1.3 KiB
Diff
Raw Normal View History

From: Michal Srb <msrb@suse.com>
Subject: Assertion failure in libclang on i586 (when building qtdoc)
References: boo#1092425
I have found that the issue is caused by `qfloat::operator float()` in qtbase/src/corelib/global/qfloat16.h.
For some reason the declaration is omitted when building the documentation using `#ifndef Q_QDOC`, but its definition is there unconditionally. Omitting the definition prevents the qdoc failure. See the attached patch.
I don't know yet why it behaves differently on x86 and x86_64, perhaps it has something to do with the body of the method, which is different depending on the architecture.
Also, even with broken code, it should not crash with assertion failure. So there must be something broken in either libclang or qdoc, but I did not yet find what. Perhaps we could use this patch for the time being.
--- qt-everywhere-src-5.11.0-rc.out/qtbase/src/corelib/global/qfloat16.h 2018-05-30 08:12:03.405142221 +0000
+++ qt-everywhere-src-5.11.0-rc/qtbase/src/corelib/global/qfloat16.h 2018-05-30 07:59:19.637190880 +0000
@@ -144,6 +144,7 @@
}
QT_WARNING_POP
+#ifndef Q_QDOC
inline qfloat16::operator float() const Q_DECL_NOTHROW
{
#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__F16C__)
@@ -162,6 +163,7 @@
return f;
#endif
}
+#endif
inline qfloat16 operator-(qfloat16 a) Q_DECL_NOTHROW
{