Don't use yield on CPUs that might not support it
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Sun, 22 Sep 2024 19:08:16 +0000 (22:08 +0300)
committerDmitry Shachnev <mitya57@debian.org>
Sun, 22 Sep 2024 19:08:16 +0000 (22:08 +0300)
Gbp-Pq: Name armel-noyield.patch

src/corelib/global/qsimd_p.h

index 3a5cadaf811ef3b1309a8784fa88c57c16dc160e..196138eab9c42b404334b8a20da2869c6b43bb9a 100644 (file)
@@ -417,7 +417,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