From patchwork Mon Feb 25 21:11:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 1047987 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="vGqnpsTq"; 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 447ZPm26HSz9s4Z for ; Tue, 26 Feb 2019 08:11:40 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3E78080ED0; Mon, 25 Feb 2019 21:11:37 +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 Oh1VOkKOqwAt; Mon, 25 Feb 2019 21:11:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7F4B981A25; Mon, 25 Feb 2019 21:11:36 +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 8911A1BF3D7 for ; Mon, 25 Feb 2019 21:11:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 78A6C207A8 for ; Mon, 25 Feb 2019 21:11:35 +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 myJQ0jxr+s0E for ; Mon, 25 Feb 2019 21:11:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) by silver.osuosl.org (Postfix) with ESMTPS id 7D9192014B for ; Mon, 25 Feb 2019 21:11:34 +0000 (UTC) Received: by mail-ed1-f44.google.com with SMTP id m35so8808930ede.10 for ; Mon, 25 Feb 2019 13:11:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=s957crSSuMlKt6Z30gFl5TjjGUzKTIo9VLIMK/UtCs4=; b=vGqnpsTqmfgEwqtgZSQJZ7Afsvskwz7bh/WViIxnTPdkY0keXk6o4UDFkwn5wPDbs0 WHYqFiMI0qba7/aaZGC5MBW+6uSopfRxszn94Gs+AdRMoqhZxGnKiTTjSXWcmyTUH7oT GT6Ug8XZ1qchbeHpYuv/tz4mu6dXUEnUQXL0jUK3zefJIIcr9jUAA5gneb1fU8+NJ8Lt YT2qdu8ubakvR0yZ+SMoofYQCwnMXg7siazWJpIe2BcHkXg1of3TB+TNfg7g/IjSKuzv 0mseEjgy9iI02t1TVtnarzrdzOuDmHu+Ocx2uSaiHToyafzAUnrhDZm3rzJG3kGcs3/0 0MFQ== 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=s957crSSuMlKt6Z30gFl5TjjGUzKTIo9VLIMK/UtCs4=; b=SHL9QFqB7RspuLzKNncZNFrfZTj2JDueLxCwuN3nKWaYukaAntCzKP3kiBJRwvVrpG +FCGM7vf1BaR7MU3yfUTO2Ww2NZVklZihaMMZkEQPKElaExlZeeDhkGeIeQV3T2GYzRz gLffd1mva8fASgXf58qhFGJjnKjv1UuhwLHbwOBq8UBQyTtv5gg5216R/7geHVUYzDxH a+RTXU6m+uB/s2sxqg8ANxYkHXA1uAdk9QoIl7FAbnmPeBeYpB4g+i1QyVWBEg/pn739 FjZL/MnbsBJN7s1RMt8SY/5hPoiOLoODrYcPaCuPkLl6i08Mt1NNlVYrxAWQvIJTTWwE VzCQ== X-Gm-Message-State: AHQUAuZD3xq17+M0/U9D84pjCMnPaA8HipqIkvuMeEhC4I95vzNvnSgt 2hf5GgvejWsaXrS11+CujYVlkhd8 X-Google-Smtp-Source: AHgI3IYYdLkhqTstCC+5ntkhOscPCvp/j4DtO7PzeM4wSAq5q0eiFMmjmdW0edDtpLqHLd8O0FD1Jg== X-Received: by 2002:a50:b35b:: with SMTP id r27mr11819341edd.144.1551129092558; Mon, 25 Feb 2019 13:11:32 -0800 (PST) Received: from localhost.localdomain (d54C493B0.access.telenet.be. [84.196.147.176]) by smtp.gmail.com with ESMTPSA id z7sm2979021edl.59.2019.02.25.13.11.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Feb 2019 13:11:31 -0800 (PST) From: Thomas De Schampheleire To: buildroot@buildroot.org Date: Mon, 25 Feb 2019 22:11:46 +0100 Message-Id: <20190225211147.14947-2-patrickdepinguin@gmail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190225211147.14947-1-patrickdepinguin@gmail.com> References: <20190225211147.14947-1-patrickdepinguin@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH-for-master 1/2] package/meson: don't install cross-compilation.conf during target-finalize 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 , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas De Schampheleire package/meson installs a cross-compilation.conf file in $(HOST_DIR)/etc/meson, via TARGET_FINALIZE_HOOKS. package/pkg-cmake.mk installs a toolchainfile.cmake in $(HOST_DIR)/share/buildroot, via TOOLCHAIN_POST_INSTALL_STAGING_HOOKS. Both files have a similar concept, they describe some flags/paths needed for compilation using respective build systems. One difference is that the meson file is added for external compilation, from the SDK, while the cmake file is used internally in Buildroot. The 'problem' of using TARGET_FINALIZE_HOOKS for the meson file, is that it installs a 'host' file from target-finalize, which is conceptually incorrect and breaks the invariant that only TARGET_DIR is changed on a subsequent 'make' when everything was already built (i.e. only target-finalize is run). This can easily be fixed, by using the same hook as cmake uses, i.e. TOOLCHAIN_POST_INSTALL_STAGING_HOOKS. Note that actually even for cmake, TOOLCHAIN_POST_INSTALL_STAGING_HOOKS is not the best hook to install a host file. A better hook would have been TOOLCHAIN_POST_INSTALL_HOOKS, but this triggers only for 'host' packages, and 'toolchain' is treated as a 'target' package. Signed-off-by: Thomas De Schampheleire --- package/meson/meson.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/meson/meson.mk b/package/meson/meson.mk index d76541cc93..aba7382cc9 100644 --- a/package/meson/meson.mk +++ b/package/meson/meson.mk @@ -65,6 +65,7 @@ define HOST_MESON_INSTALL_CROSS_CONF > $(HOST_DIR)/etc/meson/cross-compilation.conf endef -TARGET_FINALIZE_HOOKS += HOST_MESON_INSTALL_CROSS_CONF +TOOLCHAIN_POST_INSTALL_STAGING_HOOKS += HOST_MESON_INSTALL_CROSS_CONF +TOOLCHAIN_INSTALL_STAGING = YES $(eval $(host-python-package))