* [PATCH] perf build: Allow using compiler wrappers with CLANG
@ 2025-08-05 12:09 Ilya Leoshkevich
2025-08-15 20:22 ` Namhyung Kim
0 siblings, 1 reply; 2+ messages in thread
From: Ilya Leoshkevich @ 2025-08-05 12:09 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-perf-users, linux-kernel, Heiko Carstens, Vasily Gorbik,
Alexander Gordeev, Thomas Richter, Ilya Leoshkevich
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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] perf build: Allow using compiler wrappers with CLANG
2025-08-05 12:09 [PATCH] perf build: Allow using compiler wrappers with CLANG Ilya Leoshkevich
@ 2025-08-15 20:22 ` Namhyung Kim
0 siblings, 0 replies; 2+ messages in thread
From: Namhyung Kim @ 2025-08-15 20:22 UTC (permalink / raw)
To: Ilya Leoshkevich
Cc: Arnaldo Carvalho de Melo, linux-perf-users, linux-kernel,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Thomas Richter
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-15 20:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-05 12:09 [PATCH] perf build: Allow using compiler wrappers with CLANG Ilya Leoshkevich
2025-08-15 20:22 ` Namhyung Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).