It’s a matter of not having moved the default in Clang/LLVM to 2.1 like GCC has, though we’re hoping to address that soon. Unfortunately the decision to break backwards compatibility in the RISC-V spec by moving fence.i and the CSR instructions out of the base ‘I’ instruction set means this ends up being rather user hostile.
If you’re able to build your GCC sysroot with an earlier -misa-spec, that might provide an easy workaround.
Could you please clarify the issues you’re seeing around “restrictive checks” of .riscv.attributes in ELF files though? I’m curious if we’re doing something there that makes it more difficult than necessary.