Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Vasileios Amoiridis <vassilisamir@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v4 1/1] package/linux-tools: use PKG_CONFIG_LIBDIR in perf make flags
Date: Sat, 19 Apr 2025 23:40:47 +0200	[thread overview]
Message-ID: <20250419234047.2a5f229f@windsurf> (raw)
In-Reply-To: <20250403224419.26193-1-vassilisamir@gmail.com>

Hello Vasileios,

On Fri,  4 Apr 2025 00:44:17 +0200
Vasileios Amoiridis <vassilisamir@gmail.com> wrote:

> After commit 440cf77625e300e683ca0edc39fbc4b6f3175feb ("perf:
> build: Setup PKG_CONFIG_LIBDIR for cross compilation") in the
> Linux Kernel it is needed to add PKG_CONFIG_LIBDIR in the
> make flags to avoid warnings from the Kernel, such as:
> 
>         Makefile.perf:207: Missing PKG_CONFIG_LIBDIR,
>         PKG_CONFIG_PATH and PKG_CONFIG_SYSROOT_DIR for
>         cross compilation,
>         Makefile.perf:208: set PKG_CONFIG_LIBDIR for using
>         Multiarch libs.
> 
> Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>

Thanks for the patch!

> diff --git a/package/linux-tools/linux-tool-perf.mk.in b/package/linux-tools/linux-tool-perf.mk.in
> index d67318571a..1526652ce4 100644
> --- a/package/linux-tools/linux-tool-perf.mk.in
> +++ b/package/linux-tools/linux-tool-perf.mk.in
> @@ -20,6 +20,7 @@ endif
>  
>  PERF_MAKE_FLAGS = \
>  	$(LINUX_MAKE_FLAGS) \
> +	PKG_CONFIG_LIBDIR=$(HOST_DIR)/lib/pkgconfig:$(HOST_DIR)/share/pkgconfig \

However, this value is incorrect I believe.

Indeed, linux-tool-perf.mk.in is cross-compiling perf for the target,
so pkg-config should look for cross-compiled libraries... and here
you're pointing to natively compiled libraries installed in
$(HOST_DIR), so this is not correct.

I'm not sure what the correct fix is, as PKG_CONFIG_LIBDIR is passed
internally in our pkg-config wrapper, it's really just the kernel
Makefile being over-zealous here. Maybe we could play with the kernel
accepting a $(CROSS_COMPILE)pkg-config, and have such a script in a
private directory, added in the PATH when building perf? Another option
is to define PKG_CONFIG_LIBDIR, replicating what our pkg-config uses as
a value.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2025-04-19 21:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-03 22:44 [Buildroot] [PATCH v4 1/1] package/linux-tools: use PKG_CONFIG_LIBDIR in perf make flags Vasileios Amoiridis
2025-04-19 21:40 ` Thomas Petazzoni via buildroot [this message]
2025-05-05 22:15   ` Vasileios Amoiridis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250419234047.2a5f229f@windsurf \
    --to=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vassilisamir@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox