From patchwork Thu Jun 22 15:30:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13289321 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 B86D8EB64D8 for ; Thu, 22 Jun 2023 15:33:07 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.553681.864381 (Exim 4.92) (envelope-from ) id 1qCMIc-0001iR-Ij; Thu, 22 Jun 2023 15:32:42 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 553681.864381; Thu, 22 Jun 2023 15:32:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qCMIc-0001iK-E9; Thu, 22 Jun 2023 15:32:42 +0000 Received: by outflank-mailman (input) for mailman id 553681; Thu, 22 Jun 2023 15:32:41 +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 1qCMIb-0001iC-2o for xen-devel@lists.xenproject.org; Thu, 22 Jun 2023 15:32:41 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 036c8ead-1112-11ee-8611-37d641c3527e; Thu, 22 Jun 2023 17:32:38 +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: 036c8ead-1112-11ee-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1687447958; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1lTKcVu/gYpVx0+6nqaYJrrG/G7Xsm897hhlwGEvekQ=; b=XKqIbffQRSwwDQ3LX9ztP6fA8kSJjLjhWOCRX3T1H5a0ftj1Vy+PQagw XQH8pl2CmayniuO8l5inH4ckcnT3zQMOkEow9Y4itz/MF2UWvGURfGsel NXJ+O39C6IkEfh2MnzT3oUuQ1X3Yk5NeNiN85bDA4PTVeR3exV3SyucLl E=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 113786839 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:iuv7Iqw9tACFTZ9OvF16t+fzxirEfRIJ4+MujC+fZmUNrF6WrkVUn GtKDG/QOareMWbyfYogaoq2ox9XsZOAm4IyGwM6qyAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTrafYEidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw/zF8EoHUMja4mtC5QRgP6oT4DcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KX9r7 PZAJSAfVA6CjsSG0vG3evFnmNt2eaEHPKtH0p1h5TTQDPJgSpHfWaTao9Rf2V/chOgXQ6yYP ZBAL2MyMlKZOUYn1lQ/UfrSmM+hgGX/dDtJ7kqYv6Mt70DYzRBr0airO93QEjCPbZwMxRnI+ DKdrgwVBDkDLMCU8RqOwkiLi+qVgQr2ZtNCJYaRo6sCbFq7mTVIVUx+uUGAiem0jAuyVsxSL 2QQ+zEytu4i+UqzVN7/Uhak5nmesXY0WdNWH/cr9QKlxa/d4gLfDW8BJhZDYtE7sM49RRQxy 0SE2djuAFRHsqCRSH+b3qeZq3W1Iyd9BXQZeSYOQA8B4t/iiII+lBTCSpBkCqHdpsLxMSH9x XaNtidWulkIpZdVjePhpwmB2m/y4MGTFWbZ+zk7QEq7yxpzPIO1dba26FH93eQDILaBRUee6 S1sd9el0AweMX2cvHXTELpWQuH3u6bt3C702gA2QcR4n9i50zv6JN0LvmkjTKt8GpxcEQIFd nM/ru+4CHV7GHKxJZF6bIuqYyjB5fixTI+1Phw4gzcnX3SQSONk1Hs0DaJo9zqx+HXAaIlmU XthTe6iDGwBFYNsxyesSuEW3NcDn35umjiMH8qrl0n8gNJygUJ5r59fazNiichjtsu5TPj9q Y4DZ6NmNT0BOAEBXsUn2dFKdg1bRZTKLZv3t9ZWZoa+zvlOQQkc5wvq6ep5IeRNxv0F/tokC 1nhAie0PnKj3yyYQehLA1g/AI7SsWFX9CllYXdyYgb0ghDOo++Htc8iSnf+RpF/nMQL8BK+Z 6BtlxmoahiXdgn6xg== IronPort-HdrOrdr: A9a23:srkU0qNIso4HTcBcTsejsMiBIKoaSvp037Eqv3ofdfUzSL3+qy nOpoVj6faaslcssR0b9OxofZPwI080lqQFhbX5X43DYOCOggLBR+tfBMnZsljd8kXFh4hgPM xbHZSWZuedMbEDt7eY3DWF X-Talos-CUID: 9a23:Ou4dWG76goH/ttDC2Nss6msNEJgoYm/n0nbZBX+qSmpZULaLVgrF X-Talos-MUID: 9a23:3JLYBQY5lFTaaeBTrifwjwlCP/dSxKmrUlwknKtX6/i/HHkl X-IronPort-AV: E=Sophos;i="6.01,149,1684814400"; d="scan'208";a="113786839" From: Anthony PERARD To: CC: Anthony PERARD , Jason Andryuk , Andrew Cooper , "George Dunlap" , Jan Beulich , "Julien Grall" , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v2 1/5] build: define ARCH and SRCARCH later Date: Thu, 22 Jun 2023 16:30:01 +0100 Message-ID: <20230622153005.31604-2-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230622153005.31604-1-anthony.perard@citrix.com> References: <20230622153005.31604-1-anthony.perard@citrix.com> MIME-Version: 1.0 Defining ARCH and SRCARCH later in xen/Makefile allows to switch to immediate evaluation variable type. ARCH and SRCARCH depends on value defined in Config.mk and aren't used TARGET_SUBARCH or TARGET_ARCH, and not before it's needed in a sub-make or a rule. This will help reduce the number of times the shell rune is been run. 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. Also, `make -d` shows a lot of these: Makefile:39: not recursively expanding SRCARCH to export to shell function Makefile:38: not recursively expanding ARCH to export to shell function Reported-by: Jason Andryuk Signed-off-by: Anthony PERARD Tested-by: Jason Andryuk Reviewed-by: Jan Beulich --- Notes: v2: - change quoting style - change identation xen/Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index e89fc461fc..78d176f04e 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -35,12 +35,6 @@ MAKEFLAGS += -rR EFI_MOUNTPOINT ?= $(BOOT_DIR)/efi -ARCH=$(XEN_TARGET_ARCH) -SRCARCH=$(shell echo $(ARCH) | \ - sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g' \ - -e s'/riscv.*/riscv/g') -export ARCH SRCARCH - # Allow someone to change their config file export KCONFIG_CONFIG ?= .config @@ -241,6 +235,13 @@ include scripts/Kbuild.include include $(XEN_ROOT)/Config.mk # Set ARCH/SUBARCH appropriately. + +ARCH := $(XEN_TARGET_ARCH) +SRCARCH := $(shell echo $(ARCH) | \ + sed -e 's/x86.*/x86/' -e 's/arm\(32\|64\)/arm/g' \ + -e 's/riscv.*/riscv/g') +export ARCH SRCARCH + export TARGET_SUBARCH := $(XEN_TARGET_ARCH) export TARGET_ARCH := $(shell echo $(XEN_TARGET_ARCH) | \ sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g' \ From patchwork Thu Jun 22 15:30:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13289322 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 6C612EB64DA for ; Thu, 22 Jun 2023 15:33:15 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.553682.864390 (Exim 4.92) (envelope-from ) id 1qCMIm-00020N-O6; Thu, 22 Jun 2023 15:32:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 553682.864390; Thu, 22 Jun 2023 15:32:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qCMIm-00020G-LG; Thu, 22 Jun 2023 15:32:52 +0000 Received: by outflank-mailman (input) for mailman id 553682; Thu, 22 Jun 2023 15:32:51 +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 1qCMIl-0001iC-Jv for xen-devel@lists.xenproject.org; Thu, 22 Jun 2023 15:32:51 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 09eb6ad1-1112-11ee-8611-37d641c3527e; Thu, 22 Jun 2023 17:32:49 +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: 09eb6ad1-1112-11ee-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1687447969; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=K7GhXsQkcFOr4n5Xl8d8vBjHvn10uHxoIpiBKvaS8NA=; b=fEPl22U8n5J0QY6Atbo1XKqtgzfDQIZe7SrmCppEzBktXxTfuo1cYJag DYJstBNjexPOdZ0y/Oh8bLVIcHM/wKIoCl3m1/hHces5uBWcaVP9Drrou OdQNlDuT9iHYPTcrVQJri6q4NHTf5xqciTYyVFsQeAVbSilc+zfAyhPaV o=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 116317366 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:XSV19qhDCJrKm5u4oLT2t7fzX161SBAKZh0ujC45NGQN5FlHY01je htvWTyGa62NMTf8etoib4rn9B4EucCBnNZkQFRs+3owRCkb9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrWCYmYpHlUMpB4J0XpLg/Q+jpNjne+3CgaMv cKai8DEMRqu1iUc3lg8sspvkzsx+qyr0N8klgZmP6sT4gWEzyV94K83fsldEVOpGuG4IcbiL wrz5OnR1n/U+R4rFuSknt7TGqHdauePVeQmoiM+t5mK2nCulARrukoIHKN0hXNsoyeIh7hMJ OBl7vRcf+uL0prkw4zxWzEAe8130DYvFLXveRBTuuTLp6HKnueFL1yDwyjaMKVBktubD12i+ tQKFgsSURuPjNiRxZ69dOlh3e1/FdLCadZ3VnFI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X-Talos-MUID: 9a23:kkbt/AisSo+eZT5LeptNGMMpaptV2oOrFUA3irIBuOyhbStQBhefk2Hi X-IronPort-AV: E=Sophos;i="6.01,149,1684814400"; d="scan'208";a="116317366" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH v2 2/5] build: remove TARGET_SUBARCH, a duplicate of ARCH Date: Thu, 22 Jun 2023 16:30:02 +0100 Message-ID: <20230622153005.31604-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230622153005.31604-1-anthony.perard@citrix.com> References: <20230622153005.31604-1-anthony.perard@citrix.com> MIME-Version: 1.0 Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Notes: v2: - new patch xen/Makefile | 3 +-- xen/build.mk | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 78d176f04e..bc639a1f80 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -234,7 +234,7 @@ include scripts/Kbuild.include # we need XEN_TARGET_ARCH to generate the proper config include $(XEN_ROOT)/Config.mk -# Set ARCH/SUBARCH appropriately. +# Set ARCH/SRCARCH appropriately. ARCH := $(XEN_TARGET_ARCH) SRCARCH := $(shell echo $(ARCH) | \ @@ -242,7 +242,6 @@ SRCARCH := $(shell echo $(ARCH) | \ -e 's/riscv.*/riscv/g') export ARCH SRCARCH -export TARGET_SUBARCH := $(XEN_TARGET_ARCH) export TARGET_ARCH := $(shell echo $(XEN_TARGET_ARCH) | \ sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g' \ -e s'/riscv.*/riscv/g') diff --git a/xen/build.mk b/xen/build.mk index 30d74d4772..7e33e710fd 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -41,7 +41,7 @@ include/xen/compile.h: include/xen/compile.h.in .banner FORCE targets += include/xen/compile.h -include $(wildcard .asm-offsets.s.d) -asm-offsets.s: arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.c +asm-offsets.s: arch/$(TARGET_ARCH)/$(ARCH)/asm-offsets.c $(CC) $(call cpp_flags,$(c_flags)) -S -g0 -o $@.new -MQ $@ $< $(call move-if-changed,$@.new,$@) From patchwork Thu Jun 22 15:30:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13289323 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 68646EB64D8 for ; Thu, 22 Jun 2023 15:33:15 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.553683.864401 (Exim 4.92) (envelope-from ) id 1qCMJ0-0002RL-2B; Thu, 22 Jun 2023 15:33:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 553683.864401; Thu, 22 Jun 2023 15:33:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qCMIz-0002RE-Ts; Thu, 22 Jun 2023 15:33:05 +0000 Received: by outflank-mailman (input) for mailman id 553683; Thu, 22 Jun 2023 15:33:03 +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 1qCMIx-0002MD-RA for xen-devel@lists.xenproject.org; Thu, 22 Jun 2023 15:33:03 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 1236430b-1112-11ee-b237-6b7b168915f2; Thu, 22 Jun 2023 17:33:02 +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: 1236430b-1112-11ee-b237-6b7b168915f2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1687447982; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oCKLH/zSg4xUlzCsYWMLexAT1INT2AflrWoFzXWfGBY=; b=dcWR56HUWqYawH1alc4JXyweBK/KcqP4aRtmPMUFMAqZyIalfGiXWWpb 5WdBha5+IkIMOzo12aWLapl0xlkU8eJdpe5cb/gtdj4echofr3slfoKPW PKsPlaYGlF+YvgSjgHY6heNRR06ClCBpodAs2AIgEwMlcp4RbZGJwtLmH w=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 112500242 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:vJxeBa64oKsIr4Y+jPpbgQxRtMrHchMFZxGqfqrLsTDasY5as4F+v jQfDW2FOPzbZjemL9kkYIy09xgCv5SGm4NkGQY4rHswHi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraCYnsrLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9lU35ZwehBtC5gZlPa4R5geC/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlF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go7t2utkuEJGtRGsddB+cQMHfhLnFL X-Talos-CUID: 9a23:S1KAmm3xtA/2ZGw/Sm+AB7xfA80Ydln4xkrrE06qJU9kWby8V0+d9/Yx X-Talos-MUID: 9a23:Br+qBwrtROSdCM27o7wezzZuENlr/puMNGEIvpUBifjcDjIvPg7I2Q== X-IronPort-AV: E=Sophos;i="6.01,149,1684814400"; d="scan'208";a="112500242" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu , Bob Eshleman , Alistair Francis , Connor Davis Subject: [XEN PATCH v2 3/5] build: remove TARGET_ARCH, a duplicates of SRCARCH Date: Thu, 22 Jun 2023 16:30:03 +0100 Message-ID: <20230622153005.31604-4-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230622153005.31604-1-anthony.perard@citrix.com> References: <20230622153005.31604-1-anthony.perard@citrix.com> MIME-Version: 1.0 The same command is used to generate the value of both $(TARGET_ARCH) and $(SRCARCH), as $(ARCH) is an alias for $(XEN_TARGET_ARCH). Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Notes: v2: - new patch xen/Makefile | 18 +++++++----------- xen/Rules.mk | 2 +- xen/arch/riscv/arch.mk | 2 +- xen/build.mk | 6 +++--- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index bc639a1f80..ac2765050b 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -242,10 +242,6 @@ SRCARCH := $(shell echo $(ARCH) | \ -e 's/riscv.*/riscv/g') export ARCH SRCARCH -export TARGET_ARCH := $(shell echo $(XEN_TARGET_ARCH) | \ - sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g' \ - -e s'/riscv.*/riscv/g') - export CONFIG_SHELL := $(SHELL) export CC CXX LD NM OBJCOPY OBJDUMP ADDR2LINE export YACC = $(if $(BISON),$(BISON),bison) @@ -262,7 +258,7 @@ export XEN_TREEWIDE_CFLAGS := $(CFLAGS) ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) CLANG_FLAGS := -ifeq ($(TARGET_ARCH),x86) +ifeq ($(SRCARCH),x86) # The tests to select whether the integrated assembler is usable need to happen # before testing any assembler features, or else the result of the tests would # be stale if the integrated assembler is not used. @@ -430,22 +426,22 @@ endif ifdef building_out_of_srctree CFLAGS += -I$(objtree)/include - CFLAGS += -I$(objtree)/arch/$(TARGET_ARCH)/include + CFLAGS += -I$(objtree)/arch/$(SRCARCH)/include endif CFLAGS += -I$(srctree)/include -CFLAGS += -I$(srctree)/arch/$(TARGET_ARCH)/include +CFLAGS += -I$(srctree)/arch/$(SRCARCH)/include # Note that link order matters! ALL_OBJS-y := common/built_in.o ALL_OBJS-y += drivers/built_in.o ALL_OBJS-y += lib/built_in.o ALL_OBJS-y += xsm/built_in.o -ALL_OBJS-y += arch/$(TARGET_ARCH)/built_in.o +ALL_OBJS-y += arch/$(SRCARCH)/built_in.o ALL_OBJS-$(CONFIG_CRYPTO) += crypto/built_in.o ALL_LIBS-y := lib/lib.a -include $(srctree)/arch/$(TARGET_ARCH)/arch.mk +include $(srctree)/arch/$(SRCARCH)/arch.mk # define new variables to avoid the ones defined in Config.mk export XEN_CFLAGS := $(CFLAGS) @@ -588,8 +584,8 @@ $(TARGET): outputmakefile FORCE $(Q)$(MAKE) $(build)=tools $(Q)$(MAKE) $(build)=. include/xen/compile.h $(Q)$(MAKE) $(build)=include all - $(Q)$(MAKE) $(build)=arch/$(TARGET_ARCH) include - $(Q)$(MAKE) $(build)=. arch/$(TARGET_ARCH)/include/asm/asm-offsets.h + $(Q)$(MAKE) $(build)=arch/$(SRCARCH) include + $(Q)$(MAKE) $(build)=. arch/$(SRCARCH)/include/asm/asm-offsets.h $(Q)$(MAKE) $(build)=. MKRELOC=$(MKRELOC) 'ALL_OBJS=$(ALL_OBJS-y)' 'ALL_LIBS=$(ALL_LIBS-y)' $@ SUBDIRS = xsm arch common crypto drivers lib test diff --git a/xen/Rules.mk b/xen/Rules.mk index 59072ae8df..8af3dd7277 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -180,7 +180,7 @@ cpp_flags = $(filter-out -Wa$(comma)% -flto,$(1)) c_flags = -MMD -MP -MF $(depfile) $(XEN_CFLAGS) a_flags = -MMD -MP -MF $(depfile) $(XEN_AFLAGS) -include $(srctree)/arch/$(TARGET_ARCH)/Rules.mk +include $(srctree)/arch/$(SRCARCH)/Rules.mk c_flags += $(_c_flags) a_flags += $(_c_flags) diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk index 7448f759b4..8403f96b6f 100644 --- a/xen/arch/riscv/arch.mk +++ b/xen/arch/riscv/arch.mk @@ -15,5 +15,5 @@ riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c CFLAGS += -march=$(riscv-march-y) -mstrict-align -mcmodel=medany # TODO: Drop override when more of the build is working -override ALL_OBJS-y = arch/$(TARGET_ARCH)/built_in.o +override ALL_OBJS-y = arch/$(SRCARCH)/built_in.o override ALL_LIBS-y = diff --git a/xen/build.mk b/xen/build.mk index 7e33e710fd..26dd5a8e87 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -41,11 +41,11 @@ include/xen/compile.h: include/xen/compile.h.in .banner FORCE targets += include/xen/compile.h -include $(wildcard .asm-offsets.s.d) -asm-offsets.s: arch/$(TARGET_ARCH)/$(ARCH)/asm-offsets.c +asm-offsets.s: arch/$(SRCARCH)/$(ARCH)/asm-offsets.c $(CC) $(call cpp_flags,$(c_flags)) -S -g0 -o $@.new -MQ $@ $< $(call move-if-changed,$@.new,$@) -arch/$(TARGET_ARCH)/include/asm/asm-offsets.h: asm-offsets.s +arch/$(SRCARCH)/include/asm/asm-offsets.h: asm-offsets.s @(set -e; \ echo "/*"; \ echo " * DO NOT MODIFY."; \ @@ -87,4 +87,4 @@ endif targets += prelink.o $(TARGET): prelink.o FORCE - $(Q)$(MAKE) $(build)=arch/$(TARGET_ARCH) $@ + $(Q)$(MAKE) $(build)=arch/$(SRCARCH) $@ From patchwork Thu Jun 22 15:30:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13289324 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 3D327EB64D8 for ; Thu, 22 Jun 2023 15:33:43 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.553694.864411 (Exim 4.92) (envelope-from ) id 1qCMJO-0003Bu-8T; Thu, 22 Jun 2023 15:33:30 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 553694.864411; Thu, 22 Jun 2023 15:33:30 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qCMJO-0003Bj-5f; Thu, 22 Jun 2023 15:33:30 +0000 Received: by outflank-mailman (input) for mailman id 553694; Thu, 22 Jun 2023 15:33:29 +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 1qCMJN-0002MD-9B for xen-devel@lists.xenproject.org; Thu, 22 Jun 2023 15:33:29 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2187b08f-1112-11ee-b237-6b7b168915f2; Thu, 22 Jun 2023 17:33:28 +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: 2187b08f-1112-11ee-b237-6b7b168915f2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1687448008; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3EthVTGva5DNB6P5KMnQBDEgPXGTi69YqfTcARM7qj4=; b=ZWKp6Qt8ve7Kb14mLgcoWI3tUnoLErrd+Q3yB/X83ANTPufsMjsUiJJv 9v7B6a7nZU0IwLcxM7AmxB6x6o2QYOr6cUaMENaAThO2w/YAI6U+Q410V l+LxVAe2atUxDEaV/pM3dPpsX4LNTP2jlOaXuSsqD8IuaWEW8sV3IiREd 8=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 113083391 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:2usFaapblDo58Dgg6laOglkQp0JeBmLcZRIvgKrLsJaIsI4StFCzt garIBmFMv2LZWXyeItwaY3k8klXvZSBx9EwQARv+309FiJA9JuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpA1c/Ek/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKq04GpwUmAWP6gR5weAzSNNUPrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXACkUbz2tnrKb/KqmWNZdndUDA5bxAapK7xmMzRmBZRonaZXKQqGM7t5ExjYgwMtJGJ4yZ eJAN2ApNk6ZJUQSZBFOUslWcOSA3xET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i="6.01,149,1684814400"; d="scan'208";a="113083391" From: Anthony PERARD To: CC: Anthony PERARD , Jason Andryuk , Andrew Cooper , "George Dunlap" , Jan Beulich , "Julien Grall" , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v2 4/5] build: evaluate XEN_BUILD_* and XEN_DOMAIN on first use Date: Thu, 22 Jun 2023 16:30:04 +0100 Message-ID: <20230622153005.31604-5-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230622153005.31604-1-anthony.perard@citrix.com> References: <20230622153005.31604-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. Also, `make -d` shows a lot of these: Makefile:15: not recursively expanding XEN_BUILD_DATE to export to shell function Makefile:16: not recursively expanding XEN_BUILD_TIME to export to shell function Makefile:17: not recursively expanding XEN_BUILD_HOST to export to shell function Makefile:14: not recursively expanding XEN_DOMAIN to export to shell function So, to avoid having these command been run more than necessery, we will use a construct to evaluate on first use. Reported-by: Jason Andryuk Signed-off-by: Anthony PERARD Tested-by: Jason Andryuk --- xen/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index ac2765050b..e3b1468f83 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -11,10 +11,10 @@ export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) -include xen-version export XEN_WHOAMI ?= $(USER) -export XEN_DOMAIN ?= $(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown])) -export XEN_BUILD_DATE ?= $(shell LC_ALL=C date) -export XEN_BUILD_TIME ?= $(shell LC_ALL=C date +%T) -export XEN_BUILD_HOST ?= $(shell hostname) +export XEN_DOMAIN ?= $(eval XEN_DOMAIN := $(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown])))$(XEN_DOMAIN) +export XEN_BUILD_DATE ?= $(eval XEN_BUILD_DATE := $(shell LC_ALL=C date))$(XEN_BUILD_DATE) +export XEN_BUILD_TIME ?= $(eval XEN_BUILD_TIME := $(shell LC_ALL=C date +%T))$(XEN_BUILD_TIME) +export XEN_BUILD_HOST ?= $(eval XEN_BUILD_HOST := $(shell hostname))$(XEN_BUILD_HOST) # Best effort attempt to find a python interpreter, defaulting to Python 3 if # available. Fall back to just `python` if `which` is nowhere to be found. From patchwork Thu Jun 22 15:30:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13289325 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 7D227EB64D8 for ; Thu, 22 Jun 2023 15:33:55 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.553698.864421 (Exim 4.92) (envelope-from ) id 1qCMJg-0003gC-Gz; Thu, 22 Jun 2023 15:33:48 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 553698.864421; Thu, 22 Jun 2023 15:33:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qCMJg-0003fy-Dw; Thu, 22 Jun 2023 15:33:48 +0000 Received: by outflank-mailman (input) for mailman id 553698; Thu, 22 Jun 2023 15:33:47 +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 1qCMJf-0002MD-0C for xen-devel@lists.xenproject.org; Thu, 22 Jun 2023 15:33:47 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2c6b3dfd-1112-11ee-b237-6b7b168915f2; Thu, 22 Jun 2023 17:33:46 +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: 2c6b3dfd-1112-11ee-b237-6b7b168915f2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1687448026; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4QtfO0K4kclGq2hMs7w55dwQYz0mk//LeZXUiJOoCww=; b=dGQhHX9ZspFzJa/W4yB+vFEPN8d4MTo0uW0ciTQK5QyOBgGnhJkKjQeP 6TBvQCi0ZJGFj92sf4NNSvIGTflHjXCTOaVcz+q9/cCjaXJE9jH5EsobK YSP81kIRWzwrIFh2UaWeoQdI+O20Zv0T+QIymC+Pjvc0jis4H3l8xIOzU s=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 113083464 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:MN7BBq5jCNLHVixuuC9hWgxRtP/HchMFZxGqfqrLsTDasY5as4F+v mIdWmnVPPzYNzT8Ko0naYnno0oE6J+Gm9cyGQFoqSFjHi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraCYnsrLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9lU35ZwehBtC5gZlPa4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+xoSZPgfZq0z/ccjbX5W43SJDUOl1HGEGgI1/qA/9SPIVyaygYUvZ 0LT0A1YOecMbA15vyKhHjeLz6gq+P3iZxB7I3lvhFQpeEDUdAa0ztE X-Talos-CUID: 9a23:Kmp+oGqzKs5lpgC4AIj67d3mUcsYWWH2402NGHSHNFh5SLCPUGWO4awxxg== X-Talos-MUID: 9a23:fL08dwbUr58CBuBTnQPTnDJ7H9VR/62JFUEOs7pXkeTdOnkl X-IronPort-AV: E=Sophos;i="6.01,149,1684814400"; d="scan'208";a="113083464" From: Anthony PERARD To: CC: Anthony PERARD , Jason Andryuk , Andrew Cooper , "George Dunlap" , Jan Beulich , "Julien Grall" , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v2 5/5] Config.mk: evaluate XEN_COMPILE_ARCH and XEN_OS on first use Date: Thu, 22 Jun 2023 16:30:05 +0100 Message-ID: <20230622153005.31604-6-anthony.perard@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230622153005.31604-1-anthony.perard@citrix.com> References: <20230622153005.31604-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 necessery, we will use a construct to evaluate on first use. Reported-by: Jason Andryuk Signed-off-by: Anthony PERARD Tested-by: Jason Andryuk --- Config.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Config.mk b/Config.mk index c529b1ba19..5fbdbc4500 100644 --- a/Config.mk +++ b/Config.mk @@ -19,13 +19,13 @@ 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/ \ +XEN_COMPILE_ARCH ?= $(eval 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/) + -e s/aarch64/arm64/))$(XEN_COMPILE_ARCH) XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH) -XEN_OS ?= $(shell uname -s) +XEN_OS ?= $(eval XEN_OS := $(shell uname -s))$(XEN_OS) CONFIG_$(XEN_OS) := y