lkml.org 
[lkml]   [2020]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] compiler-clang: remove version check for BPF Tracing
On Wed, Nov 04, 2020 at 11:10:51AM -0800, Nick Desaulniers wrote:
> bpftrace parses the kernel headers and uses Clang under the hood. Remove
> the version check when __BPF_TRACING__ is defined (as bpftrace does) so
> that this tool can continue to parse kernel headers, even with older
> clang sources.
>
> Cc: <stable@vger.kernel.org>
> Fixes: commit 1f7a44f63e6c ("compiler-clang: add build check for clang 10.0.1")
> Reported-by: Chen Yu <yu.chen.surf@gmail.com>
> Reported-by: Jarkko Sakkinen <jarkko@kernel.org>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
> ---

Thank you, resolved my issue.

Acked-by: Jarkko Sakkinen <jarkko@kernel.org>
Tested-by: Jarkko Sakkinen <jarkko@kernel.org>

> include/linux/compiler-clang.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h
> index dd7233c48bf3..98cff1b4b088 100644
> --- a/include/linux/compiler-clang.h
> +++ b/include/linux/compiler-clang.h
> @@ -8,8 +8,10 @@
> + __clang_patchlevel__)
>
> #if CLANG_VERSION < 100001
> +#ifndef __BPF_TRACING__
> # error Sorry, your version of Clang is too old - please use 10.0.1 or newer.
> #endif
> +#endif
>
> /* Compiler specific definitions for Clang compiler */
>
> --
> 2.29.1.341.ge80a0c044ae-goog
>
>

/Jarkko

\
 
 \ /
  Last update: 2020-11-04 21:34    [W:0.083 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site