[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250805121143.1224807-1-iii@linux.ibm.com>
Date: Tue, 5 Aug 2025 14:09:34 +0200
From: Ilya Leoshkevich <iii@...ux.ibm.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
Heiko Carstens <hca@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>,
Alexander Gordeev <agordeev@...ux.ibm.com>,
Thomas Richter <tmricht@...ux.ibm.com>,
Ilya Leoshkevich <iii@...ux.ibm.com>
Subject: [PATCH] perf build: Allow using compiler wrappers with CLANG
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@...ux.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
Powered by blists - more mailing lists