[PATCH] perf util: improve error message for old/missing clang

From: Song Liu
Date: Mon May 10 2021 - 02:49:17 EST


clang is required to build perf with BUILD_BPF_SKEL=3D1. Improve the
error message to highlight that:
1) clang could be either missing or too old;
2) clang is only required with BUILD_BPF_SKEL=3D1.

Suggested-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Signed-off-by: Song Liu <song@xxxxxxxxxx>
---
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 0d6619064a838..3f58428244579 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -634,7 +634,7 @@ endif
ifdef BUILD_BPF_SKEL
$(call feature_check,clang-bpf-co-re)
ifeq ($(feature-clang-bpf-co-re), 0)
- dummy :=3D $(error Error: clang too old. Please install recent clang)
+ dummy :=3D $(error Error: clang too old/not installed. Please install =
recent clang to build with BUILD_BPF_SKEL)
endif
$(call detected,CONFIG_PERF_BPF_SKEL)
CFLAGS +=3D -DHAVE_BPF_SKEL
--
2.30.2