From 775c9b42c419777e5eaa9136213adcbfa1798b12 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 27 Mar 2020 23:36:29 +0400 Subject: [PATCH] Fix build for Xcode 11.4 and Qt 5.6.2. --- qtbase_5_6_2.diff | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/qtbase_5_6_2.diff b/qtbase_5_6_2.diff index 92a5451..2e9c0e1 100644 --- a/qtbase_5_6_2.diff +++ b/qtbase_5_6_2.diff @@ -35,6 +35,48 @@ index 391fbcc519..d07802bb7a 100644 if (totalWritten == 0) { // Note: Only return error if the first WriteFile failed. q->setError(QFile::WriteError, qt_error_string()); +diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h +index d689654b29..582ec9936b 100644 +--- a/src/corelib/tools/qsimd_p.h ++++ b/src/corelib/tools/qsimd_p.h +@@ -456,20 +456,23 @@ static __forceinline unsigned long _bit_scan_forward(uint val) + && !defined(Q_CC_INTEL) + // Clang is missing the intrinsic for _bit_scan_reverse + // GCC only added it in version 4.5 +-static inline __attribute__((always_inline)) +-unsigned _bit_scan_reverse(unsigned val) +-{ +- unsigned result; +- asm("bsr %1, %0" : "=r" (result) : "r" (val)); +- return result; +-} +-static inline __attribute__((always_inline)) +-unsigned _bit_scan_forward(unsigned val) +-{ +- unsigned result; +- asm("bsf %1, %0" : "=r" (result) : "r" (val)); +- return result; +-} ++// ++// Patch: In Xcode 11.4 those are defined already. ++// ++//static inline __attribute__((always_inline)) ++//unsigned _bit_scan_reverse(unsigned val) ++//{ ++// unsigned result; ++// asm("bsr %1, %0" : "=r" (result) : "r" (val)); ++// return result; ++//} ++//static inline __attribute__((always_inline)) ++//unsigned _bit_scan_forward(unsigned val) ++//{ ++// unsigned result; ++// asm("bsf %1, %0" : "=r" (result) : "r" (val)); ++// return result; ++//} + # endif + #endif // Q_PROCESSOR_X86 + diff --git a/src/corelib/tools/qunicodetables.cpp b/src/corelib/tools/qunicodetables.cpp index 14e4fd10aa..0619a176a7 100644 --- a/src/corelib/tools/qunicodetables.cpp