Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/3] pkgconf: Configure using pkgconf-personality
Date: Sat, 12 Oct 2019 22:09:28 +0200	[thread overview]
Message-ID: <20191012220928.4fdc5b90@windsurf> (raw)
In-Reply-To: <7af4ded6-5fb5-7a45-a016-294a0ae52850@mind.be>

On Sat, 5 Oct 2019 15:43:36 +0200
Arnout Vandecappelle <arnout@mind.be> wrote:

>  I think the personality approach is better than the wrapper script for sure.
> However, it's not always easy to override a package's idea of how to call
> pkg-config (e.g. quite a few use `pkg-config ...` in the Makefile directly - in
> fact, we do the same, in support/kconfig!). Therefore, I think a better approach
> is to have a separate "host" and "cross" bin directory, both of which contain a
> pkg-config (symlink or wrapper script). For cross-compilation, both directories
> are put in PATH, and for host compilation on the host directory.

I already expressed my opinion on this before, but I think the
pkg-config vs. TUPLE-pkg-config solution is the right thing to do. It
is really the standard way of doing this, the PKG_CHECK_MODULES()
autoconf macro looks first for TUPLE-pkg-config, before using
pkg-config.

Yes, it's not going to work with a number of packages that directly use
"pkg-config", but they should "simply" be fixed, no?

Another problem with the approach you suggest is that some packages
build both target code and host code. In this case, playing around with
two pkg-config binaries installed in two different locations isn't
going to work well. While with different names, you can have PKG_CONFIG
and PKG_CONFIG_FOR_BUILD with different values.

>  The cross dir can then also be populated with the -config script from
> STAGING_DIR, which avoids having to pass them explicitly in other packages.

That is admittedly an interesting argument.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2019-10-12 20:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-01 12:41 [Buildroot] [PATCH 1/3] pkgconf: Split pkgconf command into multi-line Thomas Preston
2019-10-01 12:41 ` [Buildroot] [PATCH 2/3] pkgconf: Add pkgconf system lib and include path Thomas Preston
2019-10-01 13:47   ` Thomas Petazzoni
2019-10-03  8:56     ` Thomas Preston
2019-10-19 21:07   ` Arnout Vandecappelle
2019-10-21  9:54     ` Thomas Preston
2019-10-21 11:35       ` Arnout Vandecappelle
2019-10-01 12:41 ` [Buildroot] [PATCH 3/3] pkgconf: Configure using pkgconf-personality Thomas Preston
2019-10-02  8:14   ` Thomas Preston
2019-10-02 20:22     ` Yann E. MORIN
2019-10-03  8:28       ` Thomas Preston
2019-10-05 13:43         ` Arnout Vandecappelle
2019-10-12 20:09           ` Thomas Petazzoni [this message]
2019-10-13 16:18             ` Arnout Vandecappelle
2019-10-19 21:37   ` Arnout Vandecappelle
2019-10-19 21:39   ` Arnout Vandecappelle

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=20191012220928.4fdc5b90@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /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