From patchwork Wed Jun 21 16:19:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13287632 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 7A411EB64DC for ; Wed, 21 Jun 2023 16:20:50 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.552932.863188 (Exim 4.92) (envelope-from ) id 1qC0Z9-0000ta-7p; Wed, 21 Jun 2023 16:20:19 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 552932.863188; Wed, 21 Jun 2023 16:20:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qC0Z9-0000tT-5I; Wed, 21 Jun 2023 16:20:19 +0000 Received: by outflank-mailman (input) for mailman id 552932; Wed, 21 Jun 2023 16:20:18 +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 1qC0Z7-0000tN-SZ for xen-devel@lists.xenproject.org; Wed, 21 Jun 2023 16:20:18 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7fd7d6ea-104f-11ee-8611-37d641c3527e; Wed, 21 Jun 2023 18:20:14 +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: 7fd7d6ea-104f-11ee-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1687364414; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Gb48MUKG+E+eor+Y9T0107+AbYui+pKfJlvFsRozBlw=; b=a/iu2aBYUubJjdWB5iU4lv8o/t7VpnUQC4J14Z0A65BazeccWf3LMjfY hY+i04+Dtg8SJvPGtyestnCHif+0thUCMfA8dT7vTbTkbQrMju66kiVYz PCN32KCHIBqrWkP+5rqp9qPIuuN3VlqZ04SZe8BiEKQ6Nc4VVeF4eN1sk U=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 112386257 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:YRusZqAFMWTFIRVW/xbjw5YqxClBgxIJ4kV8jS/XYbTApD5x1WZVx 2YeWD+DM/eNZzfyc9lwYYW+8EgFupWGm9RiQQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48T8nk/nOHuGmYAL9EngZbRd+Tys8gg5Ulec8g4p56fC0GArIs t7pyyHlEAbNNwVcbCRMs8pvlDs15K6p4G1C5wRiDRx2lAS2e0c9Xcp3yZ6ZdxMUcqEMdsamS uDKyq2O/2+x13/B3fv8z94X2mVTKlLjFVDmZkh+AsBOsTAbzsAG6Y4pNeJ0VKtio27hc+ada jl6ncfYpQ8BZsUgkQmGOvVSO3kW0aZuoNcrLZUj2CA6IoKvn3bEmp1T4E8K0YIw2bt4Hm5i/ NUkMiEcNw+ip8S276K2Vbw57igjBJGD0II3v3hhyXfSDOo8QICFSKLPjTNa9G5u3IYUR6+YP pdHL2M1N3wsYDUWUrsTIJs4gOevgGi5azBCoUiZjaE2/3LS3Ep6172F3N/9I4XQHpULxBvHz o7A12vdDhMcEo2f8BqA8W+i27TJzBngV51HQdVU8dY12QbOlwT/EiY+RVa95PW0lEO6c9ZeM FAPvDojq7Ao806mRcW7WAe3yFaGtxgQQctNEMU17QiMzuzf5APxLmoOQyNFadcmnNQrXjFs3 ViM9/vrGDhuvbu9WX+bsLCOoluaIjMJJGUPYSsFSwot4NT5pow3yBXVQb5LD6qdntDzXzbqz Fi3QDMW3utJy5RRjuPioA6B2mj3znTUcuIrziaKUX2qwgpQWJS0dtW3yHj97dlQIZnMGzFto 0M4d9iiAPEmVM/dy3bdH7xdRtlF9N7ebmSC3AcH840Jsm30piX9Jd04DCRWfh8BDyoSRdP+j KY/Uyt17YQbAnalZLQfj2mZW5VzlviI+TgIu5npgjtyjntZLlXvENlGPxL44owUuBFEfVsDE Zmaa92wKn0RFL5qyjG7L89Ej+90nHBgnT6DH8Chp/hC7VZ5TCTPIYrpzXPUNrxphE96iFi9H ylj2zuilEwEDbyWjtj/+o8PN1EaRUXX9rivw/G7gtWre1I8cEl4Uq+5/F/UU9A990ijvruSr y7Vt44x4AaXuEAr3i3aNiw8MO+zBs0XQLBSFXVEAGtEEkMLOe6HhJrzvbNtFVX73ISPFcJJc sQ= IronPort-HdrOrdr: A9a23:CyWqda9ic9VO3+SwEJVuk+AKI+orL9Y04lQ7vn2ZKCYlCPBw8v rEoB1173HJYVoqNU3I2urhBED4ewK7yXct2/hpAV7AZmjbUQmTXfpfBOLZqlWLJ8SUzIFgPM lbH5SWR+eAbmRSvILW7Ay5DNo60LC8gcWVbYC39QYUcejGUdAF0+48MHf9LmRmAA1LH4AwGp a/6tovnUvDRUgq X-Talos-CUID: 9a23:cpD+C2z7MWoQGQvJ9PGWBgU3R886fVHU5UvKMl7hFkdJbr26WVKPrfY= X-Talos-MUID: 9a23:Jo9F+w5c5aw3PGKfxApnzv65xoxnx6isDmZckawmvsqZO3ErPWanlzuoF9o= X-IronPort-AV: E=Sophos;i="6.00,261,1681185600"; d="scan'208";a="112386257" From: Anthony PERARD To: CC: Anthony PERARD , Jason Andryuk , Andrew Cooper , "George Dunlap" , Jan Beulich , "Julien Grall" , Stefano Stabellini , Wei Liu Subject: [XEN PATCH 1/3] build: define ARCH and SRCARCH later Date: Wed, 21 Jun 2023 17:19:57 +0100 Message-ID: <20230621161959.1061178-2-anthony.perard@citrix.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230621161959.1061178-1-anthony.perard@citrix.com> References: <20230621161959.1061178-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 Tested-by: for the whole series, FYI. --- xen/Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index e89fc461fc4b..9631e45cfb9b 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 Wed Jun 21 16:19:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13287633 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 63565EB64D7 for ; Wed, 21 Jun 2023 16:20:53 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.552934.863208 (Exim 4.92) (envelope-from ) id 1qC0ZH-0001Q2-TM; Wed, 21 Jun 2023 16:20:27 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 552934.863208; Wed, 21 Jun 2023 16:20:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qC0ZH-0001Pt-Ps; Wed, 21 Jun 2023 16:20:27 +0000 Received: by outflank-mailman (input) for mailman id 552934; Wed, 21 Jun 2023 16:20:26 +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 1qC0ZG-0000tN-ES for xen-devel@lists.xenproject.org; Wed, 21 Jun 2023 16:20:26 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 86a7faa8-104f-11ee-8611-37d641c3527e; Wed, 21 Jun 2023 18:20:24 +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: 86a7faa8-104f-11ee-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1687364424; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=za3buGGichHq8l7ZDrIYQqz3imkrrBJj9JEN24suhkc=; b=BnJ2InxGIyHAzTl85hY7P6iqsPdEBPE60odSxjFeW85R99MT69EUXIEV yJHrGS0Fl+rXHsk01FaGztC26zyIPw+cdqh5/vn45IEBLmD1XyYeVOeiw vqJaST2jXCsp9C9kA8g5NNYn8WEAXa9TM6cMrURDzj8HfEfEkS8QJelo7 g=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 112968613 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:d68rDq1mvf/mAbqcQvbD5e1xkn2cJEfYwER7XKvMYLTBsI5bp2RSy 2IWCjyFOfzZNmanLYslbYjl8RgP7JLUnNRjHgs5pC1hF35El5HIVI+TRqvS04F+DeWYFR46s J9OAjXkBJppJpMJjk71atANlVEliefTAOK6ULWeUsxIbVcMYD87jh5+kPIOjIdtgNyoayuAo tq3qMDEULOf82cc3lk8teTb8HuDgNyo4GlD5gJkPKgX1LPjvyJ94Kw3dPnZw0TQGuG4LsbiL 87fwbew+H/u/htFIrtJRZ6iLyXm6paLVeS/oiI+t5qK23CulQRrukoPD9IOaF8/ttm8t4sZJ OOhF3CHYVxB0qXkwIzxWvTDes10FfUuFLTveRBTvSEPpqFvnrSFL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MUID: 9a23:51LYawp+qJH4NQlFhRoezxNhNIRD4JmnNF8iwNYhu9SBajxfFyjI2Q== X-IronPort-AV: E=Sophos;i="6.00,261,1681185600"; d="scan'208";a="112968613" From: Anthony PERARD To: CC: Anthony PERARD , Jason Andryuk , Andrew Cooper , "George Dunlap" , Jan Beulich , "Julien Grall" , Stefano Stabellini , Wei Liu Subject: [XEN PATCH 2/3] build: evaluate XEN_BUILD_* and XEN_DOMAIN on first use Date: Wed, 21 Jun 2023 17:19:58 +0100 Message-ID: <20230621161959.1061178-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230621161959.1061178-1-anthony.perard@citrix.com> References: <20230621161959.1061178-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 --- xen/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 9631e45cfb9b..b58c2a7f4539 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 Wed Jun 21 16:19:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13287631 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 6D0DAEB64D8 for ; Wed, 21 Jun 2023 16:20:50 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.552935.863218 (Exim 4.92) (envelope-from ) id 1qC0ZJ-0001fy-5V; Wed, 21 Jun 2023 16:20:29 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 552935.863218; Wed, 21 Jun 2023 16:20:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qC0ZJ-0001fr-2G; Wed, 21 Jun 2023 16:20:29 +0000 Received: by outflank-mailman (input) for mailman id 552935; Wed, 21 Jun 2023 16:20:27 +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 1qC0ZH-0000tN-J3 for xen-devel@lists.xenproject.org; Wed, 21 Jun 2023 16:20:27 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 86bd7a0c-104f-11ee-8611-37d641c3527e; Wed, 21 Jun 2023 18:20:25 +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: 86bd7a0c-104f-11ee-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1687364425; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FeiN0tZrNokVbRAYwlZ3w177gJNyDQjG2lOR1qJ+z1Q=; b=MkhyOWrv9TaxZVBygKMdBLdLrLwnKQBsHJiU6rfkA8TEBuP0ZEHENoa9 T5ktPqX8V589HZNlo+Yi8CEAHIeooYftehwn0NnQrN62iBpsAX2kOjBeU mGOmckreAkDYyVB63NvRrRqE0buVQzNOzaxVT07yIQw0AYl3XAb8KeplK 8=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 112968615 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:aK77MKLbiVy/ipZGFE+R75UlxSXFcZb7ZxGr2PjKsXjdYENSgWAEx 2MfWjuGMvyMajOmfNwjYY63/EgF6MTVmN4xHFRlqX01Q3x08seUXt7xwmUcnc+xBpaaEB84t ZV2hv3odp1coqr0/0/1WlTZhSAgk/rOHvykU7Ss1hlZHW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8UpSiAqhMSQJjMaV5oteYIsimQD101hICG8cqSj+P xG+85rsiMc6QxhIU3I9urgBEDtex7hHNtOkOss1NSZLW3bUQmTTL2KhLGKq1aLJ8S9zJ856U 4JSdkZNDSaNzZHZKjBjDVQa+xQo+W6zA== X-Talos-CUID: 9a23:HPgsfGzPI65Ukn8vPBLsBgU2R515W3jckEv1Kk+YU3R1TuevR2KPrfY= X-Talos-MUID: 9a23:GmrBSQ7stVpQweutcoSAkZDuxoxR3/7zJhEmo68qupehFy5CKyaShWq4F9o= X-IronPort-AV: E=Sophos;i="6.00,261,1681185600"; d="scan'208";a="112968615" From: Anthony PERARD To: CC: Anthony PERARD , Jason Andryuk , Andrew Cooper , "George Dunlap" , Jan Beulich , "Julien Grall" , Stefano Stabellini , Wei Liu Subject: [XEN PATCH 3/3] Config.mk: evaluate XEN_COMPILE_ARCH and XEN_OS on first use Date: Wed, 21 Jun 2023 17:19:59 +0100 Message-ID: <20230621161959.1061178-4-anthony.perard@citrix.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230621161959.1061178-1-anthony.perard@citrix.com> References: <20230621161959.1061178-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 --- Config.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Config.mk b/Config.mk index c529b1ba19cd..5fbdbc4500d2 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