[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240604093223.1934236-3-leo.yan@arm.com>
Date: Tue, 4 Jun 2024 10:32:19 +0100
From: Leo Yan <leo.yan@....com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
James Clark <james.clark@....com>,
Ian Rogers <irogers@...gle.com>,
"Liang, Kan" <kan.liang@...ux.intel.com>,
Nick Terrell <terrelln@...com>,
Thomas Richter <tmricht@...ux.ibm.com>,
Changbin Du <changbin.du@...wei.com>,
Fangrui Song <maskray@...gle.com>,
"Mateusz Kowalczyk" <fuuzetsu@...zetsu.co.uk>,
linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org
Cc: Leo Yan <leo.yan@....com>
Subject: [PATCH v1 2/6] perf: build: Append libtraceevent path in PKG_CONFIG_LIBDIR
When a user specifies the path for libtraceevent, it means a self-built
package is being used instead of the distro package. This commit appends
the specified path in the variable 'PKG_CONFIG_LIBDIR', so that later
pkg-config can retrieve version info from the self-built folder.
Signed-off-by: Leo Yan <leo.yan@....com>
---
tools/perf/Makefile.config | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 7f1e016a9253..f545e0c3c176 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -1181,7 +1181,10 @@ ifneq ($(NO_LIBTRACEEVENT),1)
CFLAGS += -DHAVE_LIBTRACEEVENT $(LIBTRACEEVENT_CFLAGS)
LDFLAGS += $(LIBTRACEEVENT_LDFLAGS)
EXTLIBS += ${TRACEEVENTLIBS}
- LIBTRACEEVENT_VERSION := $(shell PKG_CONFIG_PATH=$(LIBTRACEEVENT_DIR) $(PKG_CONFIG) --modversion libtraceevent)
+ ifdef LIBTRACEEVENT_DIR
+ PKG_CONFIG_LIBDIR := $(LIBTRACEEVENT_DIR):$(PKG_CONFIG_LIBDIR)
+ endif
+ LIBTRACEEVENT_VERSION := $(shell $(PKG_CONFIG) --modversion libtraceevent)
LIBTRACEEVENT_VERSION_1 := $(word 1, $(subst ., ,$(LIBTRACEEVENT_VERSION)))
LIBTRACEEVENT_VERSION_2 := $(word 2, $(subst ., ,$(LIBTRACEEVENT_VERSION)))
LIBTRACEEVENT_VERSION_3 := $(word 3, $(subst ., ,$(LIBTRACEEVENT_VERSION)))
--
2.34.1
Powered by blists - more mailing lists