]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf: build: Setup PKG_CONFIG_LIBDIR for cross compilation
authorLeo Yan <leo.yan@arm.com>
Wed, 17 Jul 2024 08:22:06 +0000 (09:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jul 2025 16:35:11 +0000 (18:35 +0200)
commiteb952372bf481d52eeeb7ac719f350b38d5d1c31
treeb1ae993c1038e7362093e4aec5a1db26a116f12e
parente63032e66bca1d06e600033f3369ba3db3af0870
perf: build: Setup PKG_CONFIG_LIBDIR for cross compilation

commit 440cf77625e300e683ca0edc39fbc4b6f3175feb upstream.

On recent Linux distros like Ubuntu Noble and Debian Bookworm, the
'pkg-config-aarch64-linux-gnu' package is missing. As a result, the
aarch64-linux-gnu-pkg-config command is not available, which causes
build failures.

When a build passes the environment variables PKG_CONFIG_LIBDIR or
PKG_CONFIG_PATH, like a user uses make command or a build system
(like Yocto, Buildroot, etc) prepares the variables and passes to the
Perf's Makefile, the commit keeps these variables for package
configuration. Otherwise, this commit sets the PKG_CONFIG_LIBDIR
variable to use the Multiarch libs for the cross compilation.

Signed-off-by: Leo Yan <leo.yan@arm.com>
Tested-by: Ian Rogers <irogers@google.com>
Cc: amadio@gentoo.org
Cc: Thomas Richter <tmricht@linux.ibm.com>
Link: https://lore.kernel.org/r/20240717082211.524826-2-leo.yan@arm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/build/feature/Makefile
tools/perf/Makefile.perf