I just removed KBUILD_CFLAGS += -mno-save-restore from arch/riscv/Makefile to continue with compilation.
Clang HEAD now will not error on -mno-save-restore or -msave-restore! https://reviews.llvm.org/D63498
However, as the RISC-V LLVM backend does not yet support save/restore via libcalls, you will get a warning to tell you this if you try to use -msave-restore.
@tpimh I think this issue can be closed now? Can you please verify?
Technically the error is gone, but if there is still no RISC-V LLVM backend implementation of this feature and a warning is still printed, I would keep it open until it is implemented since it's specific to [ARCH] risc-v.
You’re passing ‘-mno-save-restore’ which is implemented, in as much as prologues/epilogues in LLVM do not use libcalls. If you were passing ‘-msave-restore’ I would agree it was unimplemented, as this option is the one to request the use of libcalls.
Closing the issue then.
Most helpful comment
Clang HEAD now will not error on
-mno-save-restoreor-msave-restore! https://reviews.llvm.org/D63498However, as the RISC-V LLVM backend does not yet support save/restore via libcalls, you will get a warning to tell you this if you try to use
-msave-restore.