diff options
Diffstat (limited to 'src/base/atomicops.h')
-rw-r--r-- | src/base/atomicops.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/base/atomicops.h b/src/base/atomicops.h index f3cf1ad..30c819c 100644 --- a/src/base/atomicops.h +++ b/src/base/atomicops.h @@ -98,6 +98,9 @@ // ------------------------------------------------------------------------ #include "base/arm_instruction_set_select.h" +#define GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) // TODO(csilvers): match piii, not just __i386. Also, match k8 #if defined(__MACH__) && defined(__APPLE__) @@ -114,12 +117,13 @@ #include "base/atomicops-internals-linuxppc.h" #elif defined(__GNUC__) && defined(__mips__) #include "base/atomicops-internals-mips.h" +#elif defined(__GNUC__) && GCC_VERSION >= 40700 +#include "base/atomicops-internals-gcc.h" #else // Assume x86 for now. If you need to support a new architecture and // don't know how to implement atomic ops, you can probably get away // with using pthreads, since atomicops is only used by spinlock.h/cc -//#error You need to implement atomic operations for this architecture -#include "base/atomicops-internals-x86.h" +#error You need to implement atomic operations for this architecture #endif // Signed type that can hold a pointer and supports the atomic ops below, as |