From a87db277ce3b7bae2000405f878f0e40359fa468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Matysiak?= Date: Thu, 29 Aug 2024 15:43:00 +0200 Subject: [PATCH] Prevent linker error in tst_qfloat16::ordering on VxWorks tst_qfloat16::ordering tests that qfloat16 can be compared with a long double. When on x86_64, conversion from qfloat16 to long double leads to a linker error due to undefined reference to __extendhfxf2. This is a bug in the VxWorks' toolchain. It has been acknowledged by WindRiver and it's being tracked in ticket 00154117. Since - this is a platform problem and Qt has no control over it, - the conversion won't work for any client code anyway, so not testing it is not hiding any issues, mitigate the problem for now by not compiling the problematic test code on VxWorks. Task-number: QTBUG-115777 Change-Id: Icf81da405d1392ae3bcacc61745a54d68b849b89 Reviewed-by: Thiago Macieira (cherry picked from commit 6ef631c7992cc81ead158c5c5801f689b21fc378) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp b/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp index 07507ae6ae4..f4f27185998 100644 --- a/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp +++ b/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp @@ -184,7 +184,13 @@ void tst_qfloat16::ordering() CHECK_FP(qfloat16); CHECK_FP(float); CHECK_FP(double); + // Qt built for VxWorks x86_64 fails to link due to undefined reference to + // __extendhfxf2 when below check is enabled. + // This has been acknowledged by WindRiver as a bug + // and is being tracked in ticket 00154117 +#if !(defined(Q_OS_VXWORKS) && defined(Q_PROCESSOR_X86_64)) CHECK_FP(long double); +#endif #undef CHECK_FP