[llvm-dev] Compiling linux with `clang -fbasic-block-sections=labels`
David Blaikie via llvm-dev
llvm-dev at lists.llvm.org
Mon Jun 7 22:39:24 PDT 2021
BB sections has only been tested/implemented with a fairly narrow set of
flags so far as I know, and is sufficiently novel that various features
won't interact correctly with it without some work to support the
combination of bb sections and those features.
I'd /guess/ BPF, for instance, probably doesn't work with BB sections out
of the box & may require some work (like some work was needed to support BB
sections with DWARF) - I believe BPF is mandatory/used by default when
building the Linux kernel? So maybe that's what's being tripped over here.
But could something else entirely - that's just my first guess.
On Mon, Jun 7, 2021 at 9:15 PM A G via llvm-dev <llvm-dev at lists.llvm.org>
wrote:
> Hi,
> I'm trying to build the linux kernel with *`clang
> -fbasic-block-sections=labels`.*
>
> I ran into this error:
>
> /tmp/main-81886d.s: Assembler messages:
> /tmp/main-81886d.s: Error: .size expression for .BB.set_reset_devices does
> not evaluate to a constant
> /tmp/main-81886d.s: Error: .size expression for .BB.debug_kernel does not
> evaluate to a constant
> /tmp/main-81886d.s: Error: .size expression for .BB.quiet_kernel does not
> evaluate to a constant
> /tmp/main-81886d.s: Error: .size expression for .BB.loglevel does not
> evaluate to a constant
>
> make kernelversion
> 5.10.0
>
> clang version 11.1.0 (g... at github.com:llvm/llvm-project.git
> 1fdec59bffc11ae37eb51a1b9869f0696bfd5312)
> Target: x86_64-unknown-linux-gnu
>
>
> 1. Can someone help me understand what this error means?
> 2. Is *clang-built-linux* a better place to ask this question?
> 3. Is there a workaround for this?
>
> Thanks
> Akshith
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210607/c799b44e/attachment.html>
More information about the llvm-dev
mailing list