GCC is supposed to convert these atomics via masking and shifting
like LLVM, which means anything that wants to use these instructions
needs the link option -latomic.
In this patch, we will try to detect if 8-bit, 64-bit atomic instructions exist,
otherwise the atomic library will append to the DEPLIBS list.
the reason: https://github.com/xbmc/xbmc/pull/21743 RISC-V lack 8-bit and 16-bit atomic instructions, and ARM/MIPS/PPC lack 64-bit atomic instruction.
GCC is supposed to convert these atomics via masking and shifting like LLVM, which means anything that wants to use these instructions needs the link option -latomic.
In this patch, we will try to detect if 8-bit, 64-bit atomic instructions exist, otherwise the atomic library will append to the DEPLIBS list.