Linux: Clang doesn't support -mno-save-restore

Created on 15 Sep 2018  Â·  5Comments  Â·  Source: ClangBuiltLinux/linux

I just removed KBUILD_CFLAGS += -mno-save-restore from arch/riscv/Makefile to continue with compilation.

[ARCH] risc-v [BUG] llvm [FIXED][LLVM] 9

Most helpful comment

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.

All 5 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tpimh picture tpimh  Â·  4Comments

tpgxyz picture tpgxyz  Â·  4Comments

nathanchance picture nathanchance  Â·  3Comments

nathanchance picture nathanchance  Â·  4Comments

nathanchance picture nathanchance  Â·  4Comments