Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stuart Summers <stuart.summers@intel.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] linux: use host pkg-config when host libelf is set
Date: Fri,  5 Apr 2019 11:47:12 -0700	[thread overview]
Message-ID: <20190405184712.5582-1-stuart.summers@intel.com> (raw)
In-Reply-To: <20190404192413.10205-2-stuart.summers@intel.com>

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. Add the correct host-pkgconf dependency and
environment variables to ensure Linux picks up the correct
libraries.

Suggested-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Stuart Summers <stuart.summers@intel.com>
---
 linux/linux.mk | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 6bf2b88038..05bb5b9525 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -96,10 +96,6 @@ ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL),y)
 LINUX_DEPENDENCIES += host-openssl
 endif
 
-ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF),y)
-LINUX_DEPENDENCIES += host-elfutils
-endif
-
 # If host-uboot-tools is selected by the user, assume it is needed to
 # create a custom image
 ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS),y)
@@ -125,6 +121,16 @@ LINUX_MAKE_ENV = \
 	$(TARGET_MAKE_ENV) \
 	BR_BINARIES_DIR=$(BINARIES_DIR)
 
+ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF),y)
+LINUX_DEPENDENCIES += host-elfutils host-pkgconf
+LINUX_MAKE_ENV += \
+	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"
+endif
+
 ifeq ($(BR2_REPRODUCIBLE),y)
 LINUX_MAKE_ENV += \
 	KBUILD_BUILD_VERSION=1 \
-- 
2.20.1

  parent reply	other threads:[~2019-04-05 18:47 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
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   ` Stuart Summers [this message]
2019-04-06 20:31     ` [Buildroot] [PATCH] linux: use host pkg-config when host libelf is set 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=20190405184712.5582-1-stuart.summers@intel.com \
    --to=stuart.summers@intel.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