From a8bea85810e48d75862de9eb20bc4ad2e088a246 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 30 Jun 2019 23:55:28 -0700 Subject: [PATCH] Limit the compile error to the case where we actually define the memory barrier macro as the function --- src/atomic/SDL_atomic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atomic/SDL_atomic.c b/src/atomic/SDL_atomic.c index a368e305e..d3327d454 100644 --- a/src/atomic/SDL_atomic.c +++ b/src/atomic/SDL_atomic.c @@ -289,7 +289,7 @@ SDL_AtomicGetPtr(void **a) #endif } -#ifdef __thumb__ +#if defined(__thumb__) && (defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)) #error This file should be built in arm mode so the mcr instruction is available for memory barriers #endif