From bfc96c9c0e103c4fcfda25b9a6eaa80f4f19fba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sat, 11 Nov 2017 16:59:31 +0200 Subject: [PATCH] Only define QT_FASTCALL on x86_32 The __fastcall calling convention is silently ignored on other architectures. The GNU attribute regparm is allowed but doesn't make sense on x86_64. On other architectures, the attribute isn't supported at all. This fixes building with clang for MinGW/ARM and ARM64. Change-Id: Ice1c6eadd0e90b2e5e34736542ee49a25dc67fe6 Reviewed-by: Lars Knoll Reviewed-by: Thiago Macieira --- src/corelib/global/qglobal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 2464db7c5f..b85b008f70 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -472,7 +472,7 @@ using qsizetype = QIntegerForSizeof::Signed; # define QT_ASCII_CAST_WARN #endif -#if defined(__i386__) || defined(_WIN32) +#ifdef Q_PROCESSOR_X86_32 # if defined(Q_CC_GNU) # define QT_FASTCALL __attribute__((regparm(3))) # elif defined(Q_CC_MSVC)