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 1/1] package/pkgconf: add host link to pkg-config
Date: Thu,  4 Apr 2019 12:24:13 -0700	[thread overview]
Message-ID: <20190404192413.10205-2-stuart.summers@intel.com> (raw)
In-Reply-To: <20190404192413.10205-1-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. Since pkg-config was deprecated in buildroot,
add a link in the host directory to /usr/bin/pkg-config.

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

Signed-off-by: Stuart Summers <stuart.summers@intel.com>
---
 linux/Config.in            | 8 ++++++++
 linux/linux.mk             | 4 ++++
 package/pkgconf/pkgconf.mk | 8 +++++++-
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/linux/Config.in b/linux/Config.in
index 9a4d46e534..5d0c623c2b 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -432,6 +432,14 @@ config BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF
 	  CONFIG_UNWINDER_ORC=y, please install libelf-dev,
 	  libelf-devel or elfutils-libelf-devel".
 
+config BR2_LINUX_KERNEL_NEEDS_HOST_PKG_CONFIG
+	bool "Needs host pkgconf"
+	help
+	  Starting in 5.1.0-rc3, a change was added to the Linux kernel
+	  which uses pkg-config to determine the location of the libelf
+	  library. Without this option, the kernel will fail with build
+	  errors.
+
 # Linux extensions
 source "linux/Config.ext.in"
 
diff --git a/linux/linux.mk b/linux/linux.mk
index 6bf2b88038..d011f92828 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -100,6 +100,10 @@ ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF),y)
 LINUX_DEPENDENCIES += host-elfutils
 endif
 
+ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_PKG_CONFIG),y)
+LINUX_DEPENDENCIES += host-pkgconf
+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)
diff --git a/package/pkgconf/pkgconf.mk b/package/pkgconf/pkgconf.mk
index e3c73fd405..8284799f1e 100644
--- a/package/pkgconf/pkgconf.mk
+++ b/package/pkgconf/pkgconf.mk
@@ -16,6 +16,10 @@ define PKGCONF_LINK_PKGCONFIG
 	ln -sf pkgconf $(TARGET_DIR)/usr/bin/pkg-config
 endef
 
+define HOST_PKGCONF_LINK_PKGCONFIG
+	ln -sf pkgconf $(HOST_DIR)/usr/bin/pkg-config
+endef
+
 define HOST_PKGCONF_INSTALL_WRAPPER
 	$(INSTALL) -m 0755 -D package/pkgconf/pkg-config.in \
 		$(HOST_DIR)/bin/pkg-config
@@ -32,7 +36,9 @@ define HOST_PKGCONF_SHARED
 endef
 
 PKGCONF_POST_INSTALL_TARGET_HOOKS += PKGCONF_LINK_PKGCONFIG
-HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_INSTALL_WRAPPER
+HOST_PKGCONF_POST_INSTALL_HOOKS += \
+	HOST_PKGCONF_INSTALL_WRAPPER \
+	HOST_PKGCONF_LINK_PKGCONFIG
 
 ifeq ($(BR2_STATIC_LIBS),y)
 HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_STATIC
-- 
2.20.1

  reply	other threads:[~2019-04-04 19:24 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 ` Stuart Summers [this message]
2019-04-04 19:42   ` [Buildroot] [PATCH 1/1] package/pkgconf: add host link to pkg-config 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   ` [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=20190404192413.10205-2-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