diff options
author | Alex Rønne Petersen <alexrp@xamarin.com> | 2013-07-11 23:19:34 +0400 |
---|---|---|
committer | Alex Rønne Petersen <alexrp@xamarin.com> | 2013-07-12 00:11:29 +0400 |
commit | f99f84a429374f4ce39e8376eb28f23e2a46a759 (patch) | |
tree | 2c6a0458e917c40d058aaf87dee395abf3e90c97 /libgc | |
parent | 718ceb860149fffc8a96e547e10ca7fad4909d2c (diff) |
Add ARM version detection to configure and use the resulting macros.
This defines ARM_VERSION_{5,6,7}. Several of these can be
defined at once. For example ARM_VERSION_5 and ARM_VERSION_6
will both be defined if the target is an ARM v6 CPU.
Previously, we defined HAVE_ARMV6 based on running a program.
This obviously didn't work for cross-compilation. This new
approach does, and detects more cases (v5, v6, v7) than the
previous check (v6).
Diffstat (limited to 'libgc')
-rw-r--r-- | libgc/include/private/gc_locks.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgc/include/private/gc_locks.h b/libgc/include/private/gc_locks.h index e95cec0b4c1..36ccb8764d0 100644 --- a/libgc/include/private/gc_locks.h +++ b/libgc/include/private/gc_locks.h @@ -231,7 +231,7 @@ # define NACL_ALIGN() # endif inline static int GC_test_and_set(volatile unsigned int *addr) { -#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7__) +#if defined(__native_client__) || defined(HAVE_ARMV6) int ret, tmp; __asm__ __volatile__ ( "1:\n" @@ -264,7 +264,7 @@ inline static void GC_clear(volatile unsigned int *addr) { #ifdef HAVE_ARMV6 /* Memory barrier */ -#ifdef __native_client__ +#if defined(__native_client__) || defined(HAVE_ARMV7) /* NaCl requires ARMv7 CPUs. */ __asm__ __volatile__("dsb" : : : "memory"); #else |