From patchwork Thu Jun 22 15:30:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13289320 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 698D0EB64DB for ; Thu, 22 Jun 2023 15:31:32 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.553675.864371 (Exim 4.92) (envelope-from ) id 1qCMH0-00017H-2e; Thu, 22 Jun 2023 15:31:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 553675.864371; Thu, 22 Jun 2023 15:31:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qCMGz-00017A-W1; Thu, 22 Jun 2023 15:31:01 +0000 Received: by outflank-mailman (input) for mailman id 553675; Thu, 22 Jun 2023 15:31:01 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qCMGz-00016o-Bk for xen-devel@lists.xenproject.org; Thu, 22 Jun 2023 15:31:01 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id c899aebc-1111-11ee-b237-6b7b168915f2; Thu, 22 Jun 2023 17:30:59 +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: c899aebc-1111-11ee-b237-6b7b168915f2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1687447859; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=N7Z9i/yFILbVIDzapsZ/aOY65dkOvf6ZeRxJLnx2AHA=; b=VZ6s4WPSV++7P/H4TQslgnyX3nGW7TUcJ9mDbZaZZdcb7qHt8O1Y3I8m LWIXS2HnHaIag+12dnspNqnfybOfHCMJLJ8JUIszqvJ+W7arpZfx0D6vu MUG2cTERmZMrq3yWux/nxRrwPTOxm9yWek0gDSF53EkR0ad0WlacgU9np U=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 114179871 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:GTC336PKJfgNP8jvrR1Xl8FynXyQoLVcMsEvi/4bfWQNrUp0hGEHz zYfDzqPOPmMZTCkeIgkbdu2oBtTusTWz9BqSQto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6jufQAOKnUoYoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGjxSs/vrRC9H5qyo42tG5AZmOZingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0t9zJWt3/ /IYEh8ibjuyn760muu8W9A506zPLOGzVG8eknRpzDWfBvc6W5HTBa7N4Le03h9p2JoIR6yHI ZNEN3w2Nk+ojx5nYz/7DLo3mvuogX/uNSVVsluPqYI84nTJzRw327/oWDbQUoXTGZwKzxbH/ woq+UykJyNZO8S+9wDc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'208";a="114179871" From: Anthony PERARD To: CC: Anthony PERARD , George Dunlap , Connor Davis , "Alistair Francis" , Julien Grall , "Andrew Cooper" , Jan Beulich , Wei Liu , Stefano Stabellini , Bob Eshleman Subject: [XEN PATCH v2 0/5] build: reduce number of $(shell) execution on make 4.4 Date: Thu, 22 Jun 2023 16:30:00 +0100 Message-ID: <20230622153005.31604-1-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Patch series available in this git branch: https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git br.build-exported-shell-command-value-v2 v2: - new patches removing TARGET_SUBARCH and TARGET_ARCH. - style change in first patch With GNU make 4.4, the number of execution of the command present in $(shell ) in exported variables increased greatly. This is probably because as of make 4.4, exported variable are also added to the environment of $(shell ) construct. From the annoncement: https://lists.gnu.org/archive/html/info-gnu/2022-10/msg00008.html > * WARNING: Backward-incompatibility! > Previously makefile variables marked as export were not exported to commands > started by the $(shell ...) function. Now, all exported variables are > exported to $(shell ...). If this leads to recursion during expansion, then > for backward-compatibility the value from the original environment is used. > To detect this change search for 'shell-export' in the .FEATURES variable. Also, there's a new paragraph in the GNU make manual, but it's a warning about exporting all variable, still it might be relevant to the new observed behavior: https://www.gnu.org/software/make/manual/make.html#Variables_002fRecursion > Adding a variable’s value to the environment requires it to be expanded. If > expanding a variable has side-effects (such as the info or eval or similar > functions) then these side-effects will be seen every time a command is > invoked. The issue was reported on IRC by jandryuk. So, I've locate a few obvious candidate to fix, maybe there's more $(shell) to change? Anthony PERARD (5): build: define ARCH and SRCARCH later build: remove TARGET_SUBARCH, a duplicate of ARCH build: remove TARGET_ARCH, a duplicates of SRCARCH build: evaluate XEN_BUILD_* and XEN_DOMAIN on first use Config.mk: evaluate XEN_COMPILE_ARCH and XEN_OS on first use Config.mk | 6 +++--- xen/Makefile | 40 ++++++++++++++++++---------------------- xen/Rules.mk | 2 +- xen/arch/riscv/arch.mk | 2 +- xen/build.mk | 6 +++--- 5 files changed, 26 insertions(+), 30 deletions(-) Tested-by: Jason Andryuk