From patchwork Mon Apr 8 18:42:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Summers, Stuart" X-Patchwork-Id: 1081379 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44dK6Z6dbxz9sQx for ; Tue, 9 Apr 2019 04:42:44 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 42D0785964; Mon, 8 Apr 2019 18:42:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9uaVpR8-LuRu; Mon, 8 Apr 2019 18:42:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 662BD8515C; Mon, 8 Apr 2019 18:42:37 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 1250E1BF239 for ; Mon, 8 Apr 2019 18:42:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0F0E68543B for ; Mon, 8 Apr 2019 18:42:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cc4AX+PDERRz for ; Mon, 8 Apr 2019 18:42:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by whitealder.osuosl.org (Postfix) with ESMTPS id 0570E8527F for ; Mon, 8 Apr 2019 18:42:34 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Apr 2019 11:42:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,326,1549958400"; d="scan'208";a="314154539" Received: from jssummer-desk.ra.intel.com ([10.54.134.188]) by orsmga005.jf.intel.com with ESMTP; 08 Apr 2019 11:42:34 -0700 From: Stuart Summers To: Date: Mon, 8 Apr 2019 11:42:33 -0700 Message-Id: <20190408184233.10697-1-stuart.summers@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190405184712.5582-1-stuart.summers@intel.com> References: <20190405184712.5582-1-stuart.summers@intel.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] linux: use host pkg-config when host libelf is set X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: yann.morin.1998@free.fr, thomas.petazzoni@bootlin.com, buildroot@buildroot.org Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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. v2: Use LINUX_MAKE_ENV to pass PKG_CONFIG_* options (Thomas) v3: Add PKG_CONFIG_ALLOW_SYSTEM_{CFLAGS,LIBS} to kconfig blacklist and move LINUX_MAKE_ENV initial assign in linux.mk before DEP* assignments (Yann) Cc: Thomas Petazzoni Cc: Yann E. MORIN Suggested-by: Thomas Petazzoni Signed-off-by: Stuart Summers Reviewed-by: "Yann E. MORIN" --- linux/linux.mk | 16 +++++++++++----- package/pkg-kconfig.mk | 4 +++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/linux/linux.mk b/linux/linux.mk index 6bf2b88038..d209a5cf59 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -61,6 +61,10 @@ LINUX_PATCHES = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH)) # be directories in the patch list (unlike for other packages). LINUX_PATCH = $(filter ftp://% http://% https://%,$(LINUX_PATCHES)) +LINUX_MAKE_ENV = \ + $(TARGET_MAKE_ENV) \ + BR_BINARIES_DIR=$(BINARIES_DIR) + LINUX_INSTALL_IMAGES = YES LINUX_DEPENDENCIES = host-kmod @@ -97,7 +101,13 @@ LINUX_DEPENDENCIES += host-openssl endif ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF),y) -LINUX_DEPENDENCIES += host-elfutils +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 # If host-uboot-tools is selected by the user, assume it is needed to @@ -121,10 +131,6 @@ LINUX_MAKE_FLAGS = \ CROSS_COMPILE="$(TARGET_CROSS)" \ DEPMOD=$(HOST_DIR)/sbin/depmod -LINUX_MAKE_ENV = \ - $(TARGET_MAKE_ENV) \ - BR_BINARIES_DIR=$(BINARIES_DIR) - ifeq ($(BR2_REPRODUCIBLE),y) LINUX_MAKE_ENV += \ KBUILD_BUILD_VERSION=1 \ diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk index d6c95b897e..e53cc9002e 100644 --- a/package/pkg-kconfig.mk +++ b/package/pkg-kconfig.mk @@ -175,7 +175,9 @@ endif # nconfig, gconfig, xconfig). # So we simply remove our PATH and PKG_CONFIG_* variables. $(2)_CONFIGURATOR_MAKE_ENV = \ - $$(filter-out PATH=% PKG_CONFIG=% PKG_CONFIG_SYSROOT_DIR=% PKG_CONFIG_LIBDIR=%,$$($(2)_MAKE_ENV)) \ + $$(filter-out PATH=% PKG_CONFIG=% PKG_CONFIG_SYSROOT_DIR=% \ + PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=% PKG_CONFIG_ALLOW_SYSTEM_LIBS=% \ + PKG_CONFIG_LIBDIR=%,$$($(2)_MAKE_ENV)) \ PKG_CONFIG_PATH="$(HOST_PKG_CONFIG_PATH)" # Configuration editors (menuconfig, ...)