Don't use yield on CPUs that might not support it
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Thu, 29 Feb 2024 21:45:27 +0000 (21:45 +0000)
committerBenjamin Drung <bdrung@debian.org>
Thu, 29 Feb 2024 21:45:27 +0000 (21:45 +0000)
Gbp-Pq: Name armel-noyield.patch

src/corelib/global/qsimd_p.h

index 3773419835b65234fe4e97f7e20ebc4739ea1948..fce26015195ed73316903b96d40b5c462ce78a45 100644 (file)
@@ -401,7 +401,9 @@ static inline void qYieldCpu()
          https://stackoverflow.com/a/70076751/134841
          https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105416
     */
+#    if !defined(Q_CC_GNU) || (__ARM_ARCH >= 7)
     asm volatile("yield"); /* this works everywhere */
+#    endif
 #  else
     __yield(); /* this is what should work everywhere */
 #  endif