[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201117030427.61981-1-jhubbard@nvidia.com>
Date: Mon, 16 Nov 2020 19:04:27 -0800
From: John Hubbard <jhubbard@...dia.com>
To: <jarkko.sakkinen@....fi>
CC: <akpm@...ux-foundation.org>, <andreyknvl@...gle.com>,
<ast@...nel.org>, <clang-built-linux@...glegroups.com>,
<daniel@...earbox.net>, <elver@...gle.com>, <jarkko@...nel.org>,
<keescook@...omium.org>, <linux-kernel@...r.kernel.org>,
<masahiroy@...nel.org>, <miguel.ojeda.sandonis@...il.com>,
<natechancellor@...il.com>, <ndesaulniers@...gle.com>,
<sedat.dilek@...il.com>, <vincenzo.frascino@....com>,
<will@...nel.org>, John Hubbard <jhubbard@...dia.com>
Subject: Re: [PATCH v3 1/7] compiler-clang: add build check for clang 10.0.1
Hi,
I just ran into this and it's a real pain to figure out, because even
with the very latest Fedora 33 on my test machine, which provides clang
version 11.0.0:
$ clang --version
clang version 11.0.0 (Fedora 11.0.0-2.fc33)
Target: x86_64-unknown-linux-gnu
...the bpftrace program still chokes on some, but not all commands, in
ways that invisible to normal debugging. For example:
$ sudo bpftrace -e 'tracepoint:syscalls:sys_enter_vmsplice { @[kstack()]
= count(); }'
/lib/modules/5.10.0-rc4-hubbard-github+/source/include/linux/compiler-clang.h:12:3:
error: Sorry, your version of Clang is too old - please use 10.0.1 or
newer.
But Jarkko's recommended fix works! In other words, applying the diff
below fixes it for me. So I'm replying in order to note that the problem
is real and hoping that the fix is applied soon.
diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h
index dd7233c48bf3..c2228b957fd7 100644
--- a/include/linux/compiler-clang.h
+++ b/include/linux/compiler-clang.h
@@ -7,9 +7,11 @@
+ __clang_minor__ * 100 \
+ __clang_patchlevel__)
+#ifndef __BPF_TRACING__
#if CLANG_VERSION < 100001
# error Sorry, your version of Clang is too old - please use 10.0.1 or newer.
#endif
+#endif
/* Compiler specific definitions for Clang compiler */
thanks,
--
John Hubbard
NVIDIA
Powered by blists - more mailing lists