Cherry-pick upstream patch for non-gcc/clang/msvc compilers

Fix build w/ non-GCC-compatible Un*x/Arm compilers

Fixes: QTBUG-93779
Change-Id: Ib52e9ded6e2814c7998d6cd798e945da0f87f7a1
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 4341f6763b8a737ebc07bb78ead22bc05a1a515b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Allan Sandfeld Jensen 2021-05-18 08:43:52 +02:00 committed by Qt Cherry-pick Bot
parent 902a4d63a1
commit 1fe8ddc7fe
3 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,12 @@
2.1.1
=====
### Significant changes relative to 2.1.0
1. Fixed a regression introduced in 2.1.0 that caused build failures with
non-GCC-compatible compilers for Un*x/Arm platforms.
2.1.0
=====

View File

@ -44,8 +44,9 @@
* flags (this defines __thumb__).
*/
#if defined(__arm__) || defined(__aarch64__) || defined(_M_ARM) || \
defined(_M_ARM64)
/* NOTE: Both GCC and Clang define __GNUC__ */
#if (defined(__GNUC__) && (defined(__arm__) || defined(__aarch64__))) || \
defined(_M_ARM) || defined(_M_ARM64)
#if !defined(__thumb__) || defined(__thumb2__)
#define USE_CLZ_INTRINSIC
#endif

View File

@ -52,8 +52,9 @@
* flags (this defines __thumb__).
*/
#if defined(__arm__) || defined(__aarch64__) || defined(_M_ARM) || \
defined(_M_ARM64)
/* NOTE: Both GCC and Clang define __GNUC__ */
#if (defined(__GNUC__) && (defined(__arm__) || defined(__aarch64__))) || \
defined(_M_ARM) || defined(_M_ARM64)
#if !defined(__thumb__) || defined(__thumb2__)
#define USE_CLZ_INTRINSIC
#endif