[llvm-bugs] [Bug 44853] New: -mno-save-restore spams a RISCV Linux kernel build
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Feb 9 01:12:12 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=44853
Bug ID: 44853
Summary: -mno-save-restore spams a RISCV Linux kernel build
Product: clang
Version: trunk
Hardware: Other
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Driver
Assignee: unassignedclangbugs at nondot.org
Reporter: natechancellor at gmail.com
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
When building the Linux kernel for RISCV, there is a bunch of warning spam
around -mno-save-restore, which is explicitly specified in arch/riscv/Makefile.
$ make -j$(nproc) -s ARCH=riscv CC=clang-11 CROSS_COMPILE=riscv64-linux-gnu-
O=out.riscv distclean defconfig all
...
'-save-restore' is not a recognized feature for this target (ignoring feature)
'-save-restore' is not a recognized feature for this target (ignoring feature)
'-save-restore' is not a recognized feature for this target (ignoring feature)
'-save-restore' is not a recognized feature for this target (ignoring feature)
...
I assume this warning is coming from the backend since -msave-restore warns
from clang.
$ echo | clang-11 --target=riscv64-linux-gnu -msave-restore -c -x c -o
/dev/null -
clang: warning: the clang compiler does not support '-msave-restore'
'+save-restore' is not a recognized feature for this target (ignoring feature)
$ echo | clang-11 --target=riscv64-linux-gnu -mno-save-restore -c -x c -o
/dev/null -
'-save-restore' is not a recognized feature for this target (ignoring feature)
This warning happens on every translation unit so it is very noisy. We could
silence it by just not passing -mno-save-restore when building with clang but
that seems fragile in case -msave-restore ever became default. We’ll do
whatever you feel is best though.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200209/09b470b3/attachment.html>
More information about the llvm-bugs
mailing list