summaryrefslogtreecommitdiffstats
path: root/src/corelib/arch/qatomic_mips.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-10-04 10:29:41 -0700
committerThiago Macieira <thiago.macieira@intel.com>2014-10-07 22:30:21 +0200
commit50430a8392cf4c29a05e6604ec84520856e07577 (patch)
tree84025f97ccd643301cdc726f5d259dab8802d31a /src/corelib/arch/qatomic_mips.h
parent3a25799413d10ea3d331c1d771edb1c195f58e77 (diff)
Fix compilation of MIPS with Clang
Clang always sets __mips to 1, unlike GCC. To detect a higher MIPS arch, we need to rely on the _MIPS_ARCH_MIPSxxx macros being defined -- or, in this case, _MIPS_ARCH_MIPS1 not being defined. Change-Id: Ib6846a6892a4c1e17e595a69305b7e46a5303ee7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Adrian Perez de Castro <aperez@igalia.com>
Diffstat (limited to 'src/corelib/arch/qatomic_mips.h')
-rw-r--r--src/corelib/arch/qatomic_mips.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/arch/qatomic_mips.h b/src/corelib/arch/qatomic_mips.h
index f6e6cf0aef..b8a9665f86 100644
--- a/src/corelib/arch/qatomic_mips.h
+++ b/src/corelib/arch/qatomic_mips.h
@@ -94,7 +94,7 @@ template <typename T> struct QAtomicOps : QBasicAtomicOps<sizeof(T)>
#if defined(Q_CC_GNU)
-#if defined(_MIPS_ARCH_MIPS1) || (defined(__mips) && __mips - 0 == 1)
+#if defined(_MIPS_ARCH_MIPS1) || (!defined(Q_CC_CLANG) && defined(__mips) && __mips - 0 == 1)
# error "Sorry, the MIPS1 architecture is not supported"
# error "please set '-march=' to your architecture (e.g., -march=mips32)"
#endif