From 1432574b2b29ea890ac417ad24cbc47d35f39d9f Mon Sep 17 00:00:00 2001 From: herman ten brugge Date: Wed, 14 Apr 2021 12:22:18 +0200 Subject: [PATCH] Fix make lib/stdatomic.c gcc compatible --- lib/stdatomic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/stdatomic.c b/lib/stdatomic.c index f9919c08..eea70855 100644 --- a/lib/stdatomic.c +++ b/lib/stdatomic.c @@ -42,7 +42,8 @@ *(volatile TYPE *)atom = value; \ } -#if defined(__GNUC__) +/* Some tcc targets set __GNUC__ */ +#if defined(__GNUC__) && !defined(__TINYC__) #define ATOMIC_LOAD(t,a,b,c) t b; __atomic_load((t *)a, (t *)&b, c) #define COMPARE_EXCHANGE(t,a,b,c,d,e,f) __atomic_compare_exchange((t *)a,b,&c,d,e,f) #else