From patchwork Tue Feb 4 14:24:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1233367 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=mind.be Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=St36jOfx; dkim-atps=neutral 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 48Bn684sMjzB3xT for ; Wed, 5 Feb 2020 01:25:20 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E340D204C3; Tue, 4 Feb 2020 14:25:18 +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 2DIlZVF85kFS; Tue, 4 Feb 2020 14:25:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 23047203A2; Tue, 4 Feb 2020 14:25:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 9B63B1BF3D8 for ; Tue, 4 Feb 2020 14:25:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 97706203A2 for ; Tue, 4 Feb 2020 14:25:16 +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 Up5JUXIckRZX for ; Tue, 4 Feb 2020 14:25:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by silver.osuosl.org (Postfix) with ESMTPS id 7DB4820349 for ; Tue, 4 Feb 2020 14:25:15 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id z3so23344746wru.3 for ; Tue, 04 Feb 2020 06:25:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ig+T28DvmtnCMg9piyUyGPRzXB0Jz7N5O7caeItVfkk=; b=St36jOfx8NqvtRGuuzLeZJkLyp3KykNRGepyoTYdskCrMKWn/qtMiACHyWNbq8tSl/ XKRUc51aT3kFRdTI+R84SUwCJg3huKzsxpSzR2Hh0qJ0oZ29fkp9tzNVqjTgTUl8IhHC ay1AhO1OVxXNgu0DzE85hBKlVi6r5ZnhEhpwUraPXZtUseoRt639n31Dq7aRCk6c8KiP hw+rKo4h8RAHAdLceZCb/bKc07HzyUDNNuYXdg+6saKZIf7yEMG5qUioy0fn+G77bnWO vN2FhaK/8uoQ0YlQqGFgi1yYHyJYCN/Yfoq2tbo9dXJ6hrqKheycOtoIQwcRjCUhimMk 4w3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ig+T28DvmtnCMg9piyUyGPRzXB0Jz7N5O7caeItVfkk=; b=fo4kBtpoB5PphlASq0o5Cr7kO2garZQUGEC7OsU+Q+EesZJtUIqLrDoxq+BcV03dFZ 2PvZyCHVbqe3iEBEF0zzbACIQV20SDpQPqckSabXj4Z4lHwbCdBNPk5TtoxC6FkXltYZ AP9FPJrt1nDSKmc8K67OQTZya0j/F8jWv1MsF2EgwKnuZyiG6Y23ZYy8m0ozkyAAEBik eJoULtGCuUBA67UgVBmAB484R4wt+H5OU1Klx2BaV1unSHX0bQA22fMFMAvzQ3038Pyc QdZEM6p4D+SDcnGPxgt9+1ujM7ouplsHyW0NYxjFExdM+xNZBuP0W/orP+PsL0ZgUBJl xXew== X-Gm-Message-State: APjAAAWgy3IfYrILwpWS2mmDPkYZ1XjDDIQ7QgT7Jj3HZzUaXV0S7pzV qoBnjEYHY2RnMGW1gQfijycEYEtUHKU= X-Google-Smtp-Source: APXvYqwNKE0osB34lkeaJPTbTunX+U8IoAp9IH2cugrBe30Vp4b1R/ymWz9CopA2C+Gm/EtjM2EFdQ== X-Received: by 2002:adf:cd0a:: with SMTP id w10mr22553861wrm.107.1580826313747; Tue, 04 Feb 2020 06:25:13 -0800 (PST) Received: from localhost.localdomain ([2620:0:1055:fd00:c6df:61c8:f82e:fd3c]) by smtp.gmail.com with ESMTPSA id z133sm4234615wmb.7.2020.02.04.06.25.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2020 06:25:13 -0800 (PST) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Tue, 4 Feb 2020 15:24:52 +0100 Message-Id: <20200204142456.1537358-2-arnout@mind.be> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200204142456.1537358-1-arnout@mind.be> References: <20200204142456.1537358-1-arnout@mind.be> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/5] package/Makefile.in: add HOST_BIN_CROSS 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: Adam Duskett Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Many packages make use of configuration scripts to find various paths (includes, libraries, etc.). In the best case, pkg-config is used, but there are dozen of other scripts as well. These scripts have to be configured or called differently depending on whether we're doing cross compilation (i.e. building a target package) or native compilation (i.e. host compilation). Currently, we use various ways to make sure the correct configure script with the correct settings is used - mostly by passing environment variables in the configuration step. To create more convergence and simplify our understanding of what is going on, let's make a separate directory for cross-compilation configuration scripts. This is particularly useful for meson, because meson makes an explicit difference between native and cross compilation, with a full configuration file for both. Define HOST_BIN_CROSS as a subdirectory of $(HOST_DIR)/$(GNU_TARGET_NAME). This makes it easy for the wrapper script to use a relative path to ../sysroot to find STAGING_DIR, which makes them relocatable. Note that we can't use $(HOST_DIR)/$(GNU_TARGET_NAME)/bin, because for an internal toolchain, gcc and binutils install the cross-executables there without target prefix. Putting that directory in PATH makes it impossible to do native compilation at all, because gcc will call 'as' and 'ld' from PATH, i.e. the cross-tools instead of the native tools. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/Makefile.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/Makefile.in b/package/Makefile.in index 285e2837ef..c82e30069e 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -230,6 +230,9 @@ HOST_CFLAGS += $(HOST_CPPFLAGS) HOST_CXXFLAGS += $(HOST_CFLAGS) HOST_LDFLAGS += -L$(HOST_DIR)/lib -Wl,-rpath,$(HOST_DIR)/lib +# Location of scripts/wrappers for cross-compilation +HOST_BIN_CROSS = $(HOST_DIR)/$(GNU_TARGET_NAME)/cross-bin + # host-intltool should be executed with the system perl, so we save # the path to the system perl, before a host-perl built by Buildroot # might get installed into $(HOST_DIR)/bin and therefore appears @@ -241,7 +244,7 @@ export PERL=$(shell which perl) # finds this perl module by exporting the proper value for PERL5LIB. export PERL5LIB=$(HOST_DIR)/lib/perl -TARGET_MAKE_ENV = PATH=$(BR_PATH) +TARGET_MAKE_ENV = PATH=$(HOST_BIN_CROSS):$(BR_PATH) TARGET_CONFIGURE_OPTS = \ $(TARGET_MAKE_ENV) \ From patchwork Tue Feb 4 14:24:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1233368 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=mind.be Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=EwF+EqnN; dkim-atps=neutral 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 48Bn6T0TdHzB3xs for ; Wed, 5 Feb 2020 01:25:37 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1FA6687082; Tue, 4 Feb 2020 14:25:35 +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 CmzIlXGMN++U; Tue, 4 Feb 2020 14:25:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 53DDB8704A; Tue, 4 Feb 2020 14:25:34 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 748A31BF3D8 for ; Tue, 4 Feb 2020 14:25:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 71A0685166 for ; Tue, 4 Feb 2020 14:25:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mh23aiM9mzik for ; Tue, 4 Feb 2020 14:25:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by fraxinus.osuosl.org (Postfix) with ESMTPS id F0C5384493 for ; Tue, 4 Feb 2020 14:25:31 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id t14so3883543wmi.5 for ; Tue, 04 Feb 2020 06:25:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zAwn2AtmWtTvVREdlizQgVxHO7D8zaFqsqmYwOvx2Yw=; b=EwF+EqnNj2F84lw+tdWDbiDtolBm3rEDS+VcUsHzV6BDA7J5uFOfdpfMZ93DsDW034 vQ5p5rD4S1hSEpKQ6mhcoeBgfUPtIRh7B53GVPb0aV4WmKFaKusdiOalT351fMJQFW81 XSu/4VrQRbxtufNJfg2H8HdqXXXTFg/4vsH/Kjz+qAjIsGbPBGE6UpMfm6ujFl9BnJPK ac0Rzk+rdtj7sOx0+WhiudGhN2/mWdFa2cpYIbtuepguVQsfyfI7rLOCmSM/uMaH7Q1q u1+2RrEHfRa0vxIfkzg+hDwWsJVcJI7iggFIRLQGnu0/FwiGTAk17MI21OOYLTJSwzyk jsrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zAwn2AtmWtTvVREdlizQgVxHO7D8zaFqsqmYwOvx2Yw=; b=M0s4OXIqj/9Jcxv5OcWwd10SQuC/CQpyAA5UhTBOyxYGvZx/UcHNnSs0FYmZc7TAEa f6JV2+ubmTOfqOHp4G1N/Sajhjf7yBxiaNx2MyPNGXWdHppJxPHrY/wn2E4jkqMvbga/ kSzQF70vw4w4e1SwWdjreaKEc0+8beBmM4fzsPzlDB81jkY+69flfYnGw7b1vqyRl41e 2LHpJ7hKQfDGIR1pKeFePEkdF2d7rcE/QMTdarAZOs8RbgU1VcutxY/nuAUF4MwYStJm cf3FFpra5rLTPDuSo1Y/oUe7MRcXgxjtTZIc4oFM7vdyIUPBB3s0dM8D3GIUZ5sI4/xc bQPw== X-Gm-Message-State: APjAAAVuddTmKSfy3XlU5IiBkD/P2u34ubkDAZ3jibOP6p1xJX70k+zj CKG27B6kA8iH/Iup56v+uSk8x7/S9TE= X-Google-Smtp-Source: APXvYqw0ilyJnJvfMXSWSJ56WV4CsaJHalpEh++ntJ0OvCh3NT9kWeqd6ZYyU4mlvQmLOlvxERNqXQ== X-Received: by 2002:a1c:6389:: with SMTP id x131mr5956330wmb.174.1580826329893; Tue, 04 Feb 2020 06:25:29 -0800 (PST) Received: from localhost.localdomain ([2620:0:1055:fd00:c6df:61c8:f82e:fd3c]) by smtp.gmail.com with ESMTPSA id x17sm29712678wrt.74.2020.02.04.06.25.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2020 06:25:29 -0800 (PST) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Tue, 4 Feb 2020 15:24:53 +0100 Message-Id: <20200204142456.1537358-3-arnout@mind.be> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200204142456.1537358-1-arnout@mind.be> References: <20200204142456.1537358-1-arnout@mind.be> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/5] package/python3: install wrapper in HOST_BIN_CROSS 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: Adam Duskett Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When building python packages, we set some environment variables to make sure python picks up the correct configuration even though we're running host-python intead of target-python. Create a wrapper script that does the same, without requiring an explicit export from Buildroot. This script is installed in HOST_BIN_CROSS so that it can be found when cross-compiling. The script is made auto-discovering as much as possible. Since we know the script will be installed in $(HOST_DIR)/$(GNU_TARGET_NAME)/bin, we know that STAGING_DIR is at ../sysroot. sysconfigdata can be calculated based on that. Since this is specific for python3, we don't need the python3 condition. Only PYTHONPATH is still passed in explicitly, since that refers to TARGET_DIR - because most python packages are only installed in target and not in staging. So until we install everything in staging as well, we keep an explicit TARGET_DIR. Since the installation hook uses PYTHON3_PATH, move the definition of that variable higher in the file so it comes before its first use. It is not really necessary to have a similar script for native python, because the only environment variable we need in that case is PYTHONNOUSERSITE=1. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/python3/python-wrapper.in | 24 ++++++++++++++++++++++++ package/python3/python3.mk | 17 ++++++++++++++--- 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 package/python3/python-wrapper.in diff --git a/package/python3/python-wrapper.in b/package/python3/python-wrapper.in new file mode 100644 index 0000000000..c2f34f32df --- /dev/null +++ b/package/python3/python-wrapper.in @@ -0,0 +1,24 @@ +#! /bin/sh + +STAGING_DIR=$(cd "${0%/*}/../sysroot"; pwd) + +SYSCONFIGDATA="" +for sysconfig in ${STAGING_DIR}/usr/lib/python*/_sysconfigdata__linux_*.py; do + if [ -n "$SYSCONFIGDATA" ]; then + echo "*** More than one sysconfigdata exists. Buildroot doesn't support mixing targets." 1>&2 + exit 1 + fi + if [ ! -r "$sysconfig" ]; then + echo "*** No sysconfigdata found in $sysconfig." 1>&2 + exit 1 + fi + SYSCONFIGDATA="$(echo $sysconfig | sed 's%.*/\([^/]*\).py%\1%')" +done + +PYTHONPATH="@PYTHON_PATH@" \ +PYTHONNOUSERSITE=1 \ +_PYTHON_SYSCONFIGDATA_NAME="$SYSCONFIGDATA" \ +_python_sysroot="$STAGING_DIR" \ +_python_prefix=/usr \ +_python_exec_prefix=/usr \ +exec "${0%/*}/../../bin/python3" "$@" diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 9432f1c59e..6280b4a550 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -239,6 +239,20 @@ ifneq ($(BR2_PACKAGE_PYTHON),y) PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_INSTALL_SYMLINK endif +# Provided to other packages +PYTHON3_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/ + +define PYTHON3_INSTALL_CROSS_WRAPPER + mkdir -p $(HOST_BIN_CROSS) + sed 's%@PYTHON_PATH@%$(PYTHON3_PATH)%' \ + package/python3/python-wrapper.in \ + > $(HOST_BIN_CROSS)/python + chmod 0755 $(HOST_BIN_CROSS)/python + ln -sf python $(HOST_BIN_CROSS)/python3 +endef + +PYTHON3_POST_INSTALL_STAGING_HOOKS += PYTHON3_INSTALL_CROSS_WRAPPER + # Some packages may have build scripts requiring python3, whatever is the # python version chosen for the target. # Only install the python symlink in the host tree if python3 is enabled @@ -252,9 +266,6 @@ endef HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_SYMLINK endif -# Provided to other packages -PYTHON3_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/ - # Support for socket.AF_BLUETOOTH ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_HEADERS),y) PYTHON3_DEPENDENCIES += bluez5_utils-headers From patchwork Tue Feb 4 14:24:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1233369 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.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mind.be Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=Y/Ry86Zn; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Bn6q0dy1zB3xk for ; Wed, 5 Feb 2020 01:25:54 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E82C3853F8; Tue, 4 Feb 2020 14:25:52 +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 oCG4oSFgLUhB; Tue, 4 Feb 2020 14:25:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 07EF385218; Tue, 4 Feb 2020 14:25:52 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 09FC41BF3D8 for ; Tue, 4 Feb 2020 14:25:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 065EE20349 for ; Tue, 4 Feb 2020 14:25:50 +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 AqVIUpwwpjst for ; Tue, 4 Feb 2020 14:25:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by silver.osuosl.org (Postfix) with ESMTPS id AD8D42002B for ; Tue, 4 Feb 2020 14:25:47 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id u6so10018606wrt.0 for ; Tue, 04 Feb 2020 06:25:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+3cbWEBfnz5RiGOndZUjyydx7RSNjpkt9lk6vQv8n7Q=; b=Y/Ry86ZnsBQ0xKI1cBFoNSzQWUFdDEZaxEUIqg+mOzbunmh0jolR+IA3GSKfeKXzoC 5zdMVAO6m/clsbrT4bXE/5yV+5xvZvGEyAlWomApKqsOU5PXCRGezjv0x55wxcZNiojK UP4xQUs2sWgleZbNdX9+DjXn5GOHosWCDIQVvuvoHtUTrQ5sem7NeF/yZlfOURzVmgJD r2Z3rAUDSht79nKHKCD8VuLEG8PyRn1y+NCpZN2hMrKXbu2E6wWX+dBBsduL+38CVFJ8 RVaVA9kE2EHcFKZ0b/KGHUwNI0vwuuO2QCVuPG2Isw65Boyn4gyC1YQlhQX8CkVtg6EZ H2Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+3cbWEBfnz5RiGOndZUjyydx7RSNjpkt9lk6vQv8n7Q=; b=ZEmLvoEvyJmvijkSCP3+LGKmHMe6pePBtkXBCrRU1aRzSwPX83j3raikzwPkOk6xjz UUx1fpbefiBVsmrrubweYJbJBsMNKChYlOkn7LCQFi4UuYNY1nTNdkHGhLQx4Js4XHkM rn65paSh1OTE38Gq3N4WoKTaGnLthTrGHhdV453fTpE83DKnywohD9Es6C72ZPB2yPy0 NqbIrvJ8km3B4wVTLKTK6EVvkTyykSCvplAHQYRxE2QLUzU+JwNtIEEYqHWbEZAu4CrJ nuKHETGzZy+KUNuLS8EtgHs9OSzn0uUnvK3l1L9JU0eA2DJoyWxoMMlK+3GQVJGbpQxC vYMw== X-Gm-Message-State: APjAAAVUINXXkYibQqNbAQSZBWiuq8v6yqh9qxX/wlnREKVNGLfkxBxB y24H3AZBLEg0/GSzZ77QF5jfpc9S7Kw= X-Google-Smtp-Source: APXvYqzJLWtDb1yI6dfVq+ESzv3t6xmEy3XFqHaqQd6Jj+AJX4rd6mDRf6EOmAsvjPBx7wHS68yOAg== X-Received: by 2002:adf:f091:: with SMTP id n17mr21693701wro.387.1580826345948; Tue, 04 Feb 2020 06:25:45 -0800 (PST) Received: from localhost.localdomain ([2620:0:1055:fd00:c6df:61c8:f82e:fd3c]) by smtp.gmail.com with ESMTPSA id s65sm4163277wmf.48.2020.02.04.06.25.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2020 06:25:45 -0800 (PST) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Tue, 4 Feb 2020 15:24:54 +0100 Message-Id: <20200204142456.1537358-4-arnout@mind.be> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200204142456.1537358-1-arnout@mind.be> References: <20200204142456.1537358-1-arnout@mind.be> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 3/5] package/python: install wrapper in HOST_BIN_CROSS 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: Adam Duskett Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When building python packages, we set some environment variables to make sure python picks up the correct configuration even though we're running host-python intead of target-python. Create a wrapper script that does the same, without requiring an explicit export from Buildroot. This script is installed in HOST_BIN_CROSS so that it can be found when cross-compiling. The script is made auto-discovering as much as possible. Since we know the script will be installed in $(HOST_DIR)/$(GNU_TARGET_NAME)/bin, we know that STAGING_DIR is at ../sysroot. PYTHONPATH is still passed in explicitly, since that refers to TARGET_DIR - because most python packages are only installed in target and not in staging. So until we install everything in staging as well, we keep an explicit TARGET_DIR. sysconfigdata is not needed for python2 because it is not "multilib": there is only a target sysonfigdata module in STAGING_DIR. Since the installation hook uses PYTHON_PATH, move the definition of that variable higher in the file so it comes before its first use. It is not really necessary to have a similar script for native python, because the only environment variable we need in that case is PYTHONNOUSERSITE=1. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/python/python-wrapper.in | 10 ++++++++++ package/python/python.mk | 17 ++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 package/python/python-wrapper.in diff --git a/package/python/python-wrapper.in b/package/python/python-wrapper.in new file mode 100644 index 0000000000..c5e6e5481b --- /dev/null +++ b/package/python/python-wrapper.in @@ -0,0 +1,10 @@ +#! /bin/sh + +STAGING_DIR=$(cd "${0%/*}/../sysroot"; pwd) + +PYTHONPATH="@PYTHON_PATH@" \ +PYTHONNOUSERSITE=1 \ +_python_sysroot="$STAGING_DIR" \ +_python_prefix=/usr \ +_python_exec_prefix=/usr \ +exec "${0%/*}/../../bin/python" "$@" diff --git a/package/python/python.mk b/package/python/python.mk index 41a981e3d3..6f2e01386e 100644 --- a/package/python/python.mk +++ b/package/python/python.mk @@ -227,6 +227,20 @@ PYTHON_POST_INSTALL_STAGING_HOOKS += PYTHON_INSTALL_STAGING_PYTHON_CONFIG_SYMLIN PYTHON_AUTORECONF = YES +# Provided to other packages +PYTHON_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/sysconfigdata/ + +define PYTHON_INSTALL_CROSS_WRAPPER + mkdir -p $(HOST_BIN_CROSS) + sed 's%@PYTHON_PATH@%$(PYTHON_PATH)%' \ + package/python/python-wrapper.in \ + > $(HOST_BIN_CROSS)/python + chmod 0755 $(HOST_BIN_CROSS)/python + ln -sf python $(HOST_BIN_CROSS)/python2 +endef + +PYTHON_POST_INSTALL_STAGING_HOOKS += PYTHON_INSTALL_CROSS_WRAPPER + # Some packages may have build scripts requiring python2. # Only install the python symlink in the host tree if python3 is not enabled # for the target, otherwise the default python program may be missing. @@ -239,9 +253,6 @@ endef HOST_PYTHON_POST_INSTALL_HOOKS += HOST_PYTHON_INSTALL_PYTHON_SYMLINK endif -# Provided to other packages -PYTHON_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/sysconfigdata/ - $(eval $(autotools-package)) $(eval $(host-autotools-package)) From patchwork Tue Feb 4 14:24:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1233370 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.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mind.be Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=f0SP4CDs; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Bn7701cbzB3xT for ; Wed, 5 Feb 2020 01:26:10 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E7D3485721; Tue, 4 Feb 2020 14:26:08 +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 4vDpOriL9Jyc; Tue, 4 Feb 2020 14:26:07 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id EACDC85310; Tue, 4 Feb 2020 14:26:06 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 588311BF3D8 for ; Tue, 4 Feb 2020 14:26:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 54C24203A2 for ; Tue, 4 Feb 2020 14:26: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 8hmgCL4Xlg3K for ; Tue, 4 Feb 2020 14:26:03 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by silver.osuosl.org (Postfix) with ESMTPS id 93B1720349 for ; Tue, 4 Feb 2020 14:26:03 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id y11so23293018wrt.6 for ; Tue, 04 Feb 2020 06:26:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SQNxDm0VQ9w3kyFWmQy7PbOlkUanSwPx4sT0xKlorUc=; b=f0SP4CDssOepIO3k9m+K0Ir8NlhyoDDmnnbW1Q0GwxPQXWT76k7k8sPo0H0F/jLBjX FSyjb/7kRp1e0OpgsA7p57aQmaUR6s9uHF/GFccqzASfNtMPP1oKIQmLSqujhFf1XoLH vzHParjba/X3mXB9udGJeKelNTVdOB+xk5xQx2d9otkSnMMfVHiUtLQXOyLcxrc0lq08 By66tpOrqRr9YWSXfQcv+GdDy2iKiyQ7eNqiJ0QJiqklLAFl5j9O16+M4T/CMOK8SOlb d5jHMz0xGyK4vM51pqw6f9dJSEFZ4l3eTAmFaancIFim1PnskLQw3G7WNxwbUZHYJ9bg ctMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SQNxDm0VQ9w3kyFWmQy7PbOlkUanSwPx4sT0xKlorUc=; b=eDa8tZ1J9fqFpRZEVRuF3JUP2U7dYiRotEyKDLuq6GDd5Fe55E0/DQH82GcgKCtguW NdpjXEv8As9vtKguBfc/aT2yqgdXlc/0YlCh4mvXF1hXn22cToKmLZw8itxpmOIF2Lpk nfQNmRJyY0INYosCE8LSLyrt1RVMqq8zHCaHsy9Tz/j6pJEoQdwDzTIDPTek1k9auH8R wgGqNos2v0B5dSBwaGkxzQj0OCBCWDJdroyfK0+khvMs+a2flzMizkcOUkJ0tKb04pzg 0A2vi1xrhwkVmO+W5LtwoG8y5uORU7QpmDGP5ii43ATiV5cwPYqrd9w+Lj8j6AUL2KQW A3Bw== X-Gm-Message-State: APjAAAVc6k9D6SndbXsqQaRTvhszeDdLgBMjuZOwJAe3vKvA04iunnnB yw2lA66B4HpPCKeTGpoBu+HGCRZ2IL8= X-Google-Smtp-Source: APXvYqy2cARCB+1gEXQRPoyjd76c65WknuRuyg3y8Pam6VlSIHfhnHEAQP+LRv989GHcHpq2GwDhRQ== X-Received: by 2002:a5d:484f:: with SMTP id n15mr22396716wrs.365.1580826361830; Tue, 04 Feb 2020 06:26:01 -0800 (PST) Received: from localhost.localdomain ([2620:0:1055:fd00:c6df:61c8:f82e:fd3c]) by smtp.gmail.com with ESMTPSA id w13sm30069071wru.38.2020.02.04.06.26.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2020 06:26:01 -0800 (PST) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Tue, 4 Feb 2020 15:24:55 +0100 Message-Id: <20200204142456.1537358-5-arnout@mind.be> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200204142456.1537358-1-arnout@mind.be> References: <20200204142456.1537358-1-arnout@mind.be> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 4/5] package/pkg-python: rely on python wrapper in HOST_BIN_CROSS 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: Adam Duskett Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Since we now have a python wrapper in HOST_BIN_CROSS, we no longer need to set all these environment variables from the python-package infrastructure. Add HOST_BIN_CROSS to the PATH for target packages, and remove all environment variables which are already set by the wrapper. Use this python as the python that is used to run setup.py. PKG_PYTHON_SYSCONFIGDATA_NAME is no longer used so it can be removed. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/pkg-python.mk | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/package/pkg-python.mk b/package/pkg-python.mk index 4ded4fde83..93f24856bf 100644 --- a/package/pkg-python.mk +++ b/package/pkg-python.mk @@ -20,21 +20,11 @@ # ################################################################################ -define PKG_PYTHON_SYSCONFIGDATA_NAME -$(basename $(notdir $(wildcard $(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/_sysconfigdata__linux_*.py))) -endef - # Target distutils-based packages PKG_PYTHON_DISTUTILS_ENV = \ - PATH=$(BR_PATH) \ + PATH=$(HOST_BIN_CROSS):$(BR_PATH) \ $(TARGET_CONFIGURE_OPTS) \ LDSHARED="$(TARGET_CROSS)gcc -shared" \ - PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \ - PYTHONNOUSERSITE=1 \ - _PYTHON_SYSCONFIGDATA_NAME="$(PKG_PYTHON_SYSCONFIGDATA_NAME)" \ - _python_sysroot=$(STAGING_DIR) \ - _python_prefix=/usr \ - _python_exec_prefix=/usr PKG_PYTHON_DISTUTILS_BUILD_OPTS = \ --executable=/usr/bin/python @@ -58,14 +48,8 @@ HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPTS = \ # Target setuptools-based packages PKG_PYTHON_SETUPTOOLS_ENV = \ - _PYTHON_SYSCONFIGDATA_NAME="$(PKG_PYTHON_SYSCONFIGDATA_NAME)" \ - PATH=$(BR_PATH) \ + PATH=$(HOST_BIN_CROSS):$(BR_PATH) \ $(TARGET_CONFIGURE_OPTS) \ - PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \ - PYTHONNOUSERSITE=1 \ - _python_sysroot=$(STAGING_DIR) \ - _python_prefix=/usr \ - _python_exec_prefix=/usr PKG_PYTHON_SETUPTOOLS_INSTALL_TARGET_OPTS = \ --prefix=/usr \ @@ -225,7 +209,7 @@ endif # SETUP_TYPE # - otherwise, we use the one requested by *_NEEDS_HOST_PYTHON. # ifeq ($(4),target) -$(2)_PYTHON_INTERPRETER = $$(HOST_DIR)/bin/python +$(2)_PYTHON_INTERPRETER = $$(HOST_BIN_CROSS)/python else ifeq ($$($(2)_NEEDS_HOST_PYTHON),) $(2)_PYTHON_INTERPRETER = $$(HOST_DIR)/bin/python From patchwork Tue Feb 4 14:24:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1233371 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mind.be Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=dV8dxIAL; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Bn7Q2xhPzB3xj for ; Wed, 5 Feb 2020 01:26:26 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 97113851C2; Tue, 4 Feb 2020 14:26:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UkIulhzbkXTC; Tue, 4 Feb 2020 14:26:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id E15C084493; Tue, 4 Feb 2020 14:26:22 +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 72D2F1BF3D8 for ; Tue, 4 Feb 2020 14:26:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6E0B085310 for ; Tue, 4 Feb 2020 14:26:21 +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 iuEwbpkdJ5cP for ; Tue, 4 Feb 2020 14:26:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by whitealder.osuosl.org (Postfix) with ESMTPS id 2B8278517C for ; Tue, 4 Feb 2020 14:26:20 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id u6so10020934wrt.0 for ; Tue, 04 Feb 2020 06:26:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RsOP04OjxDrvMTZFZiq4VPPLOnuDlQUBwVgRN9WAjH4=; b=dV8dxIALks92dQiNklCzrPTxUxIg+y3aAlmF3PDDvZp4vMCS4wXEFn/ihkJueyJCf2 ocza0exNi5p0SXLKoAzcVko7J6kfIYxs6cKYCqQGLkqONFQT0CNq6Rn+Gyhd7MGuHF4C Ks0brctFdG/8W/bDrdQSyB44gkHEoP+GL2TFhCOSr9hvnBO9UVbmarie7DTIGkpUNgS2 tRHsOC/RnoC6BEpw0YeOEcrKFC4UmiTIX5j8S/Kuxy8+82RIJ4GccZmNlbTCGwmsG9hT 0NwMHJ9GfpL3CEvKiUrJ0dGyGSyRDHjN/Nlo/vvlJ92NpebjXfXou8omf4s+hYXm8Ylw T8cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RsOP04OjxDrvMTZFZiq4VPPLOnuDlQUBwVgRN9WAjH4=; b=uneEudWqGl+ljJ/1GurzyP4y5yP1iSsROpPwB/KEPusUBAAcITkzrsf1Yn35XLdQB7 wWlZo1Nzf0knZsmLLx4z3DvQnuTUYg0QuLeF4URKSkorAx0rcM3imIPIvKSA9teiRdGH wgK2iZ4A/7dwn6zOyHpX9XLMSuT3FBDBy37gtuZcEoyEd5KbxZfeuYClm5T1mMInsyRO uJqT9+R7UGHbkafV8bfityguuxLsNXy7CUWoSeaHXuNN0sOv/JzBCOfJY98JtL/9K7Fi ybfkVN8djvee/FqS4YOnFjd2yB8VtIIKWbQMJ5qXHFwjIVC/9yoqUdQCq2W2fAynYReC otow== X-Gm-Message-State: APjAAAX+eu0RL4eBMtXS8iyMbld0A/W2jhb9vIvEEjm+sTDvecFpGeWd 4vkQmqU2YYlRdIwc4SFe+nLvXTGJj6E= X-Google-Smtp-Source: APXvYqxjuSyR0wrSQnp1oeBzYmkT5ZWizCZSs2lZ5sXZiu+1tycqNx+3sjU7DZv8rZWOKQwx2hb2ww== X-Received: by 2002:a5d:6151:: with SMTP id y17mr21972787wrt.110.1580826378422; Tue, 04 Feb 2020 06:26:18 -0800 (PST) Received: from localhost.localdomain ([2620:0:1055:fd00:c6df:61c8:f82e:fd3c]) by smtp.gmail.com with ESMTPSA id a22sm4095191wmd.20.2020.02.04.06.26.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2020 06:26:17 -0800 (PST) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Tue, 4 Feb 2020 15:24:56 +0100 Message-Id: <20200204142456.1537358-6-arnout@mind.be> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200204142456.1537358-1-arnout@mind.be> References: <20200204142456.1537358-1-arnout@mind.be> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 5/5] package/pkg-meson: use TARGET_MAKE_ENV in configure 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: Adam Duskett Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The configure step doesn't use TARGET_MAKE_ENV, but sets PATH explicitly. Thus, it missed the update of PATH with HOST_BIN_CROSS. Instead of adding it explicitly again, just use TARGET_MAKE_ENV. Yes, it's not really a 'make environment' that we're expecting to use in the configure step, 'conf environment' would make more sense. However, TARGET_MAKE_ENV is indeed used in the configure step since it's part of TARGET_CONFIGURE_OPTS. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/pkg-meson.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk index e7eea2aa58..7bb08157f5 100644 --- a/package/pkg-meson.mk +++ b/package/pkg-meson.mk @@ -84,7 +84,7 @@ define $(2)_CONFIGURE_CMDS ) \ package/meson/cross-compilation.conf.in \ > $$($$(PKG)_SRCDIR)/build/cross-compilation.conf - PATH=$$(BR_PATH) $$($$(PKG)_CONF_ENV) $$(MESON) \ + $$(TARGET_MAKE_ENV) $$($$(PKG)_CONF_ENV) $$(MESON) \ --prefix=/usr \ --libdir=lib \ --default-library=$(if $(BR2_STATIC_LIBS),static,shared) \