From: Yicong Yang Date: Thu, 24 Oct 2024 13:32:36 +0000 (+0800) Subject: perf build: Add missing cflags when building with custom libtraceevent X-Git-Tag: v6.11.11~297 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0df0e939d5e7580ab45b8301786a0e9d44ce2b28;p=thirdparty%2Fkernel%2Fstable.git perf build: Add missing cflags when building with custom libtraceevent [ Upstream commit d5a0a4ab4af4c27de097b78d6f1b7e7f7e31908f ] When building with custom libtraceevent, below errors occur: $ make -C tools/perf NO_LIBPYTHON=1 PKG_CONFIG_PATH= In file included from util/session.h:5, from builtin-buildid-list.c:17: util/trace-event.h:153:10: fatal error: traceevent/event-parse.h: No such file or directory 153 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~ This is because the include path is missed in the cflags. Add it. Fixes: 0f0e1f445690 ("perf build: Use pkg-config for feature check for libtrace{event,fs}") Signed-off-by: Yicong Yang Reviewed-by: Leo Yan Reviewed-by: Guilherme Amadio Cc: linuxarm@huawei.com Link: https://lore.kernel.org/r/20241024133236.31016-1-yangyicong@huawei.com Signed-off-by: Namhyung Kim Signed-off-by: Sasha Levin --- diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 9fccdff682af7..0ee690498d311 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -1197,7 +1197,7 @@ endif ifneq ($(NO_LIBTRACEEVENT),1) $(call feature_check,libtraceevent) ifeq ($(feature-libtraceevent), 1) - CFLAGS += -DHAVE_LIBTRACEEVENT + CFLAGS += -DHAVE_LIBTRACEEVENT $(shell $(PKG_CONFIG) --cflags libtraceevent) LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libtraceevent) EXTLIBS += $(shell $(PKG_CONFIG) --libs-only-l libtraceevent) LIBTRACEEVENT_VERSION := $(shell $(PKG_CONFIG) --modversion libtraceevent).0.0