lkml.org 
[lkml]   [2020]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 1/7] compiler-clang: add build check for clang 10.0.1
On Mon, Nov 2, 2020 at 8:55 PM Jarkko Sakkinen <jarkko@kernel.org> wrote:
>
> On Wed, Sep 02, 2020 at 03:59:05PM -0700, Nick Desaulniers wrote:
> > +#define CLANG_VERSION (__clang_major__ * 10000 \
> > + + __clang_minor__ * 100 \
> > + + __clang_patchlevel__)
> > +
> > +#if CLANG_VERSION < 100001
> > +# error Sorry, your version of Clang is too old - please use 10.0.1 or newer.
> > +#endif
>
>
> I'm trying to compile a BPF enabled test kernel for a live system and I
> get this error even though I have much newer clang:
>
> ➜ ~ (master) ✔ clang --version
> Ubuntu clang version 11.0.0-2
> Target: x86_64-pc-linux-gnu
> Thread model: posix
> InstalledDir: /usr/bin
>
> Tried to Google for troubleshooter tips but this patch is basically the
> only hit I get :-)

To check the values of the above preprocessor defines, please run:
$ clang -dM -E - < /dev/null | grep -e __clang_m -e __clang_p

If you have multiple versions of clang installed, you might not be
running the version you think you are. Particularly, if you're using
bcc, idk if it includes a copy of clang? If that's the case, we may
have to work out how we can support older versions of clang for the
express purposes of bpf.
--
Thanks,
~Nick Desaulniers

\
 
 \ /
  Last update: 2020-11-03 19:49    [W:0.043 / U:1.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site