compat/gcc/stdatomic.h lacks atomic_compare_exchange_weak
Noticed while trying to build with GCC on CentOS 7:
C compiler for the host machine: cc (gcc 4.8.5 "cc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)")
C linker for the host machine: cc ld.bfd 2.27-44
Host machine cpu family: x86_64
Host machine cpu: x86_64
Check usable header "linux/if_alg.h" : YES
Checking for function "clock_gettime" : YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Werror=vla: YES
Compiler for C supports arguments -Wno-maybe-uninitialized: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-unused-parameter: YES
Compiler for C supports arguments -Wshorten-64-to-32: NO
Compiler for C supports arguments -Watomic-implicit-seq-cst: NO
Compiler for C supports arguments -Wunused-parameter: YES
Compiler for C supports arguments -Wmaybe-uninitialized: YES
Compiler for C supports arguments -Wno-error=deprecated-declarations: YES
Run-time dependency threads found: YES
Compiler for C supports arguments -fvisibility=hidden: YES
Check usable header "stdatomic.h" : NO
Checking if "GCC-style atomics" compiles: YES
...
cc -Ilibrist.a.p -I. -I.. -I../src -Iinclude/librist -I../include/librist -Iinclude -I../include -I../contrib -I../subprojects/mbedtls-2.26.0/include -I../subprojects/mbedtls-2.26.0/library -Isubprojects/mbedtls-2.26.0/__CMake_build -I../subprojects/mbedtls-2.26.0/__CMake_build -Isubprojects/mbedtls-2.26.0 -I../subprojects/mbedtls-2.26.0 -I../compat/gcc -I../contrib/contrib_cJSON -I../contrib/lz4 -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c99 -g -D_GNU_SOURCE -DLINUX_CRYPTO -Wshadow -pedantic-errors -Wundef -Werror=vla -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -Wunused-parameter -Wmaybe-uninitialized -Wno-error=deprecated-declarations -fvisibility=hidden -DUSE_MBEDTLS -fPIC -DLZ4LIB_VISIBILITY= -DLZ4FLIB_API= -DCJSON_HIDE_SYMBOLS -pthread -MD -MQ librist.a.p/src_rist.c.o -MF librist.a.p/src_rist.c.o.d -o librist.a.p/src_rist.c.o -c ../src/rist.c
../src/rist.c: In function 'rist_receiver_data_read':
../src/rist.c:172:4: error: implicit declaration of function 'atomic_compare_exchange_weak' [-Wimplicit-function-declaration]
if (atomic_compare_exchange_weak(&f->dataout_fifo_queue_read_index, &dataout_read_index, (dataout_read_index +1)&(ctx->fifo_queue_size -1)))
^
[82/121] Compiling C object librist.a.p/src_rist-common.c.o
ninja: build stopped: subcommand failed.
I ended up building with clang 7 (from centos-release-scl) instead, but still wanted to post this here just in case someone else has issue