[llvm-dev] An error of asm goto occured while compiling Linux kernel 5.3

James Y Knight via llvm-dev llvm-dev at lists.llvm.org
Fri Sep 27 05:53:29 PDT 2019


On Thu, Sep 26, 2019, 9:57 PM Will Lester via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> On Fri, Sep 27, 2019 at 4:02 AM Tim Northover <t.p.northover at gmail.com>
> wrote:
>
> > > This error said "invalid operand for inline asm constraint 'i'" in
> > > arch/x86/include/asm/jump_table.h.
> >
> > This is a pretty fragile use of that constraint, since it's declaring
> > that something must be a constant when that can only happen via
> > optimizations. I'm not convinced that's what's going on here though.
> > Kernels aren't usually compiled at -O0 and I think I trust the Linux
> > developers to make sure users are passing an obvious constant.
> >
>
> I am doing an analysis of kernel, therefore I use -O0 to keep details of
> source code.
>

This is not expected to work, and does not. The kernel can only be compiled
with optimizations on. That's not a clang bug -- that's just how the kernel
has been written, unfortunately.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190927/45b77f9c/attachment.html>


More information about the llvm-dev mailing list