[llvm-dev] BPF: How can I enable BPF support in my LLVM toolchain?

Sedat Dilek via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 11 09:27:50 PST 2021


On Mon, Jan 11, 2021 at 6:14 PM Tom Stellard <tstellar at redhat.com> wrote:
>
> On 1/11/21 9:11 AM, Sedat Dilek wrote:
> > On Mon, Jan 11, 2021 at 4:35 PM Tom Stellard <tstellar at redhat.com> wrote:
> >>
> >> On 1/11/21 5:35 AM, Sedat Dilek via llvm-dev wrote:
> >>> Hi,
> >>>
> >>> when building a Linux-kernel with CONFIG_DEBUG_INFO_BTF=y my build breaks.
> >>>
> >>
> >> I commented on the GitHub issue about the root cause of this.
> >>
> >>> This is because my selfmade LLVM toolchain v11.0.1 has no BPF support:
> >>>
> >>> $ llc --version
> >>> LLVM (http://llvm.org/):
> >>>    LLVM version 11.0.1
> >>>    Optimized build.
> >>>    Default target: x86_64-unknown-linux-gnu
> >>>    Host CPU: sandybridge
> >>>
> >>>    Registered Targets:
> >>>      x86    - 32-bit X86: Pentium-Pro and above
> >>>      x86-64 - 64-bit X86: EM64T and AMD64
> >>>
> >>> What system or binary requirements do I need and which CMAKE option(s)
> >>> need(s) to be set?
> >>
> >> The LLVM_TARGETS_TO_BUILD CMake option controls which targets to build.
> >>
> >
> > tc-build folks fixed that up.
> > See commit "build-llvm.py: Enable BPF backend by default".
> >
> > Is there a BPF test-suite - like for clang and lld?
> >
>
> There's one in the kernel.
>

Can I run it before compiling a single-line of a Linux-kernel?
Does it test for BTF stuff?
How do I run it?

- Sedat -

> -Tom
>
> > I have build pahole from Git - now building a new Linux kernel.
> >
> > $ cd /path/to/pahole/git
> > $ git describe
> > v1.19-7-gb688e3597060
> >
> > Will report later.
> >
> > Regards,
> > - Sedat -
> >
> > [1] https://github.com/ClangBuiltLinux/tc-build/commit/e796c046428a971404eec008c841f9dd7c1621e8
> >
> >> -Tom
> >>
> >>> I hope this is not hardware-dependent (here: Intel SandyBridge).
> >>>
> >>> Thanks in advance.
> >>>
> >>> Regards,
> >>> - Sedat -
> >>>
> >>> [1] https://github.com/ClangBuiltLinux/tc-build/issues/129
> >>> _______________________________________________
> >>> LLVM Developers mailing list
> >>> llvm-dev at lists.llvm.org
> >>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> >>>
> >>
> >
>


More information about the llvm-dev mailing list