From patchwork Mon Feb 10 15:55:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Cavallari X-Patchwork-Id: 1235876 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=green-communications.fr Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48GVxy3MKQz9sP7 for ; Tue, 11 Feb 2020 03:01:10 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BDDF220412; Mon, 10 Feb 2020 16:01:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H96k7e4-rq8o; Mon, 10 Feb 2020 16:01:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 0D542203D0; Mon, 10 Feb 2020 16:01:03 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 77B101BF3AE for ; Mon, 10 Feb 2020 16:01:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 72E7586E5C for ; Mon, 10 Feb 2020 16:01:02 +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 XH3p7DfrKX3j for ; Mon, 10 Feb 2020 16:01:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.13]) by hemlock.osuosl.org (Postfix) with ESMTPS id A37F886E2C for ; Mon, 10 Feb 2020 16:01:00 +0000 (UTC) Received: from evilbit.green-communications.fr ([92.154.77.116]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.184]) with ESMTPSA (Nemesis) id 1MOzKk-1irBXo3tdc-00PQSB; Mon, 10 Feb 2020 16:55:52 +0100 From: Nicolas Cavallari To: buildroot@buildroot.org Date: Mon, 10 Feb 2020 16:55:47 +0100 Message-Id: <20200210155548.31928-1-nicolas.cavallari@green-communications.fr> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:075d+ebDmvTGodWJz3lXMDvhXEWDV2h1sIlKXYD06XtR3HmjTay PlUiYzkgBxtqKvtylvwyPoWQ7wS90NfPJabQdd215URP7hXSYMk1a4w02TaEt6G3D66WKTY VLzy7pPjcpbhQB3yI/2a/rSJThNTrYSWRHrFFE15f8i43IoPI0dBDr8MVC+7KbZy6uRAdEG rUPBxV5H0/YV9u8bSdAhQ== X-UI-Out-Filterresults: notjunk:1; V03:K0:2IJ4A8hvBuk=:6HopGxW3G6jbLtN2MrBw0j olT6HB0PW7k/J3kuMgMwr0MQv61ek1hMeeis9RpqKyXmwGVkM7MY6UfiOW3nZpAe2KQEEC2Je IhFqEsg9tiinlZ8+KiRMef3Pr5jg2jvlrwm3XMnL+FrqvPrZCFBQg0xFregRNzFfG5kQ/0gjA HsaqrZrlqWxtJkU+qK8uBzqfLJqco5V8WFoSBUyp9OqzB0LaVJ82pDXvPKaswXsyPZuL/xDk2 q5RaEufE0y9uGcBu0vpYDFYJQgSakRtpA9iLT52nCwEoNofwbiwojQ9NnrS4LyDO7A3x4nLGJ UaPwHwxKUy5fFn72lt1hw1gbPQcVXd6nyjy6yBZo5TvQ2s/JmRfrp45dUj9Z/aDIShXwIAtm0 DEDGEo9xmXQ0UmjWKLl3Knk0UwXgaOJsmmBHEiqz2xx62bHXokUy1S+Okj8oEMUzxwT4uDV55 +TPFYS4jYc3oJloGrmQAqoV0Mn/P6Y/uWtDLWKg0+XIVexaYC6FyE+mMpAyXavZ/otGV0FRvM Fmv/pqV8S6hx8DUSly3WU/Pl8EzG35mDk5GnMUF8MS880aHR79NiJymnsot60EKGtzx72Nvun lSSDdtxGE142qFNpc49iL/MO1+FvKXTtMDEykknYCGvZQ3xGWzLmv+CtWwz4OfRxw5pi8CsOo khgeaAqLEFZJ3YcEZYotDPtI1FV+Qn85QInNnW4anFJAUBNd3tp/Dnu5li/Hq/EkDaVlyW2dO 2nN4jLbCkpXcZSuUD8OgLjuY5DXUJ+35PMQj2bSfRuG2pkdk8lqpbYFatvCwoEdyRQ9MGLUvv EKFsBjzJgGio7ezEfHICUxG5ToNdm/r7k1noMfgksnt8Lz4PC19FqBD+WUEEARyv4W4XixM3t TGKO3KVZ7Ddv9UK98xSg== Subject: [Buildroot] [PATCH v2 1/2] pkgconf: Add a host-pkg-config wrapper script. 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: Eric Le Bihan Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The host-pkg-config wrapper script replicate the configuration present in HOST_MAKE_ENV, with the exception of PKG_CONFIG_LIBDIR whose default is already equal to what we want. This wrapper script can be used with build systems that recognise the difference between a host dependency and a target dependency. Signed-off-by: Nicolas Cavallari --- HOST_MAKE_ENV could be modified to use host-pkg-config, but since we cannot guarantee that every host package will use the PKG_CONFIG environment variable (instead of e.g. finding pkg-config in $PATH), the other PKG_CONFIG_* variables probably need to be kept as well, so it wouldn't be useful to use it there. --- package/pkgconf/host-pkg-config | 8 ++++++++ package/pkgconf/pkgconf.mk | 3 +++ 2 files changed, 11 insertions(+) create mode 100644 package/pkgconf/host-pkg-config diff --git a/package/pkgconf/host-pkg-config b/package/pkgconf/host-pkg-config new file mode 100644 index 0000000000..de23ce2737 --- /dev/null +++ b/package/pkgconf/host-pkg-config @@ -0,0 +1,8 @@ +#!/bin/sh +PKGCONFDIR=$(dirname $0) + +# Default PKG_CONFIG_LIBDIR is HOST_DIR/lib/pkgconfig:HOST_DIR/share/pkgconfig +PKG_CONFIG_SYSROOT_DIR="/" \ + exec ${PKGCONFDIR}/pkgconf \ + --keep-system-cflags \ + --keep-system-libs "$@" diff --git a/package/pkgconf/pkgconf.mk b/package/pkgconf/pkgconf.mk index 1851ecfca4..f3eb47931a 100644 --- a/package/pkgconf/pkgconf.mk +++ b/package/pkgconf/pkgconf.mk @@ -11,6 +11,7 @@ PKGCONF_LICENSE = pkgconf license PKGCONF_LICENSE_FILES = COPYING PKG_CONFIG_HOST_BINARY = $(HOST_DIR)/bin/pkg-config +HOST_PKG_CONFIG_HOST_BINARY = $(HOST_DIR)/bin/host-pkg-config define PKGCONF_LINK_PKGCONFIG ln -sf pkgconf $(TARGET_DIR)/usr/bin/pkg-config @@ -19,6 +20,8 @@ endef define HOST_PKGCONF_INSTALL_WRAPPER $(INSTALL) -m 0755 -D package/pkgconf/pkg-config.in \ $(HOST_DIR)/bin/pkg-config + $(INSTALL) -m 0755 -D package/pkgconf/host-pkg-config \ + $(HOST_DIR)/bin/host-pkg-config $(SED) 's,@STAGING_SUBDIR@,$(STAGING_SUBDIR),g' \ $(HOST_DIR)/bin/pkg-config endef From patchwork Mon Feb 10 15:55:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Cavallari X-Patchwork-Id: 1235875 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) 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=none (p=none dis=none) header.from=green-communications.fr 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 48GVr73JZgz9sP7 for ; Tue, 11 Feb 2020 02:56:07 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8C6D687032; Mon, 10 Feb 2020 15:56:02 +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 qC3CdnUVf2-x; Mon, 10 Feb 2020 15:56:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id C7D7586762; Mon, 10 Feb 2020 15:56:00 +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 A6A751BF3AE for ; Mon, 10 Feb 2020 15:55:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A26A3814AB for ; Mon, 10 Feb 2020 15:55:59 +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 YdV5YVhiNzFl for ; Mon, 10 Feb 2020 15:55:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5F9A881680 for ; Mon, 10 Feb 2020 15:55:58 +0000 (UTC) Received: from evilbit.green-communications.fr ([92.154.77.116]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.184]) with ESMTPSA (Nemesis) id 1N5mOb-1jYSzQ0ENn-017FBM; Mon, 10 Feb 2020 16:55:55 +0100 From: Nicolas Cavallari To: buildroot@buildroot.org Date: Mon, 10 Feb 2020 16:55:48 +0100 Message-Id: <20200210155548.31928-2-nicolas.cavallari@green-communications.fr> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210155548.31928-1-nicolas.cavallari@green-communications.fr> References: <20200210155548.31928-1-nicolas.cavallari@green-communications.fr> MIME-Version: 1.0 X-Provags-ID: V03:K1:NngZNWKMzaAoSP43yDMbh/rmFrxK2PdB/nPwiM1gl3aqKdmykQQ jxwyX+1rq2PK0LRjKwE/unx2gka/drSybELbokdpTD4QrvWJFuhj5QH2oUOEVlsTU60fp7w NZcCejRQlc28R/OfrHIAXv64pZ1yGGpaAMzPIQFxRp9QCEk7EffMeBaOf9A+hMSXCe6Qupm Avpxjv3VjVy80phtK1bYg== X-UI-Out-Filterresults: notjunk:1; V03:K0:+O2tLMabdfU=:ugytwJyzBMmbCDuxioisF9 GK+AZWvYTdkOy1GyBVBjAitVFfHJ8PFZ6G56Jz0jxuCksDZztseVM20+90qWVm0rcgqXdMXrA +tK8sOlduFgqaU6SlyNS89PfDhlpIIgfY6ZVAMq/M6l8+CR5csk8DXLi8MUjvAVkRU2XNn4NU qBzCYv+2+Y1SIxbI6NM3qgVgLVoJ0RiZ74O6+dV2YTqrD02ijhxYKw8AjmYFsGf5qP45t9j80 XjZ15RBhCghdHDBq0DC8RLIJkvUrgUC3a3hJBZYjpEfHiAX8EB5tFNG3p0Bf0GW0HitbEDKWg YCYnA7V/sT7+EN0XL7gqWbK4j9Zms1UFRHoYwtMue8TLpmM3lsjAiY0H+V1RgDahl3aZqSVCG cwntWRulXc4LK4U0M9ew3pIvraPYgvohPQ7MbrAPKPODpBOj5zTEuTgXQgV9htL3W04anopUU UqPJZHr+TOlLZBuIaItECBm2UDz1XfAWSk763JkZpzSo09QfaWJBYqhCgpjmXnjUdiE1mU/pH rB5oyqLdDFp7ZwlsIGhfzp+hhphh+qWKcDQYxkXfuPoNnYKlhFUGMyoYZkTMuUyq+fjVT05UB BsVaZjkOinL2R+vDGWM/6H0KZL/VJBjnCes1MpyrEPbGJ9PyTHCmBqXFVngQq5aIS4qWtHkDN p1Am5ybRwrLvu5Nm3zfmlbJbt8j+Xbzu3EvaHDKYYwRVoxr/LkifZbxKyXrXHGsw4sxxrRVXy 0/2tk+/vyYKqio+pBpANn2achtJIAepIOjPyaZ5+9BV4/6oBuARniCC1NtvGpF1ZjhSwyLWbU 0dMs3eYOTmFaXEa3c9Yljqmv5Ne/x/Mq8NliB1GHoDfZYfmuS2/8UhfML2pY/vc755TB2vbjW 6JDNevP+SO5SlJrsqRNg== Subject: [Buildroot] [PATCH v2 2/2] package/pkg-meson: use host-pkg-config to find host libraries. 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: Eric Le Bihan Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" meson makes a distinction between 'native' (i.e. host) dependencies and 'host' (i.e. target) dependencies and can use a different pkg-config binary for each case. Currently, pkg-meson only pass the target pkg-config and meson automatically guesses the host pkg-config by searching PATH, which finds host/bin/pkg-config, which is the target pkg-config wrapper script. As a result, meson uses the target pkg-config to find host dependencies, with possibly incorrect results. This patch causes meson to use host/bin/host-pkg-config directly to find host dependencies, using the apparently recommended method[1] of specifing the PKG_CONFIG environment variable. [1] https://github.com/mesonbuild/meson/issues/1849 Signed-off-by: Nicolas Cavallari --- I tested that the following packages still compile: - libglib2 - gst1-plugins-bad - gst1-plugins-base - gst1-plugins-good - gst1-plugins-ugly - gstreamer1 - libdrm - mesa3d --- package/pkg-meson.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk index 642b715938..09687cc960 100644 --- a/package/pkg-meson.mk +++ b/package/pkg-meson.mk @@ -81,7 +81,8 @@ define $(2)_CONFIGURE_CMDS ) \ package/meson/cross-compilation.conf.in \ > $$($$(PKG)_SRCDIR)/build/cross-compilation.conf - PATH=$$(BR_PATH) $$($$(PKG)_CONF_ENV) $$(MESON) \ + PATH=$$(BR_PATH) PKG_CONFIG=$$(HOST_PKG_CONFIG_HOST_BINARY) \ + $$($$(PKG)_CONF_ENV) $$(MESON) \ --prefix=/usr \ --libdir=lib \ --default-library=$(if $(BR2_STATIC_LIBS),static,shared) \