From 50430a8392cf4c29a05e6604ec84520856e07577 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 4 Oct 2014 10:29:41 -0700 Subject: 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 Reviewed-by: Adrian Perez de Castro --- src/corelib/arch/qatomic_mips.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/arch') 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 struct QAtomicOps : QBasicAtomicOps #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 -- cgit v1.2.3