From: Namhyung Kim <namhyung@kernel.org>
To: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Thomas Richter <tmricht@linux.ibm.com>
Subject: Re: [PATCH] perf build: Allow using compiler wrappers with CLANG
Date: Fri, 15 Aug 2025 13:22:24 -0700 [thread overview]
Message-ID: <aJ-XAEGNnecMKgj9@google.com> (raw)
In-Reply-To: <20250805121143.1224807-1-iii@linux.ibm.com>
On Tue, Aug 05, 2025 at 02:09:34PM +0200, Ilya Leoshkevich wrote:
> It is useful to specify CLANG="ccache clang" in order to speed up
> builds. Unfortunately perf's compiler detection logic does not like
> this:
>
> Makefile.config:704: Warning: Disabled BPF skeletons as clang (ccache clang) is missing
>
> We don't need to know the full path to $(CLANG), so using
> get-executable is not necessary. Fix by trying to run
> `$(CLANG) --version` instead.
>
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Thanks,
Namhyung
> ---
> tools/perf/Makefile.config | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 5a5832ee7b53..4bc11db5aa4d 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -700,7 +700,7 @@ ifeq ($(BUILD_BPF_SKEL),1)
> else ifeq ($(filter -DHAVE_LIBBPF_SUPPORT, $(CFLAGS)),)
> $(warning Warning: Disabled BPF skeletons as libbpf is required)
> BUILD_BPF_SKEL := 0
> - else ifeq ($(call get-executable,$(CLANG)),)
> + else ifneq ($(shell $(CLANG) --version >/dev/null 2>&1; echo $$?),0)
> $(warning Warning: Disabled BPF skeletons as clang ($(CLANG)) is missing)
> BUILD_BPF_SKEL := 0
> else
> --
> 2.50.1
>
prev parent reply other threads:[~2025-08-15 20:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-05 12:09 Ilya Leoshkevich
2025-08-15 20:22 ` Namhyung Kim [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aJ-XAEGNnecMKgj9@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=tmricht@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®