From nobody Mon Feb 9 09:34:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1687448002; cv=none; d=zohomail.com; s=zohoarc; b=aVBIE6yn+kZPNEsjeRA5jfHERVG5I52zAhVcqJBMYF7opSwO84BModynBw9UN0Al3Aual22fhcPCQS6qs+tK+9h3rCly6u0NkaZxDGoeLrUisF8+8IJpVR3y6n0hJfnBW2iuFyGKZXH+lr3OLJAD5UiGaP1yx6QJzmP2ffDNnAo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1687448002; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=cin6yjXvnwLOLh86F6a0XR2BEXih5OoyZtceHtMDOh8=; b=ZsgT0clZ/gup3SfTSx6ndnMIbGYeRHlAen3MGHriKHBxf2zGQBmeTZCfUfdmjEYXo6sr98XI0hIJs26WPjMOM2NZxj4D3Bbn36gfF9lxtwDBbCxQa3cPx+Dbzw5tvZMghH9vv0GywTpAWVjel9cYhWNL7kC6N2jKul5e6jSOZk0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1687448002704895.7101245516998; Thu, 22 Jun 2023 08:33:22 -0700 (PDT) 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 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-Outflank-Mailman: Message body and most headers restored to incoming version 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/w6BaGpdFLjoH4EweZOUlFuhL7W5m7 PElLBQoZC24t+Ok7Ju2W+hFmNQuI5y+VG8fkikIITDxCP8nRdbIQrnQ5M8e1zA17ixMNa+AP YxDM2MpNUmeJUQVYT/7C7pn9AusrnD5bz1frkPTvact6nLf5AdwzKLsIJzefdniqcB9xx/C+ zqepTijav0cHNuT7SSG702Ous7KsiP8arNKL6Pn88c/1TV/wURMUUZLBDNXu8KRmkO4Ht5SN UEQ0i4vtrQpslymSMHnWB+1q2LCuQQTM/JSGeAn7ACGyoLP/h2UQGMDS1ZpasEitcIwbSwn0 BmOhdyBLSd0rLSfRHaZ97GVhTC/Iy4YKSkFfyBsZRQBy8nupsc0lB2nZtxkGqSkg8b1HTz1y jaioy03hrFVhskOv42y+VHcnzutvN7HVAcz7QTMdn2p5UVyY4vNT4ev717c7/pJMoeCZlaEt XkA3cOZ6Ygz4YqlzXLXBr9XRffwuqjDaWeH6bJyI3U/3y2gxnqHWIpt2wF/NmtAP9cFUCH5b UCG7Gu9+6Rv0GuWgb5fOtzhVJ90nfa8RbwJRdiPMIMQP8EZmBuvuXg3OBXOhz2FfF0Ey/lXB HuNTSq74Z/244xDxSH+eeoS2KRDKssWlTKKHsCTI/hKPNOjiJ+ppVQtagHmghgRtv/sneks2 4832zG24xteSvbiRSLc7JQeK1sHRVBiW8Cp8JMNLL7bf1E3cI3ENxM36el6E2CCt/4P/tokA 1nnAhMIoLYBrSOvxfq2hoBLN+q0AMcXQYMTNi0wJ1e4s0XPkq72hJrzg6AfJOF9nMQ6lK4cc hXwU5nYahi5Ymidqmt1gFiUhNAKSSlHcirXZHT5O2ZgL8I5L+ELk/e9FjbSGOA1JnLfnaMDT 3eIiGs3nbJrq9xeMfvr IronPort-HdrOrdr: A9a23:P66W/KqdhmHw70/frDtBV5kaV5oGeYIsimQD101hICG9E/b5qy nKpp8mPHDP5gr5NEtQ++xoRpPwO080hKQV3WB5B97LMDUO3lHYVL2KwrGM/9SKIVycygcy79 YET0A3YOebMbAx5fyW3OH3eOxQpKjhzEgo7t2utkuEJGtRGsddB+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 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1687448004293100003 Content-Type: text/plain; charset="utf-8" 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 :=3D $(shell echo $(ARCH) | \ -e 's/riscv.*/riscv/g') export ARCH SRCARCH =20 -export TARGET_ARCH :=3D $(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 :=3D $(SHELL) export CC CXX LD NM OBJCOPY OBJDUMP ADDR2LINE export YACC =3D $(if $(BISON),$(BISON),bison) @@ -262,7 +258,7 @@ export XEN_TREEWIDE_CFLAGS :=3D $(CFLAGS) ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) CLANG_FLAGS :=3D =20 -ifeq ($(TARGET_ARCH),x86) +ifeq ($(SRCARCH),x86) # The tests to select whether the integrated assembler is usable need to h= appen # before testing any assembler features, or else the result of the tests w= ould # be stale if the integrated assembler is not used. @@ -430,22 +426,22 @@ endif =20 ifdef building_out_of_srctree CFLAGS +=3D -I$(objtree)/include - CFLAGS +=3D -I$(objtree)/arch/$(TARGET_ARCH)/include + CFLAGS +=3D -I$(objtree)/arch/$(SRCARCH)/include endif CFLAGS +=3D -I$(srctree)/include -CFLAGS +=3D -I$(srctree)/arch/$(TARGET_ARCH)/include +CFLAGS +=3D -I$(srctree)/arch/$(SRCARCH)/include =20 # Note that link order matters! ALL_OBJS-y :=3D common/built_in.o ALL_OBJS-y +=3D drivers/built_in.o ALL_OBJS-y +=3D lib/built_in.o ALL_OBJS-y +=3D xsm/built_in.o -ALL_OBJS-y +=3D arch/$(TARGET_ARCH)/built_in.o +ALL_OBJS-y +=3D arch/$(SRCARCH)/built_in.o ALL_OBJS-$(CONFIG_CRYPTO) +=3D crypto/built_in.o =20 ALL_LIBS-y :=3D lib/lib.a =20 -include $(srctree)/arch/$(TARGET_ARCH)/arch.mk +include $(srctree)/arch/$(SRCARCH)/arch.mk =20 # define new variables to avoid the ones defined in Config.mk export XEN_CFLAGS :=3D $(CFLAGS) @@ -588,8 +584,8 @@ $(TARGET): outputmakefile FORCE $(Q)$(MAKE) $(build)=3Dtools $(Q)$(MAKE) $(build)=3D. include/xen/compile.h $(Q)$(MAKE) $(build)=3Dinclude all - $(Q)$(MAKE) $(build)=3Darch/$(TARGET_ARCH) include - $(Q)$(MAKE) $(build)=3D. arch/$(TARGET_ARCH)/include/asm/asm-offsets.h + $(Q)$(MAKE) $(build)=3Darch/$(SRCARCH) include + $(Q)$(MAKE) $(build)=3D. arch/$(SRCARCH)/include/asm/asm-offsets.h $(Q)$(MAKE) $(build)=3D. MKRELOC=3D$(MKRELOC) 'ALL_OBJS=3D$(ALL_OBJS-y)' = 'ALL_LIBS=3D$(ALL_LIBS-y)' $@ =20 SUBDIRS =3D 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 =3D $(filter-out -Wa$(comma)% -flto,$(1)) c_flags =3D -MMD -MP -MF $(depfile) $(XEN_CFLAGS) a_flags =3D -MMD -MP -MF $(depfile) $(XEN_AFLAGS) =20 -include $(srctree)/arch/$(TARGET_ARCH)/Rules.mk +include $(srctree)/arch/$(SRCARCH)/Rules.mk =20 c_flags +=3D $(_c_flags) a_flags +=3D $(_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) :=3D $(riscv-marc= h-y)c CFLAGS +=3D -march=3D$(riscv-march-y) -mstrict-align -mcmodel=3Dmedany =20 # TODO: Drop override when more of the build is working -override ALL_OBJS-y =3D arch/$(TARGET_ARCH)/built_in.o +override ALL_OBJS-y =3D arch/$(SRCARCH)/built_in.o override ALL_LIBS-y =3D 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 +=3D include/xen/compile.h =20 -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,$@) =20 -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 +=3D prelink.o =20 $(TARGET): prelink.o FORCE - $(Q)$(MAKE) $(build)=3Darch/$(TARGET_ARCH) $@ + $(Q)$(MAKE) $(build)=3Darch/$(SRCARCH) $@ --=20 Anthony PERARD