Don't use yield on CPUs that might not support it
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Fri, 19 Aug 2022 01:08:54 +0000 (02:08 +0100)
committerLisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
Fri, 19 Aug 2022 01:08:54 +0000 (02:08 +0100)
Gbp-Pq: Name armel-noyield.patch

src/corelib/global/qsimd_p.h

index d270d09f2ff09fcf982202517ef25cae30b273cf..67f6733e83e511cd7ddf8e43ddce303de925f3bb 100644 (file)
@@ -428,7 +428,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