From patchwork Thu Jul 27 14:54:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13330212 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9F55BC04A6A for ; Thu, 27 Jul 2023 14:55:20 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.571159.894352 (Exim 4.92) (envelope-from ) id 1qP2OO-0003yc-8J; Thu, 27 Jul 2023 14:55:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 571159.894352; Thu, 27 Jul 2023 14:55:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qP2OO-0003yV-3u; Thu, 27 Jul 2023 14:55:04 +0000 Received: by outflank-mailman (input) for mailman id 571159; Thu, 27 Jul 2023 14:55:02 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qP2OM-0003ww-LK for xen-devel@lists.xenproject.org; Thu, 27 Jul 2023 14:55:02 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 8e600259-2c8d-11ee-8613-37d641c3527e; Thu, 27 Jul 2023 16:55:00 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 8e600259-2c8d-11ee-8613-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1690469700; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=u9VUyPNCX/m9UxlOUYomFLQl8PbYRLIgdSRaAegbCOg=; b=PeD/0QXGY+YPnkjbCckE1lw1hasHd65KcNu5uqQ0nTvgGbJhCSTNbAUu 6SqtuTLhkwhf8O1mEnmiRX9DBIHBoVOJErat+7gLaI2M4MY20KF32wmYu 6PPHLTWCgpY8WjFXeNGCFlypSwVkQb+L4wCKRfReIPKRCS5CU6xHHOGlq Y=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 117536776 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:FVLePqmvXHapho1kMBNQOvzo5gxFJkRdPkR7XQ2eYbSJt1+Wr1Gzt xJKWDvSP/aDamKgLtAgad/j9k9SvJTdztRkSwNsrnhhFiMWpZLJC+rCIxarNUt+DCFhoGFPt JxCN4aafKjYaleG+39B55C49SEUOZmgH+a6U6icfHgqH2eIcQ954Tp7gek1n4V0ttawBgKJq LvartbWfVSowFaYCEpNg064gE0p5K2aVA8w5ARkPqgU5gCGzRH5MbpETU2PByqgKmVrNrbSq 9brlNmR4m7f9hExPdKp+p6TnpoiG+O60aCm0xK6aoD66vRwjnVaPpUTbZLwXXx/mTSR9+2d/ f0W3XCGpaXFCYWX8AgVe0Ew/yiTpsSq8pefSZS0mZT7I0Er7xIAahihZa07FdRwxwp5PY1B3 cAXET9RTxOCvrOdnq29RNZriOsCMca+aevzulk4pd3YJfMvQJSFSKTW/95Imjw3g6iiH96HO ZBfM2A2Kk2dPVsWYAx/5JEWxY9EglH2dSFYr1SE47I6+WHJwCR60aT3McqTcduPLSlQth/B+ T+doTumXHn2Mv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dgO0= X-Talos-CUID: 9a23:YQulCGGUfY41HZugqmJb+3cbRuEmc0SM5ynPJUGHDmhGaaCaHAo= X-Talos-MUID: 9a23:ckGnNwqx0NXaDvIFtdoezzxtOf9Q+pWBMRBOoZo6ifDDMRF0Ih7I2Q== X-IronPort-AV: E=Sophos;i="6.01,235,1684814400"; d="scan'208";a="117536776" From: Anthony PERARD To: CC: Anthony PERARD , Jason Andryuk , Andrew Cooper , "George Dunlap" , Jan Beulich , "Julien Grall" , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v3 2/2] Config.mk: evaluate XEN_COMPILE_ARCH and XEN_OS immediately Date: Thu, 27 Jul 2023 15:54:47 +0100 Message-ID: <20230727145447.2701-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230727145447.2701-1-anthony.perard@citrix.com> References: <20230727145447.2701-1-anthony.perard@citrix.com> MIME-Version: 1.0 With GNU make 4.4, the number of execution of the command present in these $(shell ) increased greatly. This is probably because as of make 4.4, exported variable are also added to the environment of $(shell ) construct. So to avoid having these command been run more than necessary, we will replace ?= by an equivalent but with immediate expansion. Reported-by: Jason Andryuk Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Notes: v3: - replace evaluation on first use construct by immediate expansion which isn't likely to break and is clearer. Config.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Config.mk b/Config.mk index c529b1ba19..dc3afaa47e 100644 --- a/Config.mk +++ b/Config.mk @@ -19,13 +19,17 @@ or = $(if $(strip $(1)),$(1),$(if $(strip $(2)),$(2),$(if $(strip $(3)),$( -include $(XEN_ROOT)/.config -XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \ +ifeq ($(origin XEN_COMPILE_ARCH), undefined) +XEN_COMPILE_ARCH := $(shell uname -m | sed -e s/i.86/x86_32/ \ -e s/i86pc/x86_32/ -e s/amd64/x86_64/ \ -e s/armv7.*/arm32/ -e s/armv8.*/arm64/ \ -e s/aarch64/arm64/) +endif XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH) -XEN_OS ?= $(shell uname -s) +ifeq ($(origin XEN_OS), undefined) +XEN_OS := $(shell uname -s) +endif CONFIG_$(XEN_OS) := y