Skip to content

Commit bc2dc44

Browse files
nickdesaulnierstorvalds
authored andcommitted
compiler-clang: remove version check for BPF Tracing
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. Fixes: commit 1f7a44f ("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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Tested-by: Jarkko Sakkinen <jarkko@kernel.org> Acked-by: Jarkko Sakkinen <jarkko@kernel.org> Acked-by: Song Liu <songliubraving@fb.com> Acked-by: Nathan Chancellor <natechancellor@gmail.com> Acked-by: Miguel Ojeda <ojeda@kernel.org> Link: https://lkml.kernel.org/r/20201104191052.390657-1-ndesaulniers@google.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 450677d commit bc2dc44

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

include/linux/compiler-clang.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
+ __clang_patchlevel__)
99

1010
#if CLANG_VERSION < 100001
11+
#ifndef __BPF_TRACING__
1112
# error Sorry, your version of Clang is too old - please use 10.0.1 or newer.
1213
#endif
14+
#endif
1315

1416
/* Compiler specific definitions for Clang compiler */
1517

0 commit comments

Comments
 (0)