diff options
author | Alexey Lapshin <alexey.lapshin@espressif.com> | 2024-07-08 14:24:55 +0700 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2024-07-30 14:45:27 +0200 |
commit | d001c01a7c5277194e7f8891f0228a2e3c4c64e1 (patch) | |
tree | a226e4a5832150d99204ff28814115dcb258c491 | |
parent | ec54f5f43d9bb3cebefdcea367c5e4a773ed2081 (diff) | |
download | newlib-d001c01a7c5277194e7f8891f0228a2e3c4c64e1.zip newlib-d001c01a7c5277194e7f8891f0228a2e3c4c64e1.tar.gz newlib-d001c01a7c5277194e7f8891f0228a2e3c4c64e1.tar.bz2 |
stdatomic: make atomics compatible with GCC-14
https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631525.html
brings c_atomic and cxx_atomic definitions into GCC.
This patch makes atomics type detection correct for GCC.
https://github.com/freebsd/freebsd-src/commit/680f40f38343de118d5b973129683804e496faaf
-rw-r--r-- | newlib/libc/include/stdatomic.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/newlib/libc/include/stdatomic.h b/newlib/libc/include/stdatomic.h index 2bb976f..13d1e17 100644 --- a/newlib/libc/include/stdatomic.h +++ b/newlib/libc/include/stdatomic.h @@ -33,7 +33,8 @@ #include <sys/cdefs.h> #include <sys/_types.h> -#if __has_extension(c_atomic) || __has_extension(cxx_atomic) +#if (__has_extension(c_atomic) || __has_extension(cxx_atomic)) && \ + defined(__clang__) #define __CLANG_ATOMICS #elif __GNUC_PREREQ__(4, 7) #define __GNUC_ATOMICS |