Why do we use the C99 standard explicitly here? I would like to change that and use whatever is the compiler's default or make it a user defined option. At least for MIPS, this would allow us to include atomic.c in builtins, when using C11.
Do you have a proper support (i.e. Clang driver logic, and compiler flag) for using clang_rt.builtins shared runtime? Or for now you just somehow link with shared compiler-rt runtime manually?
I just thought that it would be an alternative for libgcc_s for toolchains that don't depend on a GCC installation. Currently, I'm not aware of any Clang toolchain that can use this shared library. I'd like to add support for using the shared build of the builtins library by the mips-mti-linux (D13340) toolchain in the next few weeks. Would it be better to wait until then?