All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/pkgconf: add host link to pkg-config
Date: Thu, 4 Apr 2019 21:42:27 +0200	[thread overview]
Message-ID: <20190404214227.014dc818@windsurf> (raw)
In-Reply-To: <20190404192413.10205-2-stuart.summers@intel.com>

Hello Stuart,

Thanks for the patch.

On Thu,  4 Apr 2019 12:24:13 -0700
Stuart Summers <stuart.summers@intel.com> wrote:

> A patch was added to the Linux kernel in 5.1.0-rc3 which
> adds a requirement that the host build environment include
> pkg-config. Since pkg-config was deprecated in buildroot,
> add a link in the host directory to /usr/bin/pkg-config.

pkg-config is definitely not deprecated at all, and Buildroot's pkgconf
package is already installing it as $(HOST_DIR)/usr/bin/pkg-config:

define HOST_PKGCONF_INSTALL_WRAPPER
        $(INSTALL) -m 0755 -D package/pkgconf/pkg-config.in \
                $(HOST_DIR)/bin/pkg-config

However, the wrapper assumes by default we are building for the target,
and therefore returns results valid for cross-compilation. To return
results valid for native build, the following environment variables
need to be passed:

        PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
        PKG_CONFIG_SYSROOT_DIR="/" \
        PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
        PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
        PKG_CONFIG_LIBDIR="$(HOST_DIR)/lib/pkgconfig:$(HOST_DIR)/share/pkgconfig"

> Also add a new config option to enforce building host-pkgconf
> before building the Linux kernel.

Do we need a new option ? If pkg-config is only used by Linux to detect
libelf, what about just adding host-pkgconf to LINUX_DEPENDENCIES when
BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF is enabled ?

> +define HOST_PKGCONF_LINK_PKGCONFIG
> +	ln -sf pkgconf $(HOST_DIR)/usr/bin/pkg-config
> +endef

This is definitely wrong and will break the wrapper we install.

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

  reply	other threads:[~2019-04-04 19:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 19:24 [Buildroot] [PATCH 0/1] [RFC] fix kernel build failure for 5.1.0-rc3 Stuart Summers
2019-04-04 19:24 ` [Buildroot] [PATCH 1/1] package/pkgconf: add host link to pkg-config Stuart Summers
2019-04-04 19:42   ` Thomas Petazzoni [this message]
2019-04-04 21:30     ` Summers, Stuart
2019-04-05  7:53       ` Thomas Petazzoni
2019-04-05 18:50         ` Summers, Stuart
2019-04-05 18:47   ` [Buildroot] [PATCH] linux: use host pkg-config when host libelf is set Stuart Summers
2019-04-06 20:31     ` Yann E. MORIN
2019-04-08 16:00       ` Summers, Stuart
2019-04-08 16:36         ` Yann E. MORIN
2019-04-08 18:42     ` [Buildroot] [PATCH 1/1] " Stuart Summers
2019-04-08 19:28       ` Yann E. MORIN
2019-04-08 19:41         ` Summers, Stuart
2019-04-08 20:01           ` Yann E. MORIN
2019-04-13 15:09       ` Arnout Vandecappelle
2019-04-15 14:29         ` Summers, Stuart

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=20190404214227.014dc818@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.